@farthershore/cli 0.13.1 → 0.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,78 +1,78 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire as __createRequire } from "node:module";const require=__createRequire(import.meta.url);
3
- var c_=Object.create;var Fi=Object.defineProperty;var u_=Object.getOwnPropertyDescriptor;var l_=Object.getOwnPropertyNames;var d_=Object.getPrototypeOf,m_=Object.prototype.hasOwnProperty;var Vt=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,r)=>(typeof require<"u"?require:t)[r]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var Ze=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),ye=(e,t)=>{for(var r in t)Fi(e,r,{get:t[r],enumerable:!0})},p_=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of l_(t))!m_.call(e,n)&&n!==r&&Fi(e,n,{get:()=>t[n],enumerable:!(o=u_(t,n))||o.enumerable});return e};var f_=(e,t,r)=>(r=e!=null?c_(d_(e)):{},p_(t||!e||!e.__esModule?Fi(r,"default",{value:e,enumerable:!0}):r,e));var Bt=Ze(Vi=>{var Ln=class extends Error{constructor(t,r,o){super(o),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=r,this.exitCode=t,this.nestedError=void 0}},Zi=class extends Ln{constructor(t){super(1,"commander.invalidArgument",t),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}};Vi.CommanderError=Ln;Vi.InvalidArgumentError=Zi});var Mn=Ze(Hi=>{var{InvalidArgumentError:g_}=Bt(),Bi=class{constructor(t,r){switch(this.description=r||"",this.variadic=!1,this.parseArg=void 0,this.defaultValue=void 0,this.defaultValueDescription=void 0,this.argChoices=void 0,t[0]){case"<":this.required=!0,this._name=t.slice(1,-1);break;case"[":this.required=!1,this._name=t.slice(1,-1);break;default:this.required=!0,this._name=t;break}this._name.length>3&&this._name.slice(-3)==="..."&&(this.variadic=!0,this._name=this._name.slice(0,-3))}name(){return this._name}_concatValue(t,r){return r===this.defaultValue||!Array.isArray(r)?[t]:r.concat(t)}default(t,r){return this.defaultValue=t,this.defaultValueDescription=r,this}argParser(t){return this.parseArg=t,this}choices(t){return this.argChoices=t.slice(),this.parseArg=(r,o)=>{if(!this.argChoices.includes(r))throw new g_(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._concatValue(r,o):r},this}argRequired(){return this.required=!0,this}argOptional(){return this.required=!1,this}};function h_(e){let t=e.name()+(e.variadic===!0?"...":"");return e.required?"<"+t+">":"["+t+"]"}Hi.Argument=Bi;Hi.humanReadableArgName=h_});var Wi=Ze(Ki=>{var{humanReadableArgName:__}=Mn(),Gi=class{constructor(){this.helpWidth=void 0,this.minWidthToWrap=40,this.sortSubcommands=!1,this.sortOptions=!1,this.showGlobalOptions=!1}prepareContext(t){this.helpWidth=this.helpWidth??t.helpWidth??80}visibleCommands(t){let r=t.commands.filter(n=>!n._hidden),o=t._getHelpCommand();return o&&!o._hidden&&r.push(o),this.sortSubcommands&&r.sort((n,i)=>n.name().localeCompare(i.name())),r}compareOptions(t,r){let o=n=>n.short?n.short.replace(/^-/,""):n.long.replace(/^--/,"");return o(t).localeCompare(o(r))}visibleOptions(t){let r=t.options.filter(n=>!n.hidden),o=t._getHelpOption();if(o&&!o.hidden){let n=o.short&&t._findOption(o.short),i=o.long&&t._findOption(o.long);!n&&!i?r.push(o):o.long&&!i?r.push(t.createOption(o.long,o.description)):o.short&&!n&&r.push(t.createOption(o.short,o.description))}return this.sortOptions&&r.sort(this.compareOptions),r}visibleGlobalOptions(t){if(!this.showGlobalOptions)return[];let r=[];for(let o=t.parent;o;o=o.parent){let n=o.options.filter(i=>!i.hidden);r.push(...n)}return this.sortOptions&&r.sort(this.compareOptions),r}visibleArguments(t){return t._argsDescription&&t.registeredArguments.forEach(r=>{r.description=r.description||t._argsDescription[r.name()]||""}),t.registeredArguments.find(r=>r.description)?t.registeredArguments:[]}subcommandTerm(t){let r=t.registeredArguments.map(o=>__(o)).join(" ");return t._name+(t._aliases[0]?"|"+t._aliases[0]:"")+(t.options.length?" [options]":"")+(r?" "+r:"")}optionTerm(t){return t.flags}argumentTerm(t){return t.name()}longestSubcommandTermLength(t,r){return r.visibleCommands(t).reduce((o,n)=>Math.max(o,this.displayWidth(r.styleSubcommandTerm(r.subcommandTerm(n)))),0)}longestOptionTermLength(t,r){return r.visibleOptions(t).reduce((o,n)=>Math.max(o,this.displayWidth(r.styleOptionTerm(r.optionTerm(n)))),0)}longestGlobalOptionTermLength(t,r){return r.visibleGlobalOptions(t).reduce((o,n)=>Math.max(o,this.displayWidth(r.styleOptionTerm(r.optionTerm(n)))),0)}longestArgumentTermLength(t,r){return r.visibleArguments(t).reduce((o,n)=>Math.max(o,this.displayWidth(r.styleArgumentTerm(r.argumentTerm(n)))),0)}commandUsage(t){let r=t._name;t._aliases[0]&&(r=r+"|"+t._aliases[0]);let o="";for(let n=t.parent;n;n=n.parent)o=n.name()+" "+o;return o+r+" "+t.usage()}commandDescription(t){return t.description()}subcommandDescription(t){return t.summary()||t.description()}optionDescription(t){let r=[];return t.argChoices&&r.push(`choices: ${t.argChoices.map(o=>JSON.stringify(o)).join(", ")}`),t.defaultValue!==void 0&&(t.required||t.optional||t.isBoolean()&&typeof t.defaultValue=="boolean")&&r.push(`default: ${t.defaultValueDescription||JSON.stringify(t.defaultValue)}`),t.presetArg!==void 0&&t.optional&&r.push(`preset: ${JSON.stringify(t.presetArg)}`),t.envVar!==void 0&&r.push(`env: ${t.envVar}`),r.length>0?`${t.description} (${r.join(", ")})`:t.description}argumentDescription(t){let r=[];if(t.argChoices&&r.push(`choices: ${t.argChoices.map(o=>JSON.stringify(o)).join(", ")}`),t.defaultValue!==void 0&&r.push(`default: ${t.defaultValueDescription||JSON.stringify(t.defaultValue)}`),r.length>0){let o=`(${r.join(", ")})`;return t.description?`${t.description} ${o}`:o}return t.description}formatHelp(t,r){let o=r.padWidth(t,r),n=r.helpWidth??80;function i(m,g){return r.formatItem(m,o,g,r)}let s=[`${r.styleTitle("Usage:")} ${r.styleUsage(r.commandUsage(t))}`,""],c=r.commandDescription(t);c.length>0&&(s=s.concat([r.boxWrap(r.styleCommandDescription(c),n),""]));let u=r.visibleArguments(t).map(m=>i(r.styleArgumentTerm(r.argumentTerm(m)),r.styleArgumentDescription(r.argumentDescription(m))));u.length>0&&(s=s.concat([r.styleTitle("Arguments:"),...u,""]));let l=r.visibleOptions(t).map(m=>i(r.styleOptionTerm(r.optionTerm(m)),r.styleOptionDescription(r.optionDescription(m))));if(l.length>0&&(s=s.concat([r.styleTitle("Options:"),...l,""])),r.showGlobalOptions){let m=r.visibleGlobalOptions(t).map(g=>i(r.styleOptionTerm(r.optionTerm(g)),r.styleOptionDescription(r.optionDescription(g))));m.length>0&&(s=s.concat([r.styleTitle("Global Options:"),...m,""]))}let d=r.visibleCommands(t).map(m=>i(r.styleSubcommandTerm(r.subcommandTerm(m)),r.styleSubcommandDescription(r.subcommandDescription(m))));return d.length>0&&(s=s.concat([r.styleTitle("Commands:"),...d,""])),s.join(`
4
- `)}displayWidth(t){return td(t).length}styleTitle(t){return t}styleUsage(t){return t.split(" ").map(r=>r==="[options]"?this.styleOptionText(r):r==="[command]"?this.styleSubcommandText(r):r[0]==="["||r[0]==="<"?this.styleArgumentText(r):this.styleCommandText(r)).join(" ")}styleCommandDescription(t){return this.styleDescriptionText(t)}styleOptionDescription(t){return this.styleDescriptionText(t)}styleSubcommandDescription(t){return this.styleDescriptionText(t)}styleArgumentDescription(t){return this.styleDescriptionText(t)}styleDescriptionText(t){return t}styleOptionTerm(t){return this.styleOptionText(t)}styleSubcommandTerm(t){return t.split(" ").map(r=>r==="[options]"?this.styleOptionText(r):r[0]==="["||r[0]==="<"?this.styleArgumentText(r):this.styleSubcommandText(r)).join(" ")}styleArgumentTerm(t){return this.styleArgumentText(t)}styleOptionText(t){return t}styleArgumentText(t){return t}styleSubcommandText(t){return t}styleCommandText(t){return t}padWidth(t,r){return Math.max(r.longestOptionTermLength(t,r),r.longestGlobalOptionTermLength(t,r),r.longestSubcommandTermLength(t,r),r.longestArgumentTermLength(t,r))}preformatted(t){return/\n[^\S\r\n]/.test(t)}formatItem(t,r,o,n){let s=" ".repeat(2);if(!o)return s+t;let c=t.padEnd(r+t.length-n.displayWidth(t)),u=2,d=(this.helpWidth??80)-r-u-2,m;return d<this.minWidthToWrap||n.preformatted(o)?m=o:m=n.boxWrap(o,d).replace(/\n/g,`
3
+ var k_=Object.create;var Hi=Object.defineProperty;var S_=Object.getOwnPropertyDescriptor;var $_=Object.getOwnPropertyNames;var I_=Object.getPrototypeOf,E_=Object.prototype.hasOwnProperty;var Kt=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,r)=>(typeof require<"u"?require:t)[r]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var Be=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Ie=(e,t)=>{for(var r in t)Hi(e,r,{get:t[r],enumerable:!0})},w_=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of $_(t))!E_.call(e,n)&&n!==r&&Hi(e,n,{get:()=>t[n],enumerable:!(o=S_(t,n))||o.enumerable});return e};var O_=(e,t,r)=>(r=e!=null?k_(I_(e)):{},w_(t||!e||!e.__esModule?Hi(r,"default",{value:e,enumerable:!0}):r,e));var Wt=Be(Ki=>{var Mn=class extends Error{constructor(t,r,o){super(o),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=r,this.exitCode=t,this.nestedError=void 0}},Gi=class extends Mn{constructor(t){super(1,"commander.invalidArgument",t),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}};Ki.CommanderError=Mn;Ki.InvalidArgumentError=Gi});var Zn=Be(qi=>{var{InvalidArgumentError:T_}=Wt(),Wi=class{constructor(t,r){switch(this.description=r||"",this.variadic=!1,this.parseArg=void 0,this.defaultValue=void 0,this.defaultValueDescription=void 0,this.argChoices=void 0,t[0]){case"<":this.required=!0,this._name=t.slice(1,-1);break;case"[":this.required=!1,this._name=t.slice(1,-1);break;default:this.required=!0,this._name=t;break}this._name.length>3&&this._name.slice(-3)==="..."&&(this.variadic=!0,this._name=this._name.slice(0,-3))}name(){return this._name}_concatValue(t,r){return r===this.defaultValue||!Array.isArray(r)?[t]:r.concat(t)}default(t,r){return this.defaultValue=t,this.defaultValueDescription=r,this}argParser(t){return this.parseArg=t,this}choices(t){return this.argChoices=t.slice(),this.parseArg=(r,o)=>{if(!this.argChoices.includes(r))throw new T_(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._concatValue(r,o):r},this}argRequired(){return this.required=!0,this}argOptional(){return this.required=!1,this}};function A_(e){let t=e.name()+(e.variadic===!0?"...":"");return e.required?"<"+t+">":"["+t+"]"}qi.Argument=Wi;qi.humanReadableArgName=A_});var Xi=Be(Yi=>{var{humanReadableArgName:P_}=Zn(),Ji=class{constructor(){this.helpWidth=void 0,this.minWidthToWrap=40,this.sortSubcommands=!1,this.sortOptions=!1,this.showGlobalOptions=!1}prepareContext(t){this.helpWidth=this.helpWidth??t.helpWidth??80}visibleCommands(t){let r=t.commands.filter(n=>!n._hidden),o=t._getHelpCommand();return o&&!o._hidden&&r.push(o),this.sortSubcommands&&r.sort((n,i)=>n.name().localeCompare(i.name())),r}compareOptions(t,r){let o=n=>n.short?n.short.replace(/^-/,""):n.long.replace(/^--/,"");return o(t).localeCompare(o(r))}visibleOptions(t){let r=t.options.filter(n=>!n.hidden),o=t._getHelpOption();if(o&&!o.hidden){let n=o.short&&t._findOption(o.short),i=o.long&&t._findOption(o.long);!n&&!i?r.push(o):o.long&&!i?r.push(t.createOption(o.long,o.description)):o.short&&!n&&r.push(t.createOption(o.short,o.description))}return this.sortOptions&&r.sort(this.compareOptions),r}visibleGlobalOptions(t){if(!this.showGlobalOptions)return[];let r=[];for(let o=t.parent;o;o=o.parent){let n=o.options.filter(i=>!i.hidden);r.push(...n)}return this.sortOptions&&r.sort(this.compareOptions),r}visibleArguments(t){return t._argsDescription&&t.registeredArguments.forEach(r=>{r.description=r.description||t._argsDescription[r.name()]||""}),t.registeredArguments.find(r=>r.description)?t.registeredArguments:[]}subcommandTerm(t){let r=t.registeredArguments.map(o=>P_(o)).join(" ");return t._name+(t._aliases[0]?"|"+t._aliases[0]:"")+(t.options.length?" [options]":"")+(r?" "+r:"")}optionTerm(t){return t.flags}argumentTerm(t){return t.name()}longestSubcommandTermLength(t,r){return r.visibleCommands(t).reduce((o,n)=>Math.max(o,this.displayWidth(r.styleSubcommandTerm(r.subcommandTerm(n)))),0)}longestOptionTermLength(t,r){return r.visibleOptions(t).reduce((o,n)=>Math.max(o,this.displayWidth(r.styleOptionTerm(r.optionTerm(n)))),0)}longestGlobalOptionTermLength(t,r){return r.visibleGlobalOptions(t).reduce((o,n)=>Math.max(o,this.displayWidth(r.styleOptionTerm(r.optionTerm(n)))),0)}longestArgumentTermLength(t,r){return r.visibleArguments(t).reduce((o,n)=>Math.max(o,this.displayWidth(r.styleArgumentTerm(r.argumentTerm(n)))),0)}commandUsage(t){let r=t._name;t._aliases[0]&&(r=r+"|"+t._aliases[0]);let o="";for(let n=t.parent;n;n=n.parent)o=n.name()+" "+o;return o+r+" "+t.usage()}commandDescription(t){return t.description()}subcommandDescription(t){return t.summary()||t.description()}optionDescription(t){let r=[];return t.argChoices&&r.push(`choices: ${t.argChoices.map(o=>JSON.stringify(o)).join(", ")}`),t.defaultValue!==void 0&&(t.required||t.optional||t.isBoolean()&&typeof t.defaultValue=="boolean")&&r.push(`default: ${t.defaultValueDescription||JSON.stringify(t.defaultValue)}`),t.presetArg!==void 0&&t.optional&&r.push(`preset: ${JSON.stringify(t.presetArg)}`),t.envVar!==void 0&&r.push(`env: ${t.envVar}`),r.length>0?`${t.description} (${r.join(", ")})`:t.description}argumentDescription(t){let r=[];if(t.argChoices&&r.push(`choices: ${t.argChoices.map(o=>JSON.stringify(o)).join(", ")}`),t.defaultValue!==void 0&&r.push(`default: ${t.defaultValueDescription||JSON.stringify(t.defaultValue)}`),r.length>0){let o=`(${r.join(", ")})`;return t.description?`${t.description} ${o}`:o}return t.description}formatHelp(t,r){let o=r.padWidth(t,r),n=r.helpWidth??80;function i(m,g){return r.formatItem(m,o,g,r)}let s=[`${r.styleTitle("Usage:")} ${r.styleUsage(r.commandUsage(t))}`,""],c=r.commandDescription(t);c.length>0&&(s=s.concat([r.boxWrap(r.styleCommandDescription(c),n),""]));let u=r.visibleArguments(t).map(m=>i(r.styleArgumentTerm(r.argumentTerm(m)),r.styleArgumentDescription(r.argumentDescription(m))));u.length>0&&(s=s.concat([r.styleTitle("Arguments:"),...u,""]));let l=r.visibleOptions(t).map(m=>i(r.styleOptionTerm(r.optionTerm(m)),r.styleOptionDescription(r.optionDescription(m))));if(l.length>0&&(s=s.concat([r.styleTitle("Options:"),...l,""])),r.showGlobalOptions){let m=r.visibleGlobalOptions(t).map(g=>i(r.styleOptionTerm(r.optionTerm(g)),r.styleOptionDescription(r.optionDescription(g))));m.length>0&&(s=s.concat([r.styleTitle("Global Options:"),...m,""]))}let d=r.visibleCommands(t).map(m=>i(r.styleSubcommandTerm(r.subcommandTerm(m)),r.styleSubcommandDescription(r.subcommandDescription(m))));return d.length>0&&(s=s.concat([r.styleTitle("Commands:"),...d,""])),s.join(`
4
+ `)}displayWidth(t){return cd(t).length}styleTitle(t){return t}styleUsage(t){return t.split(" ").map(r=>r==="[options]"?this.styleOptionText(r):r==="[command]"?this.styleSubcommandText(r):r[0]==="["||r[0]==="<"?this.styleArgumentText(r):this.styleCommandText(r)).join(" ")}styleCommandDescription(t){return this.styleDescriptionText(t)}styleOptionDescription(t){return this.styleDescriptionText(t)}styleSubcommandDescription(t){return this.styleDescriptionText(t)}styleArgumentDescription(t){return this.styleDescriptionText(t)}styleDescriptionText(t){return t}styleOptionTerm(t){return this.styleOptionText(t)}styleSubcommandTerm(t){return t.split(" ").map(r=>r==="[options]"?this.styleOptionText(r):r[0]==="["||r[0]==="<"?this.styleArgumentText(r):this.styleSubcommandText(r)).join(" ")}styleArgumentTerm(t){return this.styleArgumentText(t)}styleOptionText(t){return t}styleArgumentText(t){return t}styleSubcommandText(t){return t}styleCommandText(t){return t}padWidth(t,r){return Math.max(r.longestOptionTermLength(t,r),r.longestGlobalOptionTermLength(t,r),r.longestSubcommandTermLength(t,r),r.longestArgumentTermLength(t,r))}preformatted(t){return/\n[^\S\r\n]/.test(t)}formatItem(t,r,o,n){let s=" ".repeat(2);if(!o)return s+t;let c=t.padEnd(r+t.length-n.displayWidth(t)),u=2,d=(this.helpWidth??80)-r-u-2,m;return d<this.minWidthToWrap||n.preformatted(o)?m=o:m=n.boxWrap(o,d).replace(/\n/g,`
5
5
  `+" ".repeat(r+u)),s+c+" ".repeat(u)+m.replace(/\n/g,`
6
6
  ${s}`)}boxWrap(t,r){if(r<this.minWidthToWrap)return t;let o=t.split(/\r\n|\n/),n=/[\s]*[^\s]+/g,i=[];return o.forEach(s=>{let c=s.match(n);if(c===null){i.push("");return}let u=[c.shift()],l=this.displayWidth(u[0]);c.forEach(d=>{let m=this.displayWidth(d);if(l+m<=r){u.push(d),l+=m;return}i.push(u.join(""));let g=d.trimStart();u=[g],l=this.displayWidth(g)}),i.push(u.join(""))}),i.join(`
7
- `)}};function td(e){let t=/\x1b\[\d*(;\d*)*m/g;return e.replace(t,"")}Ki.Help=Gi;Ki.stripColor=td});var Xi=Ze(Yi=>{var{InvalidArgumentError:v_}=Bt(),qi=class{constructor(t,r){this.flags=t,this.description=r||"",this.required=t.includes("<"),this.optional=t.includes("["),this.variadic=/\w\.\.\.[>\]]$/.test(t),this.mandatory=!1;let o=b_(t);this.short=o.shortFlag,this.long=o.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(t,r){return this.defaultValue=t,this.defaultValueDescription=r,this}preset(t){return this.presetArg=t,this}conflicts(t){return this.conflictsWith=this.conflictsWith.concat(t),this}implies(t){let r=t;return typeof t=="string"&&(r={[t]:!0}),this.implied=Object.assign(this.implied||{},r),this}env(t){return this.envVar=t,this}argParser(t){return this.parseArg=t,this}makeOptionMandatory(t=!0){return this.mandatory=!!t,this}hideHelp(t=!0){return this.hidden=!!t,this}_concatValue(t,r){return r===this.defaultValue||!Array.isArray(r)?[t]:r.concat(t)}choices(t){return this.argChoices=t.slice(),this.parseArg=(r,o)=>{if(!this.argChoices.includes(r))throw new v_(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._concatValue(r,o):r},this}name(){return this.long?this.long.replace(/^--/,""):this.short.replace(/^-/,"")}attributeName(){return this.negate?nd(this.name().replace(/^no-/,"")):nd(this.name())}is(t){return this.short===t||this.long===t}isBoolean(){return!this.required&&!this.optional&&!this.negate}},Ji=class{constructor(t){this.positiveOptions=new Map,this.negativeOptions=new Map,this.dualOptions=new Set,t.forEach(r=>{r.negate?this.negativeOptions.set(r.attributeName(),r):this.positiveOptions.set(r.attributeName(),r)}),this.negativeOptions.forEach((r,o)=>{this.positiveOptions.has(o)&&this.dualOptions.add(o)})}valueFromOption(t,r){let o=r.attributeName();if(!this.dualOptions.has(o))return!0;let n=this.negativeOptions.get(o).presetArg,i=n!==void 0?n:!1;return r.negate===(i===t)}};function nd(e){return e.split("-").reduce((t,r)=>t+r[0].toUpperCase()+r.slice(1))}function b_(e){let t,r,o=/^-[^-]$/,n=/^--[^-]/,i=e.split(/[ |,]+/).concat("guard");if(o.test(i[0])&&(t=i.shift()),n.test(i[0])&&(r=i.shift()),!t&&o.test(i[0])&&(t=i.shift()),!t&&n.test(i[0])&&(t=r,r=i.shift()),i[0].startsWith("-")){let s=i[0],c=`option creation failed due to '${s}' in option flags '${e}'`;throw/^-[^-][^-]/.test(s)?new Error(`${c}
7
+ `)}};function cd(e){let t=/\x1b\[\d*(;\d*)*m/g;return e.replace(t,"")}Yi.Help=Ji;Yi.stripColor=cd});var no=Be(to=>{var{InvalidArgumentError:C_}=Wt(),Qi=class{constructor(t,r){this.flags=t,this.description=r||"",this.required=t.includes("<"),this.optional=t.includes("["),this.variadic=/\w\.\.\.[>\]]$/.test(t),this.mandatory=!1;let o=N_(t);this.short=o.shortFlag,this.long=o.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(t,r){return this.defaultValue=t,this.defaultValueDescription=r,this}preset(t){return this.presetArg=t,this}conflicts(t){return this.conflictsWith=this.conflictsWith.concat(t),this}implies(t){let r=t;return typeof t=="string"&&(r={[t]:!0}),this.implied=Object.assign(this.implied||{},r),this}env(t){return this.envVar=t,this}argParser(t){return this.parseArg=t,this}makeOptionMandatory(t=!0){return this.mandatory=!!t,this}hideHelp(t=!0){return this.hidden=!!t,this}_concatValue(t,r){return r===this.defaultValue||!Array.isArray(r)?[t]:r.concat(t)}choices(t){return this.argChoices=t.slice(),this.parseArg=(r,o)=>{if(!this.argChoices.includes(r))throw new C_(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._concatValue(r,o):r},this}name(){return this.long?this.long.replace(/^--/,""):this.short.replace(/^-/,"")}attributeName(){return this.negate?ud(this.name().replace(/^no-/,"")):ud(this.name())}is(t){return this.short===t||this.long===t}isBoolean(){return!this.required&&!this.optional&&!this.negate}},eo=class{constructor(t){this.positiveOptions=new Map,this.negativeOptions=new Map,this.dualOptions=new Set,t.forEach(r=>{r.negate?this.negativeOptions.set(r.attributeName(),r):this.positiveOptions.set(r.attributeName(),r)}),this.negativeOptions.forEach((r,o)=>{this.positiveOptions.has(o)&&this.dualOptions.add(o)})}valueFromOption(t,r){let o=r.attributeName();if(!this.dualOptions.has(o))return!0;let n=this.negativeOptions.get(o).presetArg,i=n!==void 0?n:!1;return r.negate===(i===t)}};function ud(e){return e.split("-").reduce((t,r)=>t+r[0].toUpperCase()+r.slice(1))}function N_(e){let t,r,o=/^-[^-]$/,n=/^--[^-]/,i=e.split(/[ |,]+/).concat("guard");if(o.test(i[0])&&(t=i.shift()),n.test(i[0])&&(r=i.shift()),!t&&o.test(i[0])&&(t=i.shift()),!t&&n.test(i[0])&&(t=r,r=i.shift()),i[0].startsWith("-")){let s=i[0],c=`option creation failed due to '${s}' in option flags '${e}'`;throw/^-[^-][^-]/.test(s)?new Error(`${c}
8
8
  - a short flag is a single dash and a single character
9
9
  - either use a single dash and a single character (for a short flag)
10
10
  - or use a double dash for a long option (and can have two, like '--ws, --workspace')`):o.test(s)?new Error(`${c}
11
11
  - too many short flags`):n.test(s)?new Error(`${c}
12
12
  - too many long flags`):new Error(`${c}
13
- - unrecognised flag format`)}if(t===void 0&&r===void 0)throw new Error(`option creation failed due to no flags found in '${e}'.`);return{shortFlag:t,longFlag:r}}Yi.Option=qi;Yi.DualOptions=Ji});var id=Ze(rd=>{function y_(e,t){if(Math.abs(e.length-t.length)>3)return Math.max(e.length,t.length);let r=[];for(let o=0;o<=e.length;o++)r[o]=[o];for(let o=0;o<=t.length;o++)r[0][o]=o;for(let o=1;o<=t.length;o++)for(let n=1;n<=e.length;n++){let i=1;e[n-1]===t[o-1]?i=0:i=1,r[n][o]=Math.min(r[n-1][o]+1,r[n][o-1]+1,r[n-1][o-1]+i),n>1&&o>1&&e[n-1]===t[o-2]&&e[n-2]===t[o-1]&&(r[n][o]=Math.min(r[n][o],r[n-2][o-2]+1))}return r[e.length][t.length]}function x_(e,t){if(!t||t.length===0)return"";t=Array.from(new Set(t));let r=e.startsWith("--");r&&(e=e.slice(2),t=t.map(s=>s.slice(2)));let o=[],n=3,i=.4;return t.forEach(s=>{if(s.length<=1)return;let c=y_(e,s),u=Math.max(e.length,s.length);(u-c)/u>i&&(c<n?(n=c,o=[s]):c===n&&o.push(s))}),o.sort((s,c)=>s.localeCompare(c)),r&&(o=o.map(s=>`--${s}`)),o.length>1?`
13
+ - unrecognised flag format`)}if(t===void 0&&r===void 0)throw new Error(`option creation failed due to no flags found in '${e}'.`);return{shortFlag:t,longFlag:r}}to.Option=Qi;to.DualOptions=eo});var dd=Be(ld=>{function R_(e,t){if(Math.abs(e.length-t.length)>3)return Math.max(e.length,t.length);let r=[];for(let o=0;o<=e.length;o++)r[o]=[o];for(let o=0;o<=t.length;o++)r[0][o]=o;for(let o=1;o<=t.length;o++)for(let n=1;n<=e.length;n++){let i=1;e[n-1]===t[o-1]?i=0:i=1,r[n][o]=Math.min(r[n-1][o]+1,r[n][o-1]+1,r[n-1][o-1]+i),n>1&&o>1&&e[n-1]===t[o-2]&&e[n-2]===t[o-1]&&(r[n][o]=Math.min(r[n][o],r[n-2][o-2]+1))}return r[e.length][t.length]}function D_(e,t){if(!t||t.length===0)return"";t=Array.from(new Set(t));let r=e.startsWith("--");r&&(e=e.slice(2),t=t.map(s=>s.slice(2)));let o=[],n=3,i=.4;return t.forEach(s=>{if(s.length<=1)return;let c=R_(e,s),u=Math.max(e.length,s.length);(u-c)/u>i&&(c<n?(n=c,o=[s]):c===n&&o.push(s))}),o.sort((s,c)=>s.localeCompare(c)),r&&(o=o.map(s=>`--${s}`)),o.length>1?`
14
14
  (Did you mean one of ${o.join(", ")}?)`:o.length===1?`
15
- (Did you mean ${o[0]}?)`:""}rd.suggestSimilar=x_});var cd=Ze(ro=>{var k_=Vt("node:events").EventEmitter,Qi=Vt("node:child_process"),xe=Vt("node:path"),Fn=Vt("node:fs"),P=Vt("node:process"),{Argument:S_,humanReadableArgName:$_}=Mn(),{CommanderError:eo}=Bt(),{Help:I_,stripColor:E_}=Wi(),{Option:od,DualOptions:w_}=Xi(),{suggestSimilar:ad}=id(),to=class e extends k_{constructor(t){super(),this.commands=[],this.options=[],this.parent=null,this._allowUnknownOption=!1,this._allowExcessArguments=!1,this.registeredArguments=[],this._args=this.registeredArguments,this.args=[],this.rawArgs=[],this.processedArgs=[],this._scriptPath=null,this._name=t||"",this._optionValues={},this._optionValueSources={},this._storeOptionsAsProperties=!1,this._actionHandler=null,this._executableHandler=!1,this._executableFile=null,this._executableDir=null,this._defaultCommandName=null,this._exitCallback=null,this._aliases=[],this._combineFlagAndOptionalValue=!0,this._description="",this._summary="",this._argsDescription=void 0,this._enablePositionalOptions=!1,this._passThroughOptions=!1,this._lifeCycleHooks={},this._showHelpAfterError=!1,this._showSuggestionAfterError=!0,this._savedState=null,this._outputConfiguration={writeOut:r=>P.stdout.write(r),writeErr:r=>P.stderr.write(r),outputError:(r,o)=>o(r),getOutHelpWidth:()=>P.stdout.isTTY?P.stdout.columns:void 0,getErrHelpWidth:()=>P.stderr.isTTY?P.stderr.columns:void 0,getOutHasColors:()=>no()??(P.stdout.isTTY&&P.stdout.hasColors?.()),getErrHasColors:()=>no()??(P.stderr.isTTY&&P.stderr.hasColors?.()),stripColor:r=>E_(r)},this._hidden=!1,this._helpOption=void 0,this._addImplicitHelpCommand=void 0,this._helpCommand=void 0,this._helpConfiguration={}}copyInheritedSettings(t){return this._outputConfiguration=t._outputConfiguration,this._helpOption=t._helpOption,this._helpCommand=t._helpCommand,this._helpConfiguration=t._helpConfiguration,this._exitCallback=t._exitCallback,this._storeOptionsAsProperties=t._storeOptionsAsProperties,this._combineFlagAndOptionalValue=t._combineFlagAndOptionalValue,this._allowExcessArguments=t._allowExcessArguments,this._enablePositionalOptions=t._enablePositionalOptions,this._showHelpAfterError=t._showHelpAfterError,this._showSuggestionAfterError=t._showSuggestionAfterError,this}_getCommandAndAncestors(){let t=[];for(let r=this;r;r=r.parent)t.push(r);return t}command(t,r,o){let n=r,i=o;typeof n=="object"&&n!==null&&(i=n,n=null),i=i||{};let[,s,c]=t.match(/([^ ]+) *(.*)/),u=this.createCommand(s);return n&&(u.description(n),u._executableHandler=!0),i.isDefault&&(this._defaultCommandName=u._name),u._hidden=!!(i.noHelp||i.hidden),u._executableFile=i.executableFile||null,c&&u.arguments(c),this._registerCommand(u),u.parent=this,u.copyInheritedSettings(this),n?this:u}createCommand(t){return new e(t)}createHelp(){return Object.assign(new I_,this.configureHelp())}configureHelp(t){return t===void 0?this._helpConfiguration:(this._helpConfiguration=t,this)}configureOutput(t){return t===void 0?this._outputConfiguration:(Object.assign(this._outputConfiguration,t),this)}showHelpAfterError(t=!0){return typeof t!="string"&&(t=!!t),this._showHelpAfterError=t,this}showSuggestionAfterError(t=!0){return this._showSuggestionAfterError=!!t,this}addCommand(t,r){if(!t._name)throw new Error(`Command passed to .addCommand() must have a name
16
- - specify the name in Command constructor or using .name()`);return r=r||{},r.isDefault&&(this._defaultCommandName=t._name),(r.noHelp||r.hidden)&&(t._hidden=!0),this._registerCommand(t),t.parent=this,t._checkForBrokenPassThrough(),this}createArgument(t,r){return new S_(t,r)}argument(t,r,o,n){let i=this.createArgument(t,r);return typeof o=="function"?i.default(n).argParser(o):i.default(o),this.addArgument(i),this}arguments(t){return t.trim().split(/ +/).forEach(r=>{this.argument(r)}),this}addArgument(t){let r=this.registeredArguments.slice(-1)[0];if(r&&r.variadic)throw new Error(`only the last argument can be variadic '${r.name()}'`);if(t.required&&t.defaultValue!==void 0&&t.parseArg===void 0)throw new Error(`a default value for a required argument is never used: '${t.name()}'`);return this.registeredArguments.push(t),this}helpCommand(t,r){if(typeof t=="boolean")return this._addImplicitHelpCommand=t,this;t=t??"help [command]";let[,o,n]=t.match(/([^ ]+) *(.*)/),i=r??"display help for command",s=this.createCommand(o);return s.helpOption(!1),n&&s.arguments(n),i&&s.description(i),this._addImplicitHelpCommand=!0,this._helpCommand=s,this}addHelpCommand(t,r){return typeof t!="object"?(this.helpCommand(t,r),this):(this._addImplicitHelpCommand=!0,this._helpCommand=t,this)}_getHelpCommand(){return this._addImplicitHelpCommand??(this.commands.length&&!this._actionHandler&&!this._findCommand("help"))?(this._helpCommand===void 0&&this.helpCommand(void 0,void 0),this._helpCommand):null}hook(t,r){let o=["preSubcommand","preAction","postAction"];if(!o.includes(t))throw new Error(`Unexpected value for event passed to hook : '${t}'.
17
- Expecting one of '${o.join("', '")}'`);return this._lifeCycleHooks[t]?this._lifeCycleHooks[t].push(r):this._lifeCycleHooks[t]=[r],this}exitOverride(t){return t?this._exitCallback=t:this._exitCallback=r=>{if(r.code!=="commander.executeSubCommandAsync")throw r},this}_exit(t,r,o){this._exitCallback&&this._exitCallback(new eo(t,r,o)),P.exit(t)}action(t){let r=o=>{let n=this.registeredArguments.length,i=o.slice(0,n);return this._storeOptionsAsProperties?i[n]=this:i[n]=this.opts(),i.push(this),t.apply(this,i)};return this._actionHandler=r,this}createOption(t,r){return new od(t,r)}_callParseArg(t,r,o,n){try{return t.parseArg(r,o)}catch(i){if(i.code==="commander.invalidArgument"){let s=`${n} ${i.message}`;this.error(s,{exitCode:i.exitCode,code:i.code})}throw i}}_registerOption(t){let r=t.short&&this._findOption(t.short)||t.long&&this._findOption(t.long);if(r){let o=t.long&&this._findOption(t.long)?t.long:t.short;throw new Error(`Cannot add option '${t.flags}'${this._name&&` to command '${this._name}'`} due to conflicting flag '${o}'
18
- - already used by option '${r.flags}'`)}this.options.push(t)}_registerCommand(t){let r=n=>[n.name()].concat(n.aliases()),o=r(t).find(n=>this._findCommand(n));if(o){let n=r(this._findCommand(o)).join("|"),i=r(t).join("|");throw new Error(`cannot add command '${i}' as already have command '${n}'`)}this.commands.push(t)}addOption(t){this._registerOption(t);let r=t.name(),o=t.attributeName();if(t.negate){let i=t.long.replace(/^--no-/,"--");this._findOption(i)||this.setOptionValueWithSource(o,t.defaultValue===void 0?!0:t.defaultValue,"default")}else t.defaultValue!==void 0&&this.setOptionValueWithSource(o,t.defaultValue,"default");let n=(i,s,c)=>{i==null&&t.presetArg!==void 0&&(i=t.presetArg);let u=this.getOptionValue(o);i!==null&&t.parseArg?i=this._callParseArg(t,i,u,s):i!==null&&t.variadic&&(i=t._concatValue(i,u)),i==null&&(t.negate?i=!1:t.isBoolean()||t.optional?i=!0:i=""),this.setOptionValueWithSource(o,i,c)};return this.on("option:"+r,i=>{let s=`error: option '${t.flags}' argument '${i}' is invalid.`;n(i,s,"cli")}),t.envVar&&this.on("optionEnv:"+r,i=>{let s=`error: option '${t.flags}' value '${i}' from env '${t.envVar}' is invalid.`;n(i,s,"env")}),this}_optionEx(t,r,o,n,i){if(typeof r=="object"&&r instanceof od)throw new Error("To add an Option object use addOption() instead of option() or requiredOption()");let s=this.createOption(r,o);if(s.makeOptionMandatory(!!t.mandatory),typeof n=="function")s.default(i).argParser(n);else if(n instanceof RegExp){let c=n;n=(u,l)=>{let d=c.exec(u);return d?d[0]:l},s.default(i).argParser(n)}else s.default(n);return this.addOption(s)}option(t,r,o,n){return this._optionEx({},t,r,o,n)}requiredOption(t,r,o,n){return this._optionEx({mandatory:!0},t,r,o,n)}combineFlagAndOptionalValue(t=!0){return this._combineFlagAndOptionalValue=!!t,this}allowUnknownOption(t=!0){return this._allowUnknownOption=!!t,this}allowExcessArguments(t=!0){return this._allowExcessArguments=!!t,this}enablePositionalOptions(t=!0){return this._enablePositionalOptions=!!t,this}passThroughOptions(t=!0){return this._passThroughOptions=!!t,this._checkForBrokenPassThrough(),this}_checkForBrokenPassThrough(){if(this.parent&&this._passThroughOptions&&!this.parent._enablePositionalOptions)throw new Error(`passThroughOptions cannot be used for '${this._name}' without turning on enablePositionalOptions for parent command(s)`)}storeOptionsAsProperties(t=!0){if(this.options.length)throw new Error("call .storeOptionsAsProperties() before adding options");if(Object.keys(this._optionValues).length)throw new Error("call .storeOptionsAsProperties() before setting option values");return this._storeOptionsAsProperties=!!t,this}getOptionValue(t){return this._storeOptionsAsProperties?this[t]:this._optionValues[t]}setOptionValue(t,r){return this.setOptionValueWithSource(t,r,void 0)}setOptionValueWithSource(t,r,o){return this._storeOptionsAsProperties?this[t]=r:this._optionValues[t]=r,this._optionValueSources[t]=o,this}getOptionValueSource(t){return this._optionValueSources[t]}getOptionValueSourceWithGlobals(t){let r;return this._getCommandAndAncestors().forEach(o=>{o.getOptionValueSource(t)!==void 0&&(r=o.getOptionValueSource(t))}),r}_prepareUserArgs(t,r){if(t!==void 0&&!Array.isArray(t))throw new Error("first parameter to parse must be array or undefined");if(r=r||{},t===void 0&&r.from===void 0){P.versions?.electron&&(r.from="electron");let n=P.execArgv??[];(n.includes("-e")||n.includes("--eval")||n.includes("-p")||n.includes("--print"))&&(r.from="eval")}t===void 0&&(t=P.argv),this.rawArgs=t.slice();let o;switch(r.from){case void 0:case"node":this._scriptPath=t[1],o=t.slice(2);break;case"electron":P.defaultApp?(this._scriptPath=t[1],o=t.slice(2)):o=t.slice(1);break;case"user":o=t.slice(0);break;case"eval":o=t.slice(1);break;default:throw new Error(`unexpected parse option { from: '${r.from}' }`)}return!this._name&&this._scriptPath&&this.nameFromFilename(this._scriptPath),this._name=this._name||"program",o}parse(t,r){this._prepareForParse();let o=this._prepareUserArgs(t,r);return this._parseCommand([],o),this}async parseAsync(t,r){this._prepareForParse();let o=this._prepareUserArgs(t,r);return await this._parseCommand([],o),this}_prepareForParse(){this._savedState===null?this.saveStateBeforeParse():this.restoreStateBeforeParse()}saveStateBeforeParse(){this._savedState={_name:this._name,_optionValues:{...this._optionValues},_optionValueSources:{...this._optionValueSources}}}restoreStateBeforeParse(){if(this._storeOptionsAsProperties)throw new Error(`Can not call parse again when storeOptionsAsProperties is true.
19
- - either make a new Command for each call to parse, or stop storing options as properties`);this._name=this._savedState._name,this._scriptPath=null,this.rawArgs=[],this._optionValues={...this._savedState._optionValues},this._optionValueSources={...this._savedState._optionValueSources},this.args=[],this.processedArgs=[]}_checkForMissingExecutable(t,r,o){if(Fn.existsSync(t))return;let n=r?`searched for local subcommand relative to directory '${r}'`:"no directory for search for local subcommand, use .executableDir() to supply a custom directory",i=`'${t}' does not exist
15
+ (Did you mean ${o[0]}?)`:""}ld.suggestSimilar=D_});var gd=Be(so=>{var z_=Kt("node:events").EventEmitter,ro=Kt("node:child_process"),Ee=Kt("node:path"),Vn=Kt("node:fs"),A=Kt("node:process"),{Argument:U_,humanReadableArgName:j_}=Zn(),{CommanderError:io}=Wt(),{Help:L_,stripColor:F_}=Xi(),{Option:md,DualOptions:M_}=no(),{suggestSimilar:pd}=dd(),oo=class e extends z_{constructor(t){super(),this.commands=[],this.options=[],this.parent=null,this._allowUnknownOption=!1,this._allowExcessArguments=!1,this.registeredArguments=[],this._args=this.registeredArguments,this.args=[],this.rawArgs=[],this.processedArgs=[],this._scriptPath=null,this._name=t||"",this._optionValues={},this._optionValueSources={},this._storeOptionsAsProperties=!1,this._actionHandler=null,this._executableHandler=!1,this._executableFile=null,this._executableDir=null,this._defaultCommandName=null,this._exitCallback=null,this._aliases=[],this._combineFlagAndOptionalValue=!0,this._description="",this._summary="",this._argsDescription=void 0,this._enablePositionalOptions=!1,this._passThroughOptions=!1,this._lifeCycleHooks={},this._showHelpAfterError=!1,this._showSuggestionAfterError=!0,this._savedState=null,this._outputConfiguration={writeOut:r=>A.stdout.write(r),writeErr:r=>A.stderr.write(r),outputError:(r,o)=>o(r),getOutHelpWidth:()=>A.stdout.isTTY?A.stdout.columns:void 0,getErrHelpWidth:()=>A.stderr.isTTY?A.stderr.columns:void 0,getOutHasColors:()=>ao()??(A.stdout.isTTY&&A.stdout.hasColors?.()),getErrHasColors:()=>ao()??(A.stderr.isTTY&&A.stderr.hasColors?.()),stripColor:r=>F_(r)},this._hidden=!1,this._helpOption=void 0,this._addImplicitHelpCommand=void 0,this._helpCommand=void 0,this._helpConfiguration={}}copyInheritedSettings(t){return this._outputConfiguration=t._outputConfiguration,this._helpOption=t._helpOption,this._helpCommand=t._helpCommand,this._helpConfiguration=t._helpConfiguration,this._exitCallback=t._exitCallback,this._storeOptionsAsProperties=t._storeOptionsAsProperties,this._combineFlagAndOptionalValue=t._combineFlagAndOptionalValue,this._allowExcessArguments=t._allowExcessArguments,this._enablePositionalOptions=t._enablePositionalOptions,this._showHelpAfterError=t._showHelpAfterError,this._showSuggestionAfterError=t._showSuggestionAfterError,this}_getCommandAndAncestors(){let t=[];for(let r=this;r;r=r.parent)t.push(r);return t}command(t,r,o){let n=r,i=o;typeof n=="object"&&n!==null&&(i=n,n=null),i=i||{};let[,s,c]=t.match(/([^ ]+) *(.*)/),u=this.createCommand(s);return n&&(u.description(n),u._executableHandler=!0),i.isDefault&&(this._defaultCommandName=u._name),u._hidden=!!(i.noHelp||i.hidden),u._executableFile=i.executableFile||null,c&&u.arguments(c),this._registerCommand(u),u.parent=this,u.copyInheritedSettings(this),n?this:u}createCommand(t){return new e(t)}createHelp(){return Object.assign(new L_,this.configureHelp())}configureHelp(t){return t===void 0?this._helpConfiguration:(this._helpConfiguration=t,this)}configureOutput(t){return t===void 0?this._outputConfiguration:(Object.assign(this._outputConfiguration,t),this)}showHelpAfterError(t=!0){return typeof t!="string"&&(t=!!t),this._showHelpAfterError=t,this}showSuggestionAfterError(t=!0){return this._showSuggestionAfterError=!!t,this}addCommand(t,r){if(!t._name)throw new Error(`Command passed to .addCommand() must have a name
16
+ - specify the name in Command constructor or using .name()`);return r=r||{},r.isDefault&&(this._defaultCommandName=t._name),(r.noHelp||r.hidden)&&(t._hidden=!0),this._registerCommand(t),t.parent=this,t._checkForBrokenPassThrough(),this}createArgument(t,r){return new U_(t,r)}argument(t,r,o,n){let i=this.createArgument(t,r);return typeof o=="function"?i.default(n).argParser(o):i.default(o),this.addArgument(i),this}arguments(t){return t.trim().split(/ +/).forEach(r=>{this.argument(r)}),this}addArgument(t){let r=this.registeredArguments.slice(-1)[0];if(r&&r.variadic)throw new Error(`only the last argument can be variadic '${r.name()}'`);if(t.required&&t.defaultValue!==void 0&&t.parseArg===void 0)throw new Error(`a default value for a required argument is never used: '${t.name()}'`);return this.registeredArguments.push(t),this}helpCommand(t,r){if(typeof t=="boolean")return this._addImplicitHelpCommand=t,this;t=t??"help [command]";let[,o,n]=t.match(/([^ ]+) *(.*)/),i=r??"display help for command",s=this.createCommand(o);return s.helpOption(!1),n&&s.arguments(n),i&&s.description(i),this._addImplicitHelpCommand=!0,this._helpCommand=s,this}addHelpCommand(t,r){return typeof t!="object"?(this.helpCommand(t,r),this):(this._addImplicitHelpCommand=!0,this._helpCommand=t,this)}_getHelpCommand(){return this._addImplicitHelpCommand??(this.commands.length&&!this._actionHandler&&!this._findCommand("help"))?(this._helpCommand===void 0&&this.helpCommand(void 0,void 0),this._helpCommand):null}hook(t,r){let o=["preSubcommand","preAction","postAction"];if(!o.includes(t))throw new Error(`Unexpected value for event passed to hook : '${t}'.
17
+ Expecting one of '${o.join("', '")}'`);return this._lifeCycleHooks[t]?this._lifeCycleHooks[t].push(r):this._lifeCycleHooks[t]=[r],this}exitOverride(t){return t?this._exitCallback=t:this._exitCallback=r=>{if(r.code!=="commander.executeSubCommandAsync")throw r},this}_exit(t,r,o){this._exitCallback&&this._exitCallback(new io(t,r,o)),A.exit(t)}action(t){let r=o=>{let n=this.registeredArguments.length,i=o.slice(0,n);return this._storeOptionsAsProperties?i[n]=this:i[n]=this.opts(),i.push(this),t.apply(this,i)};return this._actionHandler=r,this}createOption(t,r){return new md(t,r)}_callParseArg(t,r,o,n){try{return t.parseArg(r,o)}catch(i){if(i.code==="commander.invalidArgument"){let s=`${n} ${i.message}`;this.error(s,{exitCode:i.exitCode,code:i.code})}throw i}}_registerOption(t){let r=t.short&&this._findOption(t.short)||t.long&&this._findOption(t.long);if(r){let o=t.long&&this._findOption(t.long)?t.long:t.short;throw new Error(`Cannot add option '${t.flags}'${this._name&&` to command '${this._name}'`} due to conflicting flag '${o}'
18
+ - already used by option '${r.flags}'`)}this.options.push(t)}_registerCommand(t){let r=n=>[n.name()].concat(n.aliases()),o=r(t).find(n=>this._findCommand(n));if(o){let n=r(this._findCommand(o)).join("|"),i=r(t).join("|");throw new Error(`cannot add command '${i}' as already have command '${n}'`)}this.commands.push(t)}addOption(t){this._registerOption(t);let r=t.name(),o=t.attributeName();if(t.negate){let i=t.long.replace(/^--no-/,"--");this._findOption(i)||this.setOptionValueWithSource(o,t.defaultValue===void 0?!0:t.defaultValue,"default")}else t.defaultValue!==void 0&&this.setOptionValueWithSource(o,t.defaultValue,"default");let n=(i,s,c)=>{i==null&&t.presetArg!==void 0&&(i=t.presetArg);let u=this.getOptionValue(o);i!==null&&t.parseArg?i=this._callParseArg(t,i,u,s):i!==null&&t.variadic&&(i=t._concatValue(i,u)),i==null&&(t.negate?i=!1:t.isBoolean()||t.optional?i=!0:i=""),this.setOptionValueWithSource(o,i,c)};return this.on("option:"+r,i=>{let s=`error: option '${t.flags}' argument '${i}' is invalid.`;n(i,s,"cli")}),t.envVar&&this.on("optionEnv:"+r,i=>{let s=`error: option '${t.flags}' value '${i}' from env '${t.envVar}' is invalid.`;n(i,s,"env")}),this}_optionEx(t,r,o,n,i){if(typeof r=="object"&&r instanceof md)throw new Error("To add an Option object use addOption() instead of option() or requiredOption()");let s=this.createOption(r,o);if(s.makeOptionMandatory(!!t.mandatory),typeof n=="function")s.default(i).argParser(n);else if(n instanceof RegExp){let c=n;n=(u,l)=>{let d=c.exec(u);return d?d[0]:l},s.default(i).argParser(n)}else s.default(n);return this.addOption(s)}option(t,r,o,n){return this._optionEx({},t,r,o,n)}requiredOption(t,r,o,n){return this._optionEx({mandatory:!0},t,r,o,n)}combineFlagAndOptionalValue(t=!0){return this._combineFlagAndOptionalValue=!!t,this}allowUnknownOption(t=!0){return this._allowUnknownOption=!!t,this}allowExcessArguments(t=!0){return this._allowExcessArguments=!!t,this}enablePositionalOptions(t=!0){return this._enablePositionalOptions=!!t,this}passThroughOptions(t=!0){return this._passThroughOptions=!!t,this._checkForBrokenPassThrough(),this}_checkForBrokenPassThrough(){if(this.parent&&this._passThroughOptions&&!this.parent._enablePositionalOptions)throw new Error(`passThroughOptions cannot be used for '${this._name}' without turning on enablePositionalOptions for parent command(s)`)}storeOptionsAsProperties(t=!0){if(this.options.length)throw new Error("call .storeOptionsAsProperties() before adding options");if(Object.keys(this._optionValues).length)throw new Error("call .storeOptionsAsProperties() before setting option values");return this._storeOptionsAsProperties=!!t,this}getOptionValue(t){return this._storeOptionsAsProperties?this[t]:this._optionValues[t]}setOptionValue(t,r){return this.setOptionValueWithSource(t,r,void 0)}setOptionValueWithSource(t,r,o){return this._storeOptionsAsProperties?this[t]=r:this._optionValues[t]=r,this._optionValueSources[t]=o,this}getOptionValueSource(t){return this._optionValueSources[t]}getOptionValueSourceWithGlobals(t){let r;return this._getCommandAndAncestors().forEach(o=>{o.getOptionValueSource(t)!==void 0&&(r=o.getOptionValueSource(t))}),r}_prepareUserArgs(t,r){if(t!==void 0&&!Array.isArray(t))throw new Error("first parameter to parse must be array or undefined");if(r=r||{},t===void 0&&r.from===void 0){A.versions?.electron&&(r.from="electron");let n=A.execArgv??[];(n.includes("-e")||n.includes("--eval")||n.includes("-p")||n.includes("--print"))&&(r.from="eval")}t===void 0&&(t=A.argv),this.rawArgs=t.slice();let o;switch(r.from){case void 0:case"node":this._scriptPath=t[1],o=t.slice(2);break;case"electron":A.defaultApp?(this._scriptPath=t[1],o=t.slice(2)):o=t.slice(1);break;case"user":o=t.slice(0);break;case"eval":o=t.slice(1);break;default:throw new Error(`unexpected parse option { from: '${r.from}' }`)}return!this._name&&this._scriptPath&&this.nameFromFilename(this._scriptPath),this._name=this._name||"program",o}parse(t,r){this._prepareForParse();let o=this._prepareUserArgs(t,r);return this._parseCommand([],o),this}async parseAsync(t,r){this._prepareForParse();let o=this._prepareUserArgs(t,r);return await this._parseCommand([],o),this}_prepareForParse(){this._savedState===null?this.saveStateBeforeParse():this.restoreStateBeforeParse()}saveStateBeforeParse(){this._savedState={_name:this._name,_optionValues:{...this._optionValues},_optionValueSources:{...this._optionValueSources}}}restoreStateBeforeParse(){if(this._storeOptionsAsProperties)throw new Error(`Can not call parse again when storeOptionsAsProperties is true.
19
+ - either make a new Command for each call to parse, or stop storing options as properties`);this._name=this._savedState._name,this._scriptPath=null,this.rawArgs=[],this._optionValues={...this._savedState._optionValues},this._optionValueSources={...this._savedState._optionValueSources},this.args=[],this.processedArgs=[]}_checkForMissingExecutable(t,r,o){if(Vn.existsSync(t))return;let n=r?`searched for local subcommand relative to directory '${r}'`:"no directory for search for local subcommand, use .executableDir() to supply a custom directory",i=`'${t}' does not exist
20
20
  - if '${o}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead
21
21
  - if the default executable name is not suitable, use the executableFile option to supply a custom name or path
22
- - ${n}`;throw new Error(i)}_executeSubCommand(t,r){r=r.slice();let o=!1,n=[".js",".ts",".tsx",".mjs",".cjs"];function i(d,m){let g=xe.resolve(d,m);if(Fn.existsSync(g))return g;if(n.includes(xe.extname(m)))return;let h=n.find(S=>Fn.existsSync(`${g}${S}`));if(h)return`${g}${h}`}this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let s=t._executableFile||`${this._name}-${t._name}`,c=this._executableDir||"";if(this._scriptPath){let d;try{d=Fn.realpathSync(this._scriptPath)}catch{d=this._scriptPath}c=xe.resolve(xe.dirname(d),c)}if(c){let d=i(c,s);if(!d&&!t._executableFile&&this._scriptPath){let m=xe.basename(this._scriptPath,xe.extname(this._scriptPath));m!==this._name&&(d=i(c,`${m}-${t._name}`))}s=d||s}o=n.includes(xe.extname(s));let u;P.platform!=="win32"?o?(r.unshift(s),r=sd(P.execArgv).concat(r),u=Qi.spawn(P.argv[0],r,{stdio:"inherit"})):u=Qi.spawn(s,r,{stdio:"inherit"}):(this._checkForMissingExecutable(s,c,t._name),r.unshift(s),r=sd(P.execArgv).concat(r),u=Qi.spawn(P.execPath,r,{stdio:"inherit"})),u.killed||["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"].forEach(m=>{P.on(m,()=>{u.killed===!1&&u.exitCode===null&&u.kill(m)})});let l=this._exitCallback;u.on("close",d=>{d=d??1,l?l(new eo(d,"commander.executeSubCommandAsync","(close)")):P.exit(d)}),u.on("error",d=>{if(d.code==="ENOENT")this._checkForMissingExecutable(s,c,t._name);else if(d.code==="EACCES")throw new Error(`'${s}' not executable`);if(!l)P.exit(1);else{let m=new eo(1,"commander.executeSubCommandAsync","(error)");m.nestedError=d,l(m)}}),this.runningCommand=u}_dispatchSubcommand(t,r,o){let n=this._findCommand(t);n||this.help({error:!0}),n._prepareForParse();let i;return i=this._chainOrCallSubCommandHook(i,n,"preSubcommand"),i=this._chainOrCall(i,()=>{if(n._executableHandler)this._executeSubCommand(n,r.concat(o));else return n._parseCommand(r,o)}),i}_dispatchHelpCommand(t){t||this.help();let r=this._findCommand(t);return r&&!r._executableHandler&&r.help(),this._dispatchSubcommand(t,[],[this._getHelpOption()?.long??this._getHelpOption()?.short??"--help"])}_checkNumberOfArguments(){this.registeredArguments.forEach((t,r)=>{t.required&&this.args[r]==null&&this.missingArgument(t.name())}),!(this.registeredArguments.length>0&&this.registeredArguments[this.registeredArguments.length-1].variadic)&&this.args.length>this.registeredArguments.length&&this._excessArguments(this.args)}_processArguments(){let t=(o,n,i)=>{let s=n;if(n!==null&&o.parseArg){let c=`error: command-argument value '${n}' is invalid for argument '${o.name()}'.`;s=this._callParseArg(o,n,i,c)}return s};this._checkNumberOfArguments();let r=[];this.registeredArguments.forEach((o,n)=>{let i=o.defaultValue;o.variadic?n<this.args.length?(i=this.args.slice(n),o.parseArg&&(i=i.reduce((s,c)=>t(o,c,s),o.defaultValue))):i===void 0&&(i=[]):n<this.args.length&&(i=this.args[n],o.parseArg&&(i=t(o,i,o.defaultValue))),r[n]=i}),this.processedArgs=r}_chainOrCall(t,r){return t&&t.then&&typeof t.then=="function"?t.then(()=>r()):r()}_chainOrCallHooks(t,r){let o=t,n=[];return this._getCommandAndAncestors().reverse().filter(i=>i._lifeCycleHooks[r]!==void 0).forEach(i=>{i._lifeCycleHooks[r].forEach(s=>{n.push({hookedCommand:i,callback:s})})}),r==="postAction"&&n.reverse(),n.forEach(i=>{o=this._chainOrCall(o,()=>i.callback(i.hookedCommand,this))}),o}_chainOrCallSubCommandHook(t,r,o){let n=t;return this._lifeCycleHooks[o]!==void 0&&this._lifeCycleHooks[o].forEach(i=>{n=this._chainOrCall(n,()=>i(this,r))}),n}_parseCommand(t,r){let o=this.parseOptions(r);if(this._parseOptionsEnv(),this._parseOptionsImplied(),t=t.concat(o.operands),r=o.unknown,this.args=t.concat(r),t&&this._findCommand(t[0]))return this._dispatchSubcommand(t[0],t.slice(1),r);if(this._getHelpCommand()&&t[0]===this._getHelpCommand().name())return this._dispatchHelpCommand(t[1]);if(this._defaultCommandName)return this._outputHelpIfRequested(r),this._dispatchSubcommand(this._defaultCommandName,t,r);this.commands.length&&this.args.length===0&&!this._actionHandler&&!this._defaultCommandName&&this.help({error:!0}),this._outputHelpIfRequested(o.unknown),this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let n=()=>{o.unknown.length>0&&this.unknownOption(o.unknown[0])},i=`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(i,t,r)})),s=this._chainOrCallHooks(s,"postAction"),s}if(this.parent&&this.parent.listenerCount(i))n(),this._processArguments(),this.parent.emit(i,t,r);else if(t.length){if(this._findCommand("*"))return this._dispatchSubcommand("*",t,r);this.listenerCount("command:*")?this.emit("command:*",t,r):this.commands.length?this.unknownCommand():(n(),this._processArguments())}else this.commands.length?(n(),this.help({error:!0})):(n(),this._processArguments())}_findCommand(t){if(t)return this.commands.find(r=>r._name===t||r._aliases.includes(t))}_findOption(t){return this.options.find(r=>r.is(t))}_checkForMissingMandatoryOptions(){this._getCommandAndAncestors().forEach(t=>{t.options.forEach(r=>{r.mandatory&&t.getOptionValue(r.attributeName())===void 0&&t.missingMandatoryOptionValue(r)})})}_checkForConflictingLocalOptions(){let t=this.options.filter(o=>{let n=o.attributeName();return this.getOptionValue(n)===void 0?!1:this.getOptionValueSource(n)!=="default"});t.filter(o=>o.conflictsWith.length>0).forEach(o=>{let n=t.find(i=>o.conflictsWith.includes(i.attributeName()));n&&this._conflictingOption(o,n)})}_checkForConflictingOptions(){this._getCommandAndAncestors().forEach(t=>{t._checkForConflictingLocalOptions()})}parseOptions(t){let r=[],o=[],n=r,i=t.slice();function s(u){return u.length>1&&u[0]==="-"}let c=null;for(;i.length;){let u=i.shift();if(u==="--"){n===o&&n.push(u),n.push(...i);break}if(c&&!s(u)){this.emit(`option:${c.name()}`,u);continue}if(c=null,s(u)){let l=this._findOption(u);if(l){if(l.required){let d=i.shift();d===void 0&&this.optionMissingArgument(l),this.emit(`option:${l.name()}`,d)}else if(l.optional){let d=null;i.length>0&&!s(i[0])&&(d=i.shift()),this.emit(`option:${l.name()}`,d)}else this.emit(`option:${l.name()}`);c=l.variadic?l:null;continue}}if(u.length>2&&u[0]==="-"&&u[1]!=="-"){let l=this._findOption(`-${u[1]}`);if(l){l.required||l.optional&&this._combineFlagAndOptionalValue?this.emit(`option:${l.name()}`,u.slice(2)):(this.emit(`option:${l.name()}`),i.unshift(`-${u.slice(2)}`));continue}}if(/^--[^=]+=/.test(u)){let l=u.indexOf("="),d=this._findOption(u.slice(0,l));if(d&&(d.required||d.optional)){this.emit(`option:${d.name()}`,u.slice(l+1));continue}}if(s(u)&&(n=o),(this._enablePositionalOptions||this._passThroughOptions)&&r.length===0&&o.length===0){if(this._findCommand(u)){r.push(u),i.length>0&&o.push(...i);break}else if(this._getHelpCommand()&&u===this._getHelpCommand().name()){r.push(u),i.length>0&&r.push(...i);break}else if(this._defaultCommandName){o.push(u),i.length>0&&o.push(...i);break}}if(this._passThroughOptions){n.push(u),i.length>0&&n.push(...i);break}n.push(u)}return{operands:r,unknown:o}}opts(){if(this._storeOptionsAsProperties){let t={},r=this.options.length;for(let o=0;o<r;o++){let n=this.options[o].attributeName();t[n]=n===this._versionOptionName?this._version:this[n]}return t}return this._optionValues}optsWithGlobals(){return this._getCommandAndAncestors().reduce((t,r)=>Object.assign(t,r.opts()),{})}error(t,r){this._outputConfiguration.outputError(`${t}
22
+ - ${n}`;throw new Error(i)}_executeSubCommand(t,r){r=r.slice();let o=!1,n=[".js",".ts",".tsx",".mjs",".cjs"];function i(d,m){let g=Ee.resolve(d,m);if(Vn.existsSync(g))return g;if(n.includes(Ee.extname(m)))return;let h=n.find(S=>Vn.existsSync(`${g}${S}`));if(h)return`${g}${h}`}this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let s=t._executableFile||`${this._name}-${t._name}`,c=this._executableDir||"";if(this._scriptPath){let d;try{d=Vn.realpathSync(this._scriptPath)}catch{d=this._scriptPath}c=Ee.resolve(Ee.dirname(d),c)}if(c){let d=i(c,s);if(!d&&!t._executableFile&&this._scriptPath){let m=Ee.basename(this._scriptPath,Ee.extname(this._scriptPath));m!==this._name&&(d=i(c,`${m}-${t._name}`))}s=d||s}o=n.includes(Ee.extname(s));let u;A.platform!=="win32"?o?(r.unshift(s),r=fd(A.execArgv).concat(r),u=ro.spawn(A.argv[0],r,{stdio:"inherit"})):u=ro.spawn(s,r,{stdio:"inherit"}):(this._checkForMissingExecutable(s,c,t._name),r.unshift(s),r=fd(A.execArgv).concat(r),u=ro.spawn(A.execPath,r,{stdio:"inherit"})),u.killed||["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"].forEach(m=>{A.on(m,()=>{u.killed===!1&&u.exitCode===null&&u.kill(m)})});let l=this._exitCallback;u.on("close",d=>{d=d??1,l?l(new io(d,"commander.executeSubCommandAsync","(close)")):A.exit(d)}),u.on("error",d=>{if(d.code==="ENOENT")this._checkForMissingExecutable(s,c,t._name);else if(d.code==="EACCES")throw new Error(`'${s}' not executable`);if(!l)A.exit(1);else{let m=new io(1,"commander.executeSubCommandAsync","(error)");m.nestedError=d,l(m)}}),this.runningCommand=u}_dispatchSubcommand(t,r,o){let n=this._findCommand(t);n||this.help({error:!0}),n._prepareForParse();let i;return i=this._chainOrCallSubCommandHook(i,n,"preSubcommand"),i=this._chainOrCall(i,()=>{if(n._executableHandler)this._executeSubCommand(n,r.concat(o));else return n._parseCommand(r,o)}),i}_dispatchHelpCommand(t){t||this.help();let r=this._findCommand(t);return r&&!r._executableHandler&&r.help(),this._dispatchSubcommand(t,[],[this._getHelpOption()?.long??this._getHelpOption()?.short??"--help"])}_checkNumberOfArguments(){this.registeredArguments.forEach((t,r)=>{t.required&&this.args[r]==null&&this.missingArgument(t.name())}),!(this.registeredArguments.length>0&&this.registeredArguments[this.registeredArguments.length-1].variadic)&&this.args.length>this.registeredArguments.length&&this._excessArguments(this.args)}_processArguments(){let t=(o,n,i)=>{let s=n;if(n!==null&&o.parseArg){let c=`error: command-argument value '${n}' is invalid for argument '${o.name()}'.`;s=this._callParseArg(o,n,i,c)}return s};this._checkNumberOfArguments();let r=[];this.registeredArguments.forEach((o,n)=>{let i=o.defaultValue;o.variadic?n<this.args.length?(i=this.args.slice(n),o.parseArg&&(i=i.reduce((s,c)=>t(o,c,s),o.defaultValue))):i===void 0&&(i=[]):n<this.args.length&&(i=this.args[n],o.parseArg&&(i=t(o,i,o.defaultValue))),r[n]=i}),this.processedArgs=r}_chainOrCall(t,r){return t&&t.then&&typeof t.then=="function"?t.then(()=>r()):r()}_chainOrCallHooks(t,r){let o=t,n=[];return this._getCommandAndAncestors().reverse().filter(i=>i._lifeCycleHooks[r]!==void 0).forEach(i=>{i._lifeCycleHooks[r].forEach(s=>{n.push({hookedCommand:i,callback:s})})}),r==="postAction"&&n.reverse(),n.forEach(i=>{o=this._chainOrCall(o,()=>i.callback(i.hookedCommand,this))}),o}_chainOrCallSubCommandHook(t,r,o){let n=t;return this._lifeCycleHooks[o]!==void 0&&this._lifeCycleHooks[o].forEach(i=>{n=this._chainOrCall(n,()=>i(this,r))}),n}_parseCommand(t,r){let o=this.parseOptions(r);if(this._parseOptionsEnv(),this._parseOptionsImplied(),t=t.concat(o.operands),r=o.unknown,this.args=t.concat(r),t&&this._findCommand(t[0]))return this._dispatchSubcommand(t[0],t.slice(1),r);if(this._getHelpCommand()&&t[0]===this._getHelpCommand().name())return this._dispatchHelpCommand(t[1]);if(this._defaultCommandName)return this._outputHelpIfRequested(r),this._dispatchSubcommand(this._defaultCommandName,t,r);this.commands.length&&this.args.length===0&&!this._actionHandler&&!this._defaultCommandName&&this.help({error:!0}),this._outputHelpIfRequested(o.unknown),this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let n=()=>{o.unknown.length>0&&this.unknownOption(o.unknown[0])},i=`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(i,t,r)})),s=this._chainOrCallHooks(s,"postAction"),s}if(this.parent&&this.parent.listenerCount(i))n(),this._processArguments(),this.parent.emit(i,t,r);else if(t.length){if(this._findCommand("*"))return this._dispatchSubcommand("*",t,r);this.listenerCount("command:*")?this.emit("command:*",t,r):this.commands.length?this.unknownCommand():(n(),this._processArguments())}else this.commands.length?(n(),this.help({error:!0})):(n(),this._processArguments())}_findCommand(t){if(t)return this.commands.find(r=>r._name===t||r._aliases.includes(t))}_findOption(t){return this.options.find(r=>r.is(t))}_checkForMissingMandatoryOptions(){this._getCommandAndAncestors().forEach(t=>{t.options.forEach(r=>{r.mandatory&&t.getOptionValue(r.attributeName())===void 0&&t.missingMandatoryOptionValue(r)})})}_checkForConflictingLocalOptions(){let t=this.options.filter(o=>{let n=o.attributeName();return this.getOptionValue(n)===void 0?!1:this.getOptionValueSource(n)!=="default"});t.filter(o=>o.conflictsWith.length>0).forEach(o=>{let n=t.find(i=>o.conflictsWith.includes(i.attributeName()));n&&this._conflictingOption(o,n)})}_checkForConflictingOptions(){this._getCommandAndAncestors().forEach(t=>{t._checkForConflictingLocalOptions()})}parseOptions(t){let r=[],o=[],n=r,i=t.slice();function s(u){return u.length>1&&u[0]==="-"}let c=null;for(;i.length;){let u=i.shift();if(u==="--"){n===o&&n.push(u),n.push(...i);break}if(c&&!s(u)){this.emit(`option:${c.name()}`,u);continue}if(c=null,s(u)){let l=this._findOption(u);if(l){if(l.required){let d=i.shift();d===void 0&&this.optionMissingArgument(l),this.emit(`option:${l.name()}`,d)}else if(l.optional){let d=null;i.length>0&&!s(i[0])&&(d=i.shift()),this.emit(`option:${l.name()}`,d)}else this.emit(`option:${l.name()}`);c=l.variadic?l:null;continue}}if(u.length>2&&u[0]==="-"&&u[1]!=="-"){let l=this._findOption(`-${u[1]}`);if(l){l.required||l.optional&&this._combineFlagAndOptionalValue?this.emit(`option:${l.name()}`,u.slice(2)):(this.emit(`option:${l.name()}`),i.unshift(`-${u.slice(2)}`));continue}}if(/^--[^=]+=/.test(u)){let l=u.indexOf("="),d=this._findOption(u.slice(0,l));if(d&&(d.required||d.optional)){this.emit(`option:${d.name()}`,u.slice(l+1));continue}}if(s(u)&&(n=o),(this._enablePositionalOptions||this._passThroughOptions)&&r.length===0&&o.length===0){if(this._findCommand(u)){r.push(u),i.length>0&&o.push(...i);break}else if(this._getHelpCommand()&&u===this._getHelpCommand().name()){r.push(u),i.length>0&&r.push(...i);break}else if(this._defaultCommandName){o.push(u),i.length>0&&o.push(...i);break}}if(this._passThroughOptions){n.push(u),i.length>0&&n.push(...i);break}n.push(u)}return{operands:r,unknown:o}}opts(){if(this._storeOptionsAsProperties){let t={},r=this.options.length;for(let o=0;o<r;o++){let n=this.options[o].attributeName();t[n]=n===this._versionOptionName?this._version:this[n]}return t}return this._optionValues}optsWithGlobals(){return this._getCommandAndAncestors().reduce((t,r)=>Object.assign(t,r.opts()),{})}error(t,r){this._outputConfiguration.outputError(`${t}
23
23
  `,this._outputConfiguration.writeErr),typeof this._showHelpAfterError=="string"?this._outputConfiguration.writeErr(`${this._showHelpAfterError}
24
24
  `):this._showHelpAfterError&&(this._outputConfiguration.writeErr(`
25
- `),this.outputHelp({error:!0}));let o=r||{},n=o.exitCode||1,i=o.code||"commander.error";this._exit(n,i,t)}_parseOptionsEnv(){this.options.forEach(t=>{if(t.envVar&&t.envVar in P.env){let r=t.attributeName();(this.getOptionValue(r)===void 0||["default","config","env"].includes(this.getOptionValueSource(r)))&&(t.required||t.optional?this.emit(`optionEnv:${t.name()}`,P.env[t.envVar]):this.emit(`optionEnv:${t.name()}`))}})}_parseOptionsImplied(){let t=new w_(this.options),r=o=>this.getOptionValue(o)!==void 0&&!["default","implied"].includes(this.getOptionValueSource(o));this.options.filter(o=>o.implied!==void 0&&r(o.attributeName())&&t.valueFromOption(this.getOptionValue(o.attributeName()),o)).forEach(o=>{Object.keys(o.implied).filter(n=>!r(n)).forEach(n=>{this.setOptionValueWithSource(n,o.implied[n],"implied")})})}missingArgument(t){let r=`error: missing required argument '${t}'`;this.error(r,{code:"commander.missingArgument"})}optionMissingArgument(t){let r=`error: option '${t.flags}' argument missing`;this.error(r,{code:"commander.optionMissingArgument"})}missingMandatoryOptionValue(t){let r=`error: required option '${t.flags}' not specified`;this.error(r,{code:"commander.missingMandatoryOptionValue"})}_conflictingOption(t,r){let o=s=>{let c=s.attributeName(),u=this.getOptionValue(c),l=this.options.find(m=>m.negate&&c===m.attributeName()),d=this.options.find(m=>!m.negate&&c===m.attributeName());return l&&(l.presetArg===void 0&&u===!1||l.presetArg!==void 0&&u===l.presetArg)?l:d||s},n=s=>{let c=o(s),u=c.attributeName();return this.getOptionValueSource(u)==="env"?`environment variable '${c.envVar}'`:`option '${c.flags}'`},i=`error: ${n(t)} cannot be used with ${n(r)}`;this.error(i,{code:"commander.conflictingOption"})}unknownOption(t){if(this._allowUnknownOption)return;let r="";if(t.startsWith("--")&&this._showSuggestionAfterError){let n=[],i=this;do{let s=i.createHelp().visibleOptions(i).filter(c=>c.long).map(c=>c.long);n=n.concat(s),i=i.parent}while(i&&!i._enablePositionalOptions);r=ad(t,n)}let o=`error: unknown option '${t}'${r}`;this.error(o,{code:"commander.unknownOption"})}_excessArguments(t){if(this._allowExcessArguments)return;let r=this.registeredArguments.length,o=r===1?"":"s",i=`error: too many arguments${this.parent?` for '${this.name()}'`:""}. Expected ${r} argument${o} but got ${t.length}.`;this.error(i,{code:"commander.excessArguments"})}unknownCommand(){let t=this.args[0],r="";if(this._showSuggestionAfterError){let n=[];this.createHelp().visibleCommands(this).forEach(i=>{n.push(i.name()),i.alias()&&n.push(i.alias())}),r=ad(t,n)}let o=`error: unknown command '${t}'${r}`;this.error(o,{code:"commander.unknownCommand"})}version(t,r,o){if(t===void 0)return this._version;this._version=t,r=r||"-V, --version",o=o||"output the version number";let n=this.createOption(r,o);return this._versionOptionName=n.attributeName(),this._registerOption(n),this.on("option:"+n.name(),()=>{this._outputConfiguration.writeOut(`${t}
26
- `),this._exit(0,"commander.version",t)}),this}description(t,r){return t===void 0&&r===void 0?this._description:(this._description=t,r&&(this._argsDescription=r),this)}summary(t){return t===void 0?this._summary:(this._summary=t,this)}alias(t){if(t===void 0)return this._aliases[0];let r=this;if(this.commands.length!==0&&this.commands[this.commands.length-1]._executableHandler&&(r=this.commands[this.commands.length-1]),t===r._name)throw new Error("Command alias can't be the same as its name");let o=this.parent?._findCommand(t);if(o){let n=[o.name()].concat(o.aliases()).join("|");throw new Error(`cannot add alias '${t}' to command '${this.name()}' as already have command '${n}'`)}return r._aliases.push(t),this}aliases(t){return t===void 0?this._aliases:(t.forEach(r=>this.alias(r)),this)}usage(t){if(t===void 0){if(this._usage)return this._usage;let r=this.registeredArguments.map(o=>$_(o));return[].concat(this.options.length||this._helpOption!==null?"[options]":[],this.commands.length?"[command]":[],this.registeredArguments.length?r:[]).join(" ")}return this._usage=t,this}name(t){return t===void 0?this._name:(this._name=t,this)}nameFromFilename(t){return this._name=xe.basename(t,xe.extname(t)),this}executableDir(t){return t===void 0?this._executableDir:(this._executableDir=t,this)}helpInformation(t){let r=this.createHelp(),o=this._getOutputContext(t);r.prepareContext({error:o.error,helpWidth:o.helpWidth,outputHasColors:o.hasColors});let n=r.formatHelp(this,r);return o.hasColors?n:this._outputConfiguration.stripColor(n)}_getOutputContext(t){t=t||{};let r=!!t.error,o,n,i;return r?(o=c=>this._outputConfiguration.writeErr(c),n=this._outputConfiguration.getErrHasColors(),i=this._outputConfiguration.getErrHelpWidth()):(o=c=>this._outputConfiguration.writeOut(c),n=this._outputConfiguration.getOutHasColors(),i=this._outputConfiguration.getOutHelpWidth()),{error:r,write:c=>(n||(c=this._outputConfiguration.stripColor(c)),o(c)),hasColors:n,helpWidth:i}}outputHelp(t){let r;typeof t=="function"&&(r=t,t=void 0);let o=this._getOutputContext(t),n={error:o.error,write:o.write,command:this};this._getCommandAndAncestors().reverse().forEach(s=>s.emit("beforeAllHelp",n)),this.emit("beforeHelp",n);let i=this.helpInformation({error:o.error});if(r&&(i=r(i),typeof i!="string"&&!Buffer.isBuffer(i)))throw new Error("outputHelp callback must return a string or a Buffer");o.write(i),this._getHelpOption()?.long&&this.emit(this._getHelpOption().long),this.emit("afterHelp",n),this._getCommandAndAncestors().forEach(s=>s.emit("afterAllHelp",n))}helpOption(t,r){return typeof t=="boolean"?(t?this._helpOption=this._helpOption??void 0:this._helpOption=null,this):(t=t??"-h, --help",r=r??"display help for command",this._helpOption=this.createOption(t,r),this)}_getHelpOption(){return this._helpOption===void 0&&this.helpOption(void 0,void 0),this._helpOption}addHelpOption(t){return this._helpOption=t,this}help(t){this.outputHelp(t);let r=Number(P.exitCode??0);r===0&&t&&typeof t!="function"&&t.error&&(r=1),this._exit(r,"commander.help","(outputHelp)")}addHelpText(t,r){let o=["beforeAll","before","after","afterAll"];if(!o.includes(t))throw new Error(`Unexpected value for position to addHelpText.
25
+ `),this.outputHelp({error:!0}));let o=r||{},n=o.exitCode||1,i=o.code||"commander.error";this._exit(n,i,t)}_parseOptionsEnv(){this.options.forEach(t=>{if(t.envVar&&t.envVar in A.env){let r=t.attributeName();(this.getOptionValue(r)===void 0||["default","config","env"].includes(this.getOptionValueSource(r)))&&(t.required||t.optional?this.emit(`optionEnv:${t.name()}`,A.env[t.envVar]):this.emit(`optionEnv:${t.name()}`))}})}_parseOptionsImplied(){let t=new M_(this.options),r=o=>this.getOptionValue(o)!==void 0&&!["default","implied"].includes(this.getOptionValueSource(o));this.options.filter(o=>o.implied!==void 0&&r(o.attributeName())&&t.valueFromOption(this.getOptionValue(o.attributeName()),o)).forEach(o=>{Object.keys(o.implied).filter(n=>!r(n)).forEach(n=>{this.setOptionValueWithSource(n,o.implied[n],"implied")})})}missingArgument(t){let r=`error: missing required argument '${t}'`;this.error(r,{code:"commander.missingArgument"})}optionMissingArgument(t){let r=`error: option '${t.flags}' argument missing`;this.error(r,{code:"commander.optionMissingArgument"})}missingMandatoryOptionValue(t){let r=`error: required option '${t.flags}' not specified`;this.error(r,{code:"commander.missingMandatoryOptionValue"})}_conflictingOption(t,r){let o=s=>{let c=s.attributeName(),u=this.getOptionValue(c),l=this.options.find(m=>m.negate&&c===m.attributeName()),d=this.options.find(m=>!m.negate&&c===m.attributeName());return l&&(l.presetArg===void 0&&u===!1||l.presetArg!==void 0&&u===l.presetArg)?l:d||s},n=s=>{let c=o(s),u=c.attributeName();return this.getOptionValueSource(u)==="env"?`environment variable '${c.envVar}'`:`option '${c.flags}'`},i=`error: ${n(t)} cannot be used with ${n(r)}`;this.error(i,{code:"commander.conflictingOption"})}unknownOption(t){if(this._allowUnknownOption)return;let r="";if(t.startsWith("--")&&this._showSuggestionAfterError){let n=[],i=this;do{let s=i.createHelp().visibleOptions(i).filter(c=>c.long).map(c=>c.long);n=n.concat(s),i=i.parent}while(i&&!i._enablePositionalOptions);r=pd(t,n)}let o=`error: unknown option '${t}'${r}`;this.error(o,{code:"commander.unknownOption"})}_excessArguments(t){if(this._allowExcessArguments)return;let r=this.registeredArguments.length,o=r===1?"":"s",i=`error: too many arguments${this.parent?` for '${this.name()}'`:""}. Expected ${r} argument${o} but got ${t.length}.`;this.error(i,{code:"commander.excessArguments"})}unknownCommand(){let t=this.args[0],r="";if(this._showSuggestionAfterError){let n=[];this.createHelp().visibleCommands(this).forEach(i=>{n.push(i.name()),i.alias()&&n.push(i.alias())}),r=pd(t,n)}let o=`error: unknown command '${t}'${r}`;this.error(o,{code:"commander.unknownCommand"})}version(t,r,o){if(t===void 0)return this._version;this._version=t,r=r||"-V, --version",o=o||"output the version number";let n=this.createOption(r,o);return this._versionOptionName=n.attributeName(),this._registerOption(n),this.on("option:"+n.name(),()=>{this._outputConfiguration.writeOut(`${t}
26
+ `),this._exit(0,"commander.version",t)}),this}description(t,r){return t===void 0&&r===void 0?this._description:(this._description=t,r&&(this._argsDescription=r),this)}summary(t){return t===void 0?this._summary:(this._summary=t,this)}alias(t){if(t===void 0)return this._aliases[0];let r=this;if(this.commands.length!==0&&this.commands[this.commands.length-1]._executableHandler&&(r=this.commands[this.commands.length-1]),t===r._name)throw new Error("Command alias can't be the same as its name");let o=this.parent?._findCommand(t);if(o){let n=[o.name()].concat(o.aliases()).join("|");throw new Error(`cannot add alias '${t}' to command '${this.name()}' as already have command '${n}'`)}return r._aliases.push(t),this}aliases(t){return t===void 0?this._aliases:(t.forEach(r=>this.alias(r)),this)}usage(t){if(t===void 0){if(this._usage)return this._usage;let r=this.registeredArguments.map(o=>j_(o));return[].concat(this.options.length||this._helpOption!==null?"[options]":[],this.commands.length?"[command]":[],this.registeredArguments.length?r:[]).join(" ")}return this._usage=t,this}name(t){return t===void 0?this._name:(this._name=t,this)}nameFromFilename(t){return this._name=Ee.basename(t,Ee.extname(t)),this}executableDir(t){return t===void 0?this._executableDir:(this._executableDir=t,this)}helpInformation(t){let r=this.createHelp(),o=this._getOutputContext(t);r.prepareContext({error:o.error,helpWidth:o.helpWidth,outputHasColors:o.hasColors});let n=r.formatHelp(this,r);return o.hasColors?n:this._outputConfiguration.stripColor(n)}_getOutputContext(t){t=t||{};let r=!!t.error,o,n,i;return r?(o=c=>this._outputConfiguration.writeErr(c),n=this._outputConfiguration.getErrHasColors(),i=this._outputConfiguration.getErrHelpWidth()):(o=c=>this._outputConfiguration.writeOut(c),n=this._outputConfiguration.getOutHasColors(),i=this._outputConfiguration.getOutHelpWidth()),{error:r,write:c=>(n||(c=this._outputConfiguration.stripColor(c)),o(c)),hasColors:n,helpWidth:i}}outputHelp(t){let r;typeof t=="function"&&(r=t,t=void 0);let o=this._getOutputContext(t),n={error:o.error,write:o.write,command:this};this._getCommandAndAncestors().reverse().forEach(s=>s.emit("beforeAllHelp",n)),this.emit("beforeHelp",n);let i=this.helpInformation({error:o.error});if(r&&(i=r(i),typeof i!="string"&&!Buffer.isBuffer(i)))throw new Error("outputHelp callback must return a string or a Buffer");o.write(i),this._getHelpOption()?.long&&this.emit(this._getHelpOption().long),this.emit("afterHelp",n),this._getCommandAndAncestors().forEach(s=>s.emit("afterAllHelp",n))}helpOption(t,r){return typeof t=="boolean"?(t?this._helpOption=this._helpOption??void 0:this._helpOption=null,this):(t=t??"-h, --help",r=r??"display help for command",this._helpOption=this.createOption(t,r),this)}_getHelpOption(){return this._helpOption===void 0&&this.helpOption(void 0,void 0),this._helpOption}addHelpOption(t){return this._helpOption=t,this}help(t){this.outputHelp(t);let r=Number(A.exitCode??0);r===0&&t&&typeof t!="function"&&t.error&&(r=1),this._exit(r,"commander.help","(outputHelp)")}addHelpText(t,r){let o=["beforeAll","before","after","afterAll"];if(!o.includes(t))throw new Error(`Unexpected value for position to addHelpText.
27
27
  Expecting one of '${o.join("', '")}'`);let n=`${t}Help`;return this.on(n,i=>{let s;typeof r=="function"?s=r({error:i.error,command:i.command}):s=r,s&&i.write(`${s}
28
- `)}),this}_outputHelpIfRequested(t){let r=this._getHelpOption();r&&t.find(n=>r.is(n))&&(this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)"))}};function sd(e){return e.map(t=>{if(!t.startsWith("--inspect"))return t;let r,o="127.0.0.1",n="9229",i;return(i=t.match(/^(--inspect(-brk)?)$/))!==null?r=i[1]:(i=t.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null?(r=i[1],/^\d+$/.test(i[3])?n=i[3]:o=i[3]):(i=t.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null&&(r=i[1],o=i[3],n=i[4]),r&&n!=="0"?`${r}=${o}:${parseInt(n)+1}`:t})}function no(){if(P.env.NO_COLOR||P.env.FORCE_COLOR==="0"||P.env.FORCE_COLOR==="false")return!1;if(P.env.FORCE_COLOR||P.env.CLICOLOR_FORCE!==void 0)return!0}ro.Command=to;ro.useColor=no});var md=Ze(re=>{var{Argument:ud}=Mn(),{Command:io}=cd(),{CommanderError:O_,InvalidArgumentError:ld}=Bt(),{Help:T_}=Wi(),{Option:dd}=Xi();re.program=new io;re.createCommand=e=>new io(e);re.createOption=(e,t)=>new dd(e,t);re.createArgument=(e,t)=>new ud(e,t);re.Command=io;re.Option=dd;re.Argument=ud;re.Help=T_;re.CommanderError=O_;re.InvalidArgumentError=ld;re.InvalidOptionArgumentError=ld});var pd=f_(md(),1),{program:X$,createCommand:Q$,createArgument:eI,createOption:tI,CommanderError:nI,InvalidArgumentError:rI,InvalidOptionArgumentError:iI,Command:fd,Argument:oI,Option:aI,Help:sI}=pd.default;import{readFile as D$}from"node:fs/promises";import{fileURLToPath as z$}from"node:url";import{dirname as U$,join as j$}from"node:path";var k=class extends Error{constructor(r,o,n){super(r);this.status=o;this.name="CliError",this.code=n?.code,this.details=n?.details,this.param=n?.param}status;code;details;param};var Ht="x-fs-surface",Gt="cli",P_="management";function tt(e,t){let r=new URLSearchParams;for(let[n,i]of Object.entries(t))i&&r.set(n,i);let o=r.toString();return o?`${e}?${o}`:e}function A_(e){let t=e.includes("?")?"&":"?";return`${e}${t}dry_run=true`}function gd(e){let t=null;async function r(){let s=await fetch(`${e.apiUrl}/auth/cli/exchange`,{method:"POST",headers:{Authorization:`Bearer ${e.token}`,"Content-Type":"application/json",[Ht]:Gt}});if(!s.ok){let u=(await s.json().catch(()=>null))?.error,l=typeof u=="string"?{message:u}:u;throw new k(l?.message??s.statusText,s.status,{code:l?.code,details:l?.details})}return t=await s.json(),t}function o(s){return s.split("/",3)[1]===P_}async function n(s){if(!e.token.startsWith("mk_")||o(s))return e.token;let c=t?Date.parse(t.expiresAt):0;return(!t||c-Date.now()<6e4)&&await r(),t.accessToken}async function i(s,c,u,l){let d=await n(c),m=l?.dryRun?A_(c):c,g={Authorization:`Bearer ${d}`,"Content-Type":"application/json",[Ht]:Gt};l?.idempotencyKey&&(g["Idempotency-Key"]=l.idempotencyKey);let h=await fetch(`${e.apiUrl}${m}`,{method:s,headers:g,body:u?JSON.stringify(u):void 0});if(!h.ok){let C=(await h.json().catch(()=>null))?.error,A=typeof C=="string"?{message:C}:C;throw new k(A?.message??h.statusText,h.status,{code:A?.code,details:A?.details})}if(h.status!==204)return h.json()}return{exchangeCliToken:r,bootstrap:()=>i("POST","/builder/context/bootstrap"),listProducts:()=>i("GET","/products"),initProduct:(s,c)=>i("POST","/products/init",s,c),updateProduct:(s,c,u)=>i("PATCH",tt(`/products/${s}`,{env:u?.env}),c),publishProduct:(s,c)=>i("POST",`/products/${s}/publish`,void 0,c),createPlan:(s,c,u,l)=>i("POST",tt(`/products/${s}/plans`,{env:u?.env}),c,l),updatePlan:(s,c,u,l)=>i("PATCH",tt(`/products/${s}/plans/${c}`,{env:l?.env}),u),deletePlan:(s,c,u)=>i("DELETE",tt(`/products/${s}/plans/${c}`,{env:u?.env})),getProduct:(s,c)=>i("GET",tt(`/products/${s}`,{env:c?.env})),listEnvironments:s=>i("GET",`/products/${s}/environments`),createEnvironment:(s,c,u)=>i("POST",`/products/${s}/environments`,c,u),deleteEnvironment:(s,c)=>i("DELETE",`/products/${s}/environments/${encodeURIComponent(c)}`),deleteProduct:s=>i("DELETE",`/products/${s}`),managementListPlans:s=>i("GET",`/management/products/${s}/plans`),managementGetUsage:s=>i("GET",`/management/products/${s}/usage`),managementListMakerTokens:()=>i("GET","/maker-tokens"),managementCreateMakerToken:(s,c)=>i("POST","/maker-tokens",s,c),managementRevokeMakerToken:s=>i("DELETE",`/maker-tokens/${s}`),builderListBackends:s=>i("GET",`/products/${s}/backends`),builderCreateBackend:(s,c,u)=>i("POST",`/products/${s}/backends`,c,u),builderDeleteBackend:(s,c)=>i("DELETE",`/products/${s}/backends/${c}`),builderListRuntimeTokens:s=>i("GET",`/products/${s}/runtime-tokens`),builderCreateRuntimeToken:(s,c,u)=>i("POST",`/products/${s}/runtime-tokens`,c,u),builderRotateRuntimeToken:(s,c,u)=>i("POST",`/products/${s}/runtime-tokens/${c}/rotate`,void 0,u),builderRevokeRuntimeToken:(s,c)=>i("DELETE",`/products/${s}/runtime-tokens/${c}`),builderGitHubStatus:()=>i("GET","/builder/git/github/status"),productStripeStatus:s=>i("GET",`/products/${s}/stripe/status`),issuePersonaBootstrapKey:async(s,c,u)=>{let l=await fetch(`${e.apiUrl}/portal/products/${s}/environments/${c}/test/bootstrap-key`,{method:"POST",headers:{Authorization:`Bearer ${e.token}`,"Content-Type":"application/json",[Ht]:Gt},body:JSON.stringify(u??{})});if(!l.ok){let m=(await l.json().catch(()=>null))?.error,g=typeof m=="string"?{message:m}:m;throw new k(g?.message??l.statusText,l.status,{code:g?.code,details:g?.details})}return l.json()},listPersonas:async(s,c)=>{let u=await fetch(`${e.apiUrl}/portal/products/${s}/environments/${c}/test/personas`,{method:"GET",headers:{Authorization:`Bearer ${e.token}`,[Ht]:Gt}});if(!u.ok){let d=(await u.json().catch(()=>null))?.error,m=typeof d=="string"?{message:d}:d;throw new k(m?.message??u.statusText,u.status,{code:m?.code,details:m?.details})}return u.json()},revokePersona:async(s,c,u)=>{let l=await fetch(`${e.apiUrl}/portal/products/${s}/environments/${c}/test/personas/${u}`,{method:"DELETE",headers:{Authorization:`Bearer ${e.token}`,[Ht]:Gt}});if(!l.ok){let m=(await l.json().catch(()=>null))?.error,g=typeof m=="string"?{message:m}:m;throw new k(g?.message??l.statusText,l.status,{code:g?.code,details:g?.details})}return l.json()},getProductConfig:(s,c)=>i("GET",tt(`/products/${s}/config`,{format:"json",env:c?.env,state:c?.state})),updateProductConfigDraft:(s,c,u)=>i("PATCH",`/products/${s}/config/draft`,{spec:c,env:u?.env,branch:u?.branch,source:u?.source,baseDraftHash:u?.baseDraftHash})}}import{existsSync as Zn,mkdirSync as N_,readFileSync as vd,writeFileSync as bd}from"node:fs";import{homedir as C_}from"node:os";import{join as ao}from"node:path";var hd="https://core.farthershore.com";var Vn=ao(C_(),".farthershore"),_d=ao(Vn,"config.json"),Kt=ao(Vn,"credentials.json");function yd(e){Zn(e)||N_(e,{recursive:!0,mode:448})}var oo={apiUrl:hd};function xd(){if(yd(Vn),!Zn(_d))return oo;try{let e=JSON.parse(vd(_d,"utf-8"));return{...oo,...e}}catch{return oo}}function Bn(){if(!Zn(Kt))return null;try{return JSON.parse(vd(Kt,"utf-8"))}catch{return null}}function kd(e){yd(Vn),bd(Kt,JSON.stringify(e,null,2)+`
29
- `,{mode:384})}function Sd(){Zn(Kt)&&bd(Kt,"{}")}function $d(e){if(e)return e;let t=process.env.FARTHERSHORE_TOKEN;if(t)return t;let r=Bn();if(r?.token)return r.token;throw new k("Not authenticated. Run `farthershore auth login` or set FARTHERSHORE_TOKEN environment variable.")}import{createInterface as Jk}from"node:readline";var Id=(e=0)=>t=>`\x1B[${t+e}m`,Ed=(e=0)=>t=>`\x1B[${38+e};5;${t}m`,wd=(e=0)=>(t,r,o)=>`\x1B[${38+e};2;${t};${r};${o}m`,j={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]}},xI=Object.keys(j.modifier),R_=Object.keys(j.color),D_=Object.keys(j.bgColor),kI=[...R_,...D_];function z_(){let e=new Map;for(let[t,r]of Object.entries(j)){for(let[o,n]of Object.entries(r))j[o]={open:`\x1B[${n[0]}m`,close:`\x1B[${n[1]}m`},r[o]=j[o],e.set(n[0],n[1]);Object.defineProperty(j,t,{value:r,enumerable:!1})}return Object.defineProperty(j,"codes",{value:e,enumerable:!1}),j.color.close="\x1B[39m",j.bgColor.close="\x1B[49m",j.color.ansi=Id(),j.color.ansi256=Ed(),j.color.ansi16m=wd(),j.bgColor.ansi=Id(10),j.bgColor.ansi256=Ed(10),j.bgColor.ansi16m=wd(10),Object.defineProperties(j,{rgbToAnsi256:{value(t,r,o){return t===r&&r===o?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(r/255*5)+Math.round(o/255*5)},enumerable:!1},hexToRgb:{value(t){let r=/[a-f\d]{6}|[a-f\d]{3}/i.exec(t.toString(16));if(!r)return[0,0,0];let[o]=r;o.length===3&&(o=[...o].map(i=>i+i).join(""));let n=Number.parseInt(o,16);return[n>>16&255,n>>8&255,n&255]},enumerable:!1},hexToAnsi256:{value:t=>j.rgbToAnsi256(...j.hexToRgb(t)),enumerable:!1},ansi256ToAnsi:{value(t){if(t<8)return 30+t;if(t<16)return 90+(t-8);let r,o,n;if(t>=232)r=((t-232)*10+8)/255,o=r,n=r;else{t-=16;let c=t%36;r=Math.floor(t/36)/5,o=Math.floor(c/6)/5,n=c%6/5}let i=Math.max(r,o,n)*2;if(i===0)return 30;let s=30+(Math.round(n)<<2|Math.round(o)<<1|Math.round(r));return i===2&&(s+=60),s},enumerable:!1},rgbToAnsi:{value:(t,r,o)=>j.ansi256ToAnsi(j.rgbToAnsi256(t,r,o)),enumerable:!1},hexToAnsi:{value:t=>j.ansi256ToAnsi(j.hexToAnsi256(t)),enumerable:!1}}),j}var U_=z_(),ae=U_;import so from"node:process";import j_ from"node:os";import Od from"node:tty";function ie(e,t=globalThis.Deno?globalThis.Deno.args:so.argv){let r=e.startsWith("-")?"":e.length===1?"-":"--",o=t.indexOf(r+e),n=t.indexOf("--");return o!==-1&&(n===-1||o<n)}var{env:L}=so,Hn;ie("no-color")||ie("no-colors")||ie("color=false")||ie("color=never")?Hn=0:(ie("color")||ie("colors")||ie("color=true")||ie("color=always"))&&(Hn=1);function L_(){if("FORCE_COLOR"in L)return L.FORCE_COLOR==="true"?1:L.FORCE_COLOR==="false"?0:L.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(L.FORCE_COLOR,10),3)}function M_(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function F_(e,{streamIsTTY:t,sniffFlags:r=!0}={}){let o=L_();o!==void 0&&(Hn=o);let n=r?Hn:o;if(n===0)return 0;if(r){if(ie("color=16m")||ie("color=full")||ie("color=truecolor"))return 3;if(ie("color=256"))return 2}if("TF_BUILD"in L&&"AGENT_NAME"in L)return 1;if(e&&!t&&n===void 0)return 0;let i=n||0;if(L.TERM==="dumb")return i;if(so.platform==="win32"){let s=j_.release().split(".");return Number(s[0])>=10&&Number(s[2])>=10586?Number(s[2])>=14931?3:2:1}if("CI"in L)return["GITHUB_ACTIONS","GITEA_ACTIONS","CIRCLECI"].some(s=>s in L)?3:["TRAVIS","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some(s=>s in L)||L.CI_NAME==="codeship"?1:i;if("TEAMCITY_VERSION"in L)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(L.TEAMCITY_VERSION)?1:0;if(L.COLORTERM==="truecolor"||L.TERM==="xterm-kitty"||L.TERM==="xterm-ghostty"||L.TERM==="wezterm")return 3;if("TERM_PROGRAM"in L){let s=Number.parseInt((L.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(L.TERM_PROGRAM){case"iTerm.app":return s>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(L.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(L.TERM)||"COLORTERM"in L?1:i}function Td(e,t={}){let r=F_(e,{streamIsTTY:e&&e.isTTY,...t});return M_(r)}var Z_={stdout:Td({isTTY:Od.isatty(1)}),stderr:Td({isTTY:Od.isatty(2)})},Pd=Z_;function Ad(e,t,r){let o=e.indexOf(t);if(o===-1)return e;let n=t.length,i=0,s="";do s+=e.slice(i,o)+t+r,i=o+n,o=e.indexOf(t,i);while(o!==-1);return s+=e.slice(i),s}function Nd(e,t,r,o){let n=0,i="";do{let s=e[o-1]==="\r";i+=e.slice(n,s?o-1:o)+t+(s?`\r
28
+ `)}),this}_outputHelpIfRequested(t){let r=this._getHelpOption();r&&t.find(n=>r.is(n))&&(this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)"))}};function fd(e){return e.map(t=>{if(!t.startsWith("--inspect"))return t;let r,o="127.0.0.1",n="9229",i;return(i=t.match(/^(--inspect(-brk)?)$/))!==null?r=i[1]:(i=t.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null?(r=i[1],/^\d+$/.test(i[3])?n=i[3]:o=i[3]):(i=t.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null&&(r=i[1],o=i[3],n=i[4]),r&&n!=="0"?`${r}=${o}:${parseInt(n)+1}`:t})}function ao(){if(A.env.NO_COLOR||A.env.FORCE_COLOR==="0"||A.env.FORCE_COLOR==="false")return!1;if(A.env.FORCE_COLOR||A.env.CLICOLOR_FORCE!==void 0)return!0}so.Command=oo;so.useColor=ao});var bd=Be(ae=>{var{Argument:hd}=Zn(),{Command:co}=gd(),{CommanderError:Z_,InvalidArgumentError:_d}=Wt(),{Help:V_}=Xi(),{Option:vd}=no();ae.program=new co;ae.createCommand=e=>new co(e);ae.createOption=(e,t)=>new vd(e,t);ae.createArgument=(e,t)=>new hd(e,t);ae.Command=co;ae.Option=vd;ae.Argument=hd;ae.Help=V_;ae.CommanderError=Z_;ae.InvalidArgumentError=_d;ae.InvalidOptionArgumentError=_d});var yd=O_(bd(),1),{program:rE,createCommand:iE,createArgument:oE,createOption:aE,CommanderError:sE,InvalidArgumentError:cE,InvalidOptionArgumentError:uE,Command:xd,Argument:lE,Option:dE,Help:mE}=yd.default;import{readFile as FI}from"node:fs/promises";import{fileURLToPath as MI}from"node:url";import{dirname as ZI,join as VI}from"node:path";var k=class extends Error{constructor(r,o,n){super(r);this.status=o;this.name="CliError",this.code=n?.code,this.details=n?.details,this.param=n?.param}status;code;details;param};var qt="x-fs-surface",Jt="cli",B_="management";function it(e,t){let r=new URLSearchParams;for(let[n,i]of Object.entries(t))i&&r.set(n,i);let o=r.toString();return o?`${e}?${o}`:e}function H_(e){let t=e.includes("?")?"&":"?";return`${e}${t}dry_run=true`}function kd(e){let t=null;async function r(){let s=await fetch(`${e.apiUrl}/auth/cli/exchange`,{method:"POST",headers:{Authorization:`Bearer ${e.token}`,"Content-Type":"application/json",[qt]:Jt}});if(!s.ok){let u=(await s.json().catch(()=>null))?.error,l=typeof u=="string"?{message:u}:u;throw new k(l?.message??s.statusText,s.status,{code:l?.code,details:l?.details})}return t=await s.json(),t}function o(s){return s.split("/",3)[1]===B_}async function n(s){if(!e.token.startsWith("mk_")||o(s))return e.token;let c=t?Date.parse(t.expiresAt):0;return(!t||c-Date.now()<6e4)&&await r(),t.accessToken}async function i(s,c,u,l){let d=await n(c),m=l?.dryRun?H_(c):c,g={Authorization:`Bearer ${d}`,"Content-Type":"application/json",[qt]:Jt};l?.idempotencyKey&&(g["Idempotency-Key"]=l.idempotencyKey);let h=await fetch(`${e.apiUrl}${m}`,{method:s,headers:g,body:u?JSON.stringify(u):void 0});if(!h.ok){let R=(await h.json().catch(()=>null))?.error,P=typeof R=="string"?{message:R}:R;throw new k(P?.message??h.statusText,h.status,{code:P?.code,details:P?.details})}if(h.status!==204)return h.json()}return{exchangeCliToken:r,bootstrap:()=>i("POST","/builder/context/bootstrap"),listProducts:()=>i("GET","/products"),initProduct:(s,c)=>i("POST","/products/init",s,c),updateProduct:(s,c,u)=>i("PATCH",it(`/products/${s}`,{env:u?.env}),c),publishProduct:(s,c)=>i("POST",`/products/${s}/publish`,void 0,c),createPlan:(s,c,u,l)=>i("POST",it(`/products/${s}/plans`,{env:u?.env}),c,l),updatePlan:(s,c,u,l)=>i("PATCH",it(`/products/${s}/plans/${c}`,{env:l?.env}),u),deletePlan:(s,c,u)=>i("DELETE",it(`/products/${s}/plans/${c}`,{env:u?.env})),getProduct:(s,c)=>i("GET",it(`/products/${s}`,{env:c?.env})),listEnvironments:s=>i("GET",`/products/${s}/environments`),createEnvironment:(s,c,u)=>i("POST",`/products/${s}/environments`,c,u),deleteEnvironment:(s,c)=>i("DELETE",`/products/${s}/environments/${encodeURIComponent(c)}`),deleteProduct:s=>i("DELETE",`/products/${s}`),managementListPlans:s=>i("GET",`/management/products/${s}/plans`),managementGetUsage:s=>i("GET",`/management/products/${s}/usage`),managementListMakerTokens:()=>i("GET","/maker-tokens"),managementCreateMakerToken:(s,c)=>i("POST","/maker-tokens",s,c),managementRevokeMakerToken:s=>i("DELETE",`/maker-tokens/${s}`),builderListBackends:s=>i("GET",`/products/${s}/backends`),builderCreateBackend:(s,c,u)=>i("POST",`/products/${s}/backends`,c,u),builderDeleteBackend:(s,c)=>i("DELETE",`/products/${s}/backends/${c}`),builderListRuntimeTokens:s=>i("GET",`/products/${s}/runtime-tokens`),builderCreateRuntimeToken:(s,c,u)=>i("POST",`/products/${s}/runtime-tokens`,c,u),builderRotateRuntimeToken:(s,c,u)=>i("POST",`/products/${s}/runtime-tokens/${c}/rotate`,void 0,u),builderRevokeRuntimeToken:(s,c)=>i("DELETE",`/products/${s}/runtime-tokens/${c}`),builderFrontendDeploy:(s,c,u)=>i("POST",`/products/${s}/frontend/deploy`,c,u),builderFrontendStatus:(s,c)=>i("GET",`/products/${s}/frontend/status${c?`?environmentId=${encodeURIComponent(c)}`:""}`),builderFrontendReleases:(s,c)=>i("GET",`/products/${s}/frontend/releases${c?`?environmentId=${encodeURIComponent(c)}`:""}`),builderFrontendRollback:(s,c,u)=>i("POST",`/products/${s}/frontend/rollback`,c,u),builderGitHubStatus:()=>i("GET","/builder/git/github/status"),productStripeStatus:s=>i("GET",`/products/${s}/stripe/status`),issuePersonaBootstrapKey:async(s,c,u)=>{let l=await fetch(`${e.apiUrl}/portal/products/${s}/environments/${c}/test/bootstrap-key`,{method:"POST",headers:{Authorization:`Bearer ${e.token}`,"Content-Type":"application/json",[qt]:Jt},body:JSON.stringify(u??{})});if(!l.ok){let m=(await l.json().catch(()=>null))?.error,g=typeof m=="string"?{message:m}:m;throw new k(g?.message??l.statusText,l.status,{code:g?.code,details:g?.details})}return l.json()},listPersonas:async(s,c)=>{let u=await fetch(`${e.apiUrl}/portal/products/${s}/environments/${c}/test/personas`,{method:"GET",headers:{Authorization:`Bearer ${e.token}`,[qt]:Jt}});if(!u.ok){let d=(await u.json().catch(()=>null))?.error,m=typeof d=="string"?{message:d}:d;throw new k(m?.message??u.statusText,u.status,{code:m?.code,details:m?.details})}return u.json()},revokePersona:async(s,c,u)=>{let l=await fetch(`${e.apiUrl}/portal/products/${s}/environments/${c}/test/personas/${u}`,{method:"DELETE",headers:{Authorization:`Bearer ${e.token}`,[qt]:Jt}});if(!l.ok){let m=(await l.json().catch(()=>null))?.error,g=typeof m=="string"?{message:m}:m;throw new k(g?.message??l.statusText,l.status,{code:g?.code,details:g?.details})}return l.json()},getProductConfig:(s,c)=>i("GET",it(`/products/${s}/config`,{format:"json",env:c?.env,state:c?.state})),updateProductConfigDraft:(s,c,u)=>i("PATCH",`/products/${s}/config/draft`,{spec:c,env:u?.env,branch:u?.branch,source:u?.source,baseDraftHash:u?.baseDraftHash})}}import{existsSync as Bn,mkdirSync as G_,readFileSync as Id,writeFileSync as Ed}from"node:fs";import{homedir as K_}from"node:os";import{join as lo}from"node:path";var Sd="https://core.farthershore.com";var Hn=lo(K_(),".farthershore"),$d=lo(Hn,"config.json"),Yt=lo(Hn,"credentials.json");function wd(e){Bn(e)||G_(e,{recursive:!0,mode:448})}var uo={apiUrl:Sd};function Od(){if(wd(Hn),!Bn($d))return uo;try{let e=JSON.parse(Id($d,"utf-8"));return{...uo,...e}}catch{return uo}}function Gn(){if(!Bn(Yt))return null;try{return JSON.parse(Id(Yt,"utf-8"))}catch{return null}}function Td(e){wd(Hn),Ed(Yt,JSON.stringify(e,null,2)+`
29
+ `,{mode:384})}function Ad(){Bn(Yt)&&Ed(Yt,"{}")}function Pd(e){if(e)return e;let t=process.env.FARTHERSHORE_TOKEN;if(t)return t;let r=Gn();if(r?.token)return r.token;throw new k("Not authenticated. Run `farthershore auth login` or set FARTHERSHORE_TOKEN environment variable.")}import{createInterface as dS}from"node:readline";var Cd=(e=0)=>t=>`\x1B[${t+e}m`,Nd=(e=0)=>t=>`\x1B[${38+e};5;${t}m`,Rd=(e=0)=>(t,r,o)=>`\x1B[${38+e};2;${t};${r};${o}m`,L={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]}},EE=Object.keys(L.modifier),W_=Object.keys(L.color),q_=Object.keys(L.bgColor),wE=[...W_,...q_];function J_(){let e=new Map;for(let[t,r]of Object.entries(L)){for(let[o,n]of Object.entries(r))L[o]={open:`\x1B[${n[0]}m`,close:`\x1B[${n[1]}m`},r[o]=L[o],e.set(n[0],n[1]);Object.defineProperty(L,t,{value:r,enumerable:!1})}return Object.defineProperty(L,"codes",{value:e,enumerable:!1}),L.color.close="\x1B[39m",L.bgColor.close="\x1B[49m",L.color.ansi=Cd(),L.color.ansi256=Nd(),L.color.ansi16m=Rd(),L.bgColor.ansi=Cd(10),L.bgColor.ansi256=Nd(10),L.bgColor.ansi16m=Rd(10),Object.defineProperties(L,{rgbToAnsi256:{value(t,r,o){return t===r&&r===o?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(r/255*5)+Math.round(o/255*5)},enumerable:!1},hexToRgb:{value(t){let r=/[a-f\d]{6}|[a-f\d]{3}/i.exec(t.toString(16));if(!r)return[0,0,0];let[o]=r;o.length===3&&(o=[...o].map(i=>i+i).join(""));let n=Number.parseInt(o,16);return[n>>16&255,n>>8&255,n&255]},enumerable:!1},hexToAnsi256:{value:t=>L.rgbToAnsi256(...L.hexToRgb(t)),enumerable:!1},ansi256ToAnsi:{value(t){if(t<8)return 30+t;if(t<16)return 90+(t-8);let r,o,n;if(t>=232)r=((t-232)*10+8)/255,o=r,n=r;else{t-=16;let c=t%36;r=Math.floor(t/36)/5,o=Math.floor(c/6)/5,n=c%6/5}let i=Math.max(r,o,n)*2;if(i===0)return 30;let s=30+(Math.round(n)<<2|Math.round(o)<<1|Math.round(r));return i===2&&(s+=60),s},enumerable:!1},rgbToAnsi:{value:(t,r,o)=>L.ansi256ToAnsi(L.rgbToAnsi256(t,r,o)),enumerable:!1},hexToAnsi:{value:t=>L.ansi256ToAnsi(L.hexToAnsi256(t)),enumerable:!1}}),L}var Y_=J_(),ue=Y_;import mo from"node:process";import X_ from"node:os";import Dd from"node:tty";function se(e,t=globalThis.Deno?globalThis.Deno.args:mo.argv){let r=e.startsWith("-")?"":e.length===1?"-":"--",o=t.indexOf(r+e),n=t.indexOf("--");return o!==-1&&(n===-1||o<n)}var{env:F}=mo,Kn;se("no-color")||se("no-colors")||se("color=false")||se("color=never")?Kn=0:(se("color")||se("colors")||se("color=true")||se("color=always"))&&(Kn=1);function Q_(){if("FORCE_COLOR"in F)return F.FORCE_COLOR==="true"?1:F.FORCE_COLOR==="false"?0:F.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(F.FORCE_COLOR,10),3)}function ev(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function tv(e,{streamIsTTY:t,sniffFlags:r=!0}={}){let o=Q_();o!==void 0&&(Kn=o);let n=r?Kn:o;if(n===0)return 0;if(r){if(se("color=16m")||se("color=full")||se("color=truecolor"))return 3;if(se("color=256"))return 2}if("TF_BUILD"in F&&"AGENT_NAME"in F)return 1;if(e&&!t&&n===void 0)return 0;let i=n||0;if(F.TERM==="dumb")return i;if(mo.platform==="win32"){let s=X_.release().split(".");return Number(s[0])>=10&&Number(s[2])>=10586?Number(s[2])>=14931?3:2:1}if("CI"in F)return["GITHUB_ACTIONS","GITEA_ACTIONS","CIRCLECI"].some(s=>s in F)?3:["TRAVIS","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some(s=>s in F)||F.CI_NAME==="codeship"?1:i;if("TEAMCITY_VERSION"in F)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(F.TEAMCITY_VERSION)?1:0;if(F.COLORTERM==="truecolor"||F.TERM==="xterm-kitty"||F.TERM==="xterm-ghostty"||F.TERM==="wezterm")return 3;if("TERM_PROGRAM"in F){let s=Number.parseInt((F.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(F.TERM_PROGRAM){case"iTerm.app":return s>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(F.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(F.TERM)||"COLORTERM"in F?1:i}function zd(e,t={}){let r=tv(e,{streamIsTTY:e&&e.isTTY,...t});return ev(r)}var nv={stdout:zd({isTTY:Dd.isatty(1)}),stderr:zd({isTTY:Dd.isatty(2)})},Ud=nv;function jd(e,t,r){let o=e.indexOf(t);if(o===-1)return e;let n=t.length,i=0,s="";do s+=e.slice(i,o)+t+r,i=o+n,o=e.indexOf(t,i);while(o!==-1);return s+=e.slice(i),s}function Ld(e,t,r,o){let n=0,i="";do{let s=e[o-1]==="\r";i+=e.slice(n,s?o-1:o)+t+(s?`\r
30
30
  `:`
31
31
  `)+r,n=o+1,o=e.indexOf(`
32
- `,n)}while(o!==-1);return i+=e.slice(n),i}var{stdout:Cd,stderr:Rd}=Pd,co=Symbol("GENERATOR"),nt=Symbol("STYLER"),Wt=Symbol("IS_EMPTY"),Dd=["ansi","ansi","ansi256","ansi16m"],rt=Object.create(null),V_=(e,t={})=>{if(t.level&&!(Number.isInteger(t.level)&&t.level>=0&&t.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");let r=Cd?Cd.level:0;e.level=t.level===void 0?r:t.level};var B_=e=>{let t=(...r)=>r.join(" ");return V_(t,e),Object.setPrototypeOf(t,qt.prototype),t};function qt(e){return B_(e)}Object.setPrototypeOf(qt.prototype,Function.prototype);for(let[e,t]of Object.entries(ae))rt[e]={get(){let r=Gn(this,lo(t.open,t.close,this[nt]),this[Wt]);return Object.defineProperty(this,e,{value:r}),r}};rt.visible={get(){let e=Gn(this,this[nt],!0);return Object.defineProperty(this,"visible",{value:e}),e}};var uo=(e,t,r,...o)=>e==="rgb"?t==="ansi16m"?ae[r].ansi16m(...o):t==="ansi256"?ae[r].ansi256(ae.rgbToAnsi256(...o)):ae[r].ansi(ae.rgbToAnsi(...o)):e==="hex"?uo("rgb",t,r,...ae.hexToRgb(...o)):ae[r][e](...o),H_=["rgb","hex","ansi256"];for(let e of H_){rt[e]={get(){let{level:r}=this;return function(...o){let n=lo(uo(e,Dd[r],"color",...o),ae.color.close,this[nt]);return Gn(this,n,this[Wt])}}};let t="bg"+e[0].toUpperCase()+e.slice(1);rt[t]={get(){let{level:r}=this;return function(...o){let n=lo(uo(e,Dd[r],"bgColor",...o),ae.bgColor.close,this[nt]);return Gn(this,n,this[Wt])}}}}var G_=Object.defineProperties(()=>{},{...rt,level:{enumerable:!0,get(){return this[co].level},set(e){this[co].level=e}}}),lo=(e,t,r)=>{let o,n;return r===void 0?(o=e,n=t):(o=r.openAll+e,n=t+r.closeAll),{open:e,close:t,openAll:o,closeAll:n,parent:r}},Gn=(e,t,r)=>{let o=(...n)=>K_(o,n.length===1?""+n[0]:n.join(" "));return Object.setPrototypeOf(o,G_),o[co]=e,o[nt]=t,o[Wt]=r,o},K_=(e,t)=>{if(e.level<=0||!t)return e[Wt]?"":t;let r=e[nt];if(r===void 0)return t;let{openAll:o,closeAll:n}=r;if(t.includes("\x1B"))for(;r!==void 0;)t=Ad(t,r.close,r.open),r=r.parent;let i=t.indexOf(`
33
- `);return i!==-1&&(t=Nd(t,n,o,i)),o+t+n};Object.defineProperties(qt.prototype,rt);var W_=qt(),NI=qt({level:Rd?Rd.level:0});var U=W_;var zd;function Ud(e){zd=Kn(e)}function ke(){return zd??Kn(void 0)}function jd(){return ke()==="json"}function Ld(e){jd()||console.log(U.green(`\u2713 ${e}`))}function Jt(e){jd()||console.log(U.dim(e))}function mo(){return process.stdout.isTTY===!0}function Kn(e){return e==="json"||e==="table"?e:mo()?"table":"json"}var a={};ye(a,{$brand:()=>fo,$input:()=>Ds,$output:()=>Rs,NEVER:()=>po,TimePrecision:()=>Ls,ZodAny:()=>Ou,ZodArray:()=>Nu,ZodBase64:()=>yi,ZodBase64URL:()=>xi,ZodBigInt:()=>Rt,ZodBigIntFormat:()=>$i,ZodBoolean:()=>Ct,ZodCIDRv4:()=>vi,ZodCIDRv6:()=>bi,ZodCUID:()=>di,ZodCUID2:()=>mi,ZodCatch:()=>el,ZodCodec:()=>Pn,ZodCustom:()=>An,ZodCustomStringFormat:()=>At,ZodDate:()=>In,ZodDefault:()=>Wu,ZodDiscriminatedUnion:()=>Ru,ZodE164:()=>ki,ZodEmail:()=>ci,ZodEmoji:()=>ui,ZodEnum:()=>Tt,ZodError:()=>Iy,ZodExactOptional:()=>Hu,ZodFile:()=>Vu,ZodFirstPartyTypeKind:()=>pl,ZodFunction:()=>ll,ZodGUID:()=>yn,ZodIPv4:()=>hi,ZodIPv6:()=>_i,ZodISODate:()=>ni,ZodISODateTime:()=>ti,ZodISODuration:()=>ii,ZodISOTime:()=>ri,ZodIntersection:()=>Du,ZodIssueCode:()=>wy,ZodJWT:()=>Si,ZodKSUID:()=>gi,ZodLazy:()=>sl,ZodLiteral:()=>Zu,ZodMAC:()=>xu,ZodMap:()=>Mu,ZodNaN:()=>nl,ZodNanoID:()=>li,ZodNever:()=>Pu,ZodNonOptional:()=>Pi,ZodNull:()=>Eu,ZodNullable:()=>Ku,ZodNumber:()=>Nt,ZodNumberFormat:()=>Ye,ZodObject:()=>wn,ZodOptional:()=>Ti,ZodPipe:()=>Tn,ZodPrefault:()=>Ju,ZodPreprocess:()=>rl,ZodPromise:()=>ul,ZodReadonly:()=>il,ZodRealError:()=>Q,ZodRecord:()=>Ot,ZodSet:()=>Fu,ZodString:()=>Pt,ZodStringFormat:()=>D,ZodSuccess:()=>Qu,ZodSymbol:()=>$u,ZodTemplateLiteral:()=>al,ZodTransform:()=>Bu,ZodTuple:()=>Uu,ZodType:()=>I,ZodULID:()=>pi,ZodURL:()=>$n,ZodUUID:()=>ve,ZodUndefined:()=>Iu,ZodUnion:()=>On,ZodUnknown:()=>Tu,ZodVoid:()=>Au,ZodXID:()=>fi,ZodXor:()=>Cu,_ZodString:()=>si,_default:()=>qu,_function:()=>Of,any:()=>of,array:()=>En,base64:()=>Fp,base64url:()=>Zp,bigint:()=>Qp,boolean:()=>Su,catch:()=>tl,check:()=>Tf,cidrv4:()=>Lp,cidrv6:()=>Mp,clone:()=>K,codec:()=>$f,coerce:()=>fl,config:()=>F,core:()=>Ie,cuid:()=>Ap,cuid2:()=>Np,custom:()=>Pf,date:()=>sf,decode:()=>fu,decodeAsync:()=>hu,describe:()=>Af,discriminatedUnion:()=>pf,e164:()=>Vp,email:()=>xp,emoji:()=>Tp,encode:()=>pu,encodeAsync:()=>gu,endsWith:()=>vt,enum:()=>wi,exactOptional:()=>Gu,file:()=>yf,flattenError:()=>an,float32:()=>qp,float64:()=>Jp,formatError:()=>sn,fromJSONSchema:()=>jf,function:()=>Of,getErrorMap:()=>Ty,globalRegistry:()=>B,gt:()=>he,gte:()=>q,guid:()=>kp,hash:()=>Wp,hex:()=>Kp,hostname:()=>Gp,httpUrl:()=>Op,includes:()=>ht,instanceof:()=>Cf,int:()=>oi,int32:()=>Yp,int64:()=>ef,intersection:()=>zu,invertCodec:()=>If,ipv4:()=>zp,ipv6:()=>jp,iso:()=>wt,json:()=>Df,jwt:()=>Bp,keyof:()=>cf,ksuid:()=>Dp,lazy:()=>cl,length:()=>qe,literal:()=>bf,locales:()=>gn,looseObject:()=>df,looseRecord:()=>gf,lowercase:()=>ft,lt:()=>ge,lte:()=>ne,mac:()=>Up,map:()=>hf,maxLength:()=>We,maxSize:()=>Re,meta:()=>Nf,mime:()=>bt,minLength:()=>$e,minSize:()=>_e,multipleOf:()=>Ce,nan:()=>Sf,nanoid:()=>Pp,nativeEnum:()=>vf,negative:()=>Hr,never:()=>Ii,nonnegative:()=>Kr,nonoptional:()=>Xu,nonpositive:()=>Gr,normalize:()=>yt,null:()=>wu,nullable:()=>kn,nullish:()=>xf,number:()=>ku,object:()=>uf,optional:()=>xn,overwrite:()=>ce,parse:()=>uu,parseAsync:()=>lu,partialRecord:()=>ff,pipe:()=>ai,positive:()=>Br,prefault:()=>Yu,preprocess:()=>zf,prettifyError:()=>wo,promise:()=>wf,property:()=>Wr,readonly:()=>ol,record:()=>Lu,refine:()=>dl,regex:()=>pt,regexes:()=>te,registry:()=>Sr,safeDecode:()=>vu,safeDecodeAsync:()=>yu,safeEncode:()=>_u,safeEncodeAsync:()=>bu,safeParse:()=>du,safeParseAsync:()=>mu,set:()=>_f,setErrorMap:()=>Oy,size:()=>Ke,slugify:()=>$t,startsWith:()=>_t,strictObject:()=>lf,string:()=>bn,stringFormat:()=>Hp,stringbool:()=>Rf,success:()=>kf,superRefine:()=>ml,symbol:()=>nf,templateLiteral:()=>Ef,toJSONSchema:()=>Xr,toLowerCase:()=>kt,toUpperCase:()=>St,transform:()=>Oi,treeifyError:()=>Eo,trim:()=>xt,tuple:()=>ju,uint32:()=>Xp,uint64:()=>tf,ulid:()=>Cp,undefined:()=>rf,union:()=>Ei,unknown:()=>Je,uppercase:()=>gt,url:()=>wp,util:()=>b,uuid:()=>Sp,uuidv4:()=>$p,uuidv6:()=>Ip,uuidv7:()=>Ep,void:()=>af,xid:()=>Rp,xor:()=>mf});var Ie={};ye(Ie,{$ZodAny:()=>ns,$ZodArray:()=>ss,$ZodAsyncError:()=>se,$ZodBase64:()=>Ga,$ZodBase64URL:()=>Ka,$ZodBigInt:()=>gr,$ZodBigIntFormat:()=>Xa,$ZodBoolean:()=>dn,$ZodCIDRv4:()=>Va,$ZodCIDRv6:()=>Ba,$ZodCUID:()=>Aa,$ZodCUID2:()=>Na,$ZodCatch:()=>Is,$ZodCheck:()=>z,$ZodCheckBigIntFormat:()=>sa,$ZodCheckEndsWith:()=>ba,$ZodCheckGreaterThan:()=>ur,$ZodCheckIncludes:()=>_a,$ZodCheckLengthEquals:()=>pa,$ZodCheckLessThan:()=>cr,$ZodCheckLowerCase:()=>ga,$ZodCheckMaxLength:()=>da,$ZodCheckMaxSize:()=>ca,$ZodCheckMimeType:()=>xa,$ZodCheckMinLength:()=>ma,$ZodCheckMinSize:()=>ua,$ZodCheckMultipleOf:()=>oa,$ZodCheckNumberFormat:()=>aa,$ZodCheckOverwrite:()=>ka,$ZodCheckProperty:()=>ya,$ZodCheckRegex:()=>fa,$ZodCheckSizeEquals:()=>la,$ZodCheckStartsWith:()=>va,$ZodCheckStringFormat:()=>dt,$ZodCheckUpperCase:()=>ha,$ZodCodec:()=>pn,$ZodCustom:()=>Cs,$ZodCustomStringFormat:()=>Ja,$ZodDate:()=>as,$ZodDefault:()=>xs,$ZodDiscriminatedUnion:()=>ls,$ZodE164:()=>Wa,$ZodEmail:()=>wa,$ZodEmoji:()=>Ta,$ZodEncodeError:()=>Oe,$ZodEnum:()=>gs,$ZodError:()=>on,$ZodExactOptional:()=>bs,$ZodFile:()=>_s,$ZodFunction:()=>Ps,$ZodGUID:()=>Ia,$ZodIPv4:()=>Ma,$ZodIPv6:()=>Fa,$ZodISODate:()=>Ua,$ZodISODateTime:()=>za,$ZodISODuration:()=>La,$ZodISOTime:()=>ja,$ZodIntersection:()=>ds,$ZodJWT:()=>qa,$ZodKSUID:()=>Da,$ZodLazy:()=>Ns,$ZodLiteral:()=>hs,$ZodMAC:()=>Za,$ZodMap:()=>ps,$ZodNaN:()=>Es,$ZodNanoID:()=>Pa,$ZodNever:()=>is,$ZodNonOptional:()=>Ss,$ZodNull:()=>ts,$ZodNullable:()=>ys,$ZodNumber:()=>fr,$ZodNumberFormat:()=>Ya,$ZodObject:()=>hm,$ZodObjectJIT:()=>cs,$ZodOptional:()=>_r,$ZodPipe:()=>vr,$ZodPrefault:()=>ks,$ZodPreprocess:()=>ws,$ZodPromise:()=>As,$ZodReadonly:()=>Os,$ZodRealError:()=>X,$ZodRecord:()=>ms,$ZodRegistry:()=>kr,$ZodSet:()=>fs,$ZodString:()=>Ge,$ZodStringFormat:()=>R,$ZodSuccess:()=>$s,$ZodSymbol:()=>Qa,$ZodTemplateLiteral:()=>Ts,$ZodTransform:()=>vs,$ZodTuple:()=>hr,$ZodType:()=>$,$ZodULID:()=>Ca,$ZodURL:()=>Oa,$ZodUUID:()=>Ea,$ZodUndefined:()=>es,$ZodUnion:()=>mn,$ZodUnknown:()=>rs,$ZodVoid:()=>os,$ZodXID:()=>Ra,$ZodXor:()=>us,$brand:()=>fo,$constructor:()=>p,$input:()=>Ds,$output:()=>Rs,Doc:()=>ln,JSONSchema:()=>vp,JSONSchemaGenerator:()=>Qr,NEVER:()=>po,TimePrecision:()=>Ls,_any:()=>ac,_array:()=>pc,_base64:()=>Mr,_base64url:()=>Fr,_bigint:()=>Qs,_boolean:()=>Ys,_catch:()=>_y,_check:()=>_p,_cidrv4:()=>jr,_cidrv6:()=>Lr,_coercedBigint:()=>ec,_coercedBoolean:()=>Xs,_coercedDate:()=>dc,_coercedNumber:()=>Hs,_coercedString:()=>Us,_cuid:()=>Ar,_cuid2:()=>Nr,_custom:()=>gc,_date:()=>lc,_decode:()=>Qn,_decodeAsync:()=>tr,_default:()=>fy,_discriminatedUnion:()=>ny,_e164:()=>Zr,_email:()=>$r,_emoji:()=>Tr,_encode:()=>Xn,_encodeAsync:()=>er,_endsWith:()=>vt,_enum:()=>cy,_file:()=>fc,_float32:()=>Ks,_float64:()=>Ws,_gt:()=>he,_gte:()=>q,_guid:()=>hn,_includes:()=>ht,_int:()=>Gs,_int32:()=>qs,_int64:()=>tc,_intersection:()=>ry,_ipv4:()=>zr,_ipv6:()=>Ur,_isoDate:()=>Fs,_isoDateTime:()=>Ms,_isoDuration:()=>Vs,_isoTime:()=>Zs,_jwt:()=>Vr,_ksuid:()=>Dr,_lazy:()=>xy,_length:()=>qe,_literal:()=>ly,_lowercase:()=>ft,_lt:()=>ge,_lte:()=>ne,_mac:()=>js,_map:()=>ay,_max:()=>ne,_maxLength:()=>We,_maxSize:()=>Re,_mime:()=>bt,_min:()=>q,_minLength:()=>$e,_minSize:()=>_e,_multipleOf:()=>Ce,_nan:()=>mc,_nanoid:()=>Pr,_nativeEnum:()=>uy,_negative:()=>Hr,_never:()=>cc,_nonnegative:()=>Kr,_nonoptional:()=>gy,_nonpositive:()=>Gr,_normalize:()=>yt,_null:()=>oc,_nullable:()=>py,_number:()=>Bs,_optional:()=>my,_overwrite:()=>ce,_parse:()=>st,_parseAsync:()=>ct,_pipe:()=>vy,_positive:()=>Br,_promise:()=>ky,_property:()=>Wr,_readonly:()=>by,_record:()=>oy,_refine:()=>hc,_regex:()=>pt,_safeDecode:()=>rr,_safeDecodeAsync:()=>or,_safeEncode:()=>nr,_safeEncodeAsync:()=>ir,_safeParse:()=>ut,_safeParseAsync:()=>lt,_set:()=>sy,_size:()=>Ke,_slugify:()=>$t,_startsWith:()=>_t,_string:()=>zs,_stringFormat:()=>It,_stringbool:()=>yc,_success:()=>hy,_superRefine:()=>_c,_symbol:()=>rc,_templateLiteral:()=>yy,_toLowerCase:()=>kt,_toUpperCase:()=>St,_transform:()=>dy,_trim:()=>xt,_tuple:()=>iy,_uint32:()=>Js,_uint64:()=>nc,_ulid:()=>Cr,_undefined:()=>ic,_union:()=>ey,_unknown:()=>sc,_uppercase:()=>gt,_url:()=>_n,_uuid:()=>Ir,_uuidv4:()=>Er,_uuidv6:()=>wr,_uuidv7:()=>Or,_void:()=>uc,_xid:()=>Rr,_xor:()=>ty,clone:()=>K,config:()=>F,createStandardJSONSchemaMethod:()=>Et,createToJSONSchemaMethod:()=>xc,decode:()=>kv,decodeAsync:()=>$v,describe:()=>vc,encode:()=>xv,encodeAsync:()=>Sv,extractDefs:()=>ze,finalize:()=>Ue,flattenError:()=>an,formatError:()=>sn,globalConfig:()=>Ve,globalRegistry:()=>B,initializeContext:()=>De,isValidBase64:()=>Ha,isValidBase64URL:()=>mm,isValidJWT:()=>pm,locales:()=>gn,meta:()=>bc,parse:()=>Jn,parseAsync:()=>Yn,prettifyError:()=>wo,process:()=>N,regexes:()=>te,registry:()=>Sr,safeDecode:()=>Ev,safeDecodeAsync:()=>Ov,safeEncode:()=>Iv,safeEncodeAsync:()=>wv,safeParse:()=>Oo,safeParseAsync:()=>To,toDotPath:()=>Hd,toJSONSchema:()=>Xr,treeifyError:()=>Eo,util:()=>b,version:()=>Sa});var Md,po=Object.freeze({status:"aborted"});function p(e,t,r){function o(c,u){if(c._zod||Object.defineProperty(c,"_zod",{value:{def:u,constr:s,traits:new Set},enumerable:!1}),c._zod.traits.has(e))return;c._zod.traits.add(e),t(c,u);let l=s.prototype,d=Object.keys(l);for(let m=0;m<d.length;m++){let g=d[m];g in c||(c[g]=l[g].bind(c))}}let n=r?.Parent??Object;class i extends n{}Object.defineProperty(i,"name",{value:e});function s(c){var u;let l=r?.Parent?new i:this;o(l,c),(u=l._zod).deferred??(u.deferred=[]);for(let d of l._zod.deferred)d();return l}return Object.defineProperty(s,"init",{value:o}),Object.defineProperty(s,Symbol.hasInstance,{value:c=>r?.Parent&&c instanceof r.Parent?!0:c?._zod?.traits?.has(e)}),Object.defineProperty(s,"name",{value:e}),s}var fo=Symbol("zod_brand"),se=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},Oe=class extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}};(Md=globalThis).__zod_globalConfig??(Md.__zod_globalConfig={});var Ve=globalThis.__zod_globalConfig;function F(e){return e&&Object.assign(Ve,e),Ve}var b={};ye(b,{BIGINT_FORMAT_RANGES:()=>$o,Class:()=>ho,NUMBER_FORMAT_RANGES:()=>So,aborted:()=>Ne,allowsEval:()=>bo,assert:()=>Q_,assertEqual:()=>q_,assertIs:()=>Y_,assertNever:()=>X_,assertNotEqual:()=>J_,assignProp:()=>Pe,base64ToUint8Array:()=>Zd,base64urlToUint8Array:()=>hv,cached:()=>ot,captureStackTrace:()=>qn,cleanEnum:()=>gv,cleanRegex:()=>en,clone:()=>K,cloneDef:()=>tv,createTransparentProxy:()=>sv,defineLazy:()=>E,esc:()=>Wn,escapeRegex:()=>oe,explicitlyAborted:()=>Io,extend:()=>lv,finalizeIssue:()=>W,floatSafeRemainder:()=>_o,getElementAtPath:()=>nv,getEnumValues:()=>Qt,getLengthableOrigin:()=>rn,getParsedType:()=>av,getSizableOrigin:()=>nn,hexToUint8Array:()=>vv,isObject:()=>Be,isPlainObject:()=>Ae,issue:()=>at,joinValues:()=>f,jsonStringifyReplacer:()=>it,merge:()=>mv,mergeDefs:()=>Se,normalizeParams:()=>y,nullish:()=>Te,numKeys:()=>ov,objectClone:()=>ev,omit:()=>uv,optionalKeys:()=>ko,parsedType:()=>v,partial:()=>pv,pick:()=>cv,prefixIssues:()=>Y,primitiveTypes:()=>xo,promiseAllObject:()=>rv,propertyKeyTypes:()=>tn,randomString:()=>iv,required:()=>fv,safeExtend:()=>dv,shallowClone:()=>yo,slugify:()=>vo,stringifyPrimitive:()=>_,uint8ArrayToBase64:()=>Vd,uint8ArrayToBase64url:()=>_v,uint8ArrayToHex:()=>bv,unwrapMessage:()=>Xt});function q_(e){return e}function J_(e){return e}function Y_(e){}function X_(e){throw new Error("Unexpected value in exhaustive check")}function Q_(e){}function Qt(e){let t=Object.values(e).filter(o=>typeof o=="number");return Object.entries(e).filter(([o,n])=>t.indexOf(+o)===-1).map(([o,n])=>n)}function f(e,t="|"){return e.map(r=>_(r)).join(t)}function it(e,t){return typeof t=="bigint"?t.toString():t}function ot(e){return{get value(){{let r=e();return Object.defineProperty(this,"value",{value:r}),r}throw new Error("cached value already set")}}}function Te(e){return e==null}function en(e){let t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}function _o(e,t){let r=e/t,o=Math.round(r),n=Number.EPSILON*Math.max(Math.abs(r),1);return Math.abs(r-o)<n?0:r-o}var Fd=Symbol("evaluating");function E(e,t,r){let o;Object.defineProperty(e,t,{get(){if(o!==Fd)return o===void 0&&(o=Fd,o=r()),o},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function ev(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function Pe(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}function Se(...e){let t={};for(let r of e){let o=Object.getOwnPropertyDescriptors(r);Object.assign(t,o)}return Object.defineProperties({},t)}function tv(e){return Se(e._zod.def)}function nv(e,t){return t?t.reduce((r,o)=>r?.[o],e):e}function rv(e){let t=Object.keys(e),r=t.map(o=>e[o]);return Promise.all(r).then(o=>{let n={};for(let i=0;i<t.length;i++)n[t[i]]=o[i];return n})}function iv(e=10){let t="abcdefghijklmnopqrstuvwxyz",r="";for(let o=0;o<e;o++)r+=t[Math.floor(Math.random()*t.length)];return r}function Wn(e){return JSON.stringify(e)}function vo(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}var qn="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Be(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}var bo=ot(()=>{if(Ve.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});function Ae(e){if(Be(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!="function")return!0;let r=t.prototype;return!(Be(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function yo(e){return Ae(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}function ov(e){let t=0;for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&t++;return t}var av=e=>{let t=typeof e;switch(t){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(e)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(e)?"array":e===null?"null":e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?"promise":typeof Map<"u"&&e instanceof Map?"map":typeof Set<"u"&&e instanceof Set?"set":typeof Date<"u"&&e instanceof Date?"date":typeof File<"u"&&e instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${t}`)}},tn=new Set(["string","number","symbol"]),xo=new Set(["string","number","bigint","boolean","symbol","undefined"]);function oe(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function K(e,t,r){let o=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(o._zod.parent=e),o}function y(e){let t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function sv(e){let t;return new Proxy({},{get(r,o,n){return t??(t=e()),Reflect.get(t,o,n)},set(r,o,n,i){return t??(t=e()),Reflect.set(t,o,n,i)},has(r,o){return t??(t=e()),Reflect.has(t,o)},deleteProperty(r,o){return t??(t=e()),Reflect.deleteProperty(t,o)},ownKeys(r){return t??(t=e()),Reflect.ownKeys(t)},getOwnPropertyDescriptor(r,o){return t??(t=e()),Reflect.getOwnPropertyDescriptor(t,o)},defineProperty(r,o,n){return t??(t=e()),Reflect.defineProperty(t,o,n)}})}function _(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function ko(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}var So={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]},$o={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function cv(e,t){let r=e._zod.def,o=r.checks;if(o&&o.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");let i=Se(e._zod.def,{get shape(){let s={};for(let c in t){if(!(c in r.shape))throw new Error(`Unrecognized key: "${c}"`);t[c]&&(s[c]=r.shape[c])}return Pe(this,"shape",s),s},checks:[]});return K(e,i)}function uv(e,t){let r=e._zod.def,o=r.checks;if(o&&o.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");let i=Se(e._zod.def,{get shape(){let s={...e._zod.def.shape};for(let c in t){if(!(c in r.shape))throw new Error(`Unrecognized key: "${c}"`);t[c]&&delete s[c]}return Pe(this,"shape",s),s},checks:[]});return K(e,i)}function lv(e,t){if(!Ae(t))throw new Error("Invalid input to extend: expected a plain object");let r=e._zod.def.checks;if(r&&r.length>0){let i=e._zod.def.shape;for(let s in t)if(Object.getOwnPropertyDescriptor(i,s)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let n=Se(e._zod.def,{get shape(){let i={...e._zod.def.shape,...t};return Pe(this,"shape",i),i}});return K(e,n)}function dv(e,t){if(!Ae(t))throw new Error("Invalid input to safeExtend: expected a plain object");let r=Se(e._zod.def,{get shape(){let o={...e._zod.def.shape,...t};return Pe(this,"shape",o),o}});return K(e,r)}function mv(e,t){if(e._zod.def.checks?.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");let r=Se(e._zod.def,{get shape(){let o={...e._zod.def.shape,...t._zod.def.shape};return Pe(this,"shape",o),o},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]});return K(e,r)}function pv(e,t,r){let n=t._zod.def.checks;if(n&&n.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");let s=Se(t._zod.def,{get shape(){let c=t._zod.def.shape,u={...c};if(r)for(let l in r){if(!(l in c))throw new Error(`Unrecognized key: "${l}"`);r[l]&&(u[l]=e?new e({type:"optional",innerType:c[l]}):c[l])}else for(let l in c)u[l]=e?new e({type:"optional",innerType:c[l]}):c[l];return Pe(this,"shape",u),u},checks:[]});return K(t,s)}function fv(e,t,r){let o=Se(t._zod.def,{get shape(){let n=t._zod.def.shape,i={...n};if(r)for(let s in r){if(!(s in i))throw new Error(`Unrecognized key: "${s}"`);r[s]&&(i[s]=new e({type:"nonoptional",innerType:n[s]}))}else for(let s in n)i[s]=new e({type:"nonoptional",innerType:n[s]});return Pe(this,"shape",i),i}});return K(t,o)}function Ne(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue!==!0)return!0;return!1}function Io(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue===!1)return!0;return!1}function Y(e,t){return t.map(r=>{var o;return(o=r).path??(o.path=[]),r.path.unshift(e),r})}function Xt(e){return typeof e=="string"?e:e?.message}function W(e,t,r){let o=e.message?e.message:Xt(e.inst?._zod.def?.error?.(e))??Xt(t?.error?.(e))??Xt(r.customError?.(e))??Xt(r.localeError?.(e))??"Invalid input",{inst:n,continue:i,input:s,...c}=e;return c.path??(c.path=[]),c.message=o,t?.reportInput&&(c.input=s),c}function nn(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function rn(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function v(e){let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"nan":"number";case"object":{if(e===null)return"null";if(Array.isArray(e))return"array";let r=e;if(r&&Object.getPrototypeOf(r)!==Object.prototype&&"constructor"in r&&r.constructor)return r.constructor.name}}return t}function at(...e){let[t,r,o]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:o}:{...t}}function gv(e){return Object.entries(e).filter(([t,r])=>Number.isNaN(Number.parseInt(t,10))).map(t=>t[1])}function Zd(e){let t=atob(e),r=new Uint8Array(t.length);for(let o=0;o<t.length;o++)r[o]=t.charCodeAt(o);return r}function Vd(e){let t="";for(let r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return btoa(t)}function hv(e){let t=e.replace(/-/g,"+").replace(/_/g,"/"),r="=".repeat((4-t.length%4)%4);return Zd(t+r)}function _v(e){return Vd(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function vv(e){let t=e.replace(/^0x/,"");if(t.length%2!==0)throw new Error("Invalid hex string length");let r=new Uint8Array(t.length/2);for(let o=0;o<t.length;o+=2)r[o/2]=Number.parseInt(t.slice(o,o+2),16);return r}function bv(e){return Array.from(e).map(t=>t.toString(16).padStart(2,"0")).join("")}var ho=class{constructor(...t){}};var Bd=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,it,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},on=p("$ZodError",Bd),X=p("$ZodError",Bd,{Parent:Error});function an(e,t=r=>r.message){let r={},o=[];for(let n of e.issues)n.path.length>0?(r[n.path[0]]=r[n.path[0]]||[],r[n.path[0]].push(t(n))):o.push(t(n));return{formErrors:o,fieldErrors:r}}function sn(e,t=r=>r.message){let r={_errors:[]},o=(n,i=[])=>{for(let s of n.issues)if(s.code==="invalid_union"&&s.errors.length)s.errors.map(c=>o({issues:c},[...i,...s.path]));else if(s.code==="invalid_key")o({issues:s.issues},[...i,...s.path]);else if(s.code==="invalid_element")o({issues:s.issues},[...i,...s.path]);else{let c=[...i,...s.path];if(c.length===0)r._errors.push(t(s));else{let u=r,l=0;for(;l<c.length;){let d=c[l];l===c.length-1?(u[d]=u[d]||{_errors:[]},u[d]._errors.push(t(s))):u[d]=u[d]||{_errors:[]},u=u[d],l++}}}};return o(e),r}function Eo(e,t=r=>r.message){let r={errors:[]},o=(n,i=[])=>{var s,c;for(let u of n.issues)if(u.code==="invalid_union"&&u.errors.length)u.errors.map(l=>o({issues:l},[...i,...u.path]));else if(u.code==="invalid_key")o({issues:u.issues},[...i,...u.path]);else if(u.code==="invalid_element")o({issues:u.issues},[...i,...u.path]);else{let l=[...i,...u.path];if(l.length===0){r.errors.push(t(u));continue}let d=r,m=0;for(;m<l.length;){let g=l[m],h=m===l.length-1;typeof g=="string"?(d.properties??(d.properties={}),(s=d.properties)[g]??(s[g]={errors:[]}),d=d.properties[g]):(d.items??(d.items=[]),(c=d.items)[g]??(c[g]={errors:[]}),d=d.items[g]),h&&d.errors.push(t(u)),m++}}};return o(e),r}function Hd(e){let t=[],r=e.map(o=>typeof o=="object"?o.key:o);for(let o of r)typeof o=="number"?t.push(`[${o}]`):typeof o=="symbol"?t.push(`[${JSON.stringify(String(o))}]`):/[^\w$]/.test(o)?t.push(`[${JSON.stringify(o)}]`):(t.length&&t.push("."),t.push(o));return t.join("")}function wo(e){let t=[],r=[...e.issues].sort((o,n)=>(o.path??[]).length-(n.path??[]).length);for(let o of r)t.push(`\u2716 ${o.message}`),o.path?.length&&t.push(` \u2192 at ${Hd(o.path)}`);return t.join(`
34
- `)}var st=e=>(t,r,o,n)=>{let i=o?{...o,async:!1}:{async:!1},s=t._zod.run({value:r,issues:[]},i);if(s instanceof Promise)throw new se;if(s.issues.length){let c=new(n?.Err??e)(s.issues.map(u=>W(u,i,F())));throw qn(c,n?.callee),c}return s.value},Jn=st(X),ct=e=>async(t,r,o,n)=>{let i=o?{...o,async:!0}:{async:!0},s=t._zod.run({value:r,issues:[]},i);if(s instanceof Promise&&(s=await s),s.issues.length){let c=new(n?.Err??e)(s.issues.map(u=>W(u,i,F())));throw qn(c,n?.callee),c}return s.value},Yn=ct(X),ut=e=>(t,r,o)=>{let n=o?{...o,async:!1}:{async:!1},i=t._zod.run({value:r,issues:[]},n);if(i instanceof Promise)throw new se;return i.issues.length?{success:!1,error:new(e??on)(i.issues.map(s=>W(s,n,F())))}:{success:!0,data:i.value}},Oo=ut(X),lt=e=>async(t,r,o)=>{let n=o?{...o,async:!0}:{async:!0},i=t._zod.run({value:r,issues:[]},n);return i instanceof Promise&&(i=await i),i.issues.length?{success:!1,error:new e(i.issues.map(s=>W(s,n,F())))}:{success:!0,data:i.value}},To=lt(X),Xn=e=>(t,r,o)=>{let n=o?{...o,direction:"backward"}:{direction:"backward"};return st(e)(t,r,n)},xv=Xn(X),Qn=e=>(t,r,o)=>st(e)(t,r,o),kv=Qn(X),er=e=>async(t,r,o)=>{let n=o?{...o,direction:"backward"}:{direction:"backward"};return ct(e)(t,r,n)},Sv=er(X),tr=e=>async(t,r,o)=>ct(e)(t,r,o),$v=tr(X),nr=e=>(t,r,o)=>{let n=o?{...o,direction:"backward"}:{direction:"backward"};return ut(e)(t,r,n)},Iv=nr(X),rr=e=>(t,r,o)=>ut(e)(t,r,o),Ev=rr(X),ir=e=>async(t,r,o)=>{let n=o?{...o,direction:"backward"}:{direction:"backward"};return lt(e)(t,r,n)},wv=ir(X),or=e=>async(t,r,o)=>lt(e)(t,r,o),Ov=or(X);var te={};ye(te,{base64:()=>Ho,base64url:()=>ar,bigint:()=>Xo,boolean:()=>ea,browserEmail:()=>zv,cidrv4:()=>Vo,cidrv6:()=>Bo,cuid:()=>Po,cuid2:()=>Ao,date:()=>Wo,datetime:()=>Jo,domain:()=>Lv,duration:()=>zo,e164:()=>Ko,email:()=>jo,emoji:()=>Lo,extendedDuration:()=>Tv,guid:()=>Uo,hex:()=>Mv,hostname:()=>jv,html5Email:()=>Cv,httpProtocol:()=>Go,idnEmail:()=>Dv,integer:()=>Qo,ipv4:()=>Mo,ipv6:()=>Fo,ksuid:()=>Ro,lowercase:()=>ra,mac:()=>Zo,md5_base64:()=>Zv,md5_base64url:()=>Vv,md5_hex:()=>Fv,nanoid:()=>Do,null:()=>ta,number:()=>sr,rfc5322Email:()=>Rv,sha1_base64:()=>Hv,sha1_base64url:()=>Gv,sha1_hex:()=>Bv,sha256_base64:()=>Wv,sha256_base64url:()=>qv,sha256_hex:()=>Kv,sha384_base64:()=>Yv,sha384_base64url:()=>Xv,sha384_hex:()=>Jv,sha512_base64:()=>eb,sha512_base64url:()=>tb,sha512_hex:()=>Qv,string:()=>Yo,time:()=>qo,ulid:()=>No,undefined:()=>na,unicodeEmail:()=>Gd,uppercase:()=>ia,uuid:()=>He,uuid4:()=>Pv,uuid6:()=>Av,uuid7:()=>Nv,xid:()=>Co});var Po=/^[cC][0-9a-z]{6,}$/,Ao=/^[0-9a-z]+$/,No=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Co=/^[0-9a-vA-V]{20}$/,Ro=/^[A-Za-z0-9]{27}$/,Do=/^[a-zA-Z0-9_-]{21}$/,zo=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Tv=/^[-+]?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)?)??$/,Uo=/^([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})$/,He=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,Pv=He(4),Av=He(6),Nv=He(7),jo=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Cv=/^[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])?)*$/,Rv=/^(([^<>()\[\]\\.,;:\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,}))$/,Gd=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,Dv=Gd,zv=/^[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])?)*$/,Uv="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function Lo(){return new RegExp(Uv,"u")}var Mo=/^(?:(?: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])$/,Fo=/^(([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}|:))$/,Zo=e=>{let t=oe(e??":");return new RegExp(`^(?:[0-9A-F]{2}${t}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${t}){5}[0-9a-f]{2}$`)},Vo=/^((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])$/,Bo=/^(([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])$/,Ho=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,ar=/^[A-Za-z0-9_-]*$/,jv=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,Lv=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,Go=/^https?$/,Ko=/^\+[1-9]\d{6,14}$/,Kd="(?:(?:\\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])))",Wo=new RegExp(`^${Kd}$`);function Wd(e){let t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function qo(e){return new RegExp(`^${Wd(e)}$`)}function Jo(e){let t=Wd({precision:e.precision}),r=["Z"];e.local&&r.push(""),e.offset&&r.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let o=`${t}(?:${r.join("|")})`;return new RegExp(`^${Kd}T(?:${o})$`)}var Yo=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},Xo=/^-?\d+n?$/,Qo=/^-?\d+$/,sr=/^-?\d+(?:\.\d+)?$/,ea=/^(?:true|false)$/i,ta=/^null$/i;var na=/^undefined$/i;var ra=/^[^A-Z]*$/,ia=/^[^a-z]*$/,Mv=/^[0-9a-fA-F]*$/;function cn(e,t){return new RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}function un(e){return new RegExp(`^[A-Za-z0-9_-]{${e}}$`)}var Fv=/^[0-9a-fA-F]{32}$/,Zv=cn(22,"=="),Vv=un(22),Bv=/^[0-9a-fA-F]{40}$/,Hv=cn(27,"="),Gv=un(27),Kv=/^[0-9a-fA-F]{64}$/,Wv=cn(43,"="),qv=un(43),Jv=/^[0-9a-fA-F]{96}$/,Yv=cn(64,""),Xv=un(64),Qv=/^[0-9a-fA-F]{128}$/,eb=cn(86,"=="),tb=un(86);var z=p("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),Jd={number:"number",bigint:"bigint",object:"date"},cr=p("$ZodCheckLessThan",(e,t)=>{z.init(e,t);let r=Jd[typeof t.value];e._zod.onattach.push(o=>{let n=o._zod.bag,i=(t.inclusive?n.maximum:n.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<i&&(t.inclusive?n.maximum=t.value:n.exclusiveMaximum=t.value)}),e._zod.check=o=>{(t.inclusive?o.value<=t.value:o.value<t.value)||o.issues.push({origin:r,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:o.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),ur=p("$ZodCheckGreaterThan",(e,t)=>{z.init(e,t);let r=Jd[typeof t.value];e._zod.onattach.push(o=>{let n=o._zod.bag,i=(t.inclusive?n.minimum:n.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>i&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value)}),e._zod.check=o=>{(t.inclusive?o.value>=t.value:o.value>t.value)||o.issues.push({origin:r,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:o.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),oa=p("$ZodCheckMultipleOf",(e,t)=>{z.init(e,t),e._zod.onattach.push(r=>{var o;(o=r._zod.bag).multipleOf??(o.multipleOf=t.value)}),e._zod.check=r=>{if(typeof r.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof r.value=="bigint"?r.value%t.value===BigInt(0):_o(r.value,t.value)===0)||r.issues.push({origin:typeof r.value,code:"not_multiple_of",divisor:t.value,input:r.value,inst:e,continue:!t.abort})}}),aa=p("$ZodCheckNumberFormat",(e,t)=>{z.init(e,t),t.format=t.format||"float64";let r=t.format?.includes("int"),o=r?"int":"number",[n,i]=So[t.format];e._zod.onattach.push(s=>{let c=s._zod.bag;c.format=t.format,c.minimum=n,c.maximum=i,r&&(c.pattern=Qo)}),e._zod.check=s=>{let c=s.value;if(r){if(!Number.isInteger(c)){s.issues.push({expected:o,format:t.format,code:"invalid_type",continue:!1,input:c,inst:e});return}if(!Number.isSafeInteger(c)){c>0?s.issues.push({input:c,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:o,inclusive:!0,continue:!t.abort}):s.issues.push({input:c,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:o,inclusive:!0,continue:!t.abort});return}}c<n&&s.issues.push({origin:"number",input:c,code:"too_small",minimum:n,inclusive:!0,inst:e,continue:!t.abort}),c>i&&s.issues.push({origin:"number",input:c,code:"too_big",maximum:i,inclusive:!0,inst:e,continue:!t.abort})}}),sa=p("$ZodCheckBigIntFormat",(e,t)=>{z.init(e,t);let[r,o]=$o[t.format];e._zod.onattach.push(n=>{let i=n._zod.bag;i.format=t.format,i.minimum=r,i.maximum=o}),e._zod.check=n=>{let i=n.value;i<r&&n.issues.push({origin:"bigint",input:i,code:"too_small",minimum:r,inclusive:!0,inst:e,continue:!t.abort}),i>o&&n.issues.push({origin:"bigint",input:i,code:"too_big",maximum:o,inclusive:!0,inst:e,continue:!t.abort})}}),ca=p("$ZodCheckMaxSize",(e,t)=>{var r;z.init(e,t),(r=e._zod.def).when??(r.when=o=>{let n=o.value;return!Te(n)&&n.size!==void 0}),e._zod.onattach.push(o=>{let n=o._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<n&&(o._zod.bag.maximum=t.maximum)}),e._zod.check=o=>{let n=o.value;n.size<=t.maximum||o.issues.push({origin:nn(n),code:"too_big",maximum:t.maximum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),ua=p("$ZodCheckMinSize",(e,t)=>{var r;z.init(e,t),(r=e._zod.def).when??(r.when=o=>{let n=o.value;return!Te(n)&&n.size!==void 0}),e._zod.onattach.push(o=>{let n=o._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>n&&(o._zod.bag.minimum=t.minimum)}),e._zod.check=o=>{let n=o.value;n.size>=t.minimum||o.issues.push({origin:nn(n),code:"too_small",minimum:t.minimum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),la=p("$ZodCheckSizeEquals",(e,t)=>{var r;z.init(e,t),(r=e._zod.def).when??(r.when=o=>{let n=o.value;return!Te(n)&&n.size!==void 0}),e._zod.onattach.push(o=>{let n=o._zod.bag;n.minimum=t.size,n.maximum=t.size,n.size=t.size}),e._zod.check=o=>{let n=o.value,i=n.size;if(i===t.size)return;let s=i>t.size;o.issues.push({origin:nn(n),...s?{code:"too_big",maximum:t.size}:{code:"too_small",minimum:t.size},inclusive:!0,exact:!0,input:o.value,inst:e,continue:!t.abort})}}),da=p("$ZodCheckMaxLength",(e,t)=>{var r;z.init(e,t),(r=e._zod.def).when??(r.when=o=>{let n=o.value;return!Te(n)&&n.length!==void 0}),e._zod.onattach.push(o=>{let n=o._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<n&&(o._zod.bag.maximum=t.maximum)}),e._zod.check=o=>{let n=o.value;if(n.length<=t.maximum)return;let s=rn(n);o.issues.push({origin:s,code:"too_big",maximum:t.maximum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),ma=p("$ZodCheckMinLength",(e,t)=>{var r;z.init(e,t),(r=e._zod.def).when??(r.when=o=>{let n=o.value;return!Te(n)&&n.length!==void 0}),e._zod.onattach.push(o=>{let n=o._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>n&&(o._zod.bag.minimum=t.minimum)}),e._zod.check=o=>{let n=o.value;if(n.length>=t.minimum)return;let s=rn(n);o.issues.push({origin:s,code:"too_small",minimum:t.minimum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),pa=p("$ZodCheckLengthEquals",(e,t)=>{var r;z.init(e,t),(r=e._zod.def).when??(r.when=o=>{let n=o.value;return!Te(n)&&n.length!==void 0}),e._zod.onattach.push(o=>{let n=o._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=o=>{let n=o.value,i=n.length;if(i===t.length)return;let s=rn(n),c=i>t.length;o.issues.push({origin:s,...c?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:o.value,inst:e,continue:!t.abort})}}),dt=p("$ZodCheckStringFormat",(e,t)=>{var r,o;z.init(e,t),e._zod.onattach.push(n=>{let i=n._zod.bag;i.format=t.format,t.pattern&&(i.patterns??(i.patterns=new Set),i.patterns.add(t.pattern))}),t.pattern?(r=e._zod).check??(r.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(o=e._zod).check??(o.check=()=>{})}),fa=p("$ZodCheckRegex",(e,t)=>{dt.init(e,t),e._zod.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),ga=p("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=ra),dt.init(e,t)}),ha=p("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=ia),dt.init(e,t)}),_a=p("$ZodCheckIncludes",(e,t)=>{z.init(e,t);let r=oe(t.includes),o=new RegExp(typeof t.position=="number"?`^.{${t.position}}${r}`:r);t.pattern=o,e._zod.onattach.push(n=>{let i=n._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(o)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),va=p("$ZodCheckStartsWith",(e,t)=>{z.init(e,t);let r=new RegExp(`^${oe(t.prefix)}.*`);t.pattern??(t.pattern=r),e._zod.onattach.push(o=>{let n=o._zod.bag;n.patterns??(n.patterns=new Set),n.patterns.add(r)}),e._zod.check=o=>{o.value.startsWith(t.prefix)||o.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:o.value,inst:e,continue:!t.abort})}}),ba=p("$ZodCheckEndsWith",(e,t)=>{z.init(e,t);let r=new RegExp(`.*${oe(t.suffix)}$`);t.pattern??(t.pattern=r),e._zod.onattach.push(o=>{let n=o._zod.bag;n.patterns??(n.patterns=new Set),n.patterns.add(r)}),e._zod.check=o=>{o.value.endsWith(t.suffix)||o.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:o.value,inst:e,continue:!t.abort})}});function qd(e,t,r){e.issues.length&&t.issues.push(...Y(r,e.issues))}var ya=p("$ZodCheckProperty",(e,t)=>{z.init(e,t),e._zod.check=r=>{let o=t.schema._zod.run({value:r.value[t.property],issues:[]},{});if(o instanceof Promise)return o.then(n=>qd(n,r,t.property));qd(o,r,t.property)}}),xa=p("$ZodCheckMimeType",(e,t)=>{z.init(e,t);let r=new Set(t.mime);e._zod.onattach.push(o=>{o._zod.bag.mime=t.mime}),e._zod.check=o=>{r.has(o.value.type)||o.issues.push({code:"invalid_value",values:t.mime,input:o.value.type,inst:e,continue:!t.abort})}}),ka=p("$ZodCheckOverwrite",(e,t)=>{z.init(e,t),e._zod.check=r=>{r.value=t.tx(r.value)}});var ln=class{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}let o=t.split(`
32
+ `,n)}while(o!==-1);return i+=e.slice(n),i}var{stdout:Fd,stderr:Md}=Ud,po=Symbol("GENERATOR"),ot=Symbol("STYLER"),Xt=Symbol("IS_EMPTY"),Zd=["ansi","ansi","ansi256","ansi16m"],at=Object.create(null),rv=(e,t={})=>{if(t.level&&!(Number.isInteger(t.level)&&t.level>=0&&t.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");let r=Fd?Fd.level:0;e.level=t.level===void 0?r:t.level};var iv=e=>{let t=(...r)=>r.join(" ");return rv(t,e),Object.setPrototypeOf(t,Qt.prototype),t};function Qt(e){return iv(e)}Object.setPrototypeOf(Qt.prototype,Function.prototype);for(let[e,t]of Object.entries(ue))at[e]={get(){let r=Wn(this,go(t.open,t.close,this[ot]),this[Xt]);return Object.defineProperty(this,e,{value:r}),r}};at.visible={get(){let e=Wn(this,this[ot],!0);return Object.defineProperty(this,"visible",{value:e}),e}};var fo=(e,t,r,...o)=>e==="rgb"?t==="ansi16m"?ue[r].ansi16m(...o):t==="ansi256"?ue[r].ansi256(ue.rgbToAnsi256(...o)):ue[r].ansi(ue.rgbToAnsi(...o)):e==="hex"?fo("rgb",t,r,...ue.hexToRgb(...o)):ue[r][e](...o),ov=["rgb","hex","ansi256"];for(let e of ov){at[e]={get(){let{level:r}=this;return function(...o){let n=go(fo(e,Zd[r],"color",...o),ue.color.close,this[ot]);return Wn(this,n,this[Xt])}}};let t="bg"+e[0].toUpperCase()+e.slice(1);at[t]={get(){let{level:r}=this;return function(...o){let n=go(fo(e,Zd[r],"bgColor",...o),ue.bgColor.close,this[ot]);return Wn(this,n,this[Xt])}}}}var av=Object.defineProperties(()=>{},{...at,level:{enumerable:!0,get(){return this[po].level},set(e){this[po].level=e}}}),go=(e,t,r)=>{let o,n;return r===void 0?(o=e,n=t):(o=r.openAll+e,n=t+r.closeAll),{open:e,close:t,openAll:o,closeAll:n,parent:r}},Wn=(e,t,r)=>{let o=(...n)=>sv(o,n.length===1?""+n[0]:n.join(" "));return Object.setPrototypeOf(o,av),o[po]=e,o[ot]=t,o[Xt]=r,o},sv=(e,t)=>{if(e.level<=0||!t)return e[Xt]?"":t;let r=e[ot];if(r===void 0)return t;let{openAll:o,closeAll:n}=r;if(t.includes("\x1B"))for(;r!==void 0;)t=jd(t,r.close,r.open),r=r.parent;let i=t.indexOf(`
33
+ `);return i!==-1&&(t=Ld(t,n,o,i)),o+t+n};Object.defineProperties(Qt.prototype,at);var cv=Qt(),UE=Qt({level:Md?Md.level:0});var j=cv;var Vd;function Bd(e){Vd=qn(e)}function le(){return Vd??qn(void 0)}function ho(){return le()==="json"}function Hd(e){ho()||console.log(j.green(`\u2713 ${e}`))}function Gd(e){ho()||console.error(j.red(`\u2717 ${e}`))}function He(e){ho()||console.log(j.dim(e))}function _o(){return process.stdout.isTTY===!0}function qn(e){return e==="json"||e==="table"?e:_o()?"table":"json"}var a={};Ie(a,{$brand:()=>bo,$input:()=>Fs,$output:()=>Ls,NEVER:()=>vo,TimePrecision:()=>Bs,ZodAny:()=>Nu,ZodArray:()=>Uu,ZodBase64:()=>ki,ZodBase64URL:()=>Si,ZodBigInt:()=>jt,ZodBigIntFormat:()=>Ei,ZodBoolean:()=>Ut,ZodCIDRv4:()=>yi,ZodCIDRv6:()=>xi,ZodCUID:()=>pi,ZodCUID2:()=>fi,ZodCatch:()=>ol,ZodCodec:()=>Cn,ZodCustom:()=>Nn,ZodCustomStringFormat:()=>Dt,ZodDate:()=>wn,ZodDefault:()=>Qu,ZodDiscriminatedUnion:()=>Lu,ZodE164:()=>$i,ZodEmail:()=>li,ZodEmoji:()=>di,ZodEnum:()=>Nt,ZodError:()=>Ly,ZodExactOptional:()=>Ju,ZodFile:()=>Wu,ZodFirstPartyTypeKind:()=>vl,ZodFunction:()=>gl,ZodGUID:()=>kn,ZodIPv4:()=>vi,ZodIPv6:()=>bi,ZodISODate:()=>ii,ZodISODateTime:()=>ri,ZodISODuration:()=>ai,ZodISOTime:()=>oi,ZodIntersection:()=>Fu,ZodIssueCode:()=>My,ZodJWT:()=>Ii,ZodKSUID:()=>_i,ZodLazy:()=>ml,ZodLiteral:()=>Ku,ZodMAC:()=>Eu,ZodMap:()=>Hu,ZodNaN:()=>sl,ZodNanoID:()=>mi,ZodNever:()=>Du,ZodNonOptional:()=>Ci,ZodNull:()=>Pu,ZodNullable:()=>Xu,ZodNumber:()=>zt,ZodNumberFormat:()=>et,ZodObject:()=>Tn,ZodOptional:()=>Pi,ZodPipe:()=>Pn,ZodPrefault:()=>tl,ZodPreprocess:()=>cl,ZodPromise:()=>fl,ZodReadonly:()=>ul,ZodRealError:()=>te,ZodRecord:()=>Ct,ZodSet:()=>Gu,ZodString:()=>Rt,ZodStringFormat:()=>z,ZodSuccess:()=>il,ZodSymbol:()=>Tu,ZodTemplateLiteral:()=>dl,ZodTransform:()=>qu,ZodTuple:()=>Zu,ZodType:()=>I,ZodULID:()=>gi,ZodURL:()=>En,ZodUUID:()=>Se,ZodUndefined:()=>Au,ZodUnion:()=>An,ZodUnknown:()=>Ru,ZodVoid:()=>zu,ZodXID:()=>hi,ZodXor:()=>ju,_ZodString:()=>ui,_default:()=>el,_function:()=>Df,any:()=>mf,array:()=>On,base64:()=>Wp,base64url:()=>qp,bigint:()=>sf,boolean:()=>Ou,catch:()=>al,check:()=>zf,cidrv4:()=>Gp,cidrv6:()=>Kp,clone:()=>q,codec:()=>Pf,coerce:()=>bl,config:()=>Z,core:()=>Te,cuid:()=>jp,cuid2:()=>Lp,custom:()=>Uf,date:()=>ff,decode:()=>bu,decodeAsync:()=>xu,describe:()=>jf,discriminatedUnion:()=>yf,e164:()=>Jp,email:()=>Op,emoji:()=>zp,encode:()=>vu,encodeAsync:()=>yu,endsWith:()=>kt,enum:()=>Ti,exactOptional:()=>Yu,file:()=>wf,flattenError:()=>cn,float32:()=>nf,float64:()=>rf,formatError:()=>un,fromJSONSchema:()=>Hf,function:()=>Df,getErrorMap:()=>Vy,globalRegistry:()=>G,gt:()=>xe,gte:()=>Y,guid:()=>Tp,hash:()=>tf,hex:()=>ef,hostname:()=>Qp,httpUrl:()=>Dp,includes:()=>yt,instanceof:()=>Ff,int:()=>si,int32:()=>of,int64:()=>cf,intersection:()=>Mu,invertCodec:()=>Cf,ipv4:()=>Vp,ipv6:()=>Hp,iso:()=>Pt,json:()=>Zf,jwt:()=>Yp,keyof:()=>gf,ksuid:()=>Zp,lazy:()=>pl,length:()=>Xe,literal:()=>Ef,locales:()=>_n,looseObject:()=>vf,looseRecord:()=>kf,lowercase:()=>vt,lt:()=>ye,lte:()=>oe,mac:()=>Bp,map:()=>Sf,maxLength:()=>Ye,maxSize:()=>je,meta:()=>Lf,mime:()=>St,minLength:()=>Oe,minSize:()=>ke,multipleOf:()=>Ue,nan:()=>Af,nanoid:()=>Up,nativeEnum:()=>If,negative:()=>Kr,never:()=>wi,nonnegative:()=>qr,nonoptional:()=>rl,nonpositive:()=>Wr,normalize:()=>$t,null:()=>Cu,nullable:()=>$n,nullish:()=>Of,number:()=>wu,object:()=>hf,optional:()=>Sn,overwrite:()=>me,parse:()=>fu,parseAsync:()=>gu,partialRecord:()=>xf,pipe:()=>ci,positive:()=>Gr,prefault:()=>nl,preprocess:()=>Vf,prettifyError:()=>Co,promise:()=>Rf,property:()=>Jr,readonly:()=>ll,record:()=>Bu,refine:()=>hl,regex:()=>_t,regexes:()=>ie,registry:()=>Ir,safeDecode:()=>Su,safeDecodeAsync:()=>Iu,safeEncode:()=>ku,safeEncodeAsync:()=>$u,safeParse:()=>hu,safeParseAsync:()=>_u,set:()=>$f,setErrorMap:()=>Zy,size:()=>Je,slugify:()=>Ot,startsWith:()=>xt,strictObject:()=>_f,string:()=>xn,stringFormat:()=>Xp,stringbool:()=>Mf,success:()=>Tf,superRefine:()=>_l,symbol:()=>lf,templateLiteral:()=>Nf,toJSONSchema:()=>ei,toLowerCase:()=>Et,toUpperCase:()=>wt,transform:()=>Ai,treeifyError:()=>Po,trim:()=>It,tuple:()=>Vu,uint32:()=>af,uint64:()=>uf,ulid:()=>Fp,undefined:()=>df,union:()=>Oi,unknown:()=>Qe,uppercase:()=>bt,url:()=>Rp,util:()=>b,uuid:()=>Ap,uuidv4:()=>Pp,uuidv6:()=>Cp,uuidv7:()=>Np,void:()=>pf,xid:()=>Mp,xor:()=>bf});var Te={};Ie(Te,{$ZodAny:()=>ss,$ZodArray:()=>ms,$ZodAsyncError:()=>de,$ZodBase64:()=>Ya,$ZodBase64URL:()=>Xa,$ZodBigInt:()=>_r,$ZodBigIntFormat:()=>rs,$ZodBoolean:()=>pn,$ZodCIDRv4:()=>Wa,$ZodCIDRv6:()=>qa,$ZodCUID:()=>za,$ZodCUID2:()=>Ua,$ZodCatch:()=>As,$ZodCheck:()=>U,$ZodCheckBigIntFormat:()=>ma,$ZodCheckEndsWith:()=>$a,$ZodCheckGreaterThan:()=>dr,$ZodCheckIncludes:()=>ka,$ZodCheckLengthEquals:()=>va,$ZodCheckLessThan:()=>lr,$ZodCheckLowerCase:()=>ya,$ZodCheckMaxLength:()=>ha,$ZodCheckMaxSize:()=>pa,$ZodCheckMimeType:()=>Ea,$ZodCheckMinLength:()=>_a,$ZodCheckMinSize:()=>fa,$ZodCheckMultipleOf:()=>la,$ZodCheckNumberFormat:()=>da,$ZodCheckOverwrite:()=>wa,$ZodCheckProperty:()=>Ia,$ZodCheckRegex:()=>ba,$ZodCheckSizeEquals:()=>ga,$ZodCheckStartsWith:()=>Sa,$ZodCheckStringFormat:()=>gt,$ZodCheckUpperCase:()=>xa,$ZodCodec:()=>gn,$ZodCustom:()=>js,$ZodCustomStringFormat:()=>ts,$ZodDate:()=>ds,$ZodDefault:()=>Es,$ZodDiscriminatedUnion:()=>gs,$ZodE164:()=>Qa,$ZodEmail:()=>Ca,$ZodEmoji:()=>Ra,$ZodEncodeError:()=>Ce,$ZodEnum:()=>ys,$ZodError:()=>sn,$ZodExactOptional:()=>$s,$ZodFile:()=>ks,$ZodFunction:()=>Ds,$ZodGUID:()=>Aa,$ZodIPv4:()=>Ha,$ZodIPv6:()=>Ga,$ZodISODate:()=>Za,$ZodISODateTime:()=>Ma,$ZodISODuration:()=>Ba,$ZodISOTime:()=>Va,$ZodIntersection:()=>hs,$ZodJWT:()=>es,$ZodKSUID:()=>Fa,$ZodLazy:()=>Us,$ZodLiteral:()=>xs,$ZodMAC:()=>Ka,$ZodMap:()=>vs,$ZodNaN:()=>Ps,$ZodNanoID:()=>Da,$ZodNever:()=>us,$ZodNonOptional:()=>Os,$ZodNull:()=>as,$ZodNullable:()=>Is,$ZodNumber:()=>hr,$ZodNumberFormat:()=>ns,$ZodObject:()=>Sm,$ZodObjectJIT:()=>ps,$ZodOptional:()=>br,$ZodPipe:()=>yr,$ZodPrefault:()=>ws,$ZodPreprocess:()=>Cs,$ZodPromise:()=>zs,$ZodReadonly:()=>Ns,$ZodRealError:()=>ee,$ZodRecord:()=>_s,$ZodRegistry:()=>$r,$ZodSet:()=>bs,$ZodString:()=>qe,$ZodStringFormat:()=>D,$ZodSuccess:()=>Ts,$ZodSymbol:()=>is,$ZodTemplateLiteral:()=>Rs,$ZodTransform:()=>Ss,$ZodTuple:()=>vr,$ZodType:()=>$,$ZodULID:()=>ja,$ZodURL:()=>Na,$ZodUUID:()=>Pa,$ZodUndefined:()=>os,$ZodUnion:()=>fn,$ZodUnknown:()=>cs,$ZodVoid:()=>ls,$ZodXID:()=>La,$ZodXor:()=>fs,$brand:()=>bo,$constructor:()=>p,$input:()=>Fs,$output:()=>Ls,Doc:()=>mn,JSONSchema:()=>Ip,JSONSchemaGenerator:()=>ti,NEVER:()=>vo,TimePrecision:()=>Bs,_any:()=>dc,_array:()=>vc,_base64:()=>Zr,_base64url:()=>Vr,_bigint:()=>ic,_boolean:()=>nc,_catch:()=>Py,_check:()=>$p,_cidrv4:()=>Fr,_cidrv6:()=>Mr,_coercedBigint:()=>oc,_coercedBoolean:()=>rc,_coercedDate:()=>hc,_coercedNumber:()=>Js,_coercedString:()=>Zs,_cuid:()=>Nr,_cuid2:()=>Rr,_custom:()=>yc,_date:()=>gc,_decode:()=>tr,_decodeAsync:()=>rr,_default:()=>Oy,_discriminatedUnion:()=>hy,_e164:()=>Br,_email:()=>Er,_emoji:()=>Pr,_encode:()=>er,_encodeAsync:()=>nr,_endsWith:()=>kt,_enum:()=>ky,_file:()=>bc,_float32:()=>Xs,_float64:()=>Qs,_gt:()=>xe,_gte:()=>Y,_guid:()=>vn,_includes:()=>yt,_int:()=>Ys,_int32:()=>ec,_int64:()=>ac,_intersection:()=>_y,_ipv4:()=>jr,_ipv6:()=>Lr,_isoDate:()=>Gs,_isoDateTime:()=>Hs,_isoDuration:()=>Ws,_isoTime:()=>Ks,_jwt:()=>Hr,_ksuid:()=>Ur,_lazy:()=>Dy,_length:()=>Xe,_literal:()=>$y,_lowercase:()=>vt,_lt:()=>ye,_lte:()=>oe,_mac:()=>Vs,_map:()=>yy,_max:()=>oe,_maxLength:()=>Ye,_maxSize:()=>je,_mime:()=>St,_min:()=>Y,_minLength:()=>Oe,_minSize:()=>ke,_multipleOf:()=>Ue,_nan:()=>_c,_nanoid:()=>Cr,_nativeEnum:()=>Sy,_negative:()=>Kr,_never:()=>pc,_nonnegative:()=>qr,_nonoptional:()=>Ty,_nonpositive:()=>Wr,_normalize:()=>$t,_null:()=>lc,_nullable:()=>wy,_number:()=>qs,_optional:()=>Ey,_overwrite:()=>me,_parse:()=>dt,_parseAsync:()=>mt,_pipe:()=>Cy,_positive:()=>Gr,_promise:()=>zy,_property:()=>Jr,_readonly:()=>Ny,_record:()=>by,_refine:()=>xc,_regex:()=>_t,_safeDecode:()=>or,_safeDecodeAsync:()=>sr,_safeEncode:()=>ir,_safeEncodeAsync:()=>ar,_safeParse:()=>pt,_safeParseAsync:()=>ft,_set:()=>xy,_size:()=>Je,_slugify:()=>Ot,_startsWith:()=>xt,_string:()=>Ms,_stringFormat:()=>Tt,_stringbool:()=>Ic,_success:()=>Ay,_superRefine:()=>kc,_symbol:()=>cc,_templateLiteral:()=>Ry,_toLowerCase:()=>Et,_toUpperCase:()=>wt,_transform:()=>Iy,_trim:()=>It,_tuple:()=>vy,_uint32:()=>tc,_uint64:()=>sc,_ulid:()=>Dr,_undefined:()=>uc,_union:()=>fy,_unknown:()=>mc,_uppercase:()=>bt,_url:()=>bn,_uuid:()=>wr,_uuidv4:()=>Or,_uuidv6:()=>Tr,_uuidv7:()=>Ar,_void:()=>fc,_xid:()=>zr,_xor:()=>gy,clone:()=>q,config:()=>Z,createStandardJSONSchemaMethod:()=>At,createToJSONSchemaMethod:()=>Ec,decode:()=>zv,decodeAsync:()=>jv,describe:()=>Sc,encode:()=>Dv,encodeAsync:()=>Uv,extractDefs:()=>Fe,finalize:()=>Me,flattenError:()=>cn,formatError:()=>un,globalConfig:()=>Ge,globalRegistry:()=>G,initializeContext:()=>Le,isValidBase64:()=>Ja,isValidBase64URL:()=>bm,isValidJWT:()=>ym,locales:()=>_n,meta:()=>$c,parse:()=>Xn,parseAsync:()=>Qn,prettifyError:()=>Co,process:()=>C,regexes:()=>ie,registry:()=>Ir,safeDecode:()=>Fv,safeDecodeAsync:()=>Zv,safeEncode:()=>Lv,safeEncodeAsync:()=>Mv,safeParse:()=>No,safeParseAsync:()=>Ro,toDotPath:()=>Xd,toJSONSchema:()=>ei,treeifyError:()=>Po,util:()=>b,version:()=>Oa});var Kd,vo=Object.freeze({status:"aborted"});function p(e,t,r){function o(c,u){if(c._zod||Object.defineProperty(c,"_zod",{value:{def:u,constr:s,traits:new Set},enumerable:!1}),c._zod.traits.has(e))return;c._zod.traits.add(e),t(c,u);let l=s.prototype,d=Object.keys(l);for(let m=0;m<d.length;m++){let g=d[m];g in c||(c[g]=l[g].bind(c))}}let n=r?.Parent??Object;class i extends n{}Object.defineProperty(i,"name",{value:e});function s(c){var u;let l=r?.Parent?new i:this;o(l,c),(u=l._zod).deferred??(u.deferred=[]);for(let d of l._zod.deferred)d();return l}return Object.defineProperty(s,"init",{value:o}),Object.defineProperty(s,Symbol.hasInstance,{value:c=>r?.Parent&&c instanceof r.Parent?!0:c?._zod?.traits?.has(e)}),Object.defineProperty(s,"name",{value:e}),s}var bo=Symbol("zod_brand"),de=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},Ce=class extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}};(Kd=globalThis).__zod_globalConfig??(Kd.__zod_globalConfig={});var Ge=globalThis.__zod_globalConfig;function Z(e){return e&&Object.assign(Ge,e),Ge}var b={};Ie(b,{BIGINT_FORMAT_RANGES:()=>To,Class:()=>xo,NUMBER_FORMAT_RANGES:()=>Oo,aborted:()=>ze,allowsEval:()=>$o,assert:()=>pv,assertEqual:()=>uv,assertIs:()=>dv,assertNever:()=>mv,assertNotEqual:()=>lv,assignProp:()=>Re,base64ToUint8Array:()=>qd,base64urlToUint8Array:()=>Av,cached:()=>ut,captureStackTrace:()=>Yn,cleanEnum:()=>Tv,cleanRegex:()=>nn,clone:()=>q,cloneDef:()=>gv,createTransparentProxy:()=>xv,defineLazy:()=>E,esc:()=>Jn,escapeRegex:()=>ce,explicitlyAborted:()=>Ao,extend:()=>$v,finalizeIssue:()=>J,floatSafeRemainder:()=>ko,getElementAtPath:()=>hv,getEnumValues:()=>tn,getLengthableOrigin:()=>an,getParsedType:()=>yv,getSizableOrigin:()=>on,hexToUint8Array:()=>Cv,isObject:()=>Ke,isPlainObject:()=>De,issue:()=>lt,joinValues:()=>f,jsonStringifyReplacer:()=>ct,merge:()=>Ev,mergeDefs:()=>we,normalizeParams:()=>y,nullish:()=>Ne,numKeys:()=>bv,objectClone:()=>fv,omit:()=>Sv,optionalKeys:()=>wo,parsedType:()=>v,partial:()=>wv,pick:()=>kv,prefixIssues:()=>Q,primitiveTypes:()=>Eo,promiseAllObject:()=>_v,propertyKeyTypes:()=>rn,randomString:()=>vv,required:()=>Ov,safeExtend:()=>Iv,shallowClone:()=>Io,slugify:()=>So,stringifyPrimitive:()=>_,uint8ArrayToBase64:()=>Jd,uint8ArrayToBase64url:()=>Pv,uint8ArrayToHex:()=>Nv,unwrapMessage:()=>en});function uv(e){return e}function lv(e){return e}function dv(e){}function mv(e){throw new Error("Unexpected value in exhaustive check")}function pv(e){}function tn(e){let t=Object.values(e).filter(o=>typeof o=="number");return Object.entries(e).filter(([o,n])=>t.indexOf(+o)===-1).map(([o,n])=>n)}function f(e,t="|"){return e.map(r=>_(r)).join(t)}function ct(e,t){return typeof t=="bigint"?t.toString():t}function ut(e){return{get value(){{let r=e();return Object.defineProperty(this,"value",{value:r}),r}throw new Error("cached value already set")}}}function Ne(e){return e==null}function nn(e){let t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}function ko(e,t){let r=e/t,o=Math.round(r),n=Number.EPSILON*Math.max(Math.abs(r),1);return Math.abs(r-o)<n?0:r-o}var Wd=Symbol("evaluating");function E(e,t,r){let o;Object.defineProperty(e,t,{get(){if(o!==Wd)return o===void 0&&(o=Wd,o=r()),o},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function fv(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function Re(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}function we(...e){let t={};for(let r of e){let o=Object.getOwnPropertyDescriptors(r);Object.assign(t,o)}return Object.defineProperties({},t)}function gv(e){return we(e._zod.def)}function hv(e,t){return t?t.reduce((r,o)=>r?.[o],e):e}function _v(e){let t=Object.keys(e),r=t.map(o=>e[o]);return Promise.all(r).then(o=>{let n={};for(let i=0;i<t.length;i++)n[t[i]]=o[i];return n})}function vv(e=10){let t="abcdefghijklmnopqrstuvwxyz",r="";for(let o=0;o<e;o++)r+=t[Math.floor(Math.random()*t.length)];return r}function Jn(e){return JSON.stringify(e)}function So(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}var Yn="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Ke(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}var $o=ut(()=>{if(Ge.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});function De(e){if(Ke(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!="function")return!0;let r=t.prototype;return!(Ke(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function Io(e){return De(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}function bv(e){let t=0;for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&t++;return t}var yv=e=>{let t=typeof e;switch(t){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(e)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(e)?"array":e===null?"null":e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?"promise":typeof Map<"u"&&e instanceof Map?"map":typeof Set<"u"&&e instanceof Set?"set":typeof Date<"u"&&e instanceof Date?"date":typeof File<"u"&&e instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${t}`)}},rn=new Set(["string","number","symbol"]),Eo=new Set(["string","number","bigint","boolean","symbol","undefined"]);function ce(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function q(e,t,r){let o=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(o._zod.parent=e),o}function y(e){let t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function xv(e){let t;return new Proxy({},{get(r,o,n){return t??(t=e()),Reflect.get(t,o,n)},set(r,o,n,i){return t??(t=e()),Reflect.set(t,o,n,i)},has(r,o){return t??(t=e()),Reflect.has(t,o)},deleteProperty(r,o){return t??(t=e()),Reflect.deleteProperty(t,o)},ownKeys(r){return t??(t=e()),Reflect.ownKeys(t)},getOwnPropertyDescriptor(r,o){return t??(t=e()),Reflect.getOwnPropertyDescriptor(t,o)},defineProperty(r,o,n){return t??(t=e()),Reflect.defineProperty(t,o,n)}})}function _(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function wo(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}var Oo={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]},To={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function kv(e,t){let r=e._zod.def,o=r.checks;if(o&&o.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");let i=we(e._zod.def,{get shape(){let s={};for(let c in t){if(!(c in r.shape))throw new Error(`Unrecognized key: "${c}"`);t[c]&&(s[c]=r.shape[c])}return Re(this,"shape",s),s},checks:[]});return q(e,i)}function Sv(e,t){let r=e._zod.def,o=r.checks;if(o&&o.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");let i=we(e._zod.def,{get shape(){let s={...e._zod.def.shape};for(let c in t){if(!(c in r.shape))throw new Error(`Unrecognized key: "${c}"`);t[c]&&delete s[c]}return Re(this,"shape",s),s},checks:[]});return q(e,i)}function $v(e,t){if(!De(t))throw new Error("Invalid input to extend: expected a plain object");let r=e._zod.def.checks;if(r&&r.length>0){let i=e._zod.def.shape;for(let s in t)if(Object.getOwnPropertyDescriptor(i,s)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let n=we(e._zod.def,{get shape(){let i={...e._zod.def.shape,...t};return Re(this,"shape",i),i}});return q(e,n)}function Iv(e,t){if(!De(t))throw new Error("Invalid input to safeExtend: expected a plain object");let r=we(e._zod.def,{get shape(){let o={...e._zod.def.shape,...t};return Re(this,"shape",o),o}});return q(e,r)}function Ev(e,t){if(e._zod.def.checks?.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");let r=we(e._zod.def,{get shape(){let o={...e._zod.def.shape,...t._zod.def.shape};return Re(this,"shape",o),o},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]});return q(e,r)}function wv(e,t,r){let n=t._zod.def.checks;if(n&&n.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");let s=we(t._zod.def,{get shape(){let c=t._zod.def.shape,u={...c};if(r)for(let l in r){if(!(l in c))throw new Error(`Unrecognized key: "${l}"`);r[l]&&(u[l]=e?new e({type:"optional",innerType:c[l]}):c[l])}else for(let l in c)u[l]=e?new e({type:"optional",innerType:c[l]}):c[l];return Re(this,"shape",u),u},checks:[]});return q(t,s)}function Ov(e,t,r){let o=we(t._zod.def,{get shape(){let n=t._zod.def.shape,i={...n};if(r)for(let s in r){if(!(s in i))throw new Error(`Unrecognized key: "${s}"`);r[s]&&(i[s]=new e({type:"nonoptional",innerType:n[s]}))}else for(let s in n)i[s]=new e({type:"nonoptional",innerType:n[s]});return Re(this,"shape",i),i}});return q(t,o)}function ze(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue!==!0)return!0;return!1}function Ao(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue===!1)return!0;return!1}function Q(e,t){return t.map(r=>{var o;return(o=r).path??(o.path=[]),r.path.unshift(e),r})}function en(e){return typeof e=="string"?e:e?.message}function J(e,t,r){let o=e.message?e.message:en(e.inst?._zod.def?.error?.(e))??en(t?.error?.(e))??en(r.customError?.(e))??en(r.localeError?.(e))??"Invalid input",{inst:n,continue:i,input:s,...c}=e;return c.path??(c.path=[]),c.message=o,t?.reportInput&&(c.input=s),c}function on(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function an(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function v(e){let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"nan":"number";case"object":{if(e===null)return"null";if(Array.isArray(e))return"array";let r=e;if(r&&Object.getPrototypeOf(r)!==Object.prototype&&"constructor"in r&&r.constructor)return r.constructor.name}}return t}function lt(...e){let[t,r,o]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:o}:{...t}}function Tv(e){return Object.entries(e).filter(([t,r])=>Number.isNaN(Number.parseInt(t,10))).map(t=>t[1])}function qd(e){let t=atob(e),r=new Uint8Array(t.length);for(let o=0;o<t.length;o++)r[o]=t.charCodeAt(o);return r}function Jd(e){let t="";for(let r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return btoa(t)}function Av(e){let t=e.replace(/-/g,"+").replace(/_/g,"/"),r="=".repeat((4-t.length%4)%4);return qd(t+r)}function Pv(e){return Jd(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function Cv(e){let t=e.replace(/^0x/,"");if(t.length%2!==0)throw new Error("Invalid hex string length");let r=new Uint8Array(t.length/2);for(let o=0;o<t.length;o+=2)r[o/2]=Number.parseInt(t.slice(o,o+2),16);return r}function Nv(e){return Array.from(e).map(t=>t.toString(16).padStart(2,"0")).join("")}var xo=class{constructor(...t){}};var Yd=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,ct,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},sn=p("$ZodError",Yd),ee=p("$ZodError",Yd,{Parent:Error});function cn(e,t=r=>r.message){let r={},o=[];for(let n of e.issues)n.path.length>0?(r[n.path[0]]=r[n.path[0]]||[],r[n.path[0]].push(t(n))):o.push(t(n));return{formErrors:o,fieldErrors:r}}function un(e,t=r=>r.message){let r={_errors:[]},o=(n,i=[])=>{for(let s of n.issues)if(s.code==="invalid_union"&&s.errors.length)s.errors.map(c=>o({issues:c},[...i,...s.path]));else if(s.code==="invalid_key")o({issues:s.issues},[...i,...s.path]);else if(s.code==="invalid_element")o({issues:s.issues},[...i,...s.path]);else{let c=[...i,...s.path];if(c.length===0)r._errors.push(t(s));else{let u=r,l=0;for(;l<c.length;){let d=c[l];l===c.length-1?(u[d]=u[d]||{_errors:[]},u[d]._errors.push(t(s))):u[d]=u[d]||{_errors:[]},u=u[d],l++}}}};return o(e),r}function Po(e,t=r=>r.message){let r={errors:[]},o=(n,i=[])=>{var s,c;for(let u of n.issues)if(u.code==="invalid_union"&&u.errors.length)u.errors.map(l=>o({issues:l},[...i,...u.path]));else if(u.code==="invalid_key")o({issues:u.issues},[...i,...u.path]);else if(u.code==="invalid_element")o({issues:u.issues},[...i,...u.path]);else{let l=[...i,...u.path];if(l.length===0){r.errors.push(t(u));continue}let d=r,m=0;for(;m<l.length;){let g=l[m],h=m===l.length-1;typeof g=="string"?(d.properties??(d.properties={}),(s=d.properties)[g]??(s[g]={errors:[]}),d=d.properties[g]):(d.items??(d.items=[]),(c=d.items)[g]??(c[g]={errors:[]}),d=d.items[g]),h&&d.errors.push(t(u)),m++}}};return o(e),r}function Xd(e){let t=[],r=e.map(o=>typeof o=="object"?o.key:o);for(let o of r)typeof o=="number"?t.push(`[${o}]`):typeof o=="symbol"?t.push(`[${JSON.stringify(String(o))}]`):/[^\w$]/.test(o)?t.push(`[${JSON.stringify(o)}]`):(t.length&&t.push("."),t.push(o));return t.join("")}function Co(e){let t=[],r=[...e.issues].sort((o,n)=>(o.path??[]).length-(n.path??[]).length);for(let o of r)t.push(`\u2716 ${o.message}`),o.path?.length&&t.push(` \u2192 at ${Xd(o.path)}`);return t.join(`
34
+ `)}var dt=e=>(t,r,o,n)=>{let i=o?{...o,async:!1}:{async:!1},s=t._zod.run({value:r,issues:[]},i);if(s instanceof Promise)throw new de;if(s.issues.length){let c=new(n?.Err??e)(s.issues.map(u=>J(u,i,Z())));throw Yn(c,n?.callee),c}return s.value},Xn=dt(ee),mt=e=>async(t,r,o,n)=>{let i=o?{...o,async:!0}:{async:!0},s=t._zod.run({value:r,issues:[]},i);if(s instanceof Promise&&(s=await s),s.issues.length){let c=new(n?.Err??e)(s.issues.map(u=>J(u,i,Z())));throw Yn(c,n?.callee),c}return s.value},Qn=mt(ee),pt=e=>(t,r,o)=>{let n=o?{...o,async:!1}:{async:!1},i=t._zod.run({value:r,issues:[]},n);if(i instanceof Promise)throw new de;return i.issues.length?{success:!1,error:new(e??sn)(i.issues.map(s=>J(s,n,Z())))}:{success:!0,data:i.value}},No=pt(ee),ft=e=>async(t,r,o)=>{let n=o?{...o,async:!0}:{async:!0},i=t._zod.run({value:r,issues:[]},n);return i instanceof Promise&&(i=await i),i.issues.length?{success:!1,error:new e(i.issues.map(s=>J(s,n,Z())))}:{success:!0,data:i.value}},Ro=ft(ee),er=e=>(t,r,o)=>{let n=o?{...o,direction:"backward"}:{direction:"backward"};return dt(e)(t,r,n)},Dv=er(ee),tr=e=>(t,r,o)=>dt(e)(t,r,o),zv=tr(ee),nr=e=>async(t,r,o)=>{let n=o?{...o,direction:"backward"}:{direction:"backward"};return mt(e)(t,r,n)},Uv=nr(ee),rr=e=>async(t,r,o)=>mt(e)(t,r,o),jv=rr(ee),ir=e=>(t,r,o)=>{let n=o?{...o,direction:"backward"}:{direction:"backward"};return pt(e)(t,r,n)},Lv=ir(ee),or=e=>(t,r,o)=>pt(e)(t,r,o),Fv=or(ee),ar=e=>async(t,r,o)=>{let n=o?{...o,direction:"backward"}:{direction:"backward"};return ft(e)(t,r,n)},Mv=ar(ee),sr=e=>async(t,r,o)=>ft(e)(t,r,o),Zv=sr(ee);var ie={};Ie(ie,{base64:()=>Jo,base64url:()=>cr,bigint:()=>ra,boolean:()=>oa,browserEmail:()=>Jv,cidrv4:()=>Wo,cidrv6:()=>qo,cuid:()=>Do,cuid2:()=>zo,date:()=>Qo,datetime:()=>ta,domain:()=>Qv,duration:()=>Mo,e164:()=>Xo,email:()=>Vo,emoji:()=>Bo,extendedDuration:()=>Vv,guid:()=>Zo,hex:()=>eb,hostname:()=>Xv,html5Email:()=>Kv,httpProtocol:()=>Yo,idnEmail:()=>qv,integer:()=>ia,ipv4:()=>Ho,ipv6:()=>Go,ksuid:()=>Lo,lowercase:()=>ca,mac:()=>Ko,md5_base64:()=>nb,md5_base64url:()=>rb,md5_hex:()=>tb,nanoid:()=>Fo,null:()=>aa,number:()=>ur,rfc5322Email:()=>Wv,sha1_base64:()=>ob,sha1_base64url:()=>ab,sha1_hex:()=>ib,sha256_base64:()=>cb,sha256_base64url:()=>ub,sha256_hex:()=>sb,sha384_base64:()=>db,sha384_base64url:()=>mb,sha384_hex:()=>lb,sha512_base64:()=>fb,sha512_base64url:()=>gb,sha512_hex:()=>pb,string:()=>na,time:()=>ea,ulid:()=>Uo,undefined:()=>sa,unicodeEmail:()=>Qd,uppercase:()=>ua,uuid:()=>We,uuid4:()=>Bv,uuid6:()=>Hv,uuid7:()=>Gv,xid:()=>jo});var Do=/^[cC][0-9a-z]{6,}$/,zo=/^[0-9a-z]+$/,Uo=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,jo=/^[0-9a-vA-V]{20}$/,Lo=/^[A-Za-z0-9]{27}$/,Fo=/^[a-zA-Z0-9_-]{21}$/,Mo=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Vv=/^[-+]?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)?)??$/,Zo=/^([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})$/,We=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,Bv=We(4),Hv=We(6),Gv=We(7),Vo=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Kv=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,Wv=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,Qd=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,qv=Qd,Jv=/^[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])?)*$/,Yv="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function Bo(){return new RegExp(Yv,"u")}var Ho=/^(?:(?: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])$/,Go=/^(([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}|:))$/,Ko=e=>{let t=ce(e??":");return new RegExp(`^(?:[0-9A-F]{2}${t}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${t}){5}[0-9a-f]{2}$`)},Wo=/^((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])$/,qo=/^(([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])$/,Jo=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,cr=/^[A-Za-z0-9_-]*$/,Xv=/^(?=.{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])?)*\.?$/,Qv=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,Yo=/^https?$/,Xo=/^\+[1-9]\d{6,14}$/,em="(?:(?:\\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])))",Qo=new RegExp(`^${em}$`);function tm(e){let t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function ea(e){return new RegExp(`^${tm(e)}$`)}function ta(e){let t=tm({precision:e.precision}),r=["Z"];e.local&&r.push(""),e.offset&&r.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let o=`${t}(?:${r.join("|")})`;return new RegExp(`^${em}T(?:${o})$`)}var na=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},ra=/^-?\d+n?$/,ia=/^-?\d+$/,ur=/^-?\d+(?:\.\d+)?$/,oa=/^(?:true|false)$/i,aa=/^null$/i;var sa=/^undefined$/i;var ca=/^[^A-Z]*$/,ua=/^[^a-z]*$/,eb=/^[0-9a-fA-F]*$/;function ln(e,t){return new RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}function dn(e){return new RegExp(`^[A-Za-z0-9_-]{${e}}$`)}var tb=/^[0-9a-fA-F]{32}$/,nb=ln(22,"=="),rb=dn(22),ib=/^[0-9a-fA-F]{40}$/,ob=ln(27,"="),ab=dn(27),sb=/^[0-9a-fA-F]{64}$/,cb=ln(43,"="),ub=dn(43),lb=/^[0-9a-fA-F]{96}$/,db=ln(64,""),mb=dn(64),pb=/^[0-9a-fA-F]{128}$/,fb=ln(86,"=="),gb=dn(86);var U=p("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),rm={number:"number",bigint:"bigint",object:"date"},lr=p("$ZodCheckLessThan",(e,t)=>{U.init(e,t);let r=rm[typeof t.value];e._zod.onattach.push(o=>{let n=o._zod.bag,i=(t.inclusive?n.maximum:n.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<i&&(t.inclusive?n.maximum=t.value:n.exclusiveMaximum=t.value)}),e._zod.check=o=>{(t.inclusive?o.value<=t.value:o.value<t.value)||o.issues.push({origin:r,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:o.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),dr=p("$ZodCheckGreaterThan",(e,t)=>{U.init(e,t);let r=rm[typeof t.value];e._zod.onattach.push(o=>{let n=o._zod.bag,i=(t.inclusive?n.minimum:n.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>i&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value)}),e._zod.check=o=>{(t.inclusive?o.value>=t.value:o.value>t.value)||o.issues.push({origin:r,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:o.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),la=p("$ZodCheckMultipleOf",(e,t)=>{U.init(e,t),e._zod.onattach.push(r=>{var o;(o=r._zod.bag).multipleOf??(o.multipleOf=t.value)}),e._zod.check=r=>{if(typeof r.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof r.value=="bigint"?r.value%t.value===BigInt(0):ko(r.value,t.value)===0)||r.issues.push({origin:typeof r.value,code:"not_multiple_of",divisor:t.value,input:r.value,inst:e,continue:!t.abort})}}),da=p("$ZodCheckNumberFormat",(e,t)=>{U.init(e,t),t.format=t.format||"float64";let r=t.format?.includes("int"),o=r?"int":"number",[n,i]=Oo[t.format];e._zod.onattach.push(s=>{let c=s._zod.bag;c.format=t.format,c.minimum=n,c.maximum=i,r&&(c.pattern=ia)}),e._zod.check=s=>{let c=s.value;if(r){if(!Number.isInteger(c)){s.issues.push({expected:o,format:t.format,code:"invalid_type",continue:!1,input:c,inst:e});return}if(!Number.isSafeInteger(c)){c>0?s.issues.push({input:c,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:o,inclusive:!0,continue:!t.abort}):s.issues.push({input:c,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:o,inclusive:!0,continue:!t.abort});return}}c<n&&s.issues.push({origin:"number",input:c,code:"too_small",minimum:n,inclusive:!0,inst:e,continue:!t.abort}),c>i&&s.issues.push({origin:"number",input:c,code:"too_big",maximum:i,inclusive:!0,inst:e,continue:!t.abort})}}),ma=p("$ZodCheckBigIntFormat",(e,t)=>{U.init(e,t);let[r,o]=To[t.format];e._zod.onattach.push(n=>{let i=n._zod.bag;i.format=t.format,i.minimum=r,i.maximum=o}),e._zod.check=n=>{let i=n.value;i<r&&n.issues.push({origin:"bigint",input:i,code:"too_small",minimum:r,inclusive:!0,inst:e,continue:!t.abort}),i>o&&n.issues.push({origin:"bigint",input:i,code:"too_big",maximum:o,inclusive:!0,inst:e,continue:!t.abort})}}),pa=p("$ZodCheckMaxSize",(e,t)=>{var r;U.init(e,t),(r=e._zod.def).when??(r.when=o=>{let n=o.value;return!Ne(n)&&n.size!==void 0}),e._zod.onattach.push(o=>{let n=o._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<n&&(o._zod.bag.maximum=t.maximum)}),e._zod.check=o=>{let n=o.value;n.size<=t.maximum||o.issues.push({origin:on(n),code:"too_big",maximum:t.maximum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),fa=p("$ZodCheckMinSize",(e,t)=>{var r;U.init(e,t),(r=e._zod.def).when??(r.when=o=>{let n=o.value;return!Ne(n)&&n.size!==void 0}),e._zod.onattach.push(o=>{let n=o._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>n&&(o._zod.bag.minimum=t.minimum)}),e._zod.check=o=>{let n=o.value;n.size>=t.minimum||o.issues.push({origin:on(n),code:"too_small",minimum:t.minimum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),ga=p("$ZodCheckSizeEquals",(e,t)=>{var r;U.init(e,t),(r=e._zod.def).when??(r.when=o=>{let n=o.value;return!Ne(n)&&n.size!==void 0}),e._zod.onattach.push(o=>{let n=o._zod.bag;n.minimum=t.size,n.maximum=t.size,n.size=t.size}),e._zod.check=o=>{let n=o.value,i=n.size;if(i===t.size)return;let s=i>t.size;o.issues.push({origin:on(n),...s?{code:"too_big",maximum:t.size}:{code:"too_small",minimum:t.size},inclusive:!0,exact:!0,input:o.value,inst:e,continue:!t.abort})}}),ha=p("$ZodCheckMaxLength",(e,t)=>{var r;U.init(e,t),(r=e._zod.def).when??(r.when=o=>{let n=o.value;return!Ne(n)&&n.length!==void 0}),e._zod.onattach.push(o=>{let n=o._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<n&&(o._zod.bag.maximum=t.maximum)}),e._zod.check=o=>{let n=o.value;if(n.length<=t.maximum)return;let s=an(n);o.issues.push({origin:s,code:"too_big",maximum:t.maximum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),_a=p("$ZodCheckMinLength",(e,t)=>{var r;U.init(e,t),(r=e._zod.def).when??(r.when=o=>{let n=o.value;return!Ne(n)&&n.length!==void 0}),e._zod.onattach.push(o=>{let n=o._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>n&&(o._zod.bag.minimum=t.minimum)}),e._zod.check=o=>{let n=o.value;if(n.length>=t.minimum)return;let s=an(n);o.issues.push({origin:s,code:"too_small",minimum:t.minimum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),va=p("$ZodCheckLengthEquals",(e,t)=>{var r;U.init(e,t),(r=e._zod.def).when??(r.when=o=>{let n=o.value;return!Ne(n)&&n.length!==void 0}),e._zod.onattach.push(o=>{let n=o._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=o=>{let n=o.value,i=n.length;if(i===t.length)return;let s=an(n),c=i>t.length;o.issues.push({origin:s,...c?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:o.value,inst:e,continue:!t.abort})}}),gt=p("$ZodCheckStringFormat",(e,t)=>{var r,o;U.init(e,t),e._zod.onattach.push(n=>{let i=n._zod.bag;i.format=t.format,t.pattern&&(i.patterns??(i.patterns=new Set),i.patterns.add(t.pattern))}),t.pattern?(r=e._zod).check??(r.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(o=e._zod).check??(o.check=()=>{})}),ba=p("$ZodCheckRegex",(e,t)=>{gt.init(e,t),e._zod.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),ya=p("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=ca),gt.init(e,t)}),xa=p("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=ua),gt.init(e,t)}),ka=p("$ZodCheckIncludes",(e,t)=>{U.init(e,t);let r=ce(t.includes),o=new RegExp(typeof t.position=="number"?`^.{${t.position}}${r}`:r);t.pattern=o,e._zod.onattach.push(n=>{let i=n._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(o)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),Sa=p("$ZodCheckStartsWith",(e,t)=>{U.init(e,t);let r=new RegExp(`^${ce(t.prefix)}.*`);t.pattern??(t.pattern=r),e._zod.onattach.push(o=>{let n=o._zod.bag;n.patterns??(n.patterns=new Set),n.patterns.add(r)}),e._zod.check=o=>{o.value.startsWith(t.prefix)||o.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:o.value,inst:e,continue:!t.abort})}}),$a=p("$ZodCheckEndsWith",(e,t)=>{U.init(e,t);let r=new RegExp(`.*${ce(t.suffix)}$`);t.pattern??(t.pattern=r),e._zod.onattach.push(o=>{let n=o._zod.bag;n.patterns??(n.patterns=new Set),n.patterns.add(r)}),e._zod.check=o=>{o.value.endsWith(t.suffix)||o.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:o.value,inst:e,continue:!t.abort})}});function nm(e,t,r){e.issues.length&&t.issues.push(...Q(r,e.issues))}var Ia=p("$ZodCheckProperty",(e,t)=>{U.init(e,t),e._zod.check=r=>{let o=t.schema._zod.run({value:r.value[t.property],issues:[]},{});if(o instanceof Promise)return o.then(n=>nm(n,r,t.property));nm(o,r,t.property)}}),Ea=p("$ZodCheckMimeType",(e,t)=>{U.init(e,t);let r=new Set(t.mime);e._zod.onattach.push(o=>{o._zod.bag.mime=t.mime}),e._zod.check=o=>{r.has(o.value.type)||o.issues.push({code:"invalid_value",values:t.mime,input:o.value.type,inst:e,continue:!t.abort})}}),wa=p("$ZodCheckOverwrite",(e,t)=>{U.init(e,t),e._zod.check=r=>{r.value=t.tx(r.value)}});var mn=class{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}let o=t.split(`
35
35
  `).filter(s=>s),n=Math.min(...o.map(s=>s.length-s.trimStart().length)),i=o.map(s=>s.slice(n)).map(s=>" ".repeat(this.indent*2)+s);for(let s of i)this.content.push(s)}compile(){let t=Function,r=this?.args,n=[...(this?.content??[""]).map(i=>` ${i}`)];return new t(...r,n.join(`
36
- `))}};var Sa={major:4,minor:4,patch:3};var $=p("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Sa;let o=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&o.unshift(e);for(let n of o)for(let i of n._zod.onattach)i(e);if(o.length===0)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let n=(s,c,u)=>{let l=Ne(s),d;for(let m of c){if(m._zod.def.when){if(Io(s)||!m._zod.def.when(s))continue}else if(l)continue;let g=s.issues.length,h=m._zod.check(s);if(h instanceof Promise&&u?.async===!1)throw new se;if(d||h instanceof Promise)d=(d??Promise.resolve()).then(async()=>{await h,s.issues.length!==g&&(l||(l=Ne(s,g)))});else{if(s.issues.length===g)continue;l||(l=Ne(s,g))}}return d?d.then(()=>s):s},i=(s,c,u)=>{if(Ne(s))return s.aborted=!0,s;let l=n(c,o,u);if(l instanceof Promise){if(u.async===!1)throw new se;return l.then(d=>e._zod.parse(d,u))}return e._zod.parse(l,u)};e._zod.run=(s,c)=>{if(c.skipChecks)return e._zod.parse(s,c);if(c.direction==="backward"){let l=e._zod.parse({value:s.value,issues:[]},{...c,skipChecks:!0});return l instanceof Promise?l.then(d=>i(d,s,c)):i(l,s,c)}let u=e._zod.parse(s,c);if(u instanceof Promise){if(c.async===!1)throw new se;return u.then(l=>n(l,o,c))}return n(u,o,c)}}E(e,"~standard",()=>({validate:n=>{try{let i=Oo(e,n);return i.success?{value:i.data}:{issues:i.error?.issues}}catch{return To(e,n).then(s=>s.success?{value:s.data}:{issues:s.error?.issues})}},vendor:"zod",version:1}))}),Ge=p("$ZodString",(e,t)=>{$.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??Yo(e._zod.bag),e._zod.parse=(r,o)=>{if(t.coerce)try{r.value=String(r.value)}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r}}),R=p("$ZodStringFormat",(e,t)=>{dt.init(e,t),Ge.init(e,t)}),Ia=p("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=Uo),R.init(e,t)}),Ea=p("$ZodUUID",(e,t)=>{if(t.version){let o={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(o===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=He(o))}else t.pattern??(t.pattern=He());R.init(e,t)}),wa=p("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=jo),R.init(e,t)}),Oa=p("$ZodURL",(e,t)=>{R.init(e,t),e._zod.check=r=>{try{let o=r.value.trim();if(!t.normalize&&t.protocol?.source===Go.source&&!/^https?:\/\//i.test(o)){r.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:r.value,inst:e,continue:!t.abort});return}let n=new URL(o);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(n.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:r.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(n.protocol.endsWith(":")?n.protocol.slice(0,-1):n.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:r.value,inst:e,continue:!t.abort})),t.normalize?r.value=n.href:r.value=o;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort})}}}),Ta=p("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=Lo()),R.init(e,t)}),Pa=p("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=Do),R.init(e,t)}),Aa=p("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=Po),R.init(e,t)}),Na=p("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=Ao),R.init(e,t)}),Ca=p("$ZodULID",(e,t)=>{t.pattern??(t.pattern=No),R.init(e,t)}),Ra=p("$ZodXID",(e,t)=>{t.pattern??(t.pattern=Co),R.init(e,t)}),Da=p("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=Ro),R.init(e,t)}),za=p("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=Jo(t)),R.init(e,t)}),Ua=p("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=Wo),R.init(e,t)}),ja=p("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=qo(t)),R.init(e,t)}),La=p("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=zo),R.init(e,t)}),Ma=p("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=Mo),R.init(e,t),e._zod.bag.format="ipv4"}),Fa=p("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=Fo),R.init(e,t),e._zod.bag.format="ipv6",e._zod.check=r=>{try{new URL(`http://[${r.value}]`)}catch{r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:e,continue:!t.abort})}}}),Za=p("$ZodMAC",(e,t)=>{t.pattern??(t.pattern=Zo(t.delimiter)),R.init(e,t),e._zod.bag.format="mac"}),Va=p("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=Vo),R.init(e,t)}),Ba=p("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=Bo),R.init(e,t),e._zod.check=r=>{let o=r.value.split("/");try{if(o.length!==2)throw new Error;let[n,i]=o;if(!i)throw new Error;let s=Number(i);if(`${s}`!==i)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:e,continue:!t.abort})}}});function Ha(e){if(e==="")return!0;if(/\s/.test(e)||e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}var Ga=p("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=Ho),R.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=r=>{Ha(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort})}});function mm(e){if(!ar.test(e))return!1;let t=e.replace(/[-_]/g,o=>o==="-"?"+":"/"),r=t.padEnd(Math.ceil(t.length/4)*4,"=");return Ha(r)}var Ka=p("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=ar),R.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=r=>{mm(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort})}}),Wa=p("$ZodE164",(e,t)=>{t.pattern??(t.pattern=Ko),R.init(e,t)});function pm(e,t=null){try{let r=e.split(".");if(r.length!==3)return!1;let[o]=r;if(!o)return!1;let n=JSON.parse(atob(o));return!("typ"in n&&n?.typ!=="JWT"||!n.alg||t&&(!("alg"in n)||n.alg!==t))}catch{return!1}}var qa=p("$ZodJWT",(e,t)=>{R.init(e,t),e._zod.check=r=>{pm(r.value,t.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort})}}),Ja=p("$ZodCustomStringFormat",(e,t)=>{R.init(e,t),e._zod.check=r=>{t.fn(r.value)||r.issues.push({code:"invalid_format",format:t.format,input:r.value,inst:e,continue:!t.abort})}}),fr=p("$ZodNumber",(e,t)=>{$.init(e,t),e._zod.pattern=e._zod.bag.pattern??sr,e._zod.parse=(r,o)=>{if(t.coerce)try{r.value=Number(r.value)}catch{}let n=r.value;if(typeof n=="number"&&!Number.isNaN(n)&&Number.isFinite(n))return r;let i=typeof n=="number"?Number.isNaN(n)?"NaN":Number.isFinite(n)?void 0:"Infinity":void 0;return r.issues.push({expected:"number",code:"invalid_type",input:n,inst:e,...i?{received:i}:{}}),r}}),Ya=p("$ZodNumberFormat",(e,t)=>{aa.init(e,t),fr.init(e,t)}),dn=p("$ZodBoolean",(e,t)=>{$.init(e,t),e._zod.pattern=ea,e._zod.parse=(r,o)=>{if(t.coerce)try{r.value=!!r.value}catch{}let n=r.value;return typeof n=="boolean"||r.issues.push({expected:"boolean",code:"invalid_type",input:n,inst:e}),r}}),gr=p("$ZodBigInt",(e,t)=>{$.init(e,t),e._zod.pattern=Xo,e._zod.parse=(r,o)=>{if(t.coerce)try{r.value=BigInt(r.value)}catch{}return typeof r.value=="bigint"||r.issues.push({expected:"bigint",code:"invalid_type",input:r.value,inst:e}),r}}),Xa=p("$ZodBigIntFormat",(e,t)=>{sa.init(e,t),gr.init(e,t)}),Qa=p("$ZodSymbol",(e,t)=>{$.init(e,t),e._zod.parse=(r,o)=>{let n=r.value;return typeof n=="symbol"||r.issues.push({expected:"symbol",code:"invalid_type",input:n,inst:e}),r}}),es=p("$ZodUndefined",(e,t)=>{$.init(e,t),e._zod.pattern=na,e._zod.values=new Set([void 0]),e._zod.parse=(r,o)=>{let n=r.value;return typeof n>"u"||r.issues.push({expected:"undefined",code:"invalid_type",input:n,inst:e}),r}}),ts=p("$ZodNull",(e,t)=>{$.init(e,t),e._zod.pattern=ta,e._zod.values=new Set([null]),e._zod.parse=(r,o)=>{let n=r.value;return n===null||r.issues.push({expected:"null",code:"invalid_type",input:n,inst:e}),r}}),ns=p("$ZodAny",(e,t)=>{$.init(e,t),e._zod.parse=r=>r}),rs=p("$ZodUnknown",(e,t)=>{$.init(e,t),e._zod.parse=r=>r}),is=p("$ZodNever",(e,t)=>{$.init(e,t),e._zod.parse=(r,o)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:e}),r)}),os=p("$ZodVoid",(e,t)=>{$.init(e,t),e._zod.parse=(r,o)=>{let n=r.value;return typeof n>"u"||r.issues.push({expected:"void",code:"invalid_type",input:n,inst:e}),r}}),as=p("$ZodDate",(e,t)=>{$.init(e,t),e._zod.parse=(r,o)=>{if(t.coerce)try{r.value=new Date(r.value)}catch{}let n=r.value,i=n instanceof Date;return i&&!Number.isNaN(n.getTime())||r.issues.push({expected:"date",code:"invalid_type",input:n,...i?{received:"Invalid Date"}:{},inst:e}),r}});function Xd(e,t,r){e.issues.length&&t.issues.push(...Y(r,e.issues)),t.value[r]=e.value}var ss=p("$ZodArray",(e,t)=>{$.init(e,t),e._zod.parse=(r,o)=>{let n=r.value;if(!Array.isArray(n))return r.issues.push({expected:"array",code:"invalid_type",input:n,inst:e}),r;r.value=Array(n.length);let i=[];for(let s=0;s<n.length;s++){let c=n[s],u=t.element._zod.run({value:c,issues:[]},o);u instanceof Promise?i.push(u.then(l=>Xd(l,r,s))):Xd(u,r,s)}return i.length?Promise.all(i).then(()=>r):r}});function pr(e,t,r,o,n,i){let s=r in o;if(e.issues.length){if(n&&i&&!s)return;t.issues.push(...Y(r,e.issues))}if(!s&&!n){e.issues.length||t.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[r]});return}e.value===void 0?s&&(t.value[r]=void 0):t.value[r]=e.value}function fm(e){let t=Object.keys(e.shape);for(let o of t)if(!e.shape?.[o]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${o}": expected a Zod schema`);let r=ko(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(r)}}function gm(e,t,r,o,n,i){let s=[],c=n.keySet,u=n.catchall._zod,l=u.def.type,d=u.optin==="optional",m=u.optout==="optional";for(let g in t){if(g==="__proto__"||c.has(g))continue;if(l==="never"){s.push(g);continue}let h=u.run({value:t[g],issues:[]},o);h instanceof Promise?e.push(h.then(S=>pr(S,r,g,t,d,m))):pr(h,r,g,t,d,m)}return s.length&&r.issues.push({code:"unrecognized_keys",keys:s,input:t,inst:i}),e.length?Promise.all(e).then(()=>r):r}var hm=p("$ZodObject",(e,t)=>{if($.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){let c=t.shape;Object.defineProperty(t,"shape",{get:()=>{let u={...c};return Object.defineProperty(t,"shape",{value:u}),u}})}let o=ot(()=>fm(t));E(e._zod,"propValues",()=>{let c=t.shape,u={};for(let l in c){let d=c[l]._zod;if(d.values){u[l]??(u[l]=new Set);for(let m of d.values)u[l].add(m)}}return u});let n=Be,i=t.catchall,s;e._zod.parse=(c,u)=>{s??(s=o.value);let l=c.value;if(!n(l))return c.issues.push({expected:"object",code:"invalid_type",input:l,inst:e}),c;c.value={};let d=[],m=s.shape;for(let g of s.keys){let h=m[g],S=h._zod.optin==="optional",C=h._zod.optout==="optional",A=h._zod.run({value:l[g],issues:[]},u);A instanceof Promise?d.push(A.then(et=>pr(et,c,g,l,S,C))):pr(A,c,g,l,S,C)}return i?gm(d,l,c,u,o.value,e):d.length?Promise.all(d).then(()=>c):c}}),cs=p("$ZodObjectJIT",(e,t)=>{hm.init(e,t);let r=e._zod.parse,o=ot(()=>fm(t)),n=g=>{let h=new ln(["shape","payload","ctx"]),S=o.value,C=fe=>{let M=Wn(fe);return`shape[${M}]._zod.run({ value: input[${M}], issues: [] }, ctx)`};h.write("const input = payload.value;");let A=Object.create(null),et=0;for(let fe of S.keys)A[fe]=`key_${et++}`;h.write("const newResult = {};");for(let fe of S.keys){let M=A[fe],V=Wn(fe),Ql=g[fe],ed=Ql?._zod?.optin==="optional",s_=Ql?._zod?.optout==="optional";h.write(`const ${M} = ${C(fe)};`),ed&&s_?h.write(`
36
+ `))}};var Oa={major:4,minor:4,patch:3};var $=p("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Oa;let o=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&o.unshift(e);for(let n of o)for(let i of n._zod.onattach)i(e);if(o.length===0)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let n=(s,c,u)=>{let l=ze(s),d;for(let m of c){if(m._zod.def.when){if(Ao(s)||!m._zod.def.when(s))continue}else if(l)continue;let g=s.issues.length,h=m._zod.check(s);if(h instanceof Promise&&u?.async===!1)throw new de;if(d||h instanceof Promise)d=(d??Promise.resolve()).then(async()=>{await h,s.issues.length!==g&&(l||(l=ze(s,g)))});else{if(s.issues.length===g)continue;l||(l=ze(s,g))}}return d?d.then(()=>s):s},i=(s,c,u)=>{if(ze(s))return s.aborted=!0,s;let l=n(c,o,u);if(l instanceof Promise){if(u.async===!1)throw new de;return l.then(d=>e._zod.parse(d,u))}return e._zod.parse(l,u)};e._zod.run=(s,c)=>{if(c.skipChecks)return e._zod.parse(s,c);if(c.direction==="backward"){let l=e._zod.parse({value:s.value,issues:[]},{...c,skipChecks:!0});return l instanceof Promise?l.then(d=>i(d,s,c)):i(l,s,c)}let u=e._zod.parse(s,c);if(u instanceof Promise){if(c.async===!1)throw new de;return u.then(l=>n(l,o,c))}return n(u,o,c)}}E(e,"~standard",()=>({validate:n=>{try{let i=No(e,n);return i.success?{value:i.data}:{issues:i.error?.issues}}catch{return Ro(e,n).then(s=>s.success?{value:s.data}:{issues:s.error?.issues})}},vendor:"zod",version:1}))}),qe=p("$ZodString",(e,t)=>{$.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??na(e._zod.bag),e._zod.parse=(r,o)=>{if(t.coerce)try{r.value=String(r.value)}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r}}),D=p("$ZodStringFormat",(e,t)=>{gt.init(e,t),qe.init(e,t)}),Aa=p("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=Zo),D.init(e,t)}),Pa=p("$ZodUUID",(e,t)=>{if(t.version){let o={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(o===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=We(o))}else t.pattern??(t.pattern=We());D.init(e,t)}),Ca=p("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=Vo),D.init(e,t)}),Na=p("$ZodURL",(e,t)=>{D.init(e,t),e._zod.check=r=>{try{let o=r.value.trim();if(!t.normalize&&t.protocol?.source===Yo.source&&!/^https?:\/\//i.test(o)){r.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:r.value,inst:e,continue:!t.abort});return}let n=new URL(o);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(n.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:r.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(n.protocol.endsWith(":")?n.protocol.slice(0,-1):n.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:r.value,inst:e,continue:!t.abort})),t.normalize?r.value=n.href:r.value=o;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort})}}}),Ra=p("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=Bo()),D.init(e,t)}),Da=p("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=Fo),D.init(e,t)}),za=p("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=Do),D.init(e,t)}),Ua=p("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=zo),D.init(e,t)}),ja=p("$ZodULID",(e,t)=>{t.pattern??(t.pattern=Uo),D.init(e,t)}),La=p("$ZodXID",(e,t)=>{t.pattern??(t.pattern=jo),D.init(e,t)}),Fa=p("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=Lo),D.init(e,t)}),Ma=p("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=ta(t)),D.init(e,t)}),Za=p("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=Qo),D.init(e,t)}),Va=p("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=ea(t)),D.init(e,t)}),Ba=p("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=Mo),D.init(e,t)}),Ha=p("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=Ho),D.init(e,t),e._zod.bag.format="ipv4"}),Ga=p("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=Go),D.init(e,t),e._zod.bag.format="ipv6",e._zod.check=r=>{try{new URL(`http://[${r.value}]`)}catch{r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:e,continue:!t.abort})}}}),Ka=p("$ZodMAC",(e,t)=>{t.pattern??(t.pattern=Ko(t.delimiter)),D.init(e,t),e._zod.bag.format="mac"}),Wa=p("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=Wo),D.init(e,t)}),qa=p("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=qo),D.init(e,t),e._zod.check=r=>{let o=r.value.split("/");try{if(o.length!==2)throw new Error;let[n,i]=o;if(!i)throw new Error;let s=Number(i);if(`${s}`!==i)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:e,continue:!t.abort})}}});function Ja(e){if(e==="")return!0;if(/\s/.test(e)||e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}var Ya=p("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=Jo),D.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=r=>{Ja(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort})}});function bm(e){if(!cr.test(e))return!1;let t=e.replace(/[-_]/g,o=>o==="-"?"+":"/"),r=t.padEnd(Math.ceil(t.length/4)*4,"=");return Ja(r)}var Xa=p("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=cr),D.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=r=>{bm(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort})}}),Qa=p("$ZodE164",(e,t)=>{t.pattern??(t.pattern=Xo),D.init(e,t)});function ym(e,t=null){try{let r=e.split(".");if(r.length!==3)return!1;let[o]=r;if(!o)return!1;let n=JSON.parse(atob(o));return!("typ"in n&&n?.typ!=="JWT"||!n.alg||t&&(!("alg"in n)||n.alg!==t))}catch{return!1}}var es=p("$ZodJWT",(e,t)=>{D.init(e,t),e._zod.check=r=>{ym(r.value,t.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort})}}),ts=p("$ZodCustomStringFormat",(e,t)=>{D.init(e,t),e._zod.check=r=>{t.fn(r.value)||r.issues.push({code:"invalid_format",format:t.format,input:r.value,inst:e,continue:!t.abort})}}),hr=p("$ZodNumber",(e,t)=>{$.init(e,t),e._zod.pattern=e._zod.bag.pattern??ur,e._zod.parse=(r,o)=>{if(t.coerce)try{r.value=Number(r.value)}catch{}let n=r.value;if(typeof n=="number"&&!Number.isNaN(n)&&Number.isFinite(n))return r;let i=typeof n=="number"?Number.isNaN(n)?"NaN":Number.isFinite(n)?void 0:"Infinity":void 0;return r.issues.push({expected:"number",code:"invalid_type",input:n,inst:e,...i?{received:i}:{}}),r}}),ns=p("$ZodNumberFormat",(e,t)=>{da.init(e,t),hr.init(e,t)}),pn=p("$ZodBoolean",(e,t)=>{$.init(e,t),e._zod.pattern=oa,e._zod.parse=(r,o)=>{if(t.coerce)try{r.value=!!r.value}catch{}let n=r.value;return typeof n=="boolean"||r.issues.push({expected:"boolean",code:"invalid_type",input:n,inst:e}),r}}),_r=p("$ZodBigInt",(e,t)=>{$.init(e,t),e._zod.pattern=ra,e._zod.parse=(r,o)=>{if(t.coerce)try{r.value=BigInt(r.value)}catch{}return typeof r.value=="bigint"||r.issues.push({expected:"bigint",code:"invalid_type",input:r.value,inst:e}),r}}),rs=p("$ZodBigIntFormat",(e,t)=>{ma.init(e,t),_r.init(e,t)}),is=p("$ZodSymbol",(e,t)=>{$.init(e,t),e._zod.parse=(r,o)=>{let n=r.value;return typeof n=="symbol"||r.issues.push({expected:"symbol",code:"invalid_type",input:n,inst:e}),r}}),os=p("$ZodUndefined",(e,t)=>{$.init(e,t),e._zod.pattern=sa,e._zod.values=new Set([void 0]),e._zod.parse=(r,o)=>{let n=r.value;return typeof n>"u"||r.issues.push({expected:"undefined",code:"invalid_type",input:n,inst:e}),r}}),as=p("$ZodNull",(e,t)=>{$.init(e,t),e._zod.pattern=aa,e._zod.values=new Set([null]),e._zod.parse=(r,o)=>{let n=r.value;return n===null||r.issues.push({expected:"null",code:"invalid_type",input:n,inst:e}),r}}),ss=p("$ZodAny",(e,t)=>{$.init(e,t),e._zod.parse=r=>r}),cs=p("$ZodUnknown",(e,t)=>{$.init(e,t),e._zod.parse=r=>r}),us=p("$ZodNever",(e,t)=>{$.init(e,t),e._zod.parse=(r,o)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:e}),r)}),ls=p("$ZodVoid",(e,t)=>{$.init(e,t),e._zod.parse=(r,o)=>{let n=r.value;return typeof n>"u"||r.issues.push({expected:"void",code:"invalid_type",input:n,inst:e}),r}}),ds=p("$ZodDate",(e,t)=>{$.init(e,t),e._zod.parse=(r,o)=>{if(t.coerce)try{r.value=new Date(r.value)}catch{}let n=r.value,i=n instanceof Date;return i&&!Number.isNaN(n.getTime())||r.issues.push({expected:"date",code:"invalid_type",input:n,...i?{received:"Invalid Date"}:{},inst:e}),r}});function om(e,t,r){e.issues.length&&t.issues.push(...Q(r,e.issues)),t.value[r]=e.value}var ms=p("$ZodArray",(e,t)=>{$.init(e,t),e._zod.parse=(r,o)=>{let n=r.value;if(!Array.isArray(n))return r.issues.push({expected:"array",code:"invalid_type",input:n,inst:e}),r;r.value=Array(n.length);let i=[];for(let s=0;s<n.length;s++){let c=n[s],u=t.element._zod.run({value:c,issues:[]},o);u instanceof Promise?i.push(u.then(l=>om(l,r,s))):om(u,r,s)}return i.length?Promise.all(i).then(()=>r):r}});function gr(e,t,r,o,n,i){let s=r in o;if(e.issues.length){if(n&&i&&!s)return;t.issues.push(...Q(r,e.issues))}if(!s&&!n){e.issues.length||t.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[r]});return}e.value===void 0?s&&(t.value[r]=void 0):t.value[r]=e.value}function xm(e){let t=Object.keys(e.shape);for(let o of t)if(!e.shape?.[o]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${o}": expected a Zod schema`);let r=wo(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(r)}}function km(e,t,r,o,n,i){let s=[],c=n.keySet,u=n.catchall._zod,l=u.def.type,d=u.optin==="optional",m=u.optout==="optional";for(let g in t){if(g==="__proto__"||c.has(g))continue;if(l==="never"){s.push(g);continue}let h=u.run({value:t[g],issues:[]},o);h instanceof Promise?e.push(h.then(S=>gr(S,r,g,t,d,m))):gr(h,r,g,t,d,m)}return s.length&&r.issues.push({code:"unrecognized_keys",keys:s,input:t,inst:i}),e.length?Promise.all(e).then(()=>r):r}var Sm=p("$ZodObject",(e,t)=>{if($.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){let c=t.shape;Object.defineProperty(t,"shape",{get:()=>{let u={...c};return Object.defineProperty(t,"shape",{value:u}),u}})}let o=ut(()=>xm(t));E(e._zod,"propValues",()=>{let c=t.shape,u={};for(let l in c){let d=c[l]._zod;if(d.values){u[l]??(u[l]=new Set);for(let m of d.values)u[l].add(m)}}return u});let n=Ke,i=t.catchall,s;e._zod.parse=(c,u)=>{s??(s=o.value);let l=c.value;if(!n(l))return c.issues.push({expected:"object",code:"invalid_type",input:l,inst:e}),c;c.value={};let d=[],m=s.shape;for(let g of s.keys){let h=m[g],S=h._zod.optin==="optional",R=h._zod.optout==="optional",P=h._zod.run({value:l[g],issues:[]},u);P instanceof Promise?d.push(P.then(rt=>gr(rt,c,g,l,S,R))):gr(P,c,g,l,S,R)}return i?km(d,l,c,u,o.value,e):d.length?Promise.all(d).then(()=>c):c}}),ps=p("$ZodObjectJIT",(e,t)=>{Sm.init(e,t);let r=e._zod.parse,o=ut(()=>xm(t)),n=g=>{let h=new mn(["shape","payload","ctx"]),S=o.value,R=be=>{let M=Jn(be);return`shape[${M}]._zod.run({ value: input[${M}], issues: [] }, ctx)`};h.write("const input = payload.value;");let P=Object.create(null),rt=0;for(let be of S.keys)P[be]=`key_${rt++}`;h.write("const newResult = {};");for(let be of S.keys){let M=P[be],H=Jn(be),ad=g[be],sd=ad?._zod?.optin==="optional",x_=ad?._zod?.optout==="optional";h.write(`const ${M} = ${R(be)};`),sd&&x_?h.write(`
37
37
  if (${M}.issues.length) {
38
- if (${V} in input) {
38
+ if (${H} in input) {
39
39
  payload.issues = payload.issues.concat(${M}.issues.map(iss => ({
40
40
  ...iss,
41
- path: iss.path ? [${V}, ...iss.path] : [${V}]
41
+ path: iss.path ? [${H}, ...iss.path] : [${H}]
42
42
  })));
43
43
  }
44
44
  }
45
45
 
46
46
  if (${M}.value === undefined) {
47
- if (${V} in input) {
48
- newResult[${V}] = undefined;
47
+ if (${H} in input) {
48
+ newResult[${H}] = undefined;
49
49
  }
50
50
  } else {
51
- newResult[${V}] = ${M}.value;
51
+ newResult[${H}] = ${M}.value;
52
52
  }
53
53
 
54
- `):ed?h.write(`
54
+ `):sd?h.write(`
55
55
  if (${M}.issues.length) {
56
56
  payload.issues = payload.issues.concat(${M}.issues.map(iss => ({
57
57
  ...iss,
58
- path: iss.path ? [${V}, ...iss.path] : [${V}]
58
+ path: iss.path ? [${H}, ...iss.path] : [${H}]
59
59
  })));
60
60
  }
61
61
 
62
62
  if (${M}.value === undefined) {
63
- if (${V} in input) {
64
- newResult[${V}] = undefined;
63
+ if (${H} in input) {
64
+ newResult[${H}] = undefined;
65
65
  }
66
66
  } else {
67
- newResult[${V}] = ${M}.value;
67
+ newResult[${H}] = ${M}.value;
68
68
  }
69
69
 
70
70
  `):h.write(`
71
- const ${M}_present = ${V} in input;
71
+ const ${M}_present = ${H} in input;
72
72
  if (${M}.issues.length) {
73
73
  payload.issues = payload.issues.concat(${M}.issues.map(iss => ({
74
74
  ...iss,
75
- path: iss.path ? [${V}, ...iss.path] : [${V}]
75
+ path: iss.path ? [${H}, ...iss.path] : [${H}]
76
76
  })));
77
77
  }
78
78
  if (!${M}_present && !${M}.issues.length) {
@@ -80,69 +80,119 @@ Expecting one of '${o.join("', '")}'`);let n=`${t}Help`;return this.on(n,i=>{let
80
80
  code: "invalid_type",
81
81
  expected: "nonoptional",
82
82
  input: undefined,
83
- path: [${V}]
83
+ path: [${H}]
84
84
  });
85
85
  }
86
86
 
87
87
  if (${M}_present) {
88
88
  if (${M}.value === undefined) {
89
- newResult[${V}] = undefined;
89
+ newResult[${H}] = undefined;
90
90
  } else {
91
- newResult[${V}] = ${M}.value;
91
+ newResult[${H}] = ${M}.value;
92
92
  }
93
93
  }
94
94
 
95
- `)}h.write("payload.value = newResult;"),h.write("return payload;");let a_=h.compile();return(fe,M)=>a_(g,fe,M)},i,s=Be,c=!Ve.jitless,l=c&&bo.value,d=t.catchall,m;e._zod.parse=(g,h)=>{m??(m=o.value);let S=g.value;return s(S)?c&&l&&h?.async===!1&&h.jitless!==!0?(i||(i=n(t.shape)),g=i(g,h),d?gm([],S,g,h,m,e):g):r(g,h):(g.issues.push({expected:"object",code:"invalid_type",input:S,inst:e}),g)}});function Qd(e,t,r,o){for(let i of e)if(i.issues.length===0)return t.value=i.value,t;let n=e.filter(i=>!Ne(i));return n.length===1?(t.value=n[0].value,n[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(i=>i.issues.map(s=>W(s,o,F())))}),t)}var mn=p("$ZodUnion",(e,t)=>{$.init(e,t),E(e._zod,"optin",()=>t.options.some(o=>o._zod.optin==="optional")?"optional":void 0),E(e._zod,"optout",()=>t.options.some(o=>o._zod.optout==="optional")?"optional":void 0),E(e._zod,"values",()=>{if(t.options.every(o=>o._zod.values))return new Set(t.options.flatMap(o=>Array.from(o._zod.values)))}),E(e._zod,"pattern",()=>{if(t.options.every(o=>o._zod.pattern)){let o=t.options.map(n=>n._zod.pattern);return new RegExp(`^(${o.map(n=>en(n.source)).join("|")})$`)}});let r=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(o,n)=>{if(r)return r(o,n);let i=!1,s=[];for(let c of t.options){let u=c._zod.run({value:o.value,issues:[]},n);if(u instanceof Promise)s.push(u),i=!0;else{if(u.issues.length===0)return u;s.push(u)}}return i?Promise.all(s).then(c=>Qd(c,o,e,n)):Qd(s,o,e,n)}});function em(e,t,r,o){let n=e.filter(i=>i.issues.length===0);return n.length===1?(t.value=n[0].value,t):(n.length===0?t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(i=>i.issues.map(s=>W(s,o,F())))}):t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:[],inclusive:!1}),t)}var us=p("$ZodXor",(e,t)=>{mn.init(e,t),t.inclusive=!1;let r=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(o,n)=>{if(r)return r(o,n);let i=!1,s=[];for(let c of t.options){let u=c._zod.run({value:o.value,issues:[]},n);u instanceof Promise?(s.push(u),i=!0):s.push(u)}return i?Promise.all(s).then(c=>em(c,o,e,n)):em(s,o,e,n)}}),ls=p("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,mn.init(e,t);let r=e._zod.parse;E(e._zod,"propValues",()=>{let n={};for(let i of t.options){let s=i._zod.propValues;if(!s||Object.keys(s).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(i)}"`);for(let[c,u]of Object.entries(s)){n[c]||(n[c]=new Set);for(let l of u)n[c].add(l)}}return n});let o=ot(()=>{let n=t.options,i=new Map;for(let s of n){let c=s._zod.propValues?.[t.discriminator];if(!c||c.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(s)}"`);for(let u of c){if(i.has(u))throw new Error(`Duplicate discriminator value "${String(u)}"`);i.set(u,s)}}return i});e._zod.parse=(n,i)=>{let s=n.value;if(!Be(s))return n.issues.push({code:"invalid_type",expected:"object",input:s,inst:e}),n;let c=o.value.get(s?.[t.discriminator]);return c?c._zod.run(n,i):t.unionFallback||i.direction==="backward"?r(n,i):(n.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,options:Array.from(o.value.keys()),input:s,path:[t.discriminator],inst:e}),n)}}),ds=p("$ZodIntersection",(e,t)=>{$.init(e,t),e._zod.parse=(r,o)=>{let n=r.value,i=t.left._zod.run({value:n,issues:[]},o),s=t.right._zod.run({value:n,issues:[]},o);return i instanceof Promise||s instanceof Promise?Promise.all([i,s]).then(([u,l])=>tm(r,u,l)):tm(r,i,s)}});function $a(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(Ae(e)&&Ae(t)){let r=Object.keys(t),o=Object.keys(e).filter(i=>r.indexOf(i)!==-1),n={...e,...t};for(let i of o){let s=$a(e[i],t[i]);if(!s.valid)return{valid:!1,mergeErrorPath:[i,...s.mergeErrorPath]};n[i]=s.data}return{valid:!0,data:n}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let r=[];for(let o=0;o<e.length;o++){let n=e[o],i=t[o],s=$a(n,i);if(!s.valid)return{valid:!1,mergeErrorPath:[o,...s.mergeErrorPath]};r.push(s.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}function tm(e,t,r){let o=new Map,n;for(let c of t.issues)if(c.code==="unrecognized_keys"){n??(n=c);for(let u of c.keys)o.has(u)||o.set(u,{}),o.get(u).l=!0}else e.issues.push(c);for(let c of r.issues)if(c.code==="unrecognized_keys")for(let u of c.keys)o.has(u)||o.set(u,{}),o.get(u).r=!0;else e.issues.push(c);let i=[...o].filter(([,c])=>c.l&&c.r).map(([c])=>c);if(i.length&&n&&e.issues.push({...n,keys:i}),Ne(e))return e;let s=$a(t.value,r.value);if(!s.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(s.mergeErrorPath)}`);return e.value=s.data,e}var hr=p("$ZodTuple",(e,t)=>{$.init(e,t);let r=t.items;e._zod.parse=(o,n)=>{let i=o.value;if(!Array.isArray(i))return o.issues.push({input:i,inst:e,expected:"tuple",code:"invalid_type"}),o;o.value=[];let s=[],c=nm(r,"optin"),u=nm(r,"optout");if(!t.rest){if(i.length<c)return o.issues.push({code:"too_small",minimum:c,inclusive:!0,input:i,inst:e,origin:"array"}),o;i.length>r.length&&o.issues.push({code:"too_big",maximum:r.length,inclusive:!0,input:i,inst:e,origin:"array"})}let l=new Array(r.length);for(let d=0;d<r.length;d++){let m=r[d]._zod.run({value:i[d],issues:[]},n);m instanceof Promise?s.push(m.then(g=>{l[d]=g})):l[d]=m}if(t.rest){let d=r.length-1,m=i.slice(r.length);for(let g of m){d++;let h=t.rest._zod.run({value:g,issues:[]},n);h instanceof Promise?s.push(h.then(S=>rm(S,o,d))):rm(h,o,d)}}return s.length?Promise.all(s).then(()=>im(l,o,r,i,u)):im(l,o,r,i,u)}});function nm(e,t){for(let r=e.length-1;r>=0;r--)if(e[r]._zod[t]!=="optional")return r+1;return 0}function rm(e,t,r){e.issues.length&&t.issues.push(...Y(r,e.issues)),t.value[r]=e.value}function im(e,t,r,o,n){for(let i=0;i<r.length;i++){let s=e[i],c=i<o.length;if(s.issues.length){if(!c&&i>=n){t.value.length=i;break}t.issues.push(...Y(i,s.issues))}t.value[i]=s.value}for(let i=t.value.length-1;i>=o.length&&(r[i]._zod.optout==="optional"&&t.value[i]===void 0);i--)t.value.length=i;return t}var ms=p("$ZodRecord",(e,t)=>{$.init(e,t),e._zod.parse=(r,o)=>{let n=r.value;if(!Ae(n))return r.issues.push({expected:"record",code:"invalid_type",input:n,inst:e}),r;let i=[],s=t.keyType._zod.values;if(s){r.value={};let c=new Set;for(let l of s)if(typeof l=="string"||typeof l=="number"||typeof l=="symbol"){c.add(typeof l=="number"?l.toString():l);let d=t.keyType._zod.run({value:l,issues:[]},o);if(d instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(d.issues.length){r.issues.push({code:"invalid_key",origin:"record",issues:d.issues.map(h=>W(h,o,F())),input:l,path:[l],inst:e});continue}let m=d.value,g=t.valueType._zod.run({value:n[l],issues:[]},o);g instanceof Promise?i.push(g.then(h=>{h.issues.length&&r.issues.push(...Y(l,h.issues)),r.value[m]=h.value})):(g.issues.length&&r.issues.push(...Y(l,g.issues)),r.value[m]=g.value)}let u;for(let l in n)c.has(l)||(u=u??[],u.push(l));u&&u.length>0&&r.issues.push({code:"unrecognized_keys",input:n,inst:e,keys:u})}else{r.value={};for(let c of Reflect.ownKeys(n)){if(c==="__proto__"||!Object.prototype.propertyIsEnumerable.call(n,c))continue;let u=t.keyType._zod.run({value:c,issues:[]},o);if(u instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof c=="string"&&sr.test(c)&&u.issues.length){let m=t.keyType._zod.run({value:Number(c),issues:[]},o);if(m instanceof Promise)throw new Error("Async schemas not supported in object keys currently");m.issues.length===0&&(u=m)}if(u.issues.length){t.mode==="loose"?r.value[c]=n[c]:r.issues.push({code:"invalid_key",origin:"record",issues:u.issues.map(m=>W(m,o,F())),input:c,path:[c],inst:e});continue}let d=t.valueType._zod.run({value:n[c],issues:[]},o);d instanceof Promise?i.push(d.then(m=>{m.issues.length&&r.issues.push(...Y(c,m.issues)),r.value[u.value]=m.value})):(d.issues.length&&r.issues.push(...Y(c,d.issues)),r.value[u.value]=d.value)}}return i.length?Promise.all(i).then(()=>r):r}}),ps=p("$ZodMap",(e,t)=>{$.init(e,t),e._zod.parse=(r,o)=>{let n=r.value;if(!(n instanceof Map))return r.issues.push({expected:"map",code:"invalid_type",input:n,inst:e}),r;let i=[];r.value=new Map;for(let[s,c]of n){let u=t.keyType._zod.run({value:s,issues:[]},o),l=t.valueType._zod.run({value:c,issues:[]},o);u instanceof Promise||l instanceof Promise?i.push(Promise.all([u,l]).then(([d,m])=>{om(d,m,r,s,n,e,o)})):om(u,l,r,s,n,e,o)}return i.length?Promise.all(i).then(()=>r):r}});function om(e,t,r,o,n,i,s){e.issues.length&&(tn.has(typeof o)?r.issues.push(...Y(o,e.issues)):r.issues.push({code:"invalid_key",origin:"map",input:n,inst:i,issues:e.issues.map(c=>W(c,s,F()))})),t.issues.length&&(tn.has(typeof o)?r.issues.push(...Y(o,t.issues)):r.issues.push({origin:"map",code:"invalid_element",input:n,inst:i,key:o,issues:t.issues.map(c=>W(c,s,F()))})),r.value.set(e.value,t.value)}var fs=p("$ZodSet",(e,t)=>{$.init(e,t),e._zod.parse=(r,o)=>{let n=r.value;if(!(n instanceof Set))return r.issues.push({input:n,inst:e,expected:"set",code:"invalid_type"}),r;let i=[];r.value=new Set;for(let s of n){let c=t.valueType._zod.run({value:s,issues:[]},o);c instanceof Promise?i.push(c.then(u=>am(u,r))):am(c,r)}return i.length?Promise.all(i).then(()=>r):r}});function am(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value)}var gs=p("$ZodEnum",(e,t)=>{$.init(e,t);let r=Qt(t.entries),o=new Set(r);e._zod.values=o,e._zod.pattern=new RegExp(`^(${r.filter(n=>tn.has(typeof n)).map(n=>typeof n=="string"?oe(n):n.toString()).join("|")})$`),e._zod.parse=(n,i)=>{let s=n.value;return o.has(s)||n.issues.push({code:"invalid_value",values:r,input:s,inst:e}),n}}),hs=p("$ZodLiteral",(e,t)=>{if($.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");let r=new Set(t.values);e._zod.values=r,e._zod.pattern=new RegExp(`^(${t.values.map(o=>typeof o=="string"?oe(o):o?oe(o.toString()):String(o)).join("|")})$`),e._zod.parse=(o,n)=>{let i=o.value;return r.has(i)||o.issues.push({code:"invalid_value",values:t.values,input:i,inst:e}),o}}),_s=p("$ZodFile",(e,t)=>{$.init(e,t),e._zod.parse=(r,o)=>{let n=r.value;return n instanceof File||r.issues.push({expected:"file",code:"invalid_type",input:n,inst:e}),r}}),vs=p("$ZodTransform",(e,t)=>{$.init(e,t),e._zod.optin="optional",e._zod.parse=(r,o)=>{if(o.direction==="backward")throw new Oe(e.constructor.name);let n=t.transform(r.value,r);if(o.async)return(n instanceof Promise?n:Promise.resolve(n)).then(s=>(r.value=s,r.fallback=!0,r));if(n instanceof Promise)throw new se;return r.value=n,r.fallback=!0,r}});function sm(e,t){return t===void 0&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}var _r=p("$ZodOptional",(e,t)=>{$.init(e,t),e._zod.optin="optional",e._zod.optout="optional",E(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),E(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${en(r.source)})?$`):void 0}),e._zod.parse=(r,o)=>{if(t.innerType._zod.optin==="optional"){let n=r.value,i=t.innerType._zod.run(r,o);return i instanceof Promise?i.then(s=>sm(s,n)):sm(i,n)}return r.value===void 0?r:t.innerType._zod.run(r,o)}}),bs=p("$ZodExactOptional",(e,t)=>{_r.init(e,t),E(e._zod,"values",()=>t.innerType._zod.values),E(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(r,o)=>t.innerType._zod.run(r,o)}),ys=p("$ZodNullable",(e,t)=>{$.init(e,t),E(e._zod,"optin",()=>t.innerType._zod.optin),E(e._zod,"optout",()=>t.innerType._zod.optout),E(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${en(r.source)}|null)$`):void 0}),E(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(r,o)=>r.value===null?r:t.innerType._zod.run(r,o)}),xs=p("$ZodDefault",(e,t)=>{$.init(e,t),e._zod.optin="optional",E(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,o)=>{if(o.direction==="backward")return t.innerType._zod.run(r,o);if(r.value===void 0)return r.value=t.defaultValue,r;let n=t.innerType._zod.run(r,o);return n instanceof Promise?n.then(i=>cm(i,t)):cm(n,t)}});function cm(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var ks=p("$ZodPrefault",(e,t)=>{$.init(e,t),e._zod.optin="optional",E(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,o)=>(o.direction==="backward"||r.value===void 0&&(r.value=t.defaultValue),t.innerType._zod.run(r,o))}),Ss=p("$ZodNonOptional",(e,t)=>{$.init(e,t),E(e._zod,"values",()=>{let r=t.innerType._zod.values;return r?new Set([...r].filter(o=>o!==void 0)):void 0}),e._zod.parse=(r,o)=>{let n=t.innerType._zod.run(r,o);return n instanceof Promise?n.then(i=>um(i,e)):um(n,e)}});function um(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}var $s=p("$ZodSuccess",(e,t)=>{$.init(e,t),e._zod.parse=(r,o)=>{if(o.direction==="backward")throw new Oe("ZodSuccess");let n=t.innerType._zod.run(r,o);return n instanceof Promise?n.then(i=>(r.value=i.issues.length===0,r)):(r.value=n.issues.length===0,r)}}),Is=p("$ZodCatch",(e,t)=>{$.init(e,t),e._zod.optin="optional",E(e._zod,"optout",()=>t.innerType._zod.optout),E(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,o)=>{if(o.direction==="backward")return t.innerType._zod.run(r,o);let n=t.innerType._zod.run(r,o);return n instanceof Promise?n.then(i=>(r.value=i.value,i.issues.length&&(r.value=t.catchValue({...r,error:{issues:i.issues.map(s=>W(s,o,F()))},input:r.value}),r.issues=[],r.fallback=!0),r)):(r.value=n.value,n.issues.length&&(r.value=t.catchValue({...r,error:{issues:n.issues.map(i=>W(i,o,F()))},input:r.value}),r.issues=[],r.fallback=!0),r)}}),Es=p("$ZodNaN",(e,t)=>{$.init(e,t),e._zod.parse=(r,o)=>((typeof r.value!="number"||!Number.isNaN(r.value))&&r.issues.push({input:r.value,inst:e,expected:"nan",code:"invalid_type"}),r)}),vr=p("$ZodPipe",(e,t)=>{$.init(e,t),E(e._zod,"values",()=>t.in._zod.values),E(e._zod,"optin",()=>t.in._zod.optin),E(e._zod,"optout",()=>t.out._zod.optout),E(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,o)=>{if(o.direction==="backward"){let i=t.out._zod.run(r,o);return i instanceof Promise?i.then(s=>lr(s,t.in,o)):lr(i,t.in,o)}let n=t.in._zod.run(r,o);return n instanceof Promise?n.then(i=>lr(i,t.out,o)):lr(n,t.out,o)}});function lr(e,t,r){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues,fallback:e.fallback},r)}var pn=p("$ZodCodec",(e,t)=>{$.init(e,t),E(e._zod,"values",()=>t.in._zod.values),E(e._zod,"optin",()=>t.in._zod.optin),E(e._zod,"optout",()=>t.out._zod.optout),E(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,o)=>{if((o.direction||"forward")==="forward"){let i=t.in._zod.run(r,o);return i instanceof Promise?i.then(s=>dr(s,t,o)):dr(i,t,o)}else{let i=t.out._zod.run(r,o);return i instanceof Promise?i.then(s=>dr(s,t,o)):dr(i,t,o)}}});function dr(e,t,r){if(e.issues.length)return e.aborted=!0,e;if((r.direction||"forward")==="forward"){let n=t.transform(e.value,e);return n instanceof Promise?n.then(i=>mr(e,i,t.out,r)):mr(e,n,t.out,r)}else{let n=t.reverseTransform(e.value,e);return n instanceof Promise?n.then(i=>mr(e,i,t.in,r)):mr(e,n,t.in,r)}}function mr(e,t,r,o){return e.issues.length?(e.aborted=!0,e):r._zod.run({value:t,issues:e.issues},o)}var ws=p("$ZodPreprocess",(e,t)=>{vr.init(e,t)}),Os=p("$ZodReadonly",(e,t)=>{$.init(e,t),E(e._zod,"propValues",()=>t.innerType._zod.propValues),E(e._zod,"values",()=>t.innerType._zod.values),E(e._zod,"optin",()=>t.innerType?._zod?.optin),E(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(r,o)=>{if(o.direction==="backward")return t.innerType._zod.run(r,o);let n=t.innerType._zod.run(r,o);return n instanceof Promise?n.then(lm):lm(n)}});function lm(e){return e.value=Object.freeze(e.value),e}var Ts=p("$ZodTemplateLiteral",(e,t)=>{$.init(e,t);let r=[];for(let o of t.parts)if(typeof o=="object"&&o!==null){if(!o._zod.pattern)throw new Error(`Invalid template literal part, no pattern found: ${[...o._zod.traits].shift()}`);let n=o._zod.pattern instanceof RegExp?o._zod.pattern.source:o._zod.pattern;if(!n)throw new Error(`Invalid template literal part: ${o._zod.traits}`);let i=n.startsWith("^")?1:0,s=n.endsWith("$")?n.length-1:n.length;r.push(n.slice(i,s))}else if(o===null||xo.has(typeof o))r.push(oe(`${o}`));else throw new Error(`Invalid template literal part: ${o}`);e._zod.pattern=new RegExp(`^${r.join("")}$`),e._zod.parse=(o,n)=>typeof o.value!="string"?(o.issues.push({input:o.value,inst:e,expected:"string",code:"invalid_type"}),o):(e._zod.pattern.lastIndex=0,e._zod.pattern.test(o.value)||o.issues.push({input:o.value,inst:e,code:"invalid_format",format:t.format??"template_literal",pattern:e._zod.pattern.source}),o)}),Ps=p("$ZodFunction",(e,t)=>($.init(e,t),e._def=t,e._zod.def=t,e.implement=r=>{if(typeof r!="function")throw new Error("implement() must be called with a function");return function(...o){let n=e._def.input?Jn(e._def.input,o):o,i=Reflect.apply(r,this,n);return e._def.output?Jn(e._def.output,i):i}},e.implementAsync=r=>{if(typeof r!="function")throw new Error("implementAsync() must be called with a function");return async function(...o){let n=e._def.input?await Yn(e._def.input,o):o,i=await Reflect.apply(r,this,n);return e._def.output?await Yn(e._def.output,i):i}},e._zod.parse=(r,o)=>typeof r.value!="function"?(r.issues.push({code:"invalid_type",expected:"function",input:r.value,inst:e}),r):(e._def.output&&e._def.output._zod.def.type==="promise"?r.value=e.implementAsync(r.value):r.value=e.implement(r.value),r),e.input=(...r)=>{let o=e.constructor;return Array.isArray(r[0])?new o({type:"function",input:new hr({type:"tuple",items:r[0],rest:r[1]}),output:e._def.output}):new o({type:"function",input:r[0],output:e._def.output})},e.output=r=>{let o=e.constructor;return new o({type:"function",input:e._def.input,output:r})},e)),As=p("$ZodPromise",(e,t)=>{$.init(e,t),e._zod.parse=(r,o)=>Promise.resolve(r.value).then(n=>t.innerType._zod.run({value:n,issues:[]},o))}),Ns=p("$ZodLazy",(e,t)=>{$.init(e,t),E(e._zod,"innerType",()=>{let r=t;return r._cachedInner||(r._cachedInner=t.getter()),r._cachedInner}),E(e._zod,"pattern",()=>e._zod.innerType?._zod?.pattern),E(e._zod,"propValues",()=>e._zod.innerType?._zod?.propValues),E(e._zod,"optin",()=>e._zod.innerType?._zod?.optin??void 0),E(e._zod,"optout",()=>e._zod.innerType?._zod?.optout??void 0),e._zod.parse=(r,o)=>e._zod.innerType._zod.run(r,o)}),Cs=p("$ZodCustom",(e,t)=>{z.init(e,t),$.init(e,t),e._zod.parse=(r,o)=>r,e._zod.check=r=>{let o=r.value,n=t.fn(o);if(n instanceof Promise)return n.then(i=>dm(i,r,o,e));dm(n,r,o,e)}});function dm(e,t,r,o){if(!e){let n={code:"custom",input:r,inst:o,path:[...o._zod.def.path??[]],continue:!o._zod.def.abort};o._zod.def.params&&(n.params=o._zod.def.params),t.issues.push(at(n))}}var gn={};ye(gn,{ar:()=>_m,az:()=>vm,be:()=>ym,bg:()=>xm,ca:()=>km,cs:()=>Sm,da:()=>$m,de:()=>Im,el:()=>Em,en:()=>br,eo:()=>wm,es:()=>Om,fa:()=>Tm,fi:()=>Pm,fr:()=>Am,frCA:()=>Nm,he:()=>Cm,hr:()=>Rm,hu:()=>Dm,hy:()=>Um,id:()=>jm,is:()=>Lm,it:()=>Mm,ja:()=>Fm,ka:()=>Zm,kh:()=>Vm,km:()=>yr,ko:()=>Bm,lt:()=>Gm,mk:()=>Km,ms:()=>Wm,nl:()=>qm,no:()=>Jm,ota:()=>Ym,pl:()=>Qm,ps:()=>Xm,pt:()=>ep,ro:()=>tp,ru:()=>rp,sl:()=>ip,sv:()=>op,ta:()=>ap,th:()=>sp,tr:()=>cp,ua:()=>up,uk:()=>xr,ur:()=>lp,uz:()=>dp,vi:()=>mp,yo:()=>gp,zhCN:()=>pp,zhTW:()=>fp});var rb=()=>{let e={string:{unit:"\u062D\u0631\u0641",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},file:{unit:"\u0628\u0627\u064A\u062A",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},array:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},set:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"}};function t(n){return e[n]??null}let r={regex:"\u0645\u062F\u062E\u0644",email:"\u0628\u0631\u064A\u062F \u0625\u0644\u0643\u062A\u0631\u0648\u0646\u064A",url:"\u0631\u0627\u0628\u0637",emoji:"\u0625\u064A\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u064A\u062E \u0648\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",date:"\u062A\u0627\u0631\u064A\u062E \u0628\u0645\u0639\u064A\u0627\u0631 ISO",time:"\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",duration:"\u0645\u062F\u0629 \u0628\u0645\u0639\u064A\u0627\u0631 ISO",ipv4:"\u0639\u0646\u0648\u0627\u0646 IPv4",ipv6:"\u0639\u0646\u0648\u0627\u0646 IPv6",cidrv4:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv4",cidrv6:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv6",base64:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64-encoded",base64url:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64url-encoded",json_string:"\u0646\u064E\u0635 \u0639\u0644\u0649 \u0647\u064A\u0626\u0629 JSON",e164:"\u0631\u0642\u0645 \u0647\u0627\u062A\u0641 \u0628\u0645\u0639\u064A\u0627\u0631 E.164",jwt:"JWT",template_literal:"\u0645\u062F\u062E\u0644"},o={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[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 ${c}`:`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${i}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${c}`}case"invalid_value":return n.values.length===1?`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${_(n.values[0])}`:`\u0627\u062E\u062A\u064A\u0627\u0631 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062A\u0648\u0642\u0639 \u0627\u0646\u062A\u0642\u0627\u0621 \u0623\u062D\u062F \u0647\u0630\u0647 \u0627\u0644\u062E\u064A\u0627\u0631\u0627\u062A: ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(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"} ${i} ${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"} ${i} ${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(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 ${i} ${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 ${i} ${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0628\u062F\u0623 \u0628\u0640 "${n.prefix}"`:i.format==="ends_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0646\u062A\u0647\u064A \u0628\u0640 "${i.suffix}"`:i.format==="includes"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u062A\u0636\u0645\u0651\u064E\u0646 "${i.includes}"`:i.format==="regex"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0637\u0627\u0628\u0642 \u0627\u0644\u0646\u0645\u0637 ${i.pattern}`:`${r[i.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":""}: ${f(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 _m(){return{localeError:rb()}}var ib=()=>{let e={string:{unit:"simvol",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"element",verb:"olmal\u0131d\u0131r"},set:{unit:"element",verb:"olmal\u0131d\u0131r"}};function t(n){return e[n]??null}let r={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},o={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return/^[A-Z]/.test(n.expected)?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n instanceof ${n.expected}, daxil olan ${c}`:`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${i}, daxil olan ${c}`}case"invalid_value":return n.values.length===1?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${_(n.values[0])}`:`Yanl\u0131\u015F se\xE7im: a\u015Fa\u011F\u0131dak\u0131lardan biri olmal\u0131d\u0131r: ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${n.origin??"d\u0259y\u0259r"} ${i}${n.maximum.toString()} ${s.unit??"element"}`:`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${n.origin??"d\u0259y\u0259r"} ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${n.origin} ${i}${n.minimum.toString()} ${s.unit}`:`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${n.origin} ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Yanl\u0131\u015F m\u0259tn: "${i.prefix}" il\u0259 ba\u015Flamal\u0131d\u0131r`:i.format==="ends_with"?`Yanl\u0131\u015F m\u0259tn: "${i.suffix}" il\u0259 bitm\u0259lidir`:i.format==="includes"?`Yanl\u0131\u015F m\u0259tn: "${i.includes}" daxil olmal\u0131d\u0131r`:i.format==="regex"?`Yanl\u0131\u015F m\u0259tn: ${i.pattern} \u015Fablonuna uy\u011Fun olmal\u0131d\u0131r`:`Yanl\u0131\u015F ${r[i.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":""}: ${f(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 vm(){return{localeError:ib()}}function bm(e,t,r,o){let n=Math.abs(e),i=n%10,s=n%100;return s>=11&&s<=19?o:i===1?t:i>=2&&i<=4?r:o}var ob=()=>{let e={string:{unit:{one:"\u0441\u0456\u043C\u0432\u0430\u043B",few:"\u0441\u0456\u043C\u0432\u0430\u043B\u044B",many:"\u0441\u0456\u043C\u0432\u0430\u043B\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u044B",many:"\u0431\u0430\u0439\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"}};function t(n){return e[n]??null}let r={regex:"\u0443\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0430\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0456 \u0447\u0430\u0441",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0447\u0430\u0441",duration:"ISO \u043F\u0440\u0430\u0446\u044F\u0433\u043B\u0430\u0441\u0446\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0430\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0430\u0441",cidrv4:"IPv4 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",base64:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64",base64url:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64url",json_string:"JSON \u0440\u0430\u0434\u043E\u043A",e164:"\u043D\u0443\u043C\u0430\u0440 E.164",jwt:"JWT",template_literal:"\u0443\u0432\u043E\u0434"},o={nan:"NaN",number:"\u043B\u0456\u043A",array:"\u043C\u0430\u0441\u0456\u045E"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[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 ${c}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F ${i}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${c}`}case"invalid_value":return n.values.length===1?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F ${_(n.values[0])}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0432\u0430\u0440\u044B\u044F\u043D\u0442: \u0447\u0430\u043A\u0430\u045E\u0441\u044F \u0430\u0434\u0437\u0456\u043D \u0437 ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);if(s){let c=Number(n.maximum),u=bm(c,s.unit.one,s.unit.few,s.unit.many);return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${n.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${s.verb} ${i}${n.maximum.toString()} ${u}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${n.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);if(s){let c=Number(n.minimum),u=bm(c,s.unit.one,s.unit.few,s.unit.many);return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${n.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${s.verb} ${i}${n.minimum.toString()} ${u}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${n.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u043F\u0430\u0447\u044B\u043D\u0430\u0446\u0446\u0430 \u0437 "${i.prefix}"`:i.format==="ends_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u0430\u043A\u0430\u043D\u0447\u0432\u0430\u0446\u0446\u0430 \u043D\u0430 "${i.suffix}"`:i.format==="includes"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u043C\u044F\u0448\u0447\u0430\u0446\u044C "${i.includes}"`:i.format==="regex"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0430\u0434\u043F\u0430\u0432\u044F\u0434\u0430\u0446\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${i.pattern}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B ${r[i.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"}: ${f(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 ym(){return{localeError:ob()}}var ab=()=>{let e={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},file:{unit:"\u0431\u0430\u0439\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"}};function t(n){return e[n]??null}let r={regex:"\u0432\u0445\u043E\u0434",email:"\u0438\u043C\u0435\u0439\u043B \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0436\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u043F\u0440\u043E\u0434\u044A\u043B\u0436\u0438\u0442\u0435\u043B\u043D\u043E\u0441\u0442",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"base64-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",base64url:"base64url-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",json_string:"JSON \u043D\u0438\u0437",e164:"E.164 \u043D\u043E\u043C\u0435\u0440",jwt:"JWT",template_literal:"\u0432\u0445\u043E\u0434"},o={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[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 ${c}`:`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${i}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${c}`}case"invalid_value":return n.values.length===1?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${_(n.values[0])}`:`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u043E\u043F\u0446\u0438\u044F: \u043E\u0447\u0430\u043A\u0432\u0430\u043D\u043E \u0435\u0434\u043D\u043E \u043E\u0442 ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(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 ${i}${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 ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(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 ${i}${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 ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;if(i.format==="starts_with")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u0432\u0430 \u0441 "${i.prefix}"`;if(i.format==="ends_with")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u0432\u044A\u0440\u0448\u0432\u0430 \u0441 "${i.suffix}"`;if(i.format==="includes")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0432\u043A\u043B\u044E\u0447\u0432\u0430 "${i.includes}"`;if(i.format==="regex")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0441\u044A\u0432\u043F\u0430\u0434\u0430 \u0441 ${i.pattern}`;let s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D";return i.format==="emoji"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),i.format==="datetime"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),i.format==="date"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),i.format==="time"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),i.format==="duration"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),`${s} ${r[i.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":""}: ${f(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 xm(){return{localeError:ab()}}var sb=()=>{let e={string:{unit:"car\xE0cters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"}};function t(n){return e[n]??null}let r={regex:"entrada",email:"adre\xE7a electr\xF2nica",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i hora ISO",date:"data ISO",time:"hora ISO",duration:"durada ISO",ipv4:"adre\xE7a IPv4",ipv6:"adre\xE7a IPv6",cidrv4:"rang IPv4",cidrv6:"rang IPv6",base64:"cadena codificada en base64",base64url:"cadena codificada en base64url",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},o={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return/^[A-Z]/.test(n.expected)?`Tipus inv\xE0lid: s'esperava instanceof ${n.expected}, s'ha rebut ${c}`:`Tipus inv\xE0lid: s'esperava ${i}, s'ha rebut ${c}`}case"invalid_value":return n.values.length===1?`Valor inv\xE0lid: s'esperava ${_(n.values[0])}`:`Opci\xF3 inv\xE0lida: s'esperava una de ${f(n.values," o ")}`;case"too_big":{let i=n.inclusive?"com a m\xE0xim":"menys de",s=t(n.origin);return s?`Massa gran: s'esperava que ${n.origin??"el valor"} contingu\xE9s ${i} ${n.maximum.toString()} ${s.unit??"elements"}`:`Massa gran: s'esperava que ${n.origin??"el valor"} fos ${i} ${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?"com a m\xEDnim":"m\xE9s de",s=t(n.origin);return s?`Massa petit: s'esperava que ${n.origin} contingu\xE9s ${i} ${n.minimum.toString()} ${s.unit}`:`Massa petit: s'esperava que ${n.origin} fos ${i} ${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Format inv\xE0lid: ha de comen\xE7ar amb "${i.prefix}"`:i.format==="ends_with"?`Format inv\xE0lid: ha d'acabar amb "${i.suffix}"`:i.format==="includes"?`Format inv\xE0lid: ha d'incloure "${i.includes}"`:i.format==="regex"?`Format inv\xE0lid: ha de coincidir amb el patr\xF3 ${i.pattern}`:`Format inv\xE0lid per a ${r[i.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":""}: ${f(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 km(){return{localeError:sb()}}var cb=()=>{let e={string:{unit:"znak\u016F",verb:"m\xEDt"},file:{unit:"bajt\u016F",verb:"m\xEDt"},array:{unit:"prvk\u016F",verb:"m\xEDt"},set:{unit:"prvk\u016F",verb:"m\xEDt"}};function t(n){return e[n]??null}let r={regex:"regul\xE1rn\xED v\xFDraz",email:"e-mailov\xE1 adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"datum a \u010Das ve form\xE1tu ISO",date:"datum ve form\xE1tu ISO",time:"\u010Das ve form\xE1tu ISO",duration:"doba trv\xE1n\xED ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64",base64url:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64url",json_string:"\u0159et\u011Bzec ve form\xE1tu JSON",e164:"\u010D\xEDslo E.164",jwt:"JWT",template_literal:"vstup"},o={nan:"NaN",number:"\u010D\xEDslo",string:"\u0159et\u011Bzec",function:"funkce",array:"pole"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return/^[A-Z]/.test(n.expected)?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no instanceof ${n.expected}, obdr\u017Eeno ${c}`:`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${i}, obdr\u017Eeno ${c}`}case"invalid_value":return n.values.length===1?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${_(n.values[0])}`:`Neplatn\xE1 mo\u017Enost: o\u010Dek\xE1v\xE1na jedna z hodnot ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${n.origin??"hodnota"} mus\xED m\xEDt ${i}${n.maximum.toString()} ${s.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${n.origin??"hodnota"} mus\xED b\xFDt ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${n.origin??"hodnota"} mus\xED m\xEDt ${i}${n.minimum.toString()} ${s.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${n.origin??"hodnota"} mus\xED b\xFDt ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED za\u010D\xEDnat na "${i.prefix}"`:i.format==="ends_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED kon\u010Dit na "${i.suffix}"`:i.format==="includes"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED obsahovat "${i.includes}"`:i.format==="regex"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED odpov\xEDdat vzoru ${i.pattern}`:`Neplatn\xFD form\xE1t ${r[i.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: ${f(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 Sm(){return{localeError:cb()}}var ub=()=>{let e={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"}};function t(n){return e[n]??null}let r={regex:"input",email:"e-mailadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkesl\xE6t",date:"ISO-dato",time:"ISO-klokkesl\xE6t",duration:"ISO-varighed",ipv4:"IPv4-omr\xE5de",ipv6:"IPv6-omr\xE5de",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodet streng",base64url:"base64url-kodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},o={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 i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return/^[A-Z]/.test(n.expected)?`Ugyldigt input: forventede instanceof ${n.expected}, fik ${c}`:`Ugyldigt input: forventede ${i}, fik ${c}`}case"invalid_value":return n.values.length===1?`Ugyldig v\xE6rdi: forventede ${_(n.values[0])}`:`Ugyldigt valg: forventede en af f\xF8lgende ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin),c=o[n.origin]??n.origin;return s?`For stor: forventede ${c??"value"} ${s.verb} ${i} ${n.maximum.toString()} ${s.unit??"elementer"}`:`For stor: forventede ${c??"value"} havde ${i} ${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin),c=o[n.origin]??n.origin;return s?`For lille: forventede ${c} ${s.verb} ${i} ${n.minimum.toString()} ${s.unit}`:`For lille: forventede ${c} havde ${i} ${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Ugyldig streng: skal starte med "${i.prefix}"`:i.format==="ends_with"?`Ugyldig streng: skal ende med "${i.suffix}"`:i.format==="includes"?`Ugyldig streng: skal indeholde "${i.includes}"`:i.format==="regex"?`Ugyldig streng: skal matche m\xF8nsteret ${i.pattern}`:`Ugyldig ${r[i.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"}: ${f(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 $m(){return{localeError:ub()}}var lb=()=>{let e={string:{unit:"Zeichen",verb:"zu haben"},file:{unit:"Bytes",verb:"zu haben"},array:{unit:"Elemente",verb:"zu haben"},set:{unit:"Elemente",verb:"zu haben"}};function t(n){return e[n]??null}let r={regex:"Eingabe",email:"E-Mail-Adresse",url:"URL",emoji:"Emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-Datum und -Uhrzeit",date:"ISO-Datum",time:"ISO-Uhrzeit",duration:"ISO-Dauer",ipv4:"IPv4-Adresse",ipv6:"IPv6-Adresse",cidrv4:"IPv4-Bereich",cidrv6:"IPv6-Bereich",base64:"Base64-codierter String",base64url:"Base64-URL-codierter String",json_string:"JSON-String",e164:"E.164-Nummer",jwt:"JWT",template_literal:"Eingabe"},o={nan:"NaN",number:"Zahl",array:"Array"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return/^[A-Z]/.test(n.expected)?`Ung\xFCltige Eingabe: erwartet instanceof ${n.expected}, erhalten ${c}`:`Ung\xFCltige Eingabe: erwartet ${i}, erhalten ${c}`}case"invalid_value":return n.values.length===1?`Ung\xFCltige Eingabe: erwartet ${_(n.values[0])}`:`Ung\xFCltige Option: erwartet eine von ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Zu gro\xDF: erwartet, dass ${n.origin??"Wert"} ${i}${n.maximum.toString()} ${s.unit??"Elemente"} hat`:`Zu gro\xDF: erwartet, dass ${n.origin??"Wert"} ${i}${n.maximum.toString()} ist`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Zu klein: erwartet, dass ${n.origin} ${i}${n.minimum.toString()} ${s.unit} hat`:`Zu klein: erwartet, dass ${n.origin} ${i}${n.minimum.toString()} ist`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Ung\xFCltiger String: muss mit "${i.prefix}" beginnen`:i.format==="ends_with"?`Ung\xFCltiger String: muss mit "${i.suffix}" enden`:i.format==="includes"?`Ung\xFCltiger String: muss "${i.includes}" enthalten`:i.format==="regex"?`Ung\xFCltiger String: muss dem Muster ${i.pattern} entsprechen`:`Ung\xFCltig: ${r[i.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"}: ${f(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 Im(){return{localeError:lb()}}var db=()=>{let e={string:{unit:"\u03C7\u03B1\u03C1\u03B1\u03BA\u03C4\u03AE\u03C1\u03B5\u03C2",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},file:{unit:"bytes",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},array:{unit:"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},set:{unit:"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},map:{unit:"\u03BA\u03B1\u03C4\u03B1\u03C7\u03C9\u03C1\u03AE\u03C3\u03B5\u03B9\u03C2",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"}};function t(n){return e[n]??null}let r={regex:"\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2",email:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1 \u03BA\u03B1\u03B9 \u03CE\u03C1\u03B1",date:"ISO \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1",time:"ISO \u03CE\u03C1\u03B1",duration:"ISO \u03B4\u03B9\u03AC\u03C1\u03BA\u03B5\u03B9\u03B1",ipv4:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv4",ipv6:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv6",mac:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 MAC",cidrv4:"\u03B5\u03CD\u03C1\u03BF\u03C2 IPv4",cidrv6:"\u03B5\u03CD\u03C1\u03BF\u03C2 IPv6",base64:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC \u03BA\u03C9\u03B4\u03B9\u03BA\u03BF\u03C0\u03BF\u03B9\u03B7\u03BC\u03AD\u03BD\u03B7 \u03C3\u03B5 base64",base64url:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC \u03BA\u03C9\u03B4\u03B9\u03BA\u03BF\u03C0\u03BF\u03B9\u03B7\u03BC\u03AD\u03BD\u03B7 \u03C3\u03B5 base64url",json_string:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC JSON",e164:"\u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2 E.164",jwt:"JWT",template_literal:"\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"},o={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return typeof n.expected=="string"&&/^[A-Z]/.test(n.expected)?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD instanceof ${n.expected}, \u03BB\u03AE\u03C6\u03B8\u03B7\u03BA\u03B5 ${c}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${i}, \u03BB\u03AE\u03C6\u03B8\u03B7\u03BA\u03B5 ${c}`}case"invalid_value":return n.values.length===1?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${_(n.values[0])}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03C0\u03B9\u03BB\u03BF\u03B3\u03AE: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD \u03AD\u03BD\u03B1 \u03B1\u03C0\u03CC ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B5\u03B3\u03AC\u03BB\u03BF: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${n.origin??"\u03C4\u03B9\u03BC\u03AE"} \u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9 ${i}${n.maximum.toString()} ${s.unit??"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1"}`:`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B5\u03B3\u03AC\u03BB\u03BF: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${n.origin??"\u03C4\u03B9\u03BC\u03AE"} \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B9\u03BA\u03C1\u03CC: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${n.origin} \u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9 ${i}${n.minimum.toString()} ${s.unit}`:`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B9\u03BA\u03C1\u03CC: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${n.origin} \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03BE\u03B5\u03BA\u03B9\u03BD\u03AC \u03BC\u03B5 "${i.prefix}"`:i.format==="ends_with"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C4\u03B5\u03BB\u03B5\u03B9\u03CE\u03BD\u03B5\u03B9 \u03BC\u03B5 "${i.suffix}"`:i.format==="includes"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C0\u03B5\u03C1\u03B9\u03AD\u03C7\u03B5\u03B9 "${i.includes}"`:i.format==="regex"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C4\u03B1\u03B9\u03C1\u03B9\u03AC\u03B6\u03B5\u03B9 \u03BC\u03B5 \u03C4\u03BF \u03BC\u03BF\u03C4\u03AF\u03B2\u03BF ${i.pattern}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF: ${r[i.format]??n.format}`}case"not_multiple_of":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF\u03C2 \u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 \u03C0\u03BF\u03BB\u03BB\u03B1\u03C0\u03BB\u03AC\u03C3\u03B9\u03BF \u03C4\u03BF\u03C5 ${n.divisor}`;case"unrecognized_keys":return`\u0386\u03B3\u03BD\u03C9\u03C3\u03C4${n.keys.length>1?"\u03B1":"\u03BF"} \u03BA\u03BB\u03B5\u03B9\u03B4${n.keys.length>1?"\u03B9\u03AC":"\u03AF"}: ${f(n.keys,", ")}`;case"invalid_key":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF \u03BA\u03BB\u03B5\u03B9\u03B4\u03AF \u03C3\u03C4\u03BF ${n.origin}`;case"invalid_union":return"\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2";case"invalid_element":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C4\u03B9\u03BC\u03AE \u03C3\u03C4\u03BF ${n.origin}`;default:return"\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"}}};function Em(){return{localeError:db()}}var mb=()=>{let e={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"},map:{unit:"entries",verb:"to have"}};function t(n){return e[n]??null}let r={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},o={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return`Invalid input: expected ${i}, received ${c}`}case"invalid_value":return n.values.length===1?`Invalid input: expected ${_(n.values[0])}`:`Invalid option: expected one of ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Too big: expected ${n.origin??"value"} to have ${i}${n.maximum.toString()} ${s.unit??"elements"}`:`Too big: expected ${n.origin??"value"} to be ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Too small: expected ${n.origin} to have ${i}${n.minimum.toString()} ${s.unit}`:`Too small: expected ${n.origin} to be ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Invalid string: must start with "${i.prefix}"`:i.format==="ends_with"?`Invalid string: must end with "${i.suffix}"`:i.format==="includes"?`Invalid string: must include "${i.includes}"`:i.format==="regex"?`Invalid string: must match pattern ${i.pattern}`:`Invalid ${r[i.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":""}: ${f(n.keys,", ")}`;case"invalid_key":return`Invalid key in ${n.origin}`;case"invalid_union":return n.options&&Array.isArray(n.options)&&n.options.length>0?`Invalid discriminator value. Expected ${n.options.map(s=>`'${s}'`).join(" | ")}`:"Invalid input";case"invalid_element":return`Invalid value in ${n.origin}`;default:return"Invalid input"}}};function br(){return{localeError:mb()}}var pb=()=>{let e={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function t(n){return e[n]??null}let r={regex:"enigo",email:"retadreso",url:"URL",emoji:"emo\u011Dio",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datotempo",date:"ISO-dato",time:"ISO-tempo",duration:"ISO-da\u016Dro",ipv4:"IPv4-adreso",ipv6:"IPv6-adreso",cidrv4:"IPv4-rango",cidrv6:"IPv6-rango",base64:"64-ume kodita karaktraro",base64url:"URL-64-ume kodita karaktraro",json_string:"JSON-karaktraro",e164:"E.164-nombro",jwt:"JWT",template_literal:"enigo"},o={nan:"NaN",number:"nombro",array:"tabelo",null:"senvalora"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return/^[A-Z]/.test(n.expected)?`Nevalida enigo: atendi\u011Dis instanceof ${n.expected}, ricevi\u011Dis ${c}`:`Nevalida enigo: atendi\u011Dis ${i}, ricevi\u011Dis ${c}`}case"invalid_value":return n.values.length===1?`Nevalida enigo: atendi\u011Dis ${_(n.values[0])}`:`Nevalida opcio: atendi\u011Dis unu el ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Tro granda: atendi\u011Dis ke ${n.origin??"valoro"} havu ${i}${n.maximum.toString()} ${s.unit??"elementojn"}`:`Tro granda: atendi\u011Dis ke ${n.origin??"valoro"} havu ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Tro malgranda: atendi\u011Dis ke ${n.origin} havu ${i}${n.minimum.toString()} ${s.unit}`:`Tro malgranda: atendi\u011Dis ke ${n.origin} estu ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Nevalida karaktraro: devas komenci\u011Di per "${i.prefix}"`:i.format==="ends_with"?`Nevalida karaktraro: devas fini\u011Di per "${i.suffix}"`:i.format==="includes"?`Nevalida karaktraro: devas inkluzivi "${i.includes}"`:i.format==="regex"?`Nevalida karaktraro: devas kongrui kun la modelo ${i.pattern}`:`Nevalida ${r[i.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":""}: ${f(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 wm(){return{localeError:pb()}}var fb=()=>{let e={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}};function t(n){return e[n]??null}let r={regex:"entrada",email:"direcci\xF3n de correo electr\xF3nico",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"fecha y hora ISO",date:"fecha ISO",time:"hora ISO",duration:"duraci\xF3n ISO",ipv4:"direcci\xF3n IPv4",ipv6:"direcci\xF3n IPv6",cidrv4:"rango IPv4",cidrv6:"rango IPv6",base64:"cadena codificada en base64",base64url:"URL codificada en base64",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},o={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 i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return/^[A-Z]/.test(n.expected)?`Entrada inv\xE1lida: se esperaba instanceof ${n.expected}, recibido ${c}`:`Entrada inv\xE1lida: se esperaba ${i}, recibido ${c}`}case"invalid_value":return n.values.length===1?`Entrada inv\xE1lida: se esperaba ${_(n.values[0])}`:`Opci\xF3n inv\xE1lida: se esperaba una de ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin),c=o[n.origin]??n.origin;return s?`Demasiado grande: se esperaba que ${c??"valor"} tuviera ${i}${n.maximum.toString()} ${s.unit??"elementos"}`:`Demasiado grande: se esperaba que ${c??"valor"} fuera ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin),c=o[n.origin]??n.origin;return s?`Demasiado peque\xF1o: se esperaba que ${c} tuviera ${i}${n.minimum.toString()} ${s.unit}`:`Demasiado peque\xF1o: se esperaba que ${c} fuera ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Cadena inv\xE1lida: debe comenzar con "${i.prefix}"`:i.format==="ends_with"?`Cadena inv\xE1lida: debe terminar en "${i.suffix}"`:i.format==="includes"?`Cadena inv\xE1lida: debe incluir "${i.includes}"`:i.format==="regex"?`Cadena inv\xE1lida: debe coincidir con el patr\xF3n ${i.pattern}`:`Inv\xE1lido ${r[i.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":""}: ${f(n.keys,", ")}`;case"invalid_key":return`Llave inv\xE1lida en ${o[n.origin]??n.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido en ${o[n.origin]??n.origin}`;default:return"Entrada inv\xE1lida"}}};function Om(){return{localeError:fb()}}var gb=()=>{let e={string:{unit:"\u06A9\u0627\u0631\u0627\u06A9\u062A\u0631",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},file:{unit:"\u0628\u0627\u06CC\u062A",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},array:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},set:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"}};function t(n){return e[n]??null}let r={regex:"\u0648\u0631\u0648\u062F\u06CC",email:"\u0622\u062F\u0631\u0633 \u0627\u06CC\u0645\u06CC\u0644",url:"URL",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u06CC\u062E \u0648 \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",date:"\u062A\u0627\u0631\u06CC\u062E \u0627\u06CC\u0632\u0648",time:"\u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",duration:"\u0645\u062F\u062A \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",ipv4:"IPv4 \u0622\u062F\u0631\u0633",ipv6:"IPv6 \u0622\u062F\u0631\u0633",cidrv4:"IPv4 \u062F\u0627\u0645\u0646\u0647",cidrv6:"IPv6 \u062F\u0627\u0645\u0646\u0647",base64:"base64-encoded \u0631\u0634\u062A\u0647",base64url:"base64url-encoded \u0631\u0634\u062A\u0647",json_string:"JSON \u0631\u0634\u062A\u0647",e164:"E.164 \u0639\u062F\u062F",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u06CC"},o={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0622\u0631\u0627\u06CC\u0647"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[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 ${c} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`:`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${i} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${c} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`}case"invalid_value":return n.values.length===1?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${_(n.values[0])} \u0645\u06CC\u200C\u0628\u0648\u062F`:`\u06AF\u0632\u06CC\u0646\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A \u06CC\u06A9\u06CC \u0627\u0632 ${f(n.values,"|")} \u0645\u06CC\u200C\u0628\u0648\u062F`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${n.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${i}${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 ${i}${n.maximum.toString()} \u0628\u0627\u0634\u062F`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${n.origin} \u0628\u0627\u06CC\u062F ${i}${n.minimum.toString()} ${s.unit} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${n.origin} \u0628\u0627\u06CC\u062F ${i}${n.minimum.toString()} \u0628\u0627\u0634\u062F`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${i.prefix}" \u0634\u0631\u0648\u0639 \u0634\u0648\u062F`:i.format==="ends_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${i.suffix}" \u062A\u0645\u0627\u0645 \u0634\u0648\u062F`:i.format==="includes"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0634\u0627\u0645\u0644 "${i.includes}" \u0628\u0627\u0634\u062F`:i.format==="regex"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 \u0627\u0644\u06AF\u0648\u06CC ${i.pattern} \u0645\u0637\u0627\u0628\u0642\u062A \u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F`:`${r[i.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: ${f(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 Tm(){return{localeError:gb()}}var hb=()=>{let e={string:{unit:"merkki\xE4",subject:"merkkijonon"},file:{unit:"tavua",subject:"tiedoston"},array:{unit:"alkiota",subject:"listan"},set:{unit:"alkiota",subject:"joukon"},number:{unit:"",subject:"luvun"},bigint:{unit:"",subject:"suuren kokonaisluvun"},int:{unit:"",subject:"kokonaisluvun"},date:{unit:"",subject:"p\xE4iv\xE4m\xE4\xE4r\xE4n"}};function t(n){return e[n]??null}let r={regex:"s\xE4\xE4nn\xF6llinen lauseke",email:"s\xE4hk\xF6postiosoite",url:"URL-osoite",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-aikaleima",date:"ISO-p\xE4iv\xE4m\xE4\xE4r\xE4",time:"ISO-aika",duration:"ISO-kesto",ipv4:"IPv4-osoite",ipv6:"IPv6-osoite",cidrv4:"IPv4-alue",cidrv6:"IPv6-alue",base64:"base64-koodattu merkkijono",base64url:"base64url-koodattu merkkijono",json_string:"JSON-merkkijono",e164:"E.164-luku",jwt:"JWT",template_literal:"templaattimerkkijono"},o={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return/^[A-Z]/.test(n.expected)?`Virheellinen tyyppi: odotettiin instanceof ${n.expected}, oli ${c}`:`Virheellinen tyyppi: odotettiin ${i}, oli ${c}`}case"invalid_value":return n.values.length===1?`Virheellinen sy\xF6te: t\xE4ytyy olla ${_(n.values[0])}`:`Virheellinen valinta: t\xE4ytyy olla yksi seuraavista: ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Liian suuri: ${s.subject} t\xE4ytyy olla ${i}${n.maximum.toString()} ${s.unit}`.trim():`Liian suuri: arvon t\xE4ytyy olla ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Liian pieni: ${s.subject} t\xE4ytyy olla ${i}${n.minimum.toString()} ${s.unit}`.trim():`Liian pieni: arvon t\xE4ytyy olla ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Virheellinen sy\xF6te: t\xE4ytyy alkaa "${i.prefix}"`:i.format==="ends_with"?`Virheellinen sy\xF6te: t\xE4ytyy loppua "${i.suffix}"`:i.format==="includes"?`Virheellinen sy\xF6te: t\xE4ytyy sis\xE4lt\xE4\xE4 "${i.includes}"`:i.format==="regex"?`Virheellinen sy\xF6te: t\xE4ytyy vastata s\xE4\xE4nn\xF6llist\xE4 lauseketta ${i.pattern}`:`Virheellinen ${r[i.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"}: ${f(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 Pm(){return{localeError:hb()}}var _b=()=>{let e={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function t(n){return e[n]??null}let r={regex:"entr\xE9e",email:"adresse e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date et heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"},o={string:"cha\xEEne",number:"nombre",int:"entier",boolean:"bool\xE9en",bigint:"grand entier",symbol:"symbole",undefined:"ind\xE9fini",null:"null",never:"jamais",void:"vide",date:"date",array:"tableau",object:"objet",tuple:"tuple",record:"enregistrement",map:"carte",set:"ensemble",file:"fichier",nonoptional:"non-optionnel",nan:"NaN",function:"fonction"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return/^[A-Z]/.test(n.expected)?`Entr\xE9e invalide : instanceof ${n.expected} attendu, ${c} re\xE7u`:`Entr\xE9e invalide : ${i} attendu, ${c} re\xE7u`}case"invalid_value":return n.values.length===1?`Entr\xE9e invalide : ${_(n.values[0])} attendu`:`Option invalide : une valeur parmi ${f(n.values,"|")} attendue`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Trop grand : ${o[n.origin]??"valeur"} doit ${s.verb} ${i}${n.maximum.toString()} ${s.unit??"\xE9l\xE9ment(s)"}`:`Trop grand : ${o[n.origin]??"valeur"} doit \xEAtre ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Trop petit : ${o[n.origin]??"valeur"} doit ${s.verb} ${i}${n.minimum.toString()} ${s.unit}`:`Trop petit : ${o[n.origin]??"valeur"} doit \xEAtre ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${i.prefix}"`:i.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${i.suffix}"`:i.format==="includes"?`Cha\xEEne invalide : doit inclure "${i.includes}"`:i.format==="regex"?`Cha\xEEne invalide : doit correspondre au mod\xE8le ${i.pattern}`:`${r[i.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":""} : ${f(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 Am(){return{localeError:_b()}}var vb=()=>{let e={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function t(n){return e[n]??null}let r={regex:"entr\xE9e",email:"adresse courriel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date-heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"},o={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return/^[A-Z]/.test(n.expected)?`Entr\xE9e invalide : attendu instanceof ${n.expected}, re\xE7u ${c}`:`Entr\xE9e invalide : attendu ${i}, re\xE7u ${c}`}case"invalid_value":return n.values.length===1?`Entr\xE9e invalide : attendu ${_(n.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"\u2264":"<",s=t(n.origin);return s?`Trop grand : attendu que ${n.origin??"la valeur"} ait ${i}${n.maximum.toString()} ${s.unit}`:`Trop grand : attendu que ${n.origin??"la valeur"} soit ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?"\u2265":">",s=t(n.origin);return s?`Trop petit : attendu que ${n.origin} ait ${i}${n.minimum.toString()} ${s.unit}`:`Trop petit : attendu que ${n.origin} soit ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${i.prefix}"`:i.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${i.suffix}"`:i.format==="includes"?`Cha\xEEne invalide : doit inclure "${i.includes}"`:i.format==="regex"?`Cha\xEEne invalide : doit correspondre au motif ${i.pattern}`:`${r[i.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":""} : ${f(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 Nm(){return{localeError:vb()}}var bb=()=>{let e={string:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA",gender:"f"},number:{label:"\u05DE\u05E1\u05E4\u05E8",gender:"m"},boolean:{label:"\u05E2\u05E8\u05DA \u05D1\u05D5\u05DC\u05D9\u05D0\u05E0\u05D9",gender:"m"},bigint:{label:"BigInt",gender:"m"},date:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA",gender:"m"},array:{label:"\u05DE\u05E2\u05E8\u05DA",gender:"m"},object:{label:"\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8",gender:"m"},null:{label:"\u05E2\u05E8\u05DA \u05E8\u05D9\u05E7 (null)",gender:"m"},undefined:{label:"\u05E2\u05E8\u05DA \u05DC\u05D0 \u05DE\u05D5\u05D2\u05D3\u05E8 (undefined)",gender:"m"},symbol:{label:"\u05E1\u05D9\u05DE\u05D1\u05D5\u05DC (Symbol)",gender:"m"},function:{label:"\u05E4\u05D5\u05E0\u05E7\u05E6\u05D9\u05D4",gender:"f"},map:{label:"\u05DE\u05E4\u05D4 (Map)",gender:"f"},set:{label:"\u05E7\u05D1\u05D5\u05E6\u05D4 (Set)",gender:"f"},file:{label:"\u05E7\u05D5\u05D1\u05E5",gender:"m"},promise:{label:"Promise",gender:"m"},NaN:{label:"NaN",gender:"m"},unknown:{label:"\u05E2\u05E8\u05DA \u05DC\u05D0 \u05D9\u05D3\u05D5\u05E2",gender:"m"},value:{label:"\u05E2\u05E8\u05DA",gender:"m"}},t={string:{unit:"\u05EA\u05D5\u05D5\u05D9\u05DD",shortLabel:"\u05E7\u05E6\u05E8",longLabel:"\u05D0\u05E8\u05D5\u05DA"},file:{unit:"\u05D1\u05D9\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},array:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},set:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},number:{unit:"",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"}},r=l=>l?e[l]:void 0,o=l=>{let d=r(l);return d?d.label:l??e.unknown.label},n=l=>`\u05D4${o(l)}`,i=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?t[l]??null:null,c={regex:{label:"\u05E7\u05DC\u05D8",gender:"m"},email:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05D0\u05D9\u05DE\u05D9\u05D9\u05DC",gender:"f"},url:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05E8\u05E9\u05EA",gender:"f"},emoji:{label:"\u05D0\u05D9\u05DE\u05D5\u05D2'\u05D9",gender:"m"},uuid:{label:"UUID",gender:"m"},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"}},u={nan:"NaN"};return l=>{switch(l.code){case"invalid_type":{let d=l.expected,m=u[d??""]??o(d),g=v(l.input),h=u[g]??e[g]?.label??g;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 ${h}`:`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${m}, \u05D4\u05EA\u05E7\u05D1\u05DC ${h}`}case"invalid_value":{if(l.values.length===1)return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05E2\u05E8\u05DA \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA ${_(l.values[0])}`;let d=l.values.map(h=>_(h));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 m=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 ${m}`}case"too_big":{let d=s(l.origin),m=n(l.origin??"value");if(l.origin==="string")return`${d?.longLabel??"\u05D0\u05E8\u05D5\u05DA"} \u05DE\u05D3\u05D9: ${m} \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 S=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: ${m} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${S}`}if(l.origin==="array"||l.origin==="set"){let S=l.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA",C=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: ${m} ${S} \u05DC\u05D4\u05DB\u05D9\u05DC ${C}`.trim()}let g=l.inclusive?"<=":"<",h=i(l.origin??"value");return d?.unit?`${d.longLabel} \u05DE\u05D3\u05D9: ${m} ${h} ${g}${l.maximum.toString()} ${d.unit}`:`${d?.longLabel??"\u05D2\u05D3\u05D5\u05DC"} \u05DE\u05D3\u05D9: ${m} ${h} ${g}${l.maximum.toString()}`}case"too_small":{let d=s(l.origin),m=n(l.origin??"value");if(l.origin==="string")return`${d?.shortLabel??"\u05E7\u05E6\u05E8"} \u05DE\u05D3\u05D9: ${m} \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 S=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: ${m} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${S}`}if(l.origin==="array"||l.origin==="set"){let S=l.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA";if(l.minimum===1&&l.inclusive){let A=(l.origin==="set","\u05DC\u05E4\u05D7\u05D5\u05EA \u05E4\u05E8\u05D9\u05D8 \u05D0\u05D7\u05D3");return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${m} ${S} \u05DC\u05D4\u05DB\u05D9\u05DC ${A}`}let C=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: ${m} ${S} \u05DC\u05D4\u05DB\u05D9\u05DC ${C}`.trim()}let g=l.inclusive?">=":">",h=i(l.origin??"value");return d?.unit?`${d.shortLabel} \u05DE\u05D3\u05D9: ${m} ${h} ${g}${l.minimum.toString()} ${d.unit}`:`${d?.shortLabel??"\u05E7\u05D8\u05DF"} \u05DE\u05D3\u05D9: ${m} ${h} ${g}${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 m=c[d.format],g=m?.label??d.format,S=(m?.gender??"m")==="f"?"\u05EA\u05E7\u05D9\u05E0\u05D4":"\u05EA\u05E7\u05D9\u05DF";return`${g} \u05DC\u05D0 ${S}`}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"}: ${f(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 Cm(){return{localeError:bb()}}var yb=()=>{let e={string:{unit:"znakova",verb:"imati"},file:{unit:"bajtova",verb:"imati"},array:{unit:"stavki",verb:"imati"},set:{unit:"stavki",verb:"imati"}};function t(n){return e[n]??null}let r={regex:"unos",email:"email adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum i vrijeme",date:"ISO datum",time:"ISO vrijeme",duration:"ISO trajanje",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"IPv4 raspon",cidrv6:"IPv6 raspon",base64:"base64 kodirani tekst",base64url:"base64url kodirani tekst",json_string:"JSON tekst",e164:"E.164 broj",jwt:"JWT",template_literal:"unos"},o={nan:"NaN",string:"tekst",number:"broj",boolean:"boolean",array:"niz",object:"objekt",set:"skup",file:"datoteka",date:"datum",bigint:"bigint",symbol:"simbol",undefined:"undefined",null:"null",function:"funkcija",map:"mapa"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return/^[A-Z]/.test(n.expected)?`Neispravan unos: o\u010Dekuje se instanceof ${n.expected}, a primljeno je ${c}`:`Neispravan unos: o\u010Dekuje se ${i}, a primljeno je ${c}`}case"invalid_value":return n.values.length===1?`Neispravna vrijednost: o\u010Dekivano ${_(n.values[0])}`:`Neispravna opcija: o\u010Dekivano jedno od ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin),c=o[n.origin]??n.origin;return s?`Preveliko: o\u010Dekivano da ${c??"vrijednost"} ima ${i}${n.maximum.toString()} ${s.unit??"elemenata"}`:`Preveliko: o\u010Dekivano da ${c??"vrijednost"} bude ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin),c=o[n.origin]??n.origin;return s?`Premalo: o\u010Dekivano da ${c} ima ${i}${n.minimum.toString()} ${s.unit}`:`Premalo: o\u010Dekivano da ${c} bude ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Neispravan tekst: mora zapo\u010Dinjati s "${i.prefix}"`:i.format==="ends_with"?`Neispravan tekst: mora zavr\u0161avati s "${i.suffix}"`:i.format==="includes"?`Neispravan tekst: mora sadr\u017Eavati "${i.includes}"`:i.format==="regex"?`Neispravan tekst: mora odgovarati uzorku ${i.pattern}`:`Neispravna ${r[i.format]??n.format}`}case"not_multiple_of":return`Neispravan broj: mora biti vi\u0161ekratnik od ${n.divisor}`;case"unrecognized_keys":return`Neprepoznat${n.keys.length>1?"i klju\u010Devi":" klju\u010D"}: ${f(n.keys,", ")}`;case"invalid_key":return`Neispravan klju\u010D u ${o[n.origin]??n.origin}`;case"invalid_union":return"Neispravan unos";case"invalid_element":return`Neispravna vrijednost u ${o[n.origin]??n.origin}`;default:return"Neispravan unos"}}};function Rm(){return{localeError:yb()}}var xb=()=>{let e={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}};function t(n){return e[n]??null}let r={regex:"bemenet",email:"email c\xEDm",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO id\u0151b\xE9lyeg",date:"ISO d\xE1tum",time:"ISO id\u0151",duration:"ISO id\u0151intervallum",ipv4:"IPv4 c\xEDm",ipv6:"IPv6 c\xEDm",cidrv4:"IPv4 tartom\xE1ny",cidrv6:"IPv6 tartom\xE1ny",base64:"base64-k\xF3dolt string",base64url:"base64url-k\xF3dolt string",json_string:"JSON string",e164:"E.164 sz\xE1m",jwt:"JWT",template_literal:"bemenet"},o={nan:"NaN",number:"sz\xE1m",array:"t\xF6mb"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return/^[A-Z]/.test(n.expected)?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k instanceof ${n.expected}, a kapott \xE9rt\xE9k ${c}`:`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${i}, a kapott \xE9rt\xE9k ${c}`}case"invalid_value":return n.values.length===1?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${_(n.values[0])}`:`\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`T\xFAl nagy: ${n.origin??"\xE9rt\xE9k"} m\xE9rete t\xFAl nagy ${i}${n.maximum.toString()} ${s.unit??"elem"}`:`T\xFAl nagy: a bemeneti \xE9rt\xE9k ${n.origin??"\xE9rt\xE9k"} t\xFAl nagy: ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${n.origin} m\xE9rete t\xFAl kicsi ${i}${n.minimum.toString()} ${s.unit}`:`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${n.origin} t\xFAl kicsi ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\xC9rv\xE9nytelen string: "${i.prefix}" \xE9rt\xE9kkel kell kezd\u0151dnie`:i.format==="ends_with"?`\xC9rv\xE9nytelen string: "${i.suffix}" \xE9rt\xE9kkel kell v\xE9gz\u0151dnie`:i.format==="includes"?`\xC9rv\xE9nytelen string: "${i.includes}" \xE9rt\xE9ket kell tartalmaznia`:i.format==="regex"?`\xC9rv\xE9nytelen string: ${i.pattern} mint\xE1nak kell megfelelnie`:`\xC9rv\xE9nytelen ${r[i.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":""}: ${f(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 Dm(){return{localeError:xb()}}function zm(e,t,r){return Math.abs(e)===1?t:r}function mt(e){if(!e)return"";let t=["\u0561","\u0565","\u0568","\u056B","\u0578","\u0578\u0582","\u0585"],r=e[e.length-1];return e+(t.includes(r)?"\u0576":"\u0568")}var kb=()=>{let e={string:{unit:{one:"\u0576\u0577\u0561\u0576",many:"\u0576\u0577\u0561\u0576\u0576\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},file:{unit:{one:"\u0562\u0561\u0575\u0569",many:"\u0562\u0561\u0575\u0569\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},array:{unit:{one:"\u057F\u0561\u0580\u0580",many:"\u057F\u0561\u0580\u0580\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},set:{unit:{one:"\u057F\u0561\u0580\u0580",many:"\u057F\u0561\u0580\u0580\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"}};function t(n){return e[n]??null}let r={regex:"\u0574\u0578\u0582\u057F\u0584",email:"\u0567\u056C. \u0570\u0561\u057D\u0581\u0565",url:"URL",emoji:"\u0567\u0574\u0578\u057B\u056B",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E \u0587 \u056A\u0561\u0574",date:"ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E",time:"ISO \u056A\u0561\u0574",duration:"ISO \u057F\u0587\u0578\u0572\u0578\u0582\u0569\u0575\u0578\u0582\u0576",ipv4:"IPv4 \u0570\u0561\u057D\u0581\u0565",ipv6:"IPv6 \u0570\u0561\u057D\u0581\u0565",cidrv4:"IPv4 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584",cidrv6:"IPv6 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584",base64:"base64 \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572",base64url:"base64url \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572",json_string:"JSON \u057F\u0578\u0572",e164:"E.164 \u0570\u0561\u0574\u0561\u0580",jwt:"JWT",template_literal:"\u0574\u0578\u0582\u057F\u0584"},o={nan:"NaN",number:"\u0569\u056B\u057E",array:"\u0566\u0561\u0576\u0563\u057E\u0561\u056E"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[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 ${c}`:`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${i}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${c}`}case"invalid_value":return n.values.length===1?`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${_(n.values[1])}`:`\u054D\u056D\u0561\u056C \u057F\u0561\u0580\u0562\u0565\u0580\u0561\u056F\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 \u0570\u0565\u057F\u0587\u0575\u0561\u056C\u0576\u0565\u0580\u056B\u0581 \u0574\u0565\u056F\u0568\u055D ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);if(s){let c=Number(n.maximum),u=zm(c,s.unit.one,s.unit.many);return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${mt(n.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${i}${n.maximum.toString()} ${u}`}return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${mt(n.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056C\u056B\u0576\u056B ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);if(s){let c=Number(n.minimum),u=zm(c,s.unit.one,s.unit.many);return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${mt(n.origin)} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${i}${n.minimum.toString()} ${u}`}return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${mt(n.origin)} \u056C\u056B\u0576\u056B ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057D\u056F\u057D\u057E\u056B "${i.prefix}"-\u0578\u057E`:i.format==="ends_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0561\u057E\u0561\u0580\u057F\u057E\u056B "${i.suffix}"-\u0578\u057E`:i.format==="includes"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057A\u0561\u0580\u0578\u0582\u0576\u0561\u056F\u056B "${i.includes}"`:i.format==="regex"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0570\u0561\u0574\u0561\u057A\u0561\u057F\u0561\u057D\u056D\u0561\u0576\u056B ${i.pattern} \u0571\u0587\u0561\u0579\u0561\u0583\u056B\u0576`:`\u054D\u056D\u0561\u056C ${r[i.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":""}. ${f(n.keys,", ")}`;case"invalid_key":return`\u054D\u056D\u0561\u056C \u0562\u0561\u0576\u0561\u056C\u056B ${mt(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 ${mt(n.origin)}-\u0578\u0582\u0574`;default:return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574"}}};function Um(){return{localeError:kb()}}var Sb=()=>{let e={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}};function t(n){return e[n]??null}let r={regex:"input",email:"alamat email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tanggal dan waktu format ISO",date:"tanggal format ISO",time:"jam format ISO",duration:"durasi format ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"rentang alamat IPv4",cidrv6:"rentang alamat IPv6",base64:"string dengan enkode base64",base64url:"string dengan enkode base64url",json_string:"string JSON",e164:"angka E.164",jwt:"JWT",template_literal:"input"},o={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return/^[A-Z]/.test(n.expected)?`Input tidak valid: diharapkan instanceof ${n.expected}, diterima ${c}`:`Input tidak valid: diharapkan ${i}, diterima ${c}`}case"invalid_value":return n.values.length===1?`Input tidak valid: diharapkan ${_(n.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Terlalu besar: diharapkan ${n.origin??"value"} memiliki ${i}${n.maximum.toString()} ${s.unit??"elemen"}`:`Terlalu besar: diharapkan ${n.origin??"value"} menjadi ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Terlalu kecil: diharapkan ${n.origin} memiliki ${i}${n.minimum.toString()} ${s.unit}`:`Terlalu kecil: diharapkan ${n.origin} menjadi ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`String tidak valid: harus dimulai dengan "${i.prefix}"`:i.format==="ends_with"?`String tidak valid: harus berakhir dengan "${i.suffix}"`:i.format==="includes"?`String tidak valid: harus menyertakan "${i.includes}"`:i.format==="regex"?`String tidak valid: harus sesuai pola ${i.pattern}`:`${r[i.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":""}: ${f(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 jm(){return{localeError:Sb()}}var $b=()=>{let e={string:{unit:"stafi",verb:"a\xF0 hafa"},file:{unit:"b\xE6ti",verb:"a\xF0 hafa"},array:{unit:"hluti",verb:"a\xF0 hafa"},set:{unit:"hluti",verb:"a\xF0 hafa"}};function t(n){return e[n]??null}let r={regex:"gildi",email:"netfang",url:"vefsl\xF3\xF0",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dagsetning og t\xEDmi",date:"ISO dagsetning",time:"ISO t\xEDmi",duration:"ISO t\xEDmalengd",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded strengur",base64url:"base64url-encoded strengur",json_string:"JSON strengur",e164:"E.164 t\xF6lugildi",jwt:"JWT",template_literal:"gildi"},o={nan:"NaN",number:"n\xFAmer",array:"fylki"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return/^[A-Z]/.test(n.expected)?`Rangt gildi: \xDE\xFA sl\xF3st inn ${c} \xFEar sem \xE1 a\xF0 vera instanceof ${n.expected}`:`Rangt gildi: \xDE\xFA sl\xF3st inn ${c} \xFEar sem \xE1 a\xF0 vera ${i}`}case"invalid_value":return n.values.length===1?`Rangt gildi: gert r\xE1\xF0 fyrir ${_(n.values[0])}`:`\xD3gilt val: m\xE1 vera eitt af eftirfarandi ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${n.origin??"gildi"} hafi ${i}${n.maximum.toString()} ${s.unit??"hluti"}`:`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${n.origin??"gildi"} s\xE9 ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${n.origin} hafi ${i}${n.minimum.toString()} ${s.unit}`:`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${n.origin} s\xE9 ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 byrja \xE1 "${i.prefix}"`:i.format==="ends_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 enda \xE1 "${i.suffix}"`:i.format==="includes"?`\xD3gildur strengur: ver\xF0ur a\xF0 innihalda "${i.includes}"`:i.format==="regex"?`\xD3gildur strengur: ver\xF0ur a\xF0 fylgja mynstri ${i.pattern}`:`Rangt ${r[i.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"}: ${f(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 Lm(){return{localeError:$b()}}var Ib=()=>{let e={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}};function t(n){return e[n]??null}let r={regex:"input",email:"indirizzo email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e ora ISO",date:"data ISO",time:"ora ISO",duration:"durata ISO",ipv4:"indirizzo IPv4",ipv6:"indirizzo IPv6",cidrv4:"intervallo IPv4",cidrv6:"intervallo IPv6",base64:"stringa codificata in base64",base64url:"URL codificata in base64",json_string:"stringa JSON",e164:"numero E.164",jwt:"JWT",template_literal:"input"},o={nan:"NaN",number:"numero",array:"vettore"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return/^[A-Z]/.test(n.expected)?`Input non valido: atteso instanceof ${n.expected}, ricevuto ${c}`:`Input non valido: atteso ${i}, ricevuto ${c}`}case"invalid_value":return n.values.length===1?`Input non valido: atteso ${_(n.values[0])}`:`Opzione non valida: atteso uno tra ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Troppo grande: ${n.origin??"valore"} deve avere ${i}${n.maximum.toString()} ${s.unit??"elementi"}`:`Troppo grande: ${n.origin??"valore"} deve essere ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Troppo piccolo: ${n.origin} deve avere ${i}${n.minimum.toString()} ${s.unit}`:`Troppo piccolo: ${n.origin} deve essere ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Stringa non valida: deve iniziare con "${i.prefix}"`:i.format==="ends_with"?`Stringa non valida: deve terminare con "${i.suffix}"`:i.format==="includes"?`Stringa non valida: deve includere "${i.includes}"`:i.format==="regex"?`Stringa non valida: deve corrispondere al pattern ${i.pattern}`:`Input non valido: ${r[i.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"}: ${f(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 Mm(){return{localeError:Ib()}}var Eb=()=>{let e={string:{unit:"\u6587\u5B57",verb:"\u3067\u3042\u308B"},file:{unit:"\u30D0\u30A4\u30C8",verb:"\u3067\u3042\u308B"},array:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"},set:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"}};function t(n){return e[n]??null}let r={regex:"\u5165\u529B\u5024",email:"\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9",url:"URL",emoji:"\u7D75\u6587\u5B57",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u6642",date:"ISO\u65E5\u4ED8",time:"ISO\u6642\u523B",duration:"ISO\u671F\u9593",ipv4:"IPv4\u30A2\u30C9\u30EC\u30B9",ipv6:"IPv6\u30A2\u30C9\u30EC\u30B9",cidrv4:"IPv4\u7BC4\u56F2",cidrv6:"IPv6\u7BC4\u56F2",base64:"base64\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",base64url:"base64url\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",json_string:"JSON\u6587\u5B57\u5217",e164:"E.164\u756A\u53F7",jwt:"JWT",template_literal:"\u5165\u529B\u5024"},o={nan:"NaN",number:"\u6570\u5024",array:"\u914D\u5217"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[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${c}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u5165\u529B: ${i}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${c}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`}case"invalid_value":return n.values.length===1?`\u7121\u52B9\u306A\u5165\u529B: ${_(n.values[0])}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u9078\u629E: ${f(n.values,"\u3001")}\u306E\u3044\u305A\u308C\u304B\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"too_big":{let i=n.inclusive?"\u4EE5\u4E0B\u3067\u3042\u308B":"\u3088\u308A\u5C0F\u3055\u3044",s=t(n.origin);return s?`\u5927\u304D\u3059\u304E\u308B\u5024: ${n.origin??"\u5024"}\u306F${n.maximum.toString()}${s.unit??"\u8981\u7D20"}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5927\u304D\u3059\u304E\u308B\u5024: ${n.origin??"\u5024"}\u306F${n.maximum.toString()}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"too_small":{let i=n.inclusive?"\u4EE5\u4E0A\u3067\u3042\u308B":"\u3088\u308A\u5927\u304D\u3044",s=t(n.origin);return s?`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${n.origin}\u306F${n.minimum.toString()}${s.unit}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${n.origin}\u306F${n.minimum.toString()}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${i.prefix}"\u3067\u59CB\u307E\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:i.format==="ends_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${i.suffix}"\u3067\u7D42\u308F\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:i.format==="includes"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${i.includes}"\u3092\u542B\u3080\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:i.format==="regex"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: \u30D1\u30BF\u30FC\u30F3${i.pattern}\u306B\u4E00\u81F4\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u7121\u52B9\u306A${r[i.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":""}: ${f(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 Fm(){return{localeError:Eb()}}var wb=()=>{let e={string:{unit:"\u10E1\u10D8\u10DB\u10D1\u10DD\u10DA\u10DD",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},file:{unit:"\u10D1\u10D0\u10D8\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},array:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},set:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"}};function t(n){return e[n]??null}let r={regex:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0",email:"\u10D4\u10DA-\u10E4\u10DD\u10E1\u10E2\u10D8\u10E1 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",url:"URL",emoji:"\u10D4\u10DB\u10DD\u10EF\u10D8",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8-\u10D3\u10E0\u10DD",date:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8",time:"\u10D3\u10E0\u10DD",duration:"\u10EE\u10D0\u10DC\u10D2\u10E0\u10EB\u10DA\u10D8\u10D5\u10DD\u10D1\u10D0",ipv4:"IPv4 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",ipv6:"IPv6 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",cidrv4:"IPv4 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",cidrv6:"IPv6 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",base64:"base64-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8",base64url:"base64url-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8",json_string:"JSON \u10D5\u10D4\u10DA\u10D8",e164:"E.164 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8",jwt:"JWT",template_literal:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"},o={nan:"NaN",number:"\u10E0\u10D8\u10EA\u10EE\u10D5\u10D8",string:"\u10D5\u10D4\u10DA\u10D8",boolean:"\u10D1\u10E3\u10DA\u10D4\u10D0\u10DC\u10D8",function:"\u10E4\u10E3\u10DC\u10E5\u10EA\u10D8\u10D0",array:"\u10DB\u10D0\u10E1\u10D8\u10D5\u10D8"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[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 ${c}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${i}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${c}`}case"invalid_value":return n.values.length===1?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${_(n.values[0])}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D0\u10E0\u10D8\u10D0\u10DC\u10E2\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8\u10D0 \u10D4\u10E0\u10D7-\u10D4\u10E0\u10D7\u10D8 ${f(n.values,"|")}-\u10D3\u10D0\u10DC`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(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} ${i}${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 ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(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} ${i}${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 ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10EC\u10E7\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${i.prefix}"-\u10D8\u10D7`:i.format==="ends_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10DB\u10D7\u10D0\u10D5\u10E0\u10D3\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${i.suffix}"-\u10D8\u10D7`:i.format==="includes"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1 "${i.includes}"-\u10E1`:i.format==="regex"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D4\u10E1\u10D0\u10D1\u10D0\u10DB\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 \u10E8\u10D0\u10D1\u10DA\u10DD\u10DC\u10E1 ${i.pattern}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 ${r[i.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"}: ${f(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 Zm(){return{localeError:wb()}}var Ob=()=>{let e={string:{unit:"\u178F\u17BD\u17A2\u1780\u17D2\u179F\u179A",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},file:{unit:"\u1794\u17C3",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},array:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},set:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"}};function t(n){return e[n]??null}let r={regex:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B",email:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793\u17A2\u17CA\u17B8\u1798\u17C2\u179B",url:"URL",emoji:"\u179F\u1789\u17D2\u1789\u17B6\u17A2\u17B6\u179A\u1798\u17D2\u1798\u178E\u17CD",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 \u1793\u17B7\u1784\u1798\u17C9\u17C4\u1784 ISO",date:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 ISO",time:"\u1798\u17C9\u17C4\u1784 ISO",duration:"\u179A\u1799\u17C8\u1796\u17C1\u179B ISO",ipv4:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",ipv6:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",cidrv4:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",cidrv6:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",base64:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64",base64url:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64url",json_string:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A JSON",e164:"\u179B\u17C1\u1781 E.164",jwt:"JWT",template_literal:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B"},o={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 i=o[n.expected]??n.expected,s=v(n.input),c=o[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 ${c}`:`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${i} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${c}`}case"invalid_value":return n.values.length===1?`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${_(n.values[0])}`:`\u1787\u1798\u17D2\u179A\u17BE\u179F\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1787\u17B6\u1798\u17BD\u1799\u1780\u17D2\u1793\u17BB\u1784\u1785\u17C6\u178E\u17C4\u1798 ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(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"} ${i} ${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"} ${i} ${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${n.origin} ${i} ${n.minimum.toString()} ${s.unit}`:`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${n.origin} ${i} ${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1785\u17B6\u1794\u17CB\u1795\u17D2\u178F\u17BE\u1798\u178A\u17C4\u1799 "${i.prefix}"`:i.format==="ends_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1794\u1789\u17D2\u1785\u1794\u17CB\u178A\u17C4\u1799 "${i.suffix}"`:i.format==="includes"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1798\u17B6\u1793 "${i.includes}"`:i.format==="regex"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1795\u17D2\u1782\u17BC\u1795\u17D2\u1782\u1784\u1793\u17B9\u1784\u1791\u1798\u17D2\u179A\u1784\u17CB\u178A\u17C2\u179B\u1794\u17B6\u1793\u1780\u17C6\u178E\u178F\u17CB ${i.pattern}`:`\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 ${r[i.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 ${f(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 yr(){return{localeError:Ob()}}function Vm(){return yr()}var Tb=()=>{let e={string:{unit:"\uBB38\uC790",verb:"to have"},file:{unit:"\uBC14\uC774\uD2B8",verb:"to have"},array:{unit:"\uAC1C",verb:"to have"},set:{unit:"\uAC1C",verb:"to have"}};function t(n){return e[n]??null}let r={regex:"\uC785\uB825",email:"\uC774\uBA54\uC77C \uC8FC\uC18C",url:"URL",emoji:"\uC774\uBAA8\uC9C0",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \uB0A0\uC9DC\uC2DC\uAC04",date:"ISO \uB0A0\uC9DC",time:"ISO \uC2DC\uAC04",duration:"ISO \uAE30\uAC04",ipv4:"IPv4 \uC8FC\uC18C",ipv6:"IPv6 \uC8FC\uC18C",cidrv4:"IPv4 \uBC94\uC704",cidrv6:"IPv6 \uBC94\uC704",base64:"base64 \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",base64url:"base64url \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",json_string:"JSON \uBB38\uC790\uC5F4",e164:"E.164 \uBC88\uD638",jwt:"JWT",template_literal:"\uC785\uB825"},o={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[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 ${c}\uC785\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 ${i}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${c}\uC785\uB2C8\uB2E4`}case"invalid_value":return n.values.length===1?`\uC798\uBABB\uB41C \uC785\uB825: \uAC12\uC740 ${_(n.values[0])} \uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC635\uC158: ${f(n.values,"\uB610\uB294 ")} \uC911 \uD558\uB098\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"too_big":{let i=n.inclusive?"\uC774\uD558":"\uBBF8\uB9CC",s=i==="\uBBF8\uB9CC"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",c=t(n.origin),u=c?.unit??"\uC694\uC18C";return c?`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${n.maximum.toString()}${u} ${i}${s}`:`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${n.maximum.toString()} ${i}${s}`}case"too_small":{let i=n.inclusive?"\uC774\uC0C1":"\uCD08\uACFC",s=i==="\uC774\uC0C1"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",c=t(n.origin),u=c?.unit??"\uC694\uC18C";return c?`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${n.minimum.toString()}${u} ${i}${s}`:`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${n.minimum.toString()} ${i}${s}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${i.prefix}"(\uC73C)\uB85C \uC2DC\uC791\uD574\uC57C \uD569\uB2C8\uB2E4`:i.format==="ends_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${i.suffix}"(\uC73C)\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4`:i.format==="includes"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${i.includes}"\uC744(\uB97C) \uD3EC\uD568\uD574\uC57C \uD569\uB2C8\uB2E4`:i.format==="regex"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: \uC815\uADDC\uC2DD ${i.pattern} \uD328\uD134\uACFC \uC77C\uCE58\uD574\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C ${r[i.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: ${f(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 Bm(){return{localeError:Tb()}}var fn=e=>e.charAt(0).toUpperCase()+e.slice(1);function Hm(e){let t=Math.abs(e),r=t%10,o=t%100;return o>=11&&o<=19||r===0?"many":r===1?"one":"few"}var Pb=()=>{let e={string:{unit:{one:"simbolis",few:"simboliai",many:"simboli\u0173"},verb:{smaller:{inclusive:"turi b\u016Bti ne ilgesn\u0117 kaip",notInclusive:"turi b\u016Bti trumpesn\u0117 kaip"},bigger:{inclusive:"turi b\u016Bti ne trumpesn\u0117 kaip",notInclusive:"turi b\u016Bti ilgesn\u0117 kaip"}}},file:{unit:{one:"baitas",few:"baitai",many:"bait\u0173"},verb:{smaller:{inclusive:"turi b\u016Bti ne didesnis kaip",notInclusive:"turi b\u016Bti ma\u017Eesnis kaip"},bigger:{inclusive:"turi b\u016Bti ne ma\u017Eesnis kaip",notInclusive:"turi b\u016Bti didesnis kaip"}}},array:{unit:{one:"element\u0105",few:"elementus",many:"element\u0173"},verb:{smaller:{inclusive:"turi tur\u0117ti ne daugiau kaip",notInclusive:"turi tur\u0117ti ma\u017Eiau kaip"},bigger:{inclusive:"turi tur\u0117ti ne ma\u017Eiau kaip",notInclusive:"turi tur\u0117ti daugiau kaip"}}},set:{unit:{one:"element\u0105",few:"elementus",many:"element\u0173"},verb:{smaller:{inclusive:"turi tur\u0117ti ne daugiau kaip",notInclusive:"turi tur\u0117ti ma\u017Eiau kaip"},bigger:{inclusive:"turi tur\u0117ti ne ma\u017Eiau kaip",notInclusive:"turi tur\u0117ti daugiau kaip"}}}};function t(n,i,s,c){let u=e[n]??null;return u===null?u:{unit:u.unit[i],verb:u.verb[c][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"},o={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 i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return/^[A-Z]/.test(n.expected)?`Gautas tipas ${c}, o tik\u0117tasi - instanceof ${n.expected}`:`Gautas tipas ${c}, o tik\u0117tasi - ${i}`}case"invalid_value":return n.values.length===1?`Privalo b\u016Bti ${_(n.values[0])}`:`Privalo b\u016Bti vienas i\u0161 ${f(n.values,"|")} pasirinkim\u0173`;case"too_big":{let i=o[n.origin]??n.origin,s=t(n.origin,Hm(Number(n.maximum)),n.inclusive??!1,"smaller");if(s?.verb)return`${fn(i??n.origin??"reik\u0161m\u0117")} ${s.verb} ${n.maximum.toString()} ${s.unit??"element\u0173"}`;let c=n.inclusive?"ne didesnis kaip":"ma\u017Eesnis kaip";return`${fn(i??n.origin??"reik\u0161m\u0117")} turi b\u016Bti ${c} ${n.maximum.toString()} ${s?.unit}`}case"too_small":{let i=o[n.origin]??n.origin,s=t(n.origin,Hm(Number(n.minimum)),n.inclusive??!1,"bigger");if(s?.verb)return`${fn(i??n.origin??"reik\u0161m\u0117")} ${s.verb} ${n.minimum.toString()} ${s.unit??"element\u0173"}`;let c=n.inclusive?"ne ma\u017Eesnis kaip":"didesnis kaip";return`${fn(i??n.origin??"reik\u0161m\u0117")} turi b\u016Bti ${c} ${n.minimum.toString()} ${s?.unit}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Eilut\u0117 privalo prasid\u0117ti "${i.prefix}"`:i.format==="ends_with"?`Eilut\u0117 privalo pasibaigti "${i.suffix}"`:i.format==="includes"?`Eilut\u0117 privalo \u012Ftraukti "${i.includes}"`:i.format==="regex"?`Eilut\u0117 privalo atitikti ${i.pattern}`:`Neteisingas ${r[i.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"}: ${f(n.keys,", ")}`;case"invalid_key":return"Rastas klaidingas raktas";case"invalid_union":return"Klaidinga \u012Fvestis";case"invalid_element":{let i=o[n.origin]??n.origin;return`${fn(i??n.origin??"reik\u0161m\u0117")} turi klaiding\u0105 \u012Fvest\u012F`}default:return"Klaidinga \u012Fvestis"}}};function Gm(){return{localeError:Pb()}}var Ab=()=>{let e={string:{unit:"\u0437\u043D\u0430\u0446\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},file:{unit:"\u0431\u0430\u0458\u0442\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},array:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},set:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"}};function t(n){return e[n]??null}let r={regex:"\u0432\u043D\u0435\u0441",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u043D\u0430 \u0435-\u043F\u043E\u0448\u0442\u0430",url:"URL",emoji:"\u0435\u043C\u043E\u045F\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0443\u043C \u0438 \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0443\u043C",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u0432\u0440\u0435\u043C\u0435\u0442\u0440\u0430\u0435\u045A\u0435",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441\u0430",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441\u0430",cidrv4:"IPv4 \u043E\u043F\u0441\u0435\u0433",cidrv6:"IPv6 \u043E\u043F\u0441\u0435\u0433",base64:"base64-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",base64url:"base64url-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",json_string:"JSON \u043D\u0438\u0437\u0430",e164:"E.164 \u0431\u0440\u043E\u0458",jwt:"JWT",template_literal:"\u0432\u043D\u0435\u0441"},o={nan:"NaN",number:"\u0431\u0440\u043E\u0458",array:"\u043D\u0438\u0437\u0430"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[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 ${c}`:`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${i}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${c}`}case"invalid_value":return n.values.length===1?`Invalid input: expected ${_(n.values[0])}`:`\u0413\u0440\u0435\u0448\u0430\u043D\u0430 \u043E\u043F\u0446\u0438\u0458\u0430: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 \u0435\u0434\u043D\u0430 ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(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 ${i}${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 ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(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 ${i}${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 ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u043D\u0443\u0432\u0430 \u0441\u043E "${i.prefix}"`:i.format==="ends_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u0432\u0440\u0448\u0443\u0432\u0430 \u0441\u043E "${i.suffix}"`:i.format==="includes"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0432\u043A\u043B\u0443\u0447\u0443\u0432\u0430 "${i.includes}"`:i.format==="regex"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u043E\u0434\u0433\u043E\u0430\u0440\u0430 \u043D\u0430 \u043F\u0430\u0442\u0435\u0440\u043D\u043E\u0442 ${i.pattern}`:`Invalid ${r[i.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"}: ${f(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 Km(){return{localeError:Ab()}}var Nb=()=>{let e={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}};function t(n){return e[n]??null}let r={regex:"input",email:"alamat e-mel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tarikh masa ISO",date:"tarikh ISO",time:"masa ISO",duration:"tempoh ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"julat IPv4",cidrv6:"julat IPv6",base64:"string dikodkan base64",base64url:"string dikodkan base64url",json_string:"string JSON",e164:"nombor E.164",jwt:"JWT",template_literal:"input"},o={nan:"NaN",number:"nombor"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return/^[A-Z]/.test(n.expected)?`Input tidak sah: dijangka instanceof ${n.expected}, diterima ${c}`:`Input tidak sah: dijangka ${i}, diterima ${c}`}case"invalid_value":return n.values.length===1?`Input tidak sah: dijangka ${_(n.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Terlalu besar: dijangka ${n.origin??"nilai"} ${s.verb} ${i}${n.maximum.toString()} ${s.unit??"elemen"}`:`Terlalu besar: dijangka ${n.origin??"nilai"} adalah ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Terlalu kecil: dijangka ${n.origin} ${s.verb} ${i}${n.minimum.toString()} ${s.unit}`:`Terlalu kecil: dijangka ${n.origin} adalah ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`String tidak sah: mesti bermula dengan "${i.prefix}"`:i.format==="ends_with"?`String tidak sah: mesti berakhir dengan "${i.suffix}"`:i.format==="includes"?`String tidak sah: mesti mengandungi "${i.includes}"`:i.format==="regex"?`String tidak sah: mesti sepadan dengan corak ${i.pattern}`:`${r[i.format]??n.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${n.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${f(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 Wm(){return{localeError:Nb()}}var Cb=()=>{let e={string:{unit:"tekens",verb:"heeft"},file:{unit:"bytes",verb:"heeft"},array:{unit:"elementen",verb:"heeft"},set:{unit:"elementen",verb:"heeft"}};function t(n){return e[n]??null}let r={regex:"invoer",email:"emailadres",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum en tijd",date:"ISO datum",time:"ISO tijd",duration:"ISO duur",ipv4:"IPv4-adres",ipv6:"IPv6-adres",cidrv4:"IPv4-bereik",cidrv6:"IPv6-bereik",base64:"base64-gecodeerde tekst",base64url:"base64 URL-gecodeerde tekst",json_string:"JSON string",e164:"E.164-nummer",jwt:"JWT",template_literal:"invoer"},o={nan:"NaN",number:"getal"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return/^[A-Z]/.test(n.expected)?`Ongeldige invoer: verwacht instanceof ${n.expected}, ontving ${c}`:`Ongeldige invoer: verwacht ${i}, ontving ${c}`}case"invalid_value":return n.values.length===1?`Ongeldige invoer: verwacht ${_(n.values[0])}`:`Ongeldige optie: verwacht \xE9\xE9n van ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin),c=n.origin==="date"?"laat":n.origin==="string"?"lang":"groot";return s?`Te ${c}: verwacht dat ${n.origin??"waarde"} ${i}${n.maximum.toString()} ${s.unit??"elementen"} ${s.verb}`:`Te ${c}: verwacht dat ${n.origin??"waarde"} ${i}${n.maximum.toString()} is`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin),c=n.origin==="date"?"vroeg":n.origin==="string"?"kort":"klein";return s?`Te ${c}: verwacht dat ${n.origin} ${i}${n.minimum.toString()} ${s.unit} ${s.verb}`:`Te ${c}: verwacht dat ${n.origin} ${i}${n.minimum.toString()} is`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Ongeldige tekst: moet met "${i.prefix}" beginnen`:i.format==="ends_with"?`Ongeldige tekst: moet op "${i.suffix}" eindigen`:i.format==="includes"?`Ongeldige tekst: moet "${i.includes}" bevatten`:i.format==="regex"?`Ongeldige tekst: moet overeenkomen met patroon ${i.pattern}`:`Ongeldig: ${r[i.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":""}: ${f(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 qm(){return{localeError:Cb()}}var Rb=()=>{let e={string:{unit:"tegn",verb:"\xE5 ha"},file:{unit:"bytes",verb:"\xE5 ha"},array:{unit:"elementer",verb:"\xE5 inneholde"},set:{unit:"elementer",verb:"\xE5 inneholde"}};function t(n){return e[n]??null}let r={regex:"input",email:"e-postadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslett",date:"ISO-dato",time:"ISO-klokkeslett",duration:"ISO-varighet",ipv4:"IPv4-omr\xE5de",ipv6:"IPv6-omr\xE5de",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkodet streng",base64url:"base64url-enkodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},o={nan:"NaN",number:"tall",array:"liste"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return/^[A-Z]/.test(n.expected)?`Ugyldig input: forventet instanceof ${n.expected}, fikk ${c}`:`Ugyldig input: forventet ${i}, fikk ${c}`}case"invalid_value":return n.values.length===1?`Ugyldig verdi: forventet ${_(n.values[0])}`:`Ugyldig valg: forventet en av ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`For stor(t): forventet ${n.origin??"value"} til \xE5 ha ${i}${n.maximum.toString()} ${s.unit??"elementer"}`:`For stor(t): forventet ${n.origin??"value"} til \xE5 ha ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`For lite(n): forventet ${n.origin} til \xE5 ha ${i}${n.minimum.toString()} ${s.unit}`:`For lite(n): forventet ${n.origin} til \xE5 ha ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Ugyldig streng: m\xE5 starte med "${i.prefix}"`:i.format==="ends_with"?`Ugyldig streng: m\xE5 ende med "${i.suffix}"`:i.format==="includes"?`Ugyldig streng: m\xE5 inneholde "${i.includes}"`:i.format==="regex"?`Ugyldig streng: m\xE5 matche m\xF8nsteret ${i.pattern}`:`Ugyldig ${r[i.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"}: ${f(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 Jm(){return{localeError:Rb()}}var Db=()=>{let e={string:{unit:"harf",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"unsur",verb:"olmal\u0131d\u0131r"},set:{unit:"unsur",verb:"olmal\u0131d\u0131r"}};function t(n){return e[n]??null}let r={regex:"giren",email:"epostag\xE2h",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO heng\xE2m\u0131",date:"ISO tarihi",time:"ISO zaman\u0131",duration:"ISO m\xFCddeti",ipv4:"IPv4 ni\u015F\xE2n\u0131",ipv6:"IPv6 ni\u015F\xE2n\u0131",cidrv4:"IPv4 menzili",cidrv6:"IPv6 menzili",base64:"base64-\u015Fifreli metin",base64url:"base64url-\u015Fifreli metin",json_string:"JSON metin",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"giren"},o={nan:"NaN",number:"numara",array:"saf",null:"gayb"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return/^[A-Z]/.test(n.expected)?`F\xE2sit giren: umulan instanceof ${n.expected}, al\u0131nan ${c}`:`F\xE2sit giren: umulan ${i}, al\u0131nan ${c}`}case"invalid_value":return n.values.length===1?`F\xE2sit giren: umulan ${_(n.values[0])}`:`F\xE2sit tercih: m\xFBteberler ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Fazla b\xFCy\xFCk: ${n.origin??"value"}, ${i}${n.maximum.toString()} ${s.unit??"elements"} sahip olmal\u0131yd\u0131.`:`Fazla b\xFCy\xFCk: ${n.origin??"value"}, ${i}${n.maximum.toString()} olmal\u0131yd\u0131.`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Fazla k\xFC\xE7\xFCk: ${n.origin}, ${i}${n.minimum.toString()} ${s.unit} sahip olmal\u0131yd\u0131.`:`Fazla k\xFC\xE7\xFCk: ${n.origin}, ${i}${n.minimum.toString()} olmal\u0131yd\u0131.`}case"invalid_format":{let i=n;return i.format==="starts_with"?`F\xE2sit metin: "${i.prefix}" ile ba\u015Flamal\u0131.`:i.format==="ends_with"?`F\xE2sit metin: "${i.suffix}" ile bitmeli.`:i.format==="includes"?`F\xE2sit metin: "${i.includes}" ihtiv\xE2 etmeli.`:i.format==="regex"?`F\xE2sit metin: ${i.pattern} nak\u015F\u0131na uymal\u0131.`:`F\xE2sit ${r[i.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":""}: ${f(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 Ym(){return{localeError:Db()}}var zb=()=>{let e={string:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},file:{unit:"\u0628\u0627\u06CC\u067C\u0633",verb:"\u0648\u0644\u0631\u064A"},array:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},set:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"}};function t(n){return e[n]??null}let r={regex:"\u0648\u0631\u0648\u062F\u064A",email:"\u0628\u0631\u06CC\u069A\u0646\u0627\u0644\u06CC\u06A9",url:"\u06CC\u0648 \u0622\u0631 \u0627\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0646\u06CC\u067C\u0647 \u0627\u0648 \u0648\u062E\u062A",date:"\u0646\u06D0\u067C\u0647",time:"\u0648\u062E\u062A",duration:"\u0645\u0648\u062F\u0647",ipv4:"\u062F IPv4 \u067E\u062A\u0647",ipv6:"\u062F IPv6 \u067E\u062A\u0647",cidrv4:"\u062F IPv4 \u0633\u0627\u062D\u0647",cidrv6:"\u062F IPv6 \u0633\u0627\u062D\u0647",base64:"base64-encoded \u0645\u062A\u0646",base64url:"base64url-encoded \u0645\u062A\u0646",json_string:"JSON \u0645\u062A\u0646",e164:"\u062F E.164 \u0634\u0645\u06D0\u0631\u0647",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u064A"},o={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0627\u0631\u06D0"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[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 ${c} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`:`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${i} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${c} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`}case"invalid_value":return n.values.length===1?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${_(n.values[0])} \u0648\u0627\u06CC`:`\u0646\u0627\u0633\u0645 \u0627\u0646\u062A\u062E\u0627\u0628: \u0628\u0627\u06CC\u062F \u06CC\u0648 \u0644\u0647 ${f(n.values,"|")} \u0685\u062E\u0647 \u0648\u0627\u06CC`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${n.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${i}${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 ${i}${n.maximum.toString()} \u0648\u064A`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${n.origin} \u0628\u0627\u06CC\u062F ${i}${n.minimum.toString()} ${s.unit} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${n.origin} \u0628\u0627\u06CC\u062F ${i}${n.minimum.toString()} \u0648\u064A`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${i.prefix}" \u0633\u0631\u0647 \u067E\u06CC\u0644 \u0634\u064A`:i.format==="ends_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${i.suffix}" \u0633\u0631\u0647 \u067E\u0627\u06CC \u062A\u0647 \u0648\u0631\u0633\u064A\u0696\u064A`:i.format==="includes"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F "${i.includes}" \u0648\u0644\u0631\u064A`:i.format==="regex"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F ${i.pattern} \u0633\u0631\u0647 \u0645\u0637\u0627\u0628\u0642\u062A \u0648\u0644\u0631\u064A`:`${r[i.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"}: ${f(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 Xm(){return{localeError:zb()}}var Ub=()=>{let e={string:{unit:"znak\xF3w",verb:"mie\u0107"},file:{unit:"bajt\xF3w",verb:"mie\u0107"},array:{unit:"element\xF3w",verb:"mie\u0107"},set:{unit:"element\xF3w",verb:"mie\u0107"}};function t(n){return e[n]??null}let r={regex:"wyra\u017Cenie",email:"adres email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i godzina w formacie ISO",date:"data w formacie ISO",time:"godzina w formacie ISO",duration:"czas trwania ISO",ipv4:"adres IPv4",ipv6:"adres IPv6",cidrv4:"zakres IPv4",cidrv6:"zakres IPv6",base64:"ci\u0105g znak\xF3w zakodowany w formacie base64",base64url:"ci\u0105g znak\xF3w zakodowany w formacie base64url",json_string:"ci\u0105g znak\xF3w w formacie JSON",e164:"liczba E.164",jwt:"JWT",template_literal:"wej\u015Bcie"},o={nan:"NaN",number:"liczba",array:"tablica"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return/^[A-Z]/.test(n.expected)?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano instanceof ${n.expected}, otrzymano ${c}`:`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${i}, otrzymano ${c}`}case"invalid_value":return n.values.length===1?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${_(n.values[0])}`:`Nieprawid\u0142owa opcja: oczekiwano jednej z warto\u015Bci ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Za du\u017Ca warto\u015B\u0107: oczekiwano, \u017Ce ${n.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${i}${n.maximum.toString()} ${s.unit??"element\xF3w"}`:`Zbyt du\u017C(y/a/e): oczekiwano, \u017Ce ${n.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Za ma\u0142a warto\u015B\u0107: oczekiwano, \u017Ce ${n.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${i}${n.minimum.toString()} ${s.unit??"element\xF3w"}`:`Zbyt ma\u0142(y/a/e): oczekiwano, \u017Ce ${n.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zaczyna\u0107 si\u0119 od "${i.prefix}"`:i.format==="ends_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi ko\u0144czy\u0107 si\u0119 na "${i.suffix}"`:i.format==="includes"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zawiera\u0107 "${i.includes}"`:i.format==="regex"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi odpowiada\u0107 wzorcowi ${i.pattern}`:`Nieprawid\u0142ow(y/a/e) ${r[i.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":""}: ${f(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 Qm(){return{localeError:Ub()}}var jb=()=>{let e={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function t(n){return e[n]??null}let r={regex:"padr\xE3o",email:"endere\xE7o de e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e hora ISO",date:"data ISO",time:"hora ISO",duration:"dura\xE7\xE3o ISO",ipv4:"endere\xE7o IPv4",ipv6:"endere\xE7o IPv6",cidrv4:"faixa de IPv4",cidrv6:"faixa de IPv6",base64:"texto codificado em base64",base64url:"URL codificada em base64",json_string:"texto JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},o={nan:"NaN",number:"n\xFAmero",null:"nulo"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return/^[A-Z]/.test(n.expected)?`Tipo inv\xE1lido: esperado instanceof ${n.expected}, recebido ${c}`:`Tipo inv\xE1lido: esperado ${i}, recebido ${c}`}case"invalid_value":return n.values.length===1?`Entrada inv\xE1lida: esperado ${_(n.values[0])}`:`Op\xE7\xE3o inv\xE1lida: esperada uma das ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Muito grande: esperado que ${n.origin??"valor"} tivesse ${i}${n.maximum.toString()} ${s.unit??"elementos"}`:`Muito grande: esperado que ${n.origin??"valor"} fosse ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Muito pequeno: esperado que ${n.origin} tivesse ${i}${n.minimum.toString()} ${s.unit}`:`Muito pequeno: esperado que ${n.origin} fosse ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Texto inv\xE1lido: deve come\xE7ar com "${i.prefix}"`:i.format==="ends_with"?`Texto inv\xE1lido: deve terminar com "${i.suffix}"`:i.format==="includes"?`Texto inv\xE1lido: deve incluir "${i.includes}"`:i.format==="regex"?`Texto inv\xE1lido: deve corresponder ao padr\xE3o ${i.pattern}`:`${r[i.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":""}: ${f(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 ep(){return{localeError:jb()}}var Lb=()=>{let e={string:{unit:"caractere",verb:"s\u0103 aib\u0103"},file:{unit:"octe\u021Bi",verb:"s\u0103 aib\u0103"},array:{unit:"elemente",verb:"s\u0103 aib\u0103"},set:{unit:"elemente",verb:"s\u0103 aib\u0103"},map:{unit:"intr\u0103ri",verb:"s\u0103 aib\u0103"}};function t(n){return e[n]??null}let r={regex:"intrare",email:"adres\u0103 de email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"dat\u0103 \u0219i or\u0103 ISO",date:"dat\u0103 ISO",time:"or\u0103 ISO",duration:"durat\u0103 ISO",ipv4:"adres\u0103 IPv4",ipv6:"adres\u0103 IPv6",mac:"adres\u0103 MAC",cidrv4:"interval IPv4",cidrv6:"interval IPv6",base64:"\u0219ir codat base64",base64url:"\u0219ir codat base64url",json_string:"\u0219ir JSON",e164:"num\u0103r E.164",jwt:"JWT",template_literal:"intrare"},o={nan:"NaN",string:"\u0219ir",number:"num\u0103r",boolean:"boolean",function:"func\u021Bie",array:"matrice",object:"obiect",undefined:"nedefinit",symbol:"simbol",bigint:"num\u0103r mare",void:"void",never:"never",map:"hart\u0103",set:"set"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return`Intrare invalid\u0103: a\u0219teptat ${i}, primit ${c}`}case"invalid_value":return n.values.length===1?`Intrare invalid\u0103: a\u0219teptat ${_(n.values[0])}`:`Op\u021Biune invalid\u0103: a\u0219teptat una dintre ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Prea mare: a\u0219teptat ca ${n.origin??"valoarea"} ${s.verb} ${i}${n.maximum.toString()} ${s.unit??"elemente"}`:`Prea mare: a\u0219teptat ca ${n.origin??"valoarea"} s\u0103 fie ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Prea mic: a\u0219teptat ca ${n.origin} ${s.verb} ${i}${n.minimum.toString()} ${s.unit}`:`Prea mic: a\u0219teptat ca ${n.origin} s\u0103 fie ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u0218ir invalid: trebuie s\u0103 \xEEnceap\u0103 cu "${i.prefix}"`:i.format==="ends_with"?`\u0218ir invalid: trebuie s\u0103 se termine cu "${i.suffix}"`:i.format==="includes"?`\u0218ir invalid: trebuie s\u0103 includ\u0103 "${i.includes}"`:i.format==="regex"?`\u0218ir invalid: trebuie s\u0103 se potriveasc\u0103 cu modelul ${i.pattern}`:`Format invalid: ${r[i.format]??n.format}`}case"not_multiple_of":return`Num\u0103r invalid: trebuie s\u0103 fie multiplu de ${n.divisor}`;case"unrecognized_keys":return`Chei nerecunoscute: ${f(n.keys,", ")}`;case"invalid_key":return`Cheie invalid\u0103 \xEEn ${n.origin}`;case"invalid_union":return"Intrare invalid\u0103";case"invalid_element":return`Valoare invalid\u0103 \xEEn ${n.origin}`;default:return"Intrare invalid\u0103"}}};function tp(){return{localeError:Lb()}}function np(e,t,r,o){let n=Math.abs(e),i=n%10,s=n%100;return s>=11&&s<=19?o:i===1?t:i>=2&&i<=4?r:o}var Mb=()=>{let e={string:{unit:{one:"\u0441\u0438\u043C\u0432\u043E\u043B",few:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",many:"\u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u0430",many:"\u0431\u0430\u0439\u0442"},verb:"\u0438\u043C\u0435\u0442\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"}};function t(n){return e[n]??null}let r={regex:"\u0432\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0438 \u0432\u0440\u0435\u043C\u044F",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u044F",duration:"ISO \u0434\u043B\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64",base64url:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64url",json_string:"JSON \u0441\u0442\u0440\u043E\u043A\u0430",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0432\u043E\u0434"},o={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0441\u0438\u0432"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[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 ${c}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${i}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${c}`}case"invalid_value":return n.values.length===1?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${_(n.values[0])}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0430\u0440\u0438\u0430\u043D\u0442: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0434\u043D\u043E \u0438\u0437 ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);if(s){let c=Number(n.maximum),u=np(c,s.unit.one,s.unit.few,s.unit.many);return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${n.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${i}${n.maximum.toString()} ${u}`}return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${n.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);if(s){let c=Number(n.minimum),u=np(c,s.unit.one,s.unit.few,s.unit.many);return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${n.origin} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${i}${n.minimum.toString()} ${u}`}return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${n.origin} \u0431\u0443\u0434\u0435\u0442 ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u043D\u0430\u0447\u0438\u043D\u0430\u0442\u044C\u0441\u044F \u0441 "${i.prefix}"`:i.format==="ends_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0437\u0430\u043A\u0430\u043D\u0447\u0438\u0432\u0430\u0442\u044C\u0441\u044F \u043D\u0430 "${i.suffix}"`:i.format==="includes"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u0434\u0435\u0440\u0436\u0430\u0442\u044C "${i.includes}"`:i.format==="regex"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043E\u0432\u0430\u0442\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${i.pattern}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 ${r[i.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":""}: ${f(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 rp(){return{localeError:Mb()}}var Fb=()=>{let e={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}};function t(n){return e[n]??null}let r={regex:"vnos",email:"e-po\u0161tni naslov",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum in \u010Das",date:"ISO datum",time:"ISO \u010Das",duration:"ISO trajanje",ipv4:"IPv4 naslov",ipv6:"IPv6 naslov",cidrv4:"obseg IPv4",cidrv6:"obseg IPv6",base64:"base64 kodiran niz",base64url:"base64url kodiran niz",json_string:"JSON niz",e164:"E.164 \u0161tevilka",jwt:"JWT",template_literal:"vnos"},o={nan:"NaN",number:"\u0161tevilo",array:"tabela"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return/^[A-Z]/.test(n.expected)?`Neveljaven vnos: pri\u010Dakovano instanceof ${n.expected}, prejeto ${c}`:`Neveljaven vnos: pri\u010Dakovano ${i}, prejeto ${c}`}case"invalid_value":return n.values.length===1?`Neveljaven vnos: pri\u010Dakovano ${_(n.values[0])}`:`Neveljavna mo\u017Enost: pri\u010Dakovano eno izmed ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Preveliko: pri\u010Dakovano, da bo ${n.origin??"vrednost"} imelo ${i}${n.maximum.toString()} ${s.unit??"elementov"}`:`Preveliko: pri\u010Dakovano, da bo ${n.origin??"vrednost"} ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Premajhno: pri\u010Dakovano, da bo ${n.origin} imelo ${i}${n.minimum.toString()} ${s.unit}`:`Premajhno: pri\u010Dakovano, da bo ${n.origin} ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Neveljaven niz: mora se za\u010Deti z "${i.prefix}"`:i.format==="ends_with"?`Neveljaven niz: mora se kon\u010Dati z "${i.suffix}"`:i.format==="includes"?`Neveljaven niz: mora vsebovati "${i.includes}"`:i.format==="regex"?`Neveljaven niz: mora ustrezati vzorcu ${i.pattern}`:`Neveljaven ${r[i.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"}: ${f(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 ip(){return{localeError:Fb()}}var Zb=()=>{let e={string:{unit:"tecken",verb:"att ha"},file:{unit:"bytes",verb:"att ha"},array:{unit:"objekt",verb:"att inneh\xE5lla"},set:{unit:"objekt",verb:"att inneh\xE5lla"}};function t(n){return e[n]??null}let r={regex:"regulj\xE4rt uttryck",email:"e-postadress",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datum och tid",date:"ISO-datum",time:"ISO-tid",duration:"ISO-varaktighet",ipv4:"IPv4-intervall",ipv6:"IPv6-intervall",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodad str\xE4ng",base64url:"base64url-kodad str\xE4ng",json_string:"JSON-str\xE4ng",e164:"E.164-nummer",jwt:"JWT",template_literal:"mall-literal"},o={nan:"NaN",number:"antal",array:"lista"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return/^[A-Z]/.test(n.expected)?`Ogiltig inmatning: f\xF6rv\xE4ntat instanceof ${n.expected}, fick ${c}`:`Ogiltig inmatning: f\xF6rv\xE4ntat ${i}, fick ${c}`}case"invalid_value":return n.values.length===1?`Ogiltig inmatning: f\xF6rv\xE4ntat ${_(n.values[0])}`:`Ogiltigt val: f\xF6rv\xE4ntade en av ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`F\xF6r stor(t): f\xF6rv\xE4ntade ${n.origin??"v\xE4rdet"} att ha ${i}${n.maximum.toString()} ${s.unit??"element"}`:`F\xF6r stor(t): f\xF6rv\xE4ntat ${n.origin??"v\xE4rdet"} att ha ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`F\xF6r lite(t): f\xF6rv\xE4ntade ${n.origin??"v\xE4rdet"} att ha ${i}${n.minimum.toString()} ${s.unit}`:`F\xF6r lite(t): f\xF6rv\xE4ntade ${n.origin??"v\xE4rdet"} att ha ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Ogiltig str\xE4ng: m\xE5ste b\xF6rja med "${i.prefix}"`:i.format==="ends_with"?`Ogiltig str\xE4ng: m\xE5ste sluta med "${i.suffix}"`:i.format==="includes"?`Ogiltig str\xE4ng: m\xE5ste inneh\xE5lla "${i.includes}"`:i.format==="regex"?`Ogiltig str\xE4ng: m\xE5ste matcha m\xF6nstret "${i.pattern}"`:`Ogiltig(t) ${r[i.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"}: ${f(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 op(){return{localeError:Zb()}}var Vb=()=>{let e={string:{unit:"\u0B8E\u0BB4\u0BC1\u0BA4\u0BCD\u0BA4\u0BC1\u0B95\u0BCD\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},file:{unit:"\u0BAA\u0BC8\u0B9F\u0BCD\u0B9F\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},array:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},set:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"}};function t(n){return e[n]??null}let r={regex:"\u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1",email:"\u0BAE\u0BBF\u0BA9\u0BCD\u0BA9\u0B9E\u0BCD\u0B9A\u0BB2\u0BCD \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0BA4\u0BC7\u0BA4\u0BBF \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",date:"ISO \u0BA4\u0BC7\u0BA4\u0BBF",time:"ISO \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",duration:"ISO \u0B95\u0BBE\u0BB2 \u0B85\u0BB3\u0BB5\u0BC1",ipv4:"IPv4 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",ipv6:"IPv6 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",cidrv4:"IPv4 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",cidrv6:"IPv6 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",base64:"base64-encoded \u0B9A\u0BB0\u0BAE\u0BCD",base64url:"base64url-encoded \u0B9A\u0BB0\u0BAE\u0BCD",json_string:"JSON \u0B9A\u0BB0\u0BAE\u0BCD",e164:"E.164 \u0B8E\u0BA3\u0BCD",jwt:"JWT",template_literal:"input"},o={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 i=o[n.expected]??n.expected,s=v(n.input),c=o[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 ${c}`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${i}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${c}`}case"invalid_value":return n.values.length===1?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${_(n.values[0])}`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0BB0\u0BC1\u0BAA\u0BCD\u0BAA\u0BAE\u0BCD: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${f(n.values,"|")} \u0B87\u0BB2\u0BCD \u0B92\u0BA9\u0BCD\u0BB1\u0BC1`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(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"} ${i}${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"} ${i}${n.maximum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"too_small":{let i=n.inclusive?">=":">",s=t(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} ${i}${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} ${i}${n.minimum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${i.prefix}" \u0B87\u0BB2\u0BCD \u0BA4\u0BCA\u0B9F\u0B99\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:i.format==="ends_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${i.suffix}" \u0B87\u0BB2\u0BCD \u0BAE\u0BC1\u0B9F\u0BBF\u0BB5\u0B9F\u0BC8\u0BAF \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:i.format==="includes"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${i.includes}" \u0B90 \u0B89\u0BB3\u0BCD\u0BB3\u0B9F\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:i.format==="regex"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: ${i.pattern} \u0BAE\u0BC1\u0BB1\u0BC8\u0BAA\u0BBE\u0B9F\u0BCD\u0B9F\u0BC1\u0B9F\u0BA9\u0BCD \u0BAA\u0BCA\u0BB0\u0BC1\u0BA8\u0BCD\u0BA4 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 ${r[i.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":""}: ${f(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 ap(){return{localeError:Vb()}}var Bb=()=>{let e={string:{unit:"\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},file:{unit:"\u0E44\u0E1A\u0E15\u0E4C",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},array:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},set:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"}};function t(n){return e[n]??null}let r={regex:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19",email:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E2D\u0E35\u0E40\u0E21\u0E25",url:"URL",emoji:"\u0E2D\u0E34\u0E42\u0E21\u0E08\u0E34",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",date:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E41\u0E1A\u0E1A ISO",time:"\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",duration:"\u0E0A\u0E48\u0E27\u0E07\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",ipv4:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv4",ipv6:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv6",cidrv4:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv4",cidrv6:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv6",base64:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64",base64url:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64 \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A URL",json_string:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A JSON",e164:"\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E42\u0E17\u0E23\u0E28\u0E31\u0E1E\u0E17\u0E4C\u0E23\u0E30\u0E2B\u0E27\u0E48\u0E32\u0E07\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28 (E.164)",jwt:"\u0E42\u0E17\u0E40\u0E04\u0E19 JWT",template_literal:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19"},o={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 i=o[n.expected]??n.expected,s=v(n.input),c=o[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 ${c}`:`\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${i} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${c}`}case"invalid_value":return n.values.length===1?`\u0E04\u0E48\u0E32\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${_(n.values[0])}`:`\u0E15\u0E31\u0E27\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19\u0E2B\u0E19\u0E36\u0E48\u0E07\u0E43\u0E19 ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19":"\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32",s=t(n.origin);return s?`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${n.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${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${i} ${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?"\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22":"\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32",s=t(n.origin);return s?`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${n.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${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${i} ${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E02\u0E36\u0E49\u0E19\u0E15\u0E49\u0E19\u0E14\u0E49\u0E27\u0E22 "${i.prefix}"`:i.format==="ends_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E25\u0E07\u0E17\u0E49\u0E32\u0E22\u0E14\u0E49\u0E27\u0E22 "${i.suffix}"`:i.format==="includes"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E21\u0E35 "${i.includes}" \u0E2D\u0E22\u0E39\u0E48\u0E43\u0E19\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21`:i.format==="regex"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14 ${i.pattern}`:`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: ${r[i.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: ${f(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 sp(){return{localeError:Bb()}}var Hb=()=>{let e={string:{unit:"karakter",verb:"olmal\u0131"},file:{unit:"bayt",verb:"olmal\u0131"},array:{unit:"\xF6\u011Fe",verb:"olmal\u0131"},set:{unit:"\xF6\u011Fe",verb:"olmal\u0131"}};function t(n){return e[n]??null}let r={regex:"girdi",email:"e-posta adresi",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO tarih ve saat",date:"ISO tarih",time:"ISO saat",duration:"ISO s\xFCre",ipv4:"IPv4 adresi",ipv6:"IPv6 adresi",cidrv4:"IPv4 aral\u0131\u011F\u0131",cidrv6:"IPv6 aral\u0131\u011F\u0131",base64:"base64 ile \u015Fifrelenmi\u015F metin",base64url:"base64url ile \u015Fifrelenmi\u015F metin",json_string:"JSON dizesi",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"\u015Eablon dizesi"},o={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return/^[A-Z]/.test(n.expected)?`Ge\xE7ersiz de\u011Fer: beklenen instanceof ${n.expected}, al\u0131nan ${c}`:`Ge\xE7ersiz de\u011Fer: beklenen ${i}, al\u0131nan ${c}`}case"invalid_value":return n.values.length===1?`Ge\xE7ersiz de\u011Fer: beklenen ${_(n.values[0])}`:`Ge\xE7ersiz se\xE7enek: a\u015Fa\u011F\u0131dakilerden biri olmal\u0131: ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`\xC7ok b\xFCy\xFCk: beklenen ${n.origin??"de\u011Fer"} ${i}${n.maximum.toString()} ${s.unit??"\xF6\u011Fe"}`:`\xC7ok b\xFCy\xFCk: beklenen ${n.origin??"de\u011Fer"} ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\xC7ok k\xFC\xE7\xFCk: beklenen ${n.origin} ${i}${n.minimum.toString()} ${s.unit}`:`\xC7ok k\xFC\xE7\xFCk: beklenen ${n.origin} ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Ge\xE7ersiz metin: "${i.prefix}" ile ba\u015Flamal\u0131`:i.format==="ends_with"?`Ge\xE7ersiz metin: "${i.suffix}" ile bitmeli`:i.format==="includes"?`Ge\xE7ersiz metin: "${i.includes}" i\xE7ermeli`:i.format==="regex"?`Ge\xE7ersiz metin: ${i.pattern} desenine uymal\u0131`:`Ge\xE7ersiz ${r[i.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":""}: ${f(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 cp(){return{localeError:Hb()}}var Gb=()=>{let e={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},file:{unit:"\u0431\u0430\u0439\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"}};function t(n){return e[n]??null}let r={regex:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u0435\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0457 \u043F\u043E\u0448\u0442\u0438",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0434\u0430\u0442\u0430 \u0442\u0430 \u0447\u0430\u0441 ISO",date:"\u0434\u0430\u0442\u0430 ISO",time:"\u0447\u0430\u0441 ISO",duration:"\u0442\u0440\u0438\u0432\u0430\u043B\u0456\u0441\u0442\u044C ISO",ipv4:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv4",ipv6:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv6",cidrv4:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv4",cidrv6:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv6",base64:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64",base64url:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64url",json_string:"\u0440\u044F\u0434\u043E\u043A JSON",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"},o={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[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 ${c}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${i}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${c}`}case"invalid_value":return n.values.length===1?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${_(n.values[0])}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0430 \u043E\u043F\u0446\u0456\u044F: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F \u043E\u0434\u043D\u0435 \u0437 ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(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} ${i}${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 ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(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} ${i}${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 ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043F\u043E\u0447\u0438\u043D\u0430\u0442\u0438\u0441\u044F \u0437 "${i.prefix}"`:i.format==="ends_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0437\u0430\u043A\u0456\u043D\u0447\u0443\u0432\u0430\u0442\u0438\u0441\u044F \u043D\u0430 "${i.suffix}"`:i.format==="includes"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043C\u0456\u0441\u0442\u0438\u0442\u0438 "${i.includes}"`:i.format==="regex"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0432\u0456\u0434\u043F\u043E\u0432\u0456\u0434\u0430\u0442\u0438 \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${i.pattern}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 ${r[i.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":""}: ${f(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 xr(){return{localeError:Gb()}}function up(){return xr()}var Kb=()=>{let e={string:{unit:"\u062D\u0631\u0648\u0641",verb:"\u06C1\u0648\u0646\u0627"},file:{unit:"\u0628\u0627\u0626\u0679\u0633",verb:"\u06C1\u0648\u0646\u0627"},array:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"},set:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"}};function t(n){return e[n]??null}let r={regex:"\u0627\u0646 \u067E\u0679",email:"\u0627\u06CC \u0645\u06CC\u0644 \u0627\u06CC\u0688\u0631\u06CC\u0633",url:"\u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",uuidv4:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 4",uuidv6:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 6",nanoid:"\u0646\u06CC\u0646\u0648 \u0622\u0626\u06CC \u0688\u06CC",guid:"\u062C\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid2:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC 2",ulid:"\u06CC\u0648 \u0627\u06CC\u0644 \u0622\u0626\u06CC \u0688\u06CC",xid:"\u0627\u06CC\u06A9\u0633 \u0622\u0626\u06CC \u0688\u06CC",ksuid:"\u06A9\u06D2 \u0627\u06CC\u0633 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",datetime:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0688\u06CC\u0679 \u0679\u0627\u0626\u0645",date:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u062A\u0627\u0631\u06CC\u062E",time:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0648\u0642\u062A",duration:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0645\u062F\u062A",ipv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0627\u06CC\u0688\u0631\u06CC\u0633",ipv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0627\u06CC\u0688\u0631\u06CC\u0633",cidrv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0631\u06CC\u0646\u062C",cidrv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0631\u06CC\u0646\u062C",base64:"\u0628\u06CC\u0633 64 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",base64url:"\u0628\u06CC\u0633 64 \u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",json_string:"\u062C\u06D2 \u0627\u06CC\u0633 \u0627\u0648 \u0627\u06CC\u0646 \u0633\u0679\u0631\u0646\u06AF",e164:"\u0627\u06CC 164 \u0646\u0645\u0628\u0631",jwt:"\u062C\u06D2 \u0688\u0628\u0644\u06CC\u0648 \u0679\u06CC",template_literal:"\u0627\u0646 \u067E\u0679"},o={nan:"NaN",number:"\u0646\u0645\u0628\u0631",array:"\u0622\u0631\u06D2",null:"\u0646\u0644"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[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 ${c} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`:`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${i} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${c} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`}case"invalid_value":return n.values.length===1?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${_(n.values[0])} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`:`\u063A\u0644\u0637 \u0622\u067E\u0634\u0646: ${f(n.values,"|")} \u0645\u06CC\u06BA \u0633\u06D2 \u0627\u06CC\u06A9 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u0628\u06C1\u062A \u0628\u0691\u0627: ${n.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u06D2 ${i}${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 ${i}${n.maximum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${n.origin} \u06A9\u06D2 ${i}${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 ${i}${n.minimum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${i.prefix}" \u0633\u06D2 \u0634\u0631\u0648\u0639 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:i.format==="ends_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${i.suffix}" \u067E\u0631 \u062E\u062A\u0645 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:i.format==="includes"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${i.includes}" \u0634\u0627\u0645\u0644 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:i.format==="regex"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: \u067E\u06CC\u0679\u0631\u0646 ${i.pattern} \u0633\u06D2 \u0645\u06CC\u0686 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:`\u063A\u0644\u0637 ${r[i.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":""}: ${f(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 lp(){return{localeError:Kb()}}var Wb=()=>{let e={string:{unit:"belgi",verb:"bo\u2018lishi kerak"},file:{unit:"bayt",verb:"bo\u2018lishi kerak"},array:{unit:"element",verb:"bo\u2018lishi kerak"},set:{unit:"element",verb:"bo\u2018lishi kerak"},map:{unit:"yozuv",verb:"bo\u2018lishi kerak"}};function t(n){return e[n]??null}let r={regex:"kirish",email:"elektron pochta manzili",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO sana va vaqti",date:"ISO sana",time:"ISO vaqt",duration:"ISO davomiylik",ipv4:"IPv4 manzil",ipv6:"IPv6 manzil",mac:"MAC manzil",cidrv4:"IPv4 diapazon",cidrv6:"IPv6 diapazon",base64:"base64 kodlangan satr",base64url:"base64url kodlangan satr",json_string:"JSON satr",e164:"E.164 raqam",jwt:"JWT",template_literal:"kirish"},o={nan:"NaN",number:"raqam",array:"massiv"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return/^[A-Z]/.test(n.expected)?`Noto\u2018g\u2018ri kirish: kutilgan instanceof ${n.expected}, qabul qilingan ${c}`:`Noto\u2018g\u2018ri kirish: kutilgan ${i}, qabul qilingan ${c}`}case"invalid_value":return n.values.length===1?`Noto\u2018g\u2018ri kirish: kutilgan ${_(n.values[0])}`:`Noto\u2018g\u2018ri variant: quyidagilardan biri kutilgan ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Juda katta: kutilgan ${n.origin??"qiymat"} ${i}${n.maximum.toString()} ${s.unit} ${s.verb}`:`Juda katta: kutilgan ${n.origin??"qiymat"} ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Juda kichik: kutilgan ${n.origin} ${i}${n.minimum.toString()} ${s.unit} ${s.verb}`:`Juda kichik: kutilgan ${n.origin} ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Noto\u2018g\u2018ri satr: "${i.prefix}" bilan boshlanishi kerak`:i.format==="ends_with"?`Noto\u2018g\u2018ri satr: "${i.suffix}" bilan tugashi kerak`:i.format==="includes"?`Noto\u2018g\u2018ri satr: "${i.includes}" ni o\u2018z ichiga olishi kerak`:i.format==="regex"?`Noto\u2018g\u2018ri satr: ${i.pattern} shabloniga mos kelishi kerak`:`Noto\u2018g\u2018ri ${r[i.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":""}: ${f(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 dp(){return{localeError:Wb()}}var qb=()=>{let e={string:{unit:"k\xFD t\u1EF1",verb:"c\xF3"},file:{unit:"byte",verb:"c\xF3"},array:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"},set:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"}};function t(n){return e[n]??null}let r={regex:"\u0111\u1EA7u v\xE0o",email:"\u0111\u1ECBa ch\u1EC9 email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ng\xE0y gi\u1EDD ISO",date:"ng\xE0y ISO",time:"gi\u1EDD ISO",duration:"kho\u1EA3ng th\u1EDDi gian ISO",ipv4:"\u0111\u1ECBa ch\u1EC9 IPv4",ipv6:"\u0111\u1ECBa ch\u1EC9 IPv6",cidrv4:"d\u1EA3i IPv4",cidrv6:"d\u1EA3i IPv6",base64:"chu\u1ED7i m\xE3 h\xF3a base64",base64url:"chu\u1ED7i m\xE3 h\xF3a base64url",json_string:"chu\u1ED7i JSON",e164:"s\u1ED1 E.164",jwt:"JWT",template_literal:"\u0111\u1EA7u v\xE0o"},o={nan:"NaN",number:"s\u1ED1",array:"m\u1EA3ng"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[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 ${c}`:`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${i}, nh\u1EADn \u0111\u01B0\u1EE3c ${c}`}case"invalid_value":return n.values.length===1?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${_(n.values[0])}`:`T\xF9y ch\u1ECDn kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i m\u1ED9t trong c\xE1c gi\xE1 tr\u1ECB ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${n.origin??"gi\xE1 tr\u1ECB"} ${s.verb} ${i}${n.maximum.toString()} ${s.unit??"ph\u1EA7n t\u1EED"}`:`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${n.origin??"gi\xE1 tr\u1ECB"} ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${n.origin} ${s.verb} ${i}${n.minimum.toString()} ${s.unit}`:`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${n.origin} ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i b\u1EAFt \u0111\u1EA7u b\u1EB1ng "${i.prefix}"`:i.format==="ends_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i k\u1EBFt th\xFAc b\u1EB1ng "${i.suffix}"`:i.format==="includes"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i bao g\u1ED3m "${i.includes}"`:i.format==="regex"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i kh\u1EDBp v\u1EDBi m\u1EABu ${i.pattern}`:`${r[i.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: ${f(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 mp(){return{localeError:qb()}}var Jb=()=>{let e={string:{unit:"\u5B57\u7B26",verb:"\u5305\u542B"},file:{unit:"\u5B57\u8282",verb:"\u5305\u542B"},array:{unit:"\u9879",verb:"\u5305\u542B"},set:{unit:"\u9879",verb:"\u5305\u542B"}};function t(n){return e[n]??null}let r={regex:"\u8F93\u5165",email:"\u7535\u5B50\u90AE\u4EF6",url:"URL",emoji:"\u8868\u60C5\u7B26\u53F7",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u671F\u65F6\u95F4",date:"ISO\u65E5\u671F",time:"ISO\u65F6\u95F4",duration:"ISO\u65F6\u957F",ipv4:"IPv4\u5730\u5740",ipv6:"IPv6\u5730\u5740",cidrv4:"IPv4\u7F51\u6BB5",cidrv6:"IPv6\u7F51\u6BB5",base64:"base64\u7F16\u7801\u5B57\u7B26\u4E32",base64url:"base64url\u7F16\u7801\u5B57\u7B26\u4E32",json_string:"JSON\u5B57\u7B26\u4E32",e164:"E.164\u53F7\u7801",jwt:"JWT",template_literal:"\u8F93\u5165"},o={nan:"NaN",number:"\u6570\u5B57",array:"\u6570\u7EC4",null:"\u7A7A\u503C(null)"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return/^[A-Z]/.test(n.expected)?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B instanceof ${n.expected}\uFF0C\u5B9E\u9645\u63A5\u6536 ${c}`:`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${i}\uFF0C\u5B9E\u9645\u63A5\u6536 ${c}`}case"invalid_value":return n.values.length===1?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${_(n.values[0])}`:`\u65E0\u6548\u9009\u9879\uFF1A\u671F\u671B\u4EE5\u4E0B\u4E4B\u4E00 ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${n.origin??"\u503C"} ${i}${n.maximum.toString()} ${s.unit??"\u4E2A\u5143\u7D20"}`:`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${n.origin??"\u503C"} ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${n.origin} ${i}${n.minimum.toString()} ${s.unit}`:`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${n.origin} ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${i.prefix}" \u5F00\u5934`:i.format==="ends_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${i.suffix}" \u7ED3\u5C3E`:i.format==="includes"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u5305\u542B "${i.includes}"`:i.format==="regex"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u6EE1\u8DB3\u6B63\u5219\u8868\u8FBE\u5F0F ${i.pattern}`:`\u65E0\u6548${r[i.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): ${f(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 pp(){return{localeError:Jb()}}var Yb=()=>{let e={string:{unit:"\u5B57\u5143",verb:"\u64C1\u6709"},file:{unit:"\u4F4D\u5143\u7D44",verb:"\u64C1\u6709"},array:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"},set:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"}};function t(n){return e[n]??null}let r={regex:"\u8F38\u5165",email:"\u90F5\u4EF6\u5730\u5740",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u65E5\u671F\u6642\u9593",date:"ISO \u65E5\u671F",time:"ISO \u6642\u9593",duration:"ISO \u671F\u9593",ipv4:"IPv4 \u4F4D\u5740",ipv6:"IPv6 \u4F4D\u5740",cidrv4:"IPv4 \u7BC4\u570D",cidrv6:"IPv6 \u7BC4\u570D",base64:"base64 \u7DE8\u78BC\u5B57\u4E32",base64url:"base64url \u7DE8\u78BC\u5B57\u4E32",json_string:"JSON \u5B57\u4E32",e164:"E.164 \u6578\u503C",jwt:"JWT",template_literal:"\u8F38\u5165"},o={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[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 ${c}`:`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${i}\uFF0C\u4F46\u6536\u5230 ${c}`}case"invalid_value":return n.values.length===1?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${_(n.values[0])}`:`\u7121\u6548\u7684\u9078\u9805\uFF1A\u9810\u671F\u70BA\u4EE5\u4E0B\u5176\u4E2D\u4E4B\u4E00 ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${n.origin??"\u503C"} \u61C9\u70BA ${i}${n.maximum.toString()} ${s.unit??"\u500B\u5143\u7D20"}`:`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${n.origin??"\u503C"} \u61C9\u70BA ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${n.origin} \u61C9\u70BA ${i}${n.minimum.toString()} ${s.unit}`:`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${n.origin} \u61C9\u70BA ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${i.prefix}" \u958B\u982D`:i.format==="ends_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${i.suffix}" \u7D50\u5C3E`:i.format==="includes"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u5305\u542B "${i.includes}"`:i.format==="regex"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u7B26\u5408\u683C\u5F0F ${i.pattern}`:`\u7121\u6548\u7684 ${r[i.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${f(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 fp(){return{localeError:Yb()}}var Xb=()=>{let e={string:{unit:"\xE0mi",verb:"n\xED"},file:{unit:"bytes",verb:"n\xED"},array:{unit:"nkan",verb:"n\xED"},set:{unit:"nkan",verb:"n\xED"}};function t(n){return e[n]??null}let r={regex:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9",email:"\xE0d\xEDr\u1EB9\u0301s\xEC \xECm\u1EB9\u0301l\xEC",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\xE0k\xF3k\xF2 ISO",date:"\u1ECDj\u1ECD\u0301 ISO",time:"\xE0k\xF3k\xF2 ISO",duration:"\xE0k\xF3k\xF2 t\xF3 p\xE9 ISO",ipv4:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv4",ipv6:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv6",cidrv4:"\xE0gb\xE8gb\xE8 IPv4",cidrv6:"\xE0gb\xE8gb\xE8 IPv6",base64:"\u1ECD\u0300r\u1ECD\u0300 t\xED a k\u1ECD\u0301 n\xED base64",base64url:"\u1ECD\u0300r\u1ECD\u0300 base64url",json_string:"\u1ECD\u0300r\u1ECD\u0300 JSON",e164:"n\u1ECD\u0301mb\xE0 E.164",jwt:"JWT",template_literal:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9"},o={nan:"NaN",number:"n\u1ECD\u0301mb\xE0",array:"akop\u1ECD"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[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 ${c}`:`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${i}, \xE0m\u1ECD\u0300 a r\xED ${c}`}case"invalid_value":return n.values.length===1?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${_(n.values[0])}`:`\xC0\u1E63\xE0y\xE0n a\u1E63\xEC\u1E63e: yan \u1ECD\u0300kan l\xE1ra ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(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} ${i}${n.maximum} ${s.unit}`:`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 ${i}${n.maximum}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${n.origin} ${s.verb} ${i}${n.minimum} ${s.unit}`:`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 ${i}${n.minimum}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\u1EB9\u0300r\u1EB9\u0300 p\u1EB9\u0300l\xFA "${i.prefix}"`:i.format==="ends_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 par\xED p\u1EB9\u0300l\xFA "${i.suffix}"`:i.format==="includes"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 n\xED "${i.includes}"`:i.format==="regex"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\xE1 \xE0p\u1EB9\u1EB9r\u1EB9 mu ${i.pattern}`:`A\u1E63\xEC\u1E63e: ${r[i.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: ${f(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 gp(){return{localeError:Xb()}}var hp,Rs=Symbol("ZodOutput"),Ds=Symbol("ZodInput"),kr=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...r){let o=r[0];return this._map.set(t,o),o&&typeof o=="object"&&"id"in o&&this._idmap.set(o.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){let r=this._map.get(t);return r&&typeof r=="object"&&"id"in r&&this._idmap.delete(r.id),this._map.delete(t),this}get(t){let r=t._zod.parent;if(r){let o={...this.get(r)??{}};delete o.id;let n={...o,...this._map.get(t)};return Object.keys(n).length?n:void 0}return this._map.get(t)}has(t){return this._map.has(t)}};function Sr(){return new kr}(hp=globalThis).__zod_globalRegistry??(hp.__zod_globalRegistry=Sr());var B=globalThis.__zod_globalRegistry;function zs(e,t){return new e({type:"string",...y(t)})}function Us(e,t){return new e({type:"string",coerce:!0,...y(t)})}function $r(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...y(t)})}function hn(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...y(t)})}function Ir(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...y(t)})}function Er(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...y(t)})}function wr(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...y(t)})}function Or(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...y(t)})}function _n(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...y(t)})}function Tr(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...y(t)})}function Pr(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...y(t)})}function Ar(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...y(t)})}function Nr(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...y(t)})}function Cr(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...y(t)})}function Rr(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...y(t)})}function Dr(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...y(t)})}function zr(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...y(t)})}function Ur(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...y(t)})}function js(e,t){return new e({type:"string",format:"mac",check:"string_format",abort:!1,...y(t)})}function jr(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...y(t)})}function Lr(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...y(t)})}function Mr(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...y(t)})}function Fr(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...y(t)})}function Zr(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...y(t)})}function Vr(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...y(t)})}var Ls={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function Ms(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...y(t)})}function Fs(e,t){return new e({type:"string",format:"date",check:"string_format",...y(t)})}function Zs(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...y(t)})}function Vs(e,t){return new e({type:"string",format:"duration",check:"string_format",...y(t)})}function Bs(e,t){return new e({type:"number",checks:[],...y(t)})}function Hs(e,t){return new e({type:"number",coerce:!0,checks:[],...y(t)})}function Gs(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...y(t)})}function Ks(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float32",...y(t)})}function Ws(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float64",...y(t)})}function qs(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"int32",...y(t)})}function Js(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"uint32",...y(t)})}function Ys(e,t){return new e({type:"boolean",...y(t)})}function Xs(e,t){return new e({type:"boolean",coerce:!0,...y(t)})}function Qs(e,t){return new e({type:"bigint",...y(t)})}function ec(e,t){return new e({type:"bigint",coerce:!0,...y(t)})}function tc(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...y(t)})}function nc(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...y(t)})}function rc(e,t){return new e({type:"symbol",...y(t)})}function ic(e,t){return new e({type:"undefined",...y(t)})}function oc(e,t){return new e({type:"null",...y(t)})}function ac(e){return new e({type:"any"})}function sc(e){return new e({type:"unknown"})}function cc(e,t){return new e({type:"never",...y(t)})}function uc(e,t){return new e({type:"void",...y(t)})}function lc(e,t){return new e({type:"date",...y(t)})}function dc(e,t){return new e({type:"date",coerce:!0,...y(t)})}function mc(e,t){return new e({type:"nan",...y(t)})}function ge(e,t){return new cr({check:"less_than",...y(t),value:e,inclusive:!1})}function ne(e,t){return new cr({check:"less_than",...y(t),value:e,inclusive:!0})}function he(e,t){return new ur({check:"greater_than",...y(t),value:e,inclusive:!1})}function q(e,t){return new ur({check:"greater_than",...y(t),value:e,inclusive:!0})}function Br(e){return he(0,e)}function Hr(e){return ge(0,e)}function Gr(e){return ne(0,e)}function Kr(e){return q(0,e)}function Ce(e,t){return new oa({check:"multiple_of",...y(t),value:e})}function Re(e,t){return new ca({check:"max_size",...y(t),maximum:e})}function _e(e,t){return new ua({check:"min_size",...y(t),minimum:e})}function Ke(e,t){return new la({check:"size_equals",...y(t),size:e})}function We(e,t){return new da({check:"max_length",...y(t),maximum:e})}function $e(e,t){return new ma({check:"min_length",...y(t),minimum:e})}function qe(e,t){return new pa({check:"length_equals",...y(t),length:e})}function pt(e,t){return new fa({check:"string_format",format:"regex",...y(t),pattern:e})}function ft(e){return new ga({check:"string_format",format:"lowercase",...y(e)})}function gt(e){return new ha({check:"string_format",format:"uppercase",...y(e)})}function ht(e,t){return new _a({check:"string_format",format:"includes",...y(t),includes:e})}function _t(e,t){return new va({check:"string_format",format:"starts_with",...y(t),prefix:e})}function vt(e,t){return new ba({check:"string_format",format:"ends_with",...y(t),suffix:e})}function Wr(e,t,r){return new ya({check:"property",property:e,schema:t,...y(r)})}function bt(e,t){return new xa({check:"mime_type",mime:e,...y(t)})}function ce(e){return new ka({check:"overwrite",tx:e})}function yt(e){return ce(t=>t.normalize(e))}function xt(){return ce(e=>e.trim())}function kt(){return ce(e=>e.toLowerCase())}function St(){return ce(e=>e.toUpperCase())}function $t(){return ce(e=>vo(e))}function pc(e,t,r){return new e({type:"array",element:t,...y(r)})}function ey(e,t,r){return new e({type:"union",options:t,...y(r)})}function ty(e,t,r){return new e({type:"union",options:t,inclusive:!1,...y(r)})}function ny(e,t,r,o){return new e({type:"union",options:r,discriminator:t,...y(o)})}function ry(e,t,r){return new e({type:"intersection",left:t,right:r})}function iy(e,t,r,o){let n=r instanceof $,i=n?o:r,s=n?r:null;return new e({type:"tuple",items:t,rest:s,...y(i)})}function oy(e,t,r,o){return new e({type:"record",keyType:t,valueType:r,...y(o)})}function ay(e,t,r,o){return new e({type:"map",keyType:t,valueType:r,...y(o)})}function sy(e,t,r){return new e({type:"set",valueType:t,...y(r)})}function cy(e,t,r){let o=Array.isArray(t)?Object.fromEntries(t.map(n=>[n,n])):t;return new e({type:"enum",entries:o,...y(r)})}function uy(e,t,r){return new e({type:"enum",entries:t,...y(r)})}function ly(e,t,r){return new e({type:"literal",values:Array.isArray(t)?t:[t],...y(r)})}function fc(e,t){return new e({type:"file",...y(t)})}function dy(e,t){return new e({type:"transform",transform:t})}function my(e,t){return new e({type:"optional",innerType:t})}function py(e,t){return new e({type:"nullable",innerType:t})}function fy(e,t,r){return new e({type:"default",innerType:t,get defaultValue(){return typeof r=="function"?r():yo(r)}})}function gy(e,t,r){return new e({type:"nonoptional",innerType:t,...y(r)})}function hy(e,t){return new e({type:"success",innerType:t})}function _y(e,t,r){return new e({type:"catch",innerType:t,catchValue:typeof r=="function"?r:()=>r})}function vy(e,t,r){return new e({type:"pipe",in:t,out:r})}function by(e,t){return new e({type:"readonly",innerType:t})}function yy(e,t,r){return new e({type:"template_literal",parts:t,...y(r)})}function xy(e,t){return new e({type:"lazy",getter:t})}function ky(e,t){return new e({type:"promise",innerType:t})}function gc(e,t,r){let o=y(r);return o.abort??(o.abort=!0),new e({type:"custom",check:"custom",fn:t,...o})}function hc(e,t,r){return new e({type:"custom",check:"custom",fn:t,...y(r)})}function _c(e,t){let r=_p(o=>(o.addIssue=n=>{if(typeof n=="string")o.issues.push(at(n,o.value,r._zod.def));else{let i=n;i.fatal&&(i.continue=!1),i.code??(i.code="custom"),i.input??(i.input=o.value),i.inst??(i.inst=r),i.continue??(i.continue=!r._zod.def.abort),o.issues.push(at(i))}},e(o.value,o)),t);return r}function _p(e,t){let r=new z({check:"custom",...y(t)});return r._zod.check=e,r}function vc(e){let t=new z({check:"describe"});return t._zod.onattach=[r=>{let o=B.get(r)??{};B.add(r,{...o,description:e})}],t._zod.check=()=>{},t}function bc(e){let t=new z({check:"meta"});return t._zod.onattach=[r=>{let o=B.get(r)??{};B.add(r,{...o,...e})}],t._zod.check=()=>{},t}function yc(e,t){let r=y(t),o=r.truthy??["true","1","yes","on","y","enabled"],n=r.falsy??["false","0","no","off","n","disabled"];r.case!=="sensitive"&&(o=o.map(h=>typeof h=="string"?h.toLowerCase():h),n=n.map(h=>typeof h=="string"?h.toLowerCase():h));let i=new Set(o),s=new Set(n),c=e.Codec??pn,u=e.Boolean??dn,l=e.String??Ge,d=new l({type:"string",error:r.error}),m=new u({type:"boolean",error:r.error}),g=new c({type:"pipe",in:d,out:m,transform:((h,S)=>{let C=h;return r.case!=="sensitive"&&(C=C.toLowerCase()),i.has(C)?!0:s.has(C)?!1:(S.issues.push({code:"invalid_value",expected:"stringbool",values:[...i,...s],input:S.value,inst:g,continue:!1}),{})}),reverseTransform:((h,S)=>h===!0?o[0]||"true":n[0]||"false"),error:r.error});return g}function It(e,t,r,o={}){let n=y(o),i={...y(o),check:"string_format",type:"string",format:t,fn:typeof r=="function"?r:c=>r.test(c),...n};return r instanceof RegExp&&(i.pattern=r),new e(i)}function De(e){let t=e?.target??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??B,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function N(e,t,r={path:[],schemaPath:[]}){var o;let n=e._zod.def,i=t.seen.get(e);if(i)return i.count++,r.schemaPath.includes(e)&&(i.cycle=r.path),i.schema;let s={schema:{},count:1,cycle:void 0,path:r.path};t.seen.set(e,s);let c=e._zod.toJSONSchema?.();if(c)s.schema=c;else{let d={...r,schemaPath:[...r.schemaPath,e],path:r.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,s.schema,d);else{let g=s.schema,h=t.processors[n.type];if(!h)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${n.type}`);h(e,t,g,d)}let m=e._zod.parent;m&&(s.ref||(s.ref=m),N(m,t,d),t.seen.get(m).isParent=!0)}let u=t.metadataRegistry.get(e);return u&&Object.assign(s.schema,u),t.io==="input"&&J(e)&&(delete s.schema.examples,delete s.schema.default),t.io==="input"&&"_prefault"in s.schema&&((o=s.schema).default??(o.default=s.schema._prefault)),delete s.schema._prefault,t.seen.get(e).schema}function ze(e,t){let r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");let o=new Map;for(let s of e.seen.entries()){let c=e.metadataRegistry.get(s[0])?.id;if(c){let u=o.get(c);if(u&&u!==s[0])throw new Error(`Duplicate schema id "${c}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);o.set(c,s[0])}}let n=s=>{let c=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){let m=e.external.registry.get(s[0])?.id,g=e.external.uri??(S=>S);if(m)return{ref:g(m)};let h=s[1].defId??s[1].schema.id??`schema${e.counter++}`;return s[1].defId=h,{defId:h,ref:`${g("__shared")}#/${c}/${h}`}}if(s[1]===r)return{ref:"#"};let l=`#/${c}/`,d=s[1].schema.id??`__schema${e.counter++}`;return{defId:d,ref:l+d}},i=s=>{if(s[1].schema.$ref)return;let c=s[1],{ref:u,defId:l}=n(s);c.def={...c.schema},l&&(c.defId=l);let d=c.schema;for(let m in d)delete d[m];d.$ref=u};if(e.cycles==="throw")for(let s of e.seen.entries()){let c=s[1];if(c.cycle)throw new Error(`Cycle detected: #/${c.cycle?.join("/")}/<root>
95
+ `)}h.write("payload.value = newResult;"),h.write("return payload;");let y_=h.compile();return(be,M)=>y_(g,be,M)},i,s=Ke,c=!Ge.jitless,l=c&&$o.value,d=t.catchall,m;e._zod.parse=(g,h)=>{m??(m=o.value);let S=g.value;return s(S)?c&&l&&h?.async===!1&&h.jitless!==!0?(i||(i=n(t.shape)),g=i(g,h),d?km([],S,g,h,m,e):g):r(g,h):(g.issues.push({expected:"object",code:"invalid_type",input:S,inst:e}),g)}});function am(e,t,r,o){for(let i of e)if(i.issues.length===0)return t.value=i.value,t;let n=e.filter(i=>!ze(i));return n.length===1?(t.value=n[0].value,n[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(i=>i.issues.map(s=>J(s,o,Z())))}),t)}var fn=p("$ZodUnion",(e,t)=>{$.init(e,t),E(e._zod,"optin",()=>t.options.some(o=>o._zod.optin==="optional")?"optional":void 0),E(e._zod,"optout",()=>t.options.some(o=>o._zod.optout==="optional")?"optional":void 0),E(e._zod,"values",()=>{if(t.options.every(o=>o._zod.values))return new Set(t.options.flatMap(o=>Array.from(o._zod.values)))}),E(e._zod,"pattern",()=>{if(t.options.every(o=>o._zod.pattern)){let o=t.options.map(n=>n._zod.pattern);return new RegExp(`^(${o.map(n=>nn(n.source)).join("|")})$`)}});let r=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(o,n)=>{if(r)return r(o,n);let i=!1,s=[];for(let c of t.options){let u=c._zod.run({value:o.value,issues:[]},n);if(u instanceof Promise)s.push(u),i=!0;else{if(u.issues.length===0)return u;s.push(u)}}return i?Promise.all(s).then(c=>am(c,o,e,n)):am(s,o,e,n)}});function sm(e,t,r,o){let n=e.filter(i=>i.issues.length===0);return n.length===1?(t.value=n[0].value,t):(n.length===0?t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(i=>i.issues.map(s=>J(s,o,Z())))}):t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:[],inclusive:!1}),t)}var fs=p("$ZodXor",(e,t)=>{fn.init(e,t),t.inclusive=!1;let r=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(o,n)=>{if(r)return r(o,n);let i=!1,s=[];for(let c of t.options){let u=c._zod.run({value:o.value,issues:[]},n);u instanceof Promise?(s.push(u),i=!0):s.push(u)}return i?Promise.all(s).then(c=>sm(c,o,e,n)):sm(s,o,e,n)}}),gs=p("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,fn.init(e,t);let r=e._zod.parse;E(e._zod,"propValues",()=>{let n={};for(let i of t.options){let s=i._zod.propValues;if(!s||Object.keys(s).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(i)}"`);for(let[c,u]of Object.entries(s)){n[c]||(n[c]=new Set);for(let l of u)n[c].add(l)}}return n});let o=ut(()=>{let n=t.options,i=new Map;for(let s of n){let c=s._zod.propValues?.[t.discriminator];if(!c||c.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(s)}"`);for(let u of c){if(i.has(u))throw new Error(`Duplicate discriminator value "${String(u)}"`);i.set(u,s)}}return i});e._zod.parse=(n,i)=>{let s=n.value;if(!Ke(s))return n.issues.push({code:"invalid_type",expected:"object",input:s,inst:e}),n;let c=o.value.get(s?.[t.discriminator]);return c?c._zod.run(n,i):t.unionFallback||i.direction==="backward"?r(n,i):(n.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,options:Array.from(o.value.keys()),input:s,path:[t.discriminator],inst:e}),n)}}),hs=p("$ZodIntersection",(e,t)=>{$.init(e,t),e._zod.parse=(r,o)=>{let n=r.value,i=t.left._zod.run({value:n,issues:[]},o),s=t.right._zod.run({value:n,issues:[]},o);return i instanceof Promise||s instanceof Promise?Promise.all([i,s]).then(([u,l])=>cm(r,u,l)):cm(r,i,s)}});function Ta(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(De(e)&&De(t)){let r=Object.keys(t),o=Object.keys(e).filter(i=>r.indexOf(i)!==-1),n={...e,...t};for(let i of o){let s=Ta(e[i],t[i]);if(!s.valid)return{valid:!1,mergeErrorPath:[i,...s.mergeErrorPath]};n[i]=s.data}return{valid:!0,data:n}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let r=[];for(let o=0;o<e.length;o++){let n=e[o],i=t[o],s=Ta(n,i);if(!s.valid)return{valid:!1,mergeErrorPath:[o,...s.mergeErrorPath]};r.push(s.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}function cm(e,t,r){let o=new Map,n;for(let c of t.issues)if(c.code==="unrecognized_keys"){n??(n=c);for(let u of c.keys)o.has(u)||o.set(u,{}),o.get(u).l=!0}else e.issues.push(c);for(let c of r.issues)if(c.code==="unrecognized_keys")for(let u of c.keys)o.has(u)||o.set(u,{}),o.get(u).r=!0;else e.issues.push(c);let i=[...o].filter(([,c])=>c.l&&c.r).map(([c])=>c);if(i.length&&n&&e.issues.push({...n,keys:i}),ze(e))return e;let s=Ta(t.value,r.value);if(!s.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(s.mergeErrorPath)}`);return e.value=s.data,e}var vr=p("$ZodTuple",(e,t)=>{$.init(e,t);let r=t.items;e._zod.parse=(o,n)=>{let i=o.value;if(!Array.isArray(i))return o.issues.push({input:i,inst:e,expected:"tuple",code:"invalid_type"}),o;o.value=[];let s=[],c=um(r,"optin"),u=um(r,"optout");if(!t.rest){if(i.length<c)return o.issues.push({code:"too_small",minimum:c,inclusive:!0,input:i,inst:e,origin:"array"}),o;i.length>r.length&&o.issues.push({code:"too_big",maximum:r.length,inclusive:!0,input:i,inst:e,origin:"array"})}let l=new Array(r.length);for(let d=0;d<r.length;d++){let m=r[d]._zod.run({value:i[d],issues:[]},n);m instanceof Promise?s.push(m.then(g=>{l[d]=g})):l[d]=m}if(t.rest){let d=r.length-1,m=i.slice(r.length);for(let g of m){d++;let h=t.rest._zod.run({value:g,issues:[]},n);h instanceof Promise?s.push(h.then(S=>lm(S,o,d))):lm(h,o,d)}}return s.length?Promise.all(s).then(()=>dm(l,o,r,i,u)):dm(l,o,r,i,u)}});function um(e,t){for(let r=e.length-1;r>=0;r--)if(e[r]._zod[t]!=="optional")return r+1;return 0}function lm(e,t,r){e.issues.length&&t.issues.push(...Q(r,e.issues)),t.value[r]=e.value}function dm(e,t,r,o,n){for(let i=0;i<r.length;i++){let s=e[i],c=i<o.length;if(s.issues.length){if(!c&&i>=n){t.value.length=i;break}t.issues.push(...Q(i,s.issues))}t.value[i]=s.value}for(let i=t.value.length-1;i>=o.length&&(r[i]._zod.optout==="optional"&&t.value[i]===void 0);i--)t.value.length=i;return t}var _s=p("$ZodRecord",(e,t)=>{$.init(e,t),e._zod.parse=(r,o)=>{let n=r.value;if(!De(n))return r.issues.push({expected:"record",code:"invalid_type",input:n,inst:e}),r;let i=[],s=t.keyType._zod.values;if(s){r.value={};let c=new Set;for(let l of s)if(typeof l=="string"||typeof l=="number"||typeof l=="symbol"){c.add(typeof l=="number"?l.toString():l);let d=t.keyType._zod.run({value:l,issues:[]},o);if(d instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(d.issues.length){r.issues.push({code:"invalid_key",origin:"record",issues:d.issues.map(h=>J(h,o,Z())),input:l,path:[l],inst:e});continue}let m=d.value,g=t.valueType._zod.run({value:n[l],issues:[]},o);g instanceof Promise?i.push(g.then(h=>{h.issues.length&&r.issues.push(...Q(l,h.issues)),r.value[m]=h.value})):(g.issues.length&&r.issues.push(...Q(l,g.issues)),r.value[m]=g.value)}let u;for(let l in n)c.has(l)||(u=u??[],u.push(l));u&&u.length>0&&r.issues.push({code:"unrecognized_keys",input:n,inst:e,keys:u})}else{r.value={};for(let c of Reflect.ownKeys(n)){if(c==="__proto__"||!Object.prototype.propertyIsEnumerable.call(n,c))continue;let u=t.keyType._zod.run({value:c,issues:[]},o);if(u instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof c=="string"&&ur.test(c)&&u.issues.length){let m=t.keyType._zod.run({value:Number(c),issues:[]},o);if(m instanceof Promise)throw new Error("Async schemas not supported in object keys currently");m.issues.length===0&&(u=m)}if(u.issues.length){t.mode==="loose"?r.value[c]=n[c]:r.issues.push({code:"invalid_key",origin:"record",issues:u.issues.map(m=>J(m,o,Z())),input:c,path:[c],inst:e});continue}let d=t.valueType._zod.run({value:n[c],issues:[]},o);d instanceof Promise?i.push(d.then(m=>{m.issues.length&&r.issues.push(...Q(c,m.issues)),r.value[u.value]=m.value})):(d.issues.length&&r.issues.push(...Q(c,d.issues)),r.value[u.value]=d.value)}}return i.length?Promise.all(i).then(()=>r):r}}),vs=p("$ZodMap",(e,t)=>{$.init(e,t),e._zod.parse=(r,o)=>{let n=r.value;if(!(n instanceof Map))return r.issues.push({expected:"map",code:"invalid_type",input:n,inst:e}),r;let i=[];r.value=new Map;for(let[s,c]of n){let u=t.keyType._zod.run({value:s,issues:[]},o),l=t.valueType._zod.run({value:c,issues:[]},o);u instanceof Promise||l instanceof Promise?i.push(Promise.all([u,l]).then(([d,m])=>{mm(d,m,r,s,n,e,o)})):mm(u,l,r,s,n,e,o)}return i.length?Promise.all(i).then(()=>r):r}});function mm(e,t,r,o,n,i,s){e.issues.length&&(rn.has(typeof o)?r.issues.push(...Q(o,e.issues)):r.issues.push({code:"invalid_key",origin:"map",input:n,inst:i,issues:e.issues.map(c=>J(c,s,Z()))})),t.issues.length&&(rn.has(typeof o)?r.issues.push(...Q(o,t.issues)):r.issues.push({origin:"map",code:"invalid_element",input:n,inst:i,key:o,issues:t.issues.map(c=>J(c,s,Z()))})),r.value.set(e.value,t.value)}var bs=p("$ZodSet",(e,t)=>{$.init(e,t),e._zod.parse=(r,o)=>{let n=r.value;if(!(n instanceof Set))return r.issues.push({input:n,inst:e,expected:"set",code:"invalid_type"}),r;let i=[];r.value=new Set;for(let s of n){let c=t.valueType._zod.run({value:s,issues:[]},o);c instanceof Promise?i.push(c.then(u=>pm(u,r))):pm(c,r)}return i.length?Promise.all(i).then(()=>r):r}});function pm(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value)}var ys=p("$ZodEnum",(e,t)=>{$.init(e,t);let r=tn(t.entries),o=new Set(r);e._zod.values=o,e._zod.pattern=new RegExp(`^(${r.filter(n=>rn.has(typeof n)).map(n=>typeof n=="string"?ce(n):n.toString()).join("|")})$`),e._zod.parse=(n,i)=>{let s=n.value;return o.has(s)||n.issues.push({code:"invalid_value",values:r,input:s,inst:e}),n}}),xs=p("$ZodLiteral",(e,t)=>{if($.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");let r=new Set(t.values);e._zod.values=r,e._zod.pattern=new RegExp(`^(${t.values.map(o=>typeof o=="string"?ce(o):o?ce(o.toString()):String(o)).join("|")})$`),e._zod.parse=(o,n)=>{let i=o.value;return r.has(i)||o.issues.push({code:"invalid_value",values:t.values,input:i,inst:e}),o}}),ks=p("$ZodFile",(e,t)=>{$.init(e,t),e._zod.parse=(r,o)=>{let n=r.value;return n instanceof File||r.issues.push({expected:"file",code:"invalid_type",input:n,inst:e}),r}}),Ss=p("$ZodTransform",(e,t)=>{$.init(e,t),e._zod.optin="optional",e._zod.parse=(r,o)=>{if(o.direction==="backward")throw new Ce(e.constructor.name);let n=t.transform(r.value,r);if(o.async)return(n instanceof Promise?n:Promise.resolve(n)).then(s=>(r.value=s,r.fallback=!0,r));if(n instanceof Promise)throw new de;return r.value=n,r.fallback=!0,r}});function fm(e,t){return t===void 0&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}var br=p("$ZodOptional",(e,t)=>{$.init(e,t),e._zod.optin="optional",e._zod.optout="optional",E(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),E(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${nn(r.source)})?$`):void 0}),e._zod.parse=(r,o)=>{if(t.innerType._zod.optin==="optional"){let n=r.value,i=t.innerType._zod.run(r,o);return i instanceof Promise?i.then(s=>fm(s,n)):fm(i,n)}return r.value===void 0?r:t.innerType._zod.run(r,o)}}),$s=p("$ZodExactOptional",(e,t)=>{br.init(e,t),E(e._zod,"values",()=>t.innerType._zod.values),E(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(r,o)=>t.innerType._zod.run(r,o)}),Is=p("$ZodNullable",(e,t)=>{$.init(e,t),E(e._zod,"optin",()=>t.innerType._zod.optin),E(e._zod,"optout",()=>t.innerType._zod.optout),E(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${nn(r.source)}|null)$`):void 0}),E(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(r,o)=>r.value===null?r:t.innerType._zod.run(r,o)}),Es=p("$ZodDefault",(e,t)=>{$.init(e,t),e._zod.optin="optional",E(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,o)=>{if(o.direction==="backward")return t.innerType._zod.run(r,o);if(r.value===void 0)return r.value=t.defaultValue,r;let n=t.innerType._zod.run(r,o);return n instanceof Promise?n.then(i=>gm(i,t)):gm(n,t)}});function gm(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var ws=p("$ZodPrefault",(e,t)=>{$.init(e,t),e._zod.optin="optional",E(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,o)=>(o.direction==="backward"||r.value===void 0&&(r.value=t.defaultValue),t.innerType._zod.run(r,o))}),Os=p("$ZodNonOptional",(e,t)=>{$.init(e,t),E(e._zod,"values",()=>{let r=t.innerType._zod.values;return r?new Set([...r].filter(o=>o!==void 0)):void 0}),e._zod.parse=(r,o)=>{let n=t.innerType._zod.run(r,o);return n instanceof Promise?n.then(i=>hm(i,e)):hm(n,e)}});function hm(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}var Ts=p("$ZodSuccess",(e,t)=>{$.init(e,t),e._zod.parse=(r,o)=>{if(o.direction==="backward")throw new Ce("ZodSuccess");let n=t.innerType._zod.run(r,o);return n instanceof Promise?n.then(i=>(r.value=i.issues.length===0,r)):(r.value=n.issues.length===0,r)}}),As=p("$ZodCatch",(e,t)=>{$.init(e,t),e._zod.optin="optional",E(e._zod,"optout",()=>t.innerType._zod.optout),E(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,o)=>{if(o.direction==="backward")return t.innerType._zod.run(r,o);let n=t.innerType._zod.run(r,o);return n instanceof Promise?n.then(i=>(r.value=i.value,i.issues.length&&(r.value=t.catchValue({...r,error:{issues:i.issues.map(s=>J(s,o,Z()))},input:r.value}),r.issues=[],r.fallback=!0),r)):(r.value=n.value,n.issues.length&&(r.value=t.catchValue({...r,error:{issues:n.issues.map(i=>J(i,o,Z()))},input:r.value}),r.issues=[],r.fallback=!0),r)}}),Ps=p("$ZodNaN",(e,t)=>{$.init(e,t),e._zod.parse=(r,o)=>((typeof r.value!="number"||!Number.isNaN(r.value))&&r.issues.push({input:r.value,inst:e,expected:"nan",code:"invalid_type"}),r)}),yr=p("$ZodPipe",(e,t)=>{$.init(e,t),E(e._zod,"values",()=>t.in._zod.values),E(e._zod,"optin",()=>t.in._zod.optin),E(e._zod,"optout",()=>t.out._zod.optout),E(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,o)=>{if(o.direction==="backward"){let i=t.out._zod.run(r,o);return i instanceof Promise?i.then(s=>mr(s,t.in,o)):mr(i,t.in,o)}let n=t.in._zod.run(r,o);return n instanceof Promise?n.then(i=>mr(i,t.out,o)):mr(n,t.out,o)}});function mr(e,t,r){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues,fallback:e.fallback},r)}var gn=p("$ZodCodec",(e,t)=>{$.init(e,t),E(e._zod,"values",()=>t.in._zod.values),E(e._zod,"optin",()=>t.in._zod.optin),E(e._zod,"optout",()=>t.out._zod.optout),E(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,o)=>{if((o.direction||"forward")==="forward"){let i=t.in._zod.run(r,o);return i instanceof Promise?i.then(s=>pr(s,t,o)):pr(i,t,o)}else{let i=t.out._zod.run(r,o);return i instanceof Promise?i.then(s=>pr(s,t,o)):pr(i,t,o)}}});function pr(e,t,r){if(e.issues.length)return e.aborted=!0,e;if((r.direction||"forward")==="forward"){let n=t.transform(e.value,e);return n instanceof Promise?n.then(i=>fr(e,i,t.out,r)):fr(e,n,t.out,r)}else{let n=t.reverseTransform(e.value,e);return n instanceof Promise?n.then(i=>fr(e,i,t.in,r)):fr(e,n,t.in,r)}}function fr(e,t,r,o){return e.issues.length?(e.aborted=!0,e):r._zod.run({value:t,issues:e.issues},o)}var Cs=p("$ZodPreprocess",(e,t)=>{yr.init(e,t)}),Ns=p("$ZodReadonly",(e,t)=>{$.init(e,t),E(e._zod,"propValues",()=>t.innerType._zod.propValues),E(e._zod,"values",()=>t.innerType._zod.values),E(e._zod,"optin",()=>t.innerType?._zod?.optin),E(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(r,o)=>{if(o.direction==="backward")return t.innerType._zod.run(r,o);let n=t.innerType._zod.run(r,o);return n instanceof Promise?n.then(_m):_m(n)}});function _m(e){return e.value=Object.freeze(e.value),e}var Rs=p("$ZodTemplateLiteral",(e,t)=>{$.init(e,t);let r=[];for(let o of t.parts)if(typeof o=="object"&&o!==null){if(!o._zod.pattern)throw new Error(`Invalid template literal part, no pattern found: ${[...o._zod.traits].shift()}`);let n=o._zod.pattern instanceof RegExp?o._zod.pattern.source:o._zod.pattern;if(!n)throw new Error(`Invalid template literal part: ${o._zod.traits}`);let i=n.startsWith("^")?1:0,s=n.endsWith("$")?n.length-1:n.length;r.push(n.slice(i,s))}else if(o===null||Eo.has(typeof o))r.push(ce(`${o}`));else throw new Error(`Invalid template literal part: ${o}`);e._zod.pattern=new RegExp(`^${r.join("")}$`),e._zod.parse=(o,n)=>typeof o.value!="string"?(o.issues.push({input:o.value,inst:e,expected:"string",code:"invalid_type"}),o):(e._zod.pattern.lastIndex=0,e._zod.pattern.test(o.value)||o.issues.push({input:o.value,inst:e,code:"invalid_format",format:t.format??"template_literal",pattern:e._zod.pattern.source}),o)}),Ds=p("$ZodFunction",(e,t)=>($.init(e,t),e._def=t,e._zod.def=t,e.implement=r=>{if(typeof r!="function")throw new Error("implement() must be called with a function");return function(...o){let n=e._def.input?Xn(e._def.input,o):o,i=Reflect.apply(r,this,n);return e._def.output?Xn(e._def.output,i):i}},e.implementAsync=r=>{if(typeof r!="function")throw new Error("implementAsync() must be called with a function");return async function(...o){let n=e._def.input?await Qn(e._def.input,o):o,i=await Reflect.apply(r,this,n);return e._def.output?await Qn(e._def.output,i):i}},e._zod.parse=(r,o)=>typeof r.value!="function"?(r.issues.push({code:"invalid_type",expected:"function",input:r.value,inst:e}),r):(e._def.output&&e._def.output._zod.def.type==="promise"?r.value=e.implementAsync(r.value):r.value=e.implement(r.value),r),e.input=(...r)=>{let o=e.constructor;return Array.isArray(r[0])?new o({type:"function",input:new vr({type:"tuple",items:r[0],rest:r[1]}),output:e._def.output}):new o({type:"function",input:r[0],output:e._def.output})},e.output=r=>{let o=e.constructor;return new o({type:"function",input:e._def.input,output:r})},e)),zs=p("$ZodPromise",(e,t)=>{$.init(e,t),e._zod.parse=(r,o)=>Promise.resolve(r.value).then(n=>t.innerType._zod.run({value:n,issues:[]},o))}),Us=p("$ZodLazy",(e,t)=>{$.init(e,t),E(e._zod,"innerType",()=>{let r=t;return r._cachedInner||(r._cachedInner=t.getter()),r._cachedInner}),E(e._zod,"pattern",()=>e._zod.innerType?._zod?.pattern),E(e._zod,"propValues",()=>e._zod.innerType?._zod?.propValues),E(e._zod,"optin",()=>e._zod.innerType?._zod?.optin??void 0),E(e._zod,"optout",()=>e._zod.innerType?._zod?.optout??void 0),e._zod.parse=(r,o)=>e._zod.innerType._zod.run(r,o)}),js=p("$ZodCustom",(e,t)=>{U.init(e,t),$.init(e,t),e._zod.parse=(r,o)=>r,e._zod.check=r=>{let o=r.value,n=t.fn(o);if(n instanceof Promise)return n.then(i=>vm(i,r,o,e));vm(n,r,o,e)}});function vm(e,t,r,o){if(!e){let n={code:"custom",input:r,inst:o,path:[...o._zod.def.path??[]],continue:!o._zod.def.abort};o._zod.def.params&&(n.params=o._zod.def.params),t.issues.push(lt(n))}}var _n={};Ie(_n,{ar:()=>$m,az:()=>Im,be:()=>wm,bg:()=>Om,ca:()=>Tm,cs:()=>Am,da:()=>Pm,de:()=>Cm,el:()=>Nm,en:()=>xr,eo:()=>Rm,es:()=>Dm,fa:()=>zm,fi:()=>Um,fr:()=>jm,frCA:()=>Lm,he:()=>Fm,hr:()=>Mm,hu:()=>Zm,hy:()=>Bm,id:()=>Hm,is:()=>Gm,it:()=>Km,ja:()=>Wm,ka:()=>qm,kh:()=>Jm,km:()=>kr,ko:()=>Ym,lt:()=>Qm,mk:()=>ep,ms:()=>tp,nl:()=>np,no:()=>rp,ota:()=>ip,pl:()=>ap,ps:()=>op,pt:()=>sp,ro:()=>cp,ru:()=>lp,sl:()=>dp,sv:()=>mp,ta:()=>pp,th:()=>fp,tr:()=>gp,ua:()=>hp,uk:()=>Sr,ur:()=>_p,uz:()=>vp,vi:()=>bp,yo:()=>kp,zhCN:()=>yp,zhTW:()=>xp});var _b=()=>{let e={string:{unit:"\u062D\u0631\u0641",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},file:{unit:"\u0628\u0627\u064A\u062A",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},array:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},set:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"}};function t(n){return e[n]??null}let r={regex:"\u0645\u062F\u062E\u0644",email:"\u0628\u0631\u064A\u062F \u0625\u0644\u0643\u062A\u0631\u0648\u0646\u064A",url:"\u0631\u0627\u0628\u0637",emoji:"\u0625\u064A\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u064A\u062E \u0648\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",date:"\u062A\u0627\u0631\u064A\u062E \u0628\u0645\u0639\u064A\u0627\u0631 ISO",time:"\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",duration:"\u0645\u062F\u0629 \u0628\u0645\u0639\u064A\u0627\u0631 ISO",ipv4:"\u0639\u0646\u0648\u0627\u0646 IPv4",ipv6:"\u0639\u0646\u0648\u0627\u0646 IPv6",cidrv4:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv4",cidrv6:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv6",base64:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64-encoded",base64url:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64url-encoded",json_string:"\u0646\u064E\u0635 \u0639\u0644\u0649 \u0647\u064A\u0626\u0629 JSON",e164:"\u0631\u0642\u0645 \u0647\u0627\u062A\u0641 \u0628\u0645\u0639\u064A\u0627\u0631 E.164",jwt:"JWT",template_literal:"\u0645\u062F\u062E\u0644"},o={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[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 ${c}`:`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${i}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${c}`}case"invalid_value":return n.values.length===1?`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${_(n.values[0])}`:`\u0627\u062E\u062A\u064A\u0627\u0631 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062A\u0648\u0642\u0639 \u0627\u0646\u062A\u0642\u0627\u0621 \u0623\u062D\u062F \u0647\u0630\u0647 \u0627\u0644\u062E\u064A\u0627\u0631\u0627\u062A: ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(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"} ${i} ${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"} ${i} ${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(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 ${i} ${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 ${i} ${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0628\u062F\u0623 \u0628\u0640 "${n.prefix}"`:i.format==="ends_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0646\u062A\u0647\u064A \u0628\u0640 "${i.suffix}"`:i.format==="includes"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u062A\u0636\u0645\u0651\u064E\u0646 "${i.includes}"`:i.format==="regex"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0637\u0627\u0628\u0642 \u0627\u0644\u0646\u0645\u0637 ${i.pattern}`:`${r[i.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":""}: ${f(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 $m(){return{localeError:_b()}}var vb=()=>{let e={string:{unit:"simvol",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"element",verb:"olmal\u0131d\u0131r"},set:{unit:"element",verb:"olmal\u0131d\u0131r"}};function t(n){return e[n]??null}let r={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},o={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return/^[A-Z]/.test(n.expected)?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n instanceof ${n.expected}, daxil olan ${c}`:`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${i}, daxil olan ${c}`}case"invalid_value":return n.values.length===1?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${_(n.values[0])}`:`Yanl\u0131\u015F se\xE7im: a\u015Fa\u011F\u0131dak\u0131lardan biri olmal\u0131d\u0131r: ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${n.origin??"d\u0259y\u0259r"} ${i}${n.maximum.toString()} ${s.unit??"element"}`:`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${n.origin??"d\u0259y\u0259r"} ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${n.origin} ${i}${n.minimum.toString()} ${s.unit}`:`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${n.origin} ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Yanl\u0131\u015F m\u0259tn: "${i.prefix}" il\u0259 ba\u015Flamal\u0131d\u0131r`:i.format==="ends_with"?`Yanl\u0131\u015F m\u0259tn: "${i.suffix}" il\u0259 bitm\u0259lidir`:i.format==="includes"?`Yanl\u0131\u015F m\u0259tn: "${i.includes}" daxil olmal\u0131d\u0131r`:i.format==="regex"?`Yanl\u0131\u015F m\u0259tn: ${i.pattern} \u015Fablonuna uy\u011Fun olmal\u0131d\u0131r`:`Yanl\u0131\u015F ${r[i.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":""}: ${f(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 Im(){return{localeError:vb()}}function Em(e,t,r,o){let n=Math.abs(e),i=n%10,s=n%100;return s>=11&&s<=19?o:i===1?t:i>=2&&i<=4?r:o}var bb=()=>{let e={string:{unit:{one:"\u0441\u0456\u043C\u0432\u0430\u043B",few:"\u0441\u0456\u043C\u0432\u0430\u043B\u044B",many:"\u0441\u0456\u043C\u0432\u0430\u043B\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u044B",many:"\u0431\u0430\u0439\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"}};function t(n){return e[n]??null}let r={regex:"\u0443\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0430\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0456 \u0447\u0430\u0441",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0447\u0430\u0441",duration:"ISO \u043F\u0440\u0430\u0446\u044F\u0433\u043B\u0430\u0441\u0446\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0430\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0430\u0441",cidrv4:"IPv4 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",base64:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64",base64url:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64url",json_string:"JSON \u0440\u0430\u0434\u043E\u043A",e164:"\u043D\u0443\u043C\u0430\u0440 E.164",jwt:"JWT",template_literal:"\u0443\u0432\u043E\u0434"},o={nan:"NaN",number:"\u043B\u0456\u043A",array:"\u043C\u0430\u0441\u0456\u045E"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[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 ${c}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F ${i}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${c}`}case"invalid_value":return n.values.length===1?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F ${_(n.values[0])}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0432\u0430\u0440\u044B\u044F\u043D\u0442: \u0447\u0430\u043A\u0430\u045E\u0441\u044F \u0430\u0434\u0437\u0456\u043D \u0437 ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);if(s){let c=Number(n.maximum),u=Em(c,s.unit.one,s.unit.few,s.unit.many);return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${n.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${s.verb} ${i}${n.maximum.toString()} ${u}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${n.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);if(s){let c=Number(n.minimum),u=Em(c,s.unit.one,s.unit.few,s.unit.many);return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${n.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${s.verb} ${i}${n.minimum.toString()} ${u}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${n.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u043F\u0430\u0447\u044B\u043D\u0430\u0446\u0446\u0430 \u0437 "${i.prefix}"`:i.format==="ends_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u0430\u043A\u0430\u043D\u0447\u0432\u0430\u0446\u0446\u0430 \u043D\u0430 "${i.suffix}"`:i.format==="includes"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u043C\u044F\u0448\u0447\u0430\u0446\u044C "${i.includes}"`:i.format==="regex"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0430\u0434\u043F\u0430\u0432\u044F\u0434\u0430\u0446\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${i.pattern}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B ${r[i.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"}: ${f(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 wm(){return{localeError:bb()}}var yb=()=>{let e={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},file:{unit:"\u0431\u0430\u0439\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"}};function t(n){return e[n]??null}let r={regex:"\u0432\u0445\u043E\u0434",email:"\u0438\u043C\u0435\u0439\u043B \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0436\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u043F\u0440\u043E\u0434\u044A\u043B\u0436\u0438\u0442\u0435\u043B\u043D\u043E\u0441\u0442",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"base64-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",base64url:"base64url-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",json_string:"JSON \u043D\u0438\u0437",e164:"E.164 \u043D\u043E\u043C\u0435\u0440",jwt:"JWT",template_literal:"\u0432\u0445\u043E\u0434"},o={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[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 ${c}`:`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${i}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${c}`}case"invalid_value":return n.values.length===1?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${_(n.values[0])}`:`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u043E\u043F\u0446\u0438\u044F: \u043E\u0447\u0430\u043A\u0432\u0430\u043D\u043E \u0435\u0434\u043D\u043E \u043E\u0442 ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(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 ${i}${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 ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(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 ${i}${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 ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;if(i.format==="starts_with")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u0432\u0430 \u0441 "${i.prefix}"`;if(i.format==="ends_with")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u0432\u044A\u0440\u0448\u0432\u0430 \u0441 "${i.suffix}"`;if(i.format==="includes")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0432\u043A\u043B\u044E\u0447\u0432\u0430 "${i.includes}"`;if(i.format==="regex")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0441\u044A\u0432\u043F\u0430\u0434\u0430 \u0441 ${i.pattern}`;let s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D";return i.format==="emoji"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),i.format==="datetime"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),i.format==="date"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),i.format==="time"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),i.format==="duration"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),`${s} ${r[i.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":""}: ${f(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 Om(){return{localeError:yb()}}var xb=()=>{let e={string:{unit:"car\xE0cters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"}};function t(n){return e[n]??null}let r={regex:"entrada",email:"adre\xE7a electr\xF2nica",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i hora ISO",date:"data ISO",time:"hora ISO",duration:"durada ISO",ipv4:"adre\xE7a IPv4",ipv6:"adre\xE7a IPv6",cidrv4:"rang IPv4",cidrv6:"rang IPv6",base64:"cadena codificada en base64",base64url:"cadena codificada en base64url",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},o={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return/^[A-Z]/.test(n.expected)?`Tipus inv\xE0lid: s'esperava instanceof ${n.expected}, s'ha rebut ${c}`:`Tipus inv\xE0lid: s'esperava ${i}, s'ha rebut ${c}`}case"invalid_value":return n.values.length===1?`Valor inv\xE0lid: s'esperava ${_(n.values[0])}`:`Opci\xF3 inv\xE0lida: s'esperava una de ${f(n.values," o ")}`;case"too_big":{let i=n.inclusive?"com a m\xE0xim":"menys de",s=t(n.origin);return s?`Massa gran: s'esperava que ${n.origin??"el valor"} contingu\xE9s ${i} ${n.maximum.toString()} ${s.unit??"elements"}`:`Massa gran: s'esperava que ${n.origin??"el valor"} fos ${i} ${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?"com a m\xEDnim":"m\xE9s de",s=t(n.origin);return s?`Massa petit: s'esperava que ${n.origin} contingu\xE9s ${i} ${n.minimum.toString()} ${s.unit}`:`Massa petit: s'esperava que ${n.origin} fos ${i} ${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Format inv\xE0lid: ha de comen\xE7ar amb "${i.prefix}"`:i.format==="ends_with"?`Format inv\xE0lid: ha d'acabar amb "${i.suffix}"`:i.format==="includes"?`Format inv\xE0lid: ha d'incloure "${i.includes}"`:i.format==="regex"?`Format inv\xE0lid: ha de coincidir amb el patr\xF3 ${i.pattern}`:`Format inv\xE0lid per a ${r[i.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":""}: ${f(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 Tm(){return{localeError:xb()}}var kb=()=>{let e={string:{unit:"znak\u016F",verb:"m\xEDt"},file:{unit:"bajt\u016F",verb:"m\xEDt"},array:{unit:"prvk\u016F",verb:"m\xEDt"},set:{unit:"prvk\u016F",verb:"m\xEDt"}};function t(n){return e[n]??null}let r={regex:"regul\xE1rn\xED v\xFDraz",email:"e-mailov\xE1 adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"datum a \u010Das ve form\xE1tu ISO",date:"datum ve form\xE1tu ISO",time:"\u010Das ve form\xE1tu ISO",duration:"doba trv\xE1n\xED ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64",base64url:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64url",json_string:"\u0159et\u011Bzec ve form\xE1tu JSON",e164:"\u010D\xEDslo E.164",jwt:"JWT",template_literal:"vstup"},o={nan:"NaN",number:"\u010D\xEDslo",string:"\u0159et\u011Bzec",function:"funkce",array:"pole"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return/^[A-Z]/.test(n.expected)?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no instanceof ${n.expected}, obdr\u017Eeno ${c}`:`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${i}, obdr\u017Eeno ${c}`}case"invalid_value":return n.values.length===1?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${_(n.values[0])}`:`Neplatn\xE1 mo\u017Enost: o\u010Dek\xE1v\xE1na jedna z hodnot ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${n.origin??"hodnota"} mus\xED m\xEDt ${i}${n.maximum.toString()} ${s.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${n.origin??"hodnota"} mus\xED b\xFDt ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${n.origin??"hodnota"} mus\xED m\xEDt ${i}${n.minimum.toString()} ${s.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${n.origin??"hodnota"} mus\xED b\xFDt ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED za\u010D\xEDnat na "${i.prefix}"`:i.format==="ends_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED kon\u010Dit na "${i.suffix}"`:i.format==="includes"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED obsahovat "${i.includes}"`:i.format==="regex"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED odpov\xEDdat vzoru ${i.pattern}`:`Neplatn\xFD form\xE1t ${r[i.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: ${f(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 Am(){return{localeError:kb()}}var Sb=()=>{let e={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"}};function t(n){return e[n]??null}let r={regex:"input",email:"e-mailadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkesl\xE6t",date:"ISO-dato",time:"ISO-klokkesl\xE6t",duration:"ISO-varighed",ipv4:"IPv4-omr\xE5de",ipv6:"IPv6-omr\xE5de",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodet streng",base64url:"base64url-kodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},o={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 i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return/^[A-Z]/.test(n.expected)?`Ugyldigt input: forventede instanceof ${n.expected}, fik ${c}`:`Ugyldigt input: forventede ${i}, fik ${c}`}case"invalid_value":return n.values.length===1?`Ugyldig v\xE6rdi: forventede ${_(n.values[0])}`:`Ugyldigt valg: forventede en af f\xF8lgende ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin),c=o[n.origin]??n.origin;return s?`For stor: forventede ${c??"value"} ${s.verb} ${i} ${n.maximum.toString()} ${s.unit??"elementer"}`:`For stor: forventede ${c??"value"} havde ${i} ${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin),c=o[n.origin]??n.origin;return s?`For lille: forventede ${c} ${s.verb} ${i} ${n.minimum.toString()} ${s.unit}`:`For lille: forventede ${c} havde ${i} ${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Ugyldig streng: skal starte med "${i.prefix}"`:i.format==="ends_with"?`Ugyldig streng: skal ende med "${i.suffix}"`:i.format==="includes"?`Ugyldig streng: skal indeholde "${i.includes}"`:i.format==="regex"?`Ugyldig streng: skal matche m\xF8nsteret ${i.pattern}`:`Ugyldig ${r[i.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"}: ${f(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 Pm(){return{localeError:Sb()}}var $b=()=>{let e={string:{unit:"Zeichen",verb:"zu haben"},file:{unit:"Bytes",verb:"zu haben"},array:{unit:"Elemente",verb:"zu haben"},set:{unit:"Elemente",verb:"zu haben"}};function t(n){return e[n]??null}let r={regex:"Eingabe",email:"E-Mail-Adresse",url:"URL",emoji:"Emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-Datum und -Uhrzeit",date:"ISO-Datum",time:"ISO-Uhrzeit",duration:"ISO-Dauer",ipv4:"IPv4-Adresse",ipv6:"IPv6-Adresse",cidrv4:"IPv4-Bereich",cidrv6:"IPv6-Bereich",base64:"Base64-codierter String",base64url:"Base64-URL-codierter String",json_string:"JSON-String",e164:"E.164-Nummer",jwt:"JWT",template_literal:"Eingabe"},o={nan:"NaN",number:"Zahl",array:"Array"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return/^[A-Z]/.test(n.expected)?`Ung\xFCltige Eingabe: erwartet instanceof ${n.expected}, erhalten ${c}`:`Ung\xFCltige Eingabe: erwartet ${i}, erhalten ${c}`}case"invalid_value":return n.values.length===1?`Ung\xFCltige Eingabe: erwartet ${_(n.values[0])}`:`Ung\xFCltige Option: erwartet eine von ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Zu gro\xDF: erwartet, dass ${n.origin??"Wert"} ${i}${n.maximum.toString()} ${s.unit??"Elemente"} hat`:`Zu gro\xDF: erwartet, dass ${n.origin??"Wert"} ${i}${n.maximum.toString()} ist`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Zu klein: erwartet, dass ${n.origin} ${i}${n.minimum.toString()} ${s.unit} hat`:`Zu klein: erwartet, dass ${n.origin} ${i}${n.minimum.toString()} ist`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Ung\xFCltiger String: muss mit "${i.prefix}" beginnen`:i.format==="ends_with"?`Ung\xFCltiger String: muss mit "${i.suffix}" enden`:i.format==="includes"?`Ung\xFCltiger String: muss "${i.includes}" enthalten`:i.format==="regex"?`Ung\xFCltiger String: muss dem Muster ${i.pattern} entsprechen`:`Ung\xFCltig: ${r[i.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"}: ${f(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 Cm(){return{localeError:$b()}}var Ib=()=>{let e={string:{unit:"\u03C7\u03B1\u03C1\u03B1\u03BA\u03C4\u03AE\u03C1\u03B5\u03C2",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},file:{unit:"bytes",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},array:{unit:"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},set:{unit:"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},map:{unit:"\u03BA\u03B1\u03C4\u03B1\u03C7\u03C9\u03C1\u03AE\u03C3\u03B5\u03B9\u03C2",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"}};function t(n){return e[n]??null}let r={regex:"\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2",email:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1 \u03BA\u03B1\u03B9 \u03CE\u03C1\u03B1",date:"ISO \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1",time:"ISO \u03CE\u03C1\u03B1",duration:"ISO \u03B4\u03B9\u03AC\u03C1\u03BA\u03B5\u03B9\u03B1",ipv4:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv4",ipv6:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv6",mac:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 MAC",cidrv4:"\u03B5\u03CD\u03C1\u03BF\u03C2 IPv4",cidrv6:"\u03B5\u03CD\u03C1\u03BF\u03C2 IPv6",base64:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC \u03BA\u03C9\u03B4\u03B9\u03BA\u03BF\u03C0\u03BF\u03B9\u03B7\u03BC\u03AD\u03BD\u03B7 \u03C3\u03B5 base64",base64url:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC \u03BA\u03C9\u03B4\u03B9\u03BA\u03BF\u03C0\u03BF\u03B9\u03B7\u03BC\u03AD\u03BD\u03B7 \u03C3\u03B5 base64url",json_string:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC JSON",e164:"\u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2 E.164",jwt:"JWT",template_literal:"\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"},o={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return typeof n.expected=="string"&&/^[A-Z]/.test(n.expected)?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD instanceof ${n.expected}, \u03BB\u03AE\u03C6\u03B8\u03B7\u03BA\u03B5 ${c}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${i}, \u03BB\u03AE\u03C6\u03B8\u03B7\u03BA\u03B5 ${c}`}case"invalid_value":return n.values.length===1?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${_(n.values[0])}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03C0\u03B9\u03BB\u03BF\u03B3\u03AE: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD \u03AD\u03BD\u03B1 \u03B1\u03C0\u03CC ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B5\u03B3\u03AC\u03BB\u03BF: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${n.origin??"\u03C4\u03B9\u03BC\u03AE"} \u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9 ${i}${n.maximum.toString()} ${s.unit??"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1"}`:`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B5\u03B3\u03AC\u03BB\u03BF: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${n.origin??"\u03C4\u03B9\u03BC\u03AE"} \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B9\u03BA\u03C1\u03CC: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${n.origin} \u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9 ${i}${n.minimum.toString()} ${s.unit}`:`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B9\u03BA\u03C1\u03CC: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${n.origin} \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03BE\u03B5\u03BA\u03B9\u03BD\u03AC \u03BC\u03B5 "${i.prefix}"`:i.format==="ends_with"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C4\u03B5\u03BB\u03B5\u03B9\u03CE\u03BD\u03B5\u03B9 \u03BC\u03B5 "${i.suffix}"`:i.format==="includes"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C0\u03B5\u03C1\u03B9\u03AD\u03C7\u03B5\u03B9 "${i.includes}"`:i.format==="regex"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C4\u03B1\u03B9\u03C1\u03B9\u03AC\u03B6\u03B5\u03B9 \u03BC\u03B5 \u03C4\u03BF \u03BC\u03BF\u03C4\u03AF\u03B2\u03BF ${i.pattern}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF: ${r[i.format]??n.format}`}case"not_multiple_of":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF\u03C2 \u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 \u03C0\u03BF\u03BB\u03BB\u03B1\u03C0\u03BB\u03AC\u03C3\u03B9\u03BF \u03C4\u03BF\u03C5 ${n.divisor}`;case"unrecognized_keys":return`\u0386\u03B3\u03BD\u03C9\u03C3\u03C4${n.keys.length>1?"\u03B1":"\u03BF"} \u03BA\u03BB\u03B5\u03B9\u03B4${n.keys.length>1?"\u03B9\u03AC":"\u03AF"}: ${f(n.keys,", ")}`;case"invalid_key":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF \u03BA\u03BB\u03B5\u03B9\u03B4\u03AF \u03C3\u03C4\u03BF ${n.origin}`;case"invalid_union":return"\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2";case"invalid_element":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C4\u03B9\u03BC\u03AE \u03C3\u03C4\u03BF ${n.origin}`;default:return"\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"}}};function Nm(){return{localeError:Ib()}}var Eb=()=>{let e={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"},map:{unit:"entries",verb:"to have"}};function t(n){return e[n]??null}let r={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},o={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return`Invalid input: expected ${i}, received ${c}`}case"invalid_value":return n.values.length===1?`Invalid input: expected ${_(n.values[0])}`:`Invalid option: expected one of ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Too big: expected ${n.origin??"value"} to have ${i}${n.maximum.toString()} ${s.unit??"elements"}`:`Too big: expected ${n.origin??"value"} to be ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Too small: expected ${n.origin} to have ${i}${n.minimum.toString()} ${s.unit}`:`Too small: expected ${n.origin} to be ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Invalid string: must start with "${i.prefix}"`:i.format==="ends_with"?`Invalid string: must end with "${i.suffix}"`:i.format==="includes"?`Invalid string: must include "${i.includes}"`:i.format==="regex"?`Invalid string: must match pattern ${i.pattern}`:`Invalid ${r[i.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":""}: ${f(n.keys,", ")}`;case"invalid_key":return`Invalid key in ${n.origin}`;case"invalid_union":return n.options&&Array.isArray(n.options)&&n.options.length>0?`Invalid discriminator value. Expected ${n.options.map(s=>`'${s}'`).join(" | ")}`:"Invalid input";case"invalid_element":return`Invalid value in ${n.origin}`;default:return"Invalid input"}}};function xr(){return{localeError:Eb()}}var wb=()=>{let e={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function t(n){return e[n]??null}let r={regex:"enigo",email:"retadreso",url:"URL",emoji:"emo\u011Dio",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datotempo",date:"ISO-dato",time:"ISO-tempo",duration:"ISO-da\u016Dro",ipv4:"IPv4-adreso",ipv6:"IPv6-adreso",cidrv4:"IPv4-rango",cidrv6:"IPv6-rango",base64:"64-ume kodita karaktraro",base64url:"URL-64-ume kodita karaktraro",json_string:"JSON-karaktraro",e164:"E.164-nombro",jwt:"JWT",template_literal:"enigo"},o={nan:"NaN",number:"nombro",array:"tabelo",null:"senvalora"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return/^[A-Z]/.test(n.expected)?`Nevalida enigo: atendi\u011Dis instanceof ${n.expected}, ricevi\u011Dis ${c}`:`Nevalida enigo: atendi\u011Dis ${i}, ricevi\u011Dis ${c}`}case"invalid_value":return n.values.length===1?`Nevalida enigo: atendi\u011Dis ${_(n.values[0])}`:`Nevalida opcio: atendi\u011Dis unu el ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Tro granda: atendi\u011Dis ke ${n.origin??"valoro"} havu ${i}${n.maximum.toString()} ${s.unit??"elementojn"}`:`Tro granda: atendi\u011Dis ke ${n.origin??"valoro"} havu ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Tro malgranda: atendi\u011Dis ke ${n.origin} havu ${i}${n.minimum.toString()} ${s.unit}`:`Tro malgranda: atendi\u011Dis ke ${n.origin} estu ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Nevalida karaktraro: devas komenci\u011Di per "${i.prefix}"`:i.format==="ends_with"?`Nevalida karaktraro: devas fini\u011Di per "${i.suffix}"`:i.format==="includes"?`Nevalida karaktraro: devas inkluzivi "${i.includes}"`:i.format==="regex"?`Nevalida karaktraro: devas kongrui kun la modelo ${i.pattern}`:`Nevalida ${r[i.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":""}: ${f(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 Rm(){return{localeError:wb()}}var Ob=()=>{let e={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}};function t(n){return e[n]??null}let r={regex:"entrada",email:"direcci\xF3n de correo electr\xF3nico",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"fecha y hora ISO",date:"fecha ISO",time:"hora ISO",duration:"duraci\xF3n ISO",ipv4:"direcci\xF3n IPv4",ipv6:"direcci\xF3n IPv6",cidrv4:"rango IPv4",cidrv6:"rango IPv6",base64:"cadena codificada en base64",base64url:"URL codificada en base64",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},o={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 i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return/^[A-Z]/.test(n.expected)?`Entrada inv\xE1lida: se esperaba instanceof ${n.expected}, recibido ${c}`:`Entrada inv\xE1lida: se esperaba ${i}, recibido ${c}`}case"invalid_value":return n.values.length===1?`Entrada inv\xE1lida: se esperaba ${_(n.values[0])}`:`Opci\xF3n inv\xE1lida: se esperaba una de ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin),c=o[n.origin]??n.origin;return s?`Demasiado grande: se esperaba que ${c??"valor"} tuviera ${i}${n.maximum.toString()} ${s.unit??"elementos"}`:`Demasiado grande: se esperaba que ${c??"valor"} fuera ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin),c=o[n.origin]??n.origin;return s?`Demasiado peque\xF1o: se esperaba que ${c} tuviera ${i}${n.minimum.toString()} ${s.unit}`:`Demasiado peque\xF1o: se esperaba que ${c} fuera ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Cadena inv\xE1lida: debe comenzar con "${i.prefix}"`:i.format==="ends_with"?`Cadena inv\xE1lida: debe terminar en "${i.suffix}"`:i.format==="includes"?`Cadena inv\xE1lida: debe incluir "${i.includes}"`:i.format==="regex"?`Cadena inv\xE1lida: debe coincidir con el patr\xF3n ${i.pattern}`:`Inv\xE1lido ${r[i.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":""}: ${f(n.keys,", ")}`;case"invalid_key":return`Llave inv\xE1lida en ${o[n.origin]??n.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido en ${o[n.origin]??n.origin}`;default:return"Entrada inv\xE1lida"}}};function Dm(){return{localeError:Ob()}}var Tb=()=>{let e={string:{unit:"\u06A9\u0627\u0631\u0627\u06A9\u062A\u0631",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},file:{unit:"\u0628\u0627\u06CC\u062A",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},array:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},set:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"}};function t(n){return e[n]??null}let r={regex:"\u0648\u0631\u0648\u062F\u06CC",email:"\u0622\u062F\u0631\u0633 \u0627\u06CC\u0645\u06CC\u0644",url:"URL",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u06CC\u062E \u0648 \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",date:"\u062A\u0627\u0631\u06CC\u062E \u0627\u06CC\u0632\u0648",time:"\u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",duration:"\u0645\u062F\u062A \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",ipv4:"IPv4 \u0622\u062F\u0631\u0633",ipv6:"IPv6 \u0622\u062F\u0631\u0633",cidrv4:"IPv4 \u062F\u0627\u0645\u0646\u0647",cidrv6:"IPv6 \u062F\u0627\u0645\u0646\u0647",base64:"base64-encoded \u0631\u0634\u062A\u0647",base64url:"base64url-encoded \u0631\u0634\u062A\u0647",json_string:"JSON \u0631\u0634\u062A\u0647",e164:"E.164 \u0639\u062F\u062F",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u06CC"},o={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0622\u0631\u0627\u06CC\u0647"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[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 ${c} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`:`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${i} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${c} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`}case"invalid_value":return n.values.length===1?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${_(n.values[0])} \u0645\u06CC\u200C\u0628\u0648\u062F`:`\u06AF\u0632\u06CC\u0646\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A \u06CC\u06A9\u06CC \u0627\u0632 ${f(n.values,"|")} \u0645\u06CC\u200C\u0628\u0648\u062F`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${n.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${i}${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 ${i}${n.maximum.toString()} \u0628\u0627\u0634\u062F`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${n.origin} \u0628\u0627\u06CC\u062F ${i}${n.minimum.toString()} ${s.unit} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${n.origin} \u0628\u0627\u06CC\u062F ${i}${n.minimum.toString()} \u0628\u0627\u0634\u062F`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${i.prefix}" \u0634\u0631\u0648\u0639 \u0634\u0648\u062F`:i.format==="ends_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${i.suffix}" \u062A\u0645\u0627\u0645 \u0634\u0648\u062F`:i.format==="includes"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0634\u0627\u0645\u0644 "${i.includes}" \u0628\u0627\u0634\u062F`:i.format==="regex"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 \u0627\u0644\u06AF\u0648\u06CC ${i.pattern} \u0645\u0637\u0627\u0628\u0642\u062A \u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F`:`${r[i.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: ${f(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 zm(){return{localeError:Tb()}}var Ab=()=>{let e={string:{unit:"merkki\xE4",subject:"merkkijonon"},file:{unit:"tavua",subject:"tiedoston"},array:{unit:"alkiota",subject:"listan"},set:{unit:"alkiota",subject:"joukon"},number:{unit:"",subject:"luvun"},bigint:{unit:"",subject:"suuren kokonaisluvun"},int:{unit:"",subject:"kokonaisluvun"},date:{unit:"",subject:"p\xE4iv\xE4m\xE4\xE4r\xE4n"}};function t(n){return e[n]??null}let r={regex:"s\xE4\xE4nn\xF6llinen lauseke",email:"s\xE4hk\xF6postiosoite",url:"URL-osoite",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-aikaleima",date:"ISO-p\xE4iv\xE4m\xE4\xE4r\xE4",time:"ISO-aika",duration:"ISO-kesto",ipv4:"IPv4-osoite",ipv6:"IPv6-osoite",cidrv4:"IPv4-alue",cidrv6:"IPv6-alue",base64:"base64-koodattu merkkijono",base64url:"base64url-koodattu merkkijono",json_string:"JSON-merkkijono",e164:"E.164-luku",jwt:"JWT",template_literal:"templaattimerkkijono"},o={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return/^[A-Z]/.test(n.expected)?`Virheellinen tyyppi: odotettiin instanceof ${n.expected}, oli ${c}`:`Virheellinen tyyppi: odotettiin ${i}, oli ${c}`}case"invalid_value":return n.values.length===1?`Virheellinen sy\xF6te: t\xE4ytyy olla ${_(n.values[0])}`:`Virheellinen valinta: t\xE4ytyy olla yksi seuraavista: ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Liian suuri: ${s.subject} t\xE4ytyy olla ${i}${n.maximum.toString()} ${s.unit}`.trim():`Liian suuri: arvon t\xE4ytyy olla ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Liian pieni: ${s.subject} t\xE4ytyy olla ${i}${n.minimum.toString()} ${s.unit}`.trim():`Liian pieni: arvon t\xE4ytyy olla ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Virheellinen sy\xF6te: t\xE4ytyy alkaa "${i.prefix}"`:i.format==="ends_with"?`Virheellinen sy\xF6te: t\xE4ytyy loppua "${i.suffix}"`:i.format==="includes"?`Virheellinen sy\xF6te: t\xE4ytyy sis\xE4lt\xE4\xE4 "${i.includes}"`:i.format==="regex"?`Virheellinen sy\xF6te: t\xE4ytyy vastata s\xE4\xE4nn\xF6llist\xE4 lauseketta ${i.pattern}`:`Virheellinen ${r[i.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"}: ${f(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 Um(){return{localeError:Ab()}}var Pb=()=>{let e={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function t(n){return e[n]??null}let r={regex:"entr\xE9e",email:"adresse e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date et heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"},o={string:"cha\xEEne",number:"nombre",int:"entier",boolean:"bool\xE9en",bigint:"grand entier",symbol:"symbole",undefined:"ind\xE9fini",null:"null",never:"jamais",void:"vide",date:"date",array:"tableau",object:"objet",tuple:"tuple",record:"enregistrement",map:"carte",set:"ensemble",file:"fichier",nonoptional:"non-optionnel",nan:"NaN",function:"fonction"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return/^[A-Z]/.test(n.expected)?`Entr\xE9e invalide : instanceof ${n.expected} attendu, ${c} re\xE7u`:`Entr\xE9e invalide : ${i} attendu, ${c} re\xE7u`}case"invalid_value":return n.values.length===1?`Entr\xE9e invalide : ${_(n.values[0])} attendu`:`Option invalide : une valeur parmi ${f(n.values,"|")} attendue`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Trop grand : ${o[n.origin]??"valeur"} doit ${s.verb} ${i}${n.maximum.toString()} ${s.unit??"\xE9l\xE9ment(s)"}`:`Trop grand : ${o[n.origin]??"valeur"} doit \xEAtre ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Trop petit : ${o[n.origin]??"valeur"} doit ${s.verb} ${i}${n.minimum.toString()} ${s.unit}`:`Trop petit : ${o[n.origin]??"valeur"} doit \xEAtre ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${i.prefix}"`:i.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${i.suffix}"`:i.format==="includes"?`Cha\xEEne invalide : doit inclure "${i.includes}"`:i.format==="regex"?`Cha\xEEne invalide : doit correspondre au mod\xE8le ${i.pattern}`:`${r[i.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":""} : ${f(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 jm(){return{localeError:Pb()}}var Cb=()=>{let e={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function t(n){return e[n]??null}let r={regex:"entr\xE9e",email:"adresse courriel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date-heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"},o={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return/^[A-Z]/.test(n.expected)?`Entr\xE9e invalide : attendu instanceof ${n.expected}, re\xE7u ${c}`:`Entr\xE9e invalide : attendu ${i}, re\xE7u ${c}`}case"invalid_value":return n.values.length===1?`Entr\xE9e invalide : attendu ${_(n.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"\u2264":"<",s=t(n.origin);return s?`Trop grand : attendu que ${n.origin??"la valeur"} ait ${i}${n.maximum.toString()} ${s.unit}`:`Trop grand : attendu que ${n.origin??"la valeur"} soit ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?"\u2265":">",s=t(n.origin);return s?`Trop petit : attendu que ${n.origin} ait ${i}${n.minimum.toString()} ${s.unit}`:`Trop petit : attendu que ${n.origin} soit ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${i.prefix}"`:i.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${i.suffix}"`:i.format==="includes"?`Cha\xEEne invalide : doit inclure "${i.includes}"`:i.format==="regex"?`Cha\xEEne invalide : doit correspondre au motif ${i.pattern}`:`${r[i.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":""} : ${f(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 Lm(){return{localeError:Cb()}}var Nb=()=>{let e={string:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA",gender:"f"},number:{label:"\u05DE\u05E1\u05E4\u05E8",gender:"m"},boolean:{label:"\u05E2\u05E8\u05DA \u05D1\u05D5\u05DC\u05D9\u05D0\u05E0\u05D9",gender:"m"},bigint:{label:"BigInt",gender:"m"},date:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA",gender:"m"},array:{label:"\u05DE\u05E2\u05E8\u05DA",gender:"m"},object:{label:"\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8",gender:"m"},null:{label:"\u05E2\u05E8\u05DA \u05E8\u05D9\u05E7 (null)",gender:"m"},undefined:{label:"\u05E2\u05E8\u05DA \u05DC\u05D0 \u05DE\u05D5\u05D2\u05D3\u05E8 (undefined)",gender:"m"},symbol:{label:"\u05E1\u05D9\u05DE\u05D1\u05D5\u05DC (Symbol)",gender:"m"},function:{label:"\u05E4\u05D5\u05E0\u05E7\u05E6\u05D9\u05D4",gender:"f"},map:{label:"\u05DE\u05E4\u05D4 (Map)",gender:"f"},set:{label:"\u05E7\u05D1\u05D5\u05E6\u05D4 (Set)",gender:"f"},file:{label:"\u05E7\u05D5\u05D1\u05E5",gender:"m"},promise:{label:"Promise",gender:"m"},NaN:{label:"NaN",gender:"m"},unknown:{label:"\u05E2\u05E8\u05DA \u05DC\u05D0 \u05D9\u05D3\u05D5\u05E2",gender:"m"},value:{label:"\u05E2\u05E8\u05DA",gender:"m"}},t={string:{unit:"\u05EA\u05D5\u05D5\u05D9\u05DD",shortLabel:"\u05E7\u05E6\u05E8",longLabel:"\u05D0\u05E8\u05D5\u05DA"},file:{unit:"\u05D1\u05D9\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},array:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},set:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},number:{unit:"",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"}},r=l=>l?e[l]:void 0,o=l=>{let d=r(l);return d?d.label:l??e.unknown.label},n=l=>`\u05D4${o(l)}`,i=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?t[l]??null:null,c={regex:{label:"\u05E7\u05DC\u05D8",gender:"m"},email:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05D0\u05D9\u05DE\u05D9\u05D9\u05DC",gender:"f"},url:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05E8\u05E9\u05EA",gender:"f"},emoji:{label:"\u05D0\u05D9\u05DE\u05D5\u05D2'\u05D9",gender:"m"},uuid:{label:"UUID",gender:"m"},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"}},u={nan:"NaN"};return l=>{switch(l.code){case"invalid_type":{let d=l.expected,m=u[d??""]??o(d),g=v(l.input),h=u[g]??e[g]?.label??g;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 ${h}`:`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${m}, \u05D4\u05EA\u05E7\u05D1\u05DC ${h}`}case"invalid_value":{if(l.values.length===1)return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05E2\u05E8\u05DA \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA ${_(l.values[0])}`;let d=l.values.map(h=>_(h));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 m=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 ${m}`}case"too_big":{let d=s(l.origin),m=n(l.origin??"value");if(l.origin==="string")return`${d?.longLabel??"\u05D0\u05E8\u05D5\u05DA"} \u05DE\u05D3\u05D9: ${m} \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 S=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: ${m} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${S}`}if(l.origin==="array"||l.origin==="set"){let S=l.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA",R=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: ${m} ${S} \u05DC\u05D4\u05DB\u05D9\u05DC ${R}`.trim()}let g=l.inclusive?"<=":"<",h=i(l.origin??"value");return d?.unit?`${d.longLabel} \u05DE\u05D3\u05D9: ${m} ${h} ${g}${l.maximum.toString()} ${d.unit}`:`${d?.longLabel??"\u05D2\u05D3\u05D5\u05DC"} \u05DE\u05D3\u05D9: ${m} ${h} ${g}${l.maximum.toString()}`}case"too_small":{let d=s(l.origin),m=n(l.origin??"value");if(l.origin==="string")return`${d?.shortLabel??"\u05E7\u05E6\u05E8"} \u05DE\u05D3\u05D9: ${m} \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 S=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: ${m} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${S}`}if(l.origin==="array"||l.origin==="set"){let S=l.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA";if(l.minimum===1&&l.inclusive){let P=(l.origin==="set","\u05DC\u05E4\u05D7\u05D5\u05EA \u05E4\u05E8\u05D9\u05D8 \u05D0\u05D7\u05D3");return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${m} ${S} \u05DC\u05D4\u05DB\u05D9\u05DC ${P}`}let R=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: ${m} ${S} \u05DC\u05D4\u05DB\u05D9\u05DC ${R}`.trim()}let g=l.inclusive?">=":">",h=i(l.origin??"value");return d?.unit?`${d.shortLabel} \u05DE\u05D3\u05D9: ${m} ${h} ${g}${l.minimum.toString()} ${d.unit}`:`${d?.shortLabel??"\u05E7\u05D8\u05DF"} \u05DE\u05D3\u05D9: ${m} ${h} ${g}${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 m=c[d.format],g=m?.label??d.format,S=(m?.gender??"m")==="f"?"\u05EA\u05E7\u05D9\u05E0\u05D4":"\u05EA\u05E7\u05D9\u05DF";return`${g} \u05DC\u05D0 ${S}`}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"}: ${f(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 Fm(){return{localeError:Nb()}}var Rb=()=>{let e={string:{unit:"znakova",verb:"imati"},file:{unit:"bajtova",verb:"imati"},array:{unit:"stavki",verb:"imati"},set:{unit:"stavki",verb:"imati"}};function t(n){return e[n]??null}let r={regex:"unos",email:"email adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum i vrijeme",date:"ISO datum",time:"ISO vrijeme",duration:"ISO trajanje",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"IPv4 raspon",cidrv6:"IPv6 raspon",base64:"base64 kodirani tekst",base64url:"base64url kodirani tekst",json_string:"JSON tekst",e164:"E.164 broj",jwt:"JWT",template_literal:"unos"},o={nan:"NaN",string:"tekst",number:"broj",boolean:"boolean",array:"niz",object:"objekt",set:"skup",file:"datoteka",date:"datum",bigint:"bigint",symbol:"simbol",undefined:"undefined",null:"null",function:"funkcija",map:"mapa"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return/^[A-Z]/.test(n.expected)?`Neispravan unos: o\u010Dekuje se instanceof ${n.expected}, a primljeno je ${c}`:`Neispravan unos: o\u010Dekuje se ${i}, a primljeno je ${c}`}case"invalid_value":return n.values.length===1?`Neispravna vrijednost: o\u010Dekivano ${_(n.values[0])}`:`Neispravna opcija: o\u010Dekivano jedno od ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin),c=o[n.origin]??n.origin;return s?`Preveliko: o\u010Dekivano da ${c??"vrijednost"} ima ${i}${n.maximum.toString()} ${s.unit??"elemenata"}`:`Preveliko: o\u010Dekivano da ${c??"vrijednost"} bude ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin),c=o[n.origin]??n.origin;return s?`Premalo: o\u010Dekivano da ${c} ima ${i}${n.minimum.toString()} ${s.unit}`:`Premalo: o\u010Dekivano da ${c} bude ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Neispravan tekst: mora zapo\u010Dinjati s "${i.prefix}"`:i.format==="ends_with"?`Neispravan tekst: mora zavr\u0161avati s "${i.suffix}"`:i.format==="includes"?`Neispravan tekst: mora sadr\u017Eavati "${i.includes}"`:i.format==="regex"?`Neispravan tekst: mora odgovarati uzorku ${i.pattern}`:`Neispravna ${r[i.format]??n.format}`}case"not_multiple_of":return`Neispravan broj: mora biti vi\u0161ekratnik od ${n.divisor}`;case"unrecognized_keys":return`Neprepoznat${n.keys.length>1?"i klju\u010Devi":" klju\u010D"}: ${f(n.keys,", ")}`;case"invalid_key":return`Neispravan klju\u010D u ${o[n.origin]??n.origin}`;case"invalid_union":return"Neispravan unos";case"invalid_element":return`Neispravna vrijednost u ${o[n.origin]??n.origin}`;default:return"Neispravan unos"}}};function Mm(){return{localeError:Rb()}}var Db=()=>{let e={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}};function t(n){return e[n]??null}let r={regex:"bemenet",email:"email c\xEDm",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO id\u0151b\xE9lyeg",date:"ISO d\xE1tum",time:"ISO id\u0151",duration:"ISO id\u0151intervallum",ipv4:"IPv4 c\xEDm",ipv6:"IPv6 c\xEDm",cidrv4:"IPv4 tartom\xE1ny",cidrv6:"IPv6 tartom\xE1ny",base64:"base64-k\xF3dolt string",base64url:"base64url-k\xF3dolt string",json_string:"JSON string",e164:"E.164 sz\xE1m",jwt:"JWT",template_literal:"bemenet"},o={nan:"NaN",number:"sz\xE1m",array:"t\xF6mb"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return/^[A-Z]/.test(n.expected)?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k instanceof ${n.expected}, a kapott \xE9rt\xE9k ${c}`:`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${i}, a kapott \xE9rt\xE9k ${c}`}case"invalid_value":return n.values.length===1?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${_(n.values[0])}`:`\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`T\xFAl nagy: ${n.origin??"\xE9rt\xE9k"} m\xE9rete t\xFAl nagy ${i}${n.maximum.toString()} ${s.unit??"elem"}`:`T\xFAl nagy: a bemeneti \xE9rt\xE9k ${n.origin??"\xE9rt\xE9k"} t\xFAl nagy: ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${n.origin} m\xE9rete t\xFAl kicsi ${i}${n.minimum.toString()} ${s.unit}`:`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${n.origin} t\xFAl kicsi ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\xC9rv\xE9nytelen string: "${i.prefix}" \xE9rt\xE9kkel kell kezd\u0151dnie`:i.format==="ends_with"?`\xC9rv\xE9nytelen string: "${i.suffix}" \xE9rt\xE9kkel kell v\xE9gz\u0151dnie`:i.format==="includes"?`\xC9rv\xE9nytelen string: "${i.includes}" \xE9rt\xE9ket kell tartalmaznia`:i.format==="regex"?`\xC9rv\xE9nytelen string: ${i.pattern} mint\xE1nak kell megfelelnie`:`\xC9rv\xE9nytelen ${r[i.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":""}: ${f(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 Zm(){return{localeError:Db()}}function Vm(e,t,r){return Math.abs(e)===1?t:r}function ht(e){if(!e)return"";let t=["\u0561","\u0565","\u0568","\u056B","\u0578","\u0578\u0582","\u0585"],r=e[e.length-1];return e+(t.includes(r)?"\u0576":"\u0568")}var zb=()=>{let e={string:{unit:{one:"\u0576\u0577\u0561\u0576",many:"\u0576\u0577\u0561\u0576\u0576\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},file:{unit:{one:"\u0562\u0561\u0575\u0569",many:"\u0562\u0561\u0575\u0569\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},array:{unit:{one:"\u057F\u0561\u0580\u0580",many:"\u057F\u0561\u0580\u0580\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},set:{unit:{one:"\u057F\u0561\u0580\u0580",many:"\u057F\u0561\u0580\u0580\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"}};function t(n){return e[n]??null}let r={regex:"\u0574\u0578\u0582\u057F\u0584",email:"\u0567\u056C. \u0570\u0561\u057D\u0581\u0565",url:"URL",emoji:"\u0567\u0574\u0578\u057B\u056B",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E \u0587 \u056A\u0561\u0574",date:"ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E",time:"ISO \u056A\u0561\u0574",duration:"ISO \u057F\u0587\u0578\u0572\u0578\u0582\u0569\u0575\u0578\u0582\u0576",ipv4:"IPv4 \u0570\u0561\u057D\u0581\u0565",ipv6:"IPv6 \u0570\u0561\u057D\u0581\u0565",cidrv4:"IPv4 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584",cidrv6:"IPv6 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584",base64:"base64 \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572",base64url:"base64url \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572",json_string:"JSON \u057F\u0578\u0572",e164:"E.164 \u0570\u0561\u0574\u0561\u0580",jwt:"JWT",template_literal:"\u0574\u0578\u0582\u057F\u0584"},o={nan:"NaN",number:"\u0569\u056B\u057E",array:"\u0566\u0561\u0576\u0563\u057E\u0561\u056E"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[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 ${c}`:`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${i}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${c}`}case"invalid_value":return n.values.length===1?`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${_(n.values[1])}`:`\u054D\u056D\u0561\u056C \u057F\u0561\u0580\u0562\u0565\u0580\u0561\u056F\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 \u0570\u0565\u057F\u0587\u0575\u0561\u056C\u0576\u0565\u0580\u056B\u0581 \u0574\u0565\u056F\u0568\u055D ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);if(s){let c=Number(n.maximum),u=Vm(c,s.unit.one,s.unit.many);return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${ht(n.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${i}${n.maximum.toString()} ${u}`}return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${ht(n.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056C\u056B\u0576\u056B ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);if(s){let c=Number(n.minimum),u=Vm(c,s.unit.one,s.unit.many);return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${ht(n.origin)} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${i}${n.minimum.toString()} ${u}`}return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${ht(n.origin)} \u056C\u056B\u0576\u056B ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057D\u056F\u057D\u057E\u056B "${i.prefix}"-\u0578\u057E`:i.format==="ends_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0561\u057E\u0561\u0580\u057F\u057E\u056B "${i.suffix}"-\u0578\u057E`:i.format==="includes"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057A\u0561\u0580\u0578\u0582\u0576\u0561\u056F\u056B "${i.includes}"`:i.format==="regex"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0570\u0561\u0574\u0561\u057A\u0561\u057F\u0561\u057D\u056D\u0561\u0576\u056B ${i.pattern} \u0571\u0587\u0561\u0579\u0561\u0583\u056B\u0576`:`\u054D\u056D\u0561\u056C ${r[i.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":""}. ${f(n.keys,", ")}`;case"invalid_key":return`\u054D\u056D\u0561\u056C \u0562\u0561\u0576\u0561\u056C\u056B ${ht(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 ${ht(n.origin)}-\u0578\u0582\u0574`;default:return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574"}}};function Bm(){return{localeError:zb()}}var Ub=()=>{let e={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}};function t(n){return e[n]??null}let r={regex:"input",email:"alamat email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tanggal dan waktu format ISO",date:"tanggal format ISO",time:"jam format ISO",duration:"durasi format ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"rentang alamat IPv4",cidrv6:"rentang alamat IPv6",base64:"string dengan enkode base64",base64url:"string dengan enkode base64url",json_string:"string JSON",e164:"angka E.164",jwt:"JWT",template_literal:"input"},o={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return/^[A-Z]/.test(n.expected)?`Input tidak valid: diharapkan instanceof ${n.expected}, diterima ${c}`:`Input tidak valid: diharapkan ${i}, diterima ${c}`}case"invalid_value":return n.values.length===1?`Input tidak valid: diharapkan ${_(n.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Terlalu besar: diharapkan ${n.origin??"value"} memiliki ${i}${n.maximum.toString()} ${s.unit??"elemen"}`:`Terlalu besar: diharapkan ${n.origin??"value"} menjadi ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Terlalu kecil: diharapkan ${n.origin} memiliki ${i}${n.minimum.toString()} ${s.unit}`:`Terlalu kecil: diharapkan ${n.origin} menjadi ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`String tidak valid: harus dimulai dengan "${i.prefix}"`:i.format==="ends_with"?`String tidak valid: harus berakhir dengan "${i.suffix}"`:i.format==="includes"?`String tidak valid: harus menyertakan "${i.includes}"`:i.format==="regex"?`String tidak valid: harus sesuai pola ${i.pattern}`:`${r[i.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":""}: ${f(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 Hm(){return{localeError:Ub()}}var jb=()=>{let e={string:{unit:"stafi",verb:"a\xF0 hafa"},file:{unit:"b\xE6ti",verb:"a\xF0 hafa"},array:{unit:"hluti",verb:"a\xF0 hafa"},set:{unit:"hluti",verb:"a\xF0 hafa"}};function t(n){return e[n]??null}let r={regex:"gildi",email:"netfang",url:"vefsl\xF3\xF0",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dagsetning og t\xEDmi",date:"ISO dagsetning",time:"ISO t\xEDmi",duration:"ISO t\xEDmalengd",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded strengur",base64url:"base64url-encoded strengur",json_string:"JSON strengur",e164:"E.164 t\xF6lugildi",jwt:"JWT",template_literal:"gildi"},o={nan:"NaN",number:"n\xFAmer",array:"fylki"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return/^[A-Z]/.test(n.expected)?`Rangt gildi: \xDE\xFA sl\xF3st inn ${c} \xFEar sem \xE1 a\xF0 vera instanceof ${n.expected}`:`Rangt gildi: \xDE\xFA sl\xF3st inn ${c} \xFEar sem \xE1 a\xF0 vera ${i}`}case"invalid_value":return n.values.length===1?`Rangt gildi: gert r\xE1\xF0 fyrir ${_(n.values[0])}`:`\xD3gilt val: m\xE1 vera eitt af eftirfarandi ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${n.origin??"gildi"} hafi ${i}${n.maximum.toString()} ${s.unit??"hluti"}`:`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${n.origin??"gildi"} s\xE9 ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${n.origin} hafi ${i}${n.minimum.toString()} ${s.unit}`:`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${n.origin} s\xE9 ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 byrja \xE1 "${i.prefix}"`:i.format==="ends_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 enda \xE1 "${i.suffix}"`:i.format==="includes"?`\xD3gildur strengur: ver\xF0ur a\xF0 innihalda "${i.includes}"`:i.format==="regex"?`\xD3gildur strengur: ver\xF0ur a\xF0 fylgja mynstri ${i.pattern}`:`Rangt ${r[i.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"}: ${f(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 Gm(){return{localeError:jb()}}var Lb=()=>{let e={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}};function t(n){return e[n]??null}let r={regex:"input",email:"indirizzo email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e ora ISO",date:"data ISO",time:"ora ISO",duration:"durata ISO",ipv4:"indirizzo IPv4",ipv6:"indirizzo IPv6",cidrv4:"intervallo IPv4",cidrv6:"intervallo IPv6",base64:"stringa codificata in base64",base64url:"URL codificata in base64",json_string:"stringa JSON",e164:"numero E.164",jwt:"JWT",template_literal:"input"},o={nan:"NaN",number:"numero",array:"vettore"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return/^[A-Z]/.test(n.expected)?`Input non valido: atteso instanceof ${n.expected}, ricevuto ${c}`:`Input non valido: atteso ${i}, ricevuto ${c}`}case"invalid_value":return n.values.length===1?`Input non valido: atteso ${_(n.values[0])}`:`Opzione non valida: atteso uno tra ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Troppo grande: ${n.origin??"valore"} deve avere ${i}${n.maximum.toString()} ${s.unit??"elementi"}`:`Troppo grande: ${n.origin??"valore"} deve essere ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Troppo piccolo: ${n.origin} deve avere ${i}${n.minimum.toString()} ${s.unit}`:`Troppo piccolo: ${n.origin} deve essere ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Stringa non valida: deve iniziare con "${i.prefix}"`:i.format==="ends_with"?`Stringa non valida: deve terminare con "${i.suffix}"`:i.format==="includes"?`Stringa non valida: deve includere "${i.includes}"`:i.format==="regex"?`Stringa non valida: deve corrispondere al pattern ${i.pattern}`:`Input non valido: ${r[i.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"}: ${f(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 Km(){return{localeError:Lb()}}var Fb=()=>{let e={string:{unit:"\u6587\u5B57",verb:"\u3067\u3042\u308B"},file:{unit:"\u30D0\u30A4\u30C8",verb:"\u3067\u3042\u308B"},array:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"},set:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"}};function t(n){return e[n]??null}let r={regex:"\u5165\u529B\u5024",email:"\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9",url:"URL",emoji:"\u7D75\u6587\u5B57",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u6642",date:"ISO\u65E5\u4ED8",time:"ISO\u6642\u523B",duration:"ISO\u671F\u9593",ipv4:"IPv4\u30A2\u30C9\u30EC\u30B9",ipv6:"IPv6\u30A2\u30C9\u30EC\u30B9",cidrv4:"IPv4\u7BC4\u56F2",cidrv6:"IPv6\u7BC4\u56F2",base64:"base64\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",base64url:"base64url\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",json_string:"JSON\u6587\u5B57\u5217",e164:"E.164\u756A\u53F7",jwt:"JWT",template_literal:"\u5165\u529B\u5024"},o={nan:"NaN",number:"\u6570\u5024",array:"\u914D\u5217"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[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${c}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u5165\u529B: ${i}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${c}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`}case"invalid_value":return n.values.length===1?`\u7121\u52B9\u306A\u5165\u529B: ${_(n.values[0])}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u9078\u629E: ${f(n.values,"\u3001")}\u306E\u3044\u305A\u308C\u304B\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"too_big":{let i=n.inclusive?"\u4EE5\u4E0B\u3067\u3042\u308B":"\u3088\u308A\u5C0F\u3055\u3044",s=t(n.origin);return s?`\u5927\u304D\u3059\u304E\u308B\u5024: ${n.origin??"\u5024"}\u306F${n.maximum.toString()}${s.unit??"\u8981\u7D20"}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5927\u304D\u3059\u304E\u308B\u5024: ${n.origin??"\u5024"}\u306F${n.maximum.toString()}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"too_small":{let i=n.inclusive?"\u4EE5\u4E0A\u3067\u3042\u308B":"\u3088\u308A\u5927\u304D\u3044",s=t(n.origin);return s?`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${n.origin}\u306F${n.minimum.toString()}${s.unit}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${n.origin}\u306F${n.minimum.toString()}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${i.prefix}"\u3067\u59CB\u307E\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:i.format==="ends_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${i.suffix}"\u3067\u7D42\u308F\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:i.format==="includes"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${i.includes}"\u3092\u542B\u3080\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:i.format==="regex"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: \u30D1\u30BF\u30FC\u30F3${i.pattern}\u306B\u4E00\u81F4\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u7121\u52B9\u306A${r[i.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":""}: ${f(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 Wm(){return{localeError:Fb()}}var Mb=()=>{let e={string:{unit:"\u10E1\u10D8\u10DB\u10D1\u10DD\u10DA\u10DD",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},file:{unit:"\u10D1\u10D0\u10D8\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},array:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},set:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"}};function t(n){return e[n]??null}let r={regex:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0",email:"\u10D4\u10DA-\u10E4\u10DD\u10E1\u10E2\u10D8\u10E1 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",url:"URL",emoji:"\u10D4\u10DB\u10DD\u10EF\u10D8",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8-\u10D3\u10E0\u10DD",date:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8",time:"\u10D3\u10E0\u10DD",duration:"\u10EE\u10D0\u10DC\u10D2\u10E0\u10EB\u10DA\u10D8\u10D5\u10DD\u10D1\u10D0",ipv4:"IPv4 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",ipv6:"IPv6 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",cidrv4:"IPv4 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",cidrv6:"IPv6 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",base64:"base64-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8",base64url:"base64url-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8",json_string:"JSON \u10D5\u10D4\u10DA\u10D8",e164:"E.164 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8",jwt:"JWT",template_literal:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"},o={nan:"NaN",number:"\u10E0\u10D8\u10EA\u10EE\u10D5\u10D8",string:"\u10D5\u10D4\u10DA\u10D8",boolean:"\u10D1\u10E3\u10DA\u10D4\u10D0\u10DC\u10D8",function:"\u10E4\u10E3\u10DC\u10E5\u10EA\u10D8\u10D0",array:"\u10DB\u10D0\u10E1\u10D8\u10D5\u10D8"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[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 ${c}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${i}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${c}`}case"invalid_value":return n.values.length===1?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${_(n.values[0])}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D0\u10E0\u10D8\u10D0\u10DC\u10E2\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8\u10D0 \u10D4\u10E0\u10D7-\u10D4\u10E0\u10D7\u10D8 ${f(n.values,"|")}-\u10D3\u10D0\u10DC`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(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} ${i}${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 ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(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} ${i}${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 ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10EC\u10E7\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${i.prefix}"-\u10D8\u10D7`:i.format==="ends_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10DB\u10D7\u10D0\u10D5\u10E0\u10D3\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${i.suffix}"-\u10D8\u10D7`:i.format==="includes"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1 "${i.includes}"-\u10E1`:i.format==="regex"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D4\u10E1\u10D0\u10D1\u10D0\u10DB\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 \u10E8\u10D0\u10D1\u10DA\u10DD\u10DC\u10E1 ${i.pattern}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 ${r[i.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"}: ${f(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 qm(){return{localeError:Mb()}}var Zb=()=>{let e={string:{unit:"\u178F\u17BD\u17A2\u1780\u17D2\u179F\u179A",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},file:{unit:"\u1794\u17C3",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},array:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},set:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"}};function t(n){return e[n]??null}let r={regex:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B",email:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793\u17A2\u17CA\u17B8\u1798\u17C2\u179B",url:"URL",emoji:"\u179F\u1789\u17D2\u1789\u17B6\u17A2\u17B6\u179A\u1798\u17D2\u1798\u178E\u17CD",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 \u1793\u17B7\u1784\u1798\u17C9\u17C4\u1784 ISO",date:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 ISO",time:"\u1798\u17C9\u17C4\u1784 ISO",duration:"\u179A\u1799\u17C8\u1796\u17C1\u179B ISO",ipv4:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",ipv6:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",cidrv4:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",cidrv6:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",base64:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64",base64url:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64url",json_string:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A JSON",e164:"\u179B\u17C1\u1781 E.164",jwt:"JWT",template_literal:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B"},o={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 i=o[n.expected]??n.expected,s=v(n.input),c=o[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 ${c}`:`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${i} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${c}`}case"invalid_value":return n.values.length===1?`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${_(n.values[0])}`:`\u1787\u1798\u17D2\u179A\u17BE\u179F\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1787\u17B6\u1798\u17BD\u1799\u1780\u17D2\u1793\u17BB\u1784\u1785\u17C6\u178E\u17C4\u1798 ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(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"} ${i} ${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"} ${i} ${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${n.origin} ${i} ${n.minimum.toString()} ${s.unit}`:`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${n.origin} ${i} ${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1785\u17B6\u1794\u17CB\u1795\u17D2\u178F\u17BE\u1798\u178A\u17C4\u1799 "${i.prefix}"`:i.format==="ends_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1794\u1789\u17D2\u1785\u1794\u17CB\u178A\u17C4\u1799 "${i.suffix}"`:i.format==="includes"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1798\u17B6\u1793 "${i.includes}"`:i.format==="regex"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1795\u17D2\u1782\u17BC\u1795\u17D2\u1782\u1784\u1793\u17B9\u1784\u1791\u1798\u17D2\u179A\u1784\u17CB\u178A\u17C2\u179B\u1794\u17B6\u1793\u1780\u17C6\u178E\u178F\u17CB ${i.pattern}`:`\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 ${r[i.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 ${f(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 kr(){return{localeError:Zb()}}function Jm(){return kr()}var Vb=()=>{let e={string:{unit:"\uBB38\uC790",verb:"to have"},file:{unit:"\uBC14\uC774\uD2B8",verb:"to have"},array:{unit:"\uAC1C",verb:"to have"},set:{unit:"\uAC1C",verb:"to have"}};function t(n){return e[n]??null}let r={regex:"\uC785\uB825",email:"\uC774\uBA54\uC77C \uC8FC\uC18C",url:"URL",emoji:"\uC774\uBAA8\uC9C0",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \uB0A0\uC9DC\uC2DC\uAC04",date:"ISO \uB0A0\uC9DC",time:"ISO \uC2DC\uAC04",duration:"ISO \uAE30\uAC04",ipv4:"IPv4 \uC8FC\uC18C",ipv6:"IPv6 \uC8FC\uC18C",cidrv4:"IPv4 \uBC94\uC704",cidrv6:"IPv6 \uBC94\uC704",base64:"base64 \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",base64url:"base64url \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",json_string:"JSON \uBB38\uC790\uC5F4",e164:"E.164 \uBC88\uD638",jwt:"JWT",template_literal:"\uC785\uB825"},o={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[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 ${c}\uC785\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 ${i}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${c}\uC785\uB2C8\uB2E4`}case"invalid_value":return n.values.length===1?`\uC798\uBABB\uB41C \uC785\uB825: \uAC12\uC740 ${_(n.values[0])} \uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC635\uC158: ${f(n.values,"\uB610\uB294 ")} \uC911 \uD558\uB098\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"too_big":{let i=n.inclusive?"\uC774\uD558":"\uBBF8\uB9CC",s=i==="\uBBF8\uB9CC"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",c=t(n.origin),u=c?.unit??"\uC694\uC18C";return c?`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${n.maximum.toString()}${u} ${i}${s}`:`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${n.maximum.toString()} ${i}${s}`}case"too_small":{let i=n.inclusive?"\uC774\uC0C1":"\uCD08\uACFC",s=i==="\uC774\uC0C1"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",c=t(n.origin),u=c?.unit??"\uC694\uC18C";return c?`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${n.minimum.toString()}${u} ${i}${s}`:`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${n.minimum.toString()} ${i}${s}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${i.prefix}"(\uC73C)\uB85C \uC2DC\uC791\uD574\uC57C \uD569\uB2C8\uB2E4`:i.format==="ends_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${i.suffix}"(\uC73C)\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4`:i.format==="includes"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${i.includes}"\uC744(\uB97C) \uD3EC\uD568\uD574\uC57C \uD569\uB2C8\uB2E4`:i.format==="regex"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: \uC815\uADDC\uC2DD ${i.pattern} \uD328\uD134\uACFC \uC77C\uCE58\uD574\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C ${r[i.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: ${f(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 Ym(){return{localeError:Vb()}}var hn=e=>e.charAt(0).toUpperCase()+e.slice(1);function Xm(e){let t=Math.abs(e),r=t%10,o=t%100;return o>=11&&o<=19||r===0?"many":r===1?"one":"few"}var Bb=()=>{let e={string:{unit:{one:"simbolis",few:"simboliai",many:"simboli\u0173"},verb:{smaller:{inclusive:"turi b\u016Bti ne ilgesn\u0117 kaip",notInclusive:"turi b\u016Bti trumpesn\u0117 kaip"},bigger:{inclusive:"turi b\u016Bti ne trumpesn\u0117 kaip",notInclusive:"turi b\u016Bti ilgesn\u0117 kaip"}}},file:{unit:{one:"baitas",few:"baitai",many:"bait\u0173"},verb:{smaller:{inclusive:"turi b\u016Bti ne didesnis kaip",notInclusive:"turi b\u016Bti ma\u017Eesnis kaip"},bigger:{inclusive:"turi b\u016Bti ne ma\u017Eesnis kaip",notInclusive:"turi b\u016Bti didesnis kaip"}}},array:{unit:{one:"element\u0105",few:"elementus",many:"element\u0173"},verb:{smaller:{inclusive:"turi tur\u0117ti ne daugiau kaip",notInclusive:"turi tur\u0117ti ma\u017Eiau kaip"},bigger:{inclusive:"turi tur\u0117ti ne ma\u017Eiau kaip",notInclusive:"turi tur\u0117ti daugiau kaip"}}},set:{unit:{one:"element\u0105",few:"elementus",many:"element\u0173"},verb:{smaller:{inclusive:"turi tur\u0117ti ne daugiau kaip",notInclusive:"turi tur\u0117ti ma\u017Eiau kaip"},bigger:{inclusive:"turi tur\u0117ti ne ma\u017Eiau kaip",notInclusive:"turi tur\u0117ti daugiau kaip"}}}};function t(n,i,s,c){let u=e[n]??null;return u===null?u:{unit:u.unit[i],verb:u.verb[c][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"},o={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 i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return/^[A-Z]/.test(n.expected)?`Gautas tipas ${c}, o tik\u0117tasi - instanceof ${n.expected}`:`Gautas tipas ${c}, o tik\u0117tasi - ${i}`}case"invalid_value":return n.values.length===1?`Privalo b\u016Bti ${_(n.values[0])}`:`Privalo b\u016Bti vienas i\u0161 ${f(n.values,"|")} pasirinkim\u0173`;case"too_big":{let i=o[n.origin]??n.origin,s=t(n.origin,Xm(Number(n.maximum)),n.inclusive??!1,"smaller");if(s?.verb)return`${hn(i??n.origin??"reik\u0161m\u0117")} ${s.verb} ${n.maximum.toString()} ${s.unit??"element\u0173"}`;let c=n.inclusive?"ne didesnis kaip":"ma\u017Eesnis kaip";return`${hn(i??n.origin??"reik\u0161m\u0117")} turi b\u016Bti ${c} ${n.maximum.toString()} ${s?.unit}`}case"too_small":{let i=o[n.origin]??n.origin,s=t(n.origin,Xm(Number(n.minimum)),n.inclusive??!1,"bigger");if(s?.verb)return`${hn(i??n.origin??"reik\u0161m\u0117")} ${s.verb} ${n.minimum.toString()} ${s.unit??"element\u0173"}`;let c=n.inclusive?"ne ma\u017Eesnis kaip":"didesnis kaip";return`${hn(i??n.origin??"reik\u0161m\u0117")} turi b\u016Bti ${c} ${n.minimum.toString()} ${s?.unit}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Eilut\u0117 privalo prasid\u0117ti "${i.prefix}"`:i.format==="ends_with"?`Eilut\u0117 privalo pasibaigti "${i.suffix}"`:i.format==="includes"?`Eilut\u0117 privalo \u012Ftraukti "${i.includes}"`:i.format==="regex"?`Eilut\u0117 privalo atitikti ${i.pattern}`:`Neteisingas ${r[i.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"}: ${f(n.keys,", ")}`;case"invalid_key":return"Rastas klaidingas raktas";case"invalid_union":return"Klaidinga \u012Fvestis";case"invalid_element":{let i=o[n.origin]??n.origin;return`${hn(i??n.origin??"reik\u0161m\u0117")} turi klaiding\u0105 \u012Fvest\u012F`}default:return"Klaidinga \u012Fvestis"}}};function Qm(){return{localeError:Bb()}}var Hb=()=>{let e={string:{unit:"\u0437\u043D\u0430\u0446\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},file:{unit:"\u0431\u0430\u0458\u0442\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},array:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},set:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"}};function t(n){return e[n]??null}let r={regex:"\u0432\u043D\u0435\u0441",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u043D\u0430 \u0435-\u043F\u043E\u0448\u0442\u0430",url:"URL",emoji:"\u0435\u043C\u043E\u045F\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0443\u043C \u0438 \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0443\u043C",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u0432\u0440\u0435\u043C\u0435\u0442\u0440\u0430\u0435\u045A\u0435",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441\u0430",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441\u0430",cidrv4:"IPv4 \u043E\u043F\u0441\u0435\u0433",cidrv6:"IPv6 \u043E\u043F\u0441\u0435\u0433",base64:"base64-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",base64url:"base64url-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",json_string:"JSON \u043D\u0438\u0437\u0430",e164:"E.164 \u0431\u0440\u043E\u0458",jwt:"JWT",template_literal:"\u0432\u043D\u0435\u0441"},o={nan:"NaN",number:"\u0431\u0440\u043E\u0458",array:"\u043D\u0438\u0437\u0430"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[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 ${c}`:`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${i}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${c}`}case"invalid_value":return n.values.length===1?`Invalid input: expected ${_(n.values[0])}`:`\u0413\u0440\u0435\u0448\u0430\u043D\u0430 \u043E\u043F\u0446\u0438\u0458\u0430: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 \u0435\u0434\u043D\u0430 ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(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 ${i}${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 ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(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 ${i}${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 ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u043D\u0443\u0432\u0430 \u0441\u043E "${i.prefix}"`:i.format==="ends_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u0432\u0440\u0448\u0443\u0432\u0430 \u0441\u043E "${i.suffix}"`:i.format==="includes"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0432\u043A\u043B\u0443\u0447\u0443\u0432\u0430 "${i.includes}"`:i.format==="regex"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u043E\u0434\u0433\u043E\u0430\u0440\u0430 \u043D\u0430 \u043F\u0430\u0442\u0435\u0440\u043D\u043E\u0442 ${i.pattern}`:`Invalid ${r[i.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"}: ${f(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 ep(){return{localeError:Hb()}}var Gb=()=>{let e={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}};function t(n){return e[n]??null}let r={regex:"input",email:"alamat e-mel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tarikh masa ISO",date:"tarikh ISO",time:"masa ISO",duration:"tempoh ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"julat IPv4",cidrv6:"julat IPv6",base64:"string dikodkan base64",base64url:"string dikodkan base64url",json_string:"string JSON",e164:"nombor E.164",jwt:"JWT",template_literal:"input"},o={nan:"NaN",number:"nombor"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return/^[A-Z]/.test(n.expected)?`Input tidak sah: dijangka instanceof ${n.expected}, diterima ${c}`:`Input tidak sah: dijangka ${i}, diterima ${c}`}case"invalid_value":return n.values.length===1?`Input tidak sah: dijangka ${_(n.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Terlalu besar: dijangka ${n.origin??"nilai"} ${s.verb} ${i}${n.maximum.toString()} ${s.unit??"elemen"}`:`Terlalu besar: dijangka ${n.origin??"nilai"} adalah ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Terlalu kecil: dijangka ${n.origin} ${s.verb} ${i}${n.minimum.toString()} ${s.unit}`:`Terlalu kecil: dijangka ${n.origin} adalah ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`String tidak sah: mesti bermula dengan "${i.prefix}"`:i.format==="ends_with"?`String tidak sah: mesti berakhir dengan "${i.suffix}"`:i.format==="includes"?`String tidak sah: mesti mengandungi "${i.includes}"`:i.format==="regex"?`String tidak sah: mesti sepadan dengan corak ${i.pattern}`:`${r[i.format]??n.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${n.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${f(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 tp(){return{localeError:Gb()}}var Kb=()=>{let e={string:{unit:"tekens",verb:"heeft"},file:{unit:"bytes",verb:"heeft"},array:{unit:"elementen",verb:"heeft"},set:{unit:"elementen",verb:"heeft"}};function t(n){return e[n]??null}let r={regex:"invoer",email:"emailadres",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum en tijd",date:"ISO datum",time:"ISO tijd",duration:"ISO duur",ipv4:"IPv4-adres",ipv6:"IPv6-adres",cidrv4:"IPv4-bereik",cidrv6:"IPv6-bereik",base64:"base64-gecodeerde tekst",base64url:"base64 URL-gecodeerde tekst",json_string:"JSON string",e164:"E.164-nummer",jwt:"JWT",template_literal:"invoer"},o={nan:"NaN",number:"getal"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return/^[A-Z]/.test(n.expected)?`Ongeldige invoer: verwacht instanceof ${n.expected}, ontving ${c}`:`Ongeldige invoer: verwacht ${i}, ontving ${c}`}case"invalid_value":return n.values.length===1?`Ongeldige invoer: verwacht ${_(n.values[0])}`:`Ongeldige optie: verwacht \xE9\xE9n van ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin),c=n.origin==="date"?"laat":n.origin==="string"?"lang":"groot";return s?`Te ${c}: verwacht dat ${n.origin??"waarde"} ${i}${n.maximum.toString()} ${s.unit??"elementen"} ${s.verb}`:`Te ${c}: verwacht dat ${n.origin??"waarde"} ${i}${n.maximum.toString()} is`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin),c=n.origin==="date"?"vroeg":n.origin==="string"?"kort":"klein";return s?`Te ${c}: verwacht dat ${n.origin} ${i}${n.minimum.toString()} ${s.unit} ${s.verb}`:`Te ${c}: verwacht dat ${n.origin} ${i}${n.minimum.toString()} is`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Ongeldige tekst: moet met "${i.prefix}" beginnen`:i.format==="ends_with"?`Ongeldige tekst: moet op "${i.suffix}" eindigen`:i.format==="includes"?`Ongeldige tekst: moet "${i.includes}" bevatten`:i.format==="regex"?`Ongeldige tekst: moet overeenkomen met patroon ${i.pattern}`:`Ongeldig: ${r[i.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":""}: ${f(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 np(){return{localeError:Kb()}}var Wb=()=>{let e={string:{unit:"tegn",verb:"\xE5 ha"},file:{unit:"bytes",verb:"\xE5 ha"},array:{unit:"elementer",verb:"\xE5 inneholde"},set:{unit:"elementer",verb:"\xE5 inneholde"}};function t(n){return e[n]??null}let r={regex:"input",email:"e-postadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslett",date:"ISO-dato",time:"ISO-klokkeslett",duration:"ISO-varighet",ipv4:"IPv4-omr\xE5de",ipv6:"IPv6-omr\xE5de",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkodet streng",base64url:"base64url-enkodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},o={nan:"NaN",number:"tall",array:"liste"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return/^[A-Z]/.test(n.expected)?`Ugyldig input: forventet instanceof ${n.expected}, fikk ${c}`:`Ugyldig input: forventet ${i}, fikk ${c}`}case"invalid_value":return n.values.length===1?`Ugyldig verdi: forventet ${_(n.values[0])}`:`Ugyldig valg: forventet en av ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`For stor(t): forventet ${n.origin??"value"} til \xE5 ha ${i}${n.maximum.toString()} ${s.unit??"elementer"}`:`For stor(t): forventet ${n.origin??"value"} til \xE5 ha ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`For lite(n): forventet ${n.origin} til \xE5 ha ${i}${n.minimum.toString()} ${s.unit}`:`For lite(n): forventet ${n.origin} til \xE5 ha ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Ugyldig streng: m\xE5 starte med "${i.prefix}"`:i.format==="ends_with"?`Ugyldig streng: m\xE5 ende med "${i.suffix}"`:i.format==="includes"?`Ugyldig streng: m\xE5 inneholde "${i.includes}"`:i.format==="regex"?`Ugyldig streng: m\xE5 matche m\xF8nsteret ${i.pattern}`:`Ugyldig ${r[i.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"}: ${f(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 rp(){return{localeError:Wb()}}var qb=()=>{let e={string:{unit:"harf",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"unsur",verb:"olmal\u0131d\u0131r"},set:{unit:"unsur",verb:"olmal\u0131d\u0131r"}};function t(n){return e[n]??null}let r={regex:"giren",email:"epostag\xE2h",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO heng\xE2m\u0131",date:"ISO tarihi",time:"ISO zaman\u0131",duration:"ISO m\xFCddeti",ipv4:"IPv4 ni\u015F\xE2n\u0131",ipv6:"IPv6 ni\u015F\xE2n\u0131",cidrv4:"IPv4 menzili",cidrv6:"IPv6 menzili",base64:"base64-\u015Fifreli metin",base64url:"base64url-\u015Fifreli metin",json_string:"JSON metin",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"giren"},o={nan:"NaN",number:"numara",array:"saf",null:"gayb"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return/^[A-Z]/.test(n.expected)?`F\xE2sit giren: umulan instanceof ${n.expected}, al\u0131nan ${c}`:`F\xE2sit giren: umulan ${i}, al\u0131nan ${c}`}case"invalid_value":return n.values.length===1?`F\xE2sit giren: umulan ${_(n.values[0])}`:`F\xE2sit tercih: m\xFBteberler ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Fazla b\xFCy\xFCk: ${n.origin??"value"}, ${i}${n.maximum.toString()} ${s.unit??"elements"} sahip olmal\u0131yd\u0131.`:`Fazla b\xFCy\xFCk: ${n.origin??"value"}, ${i}${n.maximum.toString()} olmal\u0131yd\u0131.`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Fazla k\xFC\xE7\xFCk: ${n.origin}, ${i}${n.minimum.toString()} ${s.unit} sahip olmal\u0131yd\u0131.`:`Fazla k\xFC\xE7\xFCk: ${n.origin}, ${i}${n.minimum.toString()} olmal\u0131yd\u0131.`}case"invalid_format":{let i=n;return i.format==="starts_with"?`F\xE2sit metin: "${i.prefix}" ile ba\u015Flamal\u0131.`:i.format==="ends_with"?`F\xE2sit metin: "${i.suffix}" ile bitmeli.`:i.format==="includes"?`F\xE2sit metin: "${i.includes}" ihtiv\xE2 etmeli.`:i.format==="regex"?`F\xE2sit metin: ${i.pattern} nak\u015F\u0131na uymal\u0131.`:`F\xE2sit ${r[i.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":""}: ${f(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 ip(){return{localeError:qb()}}var Jb=()=>{let e={string:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},file:{unit:"\u0628\u0627\u06CC\u067C\u0633",verb:"\u0648\u0644\u0631\u064A"},array:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},set:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"}};function t(n){return e[n]??null}let r={regex:"\u0648\u0631\u0648\u062F\u064A",email:"\u0628\u0631\u06CC\u069A\u0646\u0627\u0644\u06CC\u06A9",url:"\u06CC\u0648 \u0622\u0631 \u0627\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0646\u06CC\u067C\u0647 \u0627\u0648 \u0648\u062E\u062A",date:"\u0646\u06D0\u067C\u0647",time:"\u0648\u062E\u062A",duration:"\u0645\u0648\u062F\u0647",ipv4:"\u062F IPv4 \u067E\u062A\u0647",ipv6:"\u062F IPv6 \u067E\u062A\u0647",cidrv4:"\u062F IPv4 \u0633\u0627\u062D\u0647",cidrv6:"\u062F IPv6 \u0633\u0627\u062D\u0647",base64:"base64-encoded \u0645\u062A\u0646",base64url:"base64url-encoded \u0645\u062A\u0646",json_string:"JSON \u0645\u062A\u0646",e164:"\u062F E.164 \u0634\u0645\u06D0\u0631\u0647",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u064A"},o={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0627\u0631\u06D0"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[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 ${c} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`:`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${i} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${c} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`}case"invalid_value":return n.values.length===1?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${_(n.values[0])} \u0648\u0627\u06CC`:`\u0646\u0627\u0633\u0645 \u0627\u0646\u062A\u062E\u0627\u0628: \u0628\u0627\u06CC\u062F \u06CC\u0648 \u0644\u0647 ${f(n.values,"|")} \u0685\u062E\u0647 \u0648\u0627\u06CC`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${n.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${i}${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 ${i}${n.maximum.toString()} \u0648\u064A`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${n.origin} \u0628\u0627\u06CC\u062F ${i}${n.minimum.toString()} ${s.unit} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${n.origin} \u0628\u0627\u06CC\u062F ${i}${n.minimum.toString()} \u0648\u064A`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${i.prefix}" \u0633\u0631\u0647 \u067E\u06CC\u0644 \u0634\u064A`:i.format==="ends_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${i.suffix}" \u0633\u0631\u0647 \u067E\u0627\u06CC \u062A\u0647 \u0648\u0631\u0633\u064A\u0696\u064A`:i.format==="includes"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F "${i.includes}" \u0648\u0644\u0631\u064A`:i.format==="regex"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F ${i.pattern} \u0633\u0631\u0647 \u0645\u0637\u0627\u0628\u0642\u062A \u0648\u0644\u0631\u064A`:`${r[i.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"}: ${f(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 op(){return{localeError:Jb()}}var Yb=()=>{let e={string:{unit:"znak\xF3w",verb:"mie\u0107"},file:{unit:"bajt\xF3w",verb:"mie\u0107"},array:{unit:"element\xF3w",verb:"mie\u0107"},set:{unit:"element\xF3w",verb:"mie\u0107"}};function t(n){return e[n]??null}let r={regex:"wyra\u017Cenie",email:"adres email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i godzina w formacie ISO",date:"data w formacie ISO",time:"godzina w formacie ISO",duration:"czas trwania ISO",ipv4:"adres IPv4",ipv6:"adres IPv6",cidrv4:"zakres IPv4",cidrv6:"zakres IPv6",base64:"ci\u0105g znak\xF3w zakodowany w formacie base64",base64url:"ci\u0105g znak\xF3w zakodowany w formacie base64url",json_string:"ci\u0105g znak\xF3w w formacie JSON",e164:"liczba E.164",jwt:"JWT",template_literal:"wej\u015Bcie"},o={nan:"NaN",number:"liczba",array:"tablica"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return/^[A-Z]/.test(n.expected)?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano instanceof ${n.expected}, otrzymano ${c}`:`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${i}, otrzymano ${c}`}case"invalid_value":return n.values.length===1?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${_(n.values[0])}`:`Nieprawid\u0142owa opcja: oczekiwano jednej z warto\u015Bci ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Za du\u017Ca warto\u015B\u0107: oczekiwano, \u017Ce ${n.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${i}${n.maximum.toString()} ${s.unit??"element\xF3w"}`:`Zbyt du\u017C(y/a/e): oczekiwano, \u017Ce ${n.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Za ma\u0142a warto\u015B\u0107: oczekiwano, \u017Ce ${n.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${i}${n.minimum.toString()} ${s.unit??"element\xF3w"}`:`Zbyt ma\u0142(y/a/e): oczekiwano, \u017Ce ${n.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zaczyna\u0107 si\u0119 od "${i.prefix}"`:i.format==="ends_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi ko\u0144czy\u0107 si\u0119 na "${i.suffix}"`:i.format==="includes"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zawiera\u0107 "${i.includes}"`:i.format==="regex"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi odpowiada\u0107 wzorcowi ${i.pattern}`:`Nieprawid\u0142ow(y/a/e) ${r[i.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":""}: ${f(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 ap(){return{localeError:Yb()}}var Xb=()=>{let e={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function t(n){return e[n]??null}let r={regex:"padr\xE3o",email:"endere\xE7o de e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e hora ISO",date:"data ISO",time:"hora ISO",duration:"dura\xE7\xE3o ISO",ipv4:"endere\xE7o IPv4",ipv6:"endere\xE7o IPv6",cidrv4:"faixa de IPv4",cidrv6:"faixa de IPv6",base64:"texto codificado em base64",base64url:"URL codificada em base64",json_string:"texto JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},o={nan:"NaN",number:"n\xFAmero",null:"nulo"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return/^[A-Z]/.test(n.expected)?`Tipo inv\xE1lido: esperado instanceof ${n.expected}, recebido ${c}`:`Tipo inv\xE1lido: esperado ${i}, recebido ${c}`}case"invalid_value":return n.values.length===1?`Entrada inv\xE1lida: esperado ${_(n.values[0])}`:`Op\xE7\xE3o inv\xE1lida: esperada uma das ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Muito grande: esperado que ${n.origin??"valor"} tivesse ${i}${n.maximum.toString()} ${s.unit??"elementos"}`:`Muito grande: esperado que ${n.origin??"valor"} fosse ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Muito pequeno: esperado que ${n.origin} tivesse ${i}${n.minimum.toString()} ${s.unit}`:`Muito pequeno: esperado que ${n.origin} fosse ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Texto inv\xE1lido: deve come\xE7ar com "${i.prefix}"`:i.format==="ends_with"?`Texto inv\xE1lido: deve terminar com "${i.suffix}"`:i.format==="includes"?`Texto inv\xE1lido: deve incluir "${i.includes}"`:i.format==="regex"?`Texto inv\xE1lido: deve corresponder ao padr\xE3o ${i.pattern}`:`${r[i.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":""}: ${f(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 sp(){return{localeError:Xb()}}var Qb=()=>{let e={string:{unit:"caractere",verb:"s\u0103 aib\u0103"},file:{unit:"octe\u021Bi",verb:"s\u0103 aib\u0103"},array:{unit:"elemente",verb:"s\u0103 aib\u0103"},set:{unit:"elemente",verb:"s\u0103 aib\u0103"},map:{unit:"intr\u0103ri",verb:"s\u0103 aib\u0103"}};function t(n){return e[n]??null}let r={regex:"intrare",email:"adres\u0103 de email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"dat\u0103 \u0219i or\u0103 ISO",date:"dat\u0103 ISO",time:"or\u0103 ISO",duration:"durat\u0103 ISO",ipv4:"adres\u0103 IPv4",ipv6:"adres\u0103 IPv6",mac:"adres\u0103 MAC",cidrv4:"interval IPv4",cidrv6:"interval IPv6",base64:"\u0219ir codat base64",base64url:"\u0219ir codat base64url",json_string:"\u0219ir JSON",e164:"num\u0103r E.164",jwt:"JWT",template_literal:"intrare"},o={nan:"NaN",string:"\u0219ir",number:"num\u0103r",boolean:"boolean",function:"func\u021Bie",array:"matrice",object:"obiect",undefined:"nedefinit",symbol:"simbol",bigint:"num\u0103r mare",void:"void",never:"never",map:"hart\u0103",set:"set"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return`Intrare invalid\u0103: a\u0219teptat ${i}, primit ${c}`}case"invalid_value":return n.values.length===1?`Intrare invalid\u0103: a\u0219teptat ${_(n.values[0])}`:`Op\u021Biune invalid\u0103: a\u0219teptat una dintre ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Prea mare: a\u0219teptat ca ${n.origin??"valoarea"} ${s.verb} ${i}${n.maximum.toString()} ${s.unit??"elemente"}`:`Prea mare: a\u0219teptat ca ${n.origin??"valoarea"} s\u0103 fie ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Prea mic: a\u0219teptat ca ${n.origin} ${s.verb} ${i}${n.minimum.toString()} ${s.unit}`:`Prea mic: a\u0219teptat ca ${n.origin} s\u0103 fie ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u0218ir invalid: trebuie s\u0103 \xEEnceap\u0103 cu "${i.prefix}"`:i.format==="ends_with"?`\u0218ir invalid: trebuie s\u0103 se termine cu "${i.suffix}"`:i.format==="includes"?`\u0218ir invalid: trebuie s\u0103 includ\u0103 "${i.includes}"`:i.format==="regex"?`\u0218ir invalid: trebuie s\u0103 se potriveasc\u0103 cu modelul ${i.pattern}`:`Format invalid: ${r[i.format]??n.format}`}case"not_multiple_of":return`Num\u0103r invalid: trebuie s\u0103 fie multiplu de ${n.divisor}`;case"unrecognized_keys":return`Chei nerecunoscute: ${f(n.keys,", ")}`;case"invalid_key":return`Cheie invalid\u0103 \xEEn ${n.origin}`;case"invalid_union":return"Intrare invalid\u0103";case"invalid_element":return`Valoare invalid\u0103 \xEEn ${n.origin}`;default:return"Intrare invalid\u0103"}}};function cp(){return{localeError:Qb()}}function up(e,t,r,o){let n=Math.abs(e),i=n%10,s=n%100;return s>=11&&s<=19?o:i===1?t:i>=2&&i<=4?r:o}var ey=()=>{let e={string:{unit:{one:"\u0441\u0438\u043C\u0432\u043E\u043B",few:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",many:"\u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u0430",many:"\u0431\u0430\u0439\u0442"},verb:"\u0438\u043C\u0435\u0442\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"}};function t(n){return e[n]??null}let r={regex:"\u0432\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0438 \u0432\u0440\u0435\u043C\u044F",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u044F",duration:"ISO \u0434\u043B\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64",base64url:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64url",json_string:"JSON \u0441\u0442\u0440\u043E\u043A\u0430",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0432\u043E\u0434"},o={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0441\u0438\u0432"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[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 ${c}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${i}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${c}`}case"invalid_value":return n.values.length===1?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${_(n.values[0])}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0430\u0440\u0438\u0430\u043D\u0442: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0434\u043D\u043E \u0438\u0437 ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);if(s){let c=Number(n.maximum),u=up(c,s.unit.one,s.unit.few,s.unit.many);return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${n.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${i}${n.maximum.toString()} ${u}`}return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${n.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);if(s){let c=Number(n.minimum),u=up(c,s.unit.one,s.unit.few,s.unit.many);return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${n.origin} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${i}${n.minimum.toString()} ${u}`}return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${n.origin} \u0431\u0443\u0434\u0435\u0442 ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u043D\u0430\u0447\u0438\u043D\u0430\u0442\u044C\u0441\u044F \u0441 "${i.prefix}"`:i.format==="ends_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0437\u0430\u043A\u0430\u043D\u0447\u0438\u0432\u0430\u0442\u044C\u0441\u044F \u043D\u0430 "${i.suffix}"`:i.format==="includes"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u0434\u0435\u0440\u0436\u0430\u0442\u044C "${i.includes}"`:i.format==="regex"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043E\u0432\u0430\u0442\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${i.pattern}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 ${r[i.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":""}: ${f(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 lp(){return{localeError:ey()}}var ty=()=>{let e={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}};function t(n){return e[n]??null}let r={regex:"vnos",email:"e-po\u0161tni naslov",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum in \u010Das",date:"ISO datum",time:"ISO \u010Das",duration:"ISO trajanje",ipv4:"IPv4 naslov",ipv6:"IPv6 naslov",cidrv4:"obseg IPv4",cidrv6:"obseg IPv6",base64:"base64 kodiran niz",base64url:"base64url kodiran niz",json_string:"JSON niz",e164:"E.164 \u0161tevilka",jwt:"JWT",template_literal:"vnos"},o={nan:"NaN",number:"\u0161tevilo",array:"tabela"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return/^[A-Z]/.test(n.expected)?`Neveljaven vnos: pri\u010Dakovano instanceof ${n.expected}, prejeto ${c}`:`Neveljaven vnos: pri\u010Dakovano ${i}, prejeto ${c}`}case"invalid_value":return n.values.length===1?`Neveljaven vnos: pri\u010Dakovano ${_(n.values[0])}`:`Neveljavna mo\u017Enost: pri\u010Dakovano eno izmed ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Preveliko: pri\u010Dakovano, da bo ${n.origin??"vrednost"} imelo ${i}${n.maximum.toString()} ${s.unit??"elementov"}`:`Preveliko: pri\u010Dakovano, da bo ${n.origin??"vrednost"} ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Premajhno: pri\u010Dakovano, da bo ${n.origin} imelo ${i}${n.minimum.toString()} ${s.unit}`:`Premajhno: pri\u010Dakovano, da bo ${n.origin} ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Neveljaven niz: mora se za\u010Deti z "${i.prefix}"`:i.format==="ends_with"?`Neveljaven niz: mora se kon\u010Dati z "${i.suffix}"`:i.format==="includes"?`Neveljaven niz: mora vsebovati "${i.includes}"`:i.format==="regex"?`Neveljaven niz: mora ustrezati vzorcu ${i.pattern}`:`Neveljaven ${r[i.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"}: ${f(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 dp(){return{localeError:ty()}}var ny=()=>{let e={string:{unit:"tecken",verb:"att ha"},file:{unit:"bytes",verb:"att ha"},array:{unit:"objekt",verb:"att inneh\xE5lla"},set:{unit:"objekt",verb:"att inneh\xE5lla"}};function t(n){return e[n]??null}let r={regex:"regulj\xE4rt uttryck",email:"e-postadress",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datum och tid",date:"ISO-datum",time:"ISO-tid",duration:"ISO-varaktighet",ipv4:"IPv4-intervall",ipv6:"IPv6-intervall",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodad str\xE4ng",base64url:"base64url-kodad str\xE4ng",json_string:"JSON-str\xE4ng",e164:"E.164-nummer",jwt:"JWT",template_literal:"mall-literal"},o={nan:"NaN",number:"antal",array:"lista"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return/^[A-Z]/.test(n.expected)?`Ogiltig inmatning: f\xF6rv\xE4ntat instanceof ${n.expected}, fick ${c}`:`Ogiltig inmatning: f\xF6rv\xE4ntat ${i}, fick ${c}`}case"invalid_value":return n.values.length===1?`Ogiltig inmatning: f\xF6rv\xE4ntat ${_(n.values[0])}`:`Ogiltigt val: f\xF6rv\xE4ntade en av ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`F\xF6r stor(t): f\xF6rv\xE4ntade ${n.origin??"v\xE4rdet"} att ha ${i}${n.maximum.toString()} ${s.unit??"element"}`:`F\xF6r stor(t): f\xF6rv\xE4ntat ${n.origin??"v\xE4rdet"} att ha ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`F\xF6r lite(t): f\xF6rv\xE4ntade ${n.origin??"v\xE4rdet"} att ha ${i}${n.minimum.toString()} ${s.unit}`:`F\xF6r lite(t): f\xF6rv\xE4ntade ${n.origin??"v\xE4rdet"} att ha ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Ogiltig str\xE4ng: m\xE5ste b\xF6rja med "${i.prefix}"`:i.format==="ends_with"?`Ogiltig str\xE4ng: m\xE5ste sluta med "${i.suffix}"`:i.format==="includes"?`Ogiltig str\xE4ng: m\xE5ste inneh\xE5lla "${i.includes}"`:i.format==="regex"?`Ogiltig str\xE4ng: m\xE5ste matcha m\xF6nstret "${i.pattern}"`:`Ogiltig(t) ${r[i.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"}: ${f(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 mp(){return{localeError:ny()}}var ry=()=>{let e={string:{unit:"\u0B8E\u0BB4\u0BC1\u0BA4\u0BCD\u0BA4\u0BC1\u0B95\u0BCD\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},file:{unit:"\u0BAA\u0BC8\u0B9F\u0BCD\u0B9F\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},array:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},set:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"}};function t(n){return e[n]??null}let r={regex:"\u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1",email:"\u0BAE\u0BBF\u0BA9\u0BCD\u0BA9\u0B9E\u0BCD\u0B9A\u0BB2\u0BCD \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0BA4\u0BC7\u0BA4\u0BBF \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",date:"ISO \u0BA4\u0BC7\u0BA4\u0BBF",time:"ISO \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",duration:"ISO \u0B95\u0BBE\u0BB2 \u0B85\u0BB3\u0BB5\u0BC1",ipv4:"IPv4 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",ipv6:"IPv6 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",cidrv4:"IPv4 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",cidrv6:"IPv6 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",base64:"base64-encoded \u0B9A\u0BB0\u0BAE\u0BCD",base64url:"base64url-encoded \u0B9A\u0BB0\u0BAE\u0BCD",json_string:"JSON \u0B9A\u0BB0\u0BAE\u0BCD",e164:"E.164 \u0B8E\u0BA3\u0BCD",jwt:"JWT",template_literal:"input"},o={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 i=o[n.expected]??n.expected,s=v(n.input),c=o[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 ${c}`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${i}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${c}`}case"invalid_value":return n.values.length===1?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${_(n.values[0])}`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0BB0\u0BC1\u0BAA\u0BCD\u0BAA\u0BAE\u0BCD: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${f(n.values,"|")} \u0B87\u0BB2\u0BCD \u0B92\u0BA9\u0BCD\u0BB1\u0BC1`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(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"} ${i}${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"} ${i}${n.maximum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"too_small":{let i=n.inclusive?">=":">",s=t(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} ${i}${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} ${i}${n.minimum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${i.prefix}" \u0B87\u0BB2\u0BCD \u0BA4\u0BCA\u0B9F\u0B99\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:i.format==="ends_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${i.suffix}" \u0B87\u0BB2\u0BCD \u0BAE\u0BC1\u0B9F\u0BBF\u0BB5\u0B9F\u0BC8\u0BAF \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:i.format==="includes"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${i.includes}" \u0B90 \u0B89\u0BB3\u0BCD\u0BB3\u0B9F\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:i.format==="regex"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: ${i.pattern} \u0BAE\u0BC1\u0BB1\u0BC8\u0BAA\u0BBE\u0B9F\u0BCD\u0B9F\u0BC1\u0B9F\u0BA9\u0BCD \u0BAA\u0BCA\u0BB0\u0BC1\u0BA8\u0BCD\u0BA4 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 ${r[i.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":""}: ${f(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 pp(){return{localeError:ry()}}var iy=()=>{let e={string:{unit:"\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},file:{unit:"\u0E44\u0E1A\u0E15\u0E4C",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},array:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},set:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"}};function t(n){return e[n]??null}let r={regex:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19",email:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E2D\u0E35\u0E40\u0E21\u0E25",url:"URL",emoji:"\u0E2D\u0E34\u0E42\u0E21\u0E08\u0E34",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",date:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E41\u0E1A\u0E1A ISO",time:"\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",duration:"\u0E0A\u0E48\u0E27\u0E07\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",ipv4:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv4",ipv6:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv6",cidrv4:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv4",cidrv6:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv6",base64:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64",base64url:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64 \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A URL",json_string:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A JSON",e164:"\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E42\u0E17\u0E23\u0E28\u0E31\u0E1E\u0E17\u0E4C\u0E23\u0E30\u0E2B\u0E27\u0E48\u0E32\u0E07\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28 (E.164)",jwt:"\u0E42\u0E17\u0E40\u0E04\u0E19 JWT",template_literal:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19"},o={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 i=o[n.expected]??n.expected,s=v(n.input),c=o[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 ${c}`:`\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${i} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${c}`}case"invalid_value":return n.values.length===1?`\u0E04\u0E48\u0E32\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${_(n.values[0])}`:`\u0E15\u0E31\u0E27\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19\u0E2B\u0E19\u0E36\u0E48\u0E07\u0E43\u0E19 ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19":"\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32",s=t(n.origin);return s?`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${n.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${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${i} ${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?"\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22":"\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32",s=t(n.origin);return s?`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${n.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${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${i} ${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E02\u0E36\u0E49\u0E19\u0E15\u0E49\u0E19\u0E14\u0E49\u0E27\u0E22 "${i.prefix}"`:i.format==="ends_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E25\u0E07\u0E17\u0E49\u0E32\u0E22\u0E14\u0E49\u0E27\u0E22 "${i.suffix}"`:i.format==="includes"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E21\u0E35 "${i.includes}" \u0E2D\u0E22\u0E39\u0E48\u0E43\u0E19\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21`:i.format==="regex"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14 ${i.pattern}`:`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: ${r[i.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: ${f(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 fp(){return{localeError:iy()}}var oy=()=>{let e={string:{unit:"karakter",verb:"olmal\u0131"},file:{unit:"bayt",verb:"olmal\u0131"},array:{unit:"\xF6\u011Fe",verb:"olmal\u0131"},set:{unit:"\xF6\u011Fe",verb:"olmal\u0131"}};function t(n){return e[n]??null}let r={regex:"girdi",email:"e-posta adresi",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO tarih ve saat",date:"ISO tarih",time:"ISO saat",duration:"ISO s\xFCre",ipv4:"IPv4 adresi",ipv6:"IPv6 adresi",cidrv4:"IPv4 aral\u0131\u011F\u0131",cidrv6:"IPv6 aral\u0131\u011F\u0131",base64:"base64 ile \u015Fifrelenmi\u015F metin",base64url:"base64url ile \u015Fifrelenmi\u015F metin",json_string:"JSON dizesi",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"\u015Eablon dizesi"},o={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return/^[A-Z]/.test(n.expected)?`Ge\xE7ersiz de\u011Fer: beklenen instanceof ${n.expected}, al\u0131nan ${c}`:`Ge\xE7ersiz de\u011Fer: beklenen ${i}, al\u0131nan ${c}`}case"invalid_value":return n.values.length===1?`Ge\xE7ersiz de\u011Fer: beklenen ${_(n.values[0])}`:`Ge\xE7ersiz se\xE7enek: a\u015Fa\u011F\u0131dakilerden biri olmal\u0131: ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`\xC7ok b\xFCy\xFCk: beklenen ${n.origin??"de\u011Fer"} ${i}${n.maximum.toString()} ${s.unit??"\xF6\u011Fe"}`:`\xC7ok b\xFCy\xFCk: beklenen ${n.origin??"de\u011Fer"} ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\xC7ok k\xFC\xE7\xFCk: beklenen ${n.origin} ${i}${n.minimum.toString()} ${s.unit}`:`\xC7ok k\xFC\xE7\xFCk: beklenen ${n.origin} ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Ge\xE7ersiz metin: "${i.prefix}" ile ba\u015Flamal\u0131`:i.format==="ends_with"?`Ge\xE7ersiz metin: "${i.suffix}" ile bitmeli`:i.format==="includes"?`Ge\xE7ersiz metin: "${i.includes}" i\xE7ermeli`:i.format==="regex"?`Ge\xE7ersiz metin: ${i.pattern} desenine uymal\u0131`:`Ge\xE7ersiz ${r[i.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":""}: ${f(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 gp(){return{localeError:oy()}}var ay=()=>{let e={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},file:{unit:"\u0431\u0430\u0439\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"}};function t(n){return e[n]??null}let r={regex:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u0435\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0457 \u043F\u043E\u0448\u0442\u0438",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0434\u0430\u0442\u0430 \u0442\u0430 \u0447\u0430\u0441 ISO",date:"\u0434\u0430\u0442\u0430 ISO",time:"\u0447\u0430\u0441 ISO",duration:"\u0442\u0440\u0438\u0432\u0430\u043B\u0456\u0441\u0442\u044C ISO",ipv4:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv4",ipv6:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv6",cidrv4:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv4",cidrv6:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv6",base64:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64",base64url:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64url",json_string:"\u0440\u044F\u0434\u043E\u043A JSON",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"},o={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[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 ${c}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${i}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${c}`}case"invalid_value":return n.values.length===1?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${_(n.values[0])}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0430 \u043E\u043F\u0446\u0456\u044F: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F \u043E\u0434\u043D\u0435 \u0437 ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(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} ${i}${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 ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(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} ${i}${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 ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043F\u043E\u0447\u0438\u043D\u0430\u0442\u0438\u0441\u044F \u0437 "${i.prefix}"`:i.format==="ends_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0437\u0430\u043A\u0456\u043D\u0447\u0443\u0432\u0430\u0442\u0438\u0441\u044F \u043D\u0430 "${i.suffix}"`:i.format==="includes"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043C\u0456\u0441\u0442\u0438\u0442\u0438 "${i.includes}"`:i.format==="regex"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0432\u0456\u0434\u043F\u043E\u0432\u0456\u0434\u0430\u0442\u0438 \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${i.pattern}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 ${r[i.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":""}: ${f(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 Sr(){return{localeError:ay()}}function hp(){return Sr()}var sy=()=>{let e={string:{unit:"\u062D\u0631\u0648\u0641",verb:"\u06C1\u0648\u0646\u0627"},file:{unit:"\u0628\u0627\u0626\u0679\u0633",verb:"\u06C1\u0648\u0646\u0627"},array:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"},set:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"}};function t(n){return e[n]??null}let r={regex:"\u0627\u0646 \u067E\u0679",email:"\u0627\u06CC \u0645\u06CC\u0644 \u0627\u06CC\u0688\u0631\u06CC\u0633",url:"\u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",uuidv4:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 4",uuidv6:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 6",nanoid:"\u0646\u06CC\u0646\u0648 \u0622\u0626\u06CC \u0688\u06CC",guid:"\u062C\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid2:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC 2",ulid:"\u06CC\u0648 \u0627\u06CC\u0644 \u0622\u0626\u06CC \u0688\u06CC",xid:"\u0627\u06CC\u06A9\u0633 \u0622\u0626\u06CC \u0688\u06CC",ksuid:"\u06A9\u06D2 \u0627\u06CC\u0633 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",datetime:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0688\u06CC\u0679 \u0679\u0627\u0626\u0645",date:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u062A\u0627\u0631\u06CC\u062E",time:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0648\u0642\u062A",duration:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0645\u062F\u062A",ipv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0627\u06CC\u0688\u0631\u06CC\u0633",ipv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0627\u06CC\u0688\u0631\u06CC\u0633",cidrv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0631\u06CC\u0646\u062C",cidrv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0631\u06CC\u0646\u062C",base64:"\u0628\u06CC\u0633 64 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",base64url:"\u0628\u06CC\u0633 64 \u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",json_string:"\u062C\u06D2 \u0627\u06CC\u0633 \u0627\u0648 \u0627\u06CC\u0646 \u0633\u0679\u0631\u0646\u06AF",e164:"\u0627\u06CC 164 \u0646\u0645\u0628\u0631",jwt:"\u062C\u06D2 \u0688\u0628\u0644\u06CC\u0648 \u0679\u06CC",template_literal:"\u0627\u0646 \u067E\u0679"},o={nan:"NaN",number:"\u0646\u0645\u0628\u0631",array:"\u0622\u0631\u06D2",null:"\u0646\u0644"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[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 ${c} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`:`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${i} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${c} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`}case"invalid_value":return n.values.length===1?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${_(n.values[0])} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`:`\u063A\u0644\u0637 \u0622\u067E\u0634\u0646: ${f(n.values,"|")} \u0645\u06CC\u06BA \u0633\u06D2 \u0627\u06CC\u06A9 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u0628\u06C1\u062A \u0628\u0691\u0627: ${n.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u06D2 ${i}${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 ${i}${n.maximum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${n.origin} \u06A9\u06D2 ${i}${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 ${i}${n.minimum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${i.prefix}" \u0633\u06D2 \u0634\u0631\u0648\u0639 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:i.format==="ends_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${i.suffix}" \u067E\u0631 \u062E\u062A\u0645 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:i.format==="includes"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${i.includes}" \u0634\u0627\u0645\u0644 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:i.format==="regex"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: \u067E\u06CC\u0679\u0631\u0646 ${i.pattern} \u0633\u06D2 \u0645\u06CC\u0686 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:`\u063A\u0644\u0637 ${r[i.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":""}: ${f(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 _p(){return{localeError:sy()}}var cy=()=>{let e={string:{unit:"belgi",verb:"bo\u2018lishi kerak"},file:{unit:"bayt",verb:"bo\u2018lishi kerak"},array:{unit:"element",verb:"bo\u2018lishi kerak"},set:{unit:"element",verb:"bo\u2018lishi kerak"},map:{unit:"yozuv",verb:"bo\u2018lishi kerak"}};function t(n){return e[n]??null}let r={regex:"kirish",email:"elektron pochta manzili",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO sana va vaqti",date:"ISO sana",time:"ISO vaqt",duration:"ISO davomiylik",ipv4:"IPv4 manzil",ipv6:"IPv6 manzil",mac:"MAC manzil",cidrv4:"IPv4 diapazon",cidrv6:"IPv6 diapazon",base64:"base64 kodlangan satr",base64url:"base64url kodlangan satr",json_string:"JSON satr",e164:"E.164 raqam",jwt:"JWT",template_literal:"kirish"},o={nan:"NaN",number:"raqam",array:"massiv"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return/^[A-Z]/.test(n.expected)?`Noto\u2018g\u2018ri kirish: kutilgan instanceof ${n.expected}, qabul qilingan ${c}`:`Noto\u2018g\u2018ri kirish: kutilgan ${i}, qabul qilingan ${c}`}case"invalid_value":return n.values.length===1?`Noto\u2018g\u2018ri kirish: kutilgan ${_(n.values[0])}`:`Noto\u2018g\u2018ri variant: quyidagilardan biri kutilgan ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Juda katta: kutilgan ${n.origin??"qiymat"} ${i}${n.maximum.toString()} ${s.unit} ${s.verb}`:`Juda katta: kutilgan ${n.origin??"qiymat"} ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Juda kichik: kutilgan ${n.origin} ${i}${n.minimum.toString()} ${s.unit} ${s.verb}`:`Juda kichik: kutilgan ${n.origin} ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Noto\u2018g\u2018ri satr: "${i.prefix}" bilan boshlanishi kerak`:i.format==="ends_with"?`Noto\u2018g\u2018ri satr: "${i.suffix}" bilan tugashi kerak`:i.format==="includes"?`Noto\u2018g\u2018ri satr: "${i.includes}" ni o\u2018z ichiga olishi kerak`:i.format==="regex"?`Noto\u2018g\u2018ri satr: ${i.pattern} shabloniga mos kelishi kerak`:`Noto\u2018g\u2018ri ${r[i.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":""}: ${f(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 vp(){return{localeError:cy()}}var uy=()=>{let e={string:{unit:"k\xFD t\u1EF1",verb:"c\xF3"},file:{unit:"byte",verb:"c\xF3"},array:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"},set:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"}};function t(n){return e[n]??null}let r={regex:"\u0111\u1EA7u v\xE0o",email:"\u0111\u1ECBa ch\u1EC9 email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ng\xE0y gi\u1EDD ISO",date:"ng\xE0y ISO",time:"gi\u1EDD ISO",duration:"kho\u1EA3ng th\u1EDDi gian ISO",ipv4:"\u0111\u1ECBa ch\u1EC9 IPv4",ipv6:"\u0111\u1ECBa ch\u1EC9 IPv6",cidrv4:"d\u1EA3i IPv4",cidrv6:"d\u1EA3i IPv6",base64:"chu\u1ED7i m\xE3 h\xF3a base64",base64url:"chu\u1ED7i m\xE3 h\xF3a base64url",json_string:"chu\u1ED7i JSON",e164:"s\u1ED1 E.164",jwt:"JWT",template_literal:"\u0111\u1EA7u v\xE0o"},o={nan:"NaN",number:"s\u1ED1",array:"m\u1EA3ng"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[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 ${c}`:`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${i}, nh\u1EADn \u0111\u01B0\u1EE3c ${c}`}case"invalid_value":return n.values.length===1?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${_(n.values[0])}`:`T\xF9y ch\u1ECDn kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i m\u1ED9t trong c\xE1c gi\xE1 tr\u1ECB ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${n.origin??"gi\xE1 tr\u1ECB"} ${s.verb} ${i}${n.maximum.toString()} ${s.unit??"ph\u1EA7n t\u1EED"}`:`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${n.origin??"gi\xE1 tr\u1ECB"} ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${n.origin} ${s.verb} ${i}${n.minimum.toString()} ${s.unit}`:`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${n.origin} ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i b\u1EAFt \u0111\u1EA7u b\u1EB1ng "${i.prefix}"`:i.format==="ends_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i k\u1EBFt th\xFAc b\u1EB1ng "${i.suffix}"`:i.format==="includes"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i bao g\u1ED3m "${i.includes}"`:i.format==="regex"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i kh\u1EDBp v\u1EDBi m\u1EABu ${i.pattern}`:`${r[i.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: ${f(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 bp(){return{localeError:uy()}}var ly=()=>{let e={string:{unit:"\u5B57\u7B26",verb:"\u5305\u542B"},file:{unit:"\u5B57\u8282",verb:"\u5305\u542B"},array:{unit:"\u9879",verb:"\u5305\u542B"},set:{unit:"\u9879",verb:"\u5305\u542B"}};function t(n){return e[n]??null}let r={regex:"\u8F93\u5165",email:"\u7535\u5B50\u90AE\u4EF6",url:"URL",emoji:"\u8868\u60C5\u7B26\u53F7",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u671F\u65F6\u95F4",date:"ISO\u65E5\u671F",time:"ISO\u65F6\u95F4",duration:"ISO\u65F6\u957F",ipv4:"IPv4\u5730\u5740",ipv6:"IPv6\u5730\u5740",cidrv4:"IPv4\u7F51\u6BB5",cidrv6:"IPv6\u7F51\u6BB5",base64:"base64\u7F16\u7801\u5B57\u7B26\u4E32",base64url:"base64url\u7F16\u7801\u5B57\u7B26\u4E32",json_string:"JSON\u5B57\u7B26\u4E32",e164:"E.164\u53F7\u7801",jwt:"JWT",template_literal:"\u8F93\u5165"},o={nan:"NaN",number:"\u6570\u5B57",array:"\u6570\u7EC4",null:"\u7A7A\u503C(null)"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return/^[A-Z]/.test(n.expected)?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B instanceof ${n.expected}\uFF0C\u5B9E\u9645\u63A5\u6536 ${c}`:`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${i}\uFF0C\u5B9E\u9645\u63A5\u6536 ${c}`}case"invalid_value":return n.values.length===1?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${_(n.values[0])}`:`\u65E0\u6548\u9009\u9879\uFF1A\u671F\u671B\u4EE5\u4E0B\u4E4B\u4E00 ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${n.origin??"\u503C"} ${i}${n.maximum.toString()} ${s.unit??"\u4E2A\u5143\u7D20"}`:`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${n.origin??"\u503C"} ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${n.origin} ${i}${n.minimum.toString()} ${s.unit}`:`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${n.origin} ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${i.prefix}" \u5F00\u5934`:i.format==="ends_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${i.suffix}" \u7ED3\u5C3E`:i.format==="includes"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u5305\u542B "${i.includes}"`:i.format==="regex"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u6EE1\u8DB3\u6B63\u5219\u8868\u8FBE\u5F0F ${i.pattern}`:`\u65E0\u6548${r[i.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): ${f(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 yp(){return{localeError:ly()}}var dy=()=>{let e={string:{unit:"\u5B57\u5143",verb:"\u64C1\u6709"},file:{unit:"\u4F4D\u5143\u7D44",verb:"\u64C1\u6709"},array:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"},set:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"}};function t(n){return e[n]??null}let r={regex:"\u8F38\u5165",email:"\u90F5\u4EF6\u5730\u5740",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u65E5\u671F\u6642\u9593",date:"ISO \u65E5\u671F",time:"ISO \u6642\u9593",duration:"ISO \u671F\u9593",ipv4:"IPv4 \u4F4D\u5740",ipv6:"IPv6 \u4F4D\u5740",cidrv4:"IPv4 \u7BC4\u570D",cidrv6:"IPv6 \u7BC4\u570D",base64:"base64 \u7DE8\u78BC\u5B57\u4E32",base64url:"base64url \u7DE8\u78BC\u5B57\u4E32",json_string:"JSON \u5B57\u4E32",e164:"E.164 \u6578\u503C",jwt:"JWT",template_literal:"\u8F38\u5165"},o={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[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 ${c}`:`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${i}\uFF0C\u4F46\u6536\u5230 ${c}`}case"invalid_value":return n.values.length===1?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${_(n.values[0])}`:`\u7121\u6548\u7684\u9078\u9805\uFF1A\u9810\u671F\u70BA\u4EE5\u4E0B\u5176\u4E2D\u4E4B\u4E00 ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${n.origin??"\u503C"} \u61C9\u70BA ${i}${n.maximum.toString()} ${s.unit??"\u500B\u5143\u7D20"}`:`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${n.origin??"\u503C"} \u61C9\u70BA ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${n.origin} \u61C9\u70BA ${i}${n.minimum.toString()} ${s.unit}`:`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${n.origin} \u61C9\u70BA ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${i.prefix}" \u958B\u982D`:i.format==="ends_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${i.suffix}" \u7D50\u5C3E`:i.format==="includes"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u5305\u542B "${i.includes}"`:i.format==="regex"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u7B26\u5408\u683C\u5F0F ${i.pattern}`:`\u7121\u6548\u7684 ${r[i.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${f(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 xp(){return{localeError:dy()}}var my=()=>{let e={string:{unit:"\xE0mi",verb:"n\xED"},file:{unit:"bytes",verb:"n\xED"},array:{unit:"nkan",verb:"n\xED"},set:{unit:"nkan",verb:"n\xED"}};function t(n){return e[n]??null}let r={regex:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9",email:"\xE0d\xEDr\u1EB9\u0301s\xEC \xECm\u1EB9\u0301l\xEC",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\xE0k\xF3k\xF2 ISO",date:"\u1ECDj\u1ECD\u0301 ISO",time:"\xE0k\xF3k\xF2 ISO",duration:"\xE0k\xF3k\xF2 t\xF3 p\xE9 ISO",ipv4:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv4",ipv6:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv6",cidrv4:"\xE0gb\xE8gb\xE8 IPv4",cidrv6:"\xE0gb\xE8gb\xE8 IPv6",base64:"\u1ECD\u0300r\u1ECD\u0300 t\xED a k\u1ECD\u0301 n\xED base64",base64url:"\u1ECD\u0300r\u1ECD\u0300 base64url",json_string:"\u1ECD\u0300r\u1ECD\u0300 JSON",e164:"n\u1ECD\u0301mb\xE0 E.164",jwt:"JWT",template_literal:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9"},o={nan:"NaN",number:"n\u1ECD\u0301mb\xE0",array:"akop\u1ECD"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[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 ${c}`:`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${i}, \xE0m\u1ECD\u0300 a r\xED ${c}`}case"invalid_value":return n.values.length===1?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${_(n.values[0])}`:`\xC0\u1E63\xE0y\xE0n a\u1E63\xEC\u1E63e: yan \u1ECD\u0300kan l\xE1ra ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(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} ${i}${n.maximum} ${s.unit}`:`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 ${i}${n.maximum}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${n.origin} ${s.verb} ${i}${n.minimum} ${s.unit}`:`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 ${i}${n.minimum}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\u1EB9\u0300r\u1EB9\u0300 p\u1EB9\u0300l\xFA "${i.prefix}"`:i.format==="ends_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 par\xED p\u1EB9\u0300l\xFA "${i.suffix}"`:i.format==="includes"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 n\xED "${i.includes}"`:i.format==="regex"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\xE1 \xE0p\u1EB9\u1EB9r\u1EB9 mu ${i.pattern}`:`A\u1E63\xEC\u1E63e: ${r[i.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: ${f(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 kp(){return{localeError:my()}}var Sp,Ls=Symbol("ZodOutput"),Fs=Symbol("ZodInput"),$r=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...r){let o=r[0];return this._map.set(t,o),o&&typeof o=="object"&&"id"in o&&this._idmap.set(o.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){let r=this._map.get(t);return r&&typeof r=="object"&&"id"in r&&this._idmap.delete(r.id),this._map.delete(t),this}get(t){let r=t._zod.parent;if(r){let o={...this.get(r)??{}};delete o.id;let n={...o,...this._map.get(t)};return Object.keys(n).length?n:void 0}return this._map.get(t)}has(t){return this._map.has(t)}};function Ir(){return new $r}(Sp=globalThis).__zod_globalRegistry??(Sp.__zod_globalRegistry=Ir());var G=globalThis.__zod_globalRegistry;function Ms(e,t){return new e({type:"string",...y(t)})}function Zs(e,t){return new e({type:"string",coerce:!0,...y(t)})}function Er(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...y(t)})}function vn(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...y(t)})}function wr(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...y(t)})}function Or(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...y(t)})}function Tr(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...y(t)})}function Ar(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...y(t)})}function bn(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...y(t)})}function Pr(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...y(t)})}function Cr(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...y(t)})}function Nr(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...y(t)})}function Rr(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...y(t)})}function Dr(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...y(t)})}function zr(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...y(t)})}function Ur(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...y(t)})}function jr(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...y(t)})}function Lr(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...y(t)})}function Vs(e,t){return new e({type:"string",format:"mac",check:"string_format",abort:!1,...y(t)})}function Fr(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...y(t)})}function Mr(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...y(t)})}function Zr(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...y(t)})}function Vr(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...y(t)})}function Br(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...y(t)})}function Hr(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...y(t)})}var Bs={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function Hs(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...y(t)})}function Gs(e,t){return new e({type:"string",format:"date",check:"string_format",...y(t)})}function Ks(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...y(t)})}function Ws(e,t){return new e({type:"string",format:"duration",check:"string_format",...y(t)})}function qs(e,t){return new e({type:"number",checks:[],...y(t)})}function Js(e,t){return new e({type:"number",coerce:!0,checks:[],...y(t)})}function Ys(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...y(t)})}function Xs(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float32",...y(t)})}function Qs(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float64",...y(t)})}function ec(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"int32",...y(t)})}function tc(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"uint32",...y(t)})}function nc(e,t){return new e({type:"boolean",...y(t)})}function rc(e,t){return new e({type:"boolean",coerce:!0,...y(t)})}function ic(e,t){return new e({type:"bigint",...y(t)})}function oc(e,t){return new e({type:"bigint",coerce:!0,...y(t)})}function ac(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...y(t)})}function sc(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...y(t)})}function cc(e,t){return new e({type:"symbol",...y(t)})}function uc(e,t){return new e({type:"undefined",...y(t)})}function lc(e,t){return new e({type:"null",...y(t)})}function dc(e){return new e({type:"any"})}function mc(e){return new e({type:"unknown"})}function pc(e,t){return new e({type:"never",...y(t)})}function fc(e,t){return new e({type:"void",...y(t)})}function gc(e,t){return new e({type:"date",...y(t)})}function hc(e,t){return new e({type:"date",coerce:!0,...y(t)})}function _c(e,t){return new e({type:"nan",...y(t)})}function ye(e,t){return new lr({check:"less_than",...y(t),value:e,inclusive:!1})}function oe(e,t){return new lr({check:"less_than",...y(t),value:e,inclusive:!0})}function xe(e,t){return new dr({check:"greater_than",...y(t),value:e,inclusive:!1})}function Y(e,t){return new dr({check:"greater_than",...y(t),value:e,inclusive:!0})}function Gr(e){return xe(0,e)}function Kr(e){return ye(0,e)}function Wr(e){return oe(0,e)}function qr(e){return Y(0,e)}function Ue(e,t){return new la({check:"multiple_of",...y(t),value:e})}function je(e,t){return new pa({check:"max_size",...y(t),maximum:e})}function ke(e,t){return new fa({check:"min_size",...y(t),minimum:e})}function Je(e,t){return new ga({check:"size_equals",...y(t),size:e})}function Ye(e,t){return new ha({check:"max_length",...y(t),maximum:e})}function Oe(e,t){return new _a({check:"min_length",...y(t),minimum:e})}function Xe(e,t){return new va({check:"length_equals",...y(t),length:e})}function _t(e,t){return new ba({check:"string_format",format:"regex",...y(t),pattern:e})}function vt(e){return new ya({check:"string_format",format:"lowercase",...y(e)})}function bt(e){return new xa({check:"string_format",format:"uppercase",...y(e)})}function yt(e,t){return new ka({check:"string_format",format:"includes",...y(t),includes:e})}function xt(e,t){return new Sa({check:"string_format",format:"starts_with",...y(t),prefix:e})}function kt(e,t){return new $a({check:"string_format",format:"ends_with",...y(t),suffix:e})}function Jr(e,t,r){return new Ia({check:"property",property:e,schema:t,...y(r)})}function St(e,t){return new Ea({check:"mime_type",mime:e,...y(t)})}function me(e){return new wa({check:"overwrite",tx:e})}function $t(e){return me(t=>t.normalize(e))}function It(){return me(e=>e.trim())}function Et(){return me(e=>e.toLowerCase())}function wt(){return me(e=>e.toUpperCase())}function Ot(){return me(e=>So(e))}function vc(e,t,r){return new e({type:"array",element:t,...y(r)})}function fy(e,t,r){return new e({type:"union",options:t,...y(r)})}function gy(e,t,r){return new e({type:"union",options:t,inclusive:!1,...y(r)})}function hy(e,t,r,o){return new e({type:"union",options:r,discriminator:t,...y(o)})}function _y(e,t,r){return new e({type:"intersection",left:t,right:r})}function vy(e,t,r,o){let n=r instanceof $,i=n?o:r,s=n?r:null;return new e({type:"tuple",items:t,rest:s,...y(i)})}function by(e,t,r,o){return new e({type:"record",keyType:t,valueType:r,...y(o)})}function yy(e,t,r,o){return new e({type:"map",keyType:t,valueType:r,...y(o)})}function xy(e,t,r){return new e({type:"set",valueType:t,...y(r)})}function ky(e,t,r){let o=Array.isArray(t)?Object.fromEntries(t.map(n=>[n,n])):t;return new e({type:"enum",entries:o,...y(r)})}function Sy(e,t,r){return new e({type:"enum",entries:t,...y(r)})}function $y(e,t,r){return new e({type:"literal",values:Array.isArray(t)?t:[t],...y(r)})}function bc(e,t){return new e({type:"file",...y(t)})}function Iy(e,t){return new e({type:"transform",transform:t})}function Ey(e,t){return new e({type:"optional",innerType:t})}function wy(e,t){return new e({type:"nullable",innerType:t})}function Oy(e,t,r){return new e({type:"default",innerType:t,get defaultValue(){return typeof r=="function"?r():Io(r)}})}function Ty(e,t,r){return new e({type:"nonoptional",innerType:t,...y(r)})}function Ay(e,t){return new e({type:"success",innerType:t})}function Py(e,t,r){return new e({type:"catch",innerType:t,catchValue:typeof r=="function"?r:()=>r})}function Cy(e,t,r){return new e({type:"pipe",in:t,out:r})}function Ny(e,t){return new e({type:"readonly",innerType:t})}function Ry(e,t,r){return new e({type:"template_literal",parts:t,...y(r)})}function Dy(e,t){return new e({type:"lazy",getter:t})}function zy(e,t){return new e({type:"promise",innerType:t})}function yc(e,t,r){let o=y(r);return o.abort??(o.abort=!0),new e({type:"custom",check:"custom",fn:t,...o})}function xc(e,t,r){return new e({type:"custom",check:"custom",fn:t,...y(r)})}function kc(e,t){let r=$p(o=>(o.addIssue=n=>{if(typeof n=="string")o.issues.push(lt(n,o.value,r._zod.def));else{let i=n;i.fatal&&(i.continue=!1),i.code??(i.code="custom"),i.input??(i.input=o.value),i.inst??(i.inst=r),i.continue??(i.continue=!r._zod.def.abort),o.issues.push(lt(i))}},e(o.value,o)),t);return r}function $p(e,t){let r=new U({check:"custom",...y(t)});return r._zod.check=e,r}function Sc(e){let t=new U({check:"describe"});return t._zod.onattach=[r=>{let o=G.get(r)??{};G.add(r,{...o,description:e})}],t._zod.check=()=>{},t}function $c(e){let t=new U({check:"meta"});return t._zod.onattach=[r=>{let o=G.get(r)??{};G.add(r,{...o,...e})}],t._zod.check=()=>{},t}function Ic(e,t){let r=y(t),o=r.truthy??["true","1","yes","on","y","enabled"],n=r.falsy??["false","0","no","off","n","disabled"];r.case!=="sensitive"&&(o=o.map(h=>typeof h=="string"?h.toLowerCase():h),n=n.map(h=>typeof h=="string"?h.toLowerCase():h));let i=new Set(o),s=new Set(n),c=e.Codec??gn,u=e.Boolean??pn,l=e.String??qe,d=new l({type:"string",error:r.error}),m=new u({type:"boolean",error:r.error}),g=new c({type:"pipe",in:d,out:m,transform:((h,S)=>{let R=h;return r.case!=="sensitive"&&(R=R.toLowerCase()),i.has(R)?!0:s.has(R)?!1:(S.issues.push({code:"invalid_value",expected:"stringbool",values:[...i,...s],input:S.value,inst:g,continue:!1}),{})}),reverseTransform:((h,S)=>h===!0?o[0]||"true":n[0]||"false"),error:r.error});return g}function Tt(e,t,r,o={}){let n=y(o),i={...y(o),check:"string_format",type:"string",format:t,fn:typeof r=="function"?r:c=>r.test(c),...n};return r instanceof RegExp&&(i.pattern=r),new e(i)}function Le(e){let t=e?.target??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??G,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function C(e,t,r={path:[],schemaPath:[]}){var o;let n=e._zod.def,i=t.seen.get(e);if(i)return i.count++,r.schemaPath.includes(e)&&(i.cycle=r.path),i.schema;let s={schema:{},count:1,cycle:void 0,path:r.path};t.seen.set(e,s);let c=e._zod.toJSONSchema?.();if(c)s.schema=c;else{let d={...r,schemaPath:[...r.schemaPath,e],path:r.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,s.schema,d);else{let g=s.schema,h=t.processors[n.type];if(!h)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${n.type}`);h(e,t,g,d)}let m=e._zod.parent;m&&(s.ref||(s.ref=m),C(m,t,d),t.seen.get(m).isParent=!0)}let u=t.metadataRegistry.get(e);return u&&Object.assign(s.schema,u),t.io==="input"&&X(e)&&(delete s.schema.examples,delete s.schema.default),t.io==="input"&&"_prefault"in s.schema&&((o=s.schema).default??(o.default=s.schema._prefault)),delete s.schema._prefault,t.seen.get(e).schema}function Fe(e,t){let r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");let o=new Map;for(let s of e.seen.entries()){let c=e.metadataRegistry.get(s[0])?.id;if(c){let u=o.get(c);if(u&&u!==s[0])throw new Error(`Duplicate schema id "${c}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);o.set(c,s[0])}}let n=s=>{let c=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){let m=e.external.registry.get(s[0])?.id,g=e.external.uri??(S=>S);if(m)return{ref:g(m)};let h=s[1].defId??s[1].schema.id??`schema${e.counter++}`;return s[1].defId=h,{defId:h,ref:`${g("__shared")}#/${c}/${h}`}}if(s[1]===r)return{ref:"#"};let l=`#/${c}/`,d=s[1].schema.id??`__schema${e.counter++}`;return{defId:d,ref:l+d}},i=s=>{if(s[1].schema.$ref)return;let c=s[1],{ref:u,defId:l}=n(s);c.def={...c.schema},l&&(c.defId=l);let d=c.schema;for(let m in d)delete d[m];d.$ref=u};if(e.cycles==="throw")for(let s of e.seen.entries()){let c=s[1];if(c.cycle)throw new Error(`Cycle detected: #/${c.cycle?.join("/")}/<root>
96
96
 
97
- Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let s of e.seen.entries()){let c=s[1];if(t===s[0]){i(s);continue}if(e.external){let l=e.external.registry.get(s[0])?.id;if(t!==s[0]&&l){i(s);continue}}if(e.metadataRegistry.get(s[0])?.id){i(s);continue}if(c.cycle){i(s);continue}if(c.count>1&&e.reused==="ref"){i(s);continue}}}function Ue(e,t){let r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");let o=c=>{let u=e.seen.get(c);if(u.ref===null)return;let l=u.def??u.schema,d={...l},m=u.ref;if(u.ref=null,m){o(m);let h=e.seen.get(m),S=h.schema;if(S.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(l.allOf=l.allOf??[],l.allOf.push(S)):Object.assign(l,S),Object.assign(l,d),c._zod.parent===m)for(let A in l)A==="$ref"||A==="allOf"||A in d||delete l[A];if(S.$ref&&h.def)for(let A in l)A==="$ref"||A==="allOf"||A in h.def&&JSON.stringify(l[A])===JSON.stringify(h.def[A])&&delete l[A]}let g=c._zod.parent;if(g&&g!==m){o(g);let h=e.seen.get(g);if(h?.schema.$ref&&(l.$ref=h.schema.$ref,h.def))for(let S in l)S==="$ref"||S==="allOf"||S in h.def&&JSON.stringify(l[S])===JSON.stringify(h.def[S])&&delete l[S]}e.override({zodSchema:c,jsonSchema:l,path:u.path??[]})};for(let c of[...e.seen.entries()].reverse())o(c[0]);let n={};if(e.target==="draft-2020-12"?n.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?n.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?n.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){let c=e.external.registry.get(t)?.id;if(!c)throw new Error("Schema is missing an `id` property");n.$id=e.external.uri(c)}Object.assign(n,r.def??r.schema);let i=e.metadataRegistry.get(t)?.id;i!==void 0&&n.id===i&&delete n.id;let s=e.external?.defs??{};for(let c of e.seen.entries()){let u=c[1];u.def&&u.defId&&(u.def.id===u.defId&&delete u.def.id,s[u.defId]=u.def)}e.external||Object.keys(s).length>0&&(e.target==="draft-2020-12"?n.$defs=s:n.definitions=s);try{let c=JSON.parse(JSON.stringify(n));return Object.defineProperty(c,"~standard",{value:{...t["~standard"],jsonSchema:{input:Et(t,"input",e.processors),output:Et(t,"output",e.processors)}},enumerable:!1,writable:!1}),c}catch{throw new Error("Error converting schema to JSON.")}}function J(e,t){let r=t??{seen:new Set};if(r.seen.has(e))return!1;r.seen.add(e);let o=e._zod.def;if(o.type==="transform")return!0;if(o.type==="array")return J(o.element,r);if(o.type==="set")return J(o.valueType,r);if(o.type==="lazy")return J(o.getter(),r);if(o.type==="promise"||o.type==="optional"||o.type==="nonoptional"||o.type==="nullable"||o.type==="readonly"||o.type==="default"||o.type==="prefault")return J(o.innerType,r);if(o.type==="intersection")return J(o.left,r)||J(o.right,r);if(o.type==="record"||o.type==="map")return J(o.keyType,r)||J(o.valueType,r);if(o.type==="pipe")return e._zod.traits.has("$ZodCodec")?!0:J(o.in,r)||J(o.out,r);if(o.type==="object"){for(let n in o.shape)if(J(o.shape[n],r))return!0;return!1}if(o.type==="union"){for(let n of o.options)if(J(n,r))return!0;return!1}if(o.type==="tuple"){for(let n of o.items)if(J(n,r))return!0;return!!(o.rest&&J(o.rest,r))}return!1}var xc=(e,t={})=>r=>{let o=De({...r,processors:t});return N(e,o),ze(o,e),Ue(o,e)},Et=(e,t,r={})=>o=>{let{libraryOptions:n,target:i}=o??{},s=De({...n??{},target:i,io:t,processors:r});return N(e,s),ze(s,e),Ue(s,e)};var Sy={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},kc=(e,t,r,o)=>{let n=r;n.type="string";let{minimum:i,maximum:s,format:c,patterns:u,contentEncoding:l}=e._zod.bag;if(typeof i=="number"&&(n.minLength=i),typeof s=="number"&&(n.maxLength=s),c&&(n.format=Sy[c]??c,n.format===""&&delete n.format,c==="time"&&delete n.format),l&&(n.contentEncoding=l),u&&u.size>0){let d=[...u];d.length===1?n.pattern=d[0].source:d.length>1&&(n.allOf=[...d.map(m=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:m.source}))])}},Sc=(e,t,r,o)=>{let n=r,{minimum:i,maximum:s,format:c,multipleOf:u,exclusiveMaximum:l,exclusiveMinimum:d}=e._zod.bag;typeof c=="string"&&c.includes("int")?n.type="integer":n.type="number";let m=typeof d=="number"&&d>=(i??Number.NEGATIVE_INFINITY),g=typeof l=="number"&&l<=(s??Number.POSITIVE_INFINITY),h=t.target==="draft-04"||t.target==="openapi-3.0";m?h?(n.minimum=d,n.exclusiveMinimum=!0):n.exclusiveMinimum=d:typeof i=="number"&&(n.minimum=i),g?h?(n.maximum=l,n.exclusiveMaximum=!0):n.exclusiveMaximum=l:typeof s=="number"&&(n.maximum=s),typeof u=="number"&&(n.multipleOf=u)},$c=(e,t,r,o)=>{r.type="boolean"},Ic=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema")},Ec=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema")},wc=(e,t,r,o)=>{t.target==="openapi-3.0"?(r.type="string",r.nullable=!0,r.enum=[null]):r.type="null"},Oc=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema")},Tc=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema")},Pc=(e,t,r,o)=>{r.not={}},Ac=(e,t,r,o)=>{},Nc=(e,t,r,o)=>{},Cc=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},Rc=(e,t,r,o)=>{let n=e._zod.def,i=Qt(n.entries);i.every(s=>typeof s=="number")&&(r.type="number"),i.every(s=>typeof s=="string")&&(r.type="string"),r.enum=i},Dc=(e,t,r,o)=>{let n=e._zod.def,i=[];for(let s of n.values)if(s===void 0){if(t.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof s=="bigint"){if(t.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");i.push(Number(s))}else i.push(s);if(i.length!==0)if(i.length===1){let s=i[0];r.type=s===null?"null":typeof s,t.target==="draft-04"||t.target==="openapi-3.0"?r.enum=[s]:r.const=s}else i.every(s=>typeof s=="number")&&(r.type="number"),i.every(s=>typeof s=="string")&&(r.type="string"),i.every(s=>typeof s=="boolean")&&(r.type="boolean"),i.every(s=>s===null)&&(r.type="null"),r.enum=i},zc=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema")},Uc=(e,t,r,o)=>{let n=r,i=e._zod.pattern;if(!i)throw new Error("Pattern not found in template literal");n.type="string",n.pattern=i.source},jc=(e,t,r,o)=>{let n=r,i={type:"string",format:"binary",contentEncoding:"binary"},{minimum:s,maximum:c,mime:u}=e._zod.bag;s!==void 0&&(i.minLength=s),c!==void 0&&(i.maxLength=c),u?u.length===1?(i.contentMediaType=u[0],Object.assign(n,i)):(Object.assign(n,i),n.anyOf=u.map(l=>({contentMediaType:l}))):Object.assign(n,i)},Lc=(e,t,r,o)=>{r.type="boolean"},Mc=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},Fc=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema")},Zc=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},Vc=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema")},Bc=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema")},Hc=(e,t,r,o)=>{let n=r,i=e._zod.def,{minimum:s,maximum:c}=e._zod.bag;typeof s=="number"&&(n.minItems=s),typeof c=="number"&&(n.maxItems=c),n.type="array",n.items=N(i.element,t,{...o,path:[...o.path,"items"]})},Gc=(e,t,r,o)=>{let n=r,i=e._zod.def;n.type="object",n.properties={};let s=i.shape;for(let l in s)n.properties[l]=N(s[l],t,{...o,path:[...o.path,"properties",l]});let c=new Set(Object.keys(s)),u=new Set([...c].filter(l=>{let d=i.shape[l]._zod;return t.io==="input"?d.optin===void 0:d.optout===void 0}));u.size>0&&(n.required=Array.from(u)),i.catchall?._zod.def.type==="never"?n.additionalProperties=!1:i.catchall?i.catchall&&(n.additionalProperties=N(i.catchall,t,{...o,path:[...o.path,"additionalProperties"]})):t.io==="output"&&(n.additionalProperties=!1)},Jr=(e,t,r,o)=>{let n=e._zod.def,i=n.inclusive===!1,s=n.options.map((c,u)=>N(c,t,{...o,path:[...o.path,i?"oneOf":"anyOf",u]}));i?r.oneOf=s:r.anyOf=s},Kc=(e,t,r,o)=>{let n=e._zod.def,i=N(n.left,t,{...o,path:[...o.path,"allOf",0]}),s=N(n.right,t,{...o,path:[...o.path,"allOf",1]}),c=l=>"allOf"in l&&Object.keys(l).length===1,u=[...c(i)?i.allOf:[i],...c(s)?s.allOf:[s]];r.allOf=u},Wc=(e,t,r,o)=>{let n=r,i=e._zod.def;n.type="array";let s=t.target==="draft-2020-12"?"prefixItems":"items",c=t.target==="draft-2020-12"||t.target==="openapi-3.0"?"items":"additionalItems",u=i.items.map((g,h)=>N(g,t,{...o,path:[...o.path,s,h]})),l=i.rest?N(i.rest,t,{...o,path:[...o.path,c,...t.target==="openapi-3.0"?[i.items.length]:[]]}):null;t.target==="draft-2020-12"?(n.prefixItems=u,l&&(n.items=l)):t.target==="openapi-3.0"?(n.items={anyOf:u},l&&n.items.anyOf.push(l),n.minItems=u.length,l||(n.maxItems=u.length)):(n.items=u,l&&(n.additionalItems=l));let{minimum:d,maximum:m}=e._zod.bag;typeof d=="number"&&(n.minItems=d),typeof m=="number"&&(n.maxItems=m)},qc=(e,t,r,o)=>{let n=r,i=e._zod.def;n.type="object";let s=i.keyType,u=s._zod.bag?.patterns;if(i.mode==="loose"&&u&&u.size>0){let d=N(i.valueType,t,{...o,path:[...o.path,"patternProperties","*"]});n.patternProperties={};for(let m of u)n.patternProperties[m.source]=d}else(t.target==="draft-07"||t.target==="draft-2020-12")&&(n.propertyNames=N(i.keyType,t,{...o,path:[...o.path,"propertyNames"]})),n.additionalProperties=N(i.valueType,t,{...o,path:[...o.path,"additionalProperties"]});let l=s._zod.values;if(l){let d=[...l].filter(m=>typeof m=="string"||typeof m=="number");d.length>0&&(n.required=d)}},Jc=(e,t,r,o)=>{let n=e._zod.def,i=N(n.innerType,t,o),s=t.seen.get(e);t.target==="openapi-3.0"?(s.ref=n.innerType,r.nullable=!0):r.anyOf=[i,{type:"null"}]},Yc=(e,t,r,o)=>{let n=e._zod.def;N(n.innerType,t,o);let i=t.seen.get(e);i.ref=n.innerType},Xc=(e,t,r,o)=>{let n=e._zod.def;N(n.innerType,t,o);let i=t.seen.get(e);i.ref=n.innerType,r.default=JSON.parse(JSON.stringify(n.defaultValue))},Qc=(e,t,r,o)=>{let n=e._zod.def;N(n.innerType,t,o);let i=t.seen.get(e);i.ref=n.innerType,t.io==="input"&&(r._prefault=JSON.parse(JSON.stringify(n.defaultValue)))},eu=(e,t,r,o)=>{let n=e._zod.def;N(n.innerType,t,o);let i=t.seen.get(e);i.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},tu=(e,t,r,o)=>{let n=e._zod.def,i=n.in._zod.traits.has("$ZodTransform"),s=t.io==="input"?i?n.out:n.in:n.out;N(s,t,o);let c=t.seen.get(e);c.ref=s},nu=(e,t,r,o)=>{let n=e._zod.def;N(n.innerType,t,o);let i=t.seen.get(e);i.ref=n.innerType,r.readOnly=!0},ru=(e,t,r,o)=>{let n=e._zod.def;N(n.innerType,t,o);let i=t.seen.get(e);i.ref=n.innerType},Yr=(e,t,r,o)=>{let n=e._zod.def;N(n.innerType,t,o);let i=t.seen.get(e);i.ref=n.innerType},iu=(e,t,r,o)=>{let n=e._zod.innerType;N(n,t,o);let i=t.seen.get(e);i.ref=n},qr={string:kc,number:Sc,boolean:$c,bigint:Ic,symbol:Ec,null:wc,undefined:Oc,void:Tc,never:Pc,any:Ac,unknown:Nc,date:Cc,enum:Rc,literal:Dc,nan:zc,template_literal:Uc,file:jc,success:Lc,custom:Mc,function:Fc,transform:Zc,map:Vc,set:Bc,array:Hc,object:Gc,union:Jr,intersection:Kc,tuple:Wc,record:qc,nullable:Jc,nonoptional:Yc,default:Xc,prefault:Qc,catch:eu,pipe:tu,readonly:nu,promise:ru,optional:Yr,lazy:iu};function Xr(e,t){if("_idmap"in e){let o=e,n=De({...t,processors:qr}),i={};for(let u of o._idmap.entries()){let[l,d]=u;N(d,n)}let s={},c={registry:o,uri:t?.uri,defs:i};n.external=c;for(let u of o._idmap.entries()){let[l,d]=u;ze(n,d),s[l]=Ue(n,d)}if(Object.keys(i).length>0){let u=n.target==="draft-2020-12"?"$defs":"definitions";s.__shared={[u]:i}}return{schemas:s}}let r=De({...t,processors:qr});return N(e,r),ze(r,e),Ue(r,e)}var Qr=class{get metadataRegistry(){return this.ctx.metadataRegistry}get target(){return this.ctx.target}get unrepresentable(){return this.ctx.unrepresentable}get override(){return this.ctx.override}get io(){return this.ctx.io}get counter(){return this.ctx.counter}set counter(t){this.ctx.counter=t}get seen(){return this.ctx.seen}constructor(t){let r=t?.target??"draft-2020-12";r==="draft-4"&&(r="draft-04"),r==="draft-7"&&(r="draft-07"),this.ctx=De({processors:qr,target:r,...t?.metadata&&{metadata:t.metadata},...t?.unrepresentable&&{unrepresentable:t.unrepresentable},...t?.override&&{override:t.override},...t?.io&&{io:t.io}})}process(t,r={path:[],schemaPath:[]}){return N(t,this.ctx,r)}emit(t,r){r&&(r.cycles&&(this.ctx.cycles=r.cycles),r.reused&&(this.ctx.reused=r.reused),r.external&&(this.ctx.external=r.external)),ze(this.ctx,t);let o=Ue(this.ctx,t),{"~standard":n,...i}=o;return i}};var vp={};var vn={};ye(vn,{ZodAny:()=>Ou,ZodArray:()=>Nu,ZodBase64:()=>yi,ZodBase64URL:()=>xi,ZodBigInt:()=>Rt,ZodBigIntFormat:()=>$i,ZodBoolean:()=>Ct,ZodCIDRv4:()=>vi,ZodCIDRv6:()=>bi,ZodCUID:()=>di,ZodCUID2:()=>mi,ZodCatch:()=>el,ZodCodec:()=>Pn,ZodCustom:()=>An,ZodCustomStringFormat:()=>At,ZodDate:()=>In,ZodDefault:()=>Wu,ZodDiscriminatedUnion:()=>Ru,ZodE164:()=>ki,ZodEmail:()=>ci,ZodEmoji:()=>ui,ZodEnum:()=>Tt,ZodExactOptional:()=>Hu,ZodFile:()=>Vu,ZodFunction:()=>ll,ZodGUID:()=>yn,ZodIPv4:()=>hi,ZodIPv6:()=>_i,ZodIntersection:()=>Du,ZodJWT:()=>Si,ZodKSUID:()=>gi,ZodLazy:()=>sl,ZodLiteral:()=>Zu,ZodMAC:()=>xu,ZodMap:()=>Mu,ZodNaN:()=>nl,ZodNanoID:()=>li,ZodNever:()=>Pu,ZodNonOptional:()=>Pi,ZodNull:()=>Eu,ZodNullable:()=>Ku,ZodNumber:()=>Nt,ZodNumberFormat:()=>Ye,ZodObject:()=>wn,ZodOptional:()=>Ti,ZodPipe:()=>Tn,ZodPrefault:()=>Ju,ZodPreprocess:()=>rl,ZodPromise:()=>ul,ZodReadonly:()=>il,ZodRecord:()=>Ot,ZodSet:()=>Fu,ZodString:()=>Pt,ZodStringFormat:()=>D,ZodSuccess:()=>Qu,ZodSymbol:()=>$u,ZodTemplateLiteral:()=>al,ZodTransform:()=>Bu,ZodTuple:()=>Uu,ZodType:()=>I,ZodULID:()=>pi,ZodURL:()=>$n,ZodUUID:()=>ve,ZodUndefined:()=>Iu,ZodUnion:()=>On,ZodUnknown:()=>Tu,ZodVoid:()=>Au,ZodXID:()=>fi,ZodXor:()=>Cu,_ZodString:()=>si,_default:()=>qu,_function:()=>Of,any:()=>of,array:()=>En,base64:()=>Fp,base64url:()=>Zp,bigint:()=>Qp,boolean:()=>Su,catch:()=>tl,check:()=>Tf,cidrv4:()=>Lp,cidrv6:()=>Mp,codec:()=>$f,cuid:()=>Ap,cuid2:()=>Np,custom:()=>Pf,date:()=>sf,describe:()=>Af,discriminatedUnion:()=>pf,e164:()=>Vp,email:()=>xp,emoji:()=>Tp,enum:()=>wi,exactOptional:()=>Gu,file:()=>yf,float32:()=>qp,float64:()=>Jp,function:()=>Of,guid:()=>kp,hash:()=>Wp,hex:()=>Kp,hostname:()=>Gp,httpUrl:()=>Op,instanceof:()=>Cf,int:()=>oi,int32:()=>Yp,int64:()=>ef,intersection:()=>zu,invertCodec:()=>If,ipv4:()=>zp,ipv6:()=>jp,json:()=>Df,jwt:()=>Bp,keyof:()=>cf,ksuid:()=>Dp,lazy:()=>cl,literal:()=>bf,looseObject:()=>df,looseRecord:()=>gf,mac:()=>Up,map:()=>hf,meta:()=>Nf,nan:()=>Sf,nanoid:()=>Pp,nativeEnum:()=>vf,never:()=>Ii,nonoptional:()=>Xu,null:()=>wu,nullable:()=>kn,nullish:()=>xf,number:()=>ku,object:()=>uf,optional:()=>xn,partialRecord:()=>ff,pipe:()=>ai,prefault:()=>Yu,preprocess:()=>zf,promise:()=>wf,readonly:()=>ol,record:()=>Lu,refine:()=>dl,set:()=>_f,strictObject:()=>lf,string:()=>bn,stringFormat:()=>Hp,stringbool:()=>Rf,success:()=>kf,superRefine:()=>ml,symbol:()=>nf,templateLiteral:()=>Ef,transform:()=>Oi,tuple:()=>ju,uint32:()=>Xp,uint64:()=>tf,ulid:()=>Cp,undefined:()=>rf,union:()=>Ei,unknown:()=>Je,url:()=>wp,uuid:()=>Sp,uuidv4:()=>$p,uuidv6:()=>Ip,uuidv7:()=>Ep,void:()=>af,xid:()=>Rp,xor:()=>mf});var ei={};ye(ei,{endsWith:()=>vt,gt:()=>he,gte:()=>q,includes:()=>ht,length:()=>qe,lowercase:()=>ft,lt:()=>ge,lte:()=>ne,maxLength:()=>We,maxSize:()=>Re,mime:()=>bt,minLength:()=>$e,minSize:()=>_e,multipleOf:()=>Ce,negative:()=>Hr,nonnegative:()=>Kr,nonpositive:()=>Gr,normalize:()=>yt,overwrite:()=>ce,positive:()=>Br,property:()=>Wr,regex:()=>pt,size:()=>Ke,slugify:()=>$t,startsWith:()=>_t,toLowerCase:()=>kt,toUpperCase:()=>St,trim:()=>xt,uppercase:()=>gt});var wt={};ye(wt,{ZodISODate:()=>ni,ZodISODateTime:()=>ti,ZodISODuration:()=>ii,ZodISOTime:()=>ri,date:()=>au,datetime:()=>ou,duration:()=>cu,time:()=>su});var ti=p("ZodISODateTime",(e,t)=>{za.init(e,t),D.init(e,t)});function ou(e){return Ms(ti,e)}var ni=p("ZodISODate",(e,t)=>{Ua.init(e,t),D.init(e,t)});function au(e){return Fs(ni,e)}var ri=p("ZodISOTime",(e,t)=>{ja.init(e,t),D.init(e,t)});function su(e){return Zs(ri,e)}var ii=p("ZodISODuration",(e,t)=>{La.init(e,t),D.init(e,t)});function cu(e){return Vs(ii,e)}var bp=(e,t)=>{on.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:r=>sn(e,r)},flatten:{value:r=>an(e,r)},addIssue:{value:r=>{e.issues.push(r),e.message=JSON.stringify(e.issues,it,2)}},addIssues:{value:r=>{e.issues.push(...r),e.message=JSON.stringify(e.issues,it,2)}},isEmpty:{get(){return e.issues.length===0}}})},Iy=p("ZodError",bp),Q=p("ZodError",bp,{Parent:Error});var uu=st(Q),lu=ct(Q),du=ut(Q),mu=lt(Q),pu=Xn(Q),fu=Qn(Q),gu=er(Q),hu=tr(Q),_u=nr(Q),vu=rr(Q),bu=ir(Q),yu=or(Q);var yp=new WeakMap;function Sn(e,t,r){let o=Object.getPrototypeOf(e),n=yp.get(o);if(n||(n=new Set,yp.set(o,n)),!n.has(t)){n.add(t);for(let i in r){let s=r[i];Object.defineProperty(o,i,{configurable:!0,enumerable:!1,get(){let c=s.bind(this);return Object.defineProperty(this,i,{configurable:!0,writable:!0,enumerable:!0,value:c}),c},set(c){Object.defineProperty(this,i,{configurable:!0,writable:!0,enumerable:!0,value:c})}})}}}var I=p("ZodType",(e,t)=>($.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:Et(e,"input"),output:Et(e,"output")}}),e.toJSONSchema=xc(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(r,o)=>uu(e,r,o,{callee:e.parse}),e.safeParse=(r,o)=>du(e,r,o),e.parseAsync=async(r,o)=>lu(e,r,o,{callee:e.parseAsync}),e.safeParseAsync=async(r,o)=>mu(e,r,o),e.spa=e.safeParseAsync,e.encode=(r,o)=>pu(e,r,o),e.decode=(r,o)=>fu(e,r,o),e.encodeAsync=async(r,o)=>gu(e,r,o),e.decodeAsync=async(r,o)=>hu(e,r,o),e.safeEncode=(r,o)=>_u(e,r,o),e.safeDecode=(r,o)=>vu(e,r,o),e.safeEncodeAsync=async(r,o)=>bu(e,r,o),e.safeDecodeAsync=async(r,o)=>yu(e,r,o),Sn(e,"ZodType",{check(...r){let o=this.def;return this.clone(b.mergeDefs(o,{checks:[...o.checks??[],...r.map(n=>typeof n=="function"?{_zod:{check:n,def:{check:"custom"},onattach:[]}}:n)]}),{parent:!0})},with(...r){return this.check(...r)},clone(r,o){return K(this,r,o)},brand(){return this},register(r,o){return r.add(this,o),this},refine(r,o){return this.check(dl(r,o))},superRefine(r,o){return this.check(ml(r,o))},overwrite(r){return this.check(ce(r))},optional(){return xn(this)},exactOptional(){return Gu(this)},nullable(){return kn(this)},nullish(){return xn(kn(this))},nonoptional(r){return Xu(this,r)},array(){return En(this)},or(r){return Ei([this,r])},and(r){return zu(this,r)},transform(r){return ai(this,Oi(r))},default(r){return qu(this,r)},prefault(r){return Yu(this,r)},catch(r){return tl(this,r)},pipe(r){return ai(this,r)},readonly(){return ol(this)},describe(r){let o=this.clone();return B.add(o,{description:r}),o},meta(...r){if(r.length===0)return B.get(this);let o=this.clone();return B.add(o,r[0]),o},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(r){return r(this)}}),Object.defineProperty(e,"description",{get(){return B.get(e)?.description},configurable:!0}),e)),si=p("_ZodString",(e,t)=>{Ge.init(e,t),I.init(e,t),e._zod.processJSONSchema=(o,n,i)=>kc(e,o,n,i);let r=e._zod.bag;e.format=r.format??null,e.minLength=r.minimum??null,e.maxLength=r.maximum??null,Sn(e,"_ZodString",{regex(...o){return this.check(pt(...o))},includes(...o){return this.check(ht(...o))},startsWith(...o){return this.check(_t(...o))},endsWith(...o){return this.check(vt(...o))},min(...o){return this.check($e(...o))},max(...o){return this.check(We(...o))},length(...o){return this.check(qe(...o))},nonempty(...o){return this.check($e(1,...o))},lowercase(o){return this.check(ft(o))},uppercase(o){return this.check(gt(o))},trim(){return this.check(xt())},normalize(...o){return this.check(yt(...o))},toLowerCase(){return this.check(kt())},toUpperCase(){return this.check(St())},slugify(){return this.check($t())}})}),Pt=p("ZodString",(e,t)=>{Ge.init(e,t),si.init(e,t),e.email=r=>e.check($r(ci,r)),e.url=r=>e.check(_n($n,r)),e.jwt=r=>e.check(Vr(Si,r)),e.emoji=r=>e.check(Tr(ui,r)),e.guid=r=>e.check(hn(yn,r)),e.uuid=r=>e.check(Ir(ve,r)),e.uuidv4=r=>e.check(Er(ve,r)),e.uuidv6=r=>e.check(wr(ve,r)),e.uuidv7=r=>e.check(Or(ve,r)),e.nanoid=r=>e.check(Pr(li,r)),e.guid=r=>e.check(hn(yn,r)),e.cuid=r=>e.check(Ar(di,r)),e.cuid2=r=>e.check(Nr(mi,r)),e.ulid=r=>e.check(Cr(pi,r)),e.base64=r=>e.check(Mr(yi,r)),e.base64url=r=>e.check(Fr(xi,r)),e.xid=r=>e.check(Rr(fi,r)),e.ksuid=r=>e.check(Dr(gi,r)),e.ipv4=r=>e.check(zr(hi,r)),e.ipv6=r=>e.check(Ur(_i,r)),e.cidrv4=r=>e.check(jr(vi,r)),e.cidrv6=r=>e.check(Lr(bi,r)),e.e164=r=>e.check(Zr(ki,r)),e.datetime=r=>e.check(ou(r)),e.date=r=>e.check(au(r)),e.time=r=>e.check(su(r)),e.duration=r=>e.check(cu(r))});function bn(e){return zs(Pt,e)}var D=p("ZodStringFormat",(e,t)=>{R.init(e,t),si.init(e,t)}),ci=p("ZodEmail",(e,t)=>{wa.init(e,t),D.init(e,t)});function xp(e){return $r(ci,e)}var yn=p("ZodGUID",(e,t)=>{Ia.init(e,t),D.init(e,t)});function kp(e){return hn(yn,e)}var ve=p("ZodUUID",(e,t)=>{Ea.init(e,t),D.init(e,t)});function Sp(e){return Ir(ve,e)}function $p(e){return Er(ve,e)}function Ip(e){return wr(ve,e)}function Ep(e){return Or(ve,e)}var $n=p("ZodURL",(e,t)=>{Oa.init(e,t),D.init(e,t)});function wp(e){return _n($n,e)}function Op(e){return _n($n,{protocol:te.httpProtocol,hostname:te.domain,...b.normalizeParams(e)})}var ui=p("ZodEmoji",(e,t)=>{Ta.init(e,t),D.init(e,t)});function Tp(e){return Tr(ui,e)}var li=p("ZodNanoID",(e,t)=>{Pa.init(e,t),D.init(e,t)});function Pp(e){return Pr(li,e)}var di=p("ZodCUID",(e,t)=>{Aa.init(e,t),D.init(e,t)});function Ap(e){return Ar(di,e)}var mi=p("ZodCUID2",(e,t)=>{Na.init(e,t),D.init(e,t)});function Np(e){return Nr(mi,e)}var pi=p("ZodULID",(e,t)=>{Ca.init(e,t),D.init(e,t)});function Cp(e){return Cr(pi,e)}var fi=p("ZodXID",(e,t)=>{Ra.init(e,t),D.init(e,t)});function Rp(e){return Rr(fi,e)}var gi=p("ZodKSUID",(e,t)=>{Da.init(e,t),D.init(e,t)});function Dp(e){return Dr(gi,e)}var hi=p("ZodIPv4",(e,t)=>{Ma.init(e,t),D.init(e,t)});function zp(e){return zr(hi,e)}var xu=p("ZodMAC",(e,t)=>{Za.init(e,t),D.init(e,t)});function Up(e){return js(xu,e)}var _i=p("ZodIPv6",(e,t)=>{Fa.init(e,t),D.init(e,t)});function jp(e){return Ur(_i,e)}var vi=p("ZodCIDRv4",(e,t)=>{Va.init(e,t),D.init(e,t)});function Lp(e){return jr(vi,e)}var bi=p("ZodCIDRv6",(e,t)=>{Ba.init(e,t),D.init(e,t)});function Mp(e){return Lr(bi,e)}var yi=p("ZodBase64",(e,t)=>{Ga.init(e,t),D.init(e,t)});function Fp(e){return Mr(yi,e)}var xi=p("ZodBase64URL",(e,t)=>{Ka.init(e,t),D.init(e,t)});function Zp(e){return Fr(xi,e)}var ki=p("ZodE164",(e,t)=>{Wa.init(e,t),D.init(e,t)});function Vp(e){return Zr(ki,e)}var Si=p("ZodJWT",(e,t)=>{qa.init(e,t),D.init(e,t)});function Bp(e){return Vr(Si,e)}var At=p("ZodCustomStringFormat",(e,t)=>{Ja.init(e,t),D.init(e,t)});function Hp(e,t,r={}){return It(At,e,t,r)}function Gp(e){return It(At,"hostname",te.hostname,e)}function Kp(e){return It(At,"hex",te.hex,e)}function Wp(e,t){let r=t?.enc??"hex",o=`${e}_${r}`,n=te[o];if(!n)throw new Error(`Unrecognized hash format: ${o}`);return It(At,o,n,t)}var Nt=p("ZodNumber",(e,t)=>{fr.init(e,t),I.init(e,t),e._zod.processJSONSchema=(o,n,i)=>Sc(e,o,n,i),Sn(e,"ZodNumber",{gt(o,n){return this.check(he(o,n))},gte(o,n){return this.check(q(o,n))},min(o,n){return this.check(q(o,n))},lt(o,n){return this.check(ge(o,n))},lte(o,n){return this.check(ne(o,n))},max(o,n){return this.check(ne(o,n))},int(o){return this.check(oi(o))},safe(o){return this.check(oi(o))},positive(o){return this.check(he(0,o))},nonnegative(o){return this.check(q(0,o))},negative(o){return this.check(ge(0,o))},nonpositive(o){return this.check(ne(0,o))},multipleOf(o,n){return this.check(Ce(o,n))},step(o,n){return this.check(Ce(o,n))},finite(){return this}});let r=e._zod.bag;e.minValue=Math.max(r.minimum??Number.NEGATIVE_INFINITY,r.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(r.maximum??Number.POSITIVE_INFINITY,r.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(r.format??"").includes("int")||Number.isSafeInteger(r.multipleOf??.5),e.isFinite=!0,e.format=r.format??null});function ku(e){return Bs(Nt,e)}var Ye=p("ZodNumberFormat",(e,t)=>{Ya.init(e,t),Nt.init(e,t)});function oi(e){return Gs(Ye,e)}function qp(e){return Ks(Ye,e)}function Jp(e){return Ws(Ye,e)}function Yp(e){return qs(Ye,e)}function Xp(e){return Js(Ye,e)}var Ct=p("ZodBoolean",(e,t)=>{dn.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>$c(e,r,o,n)});function Su(e){return Ys(Ct,e)}var Rt=p("ZodBigInt",(e,t)=>{gr.init(e,t),I.init(e,t),e._zod.processJSONSchema=(o,n,i)=>Ic(e,o,n,i),e.gte=(o,n)=>e.check(q(o,n)),e.min=(o,n)=>e.check(q(o,n)),e.gt=(o,n)=>e.check(he(o,n)),e.gte=(o,n)=>e.check(q(o,n)),e.min=(o,n)=>e.check(q(o,n)),e.lt=(o,n)=>e.check(ge(o,n)),e.lte=(o,n)=>e.check(ne(o,n)),e.max=(o,n)=>e.check(ne(o,n)),e.positive=o=>e.check(he(BigInt(0),o)),e.negative=o=>e.check(ge(BigInt(0),o)),e.nonpositive=o=>e.check(ne(BigInt(0),o)),e.nonnegative=o=>e.check(q(BigInt(0),o)),e.multipleOf=(o,n)=>e.check(Ce(o,n));let r=e._zod.bag;e.minValue=r.minimum??null,e.maxValue=r.maximum??null,e.format=r.format??null});function Qp(e){return Qs(Rt,e)}var $i=p("ZodBigIntFormat",(e,t)=>{Xa.init(e,t),Rt.init(e,t)});function ef(e){return tc($i,e)}function tf(e){return nc($i,e)}var $u=p("ZodSymbol",(e,t)=>{Qa.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Ec(e,r,o,n)});function nf(e){return rc($u,e)}var Iu=p("ZodUndefined",(e,t)=>{es.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Oc(e,r,o,n)});function rf(e){return ic(Iu,e)}var Eu=p("ZodNull",(e,t)=>{ts.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>wc(e,r,o,n)});function wu(e){return oc(Eu,e)}var Ou=p("ZodAny",(e,t)=>{ns.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Ac(e,r,o,n)});function of(){return ac(Ou)}var Tu=p("ZodUnknown",(e,t)=>{rs.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Nc(e,r,o,n)});function Je(){return sc(Tu)}var Pu=p("ZodNever",(e,t)=>{is.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Pc(e,r,o,n)});function Ii(e){return cc(Pu,e)}var Au=p("ZodVoid",(e,t)=>{os.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Tc(e,r,o,n)});function af(e){return uc(Au,e)}var In=p("ZodDate",(e,t)=>{as.init(e,t),I.init(e,t),e._zod.processJSONSchema=(o,n,i)=>Cc(e,o,n,i),e.min=(o,n)=>e.check(q(o,n)),e.max=(o,n)=>e.check(ne(o,n));let r=e._zod.bag;e.minDate=r.minimum?new Date(r.minimum):null,e.maxDate=r.maximum?new Date(r.maximum):null});function sf(e){return lc(In,e)}var Nu=p("ZodArray",(e,t)=>{ss.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Hc(e,r,o,n),e.element=t.element,Sn(e,"ZodArray",{min(r,o){return this.check($e(r,o))},nonempty(r){return this.check($e(1,r))},max(r,o){return this.check(We(r,o))},length(r,o){return this.check(qe(r,o))},unwrap(){return this.element}})});function En(e,t){return pc(Nu,e,t)}function cf(e){let t=e._zod.def.shape;return wi(Object.keys(t))}var wn=p("ZodObject",(e,t)=>{cs.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Gc(e,r,o,n),b.defineLazy(e,"shape",()=>t.shape),Sn(e,"ZodObject",{keyof(){return wi(Object.keys(this._zod.def.shape))},catchall(r){return this.clone({...this._zod.def,catchall:r})},passthrough(){return this.clone({...this._zod.def,catchall:Je()})},loose(){return this.clone({...this._zod.def,catchall:Je()})},strict(){return this.clone({...this._zod.def,catchall:Ii()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(r){return b.extend(this,r)},safeExtend(r){return b.safeExtend(this,r)},merge(r){return b.merge(this,r)},pick(r){return b.pick(this,r)},omit(r){return b.omit(this,r)},partial(...r){return b.partial(Ti,this,r[0])},required(...r){return b.required(Pi,this,r[0])}})});function uf(e,t){let r={type:"object",shape:e??{},...b.normalizeParams(t)};return new wn(r)}function lf(e,t){return new wn({type:"object",shape:e,catchall:Ii(),...b.normalizeParams(t)})}function df(e,t){return new wn({type:"object",shape:e,catchall:Je(),...b.normalizeParams(t)})}var On=p("ZodUnion",(e,t)=>{mn.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Jr(e,r,o,n),e.options=t.options});function Ei(e,t){return new On({type:"union",options:e,...b.normalizeParams(t)})}var Cu=p("ZodXor",(e,t)=>{On.init(e,t),us.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Jr(e,r,o,n),e.options=t.options});function mf(e,t){return new Cu({type:"union",options:e,inclusive:!1,...b.normalizeParams(t)})}var Ru=p("ZodDiscriminatedUnion",(e,t)=>{On.init(e,t),ls.init(e,t)});function pf(e,t,r){return new Ru({type:"union",options:t,discriminator:e,...b.normalizeParams(r)})}var Du=p("ZodIntersection",(e,t)=>{ds.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Kc(e,r,o,n)});function zu(e,t){return new Du({type:"intersection",left:e,right:t})}var Uu=p("ZodTuple",(e,t)=>{hr.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Wc(e,r,o,n),e.rest=r=>e.clone({...e._zod.def,rest:r})});function ju(e,t,r){let o=t instanceof $,n=o?r:t,i=o?t:null;return new Uu({type:"tuple",items:e,rest:i,...b.normalizeParams(n)})}var Ot=p("ZodRecord",(e,t)=>{ms.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>qc(e,r,o,n),e.keyType=t.keyType,e.valueType=t.valueType});function Lu(e,t,r){return!t||!t._zod?new Ot({type:"record",keyType:bn(),valueType:e,...b.normalizeParams(t)}):new Ot({type:"record",keyType:e,valueType:t,...b.normalizeParams(r)})}function ff(e,t,r){let o=K(e);return o._zod.values=void 0,new Ot({type:"record",keyType:o,valueType:t,...b.normalizeParams(r)})}function gf(e,t,r){return new Ot({type:"record",keyType:e,valueType:t,mode:"loose",...b.normalizeParams(r)})}var Mu=p("ZodMap",(e,t)=>{ps.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Vc(e,r,o,n),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...r)=>e.check(_e(...r)),e.nonempty=r=>e.check(_e(1,r)),e.max=(...r)=>e.check(Re(...r)),e.size=(...r)=>e.check(Ke(...r))});function hf(e,t,r){return new Mu({type:"map",keyType:e,valueType:t,...b.normalizeParams(r)})}var Fu=p("ZodSet",(e,t)=>{fs.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Bc(e,r,o,n),e.min=(...r)=>e.check(_e(...r)),e.nonempty=r=>e.check(_e(1,r)),e.max=(...r)=>e.check(Re(...r)),e.size=(...r)=>e.check(Ke(...r))});function _f(e,t){return new Fu({type:"set",valueType:e,...b.normalizeParams(t)})}var Tt=p("ZodEnum",(e,t)=>{gs.init(e,t),I.init(e,t),e._zod.processJSONSchema=(o,n,i)=>Rc(e,o,n,i),e.enum=t.entries,e.options=Object.values(t.entries);let r=new Set(Object.keys(t.entries));e.extract=(o,n)=>{let i={};for(let s of o)if(r.has(s))i[s]=t.entries[s];else throw new Error(`Key ${s} not found in enum`);return new Tt({...t,checks:[],...b.normalizeParams(n),entries:i})},e.exclude=(o,n)=>{let i={...t.entries};for(let s of o)if(r.has(s))delete i[s];else throw new Error(`Key ${s} not found in enum`);return new Tt({...t,checks:[],...b.normalizeParams(n),entries:i})}});function wi(e,t){let r=Array.isArray(e)?Object.fromEntries(e.map(o=>[o,o])):e;return new Tt({type:"enum",entries:r,...b.normalizeParams(t)})}function vf(e,t){return new Tt({type:"enum",entries:e,...b.normalizeParams(t)})}var Zu=p("ZodLiteral",(e,t)=>{hs.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Dc(e,r,o,n),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function bf(e,t){return new Zu({type:"literal",values:Array.isArray(e)?e:[e],...b.normalizeParams(t)})}var Vu=p("ZodFile",(e,t)=>{_s.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>jc(e,r,o,n),e.min=(r,o)=>e.check(_e(r,o)),e.max=(r,o)=>e.check(Re(r,o)),e.mime=(r,o)=>e.check(bt(Array.isArray(r)?r:[r],o))});function yf(e){return fc(Vu,e)}var Bu=p("ZodTransform",(e,t)=>{vs.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Zc(e,r,o,n),e._zod.parse=(r,o)=>{if(o.direction==="backward")throw new Oe(e.constructor.name);r.addIssue=i=>{if(typeof i=="string")r.issues.push(b.issue(i,r.value,t));else{let s=i;s.fatal&&(s.continue=!1),s.code??(s.code="custom"),s.input??(s.input=r.value),s.inst??(s.inst=e),r.issues.push(b.issue(s))}};let n=t.transform(r.value,r);return n instanceof Promise?n.then(i=>(r.value=i,r.fallback=!0,r)):(r.value=n,r.fallback=!0,r)}});function Oi(e){return new Bu({type:"transform",transform:e})}var Ti=p("ZodOptional",(e,t)=>{_r.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Yr(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});function xn(e){return new Ti({type:"optional",innerType:e})}var Hu=p("ZodExactOptional",(e,t)=>{bs.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Yr(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});function Gu(e){return new Hu({type:"optional",innerType:e})}var Ku=p("ZodNullable",(e,t)=>{ys.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Jc(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});function kn(e){return new Ku({type:"nullable",innerType:e})}function xf(e){return xn(kn(e))}var Wu=p("ZodDefault",(e,t)=>{xs.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Xc(e,r,o,n),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function qu(e,t){return new Wu({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():b.shallowClone(t)}})}var Ju=p("ZodPrefault",(e,t)=>{ks.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Qc(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});function Yu(e,t){return new Ju({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():b.shallowClone(t)}})}var Pi=p("ZodNonOptional",(e,t)=>{Ss.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Yc(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});function Xu(e,t){return new Pi({type:"nonoptional",innerType:e,...b.normalizeParams(t)})}var Qu=p("ZodSuccess",(e,t)=>{$s.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Lc(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});function kf(e){return new Qu({type:"success",innerType:e})}var el=p("ZodCatch",(e,t)=>{Is.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>eu(e,r,o,n),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function tl(e,t){return new el({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}var nl=p("ZodNaN",(e,t)=>{Es.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>zc(e,r,o,n)});function Sf(e){return mc(nl,e)}var Tn=p("ZodPipe",(e,t)=>{vr.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>tu(e,r,o,n),e.in=t.in,e.out=t.out});function ai(e,t){return new Tn({type:"pipe",in:e,out:t})}var Pn=p("ZodCodec",(e,t)=>{Tn.init(e,t),pn.init(e,t)});function $f(e,t,r){return new Pn({type:"pipe",in:e,out:t,transform:r.decode,reverseTransform:r.encode})}function If(e){let t=e._zod.def;return new Pn({type:"pipe",in:t.out,out:t.in,transform:t.reverseTransform,reverseTransform:t.transform})}var rl=p("ZodPreprocess",(e,t)=>{Tn.init(e,t),ws.init(e,t)}),il=p("ZodReadonly",(e,t)=>{Os.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>nu(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});function ol(e){return new il({type:"readonly",innerType:e})}var al=p("ZodTemplateLiteral",(e,t)=>{Ts.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Uc(e,r,o,n)});function Ef(e,t){return new al({type:"template_literal",parts:e,...b.normalizeParams(t)})}var sl=p("ZodLazy",(e,t)=>{Ns.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>iu(e,r,o,n),e.unwrap=()=>e._zod.def.getter()});function cl(e){return new sl({type:"lazy",getter:e})}var ul=p("ZodPromise",(e,t)=>{As.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>ru(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});function wf(e){return new ul({type:"promise",innerType:e})}var ll=p("ZodFunction",(e,t)=>{Ps.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Fc(e,r,o,n)});function Of(e){return new ll({type:"function",input:Array.isArray(e?.input)?ju(e?.input):e?.input??En(Je()),output:e?.output??Je()})}var An=p("ZodCustom",(e,t)=>{Cs.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Mc(e,r,o,n)});function Tf(e){let t=new z({check:"custom"});return t._zod.check=e,t}function Pf(e,t){return gc(An,e??(()=>!0),t)}function dl(e,t={}){return hc(An,e,t)}function ml(e,t){return _c(e,t)}var Af=vc,Nf=bc;function Cf(e,t={}){let r=new An({type:"custom",check:"custom",fn:o=>o instanceof e,abort:!0,...b.normalizeParams(t)});return r._zod.bag.Class=e,r._zod.check=o=>{o.value instanceof e||o.issues.push({code:"invalid_type",expected:e.name,input:o.value,inst:r,path:[...r._zod.def.path??[]]})},r}var Rf=(...e)=>yc({Codec:Pn,Boolean:Ct,String:Pt},...e);function Df(e){let t=cl(()=>Ei([bn(e),ku(),Su(),wu(),En(t),Lu(bn(),t)]));return t}function zf(e,t){return new rl({type:"pipe",in:Oi(e),out:t})}var wy={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 Oy(e){F({customError:e})}function Ty(){return F().customError}var pl;pl||(pl={});var x={...vn,...ei,iso:wt},Py=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 Ay(e,t){let r=e.$schema;return r==="https://json-schema.org/draft/2020-12/schema"?"draft-2020-12":r==="http://json-schema.org/draft-07/schema#"?"draft-7":r==="http://json-schema.org/draft-04/schema#"?"draft-4":t??"draft-2020-12"}function Ny(e,t){if(!e.startsWith("#"))throw new Error("External $ref is not supported, only local refs (#/...) are allowed");let r=e.slice(1).split("/").filter(Boolean);if(r.length===0)return t.rootSchema;let o=t.version==="draft-2020-12"?"$defs":"definitions";if(r[0]===o){let n=r[1];if(!n||!t.defs[n])throw new Error(`Reference not found: ${e}`);return t.defs[n]}throw new Error(`Reference not found: ${e}`)}function Uf(e,t){if(e.not!==void 0){if(typeof e.not=="object"&&Object.keys(e.not).length===0)return x.never();throw new Error("not is not supported in Zod (except { not: {} } for never)")}if(e.unevaluatedItems!==void 0)throw new Error("unevaluatedItems is not supported");if(e.unevaluatedProperties!==void 0)throw new Error("unevaluatedProperties is not supported");if(e.if!==void 0||e.then!==void 0||e.else!==void 0)throw new Error("Conditional schemas (if/then/else) are not supported");if(e.dependentSchemas!==void 0||e.dependentRequired!==void 0)throw new Error("dependentSchemas and dependentRequired are not supported");if(e.$ref){let n=e.$ref;if(t.refs.has(n))return t.refs.get(n);if(t.processing.has(n))return x.lazy(()=>{if(!t.refs.has(n))throw new Error(`Circular reference not resolved: ${n}`);return t.refs.get(n)});t.processing.add(n);let i=Ny(n,t),s=G(i,t);return t.refs.set(n,s),t.processing.delete(n),s}if(e.enum!==void 0){let n=e.enum;if(t.version==="openapi-3.0"&&e.nullable===!0&&n.length===1&&n[0]===null)return x.null();if(n.length===0)return x.never();if(n.length===1)return x.literal(n[0]);if(n.every(s=>typeof s=="string"))return x.enum(n);let i=n.map(s=>x.literal(s));return i.length<2?i[0]:x.union([i[0],i[1],...i.slice(2)])}if(e.const!==void 0)return x.literal(e.const);let r=e.type;if(Array.isArray(r)){let n=r.map(i=>{let s={...e,type:i};return Uf(s,t)});return n.length===0?x.never():n.length===1?n[0]:x.union(n)}if(!r)return x.any();let o;switch(r){case"string":{let n=x.string();if(e.format){let i=e.format;i==="email"?n=n.check(x.email()):i==="uri"||i==="uri-reference"?n=n.check(x.url()):i==="uuid"||i==="guid"?n=n.check(x.uuid()):i==="date-time"?n=n.check(x.iso.datetime()):i==="date"?n=n.check(x.iso.date()):i==="time"?n=n.check(x.iso.time()):i==="duration"?n=n.check(x.iso.duration()):i==="ipv4"?n=n.check(x.ipv4()):i==="ipv6"?n=n.check(x.ipv6()):i==="mac"?n=n.check(x.mac()):i==="cidr"?n=n.check(x.cidrv4()):i==="cidr-v6"?n=n.check(x.cidrv6()):i==="base64"?n=n.check(x.base64()):i==="base64url"?n=n.check(x.base64url()):i==="e164"?n=n.check(x.e164()):i==="jwt"?n=n.check(x.jwt()):i==="emoji"?n=n.check(x.emoji()):i==="nanoid"?n=n.check(x.nanoid()):i==="cuid"?n=n.check(x.cuid()):i==="cuid2"?n=n.check(x.cuid2()):i==="ulid"?n=n.check(x.ulid()):i==="xid"?n=n.check(x.xid()):i==="ksuid"&&(n=n.check(x.ksuid()))}typeof e.minLength=="number"&&(n=n.min(e.minLength)),typeof e.maxLength=="number"&&(n=n.max(e.maxLength)),e.pattern&&(n=n.regex(new RegExp(e.pattern))),o=n;break}case"number":case"integer":{let n=r==="integer"?x.number().int():x.number();typeof e.minimum=="number"&&(n=n.min(e.minimum)),typeof e.maximum=="number"&&(n=n.max(e.maximum)),typeof e.exclusiveMinimum=="number"?n=n.gt(e.exclusiveMinimum):e.exclusiveMinimum===!0&&typeof e.minimum=="number"&&(n=n.gt(e.minimum)),typeof e.exclusiveMaximum=="number"?n=n.lt(e.exclusiveMaximum):e.exclusiveMaximum===!0&&typeof e.maximum=="number"&&(n=n.lt(e.maximum)),typeof e.multipleOf=="number"&&(n=n.multipleOf(e.multipleOf)),o=n;break}case"boolean":{o=x.boolean();break}case"null":{o=x.null();break}case"object":{let n={},i=e.properties||{},s=new Set(e.required||[]);for(let[u,l]of Object.entries(i)){let d=G(l,t);n[u]=s.has(u)?d:d.optional()}if(e.propertyNames){let u=G(e.propertyNames,t),l=e.additionalProperties&&typeof e.additionalProperties=="object"?G(e.additionalProperties,t):x.any();if(Object.keys(n).length===0){o=x.record(u,l);break}let d=x.object(n).passthrough(),m=x.looseRecord(u,l);o=x.intersection(d,m);break}if(e.patternProperties){let u=e.patternProperties,l=Object.keys(u),d=[];for(let g of l){let h=G(u[g],t),S=x.string().regex(new RegExp(g));d.push(x.looseRecord(S,h))}let m=[];if(Object.keys(n).length>0&&m.push(x.object(n).passthrough()),m.push(...d),m.length===0)o=x.object({}).passthrough();else if(m.length===1)o=m[0];else{let g=x.intersection(m[0],m[1]);for(let h=2;h<m.length;h++)g=x.intersection(g,m[h]);o=g}break}let c=x.object(n);e.additionalProperties===!1?o=c.strict():typeof e.additionalProperties=="object"?o=c.catchall(G(e.additionalProperties,t)):o=c.passthrough();break}case"array":{let n=e.prefixItems,i=e.items;if(n&&Array.isArray(n)){let s=n.map(u=>G(u,t)),c=i&&typeof i=="object"&&!Array.isArray(i)?G(i,t):void 0;c?o=x.tuple(s).rest(c):o=x.tuple(s),typeof e.minItems=="number"&&(o=o.check(x.minLength(e.minItems))),typeof e.maxItems=="number"&&(o=o.check(x.maxLength(e.maxItems)))}else if(Array.isArray(i)){let s=i.map(u=>G(u,t)),c=e.additionalItems&&typeof e.additionalItems=="object"?G(e.additionalItems,t):void 0;c?o=x.tuple(s).rest(c):o=x.tuple(s),typeof e.minItems=="number"&&(o=o.check(x.minLength(e.minItems))),typeof e.maxItems=="number"&&(o=o.check(x.maxLength(e.maxItems)))}else if(i!==void 0){let s=G(i,t),c=x.array(s);typeof e.minItems=="number"&&(c=c.min(e.minItems)),typeof e.maxItems=="number"&&(c=c.max(e.maxItems)),o=c}else o=x.array(x.any());break}default:throw new Error(`Unsupported type: ${r}`)}return o}function G(e,t){if(typeof e=="boolean")return e?x.any():x.never();let r=Uf(e,t),o=e.type||e.enum!==void 0||e.const!==void 0;if(e.anyOf&&Array.isArray(e.anyOf)){let c=e.anyOf.map(l=>G(l,t)),u=x.union(c);r=o?x.intersection(r,u):u}if(e.oneOf&&Array.isArray(e.oneOf)){let c=e.oneOf.map(l=>G(l,t)),u=x.xor(c);r=o?x.intersection(r,u):u}if(e.allOf&&Array.isArray(e.allOf))if(e.allOf.length===0)r=o?r:x.any();else{let c=o?r:G(e.allOf[0],t),u=o?0:1;for(let l=u;l<e.allOf.length;l++)c=x.intersection(c,G(e.allOf[l],t));r=c}e.nullable===!0&&t.version==="openapi-3.0"&&(r=x.nullable(r)),e.readOnly===!0&&(r=x.readonly(r)),e.default!==void 0&&(r=r.default(e.default));let n={},i=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(let c of i)c in e&&(n[c]=e[c]);let s=["contentEncoding","contentMediaType","contentSchema"];for(let c of s)c in e&&(n[c]=e[c]);for(let c of Object.keys(e))Py.has(c)||(n[c]=e[c]);return Object.keys(n).length>0&&t.registry.add(r,n),e.description&&(r=r.describe(e.description)),r}function jf(e,t){if(typeof e=="boolean")return e?x.any():x.never();let r;try{r=JSON.parse(JSON.stringify(e))}catch{throw new Error("fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas")}let o=Ay(r,t?.defaultTarget),n=r.$defs||r.definitions||{},i={version:o,defs:n,refs:new Map,processing:new Set,rootSchema:r,registry:t?.registry??B};return G(r,i)}var fl={};ye(fl,{bigint:()=>zy,boolean:()=>Dy,date:()=>Uy,number:()=>Ry,string:()=>Cy});function Cy(e){return Us(Pt,e)}function Ry(e){return Hs(Nt,e)}function Dy(e){return Xs(Ct,e)}function zy(e){return ec(Rt,e)}function Uy(e){return dc(In,e)}F(br());var Lf=a.enum(["SUM","COUNT","MAX","UNIQUE_COUNT","LATEST"]),gl=a.object({d:a.number().int().nonnegative(),w:a.number().int().positive(),c:a.number().nonnegative(),agg:Lf.default("COUNT").optional(),valueProperty:a.string().optional(),uniqueProperty:a.string().optional()}),jy=a.object({kind:a.literal("credential_validity")}),Ly=a.object({kind:a.literal("track_only_bypass")}),My=a.object({kind:a.literal("lifecycle_block"),blockOn:a.array(a.string()).default(["SUSPENDED","CANCELLED","INACTIVE"]),code:a.string().default("subscription_inactive")}),Fy=a.object({kind:a.literal("identity_requirement"),require:a.enum(["org_only","org_and_user"]).default("org_only")}),Zy=a.object({kind:a.literal("scope"),requireExplicit:a.boolean().default(!0)}),Vy=a.object({kind:a.literal("feature_gate"),feature:a.string().min(1).max(120)}),By=a.object({kind:a.literal("geo_restriction"),allow:a.array(a.string().length(2).regex(/^[A-Z]{2}$/)).optional(),block:a.array(a.string().length(2).regex(/^[A-Z]{2}$/)).optional()}).refine(e=>e.allow!==void 0||e.block!==void 0,{message:"geo_restriction requires either `allow` or `block`"}),Hy=a.enum(["fixed_window","sliding_window","token_bucket"]),Gy=gl.extend({kind:a.literal("rate_limit"),m:a.enum(["e","t"]).default("e"),strategy:Hy.default("fixed_window"),bucket_capacity:a.number().positive().optional(),refill_rate_per_second:a.number().positive().optional()}).superRefine((e,t)=>{e.strategy==="token_bucket"?(e.bucket_capacity===void 0&&t.addIssue({code:"custom",message:"token_bucket strategy requires `bucket_capacity` (positive number)",path:["bucket_capacity"]}),e.refill_rate_per_second===void 0&&t.addIssue({code:"custom",message:"token_bucket strategy requires `refill_rate_per_second` (positive number)",path:["refill_rate_per_second"]})):(e.bucket_capacity!==void 0&&t.addIssue({code:"custom",message:`bucket_capacity is only valid when strategy === 'token_bucket' (got '${e.strategy}')`,path:["bucket_capacity"]}),e.refill_rate_per_second!==void 0&&t.addIssue({code:"custom",message:`refill_rate_per_second is only valid when strategy === 'token_bucket' (got '${e.strategy}')`,path:["refill_rate_per_second"]}))}),Ky=a.enum(["fixed_window","sliding_window"]),Wy=gl.extend({kind:a.literal("quota"),ovr:a.enum(["BLOCK","ALLOW_AND_BILL"]),strategy:Ky.default("fixed_window")}),qy=gl.extend({kind:a.literal("credit_balance"),ovr:a.enum(["BLOCK","ALLOW_AND_BILL"])}),Jy=a.object({kind:a.literal("concurrency"),capability:a.string().min(1).max(120),limit:a.number().int().positive(),lease_ttl_seconds:a.number().int().positive().max(3600).default(60)}),Yy=a.object({kind:a.literal("capability_limit"),capability:a.string().min(1).max(120),limit:a.union([a.number().int().nonnegative(),a.boolean()])}),Xy=a.object({kind:a.literal("resource_count"),resource:a.string().min(1).max(120),limit:a.number().int().nonnegative(),actionId:a.string().min(1).max(160).optional()}),Qy=a.object({kind:a.literal("reservation"),dimension:a.string().min(1).max(120),max_outstanding:a.number().int().positive(),hold_seconds:a.number().int().positive().max(86400)}),hl=a.discriminatedUnion("kind",[jy,Ly,My,Fy,Zy,Vy,By,Gy,Wy,qy,Yy,Xy,Jy,Qy]);var VO=a.object({keyId:a.string().min(1),orgId:a.string().min(1),actorType:a.enum(["org","user"]).optional(),actorId:a.string().nullable().optional(),productId:a.string().min(1),compiledPlanId:a.string().min(1),entitlementHash:a.string().optional(),subjectKey:a.string().min(1),subscriptionId:a.string().min(1),currentPeriodId:a.string().optional(),currentPeriodStartMs:a.number().optional(),subscriberId:a.string().min(1),apiKeyId:a.string().nullable(),entitlementVersion:a.number(),identityRequirement:a.enum(["org_only","org_and_user"]),status:a.enum(["active","revoked"]),expiresAt:a.number().nullable().optional(),subscriberStatus:a.enum(["ONBOARDING","ACTIVE","SUSPENDED"]),subscriptionStatus:a.string().min(1),environment:a.enum(["production","sandbox"]).optional(),environmentId:a.string().optional(),scopes:a.array(a.string()).readonly().optional(),entitlement:a.record(a.string(),a.unknown()).nullable().optional()});var Mf=a.object({unit:a.enum(["requests","tokens","computeMs","dollars"]),window:a.enum(["second","minute","hour","day","week","month"]),capacity:a.number()}),ex=a.object({id:a.string().min(1),slug:a.string().optional(),transportMode:a.enum(["public_origin","mtls","cloudflare_tunnel"]),verificationRequired:a.boolean().optional(),originUrl:a.string().optional(),originHostname:a.string().optional(),mtlsClientCertRef:a.string().optional(),accessCredentialRef:a.string().optional(),policyVersion:a.string().optional()}),BO=a.object({id:a.string().min(1),origin:a.string().min(1),sandboxOrigin:a.string().nullable().optional(),authHeader:a.string().optional(),pricing:a.object({requests:a.number().optional(),tokens:a.number().optional(),computeMs:a.number().optional(),per_request:a.number().optional()}).catchall(a.number().optional()).optional(),metering:a.object({tokens:a.object({estimatePerRequest:a.number().optional()}).optional(),computeMs:a.object({estimatePerRequest:a.number().optional()}).optional(),billOn4xx:a.boolean().optional()}).optional(),tenantLimits:a.array(Mf).readonly().optional(),userLimits:a.array(Mf).readonly().optional(),environmentId:a.string().optional(),contextTokenSecret:a.string().nullable().optional(),timeoutMs:a.number().positive().optional(),idleTimeoutMs:a.number().positive().optional(),backends:a.array(ex).optional(),defaultBackendId:a.string().optional(),verificationRequired:a.boolean().optional()});var tx=a.object({perRequestMinUnitsByDim:a.record(a.string(),a.number()).optional(),creditPoolMicros:a.number().optional(),perDimUnitCostMicros:a.record(a.string(),a.number()).optional()}),nx=a.object({source:a.enum(["fixed","provider_catalog"]),meterKey:a.string(),selector:a.string().optional(),measures:a.array(a.string()),catalog:a.string().optional(),pricePolicy:a.string().optional(),markupPercent:a.number().optional(),fixedRatesMicros:a.record(a.string(),a.record(a.string(),a.number())).optional()}),rx=a.object({key:a.string(),display:a.string(),unit:a.string().optional(),aggregation:a.enum(["SUM","COUNT","MAX","UNIQUE_COUNT","LATEST"]),window:a.enum(["minute","hour","day","month","billing_period"]),enforcementType:a.string()}),ix=a.object({feature:a.string(),method:a.string(),path:a.string(),meters:a.array(a.string()).optional()}),HO=a.object({v:a.number(),sub:a.string(),compiledPlanId:a.string().min(1),planType:a.string(),ts:a.number(),constraints:a.array(hl),cv:a.number(),dm:a.record(a.string(),a.number()),dmv:a.number().optional(),floor:tx.nullable().optional(),displayDims:a.array(a.number()).optional(),meterSemantics:a.record(a.string(),rx).optional(),rp:a.record(a.string(),nx).optional(),fr:a.array(ix).optional(),sig:a.string().min(1),sigKid:a.string().optional(),environmentId:a.string().optional()}).passthrough();var GO=a.object({subscriptionId:a.string().min(1),activePeriodId:a.string().optional(),activeCompiledPlanId:a.string().min(1),activeEntitlementHash:a.string().optional(),enforcementMode:a.enum(["STRICT","GRACE","TRACK_ONLY"]),gracePeriodEndsAt:a.string().optional(),trialEndsAt:a.string().optional(),overrides:a.object({featureGateOverrides:a.record(a.string(),a.boolean()).optional()}).optional(),scheduledTransition:a.object({kind:a.string(),timing:a.string(),scheduledFor:a.string(),toCompiledPlanId:a.string().nullable()}).optional(),creditPool:a.object({periodStartMs:a.number(),periodEndMs:a.number(),grantedCents:a.number(),policy:a.enum(["block","allow"]),epoch:a.number()}).optional(),resourceCounts:a.record(a.string(),a.number()).optional(),dedicatedShard:a.enum(["ACTIVE","DRAINING"]).optional(),generation:a.number(),updatedAt:a.string()});var ox=["DRAFT","ACTIVE"],qO=a.enum(ox),ax=["ONBOARDING","ACTIVE","SUSPENDED"],Ff=a.enum(ax),sx=["ACTIVE","REVOKED"],JO=a.enum(sx),cx=["BLOCK","ALLOW_AND_BILL"],Zf=a.enum(cx),ux=["ACTIVE","ARCHIVED"],YO=a.enum(ux),lx=["ACTIVE","EXPERIMENTAL","LEGACY_STABLE","PHASING_OUT","SUPERSEDED","ARCHIVED"],XO=a.enum(lx);var Ai=[{id:"requests",label:"API requests",description:"Count every call \u2014 the right default for most APIs.",meters:[{key:"requests",display:"Requests",unit:"request"}]},{id:"ai-tokens",label:"AI tokens",description:"LLM-style token metering alongside calls. The gateway can estimate tokens per request and settle actuals from @farthershore/backend reports.",meters:[{key:"requests",display:"Requests",unit:"request"},{key:"tokens_used",display:"Tokens Used",unit:"token"}]},{id:"credits",label:"Credits",description:"Price work in abstract credits (e.g. one image = 5 credits). Report each call's dynamic credit cost through @farthershore/backend.",meters:[{key:"requests",display:"Requests",unit:"request"},{key:"credits",display:"Credits",unit:"credit"}]},{id:"spend",label:"Metered spend",description:"Pass-through spend in cents (OpenRouter-style) reported through @farthershore/backend. Pairs with prepaid credit wallets.",meters:[{key:"requests",display:"Requests",unit:"request"},{key:"dollars",display:"Spend",unit:"cent"}]},{id:"compute",label:"Compute time",description:"Bill milliseconds of compute, settled from @farthershore/backend reports.",meters:[{key:"requests",display:"Requests",unit:"request"},{key:"compute_ms",display:"Compute Time",unit:"ms"}]}];function Vf(e){let t=e.trim().toLowerCase();return Ai.find(r=>r.id===t)}function Bf(){return Ai.map(e=>e.id)}var dx="FS_RUNTIME_TOKEN";var mx={payload:"x-fs-metering",signature:"x-fs-metering-sig",token:"x-fs-metering-token"};var nT={environmentVariable:dx,presentation:mx.token,storage:"sha256-hash-only"};var rT=10*1024*1024;var px=["CHECKOUT_COMPLETED","PLAN_CHANGED","CANCELLED","RESTORED","UNSCHEDULED_CANCELLATION","PRICE_ROLLOVER","PAUSED","RESUMED","PLAN_CHANGE_SCHEDULED","PLAN_CHANGE_ABORTED","SCHEDULE_CREATED","SCHEDULE_UPDATED","SCHEDULE_RELEASED","SCHEDULE_COMPLETED","SCHEDULE_ABORTED","CANCEL_SCHEDULED","PAYMENT_FAILED","PAYMENT_RECOVERED","PAYMENT_RECOVERED_FROM_SUSPENDED","PAYMENT_ACTION_REQUIRED","RECURRING_PAYMENT","REFUND_PROCESSED","DISPUTE_OPENED","DISPUTE_FUNDS_WITHDRAWN","DISPUTE_CLOSED","MIN_SPEND_TRUE_UP"],aT=a.enum(px);var lT=a.object({fontFamily:a.enum(["sans","serif","mono","system"]).optional(),radius:a.enum(["none","sm","md","lg","full"]).optional(),density:a.enum(["compact","default","comfortable"]).optional(),colorScheme:a.enum(["system","light","dark"]).optional()}).strict().optional();var fx=a.object({d:a.number(),w:a.number(),capacity:a.number(),remaining:a.number(),windowStart:a.number(),windowEnd:a.number()}),gx=a.record(a.string(),fx),hx=a.object({allocations:a.array(a.number()),expiresAt:a.number()}),_x=a.record(a.string(),hx),vx=a.record(a.string(),a.bigint()),gT=a.object({subscriptionId:a.string(),handoffToken:a.string(),targetShardId:a.string(),policyVersion:a.number(),entitlementVersion:a.number().nullable(),windowStates:gx,activeLeases:_x,totalsByDimension:vx.optional(),billingCycleId:a.string().nullable().optional(),billingCycleStartMs:a.number().optional()});var bx={gatewayProjectRead:"gateway:project:read",gatewayResourceWrite:"gateway:resource:write",usageWrite:"usage:write",authzDeniedWrite:"authz-denied:write",reservationAuthorize:"reservation:authorize",reservationFinalize:"reservation:finalize",internalCronRun:"internal:cron:run",personaManage:"persona:manage"},yT=Object.values(bx);var yx=["managed_frontend","custom_frontend","embedded_sdk","public_api","cli","agent","webhook","admin","internal"],Gf=a.enum(yx),Hf=a.string().min(1).max(128),xx=a.object({d:a.number().int().nonnegative(),w:a.number().int().positive(),rem:a.number(),cap:a.number()}).strict(),Kf=a.object({v:a.literal(1),entV:a.number().int().nonnegative().optional(),entHash:Hf.optional(),featureGrant:a.boolean().optional(),gates:a.array(Hf).max(16).optional(),limits:a.array(xx).max(16).optional()}).strict();var kx=a.object({requestId:a.string(),eventId:a.string(),tenantId:a.string(),slug:a.string(),subscriptionId:a.string(),subscriberId:a.string(),apiKeyId:a.string().nullable(),compiledPlanId:a.string(),subscriberStatus:Ff,subscriptionStatus:a.string(),productId:a.string(),statusCode:a.number(),path:a.string(),latencyMs:a.number(),rawDimsUnits:a.record(a.string(),a.number()),meterSettlements:a.array(a.object({meterId:a.string(),meterType:a.enum(["exact_pre_request","estimated_then_settled","postpaid","strict_concurrency"]),reserved:a.number(),actual:a.number(),delta:a.number(),dimension:a.number().int().nonnegative(),leaseId:a.string()})).optional(),reportingAttested:a.boolean(),billable:a.boolean(),measureContext:a.record(a.string(),a.unknown()).optional(),creditUnitsConsumed:a.record(a.string(),a.number()).optional(),timestamp:a.number(),environmentId:a.string().nullable().optional(),orgId:a.string().optional(),actorType:a.enum(["org","user"]).optional(),actorId:a.string().nullable().optional(),subjectKey:a.string().optional(),overageBehavior:Zf.optional(),environment:a.enum(["production","sandbox"]).optional(),surface:Gf.optional(),actionId:a.string().min(1).max(128).optional(),subjectType:a.string().min(1).max(128).optional(),subjectId:a.string().min(1).max(256).optional(),decision:Kf.optional(),leaseId:a.string(),transactionId:a.string(),gatewayMetadata:a.object({shardId:a.string(),policyVersion:a.number().int().nonnegative().optional(),artifactVersion:a.number().int().nonnegative().default(0),artifactHash:a.string().regex(/^sha256_[a-f0-9]{64}$/).optional(),leaseTelemetry:a.object({consumeRequests:a.number().int().nonnegative(),localLeaseHits:a.number().int().nonnegative(),doAllocationAttempts:a.number().int().nonnegative(),doAllocationGrants:a.number().int().nonnegative(),doAllocationDenials:a.number().int().nonnegative(),doUnavailable:a.number().int().nonnegative(),doCircuitOpen:a.number().int().nonnegative(),leaseRefreshSingleflightJoins:a.number().int().nonnegative(),leaseRefreshSingleflightJoinRate:a.number().min(0).max(1),expiredLeasesReaped:a.number().int().nonnegative(),expiredLeaseReclaimedGrant:a.array(a.number().nonnegative()),reconcileRequests:a.number().int().nonnegative(),reconcilePositiveDeltas:a.number().int().nonnegative(),reconcileNoLocalLease:a.number().int().nonnegative(),doReconcileAttempts:a.number().int().nonnegative(),doReconcileFailures:a.number().int().nonnegative(),unspentLeaseRemainderReturns:a.number().int().nonnegative(),unspentLeaseRemainderReturnFailures:a.number().int().nonnegative(),unspentLeaseRemainderReturnedGrant:a.array(a.number().nonnegative()),maxObservedPositiveReconcileDelta:a.array(a.number().nonnegative()),requestToDoRatio:a.number().nonnegative(),localLeaseHitRate:a.number().min(0).max(1),localSpendRate:a.number().min(0).max(1),maxObservedActiveLeases:a.number().int().nonnegative(),maxObservedOutstandingGrant:a.array(a.number().nonnegative()),maxObservedOutstandingGrantRatio:a.number().nonnegative(),maxObservedEmergencyReserveGrant:a.array(a.number().nonnegative()),maxObservedEmergencyReserveGrantRatio:a.number().nonnegative(),maxObservedLeaseGrant:a.array(a.number().nonnegative()),maxObservedLeaseGrantRatio:a.number().nonnegative(),maxObservedLeaseTtlMs:a.number().int().nonnegative()}).optional(),artifactCacheTelemetry:a.object({reads:a.number().int().nonnegative(),l0FreshHits:a.number().int().nonnegative(),l0Misses:a.number().int().nonnegative(),l0StaleServes:a.number().int().nonnegative(),l0StaleIfErrorServes:a.number().int().nonnegative(),l0BlockingRefreshes:a.number().int().nonnegative(),l0SingleflightJoins:a.number().int().nonnegative(),l0EarlyRefreshes:a.number().int().nonnegative(),l1Hits:a.number().int().nonnegative(),l1Misses:a.number().int().nonnegative(),l1Rejected:a.number().int().nonnegative(),l1WriteFailures:a.number().int().nonnegative(),kvHits:a.number().int().nonnegative(),kvMisses:a.number().int().nonnegative(),kvTimeouts:a.number().int().nonnegative(),kvCircuitOpenReads:a.number().int().nonnegative(),resultHits:a.number().int().nonnegative(),resultMisses:a.number().int().nonnegative(),resultDenied:a.number().int().nonnegative(),resultUnavailable:a.number().int().nonnegative(),backgroundRefreshErrors:a.number().int().nonnegative(),l0HitRate:a.number().min(0).max(1),l0SingleflightJoinRate:a.number().min(0).max(1),l0EarlyRefreshRate:a.number().min(0).max(1),l1HitRate:a.number().min(0).max(1),kvHitRate:a.number().min(0).max(1),resultHitRate:a.number().min(0).max(1),staleServeRate:a.number().min(0).max(1)}).optional(),gatewayVersion:a.string()}).passthrough()}).passthrough();var Sx=a.object({path:a.string(),code:a.string(),message:a.string()}),TT=a.object({reason:a.literal("schema_validation_failed"),receivedAt:a.string(),rawPayload:a.unknown(),issues:a.array(Sx),consumerVersion:a.string().optional(),originalMessageId:a.string().optional()});var _l=["subscription.created","subscription.updated","subscription.canceled","payment.succeeded","payment.failed","rate_limit.exceeded","entitlement.changed","usage.threshold_reached"],Dt=a.enum(_l);var ue=a.enum(["immediate","period_end"]),Nn=a.object({default:ue.default("period_end"),when:a.object({price_increase:ue.optional(),price_decrease:ue.optional(),feature_added:ue.optional(),feature_removed:ue.optional(),limit_increased:ue.optional(),limit_reduced:ue.optional(),credit_increased:ue.optional(),credit_reduced:ue.optional(),rating_changed:ue.optional()}).strict().default({price_increase:"period_end",price_decrease:"immediate",feature_added:"immediate",feature_removed:"period_end",limit_increased:"immediate",limit_reduced:"period_end",credit_increased:"immediate",credit_reduced:"period_end",rating_changed:"period_end"}),allowImmediatePriceIncrease:a.boolean().default(!1),allowImmediateEntitlementReduction:a.boolean().default(!1)}).strict().superRefine((e,t)=>{(e.when.price_increase??e.default)==="immediate"&&!e.allowImmediatePriceIncrease&&t.addIssue({code:"custom",path:["when","price_increase"],message:"price_increase cannot switch immediately without allowImmediatePriceIncrease: true"});for(let r of["feature_removed","limit_reduced","credit_reduced"])(e.when[r]??e.default)==="immediate"&&!e.allowImmediateEntitlementReduction&&t.addIssue({code:"custom",path:["when",r],message:`${r} cannot switch immediately without allowImmediateEntitlementReduction: true`})});var $x=a.object({kind:a.literal("credit"),amount_cents:a.number().int().nonnegative(),recurs:a.boolean().optional(),expires_after_days:a.number().int().positive().optional(),label:a.string().min(1).max(120).optional()}),Ix=a.object({kind:a.literal("top_up"),sku:a.string().min(1).max(120),label:a.string().min(1).max(200),price_cents:a.number().int().positive(),credit_cents:a.number().int().positive()}),le=a.discriminatedUnion("kind",[$x,Ix]);function Wf(e){return e.kind==="credit"&&e.recurs===!0&&e.label===void 0}function qf(e){return e.kind==="credit"&&e.recurs!==!0&&e.label===void 0}function vl(e,t,r=["grants"]){if(!e)return;let o=0,n=0;for(let i of e)Wf(i)?o+=1:qf(i)&&(n+=1);o>1&&t.addIssue({code:"custom",message:"At most one recurring `credit` grant (recurs:true, no label) is allowed \u2014 recurring credit is a single canonical entry.",path:r}),n>1&&t.addIssue({code:"custom",message:"At most one one-time `credit` grant (recurs:false, no label) is allowed \u2014 one-time credit is a single canonical entry.",path:r})}function Jf(e){return e.grants&&e.grants.length>0?[...e.grants]:[]}function Cn(e){return Jf(e).find(Wf)?.amount_cents??0}function zt(e){return Jf(e).find(qf)?.amount_cents??0}var Ex=a.object({percent:a.number().int().min(0).max(100)}),wx=a.object({threshold_cents:a.number().int().nonnegative(),refill_cents:a.number().int().positive()}),Ee=a.object({rollover:Ex.optional(),auto_recharge:wx.optional()});var Yf=a.enum(["linear","active_count"]);var Ox=a.object({up_to:a.number().int().positive().nullable(),price_per_unit_micros:a.number().int().nonnegative()}),Tx=a.object({strategy:a.enum(["graduated","volume"]),tiers:a.array(Ox).min(1).max(20)}),de=a.object({dimension:a.string().min(1).max(64).regex(/^[a-z0-9_]+$/,"Meter dimension must be lowercase alphanumeric with underscores"),kind:Yf.default("linear"),price_per_unit_micros:a.number().int().nonnegative().default(0),tiered:Tx.optional(),included_units:a.number().int().positive().optional()}).superRefine((e,t)=>{if(e.tiered&&e.price_per_unit_micros>0&&t.addIssue({code:"custom",message:"`tiered` is mutually exclusive with a non-zero `price_per_unit_micros` \u2014 drop one",path:["tiered"]}),e.included_units!==void 0&&e.tiered&&t.addIssue({code:"custom",message:"`included_units` is mutually exclusive with `tiered` \u2014 a tiered schedule already expresses the included allotment as a zero-priced first tier",path:["included_units"]}),e.tiered){let r=0,o=!1;for(let n=0;n<e.tiered.tiers.length;n++){let i=e.tiered.tiers[n];if(o){t.addIssue({code:"custom",message:"Open-ended tier (`up_to: null`) must be the final tier",path:["tiered","tiers",n,"up_to"]});break}if(i.up_to===null){o=!0;continue}i.up_to<=r&&t.addIssue({code:"custom",message:`Tier upper bounds must be strictly ascending (tier ${n} = ${i.up_to} <= previous ${r})`,path:["tiered","tiers",n,"up_to"]}),r=i.up_to}o||t.addIssue({code:"custom",message:"The final tier of a `tiered` schedule must be open-ended (`up_to: null`)",path:["tiered","tiers",e.tiered.tiers.length-1,"up_to"]})}}),we=a.enum(["month","year"]),Px=a.object({meters:a.array(de).default([]),recurring_fee_cents:a.number().int().nonnegative().default(0),billing_interval:we.default("month"),grants:a.array(le).max(40).default([]),creditPolicy:Ee.optional(),trial_days:a.number().int().nonnegative().default(0),max_monthly_spend_cents:a.number().int().nonnegative().optional()});var Ax=a.string().min(1),Nx=a.object({type:a.literal("named"),name:a.enum(["second","minute","hour","day","week","month"])}),Cx=a.object({type:a.literal("custom"),seconds:a.number().int().positive(),label:a.string().optional()}),Rx=a.discriminatedUnion("type",[Nx,Cx]),je=a.object({dimension:Ax,window:Rx,capacity:a.number().nonnegative(),enforcement:a.enum(["enforce","track"]).optional(),acknowledgeUnreachable:a.boolean().optional()}),BT=a.array(je).max(20);var Dx=a.enum(["NONE","PRORATE","CREDIT"]).default("NONE"),zx={meters:a.array(de).default([]),recurring_fee_cents:a.number().int().nonnegative().default(0),billing_interval:we.default("month"),trial_days:a.number().int().nonnegative().default(0),max_monthly_spend_cents:a.number().int().nonnegative().optional(),min_monthly_spend_cents:a.number().int().nonnegative().optional(),grants:a.array(le).max(40).default([]),creditPolicy:Ee.optional()},Ux={meters:a.array(de).optional(),recurring_fee_cents:a.number().int().nonnegative().optional(),billing_interval:we.optional(),trial_days:a.number().int().nonnegative().optional(),max_monthly_spend_cents:a.number().int().nonnegative().optional(),min_monthly_spend_cents:a.number().int().nonnegative().optional(),grants:a.array(le).max(40).optional(),creditPolicy:Ee.optional()},jx=a.object({id:a.string().min(1).max(64).regex(/^[a-z0-9_-]+$/,"Variant id must be lowercase alphanumeric with hyphens/underscores"),label:a.string().max(200).optional(),rolloutPercent:a.number().int().min(0).max(100),assignmentSeed:a.string().min(1).max(100).default("default"),prorationOnRollback:Dx,...Ux,limits:a.array(je).max(20).optional(),featureGates:a.record(a.string(),a.boolean()).optional(),capability_limits:a.record(a.string().min(1).max(120),a.union([a.number().int().nonnegative(),a.boolean()])).optional(),overageBehavior:a.enum(["block","allow_and_bill"]).optional()}),Xf=jx.superRefine((e,t)=>{vl(e.grants,t)}),Qf=a.object({key:a.string().min(1).max(64).regex(/^[a-z0-9_-]+$/,"Plan key must be lowercase alphanumeric with hyphens/underscores"),name:a.string().min(1).max(100),description:a.string().max(500).optional(),details:a.array(a.string().max(200)).max(10).optional(),...zx,free:a.boolean().default(!1),limits:a.array(je).max(20).default([]),featureGates:a.record(a.string(),a.boolean()).optional(),capability_limits:a.record(a.string().min(1).max(120),a.union([a.number().int().nonnegative(),a.boolean()])).default({}),overageBehavior:a.enum(["block","allow_and_bill"]).default("block"),selfServeEnabled:a.boolean().default(!0),legacy:a.boolean().optional().default(!1),variants:a.array(Xf).max(4).optional(),archive:a.object({at:a.string().datetime().optional(),transitionTo:a.string().optional(),strategy:a.enum(["auto","explicit","block"]).default("auto")}).optional()}),Ni=Qf.superRefine((e,t)=>{vl(e.grants,t)});var Lx=/^\$\{[A-Z][A-Z0-9_]{0,127}\}$/,bl=a.string().min(3).max(200).refine(e=>Lx.test(e),{message:"secret must use ${VAR} interpolation syntax (e.g. ${WEBHOOK_SECRET}); raw secrets in YAML are rejected. Define the env var in the per-product secret store and reference it here."}),yl=a.object({maxAttempts:a.number().int().min(1).max(20).default(5),backoff:a.enum(["exponential","fixed"]).default("exponential")}),xl=a.object({id:a.string().min(1).max(64).regex(/^[a-z0-9_-]+$/,"Webhook endpoint id must be lowercase alphanumeric with hyphens/underscores"),url:a.string().url("webhooks.endpoints[].url must be a valid URL"),secret:bl,events:a.array(Dt).min(1,"webhooks.endpoints[].events must subscribe to \u2265 1 event"),enabled:a.boolean().default(!0),retryPolicy:yl.default({maxAttempts:5,backoff:"exponential"})}),kl=a.object({endpoints:a.array(xl).max(50).default([])});var Mx=a.object({meters:a.array(de).optional(),recurring_fee_cents:a.number().int().nonnegative().optional(),billing_interval:we.optional(),grants:a.array(le).max(40).optional(),creditPolicy:Ee.optional(),trial_days:a.number().int().nonnegative().optional(),max_monthly_spend_cents:a.number().int().nonnegative().optional(),limits:a.array(je).max(20).optional(),featureGates:a.record(a.string(),a.boolean()).optional(),overageBehavior:a.enum(["block","allow_and_bill"]).optional(),selfServeEnabled:a.boolean().optional(),legacy:a.boolean().optional()}).strict(),Fx=a.object({url:a.string().url().optional(),secret:bl.optional(),events:a.array(Dt).optional(),enabled:a.boolean().optional(),retryPolicy:yl.partial().optional()}).strict(),Zx=a.object({plans:a.record(a.string(),Mx).optional(),webhooks:a.object({endpoints:a.record(a.string(),Fx).optional()}).strict().optional()}).strict(),Sl=a.record(a.string().min(1).max(64),Zx);var eg=1,tg=["plans_table","usage_card","api_keys_panel","billing_summary","credit_balance","feature_panel","product_docs","audit_log","team_panel","markdown"],ng=["/","/pricing","/dashboard","/dashboard/*","/settings","/settings/*","/team","/audit-log","/docs","/docs/*","/terms","/privacy","/persona","/persona-sign-in"],rg=a.string().min(1).max(200).regex(/^\/[a-zA-Z0-9_./-]*$/,"path must start with / and contain only [a-zA-Z0-9_./-]"),$l=a.string().min(1).max(120).regex(/^[a-z0-9_-]+$/),ig=a.object({label:a.string().min(1).max(80),path:rg,capability:$l.optional()}),og=a.enum(tg),ag=a.object({component:og,props:a.record(a.string().min(1).max(80),a.unknown()).optional(),capability:$l.optional(),gateMode:a.enum(["hide","disable","upsell"]).default("hide")}),sg=a.object({path:rg,title:a.string().min(1).max(120),requiresAuth:a.boolean(),capability:$l.optional(),components:a.array(ag).max(12).default([])}),Il=a.object({version:a.literal(eg),nav:a.array(ig).max(12).default([]),pages:a.array(sg).max(24).default([])}).superRefine((e,t)=>{let r=new Set;e.pages.forEach((o,n)=>{r.has(o.path)&&t.addIssue({code:"custom",message:`duplicate frontend page path "${o.path}"`,path:["pages",n,"path"]}),r.add(o.path),cg(o.path)&&t.addIssue({code:"custom",message:`frontend page path "${o.path}" is reserved by the template`,path:["pages",n,"path"]})})});function cg(e){return ng.some(t=>{if(t.endsWith("/*")){let r=t.slice(0,-2);return e===r||e.startsWith(`${r}/`)}return e===t})}var El=a.string().min(1).max(64).regex(/^[a-z0-9_-]+$/,"Plan key must be lowercase alphanumeric with hyphens/underscores"),ug=a.union([a.literal("head"),a.string().regex(/^[1-9][0-9]*$/,'version must be "head" or a positive integer')]),Vx=a.object({plan:El,version:ug.optional()}),Bx=a.object({plan:El,version:a.literal("head").default("head")}),Hx=a.object({plan:El,version:ug}),lg=a.enum(["grandfather","next_renewal","by_date","immediate","opt_in"]),dg=a.enum(["none","prorate","credit"]),mg=a.object({effective:lg,date:a.string().datetime().optional(),proration:dg.optional()}).superRefine((e,t)=>{e.effective==="by_date"&&e.date===void 0&&t.addIssue({code:"custom",path:["date"],message:"existingCustomers.date is required when effective is by_date"})}),pg=a.object({subscriber:a.string().min(1).max(200),pinTo:Hx,until:a.string().datetime().optional(),notes:a.string().max(1e3).optional()}),fg=a.object({id:a.string().min(1).max(120).regex(/^[a-z0-9][a-z0-9_.-]*$/,"Migration id must be lowercase alphanumeric with dots, hyphens, or underscores"),from:Vx,to:Bx,newCustomers:a.literal("immediate").default("immediate"),existingCustomers:mg,pins:a.array(pg).max(50).default([])}),wl=a.array(fg).superRefine((e,t)=>{let r=new Set;e.forEach((o,n)=>{r.has(o.id)&&t.addIssue({code:"custom",path:[n,"id"],message:`duplicate migration id "${o.id}"`}),r.add(o.id)})});var gg=a.enum(["subscription","subject"]),hg=a.enum(["reported","action_inferred"]),_g=a.string().min(1).max(100).regex(/^[a-z0-9_.:-]+$/),vg=a.object({name:_g,display:a.string().min(1).max(120).optional(),scope:gg.default("subscription"),subjectType:a.string().min(1).max(64).regex(/^[a-zA-Z0-9_.:-]+$/).optional(),countSource:hg.default("reported")}).superRefine((e,t)=>{e.scope==="subject"&&!e.subjectType&&t.addIssue({code:"custom",path:["subjectType"],message:"subjectType is required when resource scope is subject"}),e.scope==="subscription"&&e.subjectType&&t.addIssue({code:"custom",path:["subjectType"],message:"subjectType is only valid for subject-scoped counted resources"})}),Ol=a.array(vg).max(100).default([]);var Gx=a.object({key:a.string().min(1).max(64).regex(/^[a-z0-9_-]+$/,"AddOn key must be lowercase alphanumeric with hyphens/underscores"),name:a.string().min(1).max(100),description:a.string().max(500).optional(),recurring_fee_cents:a.number().int().nonnegative().default(0),billing_interval:we.default("month"),meters:a.array(de).default([]),grants:a.array(le).max(40).default([]),capability_limits:a.record(a.string().min(1).max(120),a.union([a.number().int().nonnegative(),a.boolean()])).default({}),featureGates:a.record(a.string(),a.boolean()).optional(),selfServeEnabled:a.boolean().default(!0)}),bg=a.record(a.string().min(1).max(64),Gx).default({}),Kx=a.enum(["active","canceled","paused","pending_activation"]),vP=a.object({addOnKey:a.string().min(1).max(64),status:Kx.default("active"),activatedAt:a.string().datetime().optional(),canceledAt:a.string().datetime().nullable().optional(),stripeSubscriptionItemId:a.string().optional()});var yg=/^[a-z0-9][a-z0-9_-]*$/,Tl=a.string().min(1).max(64).regex(yg,"backend id must be a lowercase slug ([a-z0-9][a-z0-9_-]*)"),xg=a.enum(["public_origin","mtls","cloudflare_tunnel"]),kg=a.enum(["managed_cloudflared","sidecar"]);var Sg=a.object({mode:xg.default("public_origin"),runner:kg.optional()}).strict(),$g=a.object({required:a.boolean().default(!1)}).strict(),Ig=a.object({name:a.string().min(1).max(120).optional(),slug:Tl.optional(),transport:Sg.default({mode:"public_origin"}),verification:$g.default({required:!1}),meters:a.array(a.string().min(1).max(64)).max(100).optional(),default:a.boolean().optional(),originUrl:a.string().url().optional(),originHostname:a.string().min(1).max(255).optional()}).strict(),Pl=a.record(Tl,Ig),Ut=Tl,jt={unknownBackendInRoute:"UNKNOWN_BACKEND_IN_ROUTE",ambiguousDefaultBackend:"AMBIGUOUS_DEFAULT_BACKEND",routeMeterNotAllowedByBackend:"ROUTE_METER_NOT_ALLOWED_BY_BACKEND",unknownMeterInBackend:"UNKNOWN_METER_IN_BACKEND"};function Al(e){let t=Object.keys(e??{});if(t.length===0)return{defaultId:null,ambiguous:!1};if(t.length===1)return{defaultId:t[0],ambiguous:!1};let r=t.filter(o=>e[o]?.default===!0);return r.length===1?{defaultId:r[0],ambiguous:!1}:{defaultId:null,ambiguous:!0}}var Wx=a.string().min(2).max(20).regex(/^\d+(ms|s|m|h)$/,"rate_limit window must look like `60s`, `5m`, `1h`"),Eg=a.object({strategy:a.enum(["token_bucket","sliding_window","fixed_window"]).default("token_bucket"),dimensions:a.array(a.enum(["subscription","credential","ip","route"])).min(1).max(4).default(["subscription"]),limits:a.array(a.object({window:Wx,max:a.number().int().positive().max(1e7)})).min(1).max(10),fail_open:a.object({max_consecutive_failures:a.number().int().positive().default(100),max_window_seconds:a.number().int().positive().default(60),recovery_threshold:a.number().int().positive().default(50),degraded_mode:a.enum(["safe_mode_block","safe_mode_throttle","runtime_killswitch_trigger"]).default("safe_mode_throttle")}).default({max_consecutive_failures:100,max_window_seconds:60,recovery_threshold:50,degraded_mode:"safe_mode_throttle"})}),wg=a.object({header_name:a.string().min(1).max(100).default("x-api-key"),upstream_token_source:a.discriminatedUnion("type",[a.object({type:a.literal("none")}),a.object({type:a.literal("static_bearer"),token_secret_ref:a.string().min(1).max(200).describe("Reference into the secret store (e.g. CF Secret name); not the raw token")})]).default({type:"none"}),scope_mode:a.enum(["strict","advisory","off"]).default("strict")}),Og=a.object({max_in_flight:a.number().int().positive().max(1e4),dimensions:a.array(a.enum(["subscription","credential","capability"])).min(1).max(3).default(["subscription"]),capability:a.string().min(1).max(120).optional(),lease_ttl_seconds:a.number().int().positive().max(600).default(30),fail_open:a.object({max_consecutive_failures:a.number().int().positive().default(50),max_window_seconds:a.number().int().positive().default(60),recovery_threshold:a.number().int().positive().default(20),degraded_mode:a.enum(["safe_mode_block","safe_mode_throttle","runtime_killswitch_trigger"]).default("safe_mode_throttle")}).default({max_consecutive_failures:50,max_window_seconds:60,recovery_threshold:20,degraded_mode:"safe_mode_throttle"})}),Tg=a.object({max_attempts:a.number().int().min(1).max(5).default(2),retry_on_status:a.array(a.number().int().min(400).max(599)).min(1).max(20).default([502,503,504]),backoff:a.object({initial_ms:a.number().int().positive().max(5e3).default(100),multiplier:a.number().positive().max(10).default(2),jitter:a.enum(["none","full","equal"]).default("equal"),total_budget_ms:a.number().int().positive().max(3e4).default(5e3)}).default({initial_ms:100,multiplier:2,jitter:"equal",total_budget_ms:5e3})}),Pg=a.object({applies_to:a.enum(["request","response","both"]).default("request"),rewrites:a.array(a.object({source:a.string().min(1).max(200),target:a.string().min(1).max(200).nullable()})).min(1).max(20)});var Nl=a.discriminatedUnion("type",[a.object({type:a.literal("rate_limit"),config:Eg}),a.object({type:a.literal("auth"),config:wg}),a.object({type:a.literal("concurrency"),config:Og}),a.object({type:a.literal("retry"),config:Tg}),a.object({type:a.literal("transform"),config:Pg})]);var Ci=a.enum(["long","short","blocking"]).default("long"),Ag=a.object({route_types:a.array(a.enum(["http"])).max(5).optional(),meters:a.array(a.string().min(1).max(64)).max(20).optional(),auth_modes:a.array(a.enum(["api_key","oauth2","anonymous"])).max(5).optional()});var Cl=a.intersection(a.object({name:a.string().min(1).max(64).regex(/^[a-z0-9_-]+$/,"Policy name must be lowercase alphanumeric with hyphens/underscores"),description:a.string().max(500).optional(),compatible_with:Ag.default({}),mutation_class:a.enum(["runtime","contractual"]).default("runtime"),cacheProfile:Ci}),Nl);var qx=a.enum(["query","mutation"]),Jx=a.enum(["none","metadata","full"]),Yx=a.object({type:a.string().min(1).max(64).regex(/^[a-zA-Z0-9_.:-]+$/),from:a.enum(["header","path_param"]),name:a.string().min(1).max(120)}),Xx=a.object({resource:a.string().min(1).max(100).regex(/^[a-z0-9_.:-]+$/),effect:a.enum(["create","delete"])}),Ng=a.object({id:a.string().min(1).max(160).regex(/^[a-z0-9_.:-]+$/),title:a.string().min(1).max(160).optional(),kind:qx,actorType:a.string().min(1).max(64).regex(/^[a-zA-Z0-9_.:-]+$/).optional(),subject:Yx.optional(),inputSchemaRef:a.string().min(1).max(240).optional(),audit:Jx.default("metadata"),resource:Xx.optional()});var Cg=a.object({method:a.enum(["GET","POST","PUT","PATCH","DELETE","HEAD","OPTIONS","*"]).default("*"),path:a.string().min(1).max(500).regex(/^\/[a-zA-Z0-9_/:.{}*-]*$/,"path must start with / and contain only [a-zA-Z0-9_/:.{}*-]")});function Qx(e){let t=e.trim();if(!t)return!1;let[r,o,n]=t.split("-");if(n!==void 0||!/^\d{3}$/.test(r??""))return!1;let i=Number(r),s=o===void 0?i:Number(o);return o!==void 0&&!/^\d{3}$/.test(o)?!1:i>=100&&i<=599&&s>=100&&s<=599&&i<=s}function Rg(e){return e.split(",").every(Qx)}var Ri=a.union([a.string().min(1).max(100).refine(Rg,{message:"onStatusCodes must be comma-separated HTTP status codes or numeric ranges, e.g. 200-299,304"}),a.array(a.number().int().min(100).max(599)).min(1).max(100)]),Dg=a.object({match:Cg,metering:a.object({defaults:a.record(a.string().min(1).max(64),a.number().finite().nonnegative()).optional(),reports:a.array(a.string().min(1).max(64)).max(20).optional(),estimates:a.record(a.string().min(1).max(64),a.number().finite().nonnegative()).optional(),onStatusCodes:Ri.optional()}).optional(),unmetered:a.boolean().optional(),inheritDefaultMeters:a.boolean().optional(),action:a.string().min(1).max(160).regex(/^[a-z0-9_.:-]+$/).optional(),backend:Ut.optional()}).strict(),zg=a.object({override_origin:a.string().url("override_origin must be a valid URL").nullable().default(null)}),Ug=a.object({rollout_key:a.string().min(1).max(120).regex(/^[a-z0-9_-]+$/,"rollout_key must be lowercase alphanumeric with hyphens/underscores").optional(),required_flags:a.array(a.string().min(1).max(120).regex(/^[a-z0-9_-]+$/)).max(10).optional()}),Rl=a.object({feature:a.string().min(1).max(100).regex(/^[a-z0-9_.:-]+$/,"feature key must be lowercase alphanumeric with [_.:-]"),description:a.string().max(500).optional(),mutation_class:a.enum(["runtime","contractual"]).default("contractual"),cacheProfile:Ci,routes:a.array(Dg).min(1).max(50),upstream:zg.default({override_origin:null}),policies:a.array(a.string().min(1).max(64).regex(/^[a-z0-9_-]+$/)).max(20).default([]),runtime:Ug.default({}),plans:a.array(a.string().min(1).max(64)).max(20).default([]),actions:a.array(Ng).max(100).optional(),backend:Ut.optional()}).strict();function jg(e,t){e.usagePricing!==void 0&&t.addIssue({code:"custom",path:["usagePricing"],message:"usagePricing is not supported. Define usage.meters.<key>.rating instead."})}function Lg(e,t){e.filter(o=>o.free).length>1&&t.addIssue({code:"custom",path:["plans"],message:"Only one free plan is allowed per product"}),e.forEach((o,n)=>{o.free&&(ek(o,n,t),tk(o,n,t))})}function ek(e,t,r){(Gg(e)??0)!==0&&r.addIssue({code:"custom",path:["plans",t,"recurring_fee_cents"],message:"Free plans must have zero price"})}function tk(e,t,r){e.limits.some(n=>!n.enforcement||n.enforcement==="enforce")||r.addIssue({code:"custom",path:["plans",t,"limits"],message:"Free plans must include at least one hard enforced limit"})}function Mg(e,t){let r=new Map;e.forEach((o,n)=>{if(o.free)return;let i=Gg(o);if(i===void 0||i<=0)return;let s=ak(o,i),c=r.get(s);if(c){t.addIssue({code:"custom",path:["plans",n,"recurring_fee_cents"],message:`Paid plan price duplicates plan "${c}" (${s})`});return}r.set(s,o.key)})}function Fg(e,t){let r=new Set((e.metering?.meters??[]).map(n=>n.key).filter(n=>typeof n=="string"&&n.length>0)),o=new Set(Object.keys(e.usage?.meters??{}));e.plans.forEach((n,i)=>{let s=n.meters;s&&s.forEach((c,u)=>{let l=c.dimension;typeof l!="string"||l.length===0||r.has(l)||o.has(l)||t.addIssue({code:"custom",path:["plans",i,"meters",u,"dimension"],message:`Plan "${n.key}" prices meter "${l}" but no metering.meters[] entry and no usage.meters[] entry declares it.`})})})}function Zg(e,t){if(!e.features)return;let r=new Set(e.plans.map(o=>o.key));for(let[o,n]of Object.entries(e.features)){if(!n.plans)continue;n.plans.forEach((s,c)=>{r.has(s)||t.addIssue({code:"custom",path:["features",o,"plans",c],message:`Feature "${o}" references unknown plan "${s}"`})});let i=new Set;n.plans.forEach((s,c)=>{i.has(s)&&t.addIssue({code:"custom",path:["features",o,"plans",c],message:`Feature "${o}" lists plan "${s}" more than once`}),i.add(s)})}}function Vg(e,t){if(!e.features)return;let r=new Set((e.metering?.meters??[]).map(n=>n.key).filter(n=>typeof n=="string"&&n.length>0)),o=!1;for(let[n,i]of Object.entries(e.features))(i.routes??[]).forEach((c,u)=>{let l=Dl(c);l.length!==0&&(o=!0,l.forEach((d,m)=>{r.has(d)||t.addIssue({code:"custom",path:["features",n,"routes",u,"metering",m],message:`Route references unknown meter "${d}". Declare it in metering.meters[].`})}))});o&&r.size===0&&t.addIssue({code:"custom",path:["metering","meters"],message:"One or more routes declare metering keys but `metering.meters[]` is empty. Declare meters at the product level first."})}function nk(e,t){let r=new Map;for(let o of e.plans)r.set(o.key,new Set);if(!e.features){for(let o of r.values())for(let n of t)o.add(n);return r}for(let o of Object.values(e.features))rk(o,r);return r}function rk(e,t){let r=e.plans??[],o=e.routes??[];for(let n of r){let i=t.get(n);if(i)for(let s of o){if(s.unmetered===!0)continue;let c=Dl(s);if(c.length>0){for(let u of c)i.add(u);continue}}}}function Dl(e){let t=new Set;for(let r of Object.keys(e.metering?.defaults??{}))t.add(r);for(let r of e.metering?.reports??[])t.add(r);for(let r of Object.keys(e.metering?.estimates??{}))t.add(r);return[...t]}function ik(e){if(!e||typeof e!="object")return null;let t=e;return typeof t.dimension=="string"?t.dimension:null}var ok=new Set(["credits"]);function Bg(e,t){if(!e.plans||e.plans.length===0)return;let r=new Set((e.metering?.meters??[]).map(i=>i.key).filter(i=>typeof i=="string"&&i.length>0)),o=new Set(Object.keys(e.usage?.meters??{})),n=nk(e,r);e.plans.forEach((i,s)=>{let c=i.limits??[],u=n.get(i.key)??new Set;c.forEach((l,d)=>{if(l&&typeof l=="object"?l.acknowledgeUnreachable===!0:!1)return;let g=ik(l);g&&(u.has(g)||o.has(g)||ok.has(g)||t.addIssue({code:"custom",path:["plans",s,"limits",d,"meter"],message:`Plan "${i.key}" limits meter "${g}" but no route in any granted feature emits this meter, and the meter is not declared under usage.meters either. Either grant a feature whose routes meter "${g}" to this plan, declare the meter under metering.meters[] or usage.meters, or set acknowledgeUnreachable: true if the limit is intentional (e.g. soft budget).`}))})})}function Hg(e,t){let r=e.backend;if(!r||Object.keys(r).length===0)return;let o=new Set(Object.keys(r)),n=new Set((e.metering?.meters??[]).map(u=>u.key).filter(u=>typeof u=="string"&&u.length>0));for(let[u,l]of Object.entries(r))(l.meters??[]).forEach((d,m)=>{n.has(d)||t.addIssue({code:"custom",path:["backend",u,"meters",m],message:`${jt.unknownMeterInBackend}: backend "${u}" allows meter "${d}" but no metering.meters[] entry declares it.`})});let{defaultId:i,ambiguous:s}=Al(r),c=!1;for(let u of Object.values(e.features??{}))for(let l of u.routes??[])l.backend===void 0&&(c=!0);s&&c&&t.addIssue({code:"custom",path:["backend"],message:`${jt.ambiguousDefaultBackend}: product declares ${o.size} backends but no single default \u2014 mark exactly one backend \`default: true\` or bind every route explicitly.`});for(let[u,l]of Object.entries(e.features??{}))(l.routes??[]).forEach((d,m)=>{let g=d.backend??i;if(d.backend!==void 0&&!o.has(d.backend)){t.addIssue({code:"custom",path:["features",u,"routes",m,"backend"],message:`${jt.unknownBackendInRoute}: route binds backend "${d.backend}" which is not declared in the product \`backend\` block.`});return}if(!g)return;let S=r[g]?.meters;if(!S)return;let C=new Set(S);for(let A of Dl(d))C.has(A)||t.addIssue({code:"custom",path:["features",u,"routes",m,"metering"],message:`${jt.routeMeterNotAllowedByBackend}: route meters "${A}" but backend "${g}" does not allow it (backend.meters[] = [${S.join(", ")}]).`})})}function Gg(e){return e.recurring_fee_cents}function ak(e,t){return`USD:month:${t}`}var sk=a.object({subdomain:a.string().min(1).max(63).regex(/^[a-z0-9]([a-z0-9-]*[a-z0-9])?$/,"Subdomain must be lowercase alphanumeric with optional hyphens")}),ck=a.enum(["exact_pre_request","estimated_then_settled","postpaid","strict_concurrency"]),zl=a.object({key:a.string().min(1).max(64).regex(/^[a-z0-9_]+$/,"Meter key must be lowercase alphanumeric with underscores"),display:a.string().min(1).max(100),unit:a.string().max(20).optional(),estimate:a.number().finite().nonnegative().optional(),routeDefault:a.number().finite().nonnegative().optional(),enforcementType:ck.default("estimated_then_settled"),aggregation:a.enum(["SUM","COUNT","MAX","UNIQUE_COUNT","LATEST"]).default("COUNT"),window:a.enum(["minute","hour","day","month","billing_period"]).default("billing_period"),valueProperty:a.string().optional(),uniqueProperty:a.string().optional(),groupBy:a.array(a.string()).optional(),eventCode:a.string().optional()}),Kg=a.string().min(1).max(64).regex(/^[a-z0-9_]+$/,"Usage measure must be lowercase alphanumeric with underscores"),uk=a.enum(["pass_through","markup"]),lk=a.object({source:a.literal("fixed"),rates:a.record(a.string().min(1),a.record(Kg,a.number().int().nonnegative()))}),dk=a.object({source:a.literal("provider_catalog"),catalog:a.string().min(1).max(100),pricePolicy:uk.default("pass_through"),markupPercent:a.number().nonnegative().max(1e4).optional(),marginMicros:a.number().int().nonnegative().optional()}),Wg=a.discriminatedUnion("source",[lk,dk]),qg=a.object({selector:a.string().min(1).max(100).optional(),measures:a.array(Kg).min(1).max(20),rating:Wg.optional()}),Jg=a.object({meters:a.record(a.string().min(1).max(64).regex(/^[a-z0-9_]+$/),qg)}),mk=a.object({defaults:a.record(a.string().min(1).max(64),a.number().finite().nonnegative()).optional(),reports:a.array(a.string().min(1).max(64)).max(20).optional(),estimates:a.record(a.string().min(1).max(64),a.number().finite().nonnegative()).optional(),onStatusCodes:Ri.optional()}),Yg=a.object({method:a.enum(["GET","POST","PUT","PATCH","DELETE","HEAD","OPTIONS","*"]).default("*"),path:a.string().min(1).max(500).regex(/^\/[a-zA-Z0-9_/:.{}*-]*$/,"path must start with / and contain only [a-zA-Z0-9_/:.{}*-]"),unmetered:a.boolean().optional(),metering:mk.optional(),inheritDefaultMeters:a.boolean().optional(),backend:Ut.optional()}).strict(),Ul=a.object({description:a.string().max(500).optional(),routes:a.array(Yg).min(1).max(50),plans:a.array(a.string().min(1)).min(1).max(20)}),Xg=a.record(a.string().min(1).max(100).regex(/^[a-z0-9_.:-]+$/),Ul),Qg=a.enum(["report","pull_request"]),eh=a.enum(["safe","non_blocking","economic_risk","blocking"]),th=a.object({cleanup:a.object({enabled:a.boolean().default(!1),mode:Qg.default("report")}).default({enabled:!1,mode:"report"}),change_approval:a.object({auto_merge_max_risk:a.enum(["none","safe","non_blocking"]).default("none"),require_human_for:a.array(eh).default(["economic_risk","blocking"])}).default({auto_merge_max_risk:"none",require_human_for:["economic_risk","blocking"]})}).default({cleanup:{enabled:!1,mode:"report"},change_approval:{auto_merge_max_risk:"none",require_human_for:["economic_risk","blocking"]}}),nh=a.enum(["org_only","org_and_user"]),rh=a.enum(["clerk","test-personas"]),ih=a.object({identity_requirement:nh.optional(),context_tokens:a.object({enabled:a.boolean().default(!0)}).optional(),portal_auth:a.object({strategy:rh}).optional()}),oh=a.enum(["frontend","api","docs","widget","dashboard","webhook","worker","agent"]),ah=a.object({key:a.string().min(1).max(64).regex(/^[a-z0-9_-]+$/,"Surface key must be lowercase alphanumeric with hyphens/underscores"),type:oh,display:a.string().min(1).max(100).optional(),description:a.string().max(500).optional()}),sh=a.object({key:a.string().min(1).max(64).regex(/^[a-z0-9_-]+$/,"Entitlement key must be lowercase alphanumeric with hyphens/underscores"),description:a.string().max(500).optional(),capabilities:a.array(a.string().min(1).max(100)).max(100).optional(),featureGates:a.record(a.string().min(1),a.boolean()).optional(),limits:a.array(je).max(100).optional(),meters:a.array(a.string().min(1).max(64)).max(100).optional()}),ch=a.array(ah).max(20).default([]),uh=a.array(sh).max(100).default([]),lh=a.enum(["async_job","agent_task","scheduled","lifecycle","background"]),dh=a.discriminatedUnion("type",[a.object({type:a.literal("manual")}),a.object({type:a.literal("schedule"),cron:a.string().min(1).max(120)}),a.object({type:a.literal("event"),event:a.string().min(1).max(120)}),a.object({type:a.literal("api"),path:a.string().min(1).max(240).regex(/^\//,"path must start with /")}),a.object({type:a.literal("lifecycle"),event:a.string().min(1).max(120)})]),mh=a.object({key:a.string().min(1).max(64).regex(/^[a-z0-9_-]+$/,"Workflow key must be lowercase alphanumeric with hyphens/underscores"),title:a.string().min(1).max(120).optional(),description:a.string().max(1e3).optional(),kind:lh,trigger:dh,capabilities:a.array(a.string().min(1).max(100)).max(100).optional(),meters:a.array(a.string().min(1).max(64)).max(100).optional(),estimates:a.record(a.string().min(1).max(64),a.number().finite()).optional(),metadata:a.record(a.string().min(1),a.unknown()).optional()}),ph=a.array(mh).max(100).default([]),Xe=a.object({product:a.object({name:a.string().min(1).max(100),displayName:a.string().max(200).optional(),description:a.string().max(2e3).optional(),baseUrl:a.string().url("baseUrl must be a valid URL"),sandboxBaseUrl:a.string().url("sandboxBaseUrl must be a valid URL").optional(),visibility:a.enum(["public","private"]).default("public"),logoUrl:a.string().url().optional(),primaryColor:a.string().regex(/^#[0-9a-fA-F]{6}$/).optional(),envBranchPrefix:a.string().max(50).nullable().optional()}),gateway:a.object({authHeader:a.string().min(1).max(100).default("x-api-key"),upstreamAuth:a.object({type:a.enum(["none","static_bearer"]),token:a.string().optional()}).default({type:"none"})}),metering:a.object({meters:a.array(zl).max(10).default([]),billOn4xx:a.boolean().default(!1)}).default({meters:[],billOn4xx:!1}),backend:Pl.optional(),usage:Jg.optional(),usagePricing:a.never({error:"usagePricing is not supported. Define usage.meters.<key>.rating instead."}).optional(),features:Xg.optional(),resources:Ol,policies:th,customer_context:ih.optional(),surfaces:ch,entitlements:uh,workflows:ph,frontend:Il.optional(),migrations:wl.optional(),billing:a.object({applyLimitUpgradesInstantly:a.boolean().optional(),subscriberChangePolicy:Nn.default({default:"period_end",when:{price_increase:"period_end",price_decrease:"immediate",feature_added:"immediate",feature_removed:"period_end",limit_increased:"immediate",limit_reduced:"period_end",credit_increased:"immediate",credit_reduced:"period_end",rating_changed:"period_end"},allowImmediatePriceIncrease:!1,allowImmediateEntitlementReduction:!1})}).default({subscriberChangePolicy:{default:"period_end",when:{price_increase:"period_end",price_decrease:"immediate",feature_added:"immediate",feature_removed:"period_end",limit_increased:"immediate",limit_reduced:"period_end",credit_increased:"immediate",credit_reduced:"period_end",rating_changed:"period_end"},allowImmediatePriceIncrease:!1,allowImmediateEntitlementReduction:!1}}),plans:a.array(Ni).max(4).default([]),add_ons:bg,lifecycle:a.object({breaking_changes:a.object({require_deprecation_window_days:a.number().int().nonnegative().default(0),require_successor_route:a.boolean().default(!1)}).default({require_deprecation_window_days:0,require_successor_route:!1})}).default({breaking_changes:{require_deprecation_window_days:0,require_successor_route:!1}}),webhooks:kl.optional(),environments:Sl.optional(),ephemeral:a.object({defaultPlan:a.string().min(1).optional()}).optional()}).superRefine((e,t)=>{jg(e,t),Lg(e.plans,t),Mg(e.plans,t),Fg(e,t),Zg(e,t),Vg(e,t),Bg(e,t),Hg(e,t)}),pk=a.object({product:Xe.shape.product}),fk=a.object({gateway:Xe.shape.gateway}),gk=a.object({metering:Xe.shape.metering}),hk=a.object({plans:Xe.shape.plans});var jl=a.object({capability:a.string().min(1).max(120).regex(/^[a-z0-9_-]+$/,"capability name must be lowercase alphanumeric with hyphens/underscores"),description:a.string().max(500).optional(),mutation_class:a.enum(["runtime","contractual"]).default("contractual"),includes_features:a.array(a.string().min(1).max(100).regex(/^[a-z0-9_.:-]+$/)).max(20).default([]),includes_policies:a.array(a.string().min(1).max(64).regex(/^[a-z0-9_-]+$/)).max(20).default([]),includes_capabilities:a.array(a.string().min(1).max(120).regex(/^[a-z0-9_-]+$/)).max(20).default([])});var fh=1;var _k=a.object({irVersion:a.literal(fh),sdkVersion:a.string().min(1).max(64),product:Xe,routes:a.array(Rl).max(200).default([]),policies:a.array(Cl).max(200).default([]),capabilities:a.array(jl).max(200).default([])}).strict();var CA=a.object({subscriberChangePolicy:Nn.optional()}),RA=a.object({code:a.string(),kind:a.enum(["percent_off","amount_off","free_months"]),amount:a.number().optional(),durationMonths:a.number(),applicablePlanIds:a.array(a.string()).optional(),maxRedemptions:a.number().optional(),activeFrom:a.string().optional(),activeUntil:a.string().optional(),status:a.enum(["ACTIVE","ARCHIVED"]).optional()}),DA=a.object({id:a.string(),actorUserId:a.string().optional(),action:a.string(),decision:a.string().optional(),timestamp:a.string(),details:a.unknown().optional()}),zA=a.object({name:a.string(),branch:a.string().optional(),isProduction:a.boolean().optional()}),UA=a.object({id:a.string(),name:a.string(),apiKeyId:a.string().optional()});var vk=["IMMEDIATE_NO_PRORATE","IMMEDIATE_PRORATE_CHARGE_NEW","IMMEDIATE_PRORATE_REFUND_OLD","IMMEDIATE_PRORATE_BOTH","DEFER_TO_PERIOD_END"],BA=a.enum(vk);var gh=a.object({id:a.string(),billingCycleId:a.string(),effectiveStart:a.string(),effectiveEnd:a.string(),compiledPlanId:a.string()}),hh=a.object({currentPeriod:gh,priorPeriod:gh.optional()});var bk=a.object({subjectKey:a.string(),subscriptionId:a.string(),subscriberId:a.string(),productId:a.string(),organizationId:a.string(),compiledPlanId:a.string(),activeEntitlementHash:a.string().optional(),generation:a.number(),enforcementMode:a.enum(["STRICT","GRACE","TRACK_ONLY"]),dedicatedShard:a.enum(["ACTIVE","DRAINING"]).optional(),resourceCounts:a.record(a.string(),a.number()).optional(),overrides:a.object({featureGateOverrides:a.record(a.string(),a.boolean()).optional()}).optional(),subscriptionStatus:a.string(),subscriberStatus:a.string(),scopes:a.array(a.string()),periods:hh,expiresAt:a.number().optional(),trialEndsAt:a.string().optional()}),yk=a.discriminatedUnion("kind",[a.object({kind:a.literal("found"),state:bk,expiresAt:a.number(),ttlSeconds:a.number()}),a.object({kind:a.literal("not_found"),negativeCacheTtlSeconds:a.number().default(60)}),a.object({kind:a.literal("revoked"),negativeCacheTtlSeconds:a.number().default(300),reason:a.string().optional()}),a.object({kind:a.literal("rate_limited"),retryAfterSeconds:a.number().default(10)})]),JA=a.object({environmentId:a.string().nullable(),subjectKeys:a.array(a.string()).min(1).max(500)}),YA=a.object({results:a.array(a.object({subjectKey:a.string(),result:yk}))}),xk=a.object({keyId:a.string(),orgId:a.string(),productId:a.string(),compiledPlanId:a.string(),entitlementHash:a.string().optional(),subscriptionId:a.string(),subscriberId:a.string(),apiKeyId:a.string().nullable(),subjectKey:a.string(),entitlementVersion:a.number().int(),identityRequirement:a.enum(["org_only","org_and_user"]),status:a.enum(["active","revoked"]),subscriberStatus:a.enum(["ONBOARDING","ACTIVE","SUSPENDED"]),subscriptionStatus:a.string(),environment:a.enum(["production","sandbox"]).optional(),environmentId:a.string().optional(),scopes:a.array(a.string()).default([]),entitlement:a.unknown().optional(),actorType:a.enum(["org","user"]).optional(),actorId:a.string().nullable().optional(),currentPeriodId:a.string().optional(),currentPeriodStartMs:a.number().int().nonnegative().optional(),expiresAt:a.number().nullable().optional()}),XA=a.discriminatedUnion("kind",[a.object({kind:a.literal("found"),record:xk,expiresAt:a.number(),ttlSeconds:a.number()}),a.object({kind:a.literal("not_found"),negativeCacheTtlSeconds:a.number().default(60)}),a.object({kind:a.literal("revoked"),negativeCacheTtlSeconds:a.number().default(300),reason:a.string().optional()}),a.object({kind:a.literal("rate_limited"),retryAfterSeconds:a.number().default(10)})]),QA=a.discriminatedUnion("kind",[a.object({kind:a.literal("found"),entitlement:a.unknown(),expiresAt:a.number(),ttlSeconds:a.number()}),a.object({kind:a.literal("not_found"),negativeCacheTtlSeconds:a.number().default(60)}),a.object({kind:a.literal("rate_limited"),retryAfterSeconds:a.number().default(10)})]),kk=a.object({id:a.string(),origin:a.string(),sandboxOrigin:a.string().nullable().optional(),authHeader:a.string().optional(),pricing:a.record(a.string(),a.number()).optional(),metering:a.object({tokens:a.object({estimatePerRequest:a.number().optional()}).optional(),computeMs:a.object({estimatePerRequest:a.number().optional()}).optional(),billOn4xx:a.boolean().optional()}).optional(),tenantLimits:a.array(a.object({unit:a.enum(["requests","tokens","computeMs","dollars"]),window:a.enum(["second","minute","hour","day","week","month"]),capacity:a.number()})).optional(),userLimits:a.array(a.object({unit:a.enum(["requests","tokens","computeMs","dollars"]),window:a.enum(["second","minute","hour","day","week","month"]),capacity:a.number()})).optional(),environmentId:a.string().optional(),contextTokenSecret:a.string().nullable().optional(),timeoutMs:a.number().positive().optional(),idleTimeoutMs:a.number().positive().optional()}),eN=a.discriminatedUnion("kind",[a.object({kind:a.literal("found"),tenant:kk,expiresAt:a.number(),ttlSeconds:a.number()}),a.object({kind:a.literal("not_found"),negativeCacheTtlSeconds:a.number().default(60)}),a.object({kind:a.literal("rate_limited"),retryAfterSeconds:a.number().default(10)})]);var Di=["consumer_api_key","consumer_session_token","test_persona_session_token","builder_master_key","builder_session_token","maker_jwt","service_jwt","internal_service","context_token"],_h=a.enum(Di);var Sk=a.object({fromIssuer:a.string().min(1),fromTokenId:a.string().min(1),intent:a.string().min(1)}),vh=a.object({issuer:a.string().min(1),issuedAt:a.number().int().nonnegative(),expiresAt:a.number().int().nonnegative().optional(),tokenId:a.string().min(1).optional(),delegationChain:a.array(Sk)});var Ll=["template","embedded","provisioned","agent"],$k=a.enum(Ll),Ik=["builder_user","builder_org","maker","consumer_subject","internal_service","service_jwt","agent_runtime"],Ek=a.enum(Ik),bh=a.object({kind:Ek,id:a.string().min(1),label:a.string().optional()}),wk=["subscription","organization","platform"],Ok=a.enum(wk),Tk=a.object({kind:Ok,id:a.string().min(1)}),Pk=a.object({type:_h,id:a.string().min(1),hint:a.string().max(8).optional()}),Ak=a.object({compiledPlanId:a.string().min(1),fromCache:a.boolean().optional()}),yh=a.object({requestId:a.string().min(1),surface:$k,builderOrgId:a.string().min(1),productId:a.string().min(1).optional(),runtimeId:a.string().min(1).optional(),template:a.string().optional(),caller:bh,actor:bh,billingSubject:Tk,credential:Pk,capability:a.string().min(1),scopes:a.array(a.string()),entitlement:Ak.optional(),trust:vh});var Rn;(function(e){e.AUTHZ_DECISION="authz_decision",e.ENTITLEMENT_DECISION="entitlement_decision",e.RUNTIME_LIMIT_DECISION="runtime_limit_decision",e.RESOURCE_GOVERNANCE_DECISION="resource_governance_decision",e.RESOURCE_MUTATION="resource_mutation",e.LIFECYCLE_EVENT="lifecycle_event",e.RUNTIME_CONTEXT_CREATED="runtime_context_created",e.SYSTEM_ACTION="system_action"})(Rn||(Rn={}));var xh=Object.values(Rn),bN=a.enum(xh),kh=a.object({decisionId:a.string().optional(),ctx:yh,details:a.record(a.string(),a.unknown()).optional(),createdAt:a.string().min(1)}),Nk=xh.filter(e=>e!==Rn.SYSTEM_ACTION),Ck=kh.extend({kind:a.enum(Nk)}),Rk=kh.extend({kind:a.literal(Rn.SYSTEM_ACTION),actorType:a.string().min(1),action:a.string().min(1)}),yN=a.discriminatedUnion("kind",[Ck,Rk]);var O=["template","agent"],Dk=["provisioned"],Sh=[...Ll],T=["builder_master_key","builder_session_token","maker_jwt"],Lt=["service_jwt","internal_service"],Ml=["consumer_api_key","consumer_session_token","test_persona_session_token","context_token"],$h=[...Di],Dn="subscriptions:write",zk=[{id:"products.create",operation:"Create a product",requiredScopes:["products:write"],allowedSurfaces:O,allowedCredentialTypes:T,description:"Create a new product in the builder org"},{id:"products.update",operation:"Update a product",requiredScopes:["products:write"],allowedSurfaces:O,allowedCredentialTypes:T,description:"Update product metadata or compiled config"},{id:"products.delete",operation:"Delete a product",requiredScopes:["products:write"],allowedSurfaces:O,allowedCredentialTypes:T,description:"Delete a product (soft-archive if subscriptions exist)"},{id:"products.read",operation:"Read a product",requiredScopes:["products:read"],allowedSurfaces:O,allowedCredentialTypes:T,description:"Read product metadata + compiled config"},{id:"products.publish",operation:"Publish a product",requiredScopes:["products:write"],allowedSurfaces:O,allowedCredentialTypes:T,description:"Compile + publish the product to the gateway"},{id:"plans.create",operation:"Create a plan",requiredScopes:["plans:write"],allowedSurfaces:O,allowedCredentialTypes:T,description:"Add a new plan to a product"},{id:"plans.update",operation:"Update a plan",requiredScopes:["plans:write"],allowedSurfaces:O,allowedCredentialTypes:T,description:"Update plan pricing, limits, or features"},{id:"plans.delete",operation:"Delete a plan",requiredScopes:["plans:write"],allowedSurfaces:O,allowedCredentialTypes:T,description:"Delete a plan (denied if subscriptions are attached)"},{id:"plans.publish",operation:"Publish a plan",requiredScopes:["plans:write"],allowedSurfaces:O,allowedCredentialTypes:T,description:"Mark a plan as available for new subscriptions"},{id:"subscriptions.create",operation:"Create a subscription",requiredScopes:[Dn],allowedSurfaces:O,allowedCredentialTypes:[...T,...Lt],description:"Provision a new subscription for a subscriber"},{id:"subscriptions.update",operation:"Update a subscription",requiredScopes:[Dn],allowedSurfaces:O,allowedCredentialTypes:[...T,...Lt],description:"Change plan, enforcement mode, or schedule"},{id:"subscriptions.cancel",operation:"Cancel a subscription",requiredScopes:[Dn],allowedSurfaces:O,allowedCredentialTypes:[...T,...Lt],description:"Cancel a subscription (immediate or end-of-period)"},{id:"subscriptions.pause",operation:"Pause a subscription",requiredScopes:[Dn],allowedSurfaces:O,allowedCredentialTypes:[...T,...Lt],description:"Pause a subscription (no usage, no billing)"},{id:"subscriptions.resume",operation:"Resume a subscription",requiredScopes:[Dn],allowedSurfaces:O,allowedCredentialTypes:[...T,...Lt],description:"Resume a paused subscription"},{id:"subscriptions.read",operation:"Read a subscription",requiredScopes:["subscriptions:read"],allowedSurfaces:O,allowedCredentialTypes:[...T,...Lt],description:"Read subscription state and usage"},{id:"webhooks.create",operation:"Create a webhook endpoint",requiredScopes:["webhooks:write"],allowedSurfaces:O,allowedCredentialTypes:T,description:"Register a new webhook endpoint URL"},{id:"webhooks.update",operation:"Update a webhook endpoint",requiredScopes:["webhooks:write"],allowedSurfaces:O,allowedCredentialTypes:T,description:"Update endpoint URL, secret, or subscribed events"},{id:"webhooks.delete",operation:"Delete a webhook endpoint",requiredScopes:["webhooks:write"],allowedSurfaces:O,allowedCredentialTypes:T,description:"Remove a webhook endpoint"},{id:"webhooks.test",operation:"Send a test webhook payload",requiredScopes:["webhooks:write"],allowedSurfaces:O,allowedCredentialTypes:T,description:"Trigger a synthetic payload to verify an endpoint"},{id:"api-keys.create",operation:"Create an API key",requiredScopes:["api-keys:write"],allowedSurfaces:O,allowedCredentialTypes:T,description:"Mint a new consumer or master API key"},{id:"api-keys.revoke",operation:"Revoke an API key",requiredScopes:["api-keys:write"],allowedSurfaces:O,allowedCredentialTypes:T,description:"Revoke an API key (immediate invalidation)"},{id:"api-keys.read",operation:"Read API key metadata",requiredScopes:["api-keys:read"],allowedSurfaces:O,allowedCredentialTypes:T,description:"Read key id + hint + scopes (never the secret)"},{id:"organizations.create",operation:"Create an organization",requiredScopes:["orgs:write"],allowedSurfaces:["template"],allowedCredentialTypes:["builder_session_token"],description:"Create a builder org (top-level signup)"},{id:"organizations.update",operation:"Update an organization",requiredScopes:["orgs:write"],allowedSurfaces:O,allowedCredentialTypes:T,description:"Update org metadata or billing email"},{id:"members.invite",operation:"Invite a member to an organization",requiredScopes:["members:write"],allowedSurfaces:O,allowedCredentialTypes:T,description:"Send an invitation to join the org"},{id:"members.remove",operation:"Remove a member from an organization",requiredScopes:["members:write"],allowedSurfaces:O,allowedCredentialTypes:T,description:"Revoke a member's access to the org"},{id:"projects.create",operation:"Create a project",requiredScopes:["projects:write"],allowedSurfaces:O,allowedCredentialTypes:T,description:"Create a project (groups products + environments)"},{id:"environments.create",operation:"Create an environment",requiredScopes:["environments:write"],allowedSurfaces:O,allowedCredentialTypes:T,description:"Add a deployment environment (stage / branch)"},{id:"environments.delete",operation:"Delete an environment",requiredScopes:["environments:write"],allowedSurfaces:O,allowedCredentialTypes:T,description:"Remove a deployment environment"},{id:"billing.portal-redirect",operation:"Generate Stripe customer-portal redirect",requiredScopes:["billing:portal"],allowedSurfaces:O,allowedCredentialTypes:[...T,...Ml],description:"Mint a one-time Stripe portal-session redirect URL"},{id:"billing.read",operation:"Read billing state",requiredScopes:["billing:read"],allowedSurfaces:O,allowedCredentialTypes:[...T,...Ml],description:"Read invoices, balances, scheduled changes"},{id:"runtime-context.read",operation:"Read the caller's runtime context",requiredScopes:[],allowedSurfaces:Sh,allowedCredentialTypes:$h,description:"Introspect the resolved RuntimeContext (minus secrets)"},{id:"capabilities.list",operation:"List registered capabilities",requiredScopes:[],allowedSurfaces:Sh,allowedCredentialTypes:$h,description:"List all capabilities the registry knows about"},{id:"explain-denial.read",operation:"Explain a denial decision",requiredScopes:["audit:read"],allowedSurfaces:O,allowedCredentialTypes:T,description:"Look up a decision id + return the full ctx + reason"},{id:"replay.execute",operation:"Replay a historical billing period",requiredScopes:["replay:execute"],allowedSurfaces:O,allowedCredentialTypes:T,description:"Re-run billing for a past period; verify deltas"},{id:"rollback.execute",operation:"Execute a GitHub-driven product rollback",requiredScopes:["rollback:execute"],allowedSurfaces:O,allowedCredentialTypes:T,description:"Revert product.config.ts to a previous commit (dry-run capable)"},{id:"api.invoke",operation:"Invoke a consumer-facing gateway route",requiredScopes:[],allowedSurfaces:Dk,allowedCredentialTypes:Ml,description:"Consumer-side traffic into a deployed product (catch-all). The EntitlementEngine + RuntimeLimitEngine handle the fine-grained gating; this capability is the umbrella entry-point."}],$N=Object.freeze(zk);var Uk=["ProductApplyWorkflow","RollbackWorkflow","StripeSyncWorkflow","WebhookDispatchWorkflow","SubscriptionTransitionWorkflow","CompiledPlanLifecycleWorkflow","ShardReshardWorkflow","MaintenanceJobWorkflow"],ON=a.enum(Uk),jk=["transient","permanent","rollback-required","human-intervention"],TN=a.enum(jk);var Lk=["SAFE_AUTOMATIC","REQUIRES_APPROVAL","IRREVERSIBLE","BILLING_IMPACTING","EDGE_BREAKING"],PN=a.enum(Lk);var zN=a.object({workflowExecutionId:a.string().min(1),eventType:a.string().min(1),phase:a.string().min(1).optional(),stepId:a.string().min(1).optional(),cohortKey:a.string().min(1).optional(),payload:a.record(a.string(),a.unknown()),occurredAt:a.string().min(1),correlationId:a.string().min(1).optional()}).transform(e=>({...e,workflowExecutionId:e.workflowExecutionId,stepId:e.stepId===void 0?void 0:e.stepId}));var Mk=["GATEWAY","HOSTED_UI_PAGE","HOSTED_UI_PROXY"],Fk=["platform_requests"],Zk=a.object({requestId:a.string().optional(),productId:a.string().optional(),route:a.string().optional(),usageEventId:a.string().optional()}).strict(),Vk=a.object({organizationId:a.string().min(1),source:a.enum(Mk),dimension:a.enum(Fk),quantity:a.number().int().positive(),idempotencyKey:a.string().min(1).max(512),occurredAt:a.string().datetime(),metadata:Zk.optional()}).strict(),iC=a.object({entries:a.array(Vk).min(1).max(500)});var Bk={MANAGED_BY_CODE:"This product's contract is managed as code. Edit the Product SDK program in its GitHub repo (product/) and push \u2014 do NOT retry the API. (Branding stays editable via `farthershore product update`.)",UNAUTHORIZED:"Token is invalid or revoked. Run `farthershore auth login` to update it.",FORBIDDEN:"Your token doesn't have access to this resource. Check the org / product scope.",INVALID_ACCESS_KEY:"Token format is wrong. Generate a new one at https://farthershore.com/settings/tokens.",MAKER_TOKEN_REVOKED:"This maker token was revoked. Mint a new one in the product settings.",MAKER_TOKEN_NO_PRODUCT:"Maker token is not bound to a product. Re-create it from the product page.",AUTH_NO_TOKEN:"Pass --token <mk_...> or set FARTHERSHORE_TOKEN, or run interactively in a TTY.",AUTH_INVALID_TOKEN:"Token format is malformed. Maker tokens start with `mk_` and are 30+ characters.",DESTRUCTIVE_OP_REQUIRES_YES:"Destructive ops (delete) require an explicit `--yes` to proceed. This is intentional safety.",PRODUCT_UPDATE_NO_FIELDS:"Pass at least one field flag (--display-name, --origin, --description).",PLAN_UPDATE_NO_FIELDS:"Pass at least one of --name, --recurring-fee-cents, --grant, --trial-days, --max-monthly-spend-cents, or --meter.",ENV_NOT_FOUND:"Environment doesn't exist. Use `farthershore env list <product>` to see available envs, or create one with `farthershore env create`.",STRIPE_NOT_CONFIGURED:"Stripe isn't connected on this product. Connect it in the dashboard before running billing operations.",STRIPE_NOT_CONNECTED:"Publishing requires a connected Stripe account. Connect one on the dashboard Connections page, then re-run `farthershore product publish`.",STRIPE_NOT_VERIFIED:"Your Stripe account isn't fully verified yet. Finish Stripe onboarding, then re-run `farthershore product publish`.",BILLING_TAX_NOT_ENROLLED:"Stripe Tax isn't enrolled for this account. Enable it from the dashboard Connections page, then re-run `farthershore product publish`.",STRIPE_BALANCE_OUTSTANDING:"Customer has an outstanding balance. Resolve the invoice in Stripe before retrying.",CHECKOUT_SESSION_FAILED:"Stripe rejected the checkout request. Check that the plan exists and Stripe credentials are valid.",PRODUCT_NOT_FOUND:"Check the product slug. Run `farthershore` (no args) for a list of products you can see.",PRODUCT_REPO_NOT_LINKED:"Link a GitHub repo to this product before publishing or validating product manifests.",YAML_PARSE_ERROR:"Product manifest is not valid. Run `farthershore build` locally, fix product/ source, then push again for bot validation.",GITHUB_NOT_CONNECTED:"Connect GitHub on the org page before running `init` (it provisions the repo).",BRANCH_NO_MATCHING_ENV:"The current branch isn't mapped to an environment. Add a branch rule in product settings or pass --branch explicitly.",PLAN_NOT_FOUND:"Plan key doesn't exist on this product. Check the `plans` block in your local product manifest.",PLAN_HAS_ACTIVE_SUBSCRIPTIONS:"Plan has active subscribers and can't be deleted. Migrate them to another plan first.",PLAN_SLUG_CONFLICT:"Another plan already uses this key. Pick a unique plan key in your manifest.",SLUG_CONFLICT:"This product slug is taken. Pick a different name.",SLUG_BLOCKED:"This slug is reserved or blocked. Pick a different name.",SLUG_RESERVED:"This slug is reserved by Farther Shore. Pick a different name.",SLUG_INVALID_FORMAT:"Slug must be lowercase letters, digits, and hyphens (no leading/trailing hyphen).",DECISION_NOT_FOUND:"No DenialEvent recorded for that decisionId. Verify the id from the original deny response or audit log.",AUTH_UNAUTHORIZED:"Token is missing, expired, or lacks the audit:read scope required to read denial events.",RATE_LIMIT_EXCEEDED:"You've hit the rate limit. Wait a moment and retry.",VALIDATION_ERROR:"Request is malformed. The `details` field has the field-level errors.",CONFLICT:"The resource is in a state that conflicts with the request. Inspect `details` to learn more."};function Fl(e){if(e)return Bk[e]}function Eh(e){process.stdout.write(`${JSON.stringify(e,null,2)}
98
- `)}function Hk(e,t){return{schema_version:1,ok:!0,op:e,data:t}}function Gk(e,t){let r=t.status??0;return{schema_version:1,ok:!1,op:e,error:{code:t.code??"INTERNAL_ERROR",message:t.message,status:r,param:t.param,retryable:qk(r,t.code),details:t.details,hint:Fl(t.code)}}}function H(e,t,r=Th()){if(ke()==="json"){Eh(Hk(r,e));return}t&&Ld(t)}function Kk(e){return e===0?1:e===400||e===422?2:e===401||e===403?3:e===409?4:e>=500?5:1}var Wk=new Set(["RATE_LIMIT_EXCEEDED","SERVICE_UNAVAILABLE"]);function qk(e,t){return e>=500||e===429||e===503?!0:t?Wk.has(t):!1}function Zl(e,t=Th()){let r=e.status??0;if(ke()==="json")Eh(Gk(t,e));else{let o=Fl(e.code),n=e.code?` [${e.code}]`:"";process.stderr.write(`Error${n}: ${e.message}
97
+ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let s of e.seen.entries()){let c=s[1];if(t===s[0]){i(s);continue}if(e.external){let l=e.external.registry.get(s[0])?.id;if(t!==s[0]&&l){i(s);continue}}if(e.metadataRegistry.get(s[0])?.id){i(s);continue}if(c.cycle){i(s);continue}if(c.count>1&&e.reused==="ref"){i(s);continue}}}function Me(e,t){let r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");let o=c=>{let u=e.seen.get(c);if(u.ref===null)return;let l=u.def??u.schema,d={...l},m=u.ref;if(u.ref=null,m){o(m);let h=e.seen.get(m),S=h.schema;if(S.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(l.allOf=l.allOf??[],l.allOf.push(S)):Object.assign(l,S),Object.assign(l,d),c._zod.parent===m)for(let P in l)P==="$ref"||P==="allOf"||P in d||delete l[P];if(S.$ref&&h.def)for(let P in l)P==="$ref"||P==="allOf"||P in h.def&&JSON.stringify(l[P])===JSON.stringify(h.def[P])&&delete l[P]}let g=c._zod.parent;if(g&&g!==m){o(g);let h=e.seen.get(g);if(h?.schema.$ref&&(l.$ref=h.schema.$ref,h.def))for(let S in l)S==="$ref"||S==="allOf"||S in h.def&&JSON.stringify(l[S])===JSON.stringify(h.def[S])&&delete l[S]}e.override({zodSchema:c,jsonSchema:l,path:u.path??[]})};for(let c of[...e.seen.entries()].reverse())o(c[0]);let n={};if(e.target==="draft-2020-12"?n.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?n.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?n.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){let c=e.external.registry.get(t)?.id;if(!c)throw new Error("Schema is missing an `id` property");n.$id=e.external.uri(c)}Object.assign(n,r.def??r.schema);let i=e.metadataRegistry.get(t)?.id;i!==void 0&&n.id===i&&delete n.id;let s=e.external?.defs??{};for(let c of e.seen.entries()){let u=c[1];u.def&&u.defId&&(u.def.id===u.defId&&delete u.def.id,s[u.defId]=u.def)}e.external||Object.keys(s).length>0&&(e.target==="draft-2020-12"?n.$defs=s:n.definitions=s);try{let c=JSON.parse(JSON.stringify(n));return Object.defineProperty(c,"~standard",{value:{...t["~standard"],jsonSchema:{input:At(t,"input",e.processors),output:At(t,"output",e.processors)}},enumerable:!1,writable:!1}),c}catch{throw new Error("Error converting schema to JSON.")}}function X(e,t){let r=t??{seen:new Set};if(r.seen.has(e))return!1;r.seen.add(e);let o=e._zod.def;if(o.type==="transform")return!0;if(o.type==="array")return X(o.element,r);if(o.type==="set")return X(o.valueType,r);if(o.type==="lazy")return X(o.getter(),r);if(o.type==="promise"||o.type==="optional"||o.type==="nonoptional"||o.type==="nullable"||o.type==="readonly"||o.type==="default"||o.type==="prefault")return X(o.innerType,r);if(o.type==="intersection")return X(o.left,r)||X(o.right,r);if(o.type==="record"||o.type==="map")return X(o.keyType,r)||X(o.valueType,r);if(o.type==="pipe")return e._zod.traits.has("$ZodCodec")?!0:X(o.in,r)||X(o.out,r);if(o.type==="object"){for(let n in o.shape)if(X(o.shape[n],r))return!0;return!1}if(o.type==="union"){for(let n of o.options)if(X(n,r))return!0;return!1}if(o.type==="tuple"){for(let n of o.items)if(X(n,r))return!0;return!!(o.rest&&X(o.rest,r))}return!1}var Ec=(e,t={})=>r=>{let o=Le({...r,processors:t});return C(e,o),Fe(o,e),Me(o,e)},At=(e,t,r={})=>o=>{let{libraryOptions:n,target:i}=o??{},s=Le({...n??{},target:i,io:t,processors:r});return C(e,s),Fe(s,e),Me(s,e)};var Uy={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},wc=(e,t,r,o)=>{let n=r;n.type="string";let{minimum:i,maximum:s,format:c,patterns:u,contentEncoding:l}=e._zod.bag;if(typeof i=="number"&&(n.minLength=i),typeof s=="number"&&(n.maxLength=s),c&&(n.format=Uy[c]??c,n.format===""&&delete n.format,c==="time"&&delete n.format),l&&(n.contentEncoding=l),u&&u.size>0){let d=[...u];d.length===1?n.pattern=d[0].source:d.length>1&&(n.allOf=[...d.map(m=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:m.source}))])}},Oc=(e,t,r,o)=>{let n=r,{minimum:i,maximum:s,format:c,multipleOf:u,exclusiveMaximum:l,exclusiveMinimum:d}=e._zod.bag;typeof c=="string"&&c.includes("int")?n.type="integer":n.type="number";let m=typeof d=="number"&&d>=(i??Number.NEGATIVE_INFINITY),g=typeof l=="number"&&l<=(s??Number.POSITIVE_INFINITY),h=t.target==="draft-04"||t.target==="openapi-3.0";m?h?(n.minimum=d,n.exclusiveMinimum=!0):n.exclusiveMinimum=d:typeof i=="number"&&(n.minimum=i),g?h?(n.maximum=l,n.exclusiveMaximum=!0):n.exclusiveMaximum=l:typeof s=="number"&&(n.maximum=s),typeof u=="number"&&(n.multipleOf=u)},Tc=(e,t,r,o)=>{r.type="boolean"},Ac=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema")},Pc=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema")},Cc=(e,t,r,o)=>{t.target==="openapi-3.0"?(r.type="string",r.nullable=!0,r.enum=[null]):r.type="null"},Nc=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema")},Rc=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema")},Dc=(e,t,r,o)=>{r.not={}},zc=(e,t,r,o)=>{},Uc=(e,t,r,o)=>{},jc=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},Lc=(e,t,r,o)=>{let n=e._zod.def,i=tn(n.entries);i.every(s=>typeof s=="number")&&(r.type="number"),i.every(s=>typeof s=="string")&&(r.type="string"),r.enum=i},Fc=(e,t,r,o)=>{let n=e._zod.def,i=[];for(let s of n.values)if(s===void 0){if(t.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof s=="bigint"){if(t.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");i.push(Number(s))}else i.push(s);if(i.length!==0)if(i.length===1){let s=i[0];r.type=s===null?"null":typeof s,t.target==="draft-04"||t.target==="openapi-3.0"?r.enum=[s]:r.const=s}else i.every(s=>typeof s=="number")&&(r.type="number"),i.every(s=>typeof s=="string")&&(r.type="string"),i.every(s=>typeof s=="boolean")&&(r.type="boolean"),i.every(s=>s===null)&&(r.type="null"),r.enum=i},Mc=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema")},Zc=(e,t,r,o)=>{let n=r,i=e._zod.pattern;if(!i)throw new Error("Pattern not found in template literal");n.type="string",n.pattern=i.source},Vc=(e,t,r,o)=>{let n=r,i={type:"string",format:"binary",contentEncoding:"binary"},{minimum:s,maximum:c,mime:u}=e._zod.bag;s!==void 0&&(i.minLength=s),c!==void 0&&(i.maxLength=c),u?u.length===1?(i.contentMediaType=u[0],Object.assign(n,i)):(Object.assign(n,i),n.anyOf=u.map(l=>({contentMediaType:l}))):Object.assign(n,i)},Bc=(e,t,r,o)=>{r.type="boolean"},Hc=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},Gc=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema")},Kc=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},Wc=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema")},qc=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema")},Jc=(e,t,r,o)=>{let n=r,i=e._zod.def,{minimum:s,maximum:c}=e._zod.bag;typeof s=="number"&&(n.minItems=s),typeof c=="number"&&(n.maxItems=c),n.type="array",n.items=C(i.element,t,{...o,path:[...o.path,"items"]})},Yc=(e,t,r,o)=>{let n=r,i=e._zod.def;n.type="object",n.properties={};let s=i.shape;for(let l in s)n.properties[l]=C(s[l],t,{...o,path:[...o.path,"properties",l]});let c=new Set(Object.keys(s)),u=new Set([...c].filter(l=>{let d=i.shape[l]._zod;return t.io==="input"?d.optin===void 0:d.optout===void 0}));u.size>0&&(n.required=Array.from(u)),i.catchall?._zod.def.type==="never"?n.additionalProperties=!1:i.catchall?i.catchall&&(n.additionalProperties=C(i.catchall,t,{...o,path:[...o.path,"additionalProperties"]})):t.io==="output"&&(n.additionalProperties=!1)},Xr=(e,t,r,o)=>{let n=e._zod.def,i=n.inclusive===!1,s=n.options.map((c,u)=>C(c,t,{...o,path:[...o.path,i?"oneOf":"anyOf",u]}));i?r.oneOf=s:r.anyOf=s},Xc=(e,t,r,o)=>{let n=e._zod.def,i=C(n.left,t,{...o,path:[...o.path,"allOf",0]}),s=C(n.right,t,{...o,path:[...o.path,"allOf",1]}),c=l=>"allOf"in l&&Object.keys(l).length===1,u=[...c(i)?i.allOf:[i],...c(s)?s.allOf:[s]];r.allOf=u},Qc=(e,t,r,o)=>{let n=r,i=e._zod.def;n.type="array";let s=t.target==="draft-2020-12"?"prefixItems":"items",c=t.target==="draft-2020-12"||t.target==="openapi-3.0"?"items":"additionalItems",u=i.items.map((g,h)=>C(g,t,{...o,path:[...o.path,s,h]})),l=i.rest?C(i.rest,t,{...o,path:[...o.path,c,...t.target==="openapi-3.0"?[i.items.length]:[]]}):null;t.target==="draft-2020-12"?(n.prefixItems=u,l&&(n.items=l)):t.target==="openapi-3.0"?(n.items={anyOf:u},l&&n.items.anyOf.push(l),n.minItems=u.length,l||(n.maxItems=u.length)):(n.items=u,l&&(n.additionalItems=l));let{minimum:d,maximum:m}=e._zod.bag;typeof d=="number"&&(n.minItems=d),typeof m=="number"&&(n.maxItems=m)},eu=(e,t,r,o)=>{let n=r,i=e._zod.def;n.type="object";let s=i.keyType,u=s._zod.bag?.patterns;if(i.mode==="loose"&&u&&u.size>0){let d=C(i.valueType,t,{...o,path:[...o.path,"patternProperties","*"]});n.patternProperties={};for(let m of u)n.patternProperties[m.source]=d}else(t.target==="draft-07"||t.target==="draft-2020-12")&&(n.propertyNames=C(i.keyType,t,{...o,path:[...o.path,"propertyNames"]})),n.additionalProperties=C(i.valueType,t,{...o,path:[...o.path,"additionalProperties"]});let l=s._zod.values;if(l){let d=[...l].filter(m=>typeof m=="string"||typeof m=="number");d.length>0&&(n.required=d)}},tu=(e,t,r,o)=>{let n=e._zod.def,i=C(n.innerType,t,o),s=t.seen.get(e);t.target==="openapi-3.0"?(s.ref=n.innerType,r.nullable=!0):r.anyOf=[i,{type:"null"}]},nu=(e,t,r,o)=>{let n=e._zod.def;C(n.innerType,t,o);let i=t.seen.get(e);i.ref=n.innerType},ru=(e,t,r,o)=>{let n=e._zod.def;C(n.innerType,t,o);let i=t.seen.get(e);i.ref=n.innerType,r.default=JSON.parse(JSON.stringify(n.defaultValue))},iu=(e,t,r,o)=>{let n=e._zod.def;C(n.innerType,t,o);let i=t.seen.get(e);i.ref=n.innerType,t.io==="input"&&(r._prefault=JSON.parse(JSON.stringify(n.defaultValue)))},ou=(e,t,r,o)=>{let n=e._zod.def;C(n.innerType,t,o);let i=t.seen.get(e);i.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},au=(e,t,r,o)=>{let n=e._zod.def,i=n.in._zod.traits.has("$ZodTransform"),s=t.io==="input"?i?n.out:n.in:n.out;C(s,t,o);let c=t.seen.get(e);c.ref=s},su=(e,t,r,o)=>{let n=e._zod.def;C(n.innerType,t,o);let i=t.seen.get(e);i.ref=n.innerType,r.readOnly=!0},cu=(e,t,r,o)=>{let n=e._zod.def;C(n.innerType,t,o);let i=t.seen.get(e);i.ref=n.innerType},Qr=(e,t,r,o)=>{let n=e._zod.def;C(n.innerType,t,o);let i=t.seen.get(e);i.ref=n.innerType},uu=(e,t,r,o)=>{let n=e._zod.innerType;C(n,t,o);let i=t.seen.get(e);i.ref=n},Yr={string:wc,number:Oc,boolean:Tc,bigint:Ac,symbol:Pc,null:Cc,undefined:Nc,void:Rc,never:Dc,any:zc,unknown:Uc,date:jc,enum:Lc,literal:Fc,nan:Mc,template_literal:Zc,file:Vc,success:Bc,custom:Hc,function:Gc,transform:Kc,map:Wc,set:qc,array:Jc,object:Yc,union:Xr,intersection:Xc,tuple:Qc,record:eu,nullable:tu,nonoptional:nu,default:ru,prefault:iu,catch:ou,pipe:au,readonly:su,promise:cu,optional:Qr,lazy:uu};function ei(e,t){if("_idmap"in e){let o=e,n=Le({...t,processors:Yr}),i={};for(let u of o._idmap.entries()){let[l,d]=u;C(d,n)}let s={},c={registry:o,uri:t?.uri,defs:i};n.external=c;for(let u of o._idmap.entries()){let[l,d]=u;Fe(n,d),s[l]=Me(n,d)}if(Object.keys(i).length>0){let u=n.target==="draft-2020-12"?"$defs":"definitions";s.__shared={[u]:i}}return{schemas:s}}let r=Le({...t,processors:Yr});return C(e,r),Fe(r,e),Me(r,e)}var ti=class{get metadataRegistry(){return this.ctx.metadataRegistry}get target(){return this.ctx.target}get unrepresentable(){return this.ctx.unrepresentable}get override(){return this.ctx.override}get io(){return this.ctx.io}get counter(){return this.ctx.counter}set counter(t){this.ctx.counter=t}get seen(){return this.ctx.seen}constructor(t){let r=t?.target??"draft-2020-12";r==="draft-4"&&(r="draft-04"),r==="draft-7"&&(r="draft-07"),this.ctx=Le({processors:Yr,target:r,...t?.metadata&&{metadata:t.metadata},...t?.unrepresentable&&{unrepresentable:t.unrepresentable},...t?.override&&{override:t.override},...t?.io&&{io:t.io}})}process(t,r={path:[],schemaPath:[]}){return C(t,this.ctx,r)}emit(t,r){r&&(r.cycles&&(this.ctx.cycles=r.cycles),r.reused&&(this.ctx.reused=r.reused),r.external&&(this.ctx.external=r.external)),Fe(this.ctx,t);let o=Me(this.ctx,t),{"~standard":n,...i}=o;return i}};var Ip={};var yn={};Ie(yn,{ZodAny:()=>Nu,ZodArray:()=>Uu,ZodBase64:()=>ki,ZodBase64URL:()=>Si,ZodBigInt:()=>jt,ZodBigIntFormat:()=>Ei,ZodBoolean:()=>Ut,ZodCIDRv4:()=>yi,ZodCIDRv6:()=>xi,ZodCUID:()=>pi,ZodCUID2:()=>fi,ZodCatch:()=>ol,ZodCodec:()=>Cn,ZodCustom:()=>Nn,ZodCustomStringFormat:()=>Dt,ZodDate:()=>wn,ZodDefault:()=>Qu,ZodDiscriminatedUnion:()=>Lu,ZodE164:()=>$i,ZodEmail:()=>li,ZodEmoji:()=>di,ZodEnum:()=>Nt,ZodExactOptional:()=>Ju,ZodFile:()=>Wu,ZodFunction:()=>gl,ZodGUID:()=>kn,ZodIPv4:()=>vi,ZodIPv6:()=>bi,ZodIntersection:()=>Fu,ZodJWT:()=>Ii,ZodKSUID:()=>_i,ZodLazy:()=>ml,ZodLiteral:()=>Ku,ZodMAC:()=>Eu,ZodMap:()=>Hu,ZodNaN:()=>sl,ZodNanoID:()=>mi,ZodNever:()=>Du,ZodNonOptional:()=>Ci,ZodNull:()=>Pu,ZodNullable:()=>Xu,ZodNumber:()=>zt,ZodNumberFormat:()=>et,ZodObject:()=>Tn,ZodOptional:()=>Pi,ZodPipe:()=>Pn,ZodPrefault:()=>tl,ZodPreprocess:()=>cl,ZodPromise:()=>fl,ZodReadonly:()=>ul,ZodRecord:()=>Ct,ZodSet:()=>Gu,ZodString:()=>Rt,ZodStringFormat:()=>z,ZodSuccess:()=>il,ZodSymbol:()=>Tu,ZodTemplateLiteral:()=>dl,ZodTransform:()=>qu,ZodTuple:()=>Zu,ZodType:()=>I,ZodULID:()=>gi,ZodURL:()=>En,ZodUUID:()=>Se,ZodUndefined:()=>Au,ZodUnion:()=>An,ZodUnknown:()=>Ru,ZodVoid:()=>zu,ZodXID:()=>hi,ZodXor:()=>ju,_ZodString:()=>ui,_default:()=>el,_function:()=>Df,any:()=>mf,array:()=>On,base64:()=>Wp,base64url:()=>qp,bigint:()=>sf,boolean:()=>Ou,catch:()=>al,check:()=>zf,cidrv4:()=>Gp,cidrv6:()=>Kp,codec:()=>Pf,cuid:()=>jp,cuid2:()=>Lp,custom:()=>Uf,date:()=>ff,describe:()=>jf,discriminatedUnion:()=>yf,e164:()=>Jp,email:()=>Op,emoji:()=>zp,enum:()=>Ti,exactOptional:()=>Yu,file:()=>wf,float32:()=>nf,float64:()=>rf,function:()=>Df,guid:()=>Tp,hash:()=>tf,hex:()=>ef,hostname:()=>Qp,httpUrl:()=>Dp,instanceof:()=>Ff,int:()=>si,int32:()=>of,int64:()=>cf,intersection:()=>Mu,invertCodec:()=>Cf,ipv4:()=>Vp,ipv6:()=>Hp,json:()=>Zf,jwt:()=>Yp,keyof:()=>gf,ksuid:()=>Zp,lazy:()=>pl,literal:()=>Ef,looseObject:()=>vf,looseRecord:()=>kf,mac:()=>Bp,map:()=>Sf,meta:()=>Lf,nan:()=>Af,nanoid:()=>Up,nativeEnum:()=>If,never:()=>wi,nonoptional:()=>rl,null:()=>Cu,nullable:()=>$n,nullish:()=>Of,number:()=>wu,object:()=>hf,optional:()=>Sn,partialRecord:()=>xf,pipe:()=>ci,prefault:()=>nl,preprocess:()=>Vf,promise:()=>Rf,readonly:()=>ll,record:()=>Bu,refine:()=>hl,set:()=>$f,strictObject:()=>_f,string:()=>xn,stringFormat:()=>Xp,stringbool:()=>Mf,success:()=>Tf,superRefine:()=>_l,symbol:()=>lf,templateLiteral:()=>Nf,transform:()=>Ai,tuple:()=>Vu,uint32:()=>af,uint64:()=>uf,ulid:()=>Fp,undefined:()=>df,union:()=>Oi,unknown:()=>Qe,url:()=>Rp,uuid:()=>Ap,uuidv4:()=>Pp,uuidv6:()=>Cp,uuidv7:()=>Np,void:()=>pf,xid:()=>Mp,xor:()=>bf});var ni={};Ie(ni,{endsWith:()=>kt,gt:()=>xe,gte:()=>Y,includes:()=>yt,length:()=>Xe,lowercase:()=>vt,lt:()=>ye,lte:()=>oe,maxLength:()=>Ye,maxSize:()=>je,mime:()=>St,minLength:()=>Oe,minSize:()=>ke,multipleOf:()=>Ue,negative:()=>Kr,nonnegative:()=>qr,nonpositive:()=>Wr,normalize:()=>$t,overwrite:()=>me,positive:()=>Gr,property:()=>Jr,regex:()=>_t,size:()=>Je,slugify:()=>Ot,startsWith:()=>xt,toLowerCase:()=>Et,toUpperCase:()=>wt,trim:()=>It,uppercase:()=>bt});var Pt={};Ie(Pt,{ZodISODate:()=>ii,ZodISODateTime:()=>ri,ZodISODuration:()=>ai,ZodISOTime:()=>oi,date:()=>du,datetime:()=>lu,duration:()=>pu,time:()=>mu});var ri=p("ZodISODateTime",(e,t)=>{Ma.init(e,t),z.init(e,t)});function lu(e){return Hs(ri,e)}var ii=p("ZodISODate",(e,t)=>{Za.init(e,t),z.init(e,t)});function du(e){return Gs(ii,e)}var oi=p("ZodISOTime",(e,t)=>{Va.init(e,t),z.init(e,t)});function mu(e){return Ks(oi,e)}var ai=p("ZodISODuration",(e,t)=>{Ba.init(e,t),z.init(e,t)});function pu(e){return Ws(ai,e)}var Ep=(e,t)=>{sn.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:r=>un(e,r)},flatten:{value:r=>cn(e,r)},addIssue:{value:r=>{e.issues.push(r),e.message=JSON.stringify(e.issues,ct,2)}},addIssues:{value:r=>{e.issues.push(...r),e.message=JSON.stringify(e.issues,ct,2)}},isEmpty:{get(){return e.issues.length===0}}})},Ly=p("ZodError",Ep),te=p("ZodError",Ep,{Parent:Error});var fu=dt(te),gu=mt(te),hu=pt(te),_u=ft(te),vu=er(te),bu=tr(te),yu=nr(te),xu=rr(te),ku=ir(te),Su=or(te),$u=ar(te),Iu=sr(te);var wp=new WeakMap;function In(e,t,r){let o=Object.getPrototypeOf(e),n=wp.get(o);if(n||(n=new Set,wp.set(o,n)),!n.has(t)){n.add(t);for(let i in r){let s=r[i];Object.defineProperty(o,i,{configurable:!0,enumerable:!1,get(){let c=s.bind(this);return Object.defineProperty(this,i,{configurable:!0,writable:!0,enumerable:!0,value:c}),c},set(c){Object.defineProperty(this,i,{configurable:!0,writable:!0,enumerable:!0,value:c})}})}}}var I=p("ZodType",(e,t)=>($.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:At(e,"input"),output:At(e,"output")}}),e.toJSONSchema=Ec(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(r,o)=>fu(e,r,o,{callee:e.parse}),e.safeParse=(r,o)=>hu(e,r,o),e.parseAsync=async(r,o)=>gu(e,r,o,{callee:e.parseAsync}),e.safeParseAsync=async(r,o)=>_u(e,r,o),e.spa=e.safeParseAsync,e.encode=(r,o)=>vu(e,r,o),e.decode=(r,o)=>bu(e,r,o),e.encodeAsync=async(r,o)=>yu(e,r,o),e.decodeAsync=async(r,o)=>xu(e,r,o),e.safeEncode=(r,o)=>ku(e,r,o),e.safeDecode=(r,o)=>Su(e,r,o),e.safeEncodeAsync=async(r,o)=>$u(e,r,o),e.safeDecodeAsync=async(r,o)=>Iu(e,r,o),In(e,"ZodType",{check(...r){let o=this.def;return this.clone(b.mergeDefs(o,{checks:[...o.checks??[],...r.map(n=>typeof n=="function"?{_zod:{check:n,def:{check:"custom"},onattach:[]}}:n)]}),{parent:!0})},with(...r){return this.check(...r)},clone(r,o){return q(this,r,o)},brand(){return this},register(r,o){return r.add(this,o),this},refine(r,o){return this.check(hl(r,o))},superRefine(r,o){return this.check(_l(r,o))},overwrite(r){return this.check(me(r))},optional(){return Sn(this)},exactOptional(){return Yu(this)},nullable(){return $n(this)},nullish(){return Sn($n(this))},nonoptional(r){return rl(this,r)},array(){return On(this)},or(r){return Oi([this,r])},and(r){return Mu(this,r)},transform(r){return ci(this,Ai(r))},default(r){return el(this,r)},prefault(r){return nl(this,r)},catch(r){return al(this,r)},pipe(r){return ci(this,r)},readonly(){return ll(this)},describe(r){let o=this.clone();return G.add(o,{description:r}),o},meta(...r){if(r.length===0)return G.get(this);let o=this.clone();return G.add(o,r[0]),o},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(r){return r(this)}}),Object.defineProperty(e,"description",{get(){return G.get(e)?.description},configurable:!0}),e)),ui=p("_ZodString",(e,t)=>{qe.init(e,t),I.init(e,t),e._zod.processJSONSchema=(o,n,i)=>wc(e,o,n,i);let r=e._zod.bag;e.format=r.format??null,e.minLength=r.minimum??null,e.maxLength=r.maximum??null,In(e,"_ZodString",{regex(...o){return this.check(_t(...o))},includes(...o){return this.check(yt(...o))},startsWith(...o){return this.check(xt(...o))},endsWith(...o){return this.check(kt(...o))},min(...o){return this.check(Oe(...o))},max(...o){return this.check(Ye(...o))},length(...o){return this.check(Xe(...o))},nonempty(...o){return this.check(Oe(1,...o))},lowercase(o){return this.check(vt(o))},uppercase(o){return this.check(bt(o))},trim(){return this.check(It())},normalize(...o){return this.check($t(...o))},toLowerCase(){return this.check(Et())},toUpperCase(){return this.check(wt())},slugify(){return this.check(Ot())}})}),Rt=p("ZodString",(e,t)=>{qe.init(e,t),ui.init(e,t),e.email=r=>e.check(Er(li,r)),e.url=r=>e.check(bn(En,r)),e.jwt=r=>e.check(Hr(Ii,r)),e.emoji=r=>e.check(Pr(di,r)),e.guid=r=>e.check(vn(kn,r)),e.uuid=r=>e.check(wr(Se,r)),e.uuidv4=r=>e.check(Or(Se,r)),e.uuidv6=r=>e.check(Tr(Se,r)),e.uuidv7=r=>e.check(Ar(Se,r)),e.nanoid=r=>e.check(Cr(mi,r)),e.guid=r=>e.check(vn(kn,r)),e.cuid=r=>e.check(Nr(pi,r)),e.cuid2=r=>e.check(Rr(fi,r)),e.ulid=r=>e.check(Dr(gi,r)),e.base64=r=>e.check(Zr(ki,r)),e.base64url=r=>e.check(Vr(Si,r)),e.xid=r=>e.check(zr(hi,r)),e.ksuid=r=>e.check(Ur(_i,r)),e.ipv4=r=>e.check(jr(vi,r)),e.ipv6=r=>e.check(Lr(bi,r)),e.cidrv4=r=>e.check(Fr(yi,r)),e.cidrv6=r=>e.check(Mr(xi,r)),e.e164=r=>e.check(Br($i,r)),e.datetime=r=>e.check(lu(r)),e.date=r=>e.check(du(r)),e.time=r=>e.check(mu(r)),e.duration=r=>e.check(pu(r))});function xn(e){return Ms(Rt,e)}var z=p("ZodStringFormat",(e,t)=>{D.init(e,t),ui.init(e,t)}),li=p("ZodEmail",(e,t)=>{Ca.init(e,t),z.init(e,t)});function Op(e){return Er(li,e)}var kn=p("ZodGUID",(e,t)=>{Aa.init(e,t),z.init(e,t)});function Tp(e){return vn(kn,e)}var Se=p("ZodUUID",(e,t)=>{Pa.init(e,t),z.init(e,t)});function Ap(e){return wr(Se,e)}function Pp(e){return Or(Se,e)}function Cp(e){return Tr(Se,e)}function Np(e){return Ar(Se,e)}var En=p("ZodURL",(e,t)=>{Na.init(e,t),z.init(e,t)});function Rp(e){return bn(En,e)}function Dp(e){return bn(En,{protocol:ie.httpProtocol,hostname:ie.domain,...b.normalizeParams(e)})}var di=p("ZodEmoji",(e,t)=>{Ra.init(e,t),z.init(e,t)});function zp(e){return Pr(di,e)}var mi=p("ZodNanoID",(e,t)=>{Da.init(e,t),z.init(e,t)});function Up(e){return Cr(mi,e)}var pi=p("ZodCUID",(e,t)=>{za.init(e,t),z.init(e,t)});function jp(e){return Nr(pi,e)}var fi=p("ZodCUID2",(e,t)=>{Ua.init(e,t),z.init(e,t)});function Lp(e){return Rr(fi,e)}var gi=p("ZodULID",(e,t)=>{ja.init(e,t),z.init(e,t)});function Fp(e){return Dr(gi,e)}var hi=p("ZodXID",(e,t)=>{La.init(e,t),z.init(e,t)});function Mp(e){return zr(hi,e)}var _i=p("ZodKSUID",(e,t)=>{Fa.init(e,t),z.init(e,t)});function Zp(e){return Ur(_i,e)}var vi=p("ZodIPv4",(e,t)=>{Ha.init(e,t),z.init(e,t)});function Vp(e){return jr(vi,e)}var Eu=p("ZodMAC",(e,t)=>{Ka.init(e,t),z.init(e,t)});function Bp(e){return Vs(Eu,e)}var bi=p("ZodIPv6",(e,t)=>{Ga.init(e,t),z.init(e,t)});function Hp(e){return Lr(bi,e)}var yi=p("ZodCIDRv4",(e,t)=>{Wa.init(e,t),z.init(e,t)});function Gp(e){return Fr(yi,e)}var xi=p("ZodCIDRv6",(e,t)=>{qa.init(e,t),z.init(e,t)});function Kp(e){return Mr(xi,e)}var ki=p("ZodBase64",(e,t)=>{Ya.init(e,t),z.init(e,t)});function Wp(e){return Zr(ki,e)}var Si=p("ZodBase64URL",(e,t)=>{Xa.init(e,t),z.init(e,t)});function qp(e){return Vr(Si,e)}var $i=p("ZodE164",(e,t)=>{Qa.init(e,t),z.init(e,t)});function Jp(e){return Br($i,e)}var Ii=p("ZodJWT",(e,t)=>{es.init(e,t),z.init(e,t)});function Yp(e){return Hr(Ii,e)}var Dt=p("ZodCustomStringFormat",(e,t)=>{ts.init(e,t),z.init(e,t)});function Xp(e,t,r={}){return Tt(Dt,e,t,r)}function Qp(e){return Tt(Dt,"hostname",ie.hostname,e)}function ef(e){return Tt(Dt,"hex",ie.hex,e)}function tf(e,t){let r=t?.enc??"hex",o=`${e}_${r}`,n=ie[o];if(!n)throw new Error(`Unrecognized hash format: ${o}`);return Tt(Dt,o,n,t)}var zt=p("ZodNumber",(e,t)=>{hr.init(e,t),I.init(e,t),e._zod.processJSONSchema=(o,n,i)=>Oc(e,o,n,i),In(e,"ZodNumber",{gt(o,n){return this.check(xe(o,n))},gte(o,n){return this.check(Y(o,n))},min(o,n){return this.check(Y(o,n))},lt(o,n){return this.check(ye(o,n))},lte(o,n){return this.check(oe(o,n))},max(o,n){return this.check(oe(o,n))},int(o){return this.check(si(o))},safe(o){return this.check(si(o))},positive(o){return this.check(xe(0,o))},nonnegative(o){return this.check(Y(0,o))},negative(o){return this.check(ye(0,o))},nonpositive(o){return this.check(oe(0,o))},multipleOf(o,n){return this.check(Ue(o,n))},step(o,n){return this.check(Ue(o,n))},finite(){return this}});let r=e._zod.bag;e.minValue=Math.max(r.minimum??Number.NEGATIVE_INFINITY,r.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(r.maximum??Number.POSITIVE_INFINITY,r.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(r.format??"").includes("int")||Number.isSafeInteger(r.multipleOf??.5),e.isFinite=!0,e.format=r.format??null});function wu(e){return qs(zt,e)}var et=p("ZodNumberFormat",(e,t)=>{ns.init(e,t),zt.init(e,t)});function si(e){return Ys(et,e)}function nf(e){return Xs(et,e)}function rf(e){return Qs(et,e)}function of(e){return ec(et,e)}function af(e){return tc(et,e)}var Ut=p("ZodBoolean",(e,t)=>{pn.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Tc(e,r,o,n)});function Ou(e){return nc(Ut,e)}var jt=p("ZodBigInt",(e,t)=>{_r.init(e,t),I.init(e,t),e._zod.processJSONSchema=(o,n,i)=>Ac(e,o,n,i),e.gte=(o,n)=>e.check(Y(o,n)),e.min=(o,n)=>e.check(Y(o,n)),e.gt=(o,n)=>e.check(xe(o,n)),e.gte=(o,n)=>e.check(Y(o,n)),e.min=(o,n)=>e.check(Y(o,n)),e.lt=(o,n)=>e.check(ye(o,n)),e.lte=(o,n)=>e.check(oe(o,n)),e.max=(o,n)=>e.check(oe(o,n)),e.positive=o=>e.check(xe(BigInt(0),o)),e.negative=o=>e.check(ye(BigInt(0),o)),e.nonpositive=o=>e.check(oe(BigInt(0),o)),e.nonnegative=o=>e.check(Y(BigInt(0),o)),e.multipleOf=(o,n)=>e.check(Ue(o,n));let r=e._zod.bag;e.minValue=r.minimum??null,e.maxValue=r.maximum??null,e.format=r.format??null});function sf(e){return ic(jt,e)}var Ei=p("ZodBigIntFormat",(e,t)=>{rs.init(e,t),jt.init(e,t)});function cf(e){return ac(Ei,e)}function uf(e){return sc(Ei,e)}var Tu=p("ZodSymbol",(e,t)=>{is.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Pc(e,r,o,n)});function lf(e){return cc(Tu,e)}var Au=p("ZodUndefined",(e,t)=>{os.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Nc(e,r,o,n)});function df(e){return uc(Au,e)}var Pu=p("ZodNull",(e,t)=>{as.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Cc(e,r,o,n)});function Cu(e){return lc(Pu,e)}var Nu=p("ZodAny",(e,t)=>{ss.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>zc(e,r,o,n)});function mf(){return dc(Nu)}var Ru=p("ZodUnknown",(e,t)=>{cs.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Uc(e,r,o,n)});function Qe(){return mc(Ru)}var Du=p("ZodNever",(e,t)=>{us.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Dc(e,r,o,n)});function wi(e){return pc(Du,e)}var zu=p("ZodVoid",(e,t)=>{ls.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Rc(e,r,o,n)});function pf(e){return fc(zu,e)}var wn=p("ZodDate",(e,t)=>{ds.init(e,t),I.init(e,t),e._zod.processJSONSchema=(o,n,i)=>jc(e,o,n,i),e.min=(o,n)=>e.check(Y(o,n)),e.max=(o,n)=>e.check(oe(o,n));let r=e._zod.bag;e.minDate=r.minimum?new Date(r.minimum):null,e.maxDate=r.maximum?new Date(r.maximum):null});function ff(e){return gc(wn,e)}var Uu=p("ZodArray",(e,t)=>{ms.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Jc(e,r,o,n),e.element=t.element,In(e,"ZodArray",{min(r,o){return this.check(Oe(r,o))},nonempty(r){return this.check(Oe(1,r))},max(r,o){return this.check(Ye(r,o))},length(r,o){return this.check(Xe(r,o))},unwrap(){return this.element}})});function On(e,t){return vc(Uu,e,t)}function gf(e){let t=e._zod.def.shape;return Ti(Object.keys(t))}var Tn=p("ZodObject",(e,t)=>{ps.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Yc(e,r,o,n),b.defineLazy(e,"shape",()=>t.shape),In(e,"ZodObject",{keyof(){return Ti(Object.keys(this._zod.def.shape))},catchall(r){return this.clone({...this._zod.def,catchall:r})},passthrough(){return this.clone({...this._zod.def,catchall:Qe()})},loose(){return this.clone({...this._zod.def,catchall:Qe()})},strict(){return this.clone({...this._zod.def,catchall:wi()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(r){return b.extend(this,r)},safeExtend(r){return b.safeExtend(this,r)},merge(r){return b.merge(this,r)},pick(r){return b.pick(this,r)},omit(r){return b.omit(this,r)},partial(...r){return b.partial(Pi,this,r[0])},required(...r){return b.required(Ci,this,r[0])}})});function hf(e,t){let r={type:"object",shape:e??{},...b.normalizeParams(t)};return new Tn(r)}function _f(e,t){return new Tn({type:"object",shape:e,catchall:wi(),...b.normalizeParams(t)})}function vf(e,t){return new Tn({type:"object",shape:e,catchall:Qe(),...b.normalizeParams(t)})}var An=p("ZodUnion",(e,t)=>{fn.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Xr(e,r,o,n),e.options=t.options});function Oi(e,t){return new An({type:"union",options:e,...b.normalizeParams(t)})}var ju=p("ZodXor",(e,t)=>{An.init(e,t),fs.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Xr(e,r,o,n),e.options=t.options});function bf(e,t){return new ju({type:"union",options:e,inclusive:!1,...b.normalizeParams(t)})}var Lu=p("ZodDiscriminatedUnion",(e,t)=>{An.init(e,t),gs.init(e,t)});function yf(e,t,r){return new Lu({type:"union",options:t,discriminator:e,...b.normalizeParams(r)})}var Fu=p("ZodIntersection",(e,t)=>{hs.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Xc(e,r,o,n)});function Mu(e,t){return new Fu({type:"intersection",left:e,right:t})}var Zu=p("ZodTuple",(e,t)=>{vr.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Qc(e,r,o,n),e.rest=r=>e.clone({...e._zod.def,rest:r})});function Vu(e,t,r){let o=t instanceof $,n=o?r:t,i=o?t:null;return new Zu({type:"tuple",items:e,rest:i,...b.normalizeParams(n)})}var Ct=p("ZodRecord",(e,t)=>{_s.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>eu(e,r,o,n),e.keyType=t.keyType,e.valueType=t.valueType});function Bu(e,t,r){return!t||!t._zod?new Ct({type:"record",keyType:xn(),valueType:e,...b.normalizeParams(t)}):new Ct({type:"record",keyType:e,valueType:t,...b.normalizeParams(r)})}function xf(e,t,r){let o=q(e);return o._zod.values=void 0,new Ct({type:"record",keyType:o,valueType:t,...b.normalizeParams(r)})}function kf(e,t,r){return new Ct({type:"record",keyType:e,valueType:t,mode:"loose",...b.normalizeParams(r)})}var Hu=p("ZodMap",(e,t)=>{vs.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Wc(e,r,o,n),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...r)=>e.check(ke(...r)),e.nonempty=r=>e.check(ke(1,r)),e.max=(...r)=>e.check(je(...r)),e.size=(...r)=>e.check(Je(...r))});function Sf(e,t,r){return new Hu({type:"map",keyType:e,valueType:t,...b.normalizeParams(r)})}var Gu=p("ZodSet",(e,t)=>{bs.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>qc(e,r,o,n),e.min=(...r)=>e.check(ke(...r)),e.nonempty=r=>e.check(ke(1,r)),e.max=(...r)=>e.check(je(...r)),e.size=(...r)=>e.check(Je(...r))});function $f(e,t){return new Gu({type:"set",valueType:e,...b.normalizeParams(t)})}var Nt=p("ZodEnum",(e,t)=>{ys.init(e,t),I.init(e,t),e._zod.processJSONSchema=(o,n,i)=>Lc(e,o,n,i),e.enum=t.entries,e.options=Object.values(t.entries);let r=new Set(Object.keys(t.entries));e.extract=(o,n)=>{let i={};for(let s of o)if(r.has(s))i[s]=t.entries[s];else throw new Error(`Key ${s} not found in enum`);return new Nt({...t,checks:[],...b.normalizeParams(n),entries:i})},e.exclude=(o,n)=>{let i={...t.entries};for(let s of o)if(r.has(s))delete i[s];else throw new Error(`Key ${s} not found in enum`);return new Nt({...t,checks:[],...b.normalizeParams(n),entries:i})}});function Ti(e,t){let r=Array.isArray(e)?Object.fromEntries(e.map(o=>[o,o])):e;return new Nt({type:"enum",entries:r,...b.normalizeParams(t)})}function If(e,t){return new Nt({type:"enum",entries:e,...b.normalizeParams(t)})}var Ku=p("ZodLiteral",(e,t)=>{xs.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Fc(e,r,o,n),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function Ef(e,t){return new Ku({type:"literal",values:Array.isArray(e)?e:[e],...b.normalizeParams(t)})}var Wu=p("ZodFile",(e,t)=>{ks.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Vc(e,r,o,n),e.min=(r,o)=>e.check(ke(r,o)),e.max=(r,o)=>e.check(je(r,o)),e.mime=(r,o)=>e.check(St(Array.isArray(r)?r:[r],o))});function wf(e){return bc(Wu,e)}var qu=p("ZodTransform",(e,t)=>{Ss.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Kc(e,r,o,n),e._zod.parse=(r,o)=>{if(o.direction==="backward")throw new Ce(e.constructor.name);r.addIssue=i=>{if(typeof i=="string")r.issues.push(b.issue(i,r.value,t));else{let s=i;s.fatal&&(s.continue=!1),s.code??(s.code="custom"),s.input??(s.input=r.value),s.inst??(s.inst=e),r.issues.push(b.issue(s))}};let n=t.transform(r.value,r);return n instanceof Promise?n.then(i=>(r.value=i,r.fallback=!0,r)):(r.value=n,r.fallback=!0,r)}});function Ai(e){return new qu({type:"transform",transform:e})}var Pi=p("ZodOptional",(e,t)=>{br.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Qr(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});function Sn(e){return new Pi({type:"optional",innerType:e})}var Ju=p("ZodExactOptional",(e,t)=>{$s.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Qr(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});function Yu(e){return new Ju({type:"optional",innerType:e})}var Xu=p("ZodNullable",(e,t)=>{Is.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>tu(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});function $n(e){return new Xu({type:"nullable",innerType:e})}function Of(e){return Sn($n(e))}var Qu=p("ZodDefault",(e,t)=>{Es.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>ru(e,r,o,n),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function el(e,t){return new Qu({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():b.shallowClone(t)}})}var tl=p("ZodPrefault",(e,t)=>{ws.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>iu(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});function nl(e,t){return new tl({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():b.shallowClone(t)}})}var Ci=p("ZodNonOptional",(e,t)=>{Os.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>nu(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});function rl(e,t){return new Ci({type:"nonoptional",innerType:e,...b.normalizeParams(t)})}var il=p("ZodSuccess",(e,t)=>{Ts.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Bc(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});function Tf(e){return new il({type:"success",innerType:e})}var ol=p("ZodCatch",(e,t)=>{As.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>ou(e,r,o,n),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function al(e,t){return new ol({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}var sl=p("ZodNaN",(e,t)=>{Ps.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Mc(e,r,o,n)});function Af(e){return _c(sl,e)}var Pn=p("ZodPipe",(e,t)=>{yr.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>au(e,r,o,n),e.in=t.in,e.out=t.out});function ci(e,t){return new Pn({type:"pipe",in:e,out:t})}var Cn=p("ZodCodec",(e,t)=>{Pn.init(e,t),gn.init(e,t)});function Pf(e,t,r){return new Cn({type:"pipe",in:e,out:t,transform:r.decode,reverseTransform:r.encode})}function Cf(e){let t=e._zod.def;return new Cn({type:"pipe",in:t.out,out:t.in,transform:t.reverseTransform,reverseTransform:t.transform})}var cl=p("ZodPreprocess",(e,t)=>{Pn.init(e,t),Cs.init(e,t)}),ul=p("ZodReadonly",(e,t)=>{Ns.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>su(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});function ll(e){return new ul({type:"readonly",innerType:e})}var dl=p("ZodTemplateLiteral",(e,t)=>{Rs.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Zc(e,r,o,n)});function Nf(e,t){return new dl({type:"template_literal",parts:e,...b.normalizeParams(t)})}var ml=p("ZodLazy",(e,t)=>{Us.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>uu(e,r,o,n),e.unwrap=()=>e._zod.def.getter()});function pl(e){return new ml({type:"lazy",getter:e})}var fl=p("ZodPromise",(e,t)=>{zs.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>cu(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});function Rf(e){return new fl({type:"promise",innerType:e})}var gl=p("ZodFunction",(e,t)=>{Ds.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Gc(e,r,o,n)});function Df(e){return new gl({type:"function",input:Array.isArray(e?.input)?Vu(e?.input):e?.input??On(Qe()),output:e?.output??Qe()})}var Nn=p("ZodCustom",(e,t)=>{js.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Hc(e,r,o,n)});function zf(e){let t=new U({check:"custom"});return t._zod.check=e,t}function Uf(e,t){return yc(Nn,e??(()=>!0),t)}function hl(e,t={}){return xc(Nn,e,t)}function _l(e,t){return kc(e,t)}var jf=Sc,Lf=$c;function Ff(e,t={}){let r=new Nn({type:"custom",check:"custom",fn:o=>o instanceof e,abort:!0,...b.normalizeParams(t)});return r._zod.bag.Class=e,r._zod.check=o=>{o.value instanceof e||o.issues.push({code:"invalid_type",expected:e.name,input:o.value,inst:r,path:[...r._zod.def.path??[]]})},r}var Mf=(...e)=>Ic({Codec:Cn,Boolean:Ut,String:Rt},...e);function Zf(e){let t=pl(()=>Oi([xn(e),wu(),Ou(),Cu(),On(t),Bu(xn(),t)]));return t}function Vf(e,t){return new cl({type:"pipe",in:Ai(e),out:t})}var My={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 Zy(e){Z({customError:e})}function Vy(){return Z().customError}var vl;vl||(vl={});var x={...yn,...ni,iso:Pt},By=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 Hy(e,t){let r=e.$schema;return r==="https://json-schema.org/draft/2020-12/schema"?"draft-2020-12":r==="http://json-schema.org/draft-07/schema#"?"draft-7":r==="http://json-schema.org/draft-04/schema#"?"draft-4":t??"draft-2020-12"}function Gy(e,t){if(!e.startsWith("#"))throw new Error("External $ref is not supported, only local refs (#/...) are allowed");let r=e.slice(1).split("/").filter(Boolean);if(r.length===0)return t.rootSchema;let o=t.version==="draft-2020-12"?"$defs":"definitions";if(r[0]===o){let n=r[1];if(!n||!t.defs[n])throw new Error(`Reference not found: ${e}`);return t.defs[n]}throw new Error(`Reference not found: ${e}`)}function Bf(e,t){if(e.not!==void 0){if(typeof e.not=="object"&&Object.keys(e.not).length===0)return x.never();throw new Error("not is not supported in Zod (except { not: {} } for never)")}if(e.unevaluatedItems!==void 0)throw new Error("unevaluatedItems is not supported");if(e.unevaluatedProperties!==void 0)throw new Error("unevaluatedProperties is not supported");if(e.if!==void 0||e.then!==void 0||e.else!==void 0)throw new Error("Conditional schemas (if/then/else) are not supported");if(e.dependentSchemas!==void 0||e.dependentRequired!==void 0)throw new Error("dependentSchemas and dependentRequired are not supported");if(e.$ref){let n=e.$ref;if(t.refs.has(n))return t.refs.get(n);if(t.processing.has(n))return x.lazy(()=>{if(!t.refs.has(n))throw new Error(`Circular reference not resolved: ${n}`);return t.refs.get(n)});t.processing.add(n);let i=Gy(n,t),s=K(i,t);return t.refs.set(n,s),t.processing.delete(n),s}if(e.enum!==void 0){let n=e.enum;if(t.version==="openapi-3.0"&&e.nullable===!0&&n.length===1&&n[0]===null)return x.null();if(n.length===0)return x.never();if(n.length===1)return x.literal(n[0]);if(n.every(s=>typeof s=="string"))return x.enum(n);let i=n.map(s=>x.literal(s));return i.length<2?i[0]:x.union([i[0],i[1],...i.slice(2)])}if(e.const!==void 0)return x.literal(e.const);let r=e.type;if(Array.isArray(r)){let n=r.map(i=>{let s={...e,type:i};return Bf(s,t)});return n.length===0?x.never():n.length===1?n[0]:x.union(n)}if(!r)return x.any();let o;switch(r){case"string":{let n=x.string();if(e.format){let i=e.format;i==="email"?n=n.check(x.email()):i==="uri"||i==="uri-reference"?n=n.check(x.url()):i==="uuid"||i==="guid"?n=n.check(x.uuid()):i==="date-time"?n=n.check(x.iso.datetime()):i==="date"?n=n.check(x.iso.date()):i==="time"?n=n.check(x.iso.time()):i==="duration"?n=n.check(x.iso.duration()):i==="ipv4"?n=n.check(x.ipv4()):i==="ipv6"?n=n.check(x.ipv6()):i==="mac"?n=n.check(x.mac()):i==="cidr"?n=n.check(x.cidrv4()):i==="cidr-v6"?n=n.check(x.cidrv6()):i==="base64"?n=n.check(x.base64()):i==="base64url"?n=n.check(x.base64url()):i==="e164"?n=n.check(x.e164()):i==="jwt"?n=n.check(x.jwt()):i==="emoji"?n=n.check(x.emoji()):i==="nanoid"?n=n.check(x.nanoid()):i==="cuid"?n=n.check(x.cuid()):i==="cuid2"?n=n.check(x.cuid2()):i==="ulid"?n=n.check(x.ulid()):i==="xid"?n=n.check(x.xid()):i==="ksuid"&&(n=n.check(x.ksuid()))}typeof e.minLength=="number"&&(n=n.min(e.minLength)),typeof e.maxLength=="number"&&(n=n.max(e.maxLength)),e.pattern&&(n=n.regex(new RegExp(e.pattern))),o=n;break}case"number":case"integer":{let n=r==="integer"?x.number().int():x.number();typeof e.minimum=="number"&&(n=n.min(e.minimum)),typeof e.maximum=="number"&&(n=n.max(e.maximum)),typeof e.exclusiveMinimum=="number"?n=n.gt(e.exclusiveMinimum):e.exclusiveMinimum===!0&&typeof e.minimum=="number"&&(n=n.gt(e.minimum)),typeof e.exclusiveMaximum=="number"?n=n.lt(e.exclusiveMaximum):e.exclusiveMaximum===!0&&typeof e.maximum=="number"&&(n=n.lt(e.maximum)),typeof e.multipleOf=="number"&&(n=n.multipleOf(e.multipleOf)),o=n;break}case"boolean":{o=x.boolean();break}case"null":{o=x.null();break}case"object":{let n={},i=e.properties||{},s=new Set(e.required||[]);for(let[u,l]of Object.entries(i)){let d=K(l,t);n[u]=s.has(u)?d:d.optional()}if(e.propertyNames){let u=K(e.propertyNames,t),l=e.additionalProperties&&typeof e.additionalProperties=="object"?K(e.additionalProperties,t):x.any();if(Object.keys(n).length===0){o=x.record(u,l);break}let d=x.object(n).passthrough(),m=x.looseRecord(u,l);o=x.intersection(d,m);break}if(e.patternProperties){let u=e.patternProperties,l=Object.keys(u),d=[];for(let g of l){let h=K(u[g],t),S=x.string().regex(new RegExp(g));d.push(x.looseRecord(S,h))}let m=[];if(Object.keys(n).length>0&&m.push(x.object(n).passthrough()),m.push(...d),m.length===0)o=x.object({}).passthrough();else if(m.length===1)o=m[0];else{let g=x.intersection(m[0],m[1]);for(let h=2;h<m.length;h++)g=x.intersection(g,m[h]);o=g}break}let c=x.object(n);e.additionalProperties===!1?o=c.strict():typeof e.additionalProperties=="object"?o=c.catchall(K(e.additionalProperties,t)):o=c.passthrough();break}case"array":{let n=e.prefixItems,i=e.items;if(n&&Array.isArray(n)){let s=n.map(u=>K(u,t)),c=i&&typeof i=="object"&&!Array.isArray(i)?K(i,t):void 0;c?o=x.tuple(s).rest(c):o=x.tuple(s),typeof e.minItems=="number"&&(o=o.check(x.minLength(e.minItems))),typeof e.maxItems=="number"&&(o=o.check(x.maxLength(e.maxItems)))}else if(Array.isArray(i)){let s=i.map(u=>K(u,t)),c=e.additionalItems&&typeof e.additionalItems=="object"?K(e.additionalItems,t):void 0;c?o=x.tuple(s).rest(c):o=x.tuple(s),typeof e.minItems=="number"&&(o=o.check(x.minLength(e.minItems))),typeof e.maxItems=="number"&&(o=o.check(x.maxLength(e.maxItems)))}else if(i!==void 0){let s=K(i,t),c=x.array(s);typeof e.minItems=="number"&&(c=c.min(e.minItems)),typeof e.maxItems=="number"&&(c=c.max(e.maxItems)),o=c}else o=x.array(x.any());break}default:throw new Error(`Unsupported type: ${r}`)}return o}function K(e,t){if(typeof e=="boolean")return e?x.any():x.never();let r=Bf(e,t),o=e.type||e.enum!==void 0||e.const!==void 0;if(e.anyOf&&Array.isArray(e.anyOf)){let c=e.anyOf.map(l=>K(l,t)),u=x.union(c);r=o?x.intersection(r,u):u}if(e.oneOf&&Array.isArray(e.oneOf)){let c=e.oneOf.map(l=>K(l,t)),u=x.xor(c);r=o?x.intersection(r,u):u}if(e.allOf&&Array.isArray(e.allOf))if(e.allOf.length===0)r=o?r:x.any();else{let c=o?r:K(e.allOf[0],t),u=o?0:1;for(let l=u;l<e.allOf.length;l++)c=x.intersection(c,K(e.allOf[l],t));r=c}e.nullable===!0&&t.version==="openapi-3.0"&&(r=x.nullable(r)),e.readOnly===!0&&(r=x.readonly(r)),e.default!==void 0&&(r=r.default(e.default));let n={},i=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(let c of i)c in e&&(n[c]=e[c]);let s=["contentEncoding","contentMediaType","contentSchema"];for(let c of s)c in e&&(n[c]=e[c]);for(let c of Object.keys(e))By.has(c)||(n[c]=e[c]);return Object.keys(n).length>0&&t.registry.add(r,n),e.description&&(r=r.describe(e.description)),r}function Hf(e,t){if(typeof e=="boolean")return e?x.any():x.never();let r;try{r=JSON.parse(JSON.stringify(e))}catch{throw new Error("fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas")}let o=Hy(r,t?.defaultTarget),n=r.$defs||r.definitions||{},i={version:o,defs:n,refs:new Map,processing:new Set,rootSchema:r,registry:t?.registry??G};return K(r,i)}var bl={};Ie(bl,{bigint:()=>Jy,boolean:()=>qy,date:()=>Yy,number:()=>Wy,string:()=>Ky});function Ky(e){return Zs(Rt,e)}function Wy(e){return Js(zt,e)}function qy(e){return rc(Ut,e)}function Jy(e){return oc(jt,e)}function Yy(e){return hc(wn,e)}Z(xr());var Gf=a.enum(["SUM","COUNT","MAX","UNIQUE_COUNT","LATEST"]),yl=a.object({d:a.number().int().nonnegative(),w:a.number().int().positive(),c:a.number().nonnegative(),agg:Gf.default("COUNT").optional(),valueProperty:a.string().optional(),uniqueProperty:a.string().optional()}),Xy=a.object({kind:a.literal("credential_validity")}),Qy=a.object({kind:a.literal("track_only_bypass")}),ex=a.object({kind:a.literal("lifecycle_block"),blockOn:a.array(a.string()).default(["SUSPENDED","CANCELLED","INACTIVE"]),code:a.string().default("subscription_inactive")}),tx=a.object({kind:a.literal("identity_requirement"),require:a.enum(["org_only","org_and_user"]).default("org_only")}),nx=a.object({kind:a.literal("scope"),requireExplicit:a.boolean().default(!0)}),rx=a.object({kind:a.literal("feature_gate"),feature:a.string().min(1).max(120)}),ix=a.object({kind:a.literal("geo_restriction"),allow:a.array(a.string().length(2).regex(/^[A-Z]{2}$/)).optional(),block:a.array(a.string().length(2).regex(/^[A-Z]{2}$/)).optional()}).refine(e=>e.allow!==void 0||e.block!==void 0,{message:"geo_restriction requires either `allow` or `block`"}),ox=a.enum(["fixed_window","sliding_window","token_bucket"]),ax=yl.extend({kind:a.literal("rate_limit"),m:a.enum(["e","t"]).default("e"),strategy:ox.default("fixed_window"),bucket_capacity:a.number().positive().optional(),refill_rate_per_second:a.number().positive().optional()}).superRefine((e,t)=>{e.strategy==="token_bucket"?(e.bucket_capacity===void 0&&t.addIssue({code:"custom",message:"token_bucket strategy requires `bucket_capacity` (positive number)",path:["bucket_capacity"]}),e.refill_rate_per_second===void 0&&t.addIssue({code:"custom",message:"token_bucket strategy requires `refill_rate_per_second` (positive number)",path:["refill_rate_per_second"]})):(e.bucket_capacity!==void 0&&t.addIssue({code:"custom",message:`bucket_capacity is only valid when strategy === 'token_bucket' (got '${e.strategy}')`,path:["bucket_capacity"]}),e.refill_rate_per_second!==void 0&&t.addIssue({code:"custom",message:`refill_rate_per_second is only valid when strategy === 'token_bucket' (got '${e.strategy}')`,path:["refill_rate_per_second"]}))}),sx=a.enum(["fixed_window","sliding_window"]),cx=yl.extend({kind:a.literal("quota"),ovr:a.enum(["BLOCK","ALLOW_AND_BILL"]),strategy:sx.default("fixed_window")}),ux=yl.extend({kind:a.literal("credit_balance"),ovr:a.enum(["BLOCK","ALLOW_AND_BILL"])}),lx=a.object({kind:a.literal("concurrency"),capability:a.string().min(1).max(120),limit:a.number().int().positive(),lease_ttl_seconds:a.number().int().positive().max(3600).default(60)}),dx=a.object({kind:a.literal("capability_limit"),capability:a.string().min(1).max(120),limit:a.union([a.number().int().nonnegative(),a.boolean()])}),mx=a.object({kind:a.literal("resource_count"),resource:a.string().min(1).max(120),limit:a.number().int().nonnegative(),actionId:a.string().min(1).max(160).optional()}),px=a.object({kind:a.literal("reservation"),dimension:a.string().min(1).max(120),max_outstanding:a.number().int().positive(),hold_seconds:a.number().int().positive().max(86400)}),xl=a.discriminatedUnion("kind",[Xy,Qy,ex,tx,nx,rx,ix,ax,cx,ux,dx,mx,lx,px]);var WT=a.object({keyId:a.string().min(1),orgId:a.string().min(1),actorType:a.enum(["org","user"]).optional(),actorId:a.string().nullable().optional(),productId:a.string().min(1),compiledPlanId:a.string().min(1),entitlementHash:a.string().optional(),subjectKey:a.string().min(1),subscriptionId:a.string().min(1),currentPeriodId:a.string().optional(),currentPeriodStartMs:a.number().optional(),subscriberId:a.string().min(1),apiKeyId:a.string().nullable(),entitlementVersion:a.number(),identityRequirement:a.enum(["org_only","org_and_user"]),status:a.enum(["active","revoked"]),expiresAt:a.number().nullable().optional(),subscriberStatus:a.enum(["ONBOARDING","ACTIVE","SUSPENDED"]),subscriptionStatus:a.string().min(1),environment:a.enum(["production","sandbox"]).optional(),environmentId:a.string().optional(),scopes:a.array(a.string()).readonly().optional(),entitlement:a.record(a.string(),a.unknown()).nullable().optional()});var Kf=a.object({unit:a.enum(["requests","tokens","computeMs","dollars"]),window:a.enum(["second","minute","hour","day","week","month"]),capacity:a.number()}),fx=a.object({id:a.string().min(1),slug:a.string().optional(),transportMode:a.enum(["public_origin","mtls","cloudflare_tunnel"]),verificationRequired:a.boolean().optional(),originUrl:a.string().optional(),originHostname:a.string().optional(),mtlsClientCertRef:a.string().optional(),accessCredentialRef:a.string().optional(),policyVersion:a.string().optional()}),qT=a.object({id:a.string().min(1),origin:a.string().min(1),sandboxOrigin:a.string().nullable().optional(),authHeader:a.string().optional(),pricing:a.object({requests:a.number().optional(),tokens:a.number().optional(),computeMs:a.number().optional(),per_request:a.number().optional()}).catchall(a.number().optional()).optional(),metering:a.object({tokens:a.object({estimatePerRequest:a.number().optional()}).optional(),computeMs:a.object({estimatePerRequest:a.number().optional()}).optional(),billOn4xx:a.boolean().optional()}).optional(),tenantLimits:a.array(Kf).readonly().optional(),userLimits:a.array(Kf).readonly().optional(),environmentId:a.string().optional(),contextTokenSecret:a.string().nullable().optional(),timeoutMs:a.number().positive().optional(),idleTimeoutMs:a.number().positive().optional(),backends:a.array(fx).optional(),defaultBackendId:a.string().optional(),verificationRequired:a.boolean().optional()});var gx=a.object({perRequestMinUnitsByDim:a.record(a.string(),a.number()).optional(),creditPoolMicros:a.number().optional(),perDimUnitCostMicros:a.record(a.string(),a.number()).optional()}),hx=a.object({source:a.enum(["fixed","provider_catalog"]),meterKey:a.string(),selector:a.string().optional(),measures:a.array(a.string()),catalog:a.string().optional(),pricePolicy:a.string().optional(),markupPercent:a.number().optional(),fixedRatesMicros:a.record(a.string(),a.record(a.string(),a.number())).optional()}),_x=a.object({key:a.string(),display:a.string(),unit:a.string().optional(),aggregation:a.enum(["SUM","COUNT","MAX","UNIQUE_COUNT","LATEST"]),window:a.enum(["minute","hour","day","month","billing_period"]),enforcementType:a.string()}),vx=a.object({feature:a.string(),method:a.string(),path:a.string(),meters:a.array(a.string()).optional()}),JT=a.object({v:a.number(),sub:a.string(),compiledPlanId:a.string().min(1),planType:a.string(),ts:a.number(),constraints:a.array(xl),cv:a.number(),dm:a.record(a.string(),a.number()),dmv:a.number().optional(),floor:gx.nullable().optional(),displayDims:a.array(a.number()).optional(),meterSemantics:a.record(a.string(),_x).optional(),rp:a.record(a.string(),hx).optional(),fr:a.array(vx).optional(),sig:a.string().min(1),sigKid:a.string().optional(),environmentId:a.string().optional()}).passthrough();var YT=a.object({subscriptionId:a.string().min(1),activePeriodId:a.string().optional(),activeCompiledPlanId:a.string().min(1),activeEntitlementHash:a.string().optional(),enforcementMode:a.enum(["STRICT","GRACE","TRACK_ONLY"]),gracePeriodEndsAt:a.string().optional(),trialEndsAt:a.string().optional(),overrides:a.object({featureGateOverrides:a.record(a.string(),a.boolean()).optional()}).optional(),scheduledTransition:a.object({kind:a.string(),timing:a.string(),scheduledFor:a.string(),toCompiledPlanId:a.string().nullable()}).optional(),creditPool:a.object({periodStartMs:a.number(),periodEndMs:a.number(),grantedCents:a.number(),policy:a.enum(["block","allow"]),epoch:a.number()}).optional(),resourceCounts:a.record(a.string(),a.number()).optional(),dedicatedShard:a.enum(["ACTIVE","DRAINING"]).optional(),generation:a.number(),updatedAt:a.string()});var bx=["DRAFT","ACTIVE"],eA=a.enum(bx),yx=["ONBOARDING","ACTIVE","SUSPENDED"],Wf=a.enum(yx),xx=["ACTIVE","REVOKED"],tA=a.enum(xx),kx=["BLOCK","ALLOW_AND_BILL"],qf=a.enum(kx),Sx=["ACTIVE","ARCHIVED"],nA=a.enum(Sx),$x=["ACTIVE","EXPERIMENTAL","LEGACY_STABLE","PHASING_OUT","SUPERSEDED","ARCHIVED"],rA=a.enum($x);var Ni=[{id:"requests",label:"API requests",description:"Count every call \u2014 the right default for most APIs.",meters:[{key:"requests",display:"Requests",unit:"request"}]},{id:"ai-tokens",label:"AI tokens",description:"LLM-style token metering alongside calls. The gateway can estimate tokens per request and settle actuals from @farthershore/backend reports.",meters:[{key:"requests",display:"Requests",unit:"request"},{key:"tokens_used",display:"Tokens Used",unit:"token"}]},{id:"credits",label:"Credits",description:"Price work in abstract credits (e.g. one image = 5 credits). Report each call's dynamic credit cost through @farthershore/backend.",meters:[{key:"requests",display:"Requests",unit:"request"},{key:"credits",display:"Credits",unit:"credit"}]},{id:"spend",label:"Metered spend",description:"Pass-through spend in cents (OpenRouter-style) reported through @farthershore/backend. Pairs with prepaid credit wallets.",meters:[{key:"requests",display:"Requests",unit:"request"},{key:"dollars",display:"Spend",unit:"cent"}]},{id:"compute",label:"Compute time",description:"Bill milliseconds of compute, settled from @farthershore/backend reports.",meters:[{key:"requests",display:"Requests",unit:"request"},{key:"compute_ms",display:"Compute Time",unit:"ms"}]}];function Jf(e){let t=e.trim().toLowerCase();return Ni.find(r=>r.id===t)}function Yf(){return Ni.map(e=>e.id)}var Ix="FS_RUNTIME_TOKEN";var Ex={payload:"x-fs-metering",signature:"x-fs-metering-sig",token:"x-fs-metering-token"};var cA={environmentVariable:Ix,presentation:Ex.token,storage:"sha256-hash-only"};var Xf={missingSignature:"missing_signature",malformedSignature:"malformed_signature",unknownKeyId:"unknown_key_id",jwksUnavailable:"jwks_unavailable",badSignature:"bad_signature",bodyHashMismatch:"body_hash_mismatch",routeMismatch:"route_mismatch",clockSkew:"clock_skew",expiredSignature:"expired_signature",replayedNonce:"replayed_nonce",bodyTooLarge:"body_too_large",environmentMismatch:"environment_mismatch",missingToken:"missing_token",invalidToken:"invalid_token"};var uA=10*1024*1024;var wx=["CHECKOUT_COMPLETED","PLAN_CHANGED","CANCELLED","RESTORED","UNSCHEDULED_CANCELLATION","PRICE_ROLLOVER","PAUSED","RESUMED","PLAN_CHANGE_SCHEDULED","PLAN_CHANGE_ABORTED","SCHEDULE_CREATED","SCHEDULE_UPDATED","SCHEDULE_RELEASED","SCHEDULE_COMPLETED","SCHEDULE_ABORTED","CANCEL_SCHEDULED","PAYMENT_FAILED","PAYMENT_RECOVERED","PAYMENT_RECOVERED_FROM_SUSPENDED","PAYMENT_ACTION_REQUIRED","RECURRING_PAYMENT","REFUND_PROCESSED","DISPUTE_OPENED","DISPUTE_FUNDS_WITHDRAWN","DISPUTE_CLOSED","MIN_SPEND_TRUE_UP"],mA=a.enum(wx);var hA=a.object({fontFamily:a.enum(["sans","serif","mono","system"]).optional(),radius:a.enum(["none","sm","md","lg","full"]).optional(),density:a.enum(["compact","default","comfortable"]).optional(),colorScheme:a.enum(["system","light","dark"]).optional()}).strict().optional();var Ox=a.object({d:a.number(),w:a.number(),capacity:a.number(),remaining:a.number(),windowStart:a.number(),windowEnd:a.number()}),Tx=a.record(a.string(),Ox),Ax=a.object({allocations:a.array(a.number()),expiresAt:a.number()}),Px=a.record(a.string(),Ax),Cx=a.record(a.string(),a.bigint()),xA=a.object({subscriptionId:a.string(),handoffToken:a.string(),targetShardId:a.string(),policyVersion:a.number(),entitlementVersion:a.number().nullable(),windowStates:Tx,activeLeases:Px,totalsByDimension:Cx.optional(),billingCycleId:a.string().nullable().optional(),billingCycleStartMs:a.number().optional()});var Nx={gatewayProjectRead:"gateway:project:read",gatewayResourceWrite:"gateway:resource:write",usageWrite:"usage:write",authzDeniedWrite:"authz-denied:write",reservationAuthorize:"reservation:authorize",reservationFinalize:"reservation:finalize",internalCronRun:"internal:cron:run",personaManage:"persona:manage"},EA=Object.values(Nx);var Rx=["managed_frontend","custom_frontend","embedded_sdk","public_api","cli","agent","webhook","admin","internal"],eg=a.enum(Rx),Qf=a.string().min(1).max(128),Dx=a.object({d:a.number().int().nonnegative(),w:a.number().int().positive(),rem:a.number(),cap:a.number()}).strict(),tg=a.object({v:a.literal(1),entV:a.number().int().nonnegative().optional(),entHash:Qf.optional(),featureGrant:a.boolean().optional(),gates:a.array(Qf).max(16).optional(),limits:a.array(Dx).max(16).optional()}).strict();var zx=a.object({requestId:a.string(),eventId:a.string(),tenantId:a.string(),slug:a.string(),subscriptionId:a.string(),subscriberId:a.string(),apiKeyId:a.string().nullable(),compiledPlanId:a.string(),subscriberStatus:Wf,subscriptionStatus:a.string(),productId:a.string(),statusCode:a.number(),path:a.string(),latencyMs:a.number(),rawDimsUnits:a.record(a.string(),a.number()),meterSettlements:a.array(a.object({meterId:a.string(),meterType:a.enum(["exact_pre_request","estimated_then_settled","postpaid","strict_concurrency"]),reserved:a.number(),actual:a.number(),delta:a.number(),dimension:a.number().int().nonnegative(),leaseId:a.string()})).optional(),reportingAttested:a.boolean(),billable:a.boolean(),measureContext:a.record(a.string(),a.unknown()).optional(),creditUnitsConsumed:a.record(a.string(),a.number()).optional(),timestamp:a.number(),environmentId:a.string().nullable().optional(),orgId:a.string().optional(),actorType:a.enum(["org","user"]).optional(),actorId:a.string().nullable().optional(),subjectKey:a.string().optional(),overageBehavior:qf.optional(),environment:a.enum(["production","sandbox"]).optional(),surface:eg.optional(),actionId:a.string().min(1).max(128).optional(),subjectType:a.string().min(1).max(128).optional(),subjectId:a.string().min(1).max(256).optional(),decision:tg.optional(),leaseId:a.string(),transactionId:a.string(),gatewayMetadata:a.object({shardId:a.string(),policyVersion:a.number().int().nonnegative().optional(),artifactVersion:a.number().int().nonnegative().default(0),artifactHash:a.string().regex(/^sha256_[a-f0-9]{64}$/).optional(),leaseTelemetry:a.object({consumeRequests:a.number().int().nonnegative(),localLeaseHits:a.number().int().nonnegative(),doAllocationAttempts:a.number().int().nonnegative(),doAllocationGrants:a.number().int().nonnegative(),doAllocationDenials:a.number().int().nonnegative(),doUnavailable:a.number().int().nonnegative(),doCircuitOpen:a.number().int().nonnegative(),leaseRefreshSingleflightJoins:a.number().int().nonnegative(),leaseRefreshSingleflightJoinRate:a.number().min(0).max(1),expiredLeasesReaped:a.number().int().nonnegative(),expiredLeaseReclaimedGrant:a.array(a.number().nonnegative()),reconcileRequests:a.number().int().nonnegative(),reconcilePositiveDeltas:a.number().int().nonnegative(),reconcileNoLocalLease:a.number().int().nonnegative(),doReconcileAttempts:a.number().int().nonnegative(),doReconcileFailures:a.number().int().nonnegative(),unspentLeaseRemainderReturns:a.number().int().nonnegative(),unspentLeaseRemainderReturnFailures:a.number().int().nonnegative(),unspentLeaseRemainderReturnedGrant:a.array(a.number().nonnegative()),maxObservedPositiveReconcileDelta:a.array(a.number().nonnegative()),requestToDoRatio:a.number().nonnegative(),localLeaseHitRate:a.number().min(0).max(1),localSpendRate:a.number().min(0).max(1),maxObservedActiveLeases:a.number().int().nonnegative(),maxObservedOutstandingGrant:a.array(a.number().nonnegative()),maxObservedOutstandingGrantRatio:a.number().nonnegative(),maxObservedEmergencyReserveGrant:a.array(a.number().nonnegative()),maxObservedEmergencyReserveGrantRatio:a.number().nonnegative(),maxObservedLeaseGrant:a.array(a.number().nonnegative()),maxObservedLeaseGrantRatio:a.number().nonnegative(),maxObservedLeaseTtlMs:a.number().int().nonnegative()}).optional(),artifactCacheTelemetry:a.object({reads:a.number().int().nonnegative(),l0FreshHits:a.number().int().nonnegative(),l0Misses:a.number().int().nonnegative(),l0StaleServes:a.number().int().nonnegative(),l0StaleIfErrorServes:a.number().int().nonnegative(),l0BlockingRefreshes:a.number().int().nonnegative(),l0SingleflightJoins:a.number().int().nonnegative(),l0EarlyRefreshes:a.number().int().nonnegative(),l1Hits:a.number().int().nonnegative(),l1Misses:a.number().int().nonnegative(),l1Rejected:a.number().int().nonnegative(),l1WriteFailures:a.number().int().nonnegative(),kvHits:a.number().int().nonnegative(),kvMisses:a.number().int().nonnegative(),kvTimeouts:a.number().int().nonnegative(),kvCircuitOpenReads:a.number().int().nonnegative(),resultHits:a.number().int().nonnegative(),resultMisses:a.number().int().nonnegative(),resultDenied:a.number().int().nonnegative(),resultUnavailable:a.number().int().nonnegative(),backgroundRefreshErrors:a.number().int().nonnegative(),l0HitRate:a.number().min(0).max(1),l0SingleflightJoinRate:a.number().min(0).max(1),l0EarlyRefreshRate:a.number().min(0).max(1),l1HitRate:a.number().min(0).max(1),kvHitRate:a.number().min(0).max(1),resultHitRate:a.number().min(0).max(1),staleServeRate:a.number().min(0).max(1)}).optional(),gatewayVersion:a.string()}).passthrough()}).passthrough();var Ux=a.object({path:a.string(),code:a.string(),message:a.string()}),DA=a.object({reason:a.literal("schema_validation_failed"),receivedAt:a.string(),rawPayload:a.unknown(),issues:a.array(Ux),consumerVersion:a.string().optional(),originalMessageId:a.string().optional()});var kl=["subscription.created","subscription.updated","subscription.canceled","payment.succeeded","payment.failed","rate_limit.exceeded","entitlement.changed","usage.threshold_reached"],Lt=a.enum(kl);var pe=a.enum(["immediate","period_end"]),Rn=a.object({default:pe.default("period_end"),when:a.object({price_increase:pe.optional(),price_decrease:pe.optional(),feature_added:pe.optional(),feature_removed:pe.optional(),limit_increased:pe.optional(),limit_reduced:pe.optional(),credit_increased:pe.optional(),credit_reduced:pe.optional(),rating_changed:pe.optional()}).strict().default({price_increase:"period_end",price_decrease:"immediate",feature_added:"immediate",feature_removed:"period_end",limit_increased:"immediate",limit_reduced:"period_end",credit_increased:"immediate",credit_reduced:"period_end",rating_changed:"period_end"}),allowImmediatePriceIncrease:a.boolean().default(!1),allowImmediateEntitlementReduction:a.boolean().default(!1)}).strict().superRefine((e,t)=>{(e.when.price_increase??e.default)==="immediate"&&!e.allowImmediatePriceIncrease&&t.addIssue({code:"custom",path:["when","price_increase"],message:"price_increase cannot switch immediately without allowImmediatePriceIncrease: true"});for(let r of["feature_removed","limit_reduced","credit_reduced"])(e.when[r]??e.default)==="immediate"&&!e.allowImmediateEntitlementReduction&&t.addIssue({code:"custom",path:["when",r],message:`${r} cannot switch immediately without allowImmediateEntitlementReduction: true`})});var jx=a.object({kind:a.literal("credit"),amount_cents:a.number().int().nonnegative(),recurs:a.boolean().optional(),expires_after_days:a.number().int().positive().optional(),label:a.string().min(1).max(120).optional()}),Lx=a.object({kind:a.literal("top_up"),sku:a.string().min(1).max(120),label:a.string().min(1).max(200),price_cents:a.number().int().positive(),credit_cents:a.number().int().positive()}),fe=a.discriminatedUnion("kind",[jx,Lx]);function ng(e){return e.kind==="credit"&&e.recurs===!0&&e.label===void 0}function rg(e){return e.kind==="credit"&&e.recurs!==!0&&e.label===void 0}function Sl(e,t,r=["grants"]){if(!e)return;let o=0,n=0;for(let i of e)ng(i)?o+=1:rg(i)&&(n+=1);o>1&&t.addIssue({code:"custom",message:"At most one recurring `credit` grant (recurs:true, no label) is allowed \u2014 recurring credit is a single canonical entry.",path:r}),n>1&&t.addIssue({code:"custom",message:"At most one one-time `credit` grant (recurs:false, no label) is allowed \u2014 one-time credit is a single canonical entry.",path:r})}function ig(e){return e.grants&&e.grants.length>0?[...e.grants]:[]}function Dn(e){return ig(e).find(ng)?.amount_cents??0}function Ft(e){return ig(e).find(rg)?.amount_cents??0}var Fx=a.object({percent:a.number().int().min(0).max(100)}),Mx=a.object({threshold_cents:a.number().int().nonnegative(),refill_cents:a.number().int().positive()}),Ae=a.object({rollover:Fx.optional(),auto_recharge:Mx.optional()});var og=a.enum(["linear","active_count"]);var Zx=a.object({up_to:a.number().int().positive().nullable(),price_per_unit_micros:a.number().int().nonnegative()}),Vx=a.object({strategy:a.enum(["graduated","volume"]),tiers:a.array(Zx).min(1).max(20)}),ge=a.object({dimension:a.string().min(1).max(64).regex(/^[a-z0-9_]+$/,"Meter dimension must be lowercase alphanumeric with underscores"),kind:og.default("linear"),price_per_unit_micros:a.number().int().nonnegative().default(0),tiered:Vx.optional(),included_units:a.number().int().positive().optional()}).superRefine((e,t)=>{if(e.tiered&&e.price_per_unit_micros>0&&t.addIssue({code:"custom",message:"`tiered` is mutually exclusive with a non-zero `price_per_unit_micros` \u2014 drop one",path:["tiered"]}),e.included_units!==void 0&&e.tiered&&t.addIssue({code:"custom",message:"`included_units` is mutually exclusive with `tiered` \u2014 a tiered schedule already expresses the included allotment as a zero-priced first tier",path:["included_units"]}),e.tiered){let r=0,o=!1;for(let n=0;n<e.tiered.tiers.length;n++){let i=e.tiered.tiers[n];if(o){t.addIssue({code:"custom",message:"Open-ended tier (`up_to: null`) must be the final tier",path:["tiered","tiers",n,"up_to"]});break}if(i.up_to===null){o=!0;continue}i.up_to<=r&&t.addIssue({code:"custom",message:`Tier upper bounds must be strictly ascending (tier ${n} = ${i.up_to} <= previous ${r})`,path:["tiered","tiers",n,"up_to"]}),r=i.up_to}o||t.addIssue({code:"custom",message:"The final tier of a `tiered` schedule must be open-ended (`up_to: null`)",path:["tiered","tiers",e.tiered.tiers.length-1,"up_to"]})}}),Pe=a.enum(["month","year"]),Bx=a.object({meters:a.array(ge).default([]),recurring_fee_cents:a.number().int().nonnegative().default(0),billing_interval:Pe.default("month"),grants:a.array(fe).max(40).default([]),creditPolicy:Ae.optional(),trial_days:a.number().int().nonnegative().default(0),max_monthly_spend_cents:a.number().int().nonnegative().optional()});var Hx=a.string().min(1),Gx=a.object({type:a.literal("named"),name:a.enum(["second","minute","hour","day","week","month"])}),Kx=a.object({type:a.literal("custom"),seconds:a.number().int().positive(),label:a.string().optional()}),Wx=a.discriminatedUnion("type",[Gx,Kx]),Ze=a.object({dimension:Hx,window:Wx,capacity:a.number().nonnegative(),enforcement:a.enum(["enforce","track"]).optional(),acknowledgeUnreachable:a.boolean().optional()}),JA=a.array(Ze).max(20);var qx=a.enum(["NONE","PRORATE","CREDIT"]).default("NONE"),Jx={meters:a.array(ge).default([]),recurring_fee_cents:a.number().int().nonnegative().default(0),billing_interval:Pe.default("month"),trial_days:a.number().int().nonnegative().default(0),max_monthly_spend_cents:a.number().int().nonnegative().optional(),min_monthly_spend_cents:a.number().int().nonnegative().optional(),grants:a.array(fe).max(40).default([]),creditPolicy:Ae.optional()},Yx={meters:a.array(ge).optional(),recurring_fee_cents:a.number().int().nonnegative().optional(),billing_interval:Pe.optional(),trial_days:a.number().int().nonnegative().optional(),max_monthly_spend_cents:a.number().int().nonnegative().optional(),min_monthly_spend_cents:a.number().int().nonnegative().optional(),grants:a.array(fe).max(40).optional(),creditPolicy:Ae.optional()},Xx=a.object({id:a.string().min(1).max(64).regex(/^[a-z0-9_-]+$/,"Variant id must be lowercase alphanumeric with hyphens/underscores"),label:a.string().max(200).optional(),rolloutPercent:a.number().int().min(0).max(100),assignmentSeed:a.string().min(1).max(100).default("default"),prorationOnRollback:qx,...Yx,limits:a.array(Ze).max(20).optional(),featureGates:a.record(a.string(),a.boolean()).optional(),capability_limits:a.record(a.string().min(1).max(120),a.union([a.number().int().nonnegative(),a.boolean()])).optional(),overageBehavior:a.enum(["block","allow_and_bill"]).optional()}),ag=Xx.superRefine((e,t)=>{Sl(e.grants,t)}),sg=a.object({key:a.string().min(1).max(64).regex(/^[a-z0-9_-]+$/,"Plan key must be lowercase alphanumeric with hyphens/underscores"),name:a.string().min(1).max(100),description:a.string().max(500).optional(),details:a.array(a.string().max(200)).max(10).optional(),...Jx,free:a.boolean().default(!1),limits:a.array(Ze).max(20).default([]),featureGates:a.record(a.string(),a.boolean()).optional(),capability_limits:a.record(a.string().min(1).max(120),a.union([a.number().int().nonnegative(),a.boolean()])).default({}),overageBehavior:a.enum(["block","allow_and_bill"]).default("block"),selfServeEnabled:a.boolean().default(!0),legacy:a.boolean().optional().default(!1),variants:a.array(ag).max(4).optional(),archive:a.object({at:a.string().datetime().optional(),transitionTo:a.string().optional(),strategy:a.enum(["auto","explicit","block"]).default("auto")}).optional()}),Ri=sg.superRefine((e,t)=>{Sl(e.grants,t)});var Qx=/^\$\{[A-Z][A-Z0-9_]{0,127}\}$/,$l=a.string().min(3).max(200).refine(e=>Qx.test(e),{message:"secret must use ${VAR} interpolation syntax (e.g. ${WEBHOOK_SECRET}); raw secrets in YAML are rejected. Define the env var in the per-product secret store and reference it here."}),Il=a.object({maxAttempts:a.number().int().min(1).max(20).default(5),backoff:a.enum(["exponential","fixed"]).default("exponential")}),El=a.object({id:a.string().min(1).max(64).regex(/^[a-z0-9_-]+$/,"Webhook endpoint id must be lowercase alphanumeric with hyphens/underscores"),url:a.string().url("webhooks.endpoints[].url must be a valid URL"),secret:$l,events:a.array(Lt).min(1,"webhooks.endpoints[].events must subscribe to \u2265 1 event"),enabled:a.boolean().default(!0),retryPolicy:Il.default({maxAttempts:5,backoff:"exponential"})}),wl=a.object({endpoints:a.array(El).max(50).default([])});var ek=a.object({meters:a.array(ge).optional(),recurring_fee_cents:a.number().int().nonnegative().optional(),billing_interval:Pe.optional(),grants:a.array(fe).max(40).optional(),creditPolicy:Ae.optional(),trial_days:a.number().int().nonnegative().optional(),max_monthly_spend_cents:a.number().int().nonnegative().optional(),limits:a.array(Ze).max(20).optional(),featureGates:a.record(a.string(),a.boolean()).optional(),overageBehavior:a.enum(["block","allow_and_bill"]).optional(),selfServeEnabled:a.boolean().optional(),legacy:a.boolean().optional()}).strict(),tk=a.object({url:a.string().url().optional(),secret:$l.optional(),events:a.array(Lt).optional(),enabled:a.boolean().optional(),retryPolicy:Il.partial().optional()}).strict(),nk=a.object({plans:a.record(a.string(),ek).optional(),webhooks:a.object({endpoints:a.record(a.string(),tk).optional()}).strict().optional()}).strict(),Ol=a.record(a.string().min(1).max(64),nk);var cg=1,ug=["plans_table","usage_card","api_keys_panel","billing_summary","credit_balance","feature_panel","product_docs","audit_log","team_panel","markdown"],lg=["/","/pricing","/dashboard","/dashboard/*","/settings","/settings/*","/team","/audit-log","/docs","/docs/*","/terms","/privacy","/persona","/persona-sign-in"],dg=a.string().min(1).max(200).regex(/^\/[a-zA-Z0-9_./-]*$/,"path must start with / and contain only [a-zA-Z0-9_./-]"),Tl=a.string().min(1).max(120).regex(/^[a-z0-9_-]+$/),mg=a.object({label:a.string().min(1).max(80),path:dg,capability:Tl.optional()}),pg=a.enum(ug),fg=a.object({component:pg,props:a.record(a.string().min(1).max(80),a.unknown()).optional(),capability:Tl.optional(),gateMode:a.enum(["hide","disable","upsell"]).default("hide")}),gg=a.object({path:dg,title:a.string().min(1).max(120),requiresAuth:a.boolean(),capability:Tl.optional(),components:a.array(fg).max(12).default([])}),Al=a.object({version:a.literal(cg),nav:a.array(mg).max(12).default([]),pages:a.array(gg).max(24).default([])}).superRefine((e,t)=>{let r=new Set;e.pages.forEach((o,n)=>{r.has(o.path)&&t.addIssue({code:"custom",message:`duplicate frontend page path "${o.path}"`,path:["pages",n,"path"]}),r.add(o.path),hg(o.path)&&t.addIssue({code:"custom",message:`frontend page path "${o.path}" is reserved by the template`,path:["pages",n,"path"]})})});function hg(e){return lg.some(t=>{if(t.endsWith("/*")){let r=t.slice(0,-2);return e===r||e.startsWith(`${r}/`)}return e===t})}var Pl=a.string().min(1).max(64).regex(/^[a-z0-9_-]+$/,"Plan key must be lowercase alphanumeric with hyphens/underscores"),_g=a.union([a.literal("head"),a.string().regex(/^[1-9][0-9]*$/,'version must be "head" or a positive integer')]),rk=a.object({plan:Pl,version:_g.optional()}),ik=a.object({plan:Pl,version:a.literal("head").default("head")}),ok=a.object({plan:Pl,version:_g}),vg=a.enum(["grandfather","next_renewal","by_date","immediate","opt_in"]),bg=a.enum(["none","prorate","credit"]),yg=a.object({effective:vg,date:a.string().datetime().optional(),proration:bg.optional()}).superRefine((e,t)=>{e.effective==="by_date"&&e.date===void 0&&t.addIssue({code:"custom",path:["date"],message:"existingCustomers.date is required when effective is by_date"})}),xg=a.object({subscriber:a.string().min(1).max(200),pinTo:ok,until:a.string().datetime().optional(),notes:a.string().max(1e3).optional()}),kg=a.object({id:a.string().min(1).max(120).regex(/^[a-z0-9][a-z0-9_.-]*$/,"Migration id must be lowercase alphanumeric with dots, hyphens, or underscores"),from:rk,to:ik,newCustomers:a.literal("immediate").default("immediate"),existingCustomers:yg,pins:a.array(xg).max(50).default([])}),Cl=a.array(kg).superRefine((e,t)=>{let r=new Set;e.forEach((o,n)=>{r.has(o.id)&&t.addIssue({code:"custom",path:[n,"id"],message:`duplicate migration id "${o.id}"`}),r.add(o.id)})});var Sg=a.enum(["subscription","subject"]),$g=a.enum(["reported","action_inferred"]),Ig=a.string().min(1).max(100).regex(/^[a-z0-9_.:-]+$/),Eg=a.object({name:Ig,display:a.string().min(1).max(120).optional(),scope:Sg.default("subscription"),subjectType:a.string().min(1).max(64).regex(/^[a-zA-Z0-9_.:-]+$/).optional(),countSource:$g.default("reported")}).superRefine((e,t)=>{e.scope==="subject"&&!e.subjectType&&t.addIssue({code:"custom",path:["subjectType"],message:"subjectType is required when resource scope is subject"}),e.scope==="subscription"&&e.subjectType&&t.addIssue({code:"custom",path:["subjectType"],message:"subjectType is only valid for subject-scoped counted resources"})}),Nl=a.array(Eg).max(100).default([]);var ak=a.object({key:a.string().min(1).max(64).regex(/^[a-z0-9_-]+$/,"AddOn key must be lowercase alphanumeric with hyphens/underscores"),name:a.string().min(1).max(100),description:a.string().max(500).optional(),recurring_fee_cents:a.number().int().nonnegative().default(0),billing_interval:Pe.default("month"),meters:a.array(ge).default([]),grants:a.array(fe).max(40).default([]),capability_limits:a.record(a.string().min(1).max(120),a.union([a.number().int().nonnegative(),a.boolean()])).default({}),featureGates:a.record(a.string(),a.boolean()).optional(),selfServeEnabled:a.boolean().default(!0)}),wg=a.record(a.string().min(1).max(64),ak).default({}),sk=a.enum(["active","canceled","paused","pending_activation"]),$P=a.object({addOnKey:a.string().min(1).max(64),status:sk.default("active"),activatedAt:a.string().datetime().optional(),canceledAt:a.string().datetime().nullable().optional(),stripeSubscriptionItemId:a.string().optional()});var Og=/^[a-z0-9][a-z0-9_-]*$/,Rl=a.string().min(1).max(64).regex(Og,"backend id must be a lowercase slug ([a-z0-9][a-z0-9_-]*)"),Tg=a.enum(["public_origin","mtls","cloudflare_tunnel"]),Ag=a.enum(["managed_cloudflared","sidecar"]);var Pg=a.object({mode:Tg.default("public_origin"),runner:Ag.optional()}).strict(),Cg=a.object({required:a.boolean().default(!1)}).strict(),Ng=a.object({name:a.string().min(1).max(120).optional(),slug:Rl.optional(),transport:Pg.default({mode:"public_origin"}),verification:Cg.default({required:!1}),meters:a.array(a.string().min(1).max(64)).max(100).optional(),default:a.boolean().optional(),originUrl:a.string().url().optional(),originHostname:a.string().min(1).max(255).optional()}).strict(),Dl=a.record(Rl,Ng),Mt=Rl,Zt={unknownBackendInRoute:"UNKNOWN_BACKEND_IN_ROUTE",ambiguousDefaultBackend:"AMBIGUOUS_DEFAULT_BACKEND",routeMeterNotAllowedByBackend:"ROUTE_METER_NOT_ALLOWED_BY_BACKEND",unknownMeterInBackend:"UNKNOWN_METER_IN_BACKEND"};function zl(e){let t=Object.keys(e??{});if(t.length===0)return{defaultId:null,ambiguous:!1};if(t.length===1)return{defaultId:t[0],ambiguous:!1};let r=t.filter(o=>e[o]?.default===!0);return r.length===1?{defaultId:r[0],ambiguous:!1}:{defaultId:null,ambiguous:!0}}var ck=a.string().min(2).max(20).regex(/^\d+(ms|s|m|h)$/,"rate_limit window must look like `60s`, `5m`, `1h`"),Rg=a.object({strategy:a.enum(["token_bucket","sliding_window","fixed_window"]).default("token_bucket"),dimensions:a.array(a.enum(["subscription","credential","ip","route"])).min(1).max(4).default(["subscription"]),limits:a.array(a.object({window:ck,max:a.number().int().positive().max(1e7)})).min(1).max(10),fail_open:a.object({max_consecutive_failures:a.number().int().positive().default(100),max_window_seconds:a.number().int().positive().default(60),recovery_threshold:a.number().int().positive().default(50),degraded_mode:a.enum(["safe_mode_block","safe_mode_throttle","runtime_killswitch_trigger"]).default("safe_mode_throttle")}).default({max_consecutive_failures:100,max_window_seconds:60,recovery_threshold:50,degraded_mode:"safe_mode_throttle"})}),Dg=a.object({header_name:a.string().min(1).max(100).default("x-api-key"),upstream_token_source:a.discriminatedUnion("type",[a.object({type:a.literal("none")}),a.object({type:a.literal("static_bearer"),token_secret_ref:a.string().min(1).max(200).describe("Reference into the secret store (e.g. CF Secret name); not the raw token")})]).default({type:"none"}),scope_mode:a.enum(["strict","advisory","off"]).default("strict")}),zg=a.object({max_in_flight:a.number().int().positive().max(1e4),dimensions:a.array(a.enum(["subscription","credential","capability"])).min(1).max(3).default(["subscription"]),capability:a.string().min(1).max(120).optional(),lease_ttl_seconds:a.number().int().positive().max(600).default(30),fail_open:a.object({max_consecutive_failures:a.number().int().positive().default(50),max_window_seconds:a.number().int().positive().default(60),recovery_threshold:a.number().int().positive().default(20),degraded_mode:a.enum(["safe_mode_block","safe_mode_throttle","runtime_killswitch_trigger"]).default("safe_mode_throttle")}).default({max_consecutive_failures:50,max_window_seconds:60,recovery_threshold:20,degraded_mode:"safe_mode_throttle"})}),Ug=a.object({max_attempts:a.number().int().min(1).max(5).default(2),retry_on_status:a.array(a.number().int().min(400).max(599)).min(1).max(20).default([502,503,504]),backoff:a.object({initial_ms:a.number().int().positive().max(5e3).default(100),multiplier:a.number().positive().max(10).default(2),jitter:a.enum(["none","full","equal"]).default("equal"),total_budget_ms:a.number().int().positive().max(3e4).default(5e3)}).default({initial_ms:100,multiplier:2,jitter:"equal",total_budget_ms:5e3})}),jg=a.object({applies_to:a.enum(["request","response","both"]).default("request"),rewrites:a.array(a.object({source:a.string().min(1).max(200),target:a.string().min(1).max(200).nullable()})).min(1).max(20)});var Ul=a.discriminatedUnion("type",[a.object({type:a.literal("rate_limit"),config:Rg}),a.object({type:a.literal("auth"),config:Dg}),a.object({type:a.literal("concurrency"),config:zg}),a.object({type:a.literal("retry"),config:Ug}),a.object({type:a.literal("transform"),config:jg})]);var Di=a.enum(["long","short","blocking"]).default("long"),Lg=a.object({route_types:a.array(a.enum(["http"])).max(5).optional(),meters:a.array(a.string().min(1).max(64)).max(20).optional(),auth_modes:a.array(a.enum(["api_key","oauth2","anonymous"])).max(5).optional()});var jl=a.intersection(a.object({name:a.string().min(1).max(64).regex(/^[a-z0-9_-]+$/,"Policy name must be lowercase alphanumeric with hyphens/underscores"),description:a.string().max(500).optional(),compatible_with:Lg.default({}),mutation_class:a.enum(["runtime","contractual"]).default("runtime"),cacheProfile:Di}),Ul);var uk=a.enum(["query","mutation"]),lk=a.enum(["none","metadata","full"]),dk=a.object({type:a.string().min(1).max(64).regex(/^[a-zA-Z0-9_.:-]+$/),from:a.enum(["header","path_param"]),name:a.string().min(1).max(120)}),mk=a.object({resource:a.string().min(1).max(100).regex(/^[a-z0-9_.:-]+$/),effect:a.enum(["create","delete"])}),Fg=a.object({id:a.string().min(1).max(160).regex(/^[a-z0-9_.:-]+$/),title:a.string().min(1).max(160).optional(),kind:uk,actorType:a.string().min(1).max(64).regex(/^[a-zA-Z0-9_.:-]+$/).optional(),subject:dk.optional(),inputSchemaRef:a.string().min(1).max(240).optional(),audit:lk.default("metadata"),resource:mk.optional()});var Mg=a.object({method:a.enum(["GET","POST","PUT","PATCH","DELETE","HEAD","OPTIONS","*"]).default("*"),path:a.string().min(1).max(500).regex(/^\/[a-zA-Z0-9_/:.{}*-]*$/,"path must start with / and contain only [a-zA-Z0-9_/:.{}*-]")});function pk(e){let t=e.trim();if(!t)return!1;let[r,o,n]=t.split("-");if(n!==void 0||!/^\d{3}$/.test(r??""))return!1;let i=Number(r),s=o===void 0?i:Number(o);return o!==void 0&&!/^\d{3}$/.test(o)?!1:i>=100&&i<=599&&s>=100&&s<=599&&i<=s}function Zg(e){return e.split(",").every(pk)}var zi=a.union([a.string().min(1).max(100).refine(Zg,{message:"onStatusCodes must be comma-separated HTTP status codes or numeric ranges, e.g. 200-299,304"}),a.array(a.number().int().min(100).max(599)).min(1).max(100)]),Vg=a.object({match:Mg,metering:a.object({defaults:a.record(a.string().min(1).max(64),a.number().finite().nonnegative()).optional(),reports:a.array(a.string().min(1).max(64)).max(20).optional(),estimates:a.record(a.string().min(1).max(64),a.number().finite().nonnegative()).optional(),onStatusCodes:zi.optional()}).optional(),unmetered:a.boolean().optional(),inheritDefaultMeters:a.boolean().optional(),action:a.string().min(1).max(160).regex(/^[a-z0-9_.:-]+$/).optional(),backend:Mt.optional()}).strict(),Bg=a.object({override_origin:a.string().url("override_origin must be a valid URL").nullable().default(null)}),Hg=a.object({rollout_key:a.string().min(1).max(120).regex(/^[a-z0-9_-]+$/,"rollout_key must be lowercase alphanumeric with hyphens/underscores").optional(),required_flags:a.array(a.string().min(1).max(120).regex(/^[a-z0-9_-]+$/)).max(10).optional()}),Ll=a.object({feature:a.string().min(1).max(100).regex(/^[a-z0-9_.:-]+$/,"feature key must be lowercase alphanumeric with [_.:-]"),description:a.string().max(500).optional(),mutation_class:a.enum(["runtime","contractual"]).default("contractual"),cacheProfile:Di,routes:a.array(Vg).min(1).max(50),upstream:Bg.default({override_origin:null}),policies:a.array(a.string().min(1).max(64).regex(/^[a-z0-9_-]+$/)).max(20).default([]),runtime:Hg.default({}),plans:a.array(a.string().min(1).max(64)).max(20).default([]),actions:a.array(Fg).max(100).optional(),backend:Mt.optional()}).strict();function Gg(e,t){e.usagePricing!==void 0&&t.addIssue({code:"custom",path:["usagePricing"],message:"usagePricing is not supported. Define usage.meters.<key>.rating instead."})}function Kg(e,t){e.filter(o=>o.free).length>1&&t.addIssue({code:"custom",path:["plans"],message:"Only one free plan is allowed per product"}),e.forEach((o,n)=>{o.free&&(fk(o,n,t),gk(o,n,t))})}function fk(e,t,r){(eh(e)??0)!==0&&r.addIssue({code:"custom",path:["plans",t,"recurring_fee_cents"],message:"Free plans must have zero price"})}function gk(e,t,r){e.limits.some(n=>!n.enforcement||n.enforcement==="enforce")||r.addIssue({code:"custom",path:["plans",t,"limits"],message:"Free plans must include at least one hard enforced limit"})}function Wg(e,t){let r=new Map;e.forEach((o,n)=>{if(o.free)return;let i=eh(o);if(i===void 0||i<=0)return;let s=yk(o,i),c=r.get(s);if(c){t.addIssue({code:"custom",path:["plans",n,"recurring_fee_cents"],message:`Paid plan price duplicates plan "${c}" (${s})`});return}r.set(s,o.key)})}function qg(e,t){let r=new Set((e.metering?.meters??[]).map(n=>n.key).filter(n=>typeof n=="string"&&n.length>0)),o=new Set(Object.keys(e.usage?.meters??{}));e.plans.forEach((n,i)=>{let s=n.meters;s&&s.forEach((c,u)=>{let l=c.dimension;typeof l!="string"||l.length===0||r.has(l)||o.has(l)||t.addIssue({code:"custom",path:["plans",i,"meters",u,"dimension"],message:`Plan "${n.key}" prices meter "${l}" but no metering.meters[] entry and no usage.meters[] entry declares it.`})})})}function Jg(e,t){if(!e.features)return;let r=new Set(e.plans.map(o=>o.key));for(let[o,n]of Object.entries(e.features)){if(!n.plans)continue;n.plans.forEach((s,c)=>{r.has(s)||t.addIssue({code:"custom",path:["features",o,"plans",c],message:`Feature "${o}" references unknown plan "${s}"`})});let i=new Set;n.plans.forEach((s,c)=>{i.has(s)&&t.addIssue({code:"custom",path:["features",o,"plans",c],message:`Feature "${o}" lists plan "${s}" more than once`}),i.add(s)})}}function Yg(e,t){if(!e.features)return;let r=new Set((e.metering?.meters??[]).map(n=>n.key).filter(n=>typeof n=="string"&&n.length>0)),o=!1;for(let[n,i]of Object.entries(e.features))(i.routes??[]).forEach((c,u)=>{let l=Fl(c);l.length!==0&&(o=!0,l.forEach((d,m)=>{r.has(d)||t.addIssue({code:"custom",path:["features",n,"routes",u,"metering",m],message:`Route references unknown meter "${d}". Declare it in metering.meters[].`})}))});o&&r.size===0&&t.addIssue({code:"custom",path:["metering","meters"],message:"One or more routes declare metering keys but `metering.meters[]` is empty. Declare meters at the product level first."})}function hk(e,t){let r=new Map;for(let o of e.plans)r.set(o.key,new Set);if(!e.features){for(let o of r.values())for(let n of t)o.add(n);return r}for(let o of Object.values(e.features))_k(o,r);return r}function _k(e,t){let r=e.plans??[],o=e.routes??[];for(let n of r){let i=t.get(n);if(i)for(let s of o){if(s.unmetered===!0)continue;let c=Fl(s);if(c.length>0){for(let u of c)i.add(u);continue}}}}function Fl(e){let t=new Set;for(let r of Object.keys(e.metering?.defaults??{}))t.add(r);for(let r of e.metering?.reports??[])t.add(r);for(let r of Object.keys(e.metering?.estimates??{}))t.add(r);return[...t]}function vk(e){if(!e||typeof e!="object")return null;let t=e;return typeof t.dimension=="string"?t.dimension:null}var bk=new Set(["credits"]);function Xg(e,t){if(!e.plans||e.plans.length===0)return;let r=new Set((e.metering?.meters??[]).map(i=>i.key).filter(i=>typeof i=="string"&&i.length>0)),o=new Set(Object.keys(e.usage?.meters??{})),n=hk(e,r);e.plans.forEach((i,s)=>{let c=i.limits??[],u=n.get(i.key)??new Set;c.forEach((l,d)=>{if(l&&typeof l=="object"?l.acknowledgeUnreachable===!0:!1)return;let g=vk(l);g&&(u.has(g)||o.has(g)||bk.has(g)||t.addIssue({code:"custom",path:["plans",s,"limits",d,"meter"],message:`Plan "${i.key}" limits meter "${g}" but no route in any granted feature emits this meter, and the meter is not declared under usage.meters either. Either grant a feature whose routes meter "${g}" to this plan, declare the meter under metering.meters[] or usage.meters, or set acknowledgeUnreachable: true if the limit is intentional (e.g. soft budget).`}))})})}function Qg(e,t){let r=e.backend;if(!r||Object.keys(r).length===0)return;let o=new Set(Object.keys(r)),n=new Set((e.metering?.meters??[]).map(u=>u.key).filter(u=>typeof u=="string"&&u.length>0));for(let[u,l]of Object.entries(r))(l.meters??[]).forEach((d,m)=>{n.has(d)||t.addIssue({code:"custom",path:["backend",u,"meters",m],message:`${Zt.unknownMeterInBackend}: backend "${u}" allows meter "${d}" but no metering.meters[] entry declares it.`})});let{defaultId:i,ambiguous:s}=zl(r),c=!1;for(let u of Object.values(e.features??{}))for(let l of u.routes??[])l.backend===void 0&&(c=!0);s&&c&&t.addIssue({code:"custom",path:["backend"],message:`${Zt.ambiguousDefaultBackend}: product declares ${o.size} backends but no single default \u2014 mark exactly one backend \`default: true\` or bind every route explicitly.`});for(let[u,l]of Object.entries(e.features??{}))(l.routes??[]).forEach((d,m)=>{let g=d.backend??i;if(d.backend!==void 0&&!o.has(d.backend)){t.addIssue({code:"custom",path:["features",u,"routes",m,"backend"],message:`${Zt.unknownBackendInRoute}: route binds backend "${d.backend}" which is not declared in the product \`backend\` block.`});return}if(!g)return;let S=r[g]?.meters;if(!S)return;let R=new Set(S);for(let P of Fl(d))R.has(P)||t.addIssue({code:"custom",path:["features",u,"routes",m,"metering"],message:`${Zt.routeMeterNotAllowedByBackend}: route meters "${P}" but backend "${g}" does not allow it (backend.meters[] = [${S.join(", ")}]).`})})}function eh(e){return e.recurring_fee_cents}function yk(e,t){return`USD:month:${t}`}var xk=a.object({subdomain:a.string().min(1).max(63).regex(/^[a-z0-9]([a-z0-9-]*[a-z0-9])?$/,"Subdomain must be lowercase alphanumeric with optional hyphens")}),th=a.enum(["exact_pre_request","estimated_then_settled","postpaid","strict_concurrency"]),Ml=a.object({key:a.string().min(1).max(64).regex(/^[a-z0-9_]+$/,"Meter key must be lowercase alphanumeric with underscores"),display:a.string().min(1).max(100),unit:a.string().max(20).optional(),estimate:a.number().finite().nonnegative().optional(),routeDefault:a.number().finite().nonnegative().optional(),enforcementType:th.default("estimated_then_settled"),aggregation:a.enum(["SUM","COUNT","MAX","UNIQUE_COUNT","LATEST"]).default("COUNT"),window:a.enum(["minute","hour","day","month","billing_period"]).default("billing_period"),valueProperty:a.string().optional(),uniqueProperty:a.string().optional(),groupBy:a.array(a.string()).optional(),eventCode:a.string().optional()}),nh=a.string().min(1).max(64).regex(/^[a-z0-9_]+$/,"Usage measure must be lowercase alphanumeric with underscores"),kk=a.enum(["pass_through","markup"]),Sk=a.object({source:a.literal("fixed"),rates:a.record(a.string().min(1),a.record(nh,a.number().int().nonnegative()))}),$k=a.object({source:a.literal("provider_catalog"),catalog:a.string().min(1).max(100),pricePolicy:kk.default("pass_through"),markupPercent:a.number().nonnegative().max(1e4).optional(),marginMicros:a.number().int().nonnegative().optional()}),rh=a.discriminatedUnion("source",[Sk,$k]),ih=a.object({selector:a.string().min(1).max(100).optional(),measures:a.array(nh).min(1).max(20),rating:rh.optional()}),oh=a.object({meters:a.record(a.string().min(1).max(64).regex(/^[a-z0-9_]+$/),ih)}),Ik=a.object({defaults:a.record(a.string().min(1).max(64),a.number().finite().nonnegative()).optional(),reports:a.array(a.string().min(1).max(64)).max(20).optional(),estimates:a.record(a.string().min(1).max(64),a.number().finite().nonnegative()).optional(),onStatusCodes:zi.optional()}),ah=a.object({method:a.enum(["GET","POST","PUT","PATCH","DELETE","HEAD","OPTIONS","*"]).default("*"),path:a.string().min(1).max(500).regex(/^\/[a-zA-Z0-9_/:.{}*-]*$/,"path must start with / and contain only [a-zA-Z0-9_/:.{}*-]"),unmetered:a.boolean().optional(),metering:Ik.optional(),inheritDefaultMeters:a.boolean().optional(),backend:Mt.optional()}).strict(),Zl=a.object({description:a.string().max(500).optional(),routes:a.array(ah).min(1).max(50),plans:a.array(a.string().min(1)).min(1).max(20)}),sh=a.record(a.string().min(1).max(100).regex(/^[a-z0-9_.:-]+$/),Zl),ch=a.enum(["report","pull_request"]),uh=a.enum(["safe","non_blocking","economic_risk","blocking"]),lh=a.object({cleanup:a.object({enabled:a.boolean().default(!1),mode:ch.default("report")}).default({enabled:!1,mode:"report"}),change_approval:a.object({auto_merge_max_risk:a.enum(["none","safe","non_blocking"]).default("none"),require_human_for:a.array(uh).default(["economic_risk","blocking"])}).default({auto_merge_max_risk:"none",require_human_for:["economic_risk","blocking"]})}).default({cleanup:{enabled:!1,mode:"report"},change_approval:{auto_merge_max_risk:"none",require_human_for:["economic_risk","blocking"]}}),dh=a.enum(["org_only","org_and_user"]),mh=a.enum(["clerk","test-personas"]),ph=a.object({identity_requirement:dh.optional(),context_tokens:a.object({enabled:a.boolean().default(!0)}).optional(),portal_auth:a.object({strategy:mh}).optional()}),fh=a.enum(["frontend","api","docs","widget","dashboard","webhook","worker","agent"]),gh=a.object({key:a.string().min(1).max(64).regex(/^[a-z0-9_-]+$/,"Surface key must be lowercase alphanumeric with hyphens/underscores"),type:fh,display:a.string().min(1).max(100).optional(),description:a.string().max(500).optional()}),hh=a.object({key:a.string().min(1).max(64).regex(/^[a-z0-9_-]+$/,"Entitlement key must be lowercase alphanumeric with hyphens/underscores"),description:a.string().max(500).optional(),capabilities:a.array(a.string().min(1).max(100)).max(100).optional(),featureGates:a.record(a.string().min(1),a.boolean()).optional(),limits:a.array(Ze).max(100).optional(),meters:a.array(a.string().min(1).max(64)).max(100).optional()}),_h=a.array(gh).max(20).default([]),vh=a.array(hh).max(100).default([]),bh=a.enum(["async_job","agent_task","scheduled","lifecycle","background"]),yh=a.discriminatedUnion("type",[a.object({type:a.literal("manual")}),a.object({type:a.literal("schedule"),cron:a.string().min(1).max(120)}),a.object({type:a.literal("event"),event:a.string().min(1).max(120)}),a.object({type:a.literal("api"),path:a.string().min(1).max(240).regex(/^\//,"path must start with /")}),a.object({type:a.literal("lifecycle"),event:a.string().min(1).max(120)})]),xh=a.object({key:a.string().min(1).max(64).regex(/^[a-z0-9_-]+$/,"Workflow key must be lowercase alphanumeric with hyphens/underscores"),title:a.string().min(1).max(120).optional(),description:a.string().max(1e3).optional(),kind:bh,trigger:yh,capabilities:a.array(a.string().min(1).max(100)).max(100).optional(),meters:a.array(a.string().min(1).max(64)).max(100).optional(),estimates:a.record(a.string().min(1).max(64),a.number().finite()).optional(),metadata:a.record(a.string().min(1),a.unknown()).optional()}),kh=a.array(xh).max(100).default([]),tt=a.object({product:a.object({name:a.string().min(1).max(100),displayName:a.string().max(200).optional(),description:a.string().max(2e3).optional(),baseUrl:a.string().url("baseUrl must be a valid URL"),sandboxBaseUrl:a.string().url("sandboxBaseUrl must be a valid URL").optional(),visibility:a.enum(["public","private"]).default("public"),logoUrl:a.string().url().optional(),primaryColor:a.string().regex(/^#[0-9a-fA-F]{6}$/).optional(),envBranchPrefix:a.string().max(50).nullable().optional()}),gateway:a.object({authHeader:a.string().min(1).max(100).default("x-api-key"),upstreamAuth:a.object({type:a.enum(["none","static_bearer"]),token:a.string().optional()}).default({type:"none"})}),metering:a.object({meters:a.array(Ml).max(10).default([]),billOn4xx:a.boolean().default(!1)}).default({meters:[],billOn4xx:!1}),backend:Dl.optional(),usage:oh.optional(),usagePricing:a.never({error:"usagePricing is not supported. Define usage.meters.<key>.rating instead."}).optional(),features:sh.optional(),resources:Nl,policies:lh,customer_context:ph.optional(),surfaces:_h,entitlements:vh,workflows:kh,frontend:Al.optional(),migrations:Cl.optional(),billing:a.object({applyLimitUpgradesInstantly:a.boolean().optional(),subscriberChangePolicy:Rn.default({default:"period_end",when:{price_increase:"period_end",price_decrease:"immediate",feature_added:"immediate",feature_removed:"period_end",limit_increased:"immediate",limit_reduced:"period_end",credit_increased:"immediate",credit_reduced:"period_end",rating_changed:"period_end"},allowImmediatePriceIncrease:!1,allowImmediateEntitlementReduction:!1})}).default({subscriberChangePolicy:{default:"period_end",when:{price_increase:"period_end",price_decrease:"immediate",feature_added:"immediate",feature_removed:"period_end",limit_increased:"immediate",limit_reduced:"period_end",credit_increased:"immediate",credit_reduced:"period_end",rating_changed:"period_end"},allowImmediatePriceIncrease:!1,allowImmediateEntitlementReduction:!1}}),plans:a.array(Ri).max(4).default([]),add_ons:wg,lifecycle:a.object({breaking_changes:a.object({require_deprecation_window_days:a.number().int().nonnegative().default(0),require_successor_route:a.boolean().default(!1)}).default({require_deprecation_window_days:0,require_successor_route:!1})}).default({breaking_changes:{require_deprecation_window_days:0,require_successor_route:!1}}),webhooks:wl.optional(),environments:Ol.optional(),ephemeral:a.object({defaultPlan:a.string().min(1).optional()}).optional()}).superRefine((e,t)=>{Gg(e,t),Kg(e.plans,t),Wg(e.plans,t),qg(e,t),Jg(e,t),Yg(e,t),Xg(e,t),Qg(e,t)}),Ek=a.object({product:tt.shape.product}),wk=a.object({gateway:tt.shape.gateway}),Ok=a.object({metering:tt.shape.metering}),Tk=a.object({plans:tt.shape.plans});var Vl=a.object({capability:a.string().min(1).max(120).regex(/^[a-z0-9_-]+$/,"capability name must be lowercase alphanumeric with hyphens/underscores"),description:a.string().max(500).optional(),mutation_class:a.enum(["runtime","contractual"]).default("contractual"),includes_features:a.array(a.string().min(1).max(100).regex(/^[a-z0-9_.:-]+$/)).max(20).default([]),includes_policies:a.array(a.string().min(1).max(64).regex(/^[a-z0-9_-]+$/)).max(20).default([]),includes_capabilities:a.array(a.string().min(1).max(120).regex(/^[a-z0-9_-]+$/)).max(20).default([])});var Ui=1;var Bl=a.object({irVersion:a.literal(Ui),sdkVersion:a.string().min(1).max(64),product:tt,routes:a.array(Ll).max(200).default([]),policies:a.array(jl).max(200).default([]),capabilities:a.array(Vl).max(200).default([])}).strict();var LC=a.object({subscriberChangePolicy:Rn.optional()}),FC=a.object({code:a.string(),kind:a.enum(["percent_off","amount_off","free_months"]),amount:a.number().optional(),durationMonths:a.number(),applicablePlanIds:a.array(a.string()).optional(),maxRedemptions:a.number().optional(),activeFrom:a.string().optional(),activeUntil:a.string().optional(),status:a.enum(["ACTIVE","ARCHIVED"]).optional()}),MC=a.object({id:a.string(),actorUserId:a.string().optional(),action:a.string(),decision:a.string().optional(),timestamp:a.string(),details:a.unknown().optional()}),ZC=a.object({name:a.string(),branch:a.string().optional(),isProduction:a.boolean().optional()}),VC=a.object({id:a.string(),name:a.string(),apiKeyId:a.string().optional()});var Ak=["IMMEDIATE_NO_PRORATE","IMMEDIATE_PRORATE_CHARGE_NEW","IMMEDIATE_PRORATE_REFUND_OLD","IMMEDIATE_PRORATE_BOTH","DEFER_TO_PERIOD_END"],JC=a.enum(Ak);var Sh=a.object({id:a.string(),billingCycleId:a.string(),effectiveStart:a.string(),effectiveEnd:a.string(),compiledPlanId:a.string()}),$h=a.object({currentPeriod:Sh,priorPeriod:Sh.optional()});var Pk=a.object({subjectKey:a.string(),subscriptionId:a.string(),subscriberId:a.string(),productId:a.string(),organizationId:a.string(),compiledPlanId:a.string(),activeEntitlementHash:a.string().optional(),generation:a.number(),enforcementMode:a.enum(["STRICT","GRACE","TRACK_ONLY"]),dedicatedShard:a.enum(["ACTIVE","DRAINING"]).optional(),resourceCounts:a.record(a.string(),a.number()).optional(),overrides:a.object({featureGateOverrides:a.record(a.string(),a.boolean()).optional()}).optional(),subscriptionStatus:a.string(),subscriberStatus:a.string(),scopes:a.array(a.string()),periods:$h,expiresAt:a.number().optional(),trialEndsAt:a.string().optional()}),Ck=a.discriminatedUnion("kind",[a.object({kind:a.literal("found"),state:Pk,expiresAt:a.number(),ttlSeconds:a.number()}),a.object({kind:a.literal("not_found"),negativeCacheTtlSeconds:a.number().default(60)}),a.object({kind:a.literal("revoked"),negativeCacheTtlSeconds:a.number().default(300),reason:a.string().optional()}),a.object({kind:a.literal("rate_limited"),retryAfterSeconds:a.number().default(10)})]),nN=a.object({environmentId:a.string().nullable(),subjectKeys:a.array(a.string()).min(1).max(500)}),rN=a.object({results:a.array(a.object({subjectKey:a.string(),result:Ck}))}),Nk=a.object({keyId:a.string(),orgId:a.string(),productId:a.string(),compiledPlanId:a.string(),entitlementHash:a.string().optional(),subscriptionId:a.string(),subscriberId:a.string(),apiKeyId:a.string().nullable(),subjectKey:a.string(),entitlementVersion:a.number().int(),identityRequirement:a.enum(["org_only","org_and_user"]),status:a.enum(["active","revoked"]),subscriberStatus:a.enum(["ONBOARDING","ACTIVE","SUSPENDED"]),subscriptionStatus:a.string(),environment:a.enum(["production","sandbox"]).optional(),environmentId:a.string().optional(),scopes:a.array(a.string()).default([]),entitlement:a.unknown().optional(),actorType:a.enum(["org","user"]).optional(),actorId:a.string().nullable().optional(),currentPeriodId:a.string().optional(),currentPeriodStartMs:a.number().int().nonnegative().optional(),expiresAt:a.number().nullable().optional()}),iN=a.discriminatedUnion("kind",[a.object({kind:a.literal("found"),record:Nk,expiresAt:a.number(),ttlSeconds:a.number()}),a.object({kind:a.literal("not_found"),negativeCacheTtlSeconds:a.number().default(60)}),a.object({kind:a.literal("revoked"),negativeCacheTtlSeconds:a.number().default(300),reason:a.string().optional()}),a.object({kind:a.literal("rate_limited"),retryAfterSeconds:a.number().default(10)})]),oN=a.discriminatedUnion("kind",[a.object({kind:a.literal("found"),entitlement:a.unknown(),expiresAt:a.number(),ttlSeconds:a.number()}),a.object({kind:a.literal("not_found"),negativeCacheTtlSeconds:a.number().default(60)}),a.object({kind:a.literal("rate_limited"),retryAfterSeconds:a.number().default(10)})]),Rk=a.object({id:a.string(),origin:a.string(),sandboxOrigin:a.string().nullable().optional(),authHeader:a.string().optional(),pricing:a.record(a.string(),a.number()).optional(),metering:a.object({tokens:a.object({estimatePerRequest:a.number().optional()}).optional(),computeMs:a.object({estimatePerRequest:a.number().optional()}).optional(),billOn4xx:a.boolean().optional()}).optional(),tenantLimits:a.array(a.object({unit:a.enum(["requests","tokens","computeMs","dollars"]),window:a.enum(["second","minute","hour","day","week","month"]),capacity:a.number()})).optional(),userLimits:a.array(a.object({unit:a.enum(["requests","tokens","computeMs","dollars"]),window:a.enum(["second","minute","hour","day","week","month"]),capacity:a.number()})).optional(),environmentId:a.string().optional(),contextTokenSecret:a.string().nullable().optional(),timeoutMs:a.number().positive().optional(),idleTimeoutMs:a.number().positive().optional()}),aN=a.discriminatedUnion("kind",[a.object({kind:a.literal("found"),tenant:Rk,expiresAt:a.number(),ttlSeconds:a.number()}),a.object({kind:a.literal("not_found"),negativeCacheTtlSeconds:a.number().default(60)}),a.object({kind:a.literal("rate_limited"),retryAfterSeconds:a.number().default(10)})]);var ji=["consumer_api_key","consumer_session_token","test_persona_session_token","builder_master_key","builder_session_token","maker_jwt","service_jwt","internal_service","context_token"],Ih=a.enum(ji);var Dk=a.object({fromIssuer:a.string().min(1),fromTokenId:a.string().min(1),intent:a.string().min(1)}),Eh=a.object({issuer:a.string().min(1),issuedAt:a.number().int().nonnegative(),expiresAt:a.number().int().nonnegative().optional(),tokenId:a.string().min(1).optional(),delegationChain:a.array(Dk)});var Hl=["template","embedded","provisioned","agent"],zk=a.enum(Hl),Uk=["builder_user","builder_org","maker","consumer_subject","internal_service","service_jwt","agent_runtime"],jk=a.enum(Uk),wh=a.object({kind:jk,id:a.string().min(1),label:a.string().optional()}),Lk=["subscription","organization","platform"],Fk=a.enum(Lk),Mk=a.object({kind:Fk,id:a.string().min(1)}),Zk=a.object({type:Ih,id:a.string().min(1),hint:a.string().max(8).optional()}),Vk=a.object({compiledPlanId:a.string().min(1),fromCache:a.boolean().optional()}),Oh=a.object({requestId:a.string().min(1),surface:zk,builderOrgId:a.string().min(1),productId:a.string().min(1).optional(),runtimeId:a.string().min(1).optional(),template:a.string().optional(),caller:wh,actor:wh,billingSubject:Mk,credential:Zk,capability:a.string().min(1),scopes:a.array(a.string()),entitlement:Vk.optional(),trust:Eh});var zn;(function(e){e.AUTHZ_DECISION="authz_decision",e.ENTITLEMENT_DECISION="entitlement_decision",e.RUNTIME_LIMIT_DECISION="runtime_limit_decision",e.RESOURCE_GOVERNANCE_DECISION="resource_governance_decision",e.RESOURCE_MUTATION="resource_mutation",e.LIFECYCLE_EVENT="lifecycle_event",e.RUNTIME_CONTEXT_CREATED="runtime_context_created",e.SYSTEM_ACTION="system_action"})(zn||(zn={}));var Th=Object.values(zn),IN=a.enum(Th),Ah=a.object({decisionId:a.string().optional(),ctx:Oh,details:a.record(a.string(),a.unknown()).optional(),createdAt:a.string().min(1)}),Bk=Th.filter(e=>e!==zn.SYSTEM_ACTION),Hk=Ah.extend({kind:a.enum(Bk)}),Gk=Ah.extend({kind:a.literal(zn.SYSTEM_ACTION),actorType:a.string().min(1),action:a.string().min(1)}),EN=a.discriminatedUnion("kind",[Hk,Gk]);var O=["template","agent"],Kk=["provisioned"],Ph=[...Hl],T=["builder_master_key","builder_session_token","maker_jwt"],Vt=["service_jwt","internal_service"],Gl=["consumer_api_key","consumer_session_token","test_persona_session_token","context_token"],Ch=[...ji],Un="subscriptions:write",Wk=[{id:"products.create",operation:"Create a product",requiredScopes:["products:write"],allowedSurfaces:O,allowedCredentialTypes:T,description:"Create a new product in the builder org"},{id:"products.update",operation:"Update a product",requiredScopes:["products:write"],allowedSurfaces:O,allowedCredentialTypes:T,description:"Update product metadata or compiled config"},{id:"products.delete",operation:"Delete a product",requiredScopes:["products:write"],allowedSurfaces:O,allowedCredentialTypes:T,description:"Delete a product (soft-archive if subscriptions exist)"},{id:"products.read",operation:"Read a product",requiredScopes:["products:read"],allowedSurfaces:O,allowedCredentialTypes:T,description:"Read product metadata + compiled config"},{id:"products.publish",operation:"Publish a product",requiredScopes:["products:write"],allowedSurfaces:O,allowedCredentialTypes:T,description:"Compile + publish the product to the gateway"},{id:"plans.create",operation:"Create a plan",requiredScopes:["plans:write"],allowedSurfaces:O,allowedCredentialTypes:T,description:"Add a new plan to a product"},{id:"plans.update",operation:"Update a plan",requiredScopes:["plans:write"],allowedSurfaces:O,allowedCredentialTypes:T,description:"Update plan pricing, limits, or features"},{id:"plans.delete",operation:"Delete a plan",requiredScopes:["plans:write"],allowedSurfaces:O,allowedCredentialTypes:T,description:"Delete a plan (denied if subscriptions are attached)"},{id:"plans.publish",operation:"Publish a plan",requiredScopes:["plans:write"],allowedSurfaces:O,allowedCredentialTypes:T,description:"Mark a plan as available for new subscriptions"},{id:"subscriptions.create",operation:"Create a subscription",requiredScopes:[Un],allowedSurfaces:O,allowedCredentialTypes:[...T,...Vt],description:"Provision a new subscription for a subscriber"},{id:"subscriptions.update",operation:"Update a subscription",requiredScopes:[Un],allowedSurfaces:O,allowedCredentialTypes:[...T,...Vt],description:"Change plan, enforcement mode, or schedule"},{id:"subscriptions.cancel",operation:"Cancel a subscription",requiredScopes:[Un],allowedSurfaces:O,allowedCredentialTypes:[...T,...Vt],description:"Cancel a subscription (immediate or end-of-period)"},{id:"subscriptions.pause",operation:"Pause a subscription",requiredScopes:[Un],allowedSurfaces:O,allowedCredentialTypes:[...T,...Vt],description:"Pause a subscription (no usage, no billing)"},{id:"subscriptions.resume",operation:"Resume a subscription",requiredScopes:[Un],allowedSurfaces:O,allowedCredentialTypes:[...T,...Vt],description:"Resume a paused subscription"},{id:"subscriptions.read",operation:"Read a subscription",requiredScopes:["subscriptions:read"],allowedSurfaces:O,allowedCredentialTypes:[...T,...Vt],description:"Read subscription state and usage"},{id:"webhooks.create",operation:"Create a webhook endpoint",requiredScopes:["webhooks:write"],allowedSurfaces:O,allowedCredentialTypes:T,description:"Register a new webhook endpoint URL"},{id:"webhooks.update",operation:"Update a webhook endpoint",requiredScopes:["webhooks:write"],allowedSurfaces:O,allowedCredentialTypes:T,description:"Update endpoint URL, secret, or subscribed events"},{id:"webhooks.delete",operation:"Delete a webhook endpoint",requiredScopes:["webhooks:write"],allowedSurfaces:O,allowedCredentialTypes:T,description:"Remove a webhook endpoint"},{id:"webhooks.test",operation:"Send a test webhook payload",requiredScopes:["webhooks:write"],allowedSurfaces:O,allowedCredentialTypes:T,description:"Trigger a synthetic payload to verify an endpoint"},{id:"api-keys.create",operation:"Create an API key",requiredScopes:["api-keys:write"],allowedSurfaces:O,allowedCredentialTypes:T,description:"Mint a new consumer or master API key"},{id:"api-keys.revoke",operation:"Revoke an API key",requiredScopes:["api-keys:write"],allowedSurfaces:O,allowedCredentialTypes:T,description:"Revoke an API key (immediate invalidation)"},{id:"api-keys.read",operation:"Read API key metadata",requiredScopes:["api-keys:read"],allowedSurfaces:O,allowedCredentialTypes:T,description:"Read key id + hint + scopes (never the secret)"},{id:"organizations.create",operation:"Create an organization",requiredScopes:["orgs:write"],allowedSurfaces:["template"],allowedCredentialTypes:["builder_session_token"],description:"Create a builder org (top-level signup)"},{id:"organizations.update",operation:"Update an organization",requiredScopes:["orgs:write"],allowedSurfaces:O,allowedCredentialTypes:T,description:"Update org metadata or billing email"},{id:"members.invite",operation:"Invite a member to an organization",requiredScopes:["members:write"],allowedSurfaces:O,allowedCredentialTypes:T,description:"Send an invitation to join the org"},{id:"members.remove",operation:"Remove a member from an organization",requiredScopes:["members:write"],allowedSurfaces:O,allowedCredentialTypes:T,description:"Revoke a member's access to the org"},{id:"projects.create",operation:"Create a project",requiredScopes:["projects:write"],allowedSurfaces:O,allowedCredentialTypes:T,description:"Create a project (groups products + environments)"},{id:"environments.create",operation:"Create an environment",requiredScopes:["environments:write"],allowedSurfaces:O,allowedCredentialTypes:T,description:"Add a deployment environment (stage / branch)"},{id:"environments.delete",operation:"Delete an environment",requiredScopes:["environments:write"],allowedSurfaces:O,allowedCredentialTypes:T,description:"Remove a deployment environment"},{id:"billing.portal-redirect",operation:"Generate Stripe customer-portal redirect",requiredScopes:["billing:portal"],allowedSurfaces:O,allowedCredentialTypes:[...T,...Gl],description:"Mint a one-time Stripe portal-session redirect URL"},{id:"billing.read",operation:"Read billing state",requiredScopes:["billing:read"],allowedSurfaces:O,allowedCredentialTypes:[...T,...Gl],description:"Read invoices, balances, scheduled changes"},{id:"runtime-context.read",operation:"Read the caller's runtime context",requiredScopes:[],allowedSurfaces:Ph,allowedCredentialTypes:Ch,description:"Introspect the resolved RuntimeContext (minus secrets)"},{id:"capabilities.list",operation:"List registered capabilities",requiredScopes:[],allowedSurfaces:Ph,allowedCredentialTypes:Ch,description:"List all capabilities the registry knows about"},{id:"explain-denial.read",operation:"Explain a denial decision",requiredScopes:["audit:read"],allowedSurfaces:O,allowedCredentialTypes:T,description:"Look up a decision id + return the full ctx + reason"},{id:"replay.execute",operation:"Replay a historical billing period",requiredScopes:["replay:execute"],allowedSurfaces:O,allowedCredentialTypes:T,description:"Re-run billing for a past period; verify deltas"},{id:"rollback.execute",operation:"Execute a GitHub-driven product rollback",requiredScopes:["rollback:execute"],allowedSurfaces:O,allowedCredentialTypes:T,description:"Revert product.config.ts to a previous commit (dry-run capable)"},{id:"api.invoke",operation:"Invoke a consumer-facing gateway route",requiredScopes:[],allowedSurfaces:Kk,allowedCredentialTypes:Gl,description:"Consumer-side traffic into a deployed product (catch-all). The EntitlementEngine + RuntimeLimitEngine handle the fine-grained gating; this capability is the umbrella entry-point."}],AN=Object.freeze(Wk);var qk=["ProductApplyWorkflow","RollbackWorkflow","StripeSyncWorkflow","WebhookDispatchWorkflow","SubscriptionTransitionWorkflow","CompiledPlanLifecycleWorkflow","ShardReshardWorkflow","MaintenanceJobWorkflow"],RN=a.enum(qk),Jk=["transient","permanent","rollback-required","human-intervention"],DN=a.enum(Jk);var Yk=["SAFE_AUTOMATIC","REQUIRES_APPROVAL","IRREVERSIBLE","BILLING_IMPACTING","EDGE_BREAKING"],zN=a.enum(Yk);var ZN=a.object({workflowExecutionId:a.string().min(1),eventType:a.string().min(1),phase:a.string().min(1).optional(),stepId:a.string().min(1).optional(),cohortKey:a.string().min(1).optional(),payload:a.record(a.string(),a.unknown()),occurredAt:a.string().min(1),correlationId:a.string().min(1).optional()}).transform(e=>({...e,workflowExecutionId:e.workflowExecutionId,stepId:e.stepId===void 0?void 0:e.stepId}));var Xk=["GATEWAY","HOSTED_UI_PAGE","HOSTED_UI_PROXY"],Qk=["platform_requests"],eS=a.object({requestId:a.string().optional(),productId:a.string().optional(),route:a.string().optional(),usageEventId:a.string().optional()}).strict(),tS=a.object({organizationId:a.string().min(1),source:a.enum(Xk),dimension:a.enum(Qk),quantity:a.number().int().positive(),idempotencyKey:a.string().min(1).max(512),occurredAt:a.string().datetime(),metadata:eS.optional()}).strict(),lR=a.object({entries:a.array(tS).min(1).max(500)});var ne={VALIDATION_ERROR:"VALIDATION_ERROR",CONFLICT:"CONFLICT",NOT_FOUND:"NOT_FOUND",NOT_IMPLEMENTED:"NOT_IMPLEMENTED",NOT_CONFIGURED:"NOT_CONFIGURED",INTERNAL_ERROR:"INTERNAL_ERROR",SERVICE_UNAVAILABLE:"SERVICE_UNAVAILABLE",RATE_LIMIT_EXCEEDED:"RATE_LIMIT_EXCEEDED",DELETE_CONFIRMATION_REQUIRED:"DELETE_CONFIRMATION_REQUIRED",MISSING_HOST:"MISSING_HOST",MISSING_CONNECTIONS:"MISSING_CONNECTIONS",SECRET_NOT_CONFIGURED:"SECRET_NOT_CONFIGURED",UNAUTHORIZED:"UNAUTHORIZED",FORBIDDEN:"FORBIDDEN",INVALID_ACCESS_KEY:"INVALID_ACCESS_KEY",AUTO_KEY_CREATION_FAILED:"AUTO_KEY_CREATION_FAILED",PERSONA_NOT_FOUND:"PERSONA_NOT_FOUND",PERSONA_REVOKED:"PERSONA_REVOKED",PERSONA_SESSIONS_NOT_SUPPORTED:"PERSONA_SESSIONS_NOT_SUPPORTED",NOT_TEST_PERSONA_ENV:"NOT_TEST_PERSONA_ENV",PERSONA_AUTH_DISABLED_IN_PROD:"PERSONA_AUTH_DISABLED_IN_PROD",MAKER_TOKEN_NOT_FOUND:"MAKER_TOKEN_NOT_FOUND",MAKER_TOKEN_NOT_REVOKED:"MAKER_TOKEN_NOT_REVOKED",MAKER_TOKEN_NO_PRODUCT:"MAKER_TOKEN_NO_PRODUCT",MAKER_TOKEN_REVOKED:"MAKER_TOKEN_REVOKED",ORGANIZATION_NOT_FOUND:"ORGANIZATION_NOT_FOUND",ORG_HAS_ACTIVE_SUBSCRIPTIONS:"ORG_HAS_ACTIVE_SUBSCRIPTIONS",ORG_HAS_OUTSTANDING_BALANCE:"ORG_HAS_OUTSTANDING_BALANCE",PERSONAL_ORG_NOT_DELETABLE:"PERSONAL_ORG_NOT_DELETABLE",MEMBER_NOT_FOUND:"MEMBER_NOT_FOUND",INVITATION_NOT_FOUND:"INVITATION_NOT_FOUND",CUSTOMER_NOT_FOUND:"CUSTOMER_NOT_FOUND",PRODUCT_NOT_FOUND:"PRODUCT_NOT_FOUND",PRODUCT_DELETE_BLOCKED:"PRODUCT_DELETE_BLOCKED",PRODUCT_REPO_NOT_LINKED:"PRODUCT_REPO_NOT_LINKED",PRODUCT_SCOPE_MISMATCH:"PRODUCT_SCOPE_MISMATCH",YAML_PARSE_ERROR:"YAML_PARSE_ERROR",COMPILATION_NOT_FOUND:"COMPILATION_NOT_FOUND",PLAN_NOT_FOUND:"PLAN_NOT_FOUND",PLAN_HAS_ACTIVE_SUBSCRIPTIONS:"PLAN_HAS_ACTIVE_SUBSCRIPTIONS",PLAN_SLUG_CONFLICT:"PLAN_SLUG_CONFLICT",PLAN_UPGRADE_REQUIRED:"PLAN_UPGRADE_REQUIRED",SLUG_CONFLICT:"SLUG_CONFLICT",SLUG_BLOCKED:"SLUG_BLOCKED",SLUG_OFFENSIVE:"SLUG_OFFENSIVE",SLUG_RESERVED:"SLUG_RESERVED",SLUG_IMPERSONATION:"SLUG_IMPERSONATION",SLUG_INVALID_FORMAT:"SLUG_INVALID_FORMAT",SLUG_VALIDATOR_NOT_READY:"SLUG_VALIDATOR_NOT_READY",PRICING_PREVIEW_FAILED:"PRICING_PREVIEW_FAILED",PRICING_REPLAY_FAILED:"PRICING_REPLAY_FAILED",RESERVATION_NOT_FOUND:"RESERVATION_NOT_FOUND",PROMO_CODE_NOT_FOUND:"PROMO_CODE_NOT_FOUND",PROMO_CODE_INVALID:"PROMO_CODE_INVALID",BILLING_EVENT_NOT_FOUND:"BILLING_EVENT_NOT_FOUND",BILLING_NOT_CONFIGURED:"BILLING_NOT_CONFIGURED",SUBSCRIPTION_NOT_READY:"SUBSCRIPTION_NOT_READY",SUBSCRIPTION_FETCH_FAILED:"SUBSCRIPTION_FETCH_FAILED",INVALID_STATE:"INVALID_STATE",DUPLICATE_TRANSITION:"DUPLICATE_TRANSITION",LEGACY_STABLE_NOT_SELF_SERVICE:"LEGACY_STABLE_NOT_SELF_SERVICE",ARCHIVED_TARGET:"ARCHIVED_TARGET",FREE_TO_PAID_VIA_CHECKOUT_ONLY:"FREE_TO_PAID_VIA_CHECKOUT_ONLY",CAPABILITY_LIMIT_EXCEEDED:"CAPABILITY_LIMIT_EXCEEDED",CAPABILITY_CHECK_UNAVAILABLE:"CAPABILITY_CHECK_UNAVAILABLE",STRIPE_NOT_CONFIGURED:"STRIPE_NOT_CONFIGURED",STRIPE_BALANCE_OUTSTANDING:"STRIPE_BALANCE_OUTSTANDING",STRIPE_OPERATION_FAILED:"STRIPE_OPERATION_FAILED",STRIPE_RESYNC_FAILED:"STRIPE_RESYNC_FAILED",CHECKOUT_SESSION_FAILED:"CHECKOUT_SESSION_FAILED",POLAR_PRODUCT_NOT_CONFIGURED:"POLAR_PRODUCT_NOT_CONFIGURED",BILLING_TAX_NOT_ENROLLED:"BILLING_TAX_NOT_ENROLLED",WEBHOOK_NOT_FOUND:"WEBHOOK_NOT_FOUND",WEBHOOK_DISPATCH_FAILED:"WEBHOOK_DISPATCH_FAILED",WEBHOOK_SECRET_NOT_CONFIGURED:"WEBHOOK_SECRET_NOT_CONFIGURED",INVALID_WEBHOOK_SIGNATURE:"INVALID_WEBHOOK_SIGNATURE",MISSING_RAW_BODY:"MISSING_RAW_BODY",WEBHOOK_REDIRECTED:"WEBHOOK_REDIRECTED",MANAGED_BY_CODE:"MANAGED_BY_CODE",GITHUB_CONNECTION_NOT_FOUND:"GITHUB_CONNECTION_NOT_FOUND",GITHUB_NOT_CONNECTED:"GITHUB_NOT_CONNECTED",GITHUB_SYNC_FAILED:"GITHUB_SYNC_FAILED",GITHUB_SYNC_UNAVAILABLE:"GITHUB_SYNC_UNAVAILABLE",GITHUB_TOKEN_FAILED:"GITHUB_TOKEN_FAILED",GIT_PROVIDER_NOT_CONFIGURED:"GIT_PROVIDER_NOT_CONFIGURED",ENVIRONMENT_NOT_FOUND:"ENVIRONMENT_NOT_FOUND",ENVIRONMENT_CLEANUP_FAILED:"ENVIRONMENT_CLEANUP_FAILED",DEPLOYMENT_RUN_NOT_FOUND:"DEPLOYMENT_RUN_NOT_FOUND",BRANCH_NO_MATCHING_ENV:"BRANCH_NO_MATCHING_ENV",APPLY_SPEC_FAILED:"APPLY_SPEC_FAILED",BOOTSTRAP_FAILED:"BOOTSTRAP_FAILED",JOB_ALREADY_RUNNING:"JOB_ALREADY_RUNNING",LOGO_DELETE_FAILED:"LOGO_DELETE_FAILED",LOGO_UPLOAD_FAILED:"LOGO_UPLOAD_FAILED",INVALID_LOGO_FORMAT:"INVALID_LOGO_FORMAT"};var gR={missing_token:ne.UNAUTHORIZED,invalid_token:ne.UNAUTHORIZED,missing_signature:ne.UNAUTHORIZED,malformed_signature:ne.UNAUTHORIZED,unknown_key_id:ne.UNAUTHORIZED,bad_signature:ne.UNAUTHORIZED,expired_signature:ne.UNAUTHORIZED,clock_skew:ne.UNAUTHORIZED,replayed_nonce:ne.UNAUTHORIZED,body_hash_mismatch:ne.UNAUTHORIZED,route_mismatch:ne.UNAUTHORIZED,environment_mismatch:ne.UNAUTHORIZED,jwks_unavailable:ne.SERVICE_UNAVAILABLE,body_too_large:ne.VALIDATION_ERROR};var hR=Object.values(Xf);var Nh={limit_allocator_unavailable:{statuses:[503],source:"batcher-enum",retryAfter:!0,verifiedAt:["engine/enforcement/runtime.ts:471"]},limit_exceeded:{statuses:[402],source:"batcher-enum",retryAfter:!0,verifiedAt:["engine/enforcement/batcher.ts:326","engine/enforcement/constraints/quota.ts:69"]},rate_limited:{statuses:[429],source:"batcher-enum",retryAfter:!0,verifiedAt:["engine/enforcement/batcher.ts:328","engine/enforcement/constraints/rate-limit.ts:74","engine/pipeline/rate-limit.ts:83"]},credit_exhausted:{statuses:[402],source:"batcher-enum",retryAfter:!0,verifiedAt:["engine/enforcement/batcher.ts:333"]},enforcement_denied:{statuses:[402],source:"batcher-enum",retryAfter:!0,verifiedAt:["engine/enforcement/batcher.ts:335"]},feature_not_enabled:{statuses:[403],source:"runtime-inline",retryAfter:!1,verifiedAt:["engine/enforcement/runtime.ts:188"]},invalid_entitlement_shape:{statuses:[503],source:"runtime-inline",retryAfter:!0,verifiedAt:["engine/enforcement/runtime.ts:144"]},unsupported_constraint_schema:{statuses:[503],source:"runtime-inline",retryAfter:!1,verifiedAt:["engine/enforcement/runtime.ts:154"]},enforcement_error:{statuses:[500],source:"runtime-inline",retryAfter:!1,verifiedAt:["engine/enforcement/runtime.ts:342"]},enforcement_dependency_unavailable:{statuses:[503],source:"runtime-inline",retryAfter:!1,verifiedAt:["engine/enforcement/runtime.ts:427"]},concurrency_limit_exceeded:{statuses:[503],source:"constraint",retryAfter:!0,verifiedAt:["engine/enforcement/constraints/concurrency.ts:314"]},concurrency_context_unavailable:{statuses:[503],source:"constraint",retryAfter:!0,verifiedAt:["engine/enforcement/constraints/concurrency.ts:291"]},concurrency_coordinator_unavailable:{statuses:[503],source:"constraint",retryAfter:!0,verifiedAt:["engine/enforcement/constraints/concurrency.ts:305"]},key_expired:{statuses:[401],source:"constraint",retryAfter:!1,verifiedAt:["engine/enforcement/constraints/credential-validity.ts:33"]},geo_context_unavailable:{statuses:[503],source:"constraint",retryAfter:!0,verifiedAt:["engine/enforcement/constraints/geo-restriction.ts:44"]},geo_blocked:{statuses:[403],source:"constraint",retryAfter:!1,verifiedAt:["engine/enforcement/constraints/geo-restriction.ts:51"]},geo_not_allowed:{statuses:[403],source:"constraint",retryAfter:!1,verifiedAt:["engine/enforcement/constraints/geo-restriction.ts:58"]},resource_count_limit_exceeded:{statuses:[403,402],source:"constraint",retryAfter:!1,verifiedAt:["engine/enforcement/constraints/resource-count.ts:95","apps/core:routes/internal/gateway-resources.ts:144"]},resolver_rate_limited:{statuses:[503],source:"gateway-error",retryAfter:!0,verifiedAt:["engine/errors.ts:55"]},resolver_unavailable:{statuses:[503],source:"gateway-error",retryAfter:!0,verifiedAt:["engine/errors.ts:73"]},credential_resolver_miss_rate_limited:{statuses:[429],source:"gateway-error",retryAfter:!0,verifiedAt:["engine/errors.ts:89"]}},nS=Object.keys(Nh);var rS=new Set([429,503]),vR=new Set(nS.filter(e=>Nh[e].statuses.every(t=>rS.has(t))));var iS=[402,403,429],yR=new Set(iS);var oS={MANAGED_BY_CODE:"This product's contract is managed as code. Edit the Product SDK program in its GitHub repo (product/) and push \u2014 do NOT retry the API. (Branding stays editable via `farthershore product update`.)",UNAUTHORIZED:"Token is invalid or revoked. Run `farthershore auth login` to update it.",FORBIDDEN:"Your token doesn't have access to this resource. Check the org / product scope.",INVALID_ACCESS_KEY:"Token format is wrong. Generate a new one at https://farthershore.com/settings/tokens.",MAKER_TOKEN_REVOKED:"This maker token was revoked. Mint a new one in the product settings.",MAKER_TOKEN_NO_PRODUCT:"Maker token is not bound to a product. Re-create it from the product page.",AUTH_NO_TOKEN:"Pass --token <mk_...> or set FARTHERSHORE_TOKEN, or run interactively in a TTY.",AUTH_INVALID_TOKEN:"Token format is malformed. Maker tokens start with `mk_` and are 30+ characters.",DESTRUCTIVE_OP_REQUIRES_YES:"Destructive ops (delete) require an explicit `--yes` to proceed. This is intentional safety.",PRODUCT_UPDATE_NO_FIELDS:"Pass at least one field flag (--display-name, --origin, --description).",PLAN_UPDATE_NO_FIELDS:"Pass at least one of --name, --recurring-fee-cents, --grant, --trial-days, --max-monthly-spend-cents, or --meter.",ENV_NOT_FOUND:"Environment doesn't exist. Use `farthershore env list <product>` to see available envs, or create one with `farthershore env create`.",STRIPE_NOT_CONFIGURED:"Stripe isn't connected on this product. Connect it in the dashboard before running billing operations.",STRIPE_NOT_CONNECTED:"Publishing requires a connected Stripe account. Connect one on the dashboard Connections page, then re-run `farthershore product publish`.",STRIPE_NOT_VERIFIED:"Your Stripe account isn't fully verified yet. Finish Stripe onboarding, then re-run `farthershore product publish`.",BILLING_TAX_NOT_ENROLLED:"Stripe Tax isn't enrolled for this account. Enable it from the dashboard Connections page, then re-run `farthershore product publish`.",STRIPE_BALANCE_OUTSTANDING:"Customer has an outstanding balance. Resolve the invoice in Stripe before retrying.",CHECKOUT_SESSION_FAILED:"Stripe rejected the checkout request. Check that the plan exists and Stripe credentials are valid.",PRODUCT_NOT_FOUND:"Check the product slug. Run `farthershore` (no args) for a list of products you can see.",PRODUCT_REPO_NOT_LINKED:"Link a GitHub repo to this product before publishing or validating product manifests.",YAML_PARSE_ERROR:"Product manifest is not valid. Run `farthershore build` locally, fix product/ source, then push again for bot validation.",GITHUB_NOT_CONNECTED:"Connect GitHub on the org page before running `init` (it provisions the repo).",BRANCH_NO_MATCHING_ENV:"The current branch isn't mapped to an environment. Add a branch rule in product settings or pass --branch explicitly.",PLAN_NOT_FOUND:"Plan key doesn't exist on this product. Check the `plans` block in your local product manifest.",PLAN_HAS_ACTIVE_SUBSCRIPTIONS:"Plan has active subscribers and can't be deleted. Migrate them to another plan first.",PLAN_SLUG_CONFLICT:"Another plan already uses this key. Pick a unique plan key in your manifest.",SLUG_CONFLICT:"This product slug is taken. Pick a different name.",SLUG_BLOCKED:"This slug is reserved or blocked. Pick a different name.",SLUG_RESERVED:"This slug is reserved by Farther Shore. Pick a different name.",SLUG_INVALID_FORMAT:"Slug must be lowercase letters, digits, and hyphens (no leading/trailing hyphen).",DECISION_NOT_FOUND:"No DenialEvent recorded for that decisionId. Verify the id from the original deny response or audit log.",AUTH_UNAUTHORIZED:"Token is missing, expired, or lacks the audit:read scope required to read denial events.",RATE_LIMIT_EXCEEDED:"You've hit the rate limit. Wait a moment and retry.",VALIDATION_ERROR:"Request is malformed. The `details` field has the field-level errors.",CONFLICT:"The resource is in a state that conflicts with the request. Inspect `details` to learn more."};function Kl(e){if(e)return oS[e]}function Dh(e){process.stdout.write(`${JSON.stringify(e,null,2)}
98
+ `)}function aS(e,t){return{schema_version:1,ok:!0,op:e,data:t}}function sS(e,t){let r=t.status??0;return{schema_version:1,ok:!1,op:e,error:{code:t.code??"INTERNAL_ERROR",message:t.message,status:r,param:t.param,retryable:lS(r,t.code),details:t.details,hint:Kl(t.code)}}}function B(e,t,r=jh()){if(le()==="json"){Dh(aS(r,e));return}t&&Hd(t)}function cS(e){return e===0?1:e===400||e===422?2:e===401||e===403?3:e===409?4:e>=500?5:1}var uS=new Set(["RATE_LIMIT_EXCEEDED","SERVICE_UNAVAILABLE"]);function lS(e,t){return e>=500||e===429||e===503?!0:t?uS.has(t):!1}function Wl(e,t=jh()){let r=e.status??0;if(le()==="json")Dh(sS(t,e));else{let o=Kl(e.code),n=e.code?` [${e.code}]`:"";process.stderr.write(`Error${n}: ${e.message}
99
99
  `),o&&process.stderr.write(`Hint: ${o}
100
- `)}return Kk(r)}var wh="unknown";function Oh(e){wh=e}function Th(){return wh}async function Yk(e){if(!mo())throw new k("No token provided. Pass --token, set FARTHERSHORE_TOKEN, or run interactively.",void 0,{code:"AUTH_NO_TOKEN"});let t=Jk({input:process.stdin,output:process.stdout,terminal:!0});return new Promise(r=>{t.question(e,o=>{t.close(),r(o.trim())})})}function Ph(e,t){let r=e.command("auth").description("Manage CLI auth credentials");r.command("login").description("Store a maker token in ~/.farthershore/credentials.json").option("--token <token>","Maker token (mk_...). Falls back to FARTHERSHORE_TOKEN env, then prompt.").action(async o=>{let n=o.token??process.env.FARTHERSHORE_TOKEN??await Yk("Maker token: ");if(!n||n.length<10)throw new k("Token looks malformed.",void 0,{code:"AUTH_INVALID_TOKEN"});let i=Bn();kd({...i??{},token:n}),H({},"Token stored.")}),r.command("whoami").description("Show current auth identity (org, role, scopes)").action(async()=>{let n=await t().bootstrap(),i=n.memberships.find(s=>s.organization.id===n.activeOrganization.id);H({userId:n.user.id,clerkUserId:n.user.clerkUserId,organizationId:n.activeOrganization.id,organizationName:n.activeOrganization.name??null,organizationSlug:n.activeOrganization.slug??null,role:i?.role??null,memberships:n.memberships.map(s=>({organizationId:s.organization.id,organizationName:s.organization.name??null,role:s.role}))},`Authenticated as ${n.user.id}`)}),r.command("logout").description("Clear stored credentials").action(()=>{Sd(),H({},"Logged out.")})}var Le={idempotencyKey:a.string().optional().describe("A UUID you generate; REUSE the same value when retrying so the retry replays the first result instead of double-provisioning.")};import{randomUUID as Xk}from"node:crypto";async function zi(e,t){if(t){if(t.length===36)return t;let o=(await e.listProducts()).find(n=>n.id===t||n.name.toLowerCase()===t.toLowerCase());if(o)return o.id}throw new Error("No product selected. Pass --product <id-or-name> or run `farthershore product create` first.")}async function Ui(e,t,r){let n=await e.listEnvironments(t),s=(Array.isArray(n.data)?n.data:Array.isArray(n.environments)?n.environments:[]).find(c=>c.name.toLowerCase()===r.toLowerCase()||c.id===r);if(!s)throw new Error(`Environment "${r}" not found on product ${t}.`);return s.id}var Qk="Reuse the same key on retry so it replays instead of double-creating (auto-generated if omitted).",eS="Preview the change without applying it.",tS="Skip confirmation; required for this destructive action";function nS(e,t){let r=typeof t.parser=="function",o=t.defaultValue!==void 0,n=[t.token];(t.describe!==void 0||r||o)&&n.push(t.describe??""),r&&n.push(t.parser),o&&n.push(t.defaultValue),t.required?e.requiredOption(...n):e.option(...n)}function Ah(e,t,r){let o=r.cli.args.filter(c=>c.kind==="positional"),n=r.cli.args.filter(c=>c.kind==="flag"),i=[r.cli.command,...o.map(c=>c.token)].join(" "),s=e.command(i).description(r.cli.summary);for(let c of n)nS(s,c);r.cli.destructive&&s.option("--yes",tS),r.cli.idempotent&&(s.option("--idempotency-key <key>",Qk),s.option("--dry-run",eS)),r.cli.helpTextAfter&&s.addHelpText("after",r.cli.helpTextAfter),s.action(async(...c)=>{let u=c[c.length-2]??{},l=c.slice(0,c.length-2);if(r.cli.destructive&&u.yes!==!0)throw new k(r.cli.yesMessage??"Pass --yes to confirm this destructive action.",void 0,{code:"DESTRUCTIVE_OP_REQUIRES_YES"});let d=t(),m={...u};for(let C=0;C<o.length;C++){let A=o[C],et=l[C];m[A.field]=A.resolveProduct?await zi(d,et):et}let g=r.cli.idempotent?{idempotencyKey:u.idempotencyKey??Xk(),dryRun:u.dryRun}:{},S={client:d,args:m,opts:u,reqOpts:g,emit:H,emitDryRunPreview:C=>C?.dryRun===!0?(H({preview:C.wouldHave,dryRun:!0},"Dry run \u2014 no changes applied."),!0):!1};await r.cli.handler(S)})}var rS={product:"Product lifecycle: list, show, create, update, delete",plan:"Plan management: list, create, update, delete",env:"Manage product environments (preview branches, prod)",backend:"Manage BYO backends and their runtime tokens","backend tokens":"Manage runtime tokens (fsrt_) for BYO backends",persona:"Mint and manage test-env personas (test API keys)",usage:"Usage observability for a product",token:"Maker-token management (list, create, revoke)"};function iS(e,t){let r=t.split(" "),o=e,n="";for(let i of r){n=n?`${n} ${i}`:i;let s=o.commands.find(l=>l.name()===i);if(s){o=s;continue}let c=rS[n],u=o.command(i);c&&u.description(c),o=u}return o}function ee(e,t,r){for(let o of r){let n=iS(e,o.cli.group);Ah(n,t,o)}}var Mt=["frontend","api","docs","widget","dashboard","webhook","worker","agent"],oS=["frontend","api"];function Nh(e){let t=e.trim().toLowerCase();if(!Mt.includes(t))throw new k(`Unknown product surface "${e}". Available: ${Mt.join(", ")}.`,void 0,{code:"UNKNOWN_PRODUCT_SURFACE"});return t}function zn(e){let t=(e.surface??[]).map(Nh);if(t.length===0)return;if(new Set(t).size!==t.length)throw new k("Duplicate product surfaces in --surface flags.",void 0,{code:"INVALID_PRODUCT_SURFACES"});return t}function Vl(e){return e&&e.length>0?e:[...oS]}function aS(e){return e.split("_").map(t=>t.charAt(0).toUpperCase()+t.slice(1)).join(" ")}function sS(e){let[t="",r,o]=e.split(":");if(!/^[a-z0-9_]+$/.test(t))throw new k(`Invalid meter key in "--meter ${e}" \u2014 keys are lowercase letters, digits, and underscores (e.g. input_tokens).`,void 0,{code:"INVALID_METER_SPEC"});return{key:t,display:r?.trim()||aS(t),unit:o?.trim()||void 0}}function cS(e){let t=e.meter??[];if(t.length>0&&e.meters)throw new k("Pass either --meters <template> or repeated --meter entries, not both.",void 0,{code:"CONFLICTING_METER_FLAGS"});if(t.length>0){let r=t.map(sS);if(new Set(r.map(n=>n.key)).size!==r.length)throw new k("Duplicate meter keys in --meter flags.",void 0,{code:"INVALID_METER_SPEC"});return r}if(e.meters){let r=Vf(e.meters);if(!r)throw new k(`Unknown meter template "${e.meters}". Available: ${Bf().join(", ")}.`,void 0,{code:"UNKNOWN_METER_TEMPLATE"});return r.meters.map(o=>({...o}))}}function uS(e){return{...e,product:e.product}}var lS=[{opKey:"product.list",operationClass:"operate",scope:["products:read"],sideEffect:"read",cli:{group:"product",command:"list",summary:"List products in the current org",args:[],handler:async({client:e,emit:t})=>{let r=await e.listProducts();t({count:r.length,products:r.map(o=>({...o,displayName:o.displayName??null,status:o.status??null}))},`${r.length} product(s)`)}},mcp:{tool:"fs_product_list",title:"List products",description:"List every product in the authenticated FartherShore workspace (id, name, status). Read-only; use this to discover product ids for the other tools.",annotations:{readOnlyHint:!0,openWorldHint:!1},inputSchema:{},handler:async e=>{let t=await e.listProducts();return{count:t.length,products:t.map(r=>({id:r.id,name:r.name,status:r.status??null}))}}}},{opKey:"product.read",operationClass:"dual",scope:["products:read"],sideEffect:"read",cli:{group:"product",command:"show",summary:"Show a product",args:[{field:"productId",kind:"positional",token:"<productIdOrName>",resolveProduct:!0},{field:"env",kind:"flag",token:"--env <env>",describe:"Environment scope (preview branch name)"}],handler:async({client:e,args:t,emit:r})=>{let o=t.productId,n=await e.getProduct(o,{env:t.env});r({product:n},`Product ${o}`)}},mcp:null},{opKey:"product.create",operationClass:"dual",scope:["products:create"],sideEffect:"write",cli:{group:"product",command:"create",summary:"Create a new product and provision the frontend starter repo",idempotent:!0,args:[{field:"name",kind:"flag",token:"--name <name>",describe:"Product slug (becomes the subdomain)",required:!0},{field:"displayName",kind:"flag",token:"--display-name <displayName>",describe:"Human-friendly product name"},{field:"description",kind:"flag",token:"--description <description>"},{field:"origin",kind:"flag",token:"--origin <url>",describe:"Builder-owned product origin Farther Shore calls for customer-facing actions",required:!0},{field:"repoOwner",kind:"flag",token:"--repo-owner <owner>",describe:"Connected GitHub account that will own the product repo",required:!0},{field:"repoName",kind:"flag",token:"--repo-name <name>",describe:"GitHub repository name to create",required:!0},{field:"meters",kind:"flag",token:"--meters <template>",describe:`Meter template: ${Ai.map(e=>`${e.id} (${e.label})`).join(", ")}. Default: requests.`},{field:"meter",kind:"flag",token:"--meter <key[:display[:unit]]>",describe:"Custom meter, repeatable (e.g. --meter input_tokens:'Input Tokens':token). Overrides --meters.",parser:(e,t)=>[...t,e],defaultValue:[]},{field:"surface",kind:"flag",token:"--surface <surface>",describe:`Initial Product SDK surface, repeatable. Available: ${Mt.join(", ")}.`,parser:(e,t)=>[...t,e],defaultValue:[]}],handler:async({client:e,args:t,reqOpts:r,emit:o,emitDryRunPreview:n})=>{let i=cS({meters:t.meters,meter:t.meter}),s=zn({surface:t.surface}),c=await e.initProduct({name:t.name,origin:t.origin,repoTarget:{owner:t.repoOwner,name:t.repoName},description:t.description,displayName:t.displayName,meters:i,surfaces:s},r);n(c)||o({result:uS(c)},`Product created: ${t.name}`)}},mcp:null},{opKey:"brand.update",operationClass:"operate",scope:["products:update"],sideEffect:"write",cli:{group:"product",command:"update",summary:"Update product metadata (name, origin, description, etc.)",args:[{field:"productId",kind:"positional",token:"<productIdOrName>",resolveProduct:!0},{field:"displayName",kind:"flag",token:"--display-name <displayName>"},{field:"description",kind:"flag",token:"--description <description>"},{field:"origin",kind:"flag",token:"--origin <url>"},{field:"confirmOriginChange",kind:"flag",token:"--confirm-origin-change",describe:"Confirm changing the origin on a live (ACTIVE) product. Without it core 409s to guard accidental origin changes."},{field:"env",kind:"flag",token:"--env <env>",describe:"Environment scope"}],handler:async({client:e,args:t,emit:r})=>{let o=t.productId,n={};if(t.displayName!==void 0&&(n.displayName=t.displayName),t.description!==void 0&&(n.description=t.description),t.origin!==void 0&&(n.origin=t.origin),t.confirmOriginChange&&(n.confirmOriginChange=!0),Object.keys(n).length===0)throw new k("No fields to update. Pass --display-name / --origin / --description.",void 0,{code:"PRODUCT_UPDATE_NO_FIELDS"});let i=await e.updateProduct(o,n,{env:t.env});r({product:i},`Product ${o} updated`)}},mcp:{tool:"fs_brand_update",title:"Update product brand",description:"Update a product's BRAND/presentation only \u2014 display name, description, icon, logo (wordmark), primary color. Plans, pricing, and routes are managed as code in the product repo and are NOT editable here. Only the fields you pass are changed.",annotations:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1,openWorldHint:!1},inputSchema:{productId:a.string().describe("The product id to update."),displayName:a.string().optional().describe("Display name."),description:a.string().optional().describe("Short product description."),iconUrl:a.string().optional().describe("Square icon/favicon URL."),logoUrl:a.string().optional().describe("Wordmark/logo URL."),primaryColor:a.string().optional().describe("Primary brand color (hex).")},handler:async(e,t)=>{let r={};return t.displayName!==void 0&&(r.displayName=t.displayName),t.description!==void 0&&(r.description=t.description),t.iconUrl!==void 0&&(r.iconUrl=t.iconUrl),t.logoUrl!==void 0&&(r.logoUrl=t.logoUrl),t.primaryColor!==void 0&&(r.primaryColor=t.primaryColor),e.updateProduct(t.productId,r)}}},{opKey:"product.publish",operationClass:"dual",scope:["products:publish"],sideEffect:"write",cli:{group:"product",command:"publish",summary:"Publish a draft product (make it live). Requires at least one plan, an origin, and a verified Stripe connection.",idempotent:!0,args:[{field:"productId",kind:"positional",token:"<productIdOrName>",resolveProduct:!0}],handler:async({client:e,args:t,reqOpts:r,emit:o,emitDryRunPreview:n})=>{let i=t.productId,s=await e.publishProduct(i,r);n(s)||o({product:s},`Product ${i} published`)}},mcp:{tool:"fs_product_publish",title:"Publish a product",description:"Publish a product \u2014 deploy its current spec live. Equivalent to a repo-driven deploy (operationClass=dual); both reconcile to the same published state.",annotations:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1,openWorldHint:!1},inputSchema:{productId:a.string().describe("The product id to publish."),...Le},handler:async(e,t)=>e.publishProduct(t.productId,{idempotencyKey:t.idempotencyKey})}},{opKey:"product.delete",operationClass:"operate",scope:["products:update"],sideEffect:"write",cli:{group:"product",command:"delete",summary:"Permanently delete a product. Requires --yes.",destructive:!0,yesMessage:"Pass --yes to confirm product deletion.",args:[{field:"productId",kind:"positional",token:"<productIdOrName>",resolveProduct:!0}],handler:async({client:e,args:t,emit:r})=>{let o=t.productId;try{await e.deleteProduct(o)}catch(n){throw n instanceof k&&(n.status===403||n.code==="FORBIDDEN")?new k("Deleting a whole product requires a builder/browser session \u2014 open the product in the dashboard to delete it. (Preview environments CAN be deleted via the CLI: `farthershore env delete`.)",n.status,{code:n.code??"FORBIDDEN"}):n}r({deleted:o},`Product ${o} deleted`)}},mcp:null}];function Ch(e,t){ee(e,t,lS)}function dS(e){if(!e||typeof e!="object")return[];let t=e;return Array.isArray(t.data)?t.data:Array.isArray(t.environments)?t.environments:[]}var mS=[{opKey:"environment.read",operationClass:"dual",scope:["products:read"],sideEffect:"read",cli:{group:"env",command:"list",summary:"List environments for a product",args:[{field:"productId",kind:"positional",token:"<productIdOrName>",resolveProduct:!0}],handler:async({client:e,args:t,emit:r})=>{let o=t.productId,n=dS(await e.listEnvironments(o));r({productId:o,count:n.length,environments:n.map(i=>({id:i.id,name:i.name,branch:i.branch??null,portalHostname:i.portalHostname??null,runtimeHostname:i.runtimeHostname??null,status:i.status??null}))},`${n.length} environment(s)`)}},mcp:{tool:"fs_env_list",title:"List environments",description:"List a product's preview environments (name, branch, hostnames). Read-only.",annotations:{readOnlyHint:!0,openWorldHint:!1},inputSchema:{productId:a.string().describe("The product id whose environments to list.")},handler:async(e,{productId:t})=>e.listEnvironments(t)}},{opKey:"environment.create",operationClass:"dual",scope:["products:update"],sideEffect:"write",cli:{group:"env",command:"create",summary:"Create a preview environment bound to a git branch",idempotent:!0,args:[{field:"productId",kind:"positional",token:"<productIdOrName>",resolveProduct:!0},{field:"name",kind:"flag",token:"--name <name>",describe:"Environment name (e.g. preview, staging)",required:!0},{field:"branch",kind:"flag",token:"--branch <branch>",describe:"Git branch to track (e.g. env/preview)",required:!0}],handler:async({client:e,args:t,reqOpts:r,emit:o,emitDryRunPreview:n})=>{let i=t.productId,s=await e.createEnvironment(i,{name:t.name,branch:t.branch},r);n(s)||o({productId:i,environment:s},`Environment ${t.name} created`)}},mcp:{tool:"fs_env_create",title:"Create preview environment",description:"Create a preview environment bound to a git branch. Equivalent to pushing the branch \u2014 both reconcile to the same environment (operationClass=dual). Provide a name and the git branch it tracks.",annotations:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1,openWorldHint:!1},inputSchema:{productId:a.string().describe("The product id to create the environment in."),name:a.string().describe("Environment name (e.g. 'staging', 'preview-pr-42')."),branch:a.string().describe("The git branch this environment tracks."),...Le},handler:async(e,t)=>{let r=await e.createEnvironment(t.productId,{name:t.name,branch:t.branch},{idempotencyKey:t.idempotencyKey});return{ok:!0,productId:t.productId,environment:r}}}},{opKey:"environment.delete",operationClass:"dual",scope:["products:update"],sideEffect:"write",cli:{group:"env",command:"delete",summary:"Delete an environment by name. Requires --yes.",destructive:!0,yesMessage:"Pass --yes to confirm environment deletion.",args:[{field:"productId",kind:"positional",token:"<productIdOrName>",resolveProduct:!0},{field:"envName",kind:"positional",token:"<envName>"}],handler:async({client:e,args:t,emit:r})=>{let o=t.productId,n=t.envName;await e.deleteEnvironment(o,n),r({productId:o,deleted:n},`Environment ${n} deleted`)}},mcp:null}];function Rh(e,t){ee(e,t,mS)}var me=["free","starter","pro","prepaid","metered"],pS={kind:"free",label:"Free",description:"No recurring fee and no metered usage. Pure freemium tier.",pricing:{meters:[],recurring_fee_cents:0,billing_interval:"month",grants:[],trial_days:0}},fS={kind:"starter",label:"Starter \u2014 $20/mo + $20 included",description:"$20/month subscription with $20 of usage credit each period. Stripe-style minimum-spend; overage billed at $0.001/request by default.",pricing:{meters:[{dimension:"requests",kind:"linear",price_per_unit_micros:1e3}],recurring_fee_cents:2e3,billing_interval:"month",grants:[{kind:"credit",amount_cents:2e3,recurs:!0}],trial_days:0}},gS={kind:"pro",label:"Pro \u2014 $100/mo + $200 included",description:"$100/month subscription with $200 of usage credit each period and a 14-day trial. Overage billed at $0.0005/request by default.",pricing:{meters:[{dimension:"requests",kind:"linear",price_per_unit_micros:500}],recurring_fee_cents:1e4,billing_interval:"month",grants:[{kind:"credit",amount_cents:2e4,recurs:!0}],trial_days:14}},hS={kind:"prepaid",label:"Prepaid \u2014 $50 sign-up credit, then PAYG",description:"$50 one-time credit at signup. Once depleted the subscriber pays-as-they-go at $0.001/request by default.",pricing:{meters:[{dimension:"requests",kind:"linear",price_per_unit_micros:1e3}],recurring_fee_cents:0,billing_interval:"month",grants:[{kind:"credit",amount_cents:5e3,recurs:!1}],trial_days:0}},_S={kind:"metered",label:"Metered (pay-as-you-go)",description:"No subscription fee. Pure usage billing at $0.001/request by default.",pricing:{meters:[{dimension:"requests",kind:"linear",price_per_unit_micros:1e3}],recurring_fee_cents:0,billing_interval:"month",grants:[],trial_days:0}},Dh=Object.freeze({free:pS,starter:fS,pro:gS,prepaid:hS,metered:_S});function ji(e){return Dh[e]}function Bl(){return me.map(e=>Dh[e])}var VR=a.object({recurring_fee_cents:a.number().int().nonnegative().optional(),grants:a.array(le).max(40).optional(),creditPolicy:Ee.optional(),min_monthly_spend_cents:a.number().int().nonnegative().optional(),max_monthly_spend_cents:a.number().int().nonnegative().optional(),meters:a.array(de).optional(),notes:a.string().max(2e3).optional()});function vS(e){return(e??[]).some(t=>t.kind==="credit"?t.amount_cents>0:t.kind==="top_up"?t.price_cents>0:!1)}function zh(e){let t=e.meters&&e.meters.length>0?e.meters:void 0,r=e.grants&&e.grants.length>0?e.grants:void 0,o=vS(r);if(e.free&&((e.recurringFeeCents??0)>0||o||(t?.length??0)>0))throw new k("A free plan cannot be combined with a fee, credit grant, or usage meter.",void 0,{code:"FREE_PLAN_HAS_REVENUE"});if(!e.free&&(e.recurringFeeCents??0)<=0&&!o&&(t?.length??0)===0)throw new k("Plan has no revenue and isn't free \u2014 set free=true, a recurring fee, a credit grant, or a usage meter.",void 0,{code:"PLAN_HAS_NO_REVENUE"});let n={key:e.key,name:e.name};if(e.free&&(n.free=!0),t&&(n.meters=t),e.rateLimit!==!1){let i=typeof e.rateLimit=="number"?e.rateLimit:600,s=e.rateWindow??"minute";if(!["second","minute","hour"].includes(s))throw new k(`Invalid rate window "${s}" \u2014 use second, minute, or hour.`,void 0,{code:"INVALID_RATE_WINDOW"});n.limits=[{dimension:"requests",window:{type:"named",name:s},capacity:i,enforcement:"enforce"}]}return typeof e.recurringFeeCents=="number"&&(n.recurring_fee_cents=e.recurringFeeCents),r&&(n.grants=r),typeof e.trialDays=="number"&&(n.trial_days=e.trialDays),typeof e.maxMonthlySpendCents=="number"&&(n.max_monthly_spend_cents=e.maxMonthlySpendCents),n}function bS(e){let t=e.indexOf(":"),r=t===-1?e:e.slice(0,t),o=t===-1?"":e.slice(t+1);if(!/^[a-z0-9_]+$/.test(r))throw new k(`Invalid meter dimension in "--meter ${e}" \u2014 dimensions are lowercase letters, digits, and underscores (e.g. requests, input_tokens).`,void 0,{code:"INVALID_PLAN_METER_SPEC"});if(!/^\d+$/.test(o.trim()))throw new k(`Invalid price in "--meter ${e}" \u2014 expected <dimension>:<price_per_unit_micros> with a non-negative integer price (e.g. requests:1000).`,void 0,{code:"INVALID_PLAN_METER_SPEC"});return{dimension:r,price_per_unit_micros:Number.parseInt(o.trim(),10),kind:"linear"}}function Uh(e){let t=e??[];if(t.length===0)return;let r=t.map(bS);if(new Set(r.map(n=>n.dimension)).size!==r.length)throw new k("Duplicate meter dimensions in --meter flags.",void 0,{code:"INVALID_PLAN_METER_SPEC"});return r}function yS(e){let t=e.indexOf(":"),r=t===-1?e:e.slice(0,t),o=t===-1?"":e.slice(t+1);if(r!=="recurring"&&r!=="one_time")throw new k(`Invalid grant kind in "--grant ${e}" \u2014 use recurring:<amount_cents> or one_time:<amount_cents>.`,void 0,{code:"INVALID_PLAN_GRANT_SPEC"});if(!/^\d+$/.test(o.trim()))throw new k(`Invalid grant amount in "--grant ${e}" \u2014 expected ${r}:<amount_cents> with a non-negative integer amount.`,void 0,{code:"INVALID_PLAN_GRANT_SPEC"});let n=Number.parseInt(o.trim(),10);return{grant:r==="recurring"?{kind:"credit",amount_cents:n,recurs:!0}:{kind:"credit",amount_cents:n},flavour:r}}function jh(e){let t=e??[];if(t.length===0)return;let r=t.map(yS),o=r.map(n=>n.flavour);if(new Set(o).size!==o.length)throw new k("Duplicate canonical grant kinds in --grant flags.",void 0,{code:"INVALID_PLAN_GRANT_SPEC"});return r.map(n=>n.grant)}function xS(e){if(!e||typeof e!="object")return[];let t=e;return Array.isArray(t.data)?t.data:Array.isArray(t.plans)?t.plans:Array.isArray(e)?e:[]}function kS(e){if(e.length===0)return"(no plans)";let t=["KEY","NAME","FREE","FEE\xA2","RECURRING\xA2","ONE_TIME\xA2","TRIAL_D","MAX_SPEND\xA2","STATUS"],r=c=>c===null?"\u2014":c.toLocaleString("en-US"),o=e.map(c=>[c.key,c.name,c.free?"Y":"N",r(c.recurring_fee_cents),r(c.recurring_grant_cents),r(c.one_time_grant_cents),r(c.trial_days),r(c.max_monthly_spend_cents),c.status]),n=t.map((c,u)=>Math.max(c.length,...o.map(l=>l[u]?.length??0))),i=c=>c.map((u,l)=>u.padEnd(n[l]??u.length)).join(" "),s=n.map(c=>"-".repeat(c)).join(" ");return[i(t),s,...o.map(i)].join(`
101
- `)}var SS=[{opKey:"plan.read",operationClass:"contract",scope:["products:read"],sideEffect:"read",cli:{group:"plan",command:"list",summary:"List plans for a product",args:[{field:"productId",kind:"positional",token:"<productIdOrName>",resolveProduct:!0}],helpTextAfter:`
100
+ `)}return cS(r)}var zh="unknown";function Uh(e){zh=e}function jh(){return zh}async function mS(e){if(!_o())throw new k("No token provided. Pass --token, set FARTHERSHORE_TOKEN, or run interactively.",void 0,{code:"AUTH_NO_TOKEN"});let t=dS({input:process.stdin,output:process.stdout,terminal:!0});return new Promise(r=>{t.question(e,o=>{t.close(),r(o.trim())})})}function Lh(e,t){let r=e.command("auth").description("Manage CLI auth credentials");r.command("login").description("Store a maker token in ~/.farthershore/credentials.json").option("--token <token>","Maker token (mk_...). Falls back to FARTHERSHORE_TOKEN env, then prompt.").action(async o=>{let n=o.token??process.env.FARTHERSHORE_TOKEN??await mS("Maker token: ");if(!n||n.length<10)throw new k("Token looks malformed.",void 0,{code:"AUTH_INVALID_TOKEN"});let i=Gn();Td({...i??{},token:n}),B({},"Token stored.")}),r.command("whoami").description("Show current auth identity (org, role, scopes)").action(async()=>{let n=await t().bootstrap(),i=n.memberships.find(s=>s.organization.id===n.activeOrganization.id);B({userId:n.user.id,clerkUserId:n.user.clerkUserId,organizationId:n.activeOrganization.id,organizationName:n.activeOrganization.name??null,organizationSlug:n.activeOrganization.slug??null,role:i?.role??null,memberships:n.memberships.map(s=>({organizationId:s.organization.id,organizationName:s.organization.name??null,role:s.role}))},`Authenticated as ${n.user.id}`)}),r.command("logout").description("Clear stored credentials").action(()=>{Ad(),B({},"Logged out.")})}var he={idempotencyKey:a.string().optional().describe("A UUID you generate; REUSE the same value when retrying so the retry replays the first result instead of double-provisioning.")};import{randomUUID as pS}from"node:crypto";async function Li(e,t){if(t){if(t.length===36)return t;let o=(await e.listProducts()).find(n=>n.id===t||n.name.toLowerCase()===t.toLowerCase());if(o)return o.id}throw new Error("No product selected. Pass --product <id-or-name> or run `farthershore product create` first.")}async function Fi(e,t,r){let n=await e.listEnvironments(t),s=(Array.isArray(n.data)?n.data:Array.isArray(n.environments)?n.environments:[]).find(c=>c.name.toLowerCase()===r.toLowerCase()||c.id===r);if(!s)throw new Error(`Environment "${r}" not found on product ${t}.`);return s.id}var fS="Reuse the same key on retry so it replays instead of double-creating (auto-generated if omitted).",gS="Preview the change without applying it.",hS="Skip confirmation; required for this destructive action";function _S(e,t){let r=typeof t.parser=="function",o=t.defaultValue!==void 0,n=[t.token];(t.describe!==void 0||r||o)&&n.push(t.describe??""),r&&n.push(t.parser),o&&n.push(t.defaultValue),t.required?e.requiredOption(...n):e.option(...n)}function Fh(e,t,r){let o=r.cli.args.filter(c=>c.kind==="positional"),n=r.cli.args.filter(c=>c.kind==="flag"),i=[r.cli.command,...o.map(c=>c.token)].join(" "),s=e.command(i).description(r.cli.summary);for(let c of n)_S(s,c);r.cli.destructive&&s.option("--yes",hS),r.cli.idempotent&&(s.option("--idempotency-key <key>",fS),s.option("--dry-run",gS)),r.cli.helpTextAfter&&s.addHelpText("after",r.cli.helpTextAfter),s.action(async(...c)=>{let u=c[c.length-2]??{},l=c.slice(0,c.length-2);if(r.cli.destructive&&u.yes!==!0)throw new k(r.cli.yesMessage??"Pass --yes to confirm this destructive action.",void 0,{code:"DESTRUCTIVE_OP_REQUIRES_YES"});let d=t(),m={...u};for(let R=0;R<o.length;R++){let P=o[R],rt=l[R];m[P.field]=P.resolveProduct?await Li(d,rt):rt}let g=r.cli.idempotent?{idempotencyKey:u.idempotencyKey??pS(),dryRun:u.dryRun}:{},S={client:d,args:m,opts:u,reqOpts:g,emit:B,emitDryRunPreview:R=>R?.dryRun===!0?(B({preview:R.wouldHave,dryRun:!0},"Dry run \u2014 no changes applied."),!0):!1};await r.cli.handler(S)})}var vS={product:"Product lifecycle: list, show, create, update, delete",plan:"Plan management: list, create, update, delete",env:"Manage product environments (preview branches, prod)",backend:"Manage BYO backends and their runtime tokens","backend tokens":"Manage runtime tokens (fsrt_) for BYO backends",frontend:"Managed Frontend Hosting: deploy/status/rollback (+ local preview)",persona:"Mint and manage test-env personas (test API keys)",usage:"Usage observability for a product",token:"Maker-token management (list, create, revoke)"};function bS(e,t){let r=t.split(" "),o=e,n="";for(let i of r){n=n?`${n} ${i}`:i;let s=o.commands.find(l=>l.name()===i);if(s){o=s;continue}let c=vS[n],u=o.command(i);c&&u.description(c),o=u}return o}function W(e,t,r){for(let o of r){let n=bS(e,o.cli.group);Fh(n,t,o)}}var Bt=["frontend","api","docs","widget","dashboard","webhook","worker","agent"],yS=["frontend","api"];function Mh(e){let t=e.trim().toLowerCase();if(!Bt.includes(t))throw new k(`Unknown product surface "${e}". Available: ${Bt.join(", ")}.`,void 0,{code:"UNKNOWN_PRODUCT_SURFACE"});return t}function jn(e){let t=(e.surface??[]).map(Mh);if(t.length===0)return;if(new Set(t).size!==t.length)throw new k("Duplicate product surfaces in --surface flags.",void 0,{code:"INVALID_PRODUCT_SURFACES"});return t}function ql(e){return e&&e.length>0?e:[...yS]}function xS(e){return e.split("_").map(t=>t.charAt(0).toUpperCase()+t.slice(1)).join(" ")}function kS(e){let[t="",r,o]=e.split(":");if(!/^[a-z0-9_]+$/.test(t))throw new k(`Invalid meter key in "--meter ${e}" \u2014 keys are lowercase letters, digits, and underscores (e.g. input_tokens).`,void 0,{code:"INVALID_METER_SPEC"});return{key:t,display:r?.trim()||xS(t),unit:o?.trim()||void 0}}function SS(e){let t=e.meter??[];if(t.length>0&&e.meters)throw new k("Pass either --meters <template> or repeated --meter entries, not both.",void 0,{code:"CONFLICTING_METER_FLAGS"});if(t.length>0){let r=t.map(kS);if(new Set(r.map(n=>n.key)).size!==r.length)throw new k("Duplicate meter keys in --meter flags.",void 0,{code:"INVALID_METER_SPEC"});return r}if(e.meters){let r=Jf(e.meters);if(!r)throw new k(`Unknown meter template "${e.meters}". Available: ${Yf().join(", ")}.`,void 0,{code:"UNKNOWN_METER_TEMPLATE"});return r.meters.map(o=>({...o}))}}function $S(e){return{...e,product:e.product}}var IS=[{opKey:"product.list",operationClass:"operate",scope:["products:read"],sideEffect:"read",cli:{group:"product",command:"list",summary:"List products in the current org",args:[],handler:async({client:e,emit:t})=>{let r=await e.listProducts();t({count:r.length,products:r.map(o=>({...o,displayName:o.displayName??null,status:o.status??null}))},`${r.length} product(s)`)}},mcp:{tool:"fs_product_list",title:"List products",description:"List every product in the authenticated FartherShore workspace (id, name, status). Read-only; use this to discover product ids for the other tools.",annotations:{readOnlyHint:!0,openWorldHint:!1},inputSchema:{},handler:async e=>{let t=await e.listProducts();return{count:t.length,products:t.map(r=>({id:r.id,name:r.name,status:r.status??null}))}}}},{opKey:"product.read",operationClass:"dual",scope:["products:read"],sideEffect:"read",cli:{group:"product",command:"show",summary:"Show a product",args:[{field:"productId",kind:"positional",token:"<productIdOrName>",resolveProduct:!0},{field:"env",kind:"flag",token:"--env <env>",describe:"Environment scope (preview branch name)"}],handler:async({client:e,args:t,emit:r})=>{let o=t.productId,n=await e.getProduct(o,{env:t.env});r({product:n},`Product ${o}`)}},mcp:null},{opKey:"product.create",operationClass:"dual",scope:["products:create"],sideEffect:"write",cli:{group:"product",command:"create",summary:"Create a new product and provision the frontend starter repo",idempotent:!0,args:[{field:"name",kind:"flag",token:"--name <name>",describe:"Product slug (becomes the subdomain)",required:!0},{field:"displayName",kind:"flag",token:"--display-name <displayName>",describe:"Human-friendly product name"},{field:"description",kind:"flag",token:"--description <description>"},{field:"origin",kind:"flag",token:"--origin <url>",describe:"Builder-owned product origin Farther Shore calls for customer-facing actions",required:!0},{field:"repoOwner",kind:"flag",token:"--repo-owner <owner>",describe:"Connected GitHub account that will own the product repo",required:!0},{field:"repoName",kind:"flag",token:"--repo-name <name>",describe:"GitHub repository name to create",required:!0},{field:"meters",kind:"flag",token:"--meters <template>",describe:`Meter template: ${Ni.map(e=>`${e.id} (${e.label})`).join(", ")}. Default: requests.`},{field:"meter",kind:"flag",token:"--meter <key[:display[:unit]]>",describe:"Custom meter, repeatable (e.g. --meter input_tokens:'Input Tokens':token). Overrides --meters.",parser:(e,t)=>[...t,e],defaultValue:[]},{field:"surface",kind:"flag",token:"--surface <surface>",describe:`Initial Product SDK surface, repeatable. Available: ${Bt.join(", ")}.`,parser:(e,t)=>[...t,e],defaultValue:[]}],handler:async({client:e,args:t,reqOpts:r,emit:o,emitDryRunPreview:n})=>{let i=SS({meters:t.meters,meter:t.meter}),s=jn({surface:t.surface}),c=await e.initProduct({name:t.name,origin:t.origin,repoTarget:{owner:t.repoOwner,name:t.repoName},description:t.description,displayName:t.displayName,meters:i,surfaces:s},r);n(c)||o({result:$S(c)},`Product created: ${t.name}`)}},mcp:null},{opKey:"brand.update",operationClass:"operate",scope:["products:update"],sideEffect:"write",cli:{group:"product",command:"update",summary:"Update product metadata (name, origin, description, etc.)",args:[{field:"productId",kind:"positional",token:"<productIdOrName>",resolveProduct:!0},{field:"displayName",kind:"flag",token:"--display-name <displayName>"},{field:"description",kind:"flag",token:"--description <description>"},{field:"origin",kind:"flag",token:"--origin <url>"},{field:"confirmOriginChange",kind:"flag",token:"--confirm-origin-change",describe:"Confirm changing the origin on a live (ACTIVE) product. Without it core 409s to guard accidental origin changes."},{field:"env",kind:"flag",token:"--env <env>",describe:"Environment scope"}],handler:async({client:e,args:t,emit:r})=>{let o=t.productId,n={};if(t.displayName!==void 0&&(n.displayName=t.displayName),t.description!==void 0&&(n.description=t.description),t.origin!==void 0&&(n.origin=t.origin),t.confirmOriginChange&&(n.confirmOriginChange=!0),Object.keys(n).length===0)throw new k("No fields to update. Pass --display-name / --origin / --description.",void 0,{code:"PRODUCT_UPDATE_NO_FIELDS"});let i=await e.updateProduct(o,n,{env:t.env});r({product:i},`Product ${o} updated`)}},mcp:{tool:"fs_brand_update",title:"Update product brand",description:"Update a product's BRAND/presentation only \u2014 display name, description, icon, logo (wordmark), primary color. Plans, pricing, and routes are managed as code in the product repo and are NOT editable here. Only the fields you pass are changed.",annotations:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1,openWorldHint:!1},inputSchema:{productId:a.string().describe("The product id to update."),displayName:a.string().optional().describe("Display name."),description:a.string().optional().describe("Short product description."),iconUrl:a.string().optional().describe("Square icon/favicon URL."),logoUrl:a.string().optional().describe("Wordmark/logo URL."),primaryColor:a.string().optional().describe("Primary brand color (hex).")},handler:async(e,t)=>{let r={};return t.displayName!==void 0&&(r.displayName=t.displayName),t.description!==void 0&&(r.description=t.description),t.iconUrl!==void 0&&(r.iconUrl=t.iconUrl),t.logoUrl!==void 0&&(r.logoUrl=t.logoUrl),t.primaryColor!==void 0&&(r.primaryColor=t.primaryColor),e.updateProduct(t.productId,r)}}},{opKey:"product.publish",operationClass:"dual",scope:["products:publish"],sideEffect:"write",cli:{group:"product",command:"publish",summary:"Publish a draft product (make it live). Requires at least one plan, an origin, and a verified Stripe connection.",idempotent:!0,args:[{field:"productId",kind:"positional",token:"<productIdOrName>",resolveProduct:!0}],handler:async({client:e,args:t,reqOpts:r,emit:o,emitDryRunPreview:n})=>{let i=t.productId,s=await e.publishProduct(i,r);n(s)||o({product:s},`Product ${i} published`)}},mcp:{tool:"fs_product_publish",title:"Publish a product",description:"Publish a product \u2014 deploy its current spec live. Equivalent to a repo-driven deploy (operationClass=dual); both reconcile to the same published state.",annotations:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1,openWorldHint:!1},inputSchema:{productId:a.string().describe("The product id to publish."),...he},handler:async(e,t)=>e.publishProduct(t.productId,{idempotencyKey:t.idempotencyKey})}},{opKey:"product.delete",operationClass:"operate",scope:["products:update"],sideEffect:"write",cli:{group:"product",command:"delete",summary:"Permanently delete a product. Requires --yes.",destructive:!0,yesMessage:"Pass --yes to confirm product deletion.",args:[{field:"productId",kind:"positional",token:"<productIdOrName>",resolveProduct:!0}],handler:async({client:e,args:t,emit:r})=>{let o=t.productId;try{await e.deleteProduct(o)}catch(n){throw n instanceof k&&(n.status===403||n.code==="FORBIDDEN")?new k("Deleting a whole product requires a builder/browser session \u2014 open the product in the dashboard to delete it. (Preview environments CAN be deleted via the CLI: `farthershore env delete`.)",n.status,{code:n.code??"FORBIDDEN"}):n}r({deleted:o},`Product ${o} deleted`)}},mcp:null}];function Zh(e,t){W(e,t,IS)}function ES(e){if(!e||typeof e!="object")return[];let t=e;return Array.isArray(t.data)?t.data:Array.isArray(t.environments)?t.environments:[]}var wS=[{opKey:"environment.read",operationClass:"dual",scope:["products:read"],sideEffect:"read",cli:{group:"env",command:"list",summary:"List environments for a product",args:[{field:"productId",kind:"positional",token:"<productIdOrName>",resolveProduct:!0}],handler:async({client:e,args:t,emit:r})=>{let o=t.productId,n=ES(await e.listEnvironments(o));r({productId:o,count:n.length,environments:n.map(i=>({id:i.id,name:i.name,branch:i.branch??null,portalHostname:i.portalHostname??null,runtimeHostname:i.runtimeHostname??null,status:i.status??null}))},`${n.length} environment(s)`)}},mcp:{tool:"fs_env_list",title:"List environments",description:"List a product's preview environments (name, branch, hostnames). Read-only.",annotations:{readOnlyHint:!0,openWorldHint:!1},inputSchema:{productId:a.string().describe("The product id whose environments to list.")},handler:async(e,{productId:t})=>e.listEnvironments(t)}},{opKey:"environment.create",operationClass:"dual",scope:["products:update"],sideEffect:"write",cli:{group:"env",command:"create",summary:"Create a preview environment bound to a git branch",idempotent:!0,args:[{field:"productId",kind:"positional",token:"<productIdOrName>",resolveProduct:!0},{field:"name",kind:"flag",token:"--name <name>",describe:"Environment name (e.g. preview, staging)",required:!0},{field:"branch",kind:"flag",token:"--branch <branch>",describe:"Git branch to track (e.g. env/preview)",required:!0}],handler:async({client:e,args:t,reqOpts:r,emit:o,emitDryRunPreview:n})=>{let i=t.productId,s=await e.createEnvironment(i,{name:t.name,branch:t.branch},r);n(s)||o({productId:i,environment:s},`Environment ${t.name} created`)}},mcp:{tool:"fs_env_create",title:"Create preview environment",description:"Create a preview environment bound to a git branch. Equivalent to pushing the branch \u2014 both reconcile to the same environment (operationClass=dual). Provide a name and the git branch it tracks.",annotations:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1,openWorldHint:!1},inputSchema:{productId:a.string().describe("The product id to create the environment in."),name:a.string().describe("Environment name (e.g. 'staging', 'preview-pr-42')."),branch:a.string().describe("The git branch this environment tracks."),...he},handler:async(e,t)=>{let r=await e.createEnvironment(t.productId,{name:t.name,branch:t.branch},{idempotencyKey:t.idempotencyKey});return{ok:!0,productId:t.productId,environment:r}}}},{opKey:"environment.delete",operationClass:"dual",scope:["products:update"],sideEffect:"write",cli:{group:"env",command:"delete",summary:"Delete an environment by name. Requires --yes.",destructive:!0,yesMessage:"Pass --yes to confirm environment deletion.",args:[{field:"productId",kind:"positional",token:"<productIdOrName>",resolveProduct:!0},{field:"envName",kind:"positional",token:"<envName>"}],handler:async({client:e,args:t,emit:r})=>{let o=t.productId,n=t.envName;await e.deleteEnvironment(o,n),r({productId:o,deleted:n},`Environment ${n} deleted`)}},mcp:null}];function Vh(e,t){W(e,t,wS)}var _e=["free","starter","pro","prepaid","metered"],OS={kind:"free",label:"Free",description:"No recurring fee and no metered usage. Pure freemium tier.",pricing:{meters:[],recurring_fee_cents:0,billing_interval:"month",grants:[],trial_days:0}},TS={kind:"starter",label:"Starter \u2014 $20/mo + $20 included",description:"$20/month subscription with $20 of usage credit each period. Stripe-style minimum-spend; overage billed at $0.001/request by default.",pricing:{meters:[{dimension:"requests",kind:"linear",price_per_unit_micros:1e3}],recurring_fee_cents:2e3,billing_interval:"month",grants:[{kind:"credit",amount_cents:2e3,recurs:!0}],trial_days:0}},AS={kind:"pro",label:"Pro \u2014 $100/mo + $200 included",description:"$100/month subscription with $200 of usage credit each period and a 14-day trial. Overage billed at $0.0005/request by default.",pricing:{meters:[{dimension:"requests",kind:"linear",price_per_unit_micros:500}],recurring_fee_cents:1e4,billing_interval:"month",grants:[{kind:"credit",amount_cents:2e4,recurs:!0}],trial_days:14}},PS={kind:"prepaid",label:"Prepaid \u2014 $50 sign-up credit, then PAYG",description:"$50 one-time credit at signup. Once depleted the subscriber pays-as-they-go at $0.001/request by default.",pricing:{meters:[{dimension:"requests",kind:"linear",price_per_unit_micros:1e3}],recurring_fee_cents:0,billing_interval:"month",grants:[{kind:"credit",amount_cents:5e3,recurs:!1}],trial_days:0}},CS={kind:"metered",label:"Metered (pay-as-you-go)",description:"No subscription fee. Pure usage billing at $0.001/request by default.",pricing:{meters:[{dimension:"requests",kind:"linear",price_per_unit_micros:1e3}],recurring_fee_cents:0,billing_interval:"month",grants:[],trial_days:0}},Bh=Object.freeze({free:OS,starter:TS,pro:AS,prepaid:PS,metered:CS});function Mi(e){return Bh[e]}function Jl(){return _e.map(e=>Bh[e])}var o0=a.object({recurring_fee_cents:a.number().int().nonnegative().optional(),grants:a.array(fe).max(40).optional(),creditPolicy:Ae.optional(),min_monthly_spend_cents:a.number().int().nonnegative().optional(),max_monthly_spend_cents:a.number().int().nonnegative().optional(),meters:a.array(ge).optional(),notes:a.string().max(2e3).optional()});function NS(e){return(e??[]).some(t=>t.kind==="credit"?t.amount_cents>0:t.kind==="top_up"?t.price_cents>0:!1)}function Hh(e){let t=e.meters&&e.meters.length>0?e.meters:void 0,r=e.grants&&e.grants.length>0?e.grants:void 0,o=NS(r);if(e.free&&((e.recurringFeeCents??0)>0||o||(t?.length??0)>0))throw new k("A free plan cannot be combined with a fee, credit grant, or usage meter.",void 0,{code:"FREE_PLAN_HAS_REVENUE"});if(!e.free&&(e.recurringFeeCents??0)<=0&&!o&&(t?.length??0)===0)throw new k("Plan has no revenue and isn't free \u2014 set free=true, a recurring fee, a credit grant, or a usage meter.",void 0,{code:"PLAN_HAS_NO_REVENUE"});let n={key:e.key,name:e.name};if(e.free&&(n.free=!0),t&&(n.meters=t),e.rateLimit!==!1){let i=typeof e.rateLimit=="number"?e.rateLimit:600,s=e.rateWindow??"minute";if(!["second","minute","hour"].includes(s))throw new k(`Invalid rate window "${s}" \u2014 use second, minute, or hour.`,void 0,{code:"INVALID_RATE_WINDOW"});n.limits=[{dimension:"requests",window:{type:"named",name:s},capacity:i,enforcement:"enforce"}]}return typeof e.recurringFeeCents=="number"&&(n.recurring_fee_cents=e.recurringFeeCents),r&&(n.grants=r),typeof e.trialDays=="number"&&(n.trial_days=e.trialDays),typeof e.maxMonthlySpendCents=="number"&&(n.max_monthly_spend_cents=e.maxMonthlySpendCents),n}function RS(e){let t=e.indexOf(":"),r=t===-1?e:e.slice(0,t),o=t===-1?"":e.slice(t+1);if(!/^[a-z0-9_]+$/.test(r))throw new k(`Invalid meter dimension in "--meter ${e}" \u2014 dimensions are lowercase letters, digits, and underscores (e.g. requests, input_tokens).`,void 0,{code:"INVALID_PLAN_METER_SPEC"});if(!/^\d+$/.test(o.trim()))throw new k(`Invalid price in "--meter ${e}" \u2014 expected <dimension>:<price_per_unit_micros> with a non-negative integer price (e.g. requests:1000).`,void 0,{code:"INVALID_PLAN_METER_SPEC"});return{dimension:r,price_per_unit_micros:Number.parseInt(o.trim(),10),kind:"linear"}}function Gh(e){let t=e??[];if(t.length===0)return;let r=t.map(RS);if(new Set(r.map(n=>n.dimension)).size!==r.length)throw new k("Duplicate meter dimensions in --meter flags.",void 0,{code:"INVALID_PLAN_METER_SPEC"});return r}function DS(e){let t=e.indexOf(":"),r=t===-1?e:e.slice(0,t),o=t===-1?"":e.slice(t+1);if(r!=="recurring"&&r!=="one_time")throw new k(`Invalid grant kind in "--grant ${e}" \u2014 use recurring:<amount_cents> or one_time:<amount_cents>.`,void 0,{code:"INVALID_PLAN_GRANT_SPEC"});if(!/^\d+$/.test(o.trim()))throw new k(`Invalid grant amount in "--grant ${e}" \u2014 expected ${r}:<amount_cents> with a non-negative integer amount.`,void 0,{code:"INVALID_PLAN_GRANT_SPEC"});let n=Number.parseInt(o.trim(),10);return{grant:r==="recurring"?{kind:"credit",amount_cents:n,recurs:!0}:{kind:"credit",amount_cents:n},flavour:r}}function Kh(e){let t=e??[];if(t.length===0)return;let r=t.map(DS),o=r.map(n=>n.flavour);if(new Set(o).size!==o.length)throw new k("Duplicate canonical grant kinds in --grant flags.",void 0,{code:"INVALID_PLAN_GRANT_SPEC"});return r.map(n=>n.grant)}function zS(e){if(!e||typeof e!="object")return[];let t=e;return Array.isArray(t.data)?t.data:Array.isArray(t.plans)?t.plans:Array.isArray(e)?e:[]}function US(e){if(e.length===0)return"(no plans)";let t=["KEY","NAME","FREE","FEE\xA2","RECURRING\xA2","ONE_TIME\xA2","TRIAL_D","MAX_SPEND\xA2","STATUS"],r=c=>c===null?"\u2014":c.toLocaleString("en-US"),o=e.map(c=>[c.key,c.name,c.free?"Y":"N",r(c.recurring_fee_cents),r(c.recurring_grant_cents),r(c.one_time_grant_cents),r(c.trial_days),r(c.max_monthly_spend_cents),c.status]),n=t.map((c,u)=>Math.max(c.length,...o.map(l=>l[u]?.length??0))),i=c=>c.map((u,l)=>u.padEnd(n[l]??u.length)).join(" "),s=n.map(c=>"-".repeat(c)).join(" ");return[i(t),s,...o.map(i)].join(`
101
+ `)}var jS=[{opKey:"plan.read",operationClass:"contract",scope:["products:read"],sideEffect:"read",cli:{group:"plan",command:"list",summary:"List plans for a product",args:[{field:"productId",kind:"positional",token:"<productIdOrName>",resolveProduct:!0}],helpTextAfter:`
102
102
  Output:
103
103
  --format json \u2014 stable agent-friendly JSON envelope (default for non-TTY)
104
104
  --format table \u2014 human-readable summary table (default for TTY)
105
- `,handler:async({client:e,args:t,emit:r})=>{let o=t.productId,i=xS(await e.managementListPlans(o)).map(s=>({id:s.id,key:s.planKey??s.key??"",name:s.name??"",version:s.version??null,free:s.free??!1,recurring_fee_cents:s.recurring_fee_cents??0,grants:s.grants??[],recurring_grant_cents:Cn({grants:s.grants}),one_time_grant_cents:zt({grants:s.grants}),trial_days:s.trial_days??0,max_monthly_spend_cents:s.max_monthly_spend_cents??null,status:s.status??(s.isActive===!1?"INACTIVE":"ACTIVE")}));r({productId:o,count:i.length,plans:i},`${i.length} plan(s) for product ${o}`),ke()!=="json"&&console.log(kS(i))}},mcp:{tool:"fs_plan_list",title:"List plans",description:"List a product's pricing plans (read-only). Plans are managed as code in the product's GitHub repo \u2014 to add/change/remove a plan, edit the manifest (product/) and push; this tool only reads the current state. Pass the product id (from fs_product_list).",annotations:{readOnlyHint:!0,openWorldHint:!1},inputSchema:{productId:a.string().describe("The product id whose plans to list.")},handler:async(e,{productId:t})=>e.managementListPlans(t)}},{opKey:"plan.create",operationClass:"contract",scope:["products:update"],sideEffect:"write",cli:{group:"plan",command:"create",summary:"Create a plan on a product (canonical plan spec)",idempotent:!0,args:[{field:"productId",kind:"positional",token:"<productIdOrName>",resolveProduct:!0},{field:"key",kind:"flag",token:"--key <key>",describe:"Stable plan key (e.g. starter, pro)",required:!0},{field:"name",kind:"flag",token:"--name <name>",describe:"Human-friendly plan name",required:!0},{field:"free",kind:"flag",token:"--free",describe:"Mark this as the free plan (requires hard-enforced limits)"},{field:"recurringFeeCents",kind:"flag",token:"--recurring-fee-cents <cents>",describe:"Flat subscription fee per period, in cents",parser:e=>parseInt(e,10)},{field:"grant",kind:"flag",token:"--grant <kind:amount_cents>",describe:"Canonical credit grant, repeatable. Supported: recurring:2000, one_time:10000.",parser:(e,t)=>[...t,e],defaultValue:[]},{field:"trialDays",kind:"flag",token:"--trial-days <days>",describe:"Free-trial length in days",parser:e=>parseInt(e,10)},{field:"maxMonthlySpendCents",kind:"flag",token:"--max-monthly-spend-cents <cents>",describe:"Optional hard cap on monthly spend, in cents",parser:e=>parseInt(e,10)},{field:"rateLimit",kind:"flag",token:"--rate-limit <maxPerWindow>",describe:"Burst-protection rate limit on requests (default: 600). Publishing requires every plan to carry one \u2014 pass --no-rate-limit only for drafts.",parser:e=>parseInt(e,10)},{field:"rateLimit",kind:"flag",token:"--no-rate-limit",describe:"Create the plan without a burst rate limit"},{field:"rateWindow",kind:"flag",token:"--rate-window <window>",describe:"Rate limit window: second | minute | hour (default: minute)"},{field:"meter",kind:"flag",token:"--meter <dimension:price_per_unit_micros>",describe:"Usage meter for PAY_AS_YOU_GO / INCLUDED_USAGE plans, repeatable (e.g. --meter requests:1000). Counts as revenue for the no-revenue check.",parser:(e,t)=>[...t,e],defaultValue:[]},{field:"env",kind:"flag",token:"--env <env>",describe:"Environment scope"}],handler:async({client:e,args:t,reqOpts:r,emit:o,emitDryRunPreview:n})=>{let i=t.productId,s=Uh(t.meter),c=jh(t.grant),u=zh({key:t.key,name:t.name,free:t.free,recurringFeeCents:t.recurringFeeCents,grants:c,trialDays:t.trialDays,maxMonthlySpendCents:t.maxMonthlySpendCents,rateLimit:t.rateLimit,rateWindow:t.rateWindow,meters:s}),l=await e.createPlan(i,u,{env:t.env},r);n(l)||o({productId:i,plan:l},`Plan ${t.key} created`)}},mcp:null},{opKey:"plan.update",operationClass:"contract",scope:["products:update"],sideEffect:"write",cli:{group:"plan",command:"update",summary:"Update a plan (canonical plan spec)",args:[{field:"productId",kind:"positional",token:"<productIdOrName>",resolveProduct:!0},{field:"planId",kind:"positional",token:"<planId>"},{field:"name",kind:"flag",token:"--name <name>",describe:"Human-friendly plan name"},{field:"recurringFeeCents",kind:"flag",token:"--recurring-fee-cents <cents>",describe:"Flat subscription fee per period, in cents",parser:e=>parseInt(e,10)},{field:"grant",kind:"flag",token:"--grant <kind:amount_cents>",describe:"Canonical credit grant, repeatable. Supported: recurring:2000, one_time:10000. Replaces the plan's grants[].",parser:(e,t)=>[...t,e],defaultValue:[]},{field:"trialDays",kind:"flag",token:"--trial-days <days>",describe:"Free-trial length in days",parser:e=>parseInt(e,10)},{field:"maxMonthlySpendCents",kind:"flag",token:"--max-monthly-spend-cents <cents>",describe:"Optional hard cap on monthly spend, in cents",parser:e=>parseInt(e,10)},{field:"meter",kind:"flag",token:"--meter <dimension:price_per_unit_micros>",describe:"Usage meter for PAY_AS_YOU_GO / INCLUDED_USAGE plans, repeatable (e.g. --meter requests:1000). Replaces the plan's meters[].",parser:(e,t)=>[...t,e],defaultValue:[]},{field:"env",kind:"flag",token:"--env <env>",describe:"Environment scope"}],handler:async({client:e,args:t,emit:r})=>{let o=t.productId,n=t.planId,i={};t.name!==void 0&&(i.name=t.name),typeof t.recurringFeeCents=="number"&&(i.recurring_fee_cents=t.recurringFeeCents);let s=jh(t.grant);s&&(i.grants=s);let c=Uh(t.meter);if(c&&(i.meters=c),typeof t.trialDays=="number"&&(i.trial_days=t.trialDays),typeof t.maxMonthlySpendCents=="number"&&(i.max_monthly_spend_cents=t.maxMonthlySpendCents),Object.keys(i).length===0)throw new k("No fields to update. Pass --name, --recurring-fee-cents, --grant, --trial-days, --max-monthly-spend-cents, or --meter.",void 0,{code:"PLAN_UPDATE_NO_FIELDS"});let u=await e.updatePlan(o,n,i,{env:t.env});r({productId:o,plan:u},`Plan ${n} updated`)}},mcp:null},{opKey:"plan.delete",operationClass:"contract",scope:["products:update"],sideEffect:"write",cli:{group:"plan",command:"delete",summary:"Delete a plan. Requires --yes.",destructive:!0,yesMessage:"Pass --yes to confirm plan deletion.",args:[{field:"productId",kind:"positional",token:"<productIdOrName>",resolveProduct:!0},{field:"planId",kind:"positional",token:"<planId>"},{field:"env",kind:"flag",token:"--env <env>",describe:"Environment scope"}],handler:async({client:e,args:t,emit:r})=>{let o=t.productId,n=t.planId;await e.deletePlan(o,n,{env:t.env}),r({productId:o,deleted:n},`Plan ${n} deleted`)}},mcp:null}];function Lh(e,t){ee(e,t,SS)}var $S=[{opKey:"persona.bootstrap",operationClass:"operate",scope:["products:read"],sideEffect:"write",cli:{group:"persona",command:"bootstrap",summary:"Issue a fresh fsk_test_ API key in a test environment",args:[{field:"productId",kind:"positional",token:"<productIdOrName>",resolveProduct:!0},{field:"env",kind:"flag",token:"--env <env>",describe:"Environment name (must be test-strategy)",required:!0},{field:"plan",kind:"flag",token:"--plan <planKey>",describe:"Plan key to assign (e.g. starter)"},{field:"displayName",kind:"flag",token:"--display-name <name>",describe:"Persona display name"}],handler:async({client:e,args:t,emit:r})=>{let o=t.productId,n=await Hl(e,o,t.env),i=await e.issuePersonaBootstrapKey(o,n,{planKey:t.plan,displayName:t.displayName});r({productId:o,environmentId:n,result:i},"Persona bootstrapped")}},mcp:{tool:"fs_persona_bootstrap",title:"Bootstrap a test persona",description:"Issue a one-time test bootstrap key for a product environment \u2014 use it to provision a test persona. Returns the key ONCE; store it now.",returnsOneTimeSecret:!0,annotations:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1,openWorldHint:!1},inputSchema:{productId:a.string().describe("The product id."),environmentId:a.string().describe("The environment id to scope the persona to.")},handler:async(e,{productId:t,environmentId:r})=>e.issuePersonaBootstrapKey(t,r)}},{opKey:"persona.read",operationClass:"operate",scope:["products:read"],sideEffect:"read",cli:{group:"persona",command:"list",summary:"List personas for a test environment",args:[{field:"productId",kind:"positional",token:"<productIdOrName>",resolveProduct:!0},{field:"env",kind:"flag",token:"--env <env>",describe:"Environment name",required:!0}],handler:async({client:e,args:t,emit:r})=>{let o=t.productId,n=await Hl(e,o,t.env),i=await e.listPersonas(o,n);r({productId:o,environmentId:n,result:i},"Personas")}},mcp:{tool:"fs_persona_list",title:"List personas",description:"List a product environment's test personas (id, label, status). Read-only.",annotations:{readOnlyHint:!0,openWorldHint:!1},inputSchema:{productId:a.string().describe("The product id."),environmentId:a.string().describe("The environment id whose personas to list.")},handler:async(e,{productId:t,environmentId:r})=>e.listPersonas(t,r)}},{opKey:"persona.revoke",operationClass:"operate",scope:["products:update"],sideEffect:"write",cli:{group:"persona",command:"revoke",summary:"Revoke a persona's API key",args:[{field:"productId",kind:"positional",token:"<productIdOrName>",resolveProduct:!0},{field:"personaId",kind:"positional",token:"<personaId>"},{field:"env",kind:"flag",token:"--env <env>",describe:"Environment name",required:!0}],handler:async({client:e,args:t,emit:r})=>{let o=t.productId,n=t.personaId,i=await Hl(e,o,t.env),s=await e.revokePersona(o,i,n);r({productId:o,environmentId:i,result:s},`Persona ${n} revoked`)}},mcp:{tool:"fs_persona_revoke",title:"Revoke a persona",description:"Revoke a test persona. Its credentials stop working.",annotations:{readOnlyHint:!1,destructiveHint:!0,idempotentHint:!0,openWorldHint:!1},inputSchema:{productId:a.string().describe("The product id."),environmentId:a.string().describe("The environment id."),personaId:a.string().describe("The persona id to revoke.")},handler:async(e,{productId:t,environmentId:r,personaId:o})=>e.revokePersona(t,r,o)}}];function Mh(e,t){ee(e,t,$S)}async function Hl(e,t,r){try{return await Ui(e,t,r)}catch(o){throw new k(o instanceof Error?o.message:`Environment "${r}" not found on product ${t}.`,void 0,{code:"ENV_NOT_FOUND"})}}var IS=[{opKey:"usage.read",operationClass:"operate",scope:["products:read"],sideEffect:"read",cli:{group:"usage",command:"summary",summary:"Show usage summary for the last 30 days",args:[{field:"productId",kind:"positional",token:"<productIdOrName>",resolveProduct:!0}],handler:async({client:e,args:t,emit:r})=>{let o=t.productId,n=await e.managementGetUsage(o);r({productId:o,summary:n},"Usage summary")}},mcp:{tool:"fs_usage_read",title:"Read usage summary",description:"Read a product's usage summary \u2014 metered request counts and tier utilization. Read-only.",annotations:{readOnlyHint:!0,openWorldHint:!1},inputSchema:{productId:a.string().describe("The product id whose usage to read.")},handler:async(e,{productId:t})=>e.managementGetUsage(t)}}];function Fh(e,t){ee(e,t,IS)}function Zh(e,t){let r=e.command("connect").description("Connection status for GitHub and Stripe (browser-only flows)");r.command("github").description("Print GitHub-connection status").action(async()=>{let n=await t().builderGitHubStatus();H({status:n},"GitHub status")}),r.command("stripe <productIdOrName>").description("Print Stripe Connect status for a product").action(async o=>{let n=t(),i=await zi(n,o),s=await n.productStripeStatus(i);H({productId:i,status:s},"Stripe status")})}function ES(e){if(!e||typeof e!="object")return[];let t=e;return Array.isArray(t.data)?t.data:Array.isArray(t.tokens)?t.tokens:Array.isArray(e)?e:[]}var wS=[{opKey:"maker_token.read",operationClass:"operate",scope:[],sideEffect:"read",cli:{group:"token",command:"list",summary:"List maker tokens in the current org",args:[],handler:async({client:e,emit:t})=>{let r=ES(await e.managementListMakerTokens());t({count:r.length,tokens:r.map(o=>({id:o.id,name:o.name??null,scopes:o.scopes??[],productId:o.productId??null,lastFour:o.lastFour??null,createdAt:o.createdAt??null,revokedAt:o.revokedAt??null}))},`${r.length} token(s)`)}},mcp:{tool:"fs_maker_token_list",title:"List maker tokens",description:"List the workspace's maker tokens (mk_) \u2014 id, label, scopes, last-four, status. Read-only; secrets are never shown. Creating/revoking maker tokens is intentionally not exposed via MCP.",annotations:{readOnlyHint:!0,openWorldHint:!1},inputSchema:{},handler:async e=>e.managementListMakerTokens()}},{opKey:"maker_token.create",operationClass:"operate",scope:["products:update"],sideEffect:"write",cli:{group:"token",command:"create",summary:"Create a new maker token (returns the secret once)",args:[{field:"name",kind:"flag",token:"--name <name>",describe:"Human-friendly token name",required:!0},{field:"scope",kind:"flag",token:"--scope <scope...>",describe:"Scope(s) to attach (e.g. products:update products:publish)"},{field:"product",kind:"flag",token:"--product <productId>",describe:"Scope to a specific product"}],handler:async({client:e,args:t,emit:r})=>{let o=await e.managementCreateMakerToken({name:t.name,scopes:t.scope,productId:t.product});r({result:o},"Token created")}},mcp:null},{opKey:"maker_token.revoke",operationClass:"operate",scope:["products:update"],sideEffect:"write",cli:{group:"token",command:"revoke",summary:"Revoke a maker token. Requires --yes.",destructive:!0,yesMessage:"Pass --yes to confirm token revocation.",args:[{field:"tokenId",kind:"positional",token:"<tokenId>"}],handler:async({client:e,args:t,emit:r})=>{let o=t.tokenId;await e.managementRevokeMakerToken(o),r({revoked:o},`Token ${o} revoked`)}},mcp:null}];function Vh(e,t){ee(e,t,wS)}var Gl=["gateway_verification","metering","health","tunnel"],OS="<productId>",Un="products:update",jn="The product id.",Qe={field:"productId",kind:"positional",token:OS};function Bh(e){if(!e||typeof e!="object")return[];let t=e;return Array.isArray(t.data)?t.data:Array.isArray(t.backends)?t.backends:Array.isArray(t.tokens)?t.tokens:Array.isArray(e)?e:[]}async function Hh(e,t,r){if(!r)return null;try{return await Ui(e,t,r)}catch(o){throw new k(o instanceof Error?o.message:`Environment "${r}" not found on product ${t}.`,void 0,{code:"ENV_NOT_FOUND"})}}var Kl=e=>typeof e=="string"&&e.length>0?e.split(",").map(t=>t.trim()).filter(t=>t.length>0):void 0,TS=[{opKey:"backend.read",operationClass:"operate",scope:["products:read"],sideEffect:"read",cli:{group:"backend",command:"list",summary:"List backends for a product",args:[Qe],handler:async({client:e,args:t,emit:r})=>{let o=Bh(await e.builderListBackends(t.productId));r({count:o.length,backends:o},`${o.length} backend(s)`)}},mcp:{tool:"fs_backend_list",title:"List backends",description:"List a product's backends (origins) \u2014 id, name, slug, transport mode, default flag. Read-only.",annotations:{readOnlyHint:!0,openWorldHint:!1},inputSchema:{productId:a.string().describe("The product id whose backends to list.")},handler:async(e,{productId:t})=>e.builderListBackends(t)}},{opKey:"backend.create",operationClass:"operate",scope:[Un],sideEffect:"write",cli:{group:"backend",command:"create",summary:"Create a backend (default transport: public_origin)",idempotent:!0,args:[Qe,{field:"name",kind:"flag",token:"--name <name>",describe:"Human-friendly backend name",required:!0},{field:"slug",kind:"flag",token:"--slug <slug>",describe:"Stable slug (defaults to a slugified name)"},{field:"env",kind:"flag",token:"--env <environment>",describe:"Scope backend to an environment name or id"},{field:"transport",kind:"flag",token:"--transport <mode>",describe:"Transport mode: public_origin | mtls | cloudflare_tunnel",defaultValue:"public_origin"},{field:"runner",kind:"flag",token:"--runner <runner>",describe:"managed_cloudflared | sidecar"},{field:"runtime",kind:"flag",token:"--runtime <runtime>",describe:"Container/runtime descriptor"},{field:"originUrl",kind:"flag",token:"--origin-url <url>",describe:"Builder origin URL (public_origin/mtls)"},{field:"default",kind:"flag",token:"--default",describe:"Mark this backend the product default"}],handler:async({client:e,args:t,reqOpts:r,emit:o,emitDryRunPreview:n})=>{let i=t.productId,s=await Hh(e,i,t.env),c=t.transport==="mtls"||t.transport==="cloudflare_tunnel"?t.transport:"public_origin",u=await e.builderCreateBackend(i,{name:t.name,slug:t.slug,environmentId:s,transportMode:c,runner:t.runner==="managed_cloudflared"||t.runner==="sidecar"?t.runner:null,runtime:t.runtime??null,originUrl:t.originUrl??null,isDefault:t.default},r);n(u)||o({result:u},"Backend created")}},mcp:{tool:"fs_backend_create",title:"Create a backend",description:"Create a backend (origin) for a product. Pick a transport mode: public_origin (plain HTTPS), mtls (mutual TLS), or cloudflare_tunnel (secure bring-your-own-backend). Mark it default to route traffic to it.",annotations:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1,openWorldHint:!1},inputSchema:{productId:a.string().describe("The product id to create the backend in."),name:a.string().describe("Backend name (e.g. 'prod-origin')."),slug:a.string().optional().describe("URL-safe slug; derived from name if omitted."),transportMode:a.enum(["public_origin","mtls","cloudflare_tunnel"]).optional().describe("How the gateway reaches the origin; defaults to public_origin."),originUrl:a.string().optional().describe("The origin URL (for public_origin / mtls modes)."),isDefault:a.boolean().optional().describe("Route traffic to this backend by default."),...Le},handler:async(e,t)=>e.builderCreateBackend(t.productId,{name:t.name,slug:t.slug,transportMode:t.transportMode,originUrl:t.originUrl,isDefault:t.isDefault},{idempotencyKey:t.idempotencyKey})}},{opKey:"backend.delete",operationClass:"operate",scope:[Un],sideEffect:"write",cli:{group:"backend",command:"delete",summary:"Delete a backend (revokes its runtime tokens). Requires --yes.",destructive:!0,yesMessage:"Pass --yes to confirm backend deletion.",args:[Qe,{field:"backendId",kind:"positional",token:"<backendId>"}],handler:async({client:e,args:t,emit:r})=>{let o=t.productId,n=t.backendId;await e.builderDeleteBackend(o,n),r({productId:o,deleted:n},`Backend ${n} deleted`)}},mcp:{tool:"fs_backend_delete",title:"Delete a backend",description:"Delete a backend (origin). Traffic routed to it stops; re-create to restore.",annotations:{readOnlyHint:!1,destructiveHint:!0,idempotentHint:!0,openWorldHint:!1},inputSchema:{productId:a.string().describe(jn),backendId:a.string().describe("The backend id to delete.")},handler:async(e,{productId:t,backendId:r})=>e.builderDeleteBackend(t,r)}},{opKey:"runtime_token.read",operationClass:"operate",scope:["products:read"],sideEffect:"read",cli:{group:"backend tokens",command:"list",summary:"List runtime tokens for a product",args:[Qe],handler:async({client:e,args:t,emit:r})=>{let o=Bh(await e.builderListRuntimeTokens(t.productId));r({count:o.length,tokens:o},`${o.length} runtime token(s)`)}},mcp:{tool:"fs_runtime_token_list",title:"List runtime tokens",description:"List a product's runtime tokens (fsrt_) \u2014 id, last-four, capabilities, status. Read-only; secrets are never shown.",annotations:{readOnlyHint:!0,openWorldHint:!1},inputSchema:{productId:a.string().describe(jn)},handler:async(e,{productId:t})=>e.builderListRuntimeTokens(t)}},{opKey:"runtime_token.mint",operationClass:"operate",scope:[Un],sideEffect:"write",cli:{group:"backend tokens",command:"create",summary:"Create a runtime token (returns FS_RUNTIME_TOKEN once)",idempotent:!0,args:[Qe,{field:"env",kind:"flag",token:"--env <environment>",describe:"Scope token to an environment name or id"},{field:"backend",kind:"flag",token:"--backend <backendId>",describe:"Bind token to a specific backend"},{field:"kind",kind:"flag",token:"--kind <kind>",describe:"live | test (defaults from env scope)"},{field:"capabilities",kind:"flag",token:"--capabilities <list>",describe:`Comma-separated capabilities: ${Gl.join(" | ")}. Default: core's DEFAULT_CAPABILITIES. Use tunnel for cloudflare_tunnel backends.`},{field:"meters",kind:"flag",token:"--meters <list>",describe:"Comma-separated allowed meters (default: all product meters)"},{field:"routes",kind:"flag",token:"--routes <list>",describe:"Comma-separated allowed routes"}],handler:async({client:e,args:t,reqOpts:r,emit:o,emitDryRunPreview:n})=>{let i=t.productId,s=await Hh(e,i,t.env),c=t.kind==="test"||t.kind==="live"?t.kind:void 0,u=Kl(t.capabilities);if(u){for(let d of u)if(!Gl.includes(d))throw new k(`Unknown capability "${d}". Available: ${Gl.join(", ")}.`,void 0,{code:"UNKNOWN_RUNTIME_TOKEN_CAPABILITY"})}let l=await e.builderCreateRuntimeToken(i,{environmentId:s,backendId:t.backend??null,kind:c,capabilities:u,allowedMeters:Kl(t.meters),allowedRoutes:Kl(t.routes)},r);n(l)||o({envVar:"FS_RUNTIME_TOKEN",result:l},"Runtime token created")}},mcp:{tool:"fs_runtime_token_mint",title:"Mint a runtime token",description:"Mint a new runtime token (fsrt_) for a backend. Returns the plaintext token ONCE \u2014 store it now (e.g. as FS_RUNTIME_TOKEN). Capabilities default to the backend's needs (gateway_verification, metering, health).",returnsOneTimeSecret:!0,annotations:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1,openWorldHint:!1},inputSchema:{productId:a.string().describe(jn),backendId:a.string().optional().describe("Bind the token to this backend."),environmentId:a.string().optional().describe("Scope to a preview environment (omit for production)."),kind:a.enum(["live","test"]).optional().describe("Token kind; defaults from the env scope."),capabilities:a.array(a.string()).optional().describe("Capabilities (gateway_verification, metering, health, tunnel)."),...Le},handler:async(e,t)=>e.builderCreateRuntimeToken(t.productId,{backendId:t.backendId??null,environmentId:t.environmentId??null,kind:t.kind,capabilities:t.capabilities},{idempotencyKey:t.idempotencyKey})}},{opKey:"runtime_token.rotate",operationClass:"operate",scope:[Un],sideEffect:"write",cli:{group:"backend tokens",command:"rotate",summary:"Rotate a runtime token (returns a fresh FS_RUNTIME_TOKEN once)",args:[Qe,{field:"tokenId",kind:"positional",token:"<tokenId>"}],handler:async({client:e,args:t,emit:r})=>{let o=t.productId,n=t.tokenId,i=await e.builderRotateRuntimeToken(o,n);r({envVar:"FS_RUNTIME_TOKEN",result:i},`Runtime token ${n} rotated`)}},mcp:{tool:"fs_runtime_token_rotate",title:"Rotate a runtime token",description:"Rotate a runtime token: mint a fresh secret carrying the same scope and revoke the old one. Returns the new plaintext token ONCE.",returnsOneTimeSecret:!0,annotations:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1,openWorldHint:!1},inputSchema:{productId:a.string().describe(jn),tokenId:a.string().describe("The runtime token id to rotate."),...Le},handler:async(e,t)=>e.builderRotateRuntimeToken(t.productId,t.tokenId,{idempotencyKey:t.idempotencyKey})}},{opKey:"runtime_token.revoke",operationClass:"operate",scope:[Un],sideEffect:"write",cli:{group:"backend tokens",command:"revoke",summary:"Revoke a runtime token. Requires --yes.",destructive:!0,yesMessage:"Pass --yes to confirm runtime token revocation.",args:[Qe,{field:"tokenId",kind:"positional",token:"<tokenId>"}],handler:async({client:e,args:t,emit:r})=>{let o=t.productId,n=t.tokenId;await e.builderRevokeRuntimeToken(o,n),r({productId:o,revoked:n},`Runtime token ${n} revoked`)}},mcp:{tool:"fs_runtime_token_revoke",title:"Revoke a runtime token",description:"Revoke a runtime token. The backend using it stops verifying.",annotations:{readOnlyHint:!1,destructiveHint:!0,idempotentHint:!0,openWorldHint:!1},inputSchema:{productId:a.string().describe(jn),tokenId:a.string().describe("The runtime token id to revoke.")},handler:async(e,{productId:t,tokenId:r})=>e.builderRevokeRuntimeToken(t,r)}}];function Gh(e,t){ee(e,t,TS)}import{existsSync as Kh,mkdirSync as PS,writeFileSync as AS}from"node:fs";import{basename as NS,dirname as Wl,join as CS,resolve as RS}from"node:path";import{createInterface as DS}from"node:readline/promises";import{stdin as Wh,stdout as qh}from"node:process";var Li="product/product.config.ts",zS="^0.5.0",US="^0.1.16";function Jl(e){let t=new Set;for(let c of e.pricing.meters??[])typeof c.dimension=="string"&&t.add(c.dimension);let r=new Set,o={key:e.kind,name:e.label.split(" \u2014 ")[0]??e.label,description:e.description,...e.pricing},n=[{dimension:"requests",window:{type:"named",name:"minute"},capacity:600,enforcement:"enforce"}];r.add("requests"),e.kind==="free"&&(o.free=!0,n.push({dimension:"requests",window:{type:"named",name:"month"},capacity:1e3,enforcement:"enforce"})),o.limits=n;let i={product:{name:"my-product",displayName:"My Product",baseUrl:"https://app.example.com"},gateway:{},plans:[o]},s=new Set([...t,...r]);return s.size>0&&(i.metering={meters:[...s].map(c=>({key:c,display:Yh(c)}))}),i}function jS(e){if(!e)throw new k(`--template is required. Choose one of: ${me.join(", ")}.`,void 0,{code:"INIT_TEMPLATE_REQUIRED"});let t=e.toLowerCase();if(!me.includes(t))throw new k(`Unknown template "${e}". Choose one of: ${me.join(", ")}.`,void 0,{code:"INIT_TEMPLATE_UNKNOWN"});return t}function Jh(e){let t=Jl(e);return`import { fs } from "@farthershore/product";
106
- import { configureFeatures } from "./features.js";
107
- import { configureMeters } from "./meters.js";
108
- import { configurePlans } from "./plans.js";
109
-
110
- const product = fs.product(${Me(t.product.name)}, {
111
- origin: ${Me(t.product.baseUrl)},
112
- displayName: ${Me(t.product.displayName)},
113
- });
114
-
115
- product.use(configureMeters, configureFeatures, configurePlans);
105
+ `,handler:async({client:e,args:t,emit:r})=>{let o=t.productId,i=zS(await e.managementListPlans(o)).map(s=>({id:s.id,key:s.planKey??s.key??"",name:s.name??"",version:s.version??null,free:s.free??!1,recurring_fee_cents:s.recurring_fee_cents??0,grants:s.grants??[],recurring_grant_cents:Dn({grants:s.grants}),one_time_grant_cents:Ft({grants:s.grants}),trial_days:s.trial_days??0,max_monthly_spend_cents:s.max_monthly_spend_cents??null,status:s.status??(s.isActive===!1?"INACTIVE":"ACTIVE")}));r({productId:o,count:i.length,plans:i},`${i.length} plan(s) for product ${o}`),le()!=="json"&&console.log(US(i))}},mcp:{tool:"fs_plan_list",title:"List plans",description:"List a product's pricing plans (read-only). Plans are managed as code in the product's GitHub repo \u2014 to add/change/remove a plan, edit the manifest (product/) and push; this tool only reads the current state. Pass the product id (from fs_product_list).",annotations:{readOnlyHint:!0,openWorldHint:!1},inputSchema:{productId:a.string().describe("The product id whose plans to list.")},handler:async(e,{productId:t})=>e.managementListPlans(t)}},{opKey:"plan.create",operationClass:"contract",scope:["products:update"],sideEffect:"write",cli:{group:"plan",command:"create",summary:"Create a plan on a product (canonical plan spec)",idempotent:!0,args:[{field:"productId",kind:"positional",token:"<productIdOrName>",resolveProduct:!0},{field:"key",kind:"flag",token:"--key <key>",describe:"Stable plan key (e.g. starter, pro)",required:!0},{field:"name",kind:"flag",token:"--name <name>",describe:"Human-friendly plan name",required:!0},{field:"free",kind:"flag",token:"--free",describe:"Mark this as the free plan (requires hard-enforced limits)"},{field:"recurringFeeCents",kind:"flag",token:"--recurring-fee-cents <cents>",describe:"Flat subscription fee per period, in cents",parser:e=>parseInt(e,10)},{field:"grant",kind:"flag",token:"--grant <kind:amount_cents>",describe:"Canonical credit grant, repeatable. Supported: recurring:2000, one_time:10000.",parser:(e,t)=>[...t,e],defaultValue:[]},{field:"trialDays",kind:"flag",token:"--trial-days <days>",describe:"Free-trial length in days",parser:e=>parseInt(e,10)},{field:"maxMonthlySpendCents",kind:"flag",token:"--max-monthly-spend-cents <cents>",describe:"Optional hard cap on monthly spend, in cents",parser:e=>parseInt(e,10)},{field:"rateLimit",kind:"flag",token:"--rate-limit <maxPerWindow>",describe:"Burst-protection rate limit on requests (default: 600). Publishing requires every plan to carry one \u2014 pass --no-rate-limit only for drafts.",parser:e=>parseInt(e,10)},{field:"rateLimit",kind:"flag",token:"--no-rate-limit",describe:"Create the plan without a burst rate limit"},{field:"rateWindow",kind:"flag",token:"--rate-window <window>",describe:"Rate limit window: second | minute | hour (default: minute)"},{field:"meter",kind:"flag",token:"--meter <dimension:price_per_unit_micros>",describe:"Usage meter for PAY_AS_YOU_GO / INCLUDED_USAGE plans, repeatable (e.g. --meter requests:1000). Counts as revenue for the no-revenue check.",parser:(e,t)=>[...t,e],defaultValue:[]},{field:"env",kind:"flag",token:"--env <env>",describe:"Environment scope"}],handler:async({client:e,args:t,reqOpts:r,emit:o,emitDryRunPreview:n})=>{let i=t.productId,s=Gh(t.meter),c=Kh(t.grant),u=Hh({key:t.key,name:t.name,free:t.free,recurringFeeCents:t.recurringFeeCents,grants:c,trialDays:t.trialDays,maxMonthlySpendCents:t.maxMonthlySpendCents,rateLimit:t.rateLimit,rateWindow:t.rateWindow,meters:s}),l=await e.createPlan(i,u,{env:t.env},r);n(l)||o({productId:i,plan:l},`Plan ${t.key} created`)}},mcp:null},{opKey:"plan.update",operationClass:"contract",scope:["products:update"],sideEffect:"write",cli:{group:"plan",command:"update",summary:"Update a plan (canonical plan spec)",args:[{field:"productId",kind:"positional",token:"<productIdOrName>",resolveProduct:!0},{field:"planId",kind:"positional",token:"<planId>"},{field:"name",kind:"flag",token:"--name <name>",describe:"Human-friendly plan name"},{field:"recurringFeeCents",kind:"flag",token:"--recurring-fee-cents <cents>",describe:"Flat subscription fee per period, in cents",parser:e=>parseInt(e,10)},{field:"grant",kind:"flag",token:"--grant <kind:amount_cents>",describe:"Canonical credit grant, repeatable. Supported: recurring:2000, one_time:10000. Replaces the plan's grants[].",parser:(e,t)=>[...t,e],defaultValue:[]},{field:"trialDays",kind:"flag",token:"--trial-days <days>",describe:"Free-trial length in days",parser:e=>parseInt(e,10)},{field:"maxMonthlySpendCents",kind:"flag",token:"--max-monthly-spend-cents <cents>",describe:"Optional hard cap on monthly spend, in cents",parser:e=>parseInt(e,10)},{field:"meter",kind:"flag",token:"--meter <dimension:price_per_unit_micros>",describe:"Usage meter for PAY_AS_YOU_GO / INCLUDED_USAGE plans, repeatable (e.g. --meter requests:1000). Replaces the plan's meters[].",parser:(e,t)=>[...t,e],defaultValue:[]},{field:"env",kind:"flag",token:"--env <env>",describe:"Environment scope"}],handler:async({client:e,args:t,emit:r})=>{let o=t.productId,n=t.planId,i={};t.name!==void 0&&(i.name=t.name),typeof t.recurringFeeCents=="number"&&(i.recurring_fee_cents=t.recurringFeeCents);let s=Kh(t.grant);s&&(i.grants=s);let c=Gh(t.meter);if(c&&(i.meters=c),typeof t.trialDays=="number"&&(i.trial_days=t.trialDays),typeof t.maxMonthlySpendCents=="number"&&(i.max_monthly_spend_cents=t.maxMonthlySpendCents),Object.keys(i).length===0)throw new k("No fields to update. Pass --name, --recurring-fee-cents, --grant, --trial-days, --max-monthly-spend-cents, or --meter.",void 0,{code:"PLAN_UPDATE_NO_FIELDS"});let u=await e.updatePlan(o,n,i,{env:t.env});r({productId:o,plan:u},`Plan ${n} updated`)}},mcp:null},{opKey:"plan.delete",operationClass:"contract",scope:["products:update"],sideEffect:"write",cli:{group:"plan",command:"delete",summary:"Delete a plan. Requires --yes.",destructive:!0,yesMessage:"Pass --yes to confirm plan deletion.",args:[{field:"productId",kind:"positional",token:"<productIdOrName>",resolveProduct:!0},{field:"planId",kind:"positional",token:"<planId>"},{field:"env",kind:"flag",token:"--env <env>",describe:"Environment scope"}],handler:async({client:e,args:t,emit:r})=>{let o=t.productId,n=t.planId;await e.deletePlan(o,n,{env:t.env}),r({productId:o,deleted:n},`Plan ${n} deleted`)}},mcp:null}];function Wh(e,t){W(e,t,jS)}var LS=[{opKey:"persona.bootstrap",operationClass:"operate",scope:["products:read"],sideEffect:"write",cli:{group:"persona",command:"bootstrap",summary:"Issue a fresh fsk_test_ API key in a test environment",args:[{field:"productId",kind:"positional",token:"<productIdOrName>",resolveProduct:!0},{field:"env",kind:"flag",token:"--env <env>",describe:"Environment name (must be test-strategy)",required:!0},{field:"plan",kind:"flag",token:"--plan <planKey>",describe:"Plan key to assign (e.g. starter)"},{field:"displayName",kind:"flag",token:"--display-name <name>",describe:"Persona display name"}],handler:async({client:e,args:t,emit:r})=>{let o=t.productId,n=await Yl(e,o,t.env),i=await e.issuePersonaBootstrapKey(o,n,{planKey:t.plan,displayName:t.displayName});r({productId:o,environmentId:n,result:i},"Persona bootstrapped")}},mcp:{tool:"fs_persona_bootstrap",title:"Bootstrap a test persona",description:"Issue a one-time test bootstrap key for a product environment \u2014 use it to provision a test persona. Returns the key ONCE; store it now.",returnsOneTimeSecret:!0,annotations:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1,openWorldHint:!1},inputSchema:{productId:a.string().describe("The product id."),environmentId:a.string().describe("The environment id to scope the persona to.")},handler:async(e,{productId:t,environmentId:r})=>e.issuePersonaBootstrapKey(t,r)}},{opKey:"persona.read",operationClass:"operate",scope:["products:read"],sideEffect:"read",cli:{group:"persona",command:"list",summary:"List personas for a test environment",args:[{field:"productId",kind:"positional",token:"<productIdOrName>",resolveProduct:!0},{field:"env",kind:"flag",token:"--env <env>",describe:"Environment name",required:!0}],handler:async({client:e,args:t,emit:r})=>{let o=t.productId,n=await Yl(e,o,t.env),i=await e.listPersonas(o,n);r({productId:o,environmentId:n,result:i},"Personas")}},mcp:{tool:"fs_persona_list",title:"List personas",description:"List a product environment's test personas (id, label, status). Read-only.",annotations:{readOnlyHint:!0,openWorldHint:!1},inputSchema:{productId:a.string().describe("The product id."),environmentId:a.string().describe("The environment id whose personas to list.")},handler:async(e,{productId:t,environmentId:r})=>e.listPersonas(t,r)}},{opKey:"persona.revoke",operationClass:"operate",scope:["products:update"],sideEffect:"write",cli:{group:"persona",command:"revoke",summary:"Revoke a persona's API key",args:[{field:"productId",kind:"positional",token:"<productIdOrName>",resolveProduct:!0},{field:"personaId",kind:"positional",token:"<personaId>"},{field:"env",kind:"flag",token:"--env <env>",describe:"Environment name",required:!0}],handler:async({client:e,args:t,emit:r})=>{let o=t.productId,n=t.personaId,i=await Yl(e,o,t.env),s=await e.revokePersona(o,i,n);r({productId:o,environmentId:i,result:s},`Persona ${n} revoked`)}},mcp:{tool:"fs_persona_revoke",title:"Revoke a persona",description:"Revoke a test persona. Its credentials stop working.",annotations:{readOnlyHint:!1,destructiveHint:!0,idempotentHint:!0,openWorldHint:!1},inputSchema:{productId:a.string().describe("The product id."),environmentId:a.string().describe("The environment id."),personaId:a.string().describe("The persona id to revoke.")},handler:async(e,{productId:t,environmentId:r,personaId:o})=>e.revokePersona(t,r,o)}}];function qh(e,t){W(e,t,LS)}async function Yl(e,t,r){try{return await Fi(e,t,r)}catch(o){throw new k(o instanceof Error?o.message:`Environment "${r}" not found on product ${t}.`,void 0,{code:"ENV_NOT_FOUND"})}}var FS=[{opKey:"usage.read",operationClass:"operate",scope:["products:read"],sideEffect:"read",cli:{group:"usage",command:"summary",summary:"Show usage summary for the last 30 days",args:[{field:"productId",kind:"positional",token:"<productIdOrName>",resolveProduct:!0}],handler:async({client:e,args:t,emit:r})=>{let o=t.productId,n=await e.managementGetUsage(o);r({productId:o,summary:n},"Usage summary")}},mcp:{tool:"fs_usage_read",title:"Read usage summary",description:"Read a product's usage summary \u2014 metered request counts and tier utilization. Read-only.",annotations:{readOnlyHint:!0,openWorldHint:!1},inputSchema:{productId:a.string().describe("The product id whose usage to read.")},handler:async(e,{productId:t})=>e.managementGetUsage(t)}}];function Jh(e,t){W(e,t,FS)}function Yh(e,t){let r=e.command("connect").description("Connection status for GitHub and Stripe (browser-only flows)");r.command("github").description("Print GitHub-connection status").action(async()=>{let n=await t().builderGitHubStatus();B({status:n},"GitHub status")}),r.command("stripe <productIdOrName>").description("Print Stripe Connect status for a product").action(async o=>{let n=t(),i=await Li(n,o),s=await n.productStripeStatus(i);B({productId:i,status:s},"Stripe status")})}function MS(e){if(!e||typeof e!="object")return[];let t=e;return Array.isArray(t.data)?t.data:Array.isArray(t.tokens)?t.tokens:Array.isArray(e)?e:[]}var ZS=[{opKey:"maker_token.read",operationClass:"operate",scope:[],sideEffect:"read",cli:{group:"token",command:"list",summary:"List maker tokens in the current org",args:[],handler:async({client:e,emit:t})=>{let r=MS(await e.managementListMakerTokens());t({count:r.length,tokens:r.map(o=>({id:o.id,name:o.name??null,scopes:o.scopes??[],productId:o.productId??null,lastFour:o.lastFour??null,createdAt:o.createdAt??null,revokedAt:o.revokedAt??null}))},`${r.length} token(s)`)}},mcp:{tool:"fs_maker_token_list",title:"List maker tokens",description:"List the workspace's maker tokens (mk_) \u2014 id, label, scopes, last-four, status. Read-only; secrets are never shown. Creating/revoking maker tokens is intentionally not exposed via MCP.",annotations:{readOnlyHint:!0,openWorldHint:!1},inputSchema:{},handler:async e=>e.managementListMakerTokens()}},{opKey:"maker_token.create",operationClass:"operate",scope:["products:update"],sideEffect:"write",cli:{group:"token",command:"create",summary:"Create a new maker token (returns the secret once)",args:[{field:"name",kind:"flag",token:"--name <name>",describe:"Human-friendly token name",required:!0},{field:"scope",kind:"flag",token:"--scope <scope...>",describe:"Scope(s) to attach (e.g. products:update products:publish)"},{field:"product",kind:"flag",token:"--product <productId>",describe:"Scope to a specific product"}],handler:async({client:e,args:t,emit:r})=>{let o=await e.managementCreateMakerToken({name:t.name,scopes:t.scope,productId:t.product});r({result:o},"Token created")}},mcp:null},{opKey:"maker_token.revoke",operationClass:"operate",scope:["products:update"],sideEffect:"write",cli:{group:"token",command:"revoke",summary:"Revoke a maker token. Requires --yes.",destructive:!0,yesMessage:"Pass --yes to confirm token revocation.",args:[{field:"tokenId",kind:"positional",token:"<tokenId>"}],handler:async({client:e,args:t,emit:r})=>{let o=t.tokenId;await e.managementRevokeMakerToken(o),r({revoked:o},`Token ${o} revoked`)}},mcp:null}];function Xh(e,t){W(e,t,ZS)}var Xl=["gateway_verification","metering","health","tunnel"],VS="<productId>",Ln="products:update",Fn="The product id.",nt={field:"productId",kind:"positional",token:VS};function Qh(e){if(!e||typeof e!="object")return[];let t=e;return Array.isArray(t.data)?t.data:Array.isArray(t.backends)?t.backends:Array.isArray(t.tokens)?t.tokens:Array.isArray(e)?e:[]}async function e_(e,t,r){if(!r)return null;try{return await Fi(e,t,r)}catch(o){throw new k(o instanceof Error?o.message:`Environment "${r}" not found on product ${t}.`,void 0,{code:"ENV_NOT_FOUND"})}}var Ql=e=>typeof e=="string"&&e.length>0?e.split(",").map(t=>t.trim()).filter(t=>t.length>0):void 0,BS=[{opKey:"backend.read",operationClass:"operate",scope:["products:read"],sideEffect:"read",cli:{group:"backend",command:"list",summary:"List backends for a product",args:[nt],handler:async({client:e,args:t,emit:r})=>{let o=Qh(await e.builderListBackends(t.productId));r({count:o.length,backends:o},`${o.length} backend(s)`)}},mcp:{tool:"fs_backend_list",title:"List backends",description:"List a product's backends (origins) \u2014 id, name, slug, transport mode, default flag. Read-only.",annotations:{readOnlyHint:!0,openWorldHint:!1},inputSchema:{productId:a.string().describe("The product id whose backends to list.")},handler:async(e,{productId:t})=>e.builderListBackends(t)}},{opKey:"backend.create",operationClass:"operate",scope:[Ln],sideEffect:"write",cli:{group:"backend",command:"create",summary:"Create a backend (default transport: public_origin)",idempotent:!0,args:[nt,{field:"name",kind:"flag",token:"--name <name>",describe:"Human-friendly backend name",required:!0},{field:"slug",kind:"flag",token:"--slug <slug>",describe:"Stable slug (defaults to a slugified name)"},{field:"env",kind:"flag",token:"--env <environment>",describe:"Scope backend to an environment name or id"},{field:"transport",kind:"flag",token:"--transport <mode>",describe:"Transport mode: public_origin | mtls | cloudflare_tunnel",defaultValue:"public_origin"},{field:"runner",kind:"flag",token:"--runner <runner>",describe:"managed_cloudflared | sidecar"},{field:"runtime",kind:"flag",token:"--runtime <runtime>",describe:"Container/runtime descriptor"},{field:"originUrl",kind:"flag",token:"--origin-url <url>",describe:"Builder origin URL (public_origin/mtls)"},{field:"default",kind:"flag",token:"--default",describe:"Mark this backend the product default"}],handler:async({client:e,args:t,reqOpts:r,emit:o,emitDryRunPreview:n})=>{let i=t.productId,s=await e_(e,i,t.env),c=t.transport==="mtls"||t.transport==="cloudflare_tunnel"?t.transport:"public_origin",u=await e.builderCreateBackend(i,{name:t.name,slug:t.slug,environmentId:s,transportMode:c,runner:t.runner==="managed_cloudflared"||t.runner==="sidecar"?t.runner:null,runtime:t.runtime??null,originUrl:t.originUrl??null,isDefault:t.default},r);n(u)||o({result:u},"Backend created")}},mcp:{tool:"fs_backend_create",title:"Create a backend",description:"Create a backend (origin) for a product. Pick a transport mode: public_origin (plain HTTPS), mtls (mutual TLS), or cloudflare_tunnel (secure bring-your-own-backend). Mark it default to route traffic to it.",annotations:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1,openWorldHint:!1},inputSchema:{productId:a.string().describe("The product id to create the backend in."),name:a.string().describe("Backend name (e.g. 'prod-origin')."),slug:a.string().optional().describe("URL-safe slug; derived from name if omitted."),transportMode:a.enum(["public_origin","mtls","cloudflare_tunnel"]).optional().describe("How the gateway reaches the origin; defaults to public_origin."),originUrl:a.string().optional().describe("The origin URL (for public_origin / mtls modes)."),isDefault:a.boolean().optional().describe("Route traffic to this backend by default."),...he},handler:async(e,t)=>e.builderCreateBackend(t.productId,{name:t.name,slug:t.slug,transportMode:t.transportMode,originUrl:t.originUrl,isDefault:t.isDefault},{idempotencyKey:t.idempotencyKey})}},{opKey:"backend.delete",operationClass:"operate",scope:[Ln],sideEffect:"write",cli:{group:"backend",command:"delete",summary:"Delete a backend (revokes its runtime tokens). Requires --yes.",destructive:!0,yesMessage:"Pass --yes to confirm backend deletion.",args:[nt,{field:"backendId",kind:"positional",token:"<backendId>"}],handler:async({client:e,args:t,emit:r})=>{let o=t.productId,n=t.backendId;await e.builderDeleteBackend(o,n),r({productId:o,deleted:n},`Backend ${n} deleted`)}},mcp:{tool:"fs_backend_delete",title:"Delete a backend",description:"Delete a backend (origin). Traffic routed to it stops; re-create to restore.",annotations:{readOnlyHint:!1,destructiveHint:!0,idempotentHint:!0,openWorldHint:!1},inputSchema:{productId:a.string().describe(Fn),backendId:a.string().describe("The backend id to delete.")},handler:async(e,{productId:t,backendId:r})=>e.builderDeleteBackend(t,r)}},{opKey:"runtime_token.read",operationClass:"operate",scope:["products:read"],sideEffect:"read",cli:{group:"backend tokens",command:"list",summary:"List runtime tokens for a product",args:[nt],handler:async({client:e,args:t,emit:r})=>{let o=Qh(await e.builderListRuntimeTokens(t.productId));r({count:o.length,tokens:o},`${o.length} runtime token(s)`)}},mcp:{tool:"fs_runtime_token_list",title:"List runtime tokens",description:"List a product's runtime tokens (fsrt_) \u2014 id, last-four, capabilities, status. Read-only; secrets are never shown.",annotations:{readOnlyHint:!0,openWorldHint:!1},inputSchema:{productId:a.string().describe(Fn)},handler:async(e,{productId:t})=>e.builderListRuntimeTokens(t)}},{opKey:"runtime_token.mint",operationClass:"operate",scope:[Ln],sideEffect:"write",cli:{group:"backend tokens",command:"create",summary:"Create a runtime token (returns FS_RUNTIME_TOKEN once)",idempotent:!0,args:[nt,{field:"env",kind:"flag",token:"--env <environment>",describe:"Scope token to an environment name or id"},{field:"backend",kind:"flag",token:"--backend <backendId>",describe:"Bind token to a specific backend"},{field:"kind",kind:"flag",token:"--kind <kind>",describe:"live | test (defaults from env scope)"},{field:"capabilities",kind:"flag",token:"--capabilities <list>",describe:`Comma-separated capabilities: ${Xl.join(" | ")}. Default: core's DEFAULT_CAPABILITIES. Use tunnel for cloudflare_tunnel backends.`},{field:"meters",kind:"flag",token:"--meters <list>",describe:"Comma-separated allowed meters (default: all product meters)"},{field:"routes",kind:"flag",token:"--routes <list>",describe:"Comma-separated allowed routes"}],handler:async({client:e,args:t,reqOpts:r,emit:o,emitDryRunPreview:n})=>{let i=t.productId,s=await e_(e,i,t.env),c=t.kind==="test"||t.kind==="live"?t.kind:void 0,u=Ql(t.capabilities);if(u){for(let d of u)if(!Xl.includes(d))throw new k(`Unknown capability "${d}". Available: ${Xl.join(", ")}.`,void 0,{code:"UNKNOWN_RUNTIME_TOKEN_CAPABILITY"})}let l=await e.builderCreateRuntimeToken(i,{environmentId:s,backendId:t.backend??null,kind:c,capabilities:u,allowedMeters:Ql(t.meters),allowedRoutes:Ql(t.routes)},r);n(l)||o({envVar:"FS_RUNTIME_TOKEN",result:l},"Runtime token created")}},mcp:{tool:"fs_runtime_token_mint",title:"Mint a runtime token",description:"Mint a new runtime token (fsrt_) for a backend. Returns the plaintext token ONCE \u2014 store it now (e.g. as FS_RUNTIME_TOKEN). Capabilities default to the backend's needs (gateway_verification, metering, health).",returnsOneTimeSecret:!0,annotations:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1,openWorldHint:!1},inputSchema:{productId:a.string().describe(Fn),backendId:a.string().optional().describe("Bind the token to this backend."),environmentId:a.string().optional().describe("Scope to a preview environment (omit for production)."),kind:a.enum(["live","test"]).optional().describe("Token kind; defaults from the env scope."),capabilities:a.array(a.string()).optional().describe("Capabilities (gateway_verification, metering, health, tunnel)."),...he},handler:async(e,t)=>e.builderCreateRuntimeToken(t.productId,{backendId:t.backendId??null,environmentId:t.environmentId??null,kind:t.kind,capabilities:t.capabilities},{idempotencyKey:t.idempotencyKey})}},{opKey:"runtime_token.rotate",operationClass:"operate",scope:[Ln],sideEffect:"write",cli:{group:"backend tokens",command:"rotate",summary:"Rotate a runtime token (returns a fresh FS_RUNTIME_TOKEN once)",args:[nt,{field:"tokenId",kind:"positional",token:"<tokenId>"}],handler:async({client:e,args:t,emit:r})=>{let o=t.productId,n=t.tokenId,i=await e.builderRotateRuntimeToken(o,n);r({envVar:"FS_RUNTIME_TOKEN",result:i},`Runtime token ${n} rotated`)}},mcp:{tool:"fs_runtime_token_rotate",title:"Rotate a runtime token",description:"Rotate a runtime token: mint a fresh secret carrying the same scope and revoke the old one. Returns the new plaintext token ONCE.",returnsOneTimeSecret:!0,annotations:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1,openWorldHint:!1},inputSchema:{productId:a.string().describe(Fn),tokenId:a.string().describe("The runtime token id to rotate."),...he},handler:async(e,t)=>e.builderRotateRuntimeToken(t.productId,t.tokenId,{idempotencyKey:t.idempotencyKey})}},{opKey:"runtime_token.revoke",operationClass:"operate",scope:[Ln],sideEffect:"write",cli:{group:"backend tokens",command:"revoke",summary:"Revoke a runtime token. Requires --yes.",destructive:!0,yesMessage:"Pass --yes to confirm runtime token revocation.",args:[nt,{field:"tokenId",kind:"positional",token:"<tokenId>"}],handler:async({client:e,args:t,emit:r})=>{let o=t.productId,n=t.tokenId;await e.builderRevokeRuntimeToken(o,n),r({productId:o,revoked:n},`Runtime token ${n} revoked`)}},mcp:{tool:"fs_runtime_token_revoke",title:"Revoke a runtime token",description:"Revoke a runtime token. The backend using it stops verifying.",annotations:{readOnlyHint:!1,destructiveHint:!0,idempotentHint:!0,openWorldHint:!1},inputSchema:{productId:a.string().describe(Fn),tokenId:a.string().describe("The runtime token id to revoke.")},handler:async(e,{productId:t,tokenId:r})=>e.builderRevokeRuntimeToken(t,r)}}];function t_(e,t){W(e,t,BS)}var ed="The product id.",td={field:"productId",kind:"positional",token:"<productId>"},nd={field:"env",kind:"flag",token:"--env <environmentId>",describe:"Scope to a preview environment id (omit for production)."},HS=[{opKey:"frontend.deploy",operationClass:"operate",scope:["products:update"],sideEffect:"write",cli:{group:"frontend",command:"deploy",summary:"Trigger a frontend build (deploy) for a product's connected repo",idempotent:!0,args:[td,nd,{field:"ref",kind:"flag",token:"--ref <ref>",describe:"Git ref to build (defaults to the env branch / repo default)."},{field:"buildCmd",kind:"flag",token:"--build-cmd <cmd>",describe:"Override the build command."}],handler:async({client:e,args:t,reqOpts:r,emit:o,emitDryRunPreview:n})=>{let i=await e.builderFrontendDeploy(t.productId,{ref:t.ref,buildCmd:t.buildCmd,environmentId:t.env},r);n(i)||o({result:i},"Frontend build triggered")}},mcp:{tool:"fs_frontend_deploy",title:"Deploy a product frontend",description:"Trigger a Managed Frontend Hosting build for the product's connected repo (production by default; pass environmentId for a preview env). Returns the enqueued build.",annotations:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0,openWorldHint:!1},inputSchema:{productId:a.string().describe(ed),ref:a.string().optional().describe("Git ref to build (defaults to the env branch / repo default)."),environmentId:a.string().optional().describe("Scope to a preview environment (omit for production)."),...he},handler:async(e,t)=>e.builderFrontendDeploy(t.productId,{ref:t.ref,environmentId:t.environmentId},{idempotencyKey:t.idempotencyKey})}},{opKey:"frontend.status",operationClass:"operate",scope:["products:read"],sideEffect:"read",cli:{group:"frontend",command:"status",summary:"Show the product's current frontend release + recent release history",args:[td,nd],handler:async({client:e,args:t,emit:r})=>{let o=await e.builderFrontendStatus(t.productId,t.env);r(o,"Frontend status")}},mcp:{tool:"fs_frontend_status",title:"Get frontend status",description:"Read a product's current frontend serve state (uiMode, active release hash + producing build, pin flag) plus the recent SUCCEEDED releases (rollback targets). Read-only.",annotations:{readOnlyHint:!0,openWorldHint:!1},inputSchema:{productId:a.string().describe(ed),environmentId:a.string().optional().describe("Scope to a preview environment (omit for production).")},handler:async(e,t)=>e.builderFrontendStatus(t.productId,t.environmentId)}},{opKey:"frontend.rollback",operationClass:"operate",scope:["products:update"],sideEffect:"write",cli:{group:"frontend",command:"rollback",summary:"Roll the product frontend back to a prior release (re-activate its releaseId)",idempotent:!0,args:[td,{field:"releaseId",kind:"flag",token:"--release-id <releaseId>",describe:"The prior release id (manifest hash) to re-activate \u2014 see `frontend status`.",required:!0},nd],handler:async({client:e,args:t,reqOpts:r,emit:o,emitDryRunPreview:n})=>{let i=await e.builderFrontendRollback(t.productId,{releaseId:t.releaseId,environmentId:t.env},r);n(i)||o({result:i},"Frontend rolled back")}},mcp:{tool:"fs_frontend_rollback",title:"Roll back a product frontend",description:"Roll a product's frontend back to a prior release by its releaseId (manifest hash, from fs_frontend_status). Flips the live pointer back and pins it. The releaseId must belong to this target's build history.",annotations:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0,openWorldHint:!1},inputSchema:{productId:a.string().describe(ed),releaseId:a.string().describe("The prior release id (manifest hash) to re-activate."),environmentId:a.string().optional().describe("Scope to a preview environment (omit for production)."),...he},handler:async(e,t)=>e.builderFrontendRollback(t.productId,{releaseId:t.releaseId,environmentId:t.environmentId},{idempotencyKey:t.idempotencyKey})}}];function n_(e,t){W(e,t,HS)}import{existsSync as s_,mkdirSync as U$,writeFileSync as j$}from"node:fs";import{basename as L$,dirname as rd,join as F$,resolve as M$}from"node:path";import{createInterface as Z$}from"node:readline/promises";import{stdin as c_,stdout as u_}from"node:process";import{createRequire as GS}from"node:module";var X0=GS(import.meta.url),KS=new Set(["name","displayName","description","sandboxBaseUrl","visibility","logoUrl","primaryColor","envBranchPrefix","baseUrl"]),WS=new Set(["authHeader","upstreamAuth"]),qS=new Set(["meters","billOn4xx"]),JS=new Set(["applyLimitUpgradesInstantly"]),YS=new Set(["product","gateway","metering","billing","frontend","migrations","policies","customer_context","resources","surfaces","entitlements","workflows","plans"]);function XS(e){let t=e.product,r={origin:t.baseUrl};t.displayName!==void 0&&(r.displayName=t.displayName),t.description!==void 0&&(r.description=t.description),t.sandboxBaseUrl!==void 0&&(r.sandboxOrigin=t.sandboxBaseUrl),t.visibility!==void 0&&(r.visibility=t.visibility),t.logoUrl!==void 0&&(r.logoUrl=t.logoUrl),t.primaryColor!==void 0&&(r.primaryColor=t.primaryColor),t.envBranchPrefix!==void 0&&(r.envBranchPrefix=t.envBranchPrefix);let o=e.gateway??{};o.authHeader!==void 0&&(r.authHeader=o.authHeader),o.upstreamAuth!==void 0&&(r.upstreamAuth=o.upstreamAuth),e.metering?.billOn4xx!==void 0&&(r.billOn4xx=e.metering.billOn4xx),e.policies!==void 0&&(r.operatorPolicies=e.policies),e.customer_context!==void 0&&(r.customerContext=QS(e.customer_context));let n=e.billing;if(n){let i={};n.applyLimitUpgradesInstantly!==void 0&&(i.applyLimitUpgradesInstantly=n.applyLimitUpgradesInstantly),Object.keys(i).length&&(r.billing=i)}return r}function QS(e){return{...e.identity_requirement!==void 0?{identityRequirement:e.identity_requirement}:{},...e.context_tokens!==void 0?{contextTokens:e.context_tokens}:{},...e.portal_auth!==void 0?{customerAuth:e.portal_auth}:{}}}function e$(e){let t={};for(let[c,u]of Object.entries(e))YS.has(c)||(t[c]=u);let r=(c,u)=>{if(typeof c!="object"||c===null)return{};let l={};for(let[d,m]of Object.entries(c))u.has(d)||(l[d]=m);return l},o=r(e.product,KS);Object.keys(o).length&&(t.product=o);let n=r(e.gateway,WS);Object.keys(n).length&&(t.gateway=n);let i=r(e.metering,qS);Object.keys(i).length&&(t.metering=i);let s=r(e.billing,JS);return Object.keys(s).length&&(t.billing=s),t}function N(e,t=0){if(typeof e=="object"&&e!==null&&!Array.isArray(e)&&"__capabilityGrant"in e){let r=e,o=[N(r.__capabilityGrant)];return r.__capabilityGrantLimits!==void 0&&o.push(N({limits:r.__capabilityGrantLimits},t)),`capabilityGrant(${o.join(", ")})`}if(Array.isArray(e)){if(e.length===0)return"[]";let r=e.map(i=>N(i,t+1)),o=`[${r.join(", ")}]`;if(o.length<=72&&!o.includes(`
106
+ `))return o;let n=" ".repeat(t+1);return`[
107
+ ${r.map(i=>`${n}${i}`).join(`,
108
+ `)},
109
+ ${" ".repeat(t)}]`}if(typeof e=="object"&&e!==null){let r=Object.entries(e);if(r.length===0)return"{}";let o=r.map(([s,c])=>`${t$(s)}: ${N(c,t+1)}`),n=`{ ${o.join(", ")} }`;if(n.length<=72&&!n.includes(`
110
+ `))return n;let i=" ".repeat(t+1);return`{
111
+ ${o.map(s=>`${i}${s}`).join(`,
112
+ `)},
113
+ ${" ".repeat(t)}}`}return JSON.stringify(e)}function t$(e){return/^[A-Za-z_$][A-Za-z0-9_$]*$/.test(e)?e:JSON.stringify(e)}function re(e,t){return`@${e}(${t.join(", ")})`}function r_(e){let t=e.product,r=i_(t.product.name),o=[];o.push(re("Product",[N(a$(t),0)]));let n=O$(t);n&&o.push(n);let i=T$(t);i&&o.push(i);let s=new o$,c=[];s$(c,s,t),c$(c,s,t),u$(c,s,t),l$(c,s,t),d$(c,s,e),p$(c,s,e),g$(c,s,e),b$(c,s,t),y$(c,s,t),x$(c,s,t),k$(c,s,t);let u=[];u.push("import {");for(let l of n$(o,c))u.push(` ${l},`);u.push('} from "@farthershore/product";'),u.push("");for(let l of o)u.push(l);return u.push(`export default class ${r} {`),u.push(r$(c.join(`
116
114
 
117
- export default product;
118
- `}function LS(e,t=Li,r){let o=Wl(t),n=c=>o==="."?c:`${o}/${c}`,i=NS(o)==="product"?Wl(o):o,s=c=>i==="."?c:CS(i,c);return[{path:s(".gitignore"),content:ZS()},{path:t,content:Jh(e)},{path:n("package.json"),content:MS()},{path:n("tsconfig.json"),content:FS()},{path:n("meters.ts"),content:qS(e)},{path:n("features.ts"),content:JS(r)},{path:n("plans.ts"),content:YS(e)},{path:s("frontend/package.json"),content:VS()},{path:s("frontend/index.html"),content:BS()},{path:s("frontend/src/App.tsx"),content:HS()},{path:s("frontend/src/styles.css"),content:GS()},{path:s("frontend/tsconfig.json"),content:KS()},{path:s("frontend/vite.config.ts"),content:WS()}]}function MS(){return`${JSON.stringify({private:!0,type:"module",scripts:{build:"farthershore-manifest-build --out manifest-ir.json",validate:"farthershore-manifest-build --out manifest-ir.json"},dependencies:{"@farthershore/product":zS},devDependencies:{typescript:"^6.0.2"}},null,2)}
119
- `}function FS(){return`${JSON.stringify({compilerOptions:{target:"ES2022",module:"NodeNext",moduleResolution:"NodeNext",strict:!0,noEmit:!0,skipLibCheck:!0},include:["**/*.ts"]},null,2)}
120
- `}function ZS(){return["# OS",".DS_Store","Thumbs.db","","# Dependencies and local output","product/node_modules/","product/manifest-ir.json","product/manifest-diagnostics.json","frontend/node_modules/","frontend/dist/","manifest-ir.json","manifest-diagnostics.json","","# Local env + tooling",".env",".env.local",".vscode/",".idea/",""].join(`
121
- `)}function VS(){return`${JSON.stringify({private:!0,type:"module",scripts:{dev:"vite",build:"tsc -b && vite build",preview:"vite preview"},dependencies:{"@farthershore/farthershore-js":US,react:"^19.0.0","react-dom":"^19.0.0"},devDependencies:{"@types/react":"^19.0.0","@types/react-dom":"^19.0.0","@vitejs/plugin-react":"^4.3.4",typescript:"^6.0.2",vite:"^6.0.0"}},null,2)}
122
- `}function BS(){return["<!doctype html>",'<html lang="en">'," <head>",' <meta charset="UTF-8" />',' <meta name="viewport" content="width=device-width, initial-scale=1.0" />'," <title>Farther Shore Product</title>"," </head>"," <body>",' <div id="root"></div>',' <script type="module" src="/src/App.tsx"></script>'," </body>","</html>",""].join(`
123
- `)}function HS(){return`import React from "react";
115
+ `))),u.push("}"),u.push(""),u.join(`
116
+ `)}function n$(e,t){let r=["Product","Frontend","Raw","Meter","Resource","Surface","Backend","Capability","Policy","Feature","Entitlement","Workflow","Migration","Plan"],o=[...e,...t].join(`
117
+ `),n=new Set;for(let s of r)new RegExp(`@${s}\\(`).test(o)&&n.add(s);let i=r.filter(s=>n.has(s));return/capabilityGrant\(/.test(o)&&i.push("capabilityGrant"),i}function r$(e){return e.split(`
118
+ `).map(t=>t.length?` ${t}`:t).join(`
119
+ `)}function i_(e){let r=e.split(/[^A-Za-z0-9]+/).filter(Boolean).map(n=>n.charAt(0).toUpperCase()+n.slice(1)).join("");return(/^[A-Za-z]/.test(r)?r:`Product${r}`)||"Product"}function i$(e){let t=e.replace(/[^A-Za-z0-9_$]/g,"_");return/^[A-Za-z_$]/.test(t)?t:`_${t}`}var o$=class{used=new Set;next(e){let t=i$(e),r=t,o=2;for(;this.used.has(r);)r=`${t}_${o++}`;return this.used.add(r),r}};function a$(e){let t=XS(e),r=e.product.name;return i_(r)!==r?{name:r,...t}:t}function s$(e,t,r){for(let o of r.metering?.meters??[]){let{key:n,...i}=o,s=t.next(n);e.push(`${re("Meter",[N(n),N(i,0)])}
120
+ ${s}!: unknown;`)}}function c$(e,t,r){for(let o of r.resources??[]){let{name:n,...i}=o,s=t.next(n);e.push(`${re("Resource",[N(n),N(i,0)])}
121
+ ${s}!: unknown;`)}}function u$(e,t,r){for(let o of r.surfaces??[]){let{type:n,key:i,...s}=o,c=t.next(`surface_${i}`);e.push(`${re("Surface",[N(n),N({key:i,...s},0)])}
122
+ ${c}!: unknown;`)}}function l$(e,t,r){let o=r.backend;if(o)for(let[n,i]of Object.entries(o)){let s=t.next(n);e.push(`${re("Backend",[N(n),N(i,0)])}
123
+ ${s}!: unknown;`)}}function d$(e,t,r){for(let o of r.capabilities){let n=m$(o),i=t.next(o.capability);e.push(`${re("Capability",[N(o.capability),N(n,0)])}
124
+ ${i}!: unknown;`)}}function m$(e){let t={};return e.description!==void 0&&(t.description=e.description),e.mutation_class!==void 0&&(t.mutationClass=e.mutation_class),e.includes_features?.length&&(t.includesFeatures=e.includes_features),e.includes_policies?.length&&(t.includesPolicies=e.includes_policies),e.includes_capabilities?.length&&(t.includesCapabilities=e.includes_capabilities),t}function p$(e,t,r){for(let o of r.policies){let n=f$(o),i=t.next(o.name);e.push(`${re("Policy",[N(o.name),N(n,0)])}
125
+ ${i}!: unknown;`)}}function f$(e){let t={type:e.type,config:e.config};if(e.description!==void 0&&(t.description=e.description),e.mutation_class!==void 0&&(t.mutationClass=e.mutation_class),e.cacheProfile!==void 0&&(t.cacheProfile=e.cacheProfile),e.compatible_with!==void 0){let r=e.compatible_with;t.compatibleWith={...r.route_types?{routeTypes:r.route_types}:{},...r.meters?{meters:r.meters}:{},...r.auth_modes?{authModes:r.auth_modes}:{}}}return t}function g$(e,t,r){for(let o of r.routes){let n=h$(o),i=t.next(o.feature);e.push(`${re("Feature",[N(o.feature),N(n,0)])}
126
+ ${i}!: unknown;`)}}function h$(e){let t={};if(e.description!==void 0&&(t.description=e.description),e.mutation_class!==void 0&&(t.mutationClass=e.mutation_class),e.cacheProfile!==void 0&&(t.cacheProfile=e.cacheProfile),e.upstream!==void 0&&(t.upstreamOrigin=e.upstream.override_origin),e.policies?.length&&(t.policies=e.policies),e.plans?.length&&(t.plans=e.plans),e.runtime?.rollout_key!==void 0&&(t.rolloutKey=e.runtime.rollout_key),e.runtime?.required_flags?.length&&(t.requiredFlags=e.runtime.required_flags),e.actions?.length&&(t.actions=e.actions),e.backend!==void 0&&(t.backend=e.backend),e.routes.length){let r={};for(let o of e.routes)r[_$(o)]=v$(o);t.routes=r}return t}function _$(e){return`${e.match.method??"*"} ${e.match.path}`}function v$(e){let t={};return e.metering?.defaults&&Object.keys(e.metering.defaults).length&&(t.cost=e.metering.defaults),e.metering?.reports?.length&&(t.reports=e.metering.reports),e.metering?.estimates&&Object.keys(e.metering.estimates).length&&(t.estimates=e.metering.estimates),e.action!==void 0&&(t.action=e.action),e.backend!==void 0&&(t.backend=e.backend),e.metering?.onStatusCodes!==void 0&&(t.onStatusCodes=e.metering.onStatusCodes),e.unmetered!==void 0&&(t.unmetered=e.unmetered),e.inheritDefaultMeters!==void 0&&(t.inheritDefaultMeters=e.inheritDefaultMeters),t}function b$(e,t,r){for(let o of r.entitlements??[]){let{key:n,...i}=o,s=t.next(n);e.push(`${re("Entitlement",[N(n),N(i,0)])}
127
+ ${s}!: unknown;`)}}function y$(e,t,r){for(let o of r.workflows??[]){let{key:n,...i}=o,s=t.next(n);e.push(`${re("Workflow",[N(n),N(i,0)])}
128
+ ${s}!: unknown;`)}}function x$(e,t,r){for(let o of r.migrations??[]){let{id:n,...i}=o,s=t.next(n);e.push(`${re("Migration",[N(n),N(i,0)])}
129
+ ${s}!: unknown;`)}}function k$(e,t,r){for(let o of r.plans??[]){let n=I$(o),i=t.next(o.key);e.push(`${re("Plan",[N(o.key),N(n,0)])}
130
+ ${i}!: unknown;`)}}function S$(e){let t=e.recurring_fee_cents,r=e.billing_interval,o=e.free,n={};return o===!0&&t===0&&r==="month"?{price:{free:!0},rawPrice:n}:o!==!0&&t!==void 0&&Number.isInteger(t)&&t>=0&&(r==="month"||r==="year")?{price:{amount:t,currency:"usd",interval:r},rawPrice:n}:(t!==void 0&&(n.recurring_fee_cents=t),r!==void 0&&(n.billing_interval=r),o!==void 0&&(n.free=o),{rawPrice:n})}var o_=[["meters","meters"],["limits","limits"],["capability_limits","caps"],["grants","grants"],["trial_days","trialDays"],["max_monthly_spend_cents","maxMonthlySpendCents"],["min_monthly_spend_cents","minMonthlySpendCents"],["featureGates","featureGates"],["capabilities","capabilities"],["overageBehavior","overageBehavior"],["selfServeEnabled","selfServeEnabled"],["legacy","legacy"],["archive","archive"]],$$=new Set(["key","name","description","details","recurring_fee_cents","billing_interval","free",...o_.map(([e])=>e)]);function I$(e){if(e.name===void 0||e.name===null)throw new Error(`plan "${e.key}" is missing a required name`);let t={name:e.name};e.description!==void 0&&(t.description=e.description),e.details!==void 0&&(t.details=e.details);let{price:r,rawPrice:o}=S$(e);r!==void 0&&(t.price=r);let n={...o};for(let[i,s]of o_){let c=e[i];if(c!==void 0){if(i==="limits"){let u=w$(e.limits??[]);u?t.limits=u:n.limits=e.limits;continue}if(i==="capability_limits"){let u=e.capability_limits??{};Object.values(u).every(l=>typeof l=="number")?t.caps=u:n.capability_limits=u;continue}if(i==="grants"){t.grants=e.grants?.map(E$);continue}t[s]=c}}for(let[i,s]of Object.entries(e))$$.has(i)||(n[i]=s);return Object.keys(n).length&&(t.raw=n),t}function E$(e){if(e.kind==="capability_grant"){let{kind:t,capability:r,limits:o,...n}=e;return{__capabilityGrant:r,...o!==void 0?{__capabilityGrantLimits:o}:{},...n}}return e}function w$(e){if(!e||!e.length)return;let t={};for(let r of e){if(r.window.type!=="named"||r.reset_trigger!==void 0||!Number.isInteger(r.capacity)||r.capacity<=0||Object.prototype.hasOwnProperty.call(t,r.dimension))return;t[r.dimension]={rate:r.capacity,interval:r.window.name,...r.enforcement!==void 0?{enforcement:r.enforcement}:{}}}return t}function O$(e){if(e.frontend!==void 0)return re("Frontend",[N({manifest:e.frontend},0)])}function T$(e){let t=e$(e);if(Object.keys(t).length)return re("Raw",[N({productPatch:t},0)])}var A$="@farthershore/farthershore-js";function P$(e){let t={...e.packageName?{name:e.packageName}:{},private:!0,type:"module",scripts:{dev:"vite",build:"tsc -b && vite build",preview:"vite preview"},dependencies:{[A$]:e.frontendSdkRange,react:"^19.0.0","react-dom":"^19.0.0"},devDependencies:{"@types/react":"^19.0.0","@types/react-dom":"^19.0.0","@vitejs/plugin-react":"^4.3.4",typescript:"^6.0.2",vite:"^6.0.0"}};return`${JSON.stringify(t,null,2)}
131
+ `}function C$(e){return["<!doctype html>",'<html lang="en">'," <head>",' <meta charset="UTF-8" />',' <meta name="viewport" content="width=device-width, initial-scale=1.0" />',` <title>${e}</title>`," </head>"," <body>",' <div id="root"></div>',' <script type="module" src="/src/App.tsx"></script>'," </body>","</html>",""].join(`
132
+ `)}function N$(){return`// Customer-facing portal \u2014 the editable frontend for your product.
133
+ //
134
+ // PORTAL CUSTOMIZATION = EDIT THIS \`frontend/\` TREE (the fork model). The
135
+ // platform serves a generic managed template by default; once you edit and
136
+ // build this frontend, the platform serves YOUR build instead. Your product's
137
+ // CONTRACT (plans, pricing, routes, meters) lives in \`product/\` and is managed
138
+ // as code \u2014 change pricing there, change the UI here.
139
+ //
140
+ // The SDK is self-managed: one client + one <FartherShoreRoot> wrapper owns
141
+ // bootstrap, theming (brand color from your product), and auth (Clerk satellite
142
+ // or persona sessions, picked from the environment). Data components are
143
+ // zero-prop \u2014 they read everything from the resolved client.
144
+ import { StrictMode } from "react";
124
145
  import { createRoot } from "react-dom/client";
146
+ import { createFartherShoreClient } from "@farthershore/farthershore-js";
147
+ import {
148
+ FartherShoreRoot,
149
+ FsBranding,
150
+ FsManifestNav,
151
+ PlansTable,
152
+ UsageCard,
153
+ ApiKeysPanel,
154
+ BillingSummary,
155
+ FsFooter,
156
+ } from "@farthershore/farthershore-js/components";
157
+ import "@farthershore/farthershore-js/components/styles.css";
125
158
  import "./styles.css";
126
159
 
127
- function App() {
160
+ // Env is automatic: on a platform-served portal the edge injects
161
+ // window.__FS_CONFIG__ (coreUrl + Clerk), so the built bundle is env-agnostic.
162
+ // VITE_FS_CORE_URL is a dev/self-host override only \u2014 fromEnv() forwards it and
163
+ // falls back to the injected channel when it is unset (the production case).
164
+ const fs = createFartherShoreClient.fromEnv({
165
+ coreUrl: import.meta.env.VITE_FS_CORE_URL,
166
+ });
167
+
168
+ function Portal() {
128
169
  return (
129
170
  <main className="shell">
130
- <section className="hero">
131
- <p className="eyebrow">Customer frontend</p>
132
- <h1>Start selling your software product</h1>
133
- <p>
134
- Customize this app for signup, pricing, account management, and usage
135
- views. Contract changes live in product/.
136
- </p>
171
+ <header className="topbar">
172
+ <FsBranding />
173
+ <FsManifestNav />
174
+ </header>
175
+ <section className="grid">
176
+ <PlansTable />
177
+ <UsageCard />
178
+ <BillingSummary />
179
+ <ApiKeysPanel />
137
180
  </section>
181
+ <FsFooter />
138
182
  </main>
139
183
  );
140
184
  }
141
185
 
142
186
  const root = document.getElementById("root");
143
187
  if (!root) throw new Error("Missing #root");
144
- createRoot(root).render(<App />);
145
- `}function GS(){return`:root {
188
+ createRoot(root).render(
189
+ <StrictMode>
190
+ <FartherShoreRoot client={fs}>
191
+ <Portal />
192
+ </FartherShoreRoot>
193
+ </StrictMode>,
194
+ );
195
+ `}function R$(){return`:root {
146
196
  color-scheme: light;
147
197
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
148
198
  color: #18181b;
@@ -154,51 +204,39 @@ body {
154
204
  }
155
205
 
156
206
  .shell {
157
- min-height: 100vh;
158
- display: grid;
159
- place-items: center;
160
- padding: 48px 24px;
207
+ max-width: 1040px;
208
+ margin: 0 auto;
209
+ padding: 32px 24px 64px;
161
210
  }
162
211
 
163
- .hero {
164
- max-width: 720px;
212
+ .topbar {
213
+ display: flex;
214
+ align-items: center;
215
+ justify-content: space-between;
216
+ gap: 16px;
217
+ flex-wrap: wrap;
218
+ margin-bottom: 32px;
165
219
  }
166
220
 
167
- .eyebrow {
168
- margin: 0 0 12px;
169
- color: #047857;
170
- font-size: 13px;
171
- font-weight: 700;
172
- text-transform: uppercase;
173
- }
174
-
175
- h1 {
176
- margin: 0;
177
- font-size: 48px;
178
- line-height: 1;
179
- }
180
-
181
- p {
182
- font-size: 18px;
183
- line-height: 1.6;
221
+ .grid {
222
+ display: grid;
223
+ gap: 24px;
224
+ grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
225
+ align-items: start;
184
226
  }
185
- `}function KS(){return`${JSON.stringify({compilerOptions:{target:"ES2022",useDefineForClassFields:!0,lib:["DOM","DOM.Iterable","ES2022"],allowJs:!1,skipLibCheck:!0,esModuleInterop:!0,allowSyntheticDefaultImports:!0,strict:!0,forceConsistentCasingInFileNames:!0,module:"ESNext",moduleResolution:"Bundler",resolveJsonModule:!0,isolatedModules:!0,noEmit:!0,jsx:"react-jsx"},include:["src"],references:[]},null,2)}
186
- `}function WS(){return`import { defineConfig } from "vite";
227
+ `}function D$(){return`${JSON.stringify({compilerOptions:{target:"ES2022",useDefineForClassFields:!0,lib:["DOM","DOM.Iterable","ES2022"],allowJs:!1,skipLibCheck:!0,esModuleInterop:!0,allowSyntheticDefaultImports:!0,strict:!0,forceConsistentCasingInFileNames:!0,module:"ESNext",moduleResolution:"Bundler",resolveJsonModule:!0,isolatedModules:!0,noEmit:!0,jsx:"react-jsx",types:["vite/client"]},include:["src"],references:[]},null,2)}
228
+ `}function z$(){return`import { defineConfig } from "vite";
187
229
  import react from "@vitejs/plugin-react";
188
230
 
189
231
  export default defineConfig({
190
232
  plugins: [react()],
191
233
  });
192
- `}function qS(e){let r=(Jl(e).metering?.meters??[]).map(n=>({key:n.key,display:n.display??Yh(n.key)})),o=['import type { ProductModule } from "@farthershore/product";',"","export const configureMeters: ProductModule = (product) => {"];r.length===0&&o.push(" // Add product.meter(...) declarations here as plans evolve.");for(let n of r)n.key==="requests"?o.push(` product.requests({ display: ${Me(n.display)} });`):o.push(` product.meter(${Me(n.key)}, { display: ${Me(n.display)} });`);return o.push("};",""),o.join(`
193
- `)}function JS(e){let t=Vl(e),r=['import type { ProductModule } from "@farthershore/product";',"","export const configureFeatures: ProductModule = (product) => {"];for(let o of t)r.push(` product.surface(${Me(o)});`);return t.includes("api")?r.push("",' product.feature("api").route("GET /v1/example");'):r.push(""," // Add product.feature(...).route(...) for gateway-routed actions,"," // product.workflow(...) for async work, or more product.surface(...)"," // declarations as this software business evolves."),r.push("};",""),r.join(`
194
- `)}function YS(e){let r=Jl(e).plans.map(i=>{let s=e$(i);return`
195
- product.plan(${Me(i.key)}, ${ql(s,1)});`});return`${r.some(i=>i.includes("fs.price."))?'import { fs, type ProductModule } from "@farthershore/product";':'import type { ProductModule } from "@farthershore/product";'}
196
-
197
- export const configurePlans: ProductModule = (product) => {${r.join("")}
198
- };
199
- `}var XS=new Set(["key","name","description","details","recurring_fee_cents","billing_interval","free","meters","grants","trial_days","max_monthly_spend_cents","min_monthly_spend_cents","limits","featureGates","capability_limits","capabilities","overageBehavior","selfServeEnabled","legacy","archive"]),QS=[["description","description"],["details","details"],["meters","meters"],["trial_days","trialDays"],["max_monthly_spend_cents","maxMonthlySpendCents"],["min_monthly_spend_cents","minMonthlySpendCents"],["limits","limits"],["featureGates","featureGates"],["capability_limits","capabilityLimits"],["capabilities","capabilities"],["overageBehavior","overageBehavior"],["selfServeEnabled","selfServeEnabled"],["legacy","legacy"],["archive","archive"]];function e$(e){let t={name:e.name},r=t$(e),o={...r.raw};return r.value&&(t.price=r.value),n$(e,t),Array.isArray(e.grants)&&e.grants.length>0&&(t.grants=e.grants),Object.assign(o,r$(e)),Object.keys(o).length>0&&(t.raw=o),t}function t$(e){let t=e.recurring_fee_cents,r=e.billing_interval,o=e.free;return typeof t=="number"&&t>0&&(r==="month"||r==="year")?{value:{__price:r==="year"?"yearly":"monthly",amount:t/100},raw:o!==void 0?{free:o}:{}}:o===!0&&t===0&&r==="month"?{value:{__price:"free"},raw:{}}:{raw:{...t!==void 0&&t!==0?{recurring_fee_cents:t}:{},...r!==void 0&&r!=="month"?{billing_interval:r}:{},...o!==void 0?{free:o}:{}}}}function n$(e,t){for(let[r,o]of QS)e[r]!==void 0&&(t[o]=e[r])}function r$(e){let t={};for(let[r,o]of Object.entries(e))XS.has(r)||(t[r]=o);return t}function Yh(e){return e.split("_").filter(Boolean).map(t=>t.charAt(0).toUpperCase()+t.slice(1)).join(" ")}function i$(){return Bl().map((e,t)=>` ${t+1}) ${e.kind.padEnd(8)} \u2014 ${e.description}`).join(`
200
- `)}function o$(e){let t=e.pricing,r=(t.meters??[]).map(n=>`${n.dimension} @ ${n.price_per_unit_micros} micros/unit`).join(", "),o=[` recurring_fee_cents ${t.recurring_fee_cents}`,` recurring credit (grant) ${Cn(t)}`,` one-time credit (grant) ${zt(t)}`,` trial_days ${t.trial_days}`];return r&&o.push(` meters ${r}`),o.join(`
201
- `)}async function a$(e){e.log("FartherShore init \u2014 pick a starter plan preset:"),e.log(""),e.log(i$()),e.log("");let t=(await e.ask("Preset (number or name, blank to cancel): ")).trim();if(!t)return null;let r=Number.parseInt(t,10),o=null;if(Number.isInteger(r)&&r>=1&&r<=me.length?o=me[r-1]??null:me.includes(t.toLowerCase())&&(o=t.toLowerCase()),!o)throw new k(`Unknown preset "${t}". Choose one of: ${me.join(", ")}.`,void 0,{code:"INIT_TEMPLATE_UNKNOWN"});e.log(""),e.log(`Preview \u2014 ${ji(o).label}:`),e.log(o$(ji(o))),e.log("");let n=(await e.ask(`Output path (default: ${Li}): `)).trim();return{kind:o,path:n||Li}}function Xh(e){e.command("init").description("Scaffold a starter product/product.config.ts from a named plan preset (free | starter | pro | prepaid | metered)").option("--template <kind>",`Plan preset to scaffold. One of: ${me.join(" | ")}`).option("--force","Overwrite product/product.config.ts if it already exists").option("--path <path>","Output path for the generated product config (default: ./product/product.config.ts)").option("--surface <surface>",`Initial Product SDK surface, repeatable. Available: ${Mt.join(", ")}. Default: frontend, api.`,(t,r)=>[...r,t],[]).addHelpText("after",`
234
+ `}function a_(e){let t=e.productName??"Farther Shore Product";return[{path:"frontend/package.json",content:P$(e)},{path:"frontend/index.html",content:C$(t)},{path:"frontend/src/App.tsx",content:N$()},{path:"frontend/src/styles.css",content:R$()},{path:"frontend/tsconfig.json",content:D$()},{path:"frontend/vite.config.ts",content:z$()}]}var Zi="product/product.config.ts",V$="0.8.1",B$="0.8.1";function H$(e){let t=new Set;for(let c of e.pricing.meters??[])typeof c.dimension=="string"&&t.add(c.dimension);let r=new Set,o={key:e.kind,name:e.label.split(" \u2014 ")[0]??e.label,description:e.description,...e.pricing},n=[{dimension:"requests",window:{type:"named",name:"minute"},capacity:600,enforcement:"enforce"}];r.add("requests"),e.kind==="free"&&(o.free=!0,n.push({dimension:"requests",window:{type:"named",name:"month"},capacity:1e3,enforcement:"enforce"})),o.limits=n;let i={product:{name:"my-product",displayName:"My Product",baseUrl:"https://app.example.com"},gateway:{},plans:[o]},s=new Set([...t,...r]);return s.size>0&&(i.metering={meters:[...s].map(c=>({key:c,display:X$(c)}))}),i}function G$(e){if(!e)throw new k(`--template is required. Choose one of: ${_e.join(", ")}.`,void 0,{code:"INIT_TEMPLATE_REQUIRED"});let t=e.toLowerCase();if(!_e.includes(t))throw new k(`Unknown template "${e}". Choose one of: ${_e.join(", ")}.`,void 0,{code:"INIT_TEMPLATE_UNKNOWN"});return t}function K$(e,t){let r=H$(e),o=ql(t),n=o.includes("api"),i={...r,surfaces:o.map(s=>({key:s,type:s}))};return Bl.parse({irVersion:Ui,sdkVersion:"0.0.0",product:i,routes:n?[{feature:"api",mutation_class:"contractual",routes:[{match:{method:"GET",path:"/v1/example"},metering:{defaults:{requests:1}}}]}]:[],policies:[],capabilities:[]})}function l_(e,t){return r_(K$(e,t))}function W$(e,t=Zi,r){let o=rd(t),n=u=>o==="."?u:`${o}/${u}`,i=L$(o)==="product"?rd(o):o,s=u=>i==="."?u:F$(i,u),c=a_({frontendSdkRange:B$}).map(u=>({path:s(u.path),content:u.content}));return[{path:s(".gitignore"),content:Y$()},{path:t,content:l_(e,r)},{path:n("package.json"),content:q$()},{path:n("tsconfig.json"),content:J$()},...c]}function q$(){return`${JSON.stringify({private:!0,type:"module",scripts:{build:"farthershore-manifest-build --out manifest-ir.json",validate:"farthershore-manifest-build --out manifest-ir.json"},dependencies:{"@farthershore/product":V$},devDependencies:{typescript:"^6.0.2"}},null,2)}
235
+ `}function J$(){return`${JSON.stringify({compilerOptions:{target:"ES2022",useDefineForClassFields:!0,module:"NodeNext",moduleResolution:"NodeNext",strict:!0,noEmit:!0,skipLibCheck:!0},include:["**/*.ts"]},null,2)}
236
+ `}function Y$(){return["# OS",".DS_Store","Thumbs.db","","# Dependencies and local output","product/node_modules/","product/manifest-ir.json","product/manifest-diagnostics.json","frontend/node_modules/","frontend/dist/","manifest-ir.json","manifest-diagnostics.json","","# Local env + tooling",".env",".env.local",".vscode/",".idea/",""].join(`
237
+ `)}function X$(e){return e.split("_").filter(Boolean).map(t=>t.charAt(0).toUpperCase()+t.slice(1)).join(" ")}function Q$(){return Jl().map((e,t)=>` ${t+1}) ${e.kind.padEnd(8)} \u2014 ${e.description}`).join(`
238
+ `)}function eI(e){let t=e.pricing,r=(t.meters??[]).map(n=>`${n.dimension} @ ${n.price_per_unit_micros} micros/unit`).join(", "),o=[` recurring_fee_cents ${t.recurring_fee_cents}`,` recurring credit (grant) ${Dn(t)}`,` one-time credit (grant) ${Ft(t)}`,` trial_days ${t.trial_days}`];return r&&o.push(` meters ${r}`),o.join(`
239
+ `)}async function tI(e){e.log("FartherShore init \u2014 pick a starter plan preset:"),e.log(""),e.log(Q$()),e.log("");let t=(await e.ask("Preset (number or name, blank to cancel): ")).trim();if(!t)return null;let r=Number.parseInt(t,10),o=null;if(Number.isInteger(r)&&r>=1&&r<=_e.length?o=_e[r-1]??null:_e.includes(t.toLowerCase())&&(o=t.toLowerCase()),!o)throw new k(`Unknown preset "${t}". Choose one of: ${_e.join(", ")}.`,void 0,{code:"INIT_TEMPLATE_UNKNOWN"});e.log(""),e.log(`Preview \u2014 ${Mi(o).label}:`),e.log(eI(Mi(o))),e.log("");let n=(await e.ask(`Output path (default: ${Zi}): `)).trim();return{kind:o,path:n||Zi}}function d_(e){e.command("init").description("Scaffold a starter product/product.config.ts from a named plan preset (free | starter | pro | prepaid | metered)").option("--template <kind>",`Plan preset to scaffold. One of: ${_e.join(" | ")}`).option("--force","Overwrite product/product.config.ts if it already exists").option("--path <path>","Output path for the generated product config (default: ./product/product.config.ts)").option("--surface <surface>",`Initial Product SDK surface, repeatable. Available: ${Bt.join(", ")}. Default: frontend, api.`,(t,r)=>[...r,t],[]).addHelpText("after",`
202
240
  Examples:
203
241
  farthershore init # interactive (TTY only)
204
242
  farthershore init --template free
@@ -207,26 +245,62 @@ Examples:
207
245
  farthershore init --template starter --surface frontend --surface agent
208
246
 
209
247
  Available templates:
210
- ${Bl().map(t=>` ${t.kind.padEnd(8)} ${t.description}`).join(`
248
+ ${Jl().map(t=>` ${t.kind.padEnd(8)} ${t.description}`).join(`
211
249
  `)}
212
- `).action(async t=>{let r,o=t.path;if(t.template)r=jS(t.template);else if(Wh.isTTY&&qh.isTTY){let d=DS({input:Wh,output:qh});try{let m=await a$({ask:g=>d.question(g),log:g=>{console.log(g)}});if(!m){Jt("Cancelled.");return}r=m.kind,o=o??m.path}finally{d.close()}}else throw new k(`--template is required when stdin is not a TTY. Choose one of: ${me.join(", ")}.`,void 0,{code:"INIT_TEMPLATE_REQUIRED"});let n=ji(r),i=RS(o??Li),s=zn(t);if(Kh(i)&&!t.force)throw new k(`${i} already exists. Pass --force to overwrite.`,void 0,{code:"INIT_FILE_EXISTS"});let c=LS(n,i,s),u=c.map(d=>d.path).filter(d=>Kh(d));if(u.length>0&&!t.force)throw new k(`${u[0]} already exists. Pass --force to overwrite.`,void 0,{code:"INIT_FILE_EXISTS"});for(let d of c)PS(Wl(d.path),{recursive:!0}),AS(d.path,d.content,"utf-8");let l=c.find(d=>d.path===i)?.content??Jh(n);H({template:r,path:i,surfaces:Vl(s),preset:{kind:n.kind,label:n.label},content:l,files:c},`Scaffolded ${i} from preset "${n.label}".`),Jt("Next: edit product/product.config.ts and its imported modules, then run `farthershore build`.")})}function Me(e){return JSON.stringify(e,null,2)}function ql(e,t=0){if(typeof e=="object"&&e!==null&&!Array.isArray(e)&&"__price"in e){let r=e;return r.__price==="free"?"fs.price.free()":`fs.price.${r.__price}(${r.amount})`}if(Array.isArray(e)){if(e.length===0)return"[]";let r=e.map(i=>ql(i,t+1)),o=`[${r.join(", ")}]`;if(o.length<=72&&!o.includes(`
213
- `))return o;let n=" ".repeat(t+1);return`[
214
- ${r.map(i=>`${n}${i}`).join(`,
215
- `)},
216
- ${" ".repeat(t)}]`}if(typeof e=="object"&&e!==null){let r=Object.entries(e);if(r.length===0)return"{}";let o=r.map(([s,c])=>`${s$(s)}: ${ql(c,t+1)}`),n=`{ ${o.join(", ")} }`;if(n.length<=72&&!n.includes(`
217
- `))return n;let i=" ".repeat(t+1);return`{
218
- ${o.map(s=>`${i}${s}`).join(`,
219
- `)},
220
- ${" ".repeat(t)}}`}return JSON.stringify(e)}function s$(e){return/^[A-Za-z_$][A-Za-z0-9_$]*$/.test(e)?e:JSON.stringify(e)}var c$="x-fs-surface",u$="cli",l$=["ProductApplyWorkflow","RollbackWorkflow","StripeSyncWorkflow","WebhookDispatchWorkflow"];function d$(){let e=process.env.FARTHERSHORE_API_URL;if(!e)throw new k("FARTHERSHORE_API_URL is not set. Point it at the core base URL (e.g. https://core.farthershore.com) before running `farthershore workflows`.",void 0,{code:"ADMIN_API_URL_MISSING"});return e.replace(/\/+$/,"")}function m$(){let e=process.env.FARTHERSHORE_ADMIN_SECRET;if(!e)throw new k("FARTHERSHORE_ADMIN_SECRET is not set. This command authenticates against core's /internal/admin/workflow/* proxy with the same shared secret fs-admin uses.",void 0,{code:"ADMIN_SECRET_MISSING"});return e}async function Qh(e){let t=d$(),r=m$(),o=await fetch(`${t}${e}`,{method:"GET",headers:{"content-type":"application/json","x-admin-service-secret":r,"x-admin-actor-id":"farthershore-cli",[c$]:u$}});if(!o.ok){let i=(await o.json().catch(()=>null))?.error;throw new k(i?.message??o.statusText,o.status,{code:i?.code,details:i?.details})}if(o.status!==204)return o.json()}function Xl(e){if(e==null)return"\u2014";if(e<1e3)return`${e}ms`;let t=e/1e3;if(t<60)return`${t.toFixed(1)}s`;let r=t/60;return r<60?`${r.toFixed(1)}m`:`${(r/60).toFixed(1)}h`}function e_(e,t=new Date){let r=new Date(e.startedAt).getTime(),o=e.completedAt?new Date(e.completedAt).getTime():e.failedAt?new Date(e.failedAt).getTime():t.getTime();return Math.max(0,o-r)}function Mi(e){switch(e){case"COMPLETED":case"SUCCEEDED":case"CONVERGED":return U.green;case"RUNNING":case"PENDING":case"PAUSED":case"RETRYING":case"WAITING_FOR_APPROVAL":return U.yellow;case"FAILED":case"DIVERGED":case"STALLED":case"REQUIRES_HUMAN_INTERVENTION":case"TIMEOUT":return U.red;case"ROLLED_BACK":case"CANCELLED":case"COMPENSATED":return U.magenta;default:return t=>t}}function w(e,t){return e.length<=t?e.padEnd(t):t<=1?e.slice(0,t):`${e.slice(0,t-1)}\u2026`}var Z={id:30,type:24,product:18,status:16,phase:26,started:24,duration:10};function p$(e,t=new Date){let r=U.dim([w("ID",Z.id),w("TYPE",Z.type),w("PRODUCT",Z.product),w("STATUS",Z.status),w("PHASE",Z.phase),w("STARTED",Z.started),w("DURATION",Z.duration)].join(" ")),o=U.dim(["-".repeat(Z.id),"-".repeat(Z.type),"-".repeat(Z.product),"-".repeat(Z.status),"-".repeat(Z.phase),"-".repeat(Z.started),"-".repeat(Z.duration)].join(" ")),n=e.map(i=>{let s=Xl(e_(i,t)),c=Mi(i.status)(w(i.status,Z.status));return[w(i.id,Z.id),w(i.workflowType,Z.type),w(i.productId??"\u2014",Z.product),c,w(i.currentPhase??"\u2014",Z.phase),w(i.startedAt,Z.started),w(s,Z.duration)].join(" ")});return[r,o,...n].join(`
221
- `)}function pe(e,t){let r;return t==null||t===""?r=U.dim("(unset)"):typeof t=="object"?r=JSON.stringify(t):typeof t=="string"||typeof t=="number"||typeof t=="boolean"?r=String(t):r=JSON.stringify(t),` ${U.dim(e.padEnd(20))}${r}`}var be={stepName:28,phase:26,status:14,attempt:8,duration:10},Ft={eventType:28,occurredAt:24,payload:60},Zt={surface:24,status:14,delta:60};function f$(e){if(e.length===0)return U.dim(" (no steps recorded)");let t=U.dim([w("STEP",be.stepName),w("PHASE",be.phase),w("STATUS",be.status),w("ATTEMPT",be.attempt),w("DURATION",be.duration)].join(" ")),r=e.map(o=>[w(o.stepName,be.stepName),w(o.phase,be.phase),Mi(o.status)(w(o.status,be.status)),w(String(o.attempt),be.attempt),w(Xl(o.durationMs),be.duration)].join(" "));return[t,...r].join(`
222
- `)}function g$(e){return Object.keys(e).length===0?"(empty)":JSON.stringify(e)}function h$(e){if(e.length===0)return U.dim(" (no events recorded)");let t=U.dim([w("EVENT",Ft.eventType),w("OCCURRED AT",Ft.occurredAt),w("PAYLOAD",Ft.payload)].join(" ")),r=e.map(o=>[w(o.eventType,Ft.eventType),w(o.occurredAt,Ft.occurredAt),w(g$(o.payload),Ft.payload)].join(" "));return[t,...r].join(`
223
- `)}function _$(e){if(e.length===0)return U.dim(" (no convergence state recorded)");let t=U.dim([w("SURFACE",Zt.surface),w("STATUS",Zt.status),w("DELTA",Zt.delta)].join(" ")),r=e.map(o=>[w(o.surface,Zt.surface),Mi(o.status)(w(o.status,Zt.status)),w(o.deltaDescription??"\u2014",Zt.delta)].join(" "));return[t,...r].join(`
224
- `)}function v$(e){let{execution:t,steps:r,events:o,convergence:n}=e,i=[];return i.push(U.bold(`Workflow ${t.id}`)),i.push(pe("type",t.workflowType)),i.push(pe("status",Mi(t.status)(t.status))),i.push(pe("currentPhase",t.currentPhase)),i.push(pe("startedAt",t.startedAt)),i.push(pe("completedAt",t.completedAt)),i.push(pe("triggeredBy",t.triggeredBy)),i.push(pe("correlationId",t.correlationId)),i.push(pe("productId",t.productId)),i.push(pe("duration",Xl(e_(t)))),i.push(""),i.push(U.bold("Steps")),i.push(f$(r)),i.push(""),i.push(U.bold("Events")),i.push(h$(o)),i.push(""),i.push(U.bold("Convergence")),i.push(_$(n)),t.errorReason&&(i.push(""),i.push(U.bold(U.red("Error"))),i.push(pe("reason",t.errorReason)),i.push(pe("classification",t.errorClassification))),i.join(`
225
- `)}var Yl=["RUNNING","COMPLETED","FAILED","ROLLED_BACK","STALLED","REQUIRES_HUMAN_INTERVENTION","WAITING_FOR_APPROVAL","CANCELLED"];function b$(e){if(!e)return 50;let t=Number.parseInt(e,10);if(Number.isNaN(t)||t<=0)throw new k(`--limit must be a positive integer (got "${e}")`,void 0,{code:"INVALID_LIMIT"});return t}function y$(e){let t=new URLSearchParams;if(e.status){if(!Yl.includes(e.status))throw new k(`--status must be one of: ${Yl.join(", ")} (got "${e.status}")`,void 0,{code:"INVALID_STATUS"});t.set("status",e.status)}e.type&&t.set("workflowType",e.type),e.product&&t.set("productId",e.product),t.set("limit",String(b$(e.limit)));let r=t.toString();return r?`?${r}`:""}function t_(e){let t=e.command("workflows").description("Inspect durable lifecycle workflow executions (list / show / replay)");t.command("ls").description("List workflow executions as a table").option("--status <status>",`Filter by status (one of: ${Yl.join(", ")})`).option("--type <type>",`Filter by workflow type (e.g. ${l$.join(", ")})`).option("--product <productId>","Filter by productId").option("--limit <N>","Maximum number of rows to return (default 50)").action(async r=>{let o=y$(r),n=await Qh(`/internal/admin/workflow/executions${o}`);H(n),ke()!=="json"&&(console.log(p$(n.items)),console.log(U.dim(`
226
- ${n.items.length} executions${n.nextCursor?" (more available \u2014 pass --limit to see more)":""}`)))}),t.command("show <workflowExecutionId>").description("Show a single workflow execution: header, steps, events, convergence panel").action(async r=>{let o=await Qh(`/internal/admin/workflow/executions/${encodeURIComponent(r)}`);H(o),ke()!=="json"&&console.log(v$(o))}),t.command("replay <workflowExecutionId>").description("Replay a workflow execution (or a single step). STUB in Wave 5 \u2014 operator-action endpoints land in a follow-up.").option("--step <stepName>","Replay only the named step rather than the full execution").action((r,o)=>{throw new k("Replay not yet implemented via CLI; use core's /workflow/<id>/rollback for now. Tracked in FAR-<followup>.",501,{code:"NOT_IMPLEMENTED"})})}import{spawn as x$}from"node:child_process";import{existsSync as r_}from"node:fs";import{readFile as k$}from"node:fs/promises";var S$="product/product.config.ts",$$="manifest-ir.json",n_="./product/node_modules/.bin/farthershore-manifest-build",I$="./node_modules/.bin/farthershore-manifest-build";function E$(e=r_){return e(n_)?n_:I$}async function w$(e,t=x$,r=r_){let o=E$(r),n=["--entry",e.entry,"--out",e.out],i=t(o,n,{stdio:["ignore","pipe","pipe"]}),s="",c="",u=!1;return i.stdout?.setEncoding("utf8"),i.stderr?.setEncoding("utf8"),i.stdout?.on("data",l=>{s+=l}),i.stderr?.on("data",l=>{c+=l}),new Promise(l=>{let d=(m,g)=>{u||(u=!0,l({command:o,args:n,exitCode:m,signal:g,stdout:s,stderr:c}))};i.on("error",m=>{c+=`${m.message}
227
- `,d(1,null)}),i.on("close",(m,g)=>{d(m??(g?1:0),g)})})}async function O$(e){let t=await k$(e,"utf8"),r=JSON.parse(t);if(!R$(r)||!("ir"in r))throw new Error(`${e} is not a Manifest IR envelope with an ir field`);return{ir:r.ir,irHash:typeof r.irHash=="string"?r.irHash:void 0}}function i_(e,t,r={}){e.command("build").description("Build product/product.config.ts into a Manifest IR envelope").option("--entry <path>","Product-as-code entry file (default: product/product.config.ts)").option("--out <path>","Output path for the Manifest IR envelope (default: manifest-ir.json)").addHelpText("after",`
250
+ `).action(async t=>{let r,o=t.path;if(t.template)r=G$(t.template);else if(c_.isTTY&&u_.isTTY){let d=Z$({input:c_,output:u_});try{let m=await tI({ask:g=>d.question(g),log:g=>{console.log(g)}});if(!m){He("Cancelled.");return}r=m.kind,o=o??m.path}finally{d.close()}}else throw new k(`--template is required when stdin is not a TTY. Choose one of: ${_e.join(", ")}.`,void 0,{code:"INIT_TEMPLATE_REQUIRED"});let n=Mi(r),i=M$(o??Zi),s=jn(t);if(s_(i)&&!t.force)throw new k(`${i} already exists. Pass --force to overwrite.`,void 0,{code:"INIT_FILE_EXISTS"});let c=W$(n,i,s),u=c.map(d=>d.path).filter(d=>s_(d));if(u.length>0&&!t.force)throw new k(`${u[0]} already exists. Pass --force to overwrite.`,void 0,{code:"INIT_FILE_EXISTS"});for(let d of c)U$(rd(d.path),{recursive:!0}),j$(d.path,d.content,"utf-8");let l=c.find(d=>d.path===i)?.content??l_(n,s);B({template:r,path:i,surfaces:ql(s),preset:{kind:n.kind,label:n.label},content:l,files:c},`Scaffolded ${i} from preset "${n.label}".`),He("Next: edit product/product.config.ts, then run `farthershore build`.")})}var nI="x-fs-surface",rI="cli",iI=["ProductApplyWorkflow","RollbackWorkflow","StripeSyncWorkflow","WebhookDispatchWorkflow"];function oI(){let e=process.env.FARTHERSHORE_API_URL;if(!e)throw new k("FARTHERSHORE_API_URL is not set. Point it at the core base URL (e.g. https://core.farthershore.com) before running `farthershore workflows`.",void 0,{code:"ADMIN_API_URL_MISSING"});return e.replace(/\/+$/,"")}function aI(){let e=process.env.FARTHERSHORE_ADMIN_SECRET;if(!e)throw new k("FARTHERSHORE_ADMIN_SECRET is not set. This command authenticates against core's /internal/admin/workflow/* proxy with the same shared secret fs-admin uses.",void 0,{code:"ADMIN_SECRET_MISSING"});return e}async function m_(e){let t=oI(),r=aI(),o=await fetch(`${t}${e}`,{method:"GET",headers:{"content-type":"application/json","x-admin-service-secret":r,"x-admin-actor-id":"farthershore-cli",[nI]:rI}});if(!o.ok){let i=(await o.json().catch(()=>null))?.error;throw new k(i?.message??o.statusText,o.status,{code:i?.code,details:i?.details})}if(o.status!==204)return o.json()}function od(e){if(e==null)return"\u2014";if(e<1e3)return`${e}ms`;let t=e/1e3;if(t<60)return`${t.toFixed(1)}s`;let r=t/60;return r<60?`${r.toFixed(1)}m`:`${(r/60).toFixed(1)}h`}function p_(e,t=new Date){let r=new Date(e.startedAt).getTime(),o=e.completedAt?new Date(e.completedAt).getTime():e.failedAt?new Date(e.failedAt).getTime():t.getTime();return Math.max(0,o-r)}function Vi(e){switch(e){case"COMPLETED":case"SUCCEEDED":case"CONVERGED":return j.green;case"RUNNING":case"PENDING":case"PAUSED":case"RETRYING":case"WAITING_FOR_APPROVAL":return j.yellow;case"FAILED":case"DIVERGED":case"STALLED":case"REQUIRES_HUMAN_INTERVENTION":case"TIMEOUT":return j.red;case"ROLLED_BACK":case"CANCELLED":case"COMPENSATED":return j.magenta;default:return t=>t}}function w(e,t){return e.length<=t?e.padEnd(t):t<=1?e.slice(0,t):`${e.slice(0,t-1)}\u2026`}var V={id:30,type:24,product:18,status:16,phase:26,started:24,duration:10};function sI(e,t=new Date){let r=j.dim([w("ID",V.id),w("TYPE",V.type),w("PRODUCT",V.product),w("STATUS",V.status),w("PHASE",V.phase),w("STARTED",V.started),w("DURATION",V.duration)].join(" ")),o=j.dim(["-".repeat(V.id),"-".repeat(V.type),"-".repeat(V.product),"-".repeat(V.status),"-".repeat(V.phase),"-".repeat(V.started),"-".repeat(V.duration)].join(" ")),n=e.map(i=>{let s=od(p_(i,t)),c=Vi(i.status)(w(i.status,V.status));return[w(i.id,V.id),w(i.workflowType,V.type),w(i.productId??"\u2014",V.product),c,w(i.currentPhase??"\u2014",V.phase),w(i.startedAt,V.started),w(s,V.duration)].join(" ")});return[r,o,...n].join(`
251
+ `)}function ve(e,t){let r;return t==null||t===""?r=j.dim("(unset)"):typeof t=="object"?r=JSON.stringify(t):typeof t=="string"||typeof t=="number"||typeof t=="boolean"?r=String(t):r=JSON.stringify(t),` ${j.dim(e.padEnd(20))}${r}`}var $e={stepName:28,phase:26,status:14,attempt:8,duration:10},Ht={eventType:28,occurredAt:24,payload:60},Gt={surface:24,status:14,delta:60};function cI(e){if(e.length===0)return j.dim(" (no steps recorded)");let t=j.dim([w("STEP",$e.stepName),w("PHASE",$e.phase),w("STATUS",$e.status),w("ATTEMPT",$e.attempt),w("DURATION",$e.duration)].join(" ")),r=e.map(o=>[w(o.stepName,$e.stepName),w(o.phase,$e.phase),Vi(o.status)(w(o.status,$e.status)),w(String(o.attempt),$e.attempt),w(od(o.durationMs),$e.duration)].join(" "));return[t,...r].join(`
252
+ `)}function uI(e){return Object.keys(e).length===0?"(empty)":JSON.stringify(e)}function lI(e){if(e.length===0)return j.dim(" (no events recorded)");let t=j.dim([w("EVENT",Ht.eventType),w("OCCURRED AT",Ht.occurredAt),w("PAYLOAD",Ht.payload)].join(" ")),r=e.map(o=>[w(o.eventType,Ht.eventType),w(o.occurredAt,Ht.occurredAt),w(uI(o.payload),Ht.payload)].join(" "));return[t,...r].join(`
253
+ `)}function dI(e){if(e.length===0)return j.dim(" (no convergence state recorded)");let t=j.dim([w("SURFACE",Gt.surface),w("STATUS",Gt.status),w("DELTA",Gt.delta)].join(" ")),r=e.map(o=>[w(o.surface,Gt.surface),Vi(o.status)(w(o.status,Gt.status)),w(o.deltaDescription??"\u2014",Gt.delta)].join(" "));return[t,...r].join(`
254
+ `)}function mI(e){let{execution:t,steps:r,events:o,convergence:n}=e,i=[];return i.push(j.bold(`Workflow ${t.id}`)),i.push(ve("type",t.workflowType)),i.push(ve("status",Vi(t.status)(t.status))),i.push(ve("currentPhase",t.currentPhase)),i.push(ve("startedAt",t.startedAt)),i.push(ve("completedAt",t.completedAt)),i.push(ve("triggeredBy",t.triggeredBy)),i.push(ve("correlationId",t.correlationId)),i.push(ve("productId",t.productId)),i.push(ve("duration",od(p_(t)))),i.push(""),i.push(j.bold("Steps")),i.push(cI(r)),i.push(""),i.push(j.bold("Events")),i.push(lI(o)),i.push(""),i.push(j.bold("Convergence")),i.push(dI(n)),t.errorReason&&(i.push(""),i.push(j.bold(j.red("Error"))),i.push(ve("reason",t.errorReason)),i.push(ve("classification",t.errorClassification))),i.join(`
255
+ `)}var id=["RUNNING","COMPLETED","FAILED","ROLLED_BACK","STALLED","REQUIRES_HUMAN_INTERVENTION","WAITING_FOR_APPROVAL","CANCELLED"];function pI(e){if(!e)return 50;let t=Number.parseInt(e,10);if(Number.isNaN(t)||t<=0)throw new k(`--limit must be a positive integer (got "${e}")`,void 0,{code:"INVALID_LIMIT"});return t}function fI(e){let t=new URLSearchParams;if(e.status){if(!id.includes(e.status))throw new k(`--status must be one of: ${id.join(", ")} (got "${e.status}")`,void 0,{code:"INVALID_STATUS"});t.set("status",e.status)}e.type&&t.set("workflowType",e.type),e.product&&t.set("productId",e.product),t.set("limit",String(pI(e.limit)));let r=t.toString();return r?`?${r}`:""}function f_(e){let t=e.command("workflows").description("Inspect durable lifecycle workflow executions (list / show / replay)");t.command("ls").description("List workflow executions as a table").option("--status <status>",`Filter by status (one of: ${id.join(", ")})`).option("--type <type>",`Filter by workflow type (e.g. ${iI.join(", ")})`).option("--product <productId>","Filter by productId").option("--limit <N>","Maximum number of rows to return (default 50)").action(async r=>{let o=fI(r),n=await m_(`/internal/admin/workflow/executions${o}`);B(n),le()!=="json"&&(console.log(sI(n.items)),console.log(j.dim(`
256
+ ${n.items.length} executions${n.nextCursor?" (more available \u2014 pass --limit to see more)":""}`)))}),t.command("show <workflowExecutionId>").description("Show a single workflow execution: header, steps, events, convergence panel").action(async r=>{let o=await m_(`/internal/admin/workflow/executions/${encodeURIComponent(r)}`);B(o),le()!=="json"&&console.log(mI(o))}),t.command("replay <workflowExecutionId>").description("Replay a workflow execution (or a single step). STUB in Wave 5 \u2014 operator-action endpoints land in a follow-up.").option("--step <stepName>","Replay only the named step rather than the full execution").action((r,o)=>{throw new k("Replay not yet implemented via CLI; use core's /workflow/<id>/rollback for now. Tracked in FAR-<followup>.",501,{code:"NOT_IMPLEMENTED"})})}import{spawn as gI}from"node:child_process";import{existsSync as h_}from"node:fs";import{readFile as hI}from"node:fs/promises";var _I="product/product.config.ts",vI="manifest-ir.json",g_="./product/node_modules/.bin/farthershore-manifest-build",bI="./node_modules/.bin/farthershore-manifest-build";function yI(e=h_){return e(g_)?g_:bI}async function xI(e,t=gI,r=h_){let o=yI(r),n=["--entry",e.entry,"--out",e.out],i=t(o,n,{stdio:["ignore","pipe","pipe"]}),s="",c="",u=!1;return i.stdout?.setEncoding("utf8"),i.stderr?.setEncoding("utf8"),i.stdout?.on("data",l=>{s+=l}),i.stderr?.on("data",l=>{c+=l}),new Promise(l=>{let d=(m,g)=>{u||(u=!0,l({command:o,args:n,exitCode:m,signal:g,stdout:s,stderr:c}))};i.on("error",m=>{c+=`${m.message}
257
+ `,d(1,null)}),i.on("close",(m,g)=>{d(m??(g?1:0),g)})})}async function kI(e){let t=await hI(e,"utf8"),r=JSON.parse(t);if(!OI(r)||!("ir"in r))throw new Error(`${e} is not a Manifest IR envelope with an ir field`);return{ir:r.ir,irHash:typeof r.irHash=="string"?r.irHash:void 0}}function __(e,t,r={}){e.command("build").description("Build product/product.config.ts into a Manifest IR envelope").option("--entry <path>","Product-as-code entry file (default: product/product.config.ts)").option("--out <path>","Output path for the Manifest IR envelope (default: manifest-ir.json)").addHelpText("after",`
228
258
  Examples:
229
259
  farthershore build
230
260
  farthershore build --entry product/product.config.ts --out manifest-ir.json
231
261
  farthershore build --format json
232
- `).action(async o=>{let n=e.opts(),i=Kn(n.format),s=o.entry??S$,c=o.out??$$,u=r.runLocalManifestBuild??w$,l=r.readManifestEnvelope??O$,d=await u({entry:s,out:c});T$(d,i),d.exitCode!==0&&P$(d,s,c);let m;try{m=await l(c)}catch(g){A$(g,s,c)}N$({entry:s,out:c,envelope:m})})}function T$(e,t){t!=="json"&&(e.stdout&&process.stdout.write(e.stdout),e.stderr&&process.stderr.write(e.stderr))}function P$(e,t,r){throw new k(`Manifest build failed with exit code ${e.exitCode||1}`,0,{code:"MANIFEST_BUILD_FAILED",details:{success:!1,phase:"local_build",entry:t,out:r,command:e.command,args:e.args,exitCode:e.exitCode,signal:e.signal,stdout:e.stdout,stderr:e.stderr,nextActions:["Fix product/product.config.ts and run farthershore build again"]}})}function A$(e,t,r){let o=e instanceof Error?e.message:"Manifest IR output could not be read";throw new k(o,0,{code:"MANIFEST_IR_READ_FAILED",details:{success:!1,phase:"read_manifest_ir",entry:t,out:r,errors:[{message:o}],nextActions:["Check the manifest build output path and run farthershore build again"]}})}function N$(e){H({success:!0,entry:e.entry,out:e.out,irHash:e.envelope.irHash??null,mode:null,validation:null,errors:[],warnings:[],lifecyclePlan:null,nextActions:C$()},`Manifest IR written to ${e.out}`),Jt("Commit and push product/ changes for the GitHub bot to compile and publish accepted lifecycle state.")}function C$(){return["Commit and push product/ changes; the GitHub bot will compile and publish accepted lifecycle state"]}function R$(e){return!!e&&typeof e=="object"&&!Array.isArray(e)}function o_(e,t){Ph(e,t),Ch(e,t),Rh(e,t),Lh(e,t),Mh(e,t),Fh(e,t),Zh(e,t),Vh(e,t),Gh(e,t),Xh(e),i_(e,t),t_(e)}var L$=U$(z$(import.meta.url)),M$=JSON.parse(await D$(j$(L$,"..","package.json"),"utf-8")),Fe=new fd;Fe.name("farthershore").description("FartherShore CLI \u2014 agent-friendly commands for product configuration").version(M$.version).option("--token <token>","Override auth token").option("--api-url <url>","Override API base URL").option("--format <format>","Output format. Use --format json for machine-readable agent output").option("--no-input","Never prompt; fail fast in non-interactive (agent) use");Fe.hook("preAction",(e,t)=>{Ud(Fe.opts().format),Oh(F$(t))});function F$(e){let t=[],r=e;for(;r&&r.name()&&r.name()!==Fe.name();)t.unshift(r.name()),r=r.parent;return t.join(".")||"unknown"}function Z$(){let e=xd(),t=Fe.opts(),r=$d(t.token),o=t.apiUrl??process.env.FARTHERSHORE_API_URL??e.apiUrl;return gd({apiUrl:o,token:r})}o_(Fe,Z$);Fe.exitOverride();async function V$(){try{await Fe.parseAsync(process.argv)}catch(e){if(e instanceof k)process.exitCode=Zl(e);else if(e instanceof Error){let t=e.code;t==="commander.helpDisplayed"||t==="commander.version"||e.message!=="(outputHelp)"&&(process.exitCode=Zl(new k(e.message,0)))}}}V$();
262
+ `).action(async o=>{let n=e.opts(),i=qn(n.format),s=o.entry??_I,c=o.out??vI,u=r.runLocalManifestBuild??xI,l=r.readManifestEnvelope??kI,d=await u({entry:s,out:c});SI(d,i),d.exitCode!==0&&$I(d,s,c);let m;try{m=await l(c)}catch(g){II(g,s,c)}EI({entry:s,out:c,envelope:m})})}function SI(e,t){t!=="json"&&(e.stdout&&process.stdout.write(e.stdout),e.stderr&&process.stderr.write(e.stderr))}function $I(e,t,r){throw new k(`Manifest build failed with exit code ${e.exitCode||1}`,0,{code:"MANIFEST_BUILD_FAILED",details:{success:!1,phase:"local_build",entry:t,out:r,command:e.command,args:e.args,exitCode:e.exitCode,signal:e.signal,stdout:e.stdout,stderr:e.stderr,nextActions:["Fix product/product.config.ts and run farthershore build again"]}})}function II(e,t,r){let o=e instanceof Error?e.message:"Manifest IR output could not be read";throw new k(o,0,{code:"MANIFEST_IR_READ_FAILED",details:{success:!1,phase:"read_manifest_ir",entry:t,out:r,errors:[{message:o}],nextActions:["Check the manifest build output path and run farthershore build again"]}})}function EI(e){B({success:!0,entry:e.entry,out:e.out,irHash:e.envelope.irHash??null,mode:null,validation:null,errors:[],warnings:[],lifecyclePlan:null,nextActions:wI()},`Manifest IR written to ${e.out}`),He("Commit and push product/ changes for the GitHub bot to compile and publish accepted lifecycle state.")}function wI(){return["Commit and push product/ changes; the GitHub bot will compile and publish accepted lifecycle state"]}function OI(e){return!!e&&typeof e=="object"&&!Array.isArray(e)}import{spawn as TI}from"node:child_process";import{existsSync as AI,mkdtempSync as PI,writeFileSync as CI}from"node:fs";import{tmpdir as NI}from"node:os";import{join as Bi,resolve as RI}from"node:path";function DI(e,t){let r=e.coreUrl??t.VITE_FS_CORE_URL;if(!r)throw new k("frontend preview needs a Core URL to shim window.__FS_CONFIG__ (the edge injects it in production). Pass --core-url <url> or set VITE_FS_CORE_URL.",void 0,{code:"FRONTEND_PREVIEW_CORE_URL_REQUIRED"});let o=e.clerkPublishableKey??t.VITE_CLERK_PUBLISHABLE_KEY,n=e.clerkSignInUrl??t.VITE_CLERK_SIGN_IN_URL,i=e.clerkSatelliteDomain??t.VITE_CLERK_SATELLITE_DOMAIN,s={};return o&&(s.publishableKey=o),n&&(s.signInUrl=n),i&&(s.satelliteDomain=i),{coreUrl:r,...Object.keys(s).length>0?{clerk:s}:{}}}function zI(e){return`<script>window.__FS_CONFIG__ = ${JSON.stringify(e).replace(/</g,"\\u003c")};</script>`}function UI(e){return`import { defineConfig, mergeConfig, loadConfigFromFile } from "vite";
263
+
264
+ // Generated by \`farthershore frontend preview\` \u2014 injects window.__FS_CONFIG__
265
+ // (the edge does this in production). Throwaway; safe to delete.
266
+ const FS_CONFIG_SHIM = ${JSON.stringify(e)};
267
+
268
+ export default defineConfig(async (configEnv) => {
269
+ const loaded = await loadConfigFromFile(
270
+ configEnv,
271
+ undefined,
272
+ process.cwd(),
273
+ ).catch(() => null);
274
+ const base = loaded?.config ?? {};
275
+ return mergeConfig(base, {
276
+ plugins: [
277
+ {
278
+ name: "farthershore-fs-config-shim",
279
+ transformIndexHtml(html) {
280
+ // Mirrors injectFsConfigShim() in apps/cli/src/commands/frontend.ts.
281
+ // Anchor before </head> (case-insensitive); fall back to </body>,
282
+ // then document end \u2014 a plain html.replace("</head>") was a SILENT
283
+ // no-op for a custom index.html lacking a lowercase </head>.
284
+ const headMatch = /<\\/head>/i.exec(html);
285
+ if (headMatch) {
286
+ return html.replace(headMatch[0], FS_CONFIG_SHIM + headMatch[0]);
287
+ }
288
+ const bodyMatch = /<\\/body>/i.exec(html);
289
+ if (bodyMatch) {
290
+ return html.replace(bodyMatch[0], FS_CONFIG_SHIM + bodyMatch[0]);
291
+ }
292
+ process.stderr.write(
293
+ "frontend preview: no </head> or </body> in index.html; appended the __FS_CONFIG__ shim at document end.\\n",
294
+ );
295
+ return html + FS_CONFIG_SHIM;
296
+ },
297
+ },
298
+ ],
299
+ });
300
+ });
301
+ `}function jI(e){let t=PI(Bi(NI(),"fs-frontend-preview-")),r=Bi(t,"vite.preview.config.mjs");return CI(r,e,"utf-8"),r}function LI(e,t,r={}){let o=r.existsImpl??AI,n=r.writeTempConfig??jI,i=RI(e.dir??"frontend");if(!o(Bi(i,"package.json")))throw new k(`No frontend/ project at ${i} (expected ${Bi(i,"package.json")}). Run from a product repo root, or pass --dir <path>.`,void 0,{code:"FRONTEND_PREVIEW_NO_PROJECT"});let s=DI(e,t),c=zI(s),u=UI(c),l=n(u),d=["vite","--config",l];return e.port&&d.push("--port",e.port),{cwd:i,config:s,configPath:l,command:"npx",args:d}}function v_(e,t={}){(e.commands.find(o=>o.name()==="frontend")??e.command("frontend").description("Managed Frontend Hosting: deploy/status/rollback (+ local preview)")).command("preview").alias("dev").description("Run the frontend's `vite dev` with an injected window.__FS_CONFIG__ shim so the portal renders as it serves (coreUrl + optional Clerk).").option("--dir <path>","Frontend project directory (default: ./frontend)").option("--core-url <url>","Platform Core base URL to shim (default: VITE_FS_CORE_URL)").option("--clerk-publishable-key <key>","Clerk publishable key for clerk-strategy envs (default: VITE_CLERK_PUBLISHABLE_KEY)").option("--clerk-sign-in-url <url>","Clerk hosted sign-in URL (default: VITE_CLERK_SIGN_IN_URL)").option("--clerk-satellite-domain <domain>","Clerk satellite domain (default: VITE_CLERK_SATELLITE_DOMAIN)").option("--port <port>","Dev server port (passed to vite)").addHelpText("after",`
302
+ Examples:
303
+ farthershore frontend preview --core-url http://localhost:8787
304
+ VITE_FS_CORE_URL=http://localhost:8787 farthershore frontend preview
305
+ farthershore frontend preview --dir ./frontend --port 4321
306
+ `).action(async o=>{let n=LI(o,process.env,t);if(B({action:"frontend_preview",dir:n.cwd,coreUrl:n.config.coreUrl,clerk:n.config.clerk??null,command:`${n.command} ${n.args.join(" ")}`},`Previewing ${n.cwd} with window.__FS_CONFIG__ shimmed (coreUrl ${n.config.coreUrl}).`),t.spawnVite===!1||le()==="json")return;He(`Starting vite in ${n.cwd} (window.__FS_CONFIG__ injected). Ctrl-C to stop.`);let s=(t.spawnImpl??TI)(n.command,n.args,{cwd:n.cwd,stdio:"inherit"});await new Promise(c=>{s.on("close",()=>c()),s.on("error",u=>{Gd(`vite failed to start: ${u.message}`),c()})})})}function b_(e,t){Lh(e,t),Zh(e,t),Vh(e,t),Wh(e,t),qh(e,t),Jh(e,t),Yh(e,t),Xh(e,t),t_(e,t),n_(e,t),d_(e),__(e,t),v_(e),f_(e)}var BI=ZI(MI(import.meta.url)),HI=JSON.parse(await FI(VI(BI,"..","package.json"),"utf-8")),Ve=new xd;Ve.name("farthershore").description("FartherShore CLI \u2014 agent-friendly commands for product configuration").version(HI.version).option("--token <token>","Override auth token").option("--api-url <url>","Override API base URL").option("--format <format>","Output format. Use --format json for machine-readable agent output").option("--no-input","Never prompt; fail fast in non-interactive (agent) use");Ve.hook("preAction",(e,t)=>{Bd(Ve.opts().format),Uh(GI(t))});function GI(e){let t=[],r=e;for(;r&&r.name()&&r.name()!==Ve.name();)t.unshift(r.name()),r=r.parent;return t.join(".")||"unknown"}function KI(){let e=Od(),t=Ve.opts(),r=Pd(t.token),o=t.apiUrl??process.env.FARTHERSHORE_API_URL??e.apiUrl;return kd({apiUrl:o,token:r})}b_(Ve,KI);Ve.exitOverride();async function WI(){try{await Ve.parseAsync(process.argv)}catch(e){if(e instanceof k)process.exitCode=Wl(e);else if(e instanceof Error){let t=e.code;t==="commander.helpDisplayed"||t==="commander.version"||e.message!=="(outputHelp)"&&(process.exitCode=Wl(new k(e.message,0)))}}}WI();