@aiaiai-pt/frankctl 0.13.1 → 0.13.2

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/index.js CHANGED
@@ -1,375 +1,383 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire as __frankctlCreateRequire } from "node:module";
3
3
  const require = __frankctlCreateRequire(import.meta.url);
4
- var Vw=Object.create;var ma=Object.defineProperty;var Gw=Object.getOwnPropertyDescriptor;var Kw=Object.getOwnPropertyNames;var Jw=Object.getPrototypeOf,Ww=Object.prototype.hasOwnProperty;var He=(t=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(e,r)=>(typeof require<"u"?require:e)[r]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')});var N=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Xe=(t,e)=>{for(var r in e)ma(t,r,{get:e[r],enumerable:!0})},Yw=(t,e,r,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of Kw(e))!Ww.call(t,n)&&n!==r&&ma(t,n,{get:()=>e[n],enumerable:!(i=Gw(e,n))||i.enumerable});return t};var Nt=(t,e,r)=>(r=t!=null?Vw(Jw(t)):{},Yw(e||!t||!t.__esModule?ma(r,"default",{value:t,enumerable:!0}):r,t));var Yn=N(ha=>{var yi=class extends Error{constructor(e,r,i){super(i),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=r,this.exitCode=e,this.nestedError=void 0}},ga=class extends yi{constructor(e){super(1,"commander.invalidArgument",e),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}};ha.CommanderError=yi;ha.InvalidArgumentError=ga});var _i=N(_a=>{var{InvalidArgumentError:Hw}=Yn(),ya=class{constructor(e,r){switch(this.description=r||"",this.variadic=!1,this.parseArg=void 0,this.defaultValue=void 0,this.defaultValueDescription=void 0,this.argChoices=void 0,e[0]){case"<":this.required=!0,this._name=e.slice(1,-1);break;case"[":this.required=!1,this._name=e.slice(1,-1);break;default:this.required=!0,this._name=e;break}this._name.length>3&&this._name.slice(-3)==="..."&&(this.variadic=!0,this._name=this._name.slice(0,-3))}name(){return this._name}_concatValue(e,r){return r===this.defaultValue||!Array.isArray(r)?[e]:r.concat(e)}default(e,r){return this.defaultValue=e,this.defaultValueDescription=r,this}argParser(e){return this.parseArg=e,this}choices(e){return this.argChoices=e.slice(),this.parseArg=(r,i)=>{if(!this.argChoices.includes(r))throw new Hw(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._concatValue(r,i):r},this}argRequired(){return this.required=!0,this}argOptional(){return this.required=!1,this}};function Xw(t){let e=t.name()+(t.variadic===!0?"...":"");return t.required?"<"+e+">":"["+e+"]"}_a.Argument=ya;_a.humanReadableArgName=Xw});var ba=N(Nm=>{var{humanReadableArgName:Qw}=_i(),va=class{constructor(){this.helpWidth=void 0,this.sortSubcommands=!1,this.sortOptions=!1,this.showGlobalOptions=!1}visibleCommands(e){let r=e.commands.filter(n=>!n._hidden),i=e._getHelpCommand();return i&&!i._hidden&&r.push(i),this.sortSubcommands&&r.sort((n,o)=>n.name().localeCompare(o.name())),r}compareOptions(e,r){let i=n=>n.short?n.short.replace(/^-/,""):n.long.replace(/^--/,"");return i(e).localeCompare(i(r))}visibleOptions(e){let r=e.options.filter(n=>!n.hidden),i=e._getHelpOption();if(i&&!i.hidden){let n=i.short&&e._findOption(i.short),o=i.long&&e._findOption(i.long);!n&&!o?r.push(i):i.long&&!o?r.push(e.createOption(i.long,i.description)):i.short&&!n&&r.push(e.createOption(i.short,i.description))}return this.sortOptions&&r.sort(this.compareOptions),r}visibleGlobalOptions(e){if(!this.showGlobalOptions)return[];let r=[];for(let i=e.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(e){return e._argsDescription&&e.registeredArguments.forEach(r=>{r.description=r.description||e._argsDescription[r.name()]||""}),e.registeredArguments.find(r=>r.description)?e.registeredArguments:[]}subcommandTerm(e){let r=e.registeredArguments.map(i=>Qw(i)).join(" ");return e._name+(e._aliases[0]?"|"+e._aliases[0]:"")+(e.options.length?" [options]":"")+(r?" "+r:"")}optionTerm(e){return e.flags}argumentTerm(e){return e.name()}longestSubcommandTermLength(e,r){return r.visibleCommands(e).reduce((i,n)=>Math.max(i,r.subcommandTerm(n).length),0)}longestOptionTermLength(e,r){return r.visibleOptions(e).reduce((i,n)=>Math.max(i,r.optionTerm(n).length),0)}longestGlobalOptionTermLength(e,r){return r.visibleGlobalOptions(e).reduce((i,n)=>Math.max(i,r.optionTerm(n).length),0)}longestArgumentTermLength(e,r){return r.visibleArguments(e).reduce((i,n)=>Math.max(i,r.argumentTerm(n).length),0)}commandUsage(e){let r=e._name;e._aliases[0]&&(r=r+"|"+e._aliases[0]);let i="";for(let n=e.parent;n;n=n.parent)i=n.name()+" "+i;return i+r+" "+e.usage()}commandDescription(e){return e.description()}subcommandDescription(e){return e.summary()||e.description()}optionDescription(e){let r=[];return e.argChoices&&r.push(`choices: ${e.argChoices.map(i=>JSON.stringify(i)).join(", ")}`),e.defaultValue!==void 0&&(e.required||e.optional||e.isBoolean()&&typeof e.defaultValue=="boolean")&&r.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),e.presetArg!==void 0&&e.optional&&r.push(`preset: ${JSON.stringify(e.presetArg)}`),e.envVar!==void 0&&r.push(`env: ${e.envVar}`),r.length>0?`${e.description} (${r.join(", ")})`:e.description}argumentDescription(e){let r=[];if(e.argChoices&&r.push(`choices: ${e.argChoices.map(i=>JSON.stringify(i)).join(", ")}`),e.defaultValue!==void 0&&r.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),r.length>0){let i=`(${r.join(", ")})`;return e.description?`${e.description} ${i}`:i}return e.description}formatHelp(e,r){let i=r.padWidth(e,r),n=r.helpWidth||80,o=2,s=2;function a(m,g){if(g){let y=`${m.padEnd(i+s)}${g}`;return r.wrap(y,n-o,i+s)}return m}function c(m){return m.join(`
5
- `).replace(/^/gm," ".repeat(o))}let l=[`Usage: ${r.commandUsage(e)}`,""],u=r.commandDescription(e);u.length>0&&(l=l.concat([r.wrap(u,n,0),""]));let d=r.visibleArguments(e).map(m=>a(r.argumentTerm(m),r.argumentDescription(m)));d.length>0&&(l=l.concat(["Arguments:",c(d),""]));let p=r.visibleOptions(e).map(m=>a(r.optionTerm(m),r.optionDescription(m)));if(p.length>0&&(l=l.concat(["Options:",c(p),""])),this.showGlobalOptions){let m=r.visibleGlobalOptions(e).map(g=>a(r.optionTerm(g),r.optionDescription(g)));m.length>0&&(l=l.concat(["Global Options:",c(m),""]))}let f=r.visibleCommands(e).map(m=>a(r.subcommandTerm(m),r.subcommandDescription(m)));return f.length>0&&(l=l.concat(["Commands:",c(f),""])),l.join(`
4
+ var t$=Object.create;var ba=Object.defineProperty;var n$=Object.getOwnPropertyDescriptor;var r$=Object.getOwnPropertyNames;var i$=Object.getPrototypeOf,o$=Object.prototype.hasOwnProperty;var He=(t=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(e,r)=>(typeof require<"u"?require:e)[r]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')});var N=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Xe=(t,e)=>{for(var r in e)ba(t,r,{get:e[r],enumerable:!0})},s$=(t,e,r,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of r$(e))!o$.call(t,n)&&n!==r&&ba(t,n,{get:()=>e[n],enumerable:!(i=n$(e,n))||i.enumerable});return t};var Ct=(t,e,r)=>(r=t!=null?t$(i$(t)):{},s$(e||!t||!t.__esModule?ba(r,"default",{value:t,enumerable:!0}):r,t));var Xn=N($a=>{var bi=class extends Error{constructor(e,r,i){super(i),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=r,this.exitCode=e,this.nestedError=void 0}},wa=class extends bi{constructor(e){super(1,"commander.invalidArgument",e),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}};$a.CommanderError=bi;$a.InvalidArgumentError=wa});var wi=N(Sa=>{var{InvalidArgumentError:a$}=Xn(),ka=class{constructor(e,r){switch(this.description=r||"",this.variadic=!1,this.parseArg=void 0,this.defaultValue=void 0,this.defaultValueDescription=void 0,this.argChoices=void 0,e[0]){case"<":this.required=!0,this._name=e.slice(1,-1);break;case"[":this.required=!1,this._name=e.slice(1,-1);break;default:this.required=!0,this._name=e;break}this._name.length>3&&this._name.slice(-3)==="..."&&(this.variadic=!0,this._name=this._name.slice(0,-3))}name(){return this._name}_concatValue(e,r){return r===this.defaultValue||!Array.isArray(r)?[e]:r.concat(e)}default(e,r){return this.defaultValue=e,this.defaultValueDescription=r,this}argParser(e){return this.parseArg=e,this}choices(e){return this.argChoices=e.slice(),this.parseArg=(r,i)=>{if(!this.argChoices.includes(r))throw new a$(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._concatValue(r,i):r},this}argRequired(){return this.required=!0,this}argOptional(){return this.required=!1,this}};function c$(t){let e=t.name()+(t.variadic===!0?"...":"");return t.required?"<"+e+">":"["+e+"]"}Sa.Argument=ka;Sa.humanReadableArgName=c$});var Ia=N(qm=>{var{humanReadableArgName:l$}=wi(),xa=class{constructor(){this.helpWidth=void 0,this.sortSubcommands=!1,this.sortOptions=!1,this.showGlobalOptions=!1}visibleCommands(e){let r=e.commands.filter(n=>!n._hidden),i=e._getHelpCommand();return i&&!i._hidden&&r.push(i),this.sortSubcommands&&r.sort((n,o)=>n.name().localeCompare(o.name())),r}compareOptions(e,r){let i=n=>n.short?n.short.replace(/^-/,""):n.long.replace(/^--/,"");return i(e).localeCompare(i(r))}visibleOptions(e){let r=e.options.filter(n=>!n.hidden),i=e._getHelpOption();if(i&&!i.hidden){let n=i.short&&e._findOption(i.short),o=i.long&&e._findOption(i.long);!n&&!o?r.push(i):i.long&&!o?r.push(e.createOption(i.long,i.description)):i.short&&!n&&r.push(e.createOption(i.short,i.description))}return this.sortOptions&&r.sort(this.compareOptions),r}visibleGlobalOptions(e){if(!this.showGlobalOptions)return[];let r=[];for(let i=e.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(e){return e._argsDescription&&e.registeredArguments.forEach(r=>{r.description=r.description||e._argsDescription[r.name()]||""}),e.registeredArguments.find(r=>r.description)?e.registeredArguments:[]}subcommandTerm(e){let r=e.registeredArguments.map(i=>l$(i)).join(" ");return e._name+(e._aliases[0]?"|"+e._aliases[0]:"")+(e.options.length?" [options]":"")+(r?" "+r:"")}optionTerm(e){return e.flags}argumentTerm(e){return e.name()}longestSubcommandTermLength(e,r){return r.visibleCommands(e).reduce((i,n)=>Math.max(i,r.subcommandTerm(n).length),0)}longestOptionTermLength(e,r){return r.visibleOptions(e).reduce((i,n)=>Math.max(i,r.optionTerm(n).length),0)}longestGlobalOptionTermLength(e,r){return r.visibleGlobalOptions(e).reduce((i,n)=>Math.max(i,r.optionTerm(n).length),0)}longestArgumentTermLength(e,r){return r.visibleArguments(e).reduce((i,n)=>Math.max(i,r.argumentTerm(n).length),0)}commandUsage(e){let r=e._name;e._aliases[0]&&(r=r+"|"+e._aliases[0]);let i="";for(let n=e.parent;n;n=n.parent)i=n.name()+" "+i;return i+r+" "+e.usage()}commandDescription(e){return e.description()}subcommandDescription(e){return e.summary()||e.description()}optionDescription(e){let r=[];return e.argChoices&&r.push(`choices: ${e.argChoices.map(i=>JSON.stringify(i)).join(", ")}`),e.defaultValue!==void 0&&(e.required||e.optional||e.isBoolean()&&typeof e.defaultValue=="boolean")&&r.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),e.presetArg!==void 0&&e.optional&&r.push(`preset: ${JSON.stringify(e.presetArg)}`),e.envVar!==void 0&&r.push(`env: ${e.envVar}`),r.length>0?`${e.description} (${r.join(", ")})`:e.description}argumentDescription(e){let r=[];if(e.argChoices&&r.push(`choices: ${e.argChoices.map(i=>JSON.stringify(i)).join(", ")}`),e.defaultValue!==void 0&&r.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),r.length>0){let i=`(${r.join(", ")})`;return e.description?`${e.description} ${i}`:i}return e.description}formatHelp(e,r){let i=r.padWidth(e,r),n=r.helpWidth||80,o=2,s=2;function a(m,h){if(h){let y=`${m.padEnd(i+s)}${h}`;return r.wrap(y,n-o,i+s)}return m}function c(m){return m.join(`
5
+ `).replace(/^/gm," ".repeat(o))}let l=[`Usage: ${r.commandUsage(e)}`,""],d=r.commandDescription(e);d.length>0&&(l=l.concat([r.wrap(d,n,0),""]));let u=r.visibleArguments(e).map(m=>a(r.argumentTerm(m),r.argumentDescription(m)));u.length>0&&(l=l.concat(["Arguments:",c(u),""]));let p=r.visibleOptions(e).map(m=>a(r.optionTerm(m),r.optionDescription(m)));if(p.length>0&&(l=l.concat(["Options:",c(p),""])),this.showGlobalOptions){let m=r.visibleGlobalOptions(e).map(h=>a(r.optionTerm(h),r.optionDescription(h)));m.length>0&&(l=l.concat(["Global Options:",c(m),""]))}let f=r.visibleCommands(e).map(m=>a(r.subcommandTerm(m),r.subcommandDescription(m)));return f.length>0&&(l=l.concat(["Commands:",c(f),""])),l.join(`
6
6
  `)}padWidth(e,r){return Math.max(r.longestOptionTermLength(e,r),r.longestGlobalOptionTermLength(e,r),r.longestSubcommandTermLength(e,r),r.longestArgumentTermLength(e,r))}wrap(e,r,i,n=40){let o=" \\f\\t\\v\xA0\u1680\u2000-\u200A\u202F\u205F\u3000\uFEFF",s=new RegExp(`[\\n][${o}]+`);if(e.match(s))return e;let a=r-i;if(a<n)return e;let c=e.slice(0,i),l=e.slice(i).replace(`\r
7
7
  `,`
8
- `),u=" ".repeat(i),p="\\s\u200B",f=new RegExp(`
9
- |.{1,${a-1}}([${p}]|$)|[^${p}]+?([${p}]|$)`,"g"),m=l.match(f)||[];return c+m.map((g,y)=>g===`
10
- `?"":(y>0?u:"")+g.trimEnd()).join(`
11
- `)}};Nm.Help=va});var Sa=N(ka=>{var{InvalidArgumentError:e$}=Yn(),wa=class{constructor(e,r){this.flags=e,this.description=r||"",this.required=e.includes("<"),this.optional=e.includes("["),this.variadic=/\w\.\.\.[>\]]$/.test(e),this.mandatory=!1;let i=n$(e);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}default(e,r){return this.defaultValue=e,this.defaultValueDescription=r,this}preset(e){return this.presetArg=e,this}conflicts(e){return this.conflictsWith=this.conflictsWith.concat(e),this}implies(e){let r=e;return typeof e=="string"&&(r={[e]:!0}),this.implied=Object.assign(this.implied||{},r),this}env(e){return this.envVar=e,this}argParser(e){return this.parseArg=e,this}makeOptionMandatory(e=!0){return this.mandatory=!!e,this}hideHelp(e=!0){return this.hidden=!!e,this}_concatValue(e,r){return r===this.defaultValue||!Array.isArray(r)?[e]:r.concat(e)}choices(e){return this.argChoices=e.slice(),this.parseArg=(r,i)=>{if(!this.argChoices.includes(r))throw new e$(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._concatValue(r,i):r},this}name(){return this.long?this.long.replace(/^--/,""):this.short.replace(/^-/,"")}attributeName(){return t$(this.name().replace(/^no-/,""))}is(e){return this.short===e||this.long===e}isBoolean(){return!this.required&&!this.optional&&!this.negate}},$a=class{constructor(e){this.positiveOptions=new Map,this.negativeOptions=new Map,this.dualOptions=new Set,e.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(e,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===e)}};function t$(t){return t.split("-").reduce((e,r)=>e+r[0].toUpperCase()+r.slice(1))}function n$(t){let e,r,i=t.split(/[ |,]+/);return i.length>1&&!/^[[<]/.test(i[1])&&(e=i.shift()),r=i.shift(),!e&&/^-[^-]$/.test(r)&&(e=r,r=void 0),{shortFlag:e,longFlag:r}}ka.Option=wa;ka.DualOptions=$a});var Dm=N(Cm=>{function r$(t,e){if(Math.abs(t.length-e.length)>3)return Math.max(t.length,e.length);let r=[];for(let i=0;i<=t.length;i++)r[i]=[i];for(let i=0;i<=e.length;i++)r[0][i]=i;for(let i=1;i<=e.length;i++)for(let n=1;n<=t.length;n++){let o=1;t[n-1]===e[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&&t[n-1]===e[i-2]&&t[n-2]===e[i-1]&&(r[n][i]=Math.min(r[n][i],r[n-2][i-2]+1))}return r[t.length][e.length]}function i$(t,e){if(!e||e.length===0)return"";e=Array.from(new Set(e));let r=t.startsWith("--");r&&(t=t.slice(2),e=e.map(s=>s.slice(2)));let i=[],n=3,o=.4;return e.forEach(s=>{if(s.length<=1)return;let a=r$(t,s),c=Math.max(t.length,s.length);(c-a)/c>o&&(a<n?(n=a,i=[s]):a===n&&i.push(s))}),i.sort((s,a)=>s.localeCompare(a)),r&&(i=i.map(s=>`--${s}`)),i.length>1?`
8
+ `),d=" ".repeat(i),p="\\s\u200B",f=new RegExp(`
9
+ |.{1,${a-1}}([${p}]|$)|[^${p}]+?([${p}]|$)`,"g"),m=l.match(f)||[];return c+m.map((h,y)=>h===`
10
+ `?"":(y>0?d:"")+h.trimEnd()).join(`
11
+ `)}};qm.Help=xa});var Aa=N(Ta=>{var{InvalidArgumentError:u$}=Xn(),Oa=class{constructor(e,r){this.flags=e,this.description=r||"",this.required=e.includes("<"),this.optional=e.includes("["),this.variadic=/\w\.\.\.[>\]]$/.test(e),this.mandatory=!1;let i=p$(e);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}default(e,r){return this.defaultValue=e,this.defaultValueDescription=r,this}preset(e){return this.presetArg=e,this}conflicts(e){return this.conflictsWith=this.conflictsWith.concat(e),this}implies(e){let r=e;return typeof e=="string"&&(r={[e]:!0}),this.implied=Object.assign(this.implied||{},r),this}env(e){return this.envVar=e,this}argParser(e){return this.parseArg=e,this}makeOptionMandatory(e=!0){return this.mandatory=!!e,this}hideHelp(e=!0){return this.hidden=!!e,this}_concatValue(e,r){return r===this.defaultValue||!Array.isArray(r)?[e]:r.concat(e)}choices(e){return this.argChoices=e.slice(),this.parseArg=(r,i)=>{if(!this.argChoices.includes(r))throw new u$(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._concatValue(r,i):r},this}name(){return this.long?this.long.replace(/^--/,""):this.short.replace(/^-/,"")}attributeName(){return d$(this.name().replace(/^no-/,""))}is(e){return this.short===e||this.long===e}isBoolean(){return!this.required&&!this.optional&&!this.negate}},Pa=class{constructor(e){this.positiveOptions=new Map,this.negativeOptions=new Map,this.dualOptions=new Set,e.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(e,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===e)}};function d$(t){return t.split("-").reduce((e,r)=>e+r[0].toUpperCase()+r.slice(1))}function p$(t){let e,r,i=t.split(/[ |,]+/);return i.length>1&&!/^[[<]/.test(i[1])&&(e=i.shift()),r=i.shift(),!e&&/^-[^-]$/.test(r)&&(e=r,r=void 0),{shortFlag:e,longFlag:r}}Ta.Option=Oa;Ta.DualOptions=Pa});var Fm=N(Zm=>{function f$(t,e){if(Math.abs(t.length-e.length)>3)return Math.max(t.length,e.length);let r=[];for(let i=0;i<=t.length;i++)r[i]=[i];for(let i=0;i<=e.length;i++)r[0][i]=i;for(let i=1;i<=e.length;i++)for(let n=1;n<=t.length;n++){let o=1;t[n-1]===e[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&&t[n-1]===e[i-2]&&t[n-2]===e[i-1]&&(r[n][i]=Math.min(r[n][i],r[n-2][i-2]+1))}return r[t.length][e.length]}function m$(t,e){if(!e||e.length===0)return"";e=Array.from(new Set(e));let r=t.startsWith("--");r&&(t=t.slice(2),e=e.map(s=>s.slice(2)));let i=[],n=3,o=.4;return e.forEach(s=>{if(s.length<=1)return;let a=f$(t,s),c=Math.max(t.length,s.length);(c-a)/c>o&&(a<n?(n=a,i=[s]):a===n&&i.push(s))}),i.sort((s,a)=>s.localeCompare(a)),r&&(i=i.map(s=>`--${s}`)),i.length>1?`
12
12
  (Did you mean one of ${i.join(", ")}?)`:i.length===1?`
13
- (Did you mean ${i[0]}?)`:""}Cm.suggestSimilar=i$});var Mm=N(Lm=>{var o$=He("node:events").EventEmitter,xa=He("node:child_process"),Qe=He("node:path"),Ia=He("node:fs"),re=He("node:process"),{Argument:s$,humanReadableArgName:a$}=_i(),{CommanderError:Oa}=Yn(),{Help:c$}=ba(),{Option:jm,DualOptions:l$}=Sa(),{suggestSimilar:Rm}=Dm(),Pa=class t extends o${constructor(e){super(),this.commands=[],this.options=[],this.parent=null,this._allowUnknownOption=!1,this._allowExcessArguments=!0,this.registeredArguments=[],this._args=this.registeredArguments,this.args=[],this.rawArgs=[],this.processedArgs=[],this._scriptPath=null,this._name=e||"",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._outputConfiguration={writeOut:r=>re.stdout.write(r),writeErr:r=>re.stderr.write(r),getOutHelpWidth:()=>re.stdout.isTTY?re.stdout.columns:void 0,getErrHelpWidth:()=>re.stderr.isTTY?re.stderr.columns:void 0,outputError:(r,i)=>i(r)},this._hidden=!1,this._helpOption=void 0,this._addImplicitHelpCommand=void 0,this._helpCommand=void 0,this._helpConfiguration={}}copyInheritedSettings(e){return this._outputConfiguration=e._outputConfiguration,this._helpOption=e._helpOption,this._helpCommand=e._helpCommand,this._helpConfiguration=e._helpConfiguration,this._exitCallback=e._exitCallback,this._storeOptionsAsProperties=e._storeOptionsAsProperties,this._combineFlagAndOptionalValue=e._combineFlagAndOptionalValue,this._allowExcessArguments=e._allowExcessArguments,this._enablePositionalOptions=e._enablePositionalOptions,this._showHelpAfterError=e._showHelpAfterError,this._showSuggestionAfterError=e._showSuggestionAfterError,this}_getCommandAndAncestors(){let e=[];for(let r=this;r;r=r.parent)e.push(r);return e}command(e,r,i){let n=r,o=i;typeof n=="object"&&n!==null&&(o=n,n=null),o=o||{};let[,s,a]=e.match(/([^ ]+) *(.*)/),c=this.createCommand(s);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,a&&c.arguments(a),this._registerCommand(c),c.parent=this,c.copyInheritedSettings(this),n?this:c}createCommand(e){return new t(e)}createHelp(){return Object.assign(new c$,this.configureHelp())}configureHelp(e){return e===void 0?this._helpConfiguration:(this._helpConfiguration=e,this)}configureOutput(e){return e===void 0?this._outputConfiguration:(Object.assign(this._outputConfiguration,e),this)}showHelpAfterError(e=!0){return typeof e!="string"&&(e=!!e),this._showHelpAfterError=e,this}showSuggestionAfterError(e=!0){return this._showSuggestionAfterError=!!e,this}addCommand(e,r){if(!e._name)throw new Error(`Command passed to .addCommand() must have a name
14
- - specify the name in Command constructor or using .name()`);return r=r||{},r.isDefault&&(this._defaultCommandName=e._name),(r.noHelp||r.hidden)&&(e._hidden=!0),this._registerCommand(e),e.parent=this,e._checkForBrokenPassThrough(),this}createArgument(e,r){return new s$(e,r)}argument(e,r,i,n){let o=this.createArgument(e,r);return typeof i=="function"?o.default(n).argParser(i):o.default(i),this.addArgument(o),this}arguments(e){return e.trim().split(/ +/).forEach(r=>{this.argument(r)}),this}addArgument(e){let r=this.registeredArguments.slice(-1)[0];if(r&&r.variadic)throw new Error(`only the last argument can be variadic '${r.name()}'`);if(e.required&&e.defaultValue!==void 0&&e.parseArg===void 0)throw new Error(`a default value for a required argument is never used: '${e.name()}'`);return this.registeredArguments.push(e),this}helpCommand(e,r){if(typeof e=="boolean")return this._addImplicitHelpCommand=e,this;e=e??"help [command]";let[,i,n]=e.match(/([^ ]+) *(.*)/),o=r??"display help for command",s=this.createCommand(i);return s.helpOption(!1),n&&s.arguments(n),o&&s.description(o),this._addImplicitHelpCommand=!0,this._helpCommand=s,this}addHelpCommand(e,r){return typeof e!="object"?(this.helpCommand(e,r),this):(this._addImplicitHelpCommand=!0,this._helpCommand=e,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(e,r){let i=["preSubcommand","preAction","postAction"];if(!i.includes(e))throw new Error(`Unexpected value for event passed to hook : '${e}'.
15
- Expecting one of '${i.join("', '")}'`);return this._lifeCycleHooks[e]?this._lifeCycleHooks[e].push(r):this._lifeCycleHooks[e]=[r],this}exitOverride(e){return e?this._exitCallback=e:this._exitCallback=r=>{if(r.code!=="commander.executeSubCommandAsync")throw r},this}_exit(e,r,i){this._exitCallback&&this._exitCallback(new Oa(e,r,i)),re.exit(e)}action(e){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),e.apply(this,o)};return this._actionHandler=r,this}createOption(e,r){return new jm(e,r)}_callParseArg(e,r,i,n){try{return e.parseArg(r,i)}catch(o){if(o.code==="commander.invalidArgument"){let s=`${n} ${o.message}`;this.error(s,{exitCode:o.exitCode,code:o.code})}throw o}}_registerOption(e){let r=e.short&&this._findOption(e.short)||e.long&&this._findOption(e.long);if(r){let i=e.long&&this._findOption(e.long)?e.long:e.short;throw new Error(`Cannot add option '${e.flags}'${this._name&&` to command '${this._name}'`} due to conflicting flag '${i}'
16
- - already used by option '${r.flags}'`)}this.options.push(e)}_registerCommand(e){let r=n=>[n.name()].concat(n.aliases()),i=r(e).find(n=>this._findCommand(n));if(i){let n=r(this._findCommand(i)).join("|"),o=r(e).join("|");throw new Error(`cannot add command '${o}' as already have command '${n}'`)}this.commands.push(e)}addOption(e){this._registerOption(e);let r=e.name(),i=e.attributeName();if(e.negate){let o=e.long.replace(/^--no-/,"--");this._findOption(o)||this.setOptionValueWithSource(i,e.defaultValue===void 0?!0:e.defaultValue,"default")}else e.defaultValue!==void 0&&this.setOptionValueWithSource(i,e.defaultValue,"default");let n=(o,s,a)=>{o==null&&e.presetArg!==void 0&&(o=e.presetArg);let c=this.getOptionValue(i);o!==null&&e.parseArg?o=this._callParseArg(e,o,c,s):o!==null&&e.variadic&&(o=e._concatValue(o,c)),o==null&&(e.negate?o=!1:e.isBoolean()||e.optional?o=!0:o=""),this.setOptionValueWithSource(i,o,a)};return this.on("option:"+r,o=>{let s=`error: option '${e.flags}' argument '${o}' is invalid.`;n(o,s,"cli")}),e.envVar&&this.on("optionEnv:"+r,o=>{let s=`error: option '${e.flags}' value '${o}' from env '${e.envVar}' is invalid.`;n(o,s,"env")}),this}_optionEx(e,r,i,n,o){if(typeof r=="object"&&r instanceof jm)throw new Error("To add an Option object use addOption() instead of option() or requiredOption()");let s=this.createOption(r,i);if(s.makeOptionMandatory(!!e.mandatory),typeof n=="function")s.default(o).argParser(n);else if(n instanceof RegExp){let a=n;n=(c,l)=>{let u=a.exec(c);return u?u[0]:l},s.default(o).argParser(n)}else s.default(n);return this.addOption(s)}option(e,r,i,n){return this._optionEx({},e,r,i,n)}requiredOption(e,r,i,n){return this._optionEx({mandatory:!0},e,r,i,n)}combineFlagAndOptionalValue(e=!0){return this._combineFlagAndOptionalValue=!!e,this}allowUnknownOption(e=!0){return this._allowUnknownOption=!!e,this}allowExcessArguments(e=!0){return this._allowExcessArguments=!!e,this}enablePositionalOptions(e=!0){return this._enablePositionalOptions=!!e,this}passThroughOptions(e=!0){return this._passThroughOptions=!!e,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(e=!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=!!e,this}getOptionValue(e){return this._storeOptionsAsProperties?this[e]:this._optionValues[e]}setOptionValue(e,r){return this.setOptionValueWithSource(e,r,void 0)}setOptionValueWithSource(e,r,i){return this._storeOptionsAsProperties?this[e]=r:this._optionValues[e]=r,this._optionValueSources[e]=i,this}getOptionValueSource(e){return this._optionValueSources[e]}getOptionValueSourceWithGlobals(e){let r;return this._getCommandAndAncestors().forEach(i=>{i.getOptionValueSource(e)!==void 0&&(r=i.getOptionValueSource(e))}),r}_prepareUserArgs(e,r){if(e!==void 0&&!Array.isArray(e))throw new Error("first parameter to parse must be array or undefined");if(r=r||{},e===void 0&&r.from===void 0){re.versions?.electron&&(r.from="electron");let n=re.execArgv??[];(n.includes("-e")||n.includes("--eval")||n.includes("-p")||n.includes("--print"))&&(r.from="eval")}e===void 0&&(e=re.argv),this.rawArgs=e.slice();let i;switch(r.from){case void 0:case"node":this._scriptPath=e[1],i=e.slice(2);break;case"electron":re.defaultApp?(this._scriptPath=e[1],i=e.slice(2)):i=e.slice(1);break;case"user":i=e.slice(0);break;case"eval":i=e.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(e,r){let i=this._prepareUserArgs(e,r);return this._parseCommand([],i),this}async parseAsync(e,r){let i=this._prepareUserArgs(e,r);return await this._parseCommand([],i),this}_executeSubCommand(e,r){r=r.slice();let i=!1,n=[".js",".ts",".tsx",".mjs",".cjs"];function o(u,d){let p=Qe.resolve(u,d);if(Ia.existsSync(p))return p;if(n.includes(Qe.extname(d)))return;let f=n.find(m=>Ia.existsSync(`${p}${m}`));if(f)return`${p}${f}`}this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let s=e._executableFile||`${this._name}-${e._name}`,a=this._executableDir||"";if(this._scriptPath){let u;try{u=Ia.realpathSync(this._scriptPath)}catch{u=this._scriptPath}a=Qe.resolve(Qe.dirname(u),a)}if(a){let u=o(a,s);if(!u&&!e._executableFile&&this._scriptPath){let d=Qe.basename(this._scriptPath,Qe.extname(this._scriptPath));d!==this._name&&(u=o(a,`${d}-${e._name}`))}s=u||s}i=n.includes(Qe.extname(s));let c;re.platform!=="win32"?i?(r.unshift(s),r=Um(re.execArgv).concat(r),c=xa.spawn(re.argv[0],r,{stdio:"inherit"})):c=xa.spawn(s,r,{stdio:"inherit"}):(r.unshift(s),r=Um(re.execArgv).concat(r),c=xa.spawn(re.execPath,r,{stdio:"inherit"})),c.killed||["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"].forEach(d=>{re.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 Oa(u,"commander.executeSubCommandAsync","(close)")):re.exit(u)}),c.on("error",u=>{if(u.code==="ENOENT"){let d=a?`searched for local subcommand relative to directory '${a}'`:"no directory for search for local subcommand, use .executableDir() to supply a custom directory",p=`'${s}' does not exist
13
+ (Did you mean ${i[0]}?)`:""}Zm.suggestSimilar=m$});var Km=N(Jm=>{var g$=He("node:events").EventEmitter,Ea=He("node:child_process"),Qe=He("node:path"),za=He("node:fs"),se=He("node:process"),{Argument:h$,humanReadableArgName:y$}=wi(),{CommanderError:Na}=Xn(),{Help:_$}=Ia(),{Option:Bm,DualOptions:v$}=Aa(),{suggestSimilar:Vm}=Fm(),Ca=class t extends g${constructor(e){super(),this.commands=[],this.options=[],this.parent=null,this._allowUnknownOption=!1,this._allowExcessArguments=!0,this.registeredArguments=[],this._args=this.registeredArguments,this.args=[],this.rawArgs=[],this.processedArgs=[],this._scriptPath=null,this._name=e||"",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._outputConfiguration={writeOut:r=>se.stdout.write(r),writeErr:r=>se.stderr.write(r),getOutHelpWidth:()=>se.stdout.isTTY?se.stdout.columns:void 0,getErrHelpWidth:()=>se.stderr.isTTY?se.stderr.columns:void 0,outputError:(r,i)=>i(r)},this._hidden=!1,this._helpOption=void 0,this._addImplicitHelpCommand=void 0,this._helpCommand=void 0,this._helpConfiguration={}}copyInheritedSettings(e){return this._outputConfiguration=e._outputConfiguration,this._helpOption=e._helpOption,this._helpCommand=e._helpCommand,this._helpConfiguration=e._helpConfiguration,this._exitCallback=e._exitCallback,this._storeOptionsAsProperties=e._storeOptionsAsProperties,this._combineFlagAndOptionalValue=e._combineFlagAndOptionalValue,this._allowExcessArguments=e._allowExcessArguments,this._enablePositionalOptions=e._enablePositionalOptions,this._showHelpAfterError=e._showHelpAfterError,this._showSuggestionAfterError=e._showSuggestionAfterError,this}_getCommandAndAncestors(){let e=[];for(let r=this;r;r=r.parent)e.push(r);return e}command(e,r,i){let n=r,o=i;typeof n=="object"&&n!==null&&(o=n,n=null),o=o||{};let[,s,a]=e.match(/([^ ]+) *(.*)/),c=this.createCommand(s);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,a&&c.arguments(a),this._registerCommand(c),c.parent=this,c.copyInheritedSettings(this),n?this:c}createCommand(e){return new t(e)}createHelp(){return Object.assign(new _$,this.configureHelp())}configureHelp(e){return e===void 0?this._helpConfiguration:(this._helpConfiguration=e,this)}configureOutput(e){return e===void 0?this._outputConfiguration:(Object.assign(this._outputConfiguration,e),this)}showHelpAfterError(e=!0){return typeof e!="string"&&(e=!!e),this._showHelpAfterError=e,this}showSuggestionAfterError(e=!0){return this._showSuggestionAfterError=!!e,this}addCommand(e,r){if(!e._name)throw new Error(`Command passed to .addCommand() must have a name
14
+ - specify the name in Command constructor or using .name()`);return r=r||{},r.isDefault&&(this._defaultCommandName=e._name),(r.noHelp||r.hidden)&&(e._hidden=!0),this._registerCommand(e),e.parent=this,e._checkForBrokenPassThrough(),this}createArgument(e,r){return new h$(e,r)}argument(e,r,i,n){let o=this.createArgument(e,r);return typeof i=="function"?o.default(n).argParser(i):o.default(i),this.addArgument(o),this}arguments(e){return e.trim().split(/ +/).forEach(r=>{this.argument(r)}),this}addArgument(e){let r=this.registeredArguments.slice(-1)[0];if(r&&r.variadic)throw new Error(`only the last argument can be variadic '${r.name()}'`);if(e.required&&e.defaultValue!==void 0&&e.parseArg===void 0)throw new Error(`a default value for a required argument is never used: '${e.name()}'`);return this.registeredArguments.push(e),this}helpCommand(e,r){if(typeof e=="boolean")return this._addImplicitHelpCommand=e,this;e=e??"help [command]";let[,i,n]=e.match(/([^ ]+) *(.*)/),o=r??"display help for command",s=this.createCommand(i);return s.helpOption(!1),n&&s.arguments(n),o&&s.description(o),this._addImplicitHelpCommand=!0,this._helpCommand=s,this}addHelpCommand(e,r){return typeof e!="object"?(this.helpCommand(e,r),this):(this._addImplicitHelpCommand=!0,this._helpCommand=e,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(e,r){let i=["preSubcommand","preAction","postAction"];if(!i.includes(e))throw new Error(`Unexpected value for event passed to hook : '${e}'.
15
+ Expecting one of '${i.join("', '")}'`);return this._lifeCycleHooks[e]?this._lifeCycleHooks[e].push(r):this._lifeCycleHooks[e]=[r],this}exitOverride(e){return e?this._exitCallback=e:this._exitCallback=r=>{if(r.code!=="commander.executeSubCommandAsync")throw r},this}_exit(e,r,i){this._exitCallback&&this._exitCallback(new Na(e,r,i)),se.exit(e)}action(e){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),e.apply(this,o)};return this._actionHandler=r,this}createOption(e,r){return new Bm(e,r)}_callParseArg(e,r,i,n){try{return e.parseArg(r,i)}catch(o){if(o.code==="commander.invalidArgument"){let s=`${n} ${o.message}`;this.error(s,{exitCode:o.exitCode,code:o.code})}throw o}}_registerOption(e){let r=e.short&&this._findOption(e.short)||e.long&&this._findOption(e.long);if(r){let i=e.long&&this._findOption(e.long)?e.long:e.short;throw new Error(`Cannot add option '${e.flags}'${this._name&&` to command '${this._name}'`} due to conflicting flag '${i}'
16
+ - already used by option '${r.flags}'`)}this.options.push(e)}_registerCommand(e){let r=n=>[n.name()].concat(n.aliases()),i=r(e).find(n=>this._findCommand(n));if(i){let n=r(this._findCommand(i)).join("|"),o=r(e).join("|");throw new Error(`cannot add command '${o}' as already have command '${n}'`)}this.commands.push(e)}addOption(e){this._registerOption(e);let r=e.name(),i=e.attributeName();if(e.negate){let o=e.long.replace(/^--no-/,"--");this._findOption(o)||this.setOptionValueWithSource(i,e.defaultValue===void 0?!0:e.defaultValue,"default")}else e.defaultValue!==void 0&&this.setOptionValueWithSource(i,e.defaultValue,"default");let n=(o,s,a)=>{o==null&&e.presetArg!==void 0&&(o=e.presetArg);let c=this.getOptionValue(i);o!==null&&e.parseArg?o=this._callParseArg(e,o,c,s):o!==null&&e.variadic&&(o=e._concatValue(o,c)),o==null&&(e.negate?o=!1:e.isBoolean()||e.optional?o=!0:o=""),this.setOptionValueWithSource(i,o,a)};return this.on("option:"+r,o=>{let s=`error: option '${e.flags}' argument '${o}' is invalid.`;n(o,s,"cli")}),e.envVar&&this.on("optionEnv:"+r,o=>{let s=`error: option '${e.flags}' value '${o}' from env '${e.envVar}' is invalid.`;n(o,s,"env")}),this}_optionEx(e,r,i,n,o){if(typeof r=="object"&&r instanceof Bm)throw new Error("To add an Option object use addOption() instead of option() or requiredOption()");let s=this.createOption(r,i);if(s.makeOptionMandatory(!!e.mandatory),typeof n=="function")s.default(o).argParser(n);else if(n instanceof RegExp){let a=n;n=(c,l)=>{let d=a.exec(c);return d?d[0]:l},s.default(o).argParser(n)}else s.default(n);return this.addOption(s)}option(e,r,i,n){return this._optionEx({},e,r,i,n)}requiredOption(e,r,i,n){return this._optionEx({mandatory:!0},e,r,i,n)}combineFlagAndOptionalValue(e=!0){return this._combineFlagAndOptionalValue=!!e,this}allowUnknownOption(e=!0){return this._allowUnknownOption=!!e,this}allowExcessArguments(e=!0){return this._allowExcessArguments=!!e,this}enablePositionalOptions(e=!0){return this._enablePositionalOptions=!!e,this}passThroughOptions(e=!0){return this._passThroughOptions=!!e,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(e=!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=!!e,this}getOptionValue(e){return this._storeOptionsAsProperties?this[e]:this._optionValues[e]}setOptionValue(e,r){return this.setOptionValueWithSource(e,r,void 0)}setOptionValueWithSource(e,r,i){return this._storeOptionsAsProperties?this[e]=r:this._optionValues[e]=r,this._optionValueSources[e]=i,this}getOptionValueSource(e){return this._optionValueSources[e]}getOptionValueSourceWithGlobals(e){let r;return this._getCommandAndAncestors().forEach(i=>{i.getOptionValueSource(e)!==void 0&&(r=i.getOptionValueSource(e))}),r}_prepareUserArgs(e,r){if(e!==void 0&&!Array.isArray(e))throw new Error("first parameter to parse must be array or undefined");if(r=r||{},e===void 0&&r.from===void 0){se.versions?.electron&&(r.from="electron");let n=se.execArgv??[];(n.includes("-e")||n.includes("--eval")||n.includes("-p")||n.includes("--print"))&&(r.from="eval")}e===void 0&&(e=se.argv),this.rawArgs=e.slice();let i;switch(r.from){case void 0:case"node":this._scriptPath=e[1],i=e.slice(2);break;case"electron":se.defaultApp?(this._scriptPath=e[1],i=e.slice(2)):i=e.slice(1);break;case"user":i=e.slice(0);break;case"eval":i=e.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(e,r){let i=this._prepareUserArgs(e,r);return this._parseCommand([],i),this}async parseAsync(e,r){let i=this._prepareUserArgs(e,r);return await this._parseCommand([],i),this}_executeSubCommand(e,r){r=r.slice();let i=!1,n=[".js",".ts",".tsx",".mjs",".cjs"];function o(d,u){let p=Qe.resolve(d,u);if(za.existsSync(p))return p;if(n.includes(Qe.extname(u)))return;let f=n.find(m=>za.existsSync(`${p}${m}`));if(f)return`${p}${f}`}this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let s=e._executableFile||`${this._name}-${e._name}`,a=this._executableDir||"";if(this._scriptPath){let d;try{d=za.realpathSync(this._scriptPath)}catch{d=this._scriptPath}a=Qe.resolve(Qe.dirname(d),a)}if(a){let d=o(a,s);if(!d&&!e._executableFile&&this._scriptPath){let u=Qe.basename(this._scriptPath,Qe.extname(this._scriptPath));u!==this._name&&(d=o(a,`${u}-${e._name}`))}s=d||s}i=n.includes(Qe.extname(s));let c;se.platform!=="win32"?i?(r.unshift(s),r=Gm(se.execArgv).concat(r),c=Ea.spawn(se.argv[0],r,{stdio:"inherit"})):c=Ea.spawn(s,r,{stdio:"inherit"}):(r.unshift(s),r=Gm(se.execArgv).concat(r),c=Ea.spawn(se.execPath,r,{stdio:"inherit"})),c.killed||["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"].forEach(u=>{se.on(u,()=>{c.killed===!1&&c.exitCode===null&&c.kill(u)})});let l=this._exitCallback;c.on("close",d=>{d=d??1,l?l(new Na(d,"commander.executeSubCommandAsync","(close)")):se.exit(d)}),c.on("error",d=>{if(d.code==="ENOENT"){let u=a?`searched for local subcommand relative to directory '${a}'`:"no directory for search for local subcommand, use .executableDir() to supply a custom directory",p=`'${s}' does not exist
17
17
  - if '${e._name}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead
18
18
  - if the default executable name is not suitable, use the executableFile option to supply a custom name or path
19
- - ${d}`;throw new Error(p)}else if(u.code==="EACCES")throw new Error(`'${s}' not executable`);if(!l)re.exit(1);else{let d=new Oa(1,"commander.executeSubCommandAsync","(error)");d.nestedError=u,l(d)}}),this.runningCommand=c}_dispatchSubcommand(e,r,i){let n=this._findCommand(e);n||this.help({error:!0});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(e){e||this.help();let r=this._findCommand(e);return r&&!r._executableHandler&&r.help(),this._dispatchSubcommand(e,[],[this._getHelpOption()?.long??this._getHelpOption()?.short??"--help"])}_checkNumberOfArguments(){this.registeredArguments.forEach((e,r)=>{e.required&&this.args[r]==null&&this.missingArgument(e.name())}),!(this.registeredArguments.length>0&&this.registeredArguments[this.registeredArguments.length-1].variadic)&&this.args.length>this.registeredArguments.length&&this._excessArguments(this.args)}_processArguments(){let e=(i,n,o)=>{let s=n;if(n!==null&&i.parseArg){let a=`error: command-argument value '${n}' is invalid for argument '${i.name()}'.`;s=this._callParseArg(i,n,o,a)}return s};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((s,a)=>e(i,a,s),i.defaultValue))):o===void 0&&(o=[]):n<this.args.length&&(o=this.args[n],i.parseArg&&(o=e(i,o,i.defaultValue))),r[n]=o}),this.processedArgs=r}_chainOrCall(e,r){return e&&e.then&&typeof e.then=="function"?e.then(()=>r()):r()}_chainOrCallHooks(e,r){let i=e,n=[];return this._getCommandAndAncestors().reverse().filter(o=>o._lifeCycleHooks[r]!==void 0).forEach(o=>{o._lifeCycleHooks[r].forEach(s=>{n.push({hookedCommand:o,callback:s})})}),r==="postAction"&&n.reverse(),n.forEach(o=>{i=this._chainOrCall(i,()=>o.callback(o.hookedCommand,this))}),i}_chainOrCallSubCommandHook(e,r,i){let n=e;return this._lifeCycleHooks[i]!==void 0&&this._lifeCycleHooks[i].forEach(o=>{n=this._chainOrCall(n,()=>o(this,r))}),n}_parseCommand(e,r){let i=this.parseOptions(r);if(this._parseOptionsEnv(),this._parseOptionsImplied(),e=e.concat(i.operands),r=i.unknown,this.args=e.concat(r),e&&this._findCommand(e[0]))return this._dispatchSubcommand(e[0],e.slice(1),r);if(this._getHelpCommand()&&e[0]===this._getHelpCommand().name())return this._dispatchHelpCommand(e[1]);if(this._defaultCommandName)return this._outputHelpIfRequested(r),this._dispatchSubcommand(this._defaultCommandName,e,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 s;return s=this._chainOrCallHooks(s,"preAction"),s=this._chainOrCall(s,()=>this._actionHandler(this.processedArgs)),this.parent&&(s=this._chainOrCall(s,()=>{this.parent.emit(o,e,r)})),s=this._chainOrCallHooks(s,"postAction"),s}if(this.parent&&this.parent.listenerCount(o))n(),this._processArguments(),this.parent.emit(o,e,r);else if(e.length){if(this._findCommand("*"))return this._dispatchSubcommand("*",e,r);this.listenerCount("command:*")?this.emit("command:*",e,r):this.commands.length?this.unknownCommand():(n(),this._processArguments())}else this.commands.length?(n(),this.help({error:!0})):(n(),this._processArguments())}_findCommand(e){if(e)return this.commands.find(r=>r._name===e||r._aliases.includes(e))}_findOption(e){return this.options.find(r=>r.is(e))}_checkForMissingMandatoryOptions(){this._getCommandAndAncestors().forEach(e=>{e.options.forEach(r=>{r.mandatory&&e.getOptionValue(r.attributeName())===void 0&&e.missingMandatoryOptionValue(r)})})}_checkForConflictingLocalOptions(){let e=this.options.filter(i=>{let n=i.attributeName();return this.getOptionValue(n)===void 0?!1:this.getOptionValueSource(n)!=="default"});e.filter(i=>i.conflictsWith.length>0).forEach(i=>{let n=e.find(o=>i.conflictsWith.includes(o.attributeName()));n&&this._conflictingOption(i,n)})}_checkForConflictingOptions(){this._getCommandAndAncestors().forEach(e=>{e._checkForConflictingLocalOptions()})}parseOptions(e){let r=[],i=[],n=r,o=e.slice();function s(c){return c.length>1&&c[0]==="-"}let a=null;for(;o.length;){let c=o.shift();if(c==="--"){n===i&&n.push(c),n.push(...o);break}if(a&&!s(c)){this.emit(`option:${a.name()}`,c);continue}if(a=null,s(c)){let l=this._findOption(c);if(l){if(l.required){let u=o.shift();u===void 0&&this.optionMissingArgument(l),this.emit(`option:${l.name()}`,u)}else if(l.optional){let u=null;o.length>0&&!s(o[0])&&(u=o.shift()),this.emit(`option:${l.name()}`,u)}else this.emit(`option:${l.name()}`);a=l.variadic?l:null;continue}}if(c.length>2&&c[0]==="-"&&c[1]!=="-"){let l=this._findOption(`-${c[1]}`);if(l){l.required||l.optional&&this._combineFlagAndOptionalValue?this.emit(`option:${l.name()}`,c.slice(2)):(this.emit(`option:${l.name()}`),o.unshift(`-${c.slice(2)}`));continue}}if(/^--[^=]+=/.test(c)){let l=c.indexOf("="),u=this._findOption(c.slice(0,l));if(u&&(u.required||u.optional)){this.emit(`option:${u.name()}`,c.slice(l+1));continue}}if(s(c)&&(n=i),(this._enablePositionalOptions||this._passThroughOptions)&&r.length===0&&i.length===0){if(this._findCommand(c)){r.push(c),o.length>0&&i.push(...o);break}else if(this._getHelpCommand()&&c===this._getHelpCommand().name()){r.push(c),o.length>0&&r.push(...o);break}else if(this._defaultCommandName){i.push(c),o.length>0&&i.push(...o);break}}if(this._passThroughOptions){n.push(c),o.length>0&&n.push(...o);break}n.push(c)}return{operands:r,unknown:i}}opts(){if(this._storeOptionsAsProperties){let e={},r=this.options.length;for(let i=0;i<r;i++){let n=this.options[i].attributeName();e[n]=n===this._versionOptionName?this._version:this[n]}return e}return this._optionValues}optsWithGlobals(){return this._getCommandAndAncestors().reduce((e,r)=>Object.assign(e,r.opts()),{})}error(e,r){this._outputConfiguration.outputError(`${e}
19
+ - ${u}`;throw new Error(p)}else if(d.code==="EACCES")throw new Error(`'${s}' not executable`);if(!l)se.exit(1);else{let u=new Na(1,"commander.executeSubCommandAsync","(error)");u.nestedError=d,l(u)}}),this.runningCommand=c}_dispatchSubcommand(e,r,i){let n=this._findCommand(e);n||this.help({error:!0});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(e){e||this.help();let r=this._findCommand(e);return r&&!r._executableHandler&&r.help(),this._dispatchSubcommand(e,[],[this._getHelpOption()?.long??this._getHelpOption()?.short??"--help"])}_checkNumberOfArguments(){this.registeredArguments.forEach((e,r)=>{e.required&&this.args[r]==null&&this.missingArgument(e.name())}),!(this.registeredArguments.length>0&&this.registeredArguments[this.registeredArguments.length-1].variadic)&&this.args.length>this.registeredArguments.length&&this._excessArguments(this.args)}_processArguments(){let e=(i,n,o)=>{let s=n;if(n!==null&&i.parseArg){let a=`error: command-argument value '${n}' is invalid for argument '${i.name()}'.`;s=this._callParseArg(i,n,o,a)}return s};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((s,a)=>e(i,a,s),i.defaultValue))):o===void 0&&(o=[]):n<this.args.length&&(o=this.args[n],i.parseArg&&(o=e(i,o,i.defaultValue))),r[n]=o}),this.processedArgs=r}_chainOrCall(e,r){return e&&e.then&&typeof e.then=="function"?e.then(()=>r()):r()}_chainOrCallHooks(e,r){let i=e,n=[];return this._getCommandAndAncestors().reverse().filter(o=>o._lifeCycleHooks[r]!==void 0).forEach(o=>{o._lifeCycleHooks[r].forEach(s=>{n.push({hookedCommand:o,callback:s})})}),r==="postAction"&&n.reverse(),n.forEach(o=>{i=this._chainOrCall(i,()=>o.callback(o.hookedCommand,this))}),i}_chainOrCallSubCommandHook(e,r,i){let n=e;return this._lifeCycleHooks[i]!==void 0&&this._lifeCycleHooks[i].forEach(o=>{n=this._chainOrCall(n,()=>o(this,r))}),n}_parseCommand(e,r){let i=this.parseOptions(r);if(this._parseOptionsEnv(),this._parseOptionsImplied(),e=e.concat(i.operands),r=i.unknown,this.args=e.concat(r),e&&this._findCommand(e[0]))return this._dispatchSubcommand(e[0],e.slice(1),r);if(this._getHelpCommand()&&e[0]===this._getHelpCommand().name())return this._dispatchHelpCommand(e[1]);if(this._defaultCommandName)return this._outputHelpIfRequested(r),this._dispatchSubcommand(this._defaultCommandName,e,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 s;return s=this._chainOrCallHooks(s,"preAction"),s=this._chainOrCall(s,()=>this._actionHandler(this.processedArgs)),this.parent&&(s=this._chainOrCall(s,()=>{this.parent.emit(o,e,r)})),s=this._chainOrCallHooks(s,"postAction"),s}if(this.parent&&this.parent.listenerCount(o))n(),this._processArguments(),this.parent.emit(o,e,r);else if(e.length){if(this._findCommand("*"))return this._dispatchSubcommand("*",e,r);this.listenerCount("command:*")?this.emit("command:*",e,r):this.commands.length?this.unknownCommand():(n(),this._processArguments())}else this.commands.length?(n(),this.help({error:!0})):(n(),this._processArguments())}_findCommand(e){if(e)return this.commands.find(r=>r._name===e||r._aliases.includes(e))}_findOption(e){return this.options.find(r=>r.is(e))}_checkForMissingMandatoryOptions(){this._getCommandAndAncestors().forEach(e=>{e.options.forEach(r=>{r.mandatory&&e.getOptionValue(r.attributeName())===void 0&&e.missingMandatoryOptionValue(r)})})}_checkForConflictingLocalOptions(){let e=this.options.filter(i=>{let n=i.attributeName();return this.getOptionValue(n)===void 0?!1:this.getOptionValueSource(n)!=="default"});e.filter(i=>i.conflictsWith.length>0).forEach(i=>{let n=e.find(o=>i.conflictsWith.includes(o.attributeName()));n&&this._conflictingOption(i,n)})}_checkForConflictingOptions(){this._getCommandAndAncestors().forEach(e=>{e._checkForConflictingLocalOptions()})}parseOptions(e){let r=[],i=[],n=r,o=e.slice();function s(c){return c.length>1&&c[0]==="-"}let a=null;for(;o.length;){let c=o.shift();if(c==="--"){n===i&&n.push(c),n.push(...o);break}if(a&&!s(c)){this.emit(`option:${a.name()}`,c);continue}if(a=null,s(c)){let l=this._findOption(c);if(l){if(l.required){let d=o.shift();d===void 0&&this.optionMissingArgument(l),this.emit(`option:${l.name()}`,d)}else if(l.optional){let d=null;o.length>0&&!s(o[0])&&(d=o.shift()),this.emit(`option:${l.name()}`,d)}else this.emit(`option:${l.name()}`);a=l.variadic?l:null;continue}}if(c.length>2&&c[0]==="-"&&c[1]!=="-"){let l=this._findOption(`-${c[1]}`);if(l){l.required||l.optional&&this._combineFlagAndOptionalValue?this.emit(`option:${l.name()}`,c.slice(2)):(this.emit(`option:${l.name()}`),o.unshift(`-${c.slice(2)}`));continue}}if(/^--[^=]+=/.test(c)){let l=c.indexOf("="),d=this._findOption(c.slice(0,l));if(d&&(d.required||d.optional)){this.emit(`option:${d.name()}`,c.slice(l+1));continue}}if(s(c)&&(n=i),(this._enablePositionalOptions||this._passThroughOptions)&&r.length===0&&i.length===0){if(this._findCommand(c)){r.push(c),o.length>0&&i.push(...o);break}else if(this._getHelpCommand()&&c===this._getHelpCommand().name()){r.push(c),o.length>0&&r.push(...o);break}else if(this._defaultCommandName){i.push(c),o.length>0&&i.push(...o);break}}if(this._passThroughOptions){n.push(c),o.length>0&&n.push(...o);break}n.push(c)}return{operands:r,unknown:i}}opts(){if(this._storeOptionsAsProperties){let e={},r=this.options.length;for(let i=0;i<r;i++){let n=this.options[i].attributeName();e[n]=n===this._versionOptionName?this._version:this[n]}return e}return this._optionValues}optsWithGlobals(){return this._getCommandAndAncestors().reduce((e,r)=>Object.assign(e,r.opts()),{})}error(e,r){this._outputConfiguration.outputError(`${e}
20
20
  `,this._outputConfiguration.writeErr),typeof this._showHelpAfterError=="string"?this._outputConfiguration.writeErr(`${this._showHelpAfterError}
21
21
  `):this._showHelpAfterError&&(this._outputConfiguration.writeErr(`
22
- `),this.outputHelp({error:!0}));let i=r||{},n=i.exitCode||1,o=i.code||"commander.error";this._exit(n,o,e)}_parseOptionsEnv(){this.options.forEach(e=>{if(e.envVar&&e.envVar in re.env){let r=e.attributeName();(this.getOptionValue(r)===void 0||["default","config","env"].includes(this.getOptionValueSource(r)))&&(e.required||e.optional?this.emit(`optionEnv:${e.name()}`,re.env[e.envVar]):this.emit(`optionEnv:${e.name()}`))}})}_parseOptionsImplied(){let e=new l$(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())&&e.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(e){let r=`error: missing required argument '${e}'`;this.error(r,{code:"commander.missingArgument"})}optionMissingArgument(e){let r=`error: option '${e.flags}' argument missing`;this.error(r,{code:"commander.optionMissingArgument"})}missingMandatoryOptionValue(e){let r=`error: required option '${e.flags}' not specified`;this.error(r,{code:"commander.missingMandatoryOptionValue"})}_conflictingOption(e,r){let i=s=>{let a=s.attributeName(),c=this.getOptionValue(a),l=this.options.find(d=>d.negate&&a===d.attributeName()),u=this.options.find(d=>!d.negate&&a===d.attributeName());return l&&(l.presetArg===void 0&&c===!1||l.presetArg!==void 0&&c===l.presetArg)?l:u||s},n=s=>{let a=i(s),c=a.attributeName();return this.getOptionValueSource(c)==="env"?`environment variable '${a.envVar}'`:`option '${a.flags}'`},o=`error: ${n(e)} cannot be used with ${n(r)}`;this.error(o,{code:"commander.conflictingOption"})}unknownOption(e){if(this._allowUnknownOption)return;let r="";if(e.startsWith("--")&&this._showSuggestionAfterError){let n=[],o=this;do{let s=o.createHelp().visibleOptions(o).filter(a=>a.long).map(a=>a.long);n=n.concat(s),o=o.parent}while(o&&!o._enablePositionalOptions);r=Rm(e,n)}let i=`error: unknown option '${e}'${r}`;this.error(i,{code:"commander.unknownOption"})}_excessArguments(e){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 ${e.length}.`;this.error(o,{code:"commander.excessArguments"})}unknownCommand(){let e=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=Rm(e,n)}let i=`error: unknown command '${e}'${r}`;this.error(i,{code:"commander.unknownCommand"})}version(e,r,i){if(e===void 0)return this._version;this._version=e,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(`${e}
23
- `),this._exit(0,"commander.version",e)}),this}description(e,r){return e===void 0&&r===void 0?this._description:(this._description=e,r&&(this._argsDescription=r),this)}summary(e){return e===void 0?this._summary:(this._summary=e,this)}alias(e){if(e===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]),e===r._name)throw new Error("Command alias can't be the same as its name");let i=this.parent?._findCommand(e);if(i){let n=[i.name()].concat(i.aliases()).join("|");throw new Error(`cannot add alias '${e}' to command '${this.name()}' as already have command '${n}'`)}return r._aliases.push(e),this}aliases(e){return e===void 0?this._aliases:(e.forEach(r=>this.alias(r)),this)}usage(e){if(e===void 0){if(this._usage)return this._usage;let r=this.registeredArguments.map(i=>a$(i));return[].concat(this.options.length||this._helpOption!==null?"[options]":[],this.commands.length?"[command]":[],this.registeredArguments.length?r:[]).join(" ")}return this._usage=e,this}name(e){return e===void 0?this._name:(this._name=e,this)}nameFromFilename(e){return this._name=Qe.basename(e,Qe.extname(e)),this}executableDir(e){return e===void 0?this._executableDir:(this._executableDir=e,this)}helpInformation(e){let r=this.createHelp();return r.helpWidth===void 0&&(r.helpWidth=e&&e.error?this._outputConfiguration.getErrHelpWidth():this._outputConfiguration.getOutHelpWidth()),r.formatHelp(this,r)}_getHelpContext(e){e=e||{};let r={error:!!e.error},i;return r.error?i=n=>this._outputConfiguration.writeErr(n):i=n=>this._outputConfiguration.writeOut(n),r.write=e.write||i,r.command=this,r}outputHelp(e){let r;typeof e=="function"&&(r=e,e=void 0);let i=this._getHelpContext(e);this._getCommandAndAncestors().reverse().forEach(o=>o.emit("beforeAllHelp",i)),this.emit("beforeHelp",i);let n=this.helpInformation(i);if(r&&(n=r(n),typeof n!="string"&&!Buffer.isBuffer(n)))throw new Error("outputHelp callback must return a string or a Buffer");i.write(n),this._getHelpOption()?.long&&this.emit(this._getHelpOption().long),this.emit("afterHelp",i),this._getCommandAndAncestors().forEach(o=>o.emit("afterAllHelp",i))}helpOption(e,r){return typeof e=="boolean"?(e?this._helpOption=this._helpOption??void 0:this._helpOption=null,this):(e=e??"-h, --help",r=r??"display help for command",this._helpOption=this.createOption(e,r),this)}_getHelpOption(){return this._helpOption===void 0&&this.helpOption(void 0,void 0),this._helpOption}addHelpOption(e){return this._helpOption=e,this}help(e){this.outputHelp(e);let r=re.exitCode||0;r===0&&e&&typeof e!="function"&&e.error&&(r=1),this._exit(r,"commander.help","(outputHelp)")}addHelpText(e,r){let i=["beforeAll","before","after","afterAll"];if(!i.includes(e))throw new Error(`Unexpected value for position to addHelpText.
22
+ `),this.outputHelp({error:!0}));let i=r||{},n=i.exitCode||1,o=i.code||"commander.error";this._exit(n,o,e)}_parseOptionsEnv(){this.options.forEach(e=>{if(e.envVar&&e.envVar in se.env){let r=e.attributeName();(this.getOptionValue(r)===void 0||["default","config","env"].includes(this.getOptionValueSource(r)))&&(e.required||e.optional?this.emit(`optionEnv:${e.name()}`,se.env[e.envVar]):this.emit(`optionEnv:${e.name()}`))}})}_parseOptionsImplied(){let e=new v$(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())&&e.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(e){let r=`error: missing required argument '${e}'`;this.error(r,{code:"commander.missingArgument"})}optionMissingArgument(e){let r=`error: option '${e.flags}' argument missing`;this.error(r,{code:"commander.optionMissingArgument"})}missingMandatoryOptionValue(e){let r=`error: required option '${e.flags}' not specified`;this.error(r,{code:"commander.missingMandatoryOptionValue"})}_conflictingOption(e,r){let i=s=>{let a=s.attributeName(),c=this.getOptionValue(a),l=this.options.find(u=>u.negate&&a===u.attributeName()),d=this.options.find(u=>!u.negate&&a===u.attributeName());return l&&(l.presetArg===void 0&&c===!1||l.presetArg!==void 0&&c===l.presetArg)?l:d||s},n=s=>{let a=i(s),c=a.attributeName();return this.getOptionValueSource(c)==="env"?`environment variable '${a.envVar}'`:`option '${a.flags}'`},o=`error: ${n(e)} cannot be used with ${n(r)}`;this.error(o,{code:"commander.conflictingOption"})}unknownOption(e){if(this._allowUnknownOption)return;let r="";if(e.startsWith("--")&&this._showSuggestionAfterError){let n=[],o=this;do{let s=o.createHelp().visibleOptions(o).filter(a=>a.long).map(a=>a.long);n=n.concat(s),o=o.parent}while(o&&!o._enablePositionalOptions);r=Vm(e,n)}let i=`error: unknown option '${e}'${r}`;this.error(i,{code:"commander.unknownOption"})}_excessArguments(e){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 ${e.length}.`;this.error(o,{code:"commander.excessArguments"})}unknownCommand(){let e=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=Vm(e,n)}let i=`error: unknown command '${e}'${r}`;this.error(i,{code:"commander.unknownCommand"})}version(e,r,i){if(e===void 0)return this._version;this._version=e,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(`${e}
23
+ `),this._exit(0,"commander.version",e)}),this}description(e,r){return e===void 0&&r===void 0?this._description:(this._description=e,r&&(this._argsDescription=r),this)}summary(e){return e===void 0?this._summary:(this._summary=e,this)}alias(e){if(e===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]),e===r._name)throw new Error("Command alias can't be the same as its name");let i=this.parent?._findCommand(e);if(i){let n=[i.name()].concat(i.aliases()).join("|");throw new Error(`cannot add alias '${e}' to command '${this.name()}' as already have command '${n}'`)}return r._aliases.push(e),this}aliases(e){return e===void 0?this._aliases:(e.forEach(r=>this.alias(r)),this)}usage(e){if(e===void 0){if(this._usage)return this._usage;let r=this.registeredArguments.map(i=>y$(i));return[].concat(this.options.length||this._helpOption!==null?"[options]":[],this.commands.length?"[command]":[],this.registeredArguments.length?r:[]).join(" ")}return this._usage=e,this}name(e){return e===void 0?this._name:(this._name=e,this)}nameFromFilename(e){return this._name=Qe.basename(e,Qe.extname(e)),this}executableDir(e){return e===void 0?this._executableDir:(this._executableDir=e,this)}helpInformation(e){let r=this.createHelp();return r.helpWidth===void 0&&(r.helpWidth=e&&e.error?this._outputConfiguration.getErrHelpWidth():this._outputConfiguration.getOutHelpWidth()),r.formatHelp(this,r)}_getHelpContext(e){e=e||{};let r={error:!!e.error},i;return r.error?i=n=>this._outputConfiguration.writeErr(n):i=n=>this._outputConfiguration.writeOut(n),r.write=e.write||i,r.command=this,r}outputHelp(e){let r;typeof e=="function"&&(r=e,e=void 0);let i=this._getHelpContext(e);this._getCommandAndAncestors().reverse().forEach(o=>o.emit("beforeAllHelp",i)),this.emit("beforeHelp",i);let n=this.helpInformation(i);if(r&&(n=r(n),typeof n!="string"&&!Buffer.isBuffer(n)))throw new Error("outputHelp callback must return a string or a Buffer");i.write(n),this._getHelpOption()?.long&&this.emit(this._getHelpOption().long),this.emit("afterHelp",i),this._getCommandAndAncestors().forEach(o=>o.emit("afterAllHelp",i))}helpOption(e,r){return typeof e=="boolean"?(e?this._helpOption=this._helpOption??void 0:this._helpOption=null,this):(e=e??"-h, --help",r=r??"display help for command",this._helpOption=this.createOption(e,r),this)}_getHelpOption(){return this._helpOption===void 0&&this.helpOption(void 0,void 0),this._helpOption}addHelpOption(e){return this._helpOption=e,this}help(e){this.outputHelp(e);let r=se.exitCode||0;r===0&&e&&typeof e!="function"&&e.error&&(r=1),this._exit(r,"commander.help","(outputHelp)")}addHelpText(e,r){let i=["beforeAll","before","after","afterAll"];if(!i.includes(e))throw new Error(`Unexpected value for position to addHelpText.
24
24
  Expecting one of '${i.join("', '")}'`);let n=`${e}Help`;return this.on(n,o=>{let s;typeof r=="function"?s=r({error:o.error,command:o.command}):s=r,s&&o.write(`${s}
25
- `)}),this}_outputHelpIfRequested(e){let r=this._getHelpOption();r&&e.find(n=>r.is(n))&&(this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)"))}};function Um(t){return t.map(e=>{if(!e.startsWith("--inspect"))return e;let r,i="127.0.0.1",n="9229",o;return(o=e.match(/^(--inspect(-brk)?)$/))!==null?r=o[1]:(o=e.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null?(r=o[1],/^\d+$/.test(o[3])?n=o[3]:i=o[3]):(o=e.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null&&(r=o[1],i=o[3],n=o[4]),r&&n!=="0"?`${r}=${i}:${parseInt(n)+1}`:e})}Lm.Command=Pa});var Bm=N(Pe=>{var{Argument:Fm}=_i(),{Command:Ta}=Mm(),{CommanderError:u$,InvalidArgumentError:Zm}=Yn(),{Help:d$}=ba(),{Option:qm}=Sa();Pe.program=new Ta;Pe.createCommand=t=>new Ta(t);Pe.createOption=(t,e)=>new qm(t,e);Pe.createArgument=(t,e)=>new Fm(t,e);Pe.Command=Ta;Pe.Option=qm;Pe.Argument=Fm;Pe.Help=d$;Pe.CommanderError=u$;Pe.InvalidArgumentError=Zm;Pe.InvalidOptionArgumentError=Zm});var Z=N(de=>{"use strict";var Ca=Symbol.for("yaml.alias"),ig=Symbol.for("yaml.document"),wi=Symbol.for("yaml.map"),og=Symbol.for("yaml.pair"),Da=Symbol.for("yaml.scalar"),$i=Symbol.for("yaml.seq"),et=Symbol.for("yaml.node.type"),T$=t=>!!t&&typeof t=="object"&&t[et]===Ca,A$=t=>!!t&&typeof t=="object"&&t[et]===ig,E$=t=>!!t&&typeof t=="object"&&t[et]===wi,z$=t=>!!t&&typeof t=="object"&&t[et]===og,sg=t=>!!t&&typeof t=="object"&&t[et]===Da,N$=t=>!!t&&typeof t=="object"&&t[et]===$i;function ag(t){if(t&&typeof t=="object")switch(t[et]){case wi:case $i:return!0}return!1}function C$(t){if(t&&typeof t=="object")switch(t[et]){case Ca:case wi:case Da:case $i:return!0}return!1}var D$=t=>(sg(t)||ag(t))&&!!t.anchor;de.ALIAS=Ca;de.DOC=ig;de.MAP=wi;de.NODE_TYPE=et;de.PAIR=og;de.SCALAR=Da;de.SEQ=$i;de.hasAnchor=D$;de.isAlias=T$;de.isCollection=ag;de.isDocument=A$;de.isMap=E$;de.isNode=C$;de.isPair=z$;de.isScalar=sg;de.isSeq=N$});var tr=N(ja=>{"use strict";var le=Z(),be=Symbol("break visit"),cg=Symbol("skip children"),Be=Symbol("remove node");function ki(t,e){let r=lg(e);le.isDocument(t)?en(null,t.contents,r,Object.freeze([t]))===Be&&(t.contents=null):en(null,t,r,Object.freeze([]))}ki.BREAK=be;ki.SKIP=cg;ki.REMOVE=Be;function en(t,e,r,i){let n=ug(t,e,r,i);if(le.isNode(n)||le.isPair(n))return dg(t,i,n),en(t,n,r,i);if(typeof n!="symbol"){if(le.isCollection(e)){i=Object.freeze(i.concat(e));for(let o=0;o<e.items.length;++o){let s=en(o,e.items[o],r,i);if(typeof s=="number")o=s-1;else{if(s===be)return be;s===Be&&(e.items.splice(o,1),o-=1)}}}else if(le.isPair(e)){i=Object.freeze(i.concat(e));let o=en("key",e.key,r,i);if(o===be)return be;o===Be&&(e.key=null);let s=en("value",e.value,r,i);if(s===be)return be;s===Be&&(e.value=null)}}return n}async function Si(t,e){let r=lg(e);le.isDocument(t)?await tn(null,t.contents,r,Object.freeze([t]))===Be&&(t.contents=null):await tn(null,t,r,Object.freeze([]))}Si.BREAK=be;Si.SKIP=cg;Si.REMOVE=Be;async function tn(t,e,r,i){let n=await ug(t,e,r,i);if(le.isNode(n)||le.isPair(n))return dg(t,i,n),tn(t,n,r,i);if(typeof n!="symbol"){if(le.isCollection(e)){i=Object.freeze(i.concat(e));for(let o=0;o<e.items.length;++o){let s=await tn(o,e.items[o],r,i);if(typeof s=="number")o=s-1;else{if(s===be)return be;s===Be&&(e.items.splice(o,1),o-=1)}}}else if(le.isPair(e)){i=Object.freeze(i.concat(e));let o=await tn("key",e.key,r,i);if(o===be)return be;o===Be&&(e.key=null);let s=await tn("value",e.value,r,i);if(s===be)return be;s===Be&&(e.value=null)}}return n}function lg(t){return typeof t=="object"&&(t.Collection||t.Node||t.Value)?Object.assign({Alias:t.Node,Map:t.Node,Scalar:t.Node,Seq:t.Node},t.Value&&{Map:t.Value,Scalar:t.Value,Seq:t.Value},t.Collection&&{Map:t.Collection,Seq:t.Collection},t):t}function ug(t,e,r,i){if(typeof r=="function")return r(t,e,i);if(le.isMap(e))return r.Map?.(t,e,i);if(le.isSeq(e))return r.Seq?.(t,e,i);if(le.isPair(e))return r.Pair?.(t,e,i);if(le.isScalar(e))return r.Scalar?.(t,e,i);if(le.isAlias(e))return r.Alias?.(t,e,i)}function dg(t,e,r){let i=e[e.length-1];if(le.isCollection(i))i.items[t]=r;else if(le.isPair(i))t==="key"?i.key=r:i.value=r;else if(le.isDocument(i))i.contents=r;else{let n=le.isAlias(i)?"alias":"scalar";throw new Error(`Cannot replace node with ${n} parent`)}}ja.visit=ki;ja.visitAsync=Si});var Ra=N(fg=>{"use strict";var pg=Z(),j$=tr(),R$={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},U$=t=>t.replace(/[!,[\]{}]/g,e=>R$[e]),nr=class t{constructor(e,r){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},t.defaultYaml,e),this.tags=Object.assign({},t.defaultTags,r)}clone(){let e=new t(this.yaml,this.tags);return e.docStart=this.docStart,e}atDocument(){let e=new t(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:t.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},t.defaultTags);break}return e}add(e,r){this.atNextDocument&&(this.yaml={explicit:t.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},t.defaultTags),this.atNextDocument=!1);let i=e.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,s]=i;return this.tags[o]=s,!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 s=/^\d+\.\d+$/.test(o);return r(6,`Unsupported YAML version ${o}`,s),!1}}default:return r(0,`Unknown directive ${n}`,!0),!1}}tagName(e,r){if(e==="!")return"!";if(e[0]!=="!")return r(`Not a valid tag: ${e}`),null;if(e[1]==="<"){let s=e.slice(2,-1);return s==="!"||s==="!!"?(r(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(e[e.length-1]!==">"&&r("Verbatim tags must end with a >"),s)}let[,i,n]=e.match(/^(.*!)([^!]*)$/s);n||r(`The ${e} tag has no suffix`);let o=this.tags[i];if(o)try{return o+decodeURIComponent(n)}catch(s){return r(String(s)),null}return i==="!"?e:(r(`Could not resolve tag: ${e}`),null)}tagString(e){for(let[r,i]of Object.entries(this.tags))if(e.startsWith(i))return r+U$(e.substring(i.length));return e[0]==="!"?e:`!<${e}>`}toString(e){let r=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],i=Object.entries(this.tags),n;if(e&&i.length>0&&pg.isNode(e.contents)){let o={};j$.visit(e.contents,(s,a)=>{pg.isNode(a)&&a.tag&&(o[a.tag]=!0)}),n=Object.keys(o)}else n=[];for(let[o,s]of i)o==="!!"&&s==="tag:yaml.org,2002:"||(!e||n.some(a=>a.startsWith(s)))&&r.push(`%TAG ${o} ${s}`);return r.join(`
26
- `)}};nr.defaultYaml={explicit:!1,version:"1.2"};nr.defaultTags={"!!":"tag:yaml.org,2002:"};fg.Directives=nr});var xi=N(rr=>{"use strict";var mg=Z(),L$=tr();function M$(t){if(/[\x00-\x19\s,[\]{}]/.test(t)){let r=`Anchor must not contain whitespace or control characters: ${JSON.stringify(t)}`;throw new Error(r)}return!0}function gg(t){let e=new Set;return L$.visit(t,{Value(r,i){i.anchor&&e.add(i.anchor)}}),e}function hg(t,e){for(let r=1;;++r){let i=`${t}${r}`;if(!e.has(i))return i}}function F$(t,e){let r=[],i=new Map,n=null;return{onAnchor:o=>{r.push(o),n??(n=gg(t));let s=hg(e,n);return n.add(s),s},setAnchors:()=>{for(let o of r){let s=i.get(o);if(typeof s=="object"&&s.anchor&&(mg.isScalar(s.node)||mg.isCollection(s.node)))s.node.anchor=s.anchor;else{let a=new Error("Failed to resolve repeated object (this should not happen)");throw a.source=o,a}}},sourceObjects:i}}rr.anchorIsValid=M$;rr.anchorNames=gg;rr.createNodeAnchors=F$;rr.findNewAnchor=hg});var Ua=N(yg=>{"use strict";function ir(t,e,r,i){if(i&&typeof i=="object")if(Array.isArray(i))for(let n=0,o=i.length;n<o;++n){let s=i[n],a=ir(t,i,String(n),s);a===void 0?delete i[n]:a!==s&&(i[n]=a)}else if(i instanceof Map)for(let n of Array.from(i.keys())){let o=i.get(n),s=ir(t,i,n,o);s===void 0?i.delete(n):s!==o&&i.set(n,s)}else if(i instanceof Set)for(let n of Array.from(i)){let o=ir(t,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 s=ir(t,i,n,o);s===void 0?delete i[n]:s!==o&&(i[n]=s)}return t.call(e,r,i)}yg.applyReviver=ir});var lt=N(vg=>{"use strict";var Z$=Z();function _g(t,e,r){if(Array.isArray(t))return t.map((i,n)=>_g(i,String(n),r));if(t&&typeof t.toJSON=="function"){if(!r||!Z$.hasAnchor(t))return t.toJSON(e,r);let i={aliasCount:0,count:1,res:void 0};r.anchors.set(t,i),r.onCreate=o=>{i.res=o,delete r.onCreate};let n=t.toJSON(e,r);return r.onCreate&&r.onCreate(n),n}return typeof t=="bigint"&&!r?.keep?Number(t):t}vg.toJS=_g});var Ii=N(wg=>{"use strict";var q$=Ua(),bg=Z(),B$=lt(),La=class{constructor(e){Object.defineProperty(this,bg.NODE_TYPE,{value:e})}clone(){let e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(e,{mapAsMap:r,maxAliasCount:i,onAnchor:n,reviver:o}={}){if(!bg.isDocument(e))throw new TypeError("A document argument is required");let s={anchors:new Map,doc:e,keep:!0,mapAsMap:r===!0,mapKeyWarned:!1,maxAliasCount:typeof i=="number"?i:100},a=B$.toJS(this,"",s);if(typeof n=="function")for(let{count:c,res:l}of s.anchors.values())n(l,c);return typeof o=="function"?q$.applyReviver(o,{"":a},"",a):a}};wg.NodeBase=La});var or=N($g=>{"use strict";var V$=xi(),G$=tr(),nn=Z(),K$=Ii(),J$=lt(),Ma=class extends K$.NodeBase{constructor(e){super(nn.ALIAS),this.source=e,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(e,r){let i;r?.aliasResolveCache?i=r.aliasResolveCache:(i=[],G$.visit(e,{Node:(o,s)=>{(nn.isAlias(s)||nn.hasAnchor(s))&&i.push(s)}}),r&&(r.aliasResolveCache=i));let n;for(let o of i){if(o===this)break;o.anchor===this.source&&(n=o)}return n}toJSON(e,r){if(!r)return{source:this.source};let{anchors:i,doc:n,maxAliasCount:o}=r,s=this.resolve(n,r);if(!s){let c=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(c)}let a=i.get(s);if(a||(J$.toJS(s,null,r),a=i.get(s)),a?.res===void 0){let c="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(c)}if(o>=0&&(a.count+=1,a.aliasCount===0&&(a.aliasCount=Oi(n,s,i)),a.count*a.aliasCount>o)){let c="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(c)}return a.res}toString(e,r,i){let n=`*${this.source}`;if(e){if(V$.anchorIsValid(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){let o=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(o)}if(e.implicitKey)return`${n} `}return n}};function Oi(t,e,r){if(nn.isAlias(e)){let i=e.resolve(t),n=r&&i&&r.get(i);return n?n.count*n.aliasCount:0}else if(nn.isCollection(e)){let i=0;for(let n of e.items){let o=Oi(t,n,r);o>i&&(i=o)}return i}else if(nn.isPair(e)){let i=Oi(t,e.key,r),n=Oi(t,e.value,r);return Math.max(i,n)}return 1}$g.Alias=Ma});var ce=N(Fa=>{"use strict";var W$=Z(),Y$=Ii(),H$=lt(),X$=t=>!t||typeof t!="function"&&typeof t!="object",ut=class extends Y$.NodeBase{constructor(e){super(W$.SCALAR),this.value=e}toJSON(e,r){return r?.keep?this.value:H$.toJS(this.value,e,r)}toString(){return String(this.value)}};ut.BLOCK_FOLDED="BLOCK_FOLDED";ut.BLOCK_LITERAL="BLOCK_LITERAL";ut.PLAIN="PLAIN";ut.QUOTE_DOUBLE="QUOTE_DOUBLE";ut.QUOTE_SINGLE="QUOTE_SINGLE";Fa.Scalar=ut;Fa.isScalarValue=X$});var sr=N(Sg=>{"use strict";var Q$=or(),Ct=Z(),kg=ce(),ek="tag:yaml.org,2002:";function tk(t,e,r){if(e){let i=r.filter(o=>o.tag===e),n=i.find(o=>!o.format)??i[0];if(!n)throw new Error(`Tag ${e} not found`);return n}return r.find(i=>i.identify?.(t)&&!i.format)}function nk(t,e,r){if(Ct.isDocument(t)&&(t=t.contents),Ct.isNode(t))return t;if(Ct.isPair(t)){let d=r.schema[Ct.MAP].createNode?.(r.schema,null,r);return d.items.push(t),d}(t instanceof String||t instanceof Number||t instanceof Boolean||typeof BigInt<"u"&&t instanceof BigInt)&&(t=t.valueOf());let{aliasDuplicateObjects:i,onAnchor:n,onTagObj:o,schema:s,sourceObjects:a}=r,c;if(i&&t&&typeof t=="object"){if(c=a.get(t),c)return c.anchor??(c.anchor=n(t)),new Q$.Alias(c.anchor);c={anchor:null,node:null},a.set(t,c)}e?.startsWith("!!")&&(e=ek+e.slice(2));let l=tk(t,e,s.tags);if(!l){if(t&&typeof t.toJSON=="function"&&(t=t.toJSON()),!t||typeof t!="object"){let d=new kg.Scalar(t);return c&&(c.node=d),d}l=t instanceof Map?s[Ct.MAP]:Symbol.iterator in Object(t)?s[Ct.SEQ]:s[Ct.MAP]}o&&(o(l),delete r.onTagObj);let u=l?.createNode?l.createNode(r.schema,t,r):typeof l?.nodeClass?.from=="function"?l.nodeClass.from(r.schema,t,r):new kg.Scalar(t);return e?u.tag=e:l.default||(u.tag=l.tag),c&&(c.node=u),u}Sg.createNode=nk});var Ti=N(Pi=>{"use strict";var rk=sr(),Ve=Z(),ik=Ii();function Za(t,e,r){let i=r;for(let n=e.length-1;n>=0;--n){let o=e[n];if(typeof o=="number"&&Number.isInteger(o)&&o>=0){let s=[];s[o]=i,i=s}else i=new Map([[o,i]])}return rk.createNode(i,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:t,sourceObjects:new Map})}var xg=t=>t==null||typeof t=="object"&&!!t[Symbol.iterator]().next().done,qa=class extends ik.NodeBase{constructor(e,r){super(e),Object.defineProperty(this,"schema",{value:r,configurable:!0,enumerable:!1,writable:!0})}clone(e){let r=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(r.schema=e),r.items=r.items.map(i=>Ve.isNode(i)||Ve.isPair(i)?i.clone(e):i),this.range&&(r.range=this.range.slice()),r}addIn(e,r){if(xg(e))this.add(r);else{let[i,...n]=e,o=this.get(i,!0);if(Ve.isCollection(o))o.addIn(n,r);else if(o===void 0&&this.schema)this.set(i,Za(this.schema,n,r));else throw new Error(`Expected YAML collection at ${i}. Remaining path: ${n}`)}}deleteIn(e){let[r,...i]=e;if(i.length===0)return this.delete(r);let n=this.get(r,!0);if(Ve.isCollection(n))return n.deleteIn(i);throw new Error(`Expected YAML collection at ${r}. Remaining path: ${i}`)}getIn(e,r){let[i,...n]=e,o=this.get(i,!0);return n.length===0?!r&&Ve.isScalar(o)?o.value:o:Ve.isCollection(o)?o.getIn(n,r):void 0}hasAllNullValues(e){return this.items.every(r=>{if(!Ve.isPair(r))return!1;let i=r.value;return i==null||e&&Ve.isScalar(i)&&i.value==null&&!i.commentBefore&&!i.comment&&!i.tag})}hasIn(e){let[r,...i]=e;if(i.length===0)return this.has(r);let n=this.get(r,!0);return Ve.isCollection(n)?n.hasIn(i):!1}setIn(e,r){let[i,...n]=e;if(n.length===0)this.set(i,r);else{let o=this.get(i,!0);if(Ve.isCollection(o))o.setIn(n,r);else if(o===void 0&&this.schema)this.set(i,Za(this.schema,n,r));else throw new Error(`Expected YAML collection at ${i}. Remaining path: ${n}`)}}};Pi.Collection=qa;Pi.collectionFromPath=Za;Pi.isEmptyPath=xg});var ar=N(Ai=>{"use strict";var ok=t=>t.replace(/^(?!$)(?: $)?/gm,"#");function Ba(t,e){return/^\n+$/.test(t)?t.substring(1):e?t.replace(/^(?! *$)/gm,e):t}var sk=(t,e,r)=>t.endsWith(`
27
- `)?Ba(r,e):r.includes(`
25
+ `)}),this}_outputHelpIfRequested(e){let r=this._getHelpOption();r&&e.find(n=>r.is(n))&&(this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)"))}};function Gm(t){return t.map(e=>{if(!e.startsWith("--inspect"))return e;let r,i="127.0.0.1",n="9229",o;return(o=e.match(/^(--inspect(-brk)?)$/))!==null?r=o[1]:(o=e.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null?(r=o[1],/^\d+$/.test(o[3])?n=o[3]:i=o[3]):(o=e.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null&&(r=o[1],i=o[3],n=o[4]),r&&n!=="0"?`${r}=${i}:${parseInt(n)+1}`:e})}Jm.Command=Ca});var Xm=N(Oe=>{var{Argument:Wm}=wi(),{Command:Da}=Km(),{CommanderError:b$,InvalidArgumentError:Ym}=Xn(),{Help:w$}=Ia(),{Option:Hm}=Aa();Oe.program=new Da;Oe.createCommand=t=>new Da(t);Oe.createOption=(t,e)=>new Hm(t,e);Oe.createArgument=(t,e)=>new Wm(t,e);Oe.Command=Da;Oe.Option=Hm;Oe.Argument=Wm;Oe.Help=w$;Oe.CommanderError=b$;Oe.InvalidArgumentError=Ym;Oe.InvalidOptionArgumentError=Ym});var Z=N(de=>{"use strict";var Ma=Symbol.for("yaml.alias"),pg=Symbol.for("yaml.document"),Si=Symbol.for("yaml.map"),fg=Symbol.for("yaml.pair"),qa=Symbol.for("yaml.scalar"),xi=Symbol.for("yaml.seq"),et=Symbol.for("yaml.node.type"),L$=t=>!!t&&typeof t=="object"&&t[et]===Ma,M$=t=>!!t&&typeof t=="object"&&t[et]===pg,q$=t=>!!t&&typeof t=="object"&&t[et]===Si,Z$=t=>!!t&&typeof t=="object"&&t[et]===fg,mg=t=>!!t&&typeof t=="object"&&t[et]===qa,F$=t=>!!t&&typeof t=="object"&&t[et]===xi;function gg(t){if(t&&typeof t=="object")switch(t[et]){case Si:case xi:return!0}return!1}function B$(t){if(t&&typeof t=="object")switch(t[et]){case Ma:case Si:case qa:case xi:return!0}return!1}var V$=t=>(mg(t)||gg(t))&&!!t.anchor;de.ALIAS=Ma;de.DOC=pg;de.MAP=Si;de.NODE_TYPE=et;de.PAIR=fg;de.SCALAR=qa;de.SEQ=xi;de.hasAnchor=V$;de.isAlias=L$;de.isCollection=gg;de.isDocument=M$;de.isMap=q$;de.isNode=B$;de.isPair=Z$;de.isScalar=mg;de.isSeq=F$});var rr=N(Za=>{"use strict";var le=Z(),be=Symbol("break visit"),hg=Symbol("skip children"),Be=Symbol("remove node");function Ii(t,e){let r=yg(e);le.isDocument(t)?en(null,t.contents,r,Object.freeze([t]))===Be&&(t.contents=null):en(null,t,r,Object.freeze([]))}Ii.BREAK=be;Ii.SKIP=hg;Ii.REMOVE=Be;function en(t,e,r,i){let n=_g(t,e,r,i);if(le.isNode(n)||le.isPair(n))return vg(t,i,n),en(t,n,r,i);if(typeof n!="symbol"){if(le.isCollection(e)){i=Object.freeze(i.concat(e));for(let o=0;o<e.items.length;++o){let s=en(o,e.items[o],r,i);if(typeof s=="number")o=s-1;else{if(s===be)return be;s===Be&&(e.items.splice(o,1),o-=1)}}}else if(le.isPair(e)){i=Object.freeze(i.concat(e));let o=en("key",e.key,r,i);if(o===be)return be;o===Be&&(e.key=null);let s=en("value",e.value,r,i);if(s===be)return be;s===Be&&(e.value=null)}}return n}async function Oi(t,e){let r=yg(e);le.isDocument(t)?await tn(null,t.contents,r,Object.freeze([t]))===Be&&(t.contents=null):await tn(null,t,r,Object.freeze([]))}Oi.BREAK=be;Oi.SKIP=hg;Oi.REMOVE=Be;async function tn(t,e,r,i){let n=await _g(t,e,r,i);if(le.isNode(n)||le.isPair(n))return vg(t,i,n),tn(t,n,r,i);if(typeof n!="symbol"){if(le.isCollection(e)){i=Object.freeze(i.concat(e));for(let o=0;o<e.items.length;++o){let s=await tn(o,e.items[o],r,i);if(typeof s=="number")o=s-1;else{if(s===be)return be;s===Be&&(e.items.splice(o,1),o-=1)}}}else if(le.isPair(e)){i=Object.freeze(i.concat(e));let o=await tn("key",e.key,r,i);if(o===be)return be;o===Be&&(e.key=null);let s=await tn("value",e.value,r,i);if(s===be)return be;s===Be&&(e.value=null)}}return n}function yg(t){return typeof t=="object"&&(t.Collection||t.Node||t.Value)?Object.assign({Alias:t.Node,Map:t.Node,Scalar:t.Node,Seq:t.Node},t.Value&&{Map:t.Value,Scalar:t.Value,Seq:t.Value},t.Collection&&{Map:t.Collection,Seq:t.Collection},t):t}function _g(t,e,r,i){if(typeof r=="function")return r(t,e,i);if(le.isMap(e))return r.Map?.(t,e,i);if(le.isSeq(e))return r.Seq?.(t,e,i);if(le.isPair(e))return r.Pair?.(t,e,i);if(le.isScalar(e))return r.Scalar?.(t,e,i);if(le.isAlias(e))return r.Alias?.(t,e,i)}function vg(t,e,r){let i=e[e.length-1];if(le.isCollection(i))i.items[t]=r;else if(le.isPair(i))t==="key"?i.key=r:i.value=r;else if(le.isDocument(i))i.contents=r;else{let n=le.isAlias(i)?"alias":"scalar";throw new Error(`Cannot replace node with ${n} parent`)}}Za.visit=Ii;Za.visitAsync=Oi});var Fa=N(wg=>{"use strict";var bg=Z(),G$=rr(),J$={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},K$=t=>t.replace(/[!,[\]{}]/g,e=>J$[e]),ir=class t{constructor(e,r){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},t.defaultYaml,e),this.tags=Object.assign({},t.defaultTags,r)}clone(){let e=new t(this.yaml,this.tags);return e.docStart=this.docStart,e}atDocument(){let e=new t(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:t.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},t.defaultTags);break}return e}add(e,r){this.atNextDocument&&(this.yaml={explicit:t.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},t.defaultTags),this.atNextDocument=!1);let i=e.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,s]=i;return this.tags[o]=s,!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 s=/^\d+\.\d+$/.test(o);return r(6,`Unsupported YAML version ${o}`,s),!1}}default:return r(0,`Unknown directive ${n}`,!0),!1}}tagName(e,r){if(e==="!")return"!";if(e[0]!=="!")return r(`Not a valid tag: ${e}`),null;if(e[1]==="<"){let s=e.slice(2,-1);return s==="!"||s==="!!"?(r(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(e[e.length-1]!==">"&&r("Verbatim tags must end with a >"),s)}let[,i,n]=e.match(/^(.*!)([^!]*)$/s);n||r(`The ${e} tag has no suffix`);let o=this.tags[i];if(o)try{return o+decodeURIComponent(n)}catch(s){return r(String(s)),null}return i==="!"?e:(r(`Could not resolve tag: ${e}`),null)}tagString(e){for(let[r,i]of Object.entries(this.tags))if(e.startsWith(i))return r+K$(e.substring(i.length));return e[0]==="!"?e:`!<${e}>`}toString(e){let r=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],i=Object.entries(this.tags),n;if(e&&i.length>0&&bg.isNode(e.contents)){let o={};G$.visit(e.contents,(s,a)=>{bg.isNode(a)&&a.tag&&(o[a.tag]=!0)}),n=Object.keys(o)}else n=[];for(let[o,s]of i)o==="!!"&&s==="tag:yaml.org,2002:"||(!e||n.some(a=>a.startsWith(s)))&&r.push(`%TAG ${o} ${s}`);return r.join(`
26
+ `)}};ir.defaultYaml={explicit:!1,version:"1.2"};ir.defaultTags={"!!":"tag:yaml.org,2002:"};wg.Directives=ir});var Pi=N(or=>{"use strict";var $g=Z(),W$=rr();function Y$(t){if(/[\x00-\x19\s,[\]{}]/.test(t)){let r=`Anchor must not contain whitespace or control characters: ${JSON.stringify(t)}`;throw new Error(r)}return!0}function kg(t){let e=new Set;return W$.visit(t,{Value(r,i){i.anchor&&e.add(i.anchor)}}),e}function Sg(t,e){for(let r=1;;++r){let i=`${t}${r}`;if(!e.has(i))return i}}function H$(t,e){let r=[],i=new Map,n=null;return{onAnchor:o=>{r.push(o),n??(n=kg(t));let s=Sg(e,n);return n.add(s),s},setAnchors:()=>{for(let o of r){let s=i.get(o);if(typeof s=="object"&&s.anchor&&($g.isScalar(s.node)||$g.isCollection(s.node)))s.node.anchor=s.anchor;else{let a=new Error("Failed to resolve repeated object (this should not happen)");throw a.source=o,a}}},sourceObjects:i}}or.anchorIsValid=Y$;or.anchorNames=kg;or.createNodeAnchors=H$;or.findNewAnchor=Sg});var Ba=N(xg=>{"use strict";function sr(t,e,r,i){if(i&&typeof i=="object")if(Array.isArray(i))for(let n=0,o=i.length;n<o;++n){let s=i[n],a=sr(t,i,String(n),s);a===void 0?delete i[n]:a!==s&&(i[n]=a)}else if(i instanceof Map)for(let n of Array.from(i.keys())){let o=i.get(n),s=sr(t,i,n,o);s===void 0?i.delete(n):s!==o&&i.set(n,s)}else if(i instanceof Set)for(let n of Array.from(i)){let o=sr(t,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 s=sr(t,i,n,o);s===void 0?delete i[n]:s!==o&&(i[n]=s)}return t.call(e,r,i)}xg.applyReviver=sr});var ct=N(Og=>{"use strict";var X$=Z();function Ig(t,e,r){if(Array.isArray(t))return t.map((i,n)=>Ig(i,String(n),r));if(t&&typeof t.toJSON=="function"){if(!r||!X$.hasAnchor(t))return t.toJSON(e,r);let i={aliasCount:0,count:1,res:void 0};r.anchors.set(t,i),r.onCreate=o=>{i.res=o,delete r.onCreate};let n=t.toJSON(e,r);return r.onCreate&&r.onCreate(n),n}return typeof t=="bigint"&&!r?.keep?Number(t):t}Og.toJS=Ig});var Ti=N(Tg=>{"use strict";var Q$=Ba(),Pg=Z(),ek=ct(),Va=class{constructor(e){Object.defineProperty(this,Pg.NODE_TYPE,{value:e})}clone(){let e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(e,{mapAsMap:r,maxAliasCount:i,onAnchor:n,reviver:o}={}){if(!Pg.isDocument(e))throw new TypeError("A document argument is required");let s={anchors:new Map,doc:e,keep:!0,mapAsMap:r===!0,mapKeyWarned:!1,maxAliasCount:typeof i=="number"?i:100},a=ek.toJS(this,"",s);if(typeof n=="function")for(let{count:c,res:l}of s.anchors.values())n(l,c);return typeof o=="function"?Q$.applyReviver(o,{"":a},"",a):a}};Tg.NodeBase=Va});var ar=N(Ag=>{"use strict";var tk=Pi(),nk=rr(),nn=Z(),rk=Ti(),ik=ct(),Ga=class extends rk.NodeBase{constructor(e){super(nn.ALIAS),this.source=e,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(e,r){let i;r?.aliasResolveCache?i=r.aliasResolveCache:(i=[],nk.visit(e,{Node:(o,s)=>{(nn.isAlias(s)||nn.hasAnchor(s))&&i.push(s)}}),r&&(r.aliasResolveCache=i));let n;for(let o of i){if(o===this)break;o.anchor===this.source&&(n=o)}return n}toJSON(e,r){if(!r)return{source:this.source};let{anchors:i,doc:n,maxAliasCount:o}=r,s=this.resolve(n,r);if(!s){let c=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(c)}let a=i.get(s);if(a||(ik.toJS(s,null,r),a=i.get(s)),a?.res===void 0){let c="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(c)}if(o>=0&&(a.count+=1,a.aliasCount===0&&(a.aliasCount=Ai(n,s,i)),a.count*a.aliasCount>o)){let c="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(c)}return a.res}toString(e,r,i){let n=`*${this.source}`;if(e){if(tk.anchorIsValid(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){let o=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(o)}if(e.implicitKey)return`${n} `}return n}};function Ai(t,e,r){if(nn.isAlias(e)){let i=e.resolve(t),n=r&&i&&r.get(i);return n?n.count*n.aliasCount:0}else if(nn.isCollection(e)){let i=0;for(let n of e.items){let o=Ai(t,n,r);o>i&&(i=o)}return i}else if(nn.isPair(e)){let i=Ai(t,e.key,r),n=Ai(t,e.value,r);return Math.max(i,n)}return 1}Ag.Alias=Ga});var ce=N(Ja=>{"use strict";var ok=Z(),sk=Ti(),ak=ct(),ck=t=>!t||typeof t!="function"&&typeof t!="object",lt=class extends sk.NodeBase{constructor(e){super(ok.SCALAR),this.value=e}toJSON(e,r){return r?.keep?this.value:ak.toJS(this.value,e,r)}toString(){return String(this.value)}};lt.BLOCK_FOLDED="BLOCK_FOLDED";lt.BLOCK_LITERAL="BLOCK_LITERAL";lt.PLAIN="PLAIN";lt.QUOTE_DOUBLE="QUOTE_DOUBLE";lt.QUOTE_SINGLE="QUOTE_SINGLE";Ja.Scalar=lt;Ja.isScalarValue=ck});var cr=N(zg=>{"use strict";var lk=ar(),Dt=Z(),Eg=ce(),uk="tag:yaml.org,2002:";function dk(t,e,r){if(e){let i=r.filter(o=>o.tag===e),n=i.find(o=>!o.format)??i[0];if(!n)throw new Error(`Tag ${e} not found`);return n}return r.find(i=>i.identify?.(t)&&!i.format)}function pk(t,e,r){if(Dt.isDocument(t)&&(t=t.contents),Dt.isNode(t))return t;if(Dt.isPair(t)){let u=r.schema[Dt.MAP].createNode?.(r.schema,null,r);return u.items.push(t),u}(t instanceof String||t instanceof Number||t instanceof Boolean||typeof BigInt<"u"&&t instanceof BigInt)&&(t=t.valueOf());let{aliasDuplicateObjects:i,onAnchor:n,onTagObj:o,schema:s,sourceObjects:a}=r,c;if(i&&t&&typeof t=="object"){if(c=a.get(t),c)return c.anchor??(c.anchor=n(t)),new lk.Alias(c.anchor);c={anchor:null,node:null},a.set(t,c)}e?.startsWith("!!")&&(e=uk+e.slice(2));let l=dk(t,e,s.tags);if(!l){if(t&&typeof t.toJSON=="function"&&(t=t.toJSON()),!t||typeof t!="object"){let u=new Eg.Scalar(t);return c&&(c.node=u),u}l=t instanceof Map?s[Dt.MAP]:Symbol.iterator in Object(t)?s[Dt.SEQ]:s[Dt.MAP]}o&&(o(l),delete r.onTagObj);let d=l?.createNode?l.createNode(r.schema,t,r):typeof l?.nodeClass?.from=="function"?l.nodeClass.from(r.schema,t,r):new Eg.Scalar(t);return e?d.tag=e:l.default||(d.tag=l.tag),c&&(c.node=d),d}zg.createNode=pk});var zi=N(Ei=>{"use strict";var fk=cr(),Ve=Z(),mk=Ti();function Ka(t,e,r){let i=r;for(let n=e.length-1;n>=0;--n){let o=e[n];if(typeof o=="number"&&Number.isInteger(o)&&o>=0){let s=[];s[o]=i,i=s}else i=new Map([[o,i]])}return fk.createNode(i,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:t,sourceObjects:new Map})}var Ng=t=>t==null||typeof t=="object"&&!!t[Symbol.iterator]().next().done,Wa=class extends mk.NodeBase{constructor(e,r){super(e),Object.defineProperty(this,"schema",{value:r,configurable:!0,enumerable:!1,writable:!0})}clone(e){let r=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(r.schema=e),r.items=r.items.map(i=>Ve.isNode(i)||Ve.isPair(i)?i.clone(e):i),this.range&&(r.range=this.range.slice()),r}addIn(e,r){if(Ng(e))this.add(r);else{let[i,...n]=e,o=this.get(i,!0);if(Ve.isCollection(o))o.addIn(n,r);else if(o===void 0&&this.schema)this.set(i,Ka(this.schema,n,r));else throw new Error(`Expected YAML collection at ${i}. Remaining path: ${n}`)}}deleteIn(e){let[r,...i]=e;if(i.length===0)return this.delete(r);let n=this.get(r,!0);if(Ve.isCollection(n))return n.deleteIn(i);throw new Error(`Expected YAML collection at ${r}. Remaining path: ${i}`)}getIn(e,r){let[i,...n]=e,o=this.get(i,!0);return n.length===0?!r&&Ve.isScalar(o)?o.value:o:Ve.isCollection(o)?o.getIn(n,r):void 0}hasAllNullValues(e){return this.items.every(r=>{if(!Ve.isPair(r))return!1;let i=r.value;return i==null||e&&Ve.isScalar(i)&&i.value==null&&!i.commentBefore&&!i.comment&&!i.tag})}hasIn(e){let[r,...i]=e;if(i.length===0)return this.has(r);let n=this.get(r,!0);return Ve.isCollection(n)?n.hasIn(i):!1}setIn(e,r){let[i,...n]=e;if(n.length===0)this.set(i,r);else{let o=this.get(i,!0);if(Ve.isCollection(o))o.setIn(n,r);else if(o===void 0&&this.schema)this.set(i,Ka(this.schema,n,r));else throw new Error(`Expected YAML collection at ${i}. Remaining path: ${n}`)}}};Ei.Collection=Wa;Ei.collectionFromPath=Ka;Ei.isEmptyPath=Ng});var lr=N(Ni=>{"use strict";var gk=t=>t.replace(/^(?!$)(?: $)?/gm,"#");function Ya(t,e){return/^\n+$/.test(t)?t.substring(1):e?t.replace(/^(?! *$)/gm,e):t}var hk=(t,e,r)=>t.endsWith(`
27
+ `)?Ya(r,e):r.includes(`
28
28
  `)?`
29
- `+Ba(r,e):(t.endsWith(" ")?"":" ")+r;Ai.indentComment=Ba;Ai.lineComment=sk;Ai.stringifyComment=ok});var Og=N(cr=>{"use strict";var ak="flow",Va="block",Ei="quoted";function ck(t,e,r="flow",{indentAtStart:i,lineWidth:n=80,minContentWidth:o=20,onFold:s,onOverflow:a}={}){if(!n||n<0)return t;n<o&&(o=0);let c=Math.max(1+o,1+n-e.length);if(t.length<=c)return t;let l=[],u={},d=n-e.length;typeof i=="number"&&(i>n-Math.max(2,o)?l.push(0):d=n-i);let p,f,m=!1,g=-1,y=-1,k=-1;r===Va&&(g=Ig(t,g,e.length),g!==-1&&(d=g+c));for(let b;b=t[g+=1];){if(r===Ei&&b==="\\"){switch(y=g,t[g+1]){case"x":g+=3;break;case"u":g+=5;break;case"U":g+=9;break;default:g+=1}k=g}if(b===`
30
- `)r===Va&&(g=Ig(t,g,e.length)),d=g+e.length+c,p=void 0;else{if(b===" "&&f&&f!==" "&&f!==`
31
- `&&f!==" "){let w=t[g+1];w&&w!==" "&&w!==`
32
- `&&w!==" "&&(p=g)}if(g>=d)if(p)l.push(p),d=p+c,p=void 0;else if(r===Ei){for(;f===" "||f===" ";)f=b,b=t[g+=1],m=!0;let w=g>k+1?g-2:y-1;if(u[w])return t;l.push(w),u[w]=!0,d=w+c,p=void 0}else m=!0}f=b}if(m&&a&&a(),l.length===0)return t;s&&s();let z=t.slice(0,l[0]);for(let b=0;b<l.length;++b){let w=l[b],j=l[b+1]||t.length;w===0?z=`
33
- ${e}${t.slice(0,j)}`:(r===Ei&&u[w]&&(z+=`${t[w]}\\`),z+=`
34
- ${e}${t.slice(w+1,j)}`)}return z}function Ig(t,e,r){let i=e,n=e+1,o=t[n];for(;o===" "||o===" ";)if(e<n+r)o=t[++e];else{do o=t[++e];while(o&&o!==`
35
- `);i=e,n=e+1,o=t[n]}return i}cr.FOLD_BLOCK=Va;cr.FOLD_FLOW=ak;cr.FOLD_QUOTED=Ei;cr.foldFlowLines=ck});var ur=N(Pg=>{"use strict";var Re=ce(),dt=Og(),Ni=(t,e)=>({indentAtStart:e?t.indent.length:t.indentAtStart,lineWidth:t.options.lineWidth,minContentWidth:t.options.minContentWidth}),Ci=t=>/^(%|---|\.\.\.)/m.test(t);function lk(t,e,r){if(!e||e<0)return!1;let i=e-r,n=t.length;if(n<=i)return!1;for(let o=0,s=0;o<n;++o)if(t[o]===`
36
- `){if(o-s>i)return!0;if(s=o+1,n-s<=i)return!1}return!0}function lr(t,e){let r=JSON.stringify(t);if(e.options.doubleQuotedAsJSON)return r;let{implicitKey:i}=e,n=e.options.doubleQuotedMinMultiLineLength,o=e.indent||(Ci(t)?" ":""),s="",a=0;for(let c=0,l=r[c];l;l=r[++c])if(l===" "&&r[c+1]==="\\"&&r[c+2]==="n"&&(s+=r.slice(a,c)+"\\ ",c+=1,a=c,l="\\"),l==="\\")switch(r[c+1]){case"u":{s+=r.slice(a,c);let u=r.substr(c+2,4);switch(u){case"0000":s+="\\0";break;case"0007":s+="\\a";break;case"000b":s+="\\v";break;case"001b":s+="\\e";break;case"0085":s+="\\N";break;case"00a0":s+="\\_";break;case"2028":s+="\\L";break;case"2029":s+="\\P";break;default:u.substr(0,2)==="00"?s+="\\x"+u.substr(2):s+=r.substr(c,6)}c+=5,a=c+1}break;case"n":if(i||r[c+2]==='"'||r.length<n)c+=1;else{for(s+=r.slice(a,c)+`
29
+ `+Ya(r,e):(t.endsWith(" ")?"":" ")+r;Ni.indentComment=Ya;Ni.lineComment=hk;Ni.stringifyComment=gk});var Dg=N(ur=>{"use strict";var yk="flow",Ha="block",Ci="quoted";function _k(t,e,r="flow",{indentAtStart:i,lineWidth:n=80,minContentWidth:o=20,onFold:s,onOverflow:a}={}){if(!n||n<0)return t;n<o&&(o=0);let c=Math.max(1+o,1+n-e.length);if(t.length<=c)return t;let l=[],d={},u=n-e.length;typeof i=="number"&&(i>n-Math.max(2,o)?l.push(0):u=n-i);let p,f,m=!1,h=-1,y=-1,S=-1;r===Ha&&(h=Cg(t,h,e.length),h!==-1&&(u=h+c));for(let b;b=t[h+=1];){if(r===Ci&&b==="\\"){switch(y=h,t[h+1]){case"x":h+=3;break;case"u":h+=5;break;case"U":h+=9;break;default:h+=1}S=h}if(b===`
30
+ `)r===Ha&&(h=Cg(t,h,e.length)),u=h+e.length+c,p=void 0;else{if(b===" "&&f&&f!==" "&&f!==`
31
+ `&&f!==" "){let $=t[h+1];$&&$!==" "&&$!==`
32
+ `&&$!==" "&&(p=h)}if(h>=u)if(p)l.push(p),u=p+c,p=void 0;else if(r===Ci){for(;f===" "||f===" ";)f=b,b=t[h+=1],m=!0;let $=h>S+1?h-2:y-1;if(d[$])return t;l.push($),d[$]=!0,u=$+c,p=void 0}else m=!0}f=b}if(m&&a&&a(),l.length===0)return t;s&&s();let z=t.slice(0,l[0]);for(let b=0;b<l.length;++b){let $=l[b],j=l[b+1]||t.length;$===0?z=`
33
+ ${e}${t.slice(0,j)}`:(r===Ci&&d[$]&&(z+=`${t[$]}\\`),z+=`
34
+ ${e}${t.slice($+1,j)}`)}return z}function Cg(t,e,r){let i=e,n=e+1,o=t[n];for(;o===" "||o===" ";)if(e<n+r)o=t[++e];else{do o=t[++e];while(o&&o!==`
35
+ `);i=e,n=e+1,o=t[n]}return i}ur.FOLD_BLOCK=Ha;ur.FOLD_FLOW=yk;ur.FOLD_QUOTED=Ci;ur.foldFlowLines=_k});var pr=N(jg=>{"use strict";var Ue=ce(),ut=Dg(),ji=(t,e)=>({indentAtStart:e?t.indent.length:t.indentAtStart,lineWidth:t.options.lineWidth,minContentWidth:t.options.minContentWidth}),Ri=t=>/^(%|---|\.\.\.)/m.test(t);function vk(t,e,r){if(!e||e<0)return!1;let i=e-r,n=t.length;if(n<=i)return!1;for(let o=0,s=0;o<n;++o)if(t[o]===`
36
+ `){if(o-s>i)return!0;if(s=o+1,n-s<=i)return!1}return!0}function dr(t,e){let r=JSON.stringify(t);if(e.options.doubleQuotedAsJSON)return r;let{implicitKey:i}=e,n=e.options.doubleQuotedMinMultiLineLength,o=e.indent||(Ri(t)?" ":""),s="",a=0;for(let c=0,l=r[c];l;l=r[++c])if(l===" "&&r[c+1]==="\\"&&r[c+2]==="n"&&(s+=r.slice(a,c)+"\\ ",c+=1,a=c,l="\\"),l==="\\")switch(r[c+1]){case"u":{s+=r.slice(a,c);let d=r.substr(c+2,4);switch(d){case"0000":s+="\\0";break;case"0007":s+="\\a";break;case"000b":s+="\\v";break;case"001b":s+="\\e";break;case"0085":s+="\\N";break;case"00a0":s+="\\_";break;case"2028":s+="\\L";break;case"2029":s+="\\P";break;default:d.substr(0,2)==="00"?s+="\\x"+d.substr(2):s+=r.substr(c,6)}c+=5,a=c+1}break;case"n":if(i||r[c+2]==='"'||r.length<n)c+=1;else{for(s+=r.slice(a,c)+`
37
37
 
38
38
  `;r[c+2]==="\\"&&r[c+3]==="n"&&r[c+4]!=='"';)s+=`
39
- `,c+=2;s+=o,r[c+2]===" "&&(s+="\\"),c+=1,a=c+1}break;default:c+=1}return s=a?s+r.slice(a):r,i?s:dt.foldFlowLines(s,o,dt.FOLD_QUOTED,Ni(e,!1))}function Ga(t,e){if(e.options.singleQuote===!1||e.implicitKey&&t.includes(`
40
- `)||/[ \t]\n|\n[ \t]/.test(t))return lr(t,e);let r=e.indent||(Ci(t)?" ":""),i="'"+t.replace(/'/g,"''").replace(/\n+/g,`$&
41
- ${r}`)+"'";return e.implicitKey?i:dt.foldFlowLines(i,r,dt.FOLD_FLOW,Ni(e,!1))}function rn(t,e){let{singleQuote:r}=e.options,i;if(r===!1)i=lr;else{let n=t.includes('"'),o=t.includes("'");n&&!o?i=Ga:o&&!n?i=lr:i=r?Ga:lr}return i(t,e)}var Ka;try{Ka=new RegExp(`(^|(?<!
39
+ `,c+=2;s+=o,r[c+2]===" "&&(s+="\\"),c+=1,a=c+1}break;default:c+=1}return s=a?s+r.slice(a):r,i?s:ut.foldFlowLines(s,o,ut.FOLD_QUOTED,ji(e,!1))}function Xa(t,e){if(e.options.singleQuote===!1||e.implicitKey&&t.includes(`
40
+ `)||/[ \t]\n|\n[ \t]/.test(t))return dr(t,e);let r=e.indent||(Ri(t)?" ":""),i="'"+t.replace(/'/g,"''").replace(/\n+/g,`$&
41
+ ${r}`)+"'";return e.implicitKey?i:ut.foldFlowLines(i,r,ut.FOLD_FLOW,ji(e,!1))}function rn(t,e){let{singleQuote:r}=e.options,i;if(r===!1)i=dr;else{let n=t.includes('"'),o=t.includes("'");n&&!o?i=Xa:o&&!n?i=dr:i=r?Xa:dr}return i(t,e)}var Qa;try{Qa=new RegExp(`(^|(?<!
42
42
  ))
43
43
  +(?!
44
- |$)`,"g")}catch{Ka=/\n+(?!\n|$)/g}function zi({comment:t,type:e,value:r},i,n,o){let{blockQuote:s,commentString:a,lineWidth:c}=i.options;if(!s||/\n[\t ]+$/.test(r))return rn(r,i);let l=i.indent||(i.forceBlockIndent||Ci(r)?" ":""),u=s==="literal"?!0:s==="folded"||e===Re.Scalar.BLOCK_FOLDED?!1:e===Re.Scalar.BLOCK_LITERAL?!0:!lk(r,c,l.length);if(!r)return u?`|
44
+ |$)`,"g")}catch{Qa=/\n+(?!\n|$)/g}function Di({comment:t,type:e,value:r},i,n,o){let{blockQuote:s,commentString:a,lineWidth:c}=i.options;if(!s||/\n[\t ]+$/.test(r))return rn(r,i);let l=i.indent||(i.forceBlockIndent||Ri(r)?" ":""),d=s==="literal"?!0:s==="folded"||e===Ue.Scalar.BLOCK_FOLDED?!1:e===Ue.Scalar.BLOCK_LITERAL?!0:!vk(r,c,l.length);if(!r)return d?`|
45
45
  `:`>
46
- `;let d,p;for(p=r.length;p>0;--p){let j=r[p-1];if(j!==`
46
+ `;let u,p;for(p=r.length;p>0;--p){let j=r[p-1];if(j!==`
47
47
  `&&j!==" "&&j!==" ")break}let f=r.substring(p),m=f.indexOf(`
48
- `);m===-1?d="-":r===f||m!==f.length-1?(d="+",o&&o()):d="",f&&(r=r.slice(0,-f.length),f[f.length-1]===`
49
- `&&(f=f.slice(0,-1)),f=f.replace(Ka,`$&${l}`));let g=!1,y,k=-1;for(y=0;y<r.length;++y){let j=r[y];if(j===" ")g=!0;else if(j===`
50
- `)k=y;else break}let z=r.substring(0,k<y?k+1:y);z&&(r=r.substring(z.length),z=z.replace(/\n+/g,`$&${l}`));let w=(g?l?"2":"1":"")+d;if(t&&(w+=" "+a(t.replace(/ ?[\r\n]+/g," ")),n&&n()),!u){let j=r.replace(/\n+/g,`
51
- $&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${l}`),C=!1,A=Ni(i,!0);s!=="folded"&&e!==Re.Scalar.BLOCK_FOLDED&&(A.onOverflow=()=>{C=!0});let E=dt.foldFlowLines(`${z}${j}${f}`,l,dt.FOLD_BLOCK,A);if(!C)return`>${w}
52
- ${l}${E}`}return r=r.replace(/\n+/g,`$&${l}`),`|${w}
53
- ${l}${z}${r}${f}`}function uk(t,e,r,i){let{type:n,value:o}=t,{actualString:s,implicitKey:a,indent:c,indentStep:l,inFlow:u}=e;if(a&&o.includes(`
54
- `)||u&&/[[\]{},]/.test(o))return rn(o,e);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(o))return a||u||!o.includes(`
55
- `)?rn(o,e):zi(t,e,r,i);if(!a&&!u&&n!==Re.Scalar.PLAIN&&o.includes(`
56
- `))return zi(t,e,r,i);if(Ci(o)){if(c==="")return e.forceBlockIndent=!0,zi(t,e,r,i);if(a&&c===l)return rn(o,e)}let d=o.replace(/\n+/g,`$&
57
- ${c}`);if(s){let p=g=>g.default&&g.tag!=="tag:yaml.org,2002:str"&&g.test?.test(d),{compat:f,tags:m}=e.doc.schema;if(m.some(p)||f?.some(p))return rn(o,e)}return a?d:dt.foldFlowLines(d,c,dt.FOLD_FLOW,Ni(e,!1))}function dk(t,e,r,i){let{implicitKey:n,inFlow:o}=e,s=typeof t.value=="string"?t:Object.assign({},t,{value:String(t.value)}),{type:a}=t;a!==Re.Scalar.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(s.value)&&(a=Re.Scalar.QUOTE_DOUBLE);let c=u=>{switch(u){case Re.Scalar.BLOCK_FOLDED:case Re.Scalar.BLOCK_LITERAL:return n||o?rn(s.value,e):zi(s,e,r,i);case Re.Scalar.QUOTE_DOUBLE:return lr(s.value,e);case Re.Scalar.QUOTE_SINGLE:return Ga(s.value,e);case Re.Scalar.PLAIN:return uk(s,e,r,i);default:return null}},l=c(a);if(l===null){let{defaultKeyType:u,defaultStringType:d}=e.options,p=n&&u||d;if(l=c(p),l===null)throw new Error(`Unsupported default string type ${p}`)}return l}Pg.stringifyString=dk});var dr=N(Ja=>{"use strict";var pk=xi(),pt=Z(),fk=ar(),mk=ur();function gk(t,e){let r=Object.assign({blockQuote:!0,commentString:fk.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},t.schema.toStringOptions,e),i;switch(r.collectionStyle){case"block":i=!1;break;case"flow":i=!0;break;default:i=null}return{anchors:new Set,doc:t,flowCollectionPadding:r.flowCollectionPadding?" ":"",indent:"",indentStep:typeof r.indent=="number"?" ".repeat(r.indent):" ",inFlow:i,options:r}}function hk(t,e){if(e.tag){let n=t.filter(o=>o.tag===e.tag);if(n.length>0)return n.find(o=>o.format===e.format)??n[0]}let r,i;if(pt.isScalar(e)){i=e.value;let n=t.filter(o=>o.identify?.(i));if(n.length>1){let o=n.filter(s=>s.test);o.length>0&&(n=o)}r=n.find(o=>o.format===e.format)??n.find(o=>!o.format)}else i=e,r=t.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 yk(t,e,{anchors:r,doc:i}){if(!i.directives)return"";let n=[],o=(pt.isScalar(t)||pt.isCollection(t))&&t.anchor;o&&pk.anchorIsValid(o)&&(r.add(o),n.push(`&${o}`));let s=t.tag??(e.default?null:e.tag);return s&&n.push(i.directives.tagString(s)),n.join(" ")}function _k(t,e,r,i){if(pt.isPair(t))return t.toString(e,r,i);if(pt.isAlias(t)){if(e.doc.directives)return t.toString(e);if(e.resolvedAliases?.has(t))throw new TypeError("Cannot stringify circular structure without alias nodes");e.resolvedAliases?e.resolvedAliases.add(t):e.resolvedAliases=new Set([t]),t=t.resolve(e.doc)}let n,o=pt.isNode(t)?t:e.doc.createNode(t,{onTagObj:c=>n=c});n??(n=hk(e.doc.schema.tags,o));let s=yk(o,n,e);s.length>0&&(e.indentAtStart=(e.indentAtStart??0)+s.length+1);let a=typeof n.stringify=="function"?n.stringify(o,e,r,i):pt.isScalar(o)?mk.stringifyString(o,e,r,i):o.toString(e,r,i);return s?pt.isScalar(o)||a[0]==="{"||a[0]==="["?`${s} ${a}`:`${s}
58
- ${e.indent}${a}`:a}Ja.createStringifyContext=gk;Ja.stringify=_k});var zg=N(Eg=>{"use strict";var tt=Z(),Tg=ce(),Ag=dr(),pr=ar();function vk({key:t,value:e},r,i,n){let{allNullValues:o,doc:s,indent:a,indentStep:c,options:{commentString:l,indentSeq:u,simpleKeys:d}}=r,p=tt.isNode(t)&&t.comment||null;if(d){if(p)throw new Error("With simple keys, key nodes cannot have comments");if(tt.isCollection(t)||!tt.isNode(t)&&typeof t=="object"){let A="With simple keys, collection cannot be used as a key value";throw new Error(A)}}let f=!d&&(!t||p&&e==null&&!r.inFlow||tt.isCollection(t)||(tt.isScalar(t)?t.type===Tg.Scalar.BLOCK_FOLDED||t.type===Tg.Scalar.BLOCK_LITERAL:typeof t=="object"));r=Object.assign({},r,{allNullValues:!1,implicitKey:!f&&(d||!o),indent:a+c});let m=!1,g=!1,y=Ag.stringify(t,r,()=>m=!0,()=>g=!0);if(!f&&!r.inFlow&&y.length>1024){if(d)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");f=!0}if(r.inFlow){if(o||e==null)return m&&i&&i(),y===""?"?":f?`? ${y}`:y}else if(o&&!d||e==null&&f)return y=`? ${y}`,p&&!m?y+=pr.lineComment(y,r.indent,l(p)):g&&n&&n(),y;m&&(p=null),f?(p&&(y+=pr.lineComment(y,r.indent,l(p))),y=`? ${y}
59
- ${a}:`):(y=`${y}:`,p&&(y+=pr.lineComment(y,r.indent,l(p))));let k,z,b;tt.isNode(e)?(k=!!e.spaceBefore,z=e.commentBefore,b=e.comment):(k=!1,z=null,b=null,e&&typeof e=="object"&&(e=s.createNode(e))),r.implicitKey=!1,!f&&!p&&tt.isScalar(e)&&(r.indentAtStart=y.length+1),g=!1,!u&&c.length>=2&&!r.inFlow&&!f&&tt.isSeq(e)&&!e.flow&&!e.tag&&!e.anchor&&(r.indent=r.indent.substring(2));let w=!1,j=Ag.stringify(e,r,()=>w=!0,()=>g=!0),C=" ";if(p||k||z){if(C=k?`
48
+ `);m===-1?u="-":r===f||m!==f.length-1?(u="+",o&&o()):u="",f&&(r=r.slice(0,-f.length),f[f.length-1]===`
49
+ `&&(f=f.slice(0,-1)),f=f.replace(Qa,`$&${l}`));let h=!1,y,S=-1;for(y=0;y<r.length;++y){let j=r[y];if(j===" ")h=!0;else if(j===`
50
+ `)S=y;else break}let z=r.substring(0,S<y?S+1:y);z&&(r=r.substring(z.length),z=z.replace(/\n+/g,`$&${l}`));let $=(h?l?"2":"1":"")+u;if(t&&($+=" "+a(t.replace(/ ?[\r\n]+/g," ")),n&&n()),!d){let j=r.replace(/\n+/g,`
51
+ $&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${l}`),C=!1,A=ji(i,!0);s!=="folded"&&e!==Ue.Scalar.BLOCK_FOLDED&&(A.onOverflow=()=>{C=!0});let E=ut.foldFlowLines(`${z}${j}${f}`,l,ut.FOLD_BLOCK,A);if(!C)return`>${$}
52
+ ${l}${E}`}return r=r.replace(/\n+/g,`$&${l}`),`|${$}
53
+ ${l}${z}${r}${f}`}function bk(t,e,r,i){let{type:n,value:o}=t,{actualString:s,implicitKey:a,indent:c,indentStep:l,inFlow:d}=e;if(a&&o.includes(`
54
+ `)||d&&/[[\]{},]/.test(o))return rn(o,e);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(o))return a||d||!o.includes(`
55
+ `)?rn(o,e):Di(t,e,r,i);if(!a&&!d&&n!==Ue.Scalar.PLAIN&&o.includes(`
56
+ `))return Di(t,e,r,i);if(Ri(o)){if(c==="")return e.forceBlockIndent=!0,Di(t,e,r,i);if(a&&c===l)return rn(o,e)}let u=o.replace(/\n+/g,`$&
57
+ ${c}`);if(s){let p=h=>h.default&&h.tag!=="tag:yaml.org,2002:str"&&h.test?.test(u),{compat:f,tags:m}=e.doc.schema;if(m.some(p)||f?.some(p))return rn(o,e)}return a?u:ut.foldFlowLines(u,c,ut.FOLD_FLOW,ji(e,!1))}function wk(t,e,r,i){let{implicitKey:n,inFlow:o}=e,s=typeof t.value=="string"?t:Object.assign({},t,{value:String(t.value)}),{type:a}=t;a!==Ue.Scalar.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(s.value)&&(a=Ue.Scalar.QUOTE_DOUBLE);let c=d=>{switch(d){case Ue.Scalar.BLOCK_FOLDED:case Ue.Scalar.BLOCK_LITERAL:return n||o?rn(s.value,e):Di(s,e,r,i);case Ue.Scalar.QUOTE_DOUBLE:return dr(s.value,e);case Ue.Scalar.QUOTE_SINGLE:return Xa(s.value,e);case Ue.Scalar.PLAIN:return bk(s,e,r,i);default:return null}},l=c(a);if(l===null){let{defaultKeyType:d,defaultStringType:u}=e.options,p=n&&d||u;if(l=c(p),l===null)throw new Error(`Unsupported default string type ${p}`)}return l}jg.stringifyString=wk});var fr=N(ec=>{"use strict";var $k=Pi(),dt=Z(),kk=lr(),Sk=pr();function xk(t,e){let r=Object.assign({blockQuote:!0,commentString:kk.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},t.schema.toStringOptions,e),i;switch(r.collectionStyle){case"block":i=!1;break;case"flow":i=!0;break;default:i=null}return{anchors:new Set,doc:t,flowCollectionPadding:r.flowCollectionPadding?" ":"",indent:"",indentStep:typeof r.indent=="number"?" ".repeat(r.indent):" ",inFlow:i,options:r}}function Ik(t,e){if(e.tag){let n=t.filter(o=>o.tag===e.tag);if(n.length>0)return n.find(o=>o.format===e.format)??n[0]}let r,i;if(dt.isScalar(e)){i=e.value;let n=t.filter(o=>o.identify?.(i));if(n.length>1){let o=n.filter(s=>s.test);o.length>0&&(n=o)}r=n.find(o=>o.format===e.format)??n.find(o=>!o.format)}else i=e,r=t.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 Ok(t,e,{anchors:r,doc:i}){if(!i.directives)return"";let n=[],o=(dt.isScalar(t)||dt.isCollection(t))&&t.anchor;o&&$k.anchorIsValid(o)&&(r.add(o),n.push(`&${o}`));let s=t.tag??(e.default?null:e.tag);return s&&n.push(i.directives.tagString(s)),n.join(" ")}function Pk(t,e,r,i){if(dt.isPair(t))return t.toString(e,r,i);if(dt.isAlias(t)){if(e.doc.directives)return t.toString(e);if(e.resolvedAliases?.has(t))throw new TypeError("Cannot stringify circular structure without alias nodes");e.resolvedAliases?e.resolvedAliases.add(t):e.resolvedAliases=new Set([t]),t=t.resolve(e.doc)}let n,o=dt.isNode(t)?t:e.doc.createNode(t,{onTagObj:c=>n=c});n??(n=Ik(e.doc.schema.tags,o));let s=Ok(o,n,e);s.length>0&&(e.indentAtStart=(e.indentAtStart??0)+s.length+1);let a=typeof n.stringify=="function"?n.stringify(o,e,r,i):dt.isScalar(o)?Sk.stringifyString(o,e,r,i):o.toString(e,r,i);return s?dt.isScalar(o)||a[0]==="{"||a[0]==="["?`${s} ${a}`:`${s}
58
+ ${e.indent}${a}`:a}ec.createStringifyContext=xk;ec.stringify=Pk});var Mg=N(Lg=>{"use strict";var tt=Z(),Rg=ce(),Ug=fr(),mr=lr();function Tk({key:t,value:e},r,i,n){let{allNullValues:o,doc:s,indent:a,indentStep:c,options:{commentString:l,indentSeq:d,simpleKeys:u}}=r,p=tt.isNode(t)&&t.comment||null;if(u){if(p)throw new Error("With simple keys, key nodes cannot have comments");if(tt.isCollection(t)||!tt.isNode(t)&&typeof t=="object"){let A="With simple keys, collection cannot be used as a key value";throw new Error(A)}}let f=!u&&(!t||p&&e==null&&!r.inFlow||tt.isCollection(t)||(tt.isScalar(t)?t.type===Rg.Scalar.BLOCK_FOLDED||t.type===Rg.Scalar.BLOCK_LITERAL:typeof t=="object"));r=Object.assign({},r,{allNullValues:!1,implicitKey:!f&&(u||!o),indent:a+c});let m=!1,h=!1,y=Ug.stringify(t,r,()=>m=!0,()=>h=!0);if(!f&&!r.inFlow&&y.length>1024){if(u)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");f=!0}if(r.inFlow){if(o||e==null)return m&&i&&i(),y===""?"?":f?`? ${y}`:y}else if(o&&!u||e==null&&f)return y=`? ${y}`,p&&!m?y+=mr.lineComment(y,r.indent,l(p)):h&&n&&n(),y;m&&(p=null),f?(p&&(y+=mr.lineComment(y,r.indent,l(p))),y=`? ${y}
59
+ ${a}:`):(y=`${y}:`,p&&(y+=mr.lineComment(y,r.indent,l(p))));let S,z,b;tt.isNode(e)?(S=!!e.spaceBefore,z=e.commentBefore,b=e.comment):(S=!1,z=null,b=null,e&&typeof e=="object"&&(e=s.createNode(e))),r.implicitKey=!1,!f&&!p&&tt.isScalar(e)&&(r.indentAtStart=y.length+1),h=!1,!d&&c.length>=2&&!r.inFlow&&!f&&tt.isSeq(e)&&!e.flow&&!e.tag&&!e.anchor&&(r.indent=r.indent.substring(2));let $=!1,j=Ug.stringify(e,r,()=>$=!0,()=>h=!0),C=" ";if(p||S||z){if(C=S?`
60
60
  `:"",z){let A=l(z);C+=`
61
- ${pr.indentComment(A,r.indent)}`}j===""&&!r.inFlow?C===`
61
+ ${mr.indentComment(A,r.indent)}`}j===""&&!r.inFlow?C===`
62
62
  `&&b&&(C=`
63
63
 
64
64
  `):C+=`
65
65
  ${r.indent}`}else if(!f&&tt.isCollection(e)){let A=j[0],E=j.indexOf(`
66
- `),M=E!==-1,G=r.inFlow??e.flow??e.items.length===0;if(M||!G){let ge=!1;if(M&&(A==="&"||A==="!")){let ne=j.indexOf(" ");A==="&"&&ne!==-1&&ne<E&&j[ne+1]==="!"&&(ne=j.indexOf(" ",ne+1)),(ne===-1||E<ne)&&(ge=!0)}ge||(C=`
66
+ `),M=E!==-1,K=r.inFlow??e.flow??e.items.length===0;if(M||!K){let he=!1;if(M&&(A==="&"||A==="!")){let oe=j.indexOf(" ");A==="&"&&oe!==-1&&oe<E&&j[oe+1]==="!"&&(oe=j.indexOf(" ",oe+1)),(oe===-1||E<oe)&&(he=!0)}he||(C=`
67
67
  ${r.indent}`)}}else(j===""||j[0]===`
68
- `)&&(C="");return y+=C+j,r.inFlow?w&&i&&i():b&&!w?y+=pr.lineComment(y,r.indent,l(b)):g&&n&&n(),y}Eg.stringifyPair=vk});var Ya=N(Wa=>{"use strict";var Ng=He("process");function bk(t,...e){t==="debug"&&console.log(...e)}function wk(t,e){(t==="debug"||t==="warn")&&(typeof Ng.emitWarning=="function"?Ng.emitWarning(e):console.warn(e))}Wa.debug=bk;Wa.warn=wk});var Ui=N(Ri=>{"use strict";var fr=Z(),Cg=ce(),Di="<<",ji={identify:t=>t===Di||typeof t=="symbol"&&t.description===Di,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new Cg.Scalar(Symbol(Di)),{addToJSMap:Dg}),stringify:()=>Di},$k=(t,e)=>(ji.identify(e)||fr.isScalar(e)&&(!e.type||e.type===Cg.Scalar.PLAIN)&&ji.identify(e.value))&&t?.doc.schema.tags.some(r=>r.tag===ji.tag&&r.default);function Dg(t,e,r){if(r=t&&fr.isAlias(r)?r.resolve(t.doc):r,fr.isSeq(r))for(let i of r.items)Ha(t,e,i);else if(Array.isArray(r))for(let i of r)Ha(t,e,i);else Ha(t,e,r)}function Ha(t,e,r){let i=t&&fr.isAlias(r)?r.resolve(t.doc):r;if(!fr.isMap(i))throw new Error("Merge sources must be maps or map aliases");let n=i.toJSON(null,t,Map);for(let[o,s]of n)e instanceof Map?e.has(o)||e.set(o,s):e instanceof Set?e.add(o):Object.prototype.hasOwnProperty.call(e,o)||Object.defineProperty(e,o,{value:s,writable:!0,enumerable:!0,configurable:!0});return e}Ri.addMergeToJSMap=Dg;Ri.isMergeKey=$k;Ri.merge=ji});var Qa=N(Ug=>{"use strict";var kk=Ya(),jg=Ui(),Sk=dr(),Rg=Z(),Xa=lt();function xk(t,e,{key:r,value:i}){if(Rg.isNode(r)&&r.addToJSMap)r.addToJSMap(t,e,i);else if(jg.isMergeKey(t,r))jg.addMergeToJSMap(t,e,i);else{let n=Xa.toJS(r,"",t);if(e instanceof Map)e.set(n,Xa.toJS(i,n,t));else if(e instanceof Set)e.add(n);else{let o=Ik(r,n,t),s=Xa.toJS(i,o,t);o in e?Object.defineProperty(e,o,{value:s,writable:!0,enumerable:!0,configurable:!0}):e[o]=s}}return e}function Ik(t,e,r){if(e===null)return"";if(typeof e!="object")return String(e);if(Rg.isNode(t)&&r?.doc){let i=Sk.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=t.toString(i);if(!r.mapKeyWarned){let o=JSON.stringify(n);o.length>40&&(o=o.substring(0,36)+'..."'),kk.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(e)}Ug.addPairToJSMap=xk});var ft=N(ec=>{"use strict";var Lg=sr(),Ok=zg(),Pk=Qa(),Li=Z();function Tk(t,e,r){let i=Lg.createNode(t,void 0,r),n=Lg.createNode(e,void 0,r);return new Mi(i,n)}var Mi=class t{constructor(e,r=null){Object.defineProperty(this,Li.NODE_TYPE,{value:Li.PAIR}),this.key=e,this.value=r}clone(e){let{key:r,value:i}=this;return Li.isNode(r)&&(r=r.clone(e)),Li.isNode(i)&&(i=i.clone(e)),new t(r,i)}toJSON(e,r){let i=r?.mapAsMap?new Map:{};return Pk.addPairToJSMap(r,i,this)}toString(e,r,i){return e?.doc?Ok.stringifyPair(this,e,r,i):JSON.stringify(this)}};ec.Pair=Mi;ec.createPair=Tk});var tc=N(Fg=>{"use strict";var Dt=Z(),Mg=dr(),Fi=ar();function Ak(t,e,r){return(e.inFlow??t.flow?zk:Ek)(t,e,r)}function Ek({comment:t,items:e},r,{blockItemPrefix:i,flowChars:n,itemIndent:o,onChompKeep:s,onComment:a}){let{indent:c,options:{commentString:l}}=r,u=Object.assign({},r,{indent:o,type:null}),d=!1,p=[];for(let m=0;m<e.length;++m){let g=e[m],y=null;if(Dt.isNode(g))!d&&g.spaceBefore&&p.push(""),Zi(r,p,g.commentBefore,d),g.comment&&(y=g.comment);else if(Dt.isPair(g)){let z=Dt.isNode(g.key)?g.key:null;z&&(!d&&z.spaceBefore&&p.push(""),Zi(r,p,z.commentBefore,d))}d=!1;let k=Mg.stringify(g,u,()=>y=null,()=>d=!0);y&&(k+=Fi.lineComment(k,o,l(y))),d&&y&&(d=!1),p.push(i+k)}let f;if(p.length===0)f=n.start+n.end;else{f=p[0];for(let m=1;m<p.length;++m){let g=p[m];f+=g?`
69
- ${c}${g}`:`
68
+ `)&&(C="");return y+=C+j,r.inFlow?$&&i&&i():b&&!$?y+=mr.lineComment(y,r.indent,l(b)):h&&n&&n(),y}Lg.stringifyPair=Tk});var nc=N(tc=>{"use strict";var qg=He("process");function Ak(t,...e){t==="debug"&&console.log(...e)}function Ek(t,e){(t==="debug"||t==="warn")&&(typeof qg.emitWarning=="function"?qg.emitWarning(e):console.warn(e))}tc.debug=Ak;tc.warn=Ek});var qi=N(Mi=>{"use strict";var gr=Z(),Zg=ce(),Ui="<<",Li={identify:t=>t===Ui||typeof t=="symbol"&&t.description===Ui,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new Zg.Scalar(Symbol(Ui)),{addToJSMap:Fg}),stringify:()=>Ui},zk=(t,e)=>(Li.identify(e)||gr.isScalar(e)&&(!e.type||e.type===Zg.Scalar.PLAIN)&&Li.identify(e.value))&&t?.doc.schema.tags.some(r=>r.tag===Li.tag&&r.default);function Fg(t,e,r){if(r=t&&gr.isAlias(r)?r.resolve(t.doc):r,gr.isSeq(r))for(let i of r.items)rc(t,e,i);else if(Array.isArray(r))for(let i of r)rc(t,e,i);else rc(t,e,r)}function rc(t,e,r){let i=t&&gr.isAlias(r)?r.resolve(t.doc):r;if(!gr.isMap(i))throw new Error("Merge sources must be maps or map aliases");let n=i.toJSON(null,t,Map);for(let[o,s]of n)e instanceof Map?e.has(o)||e.set(o,s):e instanceof Set?e.add(o):Object.prototype.hasOwnProperty.call(e,o)||Object.defineProperty(e,o,{value:s,writable:!0,enumerable:!0,configurable:!0});return e}Mi.addMergeToJSMap=Fg;Mi.isMergeKey=zk;Mi.merge=Li});var oc=N(Gg=>{"use strict";var Nk=nc(),Bg=qi(),Ck=fr(),Vg=Z(),ic=ct();function Dk(t,e,{key:r,value:i}){if(Vg.isNode(r)&&r.addToJSMap)r.addToJSMap(t,e,i);else if(Bg.isMergeKey(t,r))Bg.addMergeToJSMap(t,e,i);else{let n=ic.toJS(r,"",t);if(e instanceof Map)e.set(n,ic.toJS(i,n,t));else if(e instanceof Set)e.add(n);else{let o=jk(r,n,t),s=ic.toJS(i,o,t);o in e?Object.defineProperty(e,o,{value:s,writable:!0,enumerable:!0,configurable:!0}):e[o]=s}}return e}function jk(t,e,r){if(e===null)return"";if(typeof e!="object")return String(e);if(Vg.isNode(t)&&r?.doc){let i=Ck.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=t.toString(i);if(!r.mapKeyWarned){let o=JSON.stringify(n);o.length>40&&(o=o.substring(0,36)+'..."'),Nk.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(e)}Gg.addPairToJSMap=Dk});var pt=N(sc=>{"use strict";var Jg=cr(),Rk=Mg(),Uk=oc(),Zi=Z();function Lk(t,e,r){let i=Jg.createNode(t,void 0,r),n=Jg.createNode(e,void 0,r);return new Fi(i,n)}var Fi=class t{constructor(e,r=null){Object.defineProperty(this,Zi.NODE_TYPE,{value:Zi.PAIR}),this.key=e,this.value=r}clone(e){let{key:r,value:i}=this;return Zi.isNode(r)&&(r=r.clone(e)),Zi.isNode(i)&&(i=i.clone(e)),new t(r,i)}toJSON(e,r){let i=r?.mapAsMap?new Map:{};return Uk.addPairToJSMap(r,i,this)}toString(e,r,i){return e?.doc?Rk.stringifyPair(this,e,r,i):JSON.stringify(this)}};sc.Pair=Fi;sc.createPair=Lk});var ac=N(Wg=>{"use strict";var jt=Z(),Kg=fr(),Bi=lr();function Mk(t,e,r){return(e.inFlow??t.flow?Zk:qk)(t,e,r)}function qk({comment:t,items:e},r,{blockItemPrefix:i,flowChars:n,itemIndent:o,onChompKeep:s,onComment:a}){let{indent:c,options:{commentString:l}}=r,d=Object.assign({},r,{indent:o,type:null}),u=!1,p=[];for(let m=0;m<e.length;++m){let h=e[m],y=null;if(jt.isNode(h))!u&&h.spaceBefore&&p.push(""),Vi(r,p,h.commentBefore,u),h.comment&&(y=h.comment);else if(jt.isPair(h)){let z=jt.isNode(h.key)?h.key:null;z&&(!u&&z.spaceBefore&&p.push(""),Vi(r,p,z.commentBefore,u))}u=!1;let S=Kg.stringify(h,d,()=>y=null,()=>u=!0);y&&(S+=Bi.lineComment(S,o,l(y))),u&&y&&(u=!1),p.push(i+S)}let f;if(p.length===0)f=n.start+n.end;else{f=p[0];for(let m=1;m<p.length;++m){let h=p[m];f+=h?`
69
+ ${c}${h}`:`
70
70
  `}}return t?(f+=`
71
- `+Fi.indentComment(l(t),c),a&&a()):d&&s&&s(),f}function zk({items:t},e,{flowChars:r,itemIndent:i}){let{indent:n,indentStep:o,flowCollectionPadding:s,options:{commentString:a}}=e;i+=o;let c=Object.assign({},e,{indent:i,inFlow:!0,type:null}),l=!1,u=0,d=[];for(let m=0;m<t.length;++m){let g=t[m],y=null;if(Dt.isNode(g))g.spaceBefore&&d.push(""),Zi(e,d,g.commentBefore,!1),g.comment&&(y=g.comment);else if(Dt.isPair(g)){let z=Dt.isNode(g.key)?g.key:null;z&&(z.spaceBefore&&d.push(""),Zi(e,d,z.commentBefore,!1),z.comment&&(l=!0));let b=Dt.isNode(g.value)?g.value:null;b?(b.comment&&(y=b.comment),b.commentBefore&&(l=!0)):g.value==null&&z?.comment&&(y=z.comment)}y&&(l=!0);let k=Mg.stringify(g,c,()=>y=null);l||(l=d.length>u||k.includes(`
72
- `)),m<t.length-1?k+=",":e.options.trailingComma&&(e.options.lineWidth>0&&(l||(l=d.reduce((z,b)=>z+b.length+2,2)+(k.length+2)>e.options.lineWidth)),l&&(k+=",")),y&&(k+=Fi.lineComment(k,i,a(y))),d.push(k),u=d.length}let{start:p,end:f}=r;if(d.length===0)return p+f;if(!l){let m=d.reduce((g,y)=>g+y.length+2,2);l=e.options.lineWidth>0&&m>e.options.lineWidth}if(l){let m=p;for(let g of d)m+=g?`
73
- ${o}${n}${g}`:`
71
+ `+Bi.indentComment(l(t),c),a&&a()):u&&s&&s(),f}function Zk({items:t},e,{flowChars:r,itemIndent:i}){let{indent:n,indentStep:o,flowCollectionPadding:s,options:{commentString:a}}=e;i+=o;let c=Object.assign({},e,{indent:i,inFlow:!0,type:null}),l=!1,d=0,u=[];for(let m=0;m<t.length;++m){let h=t[m],y=null;if(jt.isNode(h))h.spaceBefore&&u.push(""),Vi(e,u,h.commentBefore,!1),h.comment&&(y=h.comment);else if(jt.isPair(h)){let z=jt.isNode(h.key)?h.key:null;z&&(z.spaceBefore&&u.push(""),Vi(e,u,z.commentBefore,!1),z.comment&&(l=!0));let b=jt.isNode(h.value)?h.value:null;b?(b.comment&&(y=b.comment),b.commentBefore&&(l=!0)):h.value==null&&z?.comment&&(y=z.comment)}y&&(l=!0);let S=Kg.stringify(h,c,()=>y=null);l||(l=u.length>d||S.includes(`
72
+ `)),m<t.length-1?S+=",":e.options.trailingComma&&(e.options.lineWidth>0&&(l||(l=u.reduce((z,b)=>z+b.length+2,2)+(S.length+2)>e.options.lineWidth)),l&&(S+=",")),y&&(S+=Bi.lineComment(S,i,a(y))),u.push(S),d=u.length}let{start:p,end:f}=r;if(u.length===0)return p+f;if(!l){let m=u.reduce((h,y)=>h+y.length+2,2);l=e.options.lineWidth>0&&m>e.options.lineWidth}if(l){let m=p;for(let h of u)m+=h?`
73
+ ${o}${n}${h}`:`
74
74
  `;return`${m}
75
- ${n}${f}`}else return`${p}${s}${d.join(" ")}${s}${f}`}function Zi({indent:t,options:{commentString:e}},r,i,n){if(i&&n&&(i=i.replace(/^\n+/,"")),i){let o=Fi.indentComment(e(i),t);r.push(o.trimStart())}}Fg.stringifyCollection=Ak});var gt=N(rc=>{"use strict";var Nk=tc(),Ck=Qa(),Dk=Ti(),mt=Z(),qi=ft(),jk=ce();function mr(t,e){let r=mt.isScalar(e)?e.value:e;for(let i of t)if(mt.isPair(i)&&(i.key===e||i.key===r||mt.isScalar(i.key)&&i.key.value===r))return i}var nc=class extends Dk.Collection{static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(mt.MAP,e),this.items=[]}static from(e,r,i){let{keepUndefined:n,replacer:o}=i,s=new this(e),a=(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)&&s.items.push(qi.createPair(c,l,i))};if(r instanceof Map)for(let[c,l]of r)a(c,l);else if(r&&typeof r=="object")for(let c of Object.keys(r))a(c,r[c]);return typeof e.sortMapEntries=="function"&&s.items.sort(e.sortMapEntries),s}add(e,r){let i;mt.isPair(e)?i=e:!e||typeof e!="object"||!("key"in e)?i=new qi.Pair(e,e?.value):i=new qi.Pair(e.key,e.value);let n=mr(this.items,i.key),o=this.schema?.sortMapEntries;if(n){if(!r)throw new Error(`Key ${i.key} already set`);mt.isScalar(n.value)&&jk.isScalarValue(i.value)?n.value.value=i.value:n.value=i.value}else if(o){let s=this.items.findIndex(a=>o(i,a)<0);s===-1?this.items.push(i):this.items.splice(s,0,i)}else this.items.push(i)}delete(e){let r=mr(this.items,e);return r?this.items.splice(this.items.indexOf(r),1).length>0:!1}get(e,r){let n=mr(this.items,e)?.value;return(!r&&mt.isScalar(n)?n.value:n)??void 0}has(e){return!!mr(this.items,e)}set(e,r){this.add(new qi.Pair(e,r),!0)}toJSON(e,r,i){let n=i?new i:r?.mapAsMap?new Map:{};r?.onCreate&&r.onCreate(n);for(let o of this.items)Ck.addPairToJSMap(r,n,o);return n}toString(e,r,i){if(!e)return JSON.stringify(this);for(let n of this.items)if(!mt.isPair(n))throw new Error(`Map items must all be pairs; found ${JSON.stringify(n)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),Nk.stringifyCollection(this,e,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:e.indent||"",onChompKeep:i,onComment:r})}};rc.YAMLMap=nc;rc.findPair=mr});var on=N(qg=>{"use strict";var Rk=Z(),Zg=gt(),Uk={collection:"map",default:!0,nodeClass:Zg.YAMLMap,tag:"tag:yaml.org,2002:map",resolve(t,e){return Rk.isMap(t)||e("Expected a mapping for this tag"),t},createNode:(t,e,r)=>Zg.YAMLMap.from(t,e,r)};qg.map=Uk});var ht=N(Bg=>{"use strict";var Lk=sr(),Mk=tc(),Fk=Ti(),Vi=Z(),Zk=ce(),qk=lt(),ic=class extends Fk.Collection{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(Vi.SEQ,e),this.items=[]}add(e){this.items.push(e)}delete(e){let r=Bi(e);return typeof r!="number"?!1:this.items.splice(r,1).length>0}get(e,r){let i=Bi(e);if(typeof i!="number")return;let n=this.items[i];return!r&&Vi.isScalar(n)?n.value:n}has(e){let r=Bi(e);return typeof r=="number"&&r<this.items.length}set(e,r){let i=Bi(e);if(typeof i!="number")throw new Error(`Expected a valid index, not ${e}.`);let n=this.items[i];Vi.isScalar(n)&&Zk.isScalarValue(r)?n.value=r:this.items[i]=r}toJSON(e,r){let i=[];r?.onCreate&&r.onCreate(i);let n=0;for(let o of this.items)i.push(qk.toJS(o,String(n++),r));return i}toString(e,r,i){return e?Mk.stringifyCollection(this,e,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(e.indent||"")+" ",onChompKeep:i,onComment:r}):JSON.stringify(this)}static from(e,r,i){let{replacer:n}=i,o=new this(e);if(r&&Symbol.iterator in Object(r)){let s=0;for(let a of r){if(typeof n=="function"){let c=r instanceof Set?a:String(s++);a=n.call(r,c,a)}o.items.push(Lk.createNode(a,void 0,i))}}return o}};function Bi(t){let e=Vi.isScalar(t)?t.value:t;return e&&typeof e=="string"&&(e=Number(e)),typeof e=="number"&&Number.isInteger(e)&&e>=0?e:null}Bg.YAMLSeq=ic});var sn=N(Gg=>{"use strict";var Bk=Z(),Vg=ht(),Vk={collection:"seq",default:!0,nodeClass:Vg.YAMLSeq,tag:"tag:yaml.org,2002:seq",resolve(t,e){return Bk.isSeq(t)||e("Expected a sequence for this tag"),t},createNode:(t,e,r)=>Vg.YAMLSeq.from(t,e,r)};Gg.seq=Vk});var gr=N(Kg=>{"use strict";var Gk=ur(),Kk={identify:t=>typeof t=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:t=>t,stringify(t,e,r,i){return e=Object.assign({actualString:!0},e),Gk.stringifyString(t,e,r,i)}};Kg.string=Kk});var Gi=N(Yg=>{"use strict";var Jg=ce(),Wg={identify:t=>t==null,createNode:()=>new Jg.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new Jg.Scalar(null),stringify:({source:t},e)=>typeof t=="string"&&Wg.test.test(t)?t:e.options.nullStr};Yg.nullTag=Wg});var oc=N(Xg=>{"use strict";var Jk=ce(),Hg={identify:t=>typeof t=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:t=>new Jk.Scalar(t[0]==="t"||t[0]==="T"),stringify({source:t,value:e},r){if(t&&Hg.test.test(t)){let i=t[0]==="t"||t[0]==="T";if(e===i)return t}return e?r.options.trueStr:r.options.falseStr}};Xg.boolTag=Hg});var an=N(Qg=>{"use strict";function Wk({format:t,minFractionDigits:e,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(!t&&e&&(!r||r==="tag:yaml.org,2002:float")&&/^\d/.test(o)){let s=o.indexOf(".");s<0&&(s=o.length,o+=".");let a=e-(o.length-s-1);for(;a-- >0;)o+="0"}return o}Qg.stringifyNumber=Wk});var ac=N(Ki=>{"use strict";var Yk=ce(),sc=an(),Hk={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:t=>t.slice(-3).toLowerCase()==="nan"?NaN:t[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:sc.stringifyNumber},Xk={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:t=>parseFloat(t),stringify(t){let e=Number(t.value);return isFinite(e)?e.toExponential():sc.stringifyNumber(t)}},Qk={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(t){let e=new Yk.Scalar(parseFloat(t)),r=t.indexOf(".");return r!==-1&&t[t.length-1]==="0"&&(e.minFractionDigits=t.length-r-1),e},stringify:sc.stringifyNumber};Ki.float=Qk;Ki.floatExp=Xk;Ki.floatNaN=Hk});var lc=N(Wi=>{"use strict";var eh=an(),Ji=t=>typeof t=="bigint"||Number.isInteger(t),cc=(t,e,r,{intAsBigInt:i})=>i?BigInt(t):parseInt(t.substring(e),r);function th(t,e,r){let{value:i}=t;return Ji(i)&&i>=0?r+i.toString(e):eh.stringifyNumber(t)}var eS={identify:t=>Ji(t)&&t>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(t,e,r)=>cc(t,2,8,r),stringify:t=>th(t,8,"0o")},tS={identify:Ji,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(t,e,r)=>cc(t,0,10,r),stringify:eh.stringifyNumber},nS={identify:t=>Ji(t)&&t>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(t,e,r)=>cc(t,2,16,r),stringify:t=>th(t,16,"0x")};Wi.int=tS;Wi.intHex=nS;Wi.intOct=eS});var rh=N(nh=>{"use strict";var rS=on(),iS=Gi(),oS=sn(),sS=gr(),aS=oc(),uc=ac(),dc=lc(),cS=[rS.map,oS.seq,sS.string,iS.nullTag,aS.boolTag,dc.intOct,dc.int,dc.intHex,uc.floatNaN,uc.floatExp,uc.float];nh.schema=cS});var sh=N(oh=>{"use strict";var lS=ce(),uS=on(),dS=sn();function ih(t){return typeof t=="bigint"||Number.isInteger(t)}var Yi=({value:t})=>JSON.stringify(t),pS=[{identify:t=>typeof t=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:t=>t,stringify:Yi},{identify:t=>t==null,createNode:()=>new lS.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:Yi},{identify:t=>typeof t=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:t=>t==="true",stringify:Yi},{identify:ih,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(t,e,{intAsBigInt:r})=>r?BigInt(t):parseInt(t,10),stringify:({value:t})=>ih(t)?t.toString():JSON.stringify(t)},{identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:t=>parseFloat(t),stringify:Yi}],fS={default:!0,tag:"",test:/^/,resolve(t,e){return e(`Unresolved plain scalar ${JSON.stringify(t)}`),t}},mS=[uS.map,dS.seq].concat(pS,fS);oh.schema=mS});var fc=N(ah=>{"use strict";var hr=He("buffer"),pc=ce(),gS=ur(),hS={identify:t=>t instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(t,e){if(typeof hr.Buffer=="function")return hr.Buffer.from(t,"base64");if(typeof atob=="function"){let r=atob(t.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 e("This environment does not support reading binary tags; either Buffer or atob is required"),t},stringify({comment:t,type:e,value:r},i,n,o){if(!r)return"";let s=r,a;if(typeof hr.Buffer=="function")a=s instanceof hr.Buffer?s.toString("base64"):hr.Buffer.from(s.buffer).toString("base64");else if(typeof btoa=="function"){let c="";for(let l=0;l<s.length;++l)c+=String.fromCharCode(s[l]);a=btoa(c)}else throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(e??(e=pc.Scalar.BLOCK_LITERAL),e!==pc.Scalar.QUOTE_DOUBLE){let c=Math.max(i.options.lineWidth-i.indent.length,i.options.minContentWidth),l=Math.ceil(a.length/c),u=new Array(l);for(let d=0,p=0;d<l;++d,p+=c)u[d]=a.substr(p,c);a=u.join(e===pc.Scalar.BLOCK_LITERAL?`
76
- `:" ")}return gS.stringifyString({comment:t,type:e,value:a},i,n,o)}};ah.binary=hS});var Qi=N(Xi=>{"use strict";var Hi=Z(),mc=ft(),yS=ce(),_S=ht();function ch(t,e){if(Hi.isSeq(t))for(let r=0;r<t.items.length;++r){let i=t.items[r];if(!Hi.isPair(i)){if(Hi.isMap(i)){i.items.length>1&&e("Each pair must have its own sequence indicator");let n=i.items[0]||new mc.Pair(new yS.Scalar(null));if(i.commentBefore&&(n.key.commentBefore=n.key.commentBefore?`${i.commentBefore}
75
+ ${n}${f}`}else return`${p}${s}${u.join(" ")}${s}${f}`}function Vi({indent:t,options:{commentString:e}},r,i,n){if(i&&n&&(i=i.replace(/^\n+/,"")),i){let o=Bi.indentComment(e(i),t);r.push(o.trimStart())}}Wg.stringifyCollection=Mk});var mt=N(lc=>{"use strict";var Fk=ac(),Bk=oc(),Vk=zi(),ft=Z(),Gi=pt(),Gk=ce();function hr(t,e){let r=ft.isScalar(e)?e.value:e;for(let i of t)if(ft.isPair(i)&&(i.key===e||i.key===r||ft.isScalar(i.key)&&i.key.value===r))return i}var cc=class extends Vk.Collection{static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(ft.MAP,e),this.items=[]}static from(e,r,i){let{keepUndefined:n,replacer:o}=i,s=new this(e),a=(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)&&s.items.push(Gi.createPair(c,l,i))};if(r instanceof Map)for(let[c,l]of r)a(c,l);else if(r&&typeof r=="object")for(let c of Object.keys(r))a(c,r[c]);return typeof e.sortMapEntries=="function"&&s.items.sort(e.sortMapEntries),s}add(e,r){let i;ft.isPair(e)?i=e:!e||typeof e!="object"||!("key"in e)?i=new Gi.Pair(e,e?.value):i=new Gi.Pair(e.key,e.value);let n=hr(this.items,i.key),o=this.schema?.sortMapEntries;if(n){if(!r)throw new Error(`Key ${i.key} already set`);ft.isScalar(n.value)&&Gk.isScalarValue(i.value)?n.value.value=i.value:n.value=i.value}else if(o){let s=this.items.findIndex(a=>o(i,a)<0);s===-1?this.items.push(i):this.items.splice(s,0,i)}else this.items.push(i)}delete(e){let r=hr(this.items,e);return r?this.items.splice(this.items.indexOf(r),1).length>0:!1}get(e,r){let n=hr(this.items,e)?.value;return(!r&&ft.isScalar(n)?n.value:n)??void 0}has(e){return!!hr(this.items,e)}set(e,r){this.add(new Gi.Pair(e,r),!0)}toJSON(e,r,i){let n=i?new i:r?.mapAsMap?new Map:{};r?.onCreate&&r.onCreate(n);for(let o of this.items)Bk.addPairToJSMap(r,n,o);return n}toString(e,r,i){if(!e)return JSON.stringify(this);for(let n of this.items)if(!ft.isPair(n))throw new Error(`Map items must all be pairs; found ${JSON.stringify(n)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),Fk.stringifyCollection(this,e,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:e.indent||"",onChompKeep:i,onComment:r})}};lc.YAMLMap=cc;lc.findPair=hr});var on=N(Hg=>{"use strict";var Jk=Z(),Yg=mt(),Kk={collection:"map",default:!0,nodeClass:Yg.YAMLMap,tag:"tag:yaml.org,2002:map",resolve(t,e){return Jk.isMap(t)||e("Expected a mapping for this tag"),t},createNode:(t,e,r)=>Yg.YAMLMap.from(t,e,r)};Hg.map=Kk});var gt=N(Xg=>{"use strict";var Wk=cr(),Yk=ac(),Hk=zi(),Ki=Z(),Xk=ce(),Qk=ct(),uc=class extends Hk.Collection{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(Ki.SEQ,e),this.items=[]}add(e){this.items.push(e)}delete(e){let r=Ji(e);return typeof r!="number"?!1:this.items.splice(r,1).length>0}get(e,r){let i=Ji(e);if(typeof i!="number")return;let n=this.items[i];return!r&&Ki.isScalar(n)?n.value:n}has(e){let r=Ji(e);return typeof r=="number"&&r<this.items.length}set(e,r){let i=Ji(e);if(typeof i!="number")throw new Error(`Expected a valid index, not ${e}.`);let n=this.items[i];Ki.isScalar(n)&&Xk.isScalarValue(r)?n.value=r:this.items[i]=r}toJSON(e,r){let i=[];r?.onCreate&&r.onCreate(i);let n=0;for(let o of this.items)i.push(Qk.toJS(o,String(n++),r));return i}toString(e,r,i){return e?Yk.stringifyCollection(this,e,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(e.indent||"")+" ",onChompKeep:i,onComment:r}):JSON.stringify(this)}static from(e,r,i){let{replacer:n}=i,o=new this(e);if(r&&Symbol.iterator in Object(r)){let s=0;for(let a of r){if(typeof n=="function"){let c=r instanceof Set?a:String(s++);a=n.call(r,c,a)}o.items.push(Wk.createNode(a,void 0,i))}}return o}};function Ji(t){let e=Ki.isScalar(t)?t.value:t;return e&&typeof e=="string"&&(e=Number(e)),typeof e=="number"&&Number.isInteger(e)&&e>=0?e:null}Xg.YAMLSeq=uc});var sn=N(eh=>{"use strict";var eS=Z(),Qg=gt(),tS={collection:"seq",default:!0,nodeClass:Qg.YAMLSeq,tag:"tag:yaml.org,2002:seq",resolve(t,e){return eS.isSeq(t)||e("Expected a sequence for this tag"),t},createNode:(t,e,r)=>Qg.YAMLSeq.from(t,e,r)};eh.seq=tS});var yr=N(th=>{"use strict";var nS=pr(),rS={identify:t=>typeof t=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:t=>t,stringify(t,e,r,i){return e=Object.assign({actualString:!0},e),nS.stringifyString(t,e,r,i)}};th.string=rS});var Wi=N(ih=>{"use strict";var nh=ce(),rh={identify:t=>t==null,createNode:()=>new nh.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new nh.Scalar(null),stringify:({source:t},e)=>typeof t=="string"&&rh.test.test(t)?t:e.options.nullStr};ih.nullTag=rh});var dc=N(sh=>{"use strict";var iS=ce(),oh={identify:t=>typeof t=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:t=>new iS.Scalar(t[0]==="t"||t[0]==="T"),stringify({source:t,value:e},r){if(t&&oh.test.test(t)){let i=t[0]==="t"||t[0]==="T";if(e===i)return t}return e?r.options.trueStr:r.options.falseStr}};sh.boolTag=oh});var an=N(ah=>{"use strict";function oS({format:t,minFractionDigits:e,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(!t&&e&&(!r||r==="tag:yaml.org,2002:float")&&/^\d/.test(o)){let s=o.indexOf(".");s<0&&(s=o.length,o+=".");let a=e-(o.length-s-1);for(;a-- >0;)o+="0"}return o}ah.stringifyNumber=oS});var fc=N(Yi=>{"use strict";var sS=ce(),pc=an(),aS={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:t=>t.slice(-3).toLowerCase()==="nan"?NaN:t[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:pc.stringifyNumber},cS={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:t=>parseFloat(t),stringify(t){let e=Number(t.value);return isFinite(e)?e.toExponential():pc.stringifyNumber(t)}},lS={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(t){let e=new sS.Scalar(parseFloat(t)),r=t.indexOf(".");return r!==-1&&t[t.length-1]==="0"&&(e.minFractionDigits=t.length-r-1),e},stringify:pc.stringifyNumber};Yi.float=lS;Yi.floatExp=cS;Yi.floatNaN=aS});var gc=N(Xi=>{"use strict";var ch=an(),Hi=t=>typeof t=="bigint"||Number.isInteger(t),mc=(t,e,r,{intAsBigInt:i})=>i?BigInt(t):parseInt(t.substring(e),r);function lh(t,e,r){let{value:i}=t;return Hi(i)&&i>=0?r+i.toString(e):ch.stringifyNumber(t)}var uS={identify:t=>Hi(t)&&t>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(t,e,r)=>mc(t,2,8,r),stringify:t=>lh(t,8,"0o")},dS={identify:Hi,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(t,e,r)=>mc(t,0,10,r),stringify:ch.stringifyNumber},pS={identify:t=>Hi(t)&&t>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(t,e,r)=>mc(t,2,16,r),stringify:t=>lh(t,16,"0x")};Xi.int=dS;Xi.intHex=pS;Xi.intOct=uS});var dh=N(uh=>{"use strict";var fS=on(),mS=Wi(),gS=sn(),hS=yr(),yS=dc(),hc=fc(),yc=gc(),_S=[fS.map,gS.seq,hS.string,mS.nullTag,yS.boolTag,yc.intOct,yc.int,yc.intHex,hc.floatNaN,hc.floatExp,hc.float];uh.schema=_S});var mh=N(fh=>{"use strict";var vS=ce(),bS=on(),wS=sn();function ph(t){return typeof t=="bigint"||Number.isInteger(t)}var Qi=({value:t})=>JSON.stringify(t),$S=[{identify:t=>typeof t=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:t=>t,stringify:Qi},{identify:t=>t==null,createNode:()=>new vS.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:Qi},{identify:t=>typeof t=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:t=>t==="true",stringify:Qi},{identify:ph,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(t,e,{intAsBigInt:r})=>r?BigInt(t):parseInt(t,10),stringify:({value:t})=>ph(t)?t.toString():JSON.stringify(t)},{identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:t=>parseFloat(t),stringify:Qi}],kS={default:!0,tag:"",test:/^/,resolve(t,e){return e(`Unresolved plain scalar ${JSON.stringify(t)}`),t}},SS=[bS.map,wS.seq].concat($S,kS);fh.schema=SS});var vc=N(gh=>{"use strict";var _r=He("buffer"),_c=ce(),xS=pr(),IS={identify:t=>t instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(t,e){if(typeof _r.Buffer=="function")return _r.Buffer.from(t,"base64");if(typeof atob=="function"){let r=atob(t.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 e("This environment does not support reading binary tags; either Buffer or atob is required"),t},stringify({comment:t,type:e,value:r},i,n,o){if(!r)return"";let s=r,a;if(typeof _r.Buffer=="function")a=s instanceof _r.Buffer?s.toString("base64"):_r.Buffer.from(s.buffer).toString("base64");else if(typeof btoa=="function"){let c="";for(let l=0;l<s.length;++l)c+=String.fromCharCode(s[l]);a=btoa(c)}else throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(e??(e=_c.Scalar.BLOCK_LITERAL),e!==_c.Scalar.QUOTE_DOUBLE){let c=Math.max(i.options.lineWidth-i.indent.length,i.options.minContentWidth),l=Math.ceil(a.length/c),d=new Array(l);for(let u=0,p=0;u<l;++u,p+=c)d[u]=a.substr(p,c);a=d.join(e===_c.Scalar.BLOCK_LITERAL?`
76
+ `:" ")}return xS.stringifyString({comment:t,type:e,value:a},i,n,o)}};gh.binary=IS});var no=N(to=>{"use strict";var eo=Z(),bc=pt(),OS=ce(),PS=gt();function hh(t,e){if(eo.isSeq(t))for(let r=0;r<t.items.length;++r){let i=t.items[r];if(!eo.isPair(i)){if(eo.isMap(i)){i.items.length>1&&e("Each pair must have its own sequence indicator");let n=i.items[0]||new bc.Pair(new OS.Scalar(null));if(i.commentBefore&&(n.key.commentBefore=n.key.commentBefore?`${i.commentBefore}
77
77
  ${n.key.commentBefore}`:i.commentBefore),i.comment){let o=n.value??n.key;o.comment=o.comment?`${i.comment}
78
- ${o.comment}`:i.comment}i=n}t.items[r]=Hi.isPair(i)?i:new mc.Pair(i)}}else e("Expected a sequence for this tag");return t}function lh(t,e,r){let{replacer:i}=r,n=new _S.YAMLSeq(t);n.tag="tag:yaml.org,2002:pairs";let o=0;if(e&&Symbol.iterator in Object(e))for(let s of e){typeof i=="function"&&(s=i.call(e,String(o++),s));let a,c;if(Array.isArray(s))if(s.length===2)a=s[0],c=s[1];else throw new TypeError(`Expected [key, value] tuple: ${s}`);else if(s&&s instanceof Object){let l=Object.keys(s);if(l.length===1)a=l[0],c=s[a];else throw new TypeError(`Expected tuple with one key, not ${l.length} keys`)}else a=s;n.items.push(mc.createPair(a,c,r))}return n}var vS={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:ch,createNode:lh};Xi.createPairs=lh;Xi.pairs=vS;Xi.resolvePairs=ch});var yc=N(hc=>{"use strict";var uh=Z(),gc=lt(),yr=gt(),bS=ht(),dh=Qi(),jt=class t extends bS.YAMLSeq{constructor(){super(),this.add=yr.YAMLMap.prototype.add.bind(this),this.delete=yr.YAMLMap.prototype.delete.bind(this),this.get=yr.YAMLMap.prototype.get.bind(this),this.has=yr.YAMLMap.prototype.has.bind(this),this.set=yr.YAMLMap.prototype.set.bind(this),this.tag=t.tag}toJSON(e,r){if(!r)return super.toJSON(e);let i=new Map;r?.onCreate&&r.onCreate(i);for(let n of this.items){let o,s;if(uh.isPair(n)?(o=gc.toJS(n.key,"",r),s=gc.toJS(n.value,o,r)):o=gc.toJS(n,"",r),i.has(o))throw new Error("Ordered maps must not include duplicate keys");i.set(o,s)}return i}static from(e,r,i){let n=dh.createPairs(e,r,i),o=new this;return o.items=n.items,o}};jt.tag="tag:yaml.org,2002:omap";var wS={collection:"seq",identify:t=>t instanceof Map,nodeClass:jt,default:!1,tag:"tag:yaml.org,2002:omap",resolve(t,e){let r=dh.resolvePairs(t,e),i=[];for(let{key:n}of r.items)uh.isScalar(n)&&(i.includes(n.value)?e(`Ordered maps must not include duplicate keys: ${n.value}`):i.push(n.value));return Object.assign(new jt,r)},createNode:(t,e,r)=>jt.from(t,e,r)};hc.YAMLOMap=jt;hc.omap=wS});var hh=N(_c=>{"use strict";var ph=ce();function fh({value:t,source:e},r){return e&&(t?mh:gh).test.test(e)?e:t?r.options.trueStr:r.options.falseStr}var mh={identify:t=>t===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new ph.Scalar(!0),stringify:fh},gh={identify:t=>t===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new ph.Scalar(!1),stringify:fh};_c.falseTag=gh;_c.trueTag=mh});var yh=N(eo=>{"use strict";var $S=ce(),vc=an(),kS={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:t=>t.slice(-3).toLowerCase()==="nan"?NaN:t[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:vc.stringifyNumber},SS={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:t=>parseFloat(t.replace(/_/g,"")),stringify(t){let e=Number(t.value);return isFinite(e)?e.toExponential():vc.stringifyNumber(t)}},xS={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(t){let e=new $S.Scalar(parseFloat(t.replace(/_/g,""))),r=t.indexOf(".");if(r!==-1){let i=t.substring(r+1).replace(/_/g,"");i[i.length-1]==="0"&&(e.minFractionDigits=i.length)}return e},stringify:vc.stringifyNumber};eo.float=xS;eo.floatExp=SS;eo.floatNaN=kS});var vh=N(vr=>{"use strict";var _h=an(),_r=t=>typeof t=="bigint"||Number.isInteger(t);function to(t,e,r,{intAsBigInt:i}){let n=t[0];if((n==="-"||n==="+")&&(e+=1),t=t.substring(e).replace(/_/g,""),i){switch(r){case 2:t=`0b${t}`;break;case 8:t=`0o${t}`;break;case 16:t=`0x${t}`;break}let s=BigInt(t);return n==="-"?BigInt(-1)*s:s}let o=parseInt(t,r);return n==="-"?-1*o:o}function bc(t,e,r){let{value:i}=t;if(_r(i)){let n=i.toString(e);return i<0?"-"+r+n.substr(1):r+n}return _h.stringifyNumber(t)}var IS={identify:_r,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(t,e,r)=>to(t,2,2,r),stringify:t=>bc(t,2,"0b")},OS={identify:_r,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(t,e,r)=>to(t,1,8,r),stringify:t=>bc(t,8,"0")},PS={identify:_r,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(t,e,r)=>to(t,0,10,r),stringify:_h.stringifyNumber},TS={identify:_r,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(t,e,r)=>to(t,2,16,r),stringify:t=>bc(t,16,"0x")};vr.int=PS;vr.intBin=IS;vr.intHex=TS;vr.intOct=OS});var $c=N(wc=>{"use strict";var io=Z(),no=ft(),ro=gt(),Rt=class t extends ro.YAMLMap{constructor(e){super(e),this.tag=t.tag}add(e){let r;io.isPair(e)?r=e:e&&typeof e=="object"&&"key"in e&&"value"in e&&e.value===null?r=new no.Pair(e.key,null):r=new no.Pair(e,null),ro.findPair(this.items,r.key)||this.items.push(r)}get(e,r){let i=ro.findPair(this.items,e);return!r&&io.isPair(i)?io.isScalar(i.key)?i.key.value:i.key:i}set(e,r){if(typeof r!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof r}`);let i=ro.findPair(this.items,e);i&&!r?this.items.splice(this.items.indexOf(i),1):!i&&r&&this.items.push(new no.Pair(e))}toJSON(e,r){return super.toJSON(e,r,Set)}toString(e,r,i){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),r,i);throw new Error("Set items must all have null values")}static from(e,r,i){let{replacer:n}=i,o=new this(e);if(r&&Symbol.iterator in Object(r))for(let s of r)typeof n=="function"&&(s=n.call(r,s,s)),o.items.push(no.createPair(s,null,i));return o}};Rt.tag="tag:yaml.org,2002:set";var AS={collection:"map",identify:t=>t instanceof Set,nodeClass:Rt,default:!1,tag:"tag:yaml.org,2002:set",createNode:(t,e,r)=>Rt.from(t,e,r),resolve(t,e){if(io.isMap(t)){if(t.hasAllNullValues(!0))return Object.assign(new Rt,t);e("Set items must all have null values")}else e("Expected a mapping for this tag");return t}};wc.YAMLSet=Rt;wc.set=AS});var Sc=N(oo=>{"use strict";var ES=an();function kc(t,e){let r=t[0],i=r==="-"||r==="+"?t.substring(1):t,n=s=>e?BigInt(s):Number(s),o=i.replace(/_/g,"").split(":").reduce((s,a)=>s*n(60)+n(a),n(0));return r==="-"?n(-1)*o:o}function bh(t){let{value:e}=t,r=s=>s;if(typeof e=="bigint")r=s=>BigInt(s);else if(isNaN(e)||!isFinite(e))return ES.stringifyNumber(t);let i="";e<0&&(i="-",e*=r(-1));let n=r(60),o=[e%n];return e<60?o.unshift(0):(e=(e-o[0])/n,o.unshift(e%n),e>=60&&(e=(e-o[0])/n,o.unshift(e))),i+o.map(s=>String(s).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}var zS={identify:t=>typeof t=="bigint"||Number.isInteger(t),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(t,e,{intAsBigInt:r})=>kc(t,r),stringify:bh},NS={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:t=>kc(t,!1),stringify:bh},wh={identify:t=>t 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(t){let e=t.match(wh.test);if(!e)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");let[,r,i,n,o,s,a]=e.map(Number),c=e[7]?Number((e[7]+"00").substr(1,3)):0,l=Date.UTC(r,i-1,n,o||0,s||0,a||0,c),u=e[8];if(u&&u!=="Z"){let d=kc(u,!1);Math.abs(d)<30&&(d*=60),l-=6e4*d}return new Date(l)},stringify:({value:t})=>t?.toISOString().replace(/(T00:00:00)?\.000Z$/,"")??""};oo.floatTime=NS;oo.intTime=zS;oo.timestamp=wh});var Sh=N(kh=>{"use strict";var CS=on(),DS=Gi(),jS=sn(),RS=gr(),US=fc(),$h=hh(),xc=yh(),so=vh(),LS=Ui(),MS=yc(),FS=Qi(),ZS=$c(),Ic=Sc(),qS=[CS.map,jS.seq,RS.string,DS.nullTag,$h.trueTag,$h.falseTag,so.intBin,so.intOct,so.int,so.intHex,xc.floatNaN,xc.floatExp,xc.float,US.binary,LS.merge,MS.omap,FS.pairs,ZS.set,Ic.intTime,Ic.floatTime,Ic.timestamp];kh.schema=qS});var Ch=N(Tc=>{"use strict";var Ph=on(),BS=Gi(),Th=sn(),VS=gr(),GS=oc(),Oc=ac(),Pc=lc(),KS=rh(),JS=sh(),Ah=fc(),br=Ui(),Eh=yc(),zh=Qi(),xh=Sh(),Nh=$c(),ao=Sc(),Ih=new Map([["core",KS.schema],["failsafe",[Ph.map,Th.seq,VS.string]],["json",JS.schema],["yaml11",xh.schema],["yaml-1.1",xh.schema]]),Oh={binary:Ah.binary,bool:GS.boolTag,float:Oc.float,floatExp:Oc.floatExp,floatNaN:Oc.floatNaN,floatTime:ao.floatTime,int:Pc.int,intHex:Pc.intHex,intOct:Pc.intOct,intTime:ao.intTime,map:Ph.map,merge:br.merge,null:BS.nullTag,omap:Eh.omap,pairs:zh.pairs,seq:Th.seq,set:Nh.set,timestamp:ao.timestamp},WS={"tag:yaml.org,2002:binary":Ah.binary,"tag:yaml.org,2002:merge":br.merge,"tag:yaml.org,2002:omap":Eh.omap,"tag:yaml.org,2002:pairs":zh.pairs,"tag:yaml.org,2002:set":Nh.set,"tag:yaml.org,2002:timestamp":ao.timestamp};function YS(t,e,r){let i=Ih.get(e);if(i&&!t)return r&&!i.includes(br.merge)?i.concat(br.merge):i.slice();let n=i;if(!n)if(Array.isArray(t))n=[];else{let o=Array.from(Ih.keys()).filter(s=>s!=="yaml11").map(s=>JSON.stringify(s)).join(", ");throw new Error(`Unknown schema "${e}"; use one of ${o} or define customTags array`)}if(Array.isArray(t))for(let o of t)n=n.concat(o);else typeof t=="function"&&(n=t(n.slice()));return r&&(n=n.concat(br.merge)),n.reduce((o,s)=>{let a=typeof s=="string"?Oh[s]:s;if(!a){let c=JSON.stringify(s),l=Object.keys(Oh).map(u=>JSON.stringify(u)).join(", ");throw new Error(`Unknown custom tag ${c}; use one of ${l}`)}return o.includes(a)||o.push(a),o},[])}Tc.coreKnownTags=WS;Tc.getTags=YS});var zc=N(Dh=>{"use strict";var Ac=Z(),HS=on(),XS=sn(),QS=gr(),co=Ch(),ex=(t,e)=>t.key<e.key?-1:t.key>e.key?1:0,Ec=class t{constructor({compat:e,customTags:r,merge:i,resolveKnownTags:n,schema:o,sortMapEntries:s,toStringDefaults:a}){this.compat=Array.isArray(e)?co.getTags(e,"compat"):e?co.getTags(null,e):null,this.name=typeof o=="string"&&o||"core",this.knownTags=n?co.coreKnownTags:{},this.tags=co.getTags(r,this.name,i),this.toStringOptions=a??null,Object.defineProperty(this,Ac.MAP,{value:HS.map}),Object.defineProperty(this,Ac.SCALAR,{value:QS.string}),Object.defineProperty(this,Ac.SEQ,{value:XS.seq}),this.sortMapEntries=typeof s=="function"?s:s===!0?ex:null}clone(){let e=Object.create(t.prototype,Object.getOwnPropertyDescriptors(this));return e.tags=this.tags.slice(),e}};Dh.Schema=Ec});var Rh=N(jh=>{"use strict";var tx=Z(),Nc=dr(),wr=ar();function nx(t,e){let r=[],i=e.directives===!0;if(e.directives!==!1&&t.directives){let c=t.directives.toString(t);c?(r.push(c),i=!0):t.directives.docStart&&(i=!0)}i&&r.push("---");let n=Nc.createStringifyContext(t,e),{commentString:o}=n.options;if(t.commentBefore){r.length!==1&&r.unshift("");let c=o(t.commentBefore);r.unshift(wr.indentComment(c,""))}let s=!1,a=null;if(t.contents){if(tx.isNode(t.contents)){if(t.contents.spaceBefore&&i&&r.push(""),t.contents.commentBefore){let u=o(t.contents.commentBefore);r.push(wr.indentComment(u,""))}n.forceBlockIndent=!!t.comment,a=t.contents.comment}let c=a?void 0:()=>s=!0,l=Nc.stringify(t.contents,n,()=>a=null,c);a&&(l+=wr.lineComment(l,"",o(a))),(l[0]==="|"||l[0]===">")&&r[r.length-1]==="---"?r[r.length-1]=`--- ${l}`:r.push(l)}else r.push(Nc.stringify(t.contents,n));if(t.directives?.docEnd)if(t.comment){let c=o(t.comment);c.includes(`
79
- `)?(r.push("..."),r.push(wr.indentComment(c,""))):r.push(`... ${c}`)}else r.push("...");else{let c=t.comment;c&&s&&(c=c.replace(/^\n+/,"")),c&&((!s||a)&&r[r.length-1]!==""&&r.push(""),r.push(wr.indentComment(o(c),"")))}return r.join(`
78
+ ${o.comment}`:i.comment}i=n}t.items[r]=eo.isPair(i)?i:new bc.Pair(i)}}else e("Expected a sequence for this tag");return t}function yh(t,e,r){let{replacer:i}=r,n=new PS.YAMLSeq(t);n.tag="tag:yaml.org,2002:pairs";let o=0;if(e&&Symbol.iterator in Object(e))for(let s of e){typeof i=="function"&&(s=i.call(e,String(o++),s));let a,c;if(Array.isArray(s))if(s.length===2)a=s[0],c=s[1];else throw new TypeError(`Expected [key, value] tuple: ${s}`);else if(s&&s instanceof Object){let l=Object.keys(s);if(l.length===1)a=l[0],c=s[a];else throw new TypeError(`Expected tuple with one key, not ${l.length} keys`)}else a=s;n.items.push(bc.createPair(a,c,r))}return n}var TS={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:hh,createNode:yh};to.createPairs=yh;to.pairs=TS;to.resolvePairs=hh});var kc=N($c=>{"use strict";var _h=Z(),wc=ct(),vr=mt(),AS=gt(),vh=no(),Rt=class t extends AS.YAMLSeq{constructor(){super(),this.add=vr.YAMLMap.prototype.add.bind(this),this.delete=vr.YAMLMap.prototype.delete.bind(this),this.get=vr.YAMLMap.prototype.get.bind(this),this.has=vr.YAMLMap.prototype.has.bind(this),this.set=vr.YAMLMap.prototype.set.bind(this),this.tag=t.tag}toJSON(e,r){if(!r)return super.toJSON(e);let i=new Map;r?.onCreate&&r.onCreate(i);for(let n of this.items){let o,s;if(_h.isPair(n)?(o=wc.toJS(n.key,"",r),s=wc.toJS(n.value,o,r)):o=wc.toJS(n,"",r),i.has(o))throw new Error("Ordered maps must not include duplicate keys");i.set(o,s)}return i}static from(e,r,i){let n=vh.createPairs(e,r,i),o=new this;return o.items=n.items,o}};Rt.tag="tag:yaml.org,2002:omap";var ES={collection:"seq",identify:t=>t instanceof Map,nodeClass:Rt,default:!1,tag:"tag:yaml.org,2002:omap",resolve(t,e){let r=vh.resolvePairs(t,e),i=[];for(let{key:n}of r.items)_h.isScalar(n)&&(i.includes(n.value)?e(`Ordered maps must not include duplicate keys: ${n.value}`):i.push(n.value));return Object.assign(new Rt,r)},createNode:(t,e,r)=>Rt.from(t,e,r)};$c.YAMLOMap=Rt;$c.omap=ES});var Sh=N(Sc=>{"use strict";var bh=ce();function wh({value:t,source:e},r){return e&&(t?$h:kh).test.test(e)?e:t?r.options.trueStr:r.options.falseStr}var $h={identify:t=>t===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new bh.Scalar(!0),stringify:wh},kh={identify:t=>t===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new bh.Scalar(!1),stringify:wh};Sc.falseTag=kh;Sc.trueTag=$h});var xh=N(ro=>{"use strict";var zS=ce(),xc=an(),NS={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:t=>t.slice(-3).toLowerCase()==="nan"?NaN:t[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:xc.stringifyNumber},CS={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:t=>parseFloat(t.replace(/_/g,"")),stringify(t){let e=Number(t.value);return isFinite(e)?e.toExponential():xc.stringifyNumber(t)}},DS={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(t){let e=new zS.Scalar(parseFloat(t.replace(/_/g,""))),r=t.indexOf(".");if(r!==-1){let i=t.substring(r+1).replace(/_/g,"");i[i.length-1]==="0"&&(e.minFractionDigits=i.length)}return e},stringify:xc.stringifyNumber};ro.float=DS;ro.floatExp=CS;ro.floatNaN=NS});var Oh=N(wr=>{"use strict";var Ih=an(),br=t=>typeof t=="bigint"||Number.isInteger(t);function io(t,e,r,{intAsBigInt:i}){let n=t[0];if((n==="-"||n==="+")&&(e+=1),t=t.substring(e).replace(/_/g,""),i){switch(r){case 2:t=`0b${t}`;break;case 8:t=`0o${t}`;break;case 16:t=`0x${t}`;break}let s=BigInt(t);return n==="-"?BigInt(-1)*s:s}let o=parseInt(t,r);return n==="-"?-1*o:o}function Ic(t,e,r){let{value:i}=t;if(br(i)){let n=i.toString(e);return i<0?"-"+r+n.substr(1):r+n}return Ih.stringifyNumber(t)}var jS={identify:br,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(t,e,r)=>io(t,2,2,r),stringify:t=>Ic(t,2,"0b")},RS={identify:br,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(t,e,r)=>io(t,1,8,r),stringify:t=>Ic(t,8,"0")},US={identify:br,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(t,e,r)=>io(t,0,10,r),stringify:Ih.stringifyNumber},LS={identify:br,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(t,e,r)=>io(t,2,16,r),stringify:t=>Ic(t,16,"0x")};wr.int=US;wr.intBin=jS;wr.intHex=LS;wr.intOct=RS});var Pc=N(Oc=>{"use strict";var ao=Z(),oo=pt(),so=mt(),Ut=class t extends so.YAMLMap{constructor(e){super(e),this.tag=t.tag}add(e){let r;ao.isPair(e)?r=e:e&&typeof e=="object"&&"key"in e&&"value"in e&&e.value===null?r=new oo.Pair(e.key,null):r=new oo.Pair(e,null),so.findPair(this.items,r.key)||this.items.push(r)}get(e,r){let i=so.findPair(this.items,e);return!r&&ao.isPair(i)?ao.isScalar(i.key)?i.key.value:i.key:i}set(e,r){if(typeof r!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof r}`);let i=so.findPair(this.items,e);i&&!r?this.items.splice(this.items.indexOf(i),1):!i&&r&&this.items.push(new oo.Pair(e))}toJSON(e,r){return super.toJSON(e,r,Set)}toString(e,r,i){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),r,i);throw new Error("Set items must all have null values")}static from(e,r,i){let{replacer:n}=i,o=new this(e);if(r&&Symbol.iterator in Object(r))for(let s of r)typeof n=="function"&&(s=n.call(r,s,s)),o.items.push(oo.createPair(s,null,i));return o}};Ut.tag="tag:yaml.org,2002:set";var MS={collection:"map",identify:t=>t instanceof Set,nodeClass:Ut,default:!1,tag:"tag:yaml.org,2002:set",createNode:(t,e,r)=>Ut.from(t,e,r),resolve(t,e){if(ao.isMap(t)){if(t.hasAllNullValues(!0))return Object.assign(new Ut,t);e("Set items must all have null values")}else e("Expected a mapping for this tag");return t}};Oc.YAMLSet=Ut;Oc.set=MS});var Ac=N(co=>{"use strict";var qS=an();function Tc(t,e){let r=t[0],i=r==="-"||r==="+"?t.substring(1):t,n=s=>e?BigInt(s):Number(s),o=i.replace(/_/g,"").split(":").reduce((s,a)=>s*n(60)+n(a),n(0));return r==="-"?n(-1)*o:o}function Ph(t){let{value:e}=t,r=s=>s;if(typeof e=="bigint")r=s=>BigInt(s);else if(isNaN(e)||!isFinite(e))return qS.stringifyNumber(t);let i="";e<0&&(i="-",e*=r(-1));let n=r(60),o=[e%n];return e<60?o.unshift(0):(e=(e-o[0])/n,o.unshift(e%n),e>=60&&(e=(e-o[0])/n,o.unshift(e))),i+o.map(s=>String(s).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}var ZS={identify:t=>typeof t=="bigint"||Number.isInteger(t),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(t,e,{intAsBigInt:r})=>Tc(t,r),stringify:Ph},FS={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:t=>Tc(t,!1),stringify:Ph},Th={identify:t=>t 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(t){let e=t.match(Th.test);if(!e)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");let[,r,i,n,o,s,a]=e.map(Number),c=e[7]?Number((e[7]+"00").substr(1,3)):0,l=Date.UTC(r,i-1,n,o||0,s||0,a||0,c),d=e[8];if(d&&d!=="Z"){let u=Tc(d,!1);Math.abs(u)<30&&(u*=60),l-=6e4*u}return new Date(l)},stringify:({value:t})=>t?.toISOString().replace(/(T00:00:00)?\.000Z$/,"")??""};co.floatTime=FS;co.intTime=ZS;co.timestamp=Th});var zh=N(Eh=>{"use strict";var BS=on(),VS=Wi(),GS=sn(),JS=yr(),KS=vc(),Ah=Sh(),Ec=xh(),lo=Oh(),WS=qi(),YS=kc(),HS=no(),XS=Pc(),zc=Ac(),QS=[BS.map,GS.seq,JS.string,VS.nullTag,Ah.trueTag,Ah.falseTag,lo.intBin,lo.intOct,lo.int,lo.intHex,Ec.floatNaN,Ec.floatExp,Ec.float,KS.binary,WS.merge,YS.omap,HS.pairs,XS.set,zc.intTime,zc.floatTime,zc.timestamp];Eh.schema=QS});var Zh=N(Dc=>{"use strict";var jh=on(),ex=Wi(),Rh=sn(),tx=yr(),nx=dc(),Nc=fc(),Cc=gc(),rx=dh(),ix=mh(),Uh=vc(),$r=qi(),Lh=kc(),Mh=no(),Nh=zh(),qh=Pc(),uo=Ac(),Ch=new Map([["core",rx.schema],["failsafe",[jh.map,Rh.seq,tx.string]],["json",ix.schema],["yaml11",Nh.schema],["yaml-1.1",Nh.schema]]),Dh={binary:Uh.binary,bool:nx.boolTag,float:Nc.float,floatExp:Nc.floatExp,floatNaN:Nc.floatNaN,floatTime:uo.floatTime,int:Cc.int,intHex:Cc.intHex,intOct:Cc.intOct,intTime:uo.intTime,map:jh.map,merge:$r.merge,null:ex.nullTag,omap:Lh.omap,pairs:Mh.pairs,seq:Rh.seq,set:qh.set,timestamp:uo.timestamp},ox={"tag:yaml.org,2002:binary":Uh.binary,"tag:yaml.org,2002:merge":$r.merge,"tag:yaml.org,2002:omap":Lh.omap,"tag:yaml.org,2002:pairs":Mh.pairs,"tag:yaml.org,2002:set":qh.set,"tag:yaml.org,2002:timestamp":uo.timestamp};function sx(t,e,r){let i=Ch.get(e);if(i&&!t)return r&&!i.includes($r.merge)?i.concat($r.merge):i.slice();let n=i;if(!n)if(Array.isArray(t))n=[];else{let o=Array.from(Ch.keys()).filter(s=>s!=="yaml11").map(s=>JSON.stringify(s)).join(", ");throw new Error(`Unknown schema "${e}"; use one of ${o} or define customTags array`)}if(Array.isArray(t))for(let o of t)n=n.concat(o);else typeof t=="function"&&(n=t(n.slice()));return r&&(n=n.concat($r.merge)),n.reduce((o,s)=>{let a=typeof s=="string"?Dh[s]:s;if(!a){let c=JSON.stringify(s),l=Object.keys(Dh).map(d=>JSON.stringify(d)).join(", ");throw new Error(`Unknown custom tag ${c}; use one of ${l}`)}return o.includes(a)||o.push(a),o},[])}Dc.coreKnownTags=ox;Dc.getTags=sx});var Uc=N(Fh=>{"use strict";var jc=Z(),ax=on(),cx=sn(),lx=yr(),po=Zh(),ux=(t,e)=>t.key<e.key?-1:t.key>e.key?1:0,Rc=class t{constructor({compat:e,customTags:r,merge:i,resolveKnownTags:n,schema:o,sortMapEntries:s,toStringDefaults:a}){this.compat=Array.isArray(e)?po.getTags(e,"compat"):e?po.getTags(null,e):null,this.name=typeof o=="string"&&o||"core",this.knownTags=n?po.coreKnownTags:{},this.tags=po.getTags(r,this.name,i),this.toStringOptions=a??null,Object.defineProperty(this,jc.MAP,{value:ax.map}),Object.defineProperty(this,jc.SCALAR,{value:lx.string}),Object.defineProperty(this,jc.SEQ,{value:cx.seq}),this.sortMapEntries=typeof s=="function"?s:s===!0?ux:null}clone(){let e=Object.create(t.prototype,Object.getOwnPropertyDescriptors(this));return e.tags=this.tags.slice(),e}};Fh.Schema=Rc});var Vh=N(Bh=>{"use strict";var dx=Z(),Lc=fr(),kr=lr();function px(t,e){let r=[],i=e.directives===!0;if(e.directives!==!1&&t.directives){let c=t.directives.toString(t);c?(r.push(c),i=!0):t.directives.docStart&&(i=!0)}i&&r.push("---");let n=Lc.createStringifyContext(t,e),{commentString:o}=n.options;if(t.commentBefore){r.length!==1&&r.unshift("");let c=o(t.commentBefore);r.unshift(kr.indentComment(c,""))}let s=!1,a=null;if(t.contents){if(dx.isNode(t.contents)){if(t.contents.spaceBefore&&i&&r.push(""),t.contents.commentBefore){let d=o(t.contents.commentBefore);r.push(kr.indentComment(d,""))}n.forceBlockIndent=!!t.comment,a=t.contents.comment}let c=a?void 0:()=>s=!0,l=Lc.stringify(t.contents,n,()=>a=null,c);a&&(l+=kr.lineComment(l,"",o(a))),(l[0]==="|"||l[0]===">")&&r[r.length-1]==="---"?r[r.length-1]=`--- ${l}`:r.push(l)}else r.push(Lc.stringify(t.contents,n));if(t.directives?.docEnd)if(t.comment){let c=o(t.comment);c.includes(`
79
+ `)?(r.push("..."),r.push(kr.indentComment(c,""))):r.push(`... ${c}`)}else r.push("...");else{let c=t.comment;c&&s&&(c=c.replace(/^\n+/,"")),c&&((!s||a)&&r[r.length-1]!==""&&r.push(""),r.push(kr.indentComment(o(c),"")))}return r.join(`
80
80
  `)+`
81
- `}jh.stringifyDocument=nx});var $r=N(Uh=>{"use strict";var rx=or(),cn=Ti(),Ae=Z(),ix=ft(),ox=lt(),sx=zc(),ax=Rh(),Cc=xi(),cx=Ua(),lx=sr(),Dc=Ra(),jc=class t{constructor(e,r,i){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,Ae.NODE_TYPE,{value:Ae.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:s}=o;i?._directives?(this.directives=i._directives.atDocument(),this.directives.yaml.explicit&&(s=this.directives.yaml.version)):this.directives=new Dc.Directives({version:s}),this.setSchema(s,i),this.contents=e===void 0?null:this.createNode(e,n,i)}clone(){let e=Object.create(t.prototype,{[Ae.NODE_TYPE]:{value:Ae.DOC}});return e.commentBefore=this.commentBefore,e.comment=this.comment,e.errors=this.errors.slice(),e.warnings=this.warnings.slice(),e.options=Object.assign({},this.options),this.directives&&(e.directives=this.directives.clone()),e.schema=this.schema.clone(),e.contents=Ae.isNode(this.contents)?this.contents.clone(e.schema):this.contents,this.range&&(e.range=this.range.slice()),e}add(e){ln(this.contents)&&this.contents.add(e)}addIn(e,r){ln(this.contents)&&this.contents.addIn(e,r)}createAlias(e,r){if(!e.anchor){let i=Cc.anchorNames(this);e.anchor=!r||i.has(r)?Cc.findNewAnchor(r||"a",i):r}return new rx.Alias(e.anchor)}createNode(e,r,i){let n;if(typeof r=="function")e=r.call({"":e},"",e),n=r;else if(Array.isArray(r)){let y=z=>typeof z=="number"||z instanceof String||z instanceof Number,k=r.filter(y).map(String);k.length>0&&(r=r.concat(k)),n=r}else i===void 0&&r&&(i=r,r=void 0);let{aliasDuplicateObjects:o,anchorPrefix:s,flow:a,keepUndefined:c,onTagObj:l,tag:u}=i??{},{onAnchor:d,setAnchors:p,sourceObjects:f}=Cc.createNodeAnchors(this,s||"a"),m={aliasDuplicateObjects:o??!0,keepUndefined:c??!1,onAnchor:d,onTagObj:l,replacer:n,schema:this.schema,sourceObjects:f},g=lx.createNode(e,u,m);return a&&Ae.isCollection(g)&&(g.flow=!0),p(),g}createPair(e,r,i={}){let n=this.createNode(e,null,i),o=this.createNode(r,null,i);return new ix.Pair(n,o)}delete(e){return ln(this.contents)?this.contents.delete(e):!1}deleteIn(e){return cn.isEmptyPath(e)?this.contents==null?!1:(this.contents=null,!0):ln(this.contents)?this.contents.deleteIn(e):!1}get(e,r){return Ae.isCollection(this.contents)?this.contents.get(e,r):void 0}getIn(e,r){return cn.isEmptyPath(e)?!r&&Ae.isScalar(this.contents)?this.contents.value:this.contents:Ae.isCollection(this.contents)?this.contents.getIn(e,r):void 0}has(e){return Ae.isCollection(this.contents)?this.contents.has(e):!1}hasIn(e){return cn.isEmptyPath(e)?this.contents!==void 0:Ae.isCollection(this.contents)?this.contents.hasIn(e):!1}set(e,r){this.contents==null?this.contents=cn.collectionFromPath(this.schema,[e],r):ln(this.contents)&&this.contents.set(e,r)}setIn(e,r){cn.isEmptyPath(e)?this.contents=r:this.contents==null?this.contents=cn.collectionFromPath(this.schema,Array.from(e),r):ln(this.contents)&&this.contents.setIn(e,r)}setSchema(e,r={}){typeof e=="number"&&(e=String(e));let i;switch(e){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new Dc.Directives({version:"1.1"}),i={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=e:this.directives=new Dc.Directives({version:e}),i={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,i=null;break;default:{let n=JSON.stringify(e);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 sx.Schema(Object.assign(i,r));else throw new Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:e,jsonArg:r,mapAsMap:i,maxAliasCount:n,onAnchor:o,reviver:s}={}){let a={anchors:new Map,doc:this,keep:!e,mapAsMap:i===!0,mapKeyWarned:!1,maxAliasCount:typeof n=="number"?n:100},c=ox.toJS(this.contents,r??"",a);if(typeof o=="function")for(let{count:l,res:u}of a.anchors.values())o(u,l);return typeof s=="function"?cx.applyReviver(s,{"":c},"",c):c}toJSON(e,r){return this.toJS({json:!0,jsonArg:e,mapAsMap:!1,onAnchor:r})}toString(e={}){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");if("indent"in e&&(!Number.isInteger(e.indent)||Number(e.indent)<=0)){let r=JSON.stringify(e.indent);throw new Error(`"indent" option must be a positive integer, not ${r}`)}return ax.stringifyDocument(this,e)}};function ln(t){if(Ae.isCollection(t))return!0;throw new Error("Expected a YAML collection as document contents")}Uh.Document=jc});var xr=N(Sr=>{"use strict";var kr=class extends Error{constructor(e,r,i,n){super(),this.name=e,this.code=i,this.message=n,this.pos=r}},Rc=class extends kr{constructor(e,r,i){super("YAMLParseError",e,r,i)}},Uc=class extends kr{constructor(e,r,i){super("YAMLWarning",e,r,i)}},ux=(t,e)=>r=>{if(r.pos[0]===-1)return;r.linePos=r.pos.map(a=>e.linePos(a));let{line:i,col:n}=r.linePos[0];r.message+=` at line ${i}, column ${n}`;let o=n-1,s=t.substring(e.lineStarts[i-1],e.lineStarts[i]).replace(/[\n\r]+$/,"");if(o>=60&&s.length>80){let a=Math.min(o-39,s.length-79);s="\u2026"+s.substring(a),o-=a-1}if(s.length>80&&(s=s.substring(0,79)+"\u2026"),i>1&&/^ *$/.test(s.substring(0,o))){let a=t.substring(e.lineStarts[i-2],e.lineStarts[i-1]);a.length>80&&(a=a.substring(0,79)+`\u2026
81
+ `}Bh.stringifyDocument=px});var Sr=N(Gh=>{"use strict";var fx=ar(),cn=zi(),Te=Z(),mx=pt(),gx=ct(),hx=Uc(),yx=Vh(),Mc=Pi(),_x=Ba(),vx=cr(),qc=Fa(),Zc=class t{constructor(e,r,i){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,Te.NODE_TYPE,{value:Te.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:s}=o;i?._directives?(this.directives=i._directives.atDocument(),this.directives.yaml.explicit&&(s=this.directives.yaml.version)):this.directives=new qc.Directives({version:s}),this.setSchema(s,i),this.contents=e===void 0?null:this.createNode(e,n,i)}clone(){let e=Object.create(t.prototype,{[Te.NODE_TYPE]:{value:Te.DOC}});return e.commentBefore=this.commentBefore,e.comment=this.comment,e.errors=this.errors.slice(),e.warnings=this.warnings.slice(),e.options=Object.assign({},this.options),this.directives&&(e.directives=this.directives.clone()),e.schema=this.schema.clone(),e.contents=Te.isNode(this.contents)?this.contents.clone(e.schema):this.contents,this.range&&(e.range=this.range.slice()),e}add(e){ln(this.contents)&&this.contents.add(e)}addIn(e,r){ln(this.contents)&&this.contents.addIn(e,r)}createAlias(e,r){if(!e.anchor){let i=Mc.anchorNames(this);e.anchor=!r||i.has(r)?Mc.findNewAnchor(r||"a",i):r}return new fx.Alias(e.anchor)}createNode(e,r,i){let n;if(typeof r=="function")e=r.call({"":e},"",e),n=r;else if(Array.isArray(r)){let y=z=>typeof z=="number"||z instanceof String||z instanceof Number,S=r.filter(y).map(String);S.length>0&&(r=r.concat(S)),n=r}else i===void 0&&r&&(i=r,r=void 0);let{aliasDuplicateObjects:o,anchorPrefix:s,flow:a,keepUndefined:c,onTagObj:l,tag:d}=i??{},{onAnchor:u,setAnchors:p,sourceObjects:f}=Mc.createNodeAnchors(this,s||"a"),m={aliasDuplicateObjects:o??!0,keepUndefined:c??!1,onAnchor:u,onTagObj:l,replacer:n,schema:this.schema,sourceObjects:f},h=vx.createNode(e,d,m);return a&&Te.isCollection(h)&&(h.flow=!0),p(),h}createPair(e,r,i={}){let n=this.createNode(e,null,i),o=this.createNode(r,null,i);return new mx.Pair(n,o)}delete(e){return ln(this.contents)?this.contents.delete(e):!1}deleteIn(e){return cn.isEmptyPath(e)?this.contents==null?!1:(this.contents=null,!0):ln(this.contents)?this.contents.deleteIn(e):!1}get(e,r){return Te.isCollection(this.contents)?this.contents.get(e,r):void 0}getIn(e,r){return cn.isEmptyPath(e)?!r&&Te.isScalar(this.contents)?this.contents.value:this.contents:Te.isCollection(this.contents)?this.contents.getIn(e,r):void 0}has(e){return Te.isCollection(this.contents)?this.contents.has(e):!1}hasIn(e){return cn.isEmptyPath(e)?this.contents!==void 0:Te.isCollection(this.contents)?this.contents.hasIn(e):!1}set(e,r){this.contents==null?this.contents=cn.collectionFromPath(this.schema,[e],r):ln(this.contents)&&this.contents.set(e,r)}setIn(e,r){cn.isEmptyPath(e)?this.contents=r:this.contents==null?this.contents=cn.collectionFromPath(this.schema,Array.from(e),r):ln(this.contents)&&this.contents.setIn(e,r)}setSchema(e,r={}){typeof e=="number"&&(e=String(e));let i;switch(e){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new qc.Directives({version:"1.1"}),i={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=e:this.directives=new qc.Directives({version:e}),i={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,i=null;break;default:{let n=JSON.stringify(e);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 hx.Schema(Object.assign(i,r));else throw new Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:e,jsonArg:r,mapAsMap:i,maxAliasCount:n,onAnchor:o,reviver:s}={}){let a={anchors:new Map,doc:this,keep:!e,mapAsMap:i===!0,mapKeyWarned:!1,maxAliasCount:typeof n=="number"?n:100},c=gx.toJS(this.contents,r??"",a);if(typeof o=="function")for(let{count:l,res:d}of a.anchors.values())o(d,l);return typeof s=="function"?_x.applyReviver(s,{"":c},"",c):c}toJSON(e,r){return this.toJS({json:!0,jsonArg:e,mapAsMap:!1,onAnchor:r})}toString(e={}){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");if("indent"in e&&(!Number.isInteger(e.indent)||Number(e.indent)<=0)){let r=JSON.stringify(e.indent);throw new Error(`"indent" option must be a positive integer, not ${r}`)}return yx.stringifyDocument(this,e)}};function ln(t){if(Te.isCollection(t))return!0;throw new Error("Expected a YAML collection as document contents")}Gh.Document=Zc});var Or=N(Ir=>{"use strict";var xr=class extends Error{constructor(e,r,i,n){super(),this.name=e,this.code=i,this.message=n,this.pos=r}},Fc=class extends xr{constructor(e,r,i){super("YAMLParseError",e,r,i)}},Bc=class extends xr{constructor(e,r,i){super("YAMLWarning",e,r,i)}},bx=(t,e)=>r=>{if(r.pos[0]===-1)return;r.linePos=r.pos.map(a=>e.linePos(a));let{line:i,col:n}=r.linePos[0];r.message+=` at line ${i}, column ${n}`;let o=n-1,s=t.substring(e.lineStarts[i-1],e.lineStarts[i]).replace(/[\n\r]+$/,"");if(o>=60&&s.length>80){let a=Math.min(o-39,s.length-79);s="\u2026"+s.substring(a),o-=a-1}if(s.length>80&&(s=s.substring(0,79)+"\u2026"),i>1&&/^ *$/.test(s.substring(0,o))){let a=t.substring(e.lineStarts[i-2],e.lineStarts[i-1]);a.length>80&&(a=a.substring(0,79)+`\u2026
82
82
  `),s=a+s}if(/[^ ]/.test(s)){let a=1,c=r.linePos[1];c?.line===i&&c.col>n&&(a=Math.max(1,Math.min(c.col-n,80-o)));let l=" ".repeat(o)+"^".repeat(a);r.message+=`:
83
83
 
84
84
  ${s}
85
85
  ${l}
86
- `}};Sr.YAMLError=kr;Sr.YAMLParseError=Rc;Sr.YAMLWarning=Uc;Sr.prettifyError=ux});var Ir=N(Lh=>{"use strict";function dx(t,{flow:e,indicator:r,next:i,offset:n,onError:o,parentIndent:s,startOnNewline:a}){let c=!1,l=a,u=a,d="",p="",f=!1,m=!1,g=null,y=null,k=null,z=null,b=null,w=null,j=null;for(let E of t)switch(m&&(E.type!=="space"&&E.type!=="newline"&&E.type!=="comma"&&o(E.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),m=!1),g&&(l&&E.type!=="comment"&&E.type!=="newline"&&o(g,"TAB_AS_INDENT","Tabs are not allowed as indentation"),g=null),E.type){case"space":!e&&(r!=="doc-start"||i?.type!=="flow-collection")&&E.source.includes(" ")&&(g=E),u=!0;break;case"comment":{u||o(E,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let M=E.source.substring(1)||" ";d?d+=p+M:d=M,p="",l=!1;break}case"newline":l?d?d+=E.source:(!w||r!=="seq-item-ind")&&(c=!0):p+=E.source,l=!0,f=!0,(y||k)&&(z=E),u=!0;break;case"anchor":y&&o(E,"MULTIPLE_ANCHORS","A node can have at most one anchor"),E.source.endsWith(":")&&o(E.offset+E.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),y=E,j??(j=E.offset),l=!1,u=!1,m=!0;break;case"tag":{k&&o(E,"MULTIPLE_TAGS","A node can have at most one tag"),k=E,j??(j=E.offset),l=!1,u=!1,m=!0;break}case r:(y||k)&&o(E,"BAD_PROP_ORDER",`Anchors and tags must be after the ${E.source} indicator`),w&&o(E,"UNEXPECTED_TOKEN",`Unexpected ${E.source} in ${e??"collection"}`),w=E,l=r==="seq-item-ind"||r==="explicit-key-ind",u=!1;break;case"comma":if(e){b&&o(E,"UNEXPECTED_TOKEN",`Unexpected , in ${e}`),b=E,l=!1,u=!1;break}default:o(E,"UNEXPECTED_TOKEN",`Unexpected ${E.type} token`),l=!1,u=!1}let C=t[t.length-1],A=C?C.offset+C.source.length:n;return m&&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"),g&&(l&&g.indent<=s||i?.type==="block-map"||i?.type==="block-seq")&&o(g,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:b,found:w,spaceBefore:c,comment:d,hasNewline:f,anchor:y,tag:k,newlineAfterProp:z,end:A,start:j??A}}Lh.resolveProps=dx});var lo=N(Mh=>{"use strict";function Lc(t){if(!t)return null;switch(t.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(t.source.includes(`
87
- `))return!0;if(t.end){for(let e of t.end)if(e.type==="newline")return!0}return!1;case"flow-collection":for(let e of t.items){for(let r of e.start)if(r.type==="newline")return!0;if(e.sep){for(let r of e.sep)if(r.type==="newline")return!0}if(Lc(e.key)||Lc(e.value))return!0}return!1;default:return!0}}Mh.containsNewline=Lc});var Mc=N(Fh=>{"use strict";var px=lo();function fx(t,e,r){if(e?.type==="flow-collection"){let i=e.end[0];i.indent===t&&(i.source==="]"||i.source==="}")&&px.containsNewline(e)&&r(i,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}Fh.flowIndentCheck=fx});var Fc=N(qh=>{"use strict";var Zh=Z();function mx(t,e,r){let{uniqueKeys:i}=t.options;if(i===!1)return!1;let n=typeof i=="function"?i:(o,s)=>o===s||Zh.isScalar(o)&&Zh.isScalar(s)&&o.value===s.value;return e.some(o=>n(o.key,r))}qh.mapIncludes=mx});var Wh=N(Jh=>{"use strict";var Bh=ft(),gx=gt(),Vh=Ir(),hx=lo(),Gh=Mc(),yx=Fc(),Kh="All mapping items must start at the same column";function _x({composeNode:t,composeEmptyNode:e},r,i,n,o){let s=o?.nodeClass??gx.YAMLMap,a=new s(r.schema);r.atRoot&&(r.atRoot=!1);let c=i.offset,l=null;for(let u of i.items){let{start:d,key:p,sep:f,value:m}=u,g=Vh.resolveProps(d,{indicator:"explicit-key-ind",next:p??f?.[0],offset:c,onError:n,parentIndent:i.indent,startOnNewline:!0}),y=!g.found;if(y){if(p&&(p.type==="block-seq"?n(c,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in p&&p.indent!==i.indent&&n(c,"BAD_INDENT",Kh)),!g.anchor&&!g.tag&&!f){l=g.end,g.comment&&(a.comment?a.comment+=`
88
- `+g.comment:a.comment=g.comment);continue}(g.newlineAfterProp||hx.containsNewline(p))&&n(p??d[d.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else g.found?.indent!==i.indent&&n(c,"BAD_INDENT",Kh);r.atKey=!0;let k=g.end,z=p?t(r,p,g,n):e(r,k,d,null,g,n);r.schema.compat&&Gh.flowIndentCheck(i.indent,p,n),r.atKey=!1,yx.mapIncludes(r,a.items,z)&&n(k,"DUPLICATE_KEY","Map keys must be unique");let b=Vh.resolveProps(f??[],{indicator:"map-value-ind",next:m,offset:z.range[2],onError:n,parentIndent:i.indent,startOnNewline:!p||p.type==="block-scalar"});if(c=b.end,b.found){y&&(m?.type==="block-map"&&!b.hasNewline&&n(c,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),r.options.strict&&g.start<b.found.offset-1024&&n(z.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));let w=m?t(r,m,b,n):e(r,c,f,null,b,n);r.schema.compat&&Gh.flowIndentCheck(i.indent,m,n),c=w.range[2];let j=new Bh.Pair(z,w);r.options.keepSourceTokens&&(j.srcToken=u),a.items.push(j)}else{y&&n(z.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),b.comment&&(z.comment?z.comment+=`
89
- `+b.comment:z.comment=b.comment);let w=new Bh.Pair(z);r.options.keepSourceTokens&&(w.srcToken=u),a.items.push(w)}}return l&&l<c&&n(l,"IMPOSSIBLE","Map comment with trailing content"),a.range=[i.offset,c,l??c],a}Jh.resolveBlockMap=_x});var Hh=N(Yh=>{"use strict";var vx=ht(),bx=Ir(),wx=Mc();function $x({composeNode:t,composeEmptyNode:e},r,i,n,o){let s=o?.nodeClass??vx.YAMLSeq,a=new s(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 p=bx.resolveProps(u,{indicator:"seq-item-ind",next:d,offset:c,onError:n,parentIndent:i.indent,startOnNewline:!0});if(!p.found)if(p.anchor||p.tag||d)d?.type==="block-seq"?n(p.end,"BAD_INDENT","All sequence items must start at the same column"):n(c,"MISSING_CHAR","Sequence item without - indicator");else{l=p.end,p.comment&&(a.comment=p.comment);continue}let f=d?t(r,d,p,n):e(r,p.end,u,null,p,n);r.schema.compat&&wx.flowIndentCheck(i.indent,d,n),c=f.range[2],a.items.push(f)}return a.range=[i.offset,c,l??c],a}Yh.resolveBlockSeq=$x});var un=N(Xh=>{"use strict";function kx(t,e,r,i){let n="";if(t){let o=!1,s="";for(let a of t){let{source:c,type:l}=a;switch(l){case"space":o=!0;break;case"comment":{r&&!o&&i(a,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let u=c.substring(1)||" ";n?n+=s+u:n=u,s="";break}case"newline":n&&(s+=c),o=!0;break;default:i(a,"UNEXPECTED_TOKEN",`Unexpected ${l} at node end`)}e+=c.length}}return{comment:n,offset:e}}Xh.resolveEnd=kx});var ny=N(ty=>{"use strict";var Sx=Z(),xx=ft(),Qh=gt(),Ix=ht(),Ox=un(),ey=Ir(),Px=lo(),Tx=Fc(),Zc="Block collections are not allowed within flow collections",qc=t=>t&&(t.type==="block-map"||t.type==="block-seq");function Ax({composeNode:t,composeEmptyNode:e},r,i,n,o){let s=i.start.source==="{",a=s?"flow map":"flow sequence",c=o?.nodeClass??(s?Qh.YAMLMap:Ix.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 y=0;y<i.items.length;++y){let k=i.items[y],{start:z,key:b,sep:w,value:j}=k,C=ey.resolveProps(z,{flow:a,indicator:"explicit-key-ind",next:b??w?.[0],offset:d,onError:n,parentIndent:i.indent,startOnNewline:!1});if(!C.found){if(!C.anchor&&!C.tag&&!w&&!j){y===0&&C.comma?n(C.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${a}`):y<i.items.length-1&&n(C.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${a}`),C.comment&&(l.comment?l.comment+=`
90
- `+C.comment:l.comment=C.comment),d=C.end;continue}!s&&r.options.strict&&Px.containsNewline(b)&&n(b,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(y===0)C.comma&&n(C.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${a}`);else if(C.comma||n(C.start,"MISSING_CHAR",`Missing , between ${a} items`),C.comment){let A="";e:for(let E of z)switch(E.type){case"comma":case"space":break;case"comment":A=E.source.substring(1);break e;default:break e}if(A){let E=l.items[l.items.length-1];Sx.isPair(E)&&(E=E.value??E.key),E.comment?E.comment+=`
91
- `+A:E.comment=A,C.comment=C.comment.substring(A.length+1)}}if(!s&&!w&&!C.found){let A=j?t(r,j,C,n):e(r,C.end,w,null,C,n);l.items.push(A),d=A.range[2],qc(j)&&n(A.range,"BLOCK_IN_FLOW",Zc)}else{r.atKey=!0;let A=C.end,E=b?t(r,b,C,n):e(r,A,z,null,C,n);qc(b)&&n(E.range,"BLOCK_IN_FLOW",Zc),r.atKey=!1;let M=ey.resolveProps(w??[],{flow:a,indicator:"map-value-ind",next:j,offset:E.range[2],onError:n,parentIndent:i.indent,startOnNewline:!1});if(M.found){if(!s&&!C.found&&r.options.strict){if(w)for(let ne of w){if(ne===M.found)break;if(ne.type==="newline"){n(ne,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}C.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 j&&("source"in j&&j.source?.[0]===":"?n(j,"MISSING_CHAR",`Missing space after : in ${a}`):n(M.start,"MISSING_CHAR",`Missing , or : between ${a} items`));let G=j?t(r,j,M,n):M.found?e(r,M.end,w,null,M,n):null;G?qc(j)&&n(G.range,"BLOCK_IN_FLOW",Zc):M.comment&&(E.comment?E.comment+=`
92
- `+M.comment:E.comment=M.comment);let ge=new xx.Pair(E,G);if(r.options.keepSourceTokens&&(ge.srcToken=k),s){let ne=l;Tx.mapIncludes(r,ne.items,E)&&n(A,"DUPLICATE_KEY","Map keys must be unique"),ne.items.push(ge)}else{let ne=new Qh.YAMLMap(r.schema);ne.flow=!0,ne.items.push(ge);let zm=(G??E).range;ne.range=[E.range[0],zm[1],zm[2]],l.items.push(ne)}d=G?G.range[2]:M.end}}let p=s?"}":"]",[f,...m]=i.end,g=d;if(f?.source===p)g=f.offset+f.source.length;else{let y=a[0].toUpperCase()+a.substring(1),k=u?`${y} must end with a ${p}`:`${y} in block collection must be sufficiently indented and end with a ${p}`;n(d,u?"MISSING_CHAR":"BAD_INDENT",k),f&&f.source.length!==1&&m.unshift(f)}if(m.length>0){let y=Ox.resolveEnd(m,g,r.options.strict,n);y.comment&&(l.comment?l.comment+=`
93
- `+y.comment:l.comment=y.comment),l.range=[i.offset,g,y.offset]}else l.range=[i.offset,g,g];return l}ty.resolveFlowCollection=Ax});var iy=N(ry=>{"use strict";var Ex=Z(),zx=ce(),Nx=gt(),Cx=ht(),Dx=Wh(),jx=Hh(),Rx=ny();function Bc(t,e,r,i,n,o){let s=r.type==="block-map"?Dx.resolveBlockMap(t,e,r,i,o):r.type==="block-seq"?jx.resolveBlockSeq(t,e,r,i,o):Rx.resolveFlowCollection(t,e,r,i,o),a=s.constructor;return n==="!"||n===a.tagName?(s.tag=a.tagName,s):(n&&(s.tag=n),s)}function Ux(t,e,r,i,n){let o=i.tag,s=o?e.directives.tagName(o.source,p=>n(o,"TAG_RESOLVE_FAILED",p)):null;if(r.type==="block-seq"){let{anchor:p,newlineAfterProp:f}=i,m=p&&o?p.offset>o.offset?p:o:p??o;m&&(!f||f.offset<m.offset)&&n(m,"MISSING_CHAR","Missing newline after block sequence props")}let a=r.type==="block-map"?"map":r.type==="block-seq"?"seq":r.start.source==="{"?"map":"seq";if(!o||!s||s==="!"||s===Nx.YAMLMap.tagName&&a==="map"||s===Cx.YAMLSeq.tagName&&a==="seq")return Bc(t,e,r,n,s);let c=e.schema.tags.find(p=>p.tag===s&&p.collection===a);if(!c){let p=e.schema.knownTags[s];if(p?.collection===a)e.schema.tags.push(Object.assign({},p,{default:!1})),c=p;else return p?n(o,"BAD_COLLECTION_TYPE",`${p.tag} used for ${a} collection, but expects ${p.collection??"scalar"}`,!0):n(o,"TAG_RESOLVE_FAILED",`Unresolved tag: ${s}`,!0),Bc(t,e,r,n,s)}let l=Bc(t,e,r,n,s,c),u=c.resolve?.(l,p=>n(o,"TAG_RESOLVE_FAILED",p),e.options)??l,d=Ex.isNode(u)?u:new zx.Scalar(u);return d.range=l.range,d.tag=s,c?.format&&(d.format=c.format),d}ry.composeCollection=Ux});var Gc=N(oy=>{"use strict";var Vc=ce();function Lx(t,e,r){let i=e.offset,n=Mx(e,t.options.strict,r);if(!n)return{value:"",type:null,comment:"",range:[i,i,i]};let o=n.mode===">"?Vc.Scalar.BLOCK_FOLDED:Vc.Scalar.BLOCK_LITERAL,s=e.source?Fx(e.source):[],a=s.length;for(let g=s.length-1;g>=0;--g){let y=s[g][1];if(y===""||y==="\r")a=g;else break}if(a===0){let g=n.chomp==="+"&&s.length>0?`
94
- `.repeat(Math.max(1,s.length-1)):"",y=i+n.length;return e.source&&(y+=e.source.length),{value:g,type:o,comment:n.comment,range:[i,y,y]}}let c=e.indent+n.indent,l=e.offset+n.length,u=0;for(let g=0;g<a;++g){let[y,k]=s[g];if(k===""||k==="\r")n.indent===0&&y.length>c&&(c=y.length);else{y.length<c&&r(l+y.length,"MISSING_CHAR","Block scalars with more-indented leading empty lines must use an explicit indentation indicator"),n.indent===0&&(c=y.length),u=g,c===0&&!t.atRoot&&r(l,"BAD_INDENT","Block scalar values in collections must be indented");break}l+=y.length+k.length+1}for(let g=s.length-1;g>=a;--g)s[g][0].length>c&&(a=g+1);let d="",p="",f=!1;for(let g=0;g<u;++g)d+=s[g][0].slice(c)+`
95
- `;for(let g=u;g<a;++g){let[y,k]=s[g];l+=y.length+k.length+1;let z=k[k.length-1]==="\r";if(z&&(k=k.slice(0,-1)),k&&y.length<c){let w=`Block scalar lines must not be less indented than their ${n.indent?"explicit indentation indicator":"first line"}`;r(l-k.length-(z?2:1),"BAD_INDENT",w),y=""}o===Vc.Scalar.BLOCK_LITERAL?(d+=p+y.slice(c)+k,p=`
96
- `):y.length>c||k[0]===" "?(p===" "?p=`
86
+ `}};Ir.YAMLError=xr;Ir.YAMLParseError=Fc;Ir.YAMLWarning=Bc;Ir.prettifyError=bx});var Pr=N(Jh=>{"use strict";function wx(t,{flow:e,indicator:r,next:i,offset:n,onError:o,parentIndent:s,startOnNewline:a}){let c=!1,l=a,d=a,u="",p="",f=!1,m=!1,h=null,y=null,S=null,z=null,b=null,$=null,j=null;for(let E of t)switch(m&&(E.type!=="space"&&E.type!=="newline"&&E.type!=="comma"&&o(E.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),m=!1),h&&(l&&E.type!=="comment"&&E.type!=="newline"&&o(h,"TAB_AS_INDENT","Tabs are not allowed as indentation"),h=null),E.type){case"space":!e&&(r!=="doc-start"||i?.type!=="flow-collection")&&E.source.includes(" ")&&(h=E),d=!0;break;case"comment":{d||o(E,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let M=E.source.substring(1)||" ";u?u+=p+M:u=M,p="",l=!1;break}case"newline":l?u?u+=E.source:(!$||r!=="seq-item-ind")&&(c=!0):p+=E.source,l=!0,f=!0,(y||S)&&(z=E),d=!0;break;case"anchor":y&&o(E,"MULTIPLE_ANCHORS","A node can have at most one anchor"),E.source.endsWith(":")&&o(E.offset+E.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),y=E,j??(j=E.offset),l=!1,d=!1,m=!0;break;case"tag":{S&&o(E,"MULTIPLE_TAGS","A node can have at most one tag"),S=E,j??(j=E.offset),l=!1,d=!1,m=!0;break}case r:(y||S)&&o(E,"BAD_PROP_ORDER",`Anchors and tags must be after the ${E.source} indicator`),$&&o(E,"UNEXPECTED_TOKEN",`Unexpected ${E.source} in ${e??"collection"}`),$=E,l=r==="seq-item-ind"||r==="explicit-key-ind",d=!1;break;case"comma":if(e){b&&o(E,"UNEXPECTED_TOKEN",`Unexpected , in ${e}`),b=E,l=!1,d=!1;break}default:o(E,"UNEXPECTED_TOKEN",`Unexpected ${E.type} token`),l=!1,d=!1}let C=t[t.length-1],A=C?C.offset+C.source.length:n;return m&&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"),h&&(l&&h.indent<=s||i?.type==="block-map"||i?.type==="block-seq")&&o(h,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:b,found:$,spaceBefore:c,comment:u,hasNewline:f,anchor:y,tag:S,newlineAfterProp:z,end:A,start:j??A}}Jh.resolveProps=wx});var fo=N(Kh=>{"use strict";function Vc(t){if(!t)return null;switch(t.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(t.source.includes(`
87
+ `))return!0;if(t.end){for(let e of t.end)if(e.type==="newline")return!0}return!1;case"flow-collection":for(let e of t.items){for(let r of e.start)if(r.type==="newline")return!0;if(e.sep){for(let r of e.sep)if(r.type==="newline")return!0}if(Vc(e.key)||Vc(e.value))return!0}return!1;default:return!0}}Kh.containsNewline=Vc});var Gc=N(Wh=>{"use strict";var $x=fo();function kx(t,e,r){if(e?.type==="flow-collection"){let i=e.end[0];i.indent===t&&(i.source==="]"||i.source==="}")&&$x.containsNewline(e)&&r(i,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}Wh.flowIndentCheck=kx});var Jc=N(Hh=>{"use strict";var Yh=Z();function Sx(t,e,r){let{uniqueKeys:i}=t.options;if(i===!1)return!1;let n=typeof i=="function"?i:(o,s)=>o===s||Yh.isScalar(o)&&Yh.isScalar(s)&&o.value===s.value;return e.some(o=>n(o.key,r))}Hh.mapIncludes=Sx});var ry=N(ny=>{"use strict";var Xh=pt(),xx=mt(),Qh=Pr(),Ix=fo(),ey=Gc(),Ox=Jc(),ty="All mapping items must start at the same column";function Px({composeNode:t,composeEmptyNode:e},r,i,n,o){let s=o?.nodeClass??xx.YAMLMap,a=new s(r.schema);r.atRoot&&(r.atRoot=!1);let c=i.offset,l=null;for(let d of i.items){let{start:u,key:p,sep:f,value:m}=d,h=Qh.resolveProps(u,{indicator:"explicit-key-ind",next:p??f?.[0],offset:c,onError:n,parentIndent:i.indent,startOnNewline:!0}),y=!h.found;if(y){if(p&&(p.type==="block-seq"?n(c,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in p&&p.indent!==i.indent&&n(c,"BAD_INDENT",ty)),!h.anchor&&!h.tag&&!f){l=h.end,h.comment&&(a.comment?a.comment+=`
88
+ `+h.comment:a.comment=h.comment);continue}(h.newlineAfterProp||Ix.containsNewline(p))&&n(p??u[u.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else h.found?.indent!==i.indent&&n(c,"BAD_INDENT",ty);r.atKey=!0;let S=h.end,z=p?t(r,p,h,n):e(r,S,u,null,h,n);r.schema.compat&&ey.flowIndentCheck(i.indent,p,n),r.atKey=!1,Ox.mapIncludes(r,a.items,z)&&n(S,"DUPLICATE_KEY","Map keys must be unique");let b=Qh.resolveProps(f??[],{indicator:"map-value-ind",next:m,offset:z.range[2],onError:n,parentIndent:i.indent,startOnNewline:!p||p.type==="block-scalar"});if(c=b.end,b.found){y&&(m?.type==="block-map"&&!b.hasNewline&&n(c,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),r.options.strict&&h.start<b.found.offset-1024&&n(z.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));let $=m?t(r,m,b,n):e(r,c,f,null,b,n);r.schema.compat&&ey.flowIndentCheck(i.indent,m,n),c=$.range[2];let j=new Xh.Pair(z,$);r.options.keepSourceTokens&&(j.srcToken=d),a.items.push(j)}else{y&&n(z.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),b.comment&&(z.comment?z.comment+=`
89
+ `+b.comment:z.comment=b.comment);let $=new Xh.Pair(z);r.options.keepSourceTokens&&($.srcToken=d),a.items.push($)}}return l&&l<c&&n(l,"IMPOSSIBLE","Map comment with trailing content"),a.range=[i.offset,c,l??c],a}ny.resolveBlockMap=Px});var oy=N(iy=>{"use strict";var Tx=gt(),Ax=Pr(),Ex=Gc();function zx({composeNode:t,composeEmptyNode:e},r,i,n,o){let s=o?.nodeClass??Tx.YAMLSeq,a=new s(r.schema);r.atRoot&&(r.atRoot=!1),r.atKey&&(r.atKey=!1);let c=i.offset,l=null;for(let{start:d,value:u}of i.items){let p=Ax.resolveProps(d,{indicator:"seq-item-ind",next:u,offset:c,onError:n,parentIndent:i.indent,startOnNewline:!0});if(!p.found)if(p.anchor||p.tag||u)u?.type==="block-seq"?n(p.end,"BAD_INDENT","All sequence items must start at the same column"):n(c,"MISSING_CHAR","Sequence item without - indicator");else{l=p.end,p.comment&&(a.comment=p.comment);continue}let f=u?t(r,u,p,n):e(r,p.end,d,null,p,n);r.schema.compat&&Ex.flowIndentCheck(i.indent,u,n),c=f.range[2],a.items.push(f)}return a.range=[i.offset,c,l??c],a}iy.resolveBlockSeq=zx});var un=N(sy=>{"use strict";function Nx(t,e,r,i){let n="";if(t){let o=!1,s="";for(let a of t){let{source:c,type:l}=a;switch(l){case"space":o=!0;break;case"comment":{r&&!o&&i(a,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let d=c.substring(1)||" ";n?n+=s+d:n=d,s="";break}case"newline":n&&(s+=c),o=!0;break;default:i(a,"UNEXPECTED_TOKEN",`Unexpected ${l} at node end`)}e+=c.length}}return{comment:n,offset:e}}sy.resolveEnd=Nx});var uy=N(ly=>{"use strict";var Cx=Z(),Dx=pt(),ay=mt(),jx=gt(),Rx=un(),cy=Pr(),Ux=fo(),Lx=Jc(),Kc="Block collections are not allowed within flow collections",Wc=t=>t&&(t.type==="block-map"||t.type==="block-seq");function Mx({composeNode:t,composeEmptyNode:e},r,i,n,o){let s=i.start.source==="{",a=s?"flow map":"flow sequence",c=o?.nodeClass??(s?ay.YAMLMap:jx.YAMLSeq),l=new c(r.schema);l.flow=!0;let d=r.atRoot;d&&(r.atRoot=!1),r.atKey&&(r.atKey=!1);let u=i.offset+i.start.source.length;for(let y=0;y<i.items.length;++y){let S=i.items[y],{start:z,key:b,sep:$,value:j}=S,C=cy.resolveProps(z,{flow:a,indicator:"explicit-key-ind",next:b??$?.[0],offset:u,onError:n,parentIndent:i.indent,startOnNewline:!1});if(!C.found){if(!C.anchor&&!C.tag&&!$&&!j){y===0&&C.comma?n(C.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${a}`):y<i.items.length-1&&n(C.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${a}`),C.comment&&(l.comment?l.comment+=`
90
+ `+C.comment:l.comment=C.comment),u=C.end;continue}!s&&r.options.strict&&Ux.containsNewline(b)&&n(b,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(y===0)C.comma&&n(C.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${a}`);else if(C.comma||n(C.start,"MISSING_CHAR",`Missing , between ${a} items`),C.comment){let A="";e:for(let E of z)switch(E.type){case"comma":case"space":break;case"comment":A=E.source.substring(1);break e;default:break e}if(A){let E=l.items[l.items.length-1];Cx.isPair(E)&&(E=E.value??E.key),E.comment?E.comment+=`
91
+ `+A:E.comment=A,C.comment=C.comment.substring(A.length+1)}}if(!s&&!$&&!C.found){let A=j?t(r,j,C,n):e(r,C.end,$,null,C,n);l.items.push(A),u=A.range[2],Wc(j)&&n(A.range,"BLOCK_IN_FLOW",Kc)}else{r.atKey=!0;let A=C.end,E=b?t(r,b,C,n):e(r,A,z,null,C,n);Wc(b)&&n(E.range,"BLOCK_IN_FLOW",Kc),r.atKey=!1;let M=cy.resolveProps($??[],{flow:a,indicator:"map-value-ind",next:j,offset:E.range[2],onError:n,parentIndent:i.indent,startOnNewline:!1});if(M.found){if(!s&&!C.found&&r.options.strict){if($)for(let oe of $){if(oe===M.found)break;if(oe.type==="newline"){n(oe,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}C.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 j&&("source"in j&&j.source?.[0]===":"?n(j,"MISSING_CHAR",`Missing space after : in ${a}`):n(M.start,"MISSING_CHAR",`Missing , or : between ${a} items`));let K=j?t(r,j,M,n):M.found?e(r,M.end,$,null,M,n):null;K?Wc(j)&&n(K.range,"BLOCK_IN_FLOW",Kc):M.comment&&(E.comment?E.comment+=`
92
+ `+M.comment:E.comment=M.comment);let he=new Dx.Pair(E,K);if(r.options.keepSourceTokens&&(he.srcToken=S),s){let oe=l;Lx.mapIncludes(r,oe.items,E)&&n(A,"DUPLICATE_KEY","Map keys must be unique"),oe.items.push(he)}else{let oe=new ay.YAMLMap(r.schema);oe.flow=!0,oe.items.push(he);let Mm=(K??E).range;oe.range=[E.range[0],Mm[1],Mm[2]],l.items.push(oe)}u=K?K.range[2]:M.end}}let p=s?"}":"]",[f,...m]=i.end,h=u;if(f?.source===p)h=f.offset+f.source.length;else{let y=a[0].toUpperCase()+a.substring(1),S=d?`${y} must end with a ${p}`:`${y} in block collection must be sufficiently indented and end with a ${p}`;n(u,d?"MISSING_CHAR":"BAD_INDENT",S),f&&f.source.length!==1&&m.unshift(f)}if(m.length>0){let y=Rx.resolveEnd(m,h,r.options.strict,n);y.comment&&(l.comment?l.comment+=`
93
+ `+y.comment:l.comment=y.comment),l.range=[i.offset,h,y.offset]}else l.range=[i.offset,h,h];return l}ly.resolveFlowCollection=Mx});var py=N(dy=>{"use strict";var qx=Z(),Zx=ce(),Fx=mt(),Bx=gt(),Vx=ry(),Gx=oy(),Jx=uy();function Yc(t,e,r,i,n,o){let s=r.type==="block-map"?Vx.resolveBlockMap(t,e,r,i,o):r.type==="block-seq"?Gx.resolveBlockSeq(t,e,r,i,o):Jx.resolveFlowCollection(t,e,r,i,o),a=s.constructor;return n==="!"||n===a.tagName?(s.tag=a.tagName,s):(n&&(s.tag=n),s)}function Kx(t,e,r,i,n){let o=i.tag,s=o?e.directives.tagName(o.source,p=>n(o,"TAG_RESOLVE_FAILED",p)):null;if(r.type==="block-seq"){let{anchor:p,newlineAfterProp:f}=i,m=p&&o?p.offset>o.offset?p:o:p??o;m&&(!f||f.offset<m.offset)&&n(m,"MISSING_CHAR","Missing newline after block sequence props")}let a=r.type==="block-map"?"map":r.type==="block-seq"?"seq":r.start.source==="{"?"map":"seq";if(!o||!s||s==="!"||s===Fx.YAMLMap.tagName&&a==="map"||s===Bx.YAMLSeq.tagName&&a==="seq")return Yc(t,e,r,n,s);let c=e.schema.tags.find(p=>p.tag===s&&p.collection===a);if(!c){let p=e.schema.knownTags[s];if(p?.collection===a)e.schema.tags.push(Object.assign({},p,{default:!1})),c=p;else return p?n(o,"BAD_COLLECTION_TYPE",`${p.tag} used for ${a} collection, but expects ${p.collection??"scalar"}`,!0):n(o,"TAG_RESOLVE_FAILED",`Unresolved tag: ${s}`,!0),Yc(t,e,r,n,s)}let l=Yc(t,e,r,n,s,c),d=c.resolve?.(l,p=>n(o,"TAG_RESOLVE_FAILED",p),e.options)??l,u=qx.isNode(d)?d:new Zx.Scalar(d);return u.range=l.range,u.tag=s,c?.format&&(u.format=c.format),u}dy.composeCollection=Kx});var Xc=N(fy=>{"use strict";var Hc=ce();function Wx(t,e,r){let i=e.offset,n=Yx(e,t.options.strict,r);if(!n)return{value:"",type:null,comment:"",range:[i,i,i]};let o=n.mode===">"?Hc.Scalar.BLOCK_FOLDED:Hc.Scalar.BLOCK_LITERAL,s=e.source?Hx(e.source):[],a=s.length;for(let h=s.length-1;h>=0;--h){let y=s[h][1];if(y===""||y==="\r")a=h;else break}if(a===0){let h=n.chomp==="+"&&s.length>0?`
94
+ `.repeat(Math.max(1,s.length-1)):"",y=i+n.length;return e.source&&(y+=e.source.length),{value:h,type:o,comment:n.comment,range:[i,y,y]}}let c=e.indent+n.indent,l=e.offset+n.length,d=0;for(let h=0;h<a;++h){let[y,S]=s[h];if(S===""||S==="\r")n.indent===0&&y.length>c&&(c=y.length);else{y.length<c&&r(l+y.length,"MISSING_CHAR","Block scalars with more-indented leading empty lines must use an explicit indentation indicator"),n.indent===0&&(c=y.length),d=h,c===0&&!t.atRoot&&r(l,"BAD_INDENT","Block scalar values in collections must be indented");break}l+=y.length+S.length+1}for(let h=s.length-1;h>=a;--h)s[h][0].length>c&&(a=h+1);let u="",p="",f=!1;for(let h=0;h<d;++h)u+=s[h][0].slice(c)+`
95
+ `;for(let h=d;h<a;++h){let[y,S]=s[h];l+=y.length+S.length+1;let z=S[S.length-1]==="\r";if(z&&(S=S.slice(0,-1)),S&&y.length<c){let $=`Block scalar lines must not be less indented than their ${n.indent?"explicit indentation indicator":"first line"}`;r(l-S.length-(z?2:1),"BAD_INDENT",$),y=""}o===Hc.Scalar.BLOCK_LITERAL?(u+=p+y.slice(c)+S,p=`
96
+ `):y.length>c||S[0]===" "?(p===" "?p=`
97
97
  `:!f&&p===`
98
98
  `&&(p=`
99
99
 
100
- `),d+=p+y.slice(c)+k,p=`
101
- `,f=!0):k===""?p===`
102
- `?d+=`
100
+ `),u+=p+y.slice(c)+S,p=`
101
+ `,f=!0):S===""?p===`
102
+ `?u+=`
103
103
  `:p=`
104
- `:(d+=p+k,p=" ",f=!1)}switch(n.chomp){case"-":break;case"+":for(let g=a;g<s.length;++g)d+=`
105
- `+s[g][0].slice(c);d[d.length-1]!==`
106
- `&&(d+=`
107
- `);break;default:d+=`
108
- `}let m=i+n.length+e.source.length;return{value:d,type:o,comment:n.comment,range:[i,m,m]}}function Mx({offset:t,props:e},r,i){if(e[0].type!=="block-scalar-header")return i(e[0],"IMPOSSIBLE","Block scalar header not found"),null;let{source:n}=e[0],o=n[0],s=0,a="",c=-1;for(let p=1;p<n.length;++p){let f=n[p];if(!a&&(f==="-"||f==="+"))a=f;else{let m=Number(f);!s&&m?s=m:c===-1&&(c=t+p)}}c!==-1&&i(c,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${n}`);let l=!1,u="",d=n.length;for(let p=1;p<e.length;++p){let f=e[p];switch(f.type){case"space":l=!0;case"newline":d+=f.source.length;break;case"comment":r&&!l&&i(f,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),d+=f.source.length,u=f.source.substring(1);break;case"error":i(f,"UNEXPECTED_TOKEN",f.message),d+=f.source.length;break;default:{let m=`Unexpected token in block scalar header: ${f.type}`;i(f,"UNEXPECTED_TOKEN",m);let g=f.source;g&&typeof g=="string"&&(d+=g.length)}}}return{mode:o,indent:s,chomp:a,comment:u,length:d}}function Fx(t){let e=t.split(/\n( *)/),r=e[0],i=r.match(/^( *)/),o=[i?.[1]?[i[1],r.slice(i[1].length)]:["",r]];for(let s=1;s<e.length;s+=2)o.push([e[s],e[s+1]]);return o}oy.resolveBlockScalar=Lx});var Jc=N(ay=>{"use strict";var Kc=ce(),Zx=un();function qx(t,e,r){let{offset:i,type:n,source:o,end:s}=t,a,c,l=(p,f,m)=>r(i+p,f,m);switch(n){case"scalar":a=Kc.Scalar.PLAIN,c=Bx(o,l);break;case"single-quoted-scalar":a=Kc.Scalar.QUOTE_SINGLE,c=Vx(o,l);break;case"double-quoted-scalar":a=Kc.Scalar.QUOTE_DOUBLE,c=Gx(o,l);break;default:return r(t,"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=Zx.resolveEnd(s,u,e,r);return{value:c,type:a,comment:d.comment,range:[i,u,d.offset]}}function Bx(t,e){let r="";switch(t[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 ${t[0]}`;break}case"@":case"`":{r=`reserved character ${t[0]}`;break}}return r&&e(0,"BAD_SCALAR_START",`Plain value cannot start with ${r}`),sy(t)}function Vx(t,e){return(t[t.length-1]!=="'"||t.length===1)&&e(t.length,"MISSING_CHAR","Missing closing 'quote"),sy(t.slice(1,-1)).replace(/''/g,"'")}function sy(t){let e,r;try{e=new RegExp(`(.*?)(?<![ ])[ ]*\r?
104
+ `:(u+=p+S,p=" ",f=!1)}switch(n.chomp){case"-":break;case"+":for(let h=a;h<s.length;++h)u+=`
105
+ `+s[h][0].slice(c);u[u.length-1]!==`
106
+ `&&(u+=`
107
+ `);break;default:u+=`
108
+ `}let m=i+n.length+e.source.length;return{value:u,type:o,comment:n.comment,range:[i,m,m]}}function Yx({offset:t,props:e},r,i){if(e[0].type!=="block-scalar-header")return i(e[0],"IMPOSSIBLE","Block scalar header not found"),null;let{source:n}=e[0],o=n[0],s=0,a="",c=-1;for(let p=1;p<n.length;++p){let f=n[p];if(!a&&(f==="-"||f==="+"))a=f;else{let m=Number(f);!s&&m?s=m:c===-1&&(c=t+p)}}c!==-1&&i(c,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${n}`);let l=!1,d="",u=n.length;for(let p=1;p<e.length;++p){let f=e[p];switch(f.type){case"space":l=!0;case"newline":u+=f.source.length;break;case"comment":r&&!l&&i(f,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),u+=f.source.length,d=f.source.substring(1);break;case"error":i(f,"UNEXPECTED_TOKEN",f.message),u+=f.source.length;break;default:{let m=`Unexpected token in block scalar header: ${f.type}`;i(f,"UNEXPECTED_TOKEN",m);let h=f.source;h&&typeof h=="string"&&(u+=h.length)}}}return{mode:o,indent:s,chomp:a,comment:d,length:u}}function Hx(t){let e=t.split(/\n( *)/),r=e[0],i=r.match(/^( *)/),o=[i?.[1]?[i[1],r.slice(i[1].length)]:["",r]];for(let s=1;s<e.length;s+=2)o.push([e[s],e[s+1]]);return o}fy.resolveBlockScalar=Wx});var el=N(gy=>{"use strict";var Qc=ce(),Xx=un();function Qx(t,e,r){let{offset:i,type:n,source:o,end:s}=t,a,c,l=(p,f,m)=>r(i+p,f,m);switch(n){case"scalar":a=Qc.Scalar.PLAIN,c=eI(o,l);break;case"single-quoted-scalar":a=Qc.Scalar.QUOTE_SINGLE,c=tI(o,l);break;case"double-quoted-scalar":a=Qc.Scalar.QUOTE_DOUBLE,c=nI(o,l);break;default:return r(t,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${n}`),{value:"",type:null,comment:"",range:[i,i+o.length,i+o.length]}}let d=i+o.length,u=Xx.resolveEnd(s,d,e,r);return{value:c,type:a,comment:u.comment,range:[i,d,u.offset]}}function eI(t,e){let r="";switch(t[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 ${t[0]}`;break}case"@":case"`":{r=`reserved character ${t[0]}`;break}}return r&&e(0,"BAD_SCALAR_START",`Plain value cannot start with ${r}`),my(t)}function tI(t,e){return(t[t.length-1]!=="'"||t.length===1)&&e(t.length,"MISSING_CHAR","Missing closing 'quote"),my(t.slice(1,-1)).replace(/''/g,"'")}function my(t){let e,r;try{e=new RegExp(`(.*?)(?<![ ])[ ]*\r?
109
109
  `,"sy"),r=new RegExp(`[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?
110
110
  `,"sy")}catch{e=/(.*?)[ \t]*\r?\n/sy,r=/[ \t]*(.*?)[ \t]*\r?\n/sy}let i=e.exec(t);if(!i)return t;let n=i[1],o=" ",s=e.lastIndex;for(r.lastIndex=s;i=r.exec(t);)i[1]===""?o===`
111
111
  `?n+=o:o=`
112
- `:(n+=o+i[1],o=" "),s=r.lastIndex;let a=/[ \t]*(.*)/sy;return a.lastIndex=s,i=a.exec(t),n+o+(i?.[1]??"")}function Gx(t,e){let r="";for(let i=1;i<t.length-1;++i){let n=t[i];if(!(n==="\r"&&t[i+1]===`
112
+ `:(n+=o+i[1],o=" "),s=r.lastIndex;let a=/[ \t]*(.*)/sy;return a.lastIndex=s,i=a.exec(t),n+o+(i?.[1]??"")}function nI(t,e){let r="";for(let i=1;i<t.length-1;++i){let n=t[i];if(!(n==="\r"&&t[i+1]===`
113
113
  `))if(n===`
114
- `){let{fold:o,offset:s}=Kx(t,i);r+=o,i=s}else if(n==="\\"){let o=t[++i],s=Jx[o];if(s)r+=s;else if(o===`
114
+ `){let{fold:o,offset:s}=rI(t,i);r+=o,i=s}else if(n==="\\"){let o=t[++i],s=iI[o];if(s)r+=s;else if(o===`
115
115
  `)for(o=t[i+1];o===" "||o===" ";)o=t[++i+1];else if(o==="\r"&&t[i+1]===`
116
- `)for(o=t[++i+1];o===" "||o===" ";)o=t[++i+1];else if(o==="x"||o==="u"||o==="U"){let a={x:2,u:4,U:8}[o];r+=Wx(t,i+1,a,e),i+=a}else{let a=t.substr(i-1,2);e(i-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${a}`),r+=a}}else if(n===" "||n===" "){let o=i,s=t[i+1];for(;s===" "||s===" ";)s=t[++i+1];s!==`
116
+ `)for(o=t[++i+1];o===" "||o===" ";)o=t[++i+1];else if(o==="x"||o==="u"||o==="U"){let a={x:2,u:4,U:8}[o];r+=oI(t,i+1,a,e),i+=a}else{let a=t.substr(i-1,2);e(i-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${a}`),r+=a}}else if(n===" "||n===" "){let o=i,s=t[i+1];for(;s===" "||s===" ";)s=t[++i+1];s!==`
117
117
  `&&!(s==="\r"&&t[i+2]===`
118
- `)&&(r+=i>o?t.slice(o,i+1):n)}else r+=n}return(t[t.length-1]!=='"'||t.length===1)&&e(t.length,"MISSING_CHAR",'Missing closing "quote'),r}function Kx(t,e){let r="",i=t[e+1];for(;(i===" "||i===" "||i===`
118
+ `)&&(r+=i>o?t.slice(o,i+1):n)}else r+=n}return(t[t.length-1]!=='"'||t.length===1)&&e(t.length,"MISSING_CHAR",'Missing closing "quote'),r}function rI(t,e){let r="",i=t[e+1];for(;(i===" "||i===" "||i===`
119
119
  `||i==="\r")&&!(i==="\r"&&t[e+2]!==`
120
120
  `);)i===`
121
121
  `&&(r+=`
122
- `),e+=1,i=t[e+1];return r||(r=" "),{fold:r,offset:e}}var Jx={0:"\0",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
123
- `,r:"\r",t:" ",v:"\v",N:"\x85",_:"\xA0",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function Wx(t,e,r,i){let n=t.substr(e,r),s=n.length===r&&/^[0-9a-fA-F]+$/.test(n)?parseInt(n,16):NaN;if(isNaN(s)){let a=t.substr(e-2,r+2);return i(e-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${a}`),a}return String.fromCodePoint(s)}ay.resolveFlowScalar=qx});var uy=N(ly=>{"use strict";var Ut=Z(),cy=ce(),Yx=Gc(),Hx=Jc();function Xx(t,e,r,i){let{value:n,type:o,comment:s,range:a}=e.type==="block-scalar"?Yx.resolveBlockScalar(t,e,i):Hx.resolveFlowScalar(e,t.options.strict,i),c=r?t.directives.tagName(r.source,d=>i(r,"TAG_RESOLVE_FAILED",d)):null,l;t.options.stringKeys&&t.atKey?l=t.schema[Ut.SCALAR]:c?l=Qx(t.schema,n,c,r,i):e.type==="scalar"?l=eI(t,n,e,i):l=t.schema[Ut.SCALAR];let u;try{let d=l.resolve(n,p=>i(r??e,"TAG_RESOLVE_FAILED",p),t.options);u=Ut.isScalar(d)?d:new cy.Scalar(d)}catch(d){let p=d instanceof Error?d.message:String(d);i(r??e,"TAG_RESOLVE_FAILED",p),u=new cy.Scalar(n)}return u.range=a,u.source=n,o&&(u.type=o),c&&(u.tag=c),l.format&&(u.format=l.format),s&&(u.comment=s),u}function Qx(t,e,r,i,n){if(r==="!")return t[Ut.SCALAR];let o=[];for(let a of t.tags)if(!a.collection&&a.tag===r)if(a.default&&a.test)o.push(a);else return a;for(let a of o)if(a.test?.test(e))return a;let s=t.knownTags[r];return s&&!s.collection?(t.tags.push(Object.assign({},s,{default:!1,test:void 0})),s):(n(i,"TAG_RESOLVE_FAILED",`Unresolved tag: ${r}`,r!=="tag:yaml.org,2002:str"),t[Ut.SCALAR])}function eI({atKey:t,directives:e,schema:r},i,n,o){let s=r.tags.find(a=>(a.default===!0||t&&a.default==="key")&&a.test?.test(i))||r[Ut.SCALAR];if(r.compat){let a=r.compat.find(c=>c.default&&c.test?.test(i))??r[Ut.SCALAR];if(s.tag!==a.tag){let c=e.tagString(s.tag),l=e.tagString(a.tag),u=`Value may be parsed as either ${c} or ${l}`;o(n,"TAG_RESOLVE_FAILED",u,!0)}}return s}ly.composeScalar=Xx});var py=N(dy=>{"use strict";function tI(t,e,r){if(e){r??(r=e.length);for(let i=r-1;i>=0;--i){let n=e[i];switch(n.type){case"space":case"comment":case"newline":t-=n.source.length;continue}for(n=e[++i];n?.type==="space";)t+=n.source.length,n=e[++i];break}}return t}dy.emptyScalarPosition=tI});var gy=N(Yc=>{"use strict";var nI=or(),rI=Z(),iI=iy(),fy=uy(),oI=un(),sI=py(),aI={composeNode:my,composeEmptyNode:Wc};function my(t,e,r,i){let n=t.atKey,{spaceBefore:o,comment:s,anchor:a,tag:c}=r,l,u=!0;switch(e.type){case"alias":l=cI(t,e,i),(a||c)&&i(e,"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=fy.composeScalar(t,e,c,i),a&&(l.anchor=a.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":try{l=iI.composeCollection(aI,t,e,r,i),a&&(l.anchor=a.source.substring(1))}catch(d){let p=d instanceof Error?d.message:String(d);i(e,"RESOURCE_EXHAUSTION",p)}break;default:{let d=e.type==="error"?e.message:`Unsupported token (type: ${e.type})`;i(e,"UNEXPECTED_TOKEN",d),u=!1}}return l??(l=Wc(t,e.offset,void 0,null,r,i)),a&&l.anchor===""&&i(a,"BAD_ALIAS","Anchor cannot be an empty string"),n&&t.options.stringKeys&&(!rI.isScalar(l)||typeof l.value!="string"||l.tag&&l.tag!=="tag:yaml.org,2002:str")&&i(c??e,"NON_STRING_KEY","With stringKeys, all keys must be strings"),o&&(l.spaceBefore=!0),s&&(e.type==="scalar"&&e.source===""?l.comment=s:l.commentBefore=s),t.options.keepSourceTokens&&u&&(l.srcToken=e),l}function Wc(t,e,r,i,{spaceBefore:n,comment:o,anchor:s,tag:a,end:c},l){let u={type:"scalar",offset:sI.emptyScalarPosition(e,r,i),indent:-1,source:""},d=fy.composeScalar(t,u,a,l);return s&&(d.anchor=s.source.substring(1),d.anchor===""&&l(s,"BAD_ALIAS","Anchor cannot be an empty string")),n&&(d.spaceBefore=!0),o&&(d.comment=o,d.range[2]=c),d}function cI({options:t},{offset:e,source:r,end:i},n){let o=new nI.Alias(r.substring(1));o.source===""&&n(e,"BAD_ALIAS","Alias cannot be an empty string"),o.source.endsWith(":")&&n(e+r.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);let s=e+r.length,a=oI.resolveEnd(i,s,t.strict,n);return o.range=[e,s,a.offset],a.comment&&(o.comment=a.comment),o}Yc.composeEmptyNode=Wc;Yc.composeNode=my});var _y=N(yy=>{"use strict";var lI=$r(),hy=gy(),uI=un(),dI=Ir();function pI(t,e,{offset:r,start:i,value:n,end:o},s){let a=Object.assign({_directives:e},t),c=new lI.Document(void 0,a),l={atKey:!1,atRoot:!0,directives:c.directives,options:c.options,schema:c.schema},u=dI.resolveProps(i,{indicator:"doc-start",next:n??o?.[0],offset:r,onError:s,parentIndent:0,startOnNewline:!0});u.found&&(c.directives.docStart=!0,n&&(n.type==="block-map"||n.type==="block-seq")&&!u.hasNewline&&s(u.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),c.contents=n?hy.composeNode(l,n,u,s):hy.composeEmptyNode(l,u.end,i,null,u,s);let d=c.contents.range[2],p=uI.resolveEnd(o,d,!1,s);return p.comment&&(c.comment=p.comment),c.range=[r,d,p.offset],c}yy.composeDoc=pI});var Xc=N(wy=>{"use strict";var fI=He("process"),mI=Ra(),gI=$r(),Or=xr(),vy=Z(),hI=_y(),yI=un();function Pr(t){if(typeof t=="number")return[t,t+1];if(Array.isArray(t))return t.length===2?t:[t[0],t[1]];let{offset:e,source:r}=t;return[e,e+(typeof r=="string"?r.length:1)]}function by(t){let e="",r=!1,i=!1;for(let n=0;n<t.length;++n){let o=t[n];switch(o[0]){case"#":e+=(e===""?"":i?`
122
+ `),e+=1,i=t[e+1];return r||(r=" "),{fold:r,offset:e}}var iI={0:"\0",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
123
+ `,r:"\r",t:" ",v:"\v",N:"\x85",_:"\xA0",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function oI(t,e,r,i){let n=t.substr(e,r),s=n.length===r&&/^[0-9a-fA-F]+$/.test(n)?parseInt(n,16):NaN;if(isNaN(s)){let a=t.substr(e-2,r+2);return i(e-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${a}`),a}return String.fromCodePoint(s)}gy.resolveFlowScalar=Qx});var _y=N(yy=>{"use strict";var Lt=Z(),hy=ce(),sI=Xc(),aI=el();function cI(t,e,r,i){let{value:n,type:o,comment:s,range:a}=e.type==="block-scalar"?sI.resolveBlockScalar(t,e,i):aI.resolveFlowScalar(e,t.options.strict,i),c=r?t.directives.tagName(r.source,u=>i(r,"TAG_RESOLVE_FAILED",u)):null,l;t.options.stringKeys&&t.atKey?l=t.schema[Lt.SCALAR]:c?l=lI(t.schema,n,c,r,i):e.type==="scalar"?l=uI(t,n,e,i):l=t.schema[Lt.SCALAR];let d;try{let u=l.resolve(n,p=>i(r??e,"TAG_RESOLVE_FAILED",p),t.options);d=Lt.isScalar(u)?u:new hy.Scalar(u)}catch(u){let p=u instanceof Error?u.message:String(u);i(r??e,"TAG_RESOLVE_FAILED",p),d=new hy.Scalar(n)}return d.range=a,d.source=n,o&&(d.type=o),c&&(d.tag=c),l.format&&(d.format=l.format),s&&(d.comment=s),d}function lI(t,e,r,i,n){if(r==="!")return t[Lt.SCALAR];let o=[];for(let a of t.tags)if(!a.collection&&a.tag===r)if(a.default&&a.test)o.push(a);else return a;for(let a of o)if(a.test?.test(e))return a;let s=t.knownTags[r];return s&&!s.collection?(t.tags.push(Object.assign({},s,{default:!1,test:void 0})),s):(n(i,"TAG_RESOLVE_FAILED",`Unresolved tag: ${r}`,r!=="tag:yaml.org,2002:str"),t[Lt.SCALAR])}function uI({atKey:t,directives:e,schema:r},i,n,o){let s=r.tags.find(a=>(a.default===!0||t&&a.default==="key")&&a.test?.test(i))||r[Lt.SCALAR];if(r.compat){let a=r.compat.find(c=>c.default&&c.test?.test(i))??r[Lt.SCALAR];if(s.tag!==a.tag){let c=e.tagString(s.tag),l=e.tagString(a.tag),d=`Value may be parsed as either ${c} or ${l}`;o(n,"TAG_RESOLVE_FAILED",d,!0)}}return s}yy.composeScalar=cI});var by=N(vy=>{"use strict";function dI(t,e,r){if(e){r??(r=e.length);for(let i=r-1;i>=0;--i){let n=e[i];switch(n.type){case"space":case"comment":case"newline":t-=n.source.length;continue}for(n=e[++i];n?.type==="space";)t+=n.source.length,n=e[++i];break}}return t}vy.emptyScalarPosition=dI});var ky=N(nl=>{"use strict";var pI=ar(),fI=Z(),mI=py(),wy=_y(),gI=un(),hI=by(),yI={composeNode:$y,composeEmptyNode:tl};function $y(t,e,r,i){let n=t.atKey,{spaceBefore:o,comment:s,anchor:a,tag:c}=r,l,d=!0;switch(e.type){case"alias":l=_I(t,e,i),(a||c)&&i(e,"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=wy.composeScalar(t,e,c,i),a&&(l.anchor=a.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":try{l=mI.composeCollection(yI,t,e,r,i),a&&(l.anchor=a.source.substring(1))}catch(u){let p=u instanceof Error?u.message:String(u);i(e,"RESOURCE_EXHAUSTION",p)}break;default:{let u=e.type==="error"?e.message:`Unsupported token (type: ${e.type})`;i(e,"UNEXPECTED_TOKEN",u),d=!1}}return l??(l=tl(t,e.offset,void 0,null,r,i)),a&&l.anchor===""&&i(a,"BAD_ALIAS","Anchor cannot be an empty string"),n&&t.options.stringKeys&&(!fI.isScalar(l)||typeof l.value!="string"||l.tag&&l.tag!=="tag:yaml.org,2002:str")&&i(c??e,"NON_STRING_KEY","With stringKeys, all keys must be strings"),o&&(l.spaceBefore=!0),s&&(e.type==="scalar"&&e.source===""?l.comment=s:l.commentBefore=s),t.options.keepSourceTokens&&d&&(l.srcToken=e),l}function tl(t,e,r,i,{spaceBefore:n,comment:o,anchor:s,tag:a,end:c},l){let d={type:"scalar",offset:hI.emptyScalarPosition(e,r,i),indent:-1,source:""},u=wy.composeScalar(t,d,a,l);return s&&(u.anchor=s.source.substring(1),u.anchor===""&&l(s,"BAD_ALIAS","Anchor cannot be an empty string")),n&&(u.spaceBefore=!0),o&&(u.comment=o,u.range[2]=c),u}function _I({options:t},{offset:e,source:r,end:i},n){let o=new pI.Alias(r.substring(1));o.source===""&&n(e,"BAD_ALIAS","Alias cannot be an empty string"),o.source.endsWith(":")&&n(e+r.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);let s=e+r.length,a=gI.resolveEnd(i,s,t.strict,n);return o.range=[e,s,a.offset],a.comment&&(o.comment=a.comment),o}nl.composeEmptyNode=tl;nl.composeNode=$y});var Iy=N(xy=>{"use strict";var vI=Sr(),Sy=ky(),bI=un(),wI=Pr();function $I(t,e,{offset:r,start:i,value:n,end:o},s){let a=Object.assign({_directives:e},t),c=new vI.Document(void 0,a),l={atKey:!1,atRoot:!0,directives:c.directives,options:c.options,schema:c.schema},d=wI.resolveProps(i,{indicator:"doc-start",next:n??o?.[0],offset:r,onError:s,parentIndent:0,startOnNewline:!0});d.found&&(c.directives.docStart=!0,n&&(n.type==="block-map"||n.type==="block-seq")&&!d.hasNewline&&s(d.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),c.contents=n?Sy.composeNode(l,n,d,s):Sy.composeEmptyNode(l,d.end,i,null,d,s);let u=c.contents.range[2],p=bI.resolveEnd(o,u,!1,s);return p.comment&&(c.comment=p.comment),c.range=[r,u,p.offset],c}xy.composeDoc=$I});var il=N(Ty=>{"use strict";var kI=He("process"),SI=Fa(),xI=Sr(),Tr=Or(),Oy=Z(),II=Iy(),OI=un();function Ar(t){if(typeof t=="number")return[t,t+1];if(Array.isArray(t))return t.length===2?t:[t[0],t[1]];let{offset:e,source:r}=t;return[e,e+(typeof r=="string"?r.length:1)]}function Py(t){let e="",r=!1,i=!1;for(let n=0;n<t.length;++n){let o=t[n];switch(o[0]){case"#":e+=(e===""?"":i?`
124
124
 
125
125
  `:`
126
- `)+(o.substring(1)||" "),r=!0,i=!1;break;case"%":t[n+1]?.[0]!=="#"&&(n+=1),r=!1;break;default:r||(i=!0),r=!1}}return{comment:e,afterEmptyLine:i}}var Hc=class{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(r,i,n,o)=>{let s=Pr(r);o?this.warnings.push(new Or.YAMLWarning(s,i,n)):this.errors.push(new Or.YAMLParseError(s,i,n))},this.directives=new mI.Directives({version:e.version||"1.2"}),this.options=e}decorate(e,r){let{comment:i,afterEmptyLine:n}=by(this.prelude);if(i){let o=e.contents;if(r)e.comment=e.comment?`${e.comment}
127
- ${i}`:i;else if(n||e.directives.docStart||!o)e.commentBefore=i;else if(vy.isCollection(o)&&!o.flow&&o.items.length>0){let s=o.items[0];vy.isPair(s)&&(s=s.key);let a=s.commentBefore;s.commentBefore=a?`${i}
126
+ `)+(o.substring(1)||" "),r=!0,i=!1;break;case"%":t[n+1]?.[0]!=="#"&&(n+=1),r=!1;break;default:r||(i=!0),r=!1}}return{comment:e,afterEmptyLine:i}}var rl=class{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(r,i,n,o)=>{let s=Ar(r);o?this.warnings.push(new Tr.YAMLWarning(s,i,n)):this.errors.push(new Tr.YAMLParseError(s,i,n))},this.directives=new SI.Directives({version:e.version||"1.2"}),this.options=e}decorate(e,r){let{comment:i,afterEmptyLine:n}=Py(this.prelude);if(i){let o=e.contents;if(r)e.comment=e.comment?`${e.comment}
127
+ ${i}`:i;else if(n||e.directives.docStart||!o)e.commentBefore=i;else if(Oy.isCollection(o)&&!o.flow&&o.items.length>0){let s=o.items[0];Oy.isPair(s)&&(s=s.key);let a=s.commentBefore;s.commentBefore=a?`${i}
128
128
  ${a}`:i}else{let s=o.commentBefore;o.commentBefore=s?`${i}
129
- ${s}`:i}}r?(Array.prototype.push.apply(e.errors,this.errors),Array.prototype.push.apply(e.warnings,this.warnings)):(e.errors=this.errors,e.warnings=this.warnings),this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:by(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,r=!1,i=-1){for(let n of e)yield*this.next(n);yield*this.end(r,i)}*next(e){switch(fI.env.LOG_STREAM&&console.dir(e,{depth:null}),e.type){case"directive":this.directives.add(e.source,(r,i,n)=>{let o=Pr(e);o[0]+=r,this.onError(o,"BAD_DIRECTIVE",i,n)}),this.prelude.push(e.source),this.atDirectives=!0;break;case"document":{let r=hI.composeDoc(this.options,this.directives,e,this.onError);this.atDirectives&&!r.directives.docStart&&this.onError(e,"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(e.source);break;case"error":{let r=e.source?`${e.message}: ${JSON.stringify(e.source)}`:e.message,i=new Or.YAMLParseError(Pr(e),"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 Or.YAMLParseError(Pr(e),"UNEXPECTED_TOKEN",i));break}this.doc.directives.docEnd=!0;let r=yI.resolveEnd(e.end,e.offset+e.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}
130
- ${r.comment}`:r.comment}this.doc.range[2]=r.offset;break}default:this.errors.push(new Or.YAMLParseError(Pr(e),"UNEXPECTED_TOKEN",`Unsupported token ${e.type}`))}}*end(e=!1,r=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(e){let i=Object.assign({_directives:this.directives},this.options),n=new gI.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}}};wy.Composer=Hc});var Sy=N(uo=>{"use strict";var _I=Gc(),vI=Jc(),bI=xr(),$y=ur();function wI(t,e=!0,r){if(t){let i=(n,o,s)=>{let a=typeof n=="number"?n:Array.isArray(n)?n[0]:n.offset;if(r)r(a,o,s);else throw new bI.YAMLParseError([a,a+1],o,s)};switch(t.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return vI.resolveFlowScalar(t,e,i);case"block-scalar":return _I.resolveBlockScalar({options:{strict:e}},t,i)}}return null}function $I(t,e){let{implicitKey:r=!1,indent:i,inFlow:n=!1,offset:o=-1,type:s="PLAIN"}=e,a=$y.stringifyString({type:s,value:t},{implicitKey:r,indent:i>0?" ".repeat(i):"",inFlow:n,options:{blockQuote:!0,lineWidth:-1}}),c=e.end??[{type:"newline",offset:-1,indent:i,source:`
129
+ ${s}`:i}}r?(Array.prototype.push.apply(e.errors,this.errors),Array.prototype.push.apply(e.warnings,this.warnings)):(e.errors=this.errors,e.warnings=this.warnings),this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:Py(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,r=!1,i=-1){for(let n of e)yield*this.next(n);yield*this.end(r,i)}*next(e){switch(kI.env.LOG_STREAM&&console.dir(e,{depth:null}),e.type){case"directive":this.directives.add(e.source,(r,i,n)=>{let o=Ar(e);o[0]+=r,this.onError(o,"BAD_DIRECTIVE",i,n)}),this.prelude.push(e.source),this.atDirectives=!0;break;case"document":{let r=II.composeDoc(this.options,this.directives,e,this.onError);this.atDirectives&&!r.directives.docStart&&this.onError(e,"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(e.source);break;case"error":{let r=e.source?`${e.message}: ${JSON.stringify(e.source)}`:e.message,i=new Tr.YAMLParseError(Ar(e),"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 Tr.YAMLParseError(Ar(e),"UNEXPECTED_TOKEN",i));break}this.doc.directives.docEnd=!0;let r=OI.resolveEnd(e.end,e.offset+e.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}
130
+ ${r.comment}`:r.comment}this.doc.range[2]=r.offset;break}default:this.errors.push(new Tr.YAMLParseError(Ar(e),"UNEXPECTED_TOKEN",`Unsupported token ${e.type}`))}}*end(e=!1,r=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(e){let i=Object.assign({_directives:this.directives},this.options),n=new xI.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}}};Ty.Composer=rl});var zy=N(mo=>{"use strict";var PI=Xc(),TI=el(),AI=Or(),Ay=pr();function EI(t,e=!0,r){if(t){let i=(n,o,s)=>{let a=typeof n=="number"?n:Array.isArray(n)?n[0]:n.offset;if(r)r(a,o,s);else throw new AI.YAMLParseError([a,a+1],o,s)};switch(t.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return TI.resolveFlowScalar(t,e,i);case"block-scalar":return PI.resolveBlockScalar({options:{strict:e}},t,i)}}return null}function zI(t,e){let{implicitKey:r=!1,indent:i,inFlow:n=!1,offset:o=-1,type:s="PLAIN"}=e,a=Ay.stringifyString({type:s,value:t},{implicitKey:r,indent:i>0?" ".repeat(i):"",inFlow:n,options:{blockQuote:!0,lineWidth:-1}}),c=e.end??[{type:"newline",offset:-1,indent:i,source:`
131
131
  `}];switch(a[0]){case"|":case">":{let l=a.indexOf(`
132
- `),u=a.substring(0,l),d=a.substring(l+1)+`
133
- `,p=[{type:"block-scalar-header",offset:o,indent:i,source:u}];return ky(p,c)||p.push({type:"newline",offset:-1,indent:i,source:`
134
- `}),{type:"block-scalar",offset:o,indent:i,props:p,source:d}}case'"':return{type:"double-quoted-scalar",offset:o,indent:i,source:a,end:c};case"'":return{type:"single-quoted-scalar",offset:o,indent:i,source:a,end:c};default:return{type:"scalar",offset:o,indent:i,source:a,end:c}}}function kI(t,e,r={}){let{afterKey:i=!1,implicitKey:n=!1,inFlow:o=!1,type:s}=r,a="indent"in t?t.indent:null;if(i&&typeof a=="number"&&(a+=2),!s)switch(t.type){case"single-quoted-scalar":s="QUOTE_SINGLE";break;case"double-quoted-scalar":s="QUOTE_DOUBLE";break;case"block-scalar":{let l=t.props[0];if(l.type!=="block-scalar-header")throw new Error("Invalid block scalar header");s=l.source[0]===">"?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:s="PLAIN"}let c=$y.stringifyString({type:s,value:e},{implicitKey:n||a===null,indent:a!==null&&a>0?" ".repeat(a):"",inFlow:o,options:{blockQuote:!0,lineWidth:-1}});switch(c[0]){case"|":case">":SI(t,c);break;case'"':Qc(t,c,"double-quoted-scalar");break;case"'":Qc(t,c,"single-quoted-scalar");break;default:Qc(t,c,"scalar")}}function SI(t,e){let r=e.indexOf(`
132
+ `),d=a.substring(0,l),u=a.substring(l+1)+`
133
+ `,p=[{type:"block-scalar-header",offset:o,indent:i,source:d}];return Ey(p,c)||p.push({type:"newline",offset:-1,indent:i,source:`
134
+ `}),{type:"block-scalar",offset:o,indent:i,props:p,source:u}}case'"':return{type:"double-quoted-scalar",offset:o,indent:i,source:a,end:c};case"'":return{type:"single-quoted-scalar",offset:o,indent:i,source:a,end:c};default:return{type:"scalar",offset:o,indent:i,source:a,end:c}}}function NI(t,e,r={}){let{afterKey:i=!1,implicitKey:n=!1,inFlow:o=!1,type:s}=r,a="indent"in t?t.indent:null;if(i&&typeof a=="number"&&(a+=2),!s)switch(t.type){case"single-quoted-scalar":s="QUOTE_SINGLE";break;case"double-quoted-scalar":s="QUOTE_DOUBLE";break;case"block-scalar":{let l=t.props[0];if(l.type!=="block-scalar-header")throw new Error("Invalid block scalar header");s=l.source[0]===">"?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:s="PLAIN"}let c=Ay.stringifyString({type:s,value:e},{implicitKey:n||a===null,indent:a!==null&&a>0?" ".repeat(a):"",inFlow:o,options:{blockQuote:!0,lineWidth:-1}});switch(c[0]){case"|":case">":CI(t,c);break;case'"':ol(t,c,"double-quoted-scalar");break;case"'":ol(t,c,"single-quoted-scalar");break;default:ol(t,c,"scalar")}}function CI(t,e){let r=e.indexOf(`
135
135
  `),i=e.substring(0,r),n=e.substring(r+1)+`
136
- `;if(t.type==="block-scalar"){let o=t.props[0];if(o.type!=="block-scalar-header")throw new Error("Invalid block scalar header");o.source=i,t.source=n}else{let{offset:o}=t,s="indent"in t?t.indent:-1,a=[{type:"block-scalar-header",offset:o,indent:s,source:i}];ky(a,"end"in t?t.end:void 0)||a.push({type:"newline",offset:-1,indent:s,source:`
137
- `});for(let c of Object.keys(t))c!=="type"&&c!=="offset"&&delete t[c];Object.assign(t,{type:"block-scalar",indent:s,props:a,source:n})}}function ky(t,e){if(e)for(let r of e)switch(r.type){case"space":case"comment":t.push(r);break;case"newline":return t.push(r),!0}return!1}function Qc(t,e,r){switch(t.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":t.type=r,t.source=e;break;case"block-scalar":{let i=t.props.slice(1),n=e.length;t.props[0].type==="block-scalar-header"&&(n-=t.props[0].source.length);for(let o of i)o.offset+=n;delete t.props,Object.assign(t,{type:r,source:e,end:i});break}case"block-map":case"block-seq":{let n={type:"newline",offset:t.offset+e.length,indent:t.indent,source:`
138
- `};delete t.items,Object.assign(t,{type:r,source:e,end:[n]});break}default:{let i="indent"in t?t.indent:-1,n="end"in t&&Array.isArray(t.end)?t.end.filter(o=>o.type==="space"||o.type==="comment"||o.type==="newline"):[];for(let o of Object.keys(t))o!=="type"&&o!=="offset"&&delete t[o];Object.assign(t,{type:r,indent:i,source:e,end:n})}}}uo.createScalarToken=$I;uo.resolveAsScalar=wI;uo.setScalarValue=kI});var Iy=N(xy=>{"use strict";var xI=t=>"type"in t?fo(t):po(t);function fo(t){switch(t.type){case"block-scalar":{let e="";for(let r of t.props)e+=fo(r);return e+t.source}case"block-map":case"block-seq":{let e="";for(let r of t.items)e+=po(r);return e}case"flow-collection":{let e=t.start.source;for(let r of t.items)e+=po(r);for(let r of t.end)e+=r.source;return e}case"document":{let e=po(t);if(t.end)for(let r of t.end)e+=r.source;return e}default:{let e=t.source;if("end"in t&&t.end)for(let r of t.end)e+=r.source;return e}}}function po({start:t,key:e,sep:r,value:i}){let n="";for(let o of t)n+=o.source;if(e&&(n+=fo(e)),r)for(let o of r)n+=o.source;return i&&(n+=fo(i)),n}xy.stringify=xI});var Ay=N(Ty=>{"use strict";var el=Symbol("break visit"),II=Symbol("skip children"),Oy=Symbol("remove item");function Lt(t,e){"type"in t&&t.type==="document"&&(t={start:t.start,value:t.value}),Py(Object.freeze([]),t,e)}Lt.BREAK=el;Lt.SKIP=II;Lt.REMOVE=Oy;Lt.itemAtPath=(t,e)=>{let r=t;for(let[i,n]of e){let o=r?.[i];if(o&&"items"in o)r=o.items[n];else return}return r};Lt.parentCollection=(t,e)=>{let r=Lt.itemAtPath(t,e.slice(0,-1)),i=e[e.length-1][0],n=r?.[i];if(n&&"items"in n)return n;throw new Error("Parent collection not found")};function Py(t,e,r){let i=r(e,t);if(typeof i=="symbol")return i;for(let n of["key","value"]){let o=e[n];if(o&&"items"in o){for(let s=0;s<o.items.length;++s){let a=Py(Object.freeze(t.concat([[n,s]])),o.items[s],r);if(typeof a=="number")s=a-1;else{if(a===el)return el;a===Oy&&(o.items.splice(s,1),s-=1)}}typeof i=="function"&&n==="key"&&(i=i(e,t))}}return typeof i=="function"?i(e,t):i}Ty.visit=Lt});var mo=N(we=>{"use strict";var tl=Sy(),OI=Iy(),PI=Ay(),nl="\uFEFF",rl="",il="",ol="",TI=t=>!!t&&"items"in t,AI=t=>!!t&&(t.type==="scalar"||t.type==="single-quoted-scalar"||t.type==="double-quoted-scalar"||t.type==="block-scalar");function EI(t){switch(t){case nl:return"<BOM>";case rl:return"<DOC>";case il:return"<FLOW_END>";case ol:return"<SCALAR>";default:return JSON.stringify(t)}}function zI(t){switch(t){case nl:return"byte-order-mark";case rl:return"doc-mode";case il:return"flow-error-end";case ol:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case`
136
+ `;if(t.type==="block-scalar"){let o=t.props[0];if(o.type!=="block-scalar-header")throw new Error("Invalid block scalar header");o.source=i,t.source=n}else{let{offset:o}=t,s="indent"in t?t.indent:-1,a=[{type:"block-scalar-header",offset:o,indent:s,source:i}];Ey(a,"end"in t?t.end:void 0)||a.push({type:"newline",offset:-1,indent:s,source:`
137
+ `});for(let c of Object.keys(t))c!=="type"&&c!=="offset"&&delete t[c];Object.assign(t,{type:"block-scalar",indent:s,props:a,source:n})}}function Ey(t,e){if(e)for(let r of e)switch(r.type){case"space":case"comment":t.push(r);break;case"newline":return t.push(r),!0}return!1}function ol(t,e,r){switch(t.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":t.type=r,t.source=e;break;case"block-scalar":{let i=t.props.slice(1),n=e.length;t.props[0].type==="block-scalar-header"&&(n-=t.props[0].source.length);for(let o of i)o.offset+=n;delete t.props,Object.assign(t,{type:r,source:e,end:i});break}case"block-map":case"block-seq":{let n={type:"newline",offset:t.offset+e.length,indent:t.indent,source:`
138
+ `};delete t.items,Object.assign(t,{type:r,source:e,end:[n]});break}default:{let i="indent"in t?t.indent:-1,n="end"in t&&Array.isArray(t.end)?t.end.filter(o=>o.type==="space"||o.type==="comment"||o.type==="newline"):[];for(let o of Object.keys(t))o!=="type"&&o!=="offset"&&delete t[o];Object.assign(t,{type:r,indent:i,source:e,end:n})}}}mo.createScalarToken=zI;mo.resolveAsScalar=EI;mo.setScalarValue=NI});var Cy=N(Ny=>{"use strict";var DI=t=>"type"in t?ho(t):go(t);function ho(t){switch(t.type){case"block-scalar":{let e="";for(let r of t.props)e+=ho(r);return e+t.source}case"block-map":case"block-seq":{let e="";for(let r of t.items)e+=go(r);return e}case"flow-collection":{let e=t.start.source;for(let r of t.items)e+=go(r);for(let r of t.end)e+=r.source;return e}case"document":{let e=go(t);if(t.end)for(let r of t.end)e+=r.source;return e}default:{let e=t.source;if("end"in t&&t.end)for(let r of t.end)e+=r.source;return e}}}function go({start:t,key:e,sep:r,value:i}){let n="";for(let o of t)n+=o.source;if(e&&(n+=ho(e)),r)for(let o of r)n+=o.source;return i&&(n+=ho(i)),n}Ny.stringify=DI});var Uy=N(Ry=>{"use strict";var sl=Symbol("break visit"),jI=Symbol("skip children"),Dy=Symbol("remove item");function Mt(t,e){"type"in t&&t.type==="document"&&(t={start:t.start,value:t.value}),jy(Object.freeze([]),t,e)}Mt.BREAK=sl;Mt.SKIP=jI;Mt.REMOVE=Dy;Mt.itemAtPath=(t,e)=>{let r=t;for(let[i,n]of e){let o=r?.[i];if(o&&"items"in o)r=o.items[n];else return}return r};Mt.parentCollection=(t,e)=>{let r=Mt.itemAtPath(t,e.slice(0,-1)),i=e[e.length-1][0],n=r?.[i];if(n&&"items"in n)return n;throw new Error("Parent collection not found")};function jy(t,e,r){let i=r(e,t);if(typeof i=="symbol")return i;for(let n of["key","value"]){let o=e[n];if(o&&"items"in o){for(let s=0;s<o.items.length;++s){let a=jy(Object.freeze(t.concat([[n,s]])),o.items[s],r);if(typeof a=="number")s=a-1;else{if(a===sl)return sl;a===Dy&&(o.items.splice(s,1),s-=1)}}typeof i=="function"&&n==="key"&&(i=i(e,t))}}return typeof i=="function"?i(e,t):i}Ry.visit=Mt});var yo=N(we=>{"use strict";var al=zy(),RI=Cy(),UI=Uy(),cl="\uFEFF",ll="",ul="",dl="",LI=t=>!!t&&"items"in t,MI=t=>!!t&&(t.type==="scalar"||t.type==="single-quoted-scalar"||t.type==="double-quoted-scalar"||t.type==="block-scalar");function qI(t){switch(t){case cl:return"<BOM>";case ll:return"<DOC>";case ul:return"<FLOW_END>";case dl:return"<SCALAR>";default:return JSON.stringify(t)}}function ZI(t){switch(t){case cl:return"byte-order-mark";case ll:return"doc-mode";case ul:return"flow-error-end";case dl:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case`
139
139
  `:case`\r
140
- `: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(t[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}we.createScalarToken=tl.createScalarToken;we.resolveAsScalar=tl.resolveAsScalar;we.setScalarValue=tl.setScalarValue;we.stringify=OI.stringify;we.visit=PI.visit;we.BOM=nl;we.DOCUMENT=rl;we.FLOW_END=il;we.SCALAR=ol;we.isCollection=TI;we.isScalar=AI;we.prettyToken=EI;we.tokenType=zI});var cl=N(zy=>{"use strict";var Tr=mo();function Ue(t){switch(t){case void 0:case" ":case`
141
- `:case"\r":case" ":return!0;default:return!1}}var Ey=new Set("0123456789ABCDEFabcdef"),NI=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),go=new Set(",[]{}"),CI=new Set(` ,[]{}
142
- \r `),sl=t=>!t||CI.has(t),al=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(e,r=!1){if(e){if(typeof e!="string")throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+e:e,this.lineEndPos=null}this.atEnd=!r;let i=this.next??"stream";for(;i&&(r||this.hasChars(1));)i=yield*this.parseNext(i)}atLineEnd(){let e=this.pos,r=this.buffer[e];for(;r===" "||r===" ";)r=this.buffer[++e];return!r||r==="#"||r===`
140
+ `: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(t[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}we.createScalarToken=al.createScalarToken;we.resolveAsScalar=al.resolveAsScalar;we.setScalarValue=al.setScalarValue;we.stringify=RI.stringify;we.visit=UI.visit;we.BOM=cl;we.DOCUMENT=ll;we.FLOW_END=ul;we.SCALAR=dl;we.isCollection=LI;we.isScalar=MI;we.prettyToken=qI;we.tokenType=ZI});var ml=N(My=>{"use strict";var Er=yo();function Le(t){switch(t){case void 0:case" ":case`
141
+ `:case"\r":case" ":return!0;default:return!1}}var Ly=new Set("0123456789ABCDEFabcdef"),FI=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),_o=new Set(",[]{}"),BI=new Set(` ,[]{}
142
+ \r `),pl=t=>!t||BI.has(t),fl=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(e,r=!1){if(e){if(typeof e!="string")throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+e:e,this.lineEndPos=null}this.atEnd=!r;let i=this.next??"stream";for(;i&&(r||this.hasChars(1));)i=yield*this.parseNext(i)}atLineEnd(){let e=this.pos,r=this.buffer[e];for(;r===" "||r===" ";)r=this.buffer[++e];return!r||r==="#"||r===`
143
143
  `?!0:r==="\r"?this.buffer[e+1]===`
144
144
  `:!1}charAt(e){return this.buffer[this.pos+e]}continueScalar(e){let r=this.buffer[e];if(this.indentNext>0){let i=0;for(;r===" ";)r=this.buffer[++i+e];if(r==="\r"){let n=this.buffer[i+e+1];if(n===`
145
145
  `||!n&&!this.atEnd)return e+i+1}return r===`
146
- `||i>=this.indentNext||!r&&!this.atEnd?e+i:-1}if(r==="-"||r==="."){let i=this.buffer.substr(e,3);if((i==="---"||i==="...")&&Ue(this.buffer[e+3]))return-1}return e}getLine(){let e=this.lineEndPos;return(typeof e!="number"||e!==-1&&e<this.pos)&&(e=this.buffer.indexOf(`
147
- `,this.pos),this.lineEndPos=e),e===-1?this.atEnd?this.buffer.substring(this.pos):null:(this.buffer[e-1]==="\r"&&(e-=1),this.buffer.substring(this.pos,e))}hasChars(e){return this.pos+e<=this.buffer.length}setNext(e){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=e,null}peek(e){return this.buffer.substr(this.pos,e)}*parseNext(e){switch(e){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 e=this.getLine();if(e===null)return this.setNext("stream");if(e[0]===Tr.BOM&&(yield*this.pushCount(1),e=e.substring(1)),e[0]==="%"){let r=e.length,i=e.indexOf("#");for(;i!==-1;){let o=e[i-1];if(o===" "||o===" "){r=i-1;break}else i=e.indexOf("#",i+1)}for(;;){let o=e[r-1];if(o===" "||o===" ")r-=1;else break}let n=(yield*this.pushCount(r))+(yield*this.pushSpaces(!0));return yield*this.pushCount(e.length-n),this.pushNewline(),"stream"}if(this.atLineEnd()){let r=yield*this.pushSpaces(!0);return yield*this.pushCount(e.length-r),yield*this.pushNewline(),"stream"}return yield Tr.DOCUMENT,yield*this.parseLineStart()}*parseLineStart(){let e=this.charAt(0);if(!e&&!this.atEnd)return this.setNext("line-start");if(e==="-"||e==="."){if(!this.atEnd&&!this.hasChars(4))return this.setNext("line-start");let r=this.peek(3);if((r==="---"||r==="...")&&Ue(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&&!Ue(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){let[e,r]=this.peek(2);if(!r&&!this.atEnd)return this.setNext("block-start");if((e==="-"||e==="?"||e===":")&&Ue(r)){let i=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=i,yield*this.parseBlockStart()}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);let e=this.getLine();if(e===null)return this.setNext("doc");let r=yield*this.pushIndicators();switch(e[r]){case"#":yield*this.pushCount(e.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(sl),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return r+=yield*this.parseBlockScalarHeader(),r+=yield*this.pushSpaces(!0),yield*this.pushCount(e.length-r),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let e,r,i=-1;do e=yield*this.pushNewline(),e>0?(r=yield*this.pushSpaces(!1),this.indentValue=i=r):r=0,r+=yield*this.pushSpaces(!0);while(e+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("..."))&&Ue(n[3]))&&!(i===this.indentNext-1&&this.flowLevel===1&&(n[0]==="]"||n[0]==="}")))return this.flowLevel=0,yield Tr.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(sl),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{let s=this.charAt(1);if(this.flowKey||Ue(s)||s===",")return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),"flow"}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){let e=this.charAt(0),r=this.buffer.indexOf(e,this.pos+1);if(e==="'")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(`
146
+ `||i>=this.indentNext||!r&&!this.atEnd?e+i:-1}if(r==="-"||r==="."){let i=this.buffer.substr(e,3);if((i==="---"||i==="...")&&Le(this.buffer[e+3]))return-1}return e}getLine(){let e=this.lineEndPos;return(typeof e!="number"||e!==-1&&e<this.pos)&&(e=this.buffer.indexOf(`
147
+ `,this.pos),this.lineEndPos=e),e===-1?this.atEnd?this.buffer.substring(this.pos):null:(this.buffer[e-1]==="\r"&&(e-=1),this.buffer.substring(this.pos,e))}hasChars(e){return this.pos+e<=this.buffer.length}setNext(e){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=e,null}peek(e){return this.buffer.substr(this.pos,e)}*parseNext(e){switch(e){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 e=this.getLine();if(e===null)return this.setNext("stream");if(e[0]===Er.BOM&&(yield*this.pushCount(1),e=e.substring(1)),e[0]==="%"){let r=e.length,i=e.indexOf("#");for(;i!==-1;){let o=e[i-1];if(o===" "||o===" "){r=i-1;break}else i=e.indexOf("#",i+1)}for(;;){let o=e[r-1];if(o===" "||o===" ")r-=1;else break}let n=(yield*this.pushCount(r))+(yield*this.pushSpaces(!0));return yield*this.pushCount(e.length-n),this.pushNewline(),"stream"}if(this.atLineEnd()){let r=yield*this.pushSpaces(!0);return yield*this.pushCount(e.length-r),yield*this.pushNewline(),"stream"}return yield Er.DOCUMENT,yield*this.parseLineStart()}*parseLineStart(){let e=this.charAt(0);if(!e&&!this.atEnd)return this.setNext("line-start");if(e==="-"||e==="."){if(!this.atEnd&&!this.hasChars(4))return this.setNext("line-start");let r=this.peek(3);if((r==="---"||r==="...")&&Le(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&&!Le(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){let[e,r]=this.peek(2);if(!r&&!this.atEnd)return this.setNext("block-start");if((e==="-"||e==="?"||e===":")&&Le(r)){let i=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=i,yield*this.parseBlockStart()}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);let e=this.getLine();if(e===null)return this.setNext("doc");let r=yield*this.pushIndicators();switch(e[r]){case"#":yield*this.pushCount(e.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(pl),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return r+=yield*this.parseBlockScalarHeader(),r+=yield*this.pushSpaces(!0),yield*this.pushCount(e.length-r),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let e,r,i=-1;do e=yield*this.pushNewline(),e>0?(r=yield*this.pushSpaces(!1),this.indentValue=i=r):r=0,r+=yield*this.pushSpaces(!0);while(e+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("..."))&&Le(n[3]))&&!(i===this.indentNext-1&&this.flowLevel===1&&(n[0]==="]"||n[0]==="}")))return this.flowLevel=0,yield Er.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(pl),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{let s=this.charAt(1);if(this.flowKey||Le(s)||s===",")return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),"flow"}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){let e=this.charAt(0),r=this.buffer.indexOf(e,this.pos+1);if(e==="'")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(`
148
148
  `,this.pos);if(n!==-1){for(;n!==-1;){let o=this.continueScalar(n+1);if(o===-1)break;n=i.indexOf(`
149
- `,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 e=this.pos;for(;;){let r=this.buffer[++e];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=>Ue(r)||r==="#")}*parseBlockScalar(){let e=this.pos-1,r=0,i;e:for(let o=this.pos;i=this.buffer[o];++o)switch(i){case" ":r+=1;break;case`
149
+ `,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 e=this.pos;for(;;){let r=this.buffer[++e];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=>Le(r)||r==="#")}*parseBlockScalar(){let e=this.pos-1,r=0,i;e:for(let o=this.pos;i=this.buffer[o];++o)switch(i){case" ":r+=1;break;case`
150
150
  `:e=o,r=0;break;case"\r":{let s=this.buffer[o+1];if(!s&&!this.atEnd)return this.setNext("block-scalar");if(s===`
151
151
  `)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(e+1);if(o===-1)break;e=this.buffer.indexOf(`
152
152
  `,o)}while(e!==-1);if(e===-1){if(!this.atEnd)return this.setNext("block-scalar");e=this.buffer.length}}let n=e+1;for(i=this.buffer[n];i===" ";)i=this.buffer[++n];if(i===" "){for(;i===" "||i===" "||i==="\r"||i===`
153
153
  `;)i=this.buffer[++n];e=n-1}else if(!this.blockScalarKeep)do{let o=e-1,s=this.buffer[o];s==="\r"&&(s=this.buffer[--o]);let a=o;for(;s===" ";)s=this.buffer[--o];if(s===`
154
- `&&o>=this.pos&&o+1+r>a)e=o;else break}while(!0);return yield Tr.SCALAR,yield*this.pushToIndex(e+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){let e=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(Ue(o)||e&&go.has(o))break;r=i}else if(Ue(n)){let o=this.buffer[i+1];if(n==="\r"&&(o===`
154
+ `&&o>=this.pos&&o+1+r>a)e=o;else break}while(!0);return yield Er.SCALAR,yield*this.pushToIndex(e+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){let e=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(Le(o)||e&&_o.has(o))break;r=i}else if(Le(n)){let o=this.buffer[i+1];if(n==="\r"&&(o===`
155
155
  `?(i+=1,n=`
156
- `,o=this.buffer[i+1]):r=i),o==="#"||e&&go.has(o))break;if(n===`
157
- `){let s=this.continueScalar(i+1);if(s===-1)break;i=Math.max(i,s-2)}}else{if(e&&go.has(n))break;r=i}return!n&&!this.atEnd?this.setNext("plain-scalar"):(yield Tr.SCALAR,yield*this.pushToIndex(r+1,!0),e?"flow":"doc")}*pushCount(e){return e>0?(yield this.buffer.substr(this.pos,e),this.pos+=e,e):0}*pushToIndex(e,r){let i=this.buffer.slice(this.pos,e);return i?(yield i,this.pos+=i.length,i.length):(r&&(yield""),0)}*pushIndicators(){switch(this.charAt(0)){case"!":return(yield*this.pushTag())+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"&":return(yield*this.pushUntil(sl))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{let e=this.flowLevel>0,r=this.charAt(1);if(Ue(r)||e&&go.has(r))return e?this.flowKey&&(this.flowKey=!1):this.indentNext=this.indentValue+1,(yield*this.pushCount(1))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators())}}return 0}*pushTag(){if(this.charAt(1)==="<"){let e=this.pos+2,r=this.buffer[e];for(;!Ue(r)&&r!==">";)r=this.buffer[++e];return yield*this.pushToIndex(r===">"?e+1:e,!1)}else{let e=this.pos+1,r=this.buffer[e];for(;r;)if(NI.has(r))r=this.buffer[++e];else if(r==="%"&&Ey.has(this.buffer[e+1])&&Ey.has(this.buffer[e+2]))r=this.buffer[e+=3];else break;return yield*this.pushToIndex(e,!1)}}*pushNewline(){let e=this.buffer[this.pos];return e===`
156
+ `,o=this.buffer[i+1]):r=i),o==="#"||e&&_o.has(o))break;if(n===`
157
+ `){let s=this.continueScalar(i+1);if(s===-1)break;i=Math.max(i,s-2)}}else{if(e&&_o.has(n))break;r=i}return!n&&!this.atEnd?this.setNext("plain-scalar"):(yield Er.SCALAR,yield*this.pushToIndex(r+1,!0),e?"flow":"doc")}*pushCount(e){return e>0?(yield this.buffer.substr(this.pos,e),this.pos+=e,e):0}*pushToIndex(e,r){let i=this.buffer.slice(this.pos,e);return i?(yield i,this.pos+=i.length,i.length):(r&&(yield""),0)}*pushIndicators(){switch(this.charAt(0)){case"!":return(yield*this.pushTag())+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"&":return(yield*this.pushUntil(pl))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{let e=this.flowLevel>0,r=this.charAt(1);if(Le(r)||e&&_o.has(r))return e?this.flowKey&&(this.flowKey=!1):this.indentNext=this.indentValue+1,(yield*this.pushCount(1))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators())}}return 0}*pushTag(){if(this.charAt(1)==="<"){let e=this.pos+2,r=this.buffer[e];for(;!Le(r)&&r!==">";)r=this.buffer[++e];return yield*this.pushToIndex(r===">"?e+1:e,!1)}else{let e=this.pos+1,r=this.buffer[e];for(;r;)if(FI.has(r))r=this.buffer[++e];else if(r==="%"&&Ly.has(this.buffer[e+1])&&Ly.has(this.buffer[e+2]))r=this.buffer[e+=3];else break;return yield*this.pushToIndex(e,!1)}}*pushNewline(){let e=this.buffer[this.pos];return e===`
158
158
  `?yield*this.pushCount(1):e==="\r"&&this.charAt(1)===`
159
- `?yield*this.pushCount(2):0}*pushSpaces(e){let r=this.pos-1,i;do i=this.buffer[++r];while(i===" "||e&&i===" ");let n=r-this.pos;return n>0&&(yield this.buffer.substr(this.pos,n),this.pos=r),n}*pushUntil(e){let r=this.pos,i=this.buffer[r];for(;!e(i);)i=this.buffer[++r];return yield*this.pushToIndex(r,!1)}};zy.Lexer=al});var ul=N(Ny=>{"use strict";var ll=class{constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let r=0,i=this.lineStarts.length;for(;r<i;){let o=r+i>>1;this.lineStarts[o]<e?r=o+1:i=o}if(this.lineStarts[r]===e)return{line:r+1,col:1};if(r===0)return{line:0,col:e};let n=this.lineStarts[r-1];return{line:r,col:e-n+1}}}};Ny.LineCounter=ll});var pl=N(Uy=>{"use strict";var DI=He("process"),Cy=mo(),jI=cl();function yt(t,e){for(let r=0;r<t.length;++r)if(t[r].type===e)return!0;return!1}function Dy(t){for(let e=0;e<t.length;++e)switch(t[e].type){case"space":case"comment":case"newline":break;default:return e}return-1}function Ry(t){switch(t?.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function ho(t){switch(t.type){case"document":return t.start;case"block-map":{let e=t.items[t.items.length-1];return e.sep??e.start}case"block-seq":return t.items[t.items.length-1].start;default:return[]}}function dn(t){if(t.length===0)return[];let e=t.length;e:for(;--e>=0;)switch(t[e].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;t[++e]?.type==="space";);return t.splice(e,t.length)}function jy(t){if(t.start.type==="flow-seq-start")for(let e of t.items)e.sep&&!e.value&&!yt(e.start,"explicit-key-ind")&&!yt(e.sep,"map-value-ind")&&(e.key&&(e.value=e.key),delete e.key,Ry(e.value)?e.value.end?Array.prototype.push.apply(e.value.end,e.sep):e.value.end=e.sep:Array.prototype.push.apply(e.start,e.sep),delete e.sep)}var dl=class{constructor(e){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new jI.Lexer,this.onNewLine=e}*parse(e,r=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(let i of this.lexer.lex(e,r))yield*this.next(i);r||(yield*this.end())}*next(e){if(this.source=e,DI.env.LOG_TOKENS&&console.log("|",Cy.prettyToken(e)),this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=e.length;return}let r=Cy.tokenType(e);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+e.length);break;case"space":this.atNewLine&&e[0]===" "&&(this.indent+=e.length);break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":this.atNewLine&&(this.indent+=e.length);break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=e.length}else{let i=`Not a YAML token: ${e}`;yield*this.pop({type:"error",offset:this.offset,message:i,source:e}),this.offset+=e.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 e=this.peek(1);if(this.type==="doc-end"&&e?.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(!e)return yield*this.stream();switch(e.type){case"document":return yield*this.document(e);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(e);case"block-scalar":return yield*this.blockScalar(e);case"block-map":return yield*this.blockMap(e);case"block-seq":return yield*this.blockSequence(e);case"flow-collection":return yield*this.flowCollection(e);case"doc-end":return yield*this.documentEnd(e)}yield*this.pop()}peek(e){return this.stack[this.stack.length-e]}*pop(e){let r=e??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"&&jy(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&&Dy(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 e={type:"document",offset:this.offset,start:[]};this.type==="doc-start"&&e.start.push(this.sourceToken),this.stack.push(e);return}}yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML stream`,source:this.source}}*document(e){if(e.value)return yield*this.lineEnd(e);switch(this.type){case"doc-start":{Dy(e.start)!==-1?(yield*this.pop(),yield*this.step()):e.start.push(this.sourceToken);return}case"anchor":case"tag":case"space":case"comment":case"newline":e.start.push(this.sourceToken);return}let r=this.startBlockValue(e);r?this.stack.push(r):yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML document`,source:this.source}}*scalar(e){if(this.type==="map-value-ind"){let r=ho(this.peek(2)),i=dn(r),n;e.end?(n=e.end,n.push(this.sourceToken),delete e.end):n=[this.sourceToken];let o={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:i,key:e,sep:n}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=o}else yield*this.lineEnd(e)}*blockScalar(e){switch(this.type){case"space":case"comment":case"newline":e.props.push(this.sourceToken);return;case"scalar":if(e.source=this.source,this.atNewLine=!0,this.indent=0,this.onNewLine){let r=this.source.indexOf(`
159
+ `?yield*this.pushCount(2):0}*pushSpaces(e){let r=this.pos-1,i;do i=this.buffer[++r];while(i===" "||e&&i===" ");let n=r-this.pos;return n>0&&(yield this.buffer.substr(this.pos,n),this.pos=r),n}*pushUntil(e){let r=this.pos,i=this.buffer[r];for(;!e(i);)i=this.buffer[++r];return yield*this.pushToIndex(r,!1)}};My.Lexer=fl});var hl=N(qy=>{"use strict";var gl=class{constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let r=0,i=this.lineStarts.length;for(;r<i;){let o=r+i>>1;this.lineStarts[o]<e?r=o+1:i=o}if(this.lineStarts[r]===e)return{line:r+1,col:1};if(r===0)return{line:0,col:e};let n=this.lineStarts[r-1];return{line:r,col:e-n+1}}}};qy.LineCounter=gl});var _l=N(Gy=>{"use strict";var VI=He("process"),Zy=yo(),GI=ml();function ht(t,e){for(let r=0;r<t.length;++r)if(t[r].type===e)return!0;return!1}function Fy(t){for(let e=0;e<t.length;++e)switch(t[e].type){case"space":case"comment":case"newline":break;default:return e}return-1}function Vy(t){switch(t?.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function vo(t){switch(t.type){case"document":return t.start;case"block-map":{let e=t.items[t.items.length-1];return e.sep??e.start}case"block-seq":return t.items[t.items.length-1].start;default:return[]}}function dn(t){if(t.length===0)return[];let e=t.length;e:for(;--e>=0;)switch(t[e].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;t[++e]?.type==="space";);return t.splice(e,t.length)}function By(t){if(t.start.type==="flow-seq-start")for(let e of t.items)e.sep&&!e.value&&!ht(e.start,"explicit-key-ind")&&!ht(e.sep,"map-value-ind")&&(e.key&&(e.value=e.key),delete e.key,Vy(e.value)?e.value.end?Array.prototype.push.apply(e.value.end,e.sep):e.value.end=e.sep:Array.prototype.push.apply(e.start,e.sep),delete e.sep)}var yl=class{constructor(e){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new GI.Lexer,this.onNewLine=e}*parse(e,r=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(let i of this.lexer.lex(e,r))yield*this.next(i);r||(yield*this.end())}*next(e){if(this.source=e,VI.env.LOG_TOKENS&&console.log("|",Zy.prettyToken(e)),this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=e.length;return}let r=Zy.tokenType(e);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+e.length);break;case"space":this.atNewLine&&e[0]===" "&&(this.indent+=e.length);break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":this.atNewLine&&(this.indent+=e.length);break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=e.length}else{let i=`Not a YAML token: ${e}`;yield*this.pop({type:"error",offset:this.offset,message:i,source:e}),this.offset+=e.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 e=this.peek(1);if(this.type==="doc-end"&&e?.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(!e)return yield*this.stream();switch(e.type){case"document":return yield*this.document(e);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(e);case"block-scalar":return yield*this.blockScalar(e);case"block-map":return yield*this.blockMap(e);case"block-seq":return yield*this.blockSequence(e);case"flow-collection":return yield*this.flowCollection(e);case"doc-end":return yield*this.documentEnd(e)}yield*this.pop()}peek(e){return this.stack[this.stack.length-e]}*pop(e){let r=e??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"&&By(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&&Fy(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 e={type:"document",offset:this.offset,start:[]};this.type==="doc-start"&&e.start.push(this.sourceToken),this.stack.push(e);return}}yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML stream`,source:this.source}}*document(e){if(e.value)return yield*this.lineEnd(e);switch(this.type){case"doc-start":{Fy(e.start)!==-1?(yield*this.pop(),yield*this.step()):e.start.push(this.sourceToken);return}case"anchor":case"tag":case"space":case"comment":case"newline":e.start.push(this.sourceToken);return}let r=this.startBlockValue(e);r?this.stack.push(r):yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML document`,source:this.source}}*scalar(e){if(this.type==="map-value-ind"){let r=vo(this.peek(2)),i=dn(r),n;e.end?(n=e.end,n.push(this.sourceToken),delete e.end):n=[this.sourceToken];let o={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:i,key:e,sep:n}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=o}else yield*this.lineEnd(e)}*blockScalar(e){switch(this.type){case"space":case"comment":case"newline":e.props.push(this.sourceToken);return;case"scalar":if(e.source=this.source,this.atNewLine=!0,this.indent=0,this.onNewLine){let r=this.source.indexOf(`
160
160
  `)+1;for(;r!==0;)this.onNewLine(this.offset+r),r=this.source.indexOf(`
161
- `,r)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(e){let r=e.items[e.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):e.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)e.items.push({start:[this.sourceToken]});else if(r.sep)r.sep.push(this.sourceToken);else{if(this.atIndentedComment(r.start,e.indent)){let n=e.items[e.items.length-2]?.value?.end;if(Array.isArray(n)){Array.prototype.push.apply(n,r.start),n.push(this.sourceToken),e.items.pop();return}}r.start.push(this.sourceToken)}return}if(this.indent>=e.indent){let i=!this.onKeyLine&&this.indent===e.indent,n=i&&(r.sep||r.explicitKey)&&this.type!=="seq-item-ind",o=[];if(n&&r.sep&&!r.value){let s=[];for(let a=0;a<r.sep.length;++a){let c=r.sep[a];switch(c.type){case"newline":s.push(a);break;case"space":break;case"comment":c.indent>e.indent&&(s.length=0);break;default:s.length=0}}s.length>=2&&(o=r.sep.splice(s[1]))}switch(this.type){case"anchor":case"tag":n||r.value?(o.push(this.sourceToken),e.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),e.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)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(yt(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(Ry(r.key)&&!yt(r.sep,"newline")){let s=dn(r.start),a=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:s,key:a,sep:c}]})}else o.length>0?r.sep=r.sep.concat(o,this.sourceToken):r.sep.push(this.sourceToken);else if(yt(r.start,"newline"))Object.assign(r,{key:null,sep:[this.sourceToken]});else{let s=dn(r.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:s,key:null,sep:[this.sourceToken]}]})}else r.sep?r.value||n?e.items.push({start:o,key:null,sep:[this.sourceToken]}):yt(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 s=this.flowScalar(this.type);n||r.value?(e.items.push({start:o,key:s,sep:[]}),this.onKeyLine=!0):r.sep?this.stack.push(s):(Object.assign(r,{key:s,sep:[]}),this.onKeyLine=!0);return}default:{let s=this.startBlockValue(e);if(s){if(s.type==="block-seq"){if(!r.explicitKey&&r.sep&&!yt(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&&e.items.push({start:o});this.stack.push(s);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(e){let r=e.items[e.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):e.items.push({start:[this.sourceToken]})}else r.start.push(this.sourceToken);return;case"space":case"comment":if(r.value)e.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(r.start,e.indent)){let n=e.items[e.items.length-2]?.value?.end;if(Array.isArray(n)){Array.prototype.push.apply(n,r.start),n.push(this.sourceToken),e.items.pop();return}}r.start.push(this.sourceToken)}return;case"anchor":case"tag":if(r.value||this.indent<=e.indent)break;r.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==e.indent)break;r.value||yt(r.start,"seq-item-ind")?e.items.push({start:[this.sourceToken]}):r.start.push(this.sourceToken);return}if(this.indent>e.indent){let i=this.startBlockValue(e);if(i){this.stack.push(i);return}}yield*this.pop(),yield*this.step()}*flowCollection(e){let r=e.items[e.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(e.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":!r||r.sep?e.items.push({start:[this.sourceToken]}):r.start.push(this.sourceToken);return;case"map-value-ind":!r||r.value?e.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?e.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?e.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":e.end.push(this.sourceToken);return}let i=this.startBlockValue(e);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===e.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=ho(i),o=dn(n);jy(e);let s=e.end.splice(1,e.end.length);s.push(this.sourceToken);let a={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:o,key:e,sep:s}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=a}else yield*this.lineEnd(e)}}flowScalar(e){if(this.onNewLine){let r=this.source.indexOf(`
161
+ `,r)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(e){let r=e.items[e.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):e.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)e.items.push({start:[this.sourceToken]});else if(r.sep)r.sep.push(this.sourceToken);else{if(this.atIndentedComment(r.start,e.indent)){let n=e.items[e.items.length-2]?.value?.end;if(Array.isArray(n)){Array.prototype.push.apply(n,r.start),n.push(this.sourceToken),e.items.pop();return}}r.start.push(this.sourceToken)}return}if(this.indent>=e.indent){let i=!this.onKeyLine&&this.indent===e.indent,n=i&&(r.sep||r.explicitKey)&&this.type!=="seq-item-ind",o=[];if(n&&r.sep&&!r.value){let s=[];for(let a=0;a<r.sep.length;++a){let c=r.sep[a];switch(c.type){case"newline":s.push(a);break;case"space":break;case"comment":c.indent>e.indent&&(s.length=0);break;default:s.length=0}}s.length>=2&&(o=r.sep.splice(s[1]))}switch(this.type){case"anchor":case"tag":n||r.value?(o.push(this.sourceToken),e.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),e.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)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(ht(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(Vy(r.key)&&!ht(r.sep,"newline")){let s=dn(r.start),a=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:s,key:a,sep:c}]})}else o.length>0?r.sep=r.sep.concat(o,this.sourceToken):r.sep.push(this.sourceToken);else if(ht(r.start,"newline"))Object.assign(r,{key:null,sep:[this.sourceToken]});else{let s=dn(r.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:s,key:null,sep:[this.sourceToken]}]})}else r.sep?r.value||n?e.items.push({start:o,key:null,sep:[this.sourceToken]}):ht(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 s=this.flowScalar(this.type);n||r.value?(e.items.push({start:o,key:s,sep:[]}),this.onKeyLine=!0):r.sep?this.stack.push(s):(Object.assign(r,{key:s,sep:[]}),this.onKeyLine=!0);return}default:{let s=this.startBlockValue(e);if(s){if(s.type==="block-seq"){if(!r.explicitKey&&r.sep&&!ht(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&&e.items.push({start:o});this.stack.push(s);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(e){let r=e.items[e.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):e.items.push({start:[this.sourceToken]})}else r.start.push(this.sourceToken);return;case"space":case"comment":if(r.value)e.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(r.start,e.indent)){let n=e.items[e.items.length-2]?.value?.end;if(Array.isArray(n)){Array.prototype.push.apply(n,r.start),n.push(this.sourceToken),e.items.pop();return}}r.start.push(this.sourceToken)}return;case"anchor":case"tag":if(r.value||this.indent<=e.indent)break;r.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==e.indent)break;r.value||ht(r.start,"seq-item-ind")?e.items.push({start:[this.sourceToken]}):r.start.push(this.sourceToken);return}if(this.indent>e.indent){let i=this.startBlockValue(e);if(i){this.stack.push(i);return}}yield*this.pop(),yield*this.step()}*flowCollection(e){let r=e.items[e.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(e.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":!r||r.sep?e.items.push({start:[this.sourceToken]}):r.start.push(this.sourceToken);return;case"map-value-ind":!r||r.value?e.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?e.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?e.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":e.end.push(this.sourceToken);return}let i=this.startBlockValue(e);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===e.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=vo(i),o=dn(n);By(e);let s=e.end.splice(1,e.end.length);s.push(this.sourceToken);let a={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:o,key:e,sep:s}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=a}else yield*this.lineEnd(e)}}flowScalar(e){if(this.onNewLine){let r=this.source.indexOf(`
162
162
  `)+1;for(;r!==0;)this.onNewLine(this.offset+r),r=this.source.indexOf(`
163
- `,r)+1}return{type:e,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(e){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=ho(e),i=dn(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=ho(e),i=dn(r);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:i,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,r){return this.type!=="comment"||this.indent<=r?!1:e.every(i=>i.type==="newline"||i.type==="space")}*documentEnd(e){this.type!=="doc-mode"&&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop()))}*lineEnd(e){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;case"space":case"comment":default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}};Uy.Parser=dl});var qy=N(Er=>{"use strict";var Ly=Xc(),RI=$r(),Ar=xr(),UI=Ya(),LI=Z(),MI=ul(),My=pl();function Fy(t){let e=t.prettyErrors!==!1;return{lineCounter:t.lineCounter||e&&new MI.LineCounter||null,prettyErrors:e}}function FI(t,e={}){let{lineCounter:r,prettyErrors:i}=Fy(e),n=new My.Parser(r?.addNewLine),o=new Ly.Composer(e),s=Array.from(o.compose(n.parse(t)));if(i&&r)for(let a of s)a.errors.forEach(Ar.prettifyError(t,r)),a.warnings.forEach(Ar.prettifyError(t,r));return s.length>0?s:Object.assign([],{empty:!0},o.streamInfo())}function Zy(t,e={}){let{lineCounter:r,prettyErrors:i}=Fy(e),n=new My.Parser(r?.addNewLine),o=new Ly.Composer(e),s=null;for(let a of o.compose(n.parse(t),!0,t.length))if(!s)s=a;else if(s.options.logLevel!=="silent"){s.errors.push(new Ar.YAMLParseError(a.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return i&&r&&(s.errors.forEach(Ar.prettifyError(t,r)),s.warnings.forEach(Ar.prettifyError(t,r))),s}function ZI(t,e,r){let i;typeof e=="function"?i=e:r===void 0&&e&&typeof e=="object"&&(r=e);let n=Zy(t,r);if(!n)return null;if(n.warnings.forEach(o=>UI.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 qI(t,e,r){let i=null;if(typeof e=="function"||Array.isArray(e)?i=e:r===void 0&&e&&(r=e),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(t===void 0){let{keepUndefined:n}=r??e??{};if(!n)return}return LI.isDocument(t)&&!i?t.toString(r):new RI.Document(t,i,r).toString(r)}Er.parse=ZI;Er.parseAllDocuments=FI;Er.parseDocument=Zy;Er.stringify=qI});var Mt=N(B=>{"use strict";var BI=Xc(),VI=$r(),GI=zc(),fl=xr(),KI=or(),_t=Z(),JI=ft(),WI=ce(),YI=gt(),HI=ht(),XI=mo(),QI=cl(),eO=ul(),tO=pl(),yo=qy(),By=tr();B.Composer=BI.Composer;B.Document=VI.Document;B.Schema=GI.Schema;B.YAMLError=fl.YAMLError;B.YAMLParseError=fl.YAMLParseError;B.YAMLWarning=fl.YAMLWarning;B.Alias=KI.Alias;B.isAlias=_t.isAlias;B.isCollection=_t.isCollection;B.isDocument=_t.isDocument;B.isMap=_t.isMap;B.isNode=_t.isNode;B.isPair=_t.isPair;B.isScalar=_t.isScalar;B.isSeq=_t.isSeq;B.Pair=JI.Pair;B.Scalar=WI.Scalar;B.YAMLMap=YI.YAMLMap;B.YAMLSeq=HI.YAMLSeq;B.CST=XI;B.Lexer=QI.Lexer;B.LineCounter=eO.LineCounter;B.Parser=tO.Parser;B.parse=yo.parse;B.parseAllDocuments=yo.parseAllDocuments;B.parseDocument=yo.parseDocument;B.stringify=yo.stringify;B.visit=By.visit;B.visitAsync=By.visitAsync});import{realpathSync as JA}from"node:fs";var Vm=Nt(Bm(),1),{program:aE,createCommand:cE,createArgument:lE,createOption:uE,CommanderError:dE,InvalidArgumentError:pE,InvalidOptionArgumentError:fE,Command:Gm,Argument:mE,Option:gE,Help:hE}=Vm.default;var $=class extends Error{constructor(r,i=1,n){super(r);this.exitCode=i;this.suggestion=n;this.name="CLIError"}},F=class t extends ${constructor(r,i,n,o,s){super(i,n,o);this.status=r;this.name="APIError",this.body=s}body;static fromResponse(r,i){let n=p$(i);switch(r){case 401:return new t(r,n||"Authentication required",3,"Run `frankctl auth login` to authenticate.",i);case 403:return new t(r,n||"Permission denied",3,void 0,i);case 404:return new t(r,n||"Not found",4,void 0,i);case 400:case 422:return new t(r,n||"Validation error",4,void 0,i);default:return r>=500?new t(r,n||`Server error (${r})`,4,"Run `frankctl status` to check API health.",i):new t(r,n||`Unexpected error (${r})`,4,void 0,i)}}},P=class extends ${constructor(e,r){super(e,2,r),this.name="ConfigError"}},te=class extends ${constructor(e,r){super(e,3,r),this.name="AuthError"}};function p$(t){if(typeof t=="string")return t;if(t&&typeof t=="object"){let e=t;if(typeof e.detail=="string")return e.detail;if(Array.isArray(e.detail))return e.detail.map(r=>{let i=Array.isArray(r.loc)?r.loc.join(" \u2192 "):"";return i?`${i}: ${r.msg}`:r.msg??""}).filter(Boolean).join("; ");if(typeof e.message=="string")return e.message}return""}var Km=(t=0)=>e=>`\x1B[${e+t}m`,Jm=(t=0)=>e=>`\x1B[${38+t};5;${e}m`,Wm=(t=0)=>(e,r,i)=>`\x1B[${38+t};2;${e};${r};${i}m`,Q={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}},vE=Object.keys(Q.modifier),f$=Object.keys(Q.color),m$=Object.keys(Q.bgColor),bE=[...f$,...m$];function g$(){let t=new Map;for(let[e,r]of Object.entries(Q)){for(let[i,n]of Object.entries(r))Q[i]={open:`\x1B[${n[0]}m`,close:`\x1B[${n[1]}m`},r[i]=Q[i],t.set(n[0],n[1]);Object.defineProperty(Q,e,{value:r,enumerable:!1})}return Object.defineProperty(Q,"codes",{value:t,enumerable:!1}),Q.color.close="\x1B[39m",Q.bgColor.close="\x1B[49m",Q.color.ansi=Km(),Q.color.ansi256=Jm(),Q.color.ansi16m=Wm(),Q.bgColor.ansi=Km(10),Q.bgColor.ansi256=Jm(10),Q.bgColor.ansi16m=Wm(10),Object.defineProperties(Q,{rgbToAnsi256:{value(e,r,i){return e===r&&r===i?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(r/255*5)+Math.round(i/255*5)},enumerable:!1},hexToRgb:{value(e){let r=/[a-f\d]{6}|[a-f\d]{3}/i.exec(e.toString(16));if(!r)return[0,0,0];let[i]=r;i.length===3&&(i=[...i].map(o=>o+o).join(""));let n=Number.parseInt(i,16);return[n>>16&255,n>>8&255,n&255]},enumerable:!1},hexToAnsi256:{value:e=>Q.rgbToAnsi256(...Q.hexToRgb(e)),enumerable:!1},ansi256ToAnsi:{value(e){if(e<8)return 30+e;if(e<16)return 90+(e-8);let r,i,n;if(e>=232)r=((e-232)*10+8)/255,i=r,n=r;else{e-=16;let a=e%36;r=Math.floor(e/36)/5,i=Math.floor(a/6)/5,n=a%6/5}let o=Math.max(r,i,n)*2;if(o===0)return 30;let s=30+(Math.round(n)<<2|Math.round(i)<<1|Math.round(r));return o===2&&(s+=60),s},enumerable:!1},rgbToAnsi:{value:(e,r,i)=>Q.ansi256ToAnsi(Q.rgbToAnsi256(e,r,i)),enumerable:!1},hexToAnsi:{value:e=>Q.ansi256ToAnsi(Q.hexToAnsi256(e)),enumerable:!1}}),Q}var h$=g$(),De=h$;import Aa from"node:process";import y$ from"node:os";import Ym from"node:tty";function Te(t,e=globalThis.Deno?globalThis.Deno.args:Aa.argv){let r=t.startsWith("-")?"":t.length===1?"-":"--",i=e.indexOf(r+t),n=e.indexOf("--");return i!==-1&&(n===-1||i<n)}var{env:ee}=Aa,vi;Te("no-color")||Te("no-colors")||Te("color=false")||Te("color=never")?vi=0:(Te("color")||Te("colors")||Te("color=true")||Te("color=always"))&&(vi=1);function _$(){if("FORCE_COLOR"in ee)return ee.FORCE_COLOR==="true"?1:ee.FORCE_COLOR==="false"?0:ee.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(ee.FORCE_COLOR,10),3)}function v$(t){return t===0?!1:{level:t,hasBasic:!0,has256:t>=2,has16m:t>=3}}function b$(t,{streamIsTTY:e,sniffFlags:r=!0}={}){let i=_$();i!==void 0&&(vi=i);let n=r?vi:i;if(n===0)return 0;if(r){if(Te("color=16m")||Te("color=full")||Te("color=truecolor"))return 3;if(Te("color=256"))return 2}if("TF_BUILD"in ee&&"AGENT_NAME"in ee)return 1;if(t&&!e&&n===void 0)return 0;let o=n||0;if(ee.TERM==="dumb")return o;if(Aa.platform==="win32"){let s=y$.release().split(".");return Number(s[0])>=10&&Number(s[2])>=10586?Number(s[2])>=14931?3:2:1}if("CI"in ee)return["GITHUB_ACTIONS","GITEA_ACTIONS","CIRCLECI"].some(s=>s in ee)?3:["TRAVIS","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some(s=>s in ee)||ee.CI_NAME==="codeship"?1:o;if("TEAMCITY_VERSION"in ee)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(ee.TEAMCITY_VERSION)?1:0;if(ee.COLORTERM==="truecolor"||ee.TERM==="xterm-kitty"||ee.TERM==="xterm-ghostty"||ee.TERM==="wezterm")return 3;if("TERM_PROGRAM"in ee){let s=Number.parseInt((ee.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(ee.TERM_PROGRAM){case"iTerm.app":return s>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(ee.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(ee.TERM)||"COLORTERM"in ee?1:o}function Hm(t,e={}){let r=b$(t,{streamIsTTY:t&&t.isTTY,...e});return v$(r)}var w$={stdout:Hm({isTTY:Ym.isatty(1)}),stderr:Hm({isTTY:Ym.isatty(2)})},Xm=w$;function Qm(t,e,r){let i=t.indexOf(e);if(i===-1)return t;let n=e.length,o=0,s="";do s+=t.slice(o,i)+e+r,o=i+n,i=t.indexOf(e,o);while(i!==-1);return s+=t.slice(o),s}function eg(t,e,r,i){let n=0,o="";do{let s=t[i-1]==="\r";o+=t.slice(n,s?i-1:i)+e+(s?`\r
163
+ `,r)+1}return{type:e,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(e){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=vo(e),i=dn(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=vo(e),i=dn(r);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:i,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,r){return this.type!=="comment"||this.indent<=r?!1:e.every(i=>i.type==="newline"||i.type==="space")}*documentEnd(e){this.type!=="doc-mode"&&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop()))}*lineEnd(e){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;case"space":case"comment":default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}};Gy.Parser=yl});var Hy=N(Nr=>{"use strict";var Jy=il(),JI=Sr(),zr=Or(),KI=nc(),WI=Z(),YI=hl(),Ky=_l();function Wy(t){let e=t.prettyErrors!==!1;return{lineCounter:t.lineCounter||e&&new YI.LineCounter||null,prettyErrors:e}}function HI(t,e={}){let{lineCounter:r,prettyErrors:i}=Wy(e),n=new Ky.Parser(r?.addNewLine),o=new Jy.Composer(e),s=Array.from(o.compose(n.parse(t)));if(i&&r)for(let a of s)a.errors.forEach(zr.prettifyError(t,r)),a.warnings.forEach(zr.prettifyError(t,r));return s.length>0?s:Object.assign([],{empty:!0},o.streamInfo())}function Yy(t,e={}){let{lineCounter:r,prettyErrors:i}=Wy(e),n=new Ky.Parser(r?.addNewLine),o=new Jy.Composer(e),s=null;for(let a of o.compose(n.parse(t),!0,t.length))if(!s)s=a;else if(s.options.logLevel!=="silent"){s.errors.push(new zr.YAMLParseError(a.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return i&&r&&(s.errors.forEach(zr.prettifyError(t,r)),s.warnings.forEach(zr.prettifyError(t,r))),s}function XI(t,e,r){let i;typeof e=="function"?i=e:r===void 0&&e&&typeof e=="object"&&(r=e);let n=Yy(t,r);if(!n)return null;if(n.warnings.forEach(o=>KI.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 QI(t,e,r){let i=null;if(typeof e=="function"||Array.isArray(e)?i=e:r===void 0&&e&&(r=e),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(t===void 0){let{keepUndefined:n}=r??e??{};if(!n)return}return WI.isDocument(t)&&!i?t.toString(r):new JI.Document(t,i,r).toString(r)}Nr.parse=XI;Nr.parseAllDocuments=HI;Nr.parseDocument=Yy;Nr.stringify=QI});var qt=N(B=>{"use strict";var eO=il(),tO=Sr(),nO=Uc(),vl=Or(),rO=ar(),yt=Z(),iO=pt(),oO=ce(),sO=mt(),aO=gt(),cO=yo(),lO=ml(),uO=hl(),dO=_l(),bo=Hy(),Xy=rr();B.Composer=eO.Composer;B.Document=tO.Document;B.Schema=nO.Schema;B.YAMLError=vl.YAMLError;B.YAMLParseError=vl.YAMLParseError;B.YAMLWarning=vl.YAMLWarning;B.Alias=rO.Alias;B.isAlias=yt.isAlias;B.isCollection=yt.isCollection;B.isDocument=yt.isDocument;B.isMap=yt.isMap;B.isNode=yt.isNode;B.isPair=yt.isPair;B.isScalar=yt.isScalar;B.isSeq=yt.isSeq;B.Pair=iO.Pair;B.Scalar=oO.Scalar;B.YAMLMap=sO.YAMLMap;B.YAMLSeq=aO.YAMLSeq;B.CST=cO;B.Lexer=lO.Lexer;B.LineCounter=uO.LineCounter;B.Parser=dO.Parser;B.parse=bo.parse;B.parseAllDocuments=bo.parseAllDocuments;B.parseDocument=bo.parseDocument;B.stringify=bo.stringify;B.visit=Xy.visit;B.visitAsync=Xy.visitAsync});import{realpathSync as nE}from"node:fs";var Qm=Ct(Xm(),1),{program:gE,createCommand:hE,createArgument:yE,createOption:_E,CommanderError:vE,InvalidArgumentError:bE,InvalidOptionArgumentError:wE,Command:eg,Argument:$E,Option:kE,Help:SE}=Qm.default;var w=class extends Error{constructor(r,i=1,n){super(r);this.exitCode=i;this.suggestion=n;this.name="CLIError"}},q=class t extends w{constructor(r,i,n,o,s){super(i,n,o);this.status=r;this.name="APIError",this.body=s}body;static fromResponse(r,i){let n=$$(i);switch(r){case 401:return new t(r,n||"Authentication required",3,"Run `frankctl auth login` to authenticate.",i);case 403:return new t(r,n||"Permission denied",3,void 0,i);case 404:return new t(r,n||"Not found",4,void 0,i);case 400:case 422:return new t(r,n||"Validation error",4,void 0,i);default:return r>=500?new t(r,n||`Server error (${r})`,4,"Run `frankctl status` to check API health.",i):new t(r,n||`Unexpected error (${r})`,4,void 0,i)}}},I=class extends w{constructor(e,r){super(e,2,r),this.name="ConfigError"}},ie=class extends w{constructor(e,r){super(e,3,r),this.name="AuthError"}};function $$(t){if(typeof t=="string")return t;if(t&&typeof t=="object"){let e=t;if(typeof e.detail=="string")return e.detail;if(Array.isArray(e.detail))return e.detail.map(r=>{let i=Array.isArray(r.loc)?r.loc.join(" \u2192 "):"";return i?`${i}: ${r.msg}`:r.msg??""}).filter(Boolean).join("; ");if(typeof e.message=="string")return e.message}return""}var tg=(t=0)=>e=>`\x1B[${e+t}m`,ng=(t=0)=>e=>`\x1B[${38+t};5;${e}m`,rg=(t=0)=>(e,r,i)=>`\x1B[${38+t};2;${e};${r};${i}m`,ee={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}},OE=Object.keys(ee.modifier),k$=Object.keys(ee.color),S$=Object.keys(ee.bgColor),PE=[...k$,...S$];function x$(){let t=new Map;for(let[e,r]of Object.entries(ee)){for(let[i,n]of Object.entries(r))ee[i]={open:`\x1B[${n[0]}m`,close:`\x1B[${n[1]}m`},r[i]=ee[i],t.set(n[0],n[1]);Object.defineProperty(ee,e,{value:r,enumerable:!1})}return Object.defineProperty(ee,"codes",{value:t,enumerable:!1}),ee.color.close="\x1B[39m",ee.bgColor.close="\x1B[49m",ee.color.ansi=tg(),ee.color.ansi256=ng(),ee.color.ansi16m=rg(),ee.bgColor.ansi=tg(10),ee.bgColor.ansi256=ng(10),ee.bgColor.ansi16m=rg(10),Object.defineProperties(ee,{rgbToAnsi256:{value(e,r,i){return e===r&&r===i?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(r/255*5)+Math.round(i/255*5)},enumerable:!1},hexToRgb:{value(e){let r=/[a-f\d]{6}|[a-f\d]{3}/i.exec(e.toString(16));if(!r)return[0,0,0];let[i]=r;i.length===3&&(i=[...i].map(o=>o+o).join(""));let n=Number.parseInt(i,16);return[n>>16&255,n>>8&255,n&255]},enumerable:!1},hexToAnsi256:{value:e=>ee.rgbToAnsi256(...ee.hexToRgb(e)),enumerable:!1},ansi256ToAnsi:{value(e){if(e<8)return 30+e;if(e<16)return 90+(e-8);let r,i,n;if(e>=232)r=((e-232)*10+8)/255,i=r,n=r;else{e-=16;let a=e%36;r=Math.floor(e/36)/5,i=Math.floor(a/6)/5,n=a%6/5}let o=Math.max(r,i,n)*2;if(o===0)return 30;let s=30+(Math.round(n)<<2|Math.round(i)<<1|Math.round(r));return o===2&&(s+=60),s},enumerable:!1},rgbToAnsi:{value:(e,r,i)=>ee.ansi256ToAnsi(ee.rgbToAnsi256(e,r,i)),enumerable:!1},hexToAnsi:{value:e=>ee.ansi256ToAnsi(ee.hexToAnsi256(e)),enumerable:!1}}),ee}var I$=x$(),je=I$;import ja from"node:process";import O$ from"node:os";import ig from"node:tty";function Pe(t,e=globalThis.Deno?globalThis.Deno.args:ja.argv){let r=t.startsWith("-")?"":t.length===1?"-":"--",i=e.indexOf(r+t),n=e.indexOf("--");return i!==-1&&(n===-1||i<n)}var{env:te}=ja,$i;Pe("no-color")||Pe("no-colors")||Pe("color=false")||Pe("color=never")?$i=0:(Pe("color")||Pe("colors")||Pe("color=true")||Pe("color=always"))&&($i=1);function P$(){if("FORCE_COLOR"in te)return te.FORCE_COLOR==="true"?1:te.FORCE_COLOR==="false"?0:te.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(te.FORCE_COLOR,10),3)}function T$(t){return t===0?!1:{level:t,hasBasic:!0,has256:t>=2,has16m:t>=3}}function A$(t,{streamIsTTY:e,sniffFlags:r=!0}={}){let i=P$();i!==void 0&&($i=i);let n=r?$i:i;if(n===0)return 0;if(r){if(Pe("color=16m")||Pe("color=full")||Pe("color=truecolor"))return 3;if(Pe("color=256"))return 2}if("TF_BUILD"in te&&"AGENT_NAME"in te)return 1;if(t&&!e&&n===void 0)return 0;let o=n||0;if(te.TERM==="dumb")return o;if(ja.platform==="win32"){let s=O$.release().split(".");return Number(s[0])>=10&&Number(s[2])>=10586?Number(s[2])>=14931?3:2:1}if("CI"in te)return["GITHUB_ACTIONS","GITEA_ACTIONS","CIRCLECI"].some(s=>s in te)?3:["TRAVIS","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some(s=>s in te)||te.CI_NAME==="codeship"?1:o;if("TEAMCITY_VERSION"in te)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(te.TEAMCITY_VERSION)?1:0;if(te.COLORTERM==="truecolor"||te.TERM==="xterm-kitty"||te.TERM==="xterm-ghostty"||te.TERM==="wezterm")return 3;if("TERM_PROGRAM"in te){let s=Number.parseInt((te.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(te.TERM_PROGRAM){case"iTerm.app":return s>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(te.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(te.TERM)||"COLORTERM"in te?1:o}function og(t,e={}){let r=A$(t,{streamIsTTY:t&&t.isTTY,...e});return T$(r)}var E$={stdout:og({isTTY:ig.isatty(1)}),stderr:og({isTTY:ig.isatty(2)})},sg=E$;function ag(t,e,r){let i=t.indexOf(e);if(i===-1)return t;let n=e.length,o=0,s="";do s+=t.slice(o,i)+e+r,o=i+n,i=t.indexOf(e,o);while(i!==-1);return s+=t.slice(o),s}function cg(t,e,r,i){let n=0,o="";do{let s=t[i-1]==="\r";o+=t.slice(n,s?i-1:i)+e+(s?`\r
164
164
  `:`
165
165
  `)+r,n=i+1,i=t.indexOf(`
166
- `,n)}while(i!==-1);return o+=t.slice(n),o}var{stdout:tg,stderr:ng}=Xm,Ea=Symbol("GENERATOR"),Xt=Symbol("STYLER"),Hn=Symbol("IS_EMPTY"),rg=["ansi","ansi","ansi256","ansi16m"],Qt=Object.create(null),$$=(t,e={})=>{if(e.level&&!(Number.isInteger(e.level)&&e.level>=0&&e.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");let r=tg?tg.level:0;t.level=e.level===void 0?r:e.level};var k$=t=>{let e=(...r)=>r.join(" ");return $$(e,t),Object.setPrototypeOf(e,Xn.prototype),e};function Xn(t){return k$(t)}Object.setPrototypeOf(Xn.prototype,Function.prototype);for(let[t,e]of Object.entries(De))Qt[t]={get(){let r=bi(this,Na(e.open,e.close,this[Xt]),this[Hn]);return Object.defineProperty(this,t,{value:r}),r}};Qt.visible={get(){let t=bi(this,this[Xt],!0);return Object.defineProperty(this,"visible",{value:t}),t}};var za=(t,e,r,...i)=>t==="rgb"?e==="ansi16m"?De[r].ansi16m(...i):e==="ansi256"?De[r].ansi256(De.rgbToAnsi256(...i)):De[r].ansi(De.rgbToAnsi(...i)):t==="hex"?za("rgb",e,r,...De.hexToRgb(...i)):De[r][t](...i),S$=["rgb","hex","ansi256"];for(let t of S$){Qt[t]={get(){let{level:r}=this;return function(...i){let n=Na(za(t,rg[r],"color",...i),De.color.close,this[Xt]);return bi(this,n,this[Hn])}}};let e="bg"+t[0].toUpperCase()+t.slice(1);Qt[e]={get(){let{level:r}=this;return function(...i){let n=Na(za(t,rg[r],"bgColor",...i),De.bgColor.close,this[Xt]);return bi(this,n,this[Hn])}}}}var x$=Object.defineProperties(()=>{},{...Qt,level:{enumerable:!0,get(){return this[Ea].level},set(t){this[Ea].level=t}}}),Na=(t,e,r)=>{let i,n;return r===void 0?(i=t,n=e):(i=r.openAll+t,n=e+r.closeAll),{open:t,close:e,openAll:i,closeAll:n,parent:r}},bi=(t,e,r)=>{let i=(...n)=>I$(i,n.length===1?""+n[0]:n.join(" "));return Object.setPrototypeOf(i,x$),i[Ea]=t,i[Xt]=e,i[Hn]=r,i},I$=(t,e)=>{if(t.level<=0||!e)return t[Hn]?"":e;let r=t[Xt];if(r===void 0)return e;let{openAll:i,closeAll:n}=r;if(e.includes("\x1B"))for(;r!==void 0;)e=Qm(e,r.close,r.open),r=r.parent;let o=e.indexOf(`
167
- `);return o!==-1&&(e=eg(e,n,i,o)),i+e+n};Object.defineProperties(Xn.prototype,Qt);var O$=Xn(),AE=Xn({level:ng?ng.level:0});var je=O$;var P$=[/"access_token"\s*:\s*"[^"]+"/g,/"refresh_token"\s*:\s*"[^"]+"/g,/(?:Bearer\s+)[A-Za-z0-9._-]+/g,/eyJ[A-Za-z0-9._-]{20,}/g];function Qn(t){let e=t;for(let r of P$)e=e.replace(r,i=>i.startsWith('"')?`"${i.slice(1).split('"')[0]}":"[redacted]"`:i.toLowerCase().startsWith("bearer ")?"Bearer [redacted]":"[redacted]");return e}var er=class{constructor(e={}){this.opts=e}colorize(e,r){return this.opts.color===!1?e:r(e)}info(e){this.opts.quiet||process.stderr.write(Qn(e)+`
168
- `)}warn(e){this.opts.quiet||process.stderr.write(this.colorize(Qn(e),je.yellow)+`
169
- `)}error(e){process.stderr.write(this.colorize(Qn(e),je.red)+`
170
- `)}success(e){this.opts.quiet||process.stderr.write(this.colorize(Qn(e),je.green)+`
171
- `)}debug(e){this.opts.verbose&&process.stderr.write(this.colorize(Qn(`[debug] ${e}`),je.gray)+`
172
- `)}},NE=new er;var ia=Nt(Mt(),1);import ui from"node:fs";import fm from"node:path";import ZT from"node:os";var h={};Xe(h,{$brand:()=>_o,$input:()=>Nd,$output:()=>zd,NEVER:()=>ml,TimePrecision:()=>Rd,ZodAny:()=>Of,ZodArray:()=>Ef,ZodBase64:()=>Vs,ZodBase64URL:()=>Gs,ZodBigInt:()=>Fn,ZodBigIntFormat:()=>Ws,ZodBoolean:()=>Mn,ZodCIDRv4:()=>qs,ZodCIDRv6:()=>Bs,ZodCUID:()=>js,ZodCUID2:()=>Rs,ZodCatch:()=>Qf,ZodCodec:()=>ra,ZodCustom:()=>li,ZodCustomStringFormat:()=>Un,ZodDate:()=>ii,ZodDefault:()=>Kf,ZodDiscriminatedUnion:()=>Nf,ZodE164:()=>Ks,ZodEmail:()=>Ns,ZodEmoji:()=>Cs,ZodEnum:()=>jn,ZodError:()=>TT,ZodExactOptional:()=>Bf,ZodFile:()=>Zf,ZodFirstPartyTypeKind:()=>dm,ZodFunction:()=>cm,ZodGUID:()=>Qr,ZodIPv4:()=>Fs,ZodIPv6:()=>Zs,ZodISODate:()=>Os,ZodISODateTime:()=>Is,ZodISODuration:()=>Ts,ZodISOTime:()=>Ps,ZodIntersection:()=>Cf,ZodIssueCode:()=>ET,ZodJWT:()=>Js,ZodKSUID:()=>Ms,ZodLazy:()=>om,ZodLiteral:()=>Ff,ZodMAC:()=>bf,ZodMap:()=>Lf,ZodNaN:()=>tm,ZodNanoID:()=>Ds,ZodNever:()=>Tf,ZodNonOptional:()=>ta,ZodNull:()=>xf,ZodNullable:()=>Gf,ZodNumber:()=>Ln,ZodNumberFormat:()=>Jt,ZodObject:()=>si,ZodOptional:()=>ea,ZodPipe:()=>na,ZodPrefault:()=>Wf,ZodPromise:()=>am,ZodReadonly:()=>nm,ZodRealError:()=>Se,ZodRecord:()=>ci,ZodSet:()=>Mf,ZodString:()=>Rn,ZodStringFormat:()=>J,ZodSuccess:()=>Xf,ZodSymbol:()=>kf,ZodTemplateLiteral:()=>im,ZodTransform:()=>qf,ZodTuple:()=>jf,ZodType:()=>U,ZodULID:()=>Us,ZodURL:()=>ri,ZodUUID:()=>We,ZodUndefined:()=>Sf,ZodUnion:()=>ai,ZodUnknown:()=>Pf,ZodVoid:()=>Af,ZodXID:()=>Ls,ZodXor:()=>zf,_ZodString:()=>zs,_default:()=>Jf,_function:()=>kb,any:()=>tb,array:()=>oi,base64:()=>Uv,base64url:()=>Lv,bigint:()=>Yv,boolean:()=>$f,catch:()=>em,check:()=>Sb,cidrv4:()=>jv,cidrv6:()=>Rv,clone:()=>he,codec:()=>bb,coerce:()=>pm,config:()=>ie,core:()=>it,cuid:()=>Pv,cuid2:()=>Tv,custom:()=>xb,date:()=>rb,decode:()=>ff,decodeAsync:()=>gf,describe:()=>Ib,discriminatedUnion:()=>lb,e164:()=>Mv,email:()=>_v,emoji:()=>Iv,encode:()=>pf,encodeAsync:()=>mf,endsWith:()=>In,enum:()=>Xs,exactOptional:()=>Vf,file:()=>hb,flattenError:()=>Mr,float32:()=>Gv,float64:()=>Kv,formatError:()=>Fr,fromJSONSchema:()=>Nb,function:()=>kb,getErrorMap:()=>NT,globalRegistry:()=>pe,gt:()=>Ke,gte:()=>ye,guid:()=>vv,hash:()=>Vv,hex:()=>Bv,hostname:()=>qv,httpUrl:()=>xv,includes:()=>Sn,instanceof:()=>Pb,int:()=>Es,int32:()=>Jv,int64:()=>Hv,intersection:()=>Df,ipv4:()=>Nv,ipv6:()=>Dv,iso:()=>Dn,json:()=>Ab,jwt:()=>Fv,keyof:()=>ib,ksuid:()=>zv,lazy:()=>sm,length:()=>Gt,literal:()=>gb,locales:()=>Wr,looseObject:()=>ab,looseRecord:()=>db,lowercase:()=>$n,lt:()=>Ge,lte:()=>Oe,mac:()=>Cv,map:()=>pb,maxLength:()=>Vt,maxSize:()=>xt,meta:()=>Ob,mime:()=>On,minLength:()=>rt,minSize:()=>Je,multipleOf:()=>St,nan:()=>vb,nanoid:()=>Ov,nativeEnum:()=>mb,negative:()=>hs,never:()=>Ys,nonnegative:()=>_s,nonoptional:()=>Hf,nonpositive:()=>ys,normalize:()=>Pn,null:()=>If,nullable:()=>ti,nullish:()=>yb,number:()=>wf,object:()=>ob,optional:()=>ei,overwrite:()=>Me,parse:()=>cf,parseAsync:()=>lf,partialRecord:()=>ub,pipe:()=>ni,positive:()=>gs,prefault:()=>Yf,preprocess:()=>Eb,prettifyError:()=>Il,promise:()=>$b,property:()=>vs,readonly:()=>rm,record:()=>Uf,refine:()=>lm,regex:()=>wn,regexes:()=>ze,registry:()=>Jo,safeDecode:()=>yf,safeDecodeAsync:()=>vf,safeEncode:()=>hf,safeEncodeAsync:()=>_f,safeParse:()=>uf,safeParseAsync:()=>df,set:()=>fb,setErrorMap:()=>zT,size:()=>Bt,slugify:()=>zn,startsWith:()=>xn,strictObject:()=>sb,string:()=>As,stringFormat:()=>Zv,stringbool:()=>Tb,success:()=>_b,superRefine:()=>um,symbol:()=>Qv,templateLiteral:()=>wb,toJSONSchema:()=>ks,toLowerCase:()=>An,toUpperCase:()=>En,transform:()=>Qs,treeifyError:()=>xl,trim:()=>Tn,tuple:()=>Rf,uint32:()=>Wv,uint64:()=>Xv,ulid:()=>Av,undefined:()=>eb,union:()=>Hs,unknown:()=>Kt,uppercase:()=>kn,url:()=>Sv,util:()=>O,uuid:()=>bv,uuidv4:()=>wv,uuidv6:()=>$v,uuidv7:()=>kv,void:()=>nb,xid:()=>Ev,xor:()=>cb});var it={};Xe(it,{$ZodAny:()=>ed,$ZodArray:()=>od,$ZodAsyncError:()=>Le,$ZodBase64:()=>Bu,$ZodBase64URL:()=>Vu,$ZodBigInt:()=>Fo,$ZodBigIntFormat:()=>Yu,$ZodBoolean:()=>Vr,$ZodCIDRv4:()=>Fu,$ZodCIDRv6:()=>Zu,$ZodCUID:()=>Tu,$ZodCUID2:()=>Au,$ZodCatch:()=>kd,$ZodCheck:()=>Y,$ZodCheckBigIntFormat:()=>ou,$ZodCheckEndsWith:()=>yu,$ZodCheckGreaterThan:()=>Co,$ZodCheckIncludes:()=>gu,$ZodCheckLengthEquals:()=>du,$ZodCheckLessThan:()=>No,$ZodCheckLowerCase:()=>fu,$ZodCheckMaxLength:()=>lu,$ZodCheckMaxSize:()=>su,$ZodCheckMimeType:()=>vu,$ZodCheckMinLength:()=>uu,$ZodCheckMinSize:()=>au,$ZodCheckMultipleOf:()=>ru,$ZodCheckNumberFormat:()=>iu,$ZodCheckOverwrite:()=>bu,$ZodCheckProperty:()=>_u,$ZodCheckRegex:()=>pu,$ZodCheckSizeEquals:()=>cu,$ZodCheckStartsWith:()=>hu,$ZodCheckStringFormat:()=>vn,$ZodCheckUpperCase:()=>mu,$ZodCodec:()=>Kr,$ZodCustom:()=>Ed,$ZodCustomStringFormat:()=>Ju,$ZodDate:()=>id,$ZodDefault:()=>vd,$ZodDiscriminatedUnion:()=>cd,$ZodE164:()=>Gu,$ZodEmail:()=>xu,$ZodEmoji:()=>Ou,$ZodEncodeError:()=>vt,$ZodEnum:()=>fd,$ZodError:()=>Lr,$ZodExactOptional:()=>yd,$ZodFile:()=>gd,$ZodFunction:()=>Pd,$ZodGUID:()=>ku,$ZodIPv4:()=>Uu,$ZodIPv6:()=>Lu,$ZodISODate:()=>Du,$ZodISODateTime:()=>Cu,$ZodISODuration:()=>Ru,$ZodISOTime:()=>ju,$ZodIntersection:()=>ld,$ZodJWT:()=>Ku,$ZodKSUID:()=>Nu,$ZodLazy:()=>Ad,$ZodLiteral:()=>md,$ZodMAC:()=>Mu,$ZodMap:()=>dd,$ZodNaN:()=>Sd,$ZodNanoID:()=>Pu,$ZodNever:()=>nd,$ZodNonOptional:()=>wd,$ZodNull:()=>Qu,$ZodNullable:()=>_d,$ZodNumber:()=>Mo,$ZodNumberFormat:()=>Wu,$ZodObject:()=>y_,$ZodObjectJIT:()=>sd,$ZodOptional:()=>qo,$ZodPipe:()=>xd,$ZodPrefault:()=>bd,$ZodPromise:()=>Td,$ZodReadonly:()=>Id,$ZodRealError:()=>ke,$ZodRecord:()=>ud,$ZodRegistry:()=>Ko,$ZodSet:()=>pd,$ZodString:()=>qt,$ZodStringFormat:()=>K,$ZodSuccess:()=>$d,$ZodSymbol:()=>Hu,$ZodTemplateLiteral:()=>Od,$ZodTransform:()=>hd,$ZodTuple:()=>Zo,$ZodType:()=>R,$ZodULID:()=>Eu,$ZodURL:()=>Iu,$ZodUUID:()=>Su,$ZodUndefined:()=>Xu,$ZodUnion:()=>Gr,$ZodUnknown:()=>td,$ZodVoid:()=>rd,$ZodXID:()=>zu,$ZodXor:()=>ad,$brand:()=>_o,$constructor:()=>_,$input:()=>Nd,$output:()=>zd,Doc:()=>Br,JSONSchema:()=>hv,JSONSchemaGenerator:()=>Ss,NEVER:()=>ml,TimePrecision:()=>Rd,_any:()=>ip,_array:()=>dp,_base64:()=>ds,_base64url:()=>ps,_bigint:()=>Hd,_boolean:()=>Wd,_catch:()=>wT,_check:()=>gv,_cidrv4:()=>ls,_cidrv6:()=>us,_coercedBigint:()=>Xd,_coercedBoolean:()=>Yd,_coercedDate:()=>lp,_coercedNumber:()=>qd,_coercedString:()=>Dd,_cuid:()=>ns,_cuid2:()=>rs,_custom:()=>fp,_date:()=>cp,_decode:()=>So,_decodeAsync:()=>Io,_default:()=>_T,_discriminatedUnion:()=>sT,_e164:()=>fs,_email:()=>Wo,_emoji:()=>es,_encode:()=>ko,_encodeAsync:()=>xo,_endsWith:()=>In,_enum:()=>pT,_file:()=>pp,_float32:()=>Vd,_float64:()=>Gd,_gt:()=>Ke,_gte:()=>ye,_guid:()=>Yr,_includes:()=>Sn,_int:()=>Bd,_int32:()=>Kd,_int64:()=>Qd,_intersection:()=>aT,_ipv4:()=>as,_ipv6:()=>cs,_isoDate:()=>Ld,_isoDateTime:()=>Ud,_isoDuration:()=>Fd,_isoTime:()=>Md,_jwt:()=>ms,_ksuid:()=>ss,_lazy:()=>xT,_length:()=>Gt,_literal:()=>mT,_lowercase:()=>$n,_lt:()=>Ge,_lte:()=>Oe,_mac:()=>jd,_map:()=>uT,_max:()=>Oe,_maxLength:()=>Vt,_maxSize:()=>xt,_mime:()=>On,_min:()=>ye,_minLength:()=>rt,_minSize:()=>Je,_multipleOf:()=>St,_nan:()=>up,_nanoid:()=>ts,_nativeEnum:()=>fT,_negative:()=>hs,_never:()=>sp,_nonnegative:()=>_s,_nonoptional:()=>vT,_nonpositive:()=>ys,_normalize:()=>Pn,_null:()=>rp,_nullable:()=>yT,_number:()=>Zd,_optional:()=>hT,_overwrite:()=>Me,_parse:()=>gn,_parseAsync:()=>hn,_pipe:()=>$T,_positive:()=>gs,_promise:()=>IT,_property:()=>vs,_readonly:()=>kT,_record:()=>lT,_refine:()=>mp,_regex:()=>wn,_safeDecode:()=>Po,_safeDecodeAsync:()=>Ao,_safeEncode:()=>Oo,_safeEncodeAsync:()=>To,_safeParse:()=>yn,_safeParseAsync:()=>_n,_set:()=>dT,_size:()=>Bt,_slugify:()=>zn,_startsWith:()=>xn,_string:()=>Cd,_stringFormat:()=>Nn,_stringbool:()=>_p,_success:()=>bT,_superRefine:()=>gp,_symbol:()=>tp,_templateLiteral:()=>ST,_toLowerCase:()=>An,_toUpperCase:()=>En,_transform:()=>gT,_trim:()=>Tn,_tuple:()=>cT,_uint32:()=>Jd,_uint64:()=>ep,_ulid:()=>is,_undefined:()=>np,_union:()=>iT,_unknown:()=>op,_uppercase:()=>kn,_url:()=>Hr,_uuid:()=>Yo,_uuidv4:()=>Ho,_uuidv6:()=>Xo,_uuidv7:()=>Qo,_void:()=>ap,_xid:()=>os,_xor:()=>oT,clone:()=>he,config:()=>ie,createStandardJSONSchemaMethod:()=>Cn,createToJSONSchemaMethod:()=>vp,decode:()=>TO,decodeAsync:()=>EO,describe:()=>hp,encode:()=>PO,encodeAsync:()=>AO,extractDefs:()=>Ot,finalize:()=>Pt,flattenError:()=>Mr,formatError:()=>Fr,globalConfig:()=>zr,globalRegistry:()=>pe,initializeContext:()=>It,isValidBase64:()=>qu,isValidBase64URL:()=>f_,isValidJWT:()=>m_,locales:()=>Wr,meta:()=>yp,parse:()=>wo,parseAsync:()=>$o,prettifyError:()=>Il,process:()=>V,regexes:()=>ze,registry:()=>Jo,safeDecode:()=>NO,safeDecodeAsync:()=>DO,safeEncode:()=>zO,safeEncodeAsync:()=>CO,safeParse:()=>Ol,safeParseAsync:()=>Pl,toDotPath:()=>Wy,toJSONSchema:()=>ks,treeifyError:()=>xl,util:()=>O,version:()=>wu});var ml=Object.freeze({status:"aborted"});function _(t,e,r){function i(a,c){if(a._zod||Object.defineProperty(a,"_zod",{value:{def:c,constr:s,traits:new Set},enumerable:!1}),a._zod.traits.has(t))return;a._zod.traits.add(t),e(a,c);let l=s.prototype,u=Object.keys(l);for(let d=0;d<u.length;d++){let p=u[d];p in a||(a[p]=l[p].bind(a))}}let n=r?.Parent??Object;class o extends n{}Object.defineProperty(o,"name",{value:t});function s(a){var c;let l=r?.Parent?new o:this;i(l,a),(c=l._zod).deferred??(c.deferred=[]);for(let u of l._zod.deferred)u();return l}return Object.defineProperty(s,"init",{value:i}),Object.defineProperty(s,Symbol.hasInstance,{value:a=>r?.Parent&&a instanceof r.Parent?!0:a?._zod?.traits?.has(t)}),Object.defineProperty(s,"name",{value:t}),s}var _o=Symbol("zod_brand"),Le=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},vt=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name="ZodEncodeError"}},zr={};function ie(t){return t&&Object.assign(zr,t),zr}var O={};Xe(O,{BIGINT_FORMAT_RANGES:()=>Sl,Class:()=>hl,NUMBER_FORMAT_RANGES:()=>kl,aborted:()=>kt,allowsEval:()=>vl,assert:()=>sO,assertEqual:()=>nO,assertIs:()=>iO,assertNever:()=>oO,assertNotEqual:()=>rO,assignProp:()=>wt,base64ToUint8Array:()=>Gy,base64urlToUint8Array:()=>kO,cached:()=>fn,captureStackTrace:()=>bo,cleanEnum:()=>$O,cleanRegex:()=>Dr,clone:()=>he,cloneDef:()=>cO,createTransparentProxy:()=>mO,defineLazy:()=>L,esc:()=>vo,escapeRegex:()=>Ee,extend:()=>yO,finalizeIssue:()=>$e,floatSafeRemainder:()=>yl,getElementAtPath:()=>lO,getEnumValues:()=>Cr,getLengthableOrigin:()=>Ur,getParsedType:()=>fO,getSizableOrigin:()=>Rr,hexToUint8Array:()=>xO,isObject:()=>Ft,isPlainObject:()=>$t,issue:()=>mn,joinValues:()=>v,jsonStringifyReplacer:()=>pn,merge:()=>vO,mergeDefs:()=>nt,normalizeParams:()=>T,nullish:()=>bt,numKeys:()=>pO,objectClone:()=>aO,omit:()=>hO,optionalKeys:()=>$l,parsedType:()=>I,partial:()=>bO,pick:()=>gO,prefixIssues:()=>Ie,primitiveTypes:()=>wl,promiseAllObject:()=>uO,propertyKeyTypes:()=>jr,randomString:()=>dO,required:()=>wO,safeExtend:()=>_O,shallowClone:()=>bl,slugify:()=>_l,stringifyPrimitive:()=>S,uint8ArrayToBase64:()=>Ky,uint8ArrayToBase64url:()=>SO,uint8ArrayToHex:()=>IO,unwrapMessage:()=>Nr});function nO(t){return t}function rO(t){return t}function iO(t){}function oO(t){throw new Error("Unexpected value in exhaustive check")}function sO(t){}function Cr(t){let e=Object.values(t).filter(i=>typeof i=="number");return Object.entries(t).filter(([i,n])=>e.indexOf(+i)===-1).map(([i,n])=>n)}function v(t,e="|"){return t.map(r=>S(r)).join(e)}function pn(t,e){return typeof e=="bigint"?e.toString():e}function fn(t){return{get value(){{let r=t();return Object.defineProperty(this,"value",{value:r}),r}throw new Error("cached value already set")}}}function bt(t){return t==null}function Dr(t){let e=t.startsWith("^")?1:0,r=t.endsWith("$")?t.length-1:t.length;return t.slice(e,r)}function yl(t,e){let r=(t.toString().split(".")[1]||"").length,i=e.toString(),n=(i.split(".")[1]||"").length;if(n===0&&/\d?e-\d?/.test(i)){let c=i.match(/\d?e-(\d?)/);c?.[1]&&(n=Number.parseInt(c[1]))}let o=r>n?r:n,s=Number.parseInt(t.toFixed(o).replace(".","")),a=Number.parseInt(e.toFixed(o).replace(".",""));return s%a/10**o}var Vy=Symbol("evaluating");function L(t,e,r){let i;Object.defineProperty(t,e,{get(){if(i!==Vy)return i===void 0&&(i=Vy,i=r()),i},set(n){Object.defineProperty(t,e,{value:n})},configurable:!0})}function aO(t){return Object.create(Object.getPrototypeOf(t),Object.getOwnPropertyDescriptors(t))}function wt(t,e,r){Object.defineProperty(t,e,{value:r,writable:!0,enumerable:!0,configurable:!0})}function nt(...t){let e={};for(let r of t){let i=Object.getOwnPropertyDescriptors(r);Object.assign(e,i)}return Object.defineProperties({},e)}function cO(t){return nt(t._zod.def)}function lO(t,e){return e?e.reduce((r,i)=>r?.[i],t):t}function uO(t){let e=Object.keys(t),r=e.map(i=>t[i]);return Promise.all(r).then(i=>{let n={};for(let o=0;o<e.length;o++)n[e[o]]=i[o];return n})}function dO(t=10){let e="abcdefghijklmnopqrstuvwxyz",r="";for(let i=0;i<t;i++)r+=e[Math.floor(Math.random()*e.length)];return r}function vo(t){return JSON.stringify(t)}function _l(t){return t.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}var bo="captureStackTrace"in Error?Error.captureStackTrace:(...t)=>{};function Ft(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}var vl=fn(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let t=Function;return new t(""),!0}catch{return!1}});function $t(t){if(Ft(t)===!1)return!1;let e=t.constructor;if(e===void 0||typeof e!="function")return!0;let r=e.prototype;return!(Ft(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function bl(t){return $t(t)?{...t}:Array.isArray(t)?[...t]:t}function pO(t){let e=0;for(let r in t)Object.prototype.hasOwnProperty.call(t,r)&&e++;return e}var fO=t=>{let e=typeof t;switch(e){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(t)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(t)?"array":t===null?"null":t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?"promise":typeof Map<"u"&&t instanceof Map?"map":typeof Set<"u"&&t instanceof Set?"set":typeof Date<"u"&&t instanceof Date?"date":typeof File<"u"&&t instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${e}`)}},jr=new Set(["string","number","symbol"]),wl=new Set(["string","number","bigint","boolean","symbol","undefined"]);function Ee(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function he(t,e,r){let i=new t._zod.constr(e??t._zod.def);return(!e||r?.parent)&&(i._zod.parent=t),i}function T(t){let e=t;if(!e)return{};if(typeof e=="string")return{error:()=>e};if(e?.message!==void 0){if(e?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");e.error=e.message}return delete e.message,typeof e.error=="string"?{...e,error:()=>e.error}:e}function mO(t){let e;return new Proxy({},{get(r,i,n){return e??(e=t()),Reflect.get(e,i,n)},set(r,i,n,o){return e??(e=t()),Reflect.set(e,i,n,o)},has(r,i){return e??(e=t()),Reflect.has(e,i)},deleteProperty(r,i){return e??(e=t()),Reflect.deleteProperty(e,i)},ownKeys(r){return e??(e=t()),Reflect.ownKeys(e)},getOwnPropertyDescriptor(r,i){return e??(e=t()),Reflect.getOwnPropertyDescriptor(e,i)},defineProperty(r,i,n){return e??(e=t()),Reflect.defineProperty(e,i,n)}})}function S(t){return typeof t=="bigint"?t.toString()+"n":typeof t=="string"?`"${t}"`:`${t}`}function $l(t){return Object.keys(t).filter(e=>t[e]._zod.optin==="optional"&&t[e]._zod.optout==="optional")}var kl={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]},Sl={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function gO(t,e){let r=t._zod.def,i=r.checks;if(i&&i.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");let o=nt(t._zod.def,{get shape(){let s={};for(let a in e){if(!(a in r.shape))throw new Error(`Unrecognized key: "${a}"`);e[a]&&(s[a]=r.shape[a])}return wt(this,"shape",s),s},checks:[]});return he(t,o)}function hO(t,e){let r=t._zod.def,i=r.checks;if(i&&i.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");let o=nt(t._zod.def,{get shape(){let s={...t._zod.def.shape};for(let a in e){if(!(a in r.shape))throw new Error(`Unrecognized key: "${a}"`);e[a]&&delete s[a]}return wt(this,"shape",s),s},checks:[]});return he(t,o)}function yO(t,e){if(!$t(e))throw new Error("Invalid input to extend: expected a plain object");let r=t._zod.def.checks;if(r&&r.length>0){let o=t._zod.def.shape;for(let s in e)if(Object.getOwnPropertyDescriptor(o,s)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let n=nt(t._zod.def,{get shape(){let o={...t._zod.def.shape,...e};return wt(this,"shape",o),o}});return he(t,n)}function _O(t,e){if(!$t(e))throw new Error("Invalid input to safeExtend: expected a plain object");let r=nt(t._zod.def,{get shape(){let i={...t._zod.def.shape,...e};return wt(this,"shape",i),i}});return he(t,r)}function vO(t,e){let r=nt(t._zod.def,{get shape(){let i={...t._zod.def.shape,...e._zod.def.shape};return wt(this,"shape",i),i},get catchall(){return e._zod.def.catchall},checks:[]});return he(t,r)}function bO(t,e,r){let n=e._zod.def.checks;if(n&&n.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");let s=nt(e._zod.def,{get shape(){let a=e._zod.def.shape,c={...a};if(r)for(let l in r){if(!(l in a))throw new Error(`Unrecognized key: "${l}"`);r[l]&&(c[l]=t?new t({type:"optional",innerType:a[l]}):a[l])}else for(let l in a)c[l]=t?new t({type:"optional",innerType:a[l]}):a[l];return wt(this,"shape",c),c},checks:[]});return he(e,s)}function wO(t,e,r){let i=nt(e._zod.def,{get shape(){let n=e._zod.def.shape,o={...n};if(r)for(let s in r){if(!(s in o))throw new Error(`Unrecognized key: "${s}"`);r[s]&&(o[s]=new t({type:"nonoptional",innerType:n[s]}))}else for(let s in n)o[s]=new t({type:"nonoptional",innerType:n[s]});return wt(this,"shape",o),o}});return he(e,i)}function kt(t,e=0){if(t.aborted===!0)return!0;for(let r=e;r<t.issues.length;r++)if(t.issues[r]?.continue!==!0)return!0;return!1}function Ie(t,e){return e.map(r=>{var i;return(i=r).path??(i.path=[]),r.path.unshift(t),r})}function Nr(t){return typeof t=="string"?t:t?.message}function $e(t,e,r){let i={...t,path:t.path??[]};if(!t.message){let n=Nr(t.inst?._zod.def?.error?.(t))??Nr(e?.error?.(t))??Nr(r.customError?.(t))??Nr(r.localeError?.(t))??"Invalid input";i.message=n}return delete i.inst,delete i.continue,e?.reportInput||delete i.input,i}function Rr(t){return t instanceof Set?"set":t instanceof Map?"map":t instanceof File?"file":"unknown"}function Ur(t){return Array.isArray(t)?"array":typeof t=="string"?"string":"unknown"}function I(t){let e=typeof t;switch(e){case"number":return Number.isNaN(t)?"nan":"number";case"object":{if(t===null)return"null";if(Array.isArray(t))return"array";let r=t;if(r&&Object.getPrototypeOf(r)!==Object.prototype&&"constructor"in r&&r.constructor)return r.constructor.name}}return e}function mn(...t){let[e,r,i]=t;return typeof e=="string"?{message:e,code:"custom",input:r,inst:i}:{...e}}function $O(t){return Object.entries(t).filter(([e,r])=>Number.isNaN(Number.parseInt(e,10))).map(e=>e[1])}function Gy(t){let e=atob(t),r=new Uint8Array(e.length);for(let i=0;i<e.length;i++)r[i]=e.charCodeAt(i);return r}function Ky(t){let e="";for(let r=0;r<t.length;r++)e+=String.fromCharCode(t[r]);return btoa(e)}function kO(t){let e=t.replace(/-/g,"+").replace(/_/g,"/"),r="=".repeat((4-e.length%4)%4);return Gy(e+r)}function SO(t){return Ky(t).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function xO(t){let e=t.replace(/^0x/,"");if(e.length%2!==0)throw new Error("Invalid hex string length");let r=new Uint8Array(e.length/2);for(let i=0;i<e.length;i+=2)r[i/2]=Number.parseInt(e.slice(i,i+2),16);return r}function IO(t){return Array.from(t).map(e=>e.toString(16).padStart(2,"0")).join("")}var hl=class{constructor(...e){}};var Jy=(t,e)=>{t.name="$ZodError",Object.defineProperty(t,"_zod",{value:t._zod,enumerable:!1}),Object.defineProperty(t,"issues",{value:e,enumerable:!1}),t.message=JSON.stringify(e,pn,2),Object.defineProperty(t,"toString",{value:()=>t.message,enumerable:!1})},Lr=_("$ZodError",Jy),ke=_("$ZodError",Jy,{Parent:Error});function Mr(t,e=r=>r.message){let r={},i=[];for(let n of t.issues)n.path.length>0?(r[n.path[0]]=r[n.path[0]]||[],r[n.path[0]].push(e(n))):i.push(e(n));return{formErrors:i,fieldErrors:r}}function Fr(t,e=r=>r.message){let r={_errors:[]},i=n=>{for(let o of n.issues)if(o.code==="invalid_union"&&o.errors.length)o.errors.map(s=>i({issues:s}));else if(o.code==="invalid_key")i({issues:o.issues});else if(o.code==="invalid_element")i({issues:o.issues});else if(o.path.length===0)r._errors.push(e(o));else{let s=r,a=0;for(;a<o.path.length;){let c=o.path[a];a===o.path.length-1?(s[c]=s[c]||{_errors:[]},s[c]._errors.push(e(o))):s[c]=s[c]||{_errors:[]},s=s[c],a++}}};return i(t),r}function xl(t,e=r=>r.message){let r={errors:[]},i=(n,o=[])=>{var s,a;for(let c of n.issues)if(c.code==="invalid_union"&&c.errors.length)c.errors.map(l=>i({issues:l},c.path));else if(c.code==="invalid_key")i({issues:c.issues},c.path);else if(c.code==="invalid_element")i({issues:c.issues},c.path);else{let l=[...o,...c.path];if(l.length===0){r.errors.push(e(c));continue}let u=r,d=0;for(;d<l.length;){let p=l[d],f=d===l.length-1;typeof p=="string"?(u.properties??(u.properties={}),(s=u.properties)[p]??(s[p]={errors:[]}),u=u.properties[p]):(u.items??(u.items=[]),(a=u.items)[p]??(a[p]={errors:[]}),u=u.items[p]),f&&u.errors.push(e(c)),d++}}};return i(t),r}function Wy(t){let e=[],r=t.map(i=>typeof i=="object"?i.key:i);for(let i of r)typeof i=="number"?e.push(`[${i}]`):typeof i=="symbol"?e.push(`[${JSON.stringify(String(i))}]`):/[^\w$]/.test(i)?e.push(`[${JSON.stringify(i)}]`):(e.length&&e.push("."),e.push(i));return e.join("")}function Il(t){let e=[],r=[...t.issues].sort((i,n)=>(i.path??[]).length-(n.path??[]).length);for(let i of r)e.push(`\u2716 ${i.message}`),i.path?.length&&e.push(` \u2192 at ${Wy(i.path)}`);return e.join(`
173
- `)}var gn=t=>(e,r,i,n)=>{let o=i?Object.assign(i,{async:!1}):{async:!1},s=e._zod.run({value:r,issues:[]},o);if(s instanceof Promise)throw new Le;if(s.issues.length){let a=new(n?.Err??t)(s.issues.map(c=>$e(c,o,ie())));throw bo(a,n?.callee),a}return s.value},wo=gn(ke),hn=t=>async(e,r,i,n)=>{let o=i?Object.assign(i,{async:!0}):{async:!0},s=e._zod.run({value:r,issues:[]},o);if(s instanceof Promise&&(s=await s),s.issues.length){let a=new(n?.Err??t)(s.issues.map(c=>$e(c,o,ie())));throw bo(a,n?.callee),a}return s.value},$o=hn(ke),yn=t=>(e,r,i)=>{let n=i?{...i,async:!1}:{async:!1},o=e._zod.run({value:r,issues:[]},n);if(o instanceof Promise)throw new Le;return o.issues.length?{success:!1,error:new(t??Lr)(o.issues.map(s=>$e(s,n,ie())))}:{success:!0,data:o.value}},Ol=yn(ke),_n=t=>async(e,r,i)=>{let n=i?Object.assign(i,{async:!0}):{async:!0},o=e._zod.run({value:r,issues:[]},n);return o instanceof Promise&&(o=await o),o.issues.length?{success:!1,error:new t(o.issues.map(s=>$e(s,n,ie())))}:{success:!0,data:o.value}},Pl=_n(ke),ko=t=>(e,r,i)=>{let n=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return gn(t)(e,r,n)},PO=ko(ke),So=t=>(e,r,i)=>gn(t)(e,r,i),TO=So(ke),xo=t=>async(e,r,i)=>{let n=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return hn(t)(e,r,n)},AO=xo(ke),Io=t=>async(e,r,i)=>hn(t)(e,r,i),EO=Io(ke),Oo=t=>(e,r,i)=>{let n=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return yn(t)(e,r,n)},zO=Oo(ke),Po=t=>(e,r,i)=>yn(t)(e,r,i),NO=Po(ke),To=t=>async(e,r,i)=>{let n=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return _n(t)(e,r,n)},CO=To(ke),Ao=t=>async(e,r,i)=>_n(t)(e,r,i),DO=Ao(ke);var ze={};Xe(ze,{base64:()=>Bl,base64url:()=>Eo,bigint:()=>Yl,boolean:()=>Xl,browserEmail:()=>qO,cidrv4:()=>Zl,cidrv6:()=>ql,cuid:()=>Tl,cuid2:()=>Al,date:()=>Gl,datetime:()=>Jl,domain:()=>GO,duration:()=>Dl,e164:()=>Vl,email:()=>Rl,emoji:()=>Ul,extendedDuration:()=>jO,guid:()=>jl,hex:()=>KO,hostname:()=>VO,html5Email:()=>MO,idnEmail:()=>ZO,integer:()=>Hl,ipv4:()=>Ll,ipv6:()=>Ml,ksuid:()=>Nl,lowercase:()=>tu,mac:()=>Fl,md5_base64:()=>WO,md5_base64url:()=>YO,md5_hex:()=>JO,nanoid:()=>Cl,null:()=>Ql,number:()=>zo,rfc5322Email:()=>FO,sha1_base64:()=>XO,sha1_base64url:()=>QO,sha1_hex:()=>HO,sha256_base64:()=>tP,sha256_base64url:()=>nP,sha256_hex:()=>eP,sha384_base64:()=>iP,sha384_base64url:()=>oP,sha384_hex:()=>rP,sha512_base64:()=>aP,sha512_base64url:()=>cP,sha512_hex:()=>sP,string:()=>Wl,time:()=>Kl,ulid:()=>El,undefined:()=>eu,unicodeEmail:()=>Yy,uppercase:()=>nu,uuid:()=>Zt,uuid4:()=>RO,uuid6:()=>UO,uuid7:()=>LO,xid:()=>zl});var Tl=/^[cC][^\s-]{8,}$/,Al=/^[0-9a-z]+$/,El=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,zl=/^[0-9a-vA-V]{20}$/,Nl=/^[A-Za-z0-9]{27}$/,Cl=/^[a-zA-Z0-9_-]{21}$/,Dl=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,jO=/^[-+]?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)?)??$/,jl=/^([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})$/,Zt=t=>t?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${t}[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)$/,RO=Zt(4),UO=Zt(6),LO=Zt(7),Rl=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,MO=/^[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])?)*$/,FO=/^(([^<>()\[\]\\.,;:\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,}))$/,Yy=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,ZO=Yy,qO=/^[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])?)*$/,BO="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function Ul(){return new RegExp(BO,"u")}var Ll=/^(?:(?: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])$/,Ml=/^(([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}|:))$/,Fl=t=>{let e=Ee(t??":");return new RegExp(`^(?:[0-9A-F]{2}${e}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${e}){5}[0-9a-f]{2}$`)},Zl=/^((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])$/,ql=/^(([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])$/,Bl=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Eo=/^[A-Za-z0-9_-]*$/,VO=/^(?=.{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])?)*\.?$/,GO=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,Vl=/^\+[1-9]\d{6,14}$/,Hy="(?:(?:\\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])))",Gl=new RegExp(`^${Hy}$`);function Xy(t){let e="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof t.precision=="number"?t.precision===-1?`${e}`:t.precision===0?`${e}:[0-5]\\d`:`${e}:[0-5]\\d\\.\\d{${t.precision}}`:`${e}(?::[0-5]\\d(?:\\.\\d+)?)?`}function Kl(t){return new RegExp(`^${Xy(t)}$`)}function Jl(t){let e=Xy({precision:t.precision}),r=["Z"];t.local&&r.push(""),t.offset&&r.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let i=`${e}(?:${r.join("|")})`;return new RegExp(`^${Hy}T(?:${i})$`)}var Wl=t=>{let e=t?`[\\s\\S]{${t?.minimum??0},${t?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${e}$`)},Yl=/^-?\d+n?$/,Hl=/^-?\d+$/,zo=/^-?\d+(?:\.\d+)?$/,Xl=/^(?:true|false)$/i,Ql=/^null$/i;var eu=/^undefined$/i;var tu=/^[^A-Z]*$/,nu=/^[^a-z]*$/,KO=/^[0-9a-fA-F]*$/;function Zr(t,e){return new RegExp(`^[A-Za-z0-9+/]{${t}}${e}$`)}function qr(t){return new RegExp(`^[A-Za-z0-9_-]{${t}}$`)}var JO=/^[0-9a-fA-F]{32}$/,WO=Zr(22,"=="),YO=qr(22),HO=/^[0-9a-fA-F]{40}$/,XO=Zr(27,"="),QO=qr(27),eP=/^[0-9a-fA-F]{64}$/,tP=Zr(43,"="),nP=qr(43),rP=/^[0-9a-fA-F]{96}$/,iP=Zr(64,""),oP=qr(64),sP=/^[0-9a-fA-F]{128}$/,aP=Zr(86,"=="),cP=qr(86);var Y=_("$ZodCheck",(t,e)=>{var r;t._zod??(t._zod={}),t._zod.def=e,(r=t._zod).onattach??(r.onattach=[])}),e_={number:"number",bigint:"bigint",object:"date"},No=_("$ZodCheckLessThan",(t,e)=>{Y.init(t,e);let r=e_[typeof e.value];t._zod.onattach.push(i=>{let n=i._zod.bag,o=(e.inclusive?n.maximum:n.exclusiveMaximum)??Number.POSITIVE_INFINITY;e.value<o&&(e.inclusive?n.maximum=e.value:n.exclusiveMaximum=e.value)}),t._zod.check=i=>{(e.inclusive?i.value<=e.value:i.value<e.value)||i.issues.push({origin:r,code:"too_big",maximum:typeof e.value=="object"?e.value.getTime():e.value,input:i.value,inclusive:e.inclusive,inst:t,continue:!e.abort})}}),Co=_("$ZodCheckGreaterThan",(t,e)=>{Y.init(t,e);let r=e_[typeof e.value];t._zod.onattach.push(i=>{let n=i._zod.bag,o=(e.inclusive?n.minimum:n.exclusiveMinimum)??Number.NEGATIVE_INFINITY;e.value>o&&(e.inclusive?n.minimum=e.value:n.exclusiveMinimum=e.value)}),t._zod.check=i=>{(e.inclusive?i.value>=e.value:i.value>e.value)||i.issues.push({origin:r,code:"too_small",minimum:typeof e.value=="object"?e.value.getTime():e.value,input:i.value,inclusive:e.inclusive,inst:t,continue:!e.abort})}}),ru=_("$ZodCheckMultipleOf",(t,e)=>{Y.init(t,e),t._zod.onattach.push(r=>{var i;(i=r._zod.bag).multipleOf??(i.multipleOf=e.value)}),t._zod.check=r=>{if(typeof r.value!=typeof e.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof r.value=="bigint"?r.value%e.value===BigInt(0):yl(r.value,e.value)===0)||r.issues.push({origin:typeof r.value,code:"not_multiple_of",divisor:e.value,input:r.value,inst:t,continue:!e.abort})}}),iu=_("$ZodCheckNumberFormat",(t,e)=>{Y.init(t,e),e.format=e.format||"float64";let r=e.format?.includes("int"),i=r?"int":"number",[n,o]=kl[e.format];t._zod.onattach.push(s=>{let a=s._zod.bag;a.format=e.format,a.minimum=n,a.maximum=o,r&&(a.pattern=Hl)}),t._zod.check=s=>{let a=s.value;if(r){if(!Number.isInteger(a)){s.issues.push({expected:i,format:e.format,code:"invalid_type",continue:!1,input:a,inst:t});return}if(!Number.isSafeInteger(a)){a>0?s.issues.push({input:a,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:t,origin:i,inclusive:!0,continue:!e.abort}):s.issues.push({input:a,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:t,origin:i,inclusive:!0,continue:!e.abort});return}}a<n&&s.issues.push({origin:"number",input:a,code:"too_small",minimum:n,inclusive:!0,inst:t,continue:!e.abort}),a>o&&s.issues.push({origin:"number",input:a,code:"too_big",maximum:o,inclusive:!0,inst:t,continue:!e.abort})}}),ou=_("$ZodCheckBigIntFormat",(t,e)=>{Y.init(t,e);let[r,i]=Sl[e.format];t._zod.onattach.push(n=>{let o=n._zod.bag;o.format=e.format,o.minimum=r,o.maximum=i}),t._zod.check=n=>{let o=n.value;o<r&&n.issues.push({origin:"bigint",input:o,code:"too_small",minimum:r,inclusive:!0,inst:t,continue:!e.abort}),o>i&&n.issues.push({origin:"bigint",input:o,code:"too_big",maximum:i,inclusive:!0,inst:t,continue:!e.abort})}}),su=_("$ZodCheckMaxSize",(t,e)=>{var r;Y.init(t,e),(r=t._zod.def).when??(r.when=i=>{let n=i.value;return!bt(n)&&n.size!==void 0}),t._zod.onattach.push(i=>{let n=i._zod.bag.maximum??Number.POSITIVE_INFINITY;e.maximum<n&&(i._zod.bag.maximum=e.maximum)}),t._zod.check=i=>{let n=i.value;n.size<=e.maximum||i.issues.push({origin:Rr(n),code:"too_big",maximum:e.maximum,inclusive:!0,input:n,inst:t,continue:!e.abort})}}),au=_("$ZodCheckMinSize",(t,e)=>{var r;Y.init(t,e),(r=t._zod.def).when??(r.when=i=>{let n=i.value;return!bt(n)&&n.size!==void 0}),t._zod.onattach.push(i=>{let n=i._zod.bag.minimum??Number.NEGATIVE_INFINITY;e.minimum>n&&(i._zod.bag.minimum=e.minimum)}),t._zod.check=i=>{let n=i.value;n.size>=e.minimum||i.issues.push({origin:Rr(n),code:"too_small",minimum:e.minimum,inclusive:!0,input:n,inst:t,continue:!e.abort})}}),cu=_("$ZodCheckSizeEquals",(t,e)=>{var r;Y.init(t,e),(r=t._zod.def).when??(r.when=i=>{let n=i.value;return!bt(n)&&n.size!==void 0}),t._zod.onattach.push(i=>{let n=i._zod.bag;n.minimum=e.size,n.maximum=e.size,n.size=e.size}),t._zod.check=i=>{let n=i.value,o=n.size;if(o===e.size)return;let s=o>e.size;i.issues.push({origin:Rr(n),...s?{code:"too_big",maximum:e.size}:{code:"too_small",minimum:e.size},inclusive:!0,exact:!0,input:i.value,inst:t,continue:!e.abort})}}),lu=_("$ZodCheckMaxLength",(t,e)=>{var r;Y.init(t,e),(r=t._zod.def).when??(r.when=i=>{let n=i.value;return!bt(n)&&n.length!==void 0}),t._zod.onattach.push(i=>{let n=i._zod.bag.maximum??Number.POSITIVE_INFINITY;e.maximum<n&&(i._zod.bag.maximum=e.maximum)}),t._zod.check=i=>{let n=i.value;if(n.length<=e.maximum)return;let s=Ur(n);i.issues.push({origin:s,code:"too_big",maximum:e.maximum,inclusive:!0,input:n,inst:t,continue:!e.abort})}}),uu=_("$ZodCheckMinLength",(t,e)=>{var r;Y.init(t,e),(r=t._zod.def).when??(r.when=i=>{let n=i.value;return!bt(n)&&n.length!==void 0}),t._zod.onattach.push(i=>{let n=i._zod.bag.minimum??Number.NEGATIVE_INFINITY;e.minimum>n&&(i._zod.bag.minimum=e.minimum)}),t._zod.check=i=>{let n=i.value;if(n.length>=e.minimum)return;let s=Ur(n);i.issues.push({origin:s,code:"too_small",minimum:e.minimum,inclusive:!0,input:n,inst:t,continue:!e.abort})}}),du=_("$ZodCheckLengthEquals",(t,e)=>{var r;Y.init(t,e),(r=t._zod.def).when??(r.when=i=>{let n=i.value;return!bt(n)&&n.length!==void 0}),t._zod.onattach.push(i=>{let n=i._zod.bag;n.minimum=e.length,n.maximum=e.length,n.length=e.length}),t._zod.check=i=>{let n=i.value,o=n.length;if(o===e.length)return;let s=Ur(n),a=o>e.length;i.issues.push({origin:s,...a?{code:"too_big",maximum:e.length}:{code:"too_small",minimum:e.length},inclusive:!0,exact:!0,input:i.value,inst:t,continue:!e.abort})}}),vn=_("$ZodCheckStringFormat",(t,e)=>{var r,i;Y.init(t,e),t._zod.onattach.push(n=>{let o=n._zod.bag;o.format=e.format,e.pattern&&(o.patterns??(o.patterns=new Set),o.patterns.add(e.pattern))}),e.pattern?(r=t._zod).check??(r.check=n=>{e.pattern.lastIndex=0,!e.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:e.format,input:n.value,...e.pattern?{pattern:e.pattern.toString()}:{},inst:t,continue:!e.abort})}):(i=t._zod).check??(i.check=()=>{})}),pu=_("$ZodCheckRegex",(t,e)=>{vn.init(t,e),t._zod.check=r=>{e.pattern.lastIndex=0,!e.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:e.pattern.toString(),inst:t,continue:!e.abort})}}),fu=_("$ZodCheckLowerCase",(t,e)=>{e.pattern??(e.pattern=tu),vn.init(t,e)}),mu=_("$ZodCheckUpperCase",(t,e)=>{e.pattern??(e.pattern=nu),vn.init(t,e)}),gu=_("$ZodCheckIncludes",(t,e)=>{Y.init(t,e);let r=Ee(e.includes),i=new RegExp(typeof e.position=="number"?`^.{${e.position}}${r}`:r);e.pattern=i,t._zod.onattach.push(n=>{let o=n._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(i)}),t._zod.check=n=>{n.value.includes(e.includes,e.position)||n.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:e.includes,input:n.value,inst:t,continue:!e.abort})}}),hu=_("$ZodCheckStartsWith",(t,e)=>{Y.init(t,e);let r=new RegExp(`^${Ee(e.prefix)}.*`);e.pattern??(e.pattern=r),t._zod.onattach.push(i=>{let n=i._zod.bag;n.patterns??(n.patterns=new Set),n.patterns.add(r)}),t._zod.check=i=>{i.value.startsWith(e.prefix)||i.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:e.prefix,input:i.value,inst:t,continue:!e.abort})}}),yu=_("$ZodCheckEndsWith",(t,e)=>{Y.init(t,e);let r=new RegExp(`.*${Ee(e.suffix)}$`);e.pattern??(e.pattern=r),t._zod.onattach.push(i=>{let n=i._zod.bag;n.patterns??(n.patterns=new Set),n.patterns.add(r)}),t._zod.check=i=>{i.value.endsWith(e.suffix)||i.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:e.suffix,input:i.value,inst:t,continue:!e.abort})}});function Qy(t,e,r){t.issues.length&&e.issues.push(...Ie(r,t.issues))}var _u=_("$ZodCheckProperty",(t,e)=>{Y.init(t,e),t._zod.check=r=>{let i=e.schema._zod.run({value:r.value[e.property],issues:[]},{});if(i instanceof Promise)return i.then(n=>Qy(n,r,e.property));Qy(i,r,e.property)}}),vu=_("$ZodCheckMimeType",(t,e)=>{Y.init(t,e);let r=new Set(e.mime);t._zod.onattach.push(i=>{i._zod.bag.mime=e.mime}),t._zod.check=i=>{r.has(i.value.type)||i.issues.push({code:"invalid_value",values:e.mime,input:i.value.type,inst:t,continue:!e.abort})}}),bu=_("$ZodCheckOverwrite",(t,e)=>{Y.init(t,e),t._zod.check=r=>{r.value=e.tx(r.value)}});var Br=class{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),this.indent-=1}write(e){if(typeof e=="function"){e(this,{execution:"sync"}),e(this,{execution:"async"});return}let i=e.split(`
166
+ `,n)}while(i!==-1);return o+=t.slice(n),o}var{stdout:lg,stderr:ug}=sg,Ra=Symbol("GENERATOR"),Xt=Symbol("STYLER"),Qn=Symbol("IS_EMPTY"),dg=["ansi","ansi","ansi256","ansi16m"],Qt=Object.create(null),z$=(t,e={})=>{if(e.level&&!(Number.isInteger(e.level)&&e.level>=0&&e.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");let r=lg?lg.level:0;t.level=e.level===void 0?r:e.level};var N$=t=>{let e=(...r)=>r.join(" ");return z$(e,t),Object.setPrototypeOf(e,er.prototype),e};function er(t){return N$(t)}Object.setPrototypeOf(er.prototype,Function.prototype);for(let[t,e]of Object.entries(je))Qt[t]={get(){let r=ki(this,La(e.open,e.close,this[Xt]),this[Qn]);return Object.defineProperty(this,t,{value:r}),r}};Qt.visible={get(){let t=ki(this,this[Xt],!0);return Object.defineProperty(this,"visible",{value:t}),t}};var Ua=(t,e,r,...i)=>t==="rgb"?e==="ansi16m"?je[r].ansi16m(...i):e==="ansi256"?je[r].ansi256(je.rgbToAnsi256(...i)):je[r].ansi(je.rgbToAnsi(...i)):t==="hex"?Ua("rgb",e,r,...je.hexToRgb(...i)):je[r][t](...i),C$=["rgb","hex","ansi256"];for(let t of C$){Qt[t]={get(){let{level:r}=this;return function(...i){let n=La(Ua(t,dg[r],"color",...i),je.color.close,this[Xt]);return ki(this,n,this[Qn])}}};let e="bg"+t[0].toUpperCase()+t.slice(1);Qt[e]={get(){let{level:r}=this;return function(...i){let n=La(Ua(t,dg[r],"bgColor",...i),je.bgColor.close,this[Xt]);return ki(this,n,this[Qn])}}}}var D$=Object.defineProperties(()=>{},{...Qt,level:{enumerable:!0,get(){return this[Ra].level},set(t){this[Ra].level=t}}}),La=(t,e,r)=>{let i,n;return r===void 0?(i=t,n=e):(i=r.openAll+t,n=e+r.closeAll),{open:t,close:e,openAll:i,closeAll:n,parent:r}},ki=(t,e,r)=>{let i=(...n)=>j$(i,n.length===1?""+n[0]:n.join(" "));return Object.setPrototypeOf(i,D$),i[Ra]=t,i[Xt]=e,i[Qn]=r,i},j$=(t,e)=>{if(t.level<=0||!e)return t[Qn]?"":e;let r=t[Xt];if(r===void 0)return e;let{openAll:i,closeAll:n}=r;if(e.includes("\x1B"))for(;r!==void 0;)e=ag(e,r.close,r.open),r=r.parent;let o=e.indexOf(`
167
+ `);return o!==-1&&(e=cg(e,n,i,o)),i+e+n};Object.defineProperties(er.prototype,Qt);var R$=er(),UE=er({level:ug?ug.level:0});var Re=R$;var U$=[/"access_token"\s*:\s*"[^"]+"/g,/"refresh_token"\s*:\s*"[^"]+"/g,/(?:Bearer\s+)[A-Za-z0-9._-]+/g,/eyJ[A-Za-z0-9._-]{20,}/g];function tr(t){let e=t;for(let r of U$)e=e.replace(r,i=>i.startsWith('"')?`"${i.slice(1).split('"')[0]}":"[redacted]"`:i.toLowerCase().startsWith("bearer ")?"Bearer [redacted]":"[redacted]");return e}var nr=class{constructor(e={}){this.opts=e}colorize(e,r){return this.opts.color===!1?e:r(e)}info(e){this.opts.quiet||process.stderr.write(tr(e)+`
168
+ `)}warn(e){this.opts.quiet||process.stderr.write(this.colorize(tr(e),Re.yellow)+`
169
+ `)}error(e){process.stderr.write(this.colorize(tr(e),Re.red)+`
170
+ `)}success(e){this.opts.quiet||process.stderr.write(this.colorize(tr(e),Re.green)+`
171
+ `)}debug(e){this.opts.verbose&&process.stderr.write(this.colorize(tr(`[debug] ${e}`),Re.gray)+`
172
+ `)}},qE=new nr;var aa=Ct(qt(),1);import pi from"node:fs";import vm from"node:path";import XT from"node:os";var g={};Xe(g,{$brand:()=>wo,$input:()=>Ld,$output:()=>Ud,NEVER:()=>bl,TimePrecision:()=>Fd,ZodAny:()=>Nf,ZodArray:()=>Rf,ZodBase64:()=>Ks,ZodBase64URL:()=>Ws,ZodBigInt:()=>qn,ZodBigIntFormat:()=>Xs,ZodBoolean:()=>Mn,ZodCIDRv4:()=>Gs,ZodCIDRv6:()=>Js,ZodCUID:()=>Ls,ZodCUID2:()=>Ms,ZodCatch:()=>om,ZodCodec:()=>sa,ZodCustom:()=>di,ZodCustomStringFormat:()=>Un,ZodDate:()=>si,ZodDefault:()=>Qf,ZodDiscriminatedUnion:()=>Lf,ZodE164:()=>Ys,ZodEmail:()=>js,ZodEmoji:()=>Rs,ZodEnum:()=>jn,ZodError:()=>LT,ZodExactOptional:()=>Yf,ZodFile:()=>Kf,ZodFirstPartyTypeKind:()=>ym,ZodFunction:()=>mm,ZodGUID:()=>ti,ZodIPv4:()=>Bs,ZodIPv6:()=>Vs,ZodISODate:()=>As,ZodISODateTime:()=>Ts,ZodISODuration:()=>zs,ZodISOTime:()=>Es,ZodIntersection:()=>Mf,ZodIssueCode:()=>qT,ZodJWT:()=>Hs,ZodKSUID:()=>Fs,ZodLazy:()=>dm,ZodLiteral:()=>Jf,ZodMAC:()=>If,ZodMap:()=>Vf,ZodNaN:()=>am,ZodNanoID:()=>Us,ZodNever:()=>Df,ZodNonOptional:()=>ia,ZodNull:()=>Ef,ZodNullable:()=>Xf,ZodNumber:()=>Ln,ZodNumberFormat:()=>Wt,ZodObject:()=>ci,ZodOptional:()=>ra,ZodPipe:()=>oa,ZodPrefault:()=>tm,ZodPromise:()=>fm,ZodReadonly:()=>cm,ZodRealError:()=>Se,ZodRecord:()=>ui,ZodSet:()=>Gf,ZodString:()=>Rn,ZodStringFormat:()=>Y,ZodSuccess:()=>im,ZodSymbol:()=>Tf,ZodTemplateLiteral:()=>um,ZodTransform:()=>Wf,ZodTuple:()=>Zf,ZodType:()=>U,ZodULID:()=>qs,ZodURL:()=>oi,ZodUUID:()=>We,ZodUndefined:()=>Af,ZodUnion:()=>li,ZodUnknown:()=>Cf,ZodVoid:()=>jf,ZodXID:()=>Zs,ZodXor:()=>Uf,_ZodString:()=>Ds,_default:()=>em,_function:()=>Eb,any:()=>lb,array:()=>ai,base64:()=>Gv,base64url:()=>Jv,bigint:()=>ib,boolean:()=>Pf,catch:()=>sm,check:()=>zb,cidrv4:()=>Bv,cidrv6:()=>Vv,clone:()=>ye,codec:()=>Pb,coerce:()=>_m,config:()=>ae,core:()=>it,cuid:()=>jv,cuid2:()=>Rv,custom:()=>Nb,date:()=>db,decode:()=>vf,decodeAsync:()=>wf,describe:()=>Cb,discriminatedUnion:()=>yb,e164:()=>Kv,email:()=>Iv,emoji:()=>Cv,encode:()=>_f,encodeAsync:()=>bf,endsWith:()=>In,enum:()=>ta,exactOptional:()=>Hf,file:()=>Sb,flattenError:()=>Zr,float32:()=>eb,float64:()=>tb,formatError:()=>Fr,fromJSONSchema:()=>qb,function:()=>Eb,getErrorMap:()=>FT,globalRegistry:()=>pe,gt:()=>Je,gte:()=>_e,guid:()=>Ov,hash:()=>Qv,hex:()=>Xv,hostname:()=>Hv,httpUrl:()=>Nv,includes:()=>Sn,instanceof:()=>jb,int:()=>Cs,int32:()=>nb,int64:()=>ob,intersection:()=>qf,ipv4:()=>qv,ipv6:()=>Fv,iso:()=>Dn,json:()=>Ub,jwt:()=>Wv,keyof:()=>pb,ksuid:()=>Mv,lazy:()=>pm,length:()=>Jt,literal:()=>kb,locales:()=>Hr,looseObject:()=>gb,looseRecord:()=>vb,lowercase:()=>$n,lt:()=>Ge,lte:()=>Ie,mac:()=>Zv,map:()=>bb,maxLength:()=>Gt,maxSize:()=>St,meta:()=>Db,mime:()=>On,minLength:()=>rt,minSize:()=>Ke,multipleOf:()=>kt,nan:()=>Ob,nanoid:()=>Dv,nativeEnum:()=>$b,negative:()=>vs,never:()=>Qs,nonnegative:()=>ws,nonoptional:()=>rm,nonpositive:()=>bs,normalize:()=>Pn,null:()=>zf,nullable:()=>ri,nullish:()=>xb,number:()=>Of,object:()=>fb,optional:()=>ni,overwrite:()=>qe,parse:()=>mf,parseAsync:()=>gf,partialRecord:()=>_b,pipe:()=>ii,positive:()=>_s,prefault:()=>nm,preprocess:()=>Lb,prettifyError:()=>zl,promise:()=>Ab,property:()=>$s,readonly:()=>lm,record:()=>Bf,refine:()=>gm,regex:()=>wn,regexes:()=>Ee,registry:()=>Ho,safeDecode:()=>kf,safeDecodeAsync:()=>xf,safeEncode:()=>$f,safeEncodeAsync:()=>Sf,safeParse:()=>hf,safeParseAsync:()=>yf,set:()=>wb,setErrorMap:()=>ZT,size:()=>Vt,slugify:()=>zn,startsWith:()=>xn,strictObject:()=>mb,string:()=>Ns,stringFormat:()=>Yv,stringbool:()=>Rb,success:()=>Ib,superRefine:()=>hm,symbol:()=>ab,templateLiteral:()=>Tb,toJSONSchema:()=>Is,toLowerCase:()=>An,toUpperCase:()=>En,transform:()=>na,treeifyError:()=>El,trim:()=>Tn,tuple:()=>Ff,uint32:()=>rb,uint64:()=>sb,ulid:()=>Uv,undefined:()=>cb,union:()=>ea,unknown:()=>Kt,uppercase:()=>kn,url:()=>zv,util:()=>P,uuid:()=>Pv,uuidv4:()=>Tv,uuidv6:()=>Av,uuidv7:()=>Ev,void:()=>ub,xid:()=>Lv,xor:()=>hb});var it={};Xe(it,{$ZodAny:()=>sd,$ZodArray:()=>dd,$ZodAsyncError:()=>Me,$ZodBase64:()=>Yu,$ZodBase64URL:()=>Hu,$ZodBigInt:()=>Bo,$ZodBigIntFormat:()=>nd,$ZodBoolean:()=>Jr,$ZodCIDRv4:()=>Ju,$ZodCIDRv6:()=>Ku,$ZodCUID:()=>Du,$ZodCUID2:()=>ju,$ZodCatch:()=>Td,$ZodCheck:()=>X,$ZodCheckBigIntFormat:()=>du,$ZodCheckEndsWith:()=>ku,$ZodCheckGreaterThan:()=>Ro,$ZodCheckIncludes:()=>wu,$ZodCheckLengthEquals:()=>yu,$ZodCheckLessThan:()=>jo,$ZodCheckLowerCase:()=>vu,$ZodCheckMaxLength:()=>gu,$ZodCheckMaxSize:()=>pu,$ZodCheckMimeType:()=>xu,$ZodCheckMinLength:()=>hu,$ZodCheckMinSize:()=>fu,$ZodCheckMultipleOf:()=>lu,$ZodCheckNumberFormat:()=>uu,$ZodCheckOverwrite:()=>Iu,$ZodCheckProperty:()=>Su,$ZodCheckRegex:()=>_u,$ZodCheckSizeEquals:()=>mu,$ZodCheckStartsWith:()=>$u,$ZodCheckStringFormat:()=>vn,$ZodCheckUpperCase:()=>bu,$ZodCodec:()=>Wr,$ZodCustom:()=>Rd,$ZodCustomStringFormat:()=>ed,$ZodDate:()=>ud,$ZodDefault:()=>xd,$ZodDiscriminatedUnion:()=>md,$ZodE164:()=>Xu,$ZodEmail:()=>Eu,$ZodEmoji:()=>Nu,$ZodEncodeError:()=>_t,$ZodEnum:()=>vd,$ZodError:()=>qr,$ZodExactOptional:()=>kd,$ZodFile:()=>wd,$ZodFunction:()=>Cd,$ZodGUID:()=>Tu,$ZodIPv4:()=>Bu,$ZodIPv6:()=>Vu,$ZodISODate:()=>qu,$ZodISODateTime:()=>Mu,$ZodISODuration:()=>Fu,$ZodISOTime:()=>Zu,$ZodIntersection:()=>gd,$ZodJWT:()=>Qu,$ZodKSUID:()=>Lu,$ZodLazy:()=>jd,$ZodLiteral:()=>bd,$ZodMAC:()=>Gu,$ZodMap:()=>yd,$ZodNaN:()=>Ad,$ZodNanoID:()=>Cu,$ZodNever:()=>cd,$ZodNonOptional:()=>Od,$ZodNull:()=>od,$ZodNullable:()=>Sd,$ZodNumber:()=>Fo,$ZodNumberFormat:()=>td,$ZodObject:()=>x_,$ZodObjectJIT:()=>pd,$ZodOptional:()=>Go,$ZodPipe:()=>Ed,$ZodPrefault:()=>Id,$ZodPromise:()=>Dd,$ZodReadonly:()=>zd,$ZodRealError:()=>ke,$ZodRecord:()=>hd,$ZodRegistry:()=>Yo,$ZodSet:()=>_d,$ZodString:()=>Bt,$ZodStringFormat:()=>W,$ZodSuccess:()=>Pd,$ZodSymbol:()=>rd,$ZodTemplateLiteral:()=>Nd,$ZodTransform:()=>$d,$ZodTuple:()=>Vo,$ZodType:()=>R,$ZodULID:()=>Ru,$ZodURL:()=>zu,$ZodUUID:()=>Au,$ZodUndefined:()=>id,$ZodUnion:()=>Kr,$ZodUnknown:()=>ad,$ZodVoid:()=>ld,$ZodXID:()=>Uu,$ZodXor:()=>fd,$brand:()=>wo,$constructor:()=>_,$input:()=>Ld,$output:()=>Ud,Doc:()=>Gr,JSONSchema:()=>Sv,JSONSchemaGenerator:()=>Os,NEVER:()=>bl,TimePrecision:()=>Fd,_any:()=>up,_array:()=>yp,_base64:()=>ms,_base64url:()=>gs,_bigint:()=>rp,_boolean:()=>tp,_catch:()=>ET,_check:()=>kv,_cidrv4:()=>ps,_cidrv6:()=>fs,_coercedBigint:()=>ip,_coercedBoolean:()=>np,_coercedDate:()=>gp,_coercedNumber:()=>Wd,_coercedString:()=>qd,_cuid:()=>os,_cuid2:()=>ss,_custom:()=>vp,_date:()=>mp,_decode:()=>Oo,_decodeAsync:()=>To,_default:()=>PT,_discriminatedUnion:()=>hT,_e164:()=>hs,_email:()=>Xo,_emoji:()=>rs,_encode:()=>Io,_encodeAsync:()=>Po,_endsWith:()=>In,_enum:()=>$T,_file:()=>_p,_float32:()=>Hd,_float64:()=>Xd,_gt:()=>Je,_gte:()=>_e,_guid:()=>Xr,_includes:()=>Sn,_int:()=>Yd,_int32:()=>Qd,_int64:()=>op,_intersection:()=>yT,_ipv4:()=>us,_ipv6:()=>ds,_isoDate:()=>Vd,_isoDateTime:()=>Bd,_isoDuration:()=>Jd,_isoTime:()=>Gd,_jwt:()=>ys,_ksuid:()=>ls,_lazy:()=>DT,_length:()=>Jt,_literal:()=>ST,_lowercase:()=>$n,_lt:()=>Ge,_lte:()=>Ie,_mac:()=>Zd,_map:()=>bT,_max:()=>Ie,_maxLength:()=>Gt,_maxSize:()=>St,_mime:()=>On,_min:()=>_e,_minLength:()=>rt,_minSize:()=>Ke,_multipleOf:()=>kt,_nan:()=>hp,_nanoid:()=>is,_nativeEnum:()=>kT,_negative:()=>vs,_never:()=>pp,_nonnegative:()=>ws,_nonoptional:()=>TT,_nonpositive:()=>bs,_normalize:()=>Pn,_null:()=>lp,_nullable:()=>OT,_number:()=>Kd,_optional:()=>IT,_overwrite:()=>qe,_parse:()=>gn,_parseAsync:()=>hn,_pipe:()=>zT,_positive:()=>_s,_promise:()=>jT,_property:()=>$s,_readonly:()=>NT,_record:()=>vT,_refine:()=>bp,_regex:()=>wn,_safeDecode:()=>Eo,_safeDecodeAsync:()=>No,_safeEncode:()=>Ao,_safeEncodeAsync:()=>zo,_safeParse:()=>yn,_safeParseAsync:()=>_n,_set:()=>wT,_size:()=>Vt,_slugify:()=>zn,_startsWith:()=>xn,_string:()=>Md,_stringFormat:()=>Nn,_stringbool:()=>Sp,_success:()=>AT,_superRefine:()=>wp,_symbol:()=>ap,_templateLiteral:()=>CT,_toLowerCase:()=>An,_toUpperCase:()=>En,_transform:()=>xT,_trim:()=>Tn,_tuple:()=>_T,_uint32:()=>ep,_uint64:()=>sp,_ulid:()=>as,_undefined:()=>cp,_union:()=>mT,_unknown:()=>dp,_uppercase:()=>kn,_url:()=>Qr,_uuid:()=>Qo,_uuidv4:()=>es,_uuidv6:()=>ts,_uuidv7:()=>ns,_void:()=>fp,_xid:()=>cs,_xor:()=>gT,clone:()=>ye,config:()=>ae,createStandardJSONSchemaMethod:()=>Cn,createToJSONSchemaMethod:()=>xp,decode:()=>LO,decodeAsync:()=>qO,describe:()=>$p,encode:()=>UO,encodeAsync:()=>MO,extractDefs:()=>It,finalize:()=>Ot,flattenError:()=>Zr,formatError:()=>Fr,globalConfig:()=>Cr,globalRegistry:()=>pe,initializeContext:()=>xt,isValidBase64:()=>Wu,isValidBase64URL:()=>w_,isValidJWT:()=>$_,locales:()=>Hr,meta:()=>kp,parse:()=>So,parseAsync:()=>xo,prettifyError:()=>zl,process:()=>V,regexes:()=>Ee,registry:()=>Ho,safeDecode:()=>FO,safeDecodeAsync:()=>VO,safeEncode:()=>ZO,safeEncodeAsync:()=>BO,safeParse:()=>Nl,safeParseAsync:()=>Cl,toDotPath:()=>r_,toJSONSchema:()=>Is,treeifyError:()=>El,util:()=>P,version:()=>Ou});var bl=Object.freeze({status:"aborted"});function _(t,e,r){function i(a,c){if(a._zod||Object.defineProperty(a,"_zod",{value:{def:c,constr:s,traits:new Set},enumerable:!1}),a._zod.traits.has(t))return;a._zod.traits.add(t),e(a,c);let l=s.prototype,d=Object.keys(l);for(let u=0;u<d.length;u++){let p=d[u];p in a||(a[p]=l[p].bind(a))}}let n=r?.Parent??Object;class o extends n{}Object.defineProperty(o,"name",{value:t});function s(a){var c;let l=r?.Parent?new o:this;i(l,a),(c=l._zod).deferred??(c.deferred=[]);for(let d of l._zod.deferred)d();return l}return Object.defineProperty(s,"init",{value:i}),Object.defineProperty(s,Symbol.hasInstance,{value:a=>r?.Parent&&a instanceof r.Parent?!0:a?._zod?.traits?.has(t)}),Object.defineProperty(s,"name",{value:t}),s}var wo=Symbol("zod_brand"),Me=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},_t=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name="ZodEncodeError"}},Cr={};function ae(t){return t&&Object.assign(Cr,t),Cr}var P={};Xe(P,{BIGINT_FORMAT_RANGES:()=>Al,Class:()=>$l,NUMBER_FORMAT_RANGES:()=>Tl,aborted:()=>$t,allowsEval:()=>xl,assert:()=>hO,assertEqual:()=>pO,assertIs:()=>mO,assertNever:()=>gO,assertNotEqual:()=>fO,assignProp:()=>bt,base64ToUint8Array:()=>e_,base64urlToUint8Array:()=>NO,cached:()=>fn,captureStackTrace:()=>ko,cleanEnum:()=>zO,cleanRegex:()=>Rr,clone:()=>ye,cloneDef:()=>_O,createTransparentProxy:()=>SO,defineLazy:()=>L,esc:()=>$o,escapeRegex:()=>Ae,extend:()=>OO,finalizeIssue:()=>$e,floatSafeRemainder:()=>kl,getElementAtPath:()=>vO,getEnumValues:()=>jr,getLengthableOrigin:()=>Mr,getParsedType:()=>kO,getSizableOrigin:()=>Lr,hexToUint8Array:()=>DO,isObject:()=>Zt,isPlainObject:()=>wt,issue:()=>mn,joinValues:()=>v,jsonStringifyReplacer:()=>pn,merge:()=>TO,mergeDefs:()=>nt,normalizeParams:()=>T,nullish:()=>vt,numKeys:()=>$O,objectClone:()=>yO,omit:()=>IO,optionalKeys:()=>Pl,parsedType:()=>O,partial:()=>AO,pick:()=>xO,prefixIssues:()=>xe,primitiveTypes:()=>Ol,promiseAllObject:()=>bO,propertyKeyTypes:()=>Ur,randomString:()=>wO,required:()=>EO,safeExtend:()=>PO,shallowClone:()=>Il,slugify:()=>Sl,stringifyPrimitive:()=>x,uint8ArrayToBase64:()=>t_,uint8ArrayToBase64url:()=>CO,uint8ArrayToHex:()=>jO,unwrapMessage:()=>Dr});function pO(t){return t}function fO(t){return t}function mO(t){}function gO(t){throw new Error("Unexpected value in exhaustive check")}function hO(t){}function jr(t){let e=Object.values(t).filter(i=>typeof i=="number");return Object.entries(t).filter(([i,n])=>e.indexOf(+i)===-1).map(([i,n])=>n)}function v(t,e="|"){return t.map(r=>x(r)).join(e)}function pn(t,e){return typeof e=="bigint"?e.toString():e}function fn(t){return{get value(){{let r=t();return Object.defineProperty(this,"value",{value:r}),r}throw new Error("cached value already set")}}}function vt(t){return t==null}function Rr(t){let e=t.startsWith("^")?1:0,r=t.endsWith("$")?t.length-1:t.length;return t.slice(e,r)}function kl(t,e){let r=(t.toString().split(".")[1]||"").length,i=e.toString(),n=(i.split(".")[1]||"").length;if(n===0&&/\d?e-\d?/.test(i)){let c=i.match(/\d?e-(\d?)/);c?.[1]&&(n=Number.parseInt(c[1]))}let o=r>n?r:n,s=Number.parseInt(t.toFixed(o).replace(".","")),a=Number.parseInt(e.toFixed(o).replace(".",""));return s%a/10**o}var Qy=Symbol("evaluating");function L(t,e,r){let i;Object.defineProperty(t,e,{get(){if(i!==Qy)return i===void 0&&(i=Qy,i=r()),i},set(n){Object.defineProperty(t,e,{value:n})},configurable:!0})}function yO(t){return Object.create(Object.getPrototypeOf(t),Object.getOwnPropertyDescriptors(t))}function bt(t,e,r){Object.defineProperty(t,e,{value:r,writable:!0,enumerable:!0,configurable:!0})}function nt(...t){let e={};for(let r of t){let i=Object.getOwnPropertyDescriptors(r);Object.assign(e,i)}return Object.defineProperties({},e)}function _O(t){return nt(t._zod.def)}function vO(t,e){return e?e.reduce((r,i)=>r?.[i],t):t}function bO(t){let e=Object.keys(t),r=e.map(i=>t[i]);return Promise.all(r).then(i=>{let n={};for(let o=0;o<e.length;o++)n[e[o]]=i[o];return n})}function wO(t=10){let e="abcdefghijklmnopqrstuvwxyz",r="";for(let i=0;i<t;i++)r+=e[Math.floor(Math.random()*e.length)];return r}function $o(t){return JSON.stringify(t)}function Sl(t){return t.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}var ko="captureStackTrace"in Error?Error.captureStackTrace:(...t)=>{};function Zt(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}var xl=fn(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let t=Function;return new t(""),!0}catch{return!1}});function wt(t){if(Zt(t)===!1)return!1;let e=t.constructor;if(e===void 0||typeof e!="function")return!0;let r=e.prototype;return!(Zt(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function Il(t){return wt(t)?{...t}:Array.isArray(t)?[...t]:t}function $O(t){let e=0;for(let r in t)Object.prototype.hasOwnProperty.call(t,r)&&e++;return e}var kO=t=>{let e=typeof t;switch(e){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(t)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(t)?"array":t===null?"null":t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?"promise":typeof Map<"u"&&t instanceof Map?"map":typeof Set<"u"&&t instanceof Set?"set":typeof Date<"u"&&t instanceof Date?"date":typeof File<"u"&&t instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${e}`)}},Ur=new Set(["string","number","symbol"]),Ol=new Set(["string","number","bigint","boolean","symbol","undefined"]);function Ae(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function ye(t,e,r){let i=new t._zod.constr(e??t._zod.def);return(!e||r?.parent)&&(i._zod.parent=t),i}function T(t){let e=t;if(!e)return{};if(typeof e=="string")return{error:()=>e};if(e?.message!==void 0){if(e?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");e.error=e.message}return delete e.message,typeof e.error=="string"?{...e,error:()=>e.error}:e}function SO(t){let e;return new Proxy({},{get(r,i,n){return e??(e=t()),Reflect.get(e,i,n)},set(r,i,n,o){return e??(e=t()),Reflect.set(e,i,n,o)},has(r,i){return e??(e=t()),Reflect.has(e,i)},deleteProperty(r,i){return e??(e=t()),Reflect.deleteProperty(e,i)},ownKeys(r){return e??(e=t()),Reflect.ownKeys(e)},getOwnPropertyDescriptor(r,i){return e??(e=t()),Reflect.getOwnPropertyDescriptor(e,i)},defineProperty(r,i,n){return e??(e=t()),Reflect.defineProperty(e,i,n)}})}function x(t){return typeof t=="bigint"?t.toString()+"n":typeof t=="string"?`"${t}"`:`${t}`}function Pl(t){return Object.keys(t).filter(e=>t[e]._zod.optin==="optional"&&t[e]._zod.optout==="optional")}var Tl={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]},Al={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function xO(t,e){let r=t._zod.def,i=r.checks;if(i&&i.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");let o=nt(t._zod.def,{get shape(){let s={};for(let a in e){if(!(a in r.shape))throw new Error(`Unrecognized key: "${a}"`);e[a]&&(s[a]=r.shape[a])}return bt(this,"shape",s),s},checks:[]});return ye(t,o)}function IO(t,e){let r=t._zod.def,i=r.checks;if(i&&i.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");let o=nt(t._zod.def,{get shape(){let s={...t._zod.def.shape};for(let a in e){if(!(a in r.shape))throw new Error(`Unrecognized key: "${a}"`);e[a]&&delete s[a]}return bt(this,"shape",s),s},checks:[]});return ye(t,o)}function OO(t,e){if(!wt(e))throw new Error("Invalid input to extend: expected a plain object");let r=t._zod.def.checks;if(r&&r.length>0){let o=t._zod.def.shape;for(let s in e)if(Object.getOwnPropertyDescriptor(o,s)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let n=nt(t._zod.def,{get shape(){let o={...t._zod.def.shape,...e};return bt(this,"shape",o),o}});return ye(t,n)}function PO(t,e){if(!wt(e))throw new Error("Invalid input to safeExtend: expected a plain object");let r=nt(t._zod.def,{get shape(){let i={...t._zod.def.shape,...e};return bt(this,"shape",i),i}});return ye(t,r)}function TO(t,e){let r=nt(t._zod.def,{get shape(){let i={...t._zod.def.shape,...e._zod.def.shape};return bt(this,"shape",i),i},get catchall(){return e._zod.def.catchall},checks:[]});return ye(t,r)}function AO(t,e,r){let n=e._zod.def.checks;if(n&&n.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");let s=nt(e._zod.def,{get shape(){let a=e._zod.def.shape,c={...a};if(r)for(let l in r){if(!(l in a))throw new Error(`Unrecognized key: "${l}"`);r[l]&&(c[l]=t?new t({type:"optional",innerType:a[l]}):a[l])}else for(let l in a)c[l]=t?new t({type:"optional",innerType:a[l]}):a[l];return bt(this,"shape",c),c},checks:[]});return ye(e,s)}function EO(t,e,r){let i=nt(e._zod.def,{get shape(){let n=e._zod.def.shape,o={...n};if(r)for(let s in r){if(!(s in o))throw new Error(`Unrecognized key: "${s}"`);r[s]&&(o[s]=new t({type:"nonoptional",innerType:n[s]}))}else for(let s in n)o[s]=new t({type:"nonoptional",innerType:n[s]});return bt(this,"shape",o),o}});return ye(e,i)}function $t(t,e=0){if(t.aborted===!0)return!0;for(let r=e;r<t.issues.length;r++)if(t.issues[r]?.continue!==!0)return!0;return!1}function xe(t,e){return e.map(r=>{var i;return(i=r).path??(i.path=[]),r.path.unshift(t),r})}function Dr(t){return typeof t=="string"?t:t?.message}function $e(t,e,r){let i={...t,path:t.path??[]};if(!t.message){let n=Dr(t.inst?._zod.def?.error?.(t))??Dr(e?.error?.(t))??Dr(r.customError?.(t))??Dr(r.localeError?.(t))??"Invalid input";i.message=n}return delete i.inst,delete i.continue,e?.reportInput||delete i.input,i}function Lr(t){return t instanceof Set?"set":t instanceof Map?"map":t instanceof File?"file":"unknown"}function Mr(t){return Array.isArray(t)?"array":typeof t=="string"?"string":"unknown"}function O(t){let e=typeof t;switch(e){case"number":return Number.isNaN(t)?"nan":"number";case"object":{if(t===null)return"null";if(Array.isArray(t))return"array";let r=t;if(r&&Object.getPrototypeOf(r)!==Object.prototype&&"constructor"in r&&r.constructor)return r.constructor.name}}return e}function mn(...t){let[e,r,i]=t;return typeof e=="string"?{message:e,code:"custom",input:r,inst:i}:{...e}}function zO(t){return Object.entries(t).filter(([e,r])=>Number.isNaN(Number.parseInt(e,10))).map(e=>e[1])}function e_(t){let e=atob(t),r=new Uint8Array(e.length);for(let i=0;i<e.length;i++)r[i]=e.charCodeAt(i);return r}function t_(t){let e="";for(let r=0;r<t.length;r++)e+=String.fromCharCode(t[r]);return btoa(e)}function NO(t){let e=t.replace(/-/g,"+").replace(/_/g,"/"),r="=".repeat((4-e.length%4)%4);return e_(e+r)}function CO(t){return t_(t).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function DO(t){let e=t.replace(/^0x/,"");if(e.length%2!==0)throw new Error("Invalid hex string length");let r=new Uint8Array(e.length/2);for(let i=0;i<e.length;i+=2)r[i/2]=Number.parseInt(e.slice(i,i+2),16);return r}function jO(t){return Array.from(t).map(e=>e.toString(16).padStart(2,"0")).join("")}var $l=class{constructor(...e){}};var n_=(t,e)=>{t.name="$ZodError",Object.defineProperty(t,"_zod",{value:t._zod,enumerable:!1}),Object.defineProperty(t,"issues",{value:e,enumerable:!1}),t.message=JSON.stringify(e,pn,2),Object.defineProperty(t,"toString",{value:()=>t.message,enumerable:!1})},qr=_("$ZodError",n_),ke=_("$ZodError",n_,{Parent:Error});function Zr(t,e=r=>r.message){let r={},i=[];for(let n of t.issues)n.path.length>0?(r[n.path[0]]=r[n.path[0]]||[],r[n.path[0]].push(e(n))):i.push(e(n));return{formErrors:i,fieldErrors:r}}function Fr(t,e=r=>r.message){let r={_errors:[]},i=n=>{for(let o of n.issues)if(o.code==="invalid_union"&&o.errors.length)o.errors.map(s=>i({issues:s}));else if(o.code==="invalid_key")i({issues:o.issues});else if(o.code==="invalid_element")i({issues:o.issues});else if(o.path.length===0)r._errors.push(e(o));else{let s=r,a=0;for(;a<o.path.length;){let c=o.path[a];a===o.path.length-1?(s[c]=s[c]||{_errors:[]},s[c]._errors.push(e(o))):s[c]=s[c]||{_errors:[]},s=s[c],a++}}};return i(t),r}function El(t,e=r=>r.message){let r={errors:[]},i=(n,o=[])=>{var s,a;for(let c of n.issues)if(c.code==="invalid_union"&&c.errors.length)c.errors.map(l=>i({issues:l},c.path));else if(c.code==="invalid_key")i({issues:c.issues},c.path);else if(c.code==="invalid_element")i({issues:c.issues},c.path);else{let l=[...o,...c.path];if(l.length===0){r.errors.push(e(c));continue}let d=r,u=0;for(;u<l.length;){let p=l[u],f=u===l.length-1;typeof p=="string"?(d.properties??(d.properties={}),(s=d.properties)[p]??(s[p]={errors:[]}),d=d.properties[p]):(d.items??(d.items=[]),(a=d.items)[p]??(a[p]={errors:[]}),d=d.items[p]),f&&d.errors.push(e(c)),u++}}};return i(t),r}function r_(t){let e=[],r=t.map(i=>typeof i=="object"?i.key:i);for(let i of r)typeof i=="number"?e.push(`[${i}]`):typeof i=="symbol"?e.push(`[${JSON.stringify(String(i))}]`):/[^\w$]/.test(i)?e.push(`[${JSON.stringify(i)}]`):(e.length&&e.push("."),e.push(i));return e.join("")}function zl(t){let e=[],r=[...t.issues].sort((i,n)=>(i.path??[]).length-(n.path??[]).length);for(let i of r)e.push(`\u2716 ${i.message}`),i.path?.length&&e.push(` \u2192 at ${r_(i.path)}`);return e.join(`
173
+ `)}var gn=t=>(e,r,i,n)=>{let o=i?Object.assign(i,{async:!1}):{async:!1},s=e._zod.run({value:r,issues:[]},o);if(s instanceof Promise)throw new Me;if(s.issues.length){let a=new(n?.Err??t)(s.issues.map(c=>$e(c,o,ae())));throw ko(a,n?.callee),a}return s.value},So=gn(ke),hn=t=>async(e,r,i,n)=>{let o=i?Object.assign(i,{async:!0}):{async:!0},s=e._zod.run({value:r,issues:[]},o);if(s instanceof Promise&&(s=await s),s.issues.length){let a=new(n?.Err??t)(s.issues.map(c=>$e(c,o,ae())));throw ko(a,n?.callee),a}return s.value},xo=hn(ke),yn=t=>(e,r,i)=>{let n=i?{...i,async:!1}:{async:!1},o=e._zod.run({value:r,issues:[]},n);if(o instanceof Promise)throw new Me;return o.issues.length?{success:!1,error:new(t??qr)(o.issues.map(s=>$e(s,n,ae())))}:{success:!0,data:o.value}},Nl=yn(ke),_n=t=>async(e,r,i)=>{let n=i?Object.assign(i,{async:!0}):{async:!0},o=e._zod.run({value:r,issues:[]},n);return o instanceof Promise&&(o=await o),o.issues.length?{success:!1,error:new t(o.issues.map(s=>$e(s,n,ae())))}:{success:!0,data:o.value}},Cl=_n(ke),Io=t=>(e,r,i)=>{let n=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return gn(t)(e,r,n)},UO=Io(ke),Oo=t=>(e,r,i)=>gn(t)(e,r,i),LO=Oo(ke),Po=t=>async(e,r,i)=>{let n=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return hn(t)(e,r,n)},MO=Po(ke),To=t=>async(e,r,i)=>hn(t)(e,r,i),qO=To(ke),Ao=t=>(e,r,i)=>{let n=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return yn(t)(e,r,n)},ZO=Ao(ke),Eo=t=>(e,r,i)=>yn(t)(e,r,i),FO=Eo(ke),zo=t=>async(e,r,i)=>{let n=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return _n(t)(e,r,n)},BO=zo(ke),No=t=>async(e,r,i)=>_n(t)(e,r,i),VO=No(ke);var Ee={};Xe(Ee,{base64:()=>Yl,base64url:()=>Co,bigint:()=>nu,boolean:()=>iu,browserEmail:()=>QO,cidrv4:()=>Kl,cidrv6:()=>Wl,cuid:()=>Dl,cuid2:()=>jl,date:()=>Xl,datetime:()=>eu,domain:()=>nP,duration:()=>ql,e164:()=>Hl,email:()=>Fl,emoji:()=>Bl,extendedDuration:()=>GO,guid:()=>Zl,hex:()=>rP,hostname:()=>tP,html5Email:()=>YO,idnEmail:()=>XO,integer:()=>ru,ipv4:()=>Vl,ipv6:()=>Gl,ksuid:()=>Ll,lowercase:()=>au,mac:()=>Jl,md5_base64:()=>oP,md5_base64url:()=>sP,md5_hex:()=>iP,nanoid:()=>Ml,null:()=>ou,number:()=>Do,rfc5322Email:()=>HO,sha1_base64:()=>cP,sha1_base64url:()=>lP,sha1_hex:()=>aP,sha256_base64:()=>dP,sha256_base64url:()=>pP,sha256_hex:()=>uP,sha384_base64:()=>mP,sha384_base64url:()=>gP,sha384_hex:()=>fP,sha512_base64:()=>yP,sha512_base64url:()=>_P,sha512_hex:()=>hP,string:()=>tu,time:()=>Ql,ulid:()=>Rl,undefined:()=>su,unicodeEmail:()=>i_,uppercase:()=>cu,uuid:()=>Ft,uuid4:()=>JO,uuid6:()=>KO,uuid7:()=>WO,xid:()=>Ul});var Dl=/^[cC][^\s-]{8,}$/,jl=/^[0-9a-z]+$/,Rl=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Ul=/^[0-9a-vA-V]{20}$/,Ll=/^[A-Za-z0-9]{27}$/,Ml=/^[a-zA-Z0-9_-]{21}$/,ql=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,GO=/^[-+]?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)?)??$/,Zl=/^([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})$/,Ft=t=>t?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${t}[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)$/,JO=Ft(4),KO=Ft(6),WO=Ft(7),Fl=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,YO=/^[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])?)*$/,HO=/^(([^<>()\[\]\\.,;:\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,}))$/,i_=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,XO=i_,QO=/^[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])?)*$/,eP="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function Bl(){return new RegExp(eP,"u")}var Vl=/^(?:(?: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])$/,Gl=/^(([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}|:))$/,Jl=t=>{let e=Ae(t??":");return new RegExp(`^(?:[0-9A-F]{2}${e}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${e}){5}[0-9a-f]{2}$`)},Kl=/^((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])$/,Wl=/^(([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])$/,Yl=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Co=/^[A-Za-z0-9_-]*$/,tP=/^(?=.{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])?)*\.?$/,nP=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,Hl=/^\+[1-9]\d{6,14}$/,o_="(?:(?:\\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])))",Xl=new RegExp(`^${o_}$`);function s_(t){let e="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof t.precision=="number"?t.precision===-1?`${e}`:t.precision===0?`${e}:[0-5]\\d`:`${e}:[0-5]\\d\\.\\d{${t.precision}}`:`${e}(?::[0-5]\\d(?:\\.\\d+)?)?`}function Ql(t){return new RegExp(`^${s_(t)}$`)}function eu(t){let e=s_({precision:t.precision}),r=["Z"];t.local&&r.push(""),t.offset&&r.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let i=`${e}(?:${r.join("|")})`;return new RegExp(`^${o_}T(?:${i})$`)}var tu=t=>{let e=t?`[\\s\\S]{${t?.minimum??0},${t?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${e}$`)},nu=/^-?\d+n?$/,ru=/^-?\d+$/,Do=/^-?\d+(?:\.\d+)?$/,iu=/^(?:true|false)$/i,ou=/^null$/i;var su=/^undefined$/i;var au=/^[^A-Z]*$/,cu=/^[^a-z]*$/,rP=/^[0-9a-fA-F]*$/;function Br(t,e){return new RegExp(`^[A-Za-z0-9+/]{${t}}${e}$`)}function Vr(t){return new RegExp(`^[A-Za-z0-9_-]{${t}}$`)}var iP=/^[0-9a-fA-F]{32}$/,oP=Br(22,"=="),sP=Vr(22),aP=/^[0-9a-fA-F]{40}$/,cP=Br(27,"="),lP=Vr(27),uP=/^[0-9a-fA-F]{64}$/,dP=Br(43,"="),pP=Vr(43),fP=/^[0-9a-fA-F]{96}$/,mP=Br(64,""),gP=Vr(64),hP=/^[0-9a-fA-F]{128}$/,yP=Br(86,"=="),_P=Vr(86);var X=_("$ZodCheck",(t,e)=>{var r;t._zod??(t._zod={}),t._zod.def=e,(r=t._zod).onattach??(r.onattach=[])}),c_={number:"number",bigint:"bigint",object:"date"},jo=_("$ZodCheckLessThan",(t,e)=>{X.init(t,e);let r=c_[typeof e.value];t._zod.onattach.push(i=>{let n=i._zod.bag,o=(e.inclusive?n.maximum:n.exclusiveMaximum)??Number.POSITIVE_INFINITY;e.value<o&&(e.inclusive?n.maximum=e.value:n.exclusiveMaximum=e.value)}),t._zod.check=i=>{(e.inclusive?i.value<=e.value:i.value<e.value)||i.issues.push({origin:r,code:"too_big",maximum:typeof e.value=="object"?e.value.getTime():e.value,input:i.value,inclusive:e.inclusive,inst:t,continue:!e.abort})}}),Ro=_("$ZodCheckGreaterThan",(t,e)=>{X.init(t,e);let r=c_[typeof e.value];t._zod.onattach.push(i=>{let n=i._zod.bag,o=(e.inclusive?n.minimum:n.exclusiveMinimum)??Number.NEGATIVE_INFINITY;e.value>o&&(e.inclusive?n.minimum=e.value:n.exclusiveMinimum=e.value)}),t._zod.check=i=>{(e.inclusive?i.value>=e.value:i.value>e.value)||i.issues.push({origin:r,code:"too_small",minimum:typeof e.value=="object"?e.value.getTime():e.value,input:i.value,inclusive:e.inclusive,inst:t,continue:!e.abort})}}),lu=_("$ZodCheckMultipleOf",(t,e)=>{X.init(t,e),t._zod.onattach.push(r=>{var i;(i=r._zod.bag).multipleOf??(i.multipleOf=e.value)}),t._zod.check=r=>{if(typeof r.value!=typeof e.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof r.value=="bigint"?r.value%e.value===BigInt(0):kl(r.value,e.value)===0)||r.issues.push({origin:typeof r.value,code:"not_multiple_of",divisor:e.value,input:r.value,inst:t,continue:!e.abort})}}),uu=_("$ZodCheckNumberFormat",(t,e)=>{X.init(t,e),e.format=e.format||"float64";let r=e.format?.includes("int"),i=r?"int":"number",[n,o]=Tl[e.format];t._zod.onattach.push(s=>{let a=s._zod.bag;a.format=e.format,a.minimum=n,a.maximum=o,r&&(a.pattern=ru)}),t._zod.check=s=>{let a=s.value;if(r){if(!Number.isInteger(a)){s.issues.push({expected:i,format:e.format,code:"invalid_type",continue:!1,input:a,inst:t});return}if(!Number.isSafeInteger(a)){a>0?s.issues.push({input:a,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:t,origin:i,inclusive:!0,continue:!e.abort}):s.issues.push({input:a,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:t,origin:i,inclusive:!0,continue:!e.abort});return}}a<n&&s.issues.push({origin:"number",input:a,code:"too_small",minimum:n,inclusive:!0,inst:t,continue:!e.abort}),a>o&&s.issues.push({origin:"number",input:a,code:"too_big",maximum:o,inclusive:!0,inst:t,continue:!e.abort})}}),du=_("$ZodCheckBigIntFormat",(t,e)=>{X.init(t,e);let[r,i]=Al[e.format];t._zod.onattach.push(n=>{let o=n._zod.bag;o.format=e.format,o.minimum=r,o.maximum=i}),t._zod.check=n=>{let o=n.value;o<r&&n.issues.push({origin:"bigint",input:o,code:"too_small",minimum:r,inclusive:!0,inst:t,continue:!e.abort}),o>i&&n.issues.push({origin:"bigint",input:o,code:"too_big",maximum:i,inclusive:!0,inst:t,continue:!e.abort})}}),pu=_("$ZodCheckMaxSize",(t,e)=>{var r;X.init(t,e),(r=t._zod.def).when??(r.when=i=>{let n=i.value;return!vt(n)&&n.size!==void 0}),t._zod.onattach.push(i=>{let n=i._zod.bag.maximum??Number.POSITIVE_INFINITY;e.maximum<n&&(i._zod.bag.maximum=e.maximum)}),t._zod.check=i=>{let n=i.value;n.size<=e.maximum||i.issues.push({origin:Lr(n),code:"too_big",maximum:e.maximum,inclusive:!0,input:n,inst:t,continue:!e.abort})}}),fu=_("$ZodCheckMinSize",(t,e)=>{var r;X.init(t,e),(r=t._zod.def).when??(r.when=i=>{let n=i.value;return!vt(n)&&n.size!==void 0}),t._zod.onattach.push(i=>{let n=i._zod.bag.minimum??Number.NEGATIVE_INFINITY;e.minimum>n&&(i._zod.bag.minimum=e.minimum)}),t._zod.check=i=>{let n=i.value;n.size>=e.minimum||i.issues.push({origin:Lr(n),code:"too_small",minimum:e.minimum,inclusive:!0,input:n,inst:t,continue:!e.abort})}}),mu=_("$ZodCheckSizeEquals",(t,e)=>{var r;X.init(t,e),(r=t._zod.def).when??(r.when=i=>{let n=i.value;return!vt(n)&&n.size!==void 0}),t._zod.onattach.push(i=>{let n=i._zod.bag;n.minimum=e.size,n.maximum=e.size,n.size=e.size}),t._zod.check=i=>{let n=i.value,o=n.size;if(o===e.size)return;let s=o>e.size;i.issues.push({origin:Lr(n),...s?{code:"too_big",maximum:e.size}:{code:"too_small",minimum:e.size},inclusive:!0,exact:!0,input:i.value,inst:t,continue:!e.abort})}}),gu=_("$ZodCheckMaxLength",(t,e)=>{var r;X.init(t,e),(r=t._zod.def).when??(r.when=i=>{let n=i.value;return!vt(n)&&n.length!==void 0}),t._zod.onattach.push(i=>{let n=i._zod.bag.maximum??Number.POSITIVE_INFINITY;e.maximum<n&&(i._zod.bag.maximum=e.maximum)}),t._zod.check=i=>{let n=i.value;if(n.length<=e.maximum)return;let s=Mr(n);i.issues.push({origin:s,code:"too_big",maximum:e.maximum,inclusive:!0,input:n,inst:t,continue:!e.abort})}}),hu=_("$ZodCheckMinLength",(t,e)=>{var r;X.init(t,e),(r=t._zod.def).when??(r.when=i=>{let n=i.value;return!vt(n)&&n.length!==void 0}),t._zod.onattach.push(i=>{let n=i._zod.bag.minimum??Number.NEGATIVE_INFINITY;e.minimum>n&&(i._zod.bag.minimum=e.minimum)}),t._zod.check=i=>{let n=i.value;if(n.length>=e.minimum)return;let s=Mr(n);i.issues.push({origin:s,code:"too_small",minimum:e.minimum,inclusive:!0,input:n,inst:t,continue:!e.abort})}}),yu=_("$ZodCheckLengthEquals",(t,e)=>{var r;X.init(t,e),(r=t._zod.def).when??(r.when=i=>{let n=i.value;return!vt(n)&&n.length!==void 0}),t._zod.onattach.push(i=>{let n=i._zod.bag;n.minimum=e.length,n.maximum=e.length,n.length=e.length}),t._zod.check=i=>{let n=i.value,o=n.length;if(o===e.length)return;let s=Mr(n),a=o>e.length;i.issues.push({origin:s,...a?{code:"too_big",maximum:e.length}:{code:"too_small",minimum:e.length},inclusive:!0,exact:!0,input:i.value,inst:t,continue:!e.abort})}}),vn=_("$ZodCheckStringFormat",(t,e)=>{var r,i;X.init(t,e),t._zod.onattach.push(n=>{let o=n._zod.bag;o.format=e.format,e.pattern&&(o.patterns??(o.patterns=new Set),o.patterns.add(e.pattern))}),e.pattern?(r=t._zod).check??(r.check=n=>{e.pattern.lastIndex=0,!e.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:e.format,input:n.value,...e.pattern?{pattern:e.pattern.toString()}:{},inst:t,continue:!e.abort})}):(i=t._zod).check??(i.check=()=>{})}),_u=_("$ZodCheckRegex",(t,e)=>{vn.init(t,e),t._zod.check=r=>{e.pattern.lastIndex=0,!e.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:e.pattern.toString(),inst:t,continue:!e.abort})}}),vu=_("$ZodCheckLowerCase",(t,e)=>{e.pattern??(e.pattern=au),vn.init(t,e)}),bu=_("$ZodCheckUpperCase",(t,e)=>{e.pattern??(e.pattern=cu),vn.init(t,e)}),wu=_("$ZodCheckIncludes",(t,e)=>{X.init(t,e);let r=Ae(e.includes),i=new RegExp(typeof e.position=="number"?`^.{${e.position}}${r}`:r);e.pattern=i,t._zod.onattach.push(n=>{let o=n._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(i)}),t._zod.check=n=>{n.value.includes(e.includes,e.position)||n.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:e.includes,input:n.value,inst:t,continue:!e.abort})}}),$u=_("$ZodCheckStartsWith",(t,e)=>{X.init(t,e);let r=new RegExp(`^${Ae(e.prefix)}.*`);e.pattern??(e.pattern=r),t._zod.onattach.push(i=>{let n=i._zod.bag;n.patterns??(n.patterns=new Set),n.patterns.add(r)}),t._zod.check=i=>{i.value.startsWith(e.prefix)||i.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:e.prefix,input:i.value,inst:t,continue:!e.abort})}}),ku=_("$ZodCheckEndsWith",(t,e)=>{X.init(t,e);let r=new RegExp(`.*${Ae(e.suffix)}$`);e.pattern??(e.pattern=r),t._zod.onattach.push(i=>{let n=i._zod.bag;n.patterns??(n.patterns=new Set),n.patterns.add(r)}),t._zod.check=i=>{i.value.endsWith(e.suffix)||i.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:e.suffix,input:i.value,inst:t,continue:!e.abort})}});function a_(t,e,r){t.issues.length&&e.issues.push(...xe(r,t.issues))}var Su=_("$ZodCheckProperty",(t,e)=>{X.init(t,e),t._zod.check=r=>{let i=e.schema._zod.run({value:r.value[e.property],issues:[]},{});if(i instanceof Promise)return i.then(n=>a_(n,r,e.property));a_(i,r,e.property)}}),xu=_("$ZodCheckMimeType",(t,e)=>{X.init(t,e);let r=new Set(e.mime);t._zod.onattach.push(i=>{i._zod.bag.mime=e.mime}),t._zod.check=i=>{r.has(i.value.type)||i.issues.push({code:"invalid_value",values:e.mime,input:i.value.type,inst:t,continue:!e.abort})}}),Iu=_("$ZodCheckOverwrite",(t,e)=>{X.init(t,e),t._zod.check=r=>{r.value=e.tx(r.value)}});var Gr=class{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),this.indent-=1}write(e){if(typeof e=="function"){e(this,{execution:"sync"}),e(this,{execution:"async"});return}let i=e.split(`
174
174
  `).filter(s=>s),n=Math.min(...i.map(s=>s.length-s.trimStart().length)),o=i.map(s=>s.slice(n)).map(s=>" ".repeat(this.indent*2)+s);for(let s of o)this.content.push(s)}compile(){let e=Function,r=this?.args,n=[...(this?.content??[""]).map(o=>` ${o}`)];return new e(...r,n.join(`
175
- `))}};var wu={major:4,minor:3,patch:6};var R=_("$ZodType",(t,e)=>{var r;t??(t={}),t._zod.def=e,t._zod.bag=t._zod.bag||{},t._zod.version=wu;let i=[...t._zod.def.checks??[]];t._zod.traits.has("$ZodCheck")&&i.unshift(t);for(let n of i)for(let o of n._zod.onattach)o(t);if(i.length===0)(r=t._zod).deferred??(r.deferred=[]),t._zod.deferred?.push(()=>{t._zod.run=t._zod.parse});else{let n=(s,a,c)=>{let l=kt(s),u;for(let d of a){if(d._zod.def.when){if(!d._zod.def.when(s))continue}else if(l)continue;let p=s.issues.length,f=d._zod.check(s);if(f instanceof Promise&&c?.async===!1)throw new Le;if(u||f instanceof Promise)u=(u??Promise.resolve()).then(async()=>{await f,s.issues.length!==p&&(l||(l=kt(s,p)))});else{if(s.issues.length===p)continue;l||(l=kt(s,p))}}return u?u.then(()=>s):s},o=(s,a,c)=>{if(kt(s))return s.aborted=!0,s;let l=n(a,i,c);if(l instanceof Promise){if(c.async===!1)throw new Le;return l.then(u=>t._zod.parse(u,c))}return t._zod.parse(l,c)};t._zod.run=(s,a)=>{if(a.skipChecks)return t._zod.parse(s,a);if(a.direction==="backward"){let l=t._zod.parse({value:s.value,issues:[]},{...a,skipChecks:!0});return l instanceof Promise?l.then(u=>o(u,s,a)):o(l,s,a)}let c=t._zod.parse(s,a);if(c instanceof Promise){if(a.async===!1)throw new Le;return c.then(l=>n(l,i,a))}return n(c,i,a)}}L(t,"~standard",()=>({validate:n=>{try{let o=Ol(t,n);return o.success?{value:o.data}:{issues:o.error?.issues}}catch{return Pl(t,n).then(s=>s.success?{value:s.data}:{issues:s.error?.issues})}},vendor:"zod",version:1}))}),qt=_("$ZodString",(t,e)=>{R.init(t,e),t._zod.pattern=[...t?._zod.bag?.patterns??[]].pop()??Wl(t._zod.bag),t._zod.parse=(r,i)=>{if(e.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:t}),r}}),K=_("$ZodStringFormat",(t,e)=>{vn.init(t,e),qt.init(t,e)}),ku=_("$ZodGUID",(t,e)=>{e.pattern??(e.pattern=jl),K.init(t,e)}),Su=_("$ZodUUID",(t,e)=>{if(e.version){let i={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[e.version];if(i===void 0)throw new Error(`Invalid UUID version: "${e.version}"`);e.pattern??(e.pattern=Zt(i))}else e.pattern??(e.pattern=Zt());K.init(t,e)}),xu=_("$ZodEmail",(t,e)=>{e.pattern??(e.pattern=Rl),K.init(t,e)}),Iu=_("$ZodURL",(t,e)=>{K.init(t,e),t._zod.check=r=>{try{let i=r.value.trim(),n=new URL(i);e.hostname&&(e.hostname.lastIndex=0,e.hostname.test(n.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:e.hostname.source,input:r.value,inst:t,continue:!e.abort})),e.protocol&&(e.protocol.lastIndex=0,e.protocol.test(n.protocol.endsWith(":")?n.protocol.slice(0,-1):n.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:e.protocol.source,input:r.value,inst:t,continue:!e.abort})),e.normalize?r.value=n.href:r.value=i;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:t,continue:!e.abort})}}}),Ou=_("$ZodEmoji",(t,e)=>{e.pattern??(e.pattern=Ul()),K.init(t,e)}),Pu=_("$ZodNanoID",(t,e)=>{e.pattern??(e.pattern=Cl),K.init(t,e)}),Tu=_("$ZodCUID",(t,e)=>{e.pattern??(e.pattern=Tl),K.init(t,e)}),Au=_("$ZodCUID2",(t,e)=>{e.pattern??(e.pattern=Al),K.init(t,e)}),Eu=_("$ZodULID",(t,e)=>{e.pattern??(e.pattern=El),K.init(t,e)}),zu=_("$ZodXID",(t,e)=>{e.pattern??(e.pattern=zl),K.init(t,e)}),Nu=_("$ZodKSUID",(t,e)=>{e.pattern??(e.pattern=Nl),K.init(t,e)}),Cu=_("$ZodISODateTime",(t,e)=>{e.pattern??(e.pattern=Jl(e)),K.init(t,e)}),Du=_("$ZodISODate",(t,e)=>{e.pattern??(e.pattern=Gl),K.init(t,e)}),ju=_("$ZodISOTime",(t,e)=>{e.pattern??(e.pattern=Kl(e)),K.init(t,e)}),Ru=_("$ZodISODuration",(t,e)=>{e.pattern??(e.pattern=Dl),K.init(t,e)}),Uu=_("$ZodIPv4",(t,e)=>{e.pattern??(e.pattern=Ll),K.init(t,e),t._zod.bag.format="ipv4"}),Lu=_("$ZodIPv6",(t,e)=>{e.pattern??(e.pattern=Ml),K.init(t,e),t._zod.bag.format="ipv6",t._zod.check=r=>{try{new URL(`http://[${r.value}]`)}catch{r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:t,continue:!e.abort})}}}),Mu=_("$ZodMAC",(t,e)=>{e.pattern??(e.pattern=Fl(e.delimiter)),K.init(t,e),t._zod.bag.format="mac"}),Fu=_("$ZodCIDRv4",(t,e)=>{e.pattern??(e.pattern=Zl),K.init(t,e)}),Zu=_("$ZodCIDRv6",(t,e)=>{e.pattern??(e.pattern=ql),K.init(t,e),t._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 s=Number(o);if(`${s}`!==o)throw new Error;if(s<0||s>128)throw new Error;new URL(`http://[${n}]`)}catch{r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:t,continue:!e.abort})}}});function qu(t){if(t==="")return!0;if(t.length%4!==0)return!1;try{return atob(t),!0}catch{return!1}}var Bu=_("$ZodBase64",(t,e)=>{e.pattern??(e.pattern=Bl),K.init(t,e),t._zod.bag.contentEncoding="base64",t._zod.check=r=>{qu(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:t,continue:!e.abort})}});function f_(t){if(!Eo.test(t))return!1;let e=t.replace(/[-_]/g,i=>i==="-"?"+":"/"),r=e.padEnd(Math.ceil(e.length/4)*4,"=");return qu(r)}var Vu=_("$ZodBase64URL",(t,e)=>{e.pattern??(e.pattern=Eo),K.init(t,e),t._zod.bag.contentEncoding="base64url",t._zod.check=r=>{f_(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:t,continue:!e.abort})}}),Gu=_("$ZodE164",(t,e)=>{e.pattern??(e.pattern=Vl),K.init(t,e)});function m_(t,e=null){try{let r=t.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||e&&(!("alg"in n)||n.alg!==e))}catch{return!1}}var Ku=_("$ZodJWT",(t,e)=>{K.init(t,e),t._zod.check=r=>{m_(r.value,e.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:t,continue:!e.abort})}}),Ju=_("$ZodCustomStringFormat",(t,e)=>{K.init(t,e),t._zod.check=r=>{e.fn(r.value)||r.issues.push({code:"invalid_format",format:e.format,input:r.value,inst:t,continue:!e.abort})}}),Mo=_("$ZodNumber",(t,e)=>{R.init(t,e),t._zod.pattern=t._zod.bag.pattern??zo,t._zod.parse=(r,i)=>{if(e.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:t,...o?{received:o}:{}}),r}}),Wu=_("$ZodNumberFormat",(t,e)=>{iu.init(t,e),Mo.init(t,e)}),Vr=_("$ZodBoolean",(t,e)=>{R.init(t,e),t._zod.pattern=Xl,t._zod.parse=(r,i)=>{if(e.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:t}),r}}),Fo=_("$ZodBigInt",(t,e)=>{R.init(t,e),t._zod.pattern=Yl,t._zod.parse=(r,i)=>{if(e.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:t}),r}}),Yu=_("$ZodBigIntFormat",(t,e)=>{ou.init(t,e),Fo.init(t,e)}),Hu=_("$ZodSymbol",(t,e)=>{R.init(t,e),t._zod.parse=(r,i)=>{let n=r.value;return typeof n=="symbol"||r.issues.push({expected:"symbol",code:"invalid_type",input:n,inst:t}),r}}),Xu=_("$ZodUndefined",(t,e)=>{R.init(t,e),t._zod.pattern=eu,t._zod.values=new Set([void 0]),t._zod.optin="optional",t._zod.optout="optional",t._zod.parse=(r,i)=>{let n=r.value;return typeof n>"u"||r.issues.push({expected:"undefined",code:"invalid_type",input:n,inst:t}),r}}),Qu=_("$ZodNull",(t,e)=>{R.init(t,e),t._zod.pattern=Ql,t._zod.values=new Set([null]),t._zod.parse=(r,i)=>{let n=r.value;return n===null||r.issues.push({expected:"null",code:"invalid_type",input:n,inst:t}),r}}),ed=_("$ZodAny",(t,e)=>{R.init(t,e),t._zod.parse=r=>r}),td=_("$ZodUnknown",(t,e)=>{R.init(t,e),t._zod.parse=r=>r}),nd=_("$ZodNever",(t,e)=>{R.init(t,e),t._zod.parse=(r,i)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:t}),r)}),rd=_("$ZodVoid",(t,e)=>{R.init(t,e),t._zod.parse=(r,i)=>{let n=r.value;return typeof n>"u"||r.issues.push({expected:"void",code:"invalid_type",input:n,inst:t}),r}}),id=_("$ZodDate",(t,e)=>{R.init(t,e),t._zod.parse=(r,i)=>{if(e.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:t}),r}});function n_(t,e,r){t.issues.length&&e.issues.push(...Ie(r,t.issues)),e.value[r]=t.value}var od=_("$ZodArray",(t,e)=>{R.init(t,e),t._zod.parse=(r,i)=>{let n=r.value;if(!Array.isArray(n))return r.issues.push({expected:"array",code:"invalid_type",input:n,inst:t}),r;r.value=Array(n.length);let o=[];for(let s=0;s<n.length;s++){let a=n[s],c=e.element._zod.run({value:a,issues:[]},i);c instanceof Promise?o.push(c.then(l=>n_(l,r,s))):n_(c,r,s)}return o.length?Promise.all(o).then(()=>r):r}});function Lo(t,e,r,i,n){if(t.issues.length){if(n&&!(r in i))return;e.issues.push(...Ie(r,t.issues))}t.value===void 0?r in i&&(e.value[r]=void 0):e.value[r]=t.value}function g_(t){let e=Object.keys(t.shape);for(let i of e)if(!t.shape?.[i]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${i}": expected a Zod schema`);let r=$l(t.shape);return{...t,keys:e,keySet:new Set(e),numKeys:e.length,optionalKeys:new Set(r)}}function h_(t,e,r,i,n,o){let s=[],a=n.keySet,c=n.catchall._zod,l=c.def.type,u=c.optout==="optional";for(let d in e){if(a.has(d))continue;if(l==="never"){s.push(d);continue}let p=c.run({value:e[d],issues:[]},i);p instanceof Promise?t.push(p.then(f=>Lo(f,r,d,e,u))):Lo(p,r,d,e,u)}return s.length&&r.issues.push({code:"unrecognized_keys",keys:s,input:e,inst:o}),t.length?Promise.all(t).then(()=>r):r}var y_=_("$ZodObject",(t,e)=>{if(R.init(t,e),!Object.getOwnPropertyDescriptor(e,"shape")?.get){let a=e.shape;Object.defineProperty(e,"shape",{get:()=>{let c={...a};return Object.defineProperty(e,"shape",{value:c}),c}})}let i=fn(()=>g_(e));L(t._zod,"propValues",()=>{let a=e.shape,c={};for(let l in a){let u=a[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=Ft,o=e.catchall,s;t._zod.parse=(a,c)=>{s??(s=i.value);let l=a.value;if(!n(l))return a.issues.push({expected:"object",code:"invalid_type",input:l,inst:t}),a;a.value={};let u=[],d=s.shape;for(let p of s.keys){let f=d[p],m=f._zod.optout==="optional",g=f._zod.run({value:l[p],issues:[]},c);g instanceof Promise?u.push(g.then(y=>Lo(y,a,p,l,m))):Lo(g,a,p,l,m)}return o?h_(u,l,a,c,i.value,t):u.length?Promise.all(u).then(()=>a):a}}),sd=_("$ZodObjectJIT",(t,e)=>{y_.init(t,e);let r=t._zod.parse,i=fn(()=>g_(e)),n=p=>{let f=new Br(["shape","payload","ctx"]),m=i.value,g=b=>{let w=vo(b);return`shape[${w}]._zod.run({ value: input[${w}], issues: [] }, ctx)`};f.write("const input = payload.value;");let y=Object.create(null),k=0;for(let b of m.keys)y[b]=`key_${k++}`;f.write("const newResult = {};");for(let b of m.keys){let w=y[b],j=vo(b),A=p[b]?._zod?.optout==="optional";f.write(`const ${w} = ${g(b)};`),A?f.write(`
176
- if (${w}.issues.length) {
175
+ `))}};var Ou={major:4,minor:3,patch:6};var R=_("$ZodType",(t,e)=>{var r;t??(t={}),t._zod.def=e,t._zod.bag=t._zod.bag||{},t._zod.version=Ou;let i=[...t._zod.def.checks??[]];t._zod.traits.has("$ZodCheck")&&i.unshift(t);for(let n of i)for(let o of n._zod.onattach)o(t);if(i.length===0)(r=t._zod).deferred??(r.deferred=[]),t._zod.deferred?.push(()=>{t._zod.run=t._zod.parse});else{let n=(s,a,c)=>{let l=$t(s),d;for(let u of a){if(u._zod.def.when){if(!u._zod.def.when(s))continue}else if(l)continue;let p=s.issues.length,f=u._zod.check(s);if(f instanceof Promise&&c?.async===!1)throw new Me;if(d||f instanceof Promise)d=(d??Promise.resolve()).then(async()=>{await f,s.issues.length!==p&&(l||(l=$t(s,p)))});else{if(s.issues.length===p)continue;l||(l=$t(s,p))}}return d?d.then(()=>s):s},o=(s,a,c)=>{if($t(s))return s.aborted=!0,s;let l=n(a,i,c);if(l instanceof Promise){if(c.async===!1)throw new Me;return l.then(d=>t._zod.parse(d,c))}return t._zod.parse(l,c)};t._zod.run=(s,a)=>{if(a.skipChecks)return t._zod.parse(s,a);if(a.direction==="backward"){let l=t._zod.parse({value:s.value,issues:[]},{...a,skipChecks:!0});return l instanceof Promise?l.then(d=>o(d,s,a)):o(l,s,a)}let c=t._zod.parse(s,a);if(c instanceof Promise){if(a.async===!1)throw new Me;return c.then(l=>n(l,i,a))}return n(c,i,a)}}L(t,"~standard",()=>({validate:n=>{try{let o=Nl(t,n);return o.success?{value:o.data}:{issues:o.error?.issues}}catch{return Cl(t,n).then(s=>s.success?{value:s.data}:{issues:s.error?.issues})}},vendor:"zod",version:1}))}),Bt=_("$ZodString",(t,e)=>{R.init(t,e),t._zod.pattern=[...t?._zod.bag?.patterns??[]].pop()??tu(t._zod.bag),t._zod.parse=(r,i)=>{if(e.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:t}),r}}),W=_("$ZodStringFormat",(t,e)=>{vn.init(t,e),Bt.init(t,e)}),Tu=_("$ZodGUID",(t,e)=>{e.pattern??(e.pattern=Zl),W.init(t,e)}),Au=_("$ZodUUID",(t,e)=>{if(e.version){let i={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[e.version];if(i===void 0)throw new Error(`Invalid UUID version: "${e.version}"`);e.pattern??(e.pattern=Ft(i))}else e.pattern??(e.pattern=Ft());W.init(t,e)}),Eu=_("$ZodEmail",(t,e)=>{e.pattern??(e.pattern=Fl),W.init(t,e)}),zu=_("$ZodURL",(t,e)=>{W.init(t,e),t._zod.check=r=>{try{let i=r.value.trim(),n=new URL(i);e.hostname&&(e.hostname.lastIndex=0,e.hostname.test(n.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:e.hostname.source,input:r.value,inst:t,continue:!e.abort})),e.protocol&&(e.protocol.lastIndex=0,e.protocol.test(n.protocol.endsWith(":")?n.protocol.slice(0,-1):n.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:e.protocol.source,input:r.value,inst:t,continue:!e.abort})),e.normalize?r.value=n.href:r.value=i;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:t,continue:!e.abort})}}}),Nu=_("$ZodEmoji",(t,e)=>{e.pattern??(e.pattern=Bl()),W.init(t,e)}),Cu=_("$ZodNanoID",(t,e)=>{e.pattern??(e.pattern=Ml),W.init(t,e)}),Du=_("$ZodCUID",(t,e)=>{e.pattern??(e.pattern=Dl),W.init(t,e)}),ju=_("$ZodCUID2",(t,e)=>{e.pattern??(e.pattern=jl),W.init(t,e)}),Ru=_("$ZodULID",(t,e)=>{e.pattern??(e.pattern=Rl),W.init(t,e)}),Uu=_("$ZodXID",(t,e)=>{e.pattern??(e.pattern=Ul),W.init(t,e)}),Lu=_("$ZodKSUID",(t,e)=>{e.pattern??(e.pattern=Ll),W.init(t,e)}),Mu=_("$ZodISODateTime",(t,e)=>{e.pattern??(e.pattern=eu(e)),W.init(t,e)}),qu=_("$ZodISODate",(t,e)=>{e.pattern??(e.pattern=Xl),W.init(t,e)}),Zu=_("$ZodISOTime",(t,e)=>{e.pattern??(e.pattern=Ql(e)),W.init(t,e)}),Fu=_("$ZodISODuration",(t,e)=>{e.pattern??(e.pattern=ql),W.init(t,e)}),Bu=_("$ZodIPv4",(t,e)=>{e.pattern??(e.pattern=Vl),W.init(t,e),t._zod.bag.format="ipv4"}),Vu=_("$ZodIPv6",(t,e)=>{e.pattern??(e.pattern=Gl),W.init(t,e),t._zod.bag.format="ipv6",t._zod.check=r=>{try{new URL(`http://[${r.value}]`)}catch{r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:t,continue:!e.abort})}}}),Gu=_("$ZodMAC",(t,e)=>{e.pattern??(e.pattern=Jl(e.delimiter)),W.init(t,e),t._zod.bag.format="mac"}),Ju=_("$ZodCIDRv4",(t,e)=>{e.pattern??(e.pattern=Kl),W.init(t,e)}),Ku=_("$ZodCIDRv6",(t,e)=>{e.pattern??(e.pattern=Wl),W.init(t,e),t._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 s=Number(o);if(`${s}`!==o)throw new Error;if(s<0||s>128)throw new Error;new URL(`http://[${n}]`)}catch{r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:t,continue:!e.abort})}}});function Wu(t){if(t==="")return!0;if(t.length%4!==0)return!1;try{return atob(t),!0}catch{return!1}}var Yu=_("$ZodBase64",(t,e)=>{e.pattern??(e.pattern=Yl),W.init(t,e),t._zod.bag.contentEncoding="base64",t._zod.check=r=>{Wu(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:t,continue:!e.abort})}});function w_(t){if(!Co.test(t))return!1;let e=t.replace(/[-_]/g,i=>i==="-"?"+":"/"),r=e.padEnd(Math.ceil(e.length/4)*4,"=");return Wu(r)}var Hu=_("$ZodBase64URL",(t,e)=>{e.pattern??(e.pattern=Co),W.init(t,e),t._zod.bag.contentEncoding="base64url",t._zod.check=r=>{w_(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:t,continue:!e.abort})}}),Xu=_("$ZodE164",(t,e)=>{e.pattern??(e.pattern=Hl),W.init(t,e)});function $_(t,e=null){try{let r=t.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||e&&(!("alg"in n)||n.alg!==e))}catch{return!1}}var Qu=_("$ZodJWT",(t,e)=>{W.init(t,e),t._zod.check=r=>{$_(r.value,e.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:t,continue:!e.abort})}}),ed=_("$ZodCustomStringFormat",(t,e)=>{W.init(t,e),t._zod.check=r=>{e.fn(r.value)||r.issues.push({code:"invalid_format",format:e.format,input:r.value,inst:t,continue:!e.abort})}}),Fo=_("$ZodNumber",(t,e)=>{R.init(t,e),t._zod.pattern=t._zod.bag.pattern??Do,t._zod.parse=(r,i)=>{if(e.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:t,...o?{received:o}:{}}),r}}),td=_("$ZodNumberFormat",(t,e)=>{uu.init(t,e),Fo.init(t,e)}),Jr=_("$ZodBoolean",(t,e)=>{R.init(t,e),t._zod.pattern=iu,t._zod.parse=(r,i)=>{if(e.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:t}),r}}),Bo=_("$ZodBigInt",(t,e)=>{R.init(t,e),t._zod.pattern=nu,t._zod.parse=(r,i)=>{if(e.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:t}),r}}),nd=_("$ZodBigIntFormat",(t,e)=>{du.init(t,e),Bo.init(t,e)}),rd=_("$ZodSymbol",(t,e)=>{R.init(t,e),t._zod.parse=(r,i)=>{let n=r.value;return typeof n=="symbol"||r.issues.push({expected:"symbol",code:"invalid_type",input:n,inst:t}),r}}),id=_("$ZodUndefined",(t,e)=>{R.init(t,e),t._zod.pattern=su,t._zod.values=new Set([void 0]),t._zod.optin="optional",t._zod.optout="optional",t._zod.parse=(r,i)=>{let n=r.value;return typeof n>"u"||r.issues.push({expected:"undefined",code:"invalid_type",input:n,inst:t}),r}}),od=_("$ZodNull",(t,e)=>{R.init(t,e),t._zod.pattern=ou,t._zod.values=new Set([null]),t._zod.parse=(r,i)=>{let n=r.value;return n===null||r.issues.push({expected:"null",code:"invalid_type",input:n,inst:t}),r}}),sd=_("$ZodAny",(t,e)=>{R.init(t,e),t._zod.parse=r=>r}),ad=_("$ZodUnknown",(t,e)=>{R.init(t,e),t._zod.parse=r=>r}),cd=_("$ZodNever",(t,e)=>{R.init(t,e),t._zod.parse=(r,i)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:t}),r)}),ld=_("$ZodVoid",(t,e)=>{R.init(t,e),t._zod.parse=(r,i)=>{let n=r.value;return typeof n>"u"||r.issues.push({expected:"void",code:"invalid_type",input:n,inst:t}),r}}),ud=_("$ZodDate",(t,e)=>{R.init(t,e),t._zod.parse=(r,i)=>{if(e.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:t}),r}});function u_(t,e,r){t.issues.length&&e.issues.push(...xe(r,t.issues)),e.value[r]=t.value}var dd=_("$ZodArray",(t,e)=>{R.init(t,e),t._zod.parse=(r,i)=>{let n=r.value;if(!Array.isArray(n))return r.issues.push({expected:"array",code:"invalid_type",input:n,inst:t}),r;r.value=Array(n.length);let o=[];for(let s=0;s<n.length;s++){let a=n[s],c=e.element._zod.run({value:a,issues:[]},i);c instanceof Promise?o.push(c.then(l=>u_(l,r,s))):u_(c,r,s)}return o.length?Promise.all(o).then(()=>r):r}});function Zo(t,e,r,i,n){if(t.issues.length){if(n&&!(r in i))return;e.issues.push(...xe(r,t.issues))}t.value===void 0?r in i&&(e.value[r]=void 0):e.value[r]=t.value}function k_(t){let e=Object.keys(t.shape);for(let i of e)if(!t.shape?.[i]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${i}": expected a Zod schema`);let r=Pl(t.shape);return{...t,keys:e,keySet:new Set(e),numKeys:e.length,optionalKeys:new Set(r)}}function S_(t,e,r,i,n,o){let s=[],a=n.keySet,c=n.catchall._zod,l=c.def.type,d=c.optout==="optional";for(let u in e){if(a.has(u))continue;if(l==="never"){s.push(u);continue}let p=c.run({value:e[u],issues:[]},i);p instanceof Promise?t.push(p.then(f=>Zo(f,r,u,e,d))):Zo(p,r,u,e,d)}return s.length&&r.issues.push({code:"unrecognized_keys",keys:s,input:e,inst:o}),t.length?Promise.all(t).then(()=>r):r}var x_=_("$ZodObject",(t,e)=>{if(R.init(t,e),!Object.getOwnPropertyDescriptor(e,"shape")?.get){let a=e.shape;Object.defineProperty(e,"shape",{get:()=>{let c={...a};return Object.defineProperty(e,"shape",{value:c}),c}})}let i=fn(()=>k_(e));L(t._zod,"propValues",()=>{let a=e.shape,c={};for(let l in a){let d=a[l]._zod;if(d.values){c[l]??(c[l]=new Set);for(let u of d.values)c[l].add(u)}}return c});let n=Zt,o=e.catchall,s;t._zod.parse=(a,c)=>{s??(s=i.value);let l=a.value;if(!n(l))return a.issues.push({expected:"object",code:"invalid_type",input:l,inst:t}),a;a.value={};let d=[],u=s.shape;for(let p of s.keys){let f=u[p],m=f._zod.optout==="optional",h=f._zod.run({value:l[p],issues:[]},c);h instanceof Promise?d.push(h.then(y=>Zo(y,a,p,l,m))):Zo(h,a,p,l,m)}return o?S_(d,l,a,c,i.value,t):d.length?Promise.all(d).then(()=>a):a}}),pd=_("$ZodObjectJIT",(t,e)=>{x_.init(t,e);let r=t._zod.parse,i=fn(()=>k_(e)),n=p=>{let f=new Gr(["shape","payload","ctx"]),m=i.value,h=b=>{let $=$o(b);return`shape[${$}]._zod.run({ value: input[${$}], issues: [] }, ctx)`};f.write("const input = payload.value;");let y=Object.create(null),S=0;for(let b of m.keys)y[b]=`key_${S++}`;f.write("const newResult = {};");for(let b of m.keys){let $=y[b],j=$o(b),A=p[b]?._zod?.optout==="optional";f.write(`const ${$} = ${h(b)};`),A?f.write(`
176
+ if (${$}.issues.length) {
177
177
  if (${j} in input) {
178
- payload.issues = payload.issues.concat(${w}.issues.map(iss => ({
178
+ payload.issues = payload.issues.concat(${$}.issues.map(iss => ({
179
179
  ...iss,
180
180
  path: iss.path ? [${j}, ...iss.path] : [${j}]
181
181
  })));
182
182
  }
183
183
  }
184
184
 
185
- if (${w}.value === undefined) {
185
+ if (${$}.value === undefined) {
186
186
  if (${j} in input) {
187
187
  newResult[${j}] = undefined;
188
188
  }
189
189
  } else {
190
- newResult[${j}] = ${w}.value;
190
+ newResult[${j}] = ${$}.value;
191
191
  }
192
192
 
193
193
  `):f.write(`
194
- if (${w}.issues.length) {
195
- payload.issues = payload.issues.concat(${w}.issues.map(iss => ({
194
+ if (${$}.issues.length) {
195
+ payload.issues = payload.issues.concat(${$}.issues.map(iss => ({
196
196
  ...iss,
197
197
  path: iss.path ? [${j}, ...iss.path] : [${j}]
198
198
  })));
199
199
  }
200
200
 
201
- if (${w}.value === undefined) {
201
+ if (${$}.value === undefined) {
202
202
  if (${j} in input) {
203
203
  newResult[${j}] = undefined;
204
204
  }
205
205
  } else {
206
- newResult[${j}] = ${w}.value;
206
+ newResult[${j}] = ${$}.value;
207
207
  }
208
208
 
209
- `)}f.write("payload.value = newResult;"),f.write("return payload;");let z=f.compile();return(b,w)=>z(p,b,w)},o,s=Ft,a=!zr.jitless,l=a&&vl.value,u=e.catchall,d;t._zod.parse=(p,f)=>{d??(d=i.value);let m=p.value;return s(m)?a&&l&&f?.async===!1&&f.jitless!==!0?(o||(o=n(e.shape)),p=o(p,f),u?h_([],m,p,f,d,t):p):r(p,f):(p.issues.push({expected:"object",code:"invalid_type",input:m,inst:t}),p)}});function r_(t,e,r,i){for(let o of t)if(o.issues.length===0)return e.value=o.value,e;let n=t.filter(o=>!kt(o));return n.length===1?(e.value=n[0].value,n[0]):(e.issues.push({code:"invalid_union",input:e.value,inst:r,errors:t.map(o=>o.issues.map(s=>$e(s,i,ie())))}),e)}var Gr=_("$ZodUnion",(t,e)=>{R.init(t,e),L(t._zod,"optin",()=>e.options.some(n=>n._zod.optin==="optional")?"optional":void 0),L(t._zod,"optout",()=>e.options.some(n=>n._zod.optout==="optional")?"optional":void 0),L(t._zod,"values",()=>{if(e.options.every(n=>n._zod.values))return new Set(e.options.flatMap(n=>Array.from(n._zod.values)))}),L(t._zod,"pattern",()=>{if(e.options.every(n=>n._zod.pattern)){let n=e.options.map(o=>o._zod.pattern);return new RegExp(`^(${n.map(o=>Dr(o.source)).join("|")})$`)}});let r=e.options.length===1,i=e.options[0]._zod.run;t._zod.parse=(n,o)=>{if(r)return i(n,o);let s=!1,a=[];for(let c of e.options){let l=c._zod.run({value:n.value,issues:[]},o);if(l instanceof Promise)a.push(l),s=!0;else{if(l.issues.length===0)return l;a.push(l)}}return s?Promise.all(a).then(c=>r_(c,n,t,o)):r_(a,n,t,o)}});function i_(t,e,r,i){let n=t.filter(o=>o.issues.length===0);return n.length===1?(e.value=n[0].value,e):(n.length===0?e.issues.push({code:"invalid_union",input:e.value,inst:r,errors:t.map(o=>o.issues.map(s=>$e(s,i,ie())))}):e.issues.push({code:"invalid_union",input:e.value,inst:r,errors:[],inclusive:!1}),e)}var ad=_("$ZodXor",(t,e)=>{Gr.init(t,e),e.inclusive=!1;let r=e.options.length===1,i=e.options[0]._zod.run;t._zod.parse=(n,o)=>{if(r)return i(n,o);let s=!1,a=[];for(let c of e.options){let l=c._zod.run({value:n.value,issues:[]},o);l instanceof Promise?(a.push(l),s=!0):a.push(l)}return s?Promise.all(a).then(c=>i_(c,n,t,o)):i_(a,n,t,o)}}),cd=_("$ZodDiscriminatedUnion",(t,e)=>{e.inclusive=!1,Gr.init(t,e);let r=t._zod.parse;L(t._zod,"propValues",()=>{let n={};for(let o of e.options){let s=o._zod.propValues;if(!s||Object.keys(s).length===0)throw new Error(`Invalid discriminated union option at index "${e.options.indexOf(o)}"`);for(let[a,c]of Object.entries(s)){n[a]||(n[a]=new Set);for(let l of c)n[a].add(l)}}return n});let i=fn(()=>{let n=e.options,o=new Map;for(let s of n){let a=s._zod.propValues?.[e.discriminator];if(!a||a.size===0)throw new Error(`Invalid discriminated union option at index "${e.options.indexOf(s)}"`);for(let c of a){if(o.has(c))throw new Error(`Duplicate discriminator value "${String(c)}"`);o.set(c,s)}}return o});t._zod.parse=(n,o)=>{let s=n.value;if(!Ft(s))return n.issues.push({code:"invalid_type",expected:"object",input:s,inst:t}),n;let a=i.value.get(s?.[e.discriminator]);return a?a._zod.run(n,o):e.unionFallback?r(n,o):(n.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:e.discriminator,input:s,path:[e.discriminator],inst:t}),n)}}),ld=_("$ZodIntersection",(t,e)=>{R.init(t,e),t._zod.parse=(r,i)=>{let n=r.value,o=e.left._zod.run({value:n,issues:[]},i),s=e.right._zod.run({value:n,issues:[]},i);return o instanceof Promise||s instanceof Promise?Promise.all([o,s]).then(([c,l])=>o_(r,c,l)):o_(r,o,s)}});function $u(t,e){if(t===e)return{valid:!0,data:t};if(t instanceof Date&&e instanceof Date&&+t==+e)return{valid:!0,data:t};if($t(t)&&$t(e)){let r=Object.keys(e),i=Object.keys(t).filter(o=>r.indexOf(o)!==-1),n={...t,...e};for(let o of i){let s=$u(t[o],e[o]);if(!s.valid)return{valid:!1,mergeErrorPath:[o,...s.mergeErrorPath]};n[o]=s.data}return{valid:!0,data:n}}if(Array.isArray(t)&&Array.isArray(e)){if(t.length!==e.length)return{valid:!1,mergeErrorPath:[]};let r=[];for(let i=0;i<t.length;i++){let n=t[i],o=e[i],s=$u(n,o);if(!s.valid)return{valid:!1,mergeErrorPath:[i,...s.mergeErrorPath]};r.push(s.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}function o_(t,e,r){let i=new Map,n;for(let a of e.issues)if(a.code==="unrecognized_keys"){n??(n=a);for(let c of a.keys)i.has(c)||i.set(c,{}),i.get(c).l=!0}else t.issues.push(a);for(let a of r.issues)if(a.code==="unrecognized_keys")for(let c of a.keys)i.has(c)||i.set(c,{}),i.get(c).r=!0;else t.issues.push(a);let o=[...i].filter(([,a])=>a.l&&a.r).map(([a])=>a);if(o.length&&n&&t.issues.push({...n,keys:o}),kt(t))return t;let s=$u(e.value,r.value);if(!s.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(s.mergeErrorPath)}`);return t.value=s.data,t}var Zo=_("$ZodTuple",(t,e)=>{R.init(t,e);let r=e.items;t._zod.parse=(i,n)=>{let o=i.value;if(!Array.isArray(o))return i.issues.push({input:o,inst:t,expected:"tuple",code:"invalid_type"}),i;i.value=[];let s=[],a=[...r].reverse().findIndex(u=>u._zod.optin!=="optional"),c=a===-1?0:r.length-a;if(!e.rest){let u=o.length>r.length,d=o.length<c-1;if(u||d)return i.issues.push({...u?{code:"too_big",maximum:r.length,inclusive:!0}:{code:"too_small",minimum:r.length},input:o,inst:t,origin:"array"}),i}let l=-1;for(let u of r){if(l++,l>=o.length&&l>=c)continue;let d=u._zod.run({value:o[l],issues:[]},n);d instanceof Promise?s.push(d.then(p=>Do(p,i,l))):Do(d,i,l)}if(e.rest){let u=o.slice(r.length);for(let d of u){l++;let p=e.rest._zod.run({value:d,issues:[]},n);p instanceof Promise?s.push(p.then(f=>Do(f,i,l))):Do(p,i,l)}}return s.length?Promise.all(s).then(()=>i):i}});function Do(t,e,r){t.issues.length&&e.issues.push(...Ie(r,t.issues)),e.value[r]=t.value}var ud=_("$ZodRecord",(t,e)=>{R.init(t,e),t._zod.parse=(r,i)=>{let n=r.value;if(!$t(n))return r.issues.push({expected:"record",code:"invalid_type",input:n,inst:t}),r;let o=[],s=e.keyType._zod.values;if(s){r.value={};let a=new Set;for(let l of s)if(typeof l=="string"||typeof l=="number"||typeof l=="symbol"){a.add(typeof l=="number"?l.toString():l);let u=e.valueType._zod.run({value:n[l],issues:[]},i);u instanceof Promise?o.push(u.then(d=>{d.issues.length&&r.issues.push(...Ie(l,d.issues)),r.value[l]=d.value})):(u.issues.length&&r.issues.push(...Ie(l,u.issues)),r.value[l]=u.value)}let c;for(let l in n)a.has(l)||(c=c??[],c.push(l));c&&c.length>0&&r.issues.push({code:"unrecognized_keys",input:n,inst:t,keys:c})}else{r.value={};for(let a of Reflect.ownKeys(n)){if(a==="__proto__")continue;let c=e.keyType._zod.run({value:a,issues:[]},i);if(c instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof a=="string"&&zo.test(a)&&c.issues.length){let d=e.keyType._zod.run({value:Number(a),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){e.mode==="loose"?r.value[a]=n[a]:r.issues.push({code:"invalid_key",origin:"record",issues:c.issues.map(d=>$e(d,i,ie())),input:a,path:[a],inst:t});continue}let u=e.valueType._zod.run({value:n[a],issues:[]},i);u instanceof Promise?o.push(u.then(d=>{d.issues.length&&r.issues.push(...Ie(a,d.issues)),r.value[c.value]=d.value})):(u.issues.length&&r.issues.push(...Ie(a,u.issues)),r.value[c.value]=u.value)}}return o.length?Promise.all(o).then(()=>r):r}}),dd=_("$ZodMap",(t,e)=>{R.init(t,e),t._zod.parse=(r,i)=>{let n=r.value;if(!(n instanceof Map))return r.issues.push({expected:"map",code:"invalid_type",input:n,inst:t}),r;let o=[];r.value=new Map;for(let[s,a]of n){let c=e.keyType._zod.run({value:s,issues:[]},i),l=e.valueType._zod.run({value:a,issues:[]},i);c instanceof Promise||l instanceof Promise?o.push(Promise.all([c,l]).then(([u,d])=>{s_(u,d,r,s,n,t,i)})):s_(c,l,r,s,n,t,i)}return o.length?Promise.all(o).then(()=>r):r}});function s_(t,e,r,i,n,o,s){t.issues.length&&(jr.has(typeof i)?r.issues.push(...Ie(i,t.issues)):r.issues.push({code:"invalid_key",origin:"map",input:n,inst:o,issues:t.issues.map(a=>$e(a,s,ie()))})),e.issues.length&&(jr.has(typeof i)?r.issues.push(...Ie(i,e.issues)):r.issues.push({origin:"map",code:"invalid_element",input:n,inst:o,key:i,issues:e.issues.map(a=>$e(a,s,ie()))})),r.value.set(t.value,e.value)}var pd=_("$ZodSet",(t,e)=>{R.init(t,e),t._zod.parse=(r,i)=>{let n=r.value;if(!(n instanceof Set))return r.issues.push({input:n,inst:t,expected:"set",code:"invalid_type"}),r;let o=[];r.value=new Set;for(let s of n){let a=e.valueType._zod.run({value:s,issues:[]},i);a instanceof Promise?o.push(a.then(c=>a_(c,r))):a_(a,r)}return o.length?Promise.all(o).then(()=>r):r}});function a_(t,e){t.issues.length&&e.issues.push(...t.issues),e.value.add(t.value)}var fd=_("$ZodEnum",(t,e)=>{R.init(t,e);let r=Cr(e.entries),i=new Set(r);t._zod.values=i,t._zod.pattern=new RegExp(`^(${r.filter(n=>jr.has(typeof n)).map(n=>typeof n=="string"?Ee(n):n.toString()).join("|")})$`),t._zod.parse=(n,o)=>{let s=n.value;return i.has(s)||n.issues.push({code:"invalid_value",values:r,input:s,inst:t}),n}}),md=_("$ZodLiteral",(t,e)=>{if(R.init(t,e),e.values.length===0)throw new Error("Cannot create literal schema with no valid values");let r=new Set(e.values);t._zod.values=r,t._zod.pattern=new RegExp(`^(${e.values.map(i=>typeof i=="string"?Ee(i):i?Ee(i.toString()):String(i)).join("|")})$`),t._zod.parse=(i,n)=>{let o=i.value;return r.has(o)||i.issues.push({code:"invalid_value",values:e.values,input:o,inst:t}),i}}),gd=_("$ZodFile",(t,e)=>{R.init(t,e),t._zod.parse=(r,i)=>{let n=r.value;return n instanceof File||r.issues.push({expected:"file",code:"invalid_type",input:n,inst:t}),r}}),hd=_("$ZodTransform",(t,e)=>{R.init(t,e),t._zod.parse=(r,i)=>{if(i.direction==="backward")throw new vt(t.constructor.name);let n=e.transform(r.value,r);if(i.async)return(n instanceof Promise?n:Promise.resolve(n)).then(s=>(r.value=s,r));if(n instanceof Promise)throw new Le;return r.value=n,r}});function c_(t,e){return t.issues.length&&e===void 0?{issues:[],value:void 0}:t}var qo=_("$ZodOptional",(t,e)=>{R.init(t,e),t._zod.optin="optional",t._zod.optout="optional",L(t._zod,"values",()=>e.innerType._zod.values?new Set([...e.innerType._zod.values,void 0]):void 0),L(t._zod,"pattern",()=>{let r=e.innerType._zod.pattern;return r?new RegExp(`^(${Dr(r.source)})?$`):void 0}),t._zod.parse=(r,i)=>{if(e.innerType._zod.optin==="optional"){let n=e.innerType._zod.run(r,i);return n instanceof Promise?n.then(o=>c_(o,r.value)):c_(n,r.value)}return r.value===void 0?r:e.innerType._zod.run(r,i)}}),yd=_("$ZodExactOptional",(t,e)=>{qo.init(t,e),L(t._zod,"values",()=>e.innerType._zod.values),L(t._zod,"pattern",()=>e.innerType._zod.pattern),t._zod.parse=(r,i)=>e.innerType._zod.run(r,i)}),_d=_("$ZodNullable",(t,e)=>{R.init(t,e),L(t._zod,"optin",()=>e.innerType._zod.optin),L(t._zod,"optout",()=>e.innerType._zod.optout),L(t._zod,"pattern",()=>{let r=e.innerType._zod.pattern;return r?new RegExp(`^(${Dr(r.source)}|null)$`):void 0}),L(t._zod,"values",()=>e.innerType._zod.values?new Set([...e.innerType._zod.values,null]):void 0),t._zod.parse=(r,i)=>r.value===null?r:e.innerType._zod.run(r,i)}),vd=_("$ZodDefault",(t,e)=>{R.init(t,e),t._zod.optin="optional",L(t._zod,"values",()=>e.innerType._zod.values),t._zod.parse=(r,i)=>{if(i.direction==="backward")return e.innerType._zod.run(r,i);if(r.value===void 0)return r.value=e.defaultValue,r;let n=e.innerType._zod.run(r,i);return n instanceof Promise?n.then(o=>l_(o,e)):l_(n,e)}});function l_(t,e){return t.value===void 0&&(t.value=e.defaultValue),t}var bd=_("$ZodPrefault",(t,e)=>{R.init(t,e),t._zod.optin="optional",L(t._zod,"values",()=>e.innerType._zod.values),t._zod.parse=(r,i)=>(i.direction==="backward"||r.value===void 0&&(r.value=e.defaultValue),e.innerType._zod.run(r,i))}),wd=_("$ZodNonOptional",(t,e)=>{R.init(t,e),L(t._zod,"values",()=>{let r=e.innerType._zod.values;return r?new Set([...r].filter(i=>i!==void 0)):void 0}),t._zod.parse=(r,i)=>{let n=e.innerType._zod.run(r,i);return n instanceof Promise?n.then(o=>u_(o,t)):u_(n,t)}});function u_(t,e){return!t.issues.length&&t.value===void 0&&t.issues.push({code:"invalid_type",expected:"nonoptional",input:t.value,inst:e}),t}var $d=_("$ZodSuccess",(t,e)=>{R.init(t,e),t._zod.parse=(r,i)=>{if(i.direction==="backward")throw new vt("ZodSuccess");let n=e.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)}}),kd=_("$ZodCatch",(t,e)=>{R.init(t,e),L(t._zod,"optin",()=>e.innerType._zod.optin),L(t._zod,"optout",()=>e.innerType._zod.optout),L(t._zod,"values",()=>e.innerType._zod.values),t._zod.parse=(r,i)=>{if(i.direction==="backward")return e.innerType._zod.run(r,i);let n=e.innerType._zod.run(r,i);return n instanceof Promise?n.then(o=>(r.value=o.value,o.issues.length&&(r.value=e.catchValue({...r,error:{issues:o.issues.map(s=>$e(s,i,ie()))},input:r.value}),r.issues=[]),r)):(r.value=n.value,n.issues.length&&(r.value=e.catchValue({...r,error:{issues:n.issues.map(o=>$e(o,i,ie()))},input:r.value}),r.issues=[]),r)}}),Sd=_("$ZodNaN",(t,e)=>{R.init(t,e),t._zod.parse=(r,i)=>((typeof r.value!="number"||!Number.isNaN(r.value))&&r.issues.push({input:r.value,inst:t,expected:"nan",code:"invalid_type"}),r)}),xd=_("$ZodPipe",(t,e)=>{R.init(t,e),L(t._zod,"values",()=>e.in._zod.values),L(t._zod,"optin",()=>e.in._zod.optin),L(t._zod,"optout",()=>e.out._zod.optout),L(t._zod,"propValues",()=>e.in._zod.propValues),t._zod.parse=(r,i)=>{if(i.direction==="backward"){let o=e.out._zod.run(r,i);return o instanceof Promise?o.then(s=>jo(s,e.in,i)):jo(o,e.in,i)}let n=e.in._zod.run(r,i);return n instanceof Promise?n.then(o=>jo(o,e.out,i)):jo(n,e.out,i)}});function jo(t,e,r){return t.issues.length?(t.aborted=!0,t):e._zod.run({value:t.value,issues:t.issues},r)}var Kr=_("$ZodCodec",(t,e)=>{R.init(t,e),L(t._zod,"values",()=>e.in._zod.values),L(t._zod,"optin",()=>e.in._zod.optin),L(t._zod,"optout",()=>e.out._zod.optout),L(t._zod,"propValues",()=>e.in._zod.propValues),t._zod.parse=(r,i)=>{if((i.direction||"forward")==="forward"){let o=e.in._zod.run(r,i);return o instanceof Promise?o.then(s=>Ro(s,e,i)):Ro(o,e,i)}else{let o=e.out._zod.run(r,i);return o instanceof Promise?o.then(s=>Ro(s,e,i)):Ro(o,e,i)}}});function Ro(t,e,r){if(t.issues.length)return t.aborted=!0,t;if((r.direction||"forward")==="forward"){let n=e.transform(t.value,t);return n instanceof Promise?n.then(o=>Uo(t,o,e.out,r)):Uo(t,n,e.out,r)}else{let n=e.reverseTransform(t.value,t);return n instanceof Promise?n.then(o=>Uo(t,o,e.in,r)):Uo(t,n,e.in,r)}}function Uo(t,e,r,i){return t.issues.length?(t.aborted=!0,t):r._zod.run({value:e,issues:t.issues},i)}var Id=_("$ZodReadonly",(t,e)=>{R.init(t,e),L(t._zod,"propValues",()=>e.innerType._zod.propValues),L(t._zod,"values",()=>e.innerType._zod.values),L(t._zod,"optin",()=>e.innerType?._zod?.optin),L(t._zod,"optout",()=>e.innerType?._zod?.optout),t._zod.parse=(r,i)=>{if(i.direction==="backward")return e.innerType._zod.run(r,i);let n=e.innerType._zod.run(r,i);return n instanceof Promise?n.then(d_):d_(n)}});function d_(t){return t.value=Object.freeze(t.value),t}var Od=_("$ZodTemplateLiteral",(t,e)=>{R.init(t,e);let r=[];for(let i of e.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,s=n.endsWith("$")?n.length-1:n.length;r.push(n.slice(o,s))}else if(i===null||wl.has(typeof i))r.push(Ee(`${i}`));else throw new Error(`Invalid template literal part: ${i}`);t._zod.pattern=new RegExp(`^${r.join("")}$`),t._zod.parse=(i,n)=>typeof i.value!="string"?(i.issues.push({input:i.value,inst:t,expected:"string",code:"invalid_type"}),i):(t._zod.pattern.lastIndex=0,t._zod.pattern.test(i.value)||i.issues.push({input:i.value,inst:t,code:"invalid_format",format:e.format??"template_literal",pattern:t._zod.pattern.source}),i)}),Pd=_("$ZodFunction",(t,e)=>(R.init(t,e),t._def=e,t._zod.def=e,t.implement=r=>{if(typeof r!="function")throw new Error("implement() must be called with a function");return function(...i){let n=t._def.input?wo(t._def.input,i):i,o=Reflect.apply(r,this,n);return t._def.output?wo(t._def.output,o):o}},t.implementAsync=r=>{if(typeof r!="function")throw new Error("implementAsync() must be called with a function");return async function(...i){let n=t._def.input?await $o(t._def.input,i):i,o=await Reflect.apply(r,this,n);return t._def.output?await $o(t._def.output,o):o}},t._zod.parse=(r,i)=>typeof r.value!="function"?(r.issues.push({code:"invalid_type",expected:"function",input:r.value,inst:t}),r):(t._def.output&&t._def.output._zod.def.type==="promise"?r.value=t.implementAsync(r.value):r.value=t.implement(r.value),r),t.input=(...r)=>{let i=t.constructor;return Array.isArray(r[0])?new i({type:"function",input:new Zo({type:"tuple",items:r[0],rest:r[1]}),output:t._def.output}):new i({type:"function",input:r[0],output:t._def.output})},t.output=r=>{let i=t.constructor;return new i({type:"function",input:t._def.input,output:r})},t)),Td=_("$ZodPromise",(t,e)=>{R.init(t,e),t._zod.parse=(r,i)=>Promise.resolve(r.value).then(n=>e.innerType._zod.run({value:n,issues:[]},i))}),Ad=_("$ZodLazy",(t,e)=>{R.init(t,e),L(t._zod,"innerType",()=>e.getter()),L(t._zod,"pattern",()=>t._zod.innerType?._zod?.pattern),L(t._zod,"propValues",()=>t._zod.innerType?._zod?.propValues),L(t._zod,"optin",()=>t._zod.innerType?._zod?.optin??void 0),L(t._zod,"optout",()=>t._zod.innerType?._zod?.optout??void 0),t._zod.parse=(r,i)=>t._zod.innerType._zod.run(r,i)}),Ed=_("$ZodCustom",(t,e)=>{Y.init(t,e),R.init(t,e),t._zod.parse=(r,i)=>r,t._zod.check=r=>{let i=r.value,n=e.fn(i);if(n instanceof Promise)return n.then(o=>p_(o,r,i,t));p_(n,r,i,t)}});function p_(t,e,r,i){if(!t){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),e.issues.push(mn(n))}}var Wr={};Xe(Wr,{ar:()=>__,az:()=>v_,be:()=>w_,bg:()=>$_,ca:()=>k_,cs:()=>S_,da:()=>x_,de:()=>I_,en:()=>Bo,eo:()=>O_,es:()=>P_,fa:()=>T_,fi:()=>A_,fr:()=>E_,frCA:()=>z_,he:()=>N_,hu:()=>C_,hy:()=>j_,id:()=>R_,is:()=>U_,it:()=>L_,ja:()=>M_,ka:()=>F_,kh:()=>Z_,km:()=>Vo,ko:()=>q_,lt:()=>V_,mk:()=>G_,ms:()=>K_,nl:()=>J_,no:()=>W_,ota:()=>Y_,pl:()=>X_,ps:()=>H_,pt:()=>Q_,ru:()=>tv,sl:()=>nv,sv:()=>rv,ta:()=>iv,th:()=>ov,tr:()=>sv,ua:()=>av,uk:()=>Go,ur:()=>cv,uz:()=>lv,vi:()=>uv,yo:()=>fv,zhCN:()=>dv,zhTW:()=>pv});var uP=()=>{let t={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 e(n){return t[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,s=I(n.input),a=i[s]??s;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 ${a}`:`\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 ${a}`}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 ${S(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: ${v(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?` \u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${n.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${o} ${n.maximum.toString()} ${s.unit??"\u0639\u0646\u0635\u0631"}`:`\u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${n.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${o} ${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=e(n.origin);return s?`\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()} ${s.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":""}: ${v(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 __(){return{localeError:uP()}}var dP=()=>{let t={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 e(n){return t[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,s=I(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n instanceof ${n.expected}, daxil olan ${a}`:`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${o}, daxil olan ${a}`}case"invalid_value":return n.values.length===1?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${S(n.values[0])}`:`Yanl\u0131\u015F se\xE7im: a\u015Fa\u011F\u0131dak\u0131lardan biri olmal\u0131d\u0131r: ${v(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${n.origin??"d\u0259y\u0259r"} ${o}${n.maximum.toString()} ${s.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?">=":">",s=e(n.origin);return s?`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${n.origin} ${o}${n.minimum.toString()} ${s.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":""}: ${v(n.keys,", ")}`;case"invalid_key":return`${n.origin} daxilind\u0259 yanl\u0131\u015F a\xE7ar`;case"invalid_union":return"Yanl\u0131\u015F d\u0259y\u0259r";case"invalid_element":return`${n.origin} daxilind\u0259 yanl\u0131\u015F d\u0259y\u0259r`;default:return"Yanl\u0131\u015F d\u0259y\u0259r"}}};function v_(){return{localeError:dP()}}function b_(t,e,r,i){let n=Math.abs(t),o=n%10,s=n%100;return s>=11&&s<=19?i:o===1?e:o>=2&&o<=4?r:i}var pP=()=>{let t={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 e(n){return t[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,s=I(n.input),a=i[s]??s;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 ${a}`:`\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 ${a}`}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 ${S(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 ${v(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);if(s){let a=Number(n.maximum),c=b_(a,s.unit.one,s.unit.few,s.unit.many);return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${n.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${s.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?">=":">",s=e(n.origin);if(s){let a=Number(n.minimum),c=b_(a,s.unit.one,s.unit.few,s.unit.many);return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${n.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${s.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"}: ${v(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 w_(){return{localeError:pP()}}var fP=()=>{let t={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 e(n){return t[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,s=I(n.input),a=i[s]??s;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 ${a}`:`\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 ${a}`}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 ${S(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 ${v(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`\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()} ${s.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430"}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${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?">=":">",s=e(n.origin);return s?`\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()} ${s.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 s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D";return o.format==="emoji"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),o.format==="datetime"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),o.format==="date"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),o.format==="time"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),o.format==="duration"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),`${s} ${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":""}: ${v(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 $_(){return{localeError:fP()}}var mP=()=>{let t={string:{unit:"car\xE0cters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"}};function e(n){return t[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,s=I(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`Tipus inv\xE0lid: s'esperava instanceof ${n.expected}, s'ha rebut ${a}`:`Tipus inv\xE0lid: s'esperava ${o}, s'ha rebut ${a}`}case"invalid_value":return n.values.length===1?`Valor inv\xE0lid: s'esperava ${S(n.values[0])}`:`Opci\xF3 inv\xE0lida: s'esperava una de ${v(n.values," o ")}`;case"too_big":{let o=n.inclusive?"com a m\xE0xim":"menys de",s=e(n.origin);return s?`Massa gran: s'esperava que ${n.origin??"el valor"} contingu\xE9s ${o} ${n.maximum.toString()} ${s.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",s=e(n.origin);return s?`Massa petit: s'esperava que ${n.origin} contingu\xE9s ${o} ${n.minimum.toString()} ${s.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":""}: ${v(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 k_(){return{localeError:mP()}}var gP=()=>{let t={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 e(n){return t[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,s=I(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no instanceof ${n.expected}, obdr\u017Eeno ${a}`:`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${o}, obdr\u017Eeno ${a}`}case"invalid_value":return n.values.length===1?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${S(n.values[0])}`:`Neplatn\xE1 mo\u017Enost: o\u010Dek\xE1v\xE1na jedna z hodnot ${v(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${n.origin??"hodnota"} mus\xED m\xEDt ${o}${n.maximum.toString()} ${s.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?">=":">",s=e(n.origin);return s?`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${n.origin??"hodnota"} mus\xED m\xEDt ${o}${n.minimum.toString()} ${s.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: ${v(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 S_(){return{localeError:gP()}}var hP=()=>{let t={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"}};function e(n){return t[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,s=I(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`Ugyldigt input: forventede instanceof ${n.expected}, fik ${a}`:`Ugyldigt input: forventede ${o}, fik ${a}`}case"invalid_value":return n.values.length===1?`Ugyldig v\xE6rdi: forventede ${S(n.values[0])}`:`Ugyldigt valg: forventede en af f\xF8lgende ${v(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin),a=i[n.origin]??n.origin;return s?`For stor: forventede ${a??"value"} ${s.verb} ${o} ${n.maximum.toString()} ${s.unit??"elementer"}`:`For stor: forventede ${a??"value"} havde ${o} ${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=e(n.origin),a=i[n.origin]??n.origin;return s?`For lille: forventede ${a} ${s.verb} ${o} ${n.minimum.toString()} ${s.unit}`:`For lille: forventede ${a} 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"}: ${v(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 x_(){return{localeError:hP()}}var yP=()=>{let t={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 e(n){return t[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,s=I(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`Ung\xFCltige Eingabe: erwartet instanceof ${n.expected}, erhalten ${a}`:`Ung\xFCltige Eingabe: erwartet ${o}, erhalten ${a}`}case"invalid_value":return n.values.length===1?`Ung\xFCltige Eingabe: erwartet ${S(n.values[0])}`:`Ung\xFCltige Option: erwartet eine von ${v(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`Zu gro\xDF: erwartet, dass ${n.origin??"Wert"} ${o}${n.maximum.toString()} ${s.unit??"Elemente"} hat`:`Zu gro\xDF: erwartet, dass ${n.origin??"Wert"} ${o}${n.maximum.toString()} ist`}case"too_small":{let o=n.inclusive?">=":">",s=e(n.origin);return s?`Zu klein: erwartet, dass ${n.origin} ${o}${n.minimum.toString()} ${s.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"}: ${v(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 I_(){return{localeError:yP()}}var _P=()=>{let t={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"},map:{unit:"entries",verb:"to have"}};function e(n){return t[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,s=I(n.input),a=i[s]??s;return`Invalid input: expected ${o}, received ${a}`}case"invalid_value":return n.values.length===1?`Invalid input: expected ${S(n.values[0])}`:`Invalid option: expected one of ${v(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`Too big: expected ${n.origin??"value"} to have ${o}${n.maximum.toString()} ${s.unit??"elements"}`:`Too big: expected ${n.origin??"value"} to be ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=e(n.origin);return s?`Too small: expected ${n.origin} to have ${o}${n.minimum.toString()} ${s.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":""}: ${v(n.keys,", ")}`;case"invalid_key":return`Invalid key in ${n.origin}`;case"invalid_union":return"Invalid input";case"invalid_element":return`Invalid value in ${n.origin}`;default:return"Invalid input"}}};function Bo(){return{localeError:_P()}}var vP=()=>{let t={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function e(n){return t[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,s=I(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`Nevalida enigo: atendi\u011Dis instanceof ${n.expected}, ricevi\u011Dis ${a}`:`Nevalida enigo: atendi\u011Dis ${o}, ricevi\u011Dis ${a}`}case"invalid_value":return n.values.length===1?`Nevalida enigo: atendi\u011Dis ${S(n.values[0])}`:`Nevalida opcio: atendi\u011Dis unu el ${v(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`Tro granda: atendi\u011Dis ke ${n.origin??"valoro"} havu ${o}${n.maximum.toString()} ${s.unit??"elementojn"}`:`Tro granda: atendi\u011Dis ke ${n.origin??"valoro"} havu ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=e(n.origin);return s?`Tro malgranda: atendi\u011Dis ke ${n.origin} havu ${o}${n.minimum.toString()} ${s.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":""}: ${v(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 O_(){return{localeError:vP()}}var bP=()=>{let t={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}};function e(n){return t[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,s=I(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`Entrada inv\xE1lida: se esperaba instanceof ${n.expected}, recibido ${a}`:`Entrada inv\xE1lida: se esperaba ${o}, recibido ${a}`}case"invalid_value":return n.values.length===1?`Entrada inv\xE1lida: se esperaba ${S(n.values[0])}`:`Opci\xF3n inv\xE1lida: se esperaba una de ${v(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin),a=i[n.origin]??n.origin;return s?`Demasiado grande: se esperaba que ${a??"valor"} tuviera ${o}${n.maximum.toString()} ${s.unit??"elementos"}`:`Demasiado grande: se esperaba que ${a??"valor"} fuera ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=e(n.origin),a=i[n.origin]??n.origin;return s?`Demasiado peque\xF1o: se esperaba que ${a} tuviera ${o}${n.minimum.toString()} ${s.unit}`:`Demasiado peque\xF1o: se esperaba que ${a} 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":""}: ${v(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 P_(){return{localeError:bP()}}var wP=()=>{let t={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 e(n){return t[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,s=I(n.input),a=i[s]??s;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 ${a} \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 ${a} \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 ${S(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 ${v(n.values,"|")} \u0645\u06CC\u200C\u0628\u0648\u062F`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${n.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${o}${n.maximum.toString()} ${s.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?">=":">",s=e(n.origin);return s?`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${n.origin} \u0628\u0627\u06CC\u062F ${o}${n.minimum.toString()} ${s.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: ${v(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 T_(){return{localeError:wP()}}var $P=()=>{let t={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 e(n){return t[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,s=I(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`Virheellinen tyyppi: odotettiin instanceof ${n.expected}, oli ${a}`:`Virheellinen tyyppi: odotettiin ${o}, oli ${a}`}case"invalid_value":return n.values.length===1?`Virheellinen sy\xF6te: t\xE4ytyy olla ${S(n.values[0])}`:`Virheellinen valinta: t\xE4ytyy olla yksi seuraavista: ${v(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`Liian suuri: ${s.subject} t\xE4ytyy olla ${o}${n.maximum.toString()} ${s.unit}`.trim():`Liian suuri: arvon t\xE4ytyy olla ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=e(n.origin);return s?`Liian pieni: ${s.subject} t\xE4ytyy olla ${o}${n.minimum.toString()} ${s.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"}: ${v(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 A_(){return{localeError:$P()}}var kP=()=>{let t={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function e(n){return t[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={nan:"NaN",number:"nombre",array:"tableau"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=I(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`Entr\xE9e invalide : instanceof ${n.expected} attendu, ${a} re\xE7u`:`Entr\xE9e invalide : ${o} attendu, ${a} re\xE7u`}case"invalid_value":return n.values.length===1?`Entr\xE9e invalide : ${S(n.values[0])} attendu`:`Option invalide : une valeur parmi ${v(n.values,"|")} attendue`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`Trop grand : ${n.origin??"valeur"} doit ${s.verb} ${o}${n.maximum.toString()} ${s.unit??"\xE9l\xE9ment(s)"}`:`Trop grand : ${n.origin??"valeur"} doit \xEAtre ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=e(n.origin);return s?`Trop petit : ${n.origin} doit ${s.verb} ${o}${n.minimum.toString()} ${s.unit}`:`Trop petit : ${n.origin} 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":""} : ${v(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 E_(){return{localeError:kP()}}var SP=()=>{let t={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function e(n){return t[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,s=I(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`Entr\xE9e invalide : attendu instanceof ${n.expected}, re\xE7u ${a}`:`Entr\xE9e invalide : attendu ${o}, re\xE7u ${a}`}case"invalid_value":return n.values.length===1?`Entr\xE9e invalide : attendu ${S(n.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${v(n.values,"|")}`;case"too_big":{let o=n.inclusive?"\u2264":"<",s=e(n.origin);return s?`Trop grand : attendu que ${n.origin??"la valeur"} ait ${o}${n.maximum.toString()} ${s.unit}`:`Trop grand : attendu que ${n.origin??"la valeur"} soit ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?"\u2265":">",s=e(n.origin);return s?`Trop petit : attendu que ${n.origin} ait ${o}${n.minimum.toString()} ${s.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":""} : ${v(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 z_(){return{localeError:SP()}}var xP=()=>{let t={string:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA",gender:"f"},number:{label:"\u05DE\u05E1\u05E4\u05E8",gender:"m"},boolean:{label:"\u05E2\u05E8\u05DA \u05D1\u05D5\u05DC\u05D9\u05D0\u05E0\u05D9",gender:"m"},bigint:{label:"BigInt",gender:"m"},date:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA",gender:"m"},array:{label:"\u05DE\u05E2\u05E8\u05DA",gender:"m"},object:{label:"\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8",gender:"m"},null:{label:"\u05E2\u05E8\u05DA \u05E8\u05D9\u05E7 (null)",gender:"m"},undefined:{label:"\u05E2\u05E8\u05DA \u05DC\u05D0 \u05DE\u05D5\u05D2\u05D3\u05E8 (undefined)",gender:"m"},symbol:{label:"\u05E1\u05D9\u05DE\u05D1\u05D5\u05DC (Symbol)",gender:"m"},function:{label:"\u05E4\u05D5\u05E0\u05E7\u05E6\u05D9\u05D4",gender:"f"},map:{label:"\u05DE\u05E4\u05D4 (Map)",gender:"f"},set:{label:"\u05E7\u05D1\u05D5\u05E6\u05D4 (Set)",gender:"f"},file:{label:"\u05E7\u05D5\u05D1\u05E5",gender:"m"},promise:{label:"Promise",gender:"m"},NaN:{label:"NaN",gender:"m"},unknown:{label:"\u05E2\u05E8\u05DA \u05DC\u05D0 \u05D9\u05D3\u05D5\u05E2",gender:"m"},value:{label:"\u05E2\u05E8\u05DA",gender:"m"}},e={string:{unit:"\u05EA\u05D5\u05D5\u05D9\u05DD",shortLabel:"\u05E7\u05E6\u05E8",longLabel:"\u05D0\u05E8\u05D5\u05DA"},file:{unit:"\u05D1\u05D9\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},array:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},set:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},number:{unit:"",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"}},r=l=>l?t[l]:void 0,i=l=>{let u=r(l);return u?u.label:l??t.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",s=l=>l?e[l]??null:null,a={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),p=I(l.input),f=c[p]??t[p]?.label??p;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 ${f}`:`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${d}, \u05D4\u05EA\u05E7\u05D1\u05DC ${f}`}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 ${S(l.values[0])}`;let u=l.values.map(f=>S(f));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=s(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 m=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 ${m}`}if(l.origin==="array"||l.origin==="set"){let m=l.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA",g=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} ${m} \u05DC\u05D4\u05DB\u05D9\u05DC ${g}`.trim()}let p=l.inclusive?"<=":"<",f=o(l.origin??"value");return u?.unit?`${u.longLabel} \u05DE\u05D3\u05D9: ${d} ${f} ${p}${l.maximum.toString()} ${u.unit}`:`${u?.longLabel??"\u05D2\u05D3\u05D5\u05DC"} \u05DE\u05D3\u05D9: ${d} ${f} ${p}${l.maximum.toString()}`}case"too_small":{let u=s(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 m=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 ${m}`}if(l.origin==="array"||l.origin==="set"){let m=l.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA";if(l.minimum===1&&l.inclusive){let y=(l.origin==="set","\u05DC\u05E4\u05D7\u05D5\u05EA \u05E4\u05E8\u05D9\u05D8 \u05D0\u05D7\u05D3");return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${d} ${m} \u05DC\u05D4\u05DB\u05D9\u05DC ${y}`}let g=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} ${m} \u05DC\u05D4\u05DB\u05D9\u05DC ${g}`.trim()}let p=l.inclusive?">=":">",f=o(l.origin??"value");return u?.unit?`${u.shortLabel} \u05DE\u05D3\u05D9: ${d} ${f} ${p}${l.minimum.toString()} ${u.unit}`:`${u?.shortLabel??"\u05E7\u05D8\u05DF"} \u05DE\u05D3\u05D9: ${d} ${f} ${p}${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=a[u.format],p=d?.label??u.format,m=(d?.gender??"m")==="f"?"\u05EA\u05E7\u05D9\u05E0\u05D4":"\u05EA\u05E7\u05D9\u05DF";return`${p} \u05DC\u05D0 ${m}`}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"}: ${v(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 N_(){return{localeError:xP()}}var IP=()=>{let t={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}};function e(n){return t[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,s=I(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k instanceof ${n.expected}, a kapott \xE9rt\xE9k ${a}`:`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${o}, a kapott \xE9rt\xE9k ${a}`}case"invalid_value":return n.values.length===1?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${S(n.values[0])}`:`\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${v(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`T\xFAl nagy: ${n.origin??"\xE9rt\xE9k"} m\xE9rete t\xFAl nagy ${o}${n.maximum.toString()} ${s.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?">=":">",s=e(n.origin);return s?`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${n.origin} m\xE9rete t\xFAl kicsi ${o}${n.minimum.toString()} ${s.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":""}: ${v(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 C_(){return{localeError:IP()}}function D_(t,e,r){return Math.abs(t)===1?e:r}function bn(t){if(!t)return"";let e=["\u0561","\u0565","\u0568","\u056B","\u0578","\u0578\u0582","\u0585"],r=t[t.length-1];return t+(e.includes(r)?"\u0576":"\u0568")}var OP=()=>{let t={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 e(n){return t[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,s=I(n.input),a=i[s]??s;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 ${a}`:`\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 ${a}`}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 ${S(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 ${v(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);if(s){let a=Number(n.maximum),c=D_(a,s.unit.one,s.unit.many);return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${bn(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 ${bn(n.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056C\u056B\u0576\u056B ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=e(n.origin);if(s){let a=Number(n.minimum),c=D_(a,s.unit.one,s.unit.many);return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${bn(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 ${bn(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":""}. ${v(n.keys,", ")}`;case"invalid_key":return`\u054D\u056D\u0561\u056C \u0562\u0561\u0576\u0561\u056C\u056B ${bn(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 ${bn(n.origin)}-\u0578\u0582\u0574`;default:return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574"}}};function j_(){return{localeError:OP()}}var PP=()=>{let t={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}};function e(n){return t[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,s=I(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`Input tidak valid: diharapkan instanceof ${n.expected}, diterima ${a}`:`Input tidak valid: diharapkan ${o}, diterima ${a}`}case"invalid_value":return n.values.length===1?`Input tidak valid: diharapkan ${S(n.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${v(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`Terlalu besar: diharapkan ${n.origin??"value"} memiliki ${o}${n.maximum.toString()} ${s.unit??"elemen"}`:`Terlalu besar: diharapkan ${n.origin??"value"} menjadi ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=e(n.origin);return s?`Terlalu kecil: diharapkan ${n.origin} memiliki ${o}${n.minimum.toString()} ${s.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":""}: ${v(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 R_(){return{localeError:PP()}}var TP=()=>{let t={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 e(n){return t[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,s=I(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`Rangt gildi: \xDE\xFA sl\xF3st inn ${a} \xFEar sem \xE1 a\xF0 vera instanceof ${n.expected}`:`Rangt gildi: \xDE\xFA sl\xF3st inn ${a} \xFEar sem \xE1 a\xF0 vera ${o}`}case"invalid_value":return n.values.length===1?`Rangt gildi: gert r\xE1\xF0 fyrir ${S(n.values[0])}`:`\xD3gilt val: m\xE1 vera eitt af eftirfarandi ${v(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${n.origin??"gildi"} hafi ${o}${n.maximum.toString()} ${s.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?">=":">",s=e(n.origin);return s?`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${n.origin} hafi ${o}${n.minimum.toString()} ${s.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"}: ${v(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 U_(){return{localeError:TP()}}var AP=()=>{let t={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}};function e(n){return t[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,s=I(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`Input non valido: atteso instanceof ${n.expected}, ricevuto ${a}`:`Input non valido: atteso ${o}, ricevuto ${a}`}case"invalid_value":return n.values.length===1?`Input non valido: atteso ${S(n.values[0])}`:`Opzione non valida: atteso uno tra ${v(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`Troppo grande: ${n.origin??"valore"} deve avere ${o}${n.maximum.toString()} ${s.unit??"elementi"}`:`Troppo grande: ${n.origin??"valore"} deve essere ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=e(n.origin);return s?`Troppo piccolo: ${n.origin} deve avere ${o}${n.minimum.toString()} ${s.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}`:`Invalid ${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"}: ${v(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 L_(){return{localeError:AP()}}var EP=()=>{let t={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 e(n){return t[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,s=I(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`\u7121\u52B9\u306A\u5165\u529B: instanceof ${n.expected}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${a}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u5165\u529B: ${o}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${a}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`}case"invalid_value":return n.values.length===1?`\u7121\u52B9\u306A\u5165\u529B: ${S(n.values[0])}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u9078\u629E: ${v(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",s=e(n.origin);return s?`\u5927\u304D\u3059\u304E\u308B\u5024: ${n.origin??"\u5024"}\u306F${n.maximum.toString()}${s.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",s=e(n.origin);return s?`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${n.origin}\u306F${n.minimum.toString()}${s.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":""}: ${v(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 M_(){return{localeError:EP()}}var zP=()=>{let t={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 e(n){return t[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 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",base64url:"base64url-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",json_string:"JSON \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\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:"\u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\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,s=I(n.input),a=i[s]??s;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 ${a}`:`\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 ${a}`}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 ${S(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 ${v(n.values,"|")}-\u10D3\u10D0\u10DC`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${n.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} ${s.verb} ${o}${n.maximum.toString()} ${s.unit}`:`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${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?">=":">",s=e(n.origin);return s?`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${n.origin} ${s.verb} ${o}${n.minimum.toString()} ${s.unit}`:`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${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 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\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 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\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 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\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 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\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"}: ${v(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 F_(){return{localeError:zP()}}var NP=()=>{let t={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 e(n){return t[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,s=I(n.input),a=i[s]??s;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 ${a}`:`\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 ${a}`}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 ${S(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 ${v(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`\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()} ${s.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?">=":">",s=e(n.origin);return s?`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${n.origin} ${o} ${n.minimum.toString()} ${s.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 ${v(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 Vo(){return{localeError:NP()}}function Z_(){return Vo()}var CP=()=>{let t={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 e(n){return t[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,s=I(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 instanceof ${n.expected}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${a}\uC785\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 ${o}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${a}\uC785\uB2C8\uB2E4`}case"invalid_value":return n.values.length===1?`\uC798\uBABB\uB41C \uC785\uB825: \uAC12\uC740 ${S(n.values[0])} \uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC635\uC158: ${v(n.values,"\uB610\uB294 ")} \uC911 \uD558\uB098\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"too_big":{let o=n.inclusive?"\uC774\uD558":"\uBBF8\uB9CC",s=o==="\uBBF8\uB9CC"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",a=e(n.origin),c=a?.unit??"\uC694\uC18C";return a?`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${n.maximum.toString()}${c} ${o}${s}`:`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${n.maximum.toString()} ${o}${s}`}case"too_small":{let o=n.inclusive?"\uC774\uC0C1":"\uCD08\uACFC",s=o==="\uC774\uC0C1"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",a=e(n.origin),c=a?.unit??"\uC694\uC18C";return a?`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${n.minimum.toString()}${c} ${o}${s}`:`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${n.minimum.toString()} ${o}${s}`}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: ${v(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 q_(){return{localeError:CP()}}var Jr=t=>t.charAt(0).toUpperCase()+t.slice(1);function B_(t){let e=Math.abs(t),r=e%10,i=e%100;return i>=11&&i<=19||r===0?"many":r===1?"one":"few"}var DP=()=>{let t={string:{unit:{one:"simbolis",few:"simboliai",many:"simboli\u0173"},verb:{smaller:{inclusive:"turi b\u016Bti ne ilgesn\u0117 kaip",notInclusive:"turi b\u016Bti trumpesn\u0117 kaip"},bigger:{inclusive:"turi b\u016Bti ne trumpesn\u0117 kaip",notInclusive:"turi b\u016Bti ilgesn\u0117 kaip"}}},file:{unit:{one:"baitas",few:"baitai",many:"bait\u0173"},verb:{smaller:{inclusive:"turi b\u016Bti ne didesnis kaip",notInclusive:"turi b\u016Bti ma\u017Eesnis kaip"},bigger:{inclusive:"turi b\u016Bti ne ma\u017Eesnis kaip",notInclusive:"turi b\u016Bti didesnis kaip"}}},array:{unit:{one:"element\u0105",few:"elementus",many:"element\u0173"},verb:{smaller:{inclusive:"turi tur\u0117ti ne daugiau kaip",notInclusive:"turi tur\u0117ti ma\u017Eiau kaip"},bigger:{inclusive:"turi tur\u0117ti ne ma\u017Eiau kaip",notInclusive:"turi tur\u0117ti daugiau kaip"}}},set:{unit:{one:"element\u0105",few:"elementus",many:"element\u0173"},verb:{smaller:{inclusive:"turi tur\u0117ti ne daugiau kaip",notInclusive:"turi tur\u0117ti ma\u017Eiau kaip"},bigger:{inclusive:"turi tur\u0117ti ne ma\u017Eiau kaip",notInclusive:"turi tur\u0117ti daugiau kaip"}}}};function e(n,o,s,a){let c=t[n]??null;return c===null?c:{unit:c.unit[o],verb:c.verb[a][s?"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,s=I(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`Gautas tipas ${a}, o tik\u0117tasi - instanceof ${n.expected}`:`Gautas tipas ${a}, o tik\u0117tasi - ${o}`}case"invalid_value":return n.values.length===1?`Privalo b\u016Bti ${S(n.values[0])}`:`Privalo b\u016Bti vienas i\u0161 ${v(n.values,"|")} pasirinkim\u0173`;case"too_big":{let o=i[n.origin]??n.origin,s=e(n.origin,B_(Number(n.maximum)),n.inclusive??!1,"smaller");if(s?.verb)return`${Jr(o??n.origin??"reik\u0161m\u0117")} ${s.verb} ${n.maximum.toString()} ${s.unit??"element\u0173"}`;let a=n.inclusive?"ne didesnis kaip":"ma\u017Eesnis kaip";return`${Jr(o??n.origin??"reik\u0161m\u0117")} turi b\u016Bti ${a} ${n.maximum.toString()} ${s?.unit}`}case"too_small":{let o=i[n.origin]??n.origin,s=e(n.origin,B_(Number(n.minimum)),n.inclusive??!1,"bigger");if(s?.verb)return`${Jr(o??n.origin??"reik\u0161m\u0117")} ${s.verb} ${n.minimum.toString()} ${s.unit??"element\u0173"}`;let a=n.inclusive?"ne ma\u017Eesnis kaip":"didesnis kaip";return`${Jr(o??n.origin??"reik\u0161m\u0117")} turi b\u016Bti ${a} ${n.minimum.toString()} ${s?.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"}: ${v(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`${Jr(o??n.origin??"reik\u0161m\u0117")} turi klaiding\u0105 \u012Fvest\u012F`}default:return"Klaidinga \u012Fvestis"}}};function V_(){return{localeError:DP()}}var jP=()=>{let t={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 e(n){return t[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,s=I(n.input),a=i[s]??s;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 ${a}`:`\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 ${a}`}case"invalid_value":return n.values.length===1?`Invalid input: expected ${S(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 ${v(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${n.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0438\u043C\u0430 ${o}${n.maximum.toString()} ${s.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0438"}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${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?">=":">",s=e(n.origin);return s?`\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()} ${s.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"}: ${v(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 G_(){return{localeError:jP()}}var RP=()=>{let t={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}};function e(n){return t[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,s=I(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`Input tidak sah: dijangka instanceof ${n.expected}, diterima ${a}`:`Input tidak sah: dijangka ${o}, diterima ${a}`}case"invalid_value":return n.values.length===1?`Input tidak sah: dijangka ${S(n.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${v(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`Terlalu besar: dijangka ${n.origin??"nilai"} ${s.verb} ${o}${n.maximum.toString()} ${s.unit??"elemen"}`:`Terlalu besar: dijangka ${n.origin??"nilai"} adalah ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=e(n.origin);return s?`Terlalu kecil: dijangka ${n.origin} ${s.verb} ${o}${n.minimum.toString()} ${s.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: ${v(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 K_(){return{localeError:RP()}}var UP=()=>{let t={string:{unit:"tekens",verb:"heeft"},file:{unit:"bytes",verb:"heeft"},array:{unit:"elementen",verb:"heeft"},set:{unit:"elementen",verb:"heeft"}};function e(n){return t[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,s=I(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`Ongeldige invoer: verwacht instanceof ${n.expected}, ontving ${a}`:`Ongeldige invoer: verwacht ${o}, ontving ${a}`}case"invalid_value":return n.values.length===1?`Ongeldige invoer: verwacht ${S(n.values[0])}`:`Ongeldige optie: verwacht \xE9\xE9n van ${v(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin),a=n.origin==="date"?"laat":n.origin==="string"?"lang":"groot";return s?`Te ${a}: verwacht dat ${n.origin??"waarde"} ${o}${n.maximum.toString()} ${s.unit??"elementen"} ${s.verb}`:`Te ${a}: verwacht dat ${n.origin??"waarde"} ${o}${n.maximum.toString()} is`}case"too_small":{let o=n.inclusive?">=":">",s=e(n.origin),a=n.origin==="date"?"vroeg":n.origin==="string"?"kort":"klein";return s?`Te ${a}: verwacht dat ${n.origin} ${o}${n.minimum.toString()} ${s.unit} ${s.verb}`:`Te ${a}: 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":""}: ${v(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 J_(){return{localeError:UP()}}var LP=()=>{let t={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 e(n){return t[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,s=I(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`Ugyldig input: forventet instanceof ${n.expected}, fikk ${a}`:`Ugyldig input: forventet ${o}, fikk ${a}`}case"invalid_value":return n.values.length===1?`Ugyldig verdi: forventet ${S(n.values[0])}`:`Ugyldig valg: forventet en av ${v(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`For stor(t): forventet ${n.origin??"value"} til \xE5 ha ${o}${n.maximum.toString()} ${s.unit??"elementer"}`:`For stor(t): forventet ${n.origin??"value"} til \xE5 ha ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=e(n.origin);return s?`For lite(n): forventet ${n.origin} til \xE5 ha ${o}${n.minimum.toString()} ${s.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"}: ${v(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 W_(){return{localeError:LP()}}var MP=()=>{let t={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 e(n){return t[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,s=I(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`F\xE2sit giren: umulan instanceof ${n.expected}, al\u0131nan ${a}`:`F\xE2sit giren: umulan ${o}, al\u0131nan ${a}`}case"invalid_value":return n.values.length===1?`F\xE2sit giren: umulan ${S(n.values[0])}`:`F\xE2sit tercih: m\xFBteberler ${v(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`Fazla b\xFCy\xFCk: ${n.origin??"value"}, ${o}${n.maximum.toString()} ${s.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?">=":">",s=e(n.origin);return s?`Fazla k\xFC\xE7\xFCk: ${n.origin}, ${o}${n.minimum.toString()} ${s.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":""}: ${v(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 Y_(){return{localeError:MP()}}var FP=()=>{let t={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 e(n){return t[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,s=I(n.input),a=i[s]??s;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 ${a} \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 ${a} \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 ${S(n.values[0])} \u0648\u0627\u06CC`:`\u0646\u0627\u0633\u0645 \u0627\u0646\u062A\u062E\u0627\u0628: \u0628\u0627\u06CC\u062F \u06CC\u0648 \u0644\u0647 ${v(n.values,"|")} \u0685\u062E\u0647 \u0648\u0627\u06CC`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${n.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${o}${n.maximum.toString()} ${s.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?">=":">",s=e(n.origin);return s?`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${n.origin} \u0628\u0627\u06CC\u062F ${o}${n.minimum.toString()} ${s.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"}: ${v(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 H_(){return{localeError:FP()}}var ZP=()=>{let t={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 e(n){return t[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,s=I(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano instanceof ${n.expected}, otrzymano ${a}`:`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${o}, otrzymano ${a}`}case"invalid_value":return n.values.length===1?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${S(n.values[0])}`:`Nieprawid\u0142owa opcja: oczekiwano jednej z warto\u015Bci ${v(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`Za du\u017Ca warto\u015B\u0107: oczekiwano, \u017Ce ${n.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${o}${n.maximum.toString()} ${s.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?">=":">",s=e(n.origin);return s?`Za ma\u0142a warto\u015B\u0107: oczekiwano, \u017Ce ${n.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${o}${n.minimum.toString()} ${s.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":""}: ${v(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 X_(){return{localeError:ZP()}}var qP=()=>{let t={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function e(n){return t[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,s=I(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`Tipo inv\xE1lido: esperado instanceof ${n.expected}, recebido ${a}`:`Tipo inv\xE1lido: esperado ${o}, recebido ${a}`}case"invalid_value":return n.values.length===1?`Entrada inv\xE1lida: esperado ${S(n.values[0])}`:`Op\xE7\xE3o inv\xE1lida: esperada uma das ${v(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`Muito grande: esperado que ${n.origin??"valor"} tivesse ${o}${n.maximum.toString()} ${s.unit??"elementos"}`:`Muito grande: esperado que ${n.origin??"valor"} fosse ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=e(n.origin);return s?`Muito pequeno: esperado que ${n.origin} tivesse ${o}${n.minimum.toString()} ${s.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":""}: ${v(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 Q_(){return{localeError:qP()}}function ev(t,e,r,i){let n=Math.abs(t),o=n%10,s=n%100;return s>=11&&s<=19?i:o===1?e:o>=2&&o<=4?r:i}var BP=()=>{let t={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 e(n){return t[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,s=I(n.input),a=i[s]??s;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 ${a}`:`\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 ${a}`}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 ${S(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 ${v(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);if(s){let a=Number(n.maximum),c=ev(a,s.unit.one,s.unit.few,s.unit.many);return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${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?">=":">",s=e(n.origin);if(s){let a=Number(n.minimum),c=ev(a,s.unit.one,s.unit.few,s.unit.many);return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${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":""}: ${v(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 tv(){return{localeError:BP()}}var VP=()=>{let t={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}};function e(n){return t[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,s=I(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`Neveljaven vnos: pri\u010Dakovano instanceof ${n.expected}, prejeto ${a}`:`Neveljaven vnos: pri\u010Dakovano ${o}, prejeto ${a}`}case"invalid_value":return n.values.length===1?`Neveljaven vnos: pri\u010Dakovano ${S(n.values[0])}`:`Neveljavna mo\u017Enost: pri\u010Dakovano eno izmed ${v(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`Preveliko: pri\u010Dakovano, da bo ${n.origin??"vrednost"} imelo ${o}${n.maximum.toString()} ${s.unit??"elementov"}`:`Preveliko: pri\u010Dakovano, da bo ${n.origin??"vrednost"} ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=e(n.origin);return s?`Premajhno: pri\u010Dakovano, da bo ${n.origin} imelo ${o}${n.minimum.toString()} ${s.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"}: ${v(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 nv(){return{localeError:VP()}}var GP=()=>{let t={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 e(n){return t[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,s=I(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`Ogiltig inmatning: f\xF6rv\xE4ntat instanceof ${n.expected}, fick ${a}`:`Ogiltig inmatning: f\xF6rv\xE4ntat ${o}, fick ${a}`}case"invalid_value":return n.values.length===1?`Ogiltig inmatning: f\xF6rv\xE4ntat ${S(n.values[0])}`:`Ogiltigt val: f\xF6rv\xE4ntade en av ${v(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`F\xF6r stor(t): f\xF6rv\xE4ntade ${n.origin??"v\xE4rdet"} att ha ${o}${n.maximum.toString()} ${s.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?">=":">",s=e(n.origin);return s?`F\xF6r lite(t): f\xF6rv\xE4ntade ${n.origin??"v\xE4rdet"} att ha ${o}${n.minimum.toString()} ${s.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"}: ${v(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 rv(){return{localeError:GP()}}var KP=()=>{let t={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 e(n){return t[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,s=I(n.input),a=i[s]??s;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 ${a}`:`\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 ${a}`}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 ${S(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 ${v(n.values,"|")} \u0B87\u0BB2\u0BCD \u0B92\u0BA9\u0BCD\u0BB1\u0BC1`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${n.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${o}${n.maximum.toString()} ${s.unit??"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD"} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${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?">=":">",s=e(n.origin);return s?`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${n.origin} ${o}${n.minimum.toString()} ${s.unit} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${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":""}: ${v(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 iv(){return{localeError:KP()}}var JP=()=>{let t={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 e(n){return t[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,s=I(n.input),a=i[s]??s;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 ${a}`:`\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 ${a}`}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 ${S(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 ${v(n.values,"|")}`;case"too_big":{let o=n.inclusive?"\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19":"\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32",s=e(n.origin);return s?`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${n.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${o} ${n.maximum.toString()} ${s.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",s=e(n.origin);return s?`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${n.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${o} ${n.minimum.toString()} ${s.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: ${v(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 ov(){return{localeError:JP()}}var WP=()=>{let t={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 e(n){return t[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,s=I(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`Ge\xE7ersiz de\u011Fer: beklenen instanceof ${n.expected}, al\u0131nan ${a}`:`Ge\xE7ersiz de\u011Fer: beklenen ${o}, al\u0131nan ${a}`}case"invalid_value":return n.values.length===1?`Ge\xE7ersiz de\u011Fer: beklenen ${S(n.values[0])}`:`Ge\xE7ersiz se\xE7enek: a\u015Fa\u011F\u0131dakilerden biri olmal\u0131: ${v(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`\xC7ok b\xFCy\xFCk: beklenen ${n.origin??"de\u011Fer"} ${o}${n.maximum.toString()} ${s.unit??"\xF6\u011Fe"}`:`\xC7ok b\xFCy\xFCk: beklenen ${n.origin??"de\u011Fer"} ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=e(n.origin);return s?`\xC7ok k\xFC\xE7\xFCk: beklenen ${n.origin} ${o}${n.minimum.toString()} ${s.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":""}: ${v(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 sv(){return{localeError:WP()}}var YP=()=>{let t={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 e(n){return t[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,s=I(n.input),a=i[s]??s;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 ${a}`:`\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 ${a}`}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 ${S(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 ${v(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${n.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} ${s.verb} ${o}${n.maximum.toString()} ${s.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432"}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${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?">=":">",s=e(n.origin);return s?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${n.origin} ${s.verb} ${o}${n.minimum.toString()} ${s.unit}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${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":""}: ${v(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 Go(){return{localeError:YP()}}function av(){return Go()}var HP=()=>{let t={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 e(n){return t[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,s=I(n.input),a=i[s]??s;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 ${a} \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 ${a} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`}case"invalid_value":return n.values.length===1?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${S(n.values[0])} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`:`\u063A\u0644\u0637 \u0622\u067E\u0634\u0646: ${v(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?"<=":"<",s=e(n.origin);return s?`\u0628\u06C1\u062A \u0628\u0691\u0627: ${n.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u06D2 ${o}${n.maximum.toString()} ${s.unit??"\u0639\u0646\u0627\u0635\u0631"} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0628\u0691\u0627: ${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?">=":">",s=e(n.origin);return s?`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${n.origin} \u06A9\u06D2 ${o}${n.minimum.toString()} ${s.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":""}: ${v(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 cv(){return{localeError:HP()}}var XP=()=>{let t={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"}};function e(n){return t[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,s=I(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`Noto\u2018g\u2018ri kirish: kutilgan instanceof ${n.expected}, qabul qilingan ${a}`:`Noto\u2018g\u2018ri kirish: kutilgan ${o}, qabul qilingan ${a}`}case"invalid_value":return n.values.length===1?`Noto\u2018g\u2018ri kirish: kutilgan ${S(n.values[0])}`:`Noto\u2018g\u2018ri variant: quyidagilardan biri kutilgan ${v(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`Juda katta: kutilgan ${n.origin??"qiymat"} ${o}${n.maximum.toString()} ${s.unit} ${s.verb}`:`Juda katta: kutilgan ${n.origin??"qiymat"} ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=e(n.origin);return s?`Juda kichik: kutilgan ${n.origin} ${o}${n.minimum.toString()} ${s.unit} ${s.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":""}: ${v(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 lv(){return{localeError:XP()}}var QP=()=>{let t={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 e(n){return t[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,s=I(n.input),a=i[s]??s;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 ${a}`:`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${o}, nh\u1EADn \u0111\u01B0\u1EE3c ${a}`}case"invalid_value":return n.values.length===1?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${S(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 ${v(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${n.origin??"gi\xE1 tr\u1ECB"} ${s.verb} ${o}${n.maximum.toString()} ${s.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?">=":">",s=e(n.origin);return s?`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${n.origin} ${s.verb} ${o}${n.minimum.toString()} ${s.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: ${v(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 uv(){return{localeError:QP()}}var eT=()=>{let t={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 e(n){return t[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,s=I(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B instanceof ${n.expected}\uFF0C\u5B9E\u9645\u63A5\u6536 ${a}`:`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${o}\uFF0C\u5B9E\u9645\u63A5\u6536 ${a}`}case"invalid_value":return n.values.length===1?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${S(n.values[0])}`:`\u65E0\u6548\u9009\u9879\uFF1A\u671F\u671B\u4EE5\u4E0B\u4E4B\u4E00 ${v(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${n.origin??"\u503C"} ${o}${n.maximum.toString()} ${s.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?">=":">",s=e(n.origin);return s?`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${n.origin} ${o}${n.minimum.toString()} ${s.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): ${v(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 dv(){return{localeError:eT()}}var tT=()=>{let t={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 e(n){return t[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,s=I(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA instanceof ${n.expected}\uFF0C\u4F46\u6536\u5230 ${a}`:`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${o}\uFF0C\u4F46\u6536\u5230 ${a}`}case"invalid_value":return n.values.length===1?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${S(n.values[0])}`:`\u7121\u6548\u7684\u9078\u9805\uFF1A\u9810\u671F\u70BA\u4EE5\u4E0B\u5176\u4E2D\u4E4B\u4E00 ${v(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${n.origin??"\u503C"} \u61C9\u70BA ${o}${n.maximum.toString()} ${s.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?">=":">",s=e(n.origin);return s?`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${n.origin} \u61C9\u70BA ${o}${n.minimum.toString()} ${s.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${v(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 pv(){return{localeError:tT()}}var nT=()=>{let t={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 e(n){return t[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,s=I(n.input),a=i[s]??s;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 ${a}`:`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${o}, \xE0m\u1ECD\u0300 a r\xED ${a}`}case"invalid_value":return n.values.length===1?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${S(n.values[0])}`:`\xC0\u1E63\xE0y\xE0n a\u1E63\xEC\u1E63e: yan \u1ECD\u0300kan l\xE1ra ${v(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${n.origin??"iye"} ${s.verb} ${o}${n.maximum} ${s.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?">=":">",s=e(n.origin);return s?`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${n.origin} ${s.verb} ${o}${n.minimum} ${s.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: ${v(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"}}};function fv(){return{localeError:nT()}}var mv,zd=Symbol("ZodOutput"),Nd=Symbol("ZodInput"),Ko=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...r){let i=r[0];return this._map.set(e,i),i&&typeof i=="object"&&"id"in i&&this._idmap.set(i.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let r=this._map.get(e);return r&&typeof r=="object"&&"id"in r&&this._idmap.delete(r.id),this._map.delete(e),this}get(e){let r=e._zod.parent;if(r){let i={...this.get(r)??{}};delete i.id;let n={...i,...this._map.get(e)};return Object.keys(n).length?n:void 0}return this._map.get(e)}has(e){return this._map.has(e)}};function Jo(){return new Ko}(mv=globalThis).__zod_globalRegistry??(mv.__zod_globalRegistry=Jo());var pe=globalThis.__zod_globalRegistry;function Cd(t,e){return new t({type:"string",...T(e)})}function Dd(t,e){return new t({type:"string",coerce:!0,...T(e)})}function Wo(t,e){return new t({type:"string",format:"email",check:"string_format",abort:!1,...T(e)})}function Yr(t,e){return new t({type:"string",format:"guid",check:"string_format",abort:!1,...T(e)})}function Yo(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,...T(e)})}function Ho(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...T(e)})}function Xo(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...T(e)})}function Qo(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...T(e)})}function Hr(t,e){return new t({type:"string",format:"url",check:"string_format",abort:!1,...T(e)})}function es(t,e){return new t({type:"string",format:"emoji",check:"string_format",abort:!1,...T(e)})}function ts(t,e){return new t({type:"string",format:"nanoid",check:"string_format",abort:!1,...T(e)})}function ns(t,e){return new t({type:"string",format:"cuid",check:"string_format",abort:!1,...T(e)})}function rs(t,e){return new t({type:"string",format:"cuid2",check:"string_format",abort:!1,...T(e)})}function is(t,e){return new t({type:"string",format:"ulid",check:"string_format",abort:!1,...T(e)})}function os(t,e){return new t({type:"string",format:"xid",check:"string_format",abort:!1,...T(e)})}function ss(t,e){return new t({type:"string",format:"ksuid",check:"string_format",abort:!1,...T(e)})}function as(t,e){return new t({type:"string",format:"ipv4",check:"string_format",abort:!1,...T(e)})}function cs(t,e){return new t({type:"string",format:"ipv6",check:"string_format",abort:!1,...T(e)})}function jd(t,e){return new t({type:"string",format:"mac",check:"string_format",abort:!1,...T(e)})}function ls(t,e){return new t({type:"string",format:"cidrv4",check:"string_format",abort:!1,...T(e)})}function us(t,e){return new t({type:"string",format:"cidrv6",check:"string_format",abort:!1,...T(e)})}function ds(t,e){return new t({type:"string",format:"base64",check:"string_format",abort:!1,...T(e)})}function ps(t,e){return new t({type:"string",format:"base64url",check:"string_format",abort:!1,...T(e)})}function fs(t,e){return new t({type:"string",format:"e164",check:"string_format",abort:!1,...T(e)})}function ms(t,e){return new t({type:"string",format:"jwt",check:"string_format",abort:!1,...T(e)})}var Rd={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function Ud(t,e){return new t({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...T(e)})}function Ld(t,e){return new t({type:"string",format:"date",check:"string_format",...T(e)})}function Md(t,e){return new t({type:"string",format:"time",check:"string_format",precision:null,...T(e)})}function Fd(t,e){return new t({type:"string",format:"duration",check:"string_format",...T(e)})}function Zd(t,e){return new t({type:"number",checks:[],...T(e)})}function qd(t,e){return new t({type:"number",coerce:!0,checks:[],...T(e)})}function Bd(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"safeint",...T(e)})}function Vd(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"float32",...T(e)})}function Gd(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"float64",...T(e)})}function Kd(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"int32",...T(e)})}function Jd(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"uint32",...T(e)})}function Wd(t,e){return new t({type:"boolean",...T(e)})}function Yd(t,e){return new t({type:"boolean",coerce:!0,...T(e)})}function Hd(t,e){return new t({type:"bigint",...T(e)})}function Xd(t,e){return new t({type:"bigint",coerce:!0,...T(e)})}function Qd(t,e){return new t({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...T(e)})}function ep(t,e){return new t({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...T(e)})}function tp(t,e){return new t({type:"symbol",...T(e)})}function np(t,e){return new t({type:"undefined",...T(e)})}function rp(t,e){return new t({type:"null",...T(e)})}function ip(t){return new t({type:"any"})}function op(t){return new t({type:"unknown"})}function sp(t,e){return new t({type:"never",...T(e)})}function ap(t,e){return new t({type:"void",...T(e)})}function cp(t,e){return new t({type:"date",...T(e)})}function lp(t,e){return new t({type:"date",coerce:!0,...T(e)})}function up(t,e){return new t({type:"nan",...T(e)})}function Ge(t,e){return new No({check:"less_than",...T(e),value:t,inclusive:!1})}function Oe(t,e){return new No({check:"less_than",...T(e),value:t,inclusive:!0})}function Ke(t,e){return new Co({check:"greater_than",...T(e),value:t,inclusive:!1})}function ye(t,e){return new Co({check:"greater_than",...T(e),value:t,inclusive:!0})}function gs(t){return Ke(0,t)}function hs(t){return Ge(0,t)}function ys(t){return Oe(0,t)}function _s(t){return ye(0,t)}function St(t,e){return new ru({check:"multiple_of",...T(e),value:t})}function xt(t,e){return new su({check:"max_size",...T(e),maximum:t})}function Je(t,e){return new au({check:"min_size",...T(e),minimum:t})}function Bt(t,e){return new cu({check:"size_equals",...T(e),size:t})}function Vt(t,e){return new lu({check:"max_length",...T(e),maximum:t})}function rt(t,e){return new uu({check:"min_length",...T(e),minimum:t})}function Gt(t,e){return new du({check:"length_equals",...T(e),length:t})}function wn(t,e){return new pu({check:"string_format",format:"regex",...T(e),pattern:t})}function $n(t){return new fu({check:"string_format",format:"lowercase",...T(t)})}function kn(t){return new mu({check:"string_format",format:"uppercase",...T(t)})}function Sn(t,e){return new gu({check:"string_format",format:"includes",...T(e),includes:t})}function xn(t,e){return new hu({check:"string_format",format:"starts_with",...T(e),prefix:t})}function In(t,e){return new yu({check:"string_format",format:"ends_with",...T(e),suffix:t})}function vs(t,e,r){return new _u({check:"property",property:t,schema:e,...T(r)})}function On(t,e){return new vu({check:"mime_type",mime:t,...T(e)})}function Me(t){return new bu({check:"overwrite",tx:t})}function Pn(t){return Me(e=>e.normalize(t))}function Tn(){return Me(t=>t.trim())}function An(){return Me(t=>t.toLowerCase())}function En(){return Me(t=>t.toUpperCase())}function zn(){return Me(t=>_l(t))}function dp(t,e,r){return new t({type:"array",element:e,...T(r)})}function iT(t,e,r){return new t({type:"union",options:e,...T(r)})}function oT(t,e,r){return new t({type:"union",options:e,inclusive:!1,...T(r)})}function sT(t,e,r,i){return new t({type:"union",options:r,discriminator:e,...T(i)})}function aT(t,e,r){return new t({type:"intersection",left:e,right:r})}function cT(t,e,r,i){let n=r instanceof R,o=n?i:r,s=n?r:null;return new t({type:"tuple",items:e,rest:s,...T(o)})}function lT(t,e,r,i){return new t({type:"record",keyType:e,valueType:r,...T(i)})}function uT(t,e,r,i){return new t({type:"map",keyType:e,valueType:r,...T(i)})}function dT(t,e,r){return new t({type:"set",valueType:e,...T(r)})}function pT(t,e,r){let i=Array.isArray(e)?Object.fromEntries(e.map(n=>[n,n])):e;return new t({type:"enum",entries:i,...T(r)})}function fT(t,e,r){return new t({type:"enum",entries:e,...T(r)})}function mT(t,e,r){return new t({type:"literal",values:Array.isArray(e)?e:[e],...T(r)})}function pp(t,e){return new t({type:"file",...T(e)})}function gT(t,e){return new t({type:"transform",transform:e})}function hT(t,e){return new t({type:"optional",innerType:e})}function yT(t,e){return new t({type:"nullable",innerType:e})}function _T(t,e,r){return new t({type:"default",innerType:e,get defaultValue(){return typeof r=="function"?r():bl(r)}})}function vT(t,e,r){return new t({type:"nonoptional",innerType:e,...T(r)})}function bT(t,e){return new t({type:"success",innerType:e})}function wT(t,e,r){return new t({type:"catch",innerType:e,catchValue:typeof r=="function"?r:()=>r})}function $T(t,e,r){return new t({type:"pipe",in:e,out:r})}function kT(t,e){return new t({type:"readonly",innerType:e})}function ST(t,e,r){return new t({type:"template_literal",parts:e,...T(r)})}function xT(t,e){return new t({type:"lazy",getter:e})}function IT(t,e){return new t({type:"promise",innerType:e})}function fp(t,e,r){let i=T(r);return i.abort??(i.abort=!0),new t({type:"custom",check:"custom",fn:e,...i})}function mp(t,e,r){return new t({type:"custom",check:"custom",fn:e,...T(r)})}function gp(t){let e=gv(r=>(r.addIssue=i=>{if(typeof i=="string")r.issues.push(mn(i,r.value,e._zod.def));else{let n=i;n.fatal&&(n.continue=!1),n.code??(n.code="custom"),n.input??(n.input=r.value),n.inst??(n.inst=e),n.continue??(n.continue=!e._zod.def.abort),r.issues.push(mn(n))}},t(r.value,r)));return e}function gv(t,e){let r=new Y({check:"custom",...T(e)});return r._zod.check=t,r}function hp(t){let e=new Y({check:"describe"});return e._zod.onattach=[r=>{let i=pe.get(r)??{};pe.add(r,{...i,description:t})}],e._zod.check=()=>{},e}function yp(t){let e=new Y({check:"meta"});return e._zod.onattach=[r=>{let i=pe.get(r)??{};pe.add(r,{...i,...t})}],e._zod.check=()=>{},e}function _p(t,e){let r=T(e),i=r.truthy??["true","1","yes","on","y","enabled"],n=r.falsy??["false","0","no","off","n","disabled"];r.case!=="sensitive"&&(i=i.map(f=>typeof f=="string"?f.toLowerCase():f),n=n.map(f=>typeof f=="string"?f.toLowerCase():f));let o=new Set(i),s=new Set(n),a=t.Codec??Kr,c=t.Boolean??Vr,l=t.String??qt,u=new l({type:"string",error:r.error}),d=new c({type:"boolean",error:r.error}),p=new a({type:"pipe",in:u,out:d,transform:(f,m)=>{let g=f;return r.case!=="sensitive"&&(g=g.toLowerCase()),o.has(g)?!0:s.has(g)?!1:(m.issues.push({code:"invalid_value",expected:"stringbool",values:[...o,...s],input:m.value,inst:p,continue:!1}),{})},reverseTransform:(f,m)=>f===!0?i[0]||"true":n[0]||"false",error:r.error});return p}function Nn(t,e,r,i={}){let n=T(i),o={...T(i),check:"string_format",type:"string",format:e,fn:typeof r=="function"?r:a=>r.test(a),...n};return r instanceof RegExp&&(o.pattern=r),new t(o)}function It(t){let e=t?.target??"draft-2020-12";return e==="draft-4"&&(e="draft-04"),e==="draft-7"&&(e="draft-07"),{processors:t.processors??{},metadataRegistry:t?.metadata??pe,target:e,unrepresentable:t?.unrepresentable??"throw",override:t?.override??(()=>{}),io:t?.io??"output",counter:0,seen:new Map,cycles:t?.cycles??"ref",reused:t?.reused??"inline",external:t?.external??void 0}}function V(t,e,r={path:[],schemaPath:[]}){var i;let n=t._zod.def,o=e.seen.get(t);if(o)return o.count++,r.schemaPath.includes(t)&&(o.cycle=r.path),o.schema;let s={schema:{},count:1,cycle:void 0,path:r.path};e.seen.set(t,s);let a=t._zod.toJSONSchema?.();if(a)s.schema=a;else{let u={...r,schemaPath:[...r.schemaPath,t],path:r.path};if(t._zod.processJSONSchema)t._zod.processJSONSchema(e,s.schema,u);else{let p=s.schema,f=e.processors[n.type];if(!f)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${n.type}`);f(t,e,p,u)}let d=t._zod.parent;d&&(s.ref||(s.ref=d),V(d,e,u),e.seen.get(d).isParent=!0)}let c=e.metadataRegistry.get(t);return c&&Object.assign(s.schema,c),e.io==="input"&&_e(t)&&(delete s.schema.examples,delete s.schema.default),e.io==="input"&&s.schema._prefault&&((i=s.schema).default??(i.default=s.schema._prefault)),delete s.schema._prefault,e.seen.get(t).schema}function Ot(t,e){let r=t.seen.get(e);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");let i=new Map;for(let s of t.seen.entries()){let a=t.metadataRegistry.get(s[0])?.id;if(a){let c=i.get(a);if(c&&c!==s[0])throw new Error(`Duplicate schema id "${a}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);i.set(a,s[0])}}let n=s=>{let a=t.target==="draft-2020-12"?"$defs":"definitions";if(t.external){let d=t.external.registry.get(s[0])?.id,p=t.external.uri??(m=>m);if(d)return{ref:p(d)};let f=s[1].defId??s[1].schema.id??`schema${t.counter++}`;return s[1].defId=f,{defId:f,ref:`${p("__shared")}#/${a}/${f}`}}if(s[1]===r)return{ref:"#"};let l=`#/${a}/`,u=s[1].schema.id??`__schema${t.counter++}`;return{defId:u,ref:l+u}},o=s=>{if(s[1].schema.$ref)return;let a=s[1],{ref:c,defId:l}=n(s);a.def={...a.schema},l&&(a.defId=l);let u=a.schema;for(let d in u)delete u[d];u.$ref=c};if(t.cycles==="throw")for(let s of t.seen.entries()){let a=s[1];if(a.cycle)throw new Error(`Cycle detected: #/${a.cycle?.join("/")}/<root>
209
+ `)}f.write("payload.value = newResult;"),f.write("return payload;");let z=f.compile();return(b,$)=>z(p,b,$)},o,s=Zt,a=!Cr.jitless,l=a&&xl.value,d=e.catchall,u;t._zod.parse=(p,f)=>{u??(u=i.value);let m=p.value;return s(m)?a&&l&&f?.async===!1&&f.jitless!==!0?(o||(o=n(e.shape)),p=o(p,f),d?S_([],m,p,f,u,t):p):r(p,f):(p.issues.push({expected:"object",code:"invalid_type",input:m,inst:t}),p)}});function d_(t,e,r,i){for(let o of t)if(o.issues.length===0)return e.value=o.value,e;let n=t.filter(o=>!$t(o));return n.length===1?(e.value=n[0].value,n[0]):(e.issues.push({code:"invalid_union",input:e.value,inst:r,errors:t.map(o=>o.issues.map(s=>$e(s,i,ae())))}),e)}var Kr=_("$ZodUnion",(t,e)=>{R.init(t,e),L(t._zod,"optin",()=>e.options.some(n=>n._zod.optin==="optional")?"optional":void 0),L(t._zod,"optout",()=>e.options.some(n=>n._zod.optout==="optional")?"optional":void 0),L(t._zod,"values",()=>{if(e.options.every(n=>n._zod.values))return new Set(e.options.flatMap(n=>Array.from(n._zod.values)))}),L(t._zod,"pattern",()=>{if(e.options.every(n=>n._zod.pattern)){let n=e.options.map(o=>o._zod.pattern);return new RegExp(`^(${n.map(o=>Rr(o.source)).join("|")})$`)}});let r=e.options.length===1,i=e.options[0]._zod.run;t._zod.parse=(n,o)=>{if(r)return i(n,o);let s=!1,a=[];for(let c of e.options){let l=c._zod.run({value:n.value,issues:[]},o);if(l instanceof Promise)a.push(l),s=!0;else{if(l.issues.length===0)return l;a.push(l)}}return s?Promise.all(a).then(c=>d_(c,n,t,o)):d_(a,n,t,o)}});function p_(t,e,r,i){let n=t.filter(o=>o.issues.length===0);return n.length===1?(e.value=n[0].value,e):(n.length===0?e.issues.push({code:"invalid_union",input:e.value,inst:r,errors:t.map(o=>o.issues.map(s=>$e(s,i,ae())))}):e.issues.push({code:"invalid_union",input:e.value,inst:r,errors:[],inclusive:!1}),e)}var fd=_("$ZodXor",(t,e)=>{Kr.init(t,e),e.inclusive=!1;let r=e.options.length===1,i=e.options[0]._zod.run;t._zod.parse=(n,o)=>{if(r)return i(n,o);let s=!1,a=[];for(let c of e.options){let l=c._zod.run({value:n.value,issues:[]},o);l instanceof Promise?(a.push(l),s=!0):a.push(l)}return s?Promise.all(a).then(c=>p_(c,n,t,o)):p_(a,n,t,o)}}),md=_("$ZodDiscriminatedUnion",(t,e)=>{e.inclusive=!1,Kr.init(t,e);let r=t._zod.parse;L(t._zod,"propValues",()=>{let n={};for(let o of e.options){let s=o._zod.propValues;if(!s||Object.keys(s).length===0)throw new Error(`Invalid discriminated union option at index "${e.options.indexOf(o)}"`);for(let[a,c]of Object.entries(s)){n[a]||(n[a]=new Set);for(let l of c)n[a].add(l)}}return n});let i=fn(()=>{let n=e.options,o=new Map;for(let s of n){let a=s._zod.propValues?.[e.discriminator];if(!a||a.size===0)throw new Error(`Invalid discriminated union option at index "${e.options.indexOf(s)}"`);for(let c of a){if(o.has(c))throw new Error(`Duplicate discriminator value "${String(c)}"`);o.set(c,s)}}return o});t._zod.parse=(n,o)=>{let s=n.value;if(!Zt(s))return n.issues.push({code:"invalid_type",expected:"object",input:s,inst:t}),n;let a=i.value.get(s?.[e.discriminator]);return a?a._zod.run(n,o):e.unionFallback?r(n,o):(n.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:e.discriminator,input:s,path:[e.discriminator],inst:t}),n)}}),gd=_("$ZodIntersection",(t,e)=>{R.init(t,e),t._zod.parse=(r,i)=>{let n=r.value,o=e.left._zod.run({value:n,issues:[]},i),s=e.right._zod.run({value:n,issues:[]},i);return o instanceof Promise||s instanceof Promise?Promise.all([o,s]).then(([c,l])=>f_(r,c,l)):f_(r,o,s)}});function Pu(t,e){if(t===e)return{valid:!0,data:t};if(t instanceof Date&&e instanceof Date&&+t==+e)return{valid:!0,data:t};if(wt(t)&&wt(e)){let r=Object.keys(e),i=Object.keys(t).filter(o=>r.indexOf(o)!==-1),n={...t,...e};for(let o of i){let s=Pu(t[o],e[o]);if(!s.valid)return{valid:!1,mergeErrorPath:[o,...s.mergeErrorPath]};n[o]=s.data}return{valid:!0,data:n}}if(Array.isArray(t)&&Array.isArray(e)){if(t.length!==e.length)return{valid:!1,mergeErrorPath:[]};let r=[];for(let i=0;i<t.length;i++){let n=t[i],o=e[i],s=Pu(n,o);if(!s.valid)return{valid:!1,mergeErrorPath:[i,...s.mergeErrorPath]};r.push(s.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}function f_(t,e,r){let i=new Map,n;for(let a of e.issues)if(a.code==="unrecognized_keys"){n??(n=a);for(let c of a.keys)i.has(c)||i.set(c,{}),i.get(c).l=!0}else t.issues.push(a);for(let a of r.issues)if(a.code==="unrecognized_keys")for(let c of a.keys)i.has(c)||i.set(c,{}),i.get(c).r=!0;else t.issues.push(a);let o=[...i].filter(([,a])=>a.l&&a.r).map(([a])=>a);if(o.length&&n&&t.issues.push({...n,keys:o}),$t(t))return t;let s=Pu(e.value,r.value);if(!s.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(s.mergeErrorPath)}`);return t.value=s.data,t}var Vo=_("$ZodTuple",(t,e)=>{R.init(t,e);let r=e.items;t._zod.parse=(i,n)=>{let o=i.value;if(!Array.isArray(o))return i.issues.push({input:o,inst:t,expected:"tuple",code:"invalid_type"}),i;i.value=[];let s=[],a=[...r].reverse().findIndex(d=>d._zod.optin!=="optional"),c=a===-1?0:r.length-a;if(!e.rest){let d=o.length>r.length,u=o.length<c-1;if(d||u)return i.issues.push({...d?{code:"too_big",maximum:r.length,inclusive:!0}:{code:"too_small",minimum:r.length},input:o,inst:t,origin:"array"}),i}let l=-1;for(let d of r){if(l++,l>=o.length&&l>=c)continue;let u=d._zod.run({value:o[l],issues:[]},n);u instanceof Promise?s.push(u.then(p=>Uo(p,i,l))):Uo(u,i,l)}if(e.rest){let d=o.slice(r.length);for(let u of d){l++;let p=e.rest._zod.run({value:u,issues:[]},n);p instanceof Promise?s.push(p.then(f=>Uo(f,i,l))):Uo(p,i,l)}}return s.length?Promise.all(s).then(()=>i):i}});function Uo(t,e,r){t.issues.length&&e.issues.push(...xe(r,t.issues)),e.value[r]=t.value}var hd=_("$ZodRecord",(t,e)=>{R.init(t,e),t._zod.parse=(r,i)=>{let n=r.value;if(!wt(n))return r.issues.push({expected:"record",code:"invalid_type",input:n,inst:t}),r;let o=[],s=e.keyType._zod.values;if(s){r.value={};let a=new Set;for(let l of s)if(typeof l=="string"||typeof l=="number"||typeof l=="symbol"){a.add(typeof l=="number"?l.toString():l);let d=e.valueType._zod.run({value:n[l],issues:[]},i);d instanceof Promise?o.push(d.then(u=>{u.issues.length&&r.issues.push(...xe(l,u.issues)),r.value[l]=u.value})):(d.issues.length&&r.issues.push(...xe(l,d.issues)),r.value[l]=d.value)}let c;for(let l in n)a.has(l)||(c=c??[],c.push(l));c&&c.length>0&&r.issues.push({code:"unrecognized_keys",input:n,inst:t,keys:c})}else{r.value={};for(let a of Reflect.ownKeys(n)){if(a==="__proto__")continue;let c=e.keyType._zod.run({value:a,issues:[]},i);if(c instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof a=="string"&&Do.test(a)&&c.issues.length){let u=e.keyType._zod.run({value:Number(a),issues:[]},i);if(u instanceof Promise)throw new Error("Async schemas not supported in object keys currently");u.issues.length===0&&(c=u)}if(c.issues.length){e.mode==="loose"?r.value[a]=n[a]:r.issues.push({code:"invalid_key",origin:"record",issues:c.issues.map(u=>$e(u,i,ae())),input:a,path:[a],inst:t});continue}let d=e.valueType._zod.run({value:n[a],issues:[]},i);d instanceof Promise?o.push(d.then(u=>{u.issues.length&&r.issues.push(...xe(a,u.issues)),r.value[c.value]=u.value})):(d.issues.length&&r.issues.push(...xe(a,d.issues)),r.value[c.value]=d.value)}}return o.length?Promise.all(o).then(()=>r):r}}),yd=_("$ZodMap",(t,e)=>{R.init(t,e),t._zod.parse=(r,i)=>{let n=r.value;if(!(n instanceof Map))return r.issues.push({expected:"map",code:"invalid_type",input:n,inst:t}),r;let o=[];r.value=new Map;for(let[s,a]of n){let c=e.keyType._zod.run({value:s,issues:[]},i),l=e.valueType._zod.run({value:a,issues:[]},i);c instanceof Promise||l instanceof Promise?o.push(Promise.all([c,l]).then(([d,u])=>{m_(d,u,r,s,n,t,i)})):m_(c,l,r,s,n,t,i)}return o.length?Promise.all(o).then(()=>r):r}});function m_(t,e,r,i,n,o,s){t.issues.length&&(Ur.has(typeof i)?r.issues.push(...xe(i,t.issues)):r.issues.push({code:"invalid_key",origin:"map",input:n,inst:o,issues:t.issues.map(a=>$e(a,s,ae()))})),e.issues.length&&(Ur.has(typeof i)?r.issues.push(...xe(i,e.issues)):r.issues.push({origin:"map",code:"invalid_element",input:n,inst:o,key:i,issues:e.issues.map(a=>$e(a,s,ae()))})),r.value.set(t.value,e.value)}var _d=_("$ZodSet",(t,e)=>{R.init(t,e),t._zod.parse=(r,i)=>{let n=r.value;if(!(n instanceof Set))return r.issues.push({input:n,inst:t,expected:"set",code:"invalid_type"}),r;let o=[];r.value=new Set;for(let s of n){let a=e.valueType._zod.run({value:s,issues:[]},i);a instanceof Promise?o.push(a.then(c=>g_(c,r))):g_(a,r)}return o.length?Promise.all(o).then(()=>r):r}});function g_(t,e){t.issues.length&&e.issues.push(...t.issues),e.value.add(t.value)}var vd=_("$ZodEnum",(t,e)=>{R.init(t,e);let r=jr(e.entries),i=new Set(r);t._zod.values=i,t._zod.pattern=new RegExp(`^(${r.filter(n=>Ur.has(typeof n)).map(n=>typeof n=="string"?Ae(n):n.toString()).join("|")})$`),t._zod.parse=(n,o)=>{let s=n.value;return i.has(s)||n.issues.push({code:"invalid_value",values:r,input:s,inst:t}),n}}),bd=_("$ZodLiteral",(t,e)=>{if(R.init(t,e),e.values.length===0)throw new Error("Cannot create literal schema with no valid values");let r=new Set(e.values);t._zod.values=r,t._zod.pattern=new RegExp(`^(${e.values.map(i=>typeof i=="string"?Ae(i):i?Ae(i.toString()):String(i)).join("|")})$`),t._zod.parse=(i,n)=>{let o=i.value;return r.has(o)||i.issues.push({code:"invalid_value",values:e.values,input:o,inst:t}),i}}),wd=_("$ZodFile",(t,e)=>{R.init(t,e),t._zod.parse=(r,i)=>{let n=r.value;return n instanceof File||r.issues.push({expected:"file",code:"invalid_type",input:n,inst:t}),r}}),$d=_("$ZodTransform",(t,e)=>{R.init(t,e),t._zod.parse=(r,i)=>{if(i.direction==="backward")throw new _t(t.constructor.name);let n=e.transform(r.value,r);if(i.async)return(n instanceof Promise?n:Promise.resolve(n)).then(s=>(r.value=s,r));if(n instanceof Promise)throw new Me;return r.value=n,r}});function h_(t,e){return t.issues.length&&e===void 0?{issues:[],value:void 0}:t}var Go=_("$ZodOptional",(t,e)=>{R.init(t,e),t._zod.optin="optional",t._zod.optout="optional",L(t._zod,"values",()=>e.innerType._zod.values?new Set([...e.innerType._zod.values,void 0]):void 0),L(t._zod,"pattern",()=>{let r=e.innerType._zod.pattern;return r?new RegExp(`^(${Rr(r.source)})?$`):void 0}),t._zod.parse=(r,i)=>{if(e.innerType._zod.optin==="optional"){let n=e.innerType._zod.run(r,i);return n instanceof Promise?n.then(o=>h_(o,r.value)):h_(n,r.value)}return r.value===void 0?r:e.innerType._zod.run(r,i)}}),kd=_("$ZodExactOptional",(t,e)=>{Go.init(t,e),L(t._zod,"values",()=>e.innerType._zod.values),L(t._zod,"pattern",()=>e.innerType._zod.pattern),t._zod.parse=(r,i)=>e.innerType._zod.run(r,i)}),Sd=_("$ZodNullable",(t,e)=>{R.init(t,e),L(t._zod,"optin",()=>e.innerType._zod.optin),L(t._zod,"optout",()=>e.innerType._zod.optout),L(t._zod,"pattern",()=>{let r=e.innerType._zod.pattern;return r?new RegExp(`^(${Rr(r.source)}|null)$`):void 0}),L(t._zod,"values",()=>e.innerType._zod.values?new Set([...e.innerType._zod.values,null]):void 0),t._zod.parse=(r,i)=>r.value===null?r:e.innerType._zod.run(r,i)}),xd=_("$ZodDefault",(t,e)=>{R.init(t,e),t._zod.optin="optional",L(t._zod,"values",()=>e.innerType._zod.values),t._zod.parse=(r,i)=>{if(i.direction==="backward")return e.innerType._zod.run(r,i);if(r.value===void 0)return r.value=e.defaultValue,r;let n=e.innerType._zod.run(r,i);return n instanceof Promise?n.then(o=>y_(o,e)):y_(n,e)}});function y_(t,e){return t.value===void 0&&(t.value=e.defaultValue),t}var Id=_("$ZodPrefault",(t,e)=>{R.init(t,e),t._zod.optin="optional",L(t._zod,"values",()=>e.innerType._zod.values),t._zod.parse=(r,i)=>(i.direction==="backward"||r.value===void 0&&(r.value=e.defaultValue),e.innerType._zod.run(r,i))}),Od=_("$ZodNonOptional",(t,e)=>{R.init(t,e),L(t._zod,"values",()=>{let r=e.innerType._zod.values;return r?new Set([...r].filter(i=>i!==void 0)):void 0}),t._zod.parse=(r,i)=>{let n=e.innerType._zod.run(r,i);return n instanceof Promise?n.then(o=>__(o,t)):__(n,t)}});function __(t,e){return!t.issues.length&&t.value===void 0&&t.issues.push({code:"invalid_type",expected:"nonoptional",input:t.value,inst:e}),t}var Pd=_("$ZodSuccess",(t,e)=>{R.init(t,e),t._zod.parse=(r,i)=>{if(i.direction==="backward")throw new _t("ZodSuccess");let n=e.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)}}),Td=_("$ZodCatch",(t,e)=>{R.init(t,e),L(t._zod,"optin",()=>e.innerType._zod.optin),L(t._zod,"optout",()=>e.innerType._zod.optout),L(t._zod,"values",()=>e.innerType._zod.values),t._zod.parse=(r,i)=>{if(i.direction==="backward")return e.innerType._zod.run(r,i);let n=e.innerType._zod.run(r,i);return n instanceof Promise?n.then(o=>(r.value=o.value,o.issues.length&&(r.value=e.catchValue({...r,error:{issues:o.issues.map(s=>$e(s,i,ae()))},input:r.value}),r.issues=[]),r)):(r.value=n.value,n.issues.length&&(r.value=e.catchValue({...r,error:{issues:n.issues.map(o=>$e(o,i,ae()))},input:r.value}),r.issues=[]),r)}}),Ad=_("$ZodNaN",(t,e)=>{R.init(t,e),t._zod.parse=(r,i)=>((typeof r.value!="number"||!Number.isNaN(r.value))&&r.issues.push({input:r.value,inst:t,expected:"nan",code:"invalid_type"}),r)}),Ed=_("$ZodPipe",(t,e)=>{R.init(t,e),L(t._zod,"values",()=>e.in._zod.values),L(t._zod,"optin",()=>e.in._zod.optin),L(t._zod,"optout",()=>e.out._zod.optout),L(t._zod,"propValues",()=>e.in._zod.propValues),t._zod.parse=(r,i)=>{if(i.direction==="backward"){let o=e.out._zod.run(r,i);return o instanceof Promise?o.then(s=>Lo(s,e.in,i)):Lo(o,e.in,i)}let n=e.in._zod.run(r,i);return n instanceof Promise?n.then(o=>Lo(o,e.out,i)):Lo(n,e.out,i)}});function Lo(t,e,r){return t.issues.length?(t.aborted=!0,t):e._zod.run({value:t.value,issues:t.issues},r)}var Wr=_("$ZodCodec",(t,e)=>{R.init(t,e),L(t._zod,"values",()=>e.in._zod.values),L(t._zod,"optin",()=>e.in._zod.optin),L(t._zod,"optout",()=>e.out._zod.optout),L(t._zod,"propValues",()=>e.in._zod.propValues),t._zod.parse=(r,i)=>{if((i.direction||"forward")==="forward"){let o=e.in._zod.run(r,i);return o instanceof Promise?o.then(s=>Mo(s,e,i)):Mo(o,e,i)}else{let o=e.out._zod.run(r,i);return o instanceof Promise?o.then(s=>Mo(s,e,i)):Mo(o,e,i)}}});function Mo(t,e,r){if(t.issues.length)return t.aborted=!0,t;if((r.direction||"forward")==="forward"){let n=e.transform(t.value,t);return n instanceof Promise?n.then(o=>qo(t,o,e.out,r)):qo(t,n,e.out,r)}else{let n=e.reverseTransform(t.value,t);return n instanceof Promise?n.then(o=>qo(t,o,e.in,r)):qo(t,n,e.in,r)}}function qo(t,e,r,i){return t.issues.length?(t.aborted=!0,t):r._zod.run({value:e,issues:t.issues},i)}var zd=_("$ZodReadonly",(t,e)=>{R.init(t,e),L(t._zod,"propValues",()=>e.innerType._zod.propValues),L(t._zod,"values",()=>e.innerType._zod.values),L(t._zod,"optin",()=>e.innerType?._zod?.optin),L(t._zod,"optout",()=>e.innerType?._zod?.optout),t._zod.parse=(r,i)=>{if(i.direction==="backward")return e.innerType._zod.run(r,i);let n=e.innerType._zod.run(r,i);return n instanceof Promise?n.then(v_):v_(n)}});function v_(t){return t.value=Object.freeze(t.value),t}var Nd=_("$ZodTemplateLiteral",(t,e)=>{R.init(t,e);let r=[];for(let i of e.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,s=n.endsWith("$")?n.length-1:n.length;r.push(n.slice(o,s))}else if(i===null||Ol.has(typeof i))r.push(Ae(`${i}`));else throw new Error(`Invalid template literal part: ${i}`);t._zod.pattern=new RegExp(`^${r.join("")}$`),t._zod.parse=(i,n)=>typeof i.value!="string"?(i.issues.push({input:i.value,inst:t,expected:"string",code:"invalid_type"}),i):(t._zod.pattern.lastIndex=0,t._zod.pattern.test(i.value)||i.issues.push({input:i.value,inst:t,code:"invalid_format",format:e.format??"template_literal",pattern:t._zod.pattern.source}),i)}),Cd=_("$ZodFunction",(t,e)=>(R.init(t,e),t._def=e,t._zod.def=e,t.implement=r=>{if(typeof r!="function")throw new Error("implement() must be called with a function");return function(...i){let n=t._def.input?So(t._def.input,i):i,o=Reflect.apply(r,this,n);return t._def.output?So(t._def.output,o):o}},t.implementAsync=r=>{if(typeof r!="function")throw new Error("implementAsync() must be called with a function");return async function(...i){let n=t._def.input?await xo(t._def.input,i):i,o=await Reflect.apply(r,this,n);return t._def.output?await xo(t._def.output,o):o}},t._zod.parse=(r,i)=>typeof r.value!="function"?(r.issues.push({code:"invalid_type",expected:"function",input:r.value,inst:t}),r):(t._def.output&&t._def.output._zod.def.type==="promise"?r.value=t.implementAsync(r.value):r.value=t.implement(r.value),r),t.input=(...r)=>{let i=t.constructor;return Array.isArray(r[0])?new i({type:"function",input:new Vo({type:"tuple",items:r[0],rest:r[1]}),output:t._def.output}):new i({type:"function",input:r[0],output:t._def.output})},t.output=r=>{let i=t.constructor;return new i({type:"function",input:t._def.input,output:r})},t)),Dd=_("$ZodPromise",(t,e)=>{R.init(t,e),t._zod.parse=(r,i)=>Promise.resolve(r.value).then(n=>e.innerType._zod.run({value:n,issues:[]},i))}),jd=_("$ZodLazy",(t,e)=>{R.init(t,e),L(t._zod,"innerType",()=>e.getter()),L(t._zod,"pattern",()=>t._zod.innerType?._zod?.pattern),L(t._zod,"propValues",()=>t._zod.innerType?._zod?.propValues),L(t._zod,"optin",()=>t._zod.innerType?._zod?.optin??void 0),L(t._zod,"optout",()=>t._zod.innerType?._zod?.optout??void 0),t._zod.parse=(r,i)=>t._zod.innerType._zod.run(r,i)}),Rd=_("$ZodCustom",(t,e)=>{X.init(t,e),R.init(t,e),t._zod.parse=(r,i)=>r,t._zod.check=r=>{let i=r.value,n=e.fn(i);if(n instanceof Promise)return n.then(o=>b_(o,r,i,t));b_(n,r,i,t)}});function b_(t,e,r,i){if(!t){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),e.issues.push(mn(n))}}var Hr={};Xe(Hr,{ar:()=>I_,az:()=>O_,be:()=>T_,bg:()=>A_,ca:()=>E_,cs:()=>z_,da:()=>N_,de:()=>C_,en:()=>Jo,eo:()=>D_,es:()=>j_,fa:()=>R_,fi:()=>U_,fr:()=>L_,frCA:()=>M_,he:()=>q_,hu:()=>Z_,hy:()=>B_,id:()=>V_,is:()=>G_,it:()=>J_,ja:()=>K_,ka:()=>W_,kh:()=>Y_,km:()=>Ko,ko:()=>H_,lt:()=>Q_,mk:()=>ev,ms:()=>tv,nl:()=>nv,no:()=>rv,ota:()=>iv,pl:()=>sv,ps:()=>ov,pt:()=>av,ru:()=>lv,sl:()=>uv,sv:()=>dv,ta:()=>pv,th:()=>fv,tr:()=>mv,ua:()=>gv,uk:()=>Wo,ur:()=>hv,uz:()=>yv,vi:()=>_v,yo:()=>wv,zhCN:()=>vv,zhTW:()=>bv});var bP=()=>{let t={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 e(n){return t[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,s=O(n.input),a=i[s]??s;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 ${a}`:`\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 ${a}`}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 ${x(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: ${v(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?` \u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${n.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${o} ${n.maximum.toString()} ${s.unit??"\u0639\u0646\u0635\u0631"}`:`\u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${n.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${o} ${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=e(n.origin);return s?`\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()} ${s.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":""}: ${v(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 I_(){return{localeError:bP()}}var wP=()=>{let t={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 e(n){return t[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,s=O(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n instanceof ${n.expected}, daxil olan ${a}`:`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${o}, daxil olan ${a}`}case"invalid_value":return n.values.length===1?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${x(n.values[0])}`:`Yanl\u0131\u015F se\xE7im: a\u015Fa\u011F\u0131dak\u0131lardan biri olmal\u0131d\u0131r: ${v(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${n.origin??"d\u0259y\u0259r"} ${o}${n.maximum.toString()} ${s.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?">=":">",s=e(n.origin);return s?`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${n.origin} ${o}${n.minimum.toString()} ${s.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":""}: ${v(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 O_(){return{localeError:wP()}}function P_(t,e,r,i){let n=Math.abs(t),o=n%10,s=n%100;return s>=11&&s<=19?i:o===1?e:o>=2&&o<=4?r:i}var $P=()=>{let t={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 e(n){return t[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,s=O(n.input),a=i[s]??s;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 ${a}`:`\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 ${a}`}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 ${x(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 ${v(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);if(s){let a=Number(n.maximum),c=P_(a,s.unit.one,s.unit.few,s.unit.many);return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${n.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${s.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?">=":">",s=e(n.origin);if(s){let a=Number(n.minimum),c=P_(a,s.unit.one,s.unit.few,s.unit.many);return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${n.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${s.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"}: ${v(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 T_(){return{localeError:$P()}}var kP=()=>{let t={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 e(n){return t[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,s=O(n.input),a=i[s]??s;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 ${a}`:`\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 ${a}`}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 ${x(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 ${v(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`\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()} ${s.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430"}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${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?">=":">",s=e(n.origin);return s?`\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()} ${s.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 s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D";return o.format==="emoji"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),o.format==="datetime"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),o.format==="date"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),o.format==="time"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),o.format==="duration"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),`${s} ${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":""}: ${v(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 A_(){return{localeError:kP()}}var SP=()=>{let t={string:{unit:"car\xE0cters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"}};function e(n){return t[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,s=O(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`Tipus inv\xE0lid: s'esperava instanceof ${n.expected}, s'ha rebut ${a}`:`Tipus inv\xE0lid: s'esperava ${o}, s'ha rebut ${a}`}case"invalid_value":return n.values.length===1?`Valor inv\xE0lid: s'esperava ${x(n.values[0])}`:`Opci\xF3 inv\xE0lida: s'esperava una de ${v(n.values," o ")}`;case"too_big":{let o=n.inclusive?"com a m\xE0xim":"menys de",s=e(n.origin);return s?`Massa gran: s'esperava que ${n.origin??"el valor"} contingu\xE9s ${o} ${n.maximum.toString()} ${s.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",s=e(n.origin);return s?`Massa petit: s'esperava que ${n.origin} contingu\xE9s ${o} ${n.minimum.toString()} ${s.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":""}: ${v(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 E_(){return{localeError:SP()}}var xP=()=>{let t={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 e(n){return t[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,s=O(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no instanceof ${n.expected}, obdr\u017Eeno ${a}`:`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${o}, obdr\u017Eeno ${a}`}case"invalid_value":return n.values.length===1?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${x(n.values[0])}`:`Neplatn\xE1 mo\u017Enost: o\u010Dek\xE1v\xE1na jedna z hodnot ${v(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${n.origin??"hodnota"} mus\xED m\xEDt ${o}${n.maximum.toString()} ${s.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?">=":">",s=e(n.origin);return s?`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${n.origin??"hodnota"} mus\xED m\xEDt ${o}${n.minimum.toString()} ${s.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: ${v(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 z_(){return{localeError:xP()}}var IP=()=>{let t={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"}};function e(n){return t[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,s=O(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`Ugyldigt input: forventede instanceof ${n.expected}, fik ${a}`:`Ugyldigt input: forventede ${o}, fik ${a}`}case"invalid_value":return n.values.length===1?`Ugyldig v\xE6rdi: forventede ${x(n.values[0])}`:`Ugyldigt valg: forventede en af f\xF8lgende ${v(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin),a=i[n.origin]??n.origin;return s?`For stor: forventede ${a??"value"} ${s.verb} ${o} ${n.maximum.toString()} ${s.unit??"elementer"}`:`For stor: forventede ${a??"value"} havde ${o} ${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=e(n.origin),a=i[n.origin]??n.origin;return s?`For lille: forventede ${a} ${s.verb} ${o} ${n.minimum.toString()} ${s.unit}`:`For lille: forventede ${a} 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"}: ${v(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 N_(){return{localeError:IP()}}var OP=()=>{let t={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 e(n){return t[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,s=O(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`Ung\xFCltige Eingabe: erwartet instanceof ${n.expected}, erhalten ${a}`:`Ung\xFCltige Eingabe: erwartet ${o}, erhalten ${a}`}case"invalid_value":return n.values.length===1?`Ung\xFCltige Eingabe: erwartet ${x(n.values[0])}`:`Ung\xFCltige Option: erwartet eine von ${v(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`Zu gro\xDF: erwartet, dass ${n.origin??"Wert"} ${o}${n.maximum.toString()} ${s.unit??"Elemente"} hat`:`Zu gro\xDF: erwartet, dass ${n.origin??"Wert"} ${o}${n.maximum.toString()} ist`}case"too_small":{let o=n.inclusive?">=":">",s=e(n.origin);return s?`Zu klein: erwartet, dass ${n.origin} ${o}${n.minimum.toString()} ${s.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"}: ${v(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 C_(){return{localeError:OP()}}var PP=()=>{let t={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"},map:{unit:"entries",verb:"to have"}};function e(n){return t[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,s=O(n.input),a=i[s]??s;return`Invalid input: expected ${o}, received ${a}`}case"invalid_value":return n.values.length===1?`Invalid input: expected ${x(n.values[0])}`:`Invalid option: expected one of ${v(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`Too big: expected ${n.origin??"value"} to have ${o}${n.maximum.toString()} ${s.unit??"elements"}`:`Too big: expected ${n.origin??"value"} to be ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=e(n.origin);return s?`Too small: expected ${n.origin} to have ${o}${n.minimum.toString()} ${s.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":""}: ${v(n.keys,", ")}`;case"invalid_key":return`Invalid key in ${n.origin}`;case"invalid_union":return"Invalid input";case"invalid_element":return`Invalid value in ${n.origin}`;default:return"Invalid input"}}};function Jo(){return{localeError:PP()}}var TP=()=>{let t={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function e(n){return t[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,s=O(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`Nevalida enigo: atendi\u011Dis instanceof ${n.expected}, ricevi\u011Dis ${a}`:`Nevalida enigo: atendi\u011Dis ${o}, ricevi\u011Dis ${a}`}case"invalid_value":return n.values.length===1?`Nevalida enigo: atendi\u011Dis ${x(n.values[0])}`:`Nevalida opcio: atendi\u011Dis unu el ${v(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`Tro granda: atendi\u011Dis ke ${n.origin??"valoro"} havu ${o}${n.maximum.toString()} ${s.unit??"elementojn"}`:`Tro granda: atendi\u011Dis ke ${n.origin??"valoro"} havu ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=e(n.origin);return s?`Tro malgranda: atendi\u011Dis ke ${n.origin} havu ${o}${n.minimum.toString()} ${s.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":""}: ${v(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 D_(){return{localeError:TP()}}var AP=()=>{let t={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}};function e(n){return t[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,s=O(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`Entrada inv\xE1lida: se esperaba instanceof ${n.expected}, recibido ${a}`:`Entrada inv\xE1lida: se esperaba ${o}, recibido ${a}`}case"invalid_value":return n.values.length===1?`Entrada inv\xE1lida: se esperaba ${x(n.values[0])}`:`Opci\xF3n inv\xE1lida: se esperaba una de ${v(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin),a=i[n.origin]??n.origin;return s?`Demasiado grande: se esperaba que ${a??"valor"} tuviera ${o}${n.maximum.toString()} ${s.unit??"elementos"}`:`Demasiado grande: se esperaba que ${a??"valor"} fuera ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=e(n.origin),a=i[n.origin]??n.origin;return s?`Demasiado peque\xF1o: se esperaba que ${a} tuviera ${o}${n.minimum.toString()} ${s.unit}`:`Demasiado peque\xF1o: se esperaba que ${a} 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":""}: ${v(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 j_(){return{localeError:AP()}}var EP=()=>{let t={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 e(n){return t[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,s=O(n.input),a=i[s]??s;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 ${a} \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 ${a} \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 ${x(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 ${v(n.values,"|")} \u0645\u06CC\u200C\u0628\u0648\u062F`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${n.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${o}${n.maximum.toString()} ${s.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?">=":">",s=e(n.origin);return s?`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${n.origin} \u0628\u0627\u06CC\u062F ${o}${n.minimum.toString()} ${s.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: ${v(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 R_(){return{localeError:EP()}}var zP=()=>{let t={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 e(n){return t[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,s=O(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`Virheellinen tyyppi: odotettiin instanceof ${n.expected}, oli ${a}`:`Virheellinen tyyppi: odotettiin ${o}, oli ${a}`}case"invalid_value":return n.values.length===1?`Virheellinen sy\xF6te: t\xE4ytyy olla ${x(n.values[0])}`:`Virheellinen valinta: t\xE4ytyy olla yksi seuraavista: ${v(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`Liian suuri: ${s.subject} t\xE4ytyy olla ${o}${n.maximum.toString()} ${s.unit}`.trim():`Liian suuri: arvon t\xE4ytyy olla ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=e(n.origin);return s?`Liian pieni: ${s.subject} t\xE4ytyy olla ${o}${n.minimum.toString()} ${s.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"}: ${v(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 U_(){return{localeError:zP()}}var NP=()=>{let t={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function e(n){return t[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={nan:"NaN",number:"nombre",array:"tableau"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=O(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`Entr\xE9e invalide : instanceof ${n.expected} attendu, ${a} re\xE7u`:`Entr\xE9e invalide : ${o} attendu, ${a} re\xE7u`}case"invalid_value":return n.values.length===1?`Entr\xE9e invalide : ${x(n.values[0])} attendu`:`Option invalide : une valeur parmi ${v(n.values,"|")} attendue`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`Trop grand : ${n.origin??"valeur"} doit ${s.verb} ${o}${n.maximum.toString()} ${s.unit??"\xE9l\xE9ment(s)"}`:`Trop grand : ${n.origin??"valeur"} doit \xEAtre ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=e(n.origin);return s?`Trop petit : ${n.origin} doit ${s.verb} ${o}${n.minimum.toString()} ${s.unit}`:`Trop petit : ${n.origin} 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":""} : ${v(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 L_(){return{localeError:NP()}}var CP=()=>{let t={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function e(n){return t[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,s=O(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`Entr\xE9e invalide : attendu instanceof ${n.expected}, re\xE7u ${a}`:`Entr\xE9e invalide : attendu ${o}, re\xE7u ${a}`}case"invalid_value":return n.values.length===1?`Entr\xE9e invalide : attendu ${x(n.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${v(n.values,"|")}`;case"too_big":{let o=n.inclusive?"\u2264":"<",s=e(n.origin);return s?`Trop grand : attendu que ${n.origin??"la valeur"} ait ${o}${n.maximum.toString()} ${s.unit}`:`Trop grand : attendu que ${n.origin??"la valeur"} soit ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?"\u2265":">",s=e(n.origin);return s?`Trop petit : attendu que ${n.origin} ait ${o}${n.minimum.toString()} ${s.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":""} : ${v(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 M_(){return{localeError:CP()}}var DP=()=>{let t={string:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA",gender:"f"},number:{label:"\u05DE\u05E1\u05E4\u05E8",gender:"m"},boolean:{label:"\u05E2\u05E8\u05DA \u05D1\u05D5\u05DC\u05D9\u05D0\u05E0\u05D9",gender:"m"},bigint:{label:"BigInt",gender:"m"},date:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA",gender:"m"},array:{label:"\u05DE\u05E2\u05E8\u05DA",gender:"m"},object:{label:"\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8",gender:"m"},null:{label:"\u05E2\u05E8\u05DA \u05E8\u05D9\u05E7 (null)",gender:"m"},undefined:{label:"\u05E2\u05E8\u05DA \u05DC\u05D0 \u05DE\u05D5\u05D2\u05D3\u05E8 (undefined)",gender:"m"},symbol:{label:"\u05E1\u05D9\u05DE\u05D1\u05D5\u05DC (Symbol)",gender:"m"},function:{label:"\u05E4\u05D5\u05E0\u05E7\u05E6\u05D9\u05D4",gender:"f"},map:{label:"\u05DE\u05E4\u05D4 (Map)",gender:"f"},set:{label:"\u05E7\u05D1\u05D5\u05E6\u05D4 (Set)",gender:"f"},file:{label:"\u05E7\u05D5\u05D1\u05E5",gender:"m"},promise:{label:"Promise",gender:"m"},NaN:{label:"NaN",gender:"m"},unknown:{label:"\u05E2\u05E8\u05DA \u05DC\u05D0 \u05D9\u05D3\u05D5\u05E2",gender:"m"},value:{label:"\u05E2\u05E8\u05DA",gender:"m"}},e={string:{unit:"\u05EA\u05D5\u05D5\u05D9\u05DD",shortLabel:"\u05E7\u05E6\u05E8",longLabel:"\u05D0\u05E8\u05D5\u05DA"},file:{unit:"\u05D1\u05D9\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},array:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},set:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},number:{unit:"",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"}},r=l=>l?t[l]:void 0,i=l=>{let d=r(l);return d?d.label:l??t.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",s=l=>l?e[l]??null:null,a={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 d=l.expected,u=c[d??""]??i(d),p=O(l.input),f=c[p]??t[p]?.label??p;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 ${f}`:`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${u}, \u05D4\u05EA\u05E7\u05D1\u05DC ${f}`}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 ${x(l.values[0])}`;let d=l.values.map(f=>x(f));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 ${d[0]} \u05D0\u05D5 ${d[1]}`;let u=d[d.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 ${d.slice(0,-1).join(", ")} \u05D0\u05D5 ${u}`}case"too_big":{let d=s(l.origin),u=n(l.origin??"value");if(l.origin==="string")return`${d?.longLabel??"\u05D0\u05E8\u05D5\u05DA"} \u05DE\u05D3\u05D9: ${u} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${l.maximum.toString()} ${d?.unit??""} ${l.inclusive?"\u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA":"\u05DC\u05DB\u05DC \u05D4\u05D9\u05D5\u05EA\u05E8"}`.trim();if(l.origin==="number"){let m=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: ${u} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${m}`}if(l.origin==="array"||l.origin==="set"){let m=l.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA",h=l.inclusive?`${l.maximum} ${d?.unit??""} \u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA`:`\u05E4\u05D7\u05D5\u05EA \u05DE-${l.maximum} ${d?.unit??""}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${u} ${m} \u05DC\u05D4\u05DB\u05D9\u05DC ${h}`.trim()}let p=l.inclusive?"<=":"<",f=o(l.origin??"value");return d?.unit?`${d.longLabel} \u05DE\u05D3\u05D9: ${u} ${f} ${p}${l.maximum.toString()} ${d.unit}`:`${d?.longLabel??"\u05D2\u05D3\u05D5\u05DC"} \u05DE\u05D3\u05D9: ${u} ${f} ${p}${l.maximum.toString()}`}case"too_small":{let d=s(l.origin),u=n(l.origin??"value");if(l.origin==="string")return`${d?.shortLabel??"\u05E7\u05E6\u05E8"} \u05DE\u05D3\u05D9: ${u} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${l.minimum.toString()} ${d?.unit??""} ${l.inclusive?"\u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8":"\u05DC\u05E4\u05D7\u05D5\u05EA"}`.trim();if(l.origin==="number"){let m=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: ${u} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${m}`}if(l.origin==="array"||l.origin==="set"){let m=l.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA";if(l.minimum===1&&l.inclusive){let y=(l.origin==="set","\u05DC\u05E4\u05D7\u05D5\u05EA \u05E4\u05E8\u05D9\u05D8 \u05D0\u05D7\u05D3");return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${u} ${m} \u05DC\u05D4\u05DB\u05D9\u05DC ${y}`}let h=l.inclusive?`${l.minimum} ${d?.unit??""} \u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8`:`\u05D9\u05D5\u05EA\u05E8 \u05DE-${l.minimum} ${d?.unit??""}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${u} ${m} \u05DC\u05D4\u05DB\u05D9\u05DC ${h}`.trim()}let p=l.inclusive?">=":">",f=o(l.origin??"value");return d?.unit?`${d.shortLabel} \u05DE\u05D3\u05D9: ${u} ${f} ${p}${l.minimum.toString()} ${d.unit}`:`${d?.shortLabel??"\u05E7\u05D8\u05DF"} \u05DE\u05D3\u05D9: ${u} ${f} ${p}${l.minimum.toString()}`}case"invalid_format":{let d=l;if(d.format==="starts_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D7\u05D9\u05DC \u05D1 "${d.prefix}"`;if(d.format==="ends_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05E1\u05EA\u05D9\u05D9\u05DD \u05D1 "${d.suffix}"`;if(d.format==="includes")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05DB\u05DC\u05D5\u05DC "${d.includes}"`;if(d.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 ${d.pattern}`;let u=a[d.format],p=u?.label??d.format,m=(u?.gender??"m")==="f"?"\u05EA\u05E7\u05D9\u05E0\u05D4":"\u05EA\u05E7\u05D9\u05DF";return`${p} \u05DC\u05D0 ${m}`}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"}: ${v(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 q_(){return{localeError:DP()}}var jP=()=>{let t={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}};function e(n){return t[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,s=O(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k instanceof ${n.expected}, a kapott \xE9rt\xE9k ${a}`:`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${o}, a kapott \xE9rt\xE9k ${a}`}case"invalid_value":return n.values.length===1?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${x(n.values[0])}`:`\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${v(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`T\xFAl nagy: ${n.origin??"\xE9rt\xE9k"} m\xE9rete t\xFAl nagy ${o}${n.maximum.toString()} ${s.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?">=":">",s=e(n.origin);return s?`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${n.origin} m\xE9rete t\xFAl kicsi ${o}${n.minimum.toString()} ${s.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":""}: ${v(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 Z_(){return{localeError:jP()}}function F_(t,e,r){return Math.abs(t)===1?e:r}function bn(t){if(!t)return"";let e=["\u0561","\u0565","\u0568","\u056B","\u0578","\u0578\u0582","\u0585"],r=t[t.length-1];return t+(e.includes(r)?"\u0576":"\u0568")}var RP=()=>{let t={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 e(n){return t[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,s=O(n.input),a=i[s]??s;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 ${a}`:`\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 ${a}`}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 ${x(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 ${v(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);if(s){let a=Number(n.maximum),c=F_(a,s.unit.one,s.unit.many);return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${bn(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 ${bn(n.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056C\u056B\u0576\u056B ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=e(n.origin);if(s){let a=Number(n.minimum),c=F_(a,s.unit.one,s.unit.many);return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${bn(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 ${bn(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":""}. ${v(n.keys,", ")}`;case"invalid_key":return`\u054D\u056D\u0561\u056C \u0562\u0561\u0576\u0561\u056C\u056B ${bn(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 ${bn(n.origin)}-\u0578\u0582\u0574`;default:return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574"}}};function B_(){return{localeError:RP()}}var UP=()=>{let t={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}};function e(n){return t[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,s=O(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`Input tidak valid: diharapkan instanceof ${n.expected}, diterima ${a}`:`Input tidak valid: diharapkan ${o}, diterima ${a}`}case"invalid_value":return n.values.length===1?`Input tidak valid: diharapkan ${x(n.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${v(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`Terlalu besar: diharapkan ${n.origin??"value"} memiliki ${o}${n.maximum.toString()} ${s.unit??"elemen"}`:`Terlalu besar: diharapkan ${n.origin??"value"} menjadi ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=e(n.origin);return s?`Terlalu kecil: diharapkan ${n.origin} memiliki ${o}${n.minimum.toString()} ${s.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":""}: ${v(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 V_(){return{localeError:UP()}}var LP=()=>{let t={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 e(n){return t[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,s=O(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`Rangt gildi: \xDE\xFA sl\xF3st inn ${a} \xFEar sem \xE1 a\xF0 vera instanceof ${n.expected}`:`Rangt gildi: \xDE\xFA sl\xF3st inn ${a} \xFEar sem \xE1 a\xF0 vera ${o}`}case"invalid_value":return n.values.length===1?`Rangt gildi: gert r\xE1\xF0 fyrir ${x(n.values[0])}`:`\xD3gilt val: m\xE1 vera eitt af eftirfarandi ${v(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${n.origin??"gildi"} hafi ${o}${n.maximum.toString()} ${s.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?">=":">",s=e(n.origin);return s?`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${n.origin} hafi ${o}${n.minimum.toString()} ${s.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"}: ${v(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 G_(){return{localeError:LP()}}var MP=()=>{let t={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}};function e(n){return t[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,s=O(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`Input non valido: atteso instanceof ${n.expected}, ricevuto ${a}`:`Input non valido: atteso ${o}, ricevuto ${a}`}case"invalid_value":return n.values.length===1?`Input non valido: atteso ${x(n.values[0])}`:`Opzione non valida: atteso uno tra ${v(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`Troppo grande: ${n.origin??"valore"} deve avere ${o}${n.maximum.toString()} ${s.unit??"elementi"}`:`Troppo grande: ${n.origin??"valore"} deve essere ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=e(n.origin);return s?`Troppo piccolo: ${n.origin} deve avere ${o}${n.minimum.toString()} ${s.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}`:`Invalid ${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"}: ${v(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 J_(){return{localeError:MP()}}var qP=()=>{let t={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 e(n){return t[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,s=O(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`\u7121\u52B9\u306A\u5165\u529B: instanceof ${n.expected}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${a}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u5165\u529B: ${o}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${a}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`}case"invalid_value":return n.values.length===1?`\u7121\u52B9\u306A\u5165\u529B: ${x(n.values[0])}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u9078\u629E: ${v(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",s=e(n.origin);return s?`\u5927\u304D\u3059\u304E\u308B\u5024: ${n.origin??"\u5024"}\u306F${n.maximum.toString()}${s.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",s=e(n.origin);return s?`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${n.origin}\u306F${n.minimum.toString()}${s.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":""}: ${v(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 K_(){return{localeError:qP()}}var ZP=()=>{let t={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 e(n){return t[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 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",base64url:"base64url-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",json_string:"JSON \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\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:"\u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\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,s=O(n.input),a=i[s]??s;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 ${a}`:`\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 ${a}`}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 ${x(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 ${v(n.values,"|")}-\u10D3\u10D0\u10DC`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${n.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} ${s.verb} ${o}${n.maximum.toString()} ${s.unit}`:`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${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?">=":">",s=e(n.origin);return s?`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${n.origin} ${s.verb} ${o}${n.minimum.toString()} ${s.unit}`:`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${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 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\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 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\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 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\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 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\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"}: ${v(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 W_(){return{localeError:ZP()}}var FP=()=>{let t={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 e(n){return t[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,s=O(n.input),a=i[s]??s;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 ${a}`:`\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 ${a}`}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 ${x(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 ${v(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`\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()} ${s.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?">=":">",s=e(n.origin);return s?`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${n.origin} ${o} ${n.minimum.toString()} ${s.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 ${v(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 Ko(){return{localeError:FP()}}function Y_(){return Ko()}var BP=()=>{let t={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 e(n){return t[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,s=O(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 instanceof ${n.expected}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${a}\uC785\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 ${o}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${a}\uC785\uB2C8\uB2E4`}case"invalid_value":return n.values.length===1?`\uC798\uBABB\uB41C \uC785\uB825: \uAC12\uC740 ${x(n.values[0])} \uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC635\uC158: ${v(n.values,"\uB610\uB294 ")} \uC911 \uD558\uB098\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"too_big":{let o=n.inclusive?"\uC774\uD558":"\uBBF8\uB9CC",s=o==="\uBBF8\uB9CC"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",a=e(n.origin),c=a?.unit??"\uC694\uC18C";return a?`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${n.maximum.toString()}${c} ${o}${s}`:`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${n.maximum.toString()} ${o}${s}`}case"too_small":{let o=n.inclusive?"\uC774\uC0C1":"\uCD08\uACFC",s=o==="\uC774\uC0C1"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",a=e(n.origin),c=a?.unit??"\uC694\uC18C";return a?`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${n.minimum.toString()}${c} ${o}${s}`:`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${n.minimum.toString()} ${o}${s}`}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: ${v(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 H_(){return{localeError:BP()}}var Yr=t=>t.charAt(0).toUpperCase()+t.slice(1);function X_(t){let e=Math.abs(t),r=e%10,i=e%100;return i>=11&&i<=19||r===0?"many":r===1?"one":"few"}var VP=()=>{let t={string:{unit:{one:"simbolis",few:"simboliai",many:"simboli\u0173"},verb:{smaller:{inclusive:"turi b\u016Bti ne ilgesn\u0117 kaip",notInclusive:"turi b\u016Bti trumpesn\u0117 kaip"},bigger:{inclusive:"turi b\u016Bti ne trumpesn\u0117 kaip",notInclusive:"turi b\u016Bti ilgesn\u0117 kaip"}}},file:{unit:{one:"baitas",few:"baitai",many:"bait\u0173"},verb:{smaller:{inclusive:"turi b\u016Bti ne didesnis kaip",notInclusive:"turi b\u016Bti ma\u017Eesnis kaip"},bigger:{inclusive:"turi b\u016Bti ne ma\u017Eesnis kaip",notInclusive:"turi b\u016Bti didesnis kaip"}}},array:{unit:{one:"element\u0105",few:"elementus",many:"element\u0173"},verb:{smaller:{inclusive:"turi tur\u0117ti ne daugiau kaip",notInclusive:"turi tur\u0117ti ma\u017Eiau kaip"},bigger:{inclusive:"turi tur\u0117ti ne ma\u017Eiau kaip",notInclusive:"turi tur\u0117ti daugiau kaip"}}},set:{unit:{one:"element\u0105",few:"elementus",many:"element\u0173"},verb:{smaller:{inclusive:"turi tur\u0117ti ne daugiau kaip",notInclusive:"turi tur\u0117ti ma\u017Eiau kaip"},bigger:{inclusive:"turi tur\u0117ti ne ma\u017Eiau kaip",notInclusive:"turi tur\u0117ti daugiau kaip"}}}};function e(n,o,s,a){let c=t[n]??null;return c===null?c:{unit:c.unit[o],verb:c.verb[a][s?"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,s=O(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`Gautas tipas ${a}, o tik\u0117tasi - instanceof ${n.expected}`:`Gautas tipas ${a}, o tik\u0117tasi - ${o}`}case"invalid_value":return n.values.length===1?`Privalo b\u016Bti ${x(n.values[0])}`:`Privalo b\u016Bti vienas i\u0161 ${v(n.values,"|")} pasirinkim\u0173`;case"too_big":{let o=i[n.origin]??n.origin,s=e(n.origin,X_(Number(n.maximum)),n.inclusive??!1,"smaller");if(s?.verb)return`${Yr(o??n.origin??"reik\u0161m\u0117")} ${s.verb} ${n.maximum.toString()} ${s.unit??"element\u0173"}`;let a=n.inclusive?"ne didesnis kaip":"ma\u017Eesnis kaip";return`${Yr(o??n.origin??"reik\u0161m\u0117")} turi b\u016Bti ${a} ${n.maximum.toString()} ${s?.unit}`}case"too_small":{let o=i[n.origin]??n.origin,s=e(n.origin,X_(Number(n.minimum)),n.inclusive??!1,"bigger");if(s?.verb)return`${Yr(o??n.origin??"reik\u0161m\u0117")} ${s.verb} ${n.minimum.toString()} ${s.unit??"element\u0173"}`;let a=n.inclusive?"ne ma\u017Eesnis kaip":"didesnis kaip";return`${Yr(o??n.origin??"reik\u0161m\u0117")} turi b\u016Bti ${a} ${n.minimum.toString()} ${s?.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"}: ${v(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`${Yr(o??n.origin??"reik\u0161m\u0117")} turi klaiding\u0105 \u012Fvest\u012F`}default:return"Klaidinga \u012Fvestis"}}};function Q_(){return{localeError:VP()}}var GP=()=>{let t={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 e(n){return t[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,s=O(n.input),a=i[s]??s;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 ${a}`:`\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 ${a}`}case"invalid_value":return n.values.length===1?`Invalid input: expected ${x(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 ${v(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${n.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0438\u043C\u0430 ${o}${n.maximum.toString()} ${s.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0438"}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${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?">=":">",s=e(n.origin);return s?`\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()} ${s.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"}: ${v(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 ev(){return{localeError:GP()}}var JP=()=>{let t={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}};function e(n){return t[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,s=O(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`Input tidak sah: dijangka instanceof ${n.expected}, diterima ${a}`:`Input tidak sah: dijangka ${o}, diterima ${a}`}case"invalid_value":return n.values.length===1?`Input tidak sah: dijangka ${x(n.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${v(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`Terlalu besar: dijangka ${n.origin??"nilai"} ${s.verb} ${o}${n.maximum.toString()} ${s.unit??"elemen"}`:`Terlalu besar: dijangka ${n.origin??"nilai"} adalah ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=e(n.origin);return s?`Terlalu kecil: dijangka ${n.origin} ${s.verb} ${o}${n.minimum.toString()} ${s.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: ${v(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 tv(){return{localeError:JP()}}var KP=()=>{let t={string:{unit:"tekens",verb:"heeft"},file:{unit:"bytes",verb:"heeft"},array:{unit:"elementen",verb:"heeft"},set:{unit:"elementen",verb:"heeft"}};function e(n){return t[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,s=O(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`Ongeldige invoer: verwacht instanceof ${n.expected}, ontving ${a}`:`Ongeldige invoer: verwacht ${o}, ontving ${a}`}case"invalid_value":return n.values.length===1?`Ongeldige invoer: verwacht ${x(n.values[0])}`:`Ongeldige optie: verwacht \xE9\xE9n van ${v(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin),a=n.origin==="date"?"laat":n.origin==="string"?"lang":"groot";return s?`Te ${a}: verwacht dat ${n.origin??"waarde"} ${o}${n.maximum.toString()} ${s.unit??"elementen"} ${s.verb}`:`Te ${a}: verwacht dat ${n.origin??"waarde"} ${o}${n.maximum.toString()} is`}case"too_small":{let o=n.inclusive?">=":">",s=e(n.origin),a=n.origin==="date"?"vroeg":n.origin==="string"?"kort":"klein";return s?`Te ${a}: verwacht dat ${n.origin} ${o}${n.minimum.toString()} ${s.unit} ${s.verb}`:`Te ${a}: 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":""}: ${v(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 nv(){return{localeError:KP()}}var WP=()=>{let t={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 e(n){return t[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,s=O(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`Ugyldig input: forventet instanceof ${n.expected}, fikk ${a}`:`Ugyldig input: forventet ${o}, fikk ${a}`}case"invalid_value":return n.values.length===1?`Ugyldig verdi: forventet ${x(n.values[0])}`:`Ugyldig valg: forventet en av ${v(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`For stor(t): forventet ${n.origin??"value"} til \xE5 ha ${o}${n.maximum.toString()} ${s.unit??"elementer"}`:`For stor(t): forventet ${n.origin??"value"} til \xE5 ha ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=e(n.origin);return s?`For lite(n): forventet ${n.origin} til \xE5 ha ${o}${n.minimum.toString()} ${s.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"}: ${v(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 rv(){return{localeError:WP()}}var YP=()=>{let t={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 e(n){return t[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,s=O(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`F\xE2sit giren: umulan instanceof ${n.expected}, al\u0131nan ${a}`:`F\xE2sit giren: umulan ${o}, al\u0131nan ${a}`}case"invalid_value":return n.values.length===1?`F\xE2sit giren: umulan ${x(n.values[0])}`:`F\xE2sit tercih: m\xFBteberler ${v(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`Fazla b\xFCy\xFCk: ${n.origin??"value"}, ${o}${n.maximum.toString()} ${s.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?">=":">",s=e(n.origin);return s?`Fazla k\xFC\xE7\xFCk: ${n.origin}, ${o}${n.minimum.toString()} ${s.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":""}: ${v(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 iv(){return{localeError:YP()}}var HP=()=>{let t={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 e(n){return t[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,s=O(n.input),a=i[s]??s;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 ${a} \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 ${a} \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 ${x(n.values[0])} \u0648\u0627\u06CC`:`\u0646\u0627\u0633\u0645 \u0627\u0646\u062A\u062E\u0627\u0628: \u0628\u0627\u06CC\u062F \u06CC\u0648 \u0644\u0647 ${v(n.values,"|")} \u0685\u062E\u0647 \u0648\u0627\u06CC`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${n.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${o}${n.maximum.toString()} ${s.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?">=":">",s=e(n.origin);return s?`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${n.origin} \u0628\u0627\u06CC\u062F ${o}${n.minimum.toString()} ${s.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"}: ${v(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 ov(){return{localeError:HP()}}var XP=()=>{let t={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 e(n){return t[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,s=O(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano instanceof ${n.expected}, otrzymano ${a}`:`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${o}, otrzymano ${a}`}case"invalid_value":return n.values.length===1?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${x(n.values[0])}`:`Nieprawid\u0142owa opcja: oczekiwano jednej z warto\u015Bci ${v(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`Za du\u017Ca warto\u015B\u0107: oczekiwano, \u017Ce ${n.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${o}${n.maximum.toString()} ${s.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?">=":">",s=e(n.origin);return s?`Za ma\u0142a warto\u015B\u0107: oczekiwano, \u017Ce ${n.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${o}${n.minimum.toString()} ${s.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":""}: ${v(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 sv(){return{localeError:XP()}}var QP=()=>{let t={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function e(n){return t[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,s=O(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`Tipo inv\xE1lido: esperado instanceof ${n.expected}, recebido ${a}`:`Tipo inv\xE1lido: esperado ${o}, recebido ${a}`}case"invalid_value":return n.values.length===1?`Entrada inv\xE1lida: esperado ${x(n.values[0])}`:`Op\xE7\xE3o inv\xE1lida: esperada uma das ${v(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`Muito grande: esperado que ${n.origin??"valor"} tivesse ${o}${n.maximum.toString()} ${s.unit??"elementos"}`:`Muito grande: esperado que ${n.origin??"valor"} fosse ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=e(n.origin);return s?`Muito pequeno: esperado que ${n.origin} tivesse ${o}${n.minimum.toString()} ${s.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":""}: ${v(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 av(){return{localeError:QP()}}function cv(t,e,r,i){let n=Math.abs(t),o=n%10,s=n%100;return s>=11&&s<=19?i:o===1?e:o>=2&&o<=4?r:i}var eT=()=>{let t={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 e(n){return t[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,s=O(n.input),a=i[s]??s;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 ${a}`:`\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 ${a}`}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 ${x(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 ${v(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);if(s){let a=Number(n.maximum),c=cv(a,s.unit.one,s.unit.few,s.unit.many);return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${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?">=":">",s=e(n.origin);if(s){let a=Number(n.minimum),c=cv(a,s.unit.one,s.unit.few,s.unit.many);return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${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":""}: ${v(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 lv(){return{localeError:eT()}}var tT=()=>{let t={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}};function e(n){return t[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,s=O(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`Neveljaven vnos: pri\u010Dakovano instanceof ${n.expected}, prejeto ${a}`:`Neveljaven vnos: pri\u010Dakovano ${o}, prejeto ${a}`}case"invalid_value":return n.values.length===1?`Neveljaven vnos: pri\u010Dakovano ${x(n.values[0])}`:`Neveljavna mo\u017Enost: pri\u010Dakovano eno izmed ${v(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`Preveliko: pri\u010Dakovano, da bo ${n.origin??"vrednost"} imelo ${o}${n.maximum.toString()} ${s.unit??"elementov"}`:`Preveliko: pri\u010Dakovano, da bo ${n.origin??"vrednost"} ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=e(n.origin);return s?`Premajhno: pri\u010Dakovano, da bo ${n.origin} imelo ${o}${n.minimum.toString()} ${s.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"}: ${v(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 uv(){return{localeError:tT()}}var nT=()=>{let t={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 e(n){return t[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,s=O(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`Ogiltig inmatning: f\xF6rv\xE4ntat instanceof ${n.expected}, fick ${a}`:`Ogiltig inmatning: f\xF6rv\xE4ntat ${o}, fick ${a}`}case"invalid_value":return n.values.length===1?`Ogiltig inmatning: f\xF6rv\xE4ntat ${x(n.values[0])}`:`Ogiltigt val: f\xF6rv\xE4ntade en av ${v(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`F\xF6r stor(t): f\xF6rv\xE4ntade ${n.origin??"v\xE4rdet"} att ha ${o}${n.maximum.toString()} ${s.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?">=":">",s=e(n.origin);return s?`F\xF6r lite(t): f\xF6rv\xE4ntade ${n.origin??"v\xE4rdet"} att ha ${o}${n.minimum.toString()} ${s.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"}: ${v(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 dv(){return{localeError:nT()}}var rT=()=>{let t={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 e(n){return t[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,s=O(n.input),a=i[s]??s;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 ${a}`:`\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 ${a}`}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 ${x(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 ${v(n.values,"|")} \u0B87\u0BB2\u0BCD \u0B92\u0BA9\u0BCD\u0BB1\u0BC1`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${n.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${o}${n.maximum.toString()} ${s.unit??"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD"} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${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?">=":">",s=e(n.origin);return s?`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${n.origin} ${o}${n.minimum.toString()} ${s.unit} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${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":""}: ${v(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 pv(){return{localeError:rT()}}var iT=()=>{let t={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 e(n){return t[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,s=O(n.input),a=i[s]??s;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 ${a}`:`\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 ${a}`}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 ${x(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 ${v(n.values,"|")}`;case"too_big":{let o=n.inclusive?"\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19":"\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32",s=e(n.origin);return s?`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${n.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${o} ${n.maximum.toString()} ${s.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",s=e(n.origin);return s?`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${n.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${o} ${n.minimum.toString()} ${s.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: ${v(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 fv(){return{localeError:iT()}}var oT=()=>{let t={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 e(n){return t[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,s=O(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`Ge\xE7ersiz de\u011Fer: beklenen instanceof ${n.expected}, al\u0131nan ${a}`:`Ge\xE7ersiz de\u011Fer: beklenen ${o}, al\u0131nan ${a}`}case"invalid_value":return n.values.length===1?`Ge\xE7ersiz de\u011Fer: beklenen ${x(n.values[0])}`:`Ge\xE7ersiz se\xE7enek: a\u015Fa\u011F\u0131dakilerden biri olmal\u0131: ${v(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`\xC7ok b\xFCy\xFCk: beklenen ${n.origin??"de\u011Fer"} ${o}${n.maximum.toString()} ${s.unit??"\xF6\u011Fe"}`:`\xC7ok b\xFCy\xFCk: beklenen ${n.origin??"de\u011Fer"} ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=e(n.origin);return s?`\xC7ok k\xFC\xE7\xFCk: beklenen ${n.origin} ${o}${n.minimum.toString()} ${s.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":""}: ${v(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 mv(){return{localeError:oT()}}var sT=()=>{let t={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 e(n){return t[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,s=O(n.input),a=i[s]??s;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 ${a}`:`\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 ${a}`}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 ${x(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 ${v(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${n.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} ${s.verb} ${o}${n.maximum.toString()} ${s.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432"}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${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?">=":">",s=e(n.origin);return s?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${n.origin} ${s.verb} ${o}${n.minimum.toString()} ${s.unit}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${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":""}: ${v(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 Wo(){return{localeError:sT()}}function gv(){return Wo()}var aT=()=>{let t={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 e(n){return t[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,s=O(n.input),a=i[s]??s;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 ${a} \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 ${a} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`}case"invalid_value":return n.values.length===1?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${x(n.values[0])} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`:`\u063A\u0644\u0637 \u0622\u067E\u0634\u0646: ${v(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?"<=":"<",s=e(n.origin);return s?`\u0628\u06C1\u062A \u0628\u0691\u0627: ${n.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u06D2 ${o}${n.maximum.toString()} ${s.unit??"\u0639\u0646\u0627\u0635\u0631"} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0628\u0691\u0627: ${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?">=":">",s=e(n.origin);return s?`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${n.origin} \u06A9\u06D2 ${o}${n.minimum.toString()} ${s.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":""}: ${v(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 hv(){return{localeError:aT()}}var cT=()=>{let t={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"}};function e(n){return t[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,s=O(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`Noto\u2018g\u2018ri kirish: kutilgan instanceof ${n.expected}, qabul qilingan ${a}`:`Noto\u2018g\u2018ri kirish: kutilgan ${o}, qabul qilingan ${a}`}case"invalid_value":return n.values.length===1?`Noto\u2018g\u2018ri kirish: kutilgan ${x(n.values[0])}`:`Noto\u2018g\u2018ri variant: quyidagilardan biri kutilgan ${v(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`Juda katta: kutilgan ${n.origin??"qiymat"} ${o}${n.maximum.toString()} ${s.unit} ${s.verb}`:`Juda katta: kutilgan ${n.origin??"qiymat"} ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=e(n.origin);return s?`Juda kichik: kutilgan ${n.origin} ${o}${n.minimum.toString()} ${s.unit} ${s.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":""}: ${v(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 yv(){return{localeError:cT()}}var lT=()=>{let t={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 e(n){return t[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,s=O(n.input),a=i[s]??s;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 ${a}`:`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${o}, nh\u1EADn \u0111\u01B0\u1EE3c ${a}`}case"invalid_value":return n.values.length===1?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${x(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 ${v(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${n.origin??"gi\xE1 tr\u1ECB"} ${s.verb} ${o}${n.maximum.toString()} ${s.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?">=":">",s=e(n.origin);return s?`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${n.origin} ${s.verb} ${o}${n.minimum.toString()} ${s.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: ${v(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 _v(){return{localeError:lT()}}var uT=()=>{let t={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 e(n){return t[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,s=O(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B instanceof ${n.expected}\uFF0C\u5B9E\u9645\u63A5\u6536 ${a}`:`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${o}\uFF0C\u5B9E\u9645\u63A5\u6536 ${a}`}case"invalid_value":return n.values.length===1?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${x(n.values[0])}`:`\u65E0\u6548\u9009\u9879\uFF1A\u671F\u671B\u4EE5\u4E0B\u4E4B\u4E00 ${v(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${n.origin??"\u503C"} ${o}${n.maximum.toString()} ${s.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?">=":">",s=e(n.origin);return s?`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${n.origin} ${o}${n.minimum.toString()} ${s.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): ${v(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 vv(){return{localeError:uT()}}var dT=()=>{let t={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 e(n){return t[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,s=O(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA instanceof ${n.expected}\uFF0C\u4F46\u6536\u5230 ${a}`:`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${o}\uFF0C\u4F46\u6536\u5230 ${a}`}case"invalid_value":return n.values.length===1?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${x(n.values[0])}`:`\u7121\u6548\u7684\u9078\u9805\uFF1A\u9810\u671F\u70BA\u4EE5\u4E0B\u5176\u4E2D\u4E4B\u4E00 ${v(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${n.origin??"\u503C"} \u61C9\u70BA ${o}${n.maximum.toString()} ${s.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?">=":">",s=e(n.origin);return s?`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${n.origin} \u61C9\u70BA ${o}${n.minimum.toString()} ${s.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${v(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 bv(){return{localeError:dT()}}var pT=()=>{let t={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 e(n){return t[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,s=O(n.input),a=i[s]??s;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 ${a}`:`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${o}, \xE0m\u1ECD\u0300 a r\xED ${a}`}case"invalid_value":return n.values.length===1?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${x(n.values[0])}`:`\xC0\u1E63\xE0y\xE0n a\u1E63\xEC\u1E63e: yan \u1ECD\u0300kan l\xE1ra ${v(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${n.origin??"iye"} ${s.verb} ${o}${n.maximum} ${s.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?">=":">",s=e(n.origin);return s?`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${n.origin} ${s.verb} ${o}${n.minimum} ${s.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: ${v(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"}}};function wv(){return{localeError:pT()}}var $v,Ud=Symbol("ZodOutput"),Ld=Symbol("ZodInput"),Yo=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...r){let i=r[0];return this._map.set(e,i),i&&typeof i=="object"&&"id"in i&&this._idmap.set(i.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let r=this._map.get(e);return r&&typeof r=="object"&&"id"in r&&this._idmap.delete(r.id),this._map.delete(e),this}get(e){let r=e._zod.parent;if(r){let i={...this.get(r)??{}};delete i.id;let n={...i,...this._map.get(e)};return Object.keys(n).length?n:void 0}return this._map.get(e)}has(e){return this._map.has(e)}};function Ho(){return new Yo}($v=globalThis).__zod_globalRegistry??($v.__zod_globalRegistry=Ho());var pe=globalThis.__zod_globalRegistry;function Md(t,e){return new t({type:"string",...T(e)})}function qd(t,e){return new t({type:"string",coerce:!0,...T(e)})}function Xo(t,e){return new t({type:"string",format:"email",check:"string_format",abort:!1,...T(e)})}function Xr(t,e){return new t({type:"string",format:"guid",check:"string_format",abort:!1,...T(e)})}function Qo(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,...T(e)})}function es(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...T(e)})}function ts(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...T(e)})}function ns(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...T(e)})}function Qr(t,e){return new t({type:"string",format:"url",check:"string_format",abort:!1,...T(e)})}function rs(t,e){return new t({type:"string",format:"emoji",check:"string_format",abort:!1,...T(e)})}function is(t,e){return new t({type:"string",format:"nanoid",check:"string_format",abort:!1,...T(e)})}function os(t,e){return new t({type:"string",format:"cuid",check:"string_format",abort:!1,...T(e)})}function ss(t,e){return new t({type:"string",format:"cuid2",check:"string_format",abort:!1,...T(e)})}function as(t,e){return new t({type:"string",format:"ulid",check:"string_format",abort:!1,...T(e)})}function cs(t,e){return new t({type:"string",format:"xid",check:"string_format",abort:!1,...T(e)})}function ls(t,e){return new t({type:"string",format:"ksuid",check:"string_format",abort:!1,...T(e)})}function us(t,e){return new t({type:"string",format:"ipv4",check:"string_format",abort:!1,...T(e)})}function ds(t,e){return new t({type:"string",format:"ipv6",check:"string_format",abort:!1,...T(e)})}function Zd(t,e){return new t({type:"string",format:"mac",check:"string_format",abort:!1,...T(e)})}function ps(t,e){return new t({type:"string",format:"cidrv4",check:"string_format",abort:!1,...T(e)})}function fs(t,e){return new t({type:"string",format:"cidrv6",check:"string_format",abort:!1,...T(e)})}function ms(t,e){return new t({type:"string",format:"base64",check:"string_format",abort:!1,...T(e)})}function gs(t,e){return new t({type:"string",format:"base64url",check:"string_format",abort:!1,...T(e)})}function hs(t,e){return new t({type:"string",format:"e164",check:"string_format",abort:!1,...T(e)})}function ys(t,e){return new t({type:"string",format:"jwt",check:"string_format",abort:!1,...T(e)})}var Fd={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function Bd(t,e){return new t({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...T(e)})}function Vd(t,e){return new t({type:"string",format:"date",check:"string_format",...T(e)})}function Gd(t,e){return new t({type:"string",format:"time",check:"string_format",precision:null,...T(e)})}function Jd(t,e){return new t({type:"string",format:"duration",check:"string_format",...T(e)})}function Kd(t,e){return new t({type:"number",checks:[],...T(e)})}function Wd(t,e){return new t({type:"number",coerce:!0,checks:[],...T(e)})}function Yd(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"safeint",...T(e)})}function Hd(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"float32",...T(e)})}function Xd(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"float64",...T(e)})}function Qd(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"int32",...T(e)})}function ep(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"uint32",...T(e)})}function tp(t,e){return new t({type:"boolean",...T(e)})}function np(t,e){return new t({type:"boolean",coerce:!0,...T(e)})}function rp(t,e){return new t({type:"bigint",...T(e)})}function ip(t,e){return new t({type:"bigint",coerce:!0,...T(e)})}function op(t,e){return new t({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...T(e)})}function sp(t,e){return new t({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...T(e)})}function ap(t,e){return new t({type:"symbol",...T(e)})}function cp(t,e){return new t({type:"undefined",...T(e)})}function lp(t,e){return new t({type:"null",...T(e)})}function up(t){return new t({type:"any"})}function dp(t){return new t({type:"unknown"})}function pp(t,e){return new t({type:"never",...T(e)})}function fp(t,e){return new t({type:"void",...T(e)})}function mp(t,e){return new t({type:"date",...T(e)})}function gp(t,e){return new t({type:"date",coerce:!0,...T(e)})}function hp(t,e){return new t({type:"nan",...T(e)})}function Ge(t,e){return new jo({check:"less_than",...T(e),value:t,inclusive:!1})}function Ie(t,e){return new jo({check:"less_than",...T(e),value:t,inclusive:!0})}function Je(t,e){return new Ro({check:"greater_than",...T(e),value:t,inclusive:!1})}function _e(t,e){return new Ro({check:"greater_than",...T(e),value:t,inclusive:!0})}function _s(t){return Je(0,t)}function vs(t){return Ge(0,t)}function bs(t){return Ie(0,t)}function ws(t){return _e(0,t)}function kt(t,e){return new lu({check:"multiple_of",...T(e),value:t})}function St(t,e){return new pu({check:"max_size",...T(e),maximum:t})}function Ke(t,e){return new fu({check:"min_size",...T(e),minimum:t})}function Vt(t,e){return new mu({check:"size_equals",...T(e),size:t})}function Gt(t,e){return new gu({check:"max_length",...T(e),maximum:t})}function rt(t,e){return new hu({check:"min_length",...T(e),minimum:t})}function Jt(t,e){return new yu({check:"length_equals",...T(e),length:t})}function wn(t,e){return new _u({check:"string_format",format:"regex",...T(e),pattern:t})}function $n(t){return new vu({check:"string_format",format:"lowercase",...T(t)})}function kn(t){return new bu({check:"string_format",format:"uppercase",...T(t)})}function Sn(t,e){return new wu({check:"string_format",format:"includes",...T(e),includes:t})}function xn(t,e){return new $u({check:"string_format",format:"starts_with",...T(e),prefix:t})}function In(t,e){return new ku({check:"string_format",format:"ends_with",...T(e),suffix:t})}function $s(t,e,r){return new Su({check:"property",property:t,schema:e,...T(r)})}function On(t,e){return new xu({check:"mime_type",mime:t,...T(e)})}function qe(t){return new Iu({check:"overwrite",tx:t})}function Pn(t){return qe(e=>e.normalize(t))}function Tn(){return qe(t=>t.trim())}function An(){return qe(t=>t.toLowerCase())}function En(){return qe(t=>t.toUpperCase())}function zn(){return qe(t=>Sl(t))}function yp(t,e,r){return new t({type:"array",element:e,...T(r)})}function mT(t,e,r){return new t({type:"union",options:e,...T(r)})}function gT(t,e,r){return new t({type:"union",options:e,inclusive:!1,...T(r)})}function hT(t,e,r,i){return new t({type:"union",options:r,discriminator:e,...T(i)})}function yT(t,e,r){return new t({type:"intersection",left:e,right:r})}function _T(t,e,r,i){let n=r instanceof R,o=n?i:r,s=n?r:null;return new t({type:"tuple",items:e,rest:s,...T(o)})}function vT(t,e,r,i){return new t({type:"record",keyType:e,valueType:r,...T(i)})}function bT(t,e,r,i){return new t({type:"map",keyType:e,valueType:r,...T(i)})}function wT(t,e,r){return new t({type:"set",valueType:e,...T(r)})}function $T(t,e,r){let i=Array.isArray(e)?Object.fromEntries(e.map(n=>[n,n])):e;return new t({type:"enum",entries:i,...T(r)})}function kT(t,e,r){return new t({type:"enum",entries:e,...T(r)})}function ST(t,e,r){return new t({type:"literal",values:Array.isArray(e)?e:[e],...T(r)})}function _p(t,e){return new t({type:"file",...T(e)})}function xT(t,e){return new t({type:"transform",transform:e})}function IT(t,e){return new t({type:"optional",innerType:e})}function OT(t,e){return new t({type:"nullable",innerType:e})}function PT(t,e,r){return new t({type:"default",innerType:e,get defaultValue(){return typeof r=="function"?r():Il(r)}})}function TT(t,e,r){return new t({type:"nonoptional",innerType:e,...T(r)})}function AT(t,e){return new t({type:"success",innerType:e})}function ET(t,e,r){return new t({type:"catch",innerType:e,catchValue:typeof r=="function"?r:()=>r})}function zT(t,e,r){return new t({type:"pipe",in:e,out:r})}function NT(t,e){return new t({type:"readonly",innerType:e})}function CT(t,e,r){return new t({type:"template_literal",parts:e,...T(r)})}function DT(t,e){return new t({type:"lazy",getter:e})}function jT(t,e){return new t({type:"promise",innerType:e})}function vp(t,e,r){let i=T(r);return i.abort??(i.abort=!0),new t({type:"custom",check:"custom",fn:e,...i})}function bp(t,e,r){return new t({type:"custom",check:"custom",fn:e,...T(r)})}function wp(t){let e=kv(r=>(r.addIssue=i=>{if(typeof i=="string")r.issues.push(mn(i,r.value,e._zod.def));else{let n=i;n.fatal&&(n.continue=!1),n.code??(n.code="custom"),n.input??(n.input=r.value),n.inst??(n.inst=e),n.continue??(n.continue=!e._zod.def.abort),r.issues.push(mn(n))}},t(r.value,r)));return e}function kv(t,e){let r=new X({check:"custom",...T(e)});return r._zod.check=t,r}function $p(t){let e=new X({check:"describe"});return e._zod.onattach=[r=>{let i=pe.get(r)??{};pe.add(r,{...i,description:t})}],e._zod.check=()=>{},e}function kp(t){let e=new X({check:"meta"});return e._zod.onattach=[r=>{let i=pe.get(r)??{};pe.add(r,{...i,...t})}],e._zod.check=()=>{},e}function Sp(t,e){let r=T(e),i=r.truthy??["true","1","yes","on","y","enabled"],n=r.falsy??["false","0","no","off","n","disabled"];r.case!=="sensitive"&&(i=i.map(f=>typeof f=="string"?f.toLowerCase():f),n=n.map(f=>typeof f=="string"?f.toLowerCase():f));let o=new Set(i),s=new Set(n),a=t.Codec??Wr,c=t.Boolean??Jr,l=t.String??Bt,d=new l({type:"string",error:r.error}),u=new c({type:"boolean",error:r.error}),p=new a({type:"pipe",in:d,out:u,transform:(f,m)=>{let h=f;return r.case!=="sensitive"&&(h=h.toLowerCase()),o.has(h)?!0:s.has(h)?!1:(m.issues.push({code:"invalid_value",expected:"stringbool",values:[...o,...s],input:m.value,inst:p,continue:!1}),{})},reverseTransform:(f,m)=>f===!0?i[0]||"true":n[0]||"false",error:r.error});return p}function Nn(t,e,r,i={}){let n=T(i),o={...T(i),check:"string_format",type:"string",format:e,fn:typeof r=="function"?r:a=>r.test(a),...n};return r instanceof RegExp&&(o.pattern=r),new t(o)}function xt(t){let e=t?.target??"draft-2020-12";return e==="draft-4"&&(e="draft-04"),e==="draft-7"&&(e="draft-07"),{processors:t.processors??{},metadataRegistry:t?.metadata??pe,target:e,unrepresentable:t?.unrepresentable??"throw",override:t?.override??(()=>{}),io:t?.io??"output",counter:0,seen:new Map,cycles:t?.cycles??"ref",reused:t?.reused??"inline",external:t?.external??void 0}}function V(t,e,r={path:[],schemaPath:[]}){var i;let n=t._zod.def,o=e.seen.get(t);if(o)return o.count++,r.schemaPath.includes(t)&&(o.cycle=r.path),o.schema;let s={schema:{},count:1,cycle:void 0,path:r.path};e.seen.set(t,s);let a=t._zod.toJSONSchema?.();if(a)s.schema=a;else{let d={...r,schemaPath:[...r.schemaPath,t],path:r.path};if(t._zod.processJSONSchema)t._zod.processJSONSchema(e,s.schema,d);else{let p=s.schema,f=e.processors[n.type];if(!f)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${n.type}`);f(t,e,p,d)}let u=t._zod.parent;u&&(s.ref||(s.ref=u),V(u,e,d),e.seen.get(u).isParent=!0)}let c=e.metadataRegistry.get(t);return c&&Object.assign(s.schema,c),e.io==="input"&&ve(t)&&(delete s.schema.examples,delete s.schema.default),e.io==="input"&&s.schema._prefault&&((i=s.schema).default??(i.default=s.schema._prefault)),delete s.schema._prefault,e.seen.get(t).schema}function It(t,e){let r=t.seen.get(e);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");let i=new Map;for(let s of t.seen.entries()){let a=t.metadataRegistry.get(s[0])?.id;if(a){let c=i.get(a);if(c&&c!==s[0])throw new Error(`Duplicate schema id "${a}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);i.set(a,s[0])}}let n=s=>{let a=t.target==="draft-2020-12"?"$defs":"definitions";if(t.external){let u=t.external.registry.get(s[0])?.id,p=t.external.uri??(m=>m);if(u)return{ref:p(u)};let f=s[1].defId??s[1].schema.id??`schema${t.counter++}`;return s[1].defId=f,{defId:f,ref:`${p("__shared")}#/${a}/${f}`}}if(s[1]===r)return{ref:"#"};let l=`#/${a}/`,d=s[1].schema.id??`__schema${t.counter++}`;return{defId:d,ref:l+d}},o=s=>{if(s[1].schema.$ref)return;let a=s[1],{ref:c,defId:l}=n(s);a.def={...a.schema},l&&(a.defId=l);let d=a.schema;for(let u in d)delete d[u];d.$ref=c};if(t.cycles==="throw")for(let s of t.seen.entries()){let a=s[1];if(a.cycle)throw new Error(`Cycle detected: #/${a.cycle?.join("/")}/<root>
210
210
 
211
- Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let s of t.seen.entries()){let a=s[1];if(e===s[0]){o(s);continue}if(t.external){let l=t.external.registry.get(s[0])?.id;if(e!==s[0]&&l){o(s);continue}}if(t.metadataRegistry.get(s[0])?.id){o(s);continue}if(a.cycle){o(s);continue}if(a.count>1&&t.reused==="ref"){o(s);continue}}}function Pt(t,e){let r=t.seen.get(e);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");let i=s=>{let a=t.seen.get(s);if(a.ref===null)return;let c=a.def??a.schema,l={...c},u=a.ref;if(a.ref=null,u){i(u);let p=t.seen.get(u),f=p.schema;if(f.$ref&&(t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0")?(c.allOf=c.allOf??[],c.allOf.push(f)):Object.assign(c,f),Object.assign(c,l),s._zod.parent===u)for(let g in c)g==="$ref"||g==="allOf"||g in l||delete c[g];if(f.$ref&&p.def)for(let g in c)g==="$ref"||g==="allOf"||g in p.def&&JSON.stringify(c[g])===JSON.stringify(p.def[g])&&delete c[g]}let d=s._zod.parent;if(d&&d!==u){i(d);let p=t.seen.get(d);if(p?.schema.$ref&&(c.$ref=p.schema.$ref,p.def))for(let f in c)f==="$ref"||f==="allOf"||f in p.def&&JSON.stringify(c[f])===JSON.stringify(p.def[f])&&delete c[f]}t.override({zodSchema:s,jsonSchema:c,path:a.path??[]})};for(let s of[...t.seen.entries()].reverse())i(s[0]);let n={};if(t.target==="draft-2020-12"?n.$schema="https://json-schema.org/draft/2020-12/schema":t.target==="draft-07"?n.$schema="http://json-schema.org/draft-07/schema#":t.target==="draft-04"?n.$schema="http://json-schema.org/draft-04/schema#":t.target,t.external?.uri){let s=t.external.registry.get(e)?.id;if(!s)throw new Error("Schema is missing an `id` property");n.$id=t.external.uri(s)}Object.assign(n,r.def??r.schema);let o=t.external?.defs??{};for(let s of t.seen.entries()){let a=s[1];a.def&&a.defId&&(o[a.defId]=a.def)}t.external||Object.keys(o).length>0&&(t.target==="draft-2020-12"?n.$defs=o:n.definitions=o);try{let s=JSON.parse(JSON.stringify(n));return Object.defineProperty(s,"~standard",{value:{...e["~standard"],jsonSchema:{input:Cn(e,"input",t.processors),output:Cn(e,"output",t.processors)}},enumerable:!1,writable:!1}),s}catch{throw new Error("Error converting schema to JSON.")}}function _e(t,e){let r=e??{seen:new Set};if(r.seen.has(t))return!1;r.seen.add(t);let i=t._zod.def;if(i.type==="transform")return!0;if(i.type==="array")return _e(i.element,r);if(i.type==="set")return _e(i.valueType,r);if(i.type==="lazy")return _e(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 _e(i.innerType,r);if(i.type==="intersection")return _e(i.left,r)||_e(i.right,r);if(i.type==="record"||i.type==="map")return _e(i.keyType,r)||_e(i.valueType,r);if(i.type==="pipe")return _e(i.in,r)||_e(i.out,r);if(i.type==="object"){for(let n in i.shape)if(_e(i.shape[n],r))return!0;return!1}if(i.type==="union"){for(let n of i.options)if(_e(n,r))return!0;return!1}if(i.type==="tuple"){for(let n of i.items)if(_e(n,r))return!0;return!!(i.rest&&_e(i.rest,r))}return!1}var vp=(t,e={})=>r=>{let i=It({...r,processors:e});return V(t,i),Ot(i,t),Pt(i,t)},Cn=(t,e,r={})=>i=>{let{libraryOptions:n,target:o}=i??{},s=It({...n??{},target:o,io:e,processors:r});return V(t,s),Ot(s,t),Pt(s,t)};var OT={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},bp=(t,e,r,i)=>{let n=r;n.type="string";let{minimum:o,maximum:s,format:a,patterns:c,contentEncoding:l}=t._zod.bag;if(typeof o=="number"&&(n.minLength=o),typeof s=="number"&&(n.maxLength=s),a&&(n.format=OT[a]??a,n.format===""&&delete n.format,a==="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=>({...e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0"?{type:"string"}:{},pattern:d.source}))])}},wp=(t,e,r,i)=>{let n=r,{minimum:o,maximum:s,format:a,multipleOf:c,exclusiveMaximum:l,exclusiveMinimum:u}=t._zod.bag;typeof a=="string"&&a.includes("int")?n.type="integer":n.type="number",typeof u=="number"&&(e.target==="draft-04"||e.target==="openapi-3.0"?(n.minimum=u,n.exclusiveMinimum=!0):n.exclusiveMinimum=u),typeof o=="number"&&(n.minimum=o,typeof u=="number"&&e.target!=="draft-04"&&(u>=o?delete n.minimum:delete n.exclusiveMinimum)),typeof l=="number"&&(e.target==="draft-04"||e.target==="openapi-3.0"?(n.maximum=l,n.exclusiveMaximum=!0):n.exclusiveMaximum=l),typeof s=="number"&&(n.maximum=s,typeof l=="number"&&e.target!=="draft-04"&&(l<=s?delete n.maximum:delete n.exclusiveMaximum)),typeof c=="number"&&(n.multipleOf=c)},$p=(t,e,r,i)=>{r.type="boolean"},kp=(t,e,r,i)=>{if(e.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema")},Sp=(t,e,r,i)=>{if(e.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema")},xp=(t,e,r,i)=>{e.target==="openapi-3.0"?(r.type="string",r.nullable=!0,r.enum=[null]):r.type="null"},Ip=(t,e,r,i)=>{if(e.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema")},Op=(t,e,r,i)=>{if(e.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema")},Pp=(t,e,r,i)=>{r.not={}},Tp=(t,e,r,i)=>{},Ap=(t,e,r,i)=>{},Ep=(t,e,r,i)=>{if(e.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},zp=(t,e,r,i)=>{let n=t._zod.def,o=Cr(n.entries);o.every(s=>typeof s=="number")&&(r.type="number"),o.every(s=>typeof s=="string")&&(r.type="string"),r.enum=o},Np=(t,e,r,i)=>{let n=t._zod.def,o=[];for(let s of n.values)if(s===void 0){if(e.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof s=="bigint"){if(e.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");o.push(Number(s))}else o.push(s);if(o.length!==0)if(o.length===1){let s=o[0];r.type=s===null?"null":typeof s,e.target==="draft-04"||e.target==="openapi-3.0"?r.enum=[s]:r.const=s}else o.every(s=>typeof s=="number")&&(r.type="number"),o.every(s=>typeof s=="string")&&(r.type="string"),o.every(s=>typeof s=="boolean")&&(r.type="boolean"),o.every(s=>s===null)&&(r.type="null"),r.enum=o},Cp=(t,e,r,i)=>{if(e.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema")},Dp=(t,e,r,i)=>{let n=r,o=t._zod.pattern;if(!o)throw new Error("Pattern not found in template literal");n.type="string",n.pattern=o.source},jp=(t,e,r,i)=>{let n=r,o={type:"string",format:"binary",contentEncoding:"binary"},{minimum:s,maximum:a,mime:c}=t._zod.bag;s!==void 0&&(o.minLength=s),a!==void 0&&(o.maxLength=a),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)},Rp=(t,e,r,i)=>{r.type="boolean"},Up=(t,e,r,i)=>{if(e.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},Lp=(t,e,r,i)=>{if(e.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema")},Mp=(t,e,r,i)=>{if(e.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},Fp=(t,e,r,i)=>{if(e.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema")},Zp=(t,e,r,i)=>{if(e.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema")},qp=(t,e,r,i)=>{let n=r,o=t._zod.def,{minimum:s,maximum:a}=t._zod.bag;typeof s=="number"&&(n.minItems=s),typeof a=="number"&&(n.maxItems=a),n.type="array",n.items=V(o.element,e,{...i,path:[...i.path,"items"]})},Bp=(t,e,r,i)=>{let n=r,o=t._zod.def;n.type="object",n.properties={};let s=o.shape;for(let l in s)n.properties[l]=V(s[l],e,{...i,path:[...i.path,"properties",l]});let a=new Set(Object.keys(s)),c=new Set([...a].filter(l=>{let u=o.shape[l]._zod;return e.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=V(o.catchall,e,{...i,path:[...i.path,"additionalProperties"]})):e.io==="output"&&(n.additionalProperties=!1)},ws=(t,e,r,i)=>{let n=t._zod.def,o=n.inclusive===!1,s=n.options.map((a,c)=>V(a,e,{...i,path:[...i.path,o?"oneOf":"anyOf",c]}));o?r.oneOf=s:r.anyOf=s},Vp=(t,e,r,i)=>{let n=t._zod.def,o=V(n.left,e,{...i,path:[...i.path,"allOf",0]}),s=V(n.right,e,{...i,path:[...i.path,"allOf",1]}),a=l=>"allOf"in l&&Object.keys(l).length===1,c=[...a(o)?o.allOf:[o],...a(s)?s.allOf:[s]];r.allOf=c},Gp=(t,e,r,i)=>{let n=r,o=t._zod.def;n.type="array";let s=e.target==="draft-2020-12"?"prefixItems":"items",a=e.target==="draft-2020-12"||e.target==="openapi-3.0"?"items":"additionalItems",c=o.items.map((p,f)=>V(p,e,{...i,path:[...i.path,s,f]})),l=o.rest?V(o.rest,e,{...i,path:[...i.path,a,...e.target==="openapi-3.0"?[o.items.length]:[]]}):null;e.target==="draft-2020-12"?(n.prefixItems=c,l&&(n.items=l)):e.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}=t._zod.bag;typeof u=="number"&&(n.minItems=u),typeof d=="number"&&(n.maxItems=d)},Kp=(t,e,r,i)=>{let n=r,o=t._zod.def;n.type="object";let s=o.keyType,c=s._zod.bag?.patterns;if(o.mode==="loose"&&c&&c.size>0){let u=V(o.valueType,e,{...i,path:[...i.path,"patternProperties","*"]});n.patternProperties={};for(let d of c)n.patternProperties[d.source]=u}else(e.target==="draft-07"||e.target==="draft-2020-12")&&(n.propertyNames=V(o.keyType,e,{...i,path:[...i.path,"propertyNames"]})),n.additionalProperties=V(o.valueType,e,{...i,path:[...i.path,"additionalProperties"]});let l=s._zod.values;if(l){let u=[...l].filter(d=>typeof d=="string"||typeof d=="number");u.length>0&&(n.required=u)}},Jp=(t,e,r,i)=>{let n=t._zod.def,o=V(n.innerType,e,i),s=e.seen.get(t);e.target==="openapi-3.0"?(s.ref=n.innerType,r.nullable=!0):r.anyOf=[o,{type:"null"}]},Wp=(t,e,r,i)=>{let n=t._zod.def;V(n.innerType,e,i);let o=e.seen.get(t);o.ref=n.innerType},Yp=(t,e,r,i)=>{let n=t._zod.def;V(n.innerType,e,i);let o=e.seen.get(t);o.ref=n.innerType,r.default=JSON.parse(JSON.stringify(n.defaultValue))},Hp=(t,e,r,i)=>{let n=t._zod.def;V(n.innerType,e,i);let o=e.seen.get(t);o.ref=n.innerType,e.io==="input"&&(r._prefault=JSON.parse(JSON.stringify(n.defaultValue)))},Xp=(t,e,r,i)=>{let n=t._zod.def;V(n.innerType,e,i);let o=e.seen.get(t);o.ref=n.innerType;let s;try{s=n.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}r.default=s},Qp=(t,e,r,i)=>{let n=t._zod.def,o=e.io==="input"?n.in._zod.def.type==="transform"?n.out:n.in:n.out;V(o,e,i);let s=e.seen.get(t);s.ref=o},ef=(t,e,r,i)=>{let n=t._zod.def;V(n.innerType,e,i);let o=e.seen.get(t);o.ref=n.innerType,r.readOnly=!0},tf=(t,e,r,i)=>{let n=t._zod.def;V(n.innerType,e,i);let o=e.seen.get(t);o.ref=n.innerType},$s=(t,e,r,i)=>{let n=t._zod.def;V(n.innerType,e,i);let o=e.seen.get(t);o.ref=n.innerType},nf=(t,e,r,i)=>{let n=t._zod.innerType;V(n,e,i);let o=e.seen.get(t);o.ref=n},bs={string:bp,number:wp,boolean:$p,bigint:kp,symbol:Sp,null:xp,undefined:Ip,void:Op,never:Pp,any:Tp,unknown:Ap,date:Ep,enum:zp,literal:Np,nan:Cp,template_literal:Dp,file:jp,success:Rp,custom:Up,function:Lp,transform:Mp,map:Fp,set:Zp,array:qp,object:Bp,union:ws,intersection:Vp,tuple:Gp,record:Kp,nullable:Jp,nonoptional:Wp,default:Yp,prefault:Hp,catch:Xp,pipe:Qp,readonly:ef,promise:tf,optional:$s,lazy:nf};function ks(t,e){if("_idmap"in t){let i=t,n=It({...e,processors:bs}),o={};for(let c of i._idmap.entries()){let[l,u]=c;V(u,n)}let s={},a={registry:i,uri:e?.uri,defs:o};n.external=a;for(let c of i._idmap.entries()){let[l,u]=c;Ot(n,u),s[l]=Pt(n,u)}if(Object.keys(o).length>0){let c=n.target==="draft-2020-12"?"$defs":"definitions";s.__shared={[c]:o}}return{schemas:s}}let r=It({...e,processors:bs});return V(t,r),Ot(r,t),Pt(r,t)}var Ss=class{get metadataRegistry(){return this.ctx.metadataRegistry}get target(){return this.ctx.target}get unrepresentable(){return this.ctx.unrepresentable}get override(){return this.ctx.override}get io(){return this.ctx.io}get counter(){return this.ctx.counter}set counter(e){this.ctx.counter=e}get seen(){return this.ctx.seen}constructor(e){let r=e?.target??"draft-2020-12";r==="draft-4"&&(r="draft-04"),r==="draft-7"&&(r="draft-07"),this.ctx=It({processors:bs,target:r,...e?.metadata&&{metadata:e.metadata},...e?.unrepresentable&&{unrepresentable:e.unrepresentable},...e?.override&&{override:e.override},...e?.io&&{io:e.io}})}process(e,r={path:[],schemaPath:[]}){return V(e,this.ctx,r)}emit(e,r){r&&(r.cycles&&(this.ctx.cycles=r.cycles),r.reused&&(this.ctx.reused=r.reused),r.external&&(this.ctx.external=r.external)),Ot(this.ctx,e);let i=Pt(this.ctx,e),{"~standard":n,...o}=i;return o}};var hv={};var Xr={};Xe(Xr,{ZodAny:()=>Of,ZodArray:()=>Ef,ZodBase64:()=>Vs,ZodBase64URL:()=>Gs,ZodBigInt:()=>Fn,ZodBigIntFormat:()=>Ws,ZodBoolean:()=>Mn,ZodCIDRv4:()=>qs,ZodCIDRv6:()=>Bs,ZodCUID:()=>js,ZodCUID2:()=>Rs,ZodCatch:()=>Qf,ZodCodec:()=>ra,ZodCustom:()=>li,ZodCustomStringFormat:()=>Un,ZodDate:()=>ii,ZodDefault:()=>Kf,ZodDiscriminatedUnion:()=>Nf,ZodE164:()=>Ks,ZodEmail:()=>Ns,ZodEmoji:()=>Cs,ZodEnum:()=>jn,ZodExactOptional:()=>Bf,ZodFile:()=>Zf,ZodFunction:()=>cm,ZodGUID:()=>Qr,ZodIPv4:()=>Fs,ZodIPv6:()=>Zs,ZodIntersection:()=>Cf,ZodJWT:()=>Js,ZodKSUID:()=>Ms,ZodLazy:()=>om,ZodLiteral:()=>Ff,ZodMAC:()=>bf,ZodMap:()=>Lf,ZodNaN:()=>tm,ZodNanoID:()=>Ds,ZodNever:()=>Tf,ZodNonOptional:()=>ta,ZodNull:()=>xf,ZodNullable:()=>Gf,ZodNumber:()=>Ln,ZodNumberFormat:()=>Jt,ZodObject:()=>si,ZodOptional:()=>ea,ZodPipe:()=>na,ZodPrefault:()=>Wf,ZodPromise:()=>am,ZodReadonly:()=>nm,ZodRecord:()=>ci,ZodSet:()=>Mf,ZodString:()=>Rn,ZodStringFormat:()=>J,ZodSuccess:()=>Xf,ZodSymbol:()=>kf,ZodTemplateLiteral:()=>im,ZodTransform:()=>qf,ZodTuple:()=>jf,ZodType:()=>U,ZodULID:()=>Us,ZodURL:()=>ri,ZodUUID:()=>We,ZodUndefined:()=>Sf,ZodUnion:()=>ai,ZodUnknown:()=>Pf,ZodVoid:()=>Af,ZodXID:()=>Ls,ZodXor:()=>zf,_ZodString:()=>zs,_default:()=>Jf,_function:()=>kb,any:()=>tb,array:()=>oi,base64:()=>Uv,base64url:()=>Lv,bigint:()=>Yv,boolean:()=>$f,catch:()=>em,check:()=>Sb,cidrv4:()=>jv,cidrv6:()=>Rv,codec:()=>bb,cuid:()=>Pv,cuid2:()=>Tv,custom:()=>xb,date:()=>rb,describe:()=>Ib,discriminatedUnion:()=>lb,e164:()=>Mv,email:()=>_v,emoji:()=>Iv,enum:()=>Xs,exactOptional:()=>Vf,file:()=>hb,float32:()=>Gv,float64:()=>Kv,function:()=>kb,guid:()=>vv,hash:()=>Vv,hex:()=>Bv,hostname:()=>qv,httpUrl:()=>xv,instanceof:()=>Pb,int:()=>Es,int32:()=>Jv,int64:()=>Hv,intersection:()=>Df,ipv4:()=>Nv,ipv6:()=>Dv,json:()=>Ab,jwt:()=>Fv,keyof:()=>ib,ksuid:()=>zv,lazy:()=>sm,literal:()=>gb,looseObject:()=>ab,looseRecord:()=>db,mac:()=>Cv,map:()=>pb,meta:()=>Ob,nan:()=>vb,nanoid:()=>Ov,nativeEnum:()=>mb,never:()=>Ys,nonoptional:()=>Hf,null:()=>If,nullable:()=>ti,nullish:()=>yb,number:()=>wf,object:()=>ob,optional:()=>ei,partialRecord:()=>ub,pipe:()=>ni,prefault:()=>Yf,preprocess:()=>Eb,promise:()=>$b,readonly:()=>rm,record:()=>Uf,refine:()=>lm,set:()=>fb,strictObject:()=>sb,string:()=>As,stringFormat:()=>Zv,stringbool:()=>Tb,success:()=>_b,superRefine:()=>um,symbol:()=>Qv,templateLiteral:()=>wb,transform:()=>Qs,tuple:()=>Rf,uint32:()=>Wv,uint64:()=>Xv,ulid:()=>Av,undefined:()=>eb,union:()=>Hs,unknown:()=>Kt,url:()=>Sv,uuid:()=>bv,uuidv4:()=>wv,uuidv6:()=>$v,uuidv7:()=>kv,void:()=>nb,xid:()=>Ev,xor:()=>cb});var xs={};Xe(xs,{endsWith:()=>In,gt:()=>Ke,gte:()=>ye,includes:()=>Sn,length:()=>Gt,lowercase:()=>$n,lt:()=>Ge,lte:()=>Oe,maxLength:()=>Vt,maxSize:()=>xt,mime:()=>On,minLength:()=>rt,minSize:()=>Je,multipleOf:()=>St,negative:()=>hs,nonnegative:()=>_s,nonpositive:()=>ys,normalize:()=>Pn,overwrite:()=>Me,positive:()=>gs,property:()=>vs,regex:()=>wn,size:()=>Bt,slugify:()=>zn,startsWith:()=>xn,toLowerCase:()=>An,toUpperCase:()=>En,trim:()=>Tn,uppercase:()=>kn});var Dn={};Xe(Dn,{ZodISODate:()=>Os,ZodISODateTime:()=>Is,ZodISODuration:()=>Ts,ZodISOTime:()=>Ps,date:()=>of,datetime:()=>rf,duration:()=>af,time:()=>sf});var Is=_("ZodISODateTime",(t,e)=>{Cu.init(t,e),J.init(t,e)});function rf(t){return Ud(Is,t)}var Os=_("ZodISODate",(t,e)=>{Du.init(t,e),J.init(t,e)});function of(t){return Ld(Os,t)}var Ps=_("ZodISOTime",(t,e)=>{ju.init(t,e),J.init(t,e)});function sf(t){return Md(Ps,t)}var Ts=_("ZodISODuration",(t,e)=>{Ru.init(t,e),J.init(t,e)});function af(t){return Fd(Ts,t)}var yv=(t,e)=>{Lr.init(t,e),t.name="ZodError",Object.defineProperties(t,{format:{value:r=>Fr(t,r)},flatten:{value:r=>Mr(t,r)},addIssue:{value:r=>{t.issues.push(r),t.message=JSON.stringify(t.issues,pn,2)}},addIssues:{value:r=>{t.issues.push(...r),t.message=JSON.stringify(t.issues,pn,2)}},isEmpty:{get(){return t.issues.length===0}}})},TT=_("ZodError",yv),Se=_("ZodError",yv,{Parent:Error});var cf=gn(Se),lf=hn(Se),uf=yn(Se),df=_n(Se),pf=ko(Se),ff=So(Se),mf=xo(Se),gf=Io(Se),hf=Oo(Se),yf=Po(Se),_f=To(Se),vf=Ao(Se);var U=_("ZodType",(t,e)=>(R.init(t,e),Object.assign(t["~standard"],{jsonSchema:{input:Cn(t,"input"),output:Cn(t,"output")}}),t.toJSONSchema=vp(t,{}),t.def=e,t.type=e.type,Object.defineProperty(t,"_def",{value:e}),t.check=(...r)=>t.clone(O.mergeDefs(e,{checks:[...e.checks??[],...r.map(i=>typeof i=="function"?{_zod:{check:i,def:{check:"custom"},onattach:[]}}:i)]}),{parent:!0}),t.with=t.check,t.clone=(r,i)=>he(t,r,i),t.brand=()=>t,t.register=(r,i)=>(r.add(t,i),t),t.parse=(r,i)=>cf(t,r,i,{callee:t.parse}),t.safeParse=(r,i)=>uf(t,r,i),t.parseAsync=async(r,i)=>lf(t,r,i,{callee:t.parseAsync}),t.safeParseAsync=async(r,i)=>df(t,r,i),t.spa=t.safeParseAsync,t.encode=(r,i)=>pf(t,r,i),t.decode=(r,i)=>ff(t,r,i),t.encodeAsync=async(r,i)=>mf(t,r,i),t.decodeAsync=async(r,i)=>gf(t,r,i),t.safeEncode=(r,i)=>hf(t,r,i),t.safeDecode=(r,i)=>yf(t,r,i),t.safeEncodeAsync=async(r,i)=>_f(t,r,i),t.safeDecodeAsync=async(r,i)=>vf(t,r,i),t.refine=(r,i)=>t.check(lm(r,i)),t.superRefine=r=>t.check(um(r)),t.overwrite=r=>t.check(Me(r)),t.optional=()=>ei(t),t.exactOptional=()=>Vf(t),t.nullable=()=>ti(t),t.nullish=()=>ei(ti(t)),t.nonoptional=r=>Hf(t,r),t.array=()=>oi(t),t.or=r=>Hs([t,r]),t.and=r=>Df(t,r),t.transform=r=>ni(t,Qs(r)),t.default=r=>Jf(t,r),t.prefault=r=>Yf(t,r),t.catch=r=>em(t,r),t.pipe=r=>ni(t,r),t.readonly=()=>rm(t),t.describe=r=>{let i=t.clone();return pe.add(i,{description:r}),i},Object.defineProperty(t,"description",{get(){return pe.get(t)?.description},configurable:!0}),t.meta=(...r)=>{if(r.length===0)return pe.get(t);let i=t.clone();return pe.add(i,r[0]),i},t.isOptional=()=>t.safeParse(void 0).success,t.isNullable=()=>t.safeParse(null).success,t.apply=r=>r(t),t)),zs=_("_ZodString",(t,e)=>{qt.init(t,e),U.init(t,e),t._zod.processJSONSchema=(i,n,o)=>bp(t,i,n,o);let r=t._zod.bag;t.format=r.format??null,t.minLength=r.minimum??null,t.maxLength=r.maximum??null,t.regex=(...i)=>t.check(wn(...i)),t.includes=(...i)=>t.check(Sn(...i)),t.startsWith=(...i)=>t.check(xn(...i)),t.endsWith=(...i)=>t.check(In(...i)),t.min=(...i)=>t.check(rt(...i)),t.max=(...i)=>t.check(Vt(...i)),t.length=(...i)=>t.check(Gt(...i)),t.nonempty=(...i)=>t.check(rt(1,...i)),t.lowercase=i=>t.check($n(i)),t.uppercase=i=>t.check(kn(i)),t.trim=()=>t.check(Tn()),t.normalize=(...i)=>t.check(Pn(...i)),t.toLowerCase=()=>t.check(An()),t.toUpperCase=()=>t.check(En()),t.slugify=()=>t.check(zn())}),Rn=_("ZodString",(t,e)=>{qt.init(t,e),zs.init(t,e),t.email=r=>t.check(Wo(Ns,r)),t.url=r=>t.check(Hr(ri,r)),t.jwt=r=>t.check(ms(Js,r)),t.emoji=r=>t.check(es(Cs,r)),t.guid=r=>t.check(Yr(Qr,r)),t.uuid=r=>t.check(Yo(We,r)),t.uuidv4=r=>t.check(Ho(We,r)),t.uuidv6=r=>t.check(Xo(We,r)),t.uuidv7=r=>t.check(Qo(We,r)),t.nanoid=r=>t.check(ts(Ds,r)),t.guid=r=>t.check(Yr(Qr,r)),t.cuid=r=>t.check(ns(js,r)),t.cuid2=r=>t.check(rs(Rs,r)),t.ulid=r=>t.check(is(Us,r)),t.base64=r=>t.check(ds(Vs,r)),t.base64url=r=>t.check(ps(Gs,r)),t.xid=r=>t.check(os(Ls,r)),t.ksuid=r=>t.check(ss(Ms,r)),t.ipv4=r=>t.check(as(Fs,r)),t.ipv6=r=>t.check(cs(Zs,r)),t.cidrv4=r=>t.check(ls(qs,r)),t.cidrv6=r=>t.check(us(Bs,r)),t.e164=r=>t.check(fs(Ks,r)),t.datetime=r=>t.check(rf(r)),t.date=r=>t.check(of(r)),t.time=r=>t.check(sf(r)),t.duration=r=>t.check(af(r))});function As(t){return Cd(Rn,t)}var J=_("ZodStringFormat",(t,e)=>{K.init(t,e),zs.init(t,e)}),Ns=_("ZodEmail",(t,e)=>{xu.init(t,e),J.init(t,e)});function _v(t){return Wo(Ns,t)}var Qr=_("ZodGUID",(t,e)=>{ku.init(t,e),J.init(t,e)});function vv(t){return Yr(Qr,t)}var We=_("ZodUUID",(t,e)=>{Su.init(t,e),J.init(t,e)});function bv(t){return Yo(We,t)}function wv(t){return Ho(We,t)}function $v(t){return Xo(We,t)}function kv(t){return Qo(We,t)}var ri=_("ZodURL",(t,e)=>{Iu.init(t,e),J.init(t,e)});function Sv(t){return Hr(ri,t)}function xv(t){return Hr(ri,{protocol:/^https?$/,hostname:ze.domain,...O.normalizeParams(t)})}var Cs=_("ZodEmoji",(t,e)=>{Ou.init(t,e),J.init(t,e)});function Iv(t){return es(Cs,t)}var Ds=_("ZodNanoID",(t,e)=>{Pu.init(t,e),J.init(t,e)});function Ov(t){return ts(Ds,t)}var js=_("ZodCUID",(t,e)=>{Tu.init(t,e),J.init(t,e)});function Pv(t){return ns(js,t)}var Rs=_("ZodCUID2",(t,e)=>{Au.init(t,e),J.init(t,e)});function Tv(t){return rs(Rs,t)}var Us=_("ZodULID",(t,e)=>{Eu.init(t,e),J.init(t,e)});function Av(t){return is(Us,t)}var Ls=_("ZodXID",(t,e)=>{zu.init(t,e),J.init(t,e)});function Ev(t){return os(Ls,t)}var Ms=_("ZodKSUID",(t,e)=>{Nu.init(t,e),J.init(t,e)});function zv(t){return ss(Ms,t)}var Fs=_("ZodIPv4",(t,e)=>{Uu.init(t,e),J.init(t,e)});function Nv(t){return as(Fs,t)}var bf=_("ZodMAC",(t,e)=>{Mu.init(t,e),J.init(t,e)});function Cv(t){return jd(bf,t)}var Zs=_("ZodIPv6",(t,e)=>{Lu.init(t,e),J.init(t,e)});function Dv(t){return cs(Zs,t)}var qs=_("ZodCIDRv4",(t,e)=>{Fu.init(t,e),J.init(t,e)});function jv(t){return ls(qs,t)}var Bs=_("ZodCIDRv6",(t,e)=>{Zu.init(t,e),J.init(t,e)});function Rv(t){return us(Bs,t)}var Vs=_("ZodBase64",(t,e)=>{Bu.init(t,e),J.init(t,e)});function Uv(t){return ds(Vs,t)}var Gs=_("ZodBase64URL",(t,e)=>{Vu.init(t,e),J.init(t,e)});function Lv(t){return ps(Gs,t)}var Ks=_("ZodE164",(t,e)=>{Gu.init(t,e),J.init(t,e)});function Mv(t){return fs(Ks,t)}var Js=_("ZodJWT",(t,e)=>{Ku.init(t,e),J.init(t,e)});function Fv(t){return ms(Js,t)}var Un=_("ZodCustomStringFormat",(t,e)=>{Ju.init(t,e),J.init(t,e)});function Zv(t,e,r={}){return Nn(Un,t,e,r)}function qv(t){return Nn(Un,"hostname",ze.hostname,t)}function Bv(t){return Nn(Un,"hex",ze.hex,t)}function Vv(t,e){let r=e?.enc??"hex",i=`${t}_${r}`,n=ze[i];if(!n)throw new Error(`Unrecognized hash format: ${i}`);return Nn(Un,i,n,e)}var Ln=_("ZodNumber",(t,e)=>{Mo.init(t,e),U.init(t,e),t._zod.processJSONSchema=(i,n,o)=>wp(t,i,n,o),t.gt=(i,n)=>t.check(Ke(i,n)),t.gte=(i,n)=>t.check(ye(i,n)),t.min=(i,n)=>t.check(ye(i,n)),t.lt=(i,n)=>t.check(Ge(i,n)),t.lte=(i,n)=>t.check(Oe(i,n)),t.max=(i,n)=>t.check(Oe(i,n)),t.int=i=>t.check(Es(i)),t.safe=i=>t.check(Es(i)),t.positive=i=>t.check(Ke(0,i)),t.nonnegative=i=>t.check(ye(0,i)),t.negative=i=>t.check(Ge(0,i)),t.nonpositive=i=>t.check(Oe(0,i)),t.multipleOf=(i,n)=>t.check(St(i,n)),t.step=(i,n)=>t.check(St(i,n)),t.finite=()=>t;let r=t._zod.bag;t.minValue=Math.max(r.minimum??Number.NEGATIVE_INFINITY,r.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,t.maxValue=Math.min(r.maximum??Number.POSITIVE_INFINITY,r.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,t.isInt=(r.format??"").includes("int")||Number.isSafeInteger(r.multipleOf??.5),t.isFinite=!0,t.format=r.format??null});function wf(t){return Zd(Ln,t)}var Jt=_("ZodNumberFormat",(t,e)=>{Wu.init(t,e),Ln.init(t,e)});function Es(t){return Bd(Jt,t)}function Gv(t){return Vd(Jt,t)}function Kv(t){return Gd(Jt,t)}function Jv(t){return Kd(Jt,t)}function Wv(t){return Jd(Jt,t)}var Mn=_("ZodBoolean",(t,e)=>{Vr.init(t,e),U.init(t,e),t._zod.processJSONSchema=(r,i,n)=>$p(t,r,i,n)});function $f(t){return Wd(Mn,t)}var Fn=_("ZodBigInt",(t,e)=>{Fo.init(t,e),U.init(t,e),t._zod.processJSONSchema=(i,n,o)=>kp(t,i,n,o),t.gte=(i,n)=>t.check(ye(i,n)),t.min=(i,n)=>t.check(ye(i,n)),t.gt=(i,n)=>t.check(Ke(i,n)),t.gte=(i,n)=>t.check(ye(i,n)),t.min=(i,n)=>t.check(ye(i,n)),t.lt=(i,n)=>t.check(Ge(i,n)),t.lte=(i,n)=>t.check(Oe(i,n)),t.max=(i,n)=>t.check(Oe(i,n)),t.positive=i=>t.check(Ke(BigInt(0),i)),t.negative=i=>t.check(Ge(BigInt(0),i)),t.nonpositive=i=>t.check(Oe(BigInt(0),i)),t.nonnegative=i=>t.check(ye(BigInt(0),i)),t.multipleOf=(i,n)=>t.check(St(i,n));let r=t._zod.bag;t.minValue=r.minimum??null,t.maxValue=r.maximum??null,t.format=r.format??null});function Yv(t){return Hd(Fn,t)}var Ws=_("ZodBigIntFormat",(t,e)=>{Yu.init(t,e),Fn.init(t,e)});function Hv(t){return Qd(Ws,t)}function Xv(t){return ep(Ws,t)}var kf=_("ZodSymbol",(t,e)=>{Hu.init(t,e),U.init(t,e),t._zod.processJSONSchema=(r,i,n)=>Sp(t,r,i,n)});function Qv(t){return tp(kf,t)}var Sf=_("ZodUndefined",(t,e)=>{Xu.init(t,e),U.init(t,e),t._zod.processJSONSchema=(r,i,n)=>Ip(t,r,i,n)});function eb(t){return np(Sf,t)}var xf=_("ZodNull",(t,e)=>{Qu.init(t,e),U.init(t,e),t._zod.processJSONSchema=(r,i,n)=>xp(t,r,i,n)});function If(t){return rp(xf,t)}var Of=_("ZodAny",(t,e)=>{ed.init(t,e),U.init(t,e),t._zod.processJSONSchema=(r,i,n)=>Tp(t,r,i,n)});function tb(){return ip(Of)}var Pf=_("ZodUnknown",(t,e)=>{td.init(t,e),U.init(t,e),t._zod.processJSONSchema=(r,i,n)=>Ap(t,r,i,n)});function Kt(){return op(Pf)}var Tf=_("ZodNever",(t,e)=>{nd.init(t,e),U.init(t,e),t._zod.processJSONSchema=(r,i,n)=>Pp(t,r,i,n)});function Ys(t){return sp(Tf,t)}var Af=_("ZodVoid",(t,e)=>{rd.init(t,e),U.init(t,e),t._zod.processJSONSchema=(r,i,n)=>Op(t,r,i,n)});function nb(t){return ap(Af,t)}var ii=_("ZodDate",(t,e)=>{id.init(t,e),U.init(t,e),t._zod.processJSONSchema=(i,n,o)=>Ep(t,i,n,o),t.min=(i,n)=>t.check(ye(i,n)),t.max=(i,n)=>t.check(Oe(i,n));let r=t._zod.bag;t.minDate=r.minimum?new Date(r.minimum):null,t.maxDate=r.maximum?new Date(r.maximum):null});function rb(t){return cp(ii,t)}var Ef=_("ZodArray",(t,e)=>{od.init(t,e),U.init(t,e),t._zod.processJSONSchema=(r,i,n)=>qp(t,r,i,n),t.element=e.element,t.min=(r,i)=>t.check(rt(r,i)),t.nonempty=r=>t.check(rt(1,r)),t.max=(r,i)=>t.check(Vt(r,i)),t.length=(r,i)=>t.check(Gt(r,i)),t.unwrap=()=>t.element});function oi(t,e){return dp(Ef,t,e)}function ib(t){let e=t._zod.def.shape;return Xs(Object.keys(e))}var si=_("ZodObject",(t,e)=>{sd.init(t,e),U.init(t,e),t._zod.processJSONSchema=(r,i,n)=>Bp(t,r,i,n),O.defineLazy(t,"shape",()=>e.shape),t.keyof=()=>Xs(Object.keys(t._zod.def.shape)),t.catchall=r=>t.clone({...t._zod.def,catchall:r}),t.passthrough=()=>t.clone({...t._zod.def,catchall:Kt()}),t.loose=()=>t.clone({...t._zod.def,catchall:Kt()}),t.strict=()=>t.clone({...t._zod.def,catchall:Ys()}),t.strip=()=>t.clone({...t._zod.def,catchall:void 0}),t.extend=r=>O.extend(t,r),t.safeExtend=r=>O.safeExtend(t,r),t.merge=r=>O.merge(t,r),t.pick=r=>O.pick(t,r),t.omit=r=>O.omit(t,r),t.partial=(...r)=>O.partial(ea,t,r[0]),t.required=(...r)=>O.required(ta,t,r[0])});function ob(t,e){let r={type:"object",shape:t??{},...O.normalizeParams(e)};return new si(r)}function sb(t,e){return new si({type:"object",shape:t,catchall:Ys(),...O.normalizeParams(e)})}function ab(t,e){return new si({type:"object",shape:t,catchall:Kt(),...O.normalizeParams(e)})}var ai=_("ZodUnion",(t,e)=>{Gr.init(t,e),U.init(t,e),t._zod.processJSONSchema=(r,i,n)=>ws(t,r,i,n),t.options=e.options});function Hs(t,e){return new ai({type:"union",options:t,...O.normalizeParams(e)})}var zf=_("ZodXor",(t,e)=>{ai.init(t,e),ad.init(t,e),t._zod.processJSONSchema=(r,i,n)=>ws(t,r,i,n),t.options=e.options});function cb(t,e){return new zf({type:"union",options:t,inclusive:!1,...O.normalizeParams(e)})}var Nf=_("ZodDiscriminatedUnion",(t,e)=>{ai.init(t,e),cd.init(t,e)});function lb(t,e,r){return new Nf({type:"union",options:e,discriminator:t,...O.normalizeParams(r)})}var Cf=_("ZodIntersection",(t,e)=>{ld.init(t,e),U.init(t,e),t._zod.processJSONSchema=(r,i,n)=>Vp(t,r,i,n)});function Df(t,e){return new Cf({type:"intersection",left:t,right:e})}var jf=_("ZodTuple",(t,e)=>{Zo.init(t,e),U.init(t,e),t._zod.processJSONSchema=(r,i,n)=>Gp(t,r,i,n),t.rest=r=>t.clone({...t._zod.def,rest:r})});function Rf(t,e,r){let i=e instanceof R,n=i?r:e,o=i?e:null;return new jf({type:"tuple",items:t,rest:o,...O.normalizeParams(n)})}var ci=_("ZodRecord",(t,e)=>{ud.init(t,e),U.init(t,e),t._zod.processJSONSchema=(r,i,n)=>Kp(t,r,i,n),t.keyType=e.keyType,t.valueType=e.valueType});function Uf(t,e,r){return new ci({type:"record",keyType:t,valueType:e,...O.normalizeParams(r)})}function ub(t,e,r){let i=he(t);return i._zod.values=void 0,new ci({type:"record",keyType:i,valueType:e,...O.normalizeParams(r)})}function db(t,e,r){return new ci({type:"record",keyType:t,valueType:e,mode:"loose",...O.normalizeParams(r)})}var Lf=_("ZodMap",(t,e)=>{dd.init(t,e),U.init(t,e),t._zod.processJSONSchema=(r,i,n)=>Fp(t,r,i,n),t.keyType=e.keyType,t.valueType=e.valueType,t.min=(...r)=>t.check(Je(...r)),t.nonempty=r=>t.check(Je(1,r)),t.max=(...r)=>t.check(xt(...r)),t.size=(...r)=>t.check(Bt(...r))});function pb(t,e,r){return new Lf({type:"map",keyType:t,valueType:e,...O.normalizeParams(r)})}var Mf=_("ZodSet",(t,e)=>{pd.init(t,e),U.init(t,e),t._zod.processJSONSchema=(r,i,n)=>Zp(t,r,i,n),t.min=(...r)=>t.check(Je(...r)),t.nonempty=r=>t.check(Je(1,r)),t.max=(...r)=>t.check(xt(...r)),t.size=(...r)=>t.check(Bt(...r))});function fb(t,e){return new Mf({type:"set",valueType:t,...O.normalizeParams(e)})}var jn=_("ZodEnum",(t,e)=>{fd.init(t,e),U.init(t,e),t._zod.processJSONSchema=(i,n,o)=>zp(t,i,n,o),t.enum=e.entries,t.options=Object.values(e.entries);let r=new Set(Object.keys(e.entries));t.extract=(i,n)=>{let o={};for(let s of i)if(r.has(s))o[s]=e.entries[s];else throw new Error(`Key ${s} not found in enum`);return new jn({...e,checks:[],...O.normalizeParams(n),entries:o})},t.exclude=(i,n)=>{let o={...e.entries};for(let s of i)if(r.has(s))delete o[s];else throw new Error(`Key ${s} not found in enum`);return new jn({...e,checks:[],...O.normalizeParams(n),entries:o})}});function Xs(t,e){let r=Array.isArray(t)?Object.fromEntries(t.map(i=>[i,i])):t;return new jn({type:"enum",entries:r,...O.normalizeParams(e)})}function mb(t,e){return new jn({type:"enum",entries:t,...O.normalizeParams(e)})}var Ff=_("ZodLiteral",(t,e)=>{md.init(t,e),U.init(t,e),t._zod.processJSONSchema=(r,i,n)=>Np(t,r,i,n),t.values=new Set(e.values),Object.defineProperty(t,"value",{get(){if(e.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return e.values[0]}})});function gb(t,e){return new Ff({type:"literal",values:Array.isArray(t)?t:[t],...O.normalizeParams(e)})}var Zf=_("ZodFile",(t,e)=>{gd.init(t,e),U.init(t,e),t._zod.processJSONSchema=(r,i,n)=>jp(t,r,i,n),t.min=(r,i)=>t.check(Je(r,i)),t.max=(r,i)=>t.check(xt(r,i)),t.mime=(r,i)=>t.check(On(Array.isArray(r)?r:[r],i))});function hb(t){return pp(Zf,t)}var qf=_("ZodTransform",(t,e)=>{hd.init(t,e),U.init(t,e),t._zod.processJSONSchema=(r,i,n)=>Mp(t,r,i,n),t._zod.parse=(r,i)=>{if(i.direction==="backward")throw new vt(t.constructor.name);r.addIssue=o=>{if(typeof o=="string")r.issues.push(O.issue(o,r.value,e));else{let s=o;s.fatal&&(s.continue=!1),s.code??(s.code="custom"),s.input??(s.input=r.value),s.inst??(s.inst=t),r.issues.push(O.issue(s))}};let n=e.transform(r.value,r);return n instanceof Promise?n.then(o=>(r.value=o,r)):(r.value=n,r)}});function Qs(t){return new qf({type:"transform",transform:t})}var ea=_("ZodOptional",(t,e)=>{qo.init(t,e),U.init(t,e),t._zod.processJSONSchema=(r,i,n)=>$s(t,r,i,n),t.unwrap=()=>t._zod.def.innerType});function ei(t){return new ea({type:"optional",innerType:t})}var Bf=_("ZodExactOptional",(t,e)=>{yd.init(t,e),U.init(t,e),t._zod.processJSONSchema=(r,i,n)=>$s(t,r,i,n),t.unwrap=()=>t._zod.def.innerType});function Vf(t){return new Bf({type:"optional",innerType:t})}var Gf=_("ZodNullable",(t,e)=>{_d.init(t,e),U.init(t,e),t._zod.processJSONSchema=(r,i,n)=>Jp(t,r,i,n),t.unwrap=()=>t._zod.def.innerType});function ti(t){return new Gf({type:"nullable",innerType:t})}function yb(t){return ei(ti(t))}var Kf=_("ZodDefault",(t,e)=>{vd.init(t,e),U.init(t,e),t._zod.processJSONSchema=(r,i,n)=>Yp(t,r,i,n),t.unwrap=()=>t._zod.def.innerType,t.removeDefault=t.unwrap});function Jf(t,e){return new Kf({type:"default",innerType:t,get defaultValue(){return typeof e=="function"?e():O.shallowClone(e)}})}var Wf=_("ZodPrefault",(t,e)=>{bd.init(t,e),U.init(t,e),t._zod.processJSONSchema=(r,i,n)=>Hp(t,r,i,n),t.unwrap=()=>t._zod.def.innerType});function Yf(t,e){return new Wf({type:"prefault",innerType:t,get defaultValue(){return typeof e=="function"?e():O.shallowClone(e)}})}var ta=_("ZodNonOptional",(t,e)=>{wd.init(t,e),U.init(t,e),t._zod.processJSONSchema=(r,i,n)=>Wp(t,r,i,n),t.unwrap=()=>t._zod.def.innerType});function Hf(t,e){return new ta({type:"nonoptional",innerType:t,...O.normalizeParams(e)})}var Xf=_("ZodSuccess",(t,e)=>{$d.init(t,e),U.init(t,e),t._zod.processJSONSchema=(r,i,n)=>Rp(t,r,i,n),t.unwrap=()=>t._zod.def.innerType});function _b(t){return new Xf({type:"success",innerType:t})}var Qf=_("ZodCatch",(t,e)=>{kd.init(t,e),U.init(t,e),t._zod.processJSONSchema=(r,i,n)=>Xp(t,r,i,n),t.unwrap=()=>t._zod.def.innerType,t.removeCatch=t.unwrap});function em(t,e){return new Qf({type:"catch",innerType:t,catchValue:typeof e=="function"?e:()=>e})}var tm=_("ZodNaN",(t,e)=>{Sd.init(t,e),U.init(t,e),t._zod.processJSONSchema=(r,i,n)=>Cp(t,r,i,n)});function vb(t){return up(tm,t)}var na=_("ZodPipe",(t,e)=>{xd.init(t,e),U.init(t,e),t._zod.processJSONSchema=(r,i,n)=>Qp(t,r,i,n),t.in=e.in,t.out=e.out});function ni(t,e){return new na({type:"pipe",in:t,out:e})}var ra=_("ZodCodec",(t,e)=>{na.init(t,e),Kr.init(t,e)});function bb(t,e,r){return new ra({type:"pipe",in:t,out:e,transform:r.decode,reverseTransform:r.encode})}var nm=_("ZodReadonly",(t,e)=>{Id.init(t,e),U.init(t,e),t._zod.processJSONSchema=(r,i,n)=>ef(t,r,i,n),t.unwrap=()=>t._zod.def.innerType});function rm(t){return new nm({type:"readonly",innerType:t})}var im=_("ZodTemplateLiteral",(t,e)=>{Od.init(t,e),U.init(t,e),t._zod.processJSONSchema=(r,i,n)=>Dp(t,r,i,n)});function wb(t,e){return new im({type:"template_literal",parts:t,...O.normalizeParams(e)})}var om=_("ZodLazy",(t,e)=>{Ad.init(t,e),U.init(t,e),t._zod.processJSONSchema=(r,i,n)=>nf(t,r,i,n),t.unwrap=()=>t._zod.def.getter()});function sm(t){return new om({type:"lazy",getter:t})}var am=_("ZodPromise",(t,e)=>{Td.init(t,e),U.init(t,e),t._zod.processJSONSchema=(r,i,n)=>tf(t,r,i,n),t.unwrap=()=>t._zod.def.innerType});function $b(t){return new am({type:"promise",innerType:t})}var cm=_("ZodFunction",(t,e)=>{Pd.init(t,e),U.init(t,e),t._zod.processJSONSchema=(r,i,n)=>Lp(t,r,i,n)});function kb(t){return new cm({type:"function",input:Array.isArray(t?.input)?Rf(t?.input):t?.input??oi(Kt()),output:t?.output??Kt()})}var li=_("ZodCustom",(t,e)=>{Ed.init(t,e),U.init(t,e),t._zod.processJSONSchema=(r,i,n)=>Up(t,r,i,n)});function Sb(t){let e=new Y({check:"custom"});return e._zod.check=t,e}function xb(t,e){return fp(li,t??(()=>!0),e)}function lm(t,e={}){return mp(li,t,e)}function um(t){return gp(t)}var Ib=hp,Ob=yp;function Pb(t,e={}){let r=new li({type:"custom",check:"custom",fn:i=>i instanceof t,abort:!0,...O.normalizeParams(e)});return r._zod.bag.Class=t,r._zod.check=i=>{i.value instanceof t||i.issues.push({code:"invalid_type",expected:t.name,input:i.value,inst:r,path:[...r._zod.def.path??[]]})},r}var Tb=(...t)=>_p({Codec:ra,Boolean:Mn,String:Rn},...t);function Ab(t){let e=sm(()=>Hs([As(t),wf(),$f(),If(),oi(e),Uf(As(),e)]));return e}function Eb(t,e){return ni(Qs(t),e)}var ET={invalid_type:"invalid_type",too_big:"too_big",too_small:"too_small",invalid_format:"invalid_format",not_multiple_of:"not_multiple_of",unrecognized_keys:"unrecognized_keys",invalid_union:"invalid_union",invalid_key:"invalid_key",invalid_element:"invalid_element",invalid_value:"invalid_value",custom:"custom"};function zT(t){ie({customError:t})}function NT(){return ie().customError}var dm;dm||(dm={});var D={...Xr,...xs,iso:Dn},CT=new Set(["$schema","$ref","$defs","definitions","$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor","type","enum","const","anyOf","oneOf","allOf","not","properties","required","additionalProperties","patternProperties","propertyNames","minProperties","maxProperties","items","prefixItems","additionalItems","minItems","maxItems","uniqueItems","contains","minContains","maxContains","minLength","maxLength","pattern","format","minimum","maximum","exclusiveMinimum","exclusiveMaximum","multipleOf","description","default","contentEncoding","contentMediaType","contentSchema","unevaluatedItems","unevaluatedProperties","if","then","else","dependentSchemas","dependentRequired","nullable","readOnly"]);function DT(t,e){let r=t.$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":e??"draft-2020-12"}function jT(t,e){if(!t.startsWith("#"))throw new Error("External $ref is not supported, only local refs (#/...) are allowed");let r=t.slice(1).split("/").filter(Boolean);if(r.length===0)return e.rootSchema;let i=e.version==="draft-2020-12"?"$defs":"definitions";if(r[0]===i){let n=r[1];if(!n||!e.defs[n])throw new Error(`Reference not found: ${t}`);return e.defs[n]}throw new Error(`Reference not found: ${t}`)}function zb(t,e){if(t.not!==void 0){if(typeof t.not=="object"&&Object.keys(t.not).length===0)return D.never();throw new Error("not is not supported in Zod (except { not: {} } for never)")}if(t.unevaluatedItems!==void 0)throw new Error("unevaluatedItems is not supported");if(t.unevaluatedProperties!==void 0)throw new Error("unevaluatedProperties is not supported");if(t.if!==void 0||t.then!==void 0||t.else!==void 0)throw new Error("Conditional schemas (if/then/else) are not supported");if(t.dependentSchemas!==void 0||t.dependentRequired!==void 0)throw new Error("dependentSchemas and dependentRequired are not supported");if(t.$ref){let n=t.$ref;if(e.refs.has(n))return e.refs.get(n);if(e.processing.has(n))return D.lazy(()=>{if(!e.refs.has(n))throw new Error(`Circular reference not resolved: ${n}`);return e.refs.get(n)});e.processing.add(n);let o=jT(n,e),s=me(o,e);return e.refs.set(n,s),e.processing.delete(n),s}if(t.enum!==void 0){let n=t.enum;if(e.version==="openapi-3.0"&&t.nullable===!0&&n.length===1&&n[0]===null)return D.null();if(n.length===0)return D.never();if(n.length===1)return D.literal(n[0]);if(n.every(s=>typeof s=="string"))return D.enum(n);let o=n.map(s=>D.literal(s));return o.length<2?o[0]:D.union([o[0],o[1],...o.slice(2)])}if(t.const!==void 0)return D.literal(t.const);let r=t.type;if(Array.isArray(r)){let n=r.map(o=>{let s={...t,type:o};return zb(s,e)});return n.length===0?D.never():n.length===1?n[0]:D.union(n)}if(!r)return D.any();let i;switch(r){case"string":{let n=D.string();if(t.format){let o=t.format;o==="email"?n=n.check(D.email()):o==="uri"||o==="uri-reference"?n=n.check(D.url()):o==="uuid"||o==="guid"?n=n.check(D.uuid()):o==="date-time"?n=n.check(D.iso.datetime()):o==="date"?n=n.check(D.iso.date()):o==="time"?n=n.check(D.iso.time()):o==="duration"?n=n.check(D.iso.duration()):o==="ipv4"?n=n.check(D.ipv4()):o==="ipv6"?n=n.check(D.ipv6()):o==="mac"?n=n.check(D.mac()):o==="cidr"?n=n.check(D.cidrv4()):o==="cidr-v6"?n=n.check(D.cidrv6()):o==="base64"?n=n.check(D.base64()):o==="base64url"?n=n.check(D.base64url()):o==="e164"?n=n.check(D.e164()):o==="jwt"?n=n.check(D.jwt()):o==="emoji"?n=n.check(D.emoji()):o==="nanoid"?n=n.check(D.nanoid()):o==="cuid"?n=n.check(D.cuid()):o==="cuid2"?n=n.check(D.cuid2()):o==="ulid"?n=n.check(D.ulid()):o==="xid"?n=n.check(D.xid()):o==="ksuid"&&(n=n.check(D.ksuid()))}typeof t.minLength=="number"&&(n=n.min(t.minLength)),typeof t.maxLength=="number"&&(n=n.max(t.maxLength)),t.pattern&&(n=n.regex(new RegExp(t.pattern))),i=n;break}case"number":case"integer":{let n=r==="integer"?D.number().int():D.number();typeof t.minimum=="number"&&(n=n.min(t.minimum)),typeof t.maximum=="number"&&(n=n.max(t.maximum)),typeof t.exclusiveMinimum=="number"?n=n.gt(t.exclusiveMinimum):t.exclusiveMinimum===!0&&typeof t.minimum=="number"&&(n=n.gt(t.minimum)),typeof t.exclusiveMaximum=="number"?n=n.lt(t.exclusiveMaximum):t.exclusiveMaximum===!0&&typeof t.maximum=="number"&&(n=n.lt(t.maximum)),typeof t.multipleOf=="number"&&(n=n.multipleOf(t.multipleOf)),i=n;break}case"boolean":{i=D.boolean();break}case"null":{i=D.null();break}case"object":{let n={},o=t.properties||{},s=new Set(t.required||[]);for(let[c,l]of Object.entries(o)){let u=me(l,e);n[c]=s.has(c)?u:u.optional()}if(t.propertyNames){let c=me(t.propertyNames,e),l=t.additionalProperties&&typeof t.additionalProperties=="object"?me(t.additionalProperties,e):D.any();if(Object.keys(n).length===0){i=D.record(c,l);break}let u=D.object(n).passthrough(),d=D.looseRecord(c,l);i=D.intersection(u,d);break}if(t.patternProperties){let c=t.patternProperties,l=Object.keys(c),u=[];for(let p of l){let f=me(c[p],e),m=D.string().regex(new RegExp(p));u.push(D.looseRecord(m,f))}let d=[];if(Object.keys(n).length>0&&d.push(D.object(n).passthrough()),d.push(...u),d.length===0)i=D.object({}).passthrough();else if(d.length===1)i=d[0];else{let p=D.intersection(d[0],d[1]);for(let f=2;f<d.length;f++)p=D.intersection(p,d[f]);i=p}break}let a=D.object(n);t.additionalProperties===!1?i=a.strict():typeof t.additionalProperties=="object"?i=a.catchall(me(t.additionalProperties,e)):i=a.passthrough();break}case"array":{let n=t.prefixItems,o=t.items;if(n&&Array.isArray(n)){let s=n.map(c=>me(c,e)),a=o&&typeof o=="object"&&!Array.isArray(o)?me(o,e):void 0;a?i=D.tuple(s).rest(a):i=D.tuple(s),typeof t.minItems=="number"&&(i=i.check(D.minLength(t.minItems))),typeof t.maxItems=="number"&&(i=i.check(D.maxLength(t.maxItems)))}else if(Array.isArray(o)){let s=o.map(c=>me(c,e)),a=t.additionalItems&&typeof t.additionalItems=="object"?me(t.additionalItems,e):void 0;a?i=D.tuple(s).rest(a):i=D.tuple(s),typeof t.minItems=="number"&&(i=i.check(D.minLength(t.minItems))),typeof t.maxItems=="number"&&(i=i.check(D.maxLength(t.maxItems)))}else if(o!==void 0){let s=me(o,e),a=D.array(s);typeof t.minItems=="number"&&(a=a.min(t.minItems)),typeof t.maxItems=="number"&&(a=a.max(t.maxItems)),i=a}else i=D.array(D.any());break}default:throw new Error(`Unsupported type: ${r}`)}return t.description&&(i=i.describe(t.description)),t.default!==void 0&&(i=i.default(t.default)),i}function me(t,e){if(typeof t=="boolean")return t?D.any():D.never();let r=zb(t,e),i=t.type||t.enum!==void 0||t.const!==void 0;if(t.anyOf&&Array.isArray(t.anyOf)){let a=t.anyOf.map(l=>me(l,e)),c=D.union(a);r=i?D.intersection(r,c):c}if(t.oneOf&&Array.isArray(t.oneOf)){let a=t.oneOf.map(l=>me(l,e)),c=D.xor(a);r=i?D.intersection(r,c):c}if(t.allOf&&Array.isArray(t.allOf))if(t.allOf.length===0)r=i?r:D.any();else{let a=i?r:me(t.allOf[0],e),c=i?0:1;for(let l=c;l<t.allOf.length;l++)a=D.intersection(a,me(t.allOf[l],e));r=a}t.nullable===!0&&e.version==="openapi-3.0"&&(r=D.nullable(r)),t.readOnly===!0&&(r=D.readonly(r));let n={},o=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(let a of o)a in t&&(n[a]=t[a]);let s=["contentEncoding","contentMediaType","contentSchema"];for(let a of s)a in t&&(n[a]=t[a]);for(let a of Object.keys(t))CT.has(a)||(n[a]=t[a]);return Object.keys(n).length>0&&e.registry.add(r,n),r}function Nb(t,e){if(typeof t=="boolean")return t?D.any():D.never();let r=DT(t,e?.defaultTarget),i=t.$defs||t.definitions||{},n={version:r,defs:i,refs:new Map,processing:new Set,rootSchema:t,registry:e?.registry??pe};return me(t,n)}var pm={};Xe(pm,{bigint:()=>MT,boolean:()=>LT,date:()=>FT,number:()=>UT,string:()=>RT});function RT(t){return Dd(Rn,t)}function UT(t){return qd(Ln,t)}function LT(t){return Yd(Mn,t)}function MT(t){return Xd(Fn,t)}function FT(t){return lp(ii,t)}ie(Bo());var oa={apiUrl:"http://localhost:8000",keycloakUrl:"http://localhost:8180",realm:"frank",clientId:"frank-low-code"},qT=h.object({apiUrl:h.string().url().optional(),keycloakUrl:h.string().url().optional(),realm:h.string().min(1).optional(),clientId:h.string().min(1).optional(),clientSecret:h.string().min(1).optional()}),BT=h.object({defaultProfile:h.string().min(1).optional(),profiles:h.record(h.string(),qT).optional()}),Cb={defaultProfile:"default",profiles:{}},Db={FRANKCTL_API_URL:"apiUrl",FRANKCTL_KEYCLOAK_URL:"keycloakUrl",FRANKCTL_KEYCLOAK_REALM:"realm",FRANKCTL_CLIENT_ID:"clientId",FRANKCTL_CLIENT_SECRET:"clientSecret"};function sa(t){return t??fm.join(ZT.homedir(),".frankctl")}function VT(t){return fm.join(sa(t),"config.yaml")}function ot(t){let e=VT(t);if(!ui.existsSync(e))return structuredClone(Cb);let r;try{r=ui.readFileSync(e,"utf-8")}catch(o){throw new P(`Failed to read config at ${e}: ${o.message}`)}let i;try{i=(0,ia.parse)(r)}catch(o){throw new P(`Invalid YAML in ${e}: ${o.message}`)}if(!i||typeof i!="object")return structuredClone(Cb);let n=BT.safeParse(i);if(!n.success)throw new P(`Config validation failed: ${n.error.issues.map(o=>`${o.path.join(".")}: ${o.message}`).join("; ")}`);return{defaultProfile:n.data.defaultProfile??"default",profiles:n.data.profiles??{}}}function GT(t,e){let r=sa(e);ui.existsSync(r)||ui.mkdirSync(r,{recursive:!0,mode:448});let i=fm.join(r,"config.yaml");ui.writeFileSync(i,(0,ia.stringify)(t),{mode:384})}function W(t={}){let e=ot(t.configDir),r=t.env??process.env,i=t.profile??r.FRANKCTL_PROFILE??e.defaultProfile,n=e.profiles[i]??{},o={...oa,...n};for(let[s,a]of Object.entries(Db)){let c=r[s];c!==void 0&&c!==""&&(o[a]=c)}return t.apiUrl&&(o.apiUrl=t.apiUrl),o}function jb(t,e={}){let r=e.env??process.env,i=ot(e.configDir),n=e.profile??r.FRANKCTL_PROFILE??i.defaultProfile;if(t==="apiUrl"&&e.apiUrl)return{value:e.apiUrl,source:"flag"};let o=Object.entries(Db).find(([,c])=>c===t)?.[0];if(o&&r[o])return{value:r[o],source:"env"};let s=i.profiles[n]?.[t];return s!==void 0?{value:s,source:"config"}:{value:oa[t],source:"default"}}function Rb(t,e,r){let i=ot(r),n=t.split(".");if(n.length===1)if(n[0]==="defaultProfile")i.defaultProfile=e;else throw new P(`Unknown top-level key '${t}'. Use 'defaultProfile' or 'profiles.<name>.<field>'.`);else if(n.length===3&&n[0]==="profiles"){let[,o,s]=n,a=new Set(["apiUrl","keycloakUrl","realm","clientId","clientSecret"]);if(!a.has(s))throw new P(`Unknown profile field '${s}'. Allowed: ${[...a].join(", ")}`);i.profiles[o]=i.profiles[o]??{},i.profiles[o][s]=e}else throw new P(`Invalid key '${t}'. Use 'defaultProfile' or 'profiles.<name>.<field>'.`);GT(i,r)}import Zn from"node:fs";import Ub from"node:path";var Ye=class{credentialsPath;constructor(e){this.credentialsPath=Ub.join(sa(e),"credentials.json")}getTokens(e){return this.readFile().profiles[e]??null}saveTokens(e,r){let i=this.readFile();i.profiles[e]=r,this.writeFile(i)}clearTokens(e){let r=this.readFile();delete r.profiles[e],this.writeFile(r)}needsRefresh(e){let r=this.getTokens(e);return r?Date.now()/1e3>=r.expires_at-30:!0}isRefreshExpired(e){let r=this.getTokens(e);return r?.refresh_expires_at?Date.now()/1e3>=r.refresh_expires_at:!0}readFile(){if(!Zn.existsSync(this.credentialsPath))return{profiles:{}};try{let e=Zn.readFileSync(this.credentialsPath,"utf-8"),r=JSON.parse(e);return r?.profiles?r:{profiles:{}}}catch{return{profiles:{}}}}writeFile(e){let r=Ub.dirname(this.credentialsPath);Zn.existsSync(r)||Zn.mkdirSync(r,{recursive:!0,mode:448});let i=this.credentialsPath+".tmp";Zn.writeFileSync(i,JSON.stringify(e,null,2),{mode:384}),Zn.renameSync(i,this.credentialsPath)}};function st(t){let e=t.split(".");if(e.length!==3)throw new Error("Invalid JWT format");let r=Buffer.from(e[1],"base64url").toString("utf-8");return JSON.parse(r)}function x(t){process.stdout.write(JSON.stringify(t)+`
211
+ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let s of t.seen.entries()){let a=s[1];if(e===s[0]){o(s);continue}if(t.external){let l=t.external.registry.get(s[0])?.id;if(e!==s[0]&&l){o(s);continue}}if(t.metadataRegistry.get(s[0])?.id){o(s);continue}if(a.cycle){o(s);continue}if(a.count>1&&t.reused==="ref"){o(s);continue}}}function Ot(t,e){let r=t.seen.get(e);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");let i=s=>{let a=t.seen.get(s);if(a.ref===null)return;let c=a.def??a.schema,l={...c},d=a.ref;if(a.ref=null,d){i(d);let p=t.seen.get(d),f=p.schema;if(f.$ref&&(t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0")?(c.allOf=c.allOf??[],c.allOf.push(f)):Object.assign(c,f),Object.assign(c,l),s._zod.parent===d)for(let h in c)h==="$ref"||h==="allOf"||h in l||delete c[h];if(f.$ref&&p.def)for(let h in c)h==="$ref"||h==="allOf"||h in p.def&&JSON.stringify(c[h])===JSON.stringify(p.def[h])&&delete c[h]}let u=s._zod.parent;if(u&&u!==d){i(u);let p=t.seen.get(u);if(p?.schema.$ref&&(c.$ref=p.schema.$ref,p.def))for(let f in c)f==="$ref"||f==="allOf"||f in p.def&&JSON.stringify(c[f])===JSON.stringify(p.def[f])&&delete c[f]}t.override({zodSchema:s,jsonSchema:c,path:a.path??[]})};for(let s of[...t.seen.entries()].reverse())i(s[0]);let n={};if(t.target==="draft-2020-12"?n.$schema="https://json-schema.org/draft/2020-12/schema":t.target==="draft-07"?n.$schema="http://json-schema.org/draft-07/schema#":t.target==="draft-04"?n.$schema="http://json-schema.org/draft-04/schema#":t.target,t.external?.uri){let s=t.external.registry.get(e)?.id;if(!s)throw new Error("Schema is missing an `id` property");n.$id=t.external.uri(s)}Object.assign(n,r.def??r.schema);let o=t.external?.defs??{};for(let s of t.seen.entries()){let a=s[1];a.def&&a.defId&&(o[a.defId]=a.def)}t.external||Object.keys(o).length>0&&(t.target==="draft-2020-12"?n.$defs=o:n.definitions=o);try{let s=JSON.parse(JSON.stringify(n));return Object.defineProperty(s,"~standard",{value:{...e["~standard"],jsonSchema:{input:Cn(e,"input",t.processors),output:Cn(e,"output",t.processors)}},enumerable:!1,writable:!1}),s}catch{throw new Error("Error converting schema to JSON.")}}function ve(t,e){let r=e??{seen:new Set};if(r.seen.has(t))return!1;r.seen.add(t);let i=t._zod.def;if(i.type==="transform")return!0;if(i.type==="array")return ve(i.element,r);if(i.type==="set")return ve(i.valueType,r);if(i.type==="lazy")return ve(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 ve(i.innerType,r);if(i.type==="intersection")return ve(i.left,r)||ve(i.right,r);if(i.type==="record"||i.type==="map")return ve(i.keyType,r)||ve(i.valueType,r);if(i.type==="pipe")return ve(i.in,r)||ve(i.out,r);if(i.type==="object"){for(let n in i.shape)if(ve(i.shape[n],r))return!0;return!1}if(i.type==="union"){for(let n of i.options)if(ve(n,r))return!0;return!1}if(i.type==="tuple"){for(let n of i.items)if(ve(n,r))return!0;return!!(i.rest&&ve(i.rest,r))}return!1}var xp=(t,e={})=>r=>{let i=xt({...r,processors:e});return V(t,i),It(i,t),Ot(i,t)},Cn=(t,e,r={})=>i=>{let{libraryOptions:n,target:o}=i??{},s=xt({...n??{},target:o,io:e,processors:r});return V(t,s),It(s,t),Ot(s,t)};var RT={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},Ip=(t,e,r,i)=>{let n=r;n.type="string";let{minimum:o,maximum:s,format:a,patterns:c,contentEncoding:l}=t._zod.bag;if(typeof o=="number"&&(n.minLength=o),typeof s=="number"&&(n.maxLength=s),a&&(n.format=RT[a]??a,n.format===""&&delete n.format,a==="time"&&delete n.format),l&&(n.contentEncoding=l),c&&c.size>0){let d=[...c];d.length===1?n.pattern=d[0].source:d.length>1&&(n.allOf=[...d.map(u=>({...e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0"?{type:"string"}:{},pattern:u.source}))])}},Op=(t,e,r,i)=>{let n=r,{minimum:o,maximum:s,format:a,multipleOf:c,exclusiveMaximum:l,exclusiveMinimum:d}=t._zod.bag;typeof a=="string"&&a.includes("int")?n.type="integer":n.type="number",typeof d=="number"&&(e.target==="draft-04"||e.target==="openapi-3.0"?(n.minimum=d,n.exclusiveMinimum=!0):n.exclusiveMinimum=d),typeof o=="number"&&(n.minimum=o,typeof d=="number"&&e.target!=="draft-04"&&(d>=o?delete n.minimum:delete n.exclusiveMinimum)),typeof l=="number"&&(e.target==="draft-04"||e.target==="openapi-3.0"?(n.maximum=l,n.exclusiveMaximum=!0):n.exclusiveMaximum=l),typeof s=="number"&&(n.maximum=s,typeof l=="number"&&e.target!=="draft-04"&&(l<=s?delete n.maximum:delete n.exclusiveMaximum)),typeof c=="number"&&(n.multipleOf=c)},Pp=(t,e,r,i)=>{r.type="boolean"},Tp=(t,e,r,i)=>{if(e.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema")},Ap=(t,e,r,i)=>{if(e.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema")},Ep=(t,e,r,i)=>{e.target==="openapi-3.0"?(r.type="string",r.nullable=!0,r.enum=[null]):r.type="null"},zp=(t,e,r,i)=>{if(e.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema")},Np=(t,e,r,i)=>{if(e.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema")},Cp=(t,e,r,i)=>{r.not={}},Dp=(t,e,r,i)=>{},jp=(t,e,r,i)=>{},Rp=(t,e,r,i)=>{if(e.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},Up=(t,e,r,i)=>{let n=t._zod.def,o=jr(n.entries);o.every(s=>typeof s=="number")&&(r.type="number"),o.every(s=>typeof s=="string")&&(r.type="string"),r.enum=o},Lp=(t,e,r,i)=>{let n=t._zod.def,o=[];for(let s of n.values)if(s===void 0){if(e.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof s=="bigint"){if(e.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");o.push(Number(s))}else o.push(s);if(o.length!==0)if(o.length===1){let s=o[0];r.type=s===null?"null":typeof s,e.target==="draft-04"||e.target==="openapi-3.0"?r.enum=[s]:r.const=s}else o.every(s=>typeof s=="number")&&(r.type="number"),o.every(s=>typeof s=="string")&&(r.type="string"),o.every(s=>typeof s=="boolean")&&(r.type="boolean"),o.every(s=>s===null)&&(r.type="null"),r.enum=o},Mp=(t,e,r,i)=>{if(e.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema")},qp=(t,e,r,i)=>{let n=r,o=t._zod.pattern;if(!o)throw new Error("Pattern not found in template literal");n.type="string",n.pattern=o.source},Zp=(t,e,r,i)=>{let n=r,o={type:"string",format:"binary",contentEncoding:"binary"},{minimum:s,maximum:a,mime:c}=t._zod.bag;s!==void 0&&(o.minLength=s),a!==void 0&&(o.maxLength=a),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)},Fp=(t,e,r,i)=>{r.type="boolean"},Bp=(t,e,r,i)=>{if(e.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},Vp=(t,e,r,i)=>{if(e.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema")},Gp=(t,e,r,i)=>{if(e.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},Jp=(t,e,r,i)=>{if(e.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema")},Kp=(t,e,r,i)=>{if(e.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema")},Wp=(t,e,r,i)=>{let n=r,o=t._zod.def,{minimum:s,maximum:a}=t._zod.bag;typeof s=="number"&&(n.minItems=s),typeof a=="number"&&(n.maxItems=a),n.type="array",n.items=V(o.element,e,{...i,path:[...i.path,"items"]})},Yp=(t,e,r,i)=>{let n=r,o=t._zod.def;n.type="object",n.properties={};let s=o.shape;for(let l in s)n.properties[l]=V(s[l],e,{...i,path:[...i.path,"properties",l]});let a=new Set(Object.keys(s)),c=new Set([...a].filter(l=>{let d=o.shape[l]._zod;return e.io==="input"?d.optin===void 0:d.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=V(o.catchall,e,{...i,path:[...i.path,"additionalProperties"]})):e.io==="output"&&(n.additionalProperties=!1)},Ss=(t,e,r,i)=>{let n=t._zod.def,o=n.inclusive===!1,s=n.options.map((a,c)=>V(a,e,{...i,path:[...i.path,o?"oneOf":"anyOf",c]}));o?r.oneOf=s:r.anyOf=s},Hp=(t,e,r,i)=>{let n=t._zod.def,o=V(n.left,e,{...i,path:[...i.path,"allOf",0]}),s=V(n.right,e,{...i,path:[...i.path,"allOf",1]}),a=l=>"allOf"in l&&Object.keys(l).length===1,c=[...a(o)?o.allOf:[o],...a(s)?s.allOf:[s]];r.allOf=c},Xp=(t,e,r,i)=>{let n=r,o=t._zod.def;n.type="array";let s=e.target==="draft-2020-12"?"prefixItems":"items",a=e.target==="draft-2020-12"||e.target==="openapi-3.0"?"items":"additionalItems",c=o.items.map((p,f)=>V(p,e,{...i,path:[...i.path,s,f]})),l=o.rest?V(o.rest,e,{...i,path:[...i.path,a,...e.target==="openapi-3.0"?[o.items.length]:[]]}):null;e.target==="draft-2020-12"?(n.prefixItems=c,l&&(n.items=l)):e.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:d,maximum:u}=t._zod.bag;typeof d=="number"&&(n.minItems=d),typeof u=="number"&&(n.maxItems=u)},Qp=(t,e,r,i)=>{let n=r,o=t._zod.def;n.type="object";let s=o.keyType,c=s._zod.bag?.patterns;if(o.mode==="loose"&&c&&c.size>0){let d=V(o.valueType,e,{...i,path:[...i.path,"patternProperties","*"]});n.patternProperties={};for(let u of c)n.patternProperties[u.source]=d}else(e.target==="draft-07"||e.target==="draft-2020-12")&&(n.propertyNames=V(o.keyType,e,{...i,path:[...i.path,"propertyNames"]})),n.additionalProperties=V(o.valueType,e,{...i,path:[...i.path,"additionalProperties"]});let l=s._zod.values;if(l){let d=[...l].filter(u=>typeof u=="string"||typeof u=="number");d.length>0&&(n.required=d)}},ef=(t,e,r,i)=>{let n=t._zod.def,o=V(n.innerType,e,i),s=e.seen.get(t);e.target==="openapi-3.0"?(s.ref=n.innerType,r.nullable=!0):r.anyOf=[o,{type:"null"}]},tf=(t,e,r,i)=>{let n=t._zod.def;V(n.innerType,e,i);let o=e.seen.get(t);o.ref=n.innerType},nf=(t,e,r,i)=>{let n=t._zod.def;V(n.innerType,e,i);let o=e.seen.get(t);o.ref=n.innerType,r.default=JSON.parse(JSON.stringify(n.defaultValue))},rf=(t,e,r,i)=>{let n=t._zod.def;V(n.innerType,e,i);let o=e.seen.get(t);o.ref=n.innerType,e.io==="input"&&(r._prefault=JSON.parse(JSON.stringify(n.defaultValue)))},of=(t,e,r,i)=>{let n=t._zod.def;V(n.innerType,e,i);let o=e.seen.get(t);o.ref=n.innerType;let s;try{s=n.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}r.default=s},sf=(t,e,r,i)=>{let n=t._zod.def,o=e.io==="input"?n.in._zod.def.type==="transform"?n.out:n.in:n.out;V(o,e,i);let s=e.seen.get(t);s.ref=o},af=(t,e,r,i)=>{let n=t._zod.def;V(n.innerType,e,i);let o=e.seen.get(t);o.ref=n.innerType,r.readOnly=!0},cf=(t,e,r,i)=>{let n=t._zod.def;V(n.innerType,e,i);let o=e.seen.get(t);o.ref=n.innerType},xs=(t,e,r,i)=>{let n=t._zod.def;V(n.innerType,e,i);let o=e.seen.get(t);o.ref=n.innerType},lf=(t,e,r,i)=>{let n=t._zod.innerType;V(n,e,i);let o=e.seen.get(t);o.ref=n},ks={string:Ip,number:Op,boolean:Pp,bigint:Tp,symbol:Ap,null:Ep,undefined:zp,void:Np,never:Cp,any:Dp,unknown:jp,date:Rp,enum:Up,literal:Lp,nan:Mp,template_literal:qp,file:Zp,success:Fp,custom:Bp,function:Vp,transform:Gp,map:Jp,set:Kp,array:Wp,object:Yp,union:Ss,intersection:Hp,tuple:Xp,record:Qp,nullable:ef,nonoptional:tf,default:nf,prefault:rf,catch:of,pipe:sf,readonly:af,promise:cf,optional:xs,lazy:lf};function Is(t,e){if("_idmap"in t){let i=t,n=xt({...e,processors:ks}),o={};for(let c of i._idmap.entries()){let[l,d]=c;V(d,n)}let s={},a={registry:i,uri:e?.uri,defs:o};n.external=a;for(let c of i._idmap.entries()){let[l,d]=c;It(n,d),s[l]=Ot(n,d)}if(Object.keys(o).length>0){let c=n.target==="draft-2020-12"?"$defs":"definitions";s.__shared={[c]:o}}return{schemas:s}}let r=xt({...e,processors:ks});return V(t,r),It(r,t),Ot(r,t)}var Os=class{get metadataRegistry(){return this.ctx.metadataRegistry}get target(){return this.ctx.target}get unrepresentable(){return this.ctx.unrepresentable}get override(){return this.ctx.override}get io(){return this.ctx.io}get counter(){return this.ctx.counter}set counter(e){this.ctx.counter=e}get seen(){return this.ctx.seen}constructor(e){let r=e?.target??"draft-2020-12";r==="draft-4"&&(r="draft-04"),r==="draft-7"&&(r="draft-07"),this.ctx=xt({processors:ks,target:r,...e?.metadata&&{metadata:e.metadata},...e?.unrepresentable&&{unrepresentable:e.unrepresentable},...e?.override&&{override:e.override},...e?.io&&{io:e.io}})}process(e,r={path:[],schemaPath:[]}){return V(e,this.ctx,r)}emit(e,r){r&&(r.cycles&&(this.ctx.cycles=r.cycles),r.reused&&(this.ctx.reused=r.reused),r.external&&(this.ctx.external=r.external)),It(this.ctx,e);let i=Ot(this.ctx,e),{"~standard":n,...o}=i;return o}};var Sv={};var ei={};Xe(ei,{ZodAny:()=>Nf,ZodArray:()=>Rf,ZodBase64:()=>Ks,ZodBase64URL:()=>Ws,ZodBigInt:()=>qn,ZodBigIntFormat:()=>Xs,ZodBoolean:()=>Mn,ZodCIDRv4:()=>Gs,ZodCIDRv6:()=>Js,ZodCUID:()=>Ls,ZodCUID2:()=>Ms,ZodCatch:()=>om,ZodCodec:()=>sa,ZodCustom:()=>di,ZodCustomStringFormat:()=>Un,ZodDate:()=>si,ZodDefault:()=>Qf,ZodDiscriminatedUnion:()=>Lf,ZodE164:()=>Ys,ZodEmail:()=>js,ZodEmoji:()=>Rs,ZodEnum:()=>jn,ZodExactOptional:()=>Yf,ZodFile:()=>Kf,ZodFunction:()=>mm,ZodGUID:()=>ti,ZodIPv4:()=>Bs,ZodIPv6:()=>Vs,ZodIntersection:()=>Mf,ZodJWT:()=>Hs,ZodKSUID:()=>Fs,ZodLazy:()=>dm,ZodLiteral:()=>Jf,ZodMAC:()=>If,ZodMap:()=>Vf,ZodNaN:()=>am,ZodNanoID:()=>Us,ZodNever:()=>Df,ZodNonOptional:()=>ia,ZodNull:()=>Ef,ZodNullable:()=>Xf,ZodNumber:()=>Ln,ZodNumberFormat:()=>Wt,ZodObject:()=>ci,ZodOptional:()=>ra,ZodPipe:()=>oa,ZodPrefault:()=>tm,ZodPromise:()=>fm,ZodReadonly:()=>cm,ZodRecord:()=>ui,ZodSet:()=>Gf,ZodString:()=>Rn,ZodStringFormat:()=>Y,ZodSuccess:()=>im,ZodSymbol:()=>Tf,ZodTemplateLiteral:()=>um,ZodTransform:()=>Wf,ZodTuple:()=>Zf,ZodType:()=>U,ZodULID:()=>qs,ZodURL:()=>oi,ZodUUID:()=>We,ZodUndefined:()=>Af,ZodUnion:()=>li,ZodUnknown:()=>Cf,ZodVoid:()=>jf,ZodXID:()=>Zs,ZodXor:()=>Uf,_ZodString:()=>Ds,_default:()=>em,_function:()=>Eb,any:()=>lb,array:()=>ai,base64:()=>Gv,base64url:()=>Jv,bigint:()=>ib,boolean:()=>Pf,catch:()=>sm,check:()=>zb,cidrv4:()=>Bv,cidrv6:()=>Vv,codec:()=>Pb,cuid:()=>jv,cuid2:()=>Rv,custom:()=>Nb,date:()=>db,describe:()=>Cb,discriminatedUnion:()=>yb,e164:()=>Kv,email:()=>Iv,emoji:()=>Cv,enum:()=>ta,exactOptional:()=>Hf,file:()=>Sb,float32:()=>eb,float64:()=>tb,function:()=>Eb,guid:()=>Ov,hash:()=>Qv,hex:()=>Xv,hostname:()=>Hv,httpUrl:()=>Nv,instanceof:()=>jb,int:()=>Cs,int32:()=>nb,int64:()=>ob,intersection:()=>qf,ipv4:()=>qv,ipv6:()=>Fv,json:()=>Ub,jwt:()=>Wv,keyof:()=>pb,ksuid:()=>Mv,lazy:()=>pm,literal:()=>kb,looseObject:()=>gb,looseRecord:()=>vb,mac:()=>Zv,map:()=>bb,meta:()=>Db,nan:()=>Ob,nanoid:()=>Dv,nativeEnum:()=>$b,never:()=>Qs,nonoptional:()=>rm,null:()=>zf,nullable:()=>ri,nullish:()=>xb,number:()=>Of,object:()=>fb,optional:()=>ni,partialRecord:()=>_b,pipe:()=>ii,prefault:()=>nm,preprocess:()=>Lb,promise:()=>Ab,readonly:()=>lm,record:()=>Bf,refine:()=>gm,set:()=>wb,strictObject:()=>mb,string:()=>Ns,stringFormat:()=>Yv,stringbool:()=>Rb,success:()=>Ib,superRefine:()=>hm,symbol:()=>ab,templateLiteral:()=>Tb,transform:()=>na,tuple:()=>Ff,uint32:()=>rb,uint64:()=>sb,ulid:()=>Uv,undefined:()=>cb,union:()=>ea,unknown:()=>Kt,url:()=>zv,uuid:()=>Pv,uuidv4:()=>Tv,uuidv6:()=>Av,uuidv7:()=>Ev,void:()=>ub,xid:()=>Lv,xor:()=>hb});var Ps={};Xe(Ps,{endsWith:()=>In,gt:()=>Je,gte:()=>_e,includes:()=>Sn,length:()=>Jt,lowercase:()=>$n,lt:()=>Ge,lte:()=>Ie,maxLength:()=>Gt,maxSize:()=>St,mime:()=>On,minLength:()=>rt,minSize:()=>Ke,multipleOf:()=>kt,negative:()=>vs,nonnegative:()=>ws,nonpositive:()=>bs,normalize:()=>Pn,overwrite:()=>qe,positive:()=>_s,property:()=>$s,regex:()=>wn,size:()=>Vt,slugify:()=>zn,startsWith:()=>xn,toLowerCase:()=>An,toUpperCase:()=>En,trim:()=>Tn,uppercase:()=>kn});var Dn={};Xe(Dn,{ZodISODate:()=>As,ZodISODateTime:()=>Ts,ZodISODuration:()=>zs,ZodISOTime:()=>Es,date:()=>df,datetime:()=>uf,duration:()=>ff,time:()=>pf});var Ts=_("ZodISODateTime",(t,e)=>{Mu.init(t,e),Y.init(t,e)});function uf(t){return Bd(Ts,t)}var As=_("ZodISODate",(t,e)=>{qu.init(t,e),Y.init(t,e)});function df(t){return Vd(As,t)}var Es=_("ZodISOTime",(t,e)=>{Zu.init(t,e),Y.init(t,e)});function pf(t){return Gd(Es,t)}var zs=_("ZodISODuration",(t,e)=>{Fu.init(t,e),Y.init(t,e)});function ff(t){return Jd(zs,t)}var xv=(t,e)=>{qr.init(t,e),t.name="ZodError",Object.defineProperties(t,{format:{value:r=>Fr(t,r)},flatten:{value:r=>Zr(t,r)},addIssue:{value:r=>{t.issues.push(r),t.message=JSON.stringify(t.issues,pn,2)}},addIssues:{value:r=>{t.issues.push(...r),t.message=JSON.stringify(t.issues,pn,2)}},isEmpty:{get(){return t.issues.length===0}}})},LT=_("ZodError",xv),Se=_("ZodError",xv,{Parent:Error});var mf=gn(Se),gf=hn(Se),hf=yn(Se),yf=_n(Se),_f=Io(Se),vf=Oo(Se),bf=Po(Se),wf=To(Se),$f=Ao(Se),kf=Eo(Se),Sf=zo(Se),xf=No(Se);var U=_("ZodType",(t,e)=>(R.init(t,e),Object.assign(t["~standard"],{jsonSchema:{input:Cn(t,"input"),output:Cn(t,"output")}}),t.toJSONSchema=xp(t,{}),t.def=e,t.type=e.type,Object.defineProperty(t,"_def",{value:e}),t.check=(...r)=>t.clone(P.mergeDefs(e,{checks:[...e.checks??[],...r.map(i=>typeof i=="function"?{_zod:{check:i,def:{check:"custom"},onattach:[]}}:i)]}),{parent:!0}),t.with=t.check,t.clone=(r,i)=>ye(t,r,i),t.brand=()=>t,t.register=(r,i)=>(r.add(t,i),t),t.parse=(r,i)=>mf(t,r,i,{callee:t.parse}),t.safeParse=(r,i)=>hf(t,r,i),t.parseAsync=async(r,i)=>gf(t,r,i,{callee:t.parseAsync}),t.safeParseAsync=async(r,i)=>yf(t,r,i),t.spa=t.safeParseAsync,t.encode=(r,i)=>_f(t,r,i),t.decode=(r,i)=>vf(t,r,i),t.encodeAsync=async(r,i)=>bf(t,r,i),t.decodeAsync=async(r,i)=>wf(t,r,i),t.safeEncode=(r,i)=>$f(t,r,i),t.safeDecode=(r,i)=>kf(t,r,i),t.safeEncodeAsync=async(r,i)=>Sf(t,r,i),t.safeDecodeAsync=async(r,i)=>xf(t,r,i),t.refine=(r,i)=>t.check(gm(r,i)),t.superRefine=r=>t.check(hm(r)),t.overwrite=r=>t.check(qe(r)),t.optional=()=>ni(t),t.exactOptional=()=>Hf(t),t.nullable=()=>ri(t),t.nullish=()=>ni(ri(t)),t.nonoptional=r=>rm(t,r),t.array=()=>ai(t),t.or=r=>ea([t,r]),t.and=r=>qf(t,r),t.transform=r=>ii(t,na(r)),t.default=r=>em(t,r),t.prefault=r=>nm(t,r),t.catch=r=>sm(t,r),t.pipe=r=>ii(t,r),t.readonly=()=>lm(t),t.describe=r=>{let i=t.clone();return pe.add(i,{description:r}),i},Object.defineProperty(t,"description",{get(){return pe.get(t)?.description},configurable:!0}),t.meta=(...r)=>{if(r.length===0)return pe.get(t);let i=t.clone();return pe.add(i,r[0]),i},t.isOptional=()=>t.safeParse(void 0).success,t.isNullable=()=>t.safeParse(null).success,t.apply=r=>r(t),t)),Ds=_("_ZodString",(t,e)=>{Bt.init(t,e),U.init(t,e),t._zod.processJSONSchema=(i,n,o)=>Ip(t,i,n,o);let r=t._zod.bag;t.format=r.format??null,t.minLength=r.minimum??null,t.maxLength=r.maximum??null,t.regex=(...i)=>t.check(wn(...i)),t.includes=(...i)=>t.check(Sn(...i)),t.startsWith=(...i)=>t.check(xn(...i)),t.endsWith=(...i)=>t.check(In(...i)),t.min=(...i)=>t.check(rt(...i)),t.max=(...i)=>t.check(Gt(...i)),t.length=(...i)=>t.check(Jt(...i)),t.nonempty=(...i)=>t.check(rt(1,...i)),t.lowercase=i=>t.check($n(i)),t.uppercase=i=>t.check(kn(i)),t.trim=()=>t.check(Tn()),t.normalize=(...i)=>t.check(Pn(...i)),t.toLowerCase=()=>t.check(An()),t.toUpperCase=()=>t.check(En()),t.slugify=()=>t.check(zn())}),Rn=_("ZodString",(t,e)=>{Bt.init(t,e),Ds.init(t,e),t.email=r=>t.check(Xo(js,r)),t.url=r=>t.check(Qr(oi,r)),t.jwt=r=>t.check(ys(Hs,r)),t.emoji=r=>t.check(rs(Rs,r)),t.guid=r=>t.check(Xr(ti,r)),t.uuid=r=>t.check(Qo(We,r)),t.uuidv4=r=>t.check(es(We,r)),t.uuidv6=r=>t.check(ts(We,r)),t.uuidv7=r=>t.check(ns(We,r)),t.nanoid=r=>t.check(is(Us,r)),t.guid=r=>t.check(Xr(ti,r)),t.cuid=r=>t.check(os(Ls,r)),t.cuid2=r=>t.check(ss(Ms,r)),t.ulid=r=>t.check(as(qs,r)),t.base64=r=>t.check(ms(Ks,r)),t.base64url=r=>t.check(gs(Ws,r)),t.xid=r=>t.check(cs(Zs,r)),t.ksuid=r=>t.check(ls(Fs,r)),t.ipv4=r=>t.check(us(Bs,r)),t.ipv6=r=>t.check(ds(Vs,r)),t.cidrv4=r=>t.check(ps(Gs,r)),t.cidrv6=r=>t.check(fs(Js,r)),t.e164=r=>t.check(hs(Ys,r)),t.datetime=r=>t.check(uf(r)),t.date=r=>t.check(df(r)),t.time=r=>t.check(pf(r)),t.duration=r=>t.check(ff(r))});function Ns(t){return Md(Rn,t)}var Y=_("ZodStringFormat",(t,e)=>{W.init(t,e),Ds.init(t,e)}),js=_("ZodEmail",(t,e)=>{Eu.init(t,e),Y.init(t,e)});function Iv(t){return Xo(js,t)}var ti=_("ZodGUID",(t,e)=>{Tu.init(t,e),Y.init(t,e)});function Ov(t){return Xr(ti,t)}var We=_("ZodUUID",(t,e)=>{Au.init(t,e),Y.init(t,e)});function Pv(t){return Qo(We,t)}function Tv(t){return es(We,t)}function Av(t){return ts(We,t)}function Ev(t){return ns(We,t)}var oi=_("ZodURL",(t,e)=>{zu.init(t,e),Y.init(t,e)});function zv(t){return Qr(oi,t)}function Nv(t){return Qr(oi,{protocol:/^https?$/,hostname:Ee.domain,...P.normalizeParams(t)})}var Rs=_("ZodEmoji",(t,e)=>{Nu.init(t,e),Y.init(t,e)});function Cv(t){return rs(Rs,t)}var Us=_("ZodNanoID",(t,e)=>{Cu.init(t,e),Y.init(t,e)});function Dv(t){return is(Us,t)}var Ls=_("ZodCUID",(t,e)=>{Du.init(t,e),Y.init(t,e)});function jv(t){return os(Ls,t)}var Ms=_("ZodCUID2",(t,e)=>{ju.init(t,e),Y.init(t,e)});function Rv(t){return ss(Ms,t)}var qs=_("ZodULID",(t,e)=>{Ru.init(t,e),Y.init(t,e)});function Uv(t){return as(qs,t)}var Zs=_("ZodXID",(t,e)=>{Uu.init(t,e),Y.init(t,e)});function Lv(t){return cs(Zs,t)}var Fs=_("ZodKSUID",(t,e)=>{Lu.init(t,e),Y.init(t,e)});function Mv(t){return ls(Fs,t)}var Bs=_("ZodIPv4",(t,e)=>{Bu.init(t,e),Y.init(t,e)});function qv(t){return us(Bs,t)}var If=_("ZodMAC",(t,e)=>{Gu.init(t,e),Y.init(t,e)});function Zv(t){return Zd(If,t)}var Vs=_("ZodIPv6",(t,e)=>{Vu.init(t,e),Y.init(t,e)});function Fv(t){return ds(Vs,t)}var Gs=_("ZodCIDRv4",(t,e)=>{Ju.init(t,e),Y.init(t,e)});function Bv(t){return ps(Gs,t)}var Js=_("ZodCIDRv6",(t,e)=>{Ku.init(t,e),Y.init(t,e)});function Vv(t){return fs(Js,t)}var Ks=_("ZodBase64",(t,e)=>{Yu.init(t,e),Y.init(t,e)});function Gv(t){return ms(Ks,t)}var Ws=_("ZodBase64URL",(t,e)=>{Hu.init(t,e),Y.init(t,e)});function Jv(t){return gs(Ws,t)}var Ys=_("ZodE164",(t,e)=>{Xu.init(t,e),Y.init(t,e)});function Kv(t){return hs(Ys,t)}var Hs=_("ZodJWT",(t,e)=>{Qu.init(t,e),Y.init(t,e)});function Wv(t){return ys(Hs,t)}var Un=_("ZodCustomStringFormat",(t,e)=>{ed.init(t,e),Y.init(t,e)});function Yv(t,e,r={}){return Nn(Un,t,e,r)}function Hv(t){return Nn(Un,"hostname",Ee.hostname,t)}function Xv(t){return Nn(Un,"hex",Ee.hex,t)}function Qv(t,e){let r=e?.enc??"hex",i=`${t}_${r}`,n=Ee[i];if(!n)throw new Error(`Unrecognized hash format: ${i}`);return Nn(Un,i,n,e)}var Ln=_("ZodNumber",(t,e)=>{Fo.init(t,e),U.init(t,e),t._zod.processJSONSchema=(i,n,o)=>Op(t,i,n,o),t.gt=(i,n)=>t.check(Je(i,n)),t.gte=(i,n)=>t.check(_e(i,n)),t.min=(i,n)=>t.check(_e(i,n)),t.lt=(i,n)=>t.check(Ge(i,n)),t.lte=(i,n)=>t.check(Ie(i,n)),t.max=(i,n)=>t.check(Ie(i,n)),t.int=i=>t.check(Cs(i)),t.safe=i=>t.check(Cs(i)),t.positive=i=>t.check(Je(0,i)),t.nonnegative=i=>t.check(_e(0,i)),t.negative=i=>t.check(Ge(0,i)),t.nonpositive=i=>t.check(Ie(0,i)),t.multipleOf=(i,n)=>t.check(kt(i,n)),t.step=(i,n)=>t.check(kt(i,n)),t.finite=()=>t;let r=t._zod.bag;t.minValue=Math.max(r.minimum??Number.NEGATIVE_INFINITY,r.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,t.maxValue=Math.min(r.maximum??Number.POSITIVE_INFINITY,r.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,t.isInt=(r.format??"").includes("int")||Number.isSafeInteger(r.multipleOf??.5),t.isFinite=!0,t.format=r.format??null});function Of(t){return Kd(Ln,t)}var Wt=_("ZodNumberFormat",(t,e)=>{td.init(t,e),Ln.init(t,e)});function Cs(t){return Yd(Wt,t)}function eb(t){return Hd(Wt,t)}function tb(t){return Xd(Wt,t)}function nb(t){return Qd(Wt,t)}function rb(t){return ep(Wt,t)}var Mn=_("ZodBoolean",(t,e)=>{Jr.init(t,e),U.init(t,e),t._zod.processJSONSchema=(r,i,n)=>Pp(t,r,i,n)});function Pf(t){return tp(Mn,t)}var qn=_("ZodBigInt",(t,e)=>{Bo.init(t,e),U.init(t,e),t._zod.processJSONSchema=(i,n,o)=>Tp(t,i,n,o),t.gte=(i,n)=>t.check(_e(i,n)),t.min=(i,n)=>t.check(_e(i,n)),t.gt=(i,n)=>t.check(Je(i,n)),t.gte=(i,n)=>t.check(_e(i,n)),t.min=(i,n)=>t.check(_e(i,n)),t.lt=(i,n)=>t.check(Ge(i,n)),t.lte=(i,n)=>t.check(Ie(i,n)),t.max=(i,n)=>t.check(Ie(i,n)),t.positive=i=>t.check(Je(BigInt(0),i)),t.negative=i=>t.check(Ge(BigInt(0),i)),t.nonpositive=i=>t.check(Ie(BigInt(0),i)),t.nonnegative=i=>t.check(_e(BigInt(0),i)),t.multipleOf=(i,n)=>t.check(kt(i,n));let r=t._zod.bag;t.minValue=r.minimum??null,t.maxValue=r.maximum??null,t.format=r.format??null});function ib(t){return rp(qn,t)}var Xs=_("ZodBigIntFormat",(t,e)=>{nd.init(t,e),qn.init(t,e)});function ob(t){return op(Xs,t)}function sb(t){return sp(Xs,t)}var Tf=_("ZodSymbol",(t,e)=>{rd.init(t,e),U.init(t,e),t._zod.processJSONSchema=(r,i,n)=>Ap(t,r,i,n)});function ab(t){return ap(Tf,t)}var Af=_("ZodUndefined",(t,e)=>{id.init(t,e),U.init(t,e),t._zod.processJSONSchema=(r,i,n)=>zp(t,r,i,n)});function cb(t){return cp(Af,t)}var Ef=_("ZodNull",(t,e)=>{od.init(t,e),U.init(t,e),t._zod.processJSONSchema=(r,i,n)=>Ep(t,r,i,n)});function zf(t){return lp(Ef,t)}var Nf=_("ZodAny",(t,e)=>{sd.init(t,e),U.init(t,e),t._zod.processJSONSchema=(r,i,n)=>Dp(t,r,i,n)});function lb(){return up(Nf)}var Cf=_("ZodUnknown",(t,e)=>{ad.init(t,e),U.init(t,e),t._zod.processJSONSchema=(r,i,n)=>jp(t,r,i,n)});function Kt(){return dp(Cf)}var Df=_("ZodNever",(t,e)=>{cd.init(t,e),U.init(t,e),t._zod.processJSONSchema=(r,i,n)=>Cp(t,r,i,n)});function Qs(t){return pp(Df,t)}var jf=_("ZodVoid",(t,e)=>{ld.init(t,e),U.init(t,e),t._zod.processJSONSchema=(r,i,n)=>Np(t,r,i,n)});function ub(t){return fp(jf,t)}var si=_("ZodDate",(t,e)=>{ud.init(t,e),U.init(t,e),t._zod.processJSONSchema=(i,n,o)=>Rp(t,i,n,o),t.min=(i,n)=>t.check(_e(i,n)),t.max=(i,n)=>t.check(Ie(i,n));let r=t._zod.bag;t.minDate=r.minimum?new Date(r.minimum):null,t.maxDate=r.maximum?new Date(r.maximum):null});function db(t){return mp(si,t)}var Rf=_("ZodArray",(t,e)=>{dd.init(t,e),U.init(t,e),t._zod.processJSONSchema=(r,i,n)=>Wp(t,r,i,n),t.element=e.element,t.min=(r,i)=>t.check(rt(r,i)),t.nonempty=r=>t.check(rt(1,r)),t.max=(r,i)=>t.check(Gt(r,i)),t.length=(r,i)=>t.check(Jt(r,i)),t.unwrap=()=>t.element});function ai(t,e){return yp(Rf,t,e)}function pb(t){let e=t._zod.def.shape;return ta(Object.keys(e))}var ci=_("ZodObject",(t,e)=>{pd.init(t,e),U.init(t,e),t._zod.processJSONSchema=(r,i,n)=>Yp(t,r,i,n),P.defineLazy(t,"shape",()=>e.shape),t.keyof=()=>ta(Object.keys(t._zod.def.shape)),t.catchall=r=>t.clone({...t._zod.def,catchall:r}),t.passthrough=()=>t.clone({...t._zod.def,catchall:Kt()}),t.loose=()=>t.clone({...t._zod.def,catchall:Kt()}),t.strict=()=>t.clone({...t._zod.def,catchall:Qs()}),t.strip=()=>t.clone({...t._zod.def,catchall:void 0}),t.extend=r=>P.extend(t,r),t.safeExtend=r=>P.safeExtend(t,r),t.merge=r=>P.merge(t,r),t.pick=r=>P.pick(t,r),t.omit=r=>P.omit(t,r),t.partial=(...r)=>P.partial(ra,t,r[0]),t.required=(...r)=>P.required(ia,t,r[0])});function fb(t,e){let r={type:"object",shape:t??{},...P.normalizeParams(e)};return new ci(r)}function mb(t,e){return new ci({type:"object",shape:t,catchall:Qs(),...P.normalizeParams(e)})}function gb(t,e){return new ci({type:"object",shape:t,catchall:Kt(),...P.normalizeParams(e)})}var li=_("ZodUnion",(t,e)=>{Kr.init(t,e),U.init(t,e),t._zod.processJSONSchema=(r,i,n)=>Ss(t,r,i,n),t.options=e.options});function ea(t,e){return new li({type:"union",options:t,...P.normalizeParams(e)})}var Uf=_("ZodXor",(t,e)=>{li.init(t,e),fd.init(t,e),t._zod.processJSONSchema=(r,i,n)=>Ss(t,r,i,n),t.options=e.options});function hb(t,e){return new Uf({type:"union",options:t,inclusive:!1,...P.normalizeParams(e)})}var Lf=_("ZodDiscriminatedUnion",(t,e)=>{li.init(t,e),md.init(t,e)});function yb(t,e,r){return new Lf({type:"union",options:e,discriminator:t,...P.normalizeParams(r)})}var Mf=_("ZodIntersection",(t,e)=>{gd.init(t,e),U.init(t,e),t._zod.processJSONSchema=(r,i,n)=>Hp(t,r,i,n)});function qf(t,e){return new Mf({type:"intersection",left:t,right:e})}var Zf=_("ZodTuple",(t,e)=>{Vo.init(t,e),U.init(t,e),t._zod.processJSONSchema=(r,i,n)=>Xp(t,r,i,n),t.rest=r=>t.clone({...t._zod.def,rest:r})});function Ff(t,e,r){let i=e instanceof R,n=i?r:e,o=i?e:null;return new Zf({type:"tuple",items:t,rest:o,...P.normalizeParams(n)})}var ui=_("ZodRecord",(t,e)=>{hd.init(t,e),U.init(t,e),t._zod.processJSONSchema=(r,i,n)=>Qp(t,r,i,n),t.keyType=e.keyType,t.valueType=e.valueType});function Bf(t,e,r){return new ui({type:"record",keyType:t,valueType:e,...P.normalizeParams(r)})}function _b(t,e,r){let i=ye(t);return i._zod.values=void 0,new ui({type:"record",keyType:i,valueType:e,...P.normalizeParams(r)})}function vb(t,e,r){return new ui({type:"record",keyType:t,valueType:e,mode:"loose",...P.normalizeParams(r)})}var Vf=_("ZodMap",(t,e)=>{yd.init(t,e),U.init(t,e),t._zod.processJSONSchema=(r,i,n)=>Jp(t,r,i,n),t.keyType=e.keyType,t.valueType=e.valueType,t.min=(...r)=>t.check(Ke(...r)),t.nonempty=r=>t.check(Ke(1,r)),t.max=(...r)=>t.check(St(...r)),t.size=(...r)=>t.check(Vt(...r))});function bb(t,e,r){return new Vf({type:"map",keyType:t,valueType:e,...P.normalizeParams(r)})}var Gf=_("ZodSet",(t,e)=>{_d.init(t,e),U.init(t,e),t._zod.processJSONSchema=(r,i,n)=>Kp(t,r,i,n),t.min=(...r)=>t.check(Ke(...r)),t.nonempty=r=>t.check(Ke(1,r)),t.max=(...r)=>t.check(St(...r)),t.size=(...r)=>t.check(Vt(...r))});function wb(t,e){return new Gf({type:"set",valueType:t,...P.normalizeParams(e)})}var jn=_("ZodEnum",(t,e)=>{vd.init(t,e),U.init(t,e),t._zod.processJSONSchema=(i,n,o)=>Up(t,i,n,o),t.enum=e.entries,t.options=Object.values(e.entries);let r=new Set(Object.keys(e.entries));t.extract=(i,n)=>{let o={};for(let s of i)if(r.has(s))o[s]=e.entries[s];else throw new Error(`Key ${s} not found in enum`);return new jn({...e,checks:[],...P.normalizeParams(n),entries:o})},t.exclude=(i,n)=>{let o={...e.entries};for(let s of i)if(r.has(s))delete o[s];else throw new Error(`Key ${s} not found in enum`);return new jn({...e,checks:[],...P.normalizeParams(n),entries:o})}});function ta(t,e){let r=Array.isArray(t)?Object.fromEntries(t.map(i=>[i,i])):t;return new jn({type:"enum",entries:r,...P.normalizeParams(e)})}function $b(t,e){return new jn({type:"enum",entries:t,...P.normalizeParams(e)})}var Jf=_("ZodLiteral",(t,e)=>{bd.init(t,e),U.init(t,e),t._zod.processJSONSchema=(r,i,n)=>Lp(t,r,i,n),t.values=new Set(e.values),Object.defineProperty(t,"value",{get(){if(e.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return e.values[0]}})});function kb(t,e){return new Jf({type:"literal",values:Array.isArray(t)?t:[t],...P.normalizeParams(e)})}var Kf=_("ZodFile",(t,e)=>{wd.init(t,e),U.init(t,e),t._zod.processJSONSchema=(r,i,n)=>Zp(t,r,i,n),t.min=(r,i)=>t.check(Ke(r,i)),t.max=(r,i)=>t.check(St(r,i)),t.mime=(r,i)=>t.check(On(Array.isArray(r)?r:[r],i))});function Sb(t){return _p(Kf,t)}var Wf=_("ZodTransform",(t,e)=>{$d.init(t,e),U.init(t,e),t._zod.processJSONSchema=(r,i,n)=>Gp(t,r,i,n),t._zod.parse=(r,i)=>{if(i.direction==="backward")throw new _t(t.constructor.name);r.addIssue=o=>{if(typeof o=="string")r.issues.push(P.issue(o,r.value,e));else{let s=o;s.fatal&&(s.continue=!1),s.code??(s.code="custom"),s.input??(s.input=r.value),s.inst??(s.inst=t),r.issues.push(P.issue(s))}};let n=e.transform(r.value,r);return n instanceof Promise?n.then(o=>(r.value=o,r)):(r.value=n,r)}});function na(t){return new Wf({type:"transform",transform:t})}var ra=_("ZodOptional",(t,e)=>{Go.init(t,e),U.init(t,e),t._zod.processJSONSchema=(r,i,n)=>xs(t,r,i,n),t.unwrap=()=>t._zod.def.innerType});function ni(t){return new ra({type:"optional",innerType:t})}var Yf=_("ZodExactOptional",(t,e)=>{kd.init(t,e),U.init(t,e),t._zod.processJSONSchema=(r,i,n)=>xs(t,r,i,n),t.unwrap=()=>t._zod.def.innerType});function Hf(t){return new Yf({type:"optional",innerType:t})}var Xf=_("ZodNullable",(t,e)=>{Sd.init(t,e),U.init(t,e),t._zod.processJSONSchema=(r,i,n)=>ef(t,r,i,n),t.unwrap=()=>t._zod.def.innerType});function ri(t){return new Xf({type:"nullable",innerType:t})}function xb(t){return ni(ri(t))}var Qf=_("ZodDefault",(t,e)=>{xd.init(t,e),U.init(t,e),t._zod.processJSONSchema=(r,i,n)=>nf(t,r,i,n),t.unwrap=()=>t._zod.def.innerType,t.removeDefault=t.unwrap});function em(t,e){return new Qf({type:"default",innerType:t,get defaultValue(){return typeof e=="function"?e():P.shallowClone(e)}})}var tm=_("ZodPrefault",(t,e)=>{Id.init(t,e),U.init(t,e),t._zod.processJSONSchema=(r,i,n)=>rf(t,r,i,n),t.unwrap=()=>t._zod.def.innerType});function nm(t,e){return new tm({type:"prefault",innerType:t,get defaultValue(){return typeof e=="function"?e():P.shallowClone(e)}})}var ia=_("ZodNonOptional",(t,e)=>{Od.init(t,e),U.init(t,e),t._zod.processJSONSchema=(r,i,n)=>tf(t,r,i,n),t.unwrap=()=>t._zod.def.innerType});function rm(t,e){return new ia({type:"nonoptional",innerType:t,...P.normalizeParams(e)})}var im=_("ZodSuccess",(t,e)=>{Pd.init(t,e),U.init(t,e),t._zod.processJSONSchema=(r,i,n)=>Fp(t,r,i,n),t.unwrap=()=>t._zod.def.innerType});function Ib(t){return new im({type:"success",innerType:t})}var om=_("ZodCatch",(t,e)=>{Td.init(t,e),U.init(t,e),t._zod.processJSONSchema=(r,i,n)=>of(t,r,i,n),t.unwrap=()=>t._zod.def.innerType,t.removeCatch=t.unwrap});function sm(t,e){return new om({type:"catch",innerType:t,catchValue:typeof e=="function"?e:()=>e})}var am=_("ZodNaN",(t,e)=>{Ad.init(t,e),U.init(t,e),t._zod.processJSONSchema=(r,i,n)=>Mp(t,r,i,n)});function Ob(t){return hp(am,t)}var oa=_("ZodPipe",(t,e)=>{Ed.init(t,e),U.init(t,e),t._zod.processJSONSchema=(r,i,n)=>sf(t,r,i,n),t.in=e.in,t.out=e.out});function ii(t,e){return new oa({type:"pipe",in:t,out:e})}var sa=_("ZodCodec",(t,e)=>{oa.init(t,e),Wr.init(t,e)});function Pb(t,e,r){return new sa({type:"pipe",in:t,out:e,transform:r.decode,reverseTransform:r.encode})}var cm=_("ZodReadonly",(t,e)=>{zd.init(t,e),U.init(t,e),t._zod.processJSONSchema=(r,i,n)=>af(t,r,i,n),t.unwrap=()=>t._zod.def.innerType});function lm(t){return new cm({type:"readonly",innerType:t})}var um=_("ZodTemplateLiteral",(t,e)=>{Nd.init(t,e),U.init(t,e),t._zod.processJSONSchema=(r,i,n)=>qp(t,r,i,n)});function Tb(t,e){return new um({type:"template_literal",parts:t,...P.normalizeParams(e)})}var dm=_("ZodLazy",(t,e)=>{jd.init(t,e),U.init(t,e),t._zod.processJSONSchema=(r,i,n)=>lf(t,r,i,n),t.unwrap=()=>t._zod.def.getter()});function pm(t){return new dm({type:"lazy",getter:t})}var fm=_("ZodPromise",(t,e)=>{Dd.init(t,e),U.init(t,e),t._zod.processJSONSchema=(r,i,n)=>cf(t,r,i,n),t.unwrap=()=>t._zod.def.innerType});function Ab(t){return new fm({type:"promise",innerType:t})}var mm=_("ZodFunction",(t,e)=>{Cd.init(t,e),U.init(t,e),t._zod.processJSONSchema=(r,i,n)=>Vp(t,r,i,n)});function Eb(t){return new mm({type:"function",input:Array.isArray(t?.input)?Ff(t?.input):t?.input??ai(Kt()),output:t?.output??Kt()})}var di=_("ZodCustom",(t,e)=>{Rd.init(t,e),U.init(t,e),t._zod.processJSONSchema=(r,i,n)=>Bp(t,r,i,n)});function zb(t){let e=new X({check:"custom"});return e._zod.check=t,e}function Nb(t,e){return vp(di,t??(()=>!0),e)}function gm(t,e={}){return bp(di,t,e)}function hm(t){return wp(t)}var Cb=$p,Db=kp;function jb(t,e={}){let r=new di({type:"custom",check:"custom",fn:i=>i instanceof t,abort:!0,...P.normalizeParams(e)});return r._zod.bag.Class=t,r._zod.check=i=>{i.value instanceof t||i.issues.push({code:"invalid_type",expected:t.name,input:i.value,inst:r,path:[...r._zod.def.path??[]]})},r}var Rb=(...t)=>Sp({Codec:sa,Boolean:Mn,String:Rn},...t);function Ub(t){let e=pm(()=>ea([Ns(t),Of(),Pf(),zf(),ai(e),Bf(Ns(),e)]));return e}function Lb(t,e){return ii(na(t),e)}var qT={invalid_type:"invalid_type",too_big:"too_big",too_small:"too_small",invalid_format:"invalid_format",not_multiple_of:"not_multiple_of",unrecognized_keys:"unrecognized_keys",invalid_union:"invalid_union",invalid_key:"invalid_key",invalid_element:"invalid_element",invalid_value:"invalid_value",custom:"custom"};function ZT(t){ae({customError:t})}function FT(){return ae().customError}var ym;ym||(ym={});var D={...ei,...Ps,iso:Dn},BT=new Set(["$schema","$ref","$defs","definitions","$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor","type","enum","const","anyOf","oneOf","allOf","not","properties","required","additionalProperties","patternProperties","propertyNames","minProperties","maxProperties","items","prefixItems","additionalItems","minItems","maxItems","uniqueItems","contains","minContains","maxContains","minLength","maxLength","pattern","format","minimum","maximum","exclusiveMinimum","exclusiveMaximum","multipleOf","description","default","contentEncoding","contentMediaType","contentSchema","unevaluatedItems","unevaluatedProperties","if","then","else","dependentSchemas","dependentRequired","nullable","readOnly"]);function VT(t,e){let r=t.$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":e??"draft-2020-12"}function GT(t,e){if(!t.startsWith("#"))throw new Error("External $ref is not supported, only local refs (#/...) are allowed");let r=t.slice(1).split("/").filter(Boolean);if(r.length===0)return e.rootSchema;let i=e.version==="draft-2020-12"?"$defs":"definitions";if(r[0]===i){let n=r[1];if(!n||!e.defs[n])throw new Error(`Reference not found: ${t}`);return e.defs[n]}throw new Error(`Reference not found: ${t}`)}function Mb(t,e){if(t.not!==void 0){if(typeof t.not=="object"&&Object.keys(t.not).length===0)return D.never();throw new Error("not is not supported in Zod (except { not: {} } for never)")}if(t.unevaluatedItems!==void 0)throw new Error("unevaluatedItems is not supported");if(t.unevaluatedProperties!==void 0)throw new Error("unevaluatedProperties is not supported");if(t.if!==void 0||t.then!==void 0||t.else!==void 0)throw new Error("Conditional schemas (if/then/else) are not supported");if(t.dependentSchemas!==void 0||t.dependentRequired!==void 0)throw new Error("dependentSchemas and dependentRequired are not supported");if(t.$ref){let n=t.$ref;if(e.refs.has(n))return e.refs.get(n);if(e.processing.has(n))return D.lazy(()=>{if(!e.refs.has(n))throw new Error(`Circular reference not resolved: ${n}`);return e.refs.get(n)});e.processing.add(n);let o=GT(n,e),s=me(o,e);return e.refs.set(n,s),e.processing.delete(n),s}if(t.enum!==void 0){let n=t.enum;if(e.version==="openapi-3.0"&&t.nullable===!0&&n.length===1&&n[0]===null)return D.null();if(n.length===0)return D.never();if(n.length===1)return D.literal(n[0]);if(n.every(s=>typeof s=="string"))return D.enum(n);let o=n.map(s=>D.literal(s));return o.length<2?o[0]:D.union([o[0],o[1],...o.slice(2)])}if(t.const!==void 0)return D.literal(t.const);let r=t.type;if(Array.isArray(r)){let n=r.map(o=>{let s={...t,type:o};return Mb(s,e)});return n.length===0?D.never():n.length===1?n[0]:D.union(n)}if(!r)return D.any();let i;switch(r){case"string":{let n=D.string();if(t.format){let o=t.format;o==="email"?n=n.check(D.email()):o==="uri"||o==="uri-reference"?n=n.check(D.url()):o==="uuid"||o==="guid"?n=n.check(D.uuid()):o==="date-time"?n=n.check(D.iso.datetime()):o==="date"?n=n.check(D.iso.date()):o==="time"?n=n.check(D.iso.time()):o==="duration"?n=n.check(D.iso.duration()):o==="ipv4"?n=n.check(D.ipv4()):o==="ipv6"?n=n.check(D.ipv6()):o==="mac"?n=n.check(D.mac()):o==="cidr"?n=n.check(D.cidrv4()):o==="cidr-v6"?n=n.check(D.cidrv6()):o==="base64"?n=n.check(D.base64()):o==="base64url"?n=n.check(D.base64url()):o==="e164"?n=n.check(D.e164()):o==="jwt"?n=n.check(D.jwt()):o==="emoji"?n=n.check(D.emoji()):o==="nanoid"?n=n.check(D.nanoid()):o==="cuid"?n=n.check(D.cuid()):o==="cuid2"?n=n.check(D.cuid2()):o==="ulid"?n=n.check(D.ulid()):o==="xid"?n=n.check(D.xid()):o==="ksuid"&&(n=n.check(D.ksuid()))}typeof t.minLength=="number"&&(n=n.min(t.minLength)),typeof t.maxLength=="number"&&(n=n.max(t.maxLength)),t.pattern&&(n=n.regex(new RegExp(t.pattern))),i=n;break}case"number":case"integer":{let n=r==="integer"?D.number().int():D.number();typeof t.minimum=="number"&&(n=n.min(t.minimum)),typeof t.maximum=="number"&&(n=n.max(t.maximum)),typeof t.exclusiveMinimum=="number"?n=n.gt(t.exclusiveMinimum):t.exclusiveMinimum===!0&&typeof t.minimum=="number"&&(n=n.gt(t.minimum)),typeof t.exclusiveMaximum=="number"?n=n.lt(t.exclusiveMaximum):t.exclusiveMaximum===!0&&typeof t.maximum=="number"&&(n=n.lt(t.maximum)),typeof t.multipleOf=="number"&&(n=n.multipleOf(t.multipleOf)),i=n;break}case"boolean":{i=D.boolean();break}case"null":{i=D.null();break}case"object":{let n={},o=t.properties||{},s=new Set(t.required||[]);for(let[c,l]of Object.entries(o)){let d=me(l,e);n[c]=s.has(c)?d:d.optional()}if(t.propertyNames){let c=me(t.propertyNames,e),l=t.additionalProperties&&typeof t.additionalProperties=="object"?me(t.additionalProperties,e):D.any();if(Object.keys(n).length===0){i=D.record(c,l);break}let d=D.object(n).passthrough(),u=D.looseRecord(c,l);i=D.intersection(d,u);break}if(t.patternProperties){let c=t.patternProperties,l=Object.keys(c),d=[];for(let p of l){let f=me(c[p],e),m=D.string().regex(new RegExp(p));d.push(D.looseRecord(m,f))}let u=[];if(Object.keys(n).length>0&&u.push(D.object(n).passthrough()),u.push(...d),u.length===0)i=D.object({}).passthrough();else if(u.length===1)i=u[0];else{let p=D.intersection(u[0],u[1]);for(let f=2;f<u.length;f++)p=D.intersection(p,u[f]);i=p}break}let a=D.object(n);t.additionalProperties===!1?i=a.strict():typeof t.additionalProperties=="object"?i=a.catchall(me(t.additionalProperties,e)):i=a.passthrough();break}case"array":{let n=t.prefixItems,o=t.items;if(n&&Array.isArray(n)){let s=n.map(c=>me(c,e)),a=o&&typeof o=="object"&&!Array.isArray(o)?me(o,e):void 0;a?i=D.tuple(s).rest(a):i=D.tuple(s),typeof t.minItems=="number"&&(i=i.check(D.minLength(t.minItems))),typeof t.maxItems=="number"&&(i=i.check(D.maxLength(t.maxItems)))}else if(Array.isArray(o)){let s=o.map(c=>me(c,e)),a=t.additionalItems&&typeof t.additionalItems=="object"?me(t.additionalItems,e):void 0;a?i=D.tuple(s).rest(a):i=D.tuple(s),typeof t.minItems=="number"&&(i=i.check(D.minLength(t.minItems))),typeof t.maxItems=="number"&&(i=i.check(D.maxLength(t.maxItems)))}else if(o!==void 0){let s=me(o,e),a=D.array(s);typeof t.minItems=="number"&&(a=a.min(t.minItems)),typeof t.maxItems=="number"&&(a=a.max(t.maxItems)),i=a}else i=D.array(D.any());break}default:throw new Error(`Unsupported type: ${r}`)}return t.description&&(i=i.describe(t.description)),t.default!==void 0&&(i=i.default(t.default)),i}function me(t,e){if(typeof t=="boolean")return t?D.any():D.never();let r=Mb(t,e),i=t.type||t.enum!==void 0||t.const!==void 0;if(t.anyOf&&Array.isArray(t.anyOf)){let a=t.anyOf.map(l=>me(l,e)),c=D.union(a);r=i?D.intersection(r,c):c}if(t.oneOf&&Array.isArray(t.oneOf)){let a=t.oneOf.map(l=>me(l,e)),c=D.xor(a);r=i?D.intersection(r,c):c}if(t.allOf&&Array.isArray(t.allOf))if(t.allOf.length===0)r=i?r:D.any();else{let a=i?r:me(t.allOf[0],e),c=i?0:1;for(let l=c;l<t.allOf.length;l++)a=D.intersection(a,me(t.allOf[l],e));r=a}t.nullable===!0&&e.version==="openapi-3.0"&&(r=D.nullable(r)),t.readOnly===!0&&(r=D.readonly(r));let n={},o=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(let a of o)a in t&&(n[a]=t[a]);let s=["contentEncoding","contentMediaType","contentSchema"];for(let a of s)a in t&&(n[a]=t[a]);for(let a of Object.keys(t))BT.has(a)||(n[a]=t[a]);return Object.keys(n).length>0&&e.registry.add(r,n),r}function qb(t,e){if(typeof t=="boolean")return t?D.any():D.never();let r=VT(t,e?.defaultTarget),i=t.$defs||t.definitions||{},n={version:r,defs:i,refs:new Map,processing:new Set,rootSchema:t,registry:e?.registry??pe};return me(t,n)}var _m={};Xe(_m,{bigint:()=>YT,boolean:()=>WT,date:()=>HT,number:()=>KT,string:()=>JT});function JT(t){return qd(Rn,t)}function KT(t){return Wd(Ln,t)}function WT(t){return np(Mn,t)}function YT(t){return ip(qn,t)}function HT(t){return gp(si,t)}ae(Jo());var ca={apiUrl:"http://localhost:8000",keycloakUrl:"http://localhost:8180",realm:"frank",clientId:"frank-low-code"},fi="frank-cli",QT=g.object({apiUrl:g.string().url().optional(),keycloakUrl:g.string().url().optional(),realm:g.string().min(1).optional(),clientId:g.string().min(1).optional(),clientSecret:g.string().min(1).optional(),tenantId:g.string().min(1).optional()}),e0=g.object({defaultProfile:g.string().min(1).optional(),profiles:g.record(g.string(),QT).optional()}),Zb={defaultProfile:"default",profiles:{}},Fb={FRANKCTL_API_URL:"apiUrl",FRANKCTL_KEYCLOAK_URL:"keycloakUrl",FRANKCTL_KEYCLOAK_REALM:"realm",FRANKCTL_CLIENT_ID:"clientId",FRANKCTL_CLIENT_SECRET:"clientSecret",FRANKCTL_TENANT_ID:"tenantId"};function la(t){return t??vm.join(XT.homedir(),".frankctl")}function t0(t){return vm.join(la(t),"config.yaml")}function ot(t){let e=t0(t);if(!pi.existsSync(e))return structuredClone(Zb);let r;try{r=pi.readFileSync(e,"utf-8")}catch(o){throw new I(`Failed to read config at ${e}: ${o.message}`)}let i;try{i=(0,aa.parse)(r)}catch(o){throw new I(`Invalid YAML in ${e}: ${o.message}`)}if(!i||typeof i!="object")return structuredClone(Zb);let n=e0.safeParse(i);if(!n.success)throw new I(`Config validation failed: ${n.error.issues.map(o=>`${o.path.join(".")}: ${o.message}`).join("; ")}`);return{defaultProfile:n.data.defaultProfile??"default",profiles:n.data.profiles??{}}}function n0(t,e){let r=la(e);pi.existsSync(r)||pi.mkdirSync(r,{recursive:!0,mode:448});let i=vm.join(r,"config.yaml");pi.writeFileSync(i,(0,aa.stringify)(t),{mode:384})}function G(t={}){let e=ot(t.configDir),r=t.env??process.env,i=t.profile??r.FRANKCTL_PROFILE??e.defaultProfile,n=e.profiles[i]??{},o={...ca,...n};for(let[s,a]of Object.entries(Fb)){let c=r[s];c!==void 0&&c!==""&&(o[a]=c)}return t.apiUrl&&(o.apiUrl=t.apiUrl),t.tenantId&&(o.tenantId=t.tenantId),o}function ua(t,e={}){let r=e.env??process.env,i=ot(e.configDir),n=e.profile??r.FRANKCTL_PROFILE??i.defaultProfile;if(t==="apiUrl"&&e.apiUrl)return{value:e.apiUrl,source:"flag"};if(t==="tenantId"&&e.tenantId)return{value:e.tenantId,source:"flag"};let o=Object.entries(Fb).find(([,c])=>c===t)?.[0];if(o&&r[o])return{value:r[o],source:"env"};let s=i.profiles[n]?.[t];return s!==void 0?{value:s,source:"config"}:{value:ca[t],source:"default"}}function Bb(t,e,r){let i=ot(r),n=t.split(".");if(n.length===1)if(n[0]==="defaultProfile")i.defaultProfile=e;else throw new I(`Unknown top-level key '${t}'. Use 'defaultProfile' or 'profiles.<name>.<field>'.`);else if(n.length===3&&n[0]==="profiles"){let[,o,s]=n,a=new Set(["apiUrl","keycloakUrl","realm","clientId","clientSecret","tenantId"]);if(!a.has(s))throw new I(`Unknown profile field '${s}'. Allowed: ${[...a].join(", ")}`);i.profiles[o]=i.profiles[o]??{},i.profiles[o][s]=e}else throw new I(`Invalid key '${t}'. Use 'defaultProfile' or 'profiles.<name>.<field>'.`);n0(i,r)}import Zn from"node:fs";import Vb from"node:path";var Ye=class{credentialsPath;constructor(e){this.credentialsPath=Vb.join(la(e),"credentials.json")}getTokens(e){return this.readFile().profiles[e]??null}saveTokens(e,r){let i=this.readFile();i.profiles[e]=r,this.writeFile(i)}clearTokens(e){let r=this.readFile();delete r.profiles[e],this.writeFile(r)}needsRefresh(e){let r=this.getTokens(e);return r?Date.now()/1e3>=r.expires_at-30:!0}isRefreshExpired(e){let r=this.getTokens(e);return r?.refresh_expires_at?Date.now()/1e3>=r.refresh_expires_at:!0}readFile(){if(!Zn.existsSync(this.credentialsPath))return{profiles:{}};try{let e=Zn.readFileSync(this.credentialsPath,"utf-8"),r=JSON.parse(e);return r?.profiles?r:{profiles:{}}}catch{return{profiles:{}}}}writeFile(e){let r=Vb.dirname(this.credentialsPath);Zn.existsSync(r)||Zn.mkdirSync(r,{recursive:!0,mode:448});let i=this.credentialsPath+".tmp";Zn.writeFileSync(i,JSON.stringify(e,null,2),{mode:384}),Zn.renameSync(i,this.credentialsPath)}};function st(t){let e=t.split(".");if(e.length!==3)throw new Error("Invalid JWT format");let r=Buffer.from(e[1],"base64url").toString("utf-8");return JSON.parse(r)}function k(t){process.stdout.write(JSON.stringify(t)+`
212
212
  `)}function H(t){let e=Math.max(...t.map(([r])=>r.length));for(let[r,i]of t){let n=i==null?"":String(i);process.stdout.write(`${r.padEnd(e)} ${n}
213
- `)}}function q(t,e){if(t.length===0){process.stdout.write(`(no results)
213
+ `)}}function F(t,e){if(t.length===0){process.stdout.write(`(no results)
214
214
  `);return}let r=e.map(s=>Math.max(s.header.length,...t.map(a=>String(a[s.key]??"").length))),i=" ",n=e.map((s,a)=>s.header.padEnd(r[a])).join(i),o=r.map(s=>"-".repeat(s)).join(i);process.stdout.write(n+`
215
215
  `),process.stdout.write(o+`
216
216
  `);for(let s of t){let a=e.map((c,l)=>String(s[c.key]??"").padEnd(r[l])).join(i);process.stdout.write(a+`
217
- `)}}function Lb(t,e,r=60){if(t.length===0||e.length===0){process.stdout.write(`(no rows)
217
+ `)}}function Gb(t,e,r=60){if(t.length===0||e.length===0){process.stdout.write(`(no rows)
218
218
  `);return}let i=e.map(s=>t.map(a=>{let c=s[a],l=c==null?"":typeof c=="object"?JSON.stringify(c):String(c);return l.length>r?l.slice(0,r-1)+"\u2026":l})),n=t.map((s,a)=>Math.max(s.length,...i.map(c=>c[a].length))),o=" ";process.stdout.write(t.map((s,a)=>s.padEnd(n[a])).join(o)+`
219
219
  `),process.stdout.write(n.map(s=>"-".repeat(s)).join(o)+`
220
220
  `);for(let s of i)process.stdout.write(s.map((a,c)=>a.padEnd(n[c])).join(o)+`
221
- `)}function KT(t,e){let i={completed:{plain:"[ok]",colored:je.green("\u2713")},failed:{plain:"[x]",colored:je.red("\u2717")},skipped:{plain:"[-]",colored:je.gray("\u2212")},running:{plain:"[..]",colored:je.yellow("\u2026")},pending:{plain:"[ ]",colored:je.gray("\xB7")}}[t];return e?i.colored:i.plain}function JT(t){let e=t.timestamp??"",r=(t.level??"INFO").toUpperCase().padStart(7),i="";if(t.context&&typeof t.context=="object"){let n=["activity_name","step_key","stream","task"],o=[];for(let s of n){let a=t.context[s];a!=null&&a!==""&&o.push(`${s}=${String(a)}`)}o.length&&(i=` {${o.join(" ")}}`)}return`${e} [${r}] ${t.message}${i}`}function qn(t){for(let e of t)process.stdout.write(JT(e)+`
222
- `)}function Mb(t,e={}){let r=KT(t.status,e.color!==!1),i=t.step_name,n=t.step_type,o=[];t.row_count!==void 0&&t.row_count!==null&&o.push(`${t.row_count} rows`),t.execution_time_ms!==void 0&&t.execution_time_ms!==null&&o.push(`${t.execution_time_ms}ms`),t.error&&o.push(`err: ${t.error}`);let s=o.length?` (${o.join(", ")})`:"";return`${r} ${i} [${n}]${s}`}function Fb(t){t.command("status").description("Show effective configuration and authentication status").action(async(e,r)=>{let i=r.optsWithGlobals(),n=process.env,o=i.profile??n.FRANKCTL_PROFILE??ot().defaultProfile,s=W({profile:i.profile,apiUrl:i.apiUrl}),c=new Ye().getTokens(o),l=Math.floor(Date.now()/1e3),u=!!c&&c.expires_at>l,d={version:"0.1.0",profile:o,apiUrl:s.apiUrl,keycloakUrl:s.keycloakUrl,realm:s.realm,clientId:s.clientId,authenticated:u,subject:c?.subject,tenantId:c?.tenant_id,expiresAt:c?new Date(c.expires_at*1e3).toISOString():null};if(i.json){x(d);return}H([["version",d.version],["profile",d.profile],["apiUrl",d.apiUrl],["keycloakUrl",d.keycloakUrl],["realm",d.realm],["clientId",d.clientId],["authenticated",String(d.authenticated)],["subject",d.subject??""],["tenantId",d.tenantId??""],["expiresAt",d.expiresAt??""]])})}import i0 from"node:fs";async function mm(t){let e=`${t.keycloakUrl}/realms/${t.realm}/protocol/openid-connect/token`,r=t.clientId??"frank-low-code",i=new URLSearchParams({grant_type:"password",client_id:r,username:t.username,password:t.password,scope:"openid profile email"});t.clientSecret&&i.set("client_secret",t.clientSecret);let n=await fetch(e,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:i.toString()});if(!n.ok)throw new te(`Password login failed (${n.status})`,"Check FRANKCTL_KEYCLOAK_URL, realm, client id, and credentials.");let o=await n.json(),s=Math.floor(Date.now()/1e3),a=st(o.access_token);return{access_token:o.access_token,refresh_token:o.refresh_token,expires_at:s+o.expires_in,refresh_expires_at:o.refresh_expires_in?s+o.refresh_expires_in:void 0,token_type:"Bearer",auth_type:"oidc",username:a.preferred_username??t.username,tenant_id:a.tenant_id,subject:a.sub,roles:a.roles??void 0}}import{createServer as WT}from"node:http";import{randomBytes as Zb,createHash as YT}from"node:crypto";var HT=[5173,4173,5174];function XT(){return Zb(32).toString("base64url")}function QT(t){return YT("sha256").update(t).digest("base64url")}async function e0(t,e){for(let r of t){let i=WT(e);if(await new Promise(o=>{i.once("error",()=>o(!1)),i.listen(r,"127.0.0.1",()=>o(!0))}))return{server:i,port:r};try{i.close()}catch{}}throw new te(`Cannot bind PKCE callback to any registered port (${t.join(", ")}).`,"Free up one of these ports or use --headless login instead.")}async function gm(t){let e=t.clientId??"frank-low-code",r=t.scopes??["openid","profile","email"],i=XT(),n=QT(i),o=Zb(16).toString("hex"),s=t.timeout??12e4,a=t.ports??HT,{code:c,redirectUri:l}=await t0({keycloakUrl:t.keycloakUrl,realm:t.realm,clientId:e,scopes:r,challenge:n,state:o,onAuthUrl:t.onAuthUrl,noBrowser:t.noBrowser,timeoutMs:s,ports:a});return r0({keycloakUrl:t.keycloakUrl,realm:t.realm,clientId:e,code:c,codeVerifier:i,redirectUri:l})}async function t0(t){let e;return new Promise((i,n)=>{let o=!1;e=a=>o?!1:(o=!0,a(),!0),(async()=>{let a,c;try{let l=await e0(t.ports,(p,f)=>{let m=new URL(p.url,`http://127.0.0.1:${c}`);if(m.pathname!=="/callback"){f.writeHead(404),f.end("Not found");return}let g=m.searchParams.get("state"),y=m.searchParams.get("code"),k=m.searchParams.get("error");if(k){let z=m.searchParams.get("error_description")??k;f.writeHead(400,{"Content-Type":"text/html"}),f.end(`<h2>Login failed</h2><p>${z}</p>`),e(()=>{a.close(),clearTimeout(s),n(new te(`Keycloak error: ${z}`))});return}if(g!==t.state||!y){f.writeHead(400,{"Content-Type":"text/html"}),f.end("<h2>Invalid callback</h2>"),e(()=>{a.close(),clearTimeout(s),n(new te("Invalid callback: state mismatch or missing code"))});return}f.writeHead(200,{"Content-Type":"text/html"}),f.end("<h2>Login successful</h2><p>You can close this tab.</p>"),e(()=>{a.close(),clearTimeout(s),i({code:y,redirectUri:`http://127.0.0.1:${c}/callback`})})});a=l.server,c=l.port;let u=new URL(`/realms/${t.realm}/protocol/openid-connect/auth`,t.keycloakUrl);u.searchParams.set("client_id",t.clientId),u.searchParams.set("redirect_uri",`http://127.0.0.1:${c}/callback`),u.searchParams.set("response_type","code"),u.searchParams.set("scope",t.scopes.join(" ")),u.searchParams.set("code_challenge",t.challenge),u.searchParams.set("code_challenge_method","S256"),u.searchParams.set("state",t.state);let d=u.toString();t.onAuthUrl?.(d),t.noBrowser||n0(d).catch(()=>{})}catch(l){e(()=>{clearTimeout(s),n(l)})}})();let s=setTimeout(()=>{e(()=>{n(new te(`Login timed out after ${Math.round(t.timeoutMs/1e3)}s.`))})},t.timeoutMs)})}async function n0(t){let{execFile:e}=await import("node:child_process"),{platform:r}=await import("node:os"),i=r();return new Promise((n,o)=>{i==="win32"?e("cmd",["/c","start","",t],s=>s?o(s):n()):e(i==="darwin"?"open":"xdg-open",[t],a=>a?o(a):n())})}async function r0(t){let e=`${t.keycloakUrl}/realms/${t.realm}/protocol/openid-connect/token`,r=new URLSearchParams({grant_type:"authorization_code",client_id:t.clientId,code:t.code,code_verifier:t.codeVerifier,redirect_uri:t.redirectUri}),i=await fetch(e,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:r.toString()});if(!i.ok){let a=await i.text();throw new te(`Token exchange failed (${i.status}): ${a}`)}let n=await i.json(),o=Math.floor(Date.now()/1e3),s=st(n.access_token);return{access_token:n.access_token,refresh_token:n.refresh_token,expires_at:o+n.expires_in,refresh_expires_at:n.refresh_expires_in?o+n.refresh_expires_in:void 0,token_type:"Bearer",auth_type:"oidc",username:s.preferred_username,tenant_id:s.tenant_id,subject:s.sub,roles:s.roles??void 0}}async function aa(t){let e=`${t.keycloakUrl}/realms/${t.realm}/protocol/openid-connect/token`,r=new URLSearchParams({grant_type:"client_credentials",client_id:t.clientId,client_secret:t.clientSecret}),i=await fetch(e,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:r.toString()});if(!i.ok)throw new te(`Client credentials login failed (${i.status})`,"Verify the client id and secret; ensure serviceAccountsEnabled=true on the client.");let n=await i.json(),o=Math.floor(Date.now()/1e3),s=st(n.access_token);return{access_token:n.access_token,refresh_token:n.refresh_token,expires_at:o+n.expires_in,refresh_expires_at:n.refresh_expires_in?o+n.refresh_expires_in:void 0,token_type:"Bearer",auth_type:"client_credentials",tenant_id:s.tenant_id,subject:s.sub,roles:s.roles??void 0}}async function qb(t){let e=t.clientId??"frank-low-code",r=`${t.keycloakUrl}/realms/${t.realm}/protocol/openid-connect/token`,i=new URLSearchParams({grant_type:"refresh_token",client_id:e,refresh_token:t.refreshToken}),n=await fetch(r,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:i.toString()});if(!n.ok)throw new te("Session expired. Please log in again.","Run `frankctl auth login` to re-authenticate.");let o=await n.json(),s=Math.floor(Date.now()/1e3),a=st(o.access_token);return{access_token:o.access_token,refresh_token:o.refresh_token,expires_at:s+o.expires_in,refresh_expires_at:o.refresh_expires_in?s+o.refresh_expires_in:void 0,token_type:"Bearer",auth_type:"oidc",username:a.preferred_username,tenant_id:a.tenant_id,subject:a.sub,roles:a.roles??void 0}}async function oe(t={}){let e=t.env??process.env,r=e.FRANKCTL_TOKEN;if(r&&r.trim()!=="")return r;let i=W(t),n=t.profileName??t.profile??e.FRANKCTL_PROFILE??"default",o=new Ye(t.configDir),s=o.getTokens(n);if(!s)throw new te(`No stored credentials for profile '${n}'.`,"Run `frankctl auth login` to authenticate.");if(!o.needsRefresh(n))return s.access_token;if(s.auth_type==="client_credentials"){if(!i.clientSecret)throw new te("Service-account token expired and no client secret configured to re-authenticate.","Set FRANKCTL_CLIENT_SECRET or run `frankctl auth login --service-account`.");let c=await aa({keycloakUrl:i.keycloakUrl,realm:i.realm,clientId:i.clientId,clientSecret:i.clientSecret});return o.saveTokens(n,c),c.access_token}if(!s.refresh_token||o.isRefreshExpired(n))throw new te("Session expired.","Run `frankctl auth login` to re-authenticate.");let a=await qb({keycloakUrl:i.keycloakUrl,realm:i.realm,refreshToken:s.refresh_token,clientId:i.clientId});return o.saveTokens(n,a),a.access_token}function hm(t){return t.profile??process.env.FRANKCTL_PROFILE??ot().defaultProfile}function ym(t){let e=i0.readFileSync(0,"utf-8").replace(/\r?\n$/,"");if(!e)throw new te(`${t} stdin was empty`);return e}function Bb(t){let e=t.command("auth").description("Authentication");e.command("login").description("Authenticate to Keycloak and store tokens").option("--headless","use password grant (ROPC)").option("--service-account","use client_credentials grant").option("--username <username>","username (headless)").option("--password-stdin","read the headless password from stdin").option("--client-id <id>","override client id").option("--client-secret-stdin","read the OAuth client secret from stdin").option("--no-browser","print auth URL instead of opening a browser").action(async(r,i)=>{let n=i.optsWithGlobals(),o=hm(n),s=W({profile:n.profile,apiUrl:n.apiUrl}),a=new Ye;try{if(r.passwordStdin&&r.clientSecretStdin)throw new te("--password-stdin and --client-secret-stdin cannot share stdin; provide one value through its FRANKCTL environment variable");let c;if(r.serviceAccount){let u=r.clientSecretStdin?ym("client secret"):process.env.FRANKCTL_CLIENT_SECRET;if(!u)throw new te("--client-secret-stdin or FRANKCTL_CLIENT_SECRET required for --service-account");c=await aa({keycloakUrl:s.keycloakUrl,realm:s.realm,clientId:r.clientId??s.clientId,clientSecret:u})}else if(r.headless){let u=r.username??process.env.FRANKCTL_USERNAME,d=r.passwordStdin?ym("password"):process.env.FRANKCTL_PASSWORD,p=r.clientSecretStdin?ym("client secret"):process.env.FRANKCTL_CLIENT_SECRET;if(!u||!d)throw new te("--username/FRANKCTL_USERNAME and --password-stdin/FRANKCTL_PASSWORD are required for --headless");c=await mm({keycloakUrl:s.keycloakUrl,realm:s.realm,username:u,password:d,clientId:r.clientId??s.clientId,clientSecret:p})}else c=await gm({keycloakUrl:s.keycloakUrl,realm:s.realm,clientId:r.clientId??s.clientId,noBrowser:r.browser===!1,onAuthUrl:u=>process.stderr.write(`Open in browser: ${u}
223
- `)});a.saveTokens(o,c);let l={subject:c.subject,tenantId:c.tenant_id,expiresAt:new Date(c.expires_at*1e3).toISOString()};n.json?x(l):process.stderr.write(`Logged in as ${c.subject??c.username??"(unknown)"}
221
+ `)}function r0(t,e){let i={completed:{plain:"[ok]",colored:Re.green("\u2713")},failed:{plain:"[x]",colored:Re.red("\u2717")},skipped:{plain:"[-]",colored:Re.gray("\u2212")},running:{plain:"[..]",colored:Re.yellow("\u2026")},pending:{plain:"[ ]",colored:Re.gray("\xB7")}}[t];return e?i.colored:i.plain}function i0(t){let e=t.timestamp??"",r=(t.level??"INFO").toUpperCase().padStart(7),i="";if(t.context&&typeof t.context=="object"){let n=["activity_name","step_key","stream","task"],o=[];for(let s of n){let a=t.context[s];a!=null&&a!==""&&o.push(`${s}=${String(a)}`)}o.length&&(i=` {${o.join(" ")}}`)}return`${e} [${r}] ${t.message}${i}`}function Fn(t){for(let e of t)process.stdout.write(i0(e)+`
222
+ `)}function Jb(t,e={}){let r=r0(t.status,e.color!==!1),i=t.step_name,n=t.step_type,o=[];t.row_count!==void 0&&t.row_count!==null&&o.push(`${t.row_count} rows`),t.execution_time_ms!==void 0&&t.execution_time_ms!==null&&o.push(`${t.execution_time_ms}ms`),t.error&&o.push(`err: ${t.error}`);let s=o.length?` (${o.join(", ")})`:"";return`${r} ${i} [${n}]${s}`}function Kb(t){t.command("status").description("Show effective configuration and authentication status").action(async(e,r)=>{let i=r.optsWithGlobals(),n=process.env,o=i.profile??n.FRANKCTL_PROFILE??ot().defaultProfile,s=G({profile:i.profile,apiUrl:i.apiUrl}),c=new Ye().getTokens(o),l=Math.floor(Date.now()/1e3),d=!!c&&c.expires_at>l,u={version:"0.1.0",profile:o,apiUrl:s.apiUrl,keycloakUrl:s.keycloakUrl,realm:s.realm,clientId:s.clientId,authenticated:d,subject:c?.subject,tenantId:c?.tenant_id,expiresAt:c?new Date(c.expires_at*1e3).toISOString():null};if(i.json){k(u);return}H([["version",u.version],["profile",u.profile],["apiUrl",u.apiUrl],["keycloakUrl",u.keycloakUrl],["realm",u.realm],["clientId",u.clientId],["authenticated",String(u.authenticated)],["subject",u.subject??""],["tenantId",u.tenantId??""],["expiresAt",u.expiresAt??""]])})}import m0 from"node:fs";async function bm(t){let e=`${t.keycloakUrl}/realms/${t.realm}/protocol/openid-connect/token`,r=t.clientId??"frank-low-code",i=new URLSearchParams({grant_type:"password",client_id:r,username:t.username,password:t.password,scope:"openid profile email"});t.clientSecret&&i.set("client_secret",t.clientSecret);let n=await fetch(e,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:i.toString()});if(!n.ok)throw new ie(`Password login failed (${n.status})`,"Check FRANKCTL_KEYCLOAK_URL, realm, client id, and credentials.");let o=await n.json(),s=Math.floor(Date.now()/1e3),a=st(o.access_token);return{access_token:o.access_token,refresh_token:o.refresh_token,expires_at:s+o.expires_in,refresh_expires_at:o.refresh_expires_in?s+o.refresh_expires_in:void 0,token_type:"Bearer",auth_type:"oidc",client_id:r,username:a.preferred_username??t.username,tenant_id:a.tenant_id,subject:a.sub,roles:a.roles??void 0}}import{createServer as o0}from"node:http";import{randomBytes as Wb,createHash as s0}from"node:crypto";var a0=[5173,4173,5174];function c0(){return Wb(32).toString("base64url")}function l0(t){return s0("sha256").update(t).digest("base64url")}async function u0(t,e){for(let r of t){let i=o0(e);if(await new Promise(o=>{i.once("error",()=>o(!1)),i.listen(r,"127.0.0.1",()=>o(!0))}))return{server:i,port:r};try{i.close()}catch{}}throw new ie(`Cannot bind PKCE callback to any registered port (${t.join(", ")}).`,"Free up one of these ports or use --headless login instead.")}async function wm(t){let e=t.clientId??fi,r=t.scopes??["openid","profile","email"],i=c0(),n=l0(i),o=Wb(16).toString("hex"),s=t.timeout??12e4,a=t.ports??a0,{code:c,redirectUri:l}=await d0({keycloakUrl:t.keycloakUrl,realm:t.realm,clientId:e,scopes:r,challenge:n,state:o,onAuthUrl:t.onAuthUrl,noBrowser:t.noBrowser,timeoutMs:s,ports:a});return f0({keycloakUrl:t.keycloakUrl,realm:t.realm,clientId:e,code:c,codeVerifier:i,redirectUri:l})}async function d0(t){let e;return new Promise((i,n)=>{let o=!1;e=a=>o?!1:(o=!0,a(),!0),(async()=>{let a,c;try{let l=await u0(t.ports,(p,f)=>{let m=new URL(p.url,`http://127.0.0.1:${c}`);if(m.pathname!=="/callback"){f.writeHead(404),f.end("Not found");return}let h=m.searchParams.get("state"),y=m.searchParams.get("code"),S=m.searchParams.get("error");if(S){let z=m.searchParams.get("error_description")??S;f.writeHead(400,{"Content-Type":"text/html"}),f.end(`<h2>Login failed</h2><p>${z}</p>`),e(()=>{a.close(),clearTimeout(s),n(new ie(`Keycloak error: ${z}`))});return}if(h!==t.state||!y){f.writeHead(400,{"Content-Type":"text/html"}),f.end("<h2>Invalid callback</h2>"),e(()=>{a.close(),clearTimeout(s),n(new ie("Invalid callback: state mismatch or missing code"))});return}f.writeHead(200,{"Content-Type":"text/html"}),f.end("<h2>Login successful</h2><p>You can close this tab.</p>"),e(()=>{a.close(),clearTimeout(s),i({code:y,redirectUri:`http://127.0.0.1:${c}/callback`})})});a=l.server,c=l.port;let d=new URL(`/realms/${t.realm}/protocol/openid-connect/auth`,t.keycloakUrl);d.searchParams.set("client_id",t.clientId),d.searchParams.set("redirect_uri",`http://127.0.0.1:${c}/callback`),d.searchParams.set("response_type","code"),d.searchParams.set("scope",t.scopes.join(" ")),d.searchParams.set("code_challenge",t.challenge),d.searchParams.set("code_challenge_method","S256"),d.searchParams.set("state",t.state);let u=d.toString();t.onAuthUrl?.(u),t.noBrowser||p0(u).catch(()=>{})}catch(l){e(()=>{clearTimeout(s),n(l)})}})();let s=setTimeout(()=>{e(()=>{n(new ie(`Login timed out after ${Math.round(t.timeoutMs/1e3)}s.`))})},t.timeoutMs)})}async function p0(t){let{execFile:e}=await import("node:child_process"),{platform:r}=await import("node:os"),i=r();return new Promise((n,o)=>{i==="win32"?e("cmd",["/c","start","",t],s=>s?o(s):n()):e(i==="darwin"?"open":"xdg-open",[t],a=>a?o(a):n())})}async function f0(t){let e=`${t.keycloakUrl}/realms/${t.realm}/protocol/openid-connect/token`,r=new URLSearchParams({grant_type:"authorization_code",client_id:t.clientId,code:t.code,code_verifier:t.codeVerifier,redirect_uri:t.redirectUri}),i=await fetch(e,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:r.toString()});if(!i.ok){let a=await i.text();throw new ie(`Token exchange failed (${i.status}): ${a}`)}let n=await i.json(),o=Math.floor(Date.now()/1e3),s=st(n.access_token);return{access_token:n.access_token,refresh_token:n.refresh_token,expires_at:o+n.expires_in,refresh_expires_at:n.refresh_expires_in?o+n.refresh_expires_in:void 0,token_type:"Bearer",auth_type:"oidc",client_id:t.clientId,username:s.preferred_username,tenant_id:s.tenant_id,subject:s.sub,roles:s.roles??void 0}}async function da(t){let e=`${t.keycloakUrl}/realms/${t.realm}/protocol/openid-connect/token`,r=new URLSearchParams({grant_type:"client_credentials",client_id:t.clientId,client_secret:t.clientSecret}),i=await fetch(e,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:r.toString()});if(!i.ok)throw new ie(`Client credentials login failed (${i.status})`,"Verify the client id and secret; ensure serviceAccountsEnabled=true on the client.");let n=await i.json(),o=Math.floor(Date.now()/1e3),s=st(n.access_token);return{access_token:n.access_token,refresh_token:n.refresh_token,expires_at:o+n.expires_in,refresh_expires_at:n.refresh_expires_in?o+n.refresh_expires_in:void 0,token_type:"Bearer",auth_type:"client_credentials",client_id:t.clientId,tenant_id:s.tenant_id,subject:s.sub,roles:s.roles??void 0}}async function Yb(t){let e=t.clientId??"frank-low-code",r=`${t.keycloakUrl}/realms/${t.realm}/protocol/openid-connect/token`,i=new URLSearchParams({grant_type:"refresh_token",client_id:e,refresh_token:t.refreshToken}),n=await fetch(r,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:i.toString()});if(!n.ok)throw new ie("Session expired. Please log in again.","Run `frankctl auth login` to re-authenticate.");let o=await n.json(),s=Math.floor(Date.now()/1e3),a=st(o.access_token);return{access_token:o.access_token,refresh_token:o.refresh_token,expires_at:s+o.expires_in,refresh_expires_at:o.refresh_expires_in?s+o.refresh_expires_in:void 0,token_type:"Bearer",auth_type:"oidc",client_id:e,username:a.preferred_username,tenant_id:a.tenant_id,subject:a.sub,roles:a.roles??void 0}}async function ne(t={}){let e=t.env??process.env,r=e.FRANKCTL_TOKEN;if(r&&r.trim()!=="")return r;let i=G(t),n=t.profileName??t.profile??e.FRANKCTL_PROFILE??"default",o=new Ye(t.configDir),s=o.getTokens(n);if(!s)throw new ie(`No stored credentials for profile '${n}'.`,"Run `frankctl auth login` to authenticate.");if(!o.needsRefresh(n))return s.access_token;let a=s.client_id??i.clientId;if(s.auth_type==="client_credentials"){if(!i.clientSecret)throw new ie("Service-account token expired and no client secret configured to re-authenticate.","Set FRANKCTL_CLIENT_SECRET or run `frankctl auth login --service-account`.");let l=await da({keycloakUrl:i.keycloakUrl,realm:i.realm,clientId:a,clientSecret:i.clientSecret});return o.saveTokens(n,l),l.access_token}if(!s.refresh_token||o.isRefreshExpired(n))throw new ie("Session expired.","Run `frankctl auth login` to re-authenticate.");let c=await Yb({keycloakUrl:i.keycloakUrl,realm:i.realm,refreshToken:s.refresh_token,clientId:a});return o.saveTokens(n,c),c.access_token}function $m(t){return t.profile??process.env.FRANKCTL_PROFILE??ot().defaultProfile}function km(t){let e=m0.readFileSync(0,"utf-8").replace(/\r?\n$/,"");if(!e)throw new ie(`${t} stdin was empty`);return e}function Hb(t){let e=t.command("auth").description("Authentication");e.command("login").description("Authenticate to Keycloak and store tokens").option("--headless","use password grant (ROPC)").option("--service-account","use client_credentials grant").option("--username <username>","username (headless)").option("--password-stdin","read the headless password from stdin").option("--client-id <id>","override client id").option("--client-secret-stdin","read the OAuth client secret from stdin").option("--no-browser","print auth URL instead of opening a browser").action(async(r,i)=>{let n=i.optsWithGlobals(),o=$m(n),s=G({profile:n.profile,apiUrl:n.apiUrl}),a=new Ye;try{if(r.passwordStdin&&r.clientSecretStdin)throw new ie("--password-stdin and --client-secret-stdin cannot share stdin; provide one value through its FRANKCTL environment variable");let c;if(r.serviceAccount){let d=r.clientSecretStdin?km("client secret"):process.env.FRANKCTL_CLIENT_SECRET;if(!d)throw new ie("--client-secret-stdin or FRANKCTL_CLIENT_SECRET required for --service-account");c=await da({keycloakUrl:s.keycloakUrl,realm:s.realm,clientId:r.clientId??s.clientId,clientSecret:d})}else if(r.headless){let d=r.username??process.env.FRANKCTL_USERNAME,u=r.passwordStdin?km("password"):process.env.FRANKCTL_PASSWORD,p=r.clientSecretStdin?km("client secret"):process.env.FRANKCTL_CLIENT_SECRET;if(!d||!u)throw new ie("--username/FRANKCTL_USERNAME and --password-stdin/FRANKCTL_PASSWORD are required for --headless");c=await bm({keycloakUrl:s.keycloakUrl,realm:s.realm,username:d,password:u,clientId:r.clientId??s.clientId,clientSecret:p})}else{let d=ua("clientId",{profile:n.profile,apiUrl:n.apiUrl}),u=r.clientId??(d.source==="default"?fi:d.value??fi);c=await wm({keycloakUrl:s.keycloakUrl,realm:s.realm,clientId:u,noBrowser:r.browser===!1,onAuthUrl:p=>process.stderr.write(`Open in browser: ${p}
223
+ `)})}a.saveTokens(o,c);let l={subject:c.subject,tenantId:c.tenant_id,expiresAt:new Date(c.expires_at*1e3).toISOString()};n.json?k(l):process.stderr.write(`Logged in as ${c.subject??c.username??"(unknown)"}
224
224
  `)}catch(c){let l=c instanceof Error?c.message:String(c);process.stderr.write(`auth login failed: ${l}
225
- `),process.exit(3)}}),e.command("logout").description("Delete stored credentials for the active profile").action((r,i)=>{let n=i.optsWithGlobals(),o=hm(n);new Ye().clearTokens(o),n.json?x({profile:o,loggedOut:!0}):process.stderr.write(`Logged out of profile '${o}'.
226
- `)}),e.command("status").description("Show authentication status for active profile").action((r,i)=>{let n=i.optsWithGlobals(),o=hm(n),s=new Ye().getTokens(o);s||(n.json?x({authenticated:!1,profile:o}):process.stderr.write(`Not logged in (profile '${o}').
227
- `),process.exit(3));let a={authenticated:!0,profile:o,subject:s.subject,username:s.username,tenantId:s.tenant_id,roles:s.roles??[],expiresAt:new Date(s.expires_at*1e3).toISOString()};n.json?x(a):H([["profile",a.profile],["subject",a.subject??""],["username",a.username??""],["tenantId",a.tenantId??""],["roles",a.roles.join(",")],["expiresAt",a.expiresAt]])}),e.command("token").description("Print a valid access token to stdout").action(async(r,i)=>{let n=i.optsWithGlobals();try{let o=await oe({profile:n.profile,apiUrl:n.apiUrl});process.stdout.write(o+`
225
+ `),process.exit(3)}}),e.command("logout").description("Delete stored credentials for the active profile").action((r,i)=>{let n=i.optsWithGlobals(),o=$m(n);new Ye().clearTokens(o),n.json?k({profile:o,loggedOut:!0}):process.stderr.write(`Logged out of profile '${o}'.
226
+ `)}),e.command("status").description("Show authentication status for active profile").action((r,i)=>{let n=i.optsWithGlobals(),o=$m(n),s=new Ye().getTokens(o);s||(n.json?k({authenticated:!1,profile:o}):process.stderr.write(`Not logged in (profile '${o}').
227
+ `),process.exit(3));let a={authenticated:!0,profile:o,subject:s.subject,username:s.username,tenantId:s.tenant_id,roles:s.roles??[],expiresAt:new Date(s.expires_at*1e3).toISOString()};n.json?k(a):H([["profile",a.profile],["subject",a.subject??""],["username",a.username??""],["tenantId",a.tenantId??""],["roles",a.roles.join(",")],["expiresAt",a.expiresAt]])}),e.command("token").description("Print a valid access token to stdout").action(async(r,i)=>{let n=i.optsWithGlobals();try{let o=await ne({profile:n.profile,apiUrl:n.apiUrl});process.stdout.write(o+`
228
228
  `)}catch(o){let s=o instanceof Error?o.message:String(o);process.stderr.write(`${s}
229
- `),process.exit(3)}})}function Vb(t){let e=t.command("config").description("Manage CLI configuration");e.command("set <key> <value>").description("Write a config value (e.g. profiles.default.apiUrl)").action((r,i)=>{try{Rb(r,i)}catch(n){throw n instanceof P&&(process.stderr.write(`config set: ${n.message}
229
+ `),process.exit(3)}})}function Xb(t){let e=t.command("config").description("Manage CLI configuration");e.command("set <key> <value>").description("Write a config value (e.g. profiles.default.apiUrl)").action((r,i)=>{try{Bb(r,i)}catch(n){throw n instanceof I&&(process.stderr.write(`config set: ${n.message}
230
230
  `),process.exit(2)),n}}),e.command("get <key>").description("Read an effective config value with its source").action((r,i,n)=>{let o=n.optsWithGlobals(),s=["apiUrl","keycloakUrl","realm","clientId","clientSecret"];s.includes(r)||(process.stderr.write(`config get: unknown field '${r}'. Allowed: ${s.join(", ")}
231
- `),process.exit(2));let a=jb(r,{profile:o.profile,apiUrl:o.apiUrl});o.json?x(a):H([["key",r],["value",a.value??""],["source",a.source]])}),e.command("list").description("Show the merged effective profile").action((r,i)=>{let n=i.optsWithGlobals(),o=W({profile:n.profile,apiUrl:n.apiUrl}),s=ot(),a=n.profile??process.env.FRANKCTL_PROFILE??s.defaultProfile;if(n.json){x({profile:a,effective:o,_raw:s});return}let c=Object.keys(oa).map(l=>[l,String(o[l]??"")]);H([["profile",a],...c])})}var pi=Nt(Mt(),1);import Yb from"node:fs";import{createHmac as o0}from"node:crypto";var s0=new Set(["completed","partial_failure","failed"]);function a0(t){return s0.has(t)}var se=class{constructor(e){this.opts=e}async get(e,r){return this.request("GET",e,{query:r})}async post(e,r){return this.request("POST",e,{body:r})}async put(e,r){return this.request("PUT",e,{body:r})}async postSigned(e,r,i){let n=this.buildUrl(e),o=JSON.stringify(r??{}),s=o0("sha256",i.secret).update(o).digest("hex"),c={Accept:"application/json","Content-Type":"application/json",[i.header??"X-Hub-Signature-256"]:`sha256=${s}`};this.opts.devMode?.enabled&&this.opts.devMode.tenantId&&(c["X-Tenant-ID"]=this.opts.devMode.tenantId);let l=await fetch(n,{method:"POST",headers:c,body:o});if(!l.ok){let d;try{d=await l.json()}catch{d=await l.text().catch(()=>"")}throw F.fromResponse(l.status,d)}return l.status===204?void 0:(l.headers.get("content-type")??"").includes("application/json")?await l.json():await l.text()}async patch(e,r){return this.request("PATCH",e,{body:r})}async del(e){return this.request("DELETE",e,{})}async request(e,r,{body:i,query:n}){let o=this.buildUrl(r,n),s=this.opts.retryOnUnauthorized??!0,a=0;for(;;){a++;let l={Authorization:`Bearer ${await this.opts.getToken()}`,Accept:"application/json"};i!==void 0&&(l["Content-Type"]="application/json"),this.opts.devMode?.enabled&&this.opts.devMode.tenantId&&(l["X-Tenant-ID"]=this.opts.devMode.tenantId);let u=await fetch(o,{method:e,headers:l,body:i===void 0?void 0:JSON.stringify(i)});if(u.status===401&&s&&a===1)continue;if(!u.ok){let p;try{p=await u.json()}catch{p=await u.text().catch(()=>"")}throw F.fromResponse(u.status,p)}return u.status===204?void 0:(u.headers.get("content-type")??"").includes("application/json")?await u.json():await u.text()}}async pollSandbox(e,r,i){let n=i.now??(()=>Date.now()),o=i.sleep??(c=>new Promise(l=>setTimeout(l,c))),s=n(),a;for(;;){let c=await this.get(`/api/v1/pipelines/${e}/sandbox/${r}/status`);if(a=c,i.onTick?.(c),a0(c.status))return c;if(n()-s>=i.timeoutMs)return{...a,status:"failed"};await o(i.intervalMs)}}buildUrl(e,r){let i=this.opts.profile.apiUrl.replace(/\/+$/,""),n=new URL(i+(e.startsWith("/")?e:"/"+e));if(r){for(let[o,s]of Object.entries(r))if(s!==void 0)if(Array.isArray(s))for(let a of s)n.searchParams.append(o,String(a));else n.searchParams.set(o,String(s))}return n.toString()}};async function ve(t){let e=t.now??(()=>Date.now()),r=t.sleep??(o=>new Promise(s=>setTimeout(s,o))),i=e(),n;for(;;){if(n=await t.fetch(),t.onTick?.(n),t.isTerminal(n))return{value:n,timedOut:!1};if(e()-i>=t.timeoutMs)return{value:n,timedOut:!0};await r(t.intervalMs)}}var Kb=Nt(Mt(),1),_m="frank.platform/v1";function c0(t){return(t[t.length-1]??"col").replace(/([a-z0-9])([A-Z])/g,"$1_$2").replace(/[^a-zA-Z0-9]+/g,"_").toLowerCase().replace(/^_+|_+$/g,"")||"col"}function l0(t){let e=new Set;return t.map(r=>{let i=c0(r.path),n=i,o=2;for(;e.has(n);)n=`${i}_${o++}`;return e.add(n),{col:r,alias:n}})}function u0(t){let e=t.split(".");return e.length>=3?e.slice(1).join("."):t}function d0(t){return(t.path[t.path.length-1]??"").startsWith("_")}var p0=new Set(["created_at","updated_at","tenant_id","bucket","count"]);function Gb(t){return t==="id"?"external_id":p0.has(t)?`attr_${t}`:t}function f0(t){let e=(t??"").toLowerCase();return/(int|long|double|float|decimal|number|bigint|real)/.test(e)?"number":/bool/.test(e)?"boolean":"string"}function m0(t){return t.find(e=>e==="record_key")??t.find(e=>e==="external_id"||e==="id")??t.find(e=>e.endsWith("_id"))??t[0]}function g0(t,e,r="o"){let i=u0(t);return e.length===0?`SELECT *
231
+ `),process.exit(2));let a=ua(r,{profile:o.profile,apiUrl:o.apiUrl});o.json?k(a):H([["key",r],["value",a.value??""],["source",a.source]])}),e.command("list").description("Show the merged effective profile").action((r,i)=>{let n=i.optsWithGlobals(),o=G({profile:n.profile,apiUrl:n.apiUrl}),s=ot(),a=n.profile??process.env.FRANKCTL_PROFILE??s.defaultProfile;if(n.json){k({profile:a,effective:o,_raw:s});return}let c=Object.keys(ca).map(l=>[l,String(o[l]??"")]);H([["profile",a],...c])})}var gi=Ct(qt(),1);import rw from"node:fs";import{createHmac as g0}from"node:crypto";var h0=new Set(["completed","partial_failure","failed"]);function y0(t){return h0.has(t)}var re=class{constructor(e){this.opts=e}async get(e,r,i){return this.request("GET",e,{query:r,signal:i?.signal})}async post(e,r){return this.request("POST",e,{body:r})}async put(e,r){return this.request("PUT",e,{body:r})}async postSigned(e,r,i){let n=this.buildUrl(e),o=JSON.stringify(r??{}),s=g0("sha256",i.secret).update(o).digest("hex"),c={Accept:"application/json","Content-Type":"application/json",[i.header??"X-Hub-Signature-256"]:`sha256=${s}`};this.opts.profile.tenantId&&(c["X-Tenant-ID"]=this.opts.profile.tenantId);let l=await fetch(n,{method:"POST",headers:c,body:o});if(!l.ok){let u;try{u=await l.json()}catch{u=await l.text().catch(()=>"")}throw q.fromResponse(l.status,u)}return l.status===204?void 0:(l.headers.get("content-type")??"").includes("application/json")?await l.json():await l.text()}async patch(e,r){return this.request("PATCH",e,{body:r})}async del(e){return this.request("DELETE",e,{})}async request(e,r,{body:i,query:n,signal:o}){let s=this.buildUrl(r,n),a=this.opts.retryOnUnauthorized??!0,c=0;for(;;){c++;let d={Authorization:`Bearer ${await this.opts.getToken()}`,Accept:"application/json"};i!==void 0&&(d["Content-Type"]="application/json"),this.opts.profile.tenantId&&(d["X-Tenant-ID"]=this.opts.profile.tenantId);let u=await fetch(s,{method:e,headers:d,body:i===void 0?void 0:JSON.stringify(i),signal:o});if(u.status===401&&a&&c===1)continue;if(!u.ok){let f;try{f=await u.json()}catch{f=await u.text().catch(()=>"")}throw q.fromResponse(u.status,f)}return u.status===204?void 0:(u.headers.get("content-type")??"").includes("application/json")?await u.json():await u.text()}}async pollSandbox(e,r,i){let n=i.now??(()=>Date.now()),o=i.sleep??(c=>new Promise(l=>setTimeout(l,c))),s=n(),a;for(;;){let c=await this.get(`/api/v1/pipelines/${e}/sandbox/${r}/status`);if(a=c,i.onTick?.(c),y0(c.status))return c;if(n()-s>=i.timeoutMs)return{...a,status:"failed"};await o(i.intervalMs)}}buildUrl(e,r){let i=this.opts.profile.apiUrl.replace(/\/+$/,""),n=new URL(i+(e.startsWith("/")?e:"/"+e));if(r)for(let[o,s]of Object.entries(r))s!==void 0&&n.searchParams.set(o,String(s));return n.toString()}};async function ge(t){if(!Number.isFinite(t.timeoutMs)||t.timeoutMs<0)throw new Error("timeoutMs must be a finite non-negative number");if(!Number.isFinite(t.intervalMs)||t.intervalMs<0)throw new Error("intervalMs must be a finite non-negative number");if(t.attemptTimeoutMs!==void 0&&(!Number.isFinite(t.attemptTimeoutMs)||t.attemptTimeoutMs<=0))throw new Error("attemptTimeoutMs must be a finite positive number");let e=t.now??(()=>Date.now()),r=t.sleep??(s=>new Promise(a=>setTimeout(a,s))),i=e(),n=t.initialValue,o=t.timeoutMs;for(;;){let s=Math.min(t.attemptTimeoutMs??o,o),a=new AbortController,c=Symbol("request-timed-out"),l,d=await Promise.race([t.fetch(a.signal),new Promise(f=>{l=setTimeout(()=>{f(c),a.abort()},s)})]).finally(()=>{l!==void 0&&clearTimeout(l),a.abort()});if(d===c){if(s>=o){if(n===void 0)throw new Error("Polling timed out before the first response");return{value:n,timedOut:!0}}o-=s;continue}if(n=d,t.onTick?.(n),t.isTerminal(n))return{value:n,timedOut:!1};let u=e()-i;if(u>=t.timeoutMs)return{value:n,timedOut:!0};o=t.timeoutMs-u;let p=Math.min(t.intervalMs,o);p>0&&(await r(p),o-=p)}}var ew=Ct(qt(),1),Sm="frank.platform/v1";function _0(t){return(t[t.length-1]??"col").replace(/([a-z0-9])([A-Z])/g,"$1_$2").replace(/[^a-zA-Z0-9]+/g,"_").toLowerCase().replace(/^_+|_+$/g,"")||"col"}function v0(t){let e=new Set;return t.map(r=>{let i=_0(r.path),n=i,o=2;for(;e.has(n);)n=`${i}_${o++}`;return e.add(n),{col:r,alias:n}})}function b0(t){let e=t.split(".");return e.length>=3?e.slice(1).join("."):t}function w0(t){return(t.path[t.path.length-1]??"").startsWith("_")}var $0=new Set(["created_at","updated_at","tenant_id","bucket","count"]);function Qb(t){return t==="id"?"external_id":$0.has(t)?`attr_${t}`:t}function k0(t){let e=(t??"").toLowerCase();return/(int|long|double|float|decimal|number|bigint|real)/.test(e)?"number":/bool/.test(e)?"boolean":"string"}function S0(t){return t.find(e=>e==="record_key")??t.find(e=>e==="external_id"||e==="id")??t.find(e=>e.endsWith("_id"))??t[0]}function x0(t,e,r="o"){let i=b0(t);return e.length===0?`SELECT *
232
232
  FROM ${i} ${r}`:`SELECT
233
233
  ${e.map(({col:o,alias:s})=>` ${r}.${o.sql_ref} AS ${s}`).join(`,
234
234
  `)}
235
- FROM ${i} ${r}`}function Jb(t,e,r){let i=e.dataset_id,n=r.columns.filter(f=>!d0(f)),o=l0(n),s=g0(i,o),a=m0(o.map(f=>f.alias)),c=`${t.name}_pipeline`,l=`${t.name}_silver`,u=e.sync_mode??"full_refresh",d={name:e.name,sync_mode:u,write_disposition:e.write_disposition??(u==="full_refresh"?"replace":"append")};e.cursor_field&&(d.cursor_field=e.cursor_field),e.primary_key_path&&e.primary_key_path.length&&(d.primary_key_path=e.primary_key_path);let p={name:t.name,pattern_id:t.pattern_id,source_config:t.source_config,streams:[d]};return t.description&&(p.description=t.description),t.schedule_type&&(p.schedule_type=t.schedule_type),t.schedule_value&&(p.schedule_value=t.schedule_value),t.credential?.ref&&(p.credential_ref=t.credential.ref),[{apiVersion:_m,kind:"Source",metadata:{name:t.name},spec:p},{apiVersion:_m,kind:"Pipeline",metadata:{name:c},spec:{name:c,source_ids:[t.name],steps:[{name:l,kind:"custom_sql",sources:[i],params:{sql:s},depends_on:[],emits_to:"backing_dataset",config:{output_layer:"silver"}}]}},{apiVersion:_m,kind:"BackingDataset",metadata:{name:"TODO_entity_type"},spec:{entity_type_id:"TODO_entity_type",entity_type_name:"TODO Entity Name",pipeline:c,sync_mode:"on_materialization",primary_key_column:a??"TODO",property_mappings:o.map(({col:f,alias:m})=>({column:m,property:Gb(m),type:f.type,...m===a?{is_primary_key:!0}:{}})),ensure_schema:{display_name:"TODO Entity Name",tenant_scoped:!1,fields:o.map(({col:f,alias:m})=>({field_key:Gb(m),field_type:{type:f0(f.type)},...m===a?{required:!0,indexed:!0}:{}}))}}}]}function Wb(t,e,r){let i=[`# Scaffolded by 'frankctl pipelines scaffold' from source '${e}' / stream '${r}'.`,"# SELECT uses the REAL Trino ROW refs from the physical bronze schema;","# ontology properties/schema are derived from the columns (envelope _* dropped).","# This applies as-is; the ONLY required edit is naming the entity:","# - BackingDataset.entity_type_id / entity_type_name (+ ensure_schema.display_name)","# Optional: refine primary_key_column, add casts/ISO8601 to the SELECT.","# Then: frankctl pipelines apply -f <this-file> --wait",""].join(`
236
- `),n=t.map(o=>(0,Kb.stringify)(o)).join(`---
235
+ FROM ${i} ${r}`}function tw(t,e,r){let i=e.dataset_id,n=r.columns.filter(f=>!w0(f)),o=v0(n),s=x0(i,o),a=S0(o.map(f=>f.alias)),c=`${t.name}_pipeline`,l=`${t.name}_silver`,d=e.sync_mode??"full_refresh",u={name:e.name,sync_mode:d,write_disposition:e.write_disposition??(d==="full_refresh"?"replace":"append")};e.cursor_field&&(u.cursor_field=e.cursor_field),e.primary_key_path&&e.primary_key_path.length&&(u.primary_key_path=e.primary_key_path);let p={name:t.name,pattern_id:t.pattern_id,source_config:t.source_config,streams:[u]};return t.description&&(p.description=t.description),t.schedule_type&&(p.schedule_type=t.schedule_type),t.schedule_value&&(p.schedule_value=t.schedule_value),t.credential?.ref&&(p.credential_ref=t.credential.ref),[{apiVersion:Sm,kind:"Source",metadata:{name:t.name},spec:p},{apiVersion:Sm,kind:"Pipeline",metadata:{name:c},spec:{name:c,source_ids:[t.name],steps:[{name:l,kind:"custom_sql",sources:[i],params:{sql:s},depends_on:[],emits_to:"backing_dataset",config:{output_layer:"silver"}}]}},{apiVersion:Sm,kind:"BackingDataset",metadata:{name:"TODO_entity_type"},spec:{entity_type_id:"TODO_entity_type",entity_type_name:"TODO Entity Name",pipeline:c,sync_mode:"on_materialization",primary_key_column:a??"TODO",property_mappings:o.map(({col:f,alias:m})=>({column:m,property:Qb(m),type:f.type,...m===a?{is_primary_key:!0}:{}})),ensure_schema:{display_name:"TODO Entity Name",tenant_scoped:!1,fields:o.map(({col:f,alias:m})=>({field_key:Qb(m),field_type:{type:k0(f.type)},...m===a?{required:!0,indexed:!0}:{}}))}}}]}function nw(t,e,r){let i=[`# Scaffolded by 'frankctl pipelines scaffold' from source '${e}' / stream '${r}'.`,"# SELECT uses the REAL Trino ROW refs from the physical bronze schema;","# ontology properties/schema are derived from the columns (envelope _* dropped).","# This applies as-is; the ONLY required edit is naming the entity:","# - BackingDataset.entity_type_id / entity_type_name (+ ensure_schema.display_name)","# Optional: refine primary_key_column, add casts/ISO8601 to the SELECT.","# Then: frankctl pipelines apply -f <this-file> --wait",""].join(`
236
+ `),n=t.map(o=>(0,ew.stringify)(o)).join(`---
237
237
  `);return`${i}
238
- ${n}`}var h0=/^-?\d+$/,y0=-(2n**63n),_0=2n**63n-1n;function Bn(t,e){if(typeof t!="string"||!h0.test(t))throw new $(`${e} must return the snapshot ID as an exact decimal string; unsafe numeric JSON snapshot IDs are rejected because JavaScript may already have rounded them.`);let r=BigInt(t);if(r<y0||r>_0)throw new $(`${e} snapshot ID must fit a signed 64-bit integer.`);return r.toString()}function di(t,e,r){if(e!=null)return Bn(e,r);if(t==null)return t;if(typeof t=="string")return Bn(t,r);if(typeof t=="number"&&Number.isSafeInteger(t))return String(t);throw new $(`${r} returned an unsafe numeric snapshot ID without an exact decimal-string field; refusing to emit a rounded identity.`)}function Ne(t){let e=W({profile:t.profile,apiUrl:t.apiUrl}),r={enabled:process.env.FRANK_DEV_MODE==="true",tenantId:process.env.FRANKCTL_TENANT_ID};return new se({profile:e,getToken:()=>oe({profile:t.profile,apiUrl:t.apiUrl}),devMode:r})}async function ae(t){try{return await t()}catch(e){throw e instanceof F&&(process.stderr.write(`${e.message}
239
- `),process.exit(e.exitCode)),e instanceof $&&(process.stderr.write(`${e.message}
240
- `),process.exit(e.exitCode)),e}}function v0(t){if(!new Set(["manual","eager","cron","interval"]).has(t.type))throw new P(`invalid Pipeline schedule type '${t.type}'; expected manual, eager, cron, or interval`);let r=t.type;if(r==="manual"||r==="eager"){if(t.value!==void 0||t.timezone!==void 0)throw new P(`${r} forbids --value and --timezone`);return{type:r}}if(!t.value)throw new P(`${r} requires --value`);if(r==="cron"&&t.value.trim().split(/\s+/).length!==5)throw new P("cron requires a five-field --value");if(r==="interval"){let i=/^(\d+)([mhd])$/.exec(t.value);if(!i||Number(i[1])<1)throw new P("interval must be a positive <integer><m|h|d> value; use cron for other cadences");let n=Number(i[1]),o=i[2];if(!(o==="m"&&60%n===0||o==="h"&&24%n===0||o==="d"&&n===1))throw new P("interval is not exactly representable; use cron")}return{type:r,value:t.value,...t.timezone?{timezone:t.timezone}:{}}}function ca(t,e){e.json?x(t):(H([["pipeline_id",t.pipeline_id],["reconciliation",t.reconciliation_state],["confirmed",String(t.confirmed)],["desired",JSON.stringify(t.desired)],["desired_fingerprint",t.desired_fingerprint],["observed_fingerprint",t.observed_fingerprint??""],["error",t.error??""]]),t.roots.length&&q(t.roots.map(r=>({step_id:r.step_id,transform_id:r.transform_id,asset_key:r.asset_key.join("/"),effective:JSON.stringify(r.effective),in_sync:r.in_sync})),[{key:"step_id",header:"ROOT_STEP"},{key:"transform_id",header:"TRANSFORM"},{key:"asset_key",header:"ASSET"},{key:"effective",header:"EFFECTIVE"},{key:"in_sync",header:"SYNCED"}])),(!t.confirmed||t.reconciliation_state!=="synced")&&(process.stderr.write(`Pipeline schedule is ${t.reconciliation_state}; desired=${JSON.stringify(t.desired)} effective=${JSON.stringify(t.roots.map(r=>r.effective))}`+(t.error?` error=${t.error}`:"")+`
241
- `),process.exit(1))}var Vn="frank.platform/v1",vm=["Source","IdentityPolicy","Pipeline","BackingDataset"],Hb={Source:"/api/v1/sources",IdentityPolicy:"/api/v1/identity-policies",Pipeline:"/api/v1/pipelines",BackingDataset:"/api/v1/backing-datasets"};function Ze(t){return`${t.ontologyTenantId??"<global>"}/${t.entityTypeId}`}function Xb(t){return{entityTypeId:String(t.spec?.entity_type_id??"").trim(),ontologyTenantId:typeof t.spec?.ontology_tenant_id=="string"?t.spec.ontology_tenant_id:null}}function b0(t,e){let r=t.filter(a=>a.kind==="BackingDataset"),i=new Map;for(let a of t)if(a.metadata?.dependsOn!==void 0&&a.kind!=="BackingDataset")throw new P(`${a.kind}/${a.metadata?.name} in ${e} declares metadata.dependsOn; only BackingDataset documents support execution dependencies.`);for(let a of r){let c=Xb(a);if(!c.entityTypeId)throw new P(`BackingDataset/${a.metadata?.name} in ${e} requires spec.entity_type_id`);let l=Ze(c);if(i.has(l))throw new P(`duplicate BackingDataset dependency identity '${l}' in ${e}`);i.set(l,a);let u=a.metadata?.dependsOn??[];if(!Array.isArray(u))throw new P(`BackingDataset/${a.metadata?.name} metadata.dependsOn must be a list`);if(u.length>0&&String(a.spec?.sync_mode??"on_materialization").trim().toLowerCase()!=="manual")throw new P(`BackingDataset/${a.metadata?.name} metadata.dependsOn requires spec.sync_mode: manual until dependency ordering is persisted and enforced server-side.`);let d=[],p=new Set;for(let[m,g]of u.entries()){if(!g||typeof g!="object"||Array.isArray(g))throw new P(`BackingDataset/${a.metadata?.name} metadata.dependsOn[${m}] must be an object`);let y=String(g.entityTypeId??"").trim();if(!y)throw new P(`BackingDataset/${a.metadata?.name} metadata.dependsOn[${m}] requires entityTypeId`);let k=g.ontologyTenantId;if(k!=null&&typeof k!="string")throw new P(`BackingDataset/${a.metadata?.name} metadata.dependsOn[${m}].ontologyTenantId must be a string or null`);let z={entityTypeId:y,ontologyTenantId:k===void 0?c.ontologyTenantId:k},b=Ze(z);if(b===l)throw new P(`BackingDataset/${a.metadata?.name} declares a self dependency '${b}'`);if(p.has(b))throw new P(`BackingDataset/${a.metadata?.name} repeats dependency '${b}'`);p.add(b),d.push(z)}a.metadata&&(a.metadata.dependsOn=d);let f=Array.isArray(a.spec?.property_mappings)?a.spec.property_mappings:[];for(let m of f){if(m.is_relationship!==!0)continue;let g=String(m.target_type??"").trim();if(!g)continue;if(g===c.entityTypeId)throw new P(`BackingDataset/${a.metadata?.name} has unsupported self-referential relationship '${String(m.property??m.column??"<unknown>")}' targeting ${g}`);let y=Ze({entityTypeId:g,ontologyTenantId:c.ontologyTenantId});if(!p.has(y))throw new P(`BackingDataset/${a.metadata?.name} relationship target '${g}' requires metadata.dependsOn entry '${y}'`)}}let n=new Set,o=new Set,s=a=>{if(n.has(a))throw new P(`BackingDataset dependency cycle detected at '${a}' in ${e}`);if(o.has(a))return;let c=i.get(a);if(c){n.add(a);for(let l of c.metadata?.dependsOn??[]){let u=Ze(l);i.has(u)&&s(u)}n.delete(a),o.add(a)}};for(let a of i.keys())s(a)}function Qb(t,e){if(typeof t!="string"||!/^[0-9a-f]{64}$/.test(t))throw new $(`${e} response did not contain a canonical recipe_hash precondition.`);return t}var w0=["identity_policy_id","identity_policy_version","identity_policy_recipe_hash","identity_policy_recipe_digest","identity_policy_hash","identity_policy_digest"];function ew(t){return`${t.tier}/${t.name}@${t.version}`}function bm(t){if(!Array.isArray(t.steps))return[];let e=[];for(let[r,i]of t.steps.entries()){if(!i||typeof i!="object"||Array.isArray(i))continue;let n=i;for(let o of["params","pattern_params"]){let s=n[o];if(!s||typeof s!="object"||Array.isArray(s))continue;let a=s.field_mappings;if(Array.isArray(a))for(let[c,l]of a.entries())l&&typeof l=="object"&&!Array.isArray(l)&&e.push({mapping:l,path:`spec.steps[${r}].${o}.field_mappings[${c}]`})}}return e}function wm(t,e){if(!t||typeof t!="object"||Array.isArray(t))throw new P(`${e}.identity_policy must be an object`);let r=t,i=typeof r.name=="string"?r.name.trim():"";if(!i)throw new P(`${e}.identity_policy requires name`);let n=r.tier!==void 0,o=r.version!==void 0;if(n!==o)throw new P(`${e}.identity_policy external references require both tier and version`);if(!n)return{name:i};if(r.tier!=="system"&&r.tier!=="tenant")throw new P(`${e}.identity_policy.tier must be 'system' or 'tenant'`);if(!Number.isInteger(r.version)||Number(r.version)<1)throw new P(`${e}.identity_policy.version must be a positive integer`);return{name:i,tier:r.tier,version:Number(r.version)}}function $0(t,e){let r=new Set;for(let i of t){if(i.kind!=="IdentityPolicy")continue;let n=i.metadata.name.trim(),o=typeof i.spec?.name=="string"?i.spec.name.trim():"";if(!o)throw new P(`IdentityPolicy/${n} in ${e} requires spec.name`);if(o!==n)throw new P(`IdentityPolicy/${n} in ${e} must have matching metadata.name and spec.name`);if(r.has(n))throw new P(`duplicate IdentityPolicy declaration '${n}' in ${e}`);r.add(n)}for(let i of t)if(i.kind==="Pipeline")for(let{mapping:n,path:o}of bm(i.spec)){let s=`Pipeline/${i.metadata.name} ${o}`,a=w0.find(l=>Object.prototype.hasOwnProperty.call(n,l));if(a!==void 0)throw new P(`${s} contains runtime IdentityPolicy field '${a}'. Authored manifests must use identity_policy: {name: ...}; frankctl adds runtime pins and recipe preconditions.`);if(n.mapping_kind!=="identity"){if(n.identity_policy!==void 0)throw new P(`${s}.identity_policy requires mapping_kind: identity`);continue}if(n.identity_policy===void 0)throw new P(`${s} requires a symbolic identity_policy: {name: ...} reference`);let c=wm(n.identity_policy,s);if(c.tier===void 0){if(!r.has(c.name))throw new P(`${s} references '${c.name}', but no same-file IdentityPolicy declaration exists. Declare it in this file or use an exact external {name, tier, version} reference.`)}else if(r.has(c.name))throw new P(`${s} references same-file IdentityPolicy '${c.name}' with tier/version; same-file references must contain name only.`)}}function k0(t){let e;try{e=Yb.readFileSync(t,"utf-8")}catch(i){throw new P(`failed to read ${t}: ${i.message}`)}let r=(0,pi.parseAllDocuments)(e).map(i=>i.toJSON()).filter(i=>i!==null&&typeof i=="object");if(r.length===0)throw new P(`no YAML documents found in ${t}`);for(let[i,n]of r.entries()){if(!n.kind)throw new P(`document ${i+1} in ${t} is missing required field 'kind'`);if(!vm.includes(n.kind))throw new P(`document ${i+1} in ${t} has unsupported kind '${n.kind}'. Supported: ${vm.join(", ")}`);if(!n.spec||typeof n.spec!="object")throw new P(`document ${i+1} in ${t} is missing required field 'spec'`);if(n.apiVersion&&n.apiVersion!==Vn)throw new P(`document ${i+1} in ${t} has unknown apiVersion '${n.apiVersion}'. Expected '${Vn}'.`);if(!n.metadata?.name)throw new P(`document ${i+1} (kind=${n.kind}) in ${t} is missing required field 'metadata.name'`)}return b0(r,t),$0(r,t),r}function S0(t){let e=new Map(vm.map((r,i)=>[r,i]));return t.map((r,i)=>({d:r,i,k:e.get(r.kind)??99})).sort((r,i)=>r.k-i.k||r.i-i.i).map(r=>r.d)}async function tw(t,e,r){let i=e.sourceNameToId.get(r);if(i)return i;let o=((await t.get("/api/v1/sources",{search:r,page_size:50})).sources??[]).find(s=>s.name===r);return o?(e.sourceNameToId.set(o.name,o.id),o.id):null}async function x0(t,e,r){let i=e.pipelineNameToId.get(r);if(i)return i;let o=((await t.get("/api/v1/pipelines",{search:r,page_size:50})).items??[]).find(s=>s.name===r);return o?(e.pipelineNameToId.set(o.name,o.id),o.id):null}async function I0(t,e,r){let i=new Map;for(let o of r)if(o.kind==="Pipeline")for(let{mapping:s,path:a}of bm(o.spec)){if(s.mapping_kind!=="identity"||!s.identity_policy)continue;let c=wm(s.identity_policy,`Pipeline/${o.metadata.name} ${a}`);c.tier!==void 0&&i.set(ew(c),c)}if(i.size===0)return;let n=await t.get("/api/v1/identity-policies");for(let[o,s]of i){let a=(n.policies??[]).find(d=>d.name===s.name&&d.tier===s.tier),c=a;if(a&&a.version!==s.version&&typeof a.id=="string")try{c=await t.get(`/api/v1/identity-policies/${a.id}/versions/${s.version}`)}catch(d){if(!(d instanceof F)||d.status!==404)throw d;c=void 0}let l=c?.name===s.name&&c?.tier===s.tier&&c?.version===s.version&&typeof c.id=="string"?c.id:"";if(!l)throw new $(`IdentityPolicy external reference '${o}' was not found or is not accessible in this tenant.`);let u=Qb(c?.recipe_hash,`IdentityPolicy external reference '${o}'`);e.externalIdentityPolicyToPin.set(o,{id:l,name:s.name,tier:s.tier,version:s.version,recipeHash:u})}}function O0(t,e){for(let{mapping:r,path:i}of bm(e.spec)){if(r.mapping_kind!=="identity"||!r.identity_policy)continue;let n=wm(r.identity_policy,`Pipeline/${e.metadata.name} ${i}`),o=n.tier===void 0?t.identityPolicyNameToPin.get(n.name):t.externalIdentityPolicyToPin.get(ew(n));if(!o)throw new $(`IdentityPolicy '${n.name}' could not be resolved to an exact persisted id/version pin.`);r.identity_policy_id=o.id,r.identity_policy_version=o.version,r.identity_policy_recipe_hash=o.recipeHash,delete r.identity_policy}}async function P0(t,e,r){let i=r.source_ids;if(!Array.isArray(i)||i.length===0)return;let n=[];for(let o of i){if(typeof o!="string")throw new $(`Pipeline source_ids must be strings (name or uuid), got ${typeof o}`);if(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(o)){n.push(o);continue}let s=await tw(t,e,o);if(!s)throw new $(`Source '${o}' referenced by Pipeline not found in this apply or in the tenant. Add a 'kind: Source' doc with metadata.name=${o} or POST the Source first.`);n.push(s)}r.source_ids=n}async function T0(t,e,r){let i=r.pipeline;if(typeof i!="string"||!i)return;if(delete r.pipeline,/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(i)){r.pipeline_id=i;return}let n=await x0(t,e,i);if(!n)throw new $(`Pipeline '${i}' referenced by BackingDataset not found in this apply or in the tenant.`);r.pipeline_id=n}async function nw(t,e,r={}){let i=Hb[e.kind];if(!i)throw new $(`unsupported kind '${e.kind}'`);let n=(0,pi.stringify)({apiVersion:e.apiVersion??Vn,kind:e.kind,metadata:e.metadata,spec:e.spec}),o=new URL(i+(Object.keys(r).length?"?"+new URLSearchParams(r).toString():""),"http://placeholder"),s=o.pathname+o.search;return await A0(t,s,n)}async function A0(t,e,r){let i=t.opts,o=i.profile.apiUrl.replace(/\/+$/,"")+(e.startsWith("/")?e:"/"+e),s={Accept:"application/json","Content-Type":"application/yaml",Authorization:`Bearer ${await i.getToken()}`};i.devMode?.enabled&&i.devMode.tenantId&&(s["X-Tenant-ID"]=i.devMode.tenantId);let a=await fetch(o,{method:"POST",headers:s,body:r});if(!a.ok){let l;try{l=await a.json()}catch{l=await a.text().catch(()=>"")}throw F.fromResponse(a.status,l)}return a.status===204?{}:(a.headers.get("content-type")??"").includes("application/json")?await a.json():{raw:await a.text()}}var E0={Source:new Set(["id","tenant_id","created_at","updated_at","created_by","updated_by","status","last_sync_at","total_syncs","successful_syncs","failed_syncs","last_error_message","last_error_at","discovered_schema","connector_instance_id","credential","credential_name","credential_values","streams"]),Pipeline:new Set(["id","tenant_id","created_at","updated_at","created_by","current_version_id","current_version","active_version_id","status"]),BackingDataset:new Set(["id","tenant_id","created_at","updated_at","created_by","last_synced_at","last_sync_snapshot_id","last_cursor_value","last_error_message","status","schema_version"])};function $m(t,e,r){let i=E0[t]??new Set,n={};for(let[o,s]of Object.entries(r))i.has(o)||s!=null&&(n[o]=s);return{apiVersion:Vn,kind:t,metadata:{name:String(r[e]??"")},spec:n}}function z0(t){let e=$m("Source","name",t);return Array.isArray(t.streams)&&(e.spec.streams=t.streams.map(r=>({name:r.name,...r.namespace!=null?{namespace:r.namespace}:{},sync_mode:r.sync_mode??"full_refresh",...r.cursor_field!=null?{cursor_field:r.cursor_field}:{},write_disposition:r.write_disposition??"append",...Array.isArray(r.primary_key_path)&&r.primary_key_path.length>0?{primary_key_path:r.primary_key_path}:{},is_enabled:r.is_enabled!==!1,...r.dest_table_name!=null?{dest_table_name:r.dest_table_name}:{}}))),t.credential?.ref&&(e.spec.credential_ref=t.credential.ref),e}var N0=["mapping_kind","literal_value","literal_type","context_key","custom_sql","sql_transform_name","transform_params","field_order"];function C0(t){let e=String(t.name??"");return{apiVersion:Vn,kind:"IdentityPolicy",metadata:{name:e},spec:{name:e,strategy:t.strategy,source_fields:t.source_fields,normalizers:t.normalizers??[],emit_format:t.emit_format,collision_policy:t.collision_policy}}}async function D0(t,e,r,i,n){let o=[...e].sort((a,c)=>Number(a.field_order??0)-Number(c.field_order??0)),s=[];for(let a of o){let c={target_column:a.target_field};for(let l of N0)a[l]!==null&&a[l]!==void 0&&(c[l]=a[l]);if(a.mapping_kind==="identity"){let l=String(a.identity_policy_id??"").trim(),u=Number(a.identity_policy_version);if(!l||!Number.isInteger(u)||u<1)throw new $(`cannot export identity mapping '${String(a.target_field??"<unknown>")}': persisted policy pin is incomplete`);let d=`${l}@${u}`,p=n.get(d);p||(p=await t.get(`/api/v1/identity-policies/${l}/versions/${u}`),n.set(d,p));let f=String(p.name??"").trim(),m=p.tier,g=Number(p.version);if(!f||g!==u)throw new $(`cannot export identity mapping '${String(a.target_field??"<unknown>")}': policy readback did not match the pinned version`);if(m==="tenant"){let y=i.get(f);if(y&&y!==d)throw new $(`pipeline uses multiple versions of tenant IdentityPolicy '${f}'; one portable desired-state document cannot represent both`);i.set(f,d),r.set(f,C0(p)),c.identity_policy={name:f}}else if(m==="system")c.identity_policy={name:f,tier:"system",version:u};else throw new $(`cannot export IdentityPolicy '${f}': unknown tier '${String(m)}'`)}else{let l=String(a.source_expression??"");/^[a-zA-Z_][a-zA-Z_0-9]*$/.test(l)?c.source_column=l:l&&(c.transform=l)}s.push(c)}return s}async function j0(t,e,r){let i=$m("Pipeline","name",e);e.source_ids&&(i.spec.source_ids=e.source_ids.map(f=>r.get(f)??f));let n=e.current_version,o=n?.dag_spec??{},s=Array.isArray(o.steps)?o.steps:n?.steps??[],a=new Map((n?.steps??[]).map(f=>[String(f.step_name),f])),c=new Map;if(Array.isArray(o.edges))for(let f of o.edges){if(!f||typeof f!="object"||Array.isArray(f))continue;let m=f,g=String(m.from_step??m.from_step_name??"").trim(),y=String(m.to_step??m.to_step_name??"").trim();g&&y&&c.set(y,[...c.get(y)??[],g])}let l=new Map,u=new Map,d=new Map,p=[];for(let f of s){let m=String(f.step_name??f.name??"").trim();if(!m)throw new $("cannot export Pipeline step without a name");let g=a.get(m)??f,y=String(f.step_type??g.step_type??"custom_sql"),k={name:m,kind:y},z=f.pattern_id??g.pattern_id;z&&(k.pattern_id=z);let b={...f.pattern_params??{}};if(y==="field_mapping"){let C=String(g.transform_id??"").trim();if(!C)throw new $(`cannot export Pipeline/${e.name} step '${m}': no persisted transform_id`);let A=await t.get(`/api/v1/transforms/${C}`);if(!Array.isArray(A.field_mappings))throw new $(`cannot export Pipeline/${e.name} step '${m}': transform has no field_mappings`);b.field_mappings=await D0(t,A.field_mappings,l,u,d)}if(y==="custom_sql"){let C=f.code_content??g.code_content;C?.sql&&(k.params={sql:C.sql})}else y==="custom_python"?k.params=f.code_content??g.code_content??b:k.params=b;let w=c.get(m)??[];w.length&&(k.depends_on=w),(f.is_terminal===!0||g.is_terminal===!0)&&(k.emits_to="backing_dataset");let j=f.config??g.config;j&&typeof j=="object"&&(k.config=j),p.push(k)}return p.length&&(i.spec.steps=p),{pipelineDoc:i,policyDocs:[...l.values()]}}async function R0(t,e){let r=await t.get(`/api/v1/pipelines/${e}`),i=[],n=new Map;for(let a of r.source_ids??[])try{let c=await t.get(`/api/v1/sources/${a}`,{include_streams:"true"});i.push(z0(c)),n.set(a,c.name)}catch(c){if(c instanceof F&&c.status===404){process.stderr.write(`warning: source ${a} referenced by pipeline ${e} not found; skipping in export
242
- `);continue}throw c}let o=await j0(t,r,n);i.push(...o.policyDocs,o.pipelineDoc);let s=await t.get("/api/v1/backing-datasets",{page_size:100});for(let a of s.items??[])if(a.pipeline_id===e){let c=$m("BackingDataset","entity_type_id",a);delete c.spec.pipeline_id,c.spec.pipeline=r.name,i.push(c)}return i.map(a=>(0,pi.stringify)(a)).join(`---
243
- `)}async function U0(t,e,r,i){if(!i||r.status!==409)return{ok:!1};let o=r.body?.detail;if(!o||o.error!=="immutable_diff"||!o.existing_id)return{ok:!1};let s=Hb[e.kind];return s?(process.stderr.write(`--allow-recreate: DELETE ${e.kind}/${e.metadata.name} (id=${o.existing_id}) \u2014 operational state will be LOST
238
+ ${n}`}var I0=/^-?\d+$/,O0=-(2n**63n),P0=2n**63n-1n;function Bn(t,e){if(typeof t!="string"||!I0.test(t))throw new w(`${e} must return the snapshot ID as an exact decimal string; unsafe numeric JSON snapshot IDs are rejected because JavaScript may already have rounded them.`);let r=BigInt(t);if(r<O0||r>P0)throw new w(`${e} snapshot ID must fit a signed 64-bit integer.`);return r.toString()}function mi(t,e,r){if(e!=null)return Bn(e,r);if(t==null)return t;if(typeof t=="string")return Bn(t,r);if(typeof t=="number"&&Number.isSafeInteger(t))return String(t);throw new w(`${r} returned an unsafe numeric snapshot ID without an exact decimal-string field; refusing to emit a rounded identity.`)}function Ne(t){let e=G({profile:t.profile,apiUrl:t.apiUrl,tenantId:t.tenant});return new re({profile:e,getToken:()=>ne({profile:t.profile,apiUrl:t.apiUrl})})}async function Q(t){try{return await t()}catch(e){throw e instanceof q&&(process.stderr.write(`${e.message}
239
+ `),process.exit(e.exitCode)),e instanceof w&&(process.stderr.write(`${e.message}
240
+ `),process.exit(e.exitCode)),e}}var fa=120,ma=2e3,T0=3e4;function xm(t){let e=Number(t.timeout??fa),r=Number(t.pollInterval??ma);if(!Number.isInteger(e)||e<=0)throw new I("--timeout must be a positive integer number of seconds");if(!Number.isInteger(r)||r<0)throw new I("--poll-interval must be a non-negative integer number of milliseconds");let i=e*1e3;return{timeoutMs:i,intervalMs:r,attemptTimeoutMs:Math.min(T0,i)}}function A0(t,e){return{...e,...t.changed===void 0?{}:{changed:t.changed},...t.reconciliation_enqueued===void 0?{}:{reconciliation_enqueued:t.reconciliation_enqueued},...t.reconciliation_enqueue_error===void 0?{}:{reconciliation_enqueue_error:t.reconciliation_enqueue_error}}}async function Im(t,e,r,i){if(r?.confirmed||r?.reconciliation_state==="pending_activation")return r;let n;try{n=await ge({fetch:o=>t.get(`/api/v1/pipelines/${e}/schedule`,void 0,{signal:o}),initialValue:r,isTerminal:o=>o.confirmed&&o.reconciliation_state==="synced"||o.reconciliation_state==="pending_activation",intervalMs:i.intervalMs,attemptTimeoutMs:i.attemptTimeoutMs,timeoutMs:i.timeoutMs})}catch(o){throw o instanceof w?o:new w(`Pipeline schedule proof failed: ${o instanceof Error?o.message:String(o)}`,1)}return r?A0(r,n.value):n.value}function E0(t){if(!new Set(["manual","eager","cron","interval"]).has(t.type))throw new I(`invalid Pipeline schedule type '${t.type}'; expected manual, eager, cron, or interval`);let r=t.type;if(r==="manual"||r==="eager"){if(t.value!==void 0||t.timezone!==void 0)throw new I(`${r} forbids --value and --timezone`);return{type:r}}if(!t.value)throw new I(`${r} requires --value`);if(r==="cron"&&t.value.trim().split(/\s+/).length!==5)throw new I("cron requires a five-field --value");if(r==="interval"){let i=/^(\d+)([mhd])$/.exec(t.value);if(!i||Number(i[1])<1)throw new I("interval must be a positive <integer><m|h|d> value; use cron for other cadences");let n=Number(i[1]),o=i[2];if(!(o==="m"&&60%n===0||o==="h"&&24%n===0||o==="d"&&n===1))throw new I("interval is not exactly representable; use cron")}return{type:r,value:t.value,...t.timezone?{timezone:t.timezone}:{}}}function pa(t,e){e.json?k(t):(H([["pipeline_id",t.pipeline_id],["reconciliation",t.reconciliation_state],["confirmed",String(t.confirmed)],["desired",JSON.stringify(t.desired)],["desired_fingerprint",t.desired_fingerprint],["observed_fingerprint",t.observed_fingerprint??""],["automation_health",t.automation_health?.state??"unavailable"],["automation_reason",t.automation_health?.reason??""],["automation_error_class",t.automation_health?.error_class??""],["automation_sensors",t.automation_health?.sensor_names.join(",")??""],["next_action_at",t.next_action_at??""],["next_action_reason",t.next_action_reason??""],["last_automatic_run",t.last_automatic_run?.dagster_run_id??""],["error",t.error??""]]),t.roots.length&&F(t.roots.map(r=>({step_id:r.step_id,transform_id:r.transform_id,asset_key:r.asset_key.join("/"),effective:JSON.stringify(r.effective),in_sync:r.in_sync,automation:r.automation_health?.state??"unavailable",owner:r.automation_health?.sensor_name??"",last_run:r.last_automatic_run?.dagster_run_id??"",history_error:r.last_automatic_run_error_class??r.last_automatic_run_error??""})),[{key:"step_id",header:"ROOT_STEP"},{key:"transform_id",header:"TRANSFORM"},{key:"asset_key",header:"ASSET"},{key:"effective",header:"EFFECTIVE"},{key:"in_sync",header:"SYNCED"},{key:"automation",header:"AUTOMATION"},{key:"owner",header:"OWNER_SENSOR"},{key:"last_run",header:"LAST_AUTOMATIC_RUN"},{key:"history_error",header:"HISTORY_ERROR"}])),(!t.confirmed||t.reconciliation_state!=="synced")&&(process.stderr.write(`Pipeline schedule is ${t.reconciliation_state}; desired=${JSON.stringify(t.desired)} effective=${JSON.stringify(t.roots.map(r=>r.effective))}`+(t.error?` error=${t.error}`:"")+`
241
+ `),process.exit(1)),t.automation_health&&!["healthy","disabled"].includes(t.automation_health.state)&&(process.stderr.write(`Pipeline automation is ${t.automation_health.state}; reason=${t.automation_health.reason}`+(t.automation_health.error_class?` error_class=${t.automation_health.error_class}`:"")+(t.automation_health.error?` error=${t.automation_health.error}`:"")+`
242
+ `),process.exit(1))}var Vn="frank.platform/v1",Om=["Source","IdentityPolicy","Pipeline","BackingDataset"],iw={Source:"/api/v1/sources",IdentityPolicy:"/api/v1/identity-policies",Pipeline:"/api/v1/pipelines",BackingDataset:"/api/v1/backing-datasets"};function Ze(t){return`${t.ontologyTenantId??"<global>"}/${t.entityTypeId}`}function ow(t){return{entityTypeId:String(t.spec?.entity_type_id??"").trim(),ontologyTenantId:typeof t.spec?.ontology_tenant_id=="string"?t.spec.ontology_tenant_id:null}}function z0(t,e){let r=t.filter(a=>a.kind==="BackingDataset"),i=new Map;for(let a of t)if(a.metadata?.dependsOn!==void 0&&a.kind!=="BackingDataset")throw new I(`${a.kind}/${a.metadata?.name} in ${e} declares metadata.dependsOn; only BackingDataset documents support execution dependencies.`);for(let a of r){let c=ow(a);if(!c.entityTypeId)throw new I(`BackingDataset/${a.metadata?.name} in ${e} requires spec.entity_type_id`);let l=Ze(c);if(i.has(l))throw new I(`duplicate BackingDataset dependency identity '${l}' in ${e}`);i.set(l,a);let d=a.metadata?.dependsOn??[];if(!Array.isArray(d))throw new I(`BackingDataset/${a.metadata?.name} metadata.dependsOn must be a list`);if(d.length>0&&String(a.spec?.sync_mode??"on_materialization").trim().toLowerCase()!=="manual")throw new I(`BackingDataset/${a.metadata?.name} metadata.dependsOn requires spec.sync_mode: manual until dependency ordering is persisted and enforced server-side.`);let u=[],p=new Set;for(let[m,h]of d.entries()){if(!h||typeof h!="object"||Array.isArray(h))throw new I(`BackingDataset/${a.metadata?.name} metadata.dependsOn[${m}] must be an object`);let y=String(h.entityTypeId??"").trim();if(!y)throw new I(`BackingDataset/${a.metadata?.name} metadata.dependsOn[${m}] requires entityTypeId`);let S=h.ontologyTenantId;if(S!=null&&typeof S!="string")throw new I(`BackingDataset/${a.metadata?.name} metadata.dependsOn[${m}].ontologyTenantId must be a string or null`);let z={entityTypeId:y,ontologyTenantId:S===void 0?c.ontologyTenantId:S},b=Ze(z);if(b===l)throw new I(`BackingDataset/${a.metadata?.name} declares a self dependency '${b}'`);if(p.has(b))throw new I(`BackingDataset/${a.metadata?.name} repeats dependency '${b}'`);p.add(b),u.push(z)}a.metadata&&(a.metadata.dependsOn=u);let f=Array.isArray(a.spec?.property_mappings)?a.spec.property_mappings:[];for(let m of f){if(m.is_relationship!==!0)continue;let h=String(m.target_type??"").trim();if(!h)continue;if(h===c.entityTypeId)throw new I(`BackingDataset/${a.metadata?.name} has unsupported self-referential relationship '${String(m.property??m.column??"<unknown>")}' targeting ${h}`);let y=Ze({entityTypeId:h,ontologyTenantId:c.ontologyTenantId});if(!p.has(y))throw new I(`BackingDataset/${a.metadata?.name} relationship target '${h}' requires metadata.dependsOn entry '${y}'`)}}let n=new Set,o=new Set,s=a=>{if(n.has(a))throw new I(`BackingDataset dependency cycle detected at '${a}' in ${e}`);if(o.has(a))return;let c=i.get(a);if(c){n.add(a);for(let l of c.metadata?.dependsOn??[]){let d=Ze(l);i.has(d)&&s(d)}n.delete(a),o.add(a)}};for(let a of i.keys())s(a)}function sw(t,e){if(typeof t!="string"||!/^[0-9a-f]{64}$/.test(t))throw new w(`${e} response did not contain a canonical recipe_hash precondition.`);return t}var N0=["identity_policy_id","identity_policy_version","identity_policy_recipe_hash","identity_policy_recipe_digest","identity_policy_hash","identity_policy_digest"];function aw(t){return`${t.tier}/${t.name}@${t.version}`}function Pm(t){if(!Array.isArray(t.steps))return[];let e=[];for(let[r,i]of t.steps.entries()){if(!i||typeof i!="object"||Array.isArray(i))continue;let n=i;for(let o of["params","pattern_params"]){let s=n[o];if(!s||typeof s!="object"||Array.isArray(s))continue;let a=s.field_mappings;if(Array.isArray(a))for(let[c,l]of a.entries())l&&typeof l=="object"&&!Array.isArray(l)&&e.push({mapping:l,path:`spec.steps[${r}].${o}.field_mappings[${c}]`})}}return e}function Tm(t,e){if(!t||typeof t!="object"||Array.isArray(t))throw new I(`${e}.identity_policy must be an object`);let r=t,i=typeof r.name=="string"?r.name.trim():"";if(!i)throw new I(`${e}.identity_policy requires name`);let n=r.tier!==void 0,o=r.version!==void 0;if(n!==o)throw new I(`${e}.identity_policy external references require both tier and version`);if(!n)return{name:i};if(r.tier!=="system"&&r.tier!=="tenant")throw new I(`${e}.identity_policy.tier must be 'system' or 'tenant'`);if(!Number.isInteger(r.version)||Number(r.version)<1)throw new I(`${e}.identity_policy.version must be a positive integer`);return{name:i,tier:r.tier,version:Number(r.version)}}function C0(t,e){let r=new Set;for(let i of t){if(i.kind!=="IdentityPolicy")continue;let n=i.metadata.name.trim(),o=typeof i.spec?.name=="string"?i.spec.name.trim():"";if(!o)throw new I(`IdentityPolicy/${n} in ${e} requires spec.name`);if(o!==n)throw new I(`IdentityPolicy/${n} in ${e} must have matching metadata.name and spec.name`);if(r.has(n))throw new I(`duplicate IdentityPolicy declaration '${n}' in ${e}`);r.add(n)}for(let i of t)if(i.kind==="Pipeline")for(let{mapping:n,path:o}of Pm(i.spec)){let s=`Pipeline/${i.metadata.name} ${o}`,a=N0.find(l=>Object.prototype.hasOwnProperty.call(n,l));if(a!==void 0)throw new I(`${s} contains runtime IdentityPolicy field '${a}'. Authored manifests must use identity_policy: {name: ...}; frankctl adds runtime pins and recipe preconditions.`);if(n.mapping_kind!=="identity"){if(n.identity_policy!==void 0)throw new I(`${s}.identity_policy requires mapping_kind: identity`);continue}if(n.identity_policy===void 0)throw new I(`${s} requires a symbolic identity_policy: {name: ...} reference`);let c=Tm(n.identity_policy,s);if(c.tier===void 0){if(!r.has(c.name))throw new I(`${s} references '${c.name}', but no same-file IdentityPolicy declaration exists. Declare it in this file or use an exact external {name, tier, version} reference.`)}else if(r.has(c.name))throw new I(`${s} references same-file IdentityPolicy '${c.name}' with tier/version; same-file references must contain name only.`)}}function D0(t){let e;try{e=rw.readFileSync(t,"utf-8")}catch(i){throw new I(`failed to read ${t}: ${i.message}`)}let r=(0,gi.parseAllDocuments)(e).map(i=>i.toJSON()).filter(i=>i!==null&&typeof i=="object");if(r.length===0)throw new I(`no YAML documents found in ${t}`);for(let[i,n]of r.entries()){if(!n.kind)throw new I(`document ${i+1} in ${t} is missing required field 'kind'`);if(!Om.includes(n.kind))throw new I(`document ${i+1} in ${t} has unsupported kind '${n.kind}'. Supported: ${Om.join(", ")}`);if(!n.spec||typeof n.spec!="object")throw new I(`document ${i+1} in ${t} is missing required field 'spec'`);if(n.apiVersion&&n.apiVersion!==Vn)throw new I(`document ${i+1} in ${t} has unknown apiVersion '${n.apiVersion}'. Expected '${Vn}'.`);if(!n.metadata?.name)throw new I(`document ${i+1} (kind=${n.kind}) in ${t} is missing required field 'metadata.name'`)}return z0(r,t),C0(r,t),r}function j0(t){let e=new Map(Om.map((r,i)=>[r,i]));return t.map((r,i)=>({d:r,i,k:e.get(r.kind)??99})).sort((r,i)=>r.k-i.k||r.i-i.i).map(r=>r.d)}async function cw(t,e,r){let i=e.sourceNameToId.get(r);if(i)return i;let o=((await t.get("/api/v1/sources",{search:r,page_size:50})).sources??[]).find(s=>s.name===r);return o?(e.sourceNameToId.set(o.name,o.id),o.id):null}async function R0(t,e,r){let i=e.pipelineNameToId.get(r);if(i)return i;let o=((await t.get("/api/v1/pipelines",{search:r,page_size:50})).items??[]).find(s=>s.name===r);return o?(e.pipelineNameToId.set(o.name,o.id),o.id):null}async function U0(t,e,r){let i=new Map;for(let o of r)if(o.kind==="Pipeline")for(let{mapping:s,path:a}of Pm(o.spec)){if(s.mapping_kind!=="identity"||!s.identity_policy)continue;let c=Tm(s.identity_policy,`Pipeline/${o.metadata.name} ${a}`);c.tier!==void 0&&i.set(aw(c),c)}if(i.size===0)return;let n=await t.get("/api/v1/identity-policies");for(let[o,s]of i){let a=(n.policies??[]).find(u=>u.name===s.name&&u.tier===s.tier),c=a;if(a&&a.version!==s.version&&typeof a.id=="string")try{c=await t.get(`/api/v1/identity-policies/${a.id}/versions/${s.version}`)}catch(u){if(!(u instanceof q)||u.status!==404)throw u;c=void 0}let l=c?.name===s.name&&c?.tier===s.tier&&c?.version===s.version&&typeof c.id=="string"?c.id:"";if(!l)throw new w(`IdentityPolicy external reference '${o}' was not found or is not accessible in this tenant.`);let d=sw(c?.recipe_hash,`IdentityPolicy external reference '${o}'`);e.externalIdentityPolicyToPin.set(o,{id:l,name:s.name,tier:s.tier,version:s.version,recipeHash:d})}}function L0(t,e){for(let{mapping:r,path:i}of Pm(e.spec)){if(r.mapping_kind!=="identity"||!r.identity_policy)continue;let n=Tm(r.identity_policy,`Pipeline/${e.metadata.name} ${i}`),o=n.tier===void 0?t.identityPolicyNameToPin.get(n.name):t.externalIdentityPolicyToPin.get(aw(n));if(!o)throw new w(`IdentityPolicy '${n.name}' could not be resolved to an exact persisted id/version pin.`);r.identity_policy_id=o.id,r.identity_policy_version=o.version,r.identity_policy_recipe_hash=o.recipeHash,delete r.identity_policy}}async function M0(t,e,r){let i=r.source_ids;if(!Array.isArray(i)||i.length===0)return;let n=[];for(let o of i){if(typeof o!="string")throw new w(`Pipeline source_ids must be strings (name or uuid), got ${typeof o}`);if(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(o)){n.push(o);continue}let s=await cw(t,e,o);if(!s)throw new w(`Source '${o}' referenced by Pipeline not found in this apply or in the tenant. Add a 'kind: Source' doc with metadata.name=${o} or POST the Source first.`);n.push(s)}r.source_ids=n}async function q0(t,e,r){let i=r.pipeline;if(typeof i!="string"||!i)return;if(delete r.pipeline,/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(i)){r.pipeline_id=i;return}let n=await R0(t,e,i);if(!n)throw new w(`Pipeline '${i}' referenced by BackingDataset not found in this apply or in the tenant.`);r.pipeline_id=n}async function lw(t,e,r={}){let i=iw[e.kind];if(!i)throw new w(`unsupported kind '${e.kind}'`);let n=(0,gi.stringify)({apiVersion:e.apiVersion??Vn,kind:e.kind,metadata:e.metadata,spec:e.spec}),o=new URL(i+(Object.keys(r).length?"?"+new URLSearchParams(r).toString():""),"http://placeholder"),s=o.pathname+o.search;return await Z0(t,s,n)}async function Z0(t,e,r){let i=t.opts,o=i.profile.apiUrl.replace(/\/+$/,"")+(e.startsWith("/")?e:"/"+e),s={Accept:"application/json","Content-Type":"application/yaml",Authorization:`Bearer ${await i.getToken()}`};i.profile.tenantId&&(s["X-Tenant-ID"]=i.profile.tenantId);let a=await fetch(o,{method:"POST",headers:s,body:r});if(!a.ok){let l;try{l=await a.json()}catch{l=await a.text().catch(()=>"")}throw q.fromResponse(a.status,l)}return a.status===204?{}:(a.headers.get("content-type")??"").includes("application/json")?await a.json():{raw:await a.text()}}var F0={Source:new Set(["id","tenant_id","created_at","updated_at","created_by","updated_by","status","last_sync_at","total_syncs","successful_syncs","failed_syncs","last_error_message","last_error_at","discovered_schema","connector_instance_id","credential","credential_name","credential_values","streams"]),Pipeline:new Set(["id","tenant_id","created_at","updated_at","created_by","current_version_id","current_version","active_version_id","status"]),BackingDataset:new Set(["id","tenant_id","created_at","updated_at","created_by","last_synced_at","last_sync_snapshot_id","last_cursor_value","last_error_message","status","schema_version"])};function Am(t,e,r){let i=F0[t]??new Set,n={};for(let[o,s]of Object.entries(r))i.has(o)||s!=null&&(n[o]=s);return{apiVersion:Vn,kind:t,metadata:{name:String(r[e]??"")},spec:n}}function B0(t){let e=Am("Source","name",t);return Array.isArray(t.streams)&&(e.spec.streams=t.streams.map(r=>({name:r.name,...r.namespace!=null?{namespace:r.namespace}:{},sync_mode:r.sync_mode??"full_refresh",...r.cursor_field!=null?{cursor_field:r.cursor_field}:{},write_disposition:r.write_disposition??"append",...Array.isArray(r.primary_key_path)&&r.primary_key_path.length>0?{primary_key_path:r.primary_key_path}:{},is_enabled:r.is_enabled!==!1,...r.dest_table_name!=null?{dest_table_name:r.dest_table_name}:{}}))),t.credential?.ref&&(e.spec.credential_ref=t.credential.ref),e}var V0=["mapping_kind","literal_value","literal_type","context_key","custom_sql","sql_transform_name","transform_params","field_order"];function G0(t){let e=String(t.name??"");return{apiVersion:Vn,kind:"IdentityPolicy",metadata:{name:e},spec:{name:e,strategy:t.strategy,source_fields:t.source_fields,normalizers:t.normalizers??[],emit_format:t.emit_format,collision_policy:t.collision_policy}}}async function J0(t,e,r,i,n){let o=[...e].sort((a,c)=>Number(a.field_order??0)-Number(c.field_order??0)),s=[];for(let a of o){let c={target_column:a.target_field};for(let l of V0)a[l]!==null&&a[l]!==void 0&&(c[l]=a[l]);if(a.mapping_kind==="identity"){let l=String(a.identity_policy_id??"").trim(),d=Number(a.identity_policy_version);if(!l||!Number.isInteger(d)||d<1)throw new w(`cannot export identity mapping '${String(a.target_field??"<unknown>")}': persisted policy pin is incomplete`);let u=`${l}@${d}`,p=n.get(u);p||(p=await t.get(`/api/v1/identity-policies/${l}/versions/${d}`),n.set(u,p));let f=String(p.name??"").trim(),m=p.tier,h=Number(p.version);if(!f||h!==d)throw new w(`cannot export identity mapping '${String(a.target_field??"<unknown>")}': policy readback did not match the pinned version`);if(m==="tenant"){let y=i.get(f);if(y&&y!==u)throw new w(`pipeline uses multiple versions of tenant IdentityPolicy '${f}'; one portable desired-state document cannot represent both`);i.set(f,u),r.set(f,G0(p)),c.identity_policy={name:f}}else if(m==="system")c.identity_policy={name:f,tier:"system",version:d};else throw new w(`cannot export IdentityPolicy '${f}': unknown tier '${String(m)}'`)}else{let l=String(a.source_expression??"");/^[a-zA-Z_][a-zA-Z_0-9]*$/.test(l)?c.source_column=l:l&&(c.transform=l)}s.push(c)}return s}async function K0(t,e,r){let i=Am("Pipeline","name",e);e.source_ids&&(i.spec.source_ids=e.source_ids.map(f=>r.get(f)??f));let n=e.current_version,o=n?.dag_spec??{},s=Array.isArray(o.steps)?o.steps:n?.steps??[],a=new Map((n?.steps??[]).map(f=>[String(f.step_name),f])),c=new Map;if(Array.isArray(o.edges))for(let f of o.edges){if(!f||typeof f!="object"||Array.isArray(f))continue;let m=f,h=String(m.from_step??m.from_step_name??"").trim(),y=String(m.to_step??m.to_step_name??"").trim();h&&y&&c.set(y,[...c.get(y)??[],h])}let l=new Map,d=new Map,u=new Map,p=[];for(let f of s){let m=String(f.step_name??f.name??"").trim();if(!m)throw new w("cannot export Pipeline step without a name");let h=a.get(m)??f,y=String(f.step_type??h.step_type??"custom_sql"),S={name:m,kind:y},z=f.pattern_id??h.pattern_id;z&&(S.pattern_id=z);let b={...f.pattern_params??{}};if(y==="field_mapping"){let C=String(h.transform_id??"").trim();if(!C)throw new w(`cannot export Pipeline/${e.name} step '${m}': no persisted transform_id`);let A=await t.get(`/api/v1/transforms/${C}`);if(!Array.isArray(A.field_mappings))throw new w(`cannot export Pipeline/${e.name} step '${m}': transform has no field_mappings`);b.field_mappings=await J0(t,A.field_mappings,l,d,u)}if(y==="custom_sql"){let C=f.code_content??h.code_content;C?.sql&&(S.params={sql:C.sql})}else y==="custom_python"?S.params=f.code_content??h.code_content??b:S.params=b;let $=c.get(m)??[];$.length&&(S.depends_on=$),(f.is_terminal===!0||h.is_terminal===!0)&&(S.emits_to="backing_dataset");let j=f.config??h.config;j&&typeof j=="object"&&(S.config=j),p.push(S)}return p.length&&(i.spec.steps=p),{pipelineDoc:i,policyDocs:[...l.values()]}}async function W0(t,e){let r=await t.get(`/api/v1/pipelines/${e}`),i=[],n=new Map;for(let a of r.source_ids??[])try{let c=await t.get(`/api/v1/sources/${a}`,{include_streams:"true"});i.push(B0(c)),n.set(a,c.name)}catch(c){if(c instanceof q&&c.status===404){process.stderr.write(`warning: source ${a} referenced by pipeline ${e} not found; skipping in export
243
+ `);continue}throw c}let o=await K0(t,r,n);i.push(...o.policyDocs,o.pipelineDoc);let s=await t.get("/api/v1/backing-datasets",{page_size:100});for(let a of s.items??[])if(a.pipeline_id===e){let c=Am("BackingDataset","entity_type_id",a);delete c.spec.pipeline_id,c.spec.pipeline=r.name,i.push(c)}return i.map(a=>(0,gi.stringify)(a)).join(`---
244
+ `)}async function Y0(t,e,r,i){if(!i||r.status!==409)return{ok:!1};let o=r.body?.detail;if(!o||o.error!=="immutable_diff"||!o.existing_id)return{ok:!1};let s=iw[e.kind];return s?(process.stderr.write(`--allow-recreate: DELETE ${e.kind}/${e.metadata.name} (id=${o.existing_id}) \u2014 operational state will be LOST
244
245
  `),await t.del(`${s}/${o.existing_id}`),process.stderr.write(`re-applying ${e.kind}/${e.metadata.name}...
245
- `),{ok:!0,created:await nw(t,e,{})}):{ok:!1}}function L0(t){let e=t.filter(a=>a.kind==="BackingDataset"),r=new Map;for(let a of e)a.backing_dataset_identity&&r.set(Ze(a.backing_dataset_identity),a);let i=[],n=new Set,o=new Set,s=a=>{let c=a.backing_dataset_identity,l=c?Ze(c):a.id;if(n.has(l))throw new $(`BackingDataset dependency cycle reached ${a.name} (${l})`);if(!o.has(l)){n.add(l);for(let u of a.backing_dataset_dependencies??[]){let d=r.get(Ze(u));d&&s(d)}n.delete(l),o.add(l),i.push(a)}};for(let a of e)s(a);return i}async function M0(t){let e=new Map,r=1;for(;;){let i=await t.get("/api/v1/backing-datasets",{page:r,page_size:100});for(let n of i.items??[]){let o=String(n.entity_type_id??"").trim();o&&e.set(Ze({entityTypeId:o,ontologyTenantId:n.ontology_tenant_id??null}),n)}if(!i.has_more)return e;r+=1}}var F0=new Set(["completed","partial","failed","cancelled","terminated","timed_out","error"]),Z0=new Set(["completed","failed","cancelled"]);function Tt(t){return String(t??"").trim().toLowerCase()}function q0(t,e,r){if(e.length===0)throw new $(`Pipeline/${t} has no hydrated transforms; refusing to report --wait success.`);if(e.length>1&&!Array.isArray(r?.edges))throw new $(`Pipeline/${t} has multiple hydrated transforms but no persisted DAG edges; refusing alphabetical execution.`);let i=new Map;for(let u of e){let d=String(u.step_name??"").trim();if(!d)throw new $(`Pipeline/${t} returned a hydrated step without step_name.`);if(i.has(d))throw new $(`Pipeline/${t} returned duplicate step '${d}'.`);let p=String(u.transform_id??"").trim();if(!p)throw new $(`Pipeline/${t} step '${d}' has no hydrated transform.`);i.set(d,{stepName:d,transformId:p})}let n=[];for(let u of r?.steps??[]){let d=String(u.step_name??u.name??"").trim();if(!d)throw new $(`Pipeline/${t} DAG contains a step without a name.`);if(!i.has(d))throw new $(`Pipeline/${t} DAG step '${d}' has no hydrated transform.`);if(n.includes(d))throw new $(`Pipeline/${t} DAG contains duplicate step '${d}'.`);n.push(d)}if(Array.isArray(r?.steps)){let u=[...i.keys()];if(n.length!==u.length||u.some(d=>!n.includes(d)))throw new $(`Pipeline/${t} DAG step set (${n.join(", ")||"empty"}) does not match hydrated step set (${u.join(", ")||"empty"}); no transform was triggered.`)}else for(let u of i.keys())n.push(u);let o=new Map(n.map((u,d)=>[u,d])),s=new Map(n.map(u=>[u,new Set])),a=new Map(n.map(u=>[u,0]));for(let u of r?.edges??[]){let d=String(u.from_step??u.from_step_name??"").trim(),p=String(u.to_step??u.to_step_name??"").trim();if(!d||!p)throw new $(`Pipeline/${t} DAG contains an edge without from_step/to_step.`);if(!i.has(d)||!i.has(p))throw new $(`Pipeline/${t} DAG edge '${d}' \u2192 '${p}' references a step without a hydrated transform.`);let f=s.get(d);f.has(p)||(f.add(p),a.set(p,(a.get(p)??0)+1))}let c=n.filter(u=>a.get(u)===0).sort((u,d)=>o.get(u)-o.get(d)),l=[];for(;c.length>0;){let u=c.shift();l.push(u);for(let d of s.get(u)??[]){let p=(a.get(d)??0)-1;a.set(d,p),p===0&&(c.push(d),c.sort((f,m)=>o.get(f)-o.get(m)))}}if(l.length!==i.size)throw new $(`Pipeline/${t} DAG contains a cycle; no transform was triggered.`);return l.map(u=>i.get(u))}function B0(t,e){if(t.length===1)return t[0];let r=new Set((e?.edges??[]).map(n=>String(n.from_step??n.from_step_name??"").trim())),i=t.filter(n=>!r.has(n.stepName));return i.length===1?i[0]:void 0}async function V0(t,e,r){try{let i=await t.get(`/api/v1/sources/sync-runs/${encodeURIComponent(e)}/details`);if(i.workflow_id!==e)throw new $(`Source workflow correlation mismatch: requested '${e}', received '${i.workflow_id}'.`);if(!i.sync_run_id||i.source_id!==r)throw new $(`Source workflow correlation mismatch: workflow_id=${e} did not return the expected sync_run_id/source_id=${r}.`);return i}catch(i){if(i instanceof F&&i.status===404)return{workflow_id:e,status:"pending"};throw i}}async function G0(t,e,r,i){let n=await t.get(`/api/v1/sources/${e}/iceberg-refs`);if(n.source_id!==e)throw new $(`Source/${e} Iceberg observation returned source_id=${n.source_id}.`);if(!n.available)throw new $(`Source/${e} Iceberg refs unavailable: ${n.reason??"no reason returned"}.`);let o=new Map(n.tables.map(c=>[c.stream_name,c])),s=r.length>0?r:n.tables.map(c=>c.stream_name);if(r.length===0&&n.tables.length!==i)throw new $(`Source/${e} completed ${i} stream(s), but Iceberg refs returned ${n.tables.length} Bronze table(s).`);if(s.length===0&&i>0)throw new $(`Source/${e} completed ${i} stream(s), but Iceberg refs returned no Bronze tables.`);let a=[];for(let c of s){let l=o.get(c);if(!l)throw new $(`Source/${e} enabled stream '${c}' has no returned Bronze table.`);if(!l.available)throw new $(`Source/${e} Bronze table for stream '${c}' is unavailable: ${l.reason??"no reason returned"}.`);let u=(l.refs??[]).find(p=>p.name==="main");if(!u||u.snapshot_id==null)throw new $(`Source/${e} Bronze table '${l.table_path??c}' has no main snapshot.`);let d=Bn(u.snapshot_id,`Source/${e} Bronze table '${l.table_path??c}'`);a.push({stream_name:c,table_path:l.table_path??c,ref:"main",snapshot_id:d,total_records:u.total_records,evidence_scope:"observed_after_terminal_not_workflow_correlated"})}return a}async function K0(t,e,r){let i=await ve({fetch:()=>t.get("/api/v1/runs",{dagster_run_id:e,page_size:2}),isTerminal:a=>a.items.length>0,intervalMs:Math.min(1e3,r),timeoutMs:r});if(i.timedOut||i.value.items.length===0)throw new $(`Timed out waiting for TransformRun correlated to dagster_run_id=${e}.`);if(i.value.items.length!==1)throw new $(`Expected one TransformRun for dagster_run_id=${e}, received ${i.value.items.length}.`);let n=i.value.items[0];if(n.dagster_run_id!==e||!n.id)throw new $(`TransformRun correlation mismatch for dagster_run_id=${e}.`);let o=n.id,s=await ve({fetch:async()=>{let a=await t.get(`/api/v1/runs/${encodeURIComponent(o)}`);if(a.id!==o||a.dagster_run_id!==e)throw new $(`TransformRun correlation changed while polling transform_run_id=${o}.`);return a},isTerminal:a=>Z0.has(Tt(a.status)),intervalMs:Math.min(5e3,r),timeoutMs:r});if(s.timedOut)throw new $(`Timed out waiting for transform_run_id=${o} (dagster_run_id=${e}).`);return s.value}function J0(t){if(!(t instanceof F)||t.status!==409)return{matches:!1};let e=t.body?.detail;if(e&&typeof e=="object"){let r=e,n=Tt(r.code??r.error??r.reason).replaceAll("-","_")==="sync_already_running",o=String(r.sync_run_id??"").trim(),s=String(r.workflow_id??"").trim();return{matches:n,...n&&o?{syncRunId:o}:{},...n&&s?{workflowId:s}:{}}}return{matches:!1}}async function W0(t,e,r,i,n){let o=await ve({fetch:async()=>{let s=await t.get(`/api/v1/backing-datasets/${e}/sync-history/${encodeURIComponent(r)}`);if(s.id!==r||s.backing_dataset_id!==e||s.workflow_id!==i)throw new $(`Ontology sync correlation mismatch for sync_run_id=${r} workflow_id=${i}.`);return s},isTerminal:s=>s.is_terminal===!0||["synced","error","skipped"].includes(Tt(s.status)),intervalMs:Math.min(6e3,n),timeoutMs:n});if(o.timedOut)throw new $(`Timed out waiting for BackingDataset/${e} sync_run_id=${r} workflow_id=${i}.`);return o.value}async function Y0(t,e,r){let i=m=>process.stderr.write(m+`
246
- `),n=!0,o={ok:!1,sources:[],transforms:[],backing_datasets:[]},s=new Set(e.filter(m=>m.kind==="Pipeline").map(m=>m.id)),a=L0(e),c=new Map;for(let m of a)m.backing_dataset_identity&&c.set(Ze(m.backing_dataset_identity),m);let l=new Set,u,d=new Map,p=new Map,f=()=>(o.ok=n,i(n?`
246
+ `),{ok:!0,created:await lw(t,e,{})}):{ok:!1}}function H0(t){let e=t.filter(a=>a.kind==="BackingDataset"),r=new Map;for(let a of e)a.backing_dataset_identity&&r.set(Ze(a.backing_dataset_identity),a);let i=[],n=new Set,o=new Set,s=a=>{let c=a.backing_dataset_identity,l=c?Ze(c):a.id;if(n.has(l))throw new w(`BackingDataset dependency cycle reached ${a.name} (${l})`);if(!o.has(l)){n.add(l);for(let d of a.backing_dataset_dependencies??[]){let u=r.get(Ze(d));u&&s(u)}n.delete(l),o.add(l),i.push(a)}};for(let a of e)s(a);return i}async function X0(t){let e=new Map,r=1;for(;;){let i=await t.get("/api/v1/backing-datasets",{page:r,page_size:100});for(let n of i.items??[]){let o=String(n.entity_type_id??"").trim();o&&e.set(Ze({entityTypeId:o,ontologyTenantId:n.ontology_tenant_id??null}),n)}if(!i.has_more)return e;r+=1}}var Q0=new Set(["completed","partial","failed","cancelled","terminated","timed_out","error"]),eA=new Set(["completed","failed","cancelled"]);function Pt(t){return String(t??"").trim().toLowerCase()}function tA(t,e,r){if(e.length===0)throw new w(`Pipeline/${t} has no hydrated transforms; refusing to report --wait success.`);if(e.length>1&&!Array.isArray(r?.edges))throw new w(`Pipeline/${t} has multiple hydrated transforms but no persisted DAG edges; refusing alphabetical execution.`);let i=new Map;for(let d of e){let u=String(d.step_name??"").trim();if(!u)throw new w(`Pipeline/${t} returned a hydrated step without step_name.`);if(i.has(u))throw new w(`Pipeline/${t} returned duplicate step '${u}'.`);let p=String(d.transform_id??"").trim();if(!p)throw new w(`Pipeline/${t} step '${u}' has no hydrated transform.`);i.set(u,{stepName:u,transformId:p})}let n=[];for(let d of r?.steps??[]){let u=String(d.step_name??d.name??"").trim();if(!u)throw new w(`Pipeline/${t} DAG contains a step without a name.`);if(!i.has(u))throw new w(`Pipeline/${t} DAG step '${u}' has no hydrated transform.`);if(n.includes(u))throw new w(`Pipeline/${t} DAG contains duplicate step '${u}'.`);n.push(u)}if(Array.isArray(r?.steps)){let d=[...i.keys()];if(n.length!==d.length||d.some(u=>!n.includes(u)))throw new w(`Pipeline/${t} DAG step set (${n.join(", ")||"empty"}) does not match hydrated step set (${d.join(", ")||"empty"}); no transform was triggered.`)}else for(let d of i.keys())n.push(d);let o=new Map(n.map((d,u)=>[d,u])),s=new Map(n.map(d=>[d,new Set])),a=new Map(n.map(d=>[d,0]));for(let d of r?.edges??[]){let u=String(d.from_step??d.from_step_name??"").trim(),p=String(d.to_step??d.to_step_name??"").trim();if(!u||!p)throw new w(`Pipeline/${t} DAG contains an edge without from_step/to_step.`);if(!i.has(u)||!i.has(p))throw new w(`Pipeline/${t} DAG edge '${u}' \u2192 '${p}' references a step without a hydrated transform.`);let f=s.get(u);f.has(p)||(f.add(p),a.set(p,(a.get(p)??0)+1))}let c=n.filter(d=>a.get(d)===0).sort((d,u)=>o.get(d)-o.get(u)),l=[];for(;c.length>0;){let d=c.shift();l.push(d);for(let u of s.get(d)??[]){let p=(a.get(u)??0)-1;a.set(u,p),p===0&&(c.push(u),c.sort((f,m)=>o.get(f)-o.get(m)))}}if(l.length!==i.size)throw new w(`Pipeline/${t} DAG contains a cycle; no transform was triggered.`);return l.map(d=>i.get(d))}function nA(t,e){if(t.length===1)return t[0];let r=new Set((e?.edges??[]).map(n=>String(n.from_step??n.from_step_name??"").trim())),i=t.filter(n=>!r.has(n.stepName));return i.length===1?i[0]:void 0}async function rA(t,e,r){try{let i=await t.get(`/api/v1/sources/sync-runs/${encodeURIComponent(e)}/details`);if(i.workflow_id!==e)throw new w(`Source workflow correlation mismatch: requested '${e}', received '${i.workflow_id}'.`);if(!i.sync_run_id||i.source_id!==r)throw new w(`Source workflow correlation mismatch: workflow_id=${e} did not return the expected sync_run_id/source_id=${r}.`);return i}catch(i){if(i instanceof q&&i.status===404)return{workflow_id:e,status:"pending"};throw i}}async function iA(t,e,r,i){let n=await t.get(`/api/v1/sources/${e}/iceberg-refs`);if(n.source_id!==e)throw new w(`Source/${e} Iceberg observation returned source_id=${n.source_id}.`);if(!n.available)throw new w(`Source/${e} Iceberg refs unavailable: ${n.reason??"no reason returned"}.`);let o=new Map(n.tables.map(c=>[c.stream_name,c])),s=r.length>0?r:n.tables.map(c=>c.stream_name);if(r.length===0&&n.tables.length!==i)throw new w(`Source/${e} completed ${i} stream(s), but Iceberg refs returned ${n.tables.length} Bronze table(s).`);if(s.length===0&&i>0)throw new w(`Source/${e} completed ${i} stream(s), but Iceberg refs returned no Bronze tables.`);let a=[];for(let c of s){let l=o.get(c);if(!l)throw new w(`Source/${e} enabled stream '${c}' has no returned Bronze table.`);if(!l.available)throw new w(`Source/${e} Bronze table for stream '${c}' is unavailable: ${l.reason??"no reason returned"}.`);let d=(l.refs??[]).find(p=>p.name==="main");if(!d||d.snapshot_id==null)throw new w(`Source/${e} Bronze table '${l.table_path??c}' has no main snapshot.`);let u=Bn(d.snapshot_id,`Source/${e} Bronze table '${l.table_path??c}'`);a.push({stream_name:c,table_path:l.table_path??c,ref:"main",snapshot_id:u,total_records:d.total_records,evidence_scope:"observed_after_terminal_not_workflow_correlated"})}return a}async function oA(t,e,r){let i=await ge({fetch:()=>t.get("/api/v1/runs",{dagster_run_id:e,page_size:2}),isTerminal:a=>a.items.length>0,intervalMs:Math.min(1e3,r),timeoutMs:r});if(i.timedOut||i.value.items.length===0)throw new w(`Timed out waiting for TransformRun correlated to dagster_run_id=${e}.`);if(i.value.items.length!==1)throw new w(`Expected one TransformRun for dagster_run_id=${e}, received ${i.value.items.length}.`);let n=i.value.items[0];if(n.dagster_run_id!==e||!n.id)throw new w(`TransformRun correlation mismatch for dagster_run_id=${e}.`);let o=n.id,s=await ge({fetch:async()=>{let a=await t.get(`/api/v1/runs/${encodeURIComponent(o)}`);if(a.id!==o||a.dagster_run_id!==e)throw new w(`TransformRun correlation changed while polling transform_run_id=${o}.`);return a},isTerminal:a=>eA.has(Pt(a.status)),intervalMs:Math.min(5e3,r),timeoutMs:r});if(s.timedOut)throw new w(`Timed out waiting for transform_run_id=${o} (dagster_run_id=${e}).`);return s.value}function sA(t){if(!(t instanceof q)||t.status!==409)return{matches:!1};let e=t.body?.detail;if(e&&typeof e=="object"){let r=e,n=Pt(r.code??r.error??r.reason).replaceAll("-","_")==="sync_already_running",o=String(r.sync_run_id??"").trim(),s=String(r.workflow_id??"").trim();return{matches:n,...n&&o?{syncRunId:o}:{},...n&&s?{workflowId:s}:{}}}return{matches:!1}}async function aA(t,e,r,i,n){let o=await ge({fetch:async()=>{let s=await t.get(`/api/v1/backing-datasets/${e}/sync-history/${encodeURIComponent(r)}`);if(s.id!==r||s.backing_dataset_id!==e||s.workflow_id!==i)throw new w(`Ontology sync correlation mismatch for sync_run_id=${r} workflow_id=${i}.`);return s},isTerminal:s=>s.is_terminal===!0||["synced","error","skipped"].includes(Pt(s.status)),intervalMs:Math.min(6e3,n),timeoutMs:n});if(o.timedOut)throw new w(`Timed out waiting for BackingDataset/${e} sync_run_id=${r} workflow_id=${i}.`);return o.value}async function cA(t,e,r){let i=m=>process.stderr.write(m+`
247
+ `),n=!0,o={ok:!1,sources:[],transforms:[],backing_datasets:[]},s=new Set(e.filter(m=>m.kind==="Pipeline").map(m=>m.id)),a=H0(e),c=new Map;for(let m of a)m.backing_dataset_identity&&c.set(Ze(m.backing_dataset_identity),m);let l=new Set,d,u=new Map,p=new Map,f=()=>(o.ok=n,i(n?`
247
248
  wait: \u2713 all declared stages reached correlated terminal success; ontology entity readback remains separate proof.`:`
248
- wait: \u2717 one or more stages failed (see above).`),o);for(let m of e.filter(g=>g.kind==="Source")){i(`wait: syncing Source/${m.name} \u2192 bronze...`);let g,y;try{let k=await t.get(`/api/v1/sources/${m.id}`),z=Array.isArray(k.streams)?k.streams:[],b=new Map(z.map(G=>[String(G.name??"").trim(),G])),w=m.declared_stream_names?[...m.declared_stream_names]:z.filter(G=>G.is_enabled!==!1).map(G=>String(G.name??"").trim()).filter(Boolean);if(m.declared_stream_names){if(w.length===0)throw new $(`Source/${m.name} declares no enabled streams; --wait will not fall back to unmanaged streams.`);for(let G of w){let ge=b.get(G);if(!ge||ge.is_enabled===!1)throw new $(`Source/${m.name} declared enabled stream '${G}', but the applied Source does not expose it as enabled.`)}}k.status==="draft"&&await t.patch(`/api/v1/sources/${m.id}`,{status:"ready"});let j=await t.post(`/api/v1/sources/${m.id}/sync`,m.declared_stream_names?{stream_names:w}:{});if(g=String(j.workflow_id??"").trim(),!g)throw new $(`Source/${m.name} sync response omitted workflow_id; cannot correlate --wait.`);let C=g,A=await ve({fetch:()=>V0(t,C,m.id),isTerminal:G=>F0.has(Tt(G.status)),intervalMs:Math.min(5e3,r),timeoutMs:r});y=A.value;let E=Tt(A.value.status),M=A.timedOut?"timeout":E;if(A.timedOut||E!=="completed")o.sources.push({name:m.name,id:m.id,workflow_id:g,...A.value.sync_run_id?{sync_run_id:A.value.sync_run_id}:{},...A.value.workflow_run_id?{workflow_run_id:A.value.workflow_run_id}:{},status:M,...A.value.error_message?{error:A.value.error_message}:{},...A.value.temporal_ui_url?{temporal_ui_url:A.value.temporal_ui_url}:{}}),i(` \u2717 Source/${m.name}: ${M||"error"} workflow_id=${g}`),n=!1;else{if(A.value.records_synced==null||A.value.total_streams==null||A.value.successful_streams==null||A.value.failed_streams==null)throw new $(`Source/${m.name} workflow_id=${g} completed without persisted stream/row metrics.`);if(A.value.total_streams!==j.streams_count)throw new $(`Source/${m.name} workflow_id=${g} persisted total_streams=${A.value.total_streams}, but the trigger declared streams_count=${j.streams_count}.`);if(w.length>0&&w.length!==j.streams_count)throw new $(`Source/${m.name} trigger declared streams_count=${j.streams_count}, but source details returned ${w.length} enabled stream(s).`);if(A.value.failed_streams!==0||A.value.successful_streams!==A.value.total_streams)throw new $(`Source/${m.name} workflow_id=${g} completed with ${A.value.successful_streams}/${A.value.total_streams} successful streams and ${A.value.failed_streams} failures.`);let G=await G0(t,m.id,w,j.streams_count);o.sources.push({name:m.name,id:m.id,workflow_id:g,sync_run_id:A.value.sync_run_id,...A.value.workflow_run_id?{workflow_run_id:A.value.workflow_run_id}:{},status:E,row_count:A.value.records_synced,persisted_metrics:{total_streams:A.value.total_streams,successful_streams:A.value.successful_streams,failed_streams:A.value.failed_streams,records_synced:A.value.records_synced,bytes_synced:A.value.bytes_synced,batches_completed:A.value.batches_completed,total_batches_estimated:A.value.total_batches_estimated,records_written_so_far:A.value.records_written_so_far,failed_batches:A.value.failed_batches},observed_bronze_refs:G,...A.value.temporal_ui_url?{temporal_ui_url:A.value.temporal_ui_url}:{}}),i(` \u2713 bronze synced (${m.name}) workflow_id=${g} sync_run_id=${A.value.sync_run_id} rows=${A.value.records_synced} observed_main_refs=${G.map(ge=>`${ge.table_path}@${ge.snapshot_id}`).join(",")}`+(A.value.temporal_ui_url?` temporal=${A.value.temporal_ui_url}`:""))}}catch(k){let z=k.message;o.sources.push({name:m.name,id:m.id,...g?{workflow_id:g}:{},...y?.sync_run_id?{sync_run_id:y.sync_run_id}:{},...y?.workflow_run_id?{workflow_run_id:y.workflow_run_id}:{},status:"error",error:z}),i(` \u2717 Source/${m.name}: ${z}`),n=!1}}if(!n)return i("wait: source stage failed; downstream transforms were not triggered."),f();for(let m of e.filter(g=>g.kind==="Pipeline")){i(`wait: materializing Pipeline/${m.name} \u2192 silver...`);try{let g=await t.get(`/api/v1/pipelines/${m.id}`,{include_version:"true"}),y=g.current_version?.steps??[],k=q0(m.name,y,g.current_version?.dag_spec),z=B0(k,g.current_version?.dag_spec);for(let b of k){let w,j,C="error";try{let A=await t.post(`/api/v1/transforms/${b.transformId}/materialize`,{wait_for_completion:!1,timeout:Math.min(3600,Math.max(10,Math.ceil(r/1e3)))});if(w=String(A.dagster_run_id??"").trim(),!A.success||!w)throw new $(`Transform '${b.stepName}' was not started: ${A.error_message??"materialize response omitted dagster_run_id"}.`);let E=await K0(t,w,r);if(j=E.id,C=Tt(E.status),C!=="completed")throw new $(`Transform '${b.stepName}' failed: ${C} dagster_run_id=${w} transform_run_id=${E.id} ${E.error_message??""}`);if(E.output_snapshot_id==null)throw new $(`Transform '${b.stepName}' completed without output_snapshot_id (dagster_run_id=${w}, transform_run_id=${E.id}).`);let M=Bn(E.output_snapshot_id,`Transform '${b.stepName}' (dagster_run_id=${w}, transform_run_id=${E.id})`),G=E.rows_affected??E.output_row_count;if(G==null)throw new $(`Transform '${b.stepName}' completed without an observable row count (dagster_run_id=${w}, transform_run_id=${E.id}).`);o.transforms.push({pipeline_name:m.name,pipeline_id:m.id,step_name:b.stepName,transform_id:b.transformId,dagster_run_id:w,transform_run_id:E.id,status:C,row_count:G,snapshot_id:M}),d.set(b.transformId,{snapshotId:M,transformId:b.transformId,transformRunId:E.id,pipelineId:m.id}),i(` \u2713 silver materialized step=${b.stepName} dagster_run_id=${w} transform_run_id=${E.id} snapshot=${M} rows=${G}`)}catch(A){let E=A.message;throw o.transforms.push({pipeline_name:m.name,pipeline_id:m.id,step_name:b.stepName,transform_id:b.transformId,...w?{dagster_run_id:w}:{},...j?{transform_run_id:j}:{},status:C,error:E}),A}}if(z){let b=d.get(z.transformId);b&&p.set(m.id,b)}}catch(g){i(` \u2717 materialize ${m.name}: ${g.message}`),n=!1}}if(!n)return i("wait: transform stage failed; ontology sync was not triggered."),f();for(let m of a){i(`wait: syncing BackingDataset/${m.name} \u2192 ontology...`);let g,y,k=!1,z="error";try{for(let E of m.backing_dataset_dependencies??[]){let M=Ze(E);if(c.get(M)){if(!l.has(M))throw new $(`BackingDataset/${m.name} dependency '${M}' did not reach terminal success in this invocation`);continue}u??=await M0(t);let ge=u.get(M);if(!ge)throw new $(`BackingDataset/${m.name} external dependency '${M}' does not exist for this Frank tenant`);let ne=Tt(ge.status);if(ne!=="synced")throw new $(`BackingDataset/${m.name} external dependency '${M}' has status=${ne||"<missing>"}; it must already be synced before the dependent run can start`)}try{let E=await t.post(`/api/v1/backing-datasets/${m.id}/sync`,{});if(g=String(E.workflow_id??"").trim(),y=String(E.sync_run_id??"").trim(),!g||!y)throw new $(`BackingDataset/${m.name} sync response omitted sync_run_id/workflow_id; cannot correlate --wait.`)}catch(E){let M=J0(E);if(!M.matches)throw E;if(g=M.workflowId,y=M.syncRunId,k=!0,!g||!y)throw new $(`BackingDataset/${m.name} returned sync_already_running without sync_run_id/workflow_id.`);i(` \u21B3 adopted already-running ontology sync_run_id=${y} workflow_id=${g}`)}if(!g||!y)throw new $(`BackingDataset/${m.name} did not provide exact ontology run identifiers.`);let b=await t.get(`/api/v1/backing-datasets/${m.id}`);if(b.id!==m.id)throw new $(`BackingDataset/${m.name} detail correlation mismatch: expected id=${m.id}, actual=${b.id}.`);let w=b.transform_id?d.get(b.transform_id):b.pipeline_id?p.get(b.pipeline_id):void 0;if(b.pipeline_id!=null&&s.has(b.pipeline_id)&&!w)throw new $(`BackingDataset/${m.name} is linked to applied Pipeline/${b.pipeline_id}, but transform_id=${b.transform_id??"<missing>"} has no exact TransformRun snapshot from this invocation.`);if(k&&!w)throw new $(`BackingDataset/${m.name} cannot adopt already-running ontology sync_run_id=${y} without an exact correlated TransformRun snapshot from this invocation.`);let C=await W0(t,m.id,y,g,r);if(z=Tt(C.status),z!=="synced"&&z!=="skipped")throw new $(`BackingDataset/${m.name} ontology workflow failed: ${z} workflow_id=${g} ontology_sync_run_id=${C.id} ${C.error_message??""}`);if(C.snapshot_id==null&&C.snapshot_id_exact==null||C.rows_synced==null)throw new $(`BackingDataset/${m.name} ontology workflow completed without snapshot_id/rows_synced evidence (workflow_id=${g}, ontology_sync_run_id=${C.id}).`);let A=Bn(C.snapshot_id_exact??C.snapshot_id,`BackingDataset/${m.name} (workflow_id=${g}, ontology_sync_run_id=${C.id})`);if(w&&A!==w.snapshotId)throw new $(`BackingDataset/${m.name} ontology snapshot mismatch: expected=${w.snapshotId} from transform_run_id=${w.transformRunId}, actual=${A} from ontology_sync_run_id=${C.id}.`);o.backing_datasets.push({name:m.name,id:m.id,workflow_id:g,ontology_sync_run_id:C.id,...w?{correlated_transform_id:w.transformId}:{},...w?{correlated_transform_run_id:w.transformRunId}:{},status:z,row_count:C.rows_synced,snapshot_id:A,bulk_jobs:Array.isArray(C.bulk_jobs)?C.bulk_jobs:[],...C.temporal_ui_url?{temporal_ui_url:C.temporal_ui_url}:{}}),m.backing_dataset_identity&&l.add(Ze(m.backing_dataset_identity)),i(z==="skipped"?` \u2713 ontology already converged; no replay workflow_id=${g} ontology_sync_run_id=${C.id} snapshot=${A} rows=0`:` \u2713 ontology synced workflow_id=${g} ontology_sync_run_id=${C.id} snapshot=${A} rows=${C.rows_synced}`)}catch(b){let w=b.message;o.backing_datasets.push({name:m.name,id:m.id,...g?{workflow_id:g}:{},...y?{ontology_sync_run_id:y}:{},status:z,error:w}),i(` \u2717 BackingDataset/${m.name}: ${w}`),n=!1}}return f()}var H0=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;async function X0(t,e,r){let i=e;if(!H0.test(e)){let u=await tw(t,{sourceNameToId:new Map,pipelineNameToId:new Map,identityPolicyNameToPin:new Map,externalIdentityPolicyToPin:new Map},e);if(!u)throw new $(`Source '${e}' not found by name. Pass a source id or its metadata.name.`);i=u}let n=await t.get(`/api/v1/sources/${i}`,{include_streams:"true"}),o=n.streams??[];if(o.length===0)throw new $(`Source '${n.name}' has no streams to scaffold from. Configure a stream (and sync it to bronze) first.`);let s;if(r){if(s=o.find(l=>l.name===r),!s)throw new $(`Stream '${r}' not on source '${n.name}'. Streams: ${o.map(l=>l.name).join(", ")}`)}else{let l=o.filter(d=>d.is_enabled!==!1),u=l.length?l:o;if(u.length>1)throw new $(`Source '${n.name}' has ${u.length} streams \u2014 pass --stream <name> to choose one (${u.map(d=>d.name).join(", ")}).`);s=u[0]}if(!s.dataset_id)throw new $(`Stream '${s.name}' has no resolved bronze dataset_id; cannot read its physical schema.`);let a;try{a=await t.get(`/api/v1/datasets/${s.dataset_id}/physical-schema`)}catch(l){throw l instanceof F&&l.status===404?new $(`No physical schema for '${s.dataset_id}' yet \u2014 the bronze table (and its nested ROW columns) only exists after the source syncs. Run a sync (e.g. 'frankctl sources sync ${n.name}'), then scaffold.`):l}a.columns.length===0&&process.stderr.write(`warning: physical schema for '${s.dataset_id}' has 0 columns; emitting a 'SELECT *' skeleton
249
- `);let c=Jb(n,s,a);return Wb(c,n.name,s.name)}function rw(t){let e=t.command("pipelines").description("Manage pipelines");e.command("list").description("List pipelines").option("--status <status>","filter by status").option("--search <q>","search string").option("--page <n>","page number",i=>parseInt(i,10)).option("--page-size <n>","page size",i=>parseInt(i,10)).action(async(i,n)=>{let o=n.optsWithGlobals(),s=Ne(o),a=await ae(()=>s.get("/api/v1/pipelines",{status:i.status,search:i.search,page:i.page,page_size:i.pageSize}));if(o.json)return x(a);q(a.items,[{key:"id",header:"ID"},{key:"name",header:"NAME"},{key:"status",header:"STATUS"},{key:"active_version_id",header:"ACTIVE_VERSION"}])}),e.command("get <id>").description("Get a pipeline by id").option("--include-version","include active version payload").action(async(i,n,o)=>{let s=o.optsWithGlobals(),a=Ne(s),c=await ae(()=>a.get(`/api/v1/pipelines/${i}`,{include_version:n.includeVersion?"true":void 0}));if(s.json)return x(c);H([["id",c.id],["name",c.name],["status",c.status],["active_version_id",c.active_version_id??""],["updated_at",c.updated_at??""]])});let r=e.command("schedule").description("Manage Pipeline root automation");r.command("get <pipeline-id>").description("Read desired and loaded effective Pipeline schedule state").action(async(i,n,o)=>{let s=o.optsWithGlobals(),a=Ne(s),c=await ae(()=>a.get(`/api/v1/pipelines/${i}/schedule`));ca(c,s)}),r.command("set <pipeline-id>").description("Set and prove the Pipeline-owned root schedule").requiredOption("--type <type>","manual, eager, cron, or interval").option("--value <value>","cron expression or exact interval").option("--timezone <iana-zone>","IANA timezone (default: UTC)").action(async(i,n,o)=>{let s=o.optsWithGlobals(),a=Ne(s),c=await ae(async()=>v0(n)),l=await ae(()=>a.put(`/api/v1/pipelines/${i}/schedule`,{schedule:c}));ca(l,s)}),e.command("pause <pipeline-id>").description("Pause Pipeline root automation and prove loaded state").action(async(i,n,o)=>{let s=o.optsWithGlobals(),a=Ne(s);await ae(()=>a.post(`/api/v1/pipelines/${i}/pause`));let c=await ae(()=>a.get(`/api/v1/pipelines/${i}/schedule`));ca(c,s)}),e.command("resume <pipeline-id>").description("Resume desired Pipeline automation and prove loaded state").action(async(i,n,o)=>{let s=o.optsWithGlobals(),a=Ne(s);await ae(()=>a.post(`/api/v1/pipelines/${i}/activate`));let c=await ae(()=>a.get(`/api/v1/pipelines/${i}/schedule`));ca(c,s)}),e.command("trigger <pipeline-id>").description("Trigger every active Pipeline root once").action(async(i,n,o)=>{let s=o.optsWithGlobals(),a=Ne(s),c=await ae(()=>a.post(`/api/v1/pipelines/${i}/trigger`));s.json?x(c):(H([["pipeline_id",c.pipeline_id],["correlation_id",c.correlation_id],["status",c.status]]),q(c.receipts,[{key:"step_id",header:"ROOT_STEP"},{key:"transform_id",header:"TRANSFORM"},{key:"run_id",header:"DAGSTER_RUN"},{key:"status",header:"STATUS"},{key:"error",header:"ERROR"}])),c.status!=="accepted"&&(process.stderr.write(`Pipeline trigger is ${c.status}; inspect the per-root receipts above.
249
+ wait: \u2717 one or more stages failed (see above).`),o);for(let m of e.filter(h=>h.kind==="Source")){i(`wait: syncing Source/${m.name} \u2192 bronze...`);let h,y;try{let S=await t.get(`/api/v1/sources/${m.id}`),z=Array.isArray(S.streams)?S.streams:[],b=new Map(z.map(K=>[String(K.name??"").trim(),K])),$=m.declared_stream_names?[...m.declared_stream_names]:z.filter(K=>K.is_enabled!==!1).map(K=>String(K.name??"").trim()).filter(Boolean);if(m.declared_stream_names){if($.length===0)throw new w(`Source/${m.name} declares no enabled streams; --wait will not fall back to unmanaged streams.`);for(let K of $){let he=b.get(K);if(!he||he.is_enabled===!1)throw new w(`Source/${m.name} declared enabled stream '${K}', but the applied Source does not expose it as enabled.`)}}S.status==="draft"&&await t.patch(`/api/v1/sources/${m.id}`,{status:"ready"});let j=await t.post(`/api/v1/sources/${m.id}/sync`,m.declared_stream_names?{stream_names:$}:{});if(h=String(j.workflow_id??"").trim(),!h)throw new w(`Source/${m.name} sync response omitted workflow_id; cannot correlate --wait.`);let C=h,A=await ge({fetch:()=>rA(t,C,m.id),isTerminal:K=>Q0.has(Pt(K.status)),intervalMs:Math.min(5e3,r),timeoutMs:r});y=A.value;let E=Pt(A.value.status),M=A.timedOut?"timeout":E;if(A.timedOut||E!=="completed")o.sources.push({name:m.name,id:m.id,workflow_id:h,...A.value.sync_run_id?{sync_run_id:A.value.sync_run_id}:{},...A.value.workflow_run_id?{workflow_run_id:A.value.workflow_run_id}:{},status:M,...A.value.error_message?{error:A.value.error_message}:{},...A.value.temporal_ui_url?{temporal_ui_url:A.value.temporal_ui_url}:{}}),i(` \u2717 Source/${m.name}: ${M||"error"} workflow_id=${h}`),n=!1;else{if(A.value.records_synced==null||A.value.total_streams==null||A.value.successful_streams==null||A.value.failed_streams==null)throw new w(`Source/${m.name} workflow_id=${h} completed without persisted stream/row metrics.`);if(A.value.total_streams!==j.streams_count)throw new w(`Source/${m.name} workflow_id=${h} persisted total_streams=${A.value.total_streams}, but the trigger declared streams_count=${j.streams_count}.`);if($.length>0&&$.length!==j.streams_count)throw new w(`Source/${m.name} trigger declared streams_count=${j.streams_count}, but source details returned ${$.length} enabled stream(s).`);if(A.value.failed_streams!==0||A.value.successful_streams!==A.value.total_streams)throw new w(`Source/${m.name} workflow_id=${h} completed with ${A.value.successful_streams}/${A.value.total_streams} successful streams and ${A.value.failed_streams} failures.`);let K=await iA(t,m.id,$,j.streams_count);o.sources.push({name:m.name,id:m.id,workflow_id:h,sync_run_id:A.value.sync_run_id,...A.value.workflow_run_id?{workflow_run_id:A.value.workflow_run_id}:{},status:E,row_count:A.value.records_synced,persisted_metrics:{total_streams:A.value.total_streams,successful_streams:A.value.successful_streams,failed_streams:A.value.failed_streams,records_synced:A.value.records_synced,bytes_synced:A.value.bytes_synced,batches_completed:A.value.batches_completed,total_batches_estimated:A.value.total_batches_estimated,records_written_so_far:A.value.records_written_so_far,failed_batches:A.value.failed_batches},observed_bronze_refs:K,...A.value.temporal_ui_url?{temporal_ui_url:A.value.temporal_ui_url}:{}}),i(` \u2713 bronze synced (${m.name}) workflow_id=${h} sync_run_id=${A.value.sync_run_id} rows=${A.value.records_synced} observed_main_refs=${K.map(he=>`${he.table_path}@${he.snapshot_id}`).join(",")}`+(A.value.temporal_ui_url?` temporal=${A.value.temporal_ui_url}`:""))}}catch(S){let z=S.message;o.sources.push({name:m.name,id:m.id,...h?{workflow_id:h}:{},...y?.sync_run_id?{sync_run_id:y.sync_run_id}:{},...y?.workflow_run_id?{workflow_run_id:y.workflow_run_id}:{},status:"error",error:z}),i(` \u2717 Source/${m.name}: ${z}`),n=!1}}if(!n)return i("wait: source stage failed; downstream transforms were not triggered."),f();for(let m of e.filter(h=>h.kind==="Pipeline")){i(`wait: materializing Pipeline/${m.name} \u2192 silver...`);try{let h=await t.get(`/api/v1/pipelines/${m.id}`,{include_version:"true"}),y=h.current_version?.steps??[],S=tA(m.name,y,h.current_version?.dag_spec),z=nA(S,h.current_version?.dag_spec);for(let b of S){let $,j,C="error";try{let A=await t.post(`/api/v1/transforms/${b.transformId}/materialize`,{wait_for_completion:!1,timeout:Math.min(3600,Math.max(10,Math.ceil(r/1e3)))});if($=String(A.dagster_run_id??"").trim(),!A.success||!$)throw new w(`Transform '${b.stepName}' was not started: ${A.error_message??"materialize response omitted dagster_run_id"}.`);let E=await oA(t,$,r);if(j=E.id,C=Pt(E.status),C!=="completed")throw new w(`Transform '${b.stepName}' failed: ${C} dagster_run_id=${$} transform_run_id=${E.id} ${E.error_message??""}`);if(E.output_snapshot_id==null)throw new w(`Transform '${b.stepName}' completed without output_snapshot_id (dagster_run_id=${$}, transform_run_id=${E.id}).`);let M=Bn(E.output_snapshot_id,`Transform '${b.stepName}' (dagster_run_id=${$}, transform_run_id=${E.id})`),K=E.rows_affected??E.output_row_count;if(K==null)throw new w(`Transform '${b.stepName}' completed without an observable row count (dagster_run_id=${$}, transform_run_id=${E.id}).`);o.transforms.push({pipeline_name:m.name,pipeline_id:m.id,step_name:b.stepName,transform_id:b.transformId,dagster_run_id:$,transform_run_id:E.id,status:C,row_count:K,snapshot_id:M}),u.set(b.transformId,{snapshotId:M,transformId:b.transformId,transformRunId:E.id,pipelineId:m.id}),i(` \u2713 silver materialized step=${b.stepName} dagster_run_id=${$} transform_run_id=${E.id} snapshot=${M} rows=${K}`)}catch(A){let E=A.message;throw o.transforms.push({pipeline_name:m.name,pipeline_id:m.id,step_name:b.stepName,transform_id:b.transformId,...$?{dagster_run_id:$}:{},...j?{transform_run_id:j}:{},status:C,error:E}),A}}if(z){let b=u.get(z.transformId);b&&p.set(m.id,b)}}catch(h){i(` \u2717 materialize ${m.name}: ${h.message}`),n=!1}}if(!n)return i("wait: transform stage failed; ontology sync was not triggered."),f();for(let m of a){i(`wait: syncing BackingDataset/${m.name} \u2192 ontology...`);let h,y,S=!1,z="error";try{for(let E of m.backing_dataset_dependencies??[]){let M=Ze(E);if(c.get(M)){if(!l.has(M))throw new w(`BackingDataset/${m.name} dependency '${M}' did not reach terminal success in this invocation`);continue}d??=await X0(t);let he=d.get(M);if(!he)throw new w(`BackingDataset/${m.name} external dependency '${M}' does not exist for this Frank tenant`);let oe=Pt(he.status);if(oe!=="synced")throw new w(`BackingDataset/${m.name} external dependency '${M}' has status=${oe||"<missing>"}; it must already be synced before the dependent run can start`)}try{let E=await t.post(`/api/v1/backing-datasets/${m.id}/sync`,{});if(h=String(E.workflow_id??"").trim(),y=String(E.sync_run_id??"").trim(),!h||!y)throw new w(`BackingDataset/${m.name} sync response omitted sync_run_id/workflow_id; cannot correlate --wait.`)}catch(E){let M=sA(E);if(!M.matches)throw E;if(h=M.workflowId,y=M.syncRunId,S=!0,!h||!y)throw new w(`BackingDataset/${m.name} returned sync_already_running without sync_run_id/workflow_id.`);i(` \u21B3 adopted already-running ontology sync_run_id=${y} workflow_id=${h}`)}if(!h||!y)throw new w(`BackingDataset/${m.name} did not provide exact ontology run identifiers.`);let b=await t.get(`/api/v1/backing-datasets/${m.id}`);if(b.id!==m.id)throw new w(`BackingDataset/${m.name} detail correlation mismatch: expected id=${m.id}, actual=${b.id}.`);let $=b.transform_id?u.get(b.transform_id):b.pipeline_id?p.get(b.pipeline_id):void 0;if(b.pipeline_id!=null&&s.has(b.pipeline_id)&&!$)throw new w(`BackingDataset/${m.name} is linked to applied Pipeline/${b.pipeline_id}, but transform_id=${b.transform_id??"<missing>"} has no exact TransformRun snapshot from this invocation.`);if(S&&!$)throw new w(`BackingDataset/${m.name} cannot adopt already-running ontology sync_run_id=${y} without an exact correlated TransformRun snapshot from this invocation.`);let C=await aA(t,m.id,y,h,r);if(z=Pt(C.status),z!=="synced"&&z!=="skipped")throw new w(`BackingDataset/${m.name} ontology workflow failed: ${z} workflow_id=${h} ontology_sync_run_id=${C.id} ${C.error_message??""}`);if(C.snapshot_id==null&&C.snapshot_id_exact==null||C.rows_synced==null)throw new w(`BackingDataset/${m.name} ontology workflow completed without snapshot_id/rows_synced evidence (workflow_id=${h}, ontology_sync_run_id=${C.id}).`);let A=Bn(C.snapshot_id_exact??C.snapshot_id,`BackingDataset/${m.name} (workflow_id=${h}, ontology_sync_run_id=${C.id})`);if($&&A!==$.snapshotId)throw new w(`BackingDataset/${m.name} ontology snapshot mismatch: expected=${$.snapshotId} from transform_run_id=${$.transformRunId}, actual=${A} from ontology_sync_run_id=${C.id}.`);o.backing_datasets.push({name:m.name,id:m.id,workflow_id:h,ontology_sync_run_id:C.id,...$?{correlated_transform_id:$.transformId}:{},...$?{correlated_transform_run_id:$.transformRunId}:{},status:z,row_count:C.rows_synced,snapshot_id:A,bulk_jobs:Array.isArray(C.bulk_jobs)?C.bulk_jobs:[],...C.temporal_ui_url?{temporal_ui_url:C.temporal_ui_url}:{}}),m.backing_dataset_identity&&l.add(Ze(m.backing_dataset_identity)),i(z==="skipped"?` \u2713 ontology already converged; no replay workflow_id=${h} ontology_sync_run_id=${C.id} snapshot=${A} rows=0`:` \u2713 ontology synced workflow_id=${h} ontology_sync_run_id=${C.id} snapshot=${A} rows=${C.rows_synced}`)}catch(b){let $=b.message;o.backing_datasets.push({name:m.name,id:m.id,...h?{workflow_id:h}:{},...y?{ontology_sync_run_id:y}:{},status:z,error:$}),i(` \u2717 BackingDataset/${m.name}: ${$}`),n=!1}}return f()}var lA=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;async function uA(t,e,r){let i=e;if(!lA.test(e)){let d=await cw(t,{sourceNameToId:new Map,pipelineNameToId:new Map,identityPolicyNameToPin:new Map,externalIdentityPolicyToPin:new Map},e);if(!d)throw new w(`Source '${e}' not found by name. Pass a source id or its metadata.name.`);i=d}let n=await t.get(`/api/v1/sources/${i}`,{include_streams:"true"}),o=n.streams??[];if(o.length===0)throw new w(`Source '${n.name}' has no streams to scaffold from. Configure a stream (and sync it to bronze) first.`);let s;if(r){if(s=o.find(l=>l.name===r),!s)throw new w(`Stream '${r}' not on source '${n.name}'. Streams: ${o.map(l=>l.name).join(", ")}`)}else{let l=o.filter(u=>u.is_enabled!==!1),d=l.length?l:o;if(d.length>1)throw new w(`Source '${n.name}' has ${d.length} streams \u2014 pass --stream <name> to choose one (${d.map(u=>u.name).join(", ")}).`);s=d[0]}if(!s.dataset_id)throw new w(`Stream '${s.name}' has no resolved bronze dataset_id; cannot read its physical schema.`);let a;try{a=await t.get(`/api/v1/datasets/${s.dataset_id}/physical-schema`)}catch(l){throw l instanceof q&&l.status===404?new w(`No physical schema for '${s.dataset_id}' yet \u2014 the bronze table (and its nested ROW columns) only exists after the source syncs. Run a sync (e.g. 'frankctl sources sync ${n.name}'), then scaffold.`):l}a.columns.length===0&&process.stderr.write(`warning: physical schema for '${s.dataset_id}' has 0 columns; emitting a 'SELECT *' skeleton
250
+ `);let c=tw(n,s,a);return nw(c,n.name,s.name)}function uw(t){let e=t.command("pipelines").description("Manage pipelines");e.command("list").description("List pipelines").option("--status <status>","filter by status").option("--search <q>","search string").option("--page <n>","page number",i=>parseInt(i,10)).option("--page-size <n>","page size",i=>parseInt(i,10)).action(async(i,n)=>{let o=n.optsWithGlobals(),s=Ne(o),a=await Q(()=>s.get("/api/v1/pipelines",{status:i.status,search:i.search,page:i.page,page_size:i.pageSize}));if(o.json)return k(a);F(a.items,[{key:"id",header:"ID"},{key:"name",header:"NAME"},{key:"status",header:"STATUS"},{key:"active_version_id",header:"ACTIVE_VERSION"}])}),e.command("get <id>").description("Get a pipeline by id").option("--include-version","include active version payload").action(async(i,n,o)=>{let s=o.optsWithGlobals(),a=Ne(s),c=await Q(()=>a.get(`/api/v1/pipelines/${i}`,{include_version:n.includeVersion?"true":void 0}));if(s.json)return k(c);H([["id",c.id],["name",c.name],["status",c.status],["active_version_id",c.active_version_id??""],["updated_at",c.updated_at??""]])});let r=e.command("schedule").description("Manage Pipeline root automation");r.command("get <pipeline-id>").description("Read desired and loaded effective Pipeline schedule state").action(async(i,n,o)=>{let s=o.optsWithGlobals(),a=Ne(s),c=await Q(()=>a.get(`/api/v1/pipelines/${i}/schedule`));pa(c,s)}),r.command("set <pipeline-id>").description("Set and prove the Pipeline-owned root schedule").requiredOption("--type <type>","manual, eager, cron, or interval").option("--value <value>","cron expression or exact interval").option("--timezone <iana-zone>","IANA timezone (default: UTC)").option("--timeout <sec>","loaded-state proof timeout in seconds",String(fa)).option("--poll-interval <ms>","loaded-state proof poll interval in milliseconds",String(ma)).action(async(i,n,o)=>{let s=o.optsWithGlobals(),a=Ne(s),c=await Q(async()=>E0(n)),l=await Q(async()=>xm(n)),d=await Q(()=>a.put(`/api/v1/pipelines/${i}/schedule`,{schedule:c}));!d.confirmed&&d.reconciliation_state==="pending"&&(d=await Q(()=>Im(a,i,d,l))),pa(d,s)}),e.command("pause <pipeline-id>").description("Pause Pipeline root automation and prove loaded state").option("--timeout <sec>","loaded-state proof timeout in seconds",String(fa)).option("--poll-interval <ms>","loaded-state proof poll interval in milliseconds",String(ma)).action(async(i,n,o)=>{let s=o.optsWithGlobals(),a=Ne(s),c=await Q(async()=>xm(n));await Q(()=>a.post(`/api/v1/pipelines/${i}/pause`));let l=await Q(()=>Im(a,i,void 0,c));pa(l,s)}),e.command("resume <pipeline-id>").description("Resume desired Pipeline automation and prove loaded state").option("--timeout <sec>","loaded-state proof timeout in seconds",String(fa)).option("--poll-interval <ms>","loaded-state proof poll interval in milliseconds",String(ma)).action(async(i,n,o)=>{let s=o.optsWithGlobals(),a=Ne(s),c=await Q(async()=>xm(n));await Q(()=>a.post(`/api/v1/pipelines/${i}/activate`));let l=await Q(()=>Im(a,i,void 0,c));pa(l,s)}),e.command("trigger <pipeline-id>").description("Trigger every active Pipeline root once").action(async(i,n,o)=>{let s=o.optsWithGlobals(),a=Ne(s),c=await Q(()=>a.post(`/api/v1/pipelines/${i}/trigger`));s.json?k(c):(H([["pipeline_id",c.pipeline_id],["correlation_id",c.correlation_id],["status",c.status]]),F(c.receipts,[{key:"step_id",header:"ROOT_STEP"},{key:"transform_id",header:"TRANSFORM"},{key:"run_id",header:"DAGSTER_RUN"},{key:"status",header:"STATUS"},{key:"error",header:"ERROR"}])),c.status!=="accepted"&&(process.stderr.write(`Pipeline trigger is ${c.status}; inspect the per-root receipts above.
250
251
  `),process.exit(1))}),e.command("delete <id>").description("Archive a pipeline and retain versions, assets, and run history").option("--yes","skip confirmation").action(async(i,n,o)=>{let s=o.optsWithGlobals();n.yes||(process.stderr.write(`archive pipeline ${i}? re-run with --yes to confirm
251
- `),process.exit(2));let a=Ne(s);await ae(()=>a.del(`/api/v1/pipelines/${i}`)),s.json||process.stderr.write(`archived ${i}
252
- `)}),e.command("apply").description("Apply a multi-doc YAML file (Source / IdentityPolicy / Pipeline / BackingDataset) idempotently").requiredOption("-f, --file <path>","YAML file path").option("--allow-deprecate","Allow ensure_schema narrowing (passed through to BackingDataset POSTs)").option("--allow-recreate","On 409 immutable_diff (PR-C), DELETE the existing row and re-POST. Operational state (cursor, ledger, snapshot ids, run history) is LOST \u2014 explicit opt-in only. Default off; the apply path is idempotent without it.").option("--dry-run","Client-side parse + resolve. Prints the apply plan without talking to the server. Catches malformed YAML and obviously broken cross-refs; does NOT validate pattern_ids or detect immutable_diff. Use --dry-run-server for that.").option("--dry-run-server","Server-side preflight. Sends the multi-doc body to the dry-run endpoint which validates each doc against the catalog and DB without persisting. Catches missing pattern_ids, would-409 immutable diffs, and unresolved cross-refs. Does not contact the ontology unless --live-ontology is also passed.").option("--live-ontology","With --dry-run-server, add GET-only compatibility checks against the configured live ontology for BackingDatasets and render the returned endpoint/schema evidence. Invalid without --dry-run-server.").option("--wait","After applying, drive the chain end-to-end: sync Sources \u2192 bronze, materialize Pipeline steps \u2192 silver, and sync BackingDatasets \u2192 ontology, polling each to terminal. Exits non-zero if any stage fails.").option("--timeout <sec>","Per-stage timeout for --wait (default 300)",i=>parseInt(i,10),300).action(async(i,n)=>{let o=n.optsWithGlobals(),s=Ne(o),a;try{a=S0(k0(i.file))}catch(d){throw d instanceof P&&(process.stderr.write(`${d.message}
253
- `),process.exit(d.exitCode)),d}let c={sourceNameToId:new Map,pipelineNameToId:new Map,identityPolicyNameToPin:new Map,externalIdentityPolicyToPin:new Map};if(i.liveOntology&&!i.dryRunServer){process.stderr.write(`--live-ontology requires --dry-run-server (it is a server preflight extension).
252
+ `),process.exit(2));let a=Ne(s);await Q(()=>a.del(`/api/v1/pipelines/${i}`)),s.json||process.stderr.write(`archived ${i}
253
+ `)}),e.command("apply").description("Apply a multi-doc YAML file (Source / IdentityPolicy / Pipeline / BackingDataset) idempotently").requiredOption("-f, --file <path>","YAML file path").option("--allow-deprecate","Allow ensure_schema narrowing (passed through to BackingDataset POSTs)").option("--allow-recreate","On 409 immutable_diff (PR-C), DELETE the existing row and re-POST. Operational state (cursor, ledger, snapshot ids, run history) is LOST \u2014 explicit opt-in only. Default off; the apply path is idempotent without it.").option("--dry-run","Client-side parse + resolve. Prints the apply plan without talking to the server. Catches malformed YAML and obviously broken cross-refs; does NOT validate pattern_ids or detect immutable_diff. Use --dry-run-server for that.").option("--dry-run-server","Server-side preflight. Sends the multi-doc body to the dry-run endpoint which validates each doc against the catalog and DB without persisting. Catches missing pattern_ids, would-409 immutable diffs, and unresolved cross-refs. Does not contact the ontology unless --live-ontology is also passed.").option("--live-ontology","With --dry-run-server, add GET-only compatibility checks against the configured live ontology for BackingDatasets and render the returned endpoint/schema evidence. Invalid without --dry-run-server.").option("--wait","After applying, drive the chain end-to-end: sync Sources \u2192 bronze, materialize Pipeline steps \u2192 silver, and sync BackingDatasets \u2192 ontology, polling each to terminal. Exits non-zero if any stage fails.").option("--timeout <sec>","Per-stage timeout for --wait (default 300)",i=>parseInt(i,10),300).action(async(i,n)=>{let o=n.optsWithGlobals(),s=Ne(o),a;try{a=j0(D0(i.file))}catch(u){throw u instanceof I&&(process.stderr.write(`${u.message}
254
+ `),process.exit(u.exitCode)),u}let c={sourceNameToId:new Map,pipelineNameToId:new Map,identityPolicyNameToPin:new Map,externalIdentityPolicyToPin:new Map};if(i.liveOntology&&!i.dryRunServer){process.stderr.write(`--live-ontology requires --dry-run-server (it is a server preflight extension).
254
255
  `),process.exit(2);return}if(i.dryRun){process.stderr.write(`apply plan (${a.length} docs):
255
- `);for(let d of a){let p=d.kind==="Source"&&Array.isArray(d.spec?.streams)?d.spec.streams:null,f=p?` streams=${p.length} [${p.map(m=>String(m.name??"<unnamed>")).join(",")}]`:"";process.stderr.write(` ${d.kind.padEnd(15)} ${d.metadata?.name??"<unnamed>"}${f}
256
- `)}return}if(i.dryRunServer){let d={docs:a.map(f=>({apiVersion:f.apiVersion??Vn,kind:f.kind,metadata:f.metadata??{},spec:f.spec??{}})),allow_deprecate:!!i.allowDeprecate,...i.liveOntology?{live_ontology:!0}:{}},p=await ae(()=>s.post("/api/v1/apply/dry-run",d));if(o.json){x(p),p.valid||process.exit(5);return}process.stderr.write(`dry-run-server (${p.results.length} doc(s)):
257
- `);for(let f of p.results){let m=f.errors.length?"\u2717":f.warnings.length?"!":"\u2713",g=Number.isInteger(f.planned_version)&&Number(f.planned_version)>0?` version=${f.planned_version}`:"";process.stderr.write(` ${m} ${f.kind.padEnd(15)} ${(f.name??"<unnamed>").padEnd(40)} action=${f.action}${g}
256
+ `);for(let u of a){let p=u.kind==="Source"&&Array.isArray(u.spec?.streams)?u.spec.streams:null,f=p?` streams=${p.length} [${p.map(m=>String(m.name??"<unnamed>")).join(",")}]`:"";process.stderr.write(` ${u.kind.padEnd(15)} ${u.metadata?.name??"<unnamed>"}${f}
257
+ `)}return}if(i.dryRunServer){let u={docs:a.map(f=>({apiVersion:f.apiVersion??Vn,kind:f.kind,metadata:f.metadata??{},spec:f.spec??{}})),allow_deprecate:!!i.allowDeprecate,...i.liveOntology?{live_ontology:!0}:{}},p=await Q(()=>s.post("/api/v1/apply/dry-run",u));if(o.json){k(p),p.valid||process.exit(5);return}process.stderr.write(`dry-run-server (${p.results.length} doc(s)):
258
+ `);for(let f of p.results){let m=f.errors.length?"\u2717":f.warnings.length?"!":"\u2713",h=Number.isInteger(f.planned_version)&&Number(f.planned_version)>0?` version=${f.planned_version}`:"";process.stderr.write(` ${m} ${f.kind.padEnd(15)} ${(f.name??"<unnamed>").padEnd(40)} action=${f.action}${h}
258
259
  `);for(let y of f.errors)process.stderr.write(` error: ${y}
259
260
  `);for(let y of f.warnings)process.stderr.write(` warn: ${y}
260
261
  `);for(let y of f.stream_actions??[])process.stderr.write(` stream ${y.name}: ${y.action}`+(y.fields.length?` fields=${y.fields.join(",")}`:"")+`
261
262
  `);if(f.immutable_diff)for(let y of f.immutable_diff)process.stderr.write(` diff: ${y.name}: ${JSON.stringify(y.existing)} \u2192 ${JSON.stringify(y.requested)}
262
263
  `);if(f.ontology_preflight){let y=f.ontology_preflight;process.stderr.write(` ontology: ${y.transport} ${y.base_url} entity_type=${y.entity_type_id} tenant=${y.ontology_tenant_id??"<global>"} schema_owner=${y.schema_owner} valid=${y.valid}
263
- `);for(let k of y.errors)process.stderr.write(` ontology error: ${k.path} [${k.code}] ${k.message}
264
- `);for(let k of y.warnings)process.stderr.write(` ontology warn: ${k}
264
+ `);for(let S of y.errors)process.stderr.write(` ontology error: ${S.path} [${S.code}] ${S.message}
265
+ `);for(let S of y.warnings)process.stderr.write(` ontology warn: ${S}
265
266
  `)}}p.valid||(process.stderr.write(`
266
267
  dry-run-server: FAILED \u2014 fix the errors above and retry.
267
268
  `),process.exit(5)),process.stderr.write(`
268
269
  dry-run-server: ok \u2014 current preflight is clean; apply rechecks concurrent changes.
269
- `);return}await ae(()=>I0(s,c,a));let l=[];for(let d of a){d.kind==="Pipeline"?(await ae(()=>P0(s,c,d.spec)),await ae(async()=>O0(c,d))):d.kind==="BackingDataset"&&await ae(()=>T0(s,c,d.spec));let p={"if-not-exists":"true"};d.kind==="BackingDataset"&&i.allowDeprecate&&(p.allow_deprecate="true"),process.stderr.write(`applying ${d.kind}/${d.metadata.name}...
270
- `);let f;try{f=await nw(s,d,p)}catch(b){if(b instanceof F){let w=await U0(s,d,b,!!i.allowRecreate);w.ok?f=w.created:(process.stderr.write(`failed at ${d.kind}/${d.metadata.name}: ${b.message}
270
+ `);return}await Q(()=>U0(s,c,a));let l=[];for(let u of a){u.kind==="Pipeline"?(await Q(()=>M0(s,c,u.spec)),await Q(async()=>L0(c,u))):u.kind==="BackingDataset"&&await Q(()=>q0(s,c,u.spec));let p={"if-not-exists":"true"};u.kind==="BackingDataset"&&i.allowDeprecate&&(p.allow_deprecate="true"),process.stderr.write(`applying ${u.kind}/${u.metadata.name}...
271
+ `);let f;try{f=await lw(s,u,p)}catch(b){if(b instanceof q){let $=await Y0(s,u,b,!!i.allowRecreate);$.ok?f=$.created:(process.stderr.write(`failed at ${u.kind}/${u.metadata.name}: ${b.message}
271
272
  `),l.length&&process.stderr.write(`applied before failure: ${l.map(j=>`${j.kind}/${j.name}`).join(", ")}
272
- `),process.exit(b.exitCode))}else throw b}if(d.kind==="Source"){let b=f.stream_reconciliation;for(let w of b?.actions??[])process.stderr.write(` stream ${String(w.name??"<unnamed>")}: ${String(w.action??"unknown")}`+(Array.isArray(w.fields)&&w.fields.length>0?` fields=${w.fields.map(String).join(",")}`:"")+`
273
- `);for(let w of b?.warnings??[])process.stderr.write(` Source/${d.metadata.name} stream warning: ${String(w)}
274
- `)}let m=String(f.id??""),g=d.kind==="IdentityPolicy"?await ae(async()=>{let b=Number(f.version),w=f.tier;if(!m||!Number.isInteger(b)||b<1||w!=="tenant"&&w!=="system")throw new $(`IdentityPolicy/${d.metadata.name} response did not contain an exact id, tier, and version pin.`);if(w!=="tenant")throw new $(`IdentityPolicy/${d.metadata.name} declaration resolved to tier='${w}'; declarations may create tenant policies only.`);return{id:m,name:d.metadata.name,tier:w,version:b,recipeHash:Qb(f.recipe_hash,`IdentityPolicy/${d.metadata.name}`)}}):void 0,y=g?.version,k=d.kind==="IdentityPolicy"&&typeof f.apply_action=="string"?f.apply_action:void 0;d.kind==="IdentityPolicy"&&process.stderr.write(` policy action=${k??"reconciled"} id=${m||"<missing>"} version=${y??"<missing>"}
275
- `);let z=d.kind==="Source"&&Array.isArray(d.spec?.streams)?d.spec.streams.filter(b=>b.is_enabled!==!1).map(b=>String(b.name??"").trim()).filter(Boolean):void 0;l.push({kind:d.kind,name:d.metadata.name,id:m,...y!==void 0?{version:y}:{},...k!==void 0?{apply_action:k}:{},...z!==void 0?{declared_stream_names:z}:{},...d.kind==="BackingDataset"?{backing_dataset_identity:Xb(d)}:{},...d.kind==="BackingDataset"&&d.metadata?.dependsOn?{backing_dataset_dependencies:d.metadata.dependsOn.map(b=>({...b}))}:{}}),d.kind==="Source"&&m?c.sourceNameToId.set(d.metadata.name,m):g?c.identityPolicyNameToPin.set(d.metadata.name,g):d.kind==="Pipeline"&&m&&c.pipelineNameToId.set(d.metadata.name,m)}o.json||(process.stderr.write(`applied ${l.length} doc(s)
276
- `),q(l,[{key:"kind",header:"KIND"},{key:"name",header:"NAME"},{key:"id",header:"ID"}]));let u;i.wait&&(u=await Y0(s,l,(i.timeout??300)*1e3)),o.json&&x({applied:l,...u?{wait:u}:{}}),u&&!u.ok&&process.exit(1)}),e.command("export <id>").description("Export a pipeline + its Sources + its BackingDatasets as multi-doc YAML").option("-o, --output <format>","Output format. Slice 1 supports only 'yaml'.","yaml").action(async(i,n,o)=>{let s=o.optsWithGlobals();n.output!=="yaml"&&(process.stderr.write(`unsupported output format '${n.output}'; slice 1 supports only 'yaml'
277
- `),process.exit(2));let a=Ne(s),c=await ae(()=>R0(a,i));process.stdout.write(c)}),e.command("scaffold").description("Generate a starter Source+Pipeline+BackingDataset YAML from a synced source's physical bronze schema (real Trino ROW refs pre-filled)").requiredOption("--source <id-or-name>","source id or metadata.name to scaffold from").option("--stream <name>","which stream to scaffold from (default: the sole enabled stream)").option("-o, --output <file>","write YAML to a file instead of stdout").action(async(i,n)=>{let o=n.optsWithGlobals(),s=Ne(o),a=await ae(()=>X0(s,i.source,i.stream));i.output?(Yb.writeFileSync(i.output,a),process.stderr.write(`wrote ${i.output}
278
- `)):process.stdout.write(a)}),e.command("validate <id>").description("Run a pipeline in sandbox mode and stream results").option("--sample-limit <n>","sample row limit per step",i=>parseInt(i,10),1e3).option("--timeout <sec>","overall timeout in seconds",i=>parseInt(i,10),600).option("--poll-interval <ms>","status poll interval ms",i=>parseInt(i,10),2500).option("--no-wait","start sandbox and return immediately").action(async(i,n,o)=>{let s=o.optsWithGlobals(),a=Ne(s),c=await ae(()=>a.post(`/api/v1/pipelines/${i}/sandbox`,{sample_limit:n.sampleLimit,overall_timeout_seconds:n.timeout}));if(n.wait===!1){s.json?x({workflow_id:c.workflow_id}):process.stderr.write(`workflow_id: ${c.workflow_id}
279
- `);return}let l=new Set,u=!!process.stderr.isTTY,d=s.color!==!1&&u,p=await ae(()=>a.pollSandbox(i,c.workflow_id,{intervalMs:n.pollInterval,timeoutMs:n.timeout*1e3,onTick:m=>{for(let g of m.step_results??[]){let y=`${g.step_name}:${g.status}`;l.has(y)||(l.add(y),process.stderr.write(Mb(g,{color:d})+`
280
- `))}}}));x(p);let f=p.status==="completed"?0:5;process.exit(f)})}function km(t){let e=W({profile:t.profile,apiUrl:t.apiUrl}),r={enabled:process.env.FRANK_DEV_MODE==="true",tenantId:process.env.FRANKCTL_TENANT_ID};return new se({profile:e,getToken:()=>oe({profile:t.profile,apiUrl:t.apiUrl}),devMode:r})}async function fi(t){try{return await t()}catch(e){throw e instanceof F&&(process.stderr.write(`${e.message}
281
- `),process.exit(e.exitCode)),e instanceof $&&(process.stderr.write(`${e.message}
282
- `),process.exit(e.exitCode)),e}}var Q0=new Set(["completed","failed","cancelled","terminated"]);function eA(t){return Q0.has(t?.toLowerCase?.()??"")}function iw(t){let e=(t??"").toLowerCase();return e==="completed"?0:e==="failed"||e==="cancelled"||e==="terminated"?5:e==="running"||e==="processing"||e==="pending"?0:4}var tA=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function ow(t){let e=t.command("runs").description("Inspect and control workflow runs");e.command("get <workflow-id>").description("Get temporal workflow status").action(async(r,i,n)=>{let o=n.optsWithGlobals(),s=km(o),a=await fi(()=>s.get(`/api/v1/temporal/workflows/${r}`));o.json?x(a):H([["workflow_id",a.workflow_id??r],["status",a.status??""],["history_length",a.history_length??""],["error",a.error?String(a.error):""]]),process.exit(iw(String(a.status??"")))}),e.command("wait <workflow-id>").description("Poll a temporal workflow until terminal").option("--timeout <sec>","overall timeout seconds",r=>parseInt(r,10),600).option("--poll-interval <ms>","poll interval ms",r=>parseInt(r,10),2e3).action(async(r,i,n)=>{let o=n.optsWithGlobals(),s=km(o),a=await fi(()=>ve({fetch:()=>s.get(`/api/v1/temporal/workflows/${r}`),isTerminal:c=>eA(String(c.status??"")),intervalMs:i.pollInterval,timeoutMs:i.timeout*1e3}));a.timedOut&&(o.json?x({...a.value,timed_out:!0}):process.stderr.write(`timed out waiting for ${r}
283
- `),process.exit(4)),x(a.value),process.exit(iw(String(a.value.status??"")))}),e.command("cancel <id>").description("Cancel a run. If <id> is a UUID, tries transform-runs then sync-runs cancel. Else temporal.").option("--yes","skip confirmation").action(async(r,i,n)=>{let o=n.optsWithGlobals();!i.yes&&process.stdin.isTTY&&(process.stderr.write(`cancel run ${r}? re-run with --yes to confirm
284
- `),process.exit(2));let s=km(o);if(tA.test(r)){let c=async u=>{try{return await s.post(u)}catch(d){if(d instanceof F&&d.status===404)return null;throw d}},l=await fi(()=>c(`/api/v1/transform-runs/${r}/cancel`));l===null&&(l=await fi(()=>c(`/api/v1/runs/${r}/cancel`))),l===null&&(process.stderr.write(`run not found: ${r}
285
- `),process.exit(4)),o.json?x(l):process.stderr.write(`cancelled ${r}
286
- `);return}let a=await fi(()=>s.post(`/api/v1/temporal/workflows/${r}/cancel`));o.json?x(a):process.stderr.write(`cancelled ${r}
287
- `)})}var xm=Nt(Mt(),1);import Sm from"node:fs";import nA from"node:path";function X(t,e){let r=rA(t),i=iA(r,t),n=e.safeParse(i);if(!n.success){let o=n.error.issues.map(s=>`${s.path.join(".")||"<root>"}: ${s.message}`).join("; ");throw new P(`invalid body in ${t}: ${o}`)}return n.data}function rA(t){if(t==="-")try{return Sm.readFileSync(0,"utf-8")}catch(e){throw new P(`failed to read stdin: ${e.message}`)}if(!Sm.existsSync(t))throw new P(`config file not found: ${t}`);try{return Sm.readFileSync(t,"utf-8")}catch(e){throw new P(`failed to read ${t}: ${e.message}`)}}function iA(t,e){if(e==="-"){let i=t.trim();if(i.startsWith("{")||i.startsWith("["))try{return JSON.parse(t)}catch(n){throw new P(`failed to parse stdin as JSON: ${n.message}`)}try{return(0,xm.parse)(t)}catch(n){throw new P(`failed to parse stdin as YAML: ${n.message}`)}}let r=nA.extname(e).toLowerCase();if(r===".json")try{return JSON.parse(t)}catch(i){throw new P(`failed to parse ${e} as JSON: ${i.message}`)}if(r===".yaml"||r===".yml")try{return(0,xm.parse)(t)}catch(i){throw new P(`failed to parse ${e} as YAML: ${i.message}`)}throw new P(`unsupported extension '${r||"(none)"}' for ${e}; use .yaml, .yml, or .json`)}var Om=h.enum(["manual","cron","interval"]),oA=h.enum(["full_refresh","incremental"]),sw=h.enum(["monolithic","iterator"]),sA=h.enum(["append","replace","merge"]),aA=h.enum(["draft","ready","syncing","active","paused","error","decommissioned"]),Im=h.object({name:h.string().min(1),namespace:h.string().nullable().optional(),sync_mode:oA.optional(),cursor_field:h.string().nullable().optional(),write_disposition:sA.optional(),primary_key_path:h.array(h.string()).nullable().optional(),is_enabled:h.boolean().optional(),schema:h.record(h.string(),h.unknown()).nullable().optional(),supported_sync_modes:h.array(h.string()).nullable().optional(),dest_table_name:h.string().nullable().optional(),files:h.array(h.object({column:h.string().min(1),identity:h.string().min(1),store:h.enum(["none","table","object_store"]),max_bytes:h.union([h.number(),h.string()]).optional(),auth:h.enum(["source","none"]).optional()})).nullable().optional()}),mi=h.record(h.string(),h.unknown()).refine(t=>Object.keys(t).length>0,{message:"credential values must contain at least one field"}),aw=h.object({name:h.string().min(1),description:h.string().optional(),pattern_id:h.string().min(1),source_config:h.record(h.string(),h.unknown()).default({}),credential_ref:h.string().uuid().optional(),credential_name:h.string().min(1).optional(),credential_values:mi.optional(),schedule_type:Om.optional(),schedule_value:h.string().optional(),sync_mode:sw.optional(),max_items_per_chunk:h.number().int().min(1).max(2147483647).nullable().optional(),streams:h.array(Im).optional()}),cw=h.object({name:h.string().min(1).optional(),description:h.string().optional(),source_config:h.record(h.string(),h.unknown()).optional(),credential_ref:h.string().uuid().nullable().optional(),credential_name:h.string().min(1).optional(),credential_values:mi.optional(),schedule_type:Om.optional(),schedule_value:h.string().optional(),sync_mode:sw.optional(),status:aA.optional(),max_items_per_chunk:h.number().int().min(1).max(2147483647).nullable().optional()}).refine(t=>Object.keys(t).length>0,{message:"patch body must contain at least one field"}),lw=h.union([h.array(Im),h.object({streams:h.array(Im)})]).transform(t=>Array.isArray(t)?t:t.streams),uw=h.object({streams:h.array(h.record(h.string(),h.unknown()))}),Gn=h.object({name:h.string().min(1),type:h.string().min(1),nullable:h.boolean().optional(),description:h.string().optional()}),dw=h.object({user_intent:h.string().min(1),pipeline_name:h.string().min(1).optional(),source_tables:h.array(h.string()).optional(),target_description:h.string().min(1).optional(),target_schema:h.array(Gn).optional(),target_sdm_id:h.string().min(1).optional(),pipeline_context:h.string().optional(),constraints:h.record(h.string(),h.unknown()).optional()}),pw=h.object({pattern_id:h.string().min(1),intent:h.string().min(1),source_schema:h.array(Gn).optional(),target_schema:h.array(Gn).optional(),examples:h.array(h.record(h.string(),h.unknown())).optional(),context:h.record(h.string(),h.unknown()).optional()}),fw=h.object({sql:h.string().min(1),dialect:h.string().optional(),context:h.record(h.string(),h.unknown()).optional()}),mw=h.object({pattern_id:h.string().min(1),failure_log:h.string().min(1),files:h.array(h.object({filename:h.string(),content:h.string()})).optional(),context:h.record(h.string(),h.unknown()).optional()}),gw=h.object({source_schema:h.array(Gn).min(1),source_table:h.string().min(1),context:h.record(h.string(),h.unknown()).optional()}),hw=h.object({raw_text:h.string().min(1).max(2e4),available_pattern_ids:h.array(h.string()).optional()}),yw=h.object({source_schema:h.array(Gn).min(1),target_schema:h.array(Gn).min(1),context:h.record(h.string(),h.unknown()).optional()}),_w=h.object({pattern_id:h.string().min(1),intent:h.string().min(1),context:h.record(h.string(),h.unknown()).optional()}),vw=h.object({pattern_id:h.string().min(1),files:h.array(h.object({filename:h.string(),content:h.string()})).min(1),metadata:h.record(h.string(),h.unknown()).optional()}),mj=h.object({pattern_id:h.string().min(1),params:h.record(h.string(),h.unknown())}),bw=h.object({event:h.string().min(1),pattern:h.string().min(1),version:h.string().min(1),digest:h.string().min(1),image:h.string().min(1),repository:h.string().min(1),commit_sha:h.string().min(1),timestamp:h.string().optional(),catalog:h.record(h.string(),h.unknown()).optional()}),ww=h.object({schedule_type:Om,schedule_value:h.string().min(1),paused:h.boolean().optional()});function $w(t,e){let r=t.command("streams").description("Manage source streams");r.command("list <source-id>").description("List streams for a source").option("--enabled-only","only enabled streams").action(async(s,a,c)=>{let l=c.optsWithGlobals(),u=e.getClient(l),d=await e.handle(()=>u.get(`/api/v1/sources/${s}/streams`,{enabled_only:a.enabledOnly?"true":void 0}));if(l.json)return x(d);q(d,[{key:"name",header:"NAME"},{key:"namespace",header:"NAMESPACE"},{key:"sync_mode",header:"SYNC_MODE"},{key:"cursor_field",header:"CURSOR"},{key:"write_disposition",header:"WRITE"},{key:"is_enabled",header:"ENABLED"},{key:"last_sync_at",header:"LAST_SYNC"},{key:"rows_synced",header:"ROWS"}])}),r.command("set <source-id>").description("Bulk upsert streams from a YAML/JSON file").requiredOption("-f, --file <path>","stream config file (or - for stdin)").action(async(s,a,c)=>{let l=c.optsWithGlobals(),u=X(a.file,lw),d=e.getClient(l),p=await e.handle(()=>d.post(`/api/v1/sources/${s}/streams/bulk`,u));x(p)}),r.command("refresh-schema <source-id>").description("Refresh stream schemas from discovery").option("-f, --file <path>","discovery result file (else use --from-discovery)").option("--from-discovery","run discovery then feed its streams to refresh-schema").option("--timeout <sec>","discovery timeout",s=>parseInt(s,10),300).option("--poll-interval <ms>","discovery poll ms",s=>parseInt(s,10),2e3).action(async(s,a,c)=>{let l=c.optsWithGlobals(),u=e.getClient(l),d;if(a.fromDiscovery){let f=await e.handle(()=>u.get(`/api/v1/sources/${s}`)),m=await e.handle(()=>u.post("/api/v1/sources/discover",{pattern_id:f.pattern_id,config:f.source_config})),g=await e.handle(()=>ve({fetch:()=>u.get(`/api/v1/sources/discover/status/${m.workflow_id}`),isTerminal:k=>k.status==="completed"||k.status==="failed",intervalMs:a.pollInterval,timeoutMs:a.timeout*1e3}));(g.timedOut||g.value.status!=="completed")&&(process.stderr.write(`discovery did not complete: ${g.value.status}
288
- `),process.exit(5)),d={streams:g.value.streams??[]}}else a.file?d=X(a.file,uw):(process.stderr.write(`provide either --from-discovery or -f <file>
289
- `),process.exit(2));let p=await e.handle(()=>u.post(`/api/v1/sources/${s}/streams/refresh-schema`,d));x(p)});let i=new Set(["string","integer","number","boolean","object","array"]);function n(s){let a=s.indexOf("=");if(a<=0||a===s.length-1)throw new Error(`--field expects 'name=type' or 'a.b.c=type' (e.g. 'dt=integer', 'components.no=number'); got '${s}'`);let c=s.slice(0,a).trim(),l=s.slice(a+1).trim().toLowerCase();if(!c)throw new Error(`--field has empty name in '${s}'`);if(!i.has(l))throw new Error(`--field '${s}': type must be one of ${[...i].join(", ")}`);let u=c.split(".").map(d=>d.trim());if(u.some(d=>d.length===0))throw new Error(`--field '${s}': empty path segment (check for stray dots)`);return[u,l]}function o(s){let a={properties:{}};for(let[c,l]of s){let u=a.properties;for(let d=0;d<c.length-1;d++){let p=c[d],f=u[p];!f||typeof f!="object"?(f={properties:{}},u[p]=f):f.properties||(f.properties={}),u=f.properties}u[c[c.length-1]]={type:l}}return a}r.command("set-types <source-id> <stream-id>").description("Declare JSON-Schema types on a stream's fields so the extract-time coercer lands the right bronze types (#469).").option("-f, --field <name=type>","field declaration, repeatable (e.g. --field dt=integer --field pm25=number)",(s,a=[])=>[...a,s],[]).action(async(s,a,c,l)=>{let u=l.optsWithGlobals();(!c.field||c.field.length===0)&&(process.stderr.write(`at least one --field <name>=<type> required
290
- `),process.exit(2));let d=[];try{for(let g of c.field)d.push(n(g))}catch(g){process.stderr.write(`${g.message}
291
- `),process.exit(2)}let p={schema:o(d)},f=e.getClient(u),m=await e.handle(()=>f.patch(`/api/v1/sources/${s}/streams/${a}`,p));if(u.json)return x(m);process.stderr.write(`\u2713 stream ${a} schema updated with ${d.length} field type(s)
292
- `),q(d.map(([g,y])=>({field:g.join("."),type:y})),[{key:"field",header:"FIELD"},{key:"type",header:"TYPE"}])}),r.command("diff-types <source-id> <stream-id>").description("Show bronze column types vs the stream's declared JSON-Schema. Use 'set-types' to fix drift surfaced here (#469).").action(async(s,a,c,l)=>{let u=l.optsWithGlobals(),d=e.getClient(u),p=await e.handle(()=>d.get(`/api/v1/sources/${s}/streams/${a}/type-diff`));if(u.json)return x(p);process.stderr.write(`bronze: ${p.bronze_table} (exists=${p.bronze_exists})
273
+ `),process.exit(b.exitCode))}else throw b}if(u.kind==="Source"){let b=f.stream_reconciliation;for(let $ of b?.actions??[])process.stderr.write(` stream ${String($.name??"<unnamed>")}: ${String($.action??"unknown")}`+(Array.isArray($.fields)&&$.fields.length>0?` fields=${$.fields.map(String).join(",")}`:"")+`
274
+ `);for(let $ of b?.warnings??[])process.stderr.write(` Source/${u.metadata.name} stream warning: ${String($)}
275
+ `)}let m=String(f.id??""),h=u.kind==="IdentityPolicy"?await Q(async()=>{let b=Number(f.version),$=f.tier;if(!m||!Number.isInteger(b)||b<1||$!=="tenant"&&$!=="system")throw new w(`IdentityPolicy/${u.metadata.name} response did not contain an exact id, tier, and version pin.`);if($!=="tenant")throw new w(`IdentityPolicy/${u.metadata.name} declaration resolved to tier='${$}'; declarations may create tenant policies only.`);return{id:m,name:u.metadata.name,tier:$,version:b,recipeHash:sw(f.recipe_hash,`IdentityPolicy/${u.metadata.name}`)}}):void 0,y=h?.version,S=u.kind==="IdentityPolicy"&&typeof f.apply_action=="string"?f.apply_action:void 0;u.kind==="IdentityPolicy"&&process.stderr.write(` policy action=${S??"reconciled"} id=${m||"<missing>"} version=${y??"<missing>"}
276
+ `);let z=u.kind==="Source"&&Array.isArray(u.spec?.streams)?u.spec.streams.filter(b=>b.is_enabled!==!1).map(b=>String(b.name??"").trim()).filter(Boolean):void 0;l.push({kind:u.kind,name:u.metadata.name,id:m,...y!==void 0?{version:y}:{},...S!==void 0?{apply_action:S}:{},...z!==void 0?{declared_stream_names:z}:{},...u.kind==="BackingDataset"?{backing_dataset_identity:ow(u)}:{},...u.kind==="BackingDataset"&&u.metadata?.dependsOn?{backing_dataset_dependencies:u.metadata.dependsOn.map(b=>({...b}))}:{}}),u.kind==="Source"&&m?c.sourceNameToId.set(u.metadata.name,m):h?c.identityPolicyNameToPin.set(u.metadata.name,h):u.kind==="Pipeline"&&m&&c.pipelineNameToId.set(u.metadata.name,m)}o.json||(process.stderr.write(`applied ${l.length} doc(s)
277
+ `),F(l,[{key:"kind",header:"KIND"},{key:"name",header:"NAME"},{key:"id",header:"ID"}]));let d;i.wait&&(d=await cA(s,l,(i.timeout??300)*1e3)),o.json&&k({applied:l,...d?{wait:d}:{}}),d&&!d.ok&&process.exit(1)}),e.command("export <id>").description("Export a pipeline + its Sources + its BackingDatasets as multi-doc YAML").option("-o, --output <format>","Output format. Slice 1 supports only 'yaml'.","yaml").action(async(i,n,o)=>{let s=o.optsWithGlobals();n.output!=="yaml"&&(process.stderr.write(`unsupported output format '${n.output}'; slice 1 supports only 'yaml'
278
+ `),process.exit(2));let a=Ne(s),c=await Q(()=>W0(a,i));process.stdout.write(c)}),e.command("scaffold").description("Generate a starter Source+Pipeline+BackingDataset YAML from a synced source's physical bronze schema (real Trino ROW refs pre-filled)").requiredOption("--source <id-or-name>","source id or metadata.name to scaffold from").option("--stream <name>","which stream to scaffold from (default: the sole enabled stream)").option("-o, --output <file>","write YAML to a file instead of stdout").action(async(i,n)=>{let o=n.optsWithGlobals(),s=Ne(o),a=await Q(()=>uA(s,i.source,i.stream));i.output?(rw.writeFileSync(i.output,a),process.stderr.write(`wrote ${i.output}
279
+ `)):process.stdout.write(a)}),e.command("validate <id>").description("Run a pipeline in sandbox mode and stream results").option("--sample-limit <n>","sample row limit per step",i=>parseInt(i,10),1e3).option("--timeout <sec>","overall timeout in seconds",i=>parseInt(i,10),600).option("--poll-interval <ms>","status poll interval ms",i=>parseInt(i,10),2500).option("--no-wait","start sandbox and return immediately").action(async(i,n,o)=>{let s=o.optsWithGlobals(),a=Ne(s),c=await Q(()=>a.post(`/api/v1/pipelines/${i}/sandbox`,{sample_limit:n.sampleLimit,overall_timeout_seconds:n.timeout}));if(n.wait===!1){s.json?k({workflow_id:c.workflow_id}):process.stderr.write(`workflow_id: ${c.workflow_id}
280
+ `);return}let l=new Set,d=!!process.stderr.isTTY,u=s.color!==!1&&d,p=await Q(()=>a.pollSandbox(i,c.workflow_id,{intervalMs:n.pollInterval,timeoutMs:n.timeout*1e3,onTick:m=>{for(let h of m.step_results??[]){let y=`${h.step_name}:${h.status}`;l.has(y)||(l.add(y),process.stderr.write(Jb(h,{color:u})+`
281
+ `))}}}));k(p);let f=p.status==="completed"?0:5;process.exit(f)})}function Em(t){let e=G({profile:t.profile,apiUrl:t.apiUrl,tenantId:t.tenant});return new re({profile:e,getToken:()=>ne({profile:t.profile,apiUrl:t.apiUrl})})}async function hi(t){try{return await t()}catch(e){throw e instanceof q&&(process.stderr.write(`${e.message}
282
+ `),process.exit(e.exitCode)),e instanceof w&&(process.stderr.write(`${e.message}
283
+ `),process.exit(e.exitCode)),e}}var dA=new Set(["completed","failed","cancelled","terminated"]);function pA(t){return dA.has(t?.toLowerCase?.()??"")}function dw(t){let e=(t??"").toLowerCase();return e==="completed"?0:e==="failed"||e==="cancelled"||e==="terminated"?5:e==="running"||e==="processing"||e==="pending"?0:4}var fA=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function pw(t){let e=t.command("runs").description("Inspect and control workflow runs");e.command("get <workflow-id>").description("Get temporal workflow status").action(async(r,i,n)=>{let o=n.optsWithGlobals(),s=Em(o),a=await hi(()=>s.get(`/api/v1/temporal/workflows/${r}`));o.json?k(a):H([["workflow_id",a.workflow_id??r],["status",a.status??""],["history_length",a.history_length??""],["error",a.error?String(a.error):""]]),process.exit(dw(String(a.status??"")))}),e.command("wait <workflow-id>").description("Poll a temporal workflow until terminal").option("--timeout <sec>","overall timeout seconds",r=>parseInt(r,10),600).option("--poll-interval <ms>","poll interval ms",r=>parseInt(r,10),2e3).action(async(r,i,n)=>{let o=n.optsWithGlobals(),s=Em(o),a=await hi(()=>ge({fetch:()=>s.get(`/api/v1/temporal/workflows/${r}`),isTerminal:c=>pA(String(c.status??"")),intervalMs:i.pollInterval,timeoutMs:i.timeout*1e3}));a.timedOut&&(o.json?k({...a.value,timed_out:!0}):process.stderr.write(`timed out waiting for ${r}
284
+ `),process.exit(4)),k(a.value),process.exit(dw(String(a.value.status??"")))}),e.command("cancel <id>").description("Cancel a run. If <id> is a UUID, tries transform-runs then sync-runs cancel. Else temporal.").option("--yes","skip confirmation").action(async(r,i,n)=>{let o=n.optsWithGlobals();!i.yes&&process.stdin.isTTY&&(process.stderr.write(`cancel run ${r}? re-run with --yes to confirm
285
+ `),process.exit(2));let s=Em(o);if(fA.test(r)){let c=async d=>{try{return await s.post(d)}catch(u){if(u instanceof q&&u.status===404)return null;throw u}},l=await hi(()=>c(`/api/v1/transform-runs/${r}/cancel`));l===null&&(l=await hi(()=>c(`/api/v1/runs/${r}/cancel`))),l===null&&(process.stderr.write(`run not found: ${r}
286
+ `),process.exit(4)),o.json?k(l):process.stderr.write(`cancelled ${r}
287
+ `);return}let a=await hi(()=>s.post(`/api/v1/temporal/workflows/${r}/cancel`));o.json?k(a):process.stderr.write(`cancelled ${r}
288
+ `)})}var Nm=Ct(qt(),1);import zm from"node:fs";import mA from"node:path";function J(t,e){let r=gA(t),i=hA(r,t),n=e.safeParse(i);if(!n.success){let o=n.error.issues.map(s=>`${s.path.join(".")||"<root>"}: ${s.message}`).join("; ");throw new I(`invalid body in ${t}: ${o}`)}return n.data}function gA(t){if(t==="-")try{return zm.readFileSync(0,"utf-8")}catch(e){throw new I(`failed to read stdin: ${e.message}`)}if(!zm.existsSync(t))throw new I(`config file not found: ${t}`);try{return zm.readFileSync(t,"utf-8")}catch(e){throw new I(`failed to read ${t}: ${e.message}`)}}function hA(t,e){if(e==="-"){let i=t.trim();if(i.startsWith("{")||i.startsWith("["))try{return JSON.parse(t)}catch(n){throw new I(`failed to parse stdin as JSON: ${n.message}`)}try{return(0,Nm.parse)(t)}catch(n){throw new I(`failed to parse stdin as YAML: ${n.message}`)}}let r=mA.extname(e).toLowerCase();if(r===".json")try{return JSON.parse(t)}catch(i){throw new I(`failed to parse ${e} as JSON: ${i.message}`)}if(r===".yaml"||r===".yml")try{return(0,Nm.parse)(t)}catch(i){throw new I(`failed to parse ${e} as YAML: ${i.message}`)}throw new I(`unsupported extension '${r||"(none)"}' for ${e}; use .yaml, .yml, or .json`)}var Dm=g.enum(["manual","cron","interval"]),yA=g.enum(["full_refresh","incremental"]),fw=g.enum(["monolithic","iterator"]),_A=g.enum(["append","replace","merge"]),vA=g.enum(["draft","ready","syncing","active","paused","error","decommissioned"]),mw=g.object({name:g.string().min(1),description:g.string().optional(),device_type:g.string().min(1),sink_type:g.string().optional(),mqtt_topic_pattern:g.string().min(1),mqtt_username:g.string().optional(),mqtt_qos:g.number().int().min(0).max(2).optional(),schema_definition:g.record(g.string(),g.unknown()).optional(),kafka_topic:g.string().min(1),kafka_dlq_topic:g.string().optional(),kafka_key_field:g.string().optional(),kafka_partitions:g.number().int().optional(),kafka_replication_factor:g.number().int().optional(),kafka_retention_ms:g.number().int().optional(),kafka_dlq_retention_ms:g.number().int().optional()}),gw=g.object({description:g.string().optional(),mqtt_qos:g.number().int().min(0).max(2).optional(),schema_definition:g.record(g.string(),g.unknown()).optional(),kafka_key_field:g.string().optional(),kafka_retention_ms:g.number().int().optional(),kafka_dlq_retention_ms:g.number().int().optional()}).refine(t=>Object.keys(t).length>0,{message:"patch body must contain at least one field"}),Cm=g.object({name:g.string().min(1),namespace:g.string().nullable().optional(),sync_mode:yA.optional(),cursor_field:g.string().nullable().optional(),write_disposition:_A.optional(),primary_key_path:g.array(g.string()).nullable().optional(),is_enabled:g.boolean().optional(),schema:g.record(g.string(),g.unknown()).nullable().optional(),supported_sync_modes:g.array(g.string()).nullable().optional(),dest_table_name:g.string().nullable().optional()}),yi=g.record(g.string(),g.unknown()).refine(t=>Object.keys(t).length>0,{message:"credential values must contain at least one field"}),hw=g.object({name:g.string().min(1),description:g.string().optional(),pattern_id:g.string().min(1),source_config:g.record(g.string(),g.unknown()).default({}),credential_ref:g.string().uuid().optional(),credential_name:g.string().min(1).optional(),credential_values:yi.optional(),schedule_type:Dm.optional(),schedule_value:g.string().optional(),sync_mode:fw.optional(),max_items_per_chunk:g.number().int().min(1).max(2147483647).nullable().optional(),streams:g.array(Cm).optional()}),yw=g.object({name:g.string().min(1).optional(),description:g.string().optional(),source_config:g.record(g.string(),g.unknown()).optional(),credential_ref:g.string().uuid().nullable().optional(),credential_name:g.string().min(1).optional(),credential_values:yi.optional(),schedule_type:Dm.optional(),schedule_value:g.string().optional(),sync_mode:fw.optional(),status:vA.optional(),max_items_per_chunk:g.number().int().min(1).max(2147483647).nullable().optional()}).refine(t=>Object.keys(t).length>0,{message:"patch body must contain at least one field"}),_w=g.union([g.array(Cm),g.object({streams:g.array(Cm)})]).transform(t=>Array.isArray(t)?t:t.streams),vw=g.object({streams:g.array(g.record(g.string(),g.unknown()))}),Gn=g.object({name:g.string().min(1),type:g.string().min(1),nullable:g.boolean().optional(),description:g.string().optional()}),bw=g.object({user_intent:g.string().min(1),pipeline_name:g.string().min(1).optional(),source_tables:g.array(g.string()).optional(),target_description:g.string().min(1).optional(),target_schema:g.array(Gn).optional(),target_sdm_id:g.string().min(1).optional(),pipeline_context:g.string().optional(),constraints:g.record(g.string(),g.unknown()).optional()}),ww=g.object({pattern_id:g.string().min(1),intent:g.string().min(1),source_schema:g.array(Gn).optional(),target_schema:g.array(Gn).optional(),examples:g.array(g.record(g.string(),g.unknown())).optional(),context:g.record(g.string(),g.unknown()).optional()}),$w=g.object({sql:g.string().min(1),dialect:g.string().optional(),context:g.record(g.string(),g.unknown()).optional()}),kw=g.object({pattern_id:g.string().min(1),failure_log:g.string().min(1),files:g.array(g.object({filename:g.string(),content:g.string()})).optional(),context:g.record(g.string(),g.unknown()).optional()}),Sw=g.object({source_schema:g.array(Gn).min(1),source_table:g.string().min(1),context:g.record(g.string(),g.unknown()).optional()}),xw=g.object({raw_text:g.string().min(1).max(2e4),available_pattern_ids:g.array(g.string()).optional()}),Iw=g.object({source_schema:g.array(Gn).min(1),target_schema:g.array(Gn).min(1),context:g.record(g.string(),g.unknown()).optional()}),Ow=g.object({pattern_id:g.string().min(1),intent:g.string().min(1),context:g.record(g.string(),g.unknown()).optional()}),Pw=g.object({pattern_id:g.string().min(1),files:g.array(g.object({filename:g.string(),content:g.string()})).min(1),metadata:g.record(g.string(),g.unknown()).optional()}),kj=g.object({pattern_id:g.string().min(1),params:g.record(g.string(),g.unknown())}),Tw=g.object({event:g.string().min(1),pattern:g.string().min(1),version:g.string().min(1),digest:g.string().min(1),image:g.string().min(1),repository:g.string().min(1),commit_sha:g.string().min(1),timestamp:g.string().optional(),catalog:g.record(g.string(),g.unknown()).optional()}),Aw=g.object({schedule_type:Dm,schedule_value:g.string().min(1),paused:g.boolean().optional()});function Ew(t,e){let r=t.command("streams").description("Manage source streams");r.command("list <source-id>").description("List streams for a source").option("--enabled-only","only enabled streams").action(async(s,a,c)=>{let l=c.optsWithGlobals(),d=e.getClient(l),u=await e.handle(()=>d.get(`/api/v1/sources/${s}/streams`,{enabled_only:a.enabledOnly?"true":void 0}));if(l.json)return k(u);F(u,[{key:"name",header:"NAME"},{key:"namespace",header:"NAMESPACE"},{key:"sync_mode",header:"SYNC_MODE"},{key:"cursor_field",header:"CURSOR"},{key:"write_disposition",header:"WRITE"},{key:"is_enabled",header:"ENABLED"},{key:"last_sync_at",header:"LAST_SYNC"},{key:"rows_synced",header:"ROWS"}])}),r.command("set <source-id>").description("Bulk upsert streams from a YAML/JSON file").requiredOption("-f, --file <path>","stream config file (or - for stdin)").action(async(s,a,c)=>{let l=c.optsWithGlobals(),d=J(a.file,_w),u=e.getClient(l),p=await e.handle(()=>u.post(`/api/v1/sources/${s}/streams/bulk`,d));k(p)}),r.command("refresh-schema <source-id>").description("Refresh stream schemas from discovery").option("-f, --file <path>","discovery result file (else use --from-discovery)").option("--from-discovery","run discovery then feed its streams to refresh-schema").option("--timeout <sec>","discovery timeout",s=>parseInt(s,10),300).option("--poll-interval <ms>","discovery poll ms",s=>parseInt(s,10),2e3).action(async(s,a,c)=>{let l=c.optsWithGlobals(),d=e.getClient(l),u;if(a.fromDiscovery){let f=await e.handle(()=>d.get(`/api/v1/sources/${s}`)),m=await e.handle(()=>d.post("/api/v1/sources/discover",{pattern_id:f.pattern_id,config:f.source_config})),h=await e.handle(()=>ge({fetch:()=>d.get(`/api/v1/sources/discover/status/${m.workflow_id}`),isTerminal:S=>S.status==="completed"||S.status==="failed",intervalMs:a.pollInterval,timeoutMs:a.timeout*1e3}));(h.timedOut||h.value.status!=="completed")&&(process.stderr.write(`discovery did not complete: ${h.value.status}
289
+ `),process.exit(5)),u={streams:h.value.streams??[]}}else a.file?u=J(a.file,vw):(process.stderr.write(`provide either --from-discovery or -f <file>
290
+ `),process.exit(2));let p=await e.handle(()=>d.post(`/api/v1/sources/${s}/streams/refresh-schema`,u));k(p)});let i=new Set(["string","integer","number","boolean","object","array"]);function n(s){let a=s.indexOf("=");if(a<=0||a===s.length-1)throw new Error(`--field expects 'name=type' or 'a.b.c=type' (e.g. 'dt=integer', 'components.no=number'); got '${s}'`);let c=s.slice(0,a).trim(),l=s.slice(a+1).trim().toLowerCase();if(!c)throw new Error(`--field has empty name in '${s}'`);if(!i.has(l))throw new Error(`--field '${s}': type must be one of ${[...i].join(", ")}`);let d=c.split(".").map(u=>u.trim());if(d.some(u=>u.length===0))throw new Error(`--field '${s}': empty path segment (check for stray dots)`);return[d,l]}function o(s){let a={properties:{}};for(let[c,l]of s){let d=a.properties;for(let u=0;u<c.length-1;u++){let p=c[u],f=d[p];!f||typeof f!="object"?(f={properties:{}},d[p]=f):f.properties||(f.properties={}),d=f.properties}d[c[c.length-1]]={type:l}}return a}r.command("set-types <source-id> <stream-id>").description("Declare JSON-Schema types on a stream's fields so the extract-time coercer lands the right bronze types (#469).").option("-f, --field <name=type>","field declaration, repeatable (e.g. --field dt=integer --field pm25=number)",(s,a=[])=>[...a,s],[]).action(async(s,a,c,l)=>{let d=l.optsWithGlobals();(!c.field||c.field.length===0)&&(process.stderr.write(`at least one --field <name>=<type> required
291
+ `),process.exit(2));let u=[];try{for(let h of c.field)u.push(n(h))}catch(h){process.stderr.write(`${h.message}
292
+ `),process.exit(2)}let p={schema:o(u)},f=e.getClient(d),m=await e.handle(()=>f.patch(`/api/v1/sources/${s}/streams/${a}`,p));if(d.json)return k(m);process.stderr.write(`\u2713 stream ${a} schema updated with ${u.length} field type(s)
293
+ `),F(u.map(([h,y])=>({field:h.join("."),type:y})),[{key:"field",header:"FIELD"},{key:"type",header:"TYPE"}])}),r.command("diff-types <source-id> <stream-id>").description("Show bronze column types vs the stream's declared JSON-Schema. Use 'set-types' to fix drift surfaced here (#469).").action(async(s,a,c,l)=>{let d=l.optsWithGlobals(),u=e.getClient(d),p=await e.handle(()=>u.get(`/api/v1/sources/${s}/streams/${a}/type-diff`));if(d.json)return k(p);process.stderr.write(`bronze: ${p.bronze_table} (exists=${p.bronze_exists})
293
294
  `),p.bronze_error&&process.stderr.write(`bronze read error: ${p.bronze_error}
294
- `),q(p.fields,[{key:"field",header:"FIELD"},{key:"bronze",header:"BRONZE"},{key:"declared",header:"DECLARED"},{key:"status",header:"STATUS"}]);let f=p.fields.filter(m=>m.status==="drift");f.length&&(process.stderr.write(`
295
+ `),F(p.fields,[{key:"field",header:"FIELD"},{key:"bronze",header:"BRONZE"},{key:"declared",header:"DECLARED"},{key:"status",header:"STATUS"}]);let f=p.fields.filter(m=>m.status==="drift");f.length&&(process.stderr.write(`
295
296
  ${f.length} field(s) will fail next sync. Try: frankctl sources streams set-types ${s} ${a}`+f.map(m=>` --field ${m.field}=<type>`).join("")+`
296
- `),process.exit(5))})}function Ce(t){let e=W({profile:t.profile,apiUrl:t.apiUrl}),r={enabled:process.env.FRANK_DEV_MODE==="true",tenantId:process.env.FRANKCTL_TENANT_ID};return new se({profile:e,getToken:()=>oe({profile:t.profile,apiUrl:t.apiUrl}),devMode:r})}async function fe(t){try{return await t()}catch(e){throw e instanceof F&&(process.stderr.write(`${e.message}
297
- `),process.exit(e.exitCode)),e instanceof $&&(process.stderr.write(`${e.message}
298
- `),process.exit(e.exitCode)),e}}var cA=new Set(["active","ready","error","paused"]);function la(t){let e={...t};return delete e.credential_name,delete e.credential_values,e}async function lA(t,e,r,i){let n=new Set;for(;;){let o=await t.get(e,{level:r});o.available||(o.fallback_url?process.stderr.write(`logs unavailable; fallback: ${o.fallback_url}
297
+ `),process.exit(5))})}function Ce(t){let e=G({profile:t.profile,apiUrl:t.apiUrl,tenantId:t.tenant});return new re({profile:e,getToken:()=>ne({profile:t.profile,apiUrl:t.apiUrl})})}async function fe(t){try{return await t()}catch(e){throw e instanceof q&&(process.stderr.write(`${e.message}
298
+ `),process.exit(e.exitCode)),e instanceof w&&(process.stderr.write(`${e.message}
299
+ `),process.exit(e.exitCode)),e}}var bA=new Set(["active","ready","error","paused"]);function ga(t){let e={...t};return delete e.credential_name,delete e.credential_values,e}async function wA(t,e,r,i){let n=new Set;for(;;){let o=await t.get(e,{level:r});o.available||(o.fallback_url?process.stderr.write(`logs unavailable; fallback: ${o.fallback_url}
299
300
  `):process.stderr.write(`logs unavailable
300
- `),process.exit(4));let s=(o.entries??[]).filter(a=>{let c=`${a.timestamp}|${a.message}`;return n.has(c)?!1:(n.add(c),!0)});s.length&&qn(s),await new Promise(a=>setTimeout(a,i))}}function kw(t){let e=t.command("sources").description("Manage sources"),r=e.command("credentials").description("Manage write-only Source credentials");r.command("set <source-id>").description("Create and attach a tenant-owned credential from a file or stdin").requiredOption("--name <name>","stable tenant-local credential name").requiredOption("-f, --values-file <path>","YAML/JSON values (or - for stdin)").action(async(i,n,o)=>{let s=o.optsWithGlobals(),a=X(n.valuesFile,mi),c=Ce(s),l=await fe(()=>c.post(`/api/v1/sources/${i}/credentials`,{name:n.name,values:a}));x(l)}),r.command("rotate <source-id>").description("Rotate an attached credential from a file or stdin").requiredOption("-f, --values-file <path>","YAML/JSON values (or - for stdin)").action(async(i,n,o)=>{let s=o.optsWithGlobals(),a=X(n.valuesFile,mi),c=Ce(s),l=await fe(()=>c.put(`/api/v1/sources/${i}/credentials`,{values:a}));x(l)}),e.command("list").description("List sources").option("--type <pattern-id>","filter by pattern_id").option("--status <s>","filter by status").option("--search <q>","client-side search on name").option("--page <n>","page",i=>parseInt(i,10)).option("--page-size <n>","page size",i=>parseInt(i,10)).action(async(i,n)=>{let o=n.optsWithGlobals(),s=Ce(o),a=await fe(()=>s.get("/api/v1/sources",{pattern_id:i.type,status:i.status,page:i.page,page_size:i.pageSize})),c=a.sources??[];if(i.search){let l=String(i.search).toLowerCase();c=c.filter(u=>u.name.toLowerCase().includes(l))}if(o.json)return x({...a,sources:c.map(la)});q(c,[{key:"id",header:"ID"},{key:"name",header:"NAME"},{key:"pattern_id",header:"TYPE"},{key:"status",header:"STATUS"},{key:"schedule_type",header:"SCHEDULE"},{key:"last_sync_at",header:"LAST_SYNC"}])}),e.command("get <id>").description("Get a source by id").option("--no-streams","don't include streams").action(async(i,n,o)=>{let s=o.optsWithGlobals(),a=Ce(s),c=await fe(()=>a.get(`/api/v1/sources/${i}`,{include_streams:n.streams===!1?void 0:"true"}));if(s.json)return x(la(c));H([["id",c.id],["name",c.name],["pattern_id",c.pattern_id],["status",c.status],["schedule_type",c.schedule_type],["schedule_value",c.schedule_value??""],["last_sync_at",c.last_sync_at??""],["total_syncs",c.total_syncs],["successful_syncs",c.successful_syncs],["failed_syncs",c.failed_syncs]]),c.streams?.length&&(process.stdout.write(`
301
- `),q(c.streams,[{key:"name",header:"NAME"},{key:"sync_mode",header:"SYNC_MODE"},{key:"is_enabled",header:"ENABLED"},{key:"rows_synced",header:"ROWS"}]))}),e.command("create").description("Create a source from a config file").requiredOption("-f, --config-file <path>","YAML/JSON body (or - for stdin)").option("--name <name>","override name from file").option("--type <pattern-id>","override pattern_id from file").action(async(i,n)=>{let o=n.optsWithGlobals(),s=X(i.configFile,aw);i.name&&(s.name=i.name),i.type&&(s.pattern_id=i.type);let a=Ce(o),c=await fe(()=>a.post("/api/v1/sources",s));x(la(c)),o.json||process.stderr.write(`created ${c.id}
302
- `)}),e.command("update <id>").description("Patch a source from a file").requiredOption("-f, --patch-file <path>","YAML/JSON patch body (or -)").action(async(i,n,o)=>{let s=o.optsWithGlobals(),a=X(n.patchFile,cw),c=Ce(s),l=await fe(()=>c.patch(`/api/v1/sources/${i}`,a));x(la(l))}),e.command("delete <id>").description("Delete (soft) a source").option("--yes","skip confirmation").action(async(i,n,o)=>{let s=o.optsWithGlobals();n.yes||(process.stderr.write(`delete source ${i}? re-run with --yes to confirm
303
- `),process.exit(2));let a=Ce(s),c=await fe(()=>a.del(`/api/v1/sources/${i}`));s.json?x(c):process.stderr.write(`deleted ${i}
304
- `)}),e.command("discover <id>").description("Run discovery on a source's pattern + config").option("--no-wait","start and return workflow_id").option("--timeout <sec>","overall timeout",i=>parseInt(i,10),300).option("--poll-interval <ms>","poll ms",i=>parseInt(i,10),2e3).action(async(i,n,o)=>{let s=o.optsWithGlobals(),a=Ce(s),c=await fe(()=>a.get(`/api/v1/sources/${i}`)),l=await fe(()=>a.post("/api/v1/sources/discover",{pattern_id:c.pattern_id,config:c.source_config,integration_id:i}));if(n.wait===!1){s.json?x({workflow_id:l.workflow_id}):process.stderr.write(`workflow_id: ${l.workflow_id}
305
- `);return}let u=await fe(()=>ve({fetch:()=>a.get(`/api/v1/sources/discover/status/${l.workflow_id}`),isTerminal:d=>d.status==="completed"||d.status==="failed",intervalMs:n.pollInterval,timeoutMs:n.timeout*1e3}));x(u.value),u.timedOut&&(process.stderr.write(`timed out waiting for discovery
306
- `),process.exit(4)),u.value.status==="failed"&&process.exit(5)}),e.command("sync <id>").description("Trigger a sync on a source").option("--no-wait","return workflow_id immediately").option("--timeout <sec>","overall timeout",i=>parseInt(i,10),1800).option("--poll-interval <ms>","poll ms",i=>parseInt(i,10),3e3).option("--streams <names>","comma-separated stream names").option("--force-full-refresh","force full refresh").action(async(i,n,o)=>{let s=o.optsWithGlobals(),a=Ce(s),c={};n.streams&&(c.stream_names=String(n.streams).split(",").map(p=>p.trim())),n.forceFullRefresh&&(c.force_full_refresh=!0);let l=await fe(()=>a.get(`/api/v1/sources/${i}/sync/status`));String(l.status)==="draft"&&await fe(()=>a.patch(`/api/v1/sources/${i}`,{status:"ready"}));let u=await fe(()=>a.post(`/api/v1/sources/${i}/sync`,c));if(n.wait===!1){s.json?x({workflow_id:u.workflow_id}):process.stderr.write(`workflow_id: ${u.workflow_id}
307
- `);return}let d=await fe(()=>ve({fetch:()=>a.get(`/api/v1/sources/${i}/sync/status`),isTerminal:p=>cA.has(p.status),onTick:p=>process.stderr.write(`status: ${p.status}
308
- `),intervalMs:n.pollInterval,timeoutMs:n.timeout*1e3}));x(d.value),d.value.status==="error"&&process.exit(5),d.timedOut&&process.exit(4)}),e.command("logs <id> <run-id>").description("Fetch logs for a sync run").option("-f, --follow","follow logs").option("--level <level>","minimum log level").option("--poll-interval <ms>","follow poll ms",i=>parseInt(i,10),2e3).action(async(i,n,o,s)=>{let a=s.optsWithGlobals(),c=Ce(a),l=`/api/v1/sources/${i}/runs/${n}/logs`;if(o.follow){await lA(c,l,o.level,o.pollInterval);return}let u=await fe(()=>c.get(l,{level:o.level}));if(u.available||(u.fallback_url?process.stderr.write(`logs unavailable; fallback: ${u.fallback_url}
301
+ `),process.exit(4));let s=(o.entries??[]).filter(a=>{let c=`${a.timestamp}|${a.message}`;return n.has(c)?!1:(n.add(c),!0)});s.length&&Fn(s),await new Promise(a=>setTimeout(a,i))}}function zw(t){let e=t.command("sources").description("Manage sources"),r=e.command("credentials").description("Manage write-only Source credentials");r.command("set <source-id>").description("Create and attach a tenant-owned credential from a file or stdin").requiredOption("--name <name>","stable tenant-local credential name").requiredOption("-f, --values-file <path>","YAML/JSON values (or - for stdin)").action(async(i,n,o)=>{let s=o.optsWithGlobals(),a=J(n.valuesFile,yi),c=Ce(s),l=await fe(()=>c.post(`/api/v1/sources/${i}/credentials`,{name:n.name,values:a}));k(l)}),r.command("rotate <source-id>").description("Rotate an attached credential from a file or stdin").requiredOption("-f, --values-file <path>","YAML/JSON values (or - for stdin)").action(async(i,n,o)=>{let s=o.optsWithGlobals(),a=J(n.valuesFile,yi),c=Ce(s),l=await fe(()=>c.put(`/api/v1/sources/${i}/credentials`,{values:a}));k(l)}),e.command("list").description("List sources").option("--type <pattern-id>","filter by pattern_id").option("--status <s>","filter by status").option("--search <q>","client-side search on name").option("--page <n>","page",i=>parseInt(i,10)).option("--page-size <n>","page size",i=>parseInt(i,10)).action(async(i,n)=>{let o=n.optsWithGlobals(),s=Ce(o),a=await fe(()=>s.get("/api/v1/sources",{pattern_id:i.type,status:i.status,page:i.page,page_size:i.pageSize})),c=a.sources??[];if(i.search){let l=String(i.search).toLowerCase();c=c.filter(d=>d.name.toLowerCase().includes(l))}if(o.json)return k({...a,sources:c.map(ga)});F(c,[{key:"id",header:"ID"},{key:"name",header:"NAME"},{key:"pattern_id",header:"TYPE"},{key:"status",header:"STATUS"},{key:"schedule_type",header:"SCHEDULE"},{key:"last_sync_at",header:"LAST_SYNC"}])}),e.command("get <id>").description("Get a source by id").option("--no-streams","don't include streams").action(async(i,n,o)=>{let s=o.optsWithGlobals(),a=Ce(s),c=await fe(()=>a.get(`/api/v1/sources/${i}`,{include_streams:n.streams===!1?void 0:"true"}));if(s.json)return k(ga(c));H([["id",c.id],["name",c.name],["pattern_id",c.pattern_id],["status",c.status],["schedule_type",c.schedule_type],["schedule_value",c.schedule_value??""],["last_sync_at",c.last_sync_at??""],["total_syncs",c.total_syncs],["successful_syncs",c.successful_syncs],["failed_syncs",c.failed_syncs]]),c.streams?.length&&(process.stdout.write(`
302
+ `),F(c.streams,[{key:"name",header:"NAME"},{key:"sync_mode",header:"SYNC_MODE"},{key:"is_enabled",header:"ENABLED"},{key:"rows_synced",header:"ROWS"}]))}),e.command("create").description("Create a source from a config file").requiredOption("-f, --config-file <path>","YAML/JSON body (or - for stdin)").option("--name <name>","override name from file").option("--type <pattern-id>","override pattern_id from file").action(async(i,n)=>{let o=n.optsWithGlobals(),s=J(i.configFile,hw);i.name&&(s.name=i.name),i.type&&(s.pattern_id=i.type);let a=Ce(o),c=await fe(()=>a.post("/api/v1/sources",s));k(ga(c)),o.json||process.stderr.write(`created ${c.id}
303
+ `)}),e.command("update <id>").description("Patch a source from a file").requiredOption("-f, --patch-file <path>","YAML/JSON patch body (or -)").action(async(i,n,o)=>{let s=o.optsWithGlobals(),a=J(n.patchFile,yw),c=Ce(s),l=await fe(()=>c.patch(`/api/v1/sources/${i}`,a));k(ga(l))}),e.command("delete <id>").description("Delete (soft) a source").option("--yes","skip confirmation").action(async(i,n,o)=>{let s=o.optsWithGlobals();n.yes||(process.stderr.write(`delete source ${i}? re-run with --yes to confirm
304
+ `),process.exit(2));let a=Ce(s),c=await fe(()=>a.del(`/api/v1/sources/${i}`));s.json?k(c):process.stderr.write(`deleted ${i}
305
+ `)}),e.command("discover <id>").description("Run discovery on a source's pattern + config").option("--no-wait","start and return workflow_id").option("--timeout <sec>","overall timeout",i=>parseInt(i,10),300).option("--poll-interval <ms>","poll ms",i=>parseInt(i,10),2e3).action(async(i,n,o)=>{let s=o.optsWithGlobals(),a=Ce(s),c=await fe(()=>a.get(`/api/v1/sources/${i}`)),l=await fe(()=>a.post("/api/v1/sources/discover",{pattern_id:c.pattern_id,config:c.source_config,integration_id:i}));if(n.wait===!1){s.json?k({workflow_id:l.workflow_id}):process.stderr.write(`workflow_id: ${l.workflow_id}
306
+ `);return}let d=await fe(()=>ge({fetch:()=>a.get(`/api/v1/sources/discover/status/${l.workflow_id}`),isTerminal:u=>u.status==="completed"||u.status==="failed",intervalMs:n.pollInterval,timeoutMs:n.timeout*1e3}));k(d.value),d.timedOut&&(process.stderr.write(`timed out waiting for discovery
307
+ `),process.exit(4)),d.value.status==="failed"&&process.exit(5)}),e.command("sync <id>").description("Trigger a sync on a source").option("--no-wait","return workflow_id immediately").option("--timeout <sec>","overall timeout",i=>parseInt(i,10),1800).option("--poll-interval <ms>","poll ms",i=>parseInt(i,10),3e3).option("--streams <names>","comma-separated stream names").option("--force-full-refresh","force full refresh").action(async(i,n,o)=>{let s=o.optsWithGlobals(),a=Ce(s),c={};n.streams&&(c.stream_names=String(n.streams).split(",").map(p=>p.trim())),n.forceFullRefresh&&(c.force_full_refresh=!0);let l=await fe(()=>a.get(`/api/v1/sources/${i}/sync/status`));String(l.status)==="draft"&&await fe(()=>a.patch(`/api/v1/sources/${i}`,{status:"ready"}));let d=await fe(()=>a.post(`/api/v1/sources/${i}/sync`,c));if(n.wait===!1){s.json?k({workflow_id:d.workflow_id}):process.stderr.write(`workflow_id: ${d.workflow_id}
308
+ `);return}let u=await fe(()=>ge({fetch:()=>a.get(`/api/v1/sources/${i}/sync/status`),isTerminal:p=>bA.has(p.status),onTick:p=>process.stderr.write(`status: ${p.status}
309
+ `),intervalMs:n.pollInterval,timeoutMs:n.timeout*1e3}));k(u.value),u.value.status==="error"&&process.exit(5),u.timedOut&&process.exit(4)}),e.command("logs <id> <run-id>").description("Fetch logs for a sync run").option("-f, --follow","follow logs").option("--level <level>","minimum log level").option("--poll-interval <ms>","follow poll ms",i=>parseInt(i,10),2e3).action(async(i,n,o,s)=>{let a=s.optsWithGlobals(),c=Ce(a),l=`/api/v1/sources/${i}/runs/${n}/logs`;if(o.follow){await wA(c,l,o.level,o.pollInterval);return}let d=await fe(()=>c.get(l,{level:o.level}));if(d.available||(d.fallback_url?process.stderr.write(`logs unavailable; fallback: ${d.fallback_url}
309
310
  `):process.stderr.write(`logs unavailable
310
- `),process.exit(4)),a.json)return x(u);qn(u.entries??[])}),e.command("history <id>").description("List sync history for a source").option("--limit <n>","limit",i=>parseInt(i,10),20).option("--offset <n>","offset",i=>parseInt(i,10),0).option("--status <s>","filter by status").action(async(i,n,o)=>{let s=o.optsWithGlobals(),a=Ce(s),c=await fe(()=>a.get(`/api/v1/sources/${i}/sync-history`,{limit:n.limit,offset:n.offset,status:n.status}));if(s.json)return x(c);q(c.runs??[],[{key:"id",header:"RUN_ID"},{key:"workflow_id",header:"WORKFLOW_ID"},{key:"status",header:"STATUS"},{key:"started_at",header:"STARTED"},{key:"duration_seconds",header:"DURATION_S"},{key:"records_synced",header:"RECORDS"}])}),$w(e,{getClient:Ce,handle:fe})}var uA=["id","state","entity_type_id","entity_business_key","file_field_key","original_filename","content_type","size_bytes","failure_code","failure_detail","sync_run_id","workflow_id","replaced_by_id","created_at","updated_at","uploaded_at","attached_at"];function dA(t){let e=t,r={};for(let i of uA)e[i]!==void 0&&(r[i]=e[i]);return r}function Kn(t){let{last_sync_snapshot_id_exact:e,...r}=t;return{...r,last_sync_snapshot_id:di(t.last_sync_snapshot_id,e,`BackingDataset/${t.id}`)}}function pA(t){let{snapshot_id_exact:e,...r}=t,i=di(t.snapshot_id,e,`OntologySyncRun/${t.id}`);return{...r,snapshot_id:i}}function fA(t){return t?[["files_requested",t.requested??0],["files_uploaded",t.uploaded??0],["files_reused",t.reused??0],["files_attached",t.attached??0],["files_failed",t.failed??0],["files_omitted",t.omitted??0],["files_outcome_unknown",t.outcome_unknown??0],["files_orphan_candidate",t.orphan_candidate??0],["files_bytes_sent",t.bytes_sent??0],["files_object_reads",t.object_reads??0]]:[]}var mA=h.object({mode:h.string().min(1),input:h.string().nullable().optional(),identity_column:h.string().min(1),fingerprint_column:h.string().nullable().optional(),immutable:h.boolean().optional(),filename_column:h.string().nullable().optional(),content_type_column:h.string().nullable().optional(),on_error:h.string().optional()}),Sw=h.object({column:h.string().min(1),property:h.string().min(1),is_primary_key:h.boolean().optional(),type:h.string().nullable().optional(),sql_transform_id:h.string().nullable().optional(),transform_params:h.record(h.string(),h.unknown()).nullable().optional(),is_relationship:h.boolean().optional(),target_type:h.string().nullable().optional(),target_key:h.string().nullable().optional(),file:mA.nullable().optional()}),gA=h.object({iceberg_namespace:h.string().min(1).optional(),iceberg_table:h.string().min(1).optional(),entity_type_id:h.string().min(1),entity_type_name:h.string().min(1),ontology_tenant_id:h.string().nullable().optional(),property_mappings:h.array(Sw).min(1),primary_key_column:h.string().min(1),title_key_column:h.string().nullable().optional(),schema_library_ref:h.string().nullable().optional(),schema_version:h.string().nullable().optional(),sync_mode:h.string().optional(),cursor_column:h.string().nullable().optional(),transform_id:h.string().nullable().optional(),pipeline:h.string().nullable().optional(),pipeline_id:h.string().nullable().optional(),ensure_schema:h.record(h.string(),h.unknown()).optional()}).refine(t=>!!t.iceberg_namespace&&!!t.iceberg_table||!!t.pipeline_id,{message:"provide both iceberg_namespace and iceberg_table, or a pipeline_id to derive them"}),hA=h.object({property_mappings:h.array(Sw).min(1),primary_key_column:h.string().min(1).optional(),title_key_column:h.string().nullable().optional(),cursor_column:h.string().nullable().optional(),ensure_schema:h.record(h.string(),h.unknown()).optional()}).refine(t=>Object.keys(t).length>0,{message:"patch body must contain at least one field"});function at(t){let e=W({profile:t.profile,apiUrl:t.apiUrl}),r={enabled:process.env.FRANK_DEV_MODE==="true",tenantId:process.env.FRANKCTL_TENANT_ID};return new se({profile:e,getToken:()=>oe({profile:t.profile,apiUrl:t.apiUrl}),devMode:r})}async function xe(t){try{return await t()}catch(e){throw e instanceof F&&(process.stderr.write(`${e.message}
311
- `),process.exit(e.exitCode)),e instanceof $&&(process.stderr.write(`${e.message}
312
- `),process.exit(e.exitCode)),e}}function xw(t){let e=t.command("backing-datasets").alias("bd").description("Manage backing datasets (ontology-bound Iceberg tables)");e.command("list").description("List backing datasets").option("--status <s>","filter by status").option("--page <n>","page",r=>parseInt(r,10)).option("--page-size <n>","page size",r=>parseInt(r,10)).action(async(r,i)=>{let n=i.optsWithGlobals(),o=at(n),s=await xe(()=>o.get("/api/v1/backing-datasets",{status:r.status,page:r.page,page_size:r.pageSize})),a={...s,items:s.items.map(Kn)};if(n.json)return x(a);q(a.items,[{key:"id",header:"ID"},{key:"entity_type_id",header:"ENTITY_TYPE"},{key:"iceberg_namespace",header:"NAMESPACE"},{key:"iceberg_table",header:"TABLE"},{key:"status",header:"STATUS"}])}),e.command("get <id>").description("Get a backing dataset by id").action(async(r,i,n)=>{let o=n.optsWithGlobals(),s=at(o),a=await xe(()=>s.get(`/api/v1/backing-datasets/${r}`)),c=Kn(a);if(o.json)return x(c);H([["id",c.id],["entity_type_id",c.entity_type_id],["entity_type_name",c.entity_type_name],["iceberg_namespace",c.iceberg_namespace],["iceberg_table",c.iceberg_table],["primary_key_column",c.primary_key_column],["sync_mode",c.sync_mode],["status",c.status],["pipeline_id",c.pipeline_id??""],["ontology_tenant_id",c.ontology_tenant_id??""]])}),e.command("create").description("Create a backing dataset from a config file").requiredOption("-f, --config-file <path>","YAML/JSON body (or - for stdin)").option("--allow-deprecate","Allow narrowing the ensure_schema fields (publishes deprecate_fields). Default false.").action(async(r,i)=>{let n=i.optsWithGlobals(),o=X(r.configFile,gA),s=at(n),a=r.allowDeprecate?"?allow_deprecate=true":"",c=await xe(()=>s.post(`/api/v1/backing-datasets${a}`,o));x(Kn(c)),n.json||process.stderr.write(`created ${c.id}
313
- `)}),e.command("update <id>").description("Patch a backing dataset from a file").requiredOption("-f, --patch-file <path>","YAML/JSON patch body (or -)").option("--allow-deprecate","Allow narrowing ensure_schema fields").action(async(r,i,n)=>{let o=n.optsWithGlobals(),s=X(i.patchFile,hA),a=at(o),c=i.allowDeprecate?"?allow_deprecate=true":"",l=await xe(()=>a.patch(`/api/v1/backing-datasets/${r}${c}`,s));x(Kn(l))}),e.command("delete <id>").description("Delete a backing dataset (does not delete underlying data)").option("--yes","skip confirmation").action(async(r,i,n)=>{let o=n.optsWithGlobals();i.yes||(process.stderr.write(`delete backing dataset ${r}? re-run with --yes to confirm
314
- `),process.exit(2));let s=at(o);await xe(()=>s.del(`/api/v1/backing-datasets/${r}`)),o.json||process.stderr.write(`deleted ${r}
315
- `)}),e.command("sync <id>").description("Trigger an ontology sync for a backing dataset and poll to terminal").option("--force","replay all rows even when data and spec are unchanged").option("--no-wait","trigger and return immediately").option("--timeout <sec>","poll timeout",r=>parseInt(r,10),600).option("--poll-interval <ms>","poll ms",r=>parseInt(r,10),3e3).action(async(r,i,n)=>{let o=n.optsWithGlobals(),s=at(o);i.force&&await xe(async()=>{let p;try{p=await s.get("/api/v1/backing-datasets/capabilities")}catch(f){throw f instanceof F&&[404,405,422].includes(f.status)?new $("force replay is not supported by this Frank API",4):f}if(p.sync_contract_version!==2||!p.supports_exact_run_polling||!p.supports_force_replay)throw new $("force replay is not supported by this Frank API",4)});let a=i.force?"?force=true":"",c=await xe(()=>s.post(`/api/v1/backing-datasets/${r}/sync${a}`,{})),l=typeof c.sync_run_id=="string"&&c.sync_run_id.length>0&&typeof c.attempted_sync_spec_fingerprint=="string"&&c.attempted_sync_spec_fingerprint.length>0&&typeof c.force_replay=="boolean";if(i.force&&(!l||c.force_replay!==!0)&&await xe(async()=>{throw new $("Frank API did not confirm force replay; refusing to report success",4)}),i.wait===!1){if(o.json)return x(c);l?process.stderr.write(`sync triggered for ${r} (run ${c.sync_run_id}, spec ${c.attempted_sync_spec_fingerprint.slice(0,12)})
311
+ `),process.exit(4)),a.json)return k(d);Fn(d.entries??[])}),e.command("history <id>").description("List sync history for a source").option("--limit <n>","limit",i=>parseInt(i,10),20).option("--offset <n>","offset",i=>parseInt(i,10),0).option("--status <s>","filter by status").action(async(i,n,o)=>{let s=o.optsWithGlobals(),a=Ce(s),c=await fe(()=>a.get(`/api/v1/sources/${i}/sync-history`,{limit:n.limit,offset:n.offset,status:n.status}));if(s.json)return k(c);F(c.runs??[],[{key:"id",header:"RUN_ID"},{key:"workflow_id",header:"WORKFLOW_ID"},{key:"status",header:"STATUS"},{key:"started_at",header:"STARTED"},{key:"duration_seconds",header:"DURATION_S"},{key:"records_synced",header:"RECORDS"}])}),Ew(e,{getClient:Ce,handle:fe})}function Jn(t){let{last_sync_snapshot_id_exact:e,...r}=t;return{...r,last_sync_snapshot_id:mi(t.last_sync_snapshot_id,e,`BackingDataset/${t.id}`)}}function $A(t){let{snapshot_id_exact:e,...r}=t,i=mi(t.snapshot_id,e,`OntologySyncRun/${t.id}`);return{...r,snapshot_id:i}}var Nw=g.object({column:g.string().min(1),property:g.string().min(1),is_primary_key:g.boolean().optional(),type:g.string().nullable().optional(),sql_transform_id:g.string().nullable().optional(),transform_params:g.record(g.string(),g.unknown()).nullable().optional(),is_relationship:g.boolean().optional(),target_type:g.string().nullable().optional(),target_key:g.string().nullable().optional()}),kA=g.object({iceberg_namespace:g.string().min(1).optional(),iceberg_table:g.string().min(1).optional(),entity_type_id:g.string().min(1),entity_type_name:g.string().min(1),ontology_tenant_id:g.string().nullable().optional(),property_mappings:g.array(Nw).min(1),primary_key_column:g.string().min(1),title_key_column:g.string().nullable().optional(),schema_library_ref:g.string().nullable().optional(),schema_version:g.string().nullable().optional(),sync_mode:g.string().optional(),cursor_column:g.string().nullable().optional(),transform_id:g.string().nullable().optional(),pipeline:g.string().nullable().optional(),pipeline_id:g.string().nullable().optional(),ensure_schema:g.record(g.string(),g.unknown()).optional()}).refine(t=>!!t.iceberg_namespace&&!!t.iceberg_table||!!t.pipeline_id,{message:"provide both iceberg_namespace and iceberg_table, or a pipeline_id to derive them"}),SA=g.object({property_mappings:g.array(Nw).min(1),primary_key_column:g.string().min(1).optional(),title_key_column:g.string().nullable().optional(),cursor_column:g.string().nullable().optional(),ensure_schema:g.record(g.string(),g.unknown()).optional()}).refine(t=>Object.keys(t).length>0,{message:"patch body must contain at least one field"});function Yt(t){let e=G({profile:t.profile,apiUrl:t.apiUrl,tenantId:t.tenant});return new re({profile:e,getToken:()=>ne({profile:t.profile,apiUrl:t.apiUrl})})}async function De(t){try{return await t()}catch(e){throw e instanceof q&&(process.stderr.write(`${e.message}
312
+ `),process.exit(e.exitCode)),e instanceof w&&(process.stderr.write(`${e.message}
313
+ `),process.exit(e.exitCode)),e}}function Cw(t){let e=t.command("backing-datasets").alias("bd").description("Manage backing datasets (ontology-bound Iceberg tables)");e.command("list").description("List backing datasets").option("--status <s>","filter by status").option("--page <n>","page",r=>parseInt(r,10)).option("--page-size <n>","page size",r=>parseInt(r,10)).action(async(r,i)=>{let n=i.optsWithGlobals(),o=Yt(n),s=await De(()=>o.get("/api/v1/backing-datasets",{status:r.status,page:r.page,page_size:r.pageSize})),a={...s,items:s.items.map(Jn)};if(n.json)return k(a);F(a.items,[{key:"id",header:"ID"},{key:"entity_type_id",header:"ENTITY_TYPE"},{key:"iceberg_namespace",header:"NAMESPACE"},{key:"iceberg_table",header:"TABLE"},{key:"status",header:"STATUS"}])}),e.command("get <id>").description("Get a backing dataset by id").action(async(r,i,n)=>{let o=n.optsWithGlobals(),s=Yt(o),a=await De(()=>s.get(`/api/v1/backing-datasets/${r}`)),c=Jn(a);if(o.json)return k(c);H([["id",c.id],["entity_type_id",c.entity_type_id],["entity_type_name",c.entity_type_name],["iceberg_namespace",c.iceberg_namespace],["iceberg_table",c.iceberg_table],["primary_key_column",c.primary_key_column],["sync_mode",c.sync_mode],["status",c.status],["pipeline_id",c.pipeline_id??""],["ontology_tenant_id",c.ontology_tenant_id??""]])}),e.command("create").description("Create a backing dataset from a config file").requiredOption("-f, --config-file <path>","YAML/JSON body (or - for stdin)").option("--allow-deprecate","Allow narrowing the ensure_schema fields (publishes deprecate_fields). Default false.").action(async(r,i)=>{let n=i.optsWithGlobals(),o=J(r.configFile,kA),s=Yt(n),a=r.allowDeprecate?"?allow_deprecate=true":"",c=await De(()=>s.post(`/api/v1/backing-datasets${a}`,o));k(Jn(c)),n.json||process.stderr.write(`created ${c.id}
314
+ `)}),e.command("update <id>").description("Patch a backing dataset from a file").requiredOption("-f, --patch-file <path>","YAML/JSON patch body (or -)").option("--allow-deprecate","Allow narrowing ensure_schema fields").action(async(r,i,n)=>{let o=n.optsWithGlobals(),s=J(i.patchFile,SA),a=Yt(o),c=i.allowDeprecate?"?allow_deprecate=true":"",l=await De(()=>a.patch(`/api/v1/backing-datasets/${r}${c}`,s));k(Jn(l))}),e.command("delete <id>").description("Delete a backing dataset (does not delete underlying data)").option("--yes","skip confirmation").action(async(r,i,n)=>{let o=n.optsWithGlobals();i.yes||(process.stderr.write(`delete backing dataset ${r}? re-run with --yes to confirm
315
+ `),process.exit(2));let s=Yt(o);await De(()=>s.del(`/api/v1/backing-datasets/${r}`)),o.json||process.stderr.write(`deleted ${r}
316
+ `)}),e.command("sync <id>").description("Trigger an ontology sync for a backing dataset and poll to terminal").option("--force","replay all rows even when data and spec are unchanged").option("--no-wait","trigger and return immediately").option("--timeout <sec>","poll timeout",r=>parseInt(r,10),600).option("--poll-interval <ms>","poll ms",r=>parseInt(r,10),3e3).action(async(r,i,n)=>{let o=n.optsWithGlobals(),s=Yt(o);i.force&&await De(async()=>{let p;try{p=await s.get("/api/v1/backing-datasets/capabilities")}catch(f){throw f instanceof q&&[404,405,422].includes(f.status)?new w("force replay is not supported by this Frank API",4):f}if(p.sync_contract_version!==2||!p.supports_exact_run_polling||!p.supports_force_replay)throw new w("force replay is not supported by this Frank API",4)});let a=i.force?"?force=true":"",c=await De(()=>s.post(`/api/v1/backing-datasets/${r}/sync${a}`,{})),l=typeof c.sync_run_id=="string"&&c.sync_run_id.length>0&&typeof c.attempted_sync_spec_fingerprint=="string"&&c.attempted_sync_spec_fingerprint.length>0&&typeof c.force_replay=="boolean";if(i.force&&(!l||c.force_replay!==!0)&&await De(async()=>{throw new w("Frank API did not confirm force replay; refusing to report success",4)}),i.wait===!1){if(o.json)return k(c);l?process.stderr.write(`sync triggered for ${r} (run ${c.sync_run_id}, spec ${c.attempted_sync_spec_fingerprint.slice(0,12)})
316
317
  `):process.stderr.write(`sync triggered for ${r} (workflow ${c.workflow_id??"unknown"}; replay evidence unavailable from legacy API)
317
- `);return}if(!l){let p=new Set(["synced","error","needs_remapping"]),f=await xe(()=>ve({fetch:()=>s.get(`/api/v1/backing-datasets/${r}`),isTerminal:g=>p.has(String(g.status)),onTick:g=>process.stderr.write(`status: ${g.status}
318
- `),intervalMs:i.pollInterval,timeoutMs:i.timeout*1e3})),m=Kn(f.value);if(o.json){x(m),m.status!=="synced"&&process.exit(1);return}H([["status",m.status],["last_synced_at",m.last_synced_at??""],["last_error",m.last_error_message??""],["replay_evidence","replay evidence unavailable from legacy API"]]),m.status!=="synced"&&process.exit(1);return}let u=await xe(()=>ve({fetch:()=>s.get(`/api/v1/backing-datasets/${r}/sync-history/${c.sync_run_id}`),isTerminal:p=>p.is_terminal,onTick:p=>process.stderr.write(`status: ${p.status}
319
- `),intervalMs:i.pollInterval,timeoutMs:i.timeout*1e3})),d=pA(u.value);if(o.json){let p=await xe(()=>s.get(`/api/v1/backing-datasets/${r}`));x({...Kn(p),sync_trigger:c,sync_run:d})}else H([["status",d.status],["replay_reason",d.replay_reason??""],["rows_synced",d.rows_synced??0],["snapshot_id",d.snapshot_id??""],["attempted_spec",d.attempted_sync_spec_fingerprint?.slice(0,12)??""],["applied_spec",d.applied_sync_spec_fingerprint?.slice(0,12)??""],["force_replay",String(d.force_replay)],...fA(d.file_asset_counters),["error",d.error_message??""]]);new Set(["synced","skipped"]).has(d.status)||process.exit(1)}),e.command("capabilities").description("Show what file publication modes this Frank deployment supports").action(async(r,i)=>{let n=i.optsWithGlobals(),o=at(n),s=await xe(()=>o.get("/api/v1/backing-datasets/capabilities"));if(n.json)return x(s);let a=s.file_modes,c=[["sync_contract_version",String(s.sync_contract_version)],["supports_force_replay",String(s.supports_force_replay)],["supports_exact_run_polling",String(s.supports_exact_run_polling)],["file_mode.url",a.url.available?"available":`unavailable (${a.url.reason??"unknown"})`],["file_mode.upload_blob",a.upload_blob.available?"available":`unavailable (${a.upload_blob.reason??"unknown"})`],["file_mode.upload_object_ref",a.upload_object_ref.available?"available":`unavailable (${a.upload_object_ref.reason??"unknown"})`]];a.upload_object_ref.max_bytes!=null&&c.push(["file_mode.upload_object_ref.max_bytes",String(a.upload_object_ref.max_bytes)]),H(c)}),e.command("file-assets <id>").description("List file assets tracked in the ledger for a backing dataset").option("--state <state>","filter by state (repeatable: --state attached --state upload_failed)",(r,i)=>i.concat([r]),[]).option("--run <sync_run_id>","filter by sync run id").option("--page <n>","page number",r=>parseInt(r,10)).option("--page-size <n>","page size (max 100)",r=>parseInt(r,10)).action(async(r,i,n)=>{let o=n.optsWithGlobals(),s=at(o),a={};i.state&&i.state.length>0&&(a.state=i.state),i.run&&(a.sync_run_id=i.run),i.page!==void 0&&((!Number.isInteger(i.page)||i.page<1)&&(process.stderr.write(`--page must be a positive integer
320
- `),process.exit(2)),a.page=i.page),i.pageSize!==void 0&&((!Number.isInteger(i.pageSize)||i.pageSize<1)&&(process.stderr.write(`--page-size must be a positive integer
321
- `),process.exit(2)),a.page_size=i.pageSize);let c=await xe(()=>s.get(`/api/v1/backing-datasets/${r}/file-assets`,a)),l=c.items.map(dA);if(o.json)return x({...c,items:l});if(process.stderr.write(`total: ${c.total} page: ${c.page}/${Math.ceil(c.total/c.page_size)||1} has_more: ${c.has_more}
322
- `),l.length===0){process.stderr.write(`no file assets found
323
- `);return}if(q(l,[{key:"id",header:"ID"},{key:"state",header:"STATE"},{key:"entity_business_key",header:"ENTITY"},{key:"file_field_key",header:"FIELD"},{key:"original_filename",header:"FILENAME"},{key:"size_bytes",header:"SIZE"},{key:"failure_code",header:"FAIL_CODE"}]),!i.state||i.state.length===0){let u=c.counts_by_state,d=Object.entries(u).filter(([,p])=>p>0).map(([p,f])=>`${p}=${f}`).join(" ");d&&process.stderr.write(`counts: ${d}
324
- `)}}),e.command("entities <id>").description("Read entities back out of the ontology for a backing dataset (closes the authoring loop: confirm values landed, not just status)").option("--limit <n>","max entities",r=>parseInt(r,10),20).action(async(r,i,n)=>{let o=n.optsWithGlobals(),s=at(o),a=await xe(()=>s.get(`/api/v1/backing-datasets/${r}/entities`,{limit:i.limit}));if(o.json)return x(a);process.stderr.write(`entity_type ${a.entity_type_id} \u2014 ${a.count??a.items.length} entit${(a.count??a.items.length)===1?"y":"ies"}
325
- `);let c=a.items??[];if(c.length===0)return;let l=Array.from(c.reduce((u,d)=>(Object.keys(d).forEach(p=>u.add(p)),u),new Set));q(c,l.map(u=>({key:u,header:u})))})}function Wt(t){let e=W({profile:t.profile,apiUrl:t.apiUrl}),r={enabled:process.env.FRANK_DEV_MODE==="true",tenantId:process.env.FRANKCTL_TENANT_ID};return new se({profile:e,getToken:()=>oe({profile:t.profile,apiUrl:t.apiUrl}),devMode:r})}async function Yt(t){try{return await t()}catch(e){throw e instanceof F&&(process.stderr.write(`${e.message}
326
- `),process.exit(e.exitCode)),e instanceof $&&(process.stderr.write(`${e.message}
327
- `),process.exit(e.exitCode)),e}}async function yA(t,e,r,i){let n=new Set;for(;;){let o=await t.get(e,{level:r});o.available||(o.fallback_url?process.stderr.write(`logs unavailable; fallback: ${o.fallback_url}
318
+ `);return}if(!l){let p=new Set(["synced","error","needs_remapping"]),f=await De(()=>ge({fetch:()=>s.get(`/api/v1/backing-datasets/${r}`),isTerminal:h=>p.has(String(h.status)),onTick:h=>process.stderr.write(`status: ${h.status}
319
+ `),intervalMs:i.pollInterval,timeoutMs:i.timeout*1e3})),m=Jn(f.value);if(o.json){k(m),m.status!=="synced"&&process.exit(1);return}H([["status",m.status],["last_synced_at",m.last_synced_at??""],["last_error",m.last_error_message??""],["replay_evidence","replay evidence unavailable from legacy API"]]),m.status!=="synced"&&process.exit(1);return}let d=await De(()=>ge({fetch:()=>s.get(`/api/v1/backing-datasets/${r}/sync-history/${c.sync_run_id}`),isTerminal:p=>p.is_terminal,onTick:p=>process.stderr.write(`status: ${p.status}
320
+ `),intervalMs:i.pollInterval,timeoutMs:i.timeout*1e3})),u=$A(d.value);if(o.json){let p=await De(()=>s.get(`/api/v1/backing-datasets/${r}`));k({...Jn(p),sync_trigger:c,sync_run:u})}else H([["status",u.status],["replay_reason",u.replay_reason??""],["rows_synced",u.rows_synced??0],["snapshot_id",u.snapshot_id??""],["attempted_spec",u.attempted_sync_spec_fingerprint?.slice(0,12)??""],["applied_spec",u.applied_sync_spec_fingerprint?.slice(0,12)??""],["force_replay",String(u.force_replay)],["error",u.error_message??""]]);new Set(["synced","skipped"]).has(u.status)||process.exit(1)}),e.command("entities <id>").description("Read entities back out of the ontology for a backing dataset (closes the authoring loop: confirm values landed, not just status)").option("--limit <n>","max entities",r=>parseInt(r,10),20).action(async(r,i,n)=>{let o=n.optsWithGlobals(),s=Yt(o),a=await De(()=>s.get(`/api/v1/backing-datasets/${r}/entities`,{limit:i.limit}));if(o.json)return k(a);process.stderr.write(`entity_type ${a.entity_type_id} \u2014 ${a.count??a.items.length} entit${(a.count??a.items.length)===1?"y":"ies"}
321
+ `);let c=a.items??[];if(c.length===0)return;let l=Array.from(c.reduce((d,u)=>(Object.keys(u).forEach(p=>d.add(p)),d),new Set));F(c,l.map(d=>({key:d,header:d})))})}function Kn(t){let e=G({profile:t.profile,apiUrl:t.apiUrl,tenantId:t.tenant});return new re({profile:e,getToken:()=>ne({profile:t.profile,apiUrl:t.apiUrl})})}async function Wn(t){try{return await t()}catch(e){throw e instanceof q&&(process.stderr.write(`${e.message}
322
+ `),process.exit(e.exitCode)),e instanceof w&&(process.stderr.write(`${e.message}
323
+ `),process.exit(e.exitCode)),e}}async function xA(t,e,r,i){let n=new Set;for(;;){let o=await t.get(e,{level:r});o.available||(o.fallback_url?process.stderr.write(`logs unavailable; fallback: ${o.fallback_url}
328
324
  `):process.stderr.write(`logs unavailable
329
- `),process.exit(4));let s=(o.entries??[]).filter(a=>{let c=`${a.timestamp}|${a.message}`;return n.has(c)?!1:(n.add(c),!0)});s.length&&qn(s),await new Promise(a=>setTimeout(a,i))}}function Iw(t){let e=t.command("transforms").description("Manage transforms");e.command("list").description("List transforms").option("--status <s>","filter by status").option("--search <q>","search string").option("--pipeline-id <id>","client-side filter by pipeline_id").option("--page <n>","page",r=>parseInt(r,10)).option("--page-size <n>","page size",r=>parseInt(r,10)).action(async(r,i)=>{let n=i.optsWithGlobals(),o=Wt(n),s=await Yt(()=>o.get("/api/v1/transforms",{status:r.status,search:r.search,page:r.page,page_size:r.pageSize})),a=s.transforms??[];if(r.pipelineId&&(a=a.filter(c=>c.pipeline_id===r.pipelineId)),n.json)return x({...s,transforms:a});q(a,[{key:"id",header:"ID"},{key:"name",header:"NAME"},{key:"status",header:"STATUS"},{key:"pattern_id",header:"PATTERN"},{key:"output_table_name",header:"OUTPUT_TABLE"},{key:"schedule_type",header:"SCHEDULE"},{key:"runtime_type",header:"RUNTIME"}])}),e.command("get <id>").description("Get a transform by id").action(async(r,i,n)=>{let o=n.optsWithGlobals(),s=Wt(o),a=await Yt(()=>s.get(`/api/v1/transforms/${r}/detail`));if(o.json)return x(a);H([["id",String(a.id??"")],["name",String(a.name??"")],["status",String(a.status??"")],["lifecycle_stage",String(a.lifecycle_stage??"")],["last_run_outcome",String(a.last_run_outcome??"")],["can_run_now",String(a.can_run_now??"")],["pattern_id",String(a.pattern_id??"")],["output_table",String(a.output_table_name??"")],["schedule_type",String(a.schedule_type??"")],["runtime_type",String(a.runtime_type??"")],["updated_at",String(a.updated_at??"")]])}),e.command("gate-status").description("Show the source-update change-gate version per eager transform (upstream_version=null means it will NOT fire \u2014 cold start or unresolved source table)").action(async(r,i)=>{let n=i.optsWithGlobals(),o=Wt(n),s=await Yt(()=>o.get("/api/v1/transforms/source-update-status"));if(n.json)return x(s);let a=(s??[]).map(c=>({id:c.id,name:c.name,upstream_version:c.upstream_version??"",fires:c.upstream_version?"yes":"NO (cold/unresolved)"}));q(a,[{key:"id",header:"ID"},{key:"name",header:"NAME"},{key:"upstream_version",header:"UPSTREAM_VERSION"},{key:"fires",header:"FIRES_ON_CHANGE"}])}),e.command("runs <id>").description("List runs for a transform").option("--status <s>","filter by status").option("--limit <n>","page size",r=>parseInt(r,10),50).option("--page <n>","page",r=>parseInt(r,10)).action(async(r,i,n)=>{let o=n.optsWithGlobals(),s=Wt(o),a=await Yt(()=>s.get(`/api/v1/transforms/${r}/runs`,{status:i.status,page:i.page,page_size:i.limit}));if(o.json)return x(a);q(a.items??[],[{key:"id",header:"RUN_ID"},{key:"status",header:"STATUS"},{key:"started_at",header:"STARTED"},{key:"execution_time_ms",header:"DURATION_MS"},{key:"rows_affected",header:"ROWS"},{key:"output_table",header:"OUTPUT_TABLE"},{key:"execution_backend",header:"BACKEND"}])}),e.command("logs <id> <run-id>").description("Fetch logs for a transform run").option("-f, --follow","follow logs").option("--level <level>","minimum log level").option("--poll-interval <ms>","follow poll ms",r=>parseInt(r,10),2e3).action(async(r,i,n,o)=>{let s=o.optsWithGlobals(),a=Wt(s),c=`/api/v1/transform-runs/${i}/logs`;if(n.follow){await yA(a,c,n.level,n.pollInterval);return}let l=await Yt(()=>a.get(c,{level:n.level}));if(l.available||(l.fallback_url?process.stderr.write(`logs unavailable; fallback: ${l.fallback_url}
325
+ `),process.exit(4));let s=(o.entries??[]).filter(a=>{let c=`${a.timestamp}|${a.message}`;return n.has(c)?!1:(n.add(c),!0)});s.length&&Fn(s),await new Promise(a=>setTimeout(a,i))}}function Dw(t){let e=t.command("transforms").description("Manage transforms");e.command("list").description("List transforms").option("--status <s>","filter by status").option("--search <q>","search string").option("--pipeline-id <id>","client-side filter by pipeline_id").option("--page <n>","page",r=>parseInt(r,10)).option("--page-size <n>","page size",r=>parseInt(r,10)).action(async(r,i)=>{let n=i.optsWithGlobals(),o=Kn(n),s=await Wn(()=>o.get("/api/v1/transforms",{status:r.status,search:r.search,page:r.page,page_size:r.pageSize})),a=s.transforms??[];if(r.pipelineId&&(a=a.filter(c=>c.pipeline_id===r.pipelineId)),n.json)return k({...s,transforms:a});F(a,[{key:"id",header:"ID"},{key:"name",header:"NAME"},{key:"status",header:"STATUS"},{key:"pattern_id",header:"PATTERN"},{key:"output_table_name",header:"OUTPUT_TABLE"},{key:"schedule_type",header:"SCHEDULE"},{key:"runtime_type",header:"RUNTIME"}])}),e.command("get <id>").description("Get a transform by id").action(async(r,i,n)=>{let o=n.optsWithGlobals(),s=Kn(o),a=await Wn(()=>s.get(`/api/v1/transforms/${r}/detail`));if(o.json)return k(a);H([["id",String(a.id??"")],["name",String(a.name??"")],["status",String(a.status??"")],["lifecycle_stage",String(a.lifecycle_stage??"")],["last_run_outcome",String(a.last_run_outcome??"")],["can_run_now",String(a.can_run_now??"")],["pattern_id",String(a.pattern_id??"")],["output_table",String(a.output_table_name??"")],["schedule_type",String(a.schedule_type??"")],["runtime_type",String(a.runtime_type??"")],["updated_at",String(a.updated_at??"")]])}),e.command("runs <id>").description("List runs for a transform").option("--status <s>","filter by status").option("--limit <n>","page size",r=>parseInt(r,10),50).option("--page <n>","page",r=>parseInt(r,10)).action(async(r,i,n)=>{let o=n.optsWithGlobals(),s=Kn(o),a=await Wn(()=>s.get(`/api/v1/transforms/${r}/runs`,{status:i.status,page:i.page,page_size:i.limit}));if(o.json)return k(a);F(a.items??[],[{key:"id",header:"RUN_ID"},{key:"status",header:"STATUS"},{key:"started_at",header:"STARTED"},{key:"execution_time_ms",header:"DURATION_MS"},{key:"rows_affected",header:"ROWS"},{key:"output_table",header:"OUTPUT_TABLE"},{key:"execution_backend",header:"BACKEND"}])}),e.command("logs <id> <run-id>").description("Fetch logs for a transform run").option("-f, --follow","follow logs").option("--level <level>","minimum log level").option("--poll-interval <ms>","follow poll ms",r=>parseInt(r,10),2e3).action(async(r,i,n,o)=>{let s=o.optsWithGlobals(),a=Kn(s),c=`/api/v1/transform-runs/${i}/logs`;if(n.follow){await xA(a,c,n.level,n.pollInterval);return}let l=await Wn(()=>a.get(c,{level:n.level}));if(l.available||(l.fallback_url?process.stderr.write(`logs unavailable; fallback: ${l.fallback_url}
330
326
  `):process.stderr.write(`logs unavailable
331
- `),process.exit(4)),s.json)return x(l);qn(l.entries??[])}),e.command("trigger <id>").description("Trigger a transform via Dagster scheduler").action(async(r,i,n)=>{let o=n.optsWithGlobals(),s=Wt(o),a=await Yt(()=>s.post(`/api/v1/transforms/${r}/schedule/trigger`));o.json?x(a):process.stderr.write(`triggered ${r}
327
+ `),process.exit(4)),s.json)return k(l);Fn(l.entries??[])}),e.command("trigger <id>").description("Trigger a transform via Dagster scheduler").action(async(r,i,n)=>{let o=n.optsWithGlobals(),s=Kn(o),a=await Wn(()=>s.post(`/api/v1/transforms/${r}/schedule/trigger`));o.json?k(a):process.stderr.write(`triggered ${r}
332
328
  `)}),e.command("delete <id>").description("Hard-delete a transform (and its sources, mappings, artifacts, runs). Does not delete its silver tables.").option("--yes","skip confirmation").action(async(r,i,n)=>{let o=n.optsWithGlobals();i.yes||(process.stderr.write(`delete transform ${r}? re-run with --yes to confirm
333
- `),process.exit(2));let s=Wt(o);await Yt(()=>s.del(`/api/v1/transforms/${r}`)),o.json||process.stderr.write(`deleted ${r}
334
- `)})}function ua(t){let e=W({profile:t.profile,apiUrl:t.apiUrl}),r={enabled:process.env.FRANK_DEV_MODE==="true",tenantId:process.env.FRANKCTL_TENANT_ID};return new se({profile:e,getToken:()=>oe({profile:t.profile,apiUrl:t.apiUrl}),devMode:r})}async function Jn(t){try{return await t()}catch(e){throw(e instanceof F||e instanceof $)&&(process.stderr.write(`${e.message}
335
- `),process.exit(e.exitCode)),e}}function Ow(t){let e=t.command("patterns").description("Inspect transform patterns");e.command("list").description("List transform patterns").option("--category <c>","filter by category").option("--search <q>","filter by id/name substring").action(async(r,i)=>{let n=i.optsWithGlobals(),o=ua(n),a=(await Jn(()=>o.get("/api/v1/patterns/discover"))).patterns??[];if(r.category){let c=String(r.category).toLowerCase();a=a.filter(l=>String(l.category??"").toLowerCase()===c)}if(r.search){let c=String(r.search).toLowerCase();a=a.filter(l=>l.id.toLowerCase().includes(c)||(l.name??"").toLowerCase().includes(c))}if(n.json)return x({patterns:a});q(a,[{key:"id",header:"ID"},{key:"name",header:"NAME"},{key:"category",header:"CATEGORY"},{key:"complexity",header:"COMPLEXITY"},{key:"version",header:"VERSION"},{key:"engine",header:"ENGINE"}])}),e.command("get <id>").description("Get a transform pattern by id").action(async(r,i,n)=>{let o=n.optsWithGlobals(),s=ua(o),a=await Jn(()=>s.get(`/api/v1/patterns/${r}`));if(o.json)return x(a);H([["id",String(a.id??"")],["name",String(a.name??"")],["category",String(a.category??"")],["complexity",String(a.complexity??"")],["version",String(a.version??"")],["engine",String(a.engine??"")],["deprecated",String(a.deprecated??!1)],["description",String(a.description??"")]])}),e.command("validate-params <pattern-id>").description("Validate a params object against a pattern's config schema").requiredOption("-f, --file <path>","params JSON/YAML file (or - for stdin)").action(async(r,i,n)=>{let o=n.optsWithGlobals(),s=ua(o),a=h.record(h.string(),h.unknown()),c=await Jn(async()=>({params:X(i.file,a)})),l=await Jn(()=>s.post(`/api/v1/transform-patterns/${r}/validate`,c));if(o.json)return x(l);if(l.valid){process.stdout.write(`valid
329
+ `),process.exit(2));let s=Kn(o);await Wn(()=>s.del(`/api/v1/transforms/${r}`)),o.json||process.stderr.write(`deleted ${r}
330
+ `)})}function ha(t){let e=G({profile:t.profile,apiUrl:t.apiUrl,tenantId:t.tenant});return new re({profile:e,getToken:()=>ne({profile:t.profile,apiUrl:t.apiUrl})})}async function Yn(t){try{return await t()}catch(e){throw(e instanceof q||e instanceof w)&&(process.stderr.write(`${e.message}
331
+ `),process.exit(e.exitCode)),e}}function jw(t){let e=t.command("patterns").description("Inspect transform patterns");e.command("list").description("List transform patterns").option("--category <c>","filter by category").option("--search <q>","filter by id/name substring").action(async(r,i)=>{let n=i.optsWithGlobals(),o=ha(n),a=(await Yn(()=>o.get("/api/v1/patterns/discover"))).patterns??[];if(r.category){let c=String(r.category).toLowerCase();a=a.filter(l=>String(l.category??"").toLowerCase()===c)}if(r.search){let c=String(r.search).toLowerCase();a=a.filter(l=>l.id.toLowerCase().includes(c)||(l.name??"").toLowerCase().includes(c))}if(n.json)return k({patterns:a});F(a,[{key:"id",header:"ID"},{key:"name",header:"NAME"},{key:"category",header:"CATEGORY"},{key:"complexity",header:"COMPLEXITY"},{key:"version",header:"VERSION"},{key:"engine",header:"ENGINE"}])}),e.command("get <id>").description("Get a transform pattern by id").action(async(r,i,n)=>{let o=n.optsWithGlobals(),s=ha(o),a=await Yn(()=>s.get(`/api/v1/patterns/${r}`));if(o.json)return k(a);H([["id",String(a.id??"")],["name",String(a.name??"")],["category",String(a.category??"")],["complexity",String(a.complexity??"")],["version",String(a.version??"")],["engine",String(a.engine??"")],["deprecated",String(a.deprecated??!1)],["description",String(a.description??"")]])}),e.command("validate-params <pattern-id>").description("Validate a params object against a pattern's config schema").requiredOption("-f, --file <path>","params JSON/YAML file (or - for stdin)").action(async(r,i,n)=>{let o=n.optsWithGlobals(),s=ha(o),a=g.record(g.string(),g.unknown()),c=await Yn(async()=>({params:J(i.file,a)})),l=await Yn(()=>s.post(`/api/v1/transform-patterns/${r}/validate`,c));if(o.json)return k(l);if(l.valid){process.stdout.write(`valid
336
332
  `);return}process.stderr.write(`invalid:
337
- `);for(let u of l.errors??[])process.stderr.write(` - ${u}
333
+ `);for(let d of l.errors??[])process.stderr.write(` - ${d}
338
334
  `);process.exit(5)}),e.command("register").description("POST a pattern webhook payload with an HMAC signature (CI use only)").requiredOption("-f, --file <path>","payload JSON/YAML (or - for stdin)").action(async(r,i)=>{let n=i.optsWithGlobals(),o=process.env.PATTERN_WEBHOOK_SECRET;o||(process.stderr.write(`patterns register requires PATTERN_WEBHOOK_SECRET (HMAC-SHA256 signing key). This command is intended for CI pipelines that publish patterns to the registry.
339
- `),process.exit(6));let s=ua(n),a=await Jn(async()=>X(r.file,bw)),c=await Jn(()=>s.postSigned("/api/v1/patterns/register",a,{secret:o}));if(n.json)return x(c);H([["status",String(c.status??"")],["pattern_id",String(c.pattern_id??"")],["action",String(c.action??"")]])})}function Ht(t){let e=W({profile:t.profile,apiUrl:t.apiUrl});return new se({profile:e,getToken:()=>oe({profile:t.profile,apiUrl:t.apiUrl}),devMode:{enabled:process.env.FRANK_DEV_MODE==="true",tenantId:process.env.FRANKCTL_TENANT_ID}})}async function At(t){try{return await t()}catch(e){throw(e instanceof F||e instanceof $)&&(process.stderr.write(`${e.message}
340
- `),process.exit(e.exitCode)),e}}function gi(t,e){if(e)return x(t);H([["source_id",String(t.source_id??"")],["schedule_id",String(t.schedule_id??"")],["schedule_type",String(t.schedule_type??"")],["schedule_value",String(t.schedule_value??"")],["status",String(t.status??"")],["paused",String(t.paused??!1)],["message",String(t.message??"")]])}function Pw(t){let e=t.command("schedules").description("Manage source schedules (source-scoped; transform schedules are a follow-up)");e.command("list").description("List schedules (all sources)").action(async(r,i)=>{let n=i.optsWithGlobals(),o=Ht(n),s=await At(()=>o.get("/api/v1/schedules"));if(n.json)return x(s);q(s.schedules??[],[{key:"source_id",header:"SOURCE_ID"},{key:"schedule_type",header:"TYPE"},{key:"schedule_value",header:"VALUE"},{key:"status",header:"STATUS"},{key:"paused",header:"PAUSED"}])}),e.command("get <source-id>").description("Get a source's schedule").action(async(r,i,n)=>{let o=n.optsWithGlobals(),s=Ht(o),a=await At(()=>s.get(`/api/v1/sources/${r}/schedule`));gi(a,!!o.json)}),e.command("set <source-id>").description("Create or update a source schedule").requiredOption("-f, --file <path>","YAML/JSON body with schedule_type and schedule_value (required)").action(async(r,i,n)=>{let o=n.optsWithGlobals(),s=Ht(o),a=await At(async()=>X(i.file,ww)),c=await At(()=>s.request("PUT",`/api/v1/sources/${r}/schedule`,{body:a}));gi(c,!!o.json)}),e.command("delete <source-id>").description("Delete a source's schedule").option("--yes","skip confirmation").action(async(r,i,n)=>{let o=n.optsWithGlobals();i.yes||(process.stderr.write(`pass --yes to confirm deletion
341
- `),process.exit(2));let s=Ht(o);await At(()=>s.del(`/api/v1/sources/${r}/schedule`)),o.json?x({deleted:r}):process.stderr.write(`deleted schedule for ${r}
342
- `)}),e.command("pause <source-id>").description("Pause a source schedule").action(async(r,i,n)=>{let o=n.optsWithGlobals(),s=Ht(o),a=await At(()=>s.post(`/api/v1/sources/${r}/schedule/pause`));gi(a,!!o.json)}),e.command("resume <source-id>").description("Resume a source schedule").action(async(r,i,n)=>{let o=n.optsWithGlobals(),s=Ht(o),a=await At(()=>s.post(`/api/v1/sources/${r}/schedule/resume`));gi(a,!!o.json)}),e.command("trigger <source-id>").description("Trigger a source schedule now").action(async(r,i,n)=>{let o=n.optsWithGlobals(),s=Ht(o),a=await At(()=>s.post(`/api/v1/sources/${r}/schedule/trigger`));gi(a,!!o.json)})}function Pm(t){let e=W({profile:t.profile,apiUrl:t.apiUrl});return new se({profile:e,getToken:()=>oe({profile:t.profile,apiUrl:t.apiUrl}),devMode:{enabled:process.env.FRANK_DEV_MODE==="true",tenantId:process.env.FRANKCTL_TENANT_ID}})}async function Tm(t){try{return await t()}catch(e){throw(e instanceof F||e instanceof $)&&(process.stderr.write(`${e.message}
343
- `),process.exit(e.exitCode)),e}}function Tw(t){let e=t.command("datasets").description("Browse Iceberg datasets");e.command("list").description("List datasets").option("--layer <l>","bronze | silver | gold").option("--namespace <n>","filter by namespace").option("--page <n>","page",r=>parseInt(r,10)).option("--page-size <n>","page size",r=>parseInt(r,10)).action(async(r,i)=>{let n=i.optsWithGlobals(),o=Pm(n),s=await Tm(()=>o.get("/api/v1/datasets",{layer:r.layer,namespace:r.namespace,page:r.page,page_size:r.pageSize}));if(n.json)return x(s);q(s.datasets??[],[{key:"dataset_id",header:"DATASET_ID"},{key:"layer",header:"LAYER"},{key:"namespace",header:"NAMESPACE"},{key:"table",header:"TABLE"},{key:"row_count",header:"ROWS"},{key:"updated_at",header:"UPDATED"}])}),e.command("preview <dataset-id>").description("Preview dataset rows. dataset-id is the 3-part id 'layer.namespace.table'.").option("--limit <n>","row limit",r=>parseInt(r,10),20).action(async(r,i,n)=>{let o=n.optsWithGlobals(),s=Pm(o),a=await Tm(()=>s.get(`/api/v1/datasets/${r}/preview`,{limit:i.limit}));if(o.json)return x(a);Lb(a.columns??[],a.rows??[])}),e.command("snapshots <dataset-id>").description("List Iceberg snapshots for a dataset").action(async(r,i,n)=>{let o=n.optsWithGlobals(),s=Pm(o),a=await Tm(()=>s.get(`/api/v1/datasets/${r}/snapshots`)),c={...a,snapshots:a.snapshots.map(l=>{let{snapshot_id_exact:u,...d}=l;return{...d,snapshot_id:di(l.snapshot_id,u,`Dataset/${r}`)}})};if(o.json)return x(c);q(c.snapshots,[{key:"snapshot_id",header:"SNAPSHOT_ID"},{key:"timestamp_ms",header:"TIMESTAMP_MS"},{key:"operation",header:"OPERATION"}])})}var Am=Nt(Mt(),1);function ct(t){let e=W({profile:t.profile,apiUrl:t.apiUrl});return new se({profile:e,getToken:()=>oe({profile:t.profile,apiUrl:t.apiUrl}),devMode:{enabled:process.env.FRANK_DEV_MODE==="true",tenantId:process.env.FRANKCTL_TENANT_ID}})}async function ue(t){try{return await t()}catch(e){throw(e instanceof F||e instanceof $)&&(process.stderr.write(`${e.message}
344
- `),process.exit(e.exitCode)),e}}function Et(t){return t.available||(process.stderr.write(`AI service unavailable (Martha offline). No proposal generated.
345
- `),process.exit(4)),t}var _A=new Set(["completed","failed","error","cancelled"]),Aw=new Set(["json","yaml"]);function vA(t){let e={step_name:t.step_name,step_type:t.step_type};t.pattern_id!=null&&(e.pattern_id=t.pattern_id);let r=t.suggested_params;r!=null&&typeof r=="object"&&Object.keys(r).length&&(e.pattern_params=r);let i=t.depends_on;return Array.isArray(i)&&i.length&&(e.depends_on=i),e}function bA(t,e){let i=(Array.isArray(e.steps)?e.steps:[]).map(vA),o=(typeof e.summary=="string"?e.summary:void 0)??t.target_description,s=t.target_sdm_id,a={name:t.pipeline_name,source_tables:t.source_tables,target_type:s?"sdm":"custom"};o&&(a.description=o),s&&(a.target_sdm_id=s),t.target_schema&&(a.target_schema=t.target_schema),i.length&&(a.steps=i);let c={apiVersion:"frank.platform/v1",kind:"Pipeline",metadata:{name:t.pipeline_name},spec:a};return(0,Am.stringify)(c)}async function wA(t,e){if([t,e].filter(Boolean).length>1&&(process.stderr.write(`pick exactly one of -f / --text / stdin for the source-config text
346
- `),process.exit(2)),t)return await ue(async()=>X(t,hw));if(e)return{raw_text:e};process.stdin.isTTY&&(process.stderr.write(`no input provided. Use -f <file>, --text <inline>, or pipe via stdin.
335
+ `),process.exit(6));let s=ha(n),a=await Yn(async()=>J(r.file,Tw)),c=await Yn(()=>s.postSigned("/api/v1/patterns/register",a,{secret:o}));if(n.json)return k(c);H([["status",String(c.status??"")],["pattern_id",String(c.pattern_id??"")],["action",String(c.action??"")]])})}function Ht(t){let e=G({profile:t.profile,apiUrl:t.apiUrl,tenantId:t.tenant});return new re({profile:e,getToken:()=>ne({profile:t.profile,apiUrl:t.apiUrl})})}async function Tt(t){try{return await t()}catch(e){throw(e instanceof q||e instanceof w)&&(process.stderr.write(`${e.message}
336
+ `),process.exit(e.exitCode)),e}}function _i(t,e){if(e)return k(t);H([["source_id",String(t.source_id??"")],["schedule_id",String(t.schedule_id??"")],["schedule_type",String(t.schedule_type??"")],["schedule_value",String(t.schedule_value??"")],["status",String(t.status??"")],["paused",String(t.paused??!1)],["message",String(t.message??"")]])}function Rw(t){let e=t.command("schedules").description("Manage source schedules (source-scoped; transform schedules are a follow-up)");e.command("list").description("List schedules (all sources)").action(async(r,i)=>{let n=i.optsWithGlobals(),o=Ht(n),s=await Tt(()=>o.get("/api/v1/schedules"));if(n.json)return k(s);F(s.schedules??[],[{key:"source_id",header:"SOURCE_ID"},{key:"schedule_type",header:"TYPE"},{key:"schedule_value",header:"VALUE"},{key:"status",header:"STATUS"},{key:"paused",header:"PAUSED"}])}),e.command("get <source-id>").description("Get a source's schedule").action(async(r,i,n)=>{let o=n.optsWithGlobals(),s=Ht(o),a=await Tt(()=>s.get(`/api/v1/sources/${r}/schedule`));_i(a,!!o.json)}),e.command("set <source-id>").description("Create or update a source schedule").requiredOption("-f, --file <path>","YAML/JSON body with schedule_type and schedule_value (required)").action(async(r,i,n)=>{let o=n.optsWithGlobals(),s=Ht(o),a=await Tt(async()=>J(i.file,Aw)),c=await Tt(()=>s.request("PUT",`/api/v1/sources/${r}/schedule`,{body:a}));_i(c,!!o.json)}),e.command("delete <source-id>").description("Delete a source's schedule").option("--yes","skip confirmation").action(async(r,i,n)=>{let o=n.optsWithGlobals();i.yes||(process.stderr.write(`pass --yes to confirm deletion
337
+ `),process.exit(2));let s=Ht(o);await Tt(()=>s.del(`/api/v1/sources/${r}/schedule`)),o.json?k({deleted:r}):process.stderr.write(`deleted schedule for ${r}
338
+ `)}),e.command("pause <source-id>").description("Pause a source schedule").action(async(r,i,n)=>{let o=n.optsWithGlobals(),s=Ht(o),a=await Tt(()=>s.post(`/api/v1/sources/${r}/schedule/pause`));_i(a,!!o.json)}),e.command("resume <source-id>").description("Resume a source schedule").action(async(r,i,n)=>{let o=n.optsWithGlobals(),s=Ht(o),a=await Tt(()=>s.post(`/api/v1/sources/${r}/schedule/resume`));_i(a,!!o.json)}),e.command("trigger <source-id>").description("Trigger a source schedule now").action(async(r,i,n)=>{let o=n.optsWithGlobals(),s=Ht(o),a=await Tt(()=>s.post(`/api/v1/sources/${r}/schedule/trigger`));_i(a,!!o.json)})}function jm(t){let e=G({profile:t.profile,apiUrl:t.apiUrl,tenantId:t.tenant});return new re({profile:e,getToken:()=>ne({profile:t.profile,apiUrl:t.apiUrl})})}async function Rm(t){try{return await t()}catch(e){throw(e instanceof q||e instanceof w)&&(process.stderr.write(`${e.message}
339
+ `),process.exit(e.exitCode)),e}}function Uw(t){let e=t.command("datasets").description("Browse Iceberg datasets");e.command("list").description("List datasets").option("--layer <l>","bronze | silver | gold").option("--namespace <n>","filter by namespace").option("--page <n>","page",r=>parseInt(r,10)).option("--page-size <n>","page size",r=>parseInt(r,10)).action(async(r,i)=>{let n=i.optsWithGlobals(),o=jm(n),s=await Rm(()=>o.get("/api/v1/datasets",{layer:r.layer,namespace:r.namespace,page:r.page,page_size:r.pageSize}));if(n.json)return k(s);F(s.datasets??[],[{key:"dataset_id",header:"DATASET_ID"},{key:"layer",header:"LAYER"},{key:"namespace",header:"NAMESPACE"},{key:"table",header:"TABLE"},{key:"row_count",header:"ROWS"},{key:"updated_at",header:"UPDATED"}])}),e.command("preview <dataset-id>").description("Preview dataset rows. dataset-id is the 3-part id 'layer.namespace.table'.").option("--limit <n>","row limit",r=>parseInt(r,10),20).action(async(r,i,n)=>{let o=n.optsWithGlobals(),s=jm(o),a=await Rm(()=>s.get(`/api/v1/datasets/${r}/preview`,{limit:i.limit}));if(o.json)return k(a);Gb(a.columns??[],a.rows??[])}),e.command("snapshots <dataset-id>").description("List Iceberg snapshots for a dataset").action(async(r,i,n)=>{let o=n.optsWithGlobals(),s=jm(o),a=await Rm(()=>s.get(`/api/v1/datasets/${r}/snapshots`)),c={...a,snapshots:a.snapshots.map(l=>{let{snapshot_id_exact:d,...u}=l;return{...u,snapshot_id:mi(l.snapshot_id,d,`Dataset/${r}`)}})};if(o.json)return k(c);F(c.snapshots,[{key:"snapshot_id",header:"SNAPSHOT_ID"},{key:"timestamp_ms",header:"TIMESTAMP_MS"},{key:"operation",header:"OPERATION"}])})}var Um=Ct(qt(),1);function at(t){let e=G({profile:t.profile,apiUrl:t.apiUrl,tenantId:t.tenant});return new re({profile:e,getToken:()=>ne({profile:t.profile,apiUrl:t.apiUrl})})}async function ue(t){try{return await t()}catch(e){throw(e instanceof q||e instanceof w)&&(process.stderr.write(`${e.message}
340
+ `),process.exit(e.exitCode)),e}}function At(t){return t.available||(process.stderr.write(`AI service unavailable (Martha offline). No proposal generated.
341
+ `),process.exit(4)),t}var IA=new Set(["completed","failed","error","cancelled"]),Lw=new Set(["json","yaml"]);function OA(t){let e={step_name:t.step_name,step_type:t.step_type};t.pattern_id!=null&&(e.pattern_id=t.pattern_id);let r=t.suggested_params;r!=null&&typeof r=="object"&&Object.keys(r).length&&(e.pattern_params=r);let i=t.depends_on;return Array.isArray(i)&&i.length&&(e.depends_on=i),e}function PA(t,e){let i=(Array.isArray(e.steps)?e.steps:[]).map(OA),o=(typeof e.summary=="string"?e.summary:void 0)??t.target_description,s=t.target_sdm_id,a={name:t.pipeline_name,source_tables:t.source_tables,target_type:s?"sdm":"custom"};o&&(a.description=o),s&&(a.target_sdm_id=s),t.target_schema&&(a.target_schema=t.target_schema),i.length&&(a.steps=i);let c={apiVersion:"frank.platform/v1",kind:"Pipeline",metadata:{name:t.pipeline_name},spec:a};return(0,Um.stringify)(c)}async function TA(t,e){if([t,e].filter(Boolean).length>1&&(process.stderr.write(`pick exactly one of -f / --text / stdin for the source-config text
342
+ `),process.exit(2)),t)return await ue(async()=>J(t,xw));if(e)return{raw_text:e};process.stdin.isTTY&&(process.stderr.write(`no input provided. Use -f <file>, --text <inline>, or pipe via stdin.
347
343
  `),process.exit(2));let i=[];for await(let o of process.stdin)i.push(typeof o=="string"?Buffer.from(o):o);let n=Buffer.concat(i).toString("utf8").trim();return n||(process.stderr.write(`stdin was empty \u2014 nothing to suggest from.
348
- `),process.exit(2)),{raw_text:n}}function $A(t){let e=t.suggested_name||`${t.pattern_id??"source"}_source`,r={name:e,pattern_id:t.pattern_id,source_config:t.config};return t.suggested_description&&(r.description=t.suggested_description),(0,Am.stringify)({apiVersion:"frank.platform/v1",kind:"Source",metadata:{name:e},spec:r})}function Ew(t){let e=t.command("ai").description("AI-assisted composition, generation, and review");e.command("compose-pipeline").description("Propose a multi-step pipeline from source/target schema + intent").requiredOption("-f, --file <path>","JSON/YAML with {user_intent, source_tables?, target_schema?, constraints?}").option("--no-wait","return execution_id without polling").option("--timeout <s>","poll timeout seconds",i=>parseInt(i,10),180).option("--poll-interval <ms>","poll interval ms",i=>parseInt(i,10),2500).option("-o, --output <format>","Output format. 'json' (default) emits the raw AI proposal. 'yaml' emits a Pipeline envelope that pipes straight into 'frankctl pipelines apply -f' \u2014 the v4 declarative path.","json").action(async(i,n)=>{let o=n.optsWithGlobals(),s=String(i.output??"json").toLowerCase();Aw.has(s)||(process.stderr.write(`--output must be one of ${[...Aw].join(", ")}
344
+ `),process.exit(2)),{raw_text:n}}function AA(t){let e=t.suggested_name||`${t.pattern_id??"source"}_source`,r={name:e,pattern_id:t.pattern_id,source_config:t.config};return t.suggested_description&&(r.description=t.suggested_description),(0,Um.stringify)({apiVersion:"frank.platform/v1",kind:"Source",metadata:{name:e},spec:r})}function Mw(t){let e=t.command("ai").description("AI-assisted composition, generation, and review");e.command("compose-pipeline").description("Propose a multi-step pipeline from source/target schema + intent").requiredOption("-f, --file <path>","JSON/YAML with {user_intent, source_tables?, target_schema?, constraints?}").option("--no-wait","return execution_id without polling").option("--timeout <s>","poll timeout seconds",i=>parseInt(i,10),180).option("--poll-interval <ms>","poll interval ms",i=>parseInt(i,10),2500).option("-o, --output <format>","Output format. 'json' (default) emits the raw AI proposal. 'yaml' emits a Pipeline envelope that pipes straight into 'frankctl pipelines apply -f' \u2014 the v4 declarative path.","json").action(async(i,n)=>{let o=n.optsWithGlobals(),s=String(i.output??"json").toLowerCase();Lw.has(s)||(process.stderr.write(`--output must be one of ${[...Lw].join(", ")}
349
345
  `),process.exit(2)),s==="yaml"&&i.wait===!1&&(process.stderr.write(`--output yaml requires polling to completion; cannot combine with --no-wait
350
- `),process.exit(2));let a=ct(o),c=await ue(async()=>X(i.file,dw));s==="yaml"&&!c.pipeline_name&&(process.stderr.write(`--output yaml requires 'pipeline_name' in the spec file (it becomes the Pipeline's metadata.name + spec.name)
346
+ `),process.exit(2));let a=at(o),c=await ue(async()=>J(i.file,bw));s==="yaml"&&!c.pipeline_name&&(process.stderr.write(`--output yaml requires 'pipeline_name' in the spec file (it becomes the Pipeline's metadata.name + spec.name)
351
347
  `),process.exit(2));let l=await ue(()=>a.post("/api/v1/ai/compose-pipeline",c));if(l.available||(process.stderr.write(`AI service unavailable (Martha offline). Skipping.
352
- `),o.json&&x(l),process.exit(4)),l.execution_id||(o.json?x(l):process.stderr.write(`compose-pipeline ${l.status} without execution_id
353
- `),process.exit(5)),i.wait===!1){x(l);return}let u=i.timeout*1e3,d=i.pollInterval,p=Date.now();for(;;){let f=await ue(()=>a.get(`/api/v1/ai/compose-pipeline/${l.execution_id}/status`));if(_A.has((f.status??"").toLowerCase())){let m=(f.status??"").toLowerCase();if(m==="completed"&&s==="yaml"){let g=f.pipeline??{},y=bA(c,g);process.stdout.write(y);return}if(x(f),m==="completed")return;process.exit(5)}Date.now()-p>=u&&(process.stderr.write(`compose-pipeline did not reach terminal status within ${i.timeout}s
354
- `),x(f),process.exit(4)),process.stderr.write(`\u2026 ${f.status??"processing"}
355
- `),await new Promise(m=>setTimeout(m,d))}}),e.command("generate-transform").description("Generate transform code for a pattern").requiredOption("-f, --file <path>","spec file").action(async(i,n)=>{let o=n.optsWithGlobals(),s=ct(o),a=await ue(async()=>X(i.file,pw)),c=Et(await ue(()=>s.post("/api/v1/ai/generate-transform",a)));x(c)}),e.command("review-sql").description("Lint/review a SQL snippet").requiredOption("-f, --file <path>","spec file with {sql, dialect?}").action(async(i,n)=>{let o=n.optsWithGlobals(),s=ct(o),a=await ue(async()=>X(i.file,fw)),c=Et(await ue(()=>s.post("/api/v1/ai/review-sql",a)));x(c)}),e.command("fix-ci-failure").description("Suggest fixes for a failing CI run").requiredOption("-f, --file <path>","spec file with {pattern_id, failure_log}").action(async(i,n)=>{let o=n.optsWithGlobals(),s=ct(o),a=await ue(async()=>X(i.file,mw)),c=Et(await ue(()=>s.post("/api/v1/ai/fix-ci-failure",a)));x(c)});let r=e.command("suggest").description("AI suggestion subcommands");r.command("target-schema").description("Suggest a target schema from a source schema").requiredOption("-f, --file <path>","spec file with {source_schema, source_table}").action(async(i,n)=>{let o=n.optsWithGlobals(),s=ct(o),a=await ue(async()=>X(i.file,gw)),c=Et(await ue(()=>s.post("/api/v1/ai/suggest-target-schema",a)));x(c)}),r.command("field-mappings").description("Suggest field mappings between source and target schema").requiredOption("-f, --file <path>","spec file with {source_schema, target_schema}").action(async(i,n)=>{let o=n.optsWithGlobals(),s=ct(o),a=await ue(async()=>X(i.file,yw)),c=Et(await ue(()=>s.post("/api/v1/ai/suggest-field-mappings",a)));x(c)}),r.command("source-config").description("Infer a Source pattern + config from raw text (paste-in .env, API doc, vendor config snippet). Emits the proposal as JSON, or a 'kind: Source' YAML envelope with --output yaml.").option("-f, --file <path>","spec file (JSON/YAML) with {raw_text, available_pattern_ids?}").option("--text <inline>","raw text inline (alternative to -f / stdin; max 20k chars)").option("-o, --output <format>","Output format. 'json' (default) emits the full AI proposal. 'yaml' emits a 'kind: Source' envelope you can pipe into 'frankctl sources create -f'.","json").action(async(i,n)=>{let o=n.optsWithGlobals(),s=String(i.output??"json").toLowerCase();s!=="json"&&s!=="yaml"&&(process.stderr.write(`--output must be one of json, yaml
356
- `),process.exit(2));let a=await wA(i.file,i.text),c=ct(o),l=Et(await ue(()=>c.post("/api/v1/ai/suggest-source-config",a)));if(s==="yaml"){l.pattern_id||(process.stderr.write(`AI couldn't infer a pattern_id from the text \u2014 re-run with more context or pick a pattern manually. Falling back to JSON output.
348
+ `),o.json&&k(l),process.exit(4)),l.execution_id||(o.json?k(l):process.stderr.write(`compose-pipeline ${l.status} without execution_id
349
+ `),process.exit(5)),i.wait===!1){k(l);return}let d=i.timeout*1e3,u=i.pollInterval,p=Date.now();for(;;){let f=await ue(()=>a.get(`/api/v1/ai/compose-pipeline/${l.execution_id}/status`));if(IA.has((f.status??"").toLowerCase())){let m=(f.status??"").toLowerCase();if(m==="completed"&&s==="yaml"){let h=f.pipeline??{},y=PA(c,h);process.stdout.write(y);return}if(k(f),m==="completed")return;process.exit(5)}Date.now()-p>=d&&(process.stderr.write(`compose-pipeline did not reach terminal status within ${i.timeout}s
350
+ `),k(f),process.exit(4)),process.stderr.write(`\u2026 ${f.status??"processing"}
351
+ `),await new Promise(m=>setTimeout(m,u))}}),e.command("generate-transform").description("Generate transform code for a pattern").requiredOption("-f, --file <path>","spec file").action(async(i,n)=>{let o=n.optsWithGlobals(),s=at(o),a=await ue(async()=>J(i.file,ww)),c=At(await ue(()=>s.post("/api/v1/ai/generate-transform",a)));k(c)}),e.command("review-sql").description("Lint/review a SQL snippet").requiredOption("-f, --file <path>","spec file with {sql, dialect?}").action(async(i,n)=>{let o=n.optsWithGlobals(),s=at(o),a=await ue(async()=>J(i.file,$w)),c=At(await ue(()=>s.post("/api/v1/ai/review-sql",a)));k(c)}),e.command("fix-ci-failure").description("Suggest fixes for a failing CI run").requiredOption("-f, --file <path>","spec file with {pattern_id, failure_log}").action(async(i,n)=>{let o=n.optsWithGlobals(),s=at(o),a=await ue(async()=>J(i.file,kw)),c=At(await ue(()=>s.post("/api/v1/ai/fix-ci-failure",a)));k(c)});let r=e.command("suggest").description("AI suggestion subcommands");r.command("target-schema").description("Suggest a target schema from a source schema").requiredOption("-f, --file <path>","spec file with {source_schema, source_table}").action(async(i,n)=>{let o=n.optsWithGlobals(),s=at(o),a=await ue(async()=>J(i.file,Sw)),c=At(await ue(()=>s.post("/api/v1/ai/suggest-target-schema",a)));k(c)}),r.command("field-mappings").description("Suggest field mappings between source and target schema").requiredOption("-f, --file <path>","spec file with {source_schema, target_schema}").action(async(i,n)=>{let o=n.optsWithGlobals(),s=at(o),a=await ue(async()=>J(i.file,Iw)),c=At(await ue(()=>s.post("/api/v1/ai/suggest-field-mappings",a)));k(c)}),r.command("source-config").description("Infer a Source pattern + config from raw text (paste-in .env, API doc, vendor config snippet). Emits the proposal as JSON, or a 'kind: Source' YAML envelope with --output yaml.").option("-f, --file <path>","spec file (JSON/YAML) with {raw_text, available_pattern_ids?}").option("--text <inline>","raw text inline (alternative to -f / stdin; max 20k chars)").option("-o, --output <format>","Output format. 'json' (default) emits the full AI proposal. 'yaml' emits a 'kind: Source' envelope you can pipe into 'frankctl sources create -f'.","json").action(async(i,n)=>{let o=n.optsWithGlobals(),s=String(i.output??"json").toLowerCase();s!=="json"&&s!=="yaml"&&(process.stderr.write(`--output must be one of json, yaml
352
+ `),process.exit(2));let a=await TA(i.file,i.text),c=at(o),l=At(await ue(()=>c.post("/api/v1/ai/suggest-source-config",a)));if(s==="yaml"){l.pattern_id||(process.stderr.write(`AI couldn't infer a pattern_id from the text \u2014 re-run with more context or pick a pattern manually. Falling back to JSON output.
357
353
  rationale: ${l.rationale||"(none)"}
358
- `),x(l),process.exit(5));let u=$A(l);process.stdout.write(u);return}x(l)}),r.command("pattern-params").description("Suggest pattern parameters from intent").requiredOption("-f, --file <path>","spec file with {pattern_id, intent}").action(async(i,n)=>{let o=n.optsWithGlobals(),s=ct(o),a=await ue(async()=>X(i.file,_w)),c=Et(await ue(()=>s.post("/api/v1/ai/suggest-pattern-params",a)));x(c)}),e.command("publish-transform").description("Open a PR against frank-transforms with generated files").requiredOption("-f, --file <path>","spec file with {pattern_id, files}").action(async(i,n)=>{let o=n.optsWithGlobals(),s=ct(o),a=await ue(async()=>X(i.file,vw)),c=Et(await ue(()=>s.post("/api/v1/ai/publish-transform",a)));x(c)})}function kA(t){let e=W({profile:t.profile,apiUrl:t.apiUrl}),r={enabled:process.env.FRANK_DEV_MODE==="true",tenantId:process.env.FRANKCTL_TENANT_ID};return new se({profile:e,getToken:()=>oe({profile:t.profile,apiUrl:t.apiUrl}),devMode:r})}async function zw(t){try{return await t()}catch(e){throw(e instanceof F||e instanceof $)&&(process.stderr.write(`${e.message}
359
- `),process.exit(e.exitCode)),e}}function Nw(t){t.command("admin").description("Operational maintenance").command("reconcile-runs").description("Sync stuck transform runs with their backend and heal zombie last_run_outcome=RUNNING markers (transforms that can never be triggered because their cache says a run is in flight when none is)").option("--force","reconcile all active runs, not just stale ones",!1).option("--dry-run","list zombie transforms that would be healed; change nothing",!1).action(async(r,i)=>{let n=i.optsWithGlobals(),o=kA(n);if(r.dryRun){let a=await zw(()=>o.get("/api/v1/admin/zombie-transforms"));if(n.json)return x(a);if(!a.length){process.stderr.write(`no zombie transforms
360
- `);return}q(a,[{key:"id",header:"ID"},{key:"current_outcome",header:"CURRENT"},{key:"would_heal_to",header:"WOULD_HEAL_TO"}]);return}let s=await zw(()=>o.post(`/api/v1/admin/reconcile-runs?force_all=${r.force?"true":"false"}`));if(n.json)return x(s);process.stderr.write(`${s.message}
361
- `)})}import Cw from"node:fs";import hi from"node:path";import{fileURLToPath as SA}from"node:url";function xA(){let t=hi.dirname(SA(import.meta.url)),e=[hi.join(t,"skills","frank-cli","SKILL.md"),hi.join(t,"..","skills","frank-cli","SKILL.md"),hi.join(t,"..","..","..","skills","frank-cli","SKILL.md"),hi.join(t,"..","..","skills","frank-cli","SKILL.md")];for(let r of e)if(Cw.existsSync(r))return r;return null}async function IA(){let t=xA();if(!t)throw new $("SKILL.md not found in the installed package. Reinstall via `npm i -g @aiaiai-pt/frankctl` or run `npx -y @aiaiai-pt/frankctl@latest skill`.",1);process.stdout.write(Cw.readFileSync(t,"utf-8"))}function Dw(t){t.command("skill").description("Print the bundled agent skill reference (SKILL.md) to stdout").action(async()=>{await IA()})}import GA from"node:fs";var Wn=Nt(Mt(),1);import zt from"node:fs";import qe from"node:path";import{fileURLToPath as jw}from"node:url";var OA="frank.platform/v1alpha1",PA="PipelineTemplatePack",Rw="frank.platform/v1",TA=new Set(["Source","IdentityPolicy","Pipeline","BackingDataset"]),da=/^[a-z][a-z0-9-]*$/,AA=/^[a-zA-Z0-9][a-zA-Z0-9._/-]*\.ya?ml$/,Uw="tenant_00000000_",EA=h.object({type:h.literal("string"),default:h.string(),pattern:h.string(),description:h.string().optional()}),zA=h.object({title:h.string().min(1),status:h.enum(["live_proven","declared_pending"]),manifests:h.array(h.string().min(1)).min(1),required_sources:h.array(h.string()).default([]),issues:h.array(h.number().int().positive()).default([])}),NA=h.record(h.string(),EA).superRefine((t,e)=>{let r=["frank_tenant_prefix","ontology_tenant_id"].filter(i=>!(i in t));r.length>0&&e.addIssue({code:"custom",message:`required template parameters missing: ${r.join(", ")}`})}),CA=h.object({apiVersion:h.literal(OA),kind:h.literal(PA),metadata:h.object({name:h.string().regex(da),title:h.string().min(1),description:h.string().optional()}),spec:h.object({ontology_schema_ownership:h.enum(["external","managed"]),forbidden_fields:h.array(h.string().min(1)).default([]),parameters:NA,components:h.record(h.string(),zA)})});function DA(t){return t.issues.map(e=>`${e.path.join(".")||"document"}: ${e.message}`).join("; ")}function jA(t){let e;try{e=zt.readFileSync(t,"utf8")}catch(i){throw new P(`failed to read template pack file ${t}: ${i.message}`)}let r=(0,Wn.parseDocument)(e);if(r.errors.length>0)throw new P(`invalid YAML in ${t}: ${r.errors.map(i=>i.message).join("; ")}`);return r.toJSON()}function Em(t,e,r){let i,n;try{i=zt.realpathSync(t),n=zt.realpathSync(e)}catch(s){throw new P(`failed to resolve template pack path ${e}: ${s.message}`)}let o=qe.relative(i,n);if(o===".."||o.startsWith(`..${qe.sep}`)||qe.isAbsolute(o))throw new P(r);return n}function Lw(){let t=[jw(new URL("./template-packs",import.meta.url)),jw(new URL("../../../pipeline_templates",import.meta.url))];for(let e of t)if(zt.existsSync(e)&&zt.statSync(e).isDirectory())return e;throw new P(`template pack assets are unavailable; checked: ${t.join(", ")}`)}function RA(t){if(!da.test(t))throw new P(`invalid template pack name '${t}'; expected ${da.source}`)}function fa(t,e=Lw()){RA(t);let r=qe.resolve(e),i=qe.resolve(r,t);if(i!==r&&!i.startsWith(`${r}${qe.sep}`))throw new P(`template pack '${t}' resolves outside the pack root`);let n=Em(r,i,`template pack '${t}' resolves outside the pack root`),o=Em(n,qe.join(n,"template-pack.yaml"),`template pack '${t}' metadata resolves outside the pack directory`),s=CA.safeParse(jA(o));if(!s.success)throw new P(`invalid template pack ${o}: ${DA(s.error)}`);if(s.data.metadata.name!==t)throw new P(`template pack directory '${t}' contains metadata.name '${s.data.metadata.name}'`);return{...s.data,directory:n}}function Mw(t=Lw()){let e;try{e=zt.readdirSync(t,{withFileTypes:!0})}catch(r){throw new P(`failed to list template packs in ${t}: ${r.message}`)}return e.filter(r=>r.isDirectory()&&da.test(r.name)&&zt.existsSync(qe.join(t,r.name,"template-pack.yaml"))).map(r=>fa(r.name,t)).map(r=>{let i=Object.values(r.spec.components);return{name:r.metadata.name,title:r.metadata.title,...r.metadata.description?{description:r.metadata.description}:{},component_count:i.length,live_proven_component_count:i.filter(n=>n.status==="live_proven").length}}).sort((r,i)=>r.name.localeCompare(i.name))}function UA(t,e){let r=t.spec.parameters;for(let n of Object.keys(e))if(!(n in r))throw new P(`unknown parameter '${n}' for template pack '${t.metadata.name}'`);let i={};for(let[n,o]of Object.entries(r)){let s=e[n]??o.default,a;try{a=new RegExp(o.pattern)}catch(c){throw new P(`template pack '${t.metadata.name}' parameter '${n}' has invalid pattern: ${c.message}`)}if(!a.test(s))throw new P(`invalid value '${s}' for parameter '${n}'; expected ${o.pattern}`);i[n]=s}return i}function LA(t,e){let r=e.components??[];if(e.all&&r.length>0)throw new P("--all cannot be combined with --component");let i=new Set(Object.keys(t.spec.components));for(let o of r)if(!i.has(o))throw new P(`unknown component '${o}' for template pack '${t.metadata.name}'`);let n=new Set(r);return Object.entries(t.spec.components).filter(([o,s])=>e.all?!0:r.length>0?n.has(o):s.status==="live_proven")}function MA(t,e){if(!AA.test(e)||qe.isAbsolute(e))throw new P(`manifest '${e}' in template pack '${t.metadata.name}' is not a safe relative YAML path`);let r=qe.resolve(t.directory,e);if(!r.startsWith(`${t.directory}${qe.sep}`))throw new P(`manifest '${e}' resolves outside the pack directory`);return Em(t.directory,r,`manifest '${e}' resolves outside the pack directory`)}function FA(t,e){let r=MA(t,e),i;try{i=zt.readFileSync(r,"utf8")}catch(a){throw new P(`failed to read template manifest ${r}: ${a.message}`)}let n=(0,Wn.parseAllDocuments)(i),o=n.flatMap(a=>a.errors);if(o.length>0)throw new P(`invalid YAML in template manifest ${r}: ${o.map(a=>a.message).join("; ")}`);let s=n.map(a=>a.toJSON()).filter(a=>a!==null);if(s.length===0)throw new P(`template manifest ${r} contains no documents`);for(let[a,c]of s.entries()){if(c.apiVersion!==Rw)throw new P(`document ${a+1} in ${r} requires apiVersion '${Rw}'`);if(!TA.has(c.kind))throw new P(`document ${a+1} in ${r} has unsupported kind '${String(c.kind)}'`);if(!c.metadata?.name||!c.spec||typeof c.spec!="object")throw new P(`document ${a+1} in ${r} requires metadata.name and object spec`)}return s}function ZA(t){return JSON.parse(JSON.stringify(t))}function qA(t,e){if(t.kind!=="Pipeline")return;let r=`tenant_${e}_`,i=Array.isArray(t.spec.steps)?t.spec.steps:[];for(let n of i){let o=n.params;if(o&&typeof o=="object"&&!Array.isArray(o)){let s=o;typeof s.sql=="string"&&(s.sql=s.sql.split(Uw).join(r))}Array.isArray(n.sources)&&(n.sources=n.sources.map(s=>typeof s=="string"?s.split(Uw).join(r):s))}}function BA(t,e){if(t.kind==="BackingDataset"){"ontology_tenant_id"in t.spec&&(t.spec.ontology_tenant_id=e);for(let r of t.metadata.dependsOn??[])"ontologyTenantId"in r&&(r.ontologyTenantId=e)}}function pa(t,e){if(Array.isArray(t))return t.some(i=>pa(i,e));if(!t||typeof t!="object")return!1;let r=t;return e in r||Object.values(r).some(i=>pa(i,e))}function VA(t,e){let r=new Set;for(let i of e){let n=`${i.kind}/${i.metadata.name}`;if(r.has(n))throw new P(`duplicate resource identity '${n}' in rendered template`);if(r.add(n),t.spec.ontology_schema_ownership==="external"&&pa(i,"ensure_schema"))throw new P(`external-schema template pack '${t.metadata.name}' cannot render ensure_schema (${n})`);for(let o of t.spec.forbidden_fields)if(pa(i,o))throw new P(`template pack '${t.metadata.name}' cannot render credential field '${o}' (${n})`)}}function Fw(t,e={}){let r=LA(t,e),i=UA(t,e.parameters??{}),n=[];for(let[,o]of r)for(let s of o.manifests)for(let a of FA(t,s)){let c=ZA(a);qA(c,i.frank_tenant_prefix),BA(c,i.ontology_tenant_id),n.push(c)}return VA(t,n),{pack:t.metadata.name,components:r.map(([o])=>o),pendingComponents:r.filter(([,o])=>o.status==="declared_pending").map(([o])=>o),parameters:i,documents:n}}function Zw(t){return t.map(e=>(0,Wn.stringify)(e,{lineWidth:0}).trimEnd()).join(`
354
+ `),k(l),process.exit(5));let d=AA(l);process.stdout.write(d);return}k(l)}),r.command("pattern-params").description("Suggest pattern parameters from intent").requiredOption("-f, --file <path>","spec file with {pattern_id, intent}").action(async(i,n)=>{let o=n.optsWithGlobals(),s=at(o),a=await ue(async()=>J(i.file,Ow)),c=At(await ue(()=>s.post("/api/v1/ai/suggest-pattern-params",a)));k(c)}),e.command("publish-transform").description("Open a PR against frank-transforms with generated files").requiredOption("-f, --file <path>","spec file with {pattern_id, files}").action(async(i,n)=>{let o=n.optsWithGlobals(),s=at(o),a=await ue(async()=>J(i.file,Pw)),c=At(await ue(()=>s.post("/api/v1/ai/publish-transform",a)));k(c)})}function EA(t){let e=G({profile:t.profile,apiUrl:t.apiUrl,tenantId:t.tenant});return new re({profile:e,getToken:()=>ne({profile:t.profile,apiUrl:t.apiUrl})})}async function qw(t){try{return await t()}catch(e){throw(e instanceof q||e instanceof w)&&(process.stderr.write(`${e.message}
355
+ `),process.exit(e.exitCode)),e}}function Zw(t){t.command("admin").description("Operational maintenance").command("reconcile-runs").description("Sync stuck transform runs with their backend and heal zombie last_run_outcome=RUNNING markers (transforms that can never be triggered because their cache says a run is in flight when none is)").option("--force","reconcile all active runs, not just stale ones",!1).option("--dry-run","list zombie transforms that would be healed; change nothing",!1).action(async(r,i)=>{let n=i.optsWithGlobals(),o=EA(n);if(r.dryRun){let a=await qw(()=>o.get("/api/v1/admin/zombie-transforms"));if(n.json)return k(a);if(!a.length){process.stderr.write(`no zombie transforms
356
+ `);return}F(a,[{key:"id",header:"ID"},{key:"current_outcome",header:"CURRENT"},{key:"would_heal_to",header:"WOULD_HEAL_TO"}]);return}let s=await qw(()=>o.post(`/api/v1/admin/reconcile-runs?force_all=${r.force?"true":"false"}`));if(n.json)return k(s);process.stderr.write(`${s.message}
357
+ `)})}function Et(t){let e=G({profile:t.profile,apiUrl:t.apiUrl,tenantId:t.tenant});return new re({profile:e,getToken:()=>ne({profile:t.profile,apiUrl:t.apiUrl})})}async function zt(t){try{return await t()}catch(e){throw e instanceof q&&(process.stderr.write(`${e.message}
358
+ `),process.exit(e.exitCode)),e instanceof w&&(process.stderr.write(`${e.message}
359
+ `),process.exit(e.exitCode)),e}}function Fw(t){let e=t.command("sinks").description("Manage data sinks");e.command("list").description("List sinks").option("--status <s>","filter by status (comma-separated)").option("--search <q>","search by name/description").option("--page <n>","page",r=>parseInt(r,10)).option("--page-size <n>","page size",r=>parseInt(r,10)).action(async(r,i)=>{let n=i.optsWithGlobals(),o=Et(n),s=await zt(()=>o.get("/api/v1/sinks",{status:r.status,search:r.search,page:r.page,page_size:r.pageSize}));if(n.json)return k(s);F(s.sinks??[],[{key:"id",header:"ID"},{key:"name",header:"NAME"},{key:"device_type",header:"DEVICE_TYPE"},{key:"status",header:"STATUS"},{key:"kafka_topic",header:"KAFKA_TOPIC"},{key:"last_synced_at",header:"LAST_SYNCED"}])}),e.command("get <id>").description("Get a sink by id").action(async(r,i,n)=>{let o=n.optsWithGlobals(),s=Et(o),a=await zt(()=>s.get(`/api/v1/sinks/${r}`));if(o.json)return k(a);H([["id",a.id],["name",a.name],["device_type",a.device_type],["sink_type",a.sink_type],["status",a.status],["mqtt_topic_pattern",a.mqtt_topic_pattern],["mqtt_username",a.mqtt_username],["mqtt_qos",a.mqtt_qos],["kafka_topic",a.kafka_topic],["kafka_dlq_topic",a.kafka_dlq_topic??""],["kafka_key_field",a.kafka_key_field],["linked_source_id",a.linked_source_id??""],["last_synced_at",a.last_synced_at??""],["sync_error",a.sync_error??""]])}),e.command("create").description("Create a sink from a config file").requiredOption("-f, --config-file <path>","YAML/JSON body (or - for stdin)").option("--name <name>","override name from file").option("--device-type <type>","override device_type from file").action(async(r,i)=>{let n=i.optsWithGlobals(),o=J(r.configFile,mw);r.name&&(o.name=r.name),r.deviceType&&(o.device_type=r.deviceType);let s=Et(n),a=await zt(()=>s.post("/api/v1/sinks",o));k(a),n.json||process.stderr.write(`created ${a.id}
360
+ `)}),e.command("update <id>").description("Patch a sink from a file").requiredOption("-f, --patch-file <path>","YAML/JSON patch body (or -)").action(async(r,i,n)=>{let o=n.optsWithGlobals(),s=J(i.patchFile,gw),a=Et(o),c=await zt(()=>a.patch(`/api/v1/sinks/${r}`,s));k(c)}),e.command("delete <id>").description("Delete a sink").option("--yes","skip confirmation").action(async(r,i,n)=>{let o=n.optsWithGlobals();i.yes||(process.stderr.write(`delete sink ${r}? re-run with --yes to confirm
361
+ `),process.exit(2));let s=Et(o);await zt(()=>s.del(`/api/v1/sinks/${r}`)),o.json?k({id:r,deleted:!0}):process.stderr.write(`deleted ${r}
362
+ `)}),e.command("sync <id>").description("Provision MQTT credentials, Benthos pipeline, and Kafka topics").action(async(r,i,n)=>{let o=n.optsWithGlobals(),s=Et(o),a=await zt(()=>s.post(`/api/v1/sinks/${r}/sync`));if(a.errors?.length&&(o.json?k(a):process.stderr.write(`sync completed with errors:
363
+ ${a.errors.map(c=>` - ${c}`).join(`
364
+ `)}
365
+ `),process.exit(4)),o.json)return k(a);process.stderr.write(a.changed?`synced ${r}
366
+ `:`${r} already up to date
367
+ `)}),e.command("pause <id>").description("Pause an active sink").action(async(r,i,n)=>{let o=n.optsWithGlobals(),s=Et(o),a=await zt(()=>s.post(`/api/v1/sinks/${r}/pause`));if(o.json)return k(a);process.stderr.write(`paused ${r}
368
+ `)}),e.command("resume <id>").description("Resume a paused sink").action(async(r,i,n)=>{let o=n.optsWithGlobals(),s=Et(o),a=await zt(()=>s.post(`/api/v1/sinks/${r}/resume`));if(o.json)return k(a);process.stderr.write(`resumed ${r}
369
+ `)})}import Bw from"node:fs";import vi from"node:path";import{fileURLToPath as zA}from"node:url";function NA(){let t=vi.dirname(zA(import.meta.url)),e=[vi.join(t,"skills","frank-cli","SKILL.md"),vi.join(t,"..","skills","frank-cli","SKILL.md"),vi.join(t,"..","..","..","skills","frank-cli","SKILL.md"),vi.join(t,"..","..","skills","frank-cli","SKILL.md")];for(let r of e)if(Bw.existsSync(r))return r;return null}async function CA(){let t=NA();if(!t)throw new w("SKILL.md not found in the installed package. Reinstall via `npm i -g @aiaiai-pt/frankctl` or run `npx -y @aiaiai-pt/frankctl@latest skill`.",1);process.stdout.write(Bw.readFileSync(t,"utf-8"))}function Vw(t){t.command("skill").description("Print the bundled agent skill reference (SKILL.md) to stdout").action(async()=>{await CA()})}import eE from"node:fs";var Hn=Ct(qt(),1);import Nt from"node:fs";import Fe from"node:path";import{fileURLToPath as Gw}from"node:url";var DA="frank.platform/v1alpha1",jA="PipelineTemplatePack",Jw="frank.platform/v1",RA=new Set(["Source","IdentityPolicy","Pipeline","BackingDataset"]),ya=/^[a-z][a-z0-9-]*$/,UA=/^[a-zA-Z0-9][a-zA-Z0-9._/-]*\.ya?ml$/,Kw="tenant_00000000_",LA=g.object({type:g.literal("string"),default:g.string(),pattern:g.string(),description:g.string().optional()}),MA=g.object({title:g.string().min(1),status:g.enum(["live_proven","declared_pending"]),manifests:g.array(g.string().min(1)).min(1),required_sources:g.array(g.string()).default([]),issues:g.array(g.number().int().positive()).default([])}),qA=g.record(g.string(),LA).superRefine((t,e)=>{let r=["frank_tenant_prefix","ontology_tenant_id"].filter(i=>!(i in t));r.length>0&&e.addIssue({code:"custom",message:`required template parameters missing: ${r.join(", ")}`})}),ZA=g.object({apiVersion:g.literal(DA),kind:g.literal(jA),metadata:g.object({name:g.string().regex(ya),title:g.string().min(1),description:g.string().optional()}),spec:g.object({ontology_schema_ownership:g.enum(["external","managed"]),forbidden_fields:g.array(g.string().min(1)).default([]),parameters:qA,components:g.record(g.string(),MA)})});function FA(t){return t.issues.map(e=>`${e.path.join(".")||"document"}: ${e.message}`).join("; ")}function BA(t){let e;try{e=Nt.readFileSync(t,"utf8")}catch(i){throw new I(`failed to read template pack file ${t}: ${i.message}`)}let r=(0,Hn.parseDocument)(e);if(r.errors.length>0)throw new I(`invalid YAML in ${t}: ${r.errors.map(i=>i.message).join("; ")}`);return r.toJSON()}function Lm(t,e,r){let i,n;try{i=Nt.realpathSync(t),n=Nt.realpathSync(e)}catch(s){throw new I(`failed to resolve template pack path ${e}: ${s.message}`)}let o=Fe.relative(i,n);if(o===".."||o.startsWith(`..${Fe.sep}`)||Fe.isAbsolute(o))throw new I(r);return n}function Ww(){let t=[Gw(new URL("./template-packs",import.meta.url)),Gw(new URL("../../../pipeline_templates",import.meta.url))];for(let e of t)if(Nt.existsSync(e)&&Nt.statSync(e).isDirectory())return e;throw new I(`template pack assets are unavailable; checked: ${t.join(", ")}`)}function VA(t){if(!ya.test(t))throw new I(`invalid template pack name '${t}'; expected ${ya.source}`)}function va(t,e=Ww()){VA(t);let r=Fe.resolve(e),i=Fe.resolve(r,t);if(i!==r&&!i.startsWith(`${r}${Fe.sep}`))throw new I(`template pack '${t}' resolves outside the pack root`);let n=Lm(r,i,`template pack '${t}' resolves outside the pack root`),o=Lm(n,Fe.join(n,"template-pack.yaml"),`template pack '${t}' metadata resolves outside the pack directory`),s=ZA.safeParse(BA(o));if(!s.success)throw new I(`invalid template pack ${o}: ${FA(s.error)}`);if(s.data.metadata.name!==t)throw new I(`template pack directory '${t}' contains metadata.name '${s.data.metadata.name}'`);return{...s.data,directory:n}}function Yw(t=Ww()){let e;try{e=Nt.readdirSync(t,{withFileTypes:!0})}catch(r){throw new I(`failed to list template packs in ${t}: ${r.message}`)}return e.filter(r=>r.isDirectory()&&ya.test(r.name)&&Nt.existsSync(Fe.join(t,r.name,"template-pack.yaml"))).map(r=>va(r.name,t)).map(r=>{let i=Object.values(r.spec.components);return{name:r.metadata.name,title:r.metadata.title,...r.metadata.description?{description:r.metadata.description}:{},component_count:i.length,live_proven_component_count:i.filter(n=>n.status==="live_proven").length}}).sort((r,i)=>r.name.localeCompare(i.name))}function GA(t,e){let r=t.spec.parameters;for(let n of Object.keys(e))if(!(n in r))throw new I(`unknown parameter '${n}' for template pack '${t.metadata.name}'`);let i={};for(let[n,o]of Object.entries(r)){let s=e[n]??o.default,a;try{a=new RegExp(o.pattern)}catch(c){throw new I(`template pack '${t.metadata.name}' parameter '${n}' has invalid pattern: ${c.message}`)}if(!a.test(s))throw new I(`invalid value '${s}' for parameter '${n}'; expected ${o.pattern}`);i[n]=s}return i}function JA(t,e){let r=e.components??[];if(e.all&&r.length>0)throw new I("--all cannot be combined with --component");let i=new Set(Object.keys(t.spec.components));for(let o of r)if(!i.has(o))throw new I(`unknown component '${o}' for template pack '${t.metadata.name}'`);let n=new Set(r);return Object.entries(t.spec.components).filter(([o,s])=>e.all?!0:r.length>0?n.has(o):s.status==="live_proven")}function KA(t,e){if(!UA.test(e)||Fe.isAbsolute(e))throw new I(`manifest '${e}' in template pack '${t.metadata.name}' is not a safe relative YAML path`);let r=Fe.resolve(t.directory,e);if(!r.startsWith(`${t.directory}${Fe.sep}`))throw new I(`manifest '${e}' resolves outside the pack directory`);return Lm(t.directory,r,`manifest '${e}' resolves outside the pack directory`)}function WA(t,e){let r=KA(t,e),i;try{i=Nt.readFileSync(r,"utf8")}catch(a){throw new I(`failed to read template manifest ${r}: ${a.message}`)}let n=(0,Hn.parseAllDocuments)(i),o=n.flatMap(a=>a.errors);if(o.length>0)throw new I(`invalid YAML in template manifest ${r}: ${o.map(a=>a.message).join("; ")}`);let s=n.map(a=>a.toJSON()).filter(a=>a!==null);if(s.length===0)throw new I(`template manifest ${r} contains no documents`);for(let[a,c]of s.entries()){if(c.apiVersion!==Jw)throw new I(`document ${a+1} in ${r} requires apiVersion '${Jw}'`);if(!RA.has(c.kind))throw new I(`document ${a+1} in ${r} has unsupported kind '${String(c.kind)}'`);if(!c.metadata?.name||!c.spec||typeof c.spec!="object")throw new I(`document ${a+1} in ${r} requires metadata.name and object spec`)}return s}function YA(t){return JSON.parse(JSON.stringify(t))}function HA(t,e){if(t.kind!=="Pipeline")return;let r=`tenant_${e}_`,i=Array.isArray(t.spec.steps)?t.spec.steps:[];for(let n of i){let o=n.params;if(o&&typeof o=="object"&&!Array.isArray(o)){let s=o;typeof s.sql=="string"&&(s.sql=s.sql.split(Kw).join(r))}Array.isArray(n.sources)&&(n.sources=n.sources.map(s=>typeof s=="string"?s.split(Kw).join(r):s))}}function XA(t,e){if(t.kind==="BackingDataset"){"ontology_tenant_id"in t.spec&&(t.spec.ontology_tenant_id=e);for(let r of t.metadata.dependsOn??[])"ontologyTenantId"in r&&(r.ontologyTenantId=e)}}function _a(t,e){if(Array.isArray(t))return t.some(i=>_a(i,e));if(!t||typeof t!="object")return!1;let r=t;return e in r||Object.values(r).some(i=>_a(i,e))}function QA(t,e){let r=new Set;for(let i of e){let n=`${i.kind}/${i.metadata.name}`;if(r.has(n))throw new I(`duplicate resource identity '${n}' in rendered template`);if(r.add(n),t.spec.ontology_schema_ownership==="external"&&_a(i,"ensure_schema"))throw new I(`external-schema template pack '${t.metadata.name}' cannot render ensure_schema (${n})`);for(let o of t.spec.forbidden_fields)if(_a(i,o))throw new I(`template pack '${t.metadata.name}' cannot render credential field '${o}' (${n})`)}}function Hw(t,e={}){let r=JA(t,e),i=GA(t,e.parameters??{}),n=[];for(let[,o]of r)for(let s of o.manifests)for(let a of WA(t,s)){let c=YA(a);HA(c,i.frank_tenant_prefix),XA(c,i.ontology_tenant_id),n.push(c)}return QA(t,n),{pack:t.metadata.name,components:r.map(([o])=>o),pendingComponents:r.filter(([,o])=>o.status==="declared_pending").map(([o])=>o),parameters:i,documents:n}}function Xw(t){return t.map(e=>(0,Hn.stringify)(e,{lineWidth:0}).trimEnd()).join(`
362
370
  ---
363
371
  `)+`
364
- `}function qw(t,e){return[...e,t]}function KA(t){let e={};for(let r of t){let i=r.indexOf("=");if(i<=0)throw new P(`invalid --set '${r}'; expected key=value`);let n=r.slice(0,i).trim(),o=r.slice(i+1);if(!n||!o)throw new P(`invalid --set '${r}'; expected non-empty key=value`);if(n in e)throw new P(`parameter '${n}' was supplied more than once`);e[n]=o}return e}function Bw(t){let e=t.command("templates").description("Discover and render source-to-ontology template packs");e.command("list").description("List packaged template packs").action((r,i)=>{let n=i.optsWithGlobals(),o=Mw();if(n.json){x(o);return}q(o,[{key:"name",header:"NAME"},{key:"title",header:"TITLE"},{key:"component_count",header:"COMPONENTS"},{key:"live_proven_component_count",header:"LIVE-PROVEN"}])}),e.command("show <name>").description("Show template pack parameters, components, and prerequisites").action((r,i,n)=>{let o=n.optsWithGlobals(),s=fa(r),a={name:s.metadata.name,title:s.metadata.title,description:s.metadata.description,ontology_schema_ownership:s.spec.ontology_schema_ownership,parameters:s.spec.parameters,components:s.spec.components};if(o.json){x(a);return}process.stdout.write(`${a.name}: ${a.title}
372
+ `}function Qw(t,e){return[...e,t]}function tE(t){let e={};for(let r of t){let i=r.indexOf("=");if(i<=0)throw new I(`invalid --set '${r}'; expected key=value`);let n=r.slice(0,i).trim(),o=r.slice(i+1);if(!n||!o)throw new I(`invalid --set '${r}'; expected non-empty key=value`);if(n in e)throw new I(`parameter '${n}' was supplied more than once`);e[n]=o}return e}function e$(t){let e=t.command("templates").description("Discover and render source-to-ontology template packs");e.command("list").description("List packaged template packs").action((r,i)=>{let n=i.optsWithGlobals(),o=Yw();if(n.json){k(o);return}F(o,[{key:"name",header:"NAME"},{key:"title",header:"TITLE"},{key:"component_count",header:"COMPONENTS"},{key:"live_proven_component_count",header:"LIVE-PROVEN"}])}),e.command("show <name>").description("Show template pack parameters, components, and prerequisites").action((r,i,n)=>{let o=n.optsWithGlobals(),s=va(r),a={name:s.metadata.name,title:s.metadata.title,description:s.metadata.description,ontology_schema_ownership:s.spec.ontology_schema_ownership,parameters:s.spec.parameters,components:s.spec.components};if(o.json){k(a);return}process.stdout.write(`${a.name}: ${a.title}
365
373
  `),a.description&&process.stdout.write(`${a.description}
366
374
  `),process.stdout.write(`
367
375
  Parameters:
368
- `),q(Object.entries(a.parameters).map(([c,l])=>({parameter:c,default:l.default,pattern:l.pattern,description:l.description??""})),[{key:"parameter",header:"PARAMETER"},{key:"default",header:"DEFAULT"},{key:"pattern",header:"PATTERN"},{key:"description",header:"DESCRIPTION"}]),process.stdout.write(`
376
+ `),F(Object.entries(a.parameters).map(([c,l])=>({parameter:c,default:l.default,pattern:l.pattern,description:l.description??""})),[{key:"parameter",header:"PARAMETER"},{key:"default",header:"DEFAULT"},{key:"pattern",header:"PATTERN"},{key:"description",header:"DESCRIPTION"}]),process.stdout.write(`
369
377
  Components:
370
- `),q(Object.entries(a.components).map(([c,l])=>({component:c,status:l.status,manifests:l.manifests.join(","),required_sources:l.required_sources.join(",")})),[{key:"component",header:"COMPONENT"},{key:"status",header:"STATUS"},{key:"manifests",header:"MANIFESTS"},{key:"required_sources",header:"REQUIRED SOURCES"}])}),e.command("render <name>").description("Render a template pack to apply-ready frank.platform/v1 YAML").option("-c, --component <name>","render one component; repeat for an explicit subset",qw,[]).option("--all","render live-proven and declared-pending components").option("--set <key=value>","override a declared template parameter; repeat as needed",qw,[]).option("-o, --output <file>","write rendered YAML to a file").action((r,i)=>{let n=fa(r),o=Fw(n,{all:!!i.all,components:i.component,parameters:KA(i.set)}),s=Zw(o.documents);if(o.pendingComponents.length>0&&process.stderr.write(`warning: rendering declared_pending components: ${o.pendingComponents.join(", ")}
371
- `),i.output){GA.writeFileSync(i.output,s,{encoding:"utf8",mode:384}),process.stderr.write(`wrote ${i.output}
372
- `);return}process.stdout.write(s)})}var WA="0.13.1";function YA(){let t=new Gm;return t.name("frankctl").description("Frank CLI \u2014 scriptable access to the Frank API").version(WA).option("-p, --profile <name>","config profile to use").option("--json","emit machine-readable JSON output").option("-v, --verbose","verbose logging").option("-q, --quiet","suppress non-error output").option("--no-color","disable ANSI colors").option("--api-url <url>","override the API base URL").showHelpAfterError(),Fb(t),Bb(t),Vb(t),rw(t),ow(t),kw(t),xw(t),Iw(t),Ow(t),Pw(t),Tw(t),Ew(t),Nw(t),Dw(t),Bw(t),t}function cU(t){return t.optsWithGlobals()}function lU(t){return new er({verbose:t.verbose??!1,quiet:t.quiet??!1,color:t.color!==!1})}async function HA(t){let e=YA();e.exitOverride();try{return await e.parseAsync(t),0}catch(r){if(r instanceof $)return process.stderr.write(`error: ${r.message}
378
+ `),F(Object.entries(a.components).map(([c,l])=>({component:c,status:l.status,manifests:l.manifests.join(","),required_sources:l.required_sources.join(",")})),[{key:"component",header:"COMPONENT"},{key:"status",header:"STATUS"},{key:"manifests",header:"MANIFESTS"},{key:"required_sources",header:"REQUIRED SOURCES"}])}),e.command("render <name>").description("Render a template pack to apply-ready frank.platform/v1 YAML").option("-c, --component <name>","render one component; repeat for an explicit subset",Qw,[]).option("--all","render live-proven and declared-pending components").option("--set <key=value>","override a declared template parameter; repeat as needed",Qw,[]).option("-o, --output <file>","write rendered YAML to a file").action((r,i)=>{let n=va(r),o=Hw(n,{all:!!i.all,components:i.component,parameters:tE(i.set)}),s=Xw(o.documents);if(o.pendingComponents.length>0&&process.stderr.write(`warning: rendering declared_pending components: ${o.pendingComponents.join(", ")}
379
+ `),i.output){eE.writeFileSync(i.output,s,{encoding:"utf8",mode:384}),process.stderr.write(`wrote ${i.output}
380
+ `);return}process.stdout.write(s)})}var rE="0.13.2";function iE(){let t=new eg;return t.name("frankctl").description("Frank CLI \u2014 scriptable access to the Frank API").version(rE).option("-p, --profile <name>","config profile to use").option("--json","emit machine-readable JSON output").option("-v, --verbose","verbose logging").option("-q, --quiet","suppress non-error output").option("--no-color","disable ANSI colors").option("--api-url <url>","override the API base URL").option("--tenant <organization-slug>","explicit tenant context for tenant-scoped API requests").showHelpAfterError(),Kb(t),Hb(t),Xb(t),uw(t),pw(t),zw(t),Fw(t),Cw(t),Dw(t),jw(t),Rw(t),Uw(t),Mw(t),Zw(t),Vw(t),e$(t),t}function xU(t){return t.optsWithGlobals()}function IU(t){return new nr({verbose:t.verbose??!1,quiet:t.quiet??!1,color:t.color!==!1})}async function oE(t){let e=iE();e.exitOverride();try{return await e.parseAsync(t),0}catch(r){if(r instanceof w)return process.stderr.write(`error: ${r.message}
373
381
  `),r.exitCode;let i=r;return i.code==="commander.helpDisplayed"||i.code==="commander.version"?0:i.code?.startsWith("commander.")?(i.message&&process.stderr.write(`${i.message}
374
382
  `),2):(process.stderr.write(`error: ${i.message??String(r)}
375
- `),1)}}function XA(){try{let t=JA(process.argv[1]??""),e=new URL(import.meta.url).pathname;return t===e}catch{return!1}}XA()&&HA(process.argv).then(t=>process.exit(t));export{YA as buildProgram,HA as main,lU as makeLogger,cU as resolveGlobalOptions};
383
+ `),1)}}function sE(){try{let t=nE(process.argv[1]??""),e=new URL(import.meta.url).pathname;return t===e}catch{return!1}}sE()&&oE(process.argv).then(t=>process.exit(t));export{iE as buildProgram,oE as main,IU as makeLogger,xU as resolveGlobalOptions};