@mcpcloud/runtime 0.15.0 → 0.17.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/compat-stdio.js +11 -11
- package/dist/compat-worker.js +37 -37
- package/dist/config.d.ts +11 -0
- package/dist/container-host.js +7 -7
- package/dist/http.d.ts +18 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.js +49 -49
- package/dist/node.js +7 -7
- package/dist/platform-error-messages.d.ts +15 -0
- package/dist/runtimeVersion.d.ts +1 -1
- package/dist/stdio.js +20 -20
- package/dist/tool-errors.d.ts +10 -0
- package/dist/tool-input-schema.d.ts +60 -0
- package/dist/validation.d.ts +9 -0
- package/package.json +1 -1
package/dist/compat-worker.js
CHANGED
|
@@ -1,83 +1,83 @@
|
|
|
1
|
-
/*! @mcpcloud/runtime v0.
|
|
2
|
-
var mk=Object.create;var{getPrototypeOf:pk,defineProperty:Zd,getOwnPropertyNames:fk}=Object;var hk=Object.prototype.hasOwnProperty;function gk(e){return this[e]}var vk,_k,Sk=(e,t,n)=>{var o=e!=null&&typeof e==="object";if(o){var r=t?vk??=new WeakMap:_k??=new WeakMap,i=r.get(e);if(i)return i}n=e!=null?mk(pk(e)):{};let a=t||!e||!e.__esModule?Zd(n,"default",{value:e,enumerable:!0}):n;if(e&&typeof e==="object"||typeof e==="function"){for(let s of fk(e))if(!hk.call(a,s))Zd(a,s,{get:gk.bind(e,s),enumerable:!0})}if(o)r.set(e,a);return a};var D=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var yk=(e)=>e;function bk(e,t){this[e]=yk.bind(null,t)}var rr=(e,t)=>{for(var n in t)Zd(e,n,{get:t[n],enumerable:!0,configurable:!0,set:bk.bind(t,n)})};var Va=D(function(X$){Object.defineProperty(X$,"__esModule",{value:!0});X$.regexpCode=X$.getEsmExportName=X$.getProperty=X$.safeStringify=X$.stringify=X$.strConcat=X$.addCodeArg=X$.str=X$._=X$.nil=X$._Code=X$.Name=X$.IDENTIFIER=X$._CodeOrName=void 0;class id{}X$._CodeOrName=id;X$.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class Mo extends id{constructor(e){super();if(!X$.IDENTIFIER.test(e))throw Error("CodeGen: name must be a valid identifier");this.str=e}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}X$.Name=Mo;class jt extends id{constructor(e){super();this._items=typeof e==="string"?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let e=this._items[0];return e===""||e==='""'}get str(){var e;return(e=this._str)!==null&&e!==void 0?e:this._str=this._items.reduce((t,n)=>`${t}${n}`,"")}get names(){var e;return(e=this._names)!==null&&e!==void 0?e:this._names=this._items.reduce((t,n)=>{if(n instanceof Mo)t[n.str]=(t[n.str]||0)+1;return t},{})}}X$._Code=jt;X$.nil=new jt("");function W$(e,...t){let n=[e[0]],o=0;while(o<t.length)Z_(n,t[o]),n.push(e[++o]);return new jt(n)}X$._=W$;var L_=new jt("+");function Y$(e,...t){let n=[Za(e[0])],o=0;while(o<t.length)n.push(L_),Z_(n,t[o]),n.push(L_,Za(e[++o]));return UT(n),new jt(n)}X$.str=Y$;function Z_(e,t){if(t instanceof jt)e.push(...t._items);else if(t instanceof Mo)e.push(t);else e.push(ZT(t))}X$.addCodeArg=Z_;function UT(e){let t=1;while(t<e.length-1){if(e[t]===L_){let n=DT(e[t-1],e[t+1]);if(n!==void 0){e.splice(t-1,3,n);continue}e[t++]="+"}t++}}function DT(e,t){if(t==='""')return e;if(e==='""')return t;if(typeof e=="string"){if(t instanceof Mo||e[e.length-1]!=='"')return;if(typeof t!="string")return`${e.slice(0,-1)}${t}"`;if(t[0]==='"')return e.slice(0,-1)+t.slice(1);return}if(typeof t=="string"&&t[0]==='"'&&!(e instanceof Mo))return`"${e}${t.slice(1)}`;return}function LT(e,t){return t.emptyStr()?e:e.emptyStr()?t:Y$`${e}${t}`}X$.strConcat=LT;function ZT(e){return typeof e=="number"||typeof e=="boolean"||e===null?e:Za(Array.isArray(e)?e.join(","):e)}function VT(e){return new jt(Za(e))}X$.stringify=VT;function Za(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}X$.safeStringify=Za;function FT(e){return typeof e=="string"&&X$.IDENTIFIER.test(e)?new jt(`.${e}`):W$`[${e}]`}X$.getProperty=FT;function JT(e){if(typeof e=="string"&&X$.IDENTIFIER.test(e))return new jt(`${e}`);throw Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)}X$.getEsmExportName=JT;function HT(e){return new jt(e.toString())}X$.regexpCode=HT});var H_=D(function(rz){Object.defineProperty(rz,"__esModule",{value:!0});rz.ValueScope=rz.ValueScopeName=rz.Scope=rz.varKinds=rz.UsedValueState=void 0;var ot=Va();class ez extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`);this.value=e.value}}var sd;(function(e){e[e.Started=0]="Started",e[e.Completed=1]="Completed"})(sd||(rz.UsedValueState=sd={}));rz.varKinds={const:new ot.Name("const"),let:new ot.Name("let"),var:new ot.Name("var")};class F_{constructor({prefixes:e,parent:t}={}){this._names={},this._prefixes=e,this._parent=t}toName(e){return e instanceof ot.Name?e:this.name(e)}name(e){return new ot.Name(this._newName(e))}_newName(e){let t=this._names[e]||this._nameGroup(e);return`${e}${t.index++}`}_nameGroup(e){var t,n;if(((n=(t=this._parent)===null||t===void 0?void 0:t._prefixes)===null||n===void 0?void 0:n.has(e))||this._prefixes&&!this._prefixes.has(e))throw Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}}rz.Scope=F_;class J_ extends ot.Name{constructor(e,t){super(t);this.prefix=e}setValue(e,{property:t,itemIndex:n}){this.value=e,this.scopePath=ot._`.${new ot.Name(t)}[${n}]`}}rz.ValueScopeName=J_;var ij=ot._`\n`;class tz extends F_{constructor(e){super(e);this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?ij:ot.nil}}get(){return this._scope}name(e){return new J_(e,this._newName(e))}value(e,t){var n;if(t.ref===void 0)throw Error("CodeGen: ref must be passed in value");let o=this.toName(e),{prefix:r}=o,i=(n=t.key)!==null&&n!==void 0?n:t.ref,a=this._values[r];if(a){let l=a.get(i);if(l)return l}else a=this._values[r]=new Map;a.set(i,o);let s=this._scope[r]||(this._scope[r]=[]),c=s.length;return s[c]=t.ref,o.setValue(t,{property:r,itemIndex:c}),o}getValue(e,t){let n=this._values[e];if(!n)return;return n.get(t)}scopeRefs(e,t=this._values){return this._reduceValues(t,(n)=>{if(n.scopePath===void 0)throw Error(`CodeGen: name "${n}" has no value`);return ot._`${e}${n.scopePath}`})}scopeCode(e=this._values,t,n){return this._reduceValues(e,(o)=>{if(o.value===void 0)throw Error(`CodeGen: name "${o}" has no value`);return o.value.code},t,n)}_reduceValues(e,t,n={},o){let r=ot.nil;for(let i in e){let a=e[i];if(!a)continue;let s=n[i]=n[i]||new Map;a.forEach((c)=>{if(s.has(c))return;s.set(c,sd.Started);let l=t(c);if(l){let d=this.opts.es5?rz.varKinds.var:rz.varKinds.const;r=ot._`${r}${d} ${c} = ${l};${this.opts._n}`}else if(l=o===null||o===void 0?void 0:o(c))r=ot._`${r}${l}${this.opts._n}`;else throw new ez(c);s.set(c,sd.Completed)})}return r}}rz.ValueScope=tz});var ce=D(function(it){Object.defineProperty(it,"__esModule",{value:!0});it.or=it.and=it.not=it.CodeGen=it.operators=it.varKinds=it.ValueScopeName=it.ValueScope=it.Scope=it.Name=it.regexpCode=it.stringify=it.getProperty=it.nil=it.strConcat=it.str=it._=void 0;var le=Va(),Ot=H_(),Zr=Va();Object.defineProperty(it,"_",{enumerable:!0,get:function(){return Zr._}});Object.defineProperty(it,"str",{enumerable:!0,get:function(){return Zr.str}});Object.defineProperty(it,"strConcat",{enumerable:!0,get:function(){return Zr.strConcat}});Object.defineProperty(it,"nil",{enumerable:!0,get:function(){return Zr.nil}});Object.defineProperty(it,"getProperty",{enumerable:!0,get:function(){return Zr.getProperty}});Object.defineProperty(it,"stringify",{enumerable:!0,get:function(){return Zr.stringify}});Object.defineProperty(it,"regexpCode",{enumerable:!0,get:function(){return Zr.regexpCode}});Object.defineProperty(it,"Name",{enumerable:!0,get:function(){return Zr.Name}});var pd=H_();Object.defineProperty(it,"Scope",{enumerable:!0,get:function(){return pd.Scope}});Object.defineProperty(it,"ValueScope",{enumerable:!0,get:function(){return pd.ValueScope}});Object.defineProperty(it,"ValueScopeName",{enumerable:!0,get:function(){return pd.ValueScopeName}});Object.defineProperty(it,"varKinds",{enumerable:!0,get:function(){return pd.varKinds}});it.operators={GT:new le._Code(">"),GTE:new le._Code(">="),LT:new le._Code("<"),LTE:new le._Code("<="),EQ:new le._Code("==="),NEQ:new le._Code("!=="),NOT:new le._Code("!"),OR:new le._Code("||"),AND:new le._Code("&&"),ADD:new le._Code("+")};class Vr{optimizeNodes(){return this}optimizeNames(e,t){return this}}class oz extends Vr{constructor(e,t,n){super();this.varKind=e,this.name=t,this.rhs=n}render({es5:e,_n:t}){let n=e?Ot.varKinds.var:this.varKind,o=this.rhs===void 0?"":` = ${this.rhs}`;return`${n} ${this.name}${o};`+t}optimizeNames(e,t){if(!e[this.name.str])return;if(this.rhs)this.rhs=Do(this.rhs,e,t);return this}get names(){return this.rhs instanceof le._CodeOrName?this.rhs.names:{}}}class B_ extends Vr{constructor(e,t,n){super();this.lhs=e,this.rhs=t,this.sideEffects=n}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,t){if(this.lhs instanceof le.Name&&!e[this.lhs.str]&&!this.sideEffects)return;return this.rhs=Do(this.rhs,e,t),this}get names(){let e=this.lhs instanceof le.Name?{}:{...this.lhs.names};return md(e,this.rhs)}}class iz extends B_{constructor(e,t,n,o){super(e,n,o);this.op=t}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}}class az extends Vr{constructor(e){super();this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}}class sz extends Vr{constructor(e){super();this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}}class cz extends Vr{constructor(e){super();this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}}class lz extends Vr{constructor(e){super();this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,t){return this.code=Do(this.code,e,t),this}get names(){return this.code instanceof le._CodeOrName?this.code.names:{}}}class fd extends Vr{constructor(e=[]){super();this.nodes=e}render(e){return this.nodes.reduce((t,n)=>t+n.render(e),"")}optimizeNodes(){let{nodes:e}=this,t=e.length;while(t--){let n=e[t].optimizeNodes();if(Array.isArray(n))e.splice(t,1,...n);else if(n)e[t]=n;else e.splice(t,1)}return e.length>0?this:void 0}optimizeNames(e,t){let{nodes:n}=this,o=n.length;while(o--){let r=n[o];if(r.optimizeNames(e,t))continue;lj(e,r.names),n.splice(o,1)}return n.length>0?this:void 0}get names(){return this.nodes.reduce((e,t)=>wn(e,t.names),{})}}class Fr extends fd{render(e){return"{"+e._n+super.render(e)+"}"+e._n}}class uz extends fd{}class Fa extends Fr{}Fa.kind="else";class mr extends Fr{constructor(e,t){super(t);this.condition=e}render(e){let t=`if(${this.condition})`+super.render(e);if(this.else)t+="else "+this.else.render(e);return t}optimizeNodes(){super.optimizeNodes();let e=this.condition;if(e===!0)return this.nodes;let t=this.else;if(t){let n=t.optimizeNodes();t=this.else=Array.isArray(n)?new Fa(n):n}if(t){if(e===!1)return t instanceof mr?t:t.nodes;if(this.nodes.length)return this;return new mr(hz(e),t instanceof mr?[t]:t.nodes)}if(e===!1||!this.nodes.length)return;return this}optimizeNames(e,t){var n;if(this.else=(n=this.else)===null||n===void 0?void 0:n.optimizeNames(e,t),!(super.optimizeNames(e,t)||this.else))return;return this.condition=Do(this.condition,e,t),this}get names(){let e=super.names;if(md(e,this.condition),this.else)wn(e,this.else.names);return e}}mr.kind="if";class Uo extends Fr{}Uo.kind="for";class dz extends Uo{constructor(e){super();this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,t){if(!super.optimizeNames(e,t))return;return this.iteration=Do(this.iteration,e,t),this}get names(){return wn(super.names,this.iteration.names)}}class mz extends Uo{constructor(e,t,n,o){super();this.varKind=e,this.name=t,this.from=n,this.to=o}render(e){let t=e.es5?Ot.varKinds.var:this.varKind,{name:n,from:o,to:r}=this;return`for(${t} ${n}=${o}; ${n}<${r}; ${n}++)`+super.render(e)}get names(){let e=md(super.names,this.from);return md(e,this.to)}}class K_ extends Uo{constructor(e,t,n,o){super();this.loop=e,this.varKind=t,this.name=n,this.iterable=o}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,t){if(!super.optimizeNames(e,t))return;return this.iterable=Do(this.iterable,e,t),this}get names(){return wn(super.names,this.iterable.names)}}class cd extends Fr{constructor(e,t,n){super();this.name=e,this.args=t,this.async=n}render(e){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(e)}}cd.kind="func";class ld extends fd{render(e){return"return "+super.render(e)}}ld.kind="return";class pz extends Fr{render(e){let t="try"+super.render(e);if(this.catch)t+=this.catch.render(e);if(this.finally)t+=this.finally.render(e);return t}optimizeNodes(){var e,t;return super.optimizeNodes(),(e=this.catch)===null||e===void 0||e.optimizeNodes(),(t=this.finally)===null||t===void 0||t.optimizeNodes(),this}optimizeNames(e,t){var n,o;return super.optimizeNames(e,t),(n=this.catch)===null||n===void 0||n.optimizeNames(e,t),(o=this.finally)===null||o===void 0||o.optimizeNames(e,t),this}get names(){let e=super.names;if(this.catch)wn(e,this.catch.names);if(this.finally)wn(e,this.finally.names);return e}}class ud extends Fr{constructor(e){super();this.error=e}render(e){return`catch(${this.error})`+super.render(e)}}ud.kind="catch";class dd extends Fr{render(e){return"finally"+super.render(e)}}dd.kind="finally";class fz{constructor(e,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...t,_n:t.lines?`
|
|
3
|
-
`:""},this._extScope=e,this._scope=new Ot.Scope({parent:e}),this._nodes=[new uz]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,t){let n=this._extScope.value(e,t);return(this._values[n.prefix]||(this._values[n.prefix]=new Set)).add(n),n}getScopeValue(e,t){return this._extScope.getValue(e,t)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,t,n,o){let r=this._scope.toName(t);if(n!==void 0&&o)this._constants[r.str]=n;return this._leafNode(new oz(e,r,n)),r}const(e,t,n){return this._def(Ot.varKinds.const,e,t,n)}let(e,t,n){return this._def(Ot.varKinds.let,e,t,n)}var(e,t,n){return this._def(Ot.varKinds.var,e,t,n)}assign(e,t,n){return this._leafNode(new B_(e,t,n))}add(e,t){return this._leafNode(new iz(e,it.operators.ADD,t))}code(e){if(typeof e=="function")e();else if(e!==le.nil)this._leafNode(new lz(e));return this}object(...e){let t=["{"];for(let[n,o]of e){if(t.length>1)t.push(",");if(t.push(n),n!==o||this.opts.es5)t.push(":"),(0,le.addCodeArg)(t,o)}return t.push("}"),new le._Code(t)}if(e,t,n){if(this._blockNode(new mr(e)),t&&n)this.code(t).else().code(n).endIf();else if(t)this.code(t).endIf();else if(n)throw Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new mr(e))}else(){return this._elseNode(new Fa)}endIf(){return this._endBlockNode(mr,Fa)}_for(e,t){if(this._blockNode(e),t)this.code(t).endFor();return this}for(e,t){return this._for(new dz(e),t)}forRange(e,t,n,o,r=this.opts.es5?Ot.varKinds.var:Ot.varKinds.let){let i=this._scope.toName(e);return this._for(new mz(r,i,t,n),()=>o(i))}forOf(e,t,n,o=Ot.varKinds.const){let r=this._scope.toName(e);if(this.opts.es5){let i=t instanceof le.Name?t:this.var("_arr",t);return this.forRange("_i",0,le._`${i}.length`,(a)=>{this.var(r,le._`${i}[${a}]`),n(r)})}return this._for(new K_("of",o,r,t),()=>n(r))}forIn(e,t,n,o=this.opts.es5?Ot.varKinds.var:Ot.varKinds.const){if(this.opts.ownProperties)return this.forOf(e,le._`Object.keys(${t})`,n);let r=this._scope.toName(e);return this._for(new K_("in",o,r,t),()=>n(r))}endFor(){return this._endBlockNode(Uo)}label(e){return this._leafNode(new az(e))}break(e){return this._leafNode(new sz(e))}return(e){let t=new ld;if(this._blockNode(t),this.code(e),t.nodes.length!==1)throw Error('CodeGen: "return" should have one node');return this._endBlockNode(ld)}try(e,t,n){if(!t&&!n)throw Error('CodeGen: "try" without "catch" and "finally"');let o=new pz;if(this._blockNode(o),this.code(e),t){let r=this.name("e");this._currNode=o.catch=new ud(r),t(r)}if(n)this._currNode=o.finally=new dd,this.code(n);return this._endBlockNode(ud,dd)}throw(e){return this._leafNode(new cz(e))}block(e,t){if(this._blockStarts.push(this._nodes.length),e)this.code(e).endBlock(t);return this}endBlock(e){let t=this._blockStarts.pop();if(t===void 0)throw Error("CodeGen: not in self-balancing block");let n=this._nodes.length-t;if(n<0||e!==void 0&&n!==e)throw Error(`CodeGen: wrong number of nodes: ${n} vs ${e} expected`);return this._nodes.length=t,this}func(e,t=le.nil,n,o){if(this._blockNode(new cd(e,t,n)),o)this.code(o).endFunc();return this}endFunc(){return this._endBlockNode(cd)}optimize(e=1){while(e-- >0)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,t){let n=this._currNode;if(n instanceof e||t&&n instanceof t)return this._nodes.pop(),this;throw Error(`CodeGen: not in block "${t?`${e.kind}/${t.kind}`:e.kind}"`)}_elseNode(e){let t=this._currNode;if(!(t instanceof mr))throw Error('CodeGen: "else" without "if"');return this._currNode=t.else=e,this}get _root(){return this._nodes[0]}get _currNode(){let e=this._nodes;return e[e.length-1]}set _currNode(e){let t=this._nodes;t[t.length-1]=e}}it.CodeGen=fz;function wn(e,t){for(let n in t)e[n]=(e[n]||0)+(t[n]||0);return e}function md(e,t){return t instanceof le._CodeOrName?wn(e,t.names):e}function Do(e,t,n){if(e instanceof le.Name)return o(e);if(!r(e))return e;return new le._Code(e._items.reduce((i,a)=>{if(a instanceof le.Name)a=o(a);if(a instanceof le._Code)i.push(...a._items);else i.push(a);return i},[]));function o(i){let a=n[i.str];if(a===void 0||t[i.str]!==1)return i;return delete t[i.str],a}function r(i){return i instanceof le._Code&&i._items.some((a)=>a instanceof le.Name&&t[a.str]===1&&n[a.str]!==void 0)}}function lj(e,t){for(let n in t)e[n]=(e[n]||0)-(t[n]||0)}function hz(e){return typeof e=="boolean"||typeof e=="number"||e===null?!e:le._`!${G_(e)}`}it.not=hz;var uj=gz(it.operators.AND);function dj(...e){return e.reduce(uj)}it.and=dj;var mj=gz(it.operators.OR);function pj(...e){return e.reduce(mj)}it.or=pj;function gz(e){return(t,n)=>t===le.nil?n:n===le.nil?t:le._`${G_(t)} ${e} ${G_(n)}`}function G_(e){return e instanceof le.Name?e:le._`(${e})`}});var de=D(function(Rz){Object.defineProperty(Rz,"__esModule",{value:!0});Rz.checkStrictMode=Rz.getErrorPath=Rz.Type=Rz.useFunc=Rz.setEvaluated=Rz.evaluatedPropsToName=Rz.mergeEvaluated=Rz.eachItem=Rz.unescapeJsonPointer=Rz.escapeJsonPointer=Rz.escapeFragment=Rz.unescapeFragment=Rz.schemaRefOrVal=Rz.schemaHasRulesButRef=Rz.schemaHasRules=Rz.checkUnknownRules=Rz.alwaysValidSchema=Rz.toHash=void 0;var ve=ce(),vj=Va();function _j(e){let t={};for(let n of e)t[n]=!0;return t}Rz.toHash=_j;function Sj(e,t){if(typeof t=="boolean")return t;if(Object.keys(t).length===0)return!0;return yz(e,t),!bz(t,e.self.RULES.all)}Rz.alwaysValidSchema=Sj;function yz(e,t=e.schema){let{opts:n,self:o}=e;if(!n.strictSchema)return;if(typeof t==="boolean")return;let r=o.RULES.keywords;for(let i in t)if(!r[i])wz(e,`unknown keyword: "${i}"`)}Rz.checkUnknownRules=yz;function bz(e,t){if(typeof e=="boolean")return!e;for(let n in e)if(t[n])return!0;return!1}Rz.schemaHasRules=bz;function yj(e,t){if(typeof e=="boolean")return!e;for(let n in e)if(n!=="$ref"&&t.all[n])return!0;return!1}Rz.schemaHasRulesButRef=yj;function bj({topSchemaRef:e,schemaPath:t},n,o,r){if(!r){if(typeof n=="number"||typeof n=="boolean")return n;if(typeof n=="string")return ve._`${n}`}return ve._`${e}${t}${(0,ve.getProperty)(o)}`}Rz.schemaRefOrVal=bj;function $j(e){return $z(decodeURIComponent(e))}Rz.unescapeFragment=$j;function zj(e){return encodeURIComponent(Y_(e))}Rz.escapeFragment=zj;function Y_(e){if(typeof e=="number")return`${e}`;return e.replace(/~/g,"~0").replace(/\//g,"~1")}Rz.escapeJsonPointer=Y_;function $z(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}Rz.unescapeJsonPointer=$z;function wj(e,t){if(Array.isArray(e))for(let n of e)t(n);else t(e)}Rz.eachItem=wj;function _z({mergeNames:e,mergeToName:t,mergeValues:n,resultToName:o}){return(r,i,a,s)=>{let c=a===void 0?i:a instanceof ve.Name?(i instanceof ve.Name?e(r,i,a):t(r,i,a),a):i instanceof ve.Name?(t(r,a,i),i):n(i,a);return s===ve.Name&&!(c instanceof ve.Name)?o(r,c):c}}Rz.mergeEvaluated={props:_z({mergeNames:(e,t,n)=>e.if(ve._`${n} !== true && ${t} !== undefined`,()=>{e.if(ve._`${t} === true`,()=>e.assign(n,!0),()=>e.assign(n,ve._`${n} || {}`).code(ve._`Object.assign(${n}, ${t})`))}),mergeToName:(e,t,n)=>e.if(ve._`${n} !== true`,()=>{if(t===!0)e.assign(n,!0);else e.assign(n,ve._`${n} || {}`),X_(e,n,t)}),mergeValues:(e,t)=>e===!0?!0:{...e,...t},resultToName:zz}),items:_z({mergeNames:(e,t,n)=>e.if(ve._`${n} !== true && ${t} !== undefined`,()=>e.assign(n,ve._`${t} === true ? true : ${n} > ${t} ? ${n} : ${t}`)),mergeToName:(e,t,n)=>e.if(ve._`${n} !== true`,()=>e.assign(n,t===!0?!0:ve._`${n} > ${t} ? ${n} : ${t}`)),mergeValues:(e,t)=>e===!0?!0:Math.max(e,t),resultToName:(e,t)=>e.var("items",t)})};function zz(e,t){if(t===!0)return e.var("props",!0);let n=e.var("props",ve._`{}`);if(t!==void 0)X_(e,n,t);return n}Rz.evaluatedPropsToName=zz;function X_(e,t,n){Object.keys(n).forEach((o)=>e.assign(ve._`${t}${(0,ve.getProperty)(o)}`,!0))}Rz.setEvaluated=X_;var Sz={};function Rj(e,t){return e.scopeValue("func",{ref:t,code:Sz[t.code]||(Sz[t.code]=new vj._Code(t.code))})}Rz.useFunc=Rj;var W_;(function(e){e[e.Num=0]="Num",e[e.Str=1]="Str"})(W_||(Rz.Type=W_={}));function xj(e,t,n){if(e instanceof ve.Name){let o=t===W_.Num;return n?o?ve._`"[" + ${e} + "]"`:ve._`"['" + ${e} + "']"`:o?ve._`"/" + ${e}`:ve._`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return n?(0,ve.getProperty)(e).toString():"/"+Y_(e)}Rz.getErrorPath=xj;function wz(e,t,n=e.opts.strictSchema){if(!n)return;if(t=`strict mode: ${t}`,n===!0)throw Error(t);e.self.logger.warn(t)}Rz.checkStrictMode=wz});var pr=D(function(kz){Object.defineProperty(kz,"__esModule",{value:!0});var De=ce(),Fj={data:new De.Name("data"),valCxt:new De.Name("valCxt"),instancePath:new De.Name("instancePath"),parentData:new De.Name("parentData"),parentDataProperty:new De.Name("parentDataProperty"),rootData:new De.Name("rootData"),dynamicAnchors:new De.Name("dynamicAnchors"),vErrors:new De.Name("vErrors"),errors:new De.Name("errors"),this:new De.Name("this"),self:new De.Name("self"),scope:new De.Name("scope"),json:new De.Name("json"),jsonPos:new De.Name("jsonPos"),jsonLen:new De.Name("jsonLen"),jsonPart:new De.Name("jsonPart")};kz.default=Fj});var Ja=D(function(Tz){Object.defineProperty(Tz,"__esModule",{value:!0});Tz.extendErrors=Tz.resetErrorsCount=Tz.reportExtraError=Tz.reportError=Tz.keyword$DataError=Tz.keywordError=void 0;var me=ce(),gd=de(),Be=pr();Tz.keywordError={message:({keyword:e})=>me.str`must pass "${e}" keyword validation`};Tz.keyword$DataError={message:({keyword:e,schemaType:t})=>t?me.str`"${e}" keyword must be ${t} ($data)`:me.str`"${e}" keyword is invalid ($data)`};function Hj(e,t=Tz.keywordError,n,o){let{it:r}=e,{gen:i,compositeRule:a,allErrors:s}=r,c=Ez(e,t,n);if(o!==null&&o!==void 0?o:a||s)Iz(i,c);else Pz(r,me._`[${c}]`)}Tz.reportError=Hj;function Kj(e,t=Tz.keywordError,n){let{it:o}=e,{gen:r,compositeRule:i,allErrors:a}=o,s=Ez(e,t,n);if(Iz(r,s),!(i||a))Pz(o,Be.default.vErrors)}Tz.reportExtraError=Kj;function Gj(e,t){e.assign(Be.default.errors,t),e.if(me._`${Be.default.vErrors} !== null`,()=>e.if(t,()=>e.assign(me._`${Be.default.vErrors}.length`,t),()=>e.assign(Be.default.vErrors,null)))}Tz.resetErrorsCount=Gj;function Bj({gen:e,keyword:t,schemaValue:n,data:o,errsCount:r,it:i}){if(r===void 0)throw Error("ajv implementation error");let a=e.name("err");e.forRange("i",r,Be.default.errors,(s)=>{if(e.const(a,me._`${Be.default.vErrors}[${s}]`),e.if(me._`${a}.instancePath === undefined`,()=>e.assign(me._`${a}.instancePath`,(0,me.strConcat)(Be.default.instancePath,i.errorPath))),e.assign(me._`${a}.schemaPath`,me.str`${i.errSchemaPath}/${t}`),i.opts.verbose)e.assign(me._`${a}.schema`,n),e.assign(me._`${a}.data`,o)})}Tz.extendErrors=Bj;function Iz(e,t){let n=e.const("err",t);e.if(me._`${Be.default.vErrors} === null`,()=>e.assign(Be.default.vErrors,me._`[${n}]`),me._`${Be.default.vErrors}.push(${n})`),e.code(me._`${Be.default.errors}++`)}function Pz(e,t){let{gen:n,validateName:o,schemaEnv:r}=e;if(r.$async)n.throw(me._`new ${e.ValidationError}(${t})`);else n.assign(me._`${o}.errors`,t),n.return(!1)}var Rn={keyword:new me.Name("keyword"),schemaPath:new me.Name("schemaPath"),params:new me.Name("params"),propertyName:new me.Name("propertyName"),message:new me.Name("message"),schema:new me.Name("schema"),parentSchema:new me.Name("parentSchema")};function Ez(e,t,n){let{createErrors:o}=e.it;if(o===!1)return me._`{}`;return Wj(e,t,n)}function Wj(e,t,n={}){let{gen:o,it:r}=e,i=[Yj(r,n),Xj(e,n)];return Qj(e,t,i),o.object(...i)}function Yj({errorPath:e},{instancePath:t}){let n=t?me.str`${e}${(0,gd.getErrorPath)(t,gd.Type.Str)}`:e;return[Be.default.instancePath,(0,me.strConcat)(Be.default.instancePath,n)]}function Xj({keyword:e,it:{errSchemaPath:t}},{schemaPath:n,parentSchema:o}){let r=o?t:me.str`${t}/${e}`;if(n)r=me.str`${r}${(0,gd.getErrorPath)(n,gd.Type.Str)}`;return[Rn.schemaPath,r]}function Qj(e,{params:t,message:n},o){let{keyword:r,data:i,schemaValue:a,it:s}=e,{opts:c,propertyName:l,topSchemaRef:d,schemaPath:m}=s;if(o.push([Rn.keyword,r],[Rn.params,typeof t=="function"?t(e):t||me._`{}`]),c.messages)o.push([Rn.message,typeof n=="function"?n(e):n]);if(c.verbose)o.push([Rn.schema,a],[Rn.parentSchema,me._`${d}${m}`],[Be.default.data,i]);if(l)o.push([Rn.propertyName,l])}});var qz=D(function(Nz){Object.defineProperty(Nz,"__esModule",{value:!0});Nz.boolOrEmptySchema=Nz.topBoolOrEmptySchema=void 0;var oO=Ja(),iO=ce(),aO=pr(),sO={message:"boolean schema is false"};function cO(e){let{gen:t,schema:n,validateName:o}=e;if(n===!1)Oz(e,!1);else if(typeof n=="object"&&n.$async===!0)t.return(aO.default.data);else t.assign(iO._`${o}.errors`,null),t.return(!0)}Nz.topBoolOrEmptySchema=cO;function lO(e,t){let{gen:n,schema:o}=e;if(o===!1)n.var(t,!1),Oz(e);else n.var(t,!0)}Nz.boolOrEmptySchema=lO;function Oz(e,t){let{gen:n,data:o}=e,r={gen:n,keyword:"false schema",data:o,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,oO.reportError)(r,sO,void 0,t)}});var eS=D(function(Az){Object.defineProperty(Az,"__esModule",{value:!0});Az.getRules=Az.isJSONType=void 0;var dO=["string","number","integer","boolean","null","object","array"],mO=new Set(dO);function pO(e){return typeof e=="string"&&mO.has(e)}Az.isJSONType=pO;function fO(){let e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}Az.getRules=fO});var tS=D(function(Lz){Object.defineProperty(Lz,"__esModule",{value:!0});Lz.shouldUseRule=Lz.shouldUseGroup=Lz.schemaHasRulesForType=void 0;function gO({schema:e,self:t},n){let o=t.RULES.types[n];return o&&o!==!0&&Uz(e,o)}Lz.schemaHasRulesForType=gO;function Uz(e,t){return t.rules.some((n)=>Dz(e,n))}Lz.shouldUseGroup=Uz;function Dz(e,t){var n;return e[t.keyword]!==void 0||((n=t.definition.implements)===null||n===void 0?void 0:n.some((o)=>e[o]!==void 0))}Lz.shouldUseRule=Dz});var Ha=D(function(Hz){Object.defineProperty(Hz,"__esModule",{value:!0});Hz.reportTypeError=Hz.checkDataTypes=Hz.checkDataType=Hz.coerceAndCheckDataType=Hz.getJSONTypes=Hz.getSchemaTypes=Hz.DataType=void 0;var SO=eS(),yO=tS(),bO=Ja(),ie=ce(),Vz=de(),Lo;(function(e){e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong"})(Lo||(Hz.DataType=Lo={}));function $O(e){let t=Fz(e.type);if(t.includes("null")){if(e.nullable===!1)throw Error("type: null contradicts nullable: false")}else{if(!t.length&&e.nullable!==void 0)throw Error('"nullable" cannot be used without "type"');if(e.nullable===!0)t.push("null")}return t}Hz.getSchemaTypes=$O;function Fz(e){let t=Array.isArray(e)?e:e?[e]:[];if(t.every(SO.isJSONType))return t;throw Error("type must be JSONType or JSONType[]: "+t.join(","))}Hz.getJSONTypes=Fz;function zO(e,t){let{gen:n,data:o,opts:r}=e,i=wO(t,r.coerceTypes),a=t.length>0&&!(i.length===0&&t.length===1&&(0,yO.schemaHasRulesForType)(e,t[0]));if(a){let s=nS(t,o,r.strictNumbers,Lo.Wrong);n.if(s,()=>{if(i.length)RO(e,t,i);else oS(e)})}return a}Hz.coerceAndCheckDataType=zO;var Jz=new Set(["string","number","integer","boolean","null"]);function wO(e,t){return t?e.filter((n)=>Jz.has(n)||t==="array"&&n==="array"):[]}function RO(e,t,n){let{gen:o,data:r,opts:i}=e,a=o.let("dataType",ie._`typeof ${r}`),s=o.let("coerced",ie._`undefined`);if(i.coerceTypes==="array")o.if(ie._`${a} == 'object' && Array.isArray(${r}) && ${r}.length == 1`,()=>o.assign(r,ie._`${r}[0]`).assign(a,ie._`typeof ${r}`).if(nS(t,r,i.strictNumbers),()=>o.assign(s,r)));o.if(ie._`${s} !== undefined`);for(let l of n)if(Jz.has(l)||l==="array"&&i.coerceTypes==="array")c(l);o.else(),oS(e),o.endIf(),o.if(ie._`${s} !== undefined`,()=>{o.assign(r,s),xO(e,s)});function c(l){switch(l){case"string":o.elseIf(ie._`${a} == "number" || ${a} == "boolean"`).assign(s,ie._`"" + ${r}`).elseIf(ie._`${r} === null`).assign(s,ie._`""`);return;case"number":o.elseIf(ie._`${a} == "boolean" || ${r} === null
|
|
1
|
+
/*! @mcpcloud/runtime v0.17.2 — (c) MCPCloud.sh. All rights reserved. SEE LICENSE: https://www.npmjs.com/package/@mcpcloud/runtime */
|
|
2
|
+
var wk=Object.create;var{getPrototypeOf:Rk,defineProperty:Hd,getOwnPropertyNames:xk}=Object;var CS=Object.prototype.hasOwnProperty;function kk(e){return this[e]}var Ik,Pk,Ek=(e,t,n)=>{var o=e!=null&&typeof e==="object";if(o){var r=t?Ik??=new WeakMap:Pk??=new WeakMap,i=r.get(e);if(i)return i}n=e!=null?wk(Rk(e)):{};let a=t||!e||!e.__esModule||!CS.call(e,"default")?Hd(n,"default",{value:e,enumerable:!0}):n;if(e&&typeof e==="object"||typeof e==="function"){for(let s of xk(e))if(!CS.call(a,s))Hd(a,s,{get:kk.bind(e,s),enumerable:!0})}if(o)r.set(e,a);return a};var U=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Tk=(e)=>e;function jk(e,t){this[e]=Tk.bind(null,t)}var tr=(e,t)=>{for(var n in t)Hd(e,n,{get:t[n],enumerable:!0,configurable:!0,set:jk.bind(t,n)})};var Va=U(function(uz){Object.defineProperty(uz,"__esModule",{value:!0});uz.regexpCode=uz.getEsmExportName=uz.getProperty=uz.safeStringify=uz.stringify=uz.strConcat=uz.addCodeArg=uz.str=uz._=uz.nil=uz._Code=uz.Name=uz.IDENTIFIER=uz._CodeOrName=void 0;class ld{}uz._CodeOrName=ld;uz.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class Uo extends ld{constructor(e){super();if(!uz.IDENTIFIER.test(e))throw Error("CodeGen: name must be a valid identifier");this.str=e}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}uz.Name=Uo;class Et extends ld{constructor(e){super();this._items=typeof e==="string"?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let e=this._items[0];return e===""||e==='""'}get str(){var e;return(e=this._str)!==null&&e!==void 0?e:this._str=this._items.reduce((t,n)=>`${t}${n}`,"")}get names(){var e;return(e=this._names)!==null&&e!==void 0?e:this._names=this._items.reduce((t,n)=>{if(n instanceof Uo)t[n.str]=(t[n.str]||0)+1;return t},{})}}uz._Code=Et;uz.nil=new Et("");function cz(e,...t){let n=[e[0]],o=0;while(o<t.length)Z_(n,t[o]),n.push(e[++o]);return new Et(n)}uz._=cz;var L_=new Et("+");function lz(e,...t){let n=[Za(e[0])],o=0;while(o<t.length)n.push(L_),Z_(n,t[o]),n.push(L_,Za(e[++o]));return UT(n),new Et(n)}uz.str=lz;function Z_(e,t){if(t instanceof Et)e.push(...t._items);else if(t instanceof Uo)e.push(t);else e.push(ZT(t))}uz.addCodeArg=Z_;function UT(e){let t=1;while(t<e.length-1){if(e[t]===L_){let n=DT(e[t-1],e[t+1]);if(n!==void 0){e.splice(t-1,3,n);continue}e[t++]="+"}t++}}function DT(e,t){if(t==='""')return e;if(e==='""')return t;if(typeof e=="string"){if(t instanceof Uo||e[e.length-1]!=='"')return;if(typeof t!="string")return`${e.slice(0,-1)}${t}"`;if(t[0]==='"')return e.slice(0,-1)+t.slice(1);return}if(typeof t=="string"&&t[0]==='"'&&!(e instanceof Uo))return`"${e}${t.slice(1)}`;return}function LT(e,t){return t.emptyStr()?e:e.emptyStr()?t:lz`${e}${t}`}uz.strConcat=LT;function ZT(e){return typeof e=="number"||typeof e=="boolean"||e===null?e:Za(Array.isArray(e)?e.join(","):e)}function VT(e){return new Et(Za(e))}uz.stringify=VT;function Za(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}uz.safeStringify=Za;function FT(e){return typeof e=="string"&&uz.IDENTIFIER.test(e)?new Et(`.${e}`):cz`[${e}]`}uz.getProperty=FT;function JT(e){if(typeof e=="string"&&uz.IDENTIFIER.test(e))return new Et(`${e}`);throw Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)}uz.getEsmExportName=JT;function HT(e){return new Et(e.toString())}uz.regexpCode=HT});var H_=U(function(fz){Object.defineProperty(fz,"__esModule",{value:!0});fz.ValueScope=fz.ValueScopeName=fz.Scope=fz.varKinds=fz.UsedValueState=void 0;var ot=Va();class mz extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`);this.value=e.value}}var dd;(function(e){e[e.Started=0]="Started",e[e.Completed=1]="Completed"})(dd||(fz.UsedValueState=dd={}));fz.varKinds={const:new ot.Name("const"),let:new ot.Name("let"),var:new ot.Name("var")};class F_{constructor({prefixes:e,parent:t}={}){this._names={},this._prefixes=e,this._parent=t}toName(e){return e instanceof ot.Name?e:this.name(e)}name(e){return new ot.Name(this._newName(e))}_newName(e){let t=this._names[e]||this._nameGroup(e);return`${e}${t.index++}`}_nameGroup(e){var t,n;if(((n=(t=this._parent)===null||t===void 0?void 0:t._prefixes)===null||n===void 0?void 0:n.has(e))||this._prefixes&&!this._prefixes.has(e))throw Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}}fz.Scope=F_;class J_ extends ot.Name{constructor(e,t){super(t);this.prefix=e}setValue(e,{property:t,itemIndex:n}){this.value=e,this.scopePath=ot._`.${new ot.Name(t)}[${n}]`}}fz.ValueScopeName=J_;var i1=ot._`\n`;class pz extends F_{constructor(e){super(e);this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?i1:ot.nil}}get(){return this._scope}name(e){return new J_(e,this._newName(e))}value(e,t){var n;if(t.ref===void 0)throw Error("CodeGen: ref must be passed in value");let o=this.toName(e),{prefix:r}=o,i=(n=t.key)!==null&&n!==void 0?n:t.ref,a=this._values[r];if(a){let l=a.get(i);if(l)return l}else a=this._values[r]=new Map;a.set(i,o);let s=this._scope[r]||(this._scope[r]=[]),c=s.length;return s[c]=t.ref,o.setValue(t,{property:r,itemIndex:c}),o}getValue(e,t){let n=this._values[e];if(!n)return;return n.get(t)}scopeRefs(e,t=this._values){return this._reduceValues(t,(n)=>{if(n.scopePath===void 0)throw Error(`CodeGen: name "${n}" has no value`);return ot._`${e}${n.scopePath}`})}scopeCode(e=this._values,t,n){return this._reduceValues(e,(o)=>{if(o.value===void 0)throw Error(`CodeGen: name "${o}" has no value`);return o.value.code},t,n)}_reduceValues(e,t,n={},o){let r=ot.nil;for(let i in e){let a=e[i];if(!a)continue;let s=n[i]=n[i]||new Map;a.forEach((c)=>{if(s.has(c))return;s.set(c,dd.Started);let l=t(c);if(l){let d=this.opts.es5?fz.varKinds.var:fz.varKinds.const;r=ot._`${r}${d} ${c} = ${l};${this.opts._n}`}else if(l=o===null||o===void 0?void 0:o(c))r=ot._`${r}${l}${this.opts._n}`;else throw new mz(c);s.set(c,dd.Completed)})}return r}}fz.ValueScope=pz});var ce=U(function(it){Object.defineProperty(it,"__esModule",{value:!0});it.or=it.and=it.not=it.CodeGen=it.operators=it.varKinds=it.ValueScopeName=it.ValueScope=it.Scope=it.Name=it.regexpCode=it.stringify=it.getProperty=it.nil=it.strConcat=it.str=it._=void 0;var le=Va(),Tt=H_(),Vr=Va();Object.defineProperty(it,"_",{enumerable:!0,get:function(){return Vr._}});Object.defineProperty(it,"str",{enumerable:!0,get:function(){return Vr.str}});Object.defineProperty(it,"strConcat",{enumerable:!0,get:function(){return Vr.strConcat}});Object.defineProperty(it,"nil",{enumerable:!0,get:function(){return Vr.nil}});Object.defineProperty(it,"getProperty",{enumerable:!0,get:function(){return Vr.getProperty}});Object.defineProperty(it,"stringify",{enumerable:!0,get:function(){return Vr.stringify}});Object.defineProperty(it,"regexpCode",{enumerable:!0,get:function(){return Vr.regexpCode}});Object.defineProperty(it,"Name",{enumerable:!0,get:function(){return Vr.Name}});var vd=H_();Object.defineProperty(it,"Scope",{enumerable:!0,get:function(){return vd.Scope}});Object.defineProperty(it,"ValueScope",{enumerable:!0,get:function(){return vd.ValueScope}});Object.defineProperty(it,"ValueScopeName",{enumerable:!0,get:function(){return vd.ValueScopeName}});Object.defineProperty(it,"varKinds",{enumerable:!0,get:function(){return vd.varKinds}});it.operators={GT:new le._Code(">"),GTE:new le._Code(">="),LT:new le._Code("<"),LTE:new le._Code("<="),EQ:new le._Code("==="),NEQ:new le._Code("!=="),NOT:new le._Code("!"),OR:new le._Code("||"),AND:new le._Code("&&"),ADD:new le._Code("+")};class Fr{optimizeNodes(){return this}optimizeNames(e,t){return this}}class gz extends Fr{constructor(e,t,n){super();this.varKind=e,this.name=t,this.rhs=n}render({es5:e,_n:t}){let n=e?Tt.varKinds.var:this.varKind,o=this.rhs===void 0?"":` = ${this.rhs}`;return`${n} ${this.name}${o};`+t}optimizeNames(e,t){if(!e[this.name.str])return;if(this.rhs)this.rhs=Lo(this.rhs,e,t);return this}get names(){return this.rhs instanceof le._CodeOrName?this.rhs.names:{}}}class B_ extends Fr{constructor(e,t,n){super();this.lhs=e,this.rhs=t,this.sideEffects=n}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,t){if(this.lhs instanceof le.Name&&!e[this.lhs.str]&&!this.sideEffects)return;return this.rhs=Lo(this.rhs,e,t),this}get names(){let e=this.lhs instanceof le.Name?{}:{...this.lhs.names};return gd(e,this.rhs)}}class vz extends B_{constructor(e,t,n,o){super(e,n,o);this.op=t}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}}class _z extends Fr{constructor(e){super();this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}}class Sz extends Fr{constructor(e){super();this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}}class yz extends Fr{constructor(e){super();this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}}class bz extends Fr{constructor(e){super();this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,t){return this.code=Lo(this.code,e,t),this}get names(){return this.code instanceof le._CodeOrName?this.code.names:{}}}class _d extends Fr{constructor(e=[]){super();this.nodes=e}render(e){return this.nodes.reduce((t,n)=>t+n.render(e),"")}optimizeNodes(){let{nodes:e}=this,t=e.length;while(t--){let n=e[t].optimizeNodes();if(Array.isArray(n))e.splice(t,1,...n);else if(n)e[t]=n;else e.splice(t,1)}return e.length>0?this:void 0}optimizeNames(e,t){let{nodes:n}=this,o=n.length;while(o--){let r=n[o];if(r.optimizeNames(e,t))continue;l1(e,r.names),n.splice(o,1)}return n.length>0?this:void 0}get names(){return this.nodes.reduce((e,t)=>xn(e,t.names),{})}}class Jr extends _d{render(e){return"{"+e._n+super.render(e)+"}"+e._n}}class $z extends _d{}class Fa extends Jr{}Fa.kind="else";class dr extends Jr{constructor(e,t){super(t);this.condition=e}render(e){let t=`if(${this.condition})`+super.render(e);if(this.else)t+="else "+this.else.render(e);return t}optimizeNodes(){super.optimizeNodes();let e=this.condition;if(e===!0)return this.nodes;let t=this.else;if(t){let n=t.optimizeNodes();t=this.else=Array.isArray(n)?new Fa(n):n}if(t){if(e===!1)return t instanceof dr?t:t.nodes;if(this.nodes.length)return this;return new dr(kz(e),t instanceof dr?[t]:t.nodes)}if(e===!1||!this.nodes.length)return;return this}optimizeNames(e,t){var n;if(this.else=(n=this.else)===null||n===void 0?void 0:n.optimizeNames(e,t),!(super.optimizeNames(e,t)||this.else))return;return this.condition=Lo(this.condition,e,t),this}get names(){let e=super.names;if(gd(e,this.condition),this.else)xn(e,this.else.names);return e}}dr.kind="if";class Do extends Jr{}Do.kind="for";class zz extends Do{constructor(e){super();this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,t){if(!super.optimizeNames(e,t))return;return this.iteration=Lo(this.iteration,e,t),this}get names(){return xn(super.names,this.iteration.names)}}class wz extends Do{constructor(e,t,n,o){super();this.varKind=e,this.name=t,this.from=n,this.to=o}render(e){let t=e.es5?Tt.varKinds.var:this.varKind,{name:n,from:o,to:r}=this;return`for(${t} ${n}=${o}; ${n}<${r}; ${n}++)`+super.render(e)}get names(){let e=gd(super.names,this.from);return gd(e,this.to)}}class K_ extends Do{constructor(e,t,n,o){super();this.loop=e,this.varKind=t,this.name=n,this.iterable=o}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,t){if(!super.optimizeNames(e,t))return;return this.iterable=Lo(this.iterable,e,t),this}get names(){return xn(super.names,this.iterable.names)}}class md extends Jr{constructor(e,t,n){super();this.name=e,this.args=t,this.async=n}render(e){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(e)}}md.kind="func";class pd extends _d{render(e){return"return "+super.render(e)}}pd.kind="return";class Rz extends Jr{render(e){let t="try"+super.render(e);if(this.catch)t+=this.catch.render(e);if(this.finally)t+=this.finally.render(e);return t}optimizeNodes(){var e,t;return super.optimizeNodes(),(e=this.catch)===null||e===void 0||e.optimizeNodes(),(t=this.finally)===null||t===void 0||t.optimizeNodes(),this}optimizeNames(e,t){var n,o;return super.optimizeNames(e,t),(n=this.catch)===null||n===void 0||n.optimizeNames(e,t),(o=this.finally)===null||o===void 0||o.optimizeNames(e,t),this}get names(){let e=super.names;if(this.catch)xn(e,this.catch.names);if(this.finally)xn(e,this.finally.names);return e}}class fd extends Jr{constructor(e){super();this.error=e}render(e){return`catch(${this.error})`+super.render(e)}}fd.kind="catch";class hd extends Jr{render(e){return"finally"+super.render(e)}}hd.kind="finally";class xz{constructor(e,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...t,_n:t.lines?`
|
|
3
|
+
`:""},this._extScope=e,this._scope=new Tt.Scope({parent:e}),this._nodes=[new $z]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,t){let n=this._extScope.value(e,t);return(this._values[n.prefix]||(this._values[n.prefix]=new Set)).add(n),n}getScopeValue(e,t){return this._extScope.getValue(e,t)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,t,n,o){let r=this._scope.toName(t);if(n!==void 0&&o)this._constants[r.str]=n;return this._leafNode(new gz(e,r,n)),r}const(e,t,n){return this._def(Tt.varKinds.const,e,t,n)}let(e,t,n){return this._def(Tt.varKinds.let,e,t,n)}var(e,t,n){return this._def(Tt.varKinds.var,e,t,n)}assign(e,t,n){return this._leafNode(new B_(e,t,n))}add(e,t){return this._leafNode(new vz(e,it.operators.ADD,t))}code(e){if(typeof e=="function")e();else if(e!==le.nil)this._leafNode(new bz(e));return this}object(...e){let t=["{"];for(let[n,o]of e){if(t.length>1)t.push(",");if(t.push(n),n!==o||this.opts.es5)t.push(":"),le.addCodeArg(t,o)}return t.push("}"),new le._Code(t)}if(e,t,n){if(this._blockNode(new dr(e)),t&&n)this.code(t).else().code(n).endIf();else if(t)this.code(t).endIf();else if(n)throw Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new dr(e))}else(){return this._elseNode(new Fa)}endIf(){return this._endBlockNode(dr,Fa)}_for(e,t){if(this._blockNode(e),t)this.code(t).endFor();return this}for(e,t){return this._for(new zz(e),t)}forRange(e,t,n,o,r=this.opts.es5?Tt.varKinds.var:Tt.varKinds.let){let i=this._scope.toName(e);return this._for(new wz(r,i,t,n),()=>o(i))}forOf(e,t,n,o=Tt.varKinds.const){let r=this._scope.toName(e);if(this.opts.es5){let i=t instanceof le.Name?t:this.var("_arr",t);return this.forRange("_i",0,le._`${i}.length`,(a)=>{this.var(r,le._`${i}[${a}]`),n(r)})}return this._for(new K_("of",o,r,t),()=>n(r))}forIn(e,t,n,o=this.opts.es5?Tt.varKinds.var:Tt.varKinds.const){if(this.opts.ownProperties)return this.forOf(e,le._`Object.keys(${t})`,n);let r=this._scope.toName(e);return this._for(new K_("in",o,r,t),()=>n(r))}endFor(){return this._endBlockNode(Do)}label(e){return this._leafNode(new _z(e))}break(e){return this._leafNode(new Sz(e))}return(e){let t=new pd;if(this._blockNode(t),this.code(e),t.nodes.length!==1)throw Error('CodeGen: "return" should have one node');return this._endBlockNode(pd)}try(e,t,n){if(!t&&!n)throw Error('CodeGen: "try" without "catch" and "finally"');let o=new Rz;if(this._blockNode(o),this.code(e),t){let r=this.name("e");this._currNode=o.catch=new fd(r),t(r)}if(n)this._currNode=o.finally=new hd,this.code(n);return this._endBlockNode(fd,hd)}throw(e){return this._leafNode(new yz(e))}block(e,t){if(this._blockStarts.push(this._nodes.length),e)this.code(e).endBlock(t);return this}endBlock(e){let t=this._blockStarts.pop();if(t===void 0)throw Error("CodeGen: not in self-balancing block");let n=this._nodes.length-t;if(n<0||e!==void 0&&n!==e)throw Error(`CodeGen: wrong number of nodes: ${n} vs ${e} expected`);return this._nodes.length=t,this}func(e,t=le.nil,n,o){if(this._blockNode(new md(e,t,n)),o)this.code(o).endFunc();return this}endFunc(){return this._endBlockNode(md)}optimize(e=1){while(e-- >0)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,t){let n=this._currNode;if(n instanceof e||t&&n instanceof t)return this._nodes.pop(),this;throw Error(`CodeGen: not in block "${t?`${e.kind}/${t.kind}`:e.kind}"`)}_elseNode(e){let t=this._currNode;if(!(t instanceof dr))throw Error('CodeGen: "else" without "if"');return this._currNode=t.else=e,this}get _root(){return this._nodes[0]}get _currNode(){let e=this._nodes;return e[e.length-1]}set _currNode(e){let t=this._nodes;t[t.length-1]=e}}it.CodeGen=xz;function xn(e,t){for(let n in t)e[n]=(e[n]||0)+(t[n]||0);return e}function gd(e,t){return t instanceof le._CodeOrName?xn(e,t.names):e}function Lo(e,t,n){if(e instanceof le.Name)return o(e);if(!r(e))return e;return new le._Code(e._items.reduce((i,a)=>{if(a instanceof le.Name)a=o(a);if(a instanceof le._Code)i.push(...a._items);else i.push(a);return i},[]));function o(i){let a=n[i.str];if(a===void 0||t[i.str]!==1)return i;return delete t[i.str],a}function r(i){return i instanceof le._Code&&i._items.some((a)=>a instanceof le.Name&&t[a.str]===1&&n[a.str]!==void 0)}}function l1(e,t){for(let n in t)e[n]=(e[n]||0)-(t[n]||0)}function kz(e){return typeof e=="boolean"||typeof e=="number"||e===null?!e:le._`!${G_(e)}`}it.not=kz;var u1=Iz(it.operators.AND);function d1(...e){return e.reduce(u1)}it.and=d1;var m1=Iz(it.operators.OR);function p1(...e){return e.reduce(m1)}it.or=p1;function Iz(e){return(t,n)=>t===le.nil?n:n===le.nil?t:le._`${G_(t)} ${e} ${G_(n)}`}function G_(e){return e instanceof le.Name?e:le._`(${e})`}});var de=U(function(Az){Object.defineProperty(Az,"__esModule",{value:!0});Az.checkStrictMode=Az.getErrorPath=Az.Type=Az.useFunc=Az.setEvaluated=Az.evaluatedPropsToName=Az.mergeEvaluated=Az.eachItem=Az.unescapeJsonPointer=Az.escapeJsonPointer=Az.escapeFragment=Az.unescapeFragment=Az.schemaRefOrVal=Az.schemaHasRulesButRef=Az.schemaHasRules=Az.checkUnknownRules=Az.alwaysValidSchema=Az.toHash=void 0;var ve=ce(),v1=Va();function _1(e){let t={};for(let n of e)t[n]=!0;return t}Az.toHash=_1;function S1(e,t){if(typeof t=="boolean")return t;if(Object.keys(t).length===0)return!0;return jz(e,t),!Oz(t,e.self.RULES.all)}Az.alwaysValidSchema=S1;function jz(e,t=e.schema){let{opts:n,self:o}=e;if(!n.strictSchema)return;if(typeof t==="boolean")return;let r=o.RULES.keywords;for(let i in t)if(!r[i])qz(e,`unknown keyword: "${i}"`)}Az.checkUnknownRules=jz;function Oz(e,t){if(typeof e=="boolean")return!e;for(let n in e)if(t[n])return!0;return!1}Az.schemaHasRules=Oz;function y1(e,t){if(typeof e=="boolean")return!e;for(let n in e)if(n!=="$ref"&&t.all[n])return!0;return!1}Az.schemaHasRulesButRef=y1;function b1({topSchemaRef:e,schemaPath:t},n,o,r){if(!r){if(typeof n=="number"||typeof n=="boolean")return n;if(typeof n=="string")return ve._`${n}`}return ve._`${e}${t}${ve.getProperty(o)}`}Az.schemaRefOrVal=b1;function $1(e){return Nz(decodeURIComponent(e))}Az.unescapeFragment=$1;function z1(e){return encodeURIComponent(Y_(e))}Az.escapeFragment=z1;function Y_(e){if(typeof e=="number")return`${e}`;return e.replace(/~/g,"~0").replace(/\//g,"~1")}Az.escapeJsonPointer=Y_;function Nz(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}Az.unescapeJsonPointer=Nz;function w1(e,t){if(Array.isArray(e))for(let n of e)t(n);else t(e)}Az.eachItem=w1;function Ez({mergeNames:e,mergeToName:t,mergeValues:n,resultToName:o}){return(r,i,a,s)=>{let c=a===void 0?i:a instanceof ve.Name?(i instanceof ve.Name?e(r,i,a):t(r,i,a),a):i instanceof ve.Name?(t(r,a,i),i):n(i,a);return s===ve.Name&&!(c instanceof ve.Name)?o(r,c):c}}Az.mergeEvaluated={props:Ez({mergeNames:(e,t,n)=>e.if(ve._`${n} !== true && ${t} !== undefined`,()=>{e.if(ve._`${t} === true`,()=>e.assign(n,!0),()=>e.assign(n,ve._`${n} || {}`).code(ve._`Object.assign(${n}, ${t})`))}),mergeToName:(e,t,n)=>e.if(ve._`${n} !== true`,()=>{if(t===!0)e.assign(n,!0);else e.assign(n,ve._`${n} || {}`),X_(e,n,t)}),mergeValues:(e,t)=>e===!0?!0:{...e,...t},resultToName:Cz}),items:Ez({mergeNames:(e,t,n)=>e.if(ve._`${n} !== true && ${t} !== undefined`,()=>e.assign(n,ve._`${t} === true ? true : ${n} > ${t} ? ${n} : ${t}`)),mergeToName:(e,t,n)=>e.if(ve._`${n} !== true`,()=>e.assign(n,t===!0?!0:ve._`${n} > ${t} ? ${n} : ${t}`)),mergeValues:(e,t)=>e===!0?!0:Math.max(e,t),resultToName:(e,t)=>e.var("items",t)})};function Cz(e,t){if(t===!0)return e.var("props",!0);let n=e.var("props",ve._`{}`);if(t!==void 0)X_(e,n,t);return n}Az.evaluatedPropsToName=Cz;function X_(e,t,n){Object.keys(n).forEach((o)=>e.assign(ve._`${t}${ve.getProperty(o)}`,!0))}Az.setEvaluated=X_;var Tz={};function R1(e,t){return e.scopeValue("func",{ref:t,code:Tz[t.code]||(Tz[t.code]=new v1._Code(t.code))})}Az.useFunc=R1;var W_;(function(e){e[e.Num=0]="Num",e[e.Str=1]="Str"})(W_||(Az.Type=W_={}));function x1(e,t,n){if(e instanceof ve.Name){let o=t===W_.Num;return n?o?ve._`"[" + ${e} + "]"`:ve._`"['" + ${e} + "']"`:o?ve._`"/" + ${e}`:ve._`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return n?ve.getProperty(e).toString():"/"+Y_(e)}Az.getErrorPath=x1;function qz(e,t,n=e.opts.strictSchema){if(!n)return;if(t=`strict mode: ${t}`,n===!0)throw Error(t);e.self.logger.warn(t)}Az.checkStrictMode=qz});var mr=U(function(Uz){Object.defineProperty(Uz,"__esModule",{value:!0});var De=ce(),F1={data:new De.Name("data"),valCxt:new De.Name("valCxt"),instancePath:new De.Name("instancePath"),parentData:new De.Name("parentData"),parentDataProperty:new De.Name("parentDataProperty"),rootData:new De.Name("rootData"),dynamicAnchors:new De.Name("dynamicAnchors"),vErrors:new De.Name("vErrors"),errors:new De.Name("errors"),this:new De.Name("this"),self:new De.Name("self"),scope:new De.Name("scope"),json:new De.Name("json"),jsonPos:new De.Name("jsonPos"),jsonLen:new De.Name("jsonLen"),jsonPart:new De.Name("jsonPart")};Uz.default=F1});var Ja=U(function(Vz){Object.defineProperty(Vz,"__esModule",{value:!0});Vz.extendErrors=Vz.resetErrorsCount=Vz.reportExtraError=Vz.reportError=Vz.keyword$DataError=Vz.keywordError=void 0;var me=ce(),yd=de(),Be=mr();Vz.keywordError={message:({keyword:e})=>me.str`must pass "${e}" keyword validation`};Vz.keyword$DataError={message:({keyword:e,schemaType:t})=>t?me.str`"${e}" keyword must be ${t} ($data)`:me.str`"${e}" keyword is invalid ($data)`};function H1(e,t=Vz.keywordError,n,o){let{it:r}=e,{gen:i,compositeRule:a,allErrors:s}=r,c=Zz(e,t,n);if(o!==null&&o!==void 0?o:a||s)Dz(i,c);else Lz(r,me._`[${c}]`)}Vz.reportError=H1;function K1(e,t=Vz.keywordError,n){let{it:o}=e,{gen:r,compositeRule:i,allErrors:a}=o,s=Zz(e,t,n);if(Dz(r,s),!(i||a))Lz(o,Be.default.vErrors)}Vz.reportExtraError=K1;function G1(e,t){e.assign(Be.default.errors,t),e.if(me._`${Be.default.vErrors} !== null`,()=>e.if(t,()=>e.assign(me._`${Be.default.vErrors}.length`,t),()=>e.assign(Be.default.vErrors,null)))}Vz.resetErrorsCount=G1;function B1({gen:e,keyword:t,schemaValue:n,data:o,errsCount:r,it:i}){if(r===void 0)throw Error("ajv implementation error");let a=e.name("err");e.forRange("i",r,Be.default.errors,(s)=>{if(e.const(a,me._`${Be.default.vErrors}[${s}]`),e.if(me._`${a}.instancePath === undefined`,()=>e.assign(me._`${a}.instancePath`,me.strConcat(Be.default.instancePath,i.errorPath))),e.assign(me._`${a}.schemaPath`,me.str`${i.errSchemaPath}/${t}`),i.opts.verbose)e.assign(me._`${a}.schema`,n),e.assign(me._`${a}.data`,o)})}Vz.extendErrors=B1;function Dz(e,t){let n=e.const("err",t);e.if(me._`${Be.default.vErrors} === null`,()=>e.assign(Be.default.vErrors,me._`[${n}]`),me._`${Be.default.vErrors}.push(${n})`),e.code(me._`${Be.default.errors}++`)}function Lz(e,t){let{gen:n,validateName:o,schemaEnv:r}=e;if(r.$async)n.throw(me._`new ${e.ValidationError}(${t})`);else n.assign(me._`${o}.errors`,t),n.return(!1)}var kn={keyword:new me.Name("keyword"),schemaPath:new me.Name("schemaPath"),params:new me.Name("params"),propertyName:new me.Name("propertyName"),message:new me.Name("message"),schema:new me.Name("schema"),parentSchema:new me.Name("parentSchema")};function Zz(e,t,n){let{createErrors:o}=e.it;if(o===!1)return me._`{}`;return W1(e,t,n)}function W1(e,t,n={}){let{gen:o,it:r}=e,i=[Y1(r,n),X1(e,n)];return Q1(e,t,i),o.object(...i)}function Y1({errorPath:e},{instancePath:t}){let n=t?me.str`${e}${yd.getErrorPath(t,yd.Type.Str)}`:e;return[Be.default.instancePath,me.strConcat(Be.default.instancePath,n)]}function X1({keyword:e,it:{errSchemaPath:t}},{schemaPath:n,parentSchema:o}){let r=o?t:me.str`${t}/${e}`;if(n)r=me.str`${r}${yd.getErrorPath(n,yd.Type.Str)}`;return[kn.schemaPath,r]}function Q1(e,{params:t,message:n},o){let{keyword:r,data:i,schemaValue:a,it:s}=e,{opts:c,propertyName:l,topSchemaRef:d,schemaPath:m}=s;if(o.push([kn.keyword,r],[kn.params,typeof t=="function"?t(e):t||me._`{}`]),c.messages)o.push([kn.message,typeof n=="function"?n(e):n]);if(c.verbose)o.push([kn.schema,a],[kn.parentSchema,me._`${d}${m}`],[Be.default.data,i]);if(l)o.push([kn.propertyName,l])}});var Gz=U(function(Hz){Object.defineProperty(Hz,"__esModule",{value:!0});Hz.boolOrEmptySchema=Hz.topBoolOrEmptySchema=void 0;var oj=Ja(),ij=ce(),aj=mr(),sj={message:"boolean schema is false"};function cj(e){let{gen:t,schema:n,validateName:o}=e;if(n===!1)Jz(e,!1);else if(typeof n=="object"&&n.$async===!0)t.return(aj.default.data);else t.assign(ij._`${o}.errors`,null),t.return(!0)}Hz.topBoolOrEmptySchema=cj;function lj(e,t){let{gen:n,schema:o}=e;if(o===!1)n.var(t,!1),Jz(e);else n.var(t,!0)}Hz.boolOrEmptySchema=lj;function Jz(e,t){let{gen:n,data:o}=e;oj.reportError({gen:n,keyword:"false schema",data:o,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e},sj,void 0,t)}});var eS=U(function(Bz){Object.defineProperty(Bz,"__esModule",{value:!0});Bz.getRules=Bz.isJSONType=void 0;var dj=["string","number","integer","boolean","null","object","array"],mj=new Set(dj);function pj(e){return typeof e=="string"&&mj.has(e)}Bz.isJSONType=pj;function fj(){let e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}Bz.getRules=fj});var tS=U(function(Qz){Object.defineProperty(Qz,"__esModule",{value:!0});Qz.shouldUseRule=Qz.shouldUseGroup=Qz.schemaHasRulesForType=void 0;function gj({schema:e,self:t},n){let o=t.RULES.types[n];return o&&o!==!0&&Yz(e,o)}Qz.schemaHasRulesForType=gj;function Yz(e,t){return t.rules.some((n)=>Xz(e,n))}Qz.shouldUseGroup=Yz;function Xz(e,t){var n;return e[t.keyword]!==void 0||((n=t.definition.implements)===null||n===void 0?void 0:n.some((o)=>e[o]!==void 0))}Qz.shouldUseRule=Xz});var Ha=U(function(ow){Object.defineProperty(ow,"__esModule",{value:!0});ow.reportTypeError=ow.checkDataTypes=ow.checkDataType=ow.coerceAndCheckDataType=ow.getJSONTypes=ow.getSchemaTypes=ow.DataType=void 0;var Sj=eS(),yj=tS(),bj=Ja(),ie=ce(),tw=de(),Zo;(function(e){e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong"})(Zo||(ow.DataType=Zo={}));function $j(e){let t=rw(e.type);if(t.includes("null")){if(e.nullable===!1)throw Error("type: null contradicts nullable: false")}else{if(!t.length&&e.nullable!==void 0)throw Error('"nullable" cannot be used without "type"');if(e.nullable===!0)t.push("null")}return t}ow.getSchemaTypes=$j;function rw(e){let t=Array.isArray(e)?e:e?[e]:[];if(t.every(Sj.isJSONType))return t;throw Error("type must be JSONType or JSONType[]: "+t.join(","))}ow.getJSONTypes=rw;function zj(e,t){let{gen:n,data:o,opts:r}=e,i=wj(t,r.coerceTypes),a=t.length>0&&!(i.length===0&&t.length===1&&yj.schemaHasRulesForType(e,t[0]));if(a){let s=nS(t,o,r.strictNumbers,Zo.Wrong);n.if(s,()=>{if(i.length)Rj(e,t,i);else oS(e)})}return a}ow.coerceAndCheckDataType=zj;var nw=new Set(["string","number","integer","boolean","null"]);function wj(e,t){return t?e.filter((n)=>nw.has(n)||t==="array"&&n==="array"):[]}function Rj(e,t,n){let{gen:o,data:r,opts:i}=e,a=o.let("dataType",ie._`typeof ${r}`),s=o.let("coerced",ie._`undefined`);if(i.coerceTypes==="array")o.if(ie._`${a} == 'object' && Array.isArray(${r}) && ${r}.length == 1`,()=>o.assign(r,ie._`${r}[0]`).assign(a,ie._`typeof ${r}`).if(nS(t,r,i.strictNumbers),()=>o.assign(s,r)));o.if(ie._`${s} !== undefined`);for(let l of n)if(nw.has(l)||l==="array"&&i.coerceTypes==="array")c(l);o.else(),oS(e),o.endIf(),o.if(ie._`${s} !== undefined`,()=>{o.assign(r,s),xj(e,s)});function c(l){switch(l){case"string":o.elseIf(ie._`${a} == "number" || ${a} == "boolean"`).assign(s,ie._`"" + ${r}`).elseIf(ie._`${r} === null`).assign(s,ie._`""`);return;case"number":o.elseIf(ie._`${a} == "boolean" || ${r} === null
|
|
4
4
|
|| (${a} == "string" && ${r} && ${r} == +${r})`).assign(s,ie._`+${r}`);return;case"integer":o.elseIf(ie._`${a} === "boolean" || ${r} === null
|
|
5
5
|
|| (${a} === "string" && ${r} && ${r} == +${r} && !(${r} % 1))`).assign(s,ie._`+${r}`);return;case"boolean":o.elseIf(ie._`${r} === "false" || ${r} === 0 || ${r} === null`).assign(s,!1).elseIf(ie._`${r} === "true" || ${r} === 1`).assign(s,!0);return;case"null":o.elseIf(ie._`${r} === "" || ${r} === 0 || ${r} === false`),o.assign(s,null);return;case"array":o.elseIf(ie._`${a} === "string" || ${a} === "number"
|
|
6
|
-
|| ${a} === "boolean" || ${r} === null`).assign(s,ie._`[${r}]`)}}}function xO({gen:e,parentData:t,parentDataProperty:n},o){e.if(ie._`${t} !== undefined`,()=>e.assign(ie._`${t}[${n}]`,o))}function rS(e,t,n,o=Lo.Correct){let r=o===Lo.Correct?ie.operators.EQ:ie.operators.NEQ,i;switch(e){case"null":return ie._`${t} ${r} null`;case"array":i=ie._`Array.isArray(${t})`;break;case"object":i=ie._`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case"integer":i=a(ie._`!(${t} % 1) && !isNaN(${t})`);break;case"number":i=a();break;default:return ie._`typeof ${t} ${r} ${e}`}return o===Lo.Correct?i:(0,ie.not)(i);function a(s=ie.nil){return(0,ie.and)(ie._`typeof ${t} == "number"`,s,n?ie._`isFinite(${t})`:ie.nil)}}Hz.checkDataType=rS;function nS(e,t,n,o){if(e.length===1)return rS(e[0],t,n,o);let r,i=(0,Vz.toHash)(e);if(i.array&&i.object){let a=ie._`typeof ${t} != "object"`;r=i.null?a:ie._`!${t} || ${a}`,delete i.null,delete i.array,delete i.object}else r=ie.nil;if(i.number)delete i.integer;for(let a in i)r=(0,ie.and)(r,rS(a,t,n,o));return r}Hz.checkDataTypes=nS;var kO={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>typeof e=="string"?ie._`{type: ${e}}`:ie._`{type: ${t}}`};function oS(e){let t=IO(e);(0,bO.reportError)(t,kO)}Hz.reportTypeError=oS;function IO(e){let{gen:t,data:n,schema:o}=e,r=(0,Vz.schemaRefOrVal)(e,o,"type");return{gen:t,keyword:"type",data:n,schema:o.type,schemaCode:r,schemaValue:r,parentSchema:o,params:{},it:e}}});var Yz=D(function(Bz){Object.defineProperty(Bz,"__esModule",{value:!0});Bz.assignDefaults=void 0;var Zo=ce(),CO=de();function qO(e,t){let{properties:n,items:o}=e.schema;if(t==="object"&&n)for(let r in n)Gz(e,r,n[r].default);else if(t==="array"&&Array.isArray(o))o.forEach((r,i)=>Gz(e,i,r.default))}Bz.assignDefaults=qO;function Gz(e,t,n){let{gen:o,compositeRule:r,data:i,opts:a}=e;if(n===void 0)return;let s=Zo._`${i}${(0,Zo.getProperty)(t)}`;if(r){(0,CO.checkStrictMode)(e,`default is ignored for: ${s}`);return}let c=Zo._`${s} === undefined`;if(a.useDefaults==="empty")c=Zo._`${c} || ${s} === null || ${s} === ""`;o.if(c,Zo._`${s} = ${(0,Zo.stringify)(n)}`)}});var zt=D(function(ew){Object.defineProperty(ew,"__esModule",{value:!0});ew.validateUnion=ew.validateArray=ew.usePattern=ew.callValidateCode=ew.schemaProperties=ew.allSchemaProperties=ew.noPropertyInData=ew.propertyInData=ew.isOwnProperty=ew.hasPropFunc=ew.reportMissingProp=ew.checkMissingProp=ew.checkReportMissingProp=void 0;var _e=ce(),iS=de(),Jr=pr(),AO=de();function MO(e,t){let{gen:n,data:o,it:r}=e;n.if(sS(n,o,t,r.opts.ownProperties),()=>{e.setParams({missingProperty:_e._`${t}`},!0),e.error()})}ew.checkReportMissingProp=MO;function UO({gen:e,data:t,it:{opts:n}},o,r){return(0,_e.or)(...o.map((i)=>(0,_e.and)(sS(e,t,i,n.ownProperties),_e._`${r} = ${i}`)))}ew.checkMissingProp=UO;function DO(e,t){e.setParams({missingProperty:t},!0),e.error()}ew.reportMissingProp=DO;function Xz(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:_e._`Object.prototype.hasOwnProperty`})}ew.hasPropFunc=Xz;function aS(e,t,n){return _e._`${Xz(e)}.call(${t}, ${n})`}ew.isOwnProperty=aS;function LO(e,t,n,o){let r=_e._`${t}${(0,_e.getProperty)(n)} !== undefined`;return o?_e._`${r} && ${aS(e,t,n)}`:r}ew.propertyInData=LO;function sS(e,t,n,o){let r=_e._`${t}${(0,_e.getProperty)(n)} === undefined`;return o?(0,_e.or)(r,(0,_e.not)(aS(e,t,n))):r}ew.noPropertyInData=sS;function Qz(e){return e?Object.keys(e).filter((t)=>t!=="__proto__"):[]}ew.allSchemaProperties=Qz;function ZO(e,t){return Qz(t).filter((n)=>!(0,iS.alwaysValidSchema)(e,t[n]))}ew.schemaProperties=ZO;function VO({schemaCode:e,data:t,it:{gen:n,topSchemaRef:o,schemaPath:r,errorPath:i},it:a},s,c,l){let d=l?_e._`${e}, ${t}, ${o}${r}`:t,m=[[Jr.default.instancePath,(0,_e.strConcat)(Jr.default.instancePath,i)],[Jr.default.parentData,a.parentData],[Jr.default.parentDataProperty,a.parentDataProperty],[Jr.default.rootData,Jr.default.rootData]];if(a.opts.dynamicRef)m.push([Jr.default.dynamicAnchors,Jr.default.dynamicAnchors]);let p=_e._`${d}, ${n.object(...m)}`;return c!==_e.nil?_e._`${s}.call(${c}, ${p})`:_e._`${s}(${p})`}ew.callValidateCode=VO;var FO=_e._`new RegExp`;function JO({gen:e,it:{opts:t}},n){let o=t.unicodeRegExp?"u":"",{regExp:r}=t.code,i=r(n,o);return e.scopeValue("pattern",{key:i.toString(),ref:i,code:_e._`${r.code==="new RegExp"?FO:(0,AO.useFunc)(e,r)}(${n}, ${o})`})}ew.usePattern=JO;function HO(e){let{gen:t,data:n,keyword:o,it:r}=e,i=t.name("valid");if(r.allErrors){let s=t.let("valid",!0);return a(()=>t.assign(s,!1)),s}return t.var(i,!0),a(()=>t.break()),i;function a(s){let c=t.const("len",_e._`${n}.length`);t.forRange("i",0,c,(l)=>{e.subschema({keyword:o,dataProp:l,dataPropType:iS.Type.Num},i),t.if((0,_e.not)(i),s)})}}ew.validateArray=HO;function KO(e){let{gen:t,schema:n,keyword:o,it:r}=e;if(!Array.isArray(n))throw Error("ajv implementation error");if(n.some((c)=>(0,iS.alwaysValidSchema)(r,c))&&!r.opts.unevaluated)return;let a=t.let("valid",!1),s=t.name("_valid");t.block(()=>n.forEach((c,l)=>{let d=e.subschema({keyword:o,schemaProp:l,compositeRule:!0},s);if(t.assign(a,_e._`${a} || ${s}`),!e.mergeValidEvaluated(d,s))t.if((0,_e.not)(a))})),e.result(a,()=>e.reset(),()=>e.error(!0))}ew.validateUnion=KO});var aw=D(function(ow){Object.defineProperty(ow,"__esModule",{value:!0});ow.validateKeywordUsage=ow.validSchemaType=ow.funcKeywordCode=ow.macroKeywordCode=void 0;var We=ce(),xn=pr(),aN=zt(),sN=Ja();function cN(e,t){let{gen:n,keyword:o,schema:r,parentSchema:i,it:a}=e,s=t.macro.call(a.self,r,i,a),c=nw(n,o,s);if(a.opts.validateSchema!==!1)a.self.validateSchema(s,!0);let l=n.name("valid");e.subschema({schema:s,schemaPath:We.nil,errSchemaPath:`${a.errSchemaPath}/${o}`,topSchemaRef:c,compositeRule:!0},l),e.pass(l,()=>e.error(!0))}ow.macroKeywordCode=cN;function lN(e,t){var n;let{gen:o,keyword:r,schema:i,parentSchema:a,$data:s,it:c}=e;dN(c,t);let l=!s&&t.compile?t.compile.call(c.self,i,a,c):t.validate,d=nw(o,r,l),m=o.let("valid");e.block$data(m,p),e.ok((n=t.valid)!==null&&n!==void 0?n:m);function p(){if(t.errors===!1){if(g(),t.modifying)rw(e);b(()=>e.error())}else{let w=t.async?f():v();if(t.modifying)rw(e);b(()=>uN(e,w))}}function f(){let w=o.let("ruleErrs",null);return o.try(()=>g(We._`await `),(Z)=>o.assign(m,!1).if(We._`${Z} instanceof ${c.ValidationError}`,()=>o.assign(w,We._`${Z}.errors`),()=>o.throw(Z))),w}function v(){let w=We._`${d}.errors`;return o.assign(w,null),g(We.nil),w}function g(w=t.async?We._`await `:We.nil){let Z=c.opts.passContext?xn.default.this:xn.default.self,E=!(("compile"in t)&&!s||t.schema===!1);o.assign(m,We._`${w}${(0,aN.callValidateCode)(e,d,Z,E)}`,t.modifying)}function b(w){var Z;o.if((0,We.not)((Z=t.valid)!==null&&Z!==void 0?Z:m),w)}}ow.funcKeywordCode=lN;function rw(e){let{gen:t,data:n,it:o}=e;t.if(o.parentData,()=>t.assign(n,We._`${o.parentData}[${o.parentDataProperty}]`))}function uN(e,t){let{gen:n}=e;n.if(We._`Array.isArray(${t})`,()=>{n.assign(xn.default.vErrors,We._`${xn.default.vErrors} === null ? ${t} : ${xn.default.vErrors}.concat(${t})`).assign(xn.default.errors,We._`${xn.default.vErrors}.length`),(0,sN.extendErrors)(e)},()=>e.error())}function dN({schemaEnv:e},t){if(t.async&&!e.$async)throw Error("async keyword in sync schema")}function nw(e,t,n){if(n===void 0)throw Error(`keyword "${t}" failed to compile`);return e.scopeValue("keyword",typeof n=="function"?{ref:n}:{ref:n,code:(0,We.stringify)(n)})}function mN(e,t,n=!1){return!t.length||t.some((o)=>o==="array"?Array.isArray(e):o==="object"?e&&typeof e=="object"&&!Array.isArray(e):typeof e==o||n&&typeof e>"u")}ow.validSchemaType=mN;function pN({schema:e,opts:t,self:n,errSchemaPath:o},r,i){if(Array.isArray(r.keyword)?!r.keyword.includes(i):r.keyword!==i)throw Error("ajv implementation error");let a=r.dependencies;if(a===null||a===void 0?void 0:a.some((s)=>!Object.prototype.hasOwnProperty.call(e,s)))throw Error(`parent schema must have dependencies of ${i}: ${a.join(",")}`);if(r.validateSchema){if(!r.validateSchema(e[i])){let c=`keyword "${i}" value is invalid at path "${o}": `+n.errorsText(r.validateSchema.errors);if(t.validateSchema==="log")n.logger.error(c);else throw Error(c)}}}ow.validateKeywordUsage=pN});var uw=D(function(cw){Object.defineProperty(cw,"__esModule",{value:!0});cw.extendSubschemaMode=cw.extendSubschemaData=cw.getSubschema=void 0;var Xt=ce(),sw=de();function vN(e,{keyword:t,schemaProp:n,schema:o,schemaPath:r,errSchemaPath:i,topSchemaRef:a}){if(t!==void 0&&o!==void 0)throw Error('both "keyword" and "schema" passed, only one allowed');if(t!==void 0){let s=e.schema[t];return n===void 0?{schema:s,schemaPath:Xt._`${e.schemaPath}${(0,Xt.getProperty)(t)}`,errSchemaPath:`${e.errSchemaPath}/${t}`}:{schema:s[n],schemaPath:Xt._`${e.schemaPath}${(0,Xt.getProperty)(t)}${(0,Xt.getProperty)(n)}`,errSchemaPath:`${e.errSchemaPath}/${t}/${(0,sw.escapeFragment)(n)}`}}if(o!==void 0){if(r===void 0||i===void 0||a===void 0)throw Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:o,schemaPath:r,topSchemaRef:a,errSchemaPath:i}}throw Error('either "keyword" or "schema" must be passed')}cw.getSubschema=vN;function _N(e,t,{dataProp:n,dataPropType:o,data:r,dataTypes:i,propertyName:a}){if(r!==void 0&&n!==void 0)throw Error('both "data" and "dataProp" passed, only one allowed');let{gen:s}=t;if(n!==void 0){let{errorPath:l,dataPathArr:d,opts:m}=t,p=s.let("data",Xt._`${t.data}${(0,Xt.getProperty)(n)}`,!0);c(p),e.errorPath=Xt.str`${l}${(0,sw.getErrorPath)(n,o,m.jsPropertySyntax)}`,e.parentDataProperty=Xt._`${n}`,e.dataPathArr=[...d,e.parentDataProperty]}if(r!==void 0){let l=r instanceof Xt.Name?r:s.let("data",r,!0);if(c(l),a!==void 0)e.propertyName=a}if(i)e.dataTypes=i;function c(l){e.data=l,e.dataLevel=t.dataLevel+1,e.dataTypes=[],t.definedProperties=new Set,e.parentData=t.data,e.dataNames=[...t.dataNames,l]}}cw.extendSubschemaData=_N;function SN(e,{jtdDiscriminator:t,jtdMetadata:n,compositeRule:o,createErrors:r,allErrors:i}){if(o!==void 0)e.compositeRule=o;if(r!==void 0)e.createErrors=r;if(i!==void 0)e.allErrors=i;e.jtdDiscriminator=t,e.jtdMetadata=n}cw.extendSubschemaMode=SN});var cS=D(function(_L,dw){dw.exports=function e(t,n){if(t===n)return!0;if(t&&n&&typeof t=="object"&&typeof n=="object"){if(t.constructor!==n.constructor)return!1;var o,r,i;if(Array.isArray(t)){if(o=t.length,o!=n.length)return!1;for(r=o;r--!==0;)if(!e(t[r],n[r]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if(i=Object.keys(t),o=i.length,o!==Object.keys(n).length)return!1;for(r=o;r--!==0;)if(!Object.prototype.hasOwnProperty.call(n,i[r]))return!1;for(r=o;r--!==0;){var a=i[r];if(!e(t[a],n[a]))return!1}return!0}return t!==t&&n!==n}});var pw=D(function(SL,mw){var Hr=mw.exports=function(e,t,n){if(typeof t=="function")n=t,t={};n=t.cb||n;var o=typeof n=="function"?n:n.pre||function(){},r=n.post||function(){};vd(t,o,r,e,"",e)};Hr.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};Hr.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};Hr.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};Hr.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function vd(e,t,n,o,r,i,a,s,c,l){if(o&&typeof o=="object"&&!Array.isArray(o)){t(o,r,i,a,s,c,l);for(var d in o){var m=o[d];if(Array.isArray(m)){if(d in Hr.arrayKeywords)for(var p=0;p<m.length;p++)vd(e,t,n,m[p],r+"/"+d+"/"+p,i,r,d,o,p)}else if(d in Hr.propsKeywords){if(m&&typeof m=="object")for(var f in m)vd(e,t,n,m[f],r+"/"+d+"/"+$N(f),i,r,d,o,f)}else if(d in Hr.keywords||e.allKeys&&!(d in Hr.skipKeywords))vd(e,t,n,m,r+"/"+d,i,r,d,o)}n(o,r,i,a,s,c,l)}}function $N(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}});var Ka=D(function(vw){Object.defineProperty(vw,"__esModule",{value:!0});vw.getSchemaRefs=vw.resolveUrl=vw.normalizeId=vw._getFullPath=vw.getFullPath=vw.inlineRef=void 0;var zN=de(),wN=cS(),RN=pw(),xN=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function kN(e,t=!0){if(typeof e=="boolean")return!0;if(t===!0)return!lS(e);if(!t)return!1;return fw(e)<=t}vw.inlineRef=kN;var IN=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function lS(e){for(let t in e){if(IN.has(t))return!0;let n=e[t];if(Array.isArray(n)&&n.some(lS))return!0;if(typeof n=="object"&&lS(n))return!0}return!1}function fw(e){let t=0;for(let n in e){if(n==="$ref")return 1/0;if(t++,xN.has(n))continue;if(typeof e[n]=="object")(0,zN.eachItem)(e[n],(o)=>t+=fw(o));if(t===1/0)return 1/0}return t}function hw(e,t="",n){if(n!==!1)t=Vo(t);let o=e.parse(t);return gw(e,o)}vw.getFullPath=hw;function gw(e,t){return e.serialize(t).split("#")[0]+"#"}vw._getFullPath=gw;var PN=/#\/?$/;function Vo(e){return e?e.replace(PN,""):""}vw.normalizeId=Vo;function EN(e,t,n){return n=Vo(n),e.resolve(t,n)}vw.resolveUrl=EN;var TN=/^[a-z_][-a-z0-9._]*$/i;function jN(e,t){if(typeof e=="boolean")return{};let{schemaId:n,uriResolver:o}=this.opts,r=Vo(e[n]||t),i={"":r},a=hw(o,r,!1),s={},c=new Set;return RN(e,{allKeys:!0},(m,p,f,v)=>{if(v===void 0)return;let g=a+p,b=i[v];if(typeof m[n]=="string")b=w.call(this,m[n]);Z.call(this,m.$anchor),Z.call(this,m.$dynamicAnchor),i[p]=b;function w(E){let L=this.opts.uriResolver.resolve;if(E=Vo(b?L(b,E):E),c.has(E))throw d(E);c.add(E);let T=this.refs[E];if(typeof T=="string")T=this.refs[T];if(typeof T=="object")l(m,T.schema,E);else if(E!==Vo(g))if(E[0]==="#")l(m,s[E],E),s[E]=m;else this.refs[E]=g;return E}function Z(E){if(typeof E=="string"){if(!TN.test(E))throw Error(`invalid anchor "${E}"`);w.call(this,`#${E}`)}}}),s;function l(m,p,f){if(p!==void 0&&!wN(m,p))throw d(f)}function d(m){return Error(`reference "${m}" resolves to more than one schema`)}}vw.getSchemaRefs=jN});var Wa=D(function(Ow){Object.defineProperty(Ow,"__esModule",{value:!0});Ow.getData=Ow.KeywordCxt=Ow.validateFunctionCode=void 0;var zw=qz(),Sw=Ha(),dS=tS(),_d=Ha(),MN=Yz(),Ba=aw(),uS=uw(),K=ce(),ee=pr(),UN=Ka(),fr=de(),Ga=Ja();function DN(e){if(xw(e)){if(kw(e),Rw(e)){VN(e);return}}ww(e,()=>(0,zw.topBoolOrEmptySchema)(e))}Ow.validateFunctionCode=DN;function ww({gen:e,validateName:t,schema:n,schemaEnv:o,opts:r},i){if(r.code.es5)e.func(t,K._`${ee.default.data}, ${ee.default.valCxt}`,o.$async,()=>{e.code(K._`"use strict"; ${yw(n,r)}`),ZN(e,r),e.code(i)});else e.func(t,K._`${ee.default.data}, ${LN(r)}`,o.$async,()=>e.code(yw(n,r)).code(i))}function LN(e){return K._`{${ee.default.instancePath}="", ${ee.default.parentData}, ${ee.default.parentDataProperty}, ${ee.default.rootData}=${ee.default.data}${e.dynamicRef?K._`, ${ee.default.dynamicAnchors}={}`:K.nil}}={}`}function ZN(e,t){e.if(ee.default.valCxt,()=>{if(e.var(ee.default.instancePath,K._`${ee.default.valCxt}.${ee.default.instancePath}`),e.var(ee.default.parentData,K._`${ee.default.valCxt}.${ee.default.parentData}`),e.var(ee.default.parentDataProperty,K._`${ee.default.valCxt}.${ee.default.parentDataProperty}`),e.var(ee.default.rootData,K._`${ee.default.valCxt}.${ee.default.rootData}`),t.dynamicRef)e.var(ee.default.dynamicAnchors,K._`${ee.default.valCxt}.${ee.default.dynamicAnchors}`)},()=>{if(e.var(ee.default.instancePath,K._`""`),e.var(ee.default.parentData,K._`undefined`),e.var(ee.default.parentDataProperty,K._`undefined`),e.var(ee.default.rootData,ee.default.data),t.dynamicRef)e.var(ee.default.dynamicAnchors,K._`{}`)})}function VN(e){let{schema:t,opts:n,gen:o}=e;ww(e,()=>{if(n.$comment&&t.$comment)Pw(e);if(GN(e),o.let(ee.default.vErrors,null),o.let(ee.default.errors,0),n.unevaluated)FN(e);Iw(e),YN(e)});return}function FN(e){let{gen:t,validateName:n}=e;e.evaluated=t.const("evaluated",K._`${n}.evaluated`),t.if(K._`${e.evaluated}.dynamicProps`,()=>t.assign(K._`${e.evaluated}.props`,K._`undefined`)),t.if(K._`${e.evaluated}.dynamicItems`,()=>t.assign(K._`${e.evaluated}.items`,K._`undefined`))}function yw(e,t){let n=typeof e=="object"&&e[t.schemaId];return n&&(t.code.source||t.code.process)?K._`/*# sourceURL=${n} */`:K.nil}function JN(e,t){if(xw(e)){if(kw(e),Rw(e)){HN(e,t);return}}(0,zw.boolOrEmptySchema)(e,t)}function Rw({schema:e,self:t}){if(typeof e=="boolean")return!e;for(let n in e)if(t.RULES.all[n])return!0;return!1}function xw(e){return typeof e.schema!="boolean"}function HN(e,t){let{schema:n,gen:o,opts:r}=e;if(r.$comment&&n.$comment)Pw(e);BN(e),WN(e);let i=o.const("_errs",ee.default.errors);Iw(e,i),o.var(t,K._`${i} === ${ee.default.errors}`)}function kw(e){(0,fr.checkUnknownRules)(e),KN(e)}function Iw(e,t){if(e.opts.jtd)return bw(e,[],!1,t);let n=(0,Sw.getSchemaTypes)(e.schema),o=(0,Sw.coerceAndCheckDataType)(e,n);bw(e,n,!o,t)}function KN(e){let{schema:t,errSchemaPath:n,opts:o,self:r}=e;if(t.$ref&&o.ignoreKeywordsWithRef&&(0,fr.schemaHasRulesButRef)(t,r.RULES))r.logger.warn(`$ref: keywords ignored in schema at path "${n}"`)}function GN(e){let{schema:t,opts:n}=e;if(t.default!==void 0&&n.useDefaults&&n.strictSchema)(0,fr.checkStrictMode)(e,"default is ignored in the schema root")}function BN(e){let t=e.schema[e.opts.schemaId];if(t)e.baseId=(0,UN.resolveUrl)(e.opts.uriResolver,e.baseId,t)}function WN(e){if(e.schema.$async&&!e.schemaEnv.$async)throw Error("async schema in sync schema")}function Pw({gen:e,schemaEnv:t,schema:n,errSchemaPath:o,opts:r}){let i=n.$comment;if(r.$comment===!0)e.code(K._`${ee.default.self}.logger.log(${i})`);else if(typeof r.$comment=="function"){let a=K.str`${o}/$comment`,s=e.scopeValue("root",{ref:t.root});e.code(K._`${ee.default.self}.opts.$comment(${i}, ${a}, ${s}.schema)`)}}function YN(e){let{gen:t,schemaEnv:n,validateName:o,ValidationError:r,opts:i}=e;if(n.$async)t.if(K._`${ee.default.errors} === 0`,()=>t.return(ee.default.data),()=>t.throw(K._`new ${r}(${ee.default.vErrors})`));else{if(t.assign(K._`${o}.errors`,ee.default.vErrors),i.unevaluated)XN(e);t.return(K._`${ee.default.errors} === 0`)}}function XN({gen:e,evaluated:t,props:n,items:o}){if(n instanceof K.Name)e.assign(K._`${t}.props`,n);if(o instanceof K.Name)e.assign(K._`${t}.items`,o)}function bw(e,t,n,o){let{gen:r,schema:i,data:a,allErrors:s,opts:c,self:l}=e,{RULES:d}=l;if(i.$ref&&(c.ignoreKeywordsWithRef||!(0,fr.schemaHasRulesButRef)(i,d))){r.block(()=>Tw(e,"$ref",d.all.$ref.definition));return}if(!c.jtd)QN(e,t);r.block(()=>{for(let p of d.rules)m(p);m(d.post)});function m(p){if(!(0,dS.shouldUseGroup)(i,p))return;if(p.type){if(r.if((0,_d.checkDataType)(p.type,a,c.strictNumbers)),$w(e,p),t.length===1&&t[0]===p.type&&n)r.else(),(0,_d.reportTypeError)(e);r.endIf()}else $w(e,p);if(!s)r.if(K._`${ee.default.errors} === ${o||0}`)}}function $w(e,t){let{gen:n,schema:o,opts:{useDefaults:r}}=e;if(r)(0,MN.assignDefaults)(e,t.type);n.block(()=>{for(let i of t.rules)if((0,dS.shouldUseRule)(o,i))Tw(e,i.keyword,i.definition,t.type)})}function QN(e,t){if(e.schemaEnv.meta||!e.opts.strictTypes)return;if(eC(e,t),!e.opts.allowUnionTypes)tC(e,t);rC(e,e.dataTypes)}function eC(e,t){if(!t.length)return;if(!e.dataTypes.length){e.dataTypes=t;return}t.forEach((n)=>{if(!Ew(e.dataTypes,n))mS(e,`type "${n}" not allowed by context "${e.dataTypes.join(",")}"`)}),oC(e,t)}function tC(e,t){if(t.length>1&&!(t.length===2&&t.includes("null")))mS(e,"use allowUnionTypes to allow union type keyword")}function rC(e,t){let n=e.self.RULES.all;for(let o in n){let r=n[o];if(typeof r=="object"&&(0,dS.shouldUseRule)(e.schema,r)){let{type:i}=r.definition;if(i.length&&!i.some((a)=>nC(t,a)))mS(e,`missing type "${i.join(",")}" for keyword "${o}"`)}}}function nC(e,t){return e.includes(t)||t==="number"&&e.includes("integer")}function Ew(e,t){return e.includes(t)||t==="integer"&&e.includes("number")}function oC(e,t){let n=[];for(let o of e.dataTypes)if(Ew(t,o))n.push(o);else if(t.includes("integer")&&o==="number")n.push("integer");e.dataTypes=n}function mS(e,t){let n=e.schemaEnv.baseId+e.errSchemaPath;t+=` at "${n}" (strictTypes)`,(0,fr.checkStrictMode)(e,t,e.opts.strictTypes)}class pS{constructor(e,t,n){if((0,Ba.validateKeywordUsage)(e,t,n),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=n,this.data=e.data,this.schema=e.schema[n],this.$data=t.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,fr.schemaRefOrVal)(e,this.schema,n,this.$data),this.schemaType=t.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=t,this.$data)this.schemaCode=e.gen.const("vSchema",jw(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,Ba.validSchemaType)(this.schema,t.schemaType,t.allowUndefined))throw Error(`${n} value must be ${JSON.stringify(t.schemaType)}`);if("code"in t?t.trackErrors:t.errors!==!1)this.errsCount=e.gen.const("_errs",ee.default.errors)}result(e,t,n){this.failResult((0,K.not)(e),t,n)}failResult(e,t,n){if(this.gen.if(e),n)n();else this.error();if(t){if(this.gen.else(),t(),this.allErrors)this.gen.endIf()}else if(this.allErrors)this.gen.endIf();else this.gen.else()}pass(e,t){this.failResult((0,K.not)(e),void 0,t)}fail(e){if(e===void 0){if(this.error(),!this.allErrors)this.gen.if(!1);return}if(this.gen.if(e),this.error(),this.allErrors)this.gen.endIf();else this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);let{schemaCode:t}=this;this.fail(K._`${t} !== undefined && (${(0,K.or)(this.invalid$data(),e)})`)}error(e,t,n){if(t){this.setParams(t),this._error(e,n),this.setParams({});return}this._error(e,n)}_error(e,t){(e?Ga.reportExtraError:Ga.reportError)(this,this.def.error,t)}$dataError(){(0,Ga.reportError)(this,this.def.$dataError||Ga.keyword$DataError)}reset(){if(this.errsCount===void 0)throw Error('add "trackErrors" to keyword definition');(0,Ga.resetErrorsCount)(this.gen,this.errsCount)}ok(e){if(!this.allErrors)this.gen.if(e)}setParams(e,t){if(t)Object.assign(this.params,e);else this.params=e}block$data(e,t,n=K.nil){this.gen.block(()=>{this.check$data(e,n),t()})}check$data(e=K.nil,t=K.nil){if(!this.$data)return;let{gen:n,schemaCode:o,schemaType:r,def:i}=this;if(n.if((0,K.or)(K._`${o} === undefined`,t)),e!==K.nil)n.assign(e,!0);if(r.length||i.validateSchema){if(n.elseIf(this.invalid$data()),this.$dataError(),e!==K.nil)n.assign(e,!1)}n.else()}invalid$data(){let{gen:e,schemaCode:t,schemaType:n,def:o,it:r}=this;return(0,K.or)(i(),a());function i(){if(n.length){if(!(t instanceof K.Name))throw Error("ajv implementation error");let s=Array.isArray(n)?n:[n];return K._`${(0,_d.checkDataTypes)(s,t,r.opts.strictNumbers,_d.DataType.Wrong)}`}return K.nil}function a(){if(o.validateSchema){let s=e.scopeValue("validate$data",{ref:o.validateSchema});return K._`!${s}(${t})`}return K.nil}}subschema(e,t){let n=(0,uS.getSubschema)(this.it,e);(0,uS.extendSubschemaData)(n,this.it,e),(0,uS.extendSubschemaMode)(n,e);let o={...this.it,...n,items:void 0,props:void 0};return JN(o,t),o}mergeEvaluated(e,t){let{it:n,gen:o}=this;if(!n.opts.unevaluated)return;if(n.props!==!0&&e.props!==void 0)n.props=fr.mergeEvaluated.props(o,e.props,n.props,t);if(n.items!==!0&&e.items!==void 0)n.items=fr.mergeEvaluated.items(o,e.items,n.items,t)}mergeValidEvaluated(e,t){let{it:n,gen:o}=this;if(n.opts.unevaluated&&(n.props!==!0||n.items!==!0))return o.if(t,()=>this.mergeEvaluated(e,K.Name)),!0}}Ow.KeywordCxt=pS;function Tw(e,t,n,o){let r=new pS(e,n,t);if("code"in n)n.code(r,o);else if(r.$data&&n.validate)(0,Ba.funcKeywordCode)(r,n);else if("macro"in n)(0,Ba.macroKeywordCode)(r,n);else if(n.compile||n.validate)(0,Ba.funcKeywordCode)(r,n)}var iC=/^\/(?:[^~]|~0|~1)*$/,aC=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function jw(e,{dataLevel:t,dataNames:n,dataPathArr:o}){let r,i;if(e==="")return ee.default.rootData;if(e[0]==="/"){if(!iC.test(e))throw Error(`Invalid JSON-pointer: ${e}`);r=e,i=ee.default.rootData}else{let l=aC.exec(e);if(!l)throw Error(`Invalid JSON-pointer: ${e}`);let d=+l[1];if(r=l[2],r==="#"){if(d>=t)throw Error(c("property/index",d));return o[t-d]}if(d>t)throw Error(c("data",d));if(i=n[t-d],!r)return i}let a=i,s=r.split("/");for(let l of s)if(l)i=K._`${i}${(0,K.getProperty)((0,fr.unescapeJsonPointer)(l))}`,a=K._`${a} && ${i}`;return a;function c(l,d){return`Cannot access ${l} ${d} levels up, current level is ${t}`}}Ow.getData=jw});var Sd=D(function(qw){Object.defineProperty(qw,"__esModule",{value:!0});class Cw extends Error{constructor(e){super("validation failed");this.errors=e,this.ajv=this.validation=!0}}qw.default=Cw});var Ya=D(function(Mw){Object.defineProperty(Mw,"__esModule",{value:!0});var fS=Ka();class Aw extends Error{constructor(e,t,n,o){super(o||`can't resolve reference ${n} from id ${t}`);this.missingRef=(0,fS.resolveUrl)(e,t,n),this.missingSchema=(0,fS.normalizeId)((0,fS.getFullPath)(e,this.missingRef))}}Mw.default=Aw});var bd=D(function(Lw){Object.defineProperty(Lw,"__esModule",{value:!0});Lw.resolveSchema=Lw.getCompilingSchema=Lw.resolveRef=Lw.compileSchema=Lw.SchemaEnv=void 0;var Nt=ce(),dC=Sd(),kn=pr(),Ct=Ka(),Uw=de(),mC=Wa();class Xa{constructor(e){var t;this.refs={},this.dynamicAnchors={};let n;if(typeof e.schema=="object")n=e.schema;this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=(t=e.baseId)!==null&&t!==void 0?t:(0,Ct.normalizeId)(n===null||n===void 0?void 0:n[e.schemaId||"$id"]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=n===null||n===void 0?void 0:n.$async,this.refs={}}}Lw.SchemaEnv=Xa;function gS(e){let t=Dw.call(this,e);if(t)return t;let n=(0,Ct.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:o,lines:r}=this.opts.code,{ownProperties:i}=this.opts,a=new Nt.CodeGen(this.scope,{es5:o,lines:r,ownProperties:i}),s;if(e.$async)s=a.scopeValue("Error",{ref:dC.default,code:Nt._`require("ajv/dist/runtime/validation_error").default`});let c=a.scopeName("validate");e.validateName=c;let l={gen:a,allErrors:this.opts.allErrors,data:kn.default.data,parentData:kn.default.parentData,parentDataProperty:kn.default.parentDataProperty,dataNames:[kn.default.data],dataPathArr:[Nt.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:a.scopeValue("schema",this.opts.code.source===!0?{ref:e.schema,code:(0,Nt.stringify)(e.schema)}:{ref:e.schema}),validateName:c,ValidationError:s,schema:e.schema,schemaEnv:e,rootId:n,baseId:e.baseId||n,schemaPath:Nt.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:Nt._`""`,opts:this.opts,self:this},d;try{this._compilations.add(e),(0,mC.validateFunctionCode)(l),a.optimize(this.opts.code.optimize);let m=a.toString();if(d=`${a.scopeRefs(kn.default.scope)}return ${m}`,this.opts.code.process)d=this.opts.code.process(d,e);let f=Function(`${kn.default.self}`,`${kn.default.scope}`,d)(this,this.scope.get());if(this.scope.value(c,{ref:f}),f.errors=null,f.schema=e.schema,f.schemaEnv=e,e.$async)f.$async=!0;if(this.opts.code.source===!0)f.source={validateName:c,validateCode:m,scopeValues:a._values};if(this.opts.unevaluated){let{props:v,items:g}=l;if(f.evaluated={props:v instanceof Nt.Name?void 0:v,items:g instanceof Nt.Name?void 0:g,dynamicProps:v instanceof Nt.Name,dynamicItems:g instanceof Nt.Name},f.source)f.source.evaluated=(0,Nt.stringify)(f.evaluated)}return e.validate=f,e}catch(m){if(delete e.validate,delete e.validateName,d)this.logger.error("Error compiling schema, function code:",d);throw m}finally{this._compilations.delete(e)}}Lw.compileSchema=gS;function pC(e,t,n){var o;n=(0,Ct.resolveUrl)(this.opts.uriResolver,t,n);let r=e.refs[n];if(r)return r;let i=gC.call(this,e,n);if(i===void 0){let a=(o=e.localRefs)===null||o===void 0?void 0:o[n],{schemaId:s}=this.opts;if(a)i=new Xa({schema:a,schemaId:s,root:e,baseId:t})}if(i===void 0)return;return e.refs[n]=fC.call(this,i)}Lw.resolveRef=pC;function fC(e){if((0,Ct.inlineRef)(e.schema,this.opts.inlineRefs))return e.schema;return e.validate?e:gS.call(this,e)}function Dw(e){for(let t of this._compilations)if(hC(t,e))return t}Lw.getCompilingSchema=Dw;function hC(e,t){return e.schema===t.schema&&e.root===t.root&&e.baseId===t.baseId}function gC(e,t){let n;while(typeof(n=this.refs[t])=="string")t=n;return n||this.schemas[t]||yd.call(this,e,t)}function yd(e,t){let n=this.opts.uriResolver.parse(t),o=(0,Ct._getFullPath)(this.opts.uriResolver,n),r=(0,Ct.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&o===r)return hS.call(this,n,e);let i=(0,Ct.normalizeId)(o),a=this.refs[i]||this.schemas[i];if(typeof a=="string"){let s=yd.call(this,e,a);if(typeof(s===null||s===void 0?void 0:s.schema)!=="object")return;return hS.call(this,n,s)}if(typeof(a===null||a===void 0?void 0:a.schema)!=="object")return;if(!a.validate)gS.call(this,a);if(i===(0,Ct.normalizeId)(t)){let{schema:s}=a,{schemaId:c}=this.opts,l=s[c];if(l)r=(0,Ct.resolveUrl)(this.opts.uriResolver,r,l);return new Xa({schema:s,schemaId:c,root:e,baseId:r})}return hS.call(this,n,a)}Lw.resolveSchema=yd;var vC=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function hS(e,{baseId:t,schema:n,root:o}){var r;if(((r=e.fragment)===null||r===void 0?void 0:r[0])!=="/")return;for(let s of e.fragment.slice(1).split("/")){if(typeof n==="boolean")return;let c=n[(0,Uw.unescapeFragment)(s)];if(c===void 0)return;n=c;let l=typeof n==="object"&&n[this.opts.schemaId];if(!vC.has(s)&&l)t=(0,Ct.resolveUrl)(this.opts.uriResolver,t,l)}let i;if(typeof n!="boolean"&&n.$ref&&!(0,Uw.schemaHasRulesButRef)(n,this.RULES)){let s=(0,Ct.resolveUrl)(this.opts.uriResolver,t,n.$ref);i=yd.call(this,o,s)}let{schemaId:a}=this.opts;if(i=i||new Xa({schema:n,schemaId:a,root:o,baseId:t}),i.schema!==i.root.schema)return i;return}});var Vw=D(function(RL,$C){$C.exports={$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON AnySchema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1}});var _S=D(function(xL,Kw){var zC=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),Jw=RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u);function vS(e){let t="",n=0,o=0;for(o=0;o<e.length;o++){if(n=e[o].charCodeAt(0),n===48)continue;if(!(n>=48&&n<=57||n>=65&&n<=70||n>=97&&n<=102))return"";t+=e[o];break}for(o+=1;o<e.length;o++){if(n=e[o].charCodeAt(0),!(n>=48&&n<=57||n>=65&&n<=70||n>=97&&n<=102))return"";t+=e[o]}return t}var wC=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function Fw(e){return e.length=0,!0}function RC(e,t,n){if(e.length){let o=vS(e);if(o!=="")t.push(o);else return n.error=!0,!1;e.length=0}return!0}function xC(e){let t=0,n={error:!1,address:"",zone:""},o=[],r=[],i=!1,a=!1,s=RC;for(let c=0;c<e.length;c++){let l=e[c];if(l==="["||l==="]")continue;if(l===":"){if(i===!0)a=!0;if(!s(r,o,n))break;if(++t>7){n.error=!0;break}if(c>0&&e[c-1]===":")i=!0;o.push(":");continue}else if(l==="%"){if(!s(r,o,n))break;s=Fw}else{r.push(l);continue}}if(r.length)if(s===Fw)n.zone=r.join("");else if(a)o.push(r.join(""));else o.push(vS(r));return n.address=o.join(""),n}function Hw(e){if(kC(e,":")<2)return{host:e,isIPV6:!1};let t=xC(e);if(!t.error){let{address:n,address:o}=t;if(t.zone)n+="%"+t.zone,o+="%25"+t.zone;return{host:n,isIPV6:!0,escapedHost:o}}else return{host:e,isIPV6:!1}}function kC(e,t){let n=0;for(let o=0;o<e.length;o++)if(e[o]===t)n++;return n}function IC(e){let t=e,n=[],o=-1,r=0;while(r=t.length){if(r===1)if(t===".")break;else if(t==="/"){n.push("/");break}else{n.push(t);break}else if(r===2){if(t[0]==="."){if(t[1]===".")break;else if(t[1]==="/"){t=t.slice(2);continue}}else if(t[0]==="/"){if(t[1]==="."||t[1]==="/"){n.push("/");break}}}else if(r===3){if(t==="/.."){if(n.length!==0)n.pop();n.push("/");break}}if(t[0]==="."){if(t[1]==="."){if(t[2]==="/"){t=t.slice(3);continue}}else if(t[1]==="/"){t=t.slice(2);continue}}else if(t[0]==="/"){if(t[1]==="."){if(t[2]==="/"){t=t.slice(2);continue}else if(t[2]==="."){if(t[3]==="/"){if(t=t.slice(3),n.length!==0)n.pop();continue}}}}if((o=t.indexOf("/",1))===-1){n.push(t);break}else n.push(t.slice(0,o)),t=t.slice(o)}return n.join("")}function PC(e,t){let n=t!==!0?escape:unescape;if(e.scheme!==void 0)e.scheme=n(e.scheme);if(e.userinfo!==void 0)e.userinfo=n(e.userinfo);if(e.host!==void 0)e.host=n(e.host);if(e.path!==void 0)e.path=n(e.path);if(e.query!==void 0)e.query=n(e.query);if(e.fragment!==void 0)e.fragment=n(e.fragment);return e}function EC(e){let t=[];if(e.userinfo!==void 0)t.push(e.userinfo),t.push("@");if(e.host!==void 0){let n=unescape(e.host);if(!Jw(n)){let o=Hw(n);if(o.isIPV6===!0)n=`[${o.escapedHost}]`;else n=e.host}t.push(n)}if(typeof e.port==="number"||typeof e.port==="string")t.push(":"),t.push(String(e.port));return t.length?t.join(""):void 0}Kw.exports={nonSimpleDomain:wC,recomposeAuthority:EC,normalizeComponentEncoding:PC,removeDotSegments:IC,isIPv4:Jw,isUUID:zC,normalizeIPv6:Hw,stringArrayToHexStripped:vS}});var Xw=D(function(kL,Yw){var{isUUID:TC}=_S(),jC=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,OC=["http","https","ws","wss","urn","urn:uuid"];function NC(e){return OC.indexOf(e)!==-1}function SS(e){if(e.secure===!0)return!0;else if(e.secure===!1)return!1;else if(e.scheme)return e.scheme.length===3&&(e.scheme[0]==="w"||e.scheme[0]==="W")&&(e.scheme[1]==="s"||e.scheme[1]==="S")&&(e.scheme[2]==="s"||e.scheme[2]==="S");else return!1}function Gw(e){if(!e.host)e.error=e.error||"HTTP URIs must have a host.";return e}function Bw(e){let t=String(e.scheme).toLowerCase()==="https";if(e.port===(t?443:80)||e.port==="")e.port=void 0;if(!e.path)e.path="/";return e}function CC(e){return e.secure=SS(e),e.resourceName=(e.path||"/")+(e.query?"?"+e.query:""),e.path=void 0,e.query=void 0,e}function qC(e){if(e.port===(SS(e)?443:80)||e.port==="")e.port=void 0;if(typeof e.secure==="boolean")e.scheme=e.secure?"wss":"ws",e.secure=void 0;if(e.resourceName){let[t,n]=e.resourceName.split("?");e.path=t&&t!=="/"?t:void 0,e.query=n,e.resourceName=void 0}return e.fragment=void 0,e}function AC(e,t){if(!e.path)return e.error="URN can not be parsed",e;let n=e.path.match(jC);if(n){let o=t.scheme||e.scheme||"urn";e.nid=n[1].toLowerCase(),e.nss=n[2];let r=`${o}:${t.nid||e.nid}`,i=yS(r);if(e.path=void 0,i)e=i.parse(e,t)}else e.error=e.error||"URN can not be parsed.";return e}function MC(e,t){if(e.nid===void 0)throw Error("URN without nid cannot be serialized");let n=t.scheme||e.scheme||"urn",o=e.nid.toLowerCase(),r=`${n}:${t.nid||o}`,i=yS(r);if(i)e=i.serialize(e,t);let a=e,s=e.nss;return a.path=`${o||t.nid}:${s}`,t.skipEscape=!0,a}function UC(e,t){let n=e;if(n.uuid=n.nss,n.nss=void 0,!t.tolerant&&(!n.uuid||!TC(n.uuid)))n.error=n.error||"UUID is not valid.";return n}function DC(e){let t=e;return t.nss=(e.uuid||"").toLowerCase(),t}var Ww={scheme:"http",domainHost:!0,parse:Gw,serialize:Bw},LC={scheme:"https",domainHost:Ww.domainHost,parse:Gw,serialize:Bw},$d={scheme:"ws",domainHost:!0,parse:CC,serialize:qC},ZC={scheme:"wss",domainHost:$d.domainHost,parse:$d.parse,serialize:$d.serialize},VC={scheme:"urn",parse:AC,serialize:MC,skipNormalize:!0},FC={scheme:"urn:uuid",parse:UC,serialize:DC,skipNormalize:!0},zd={http:Ww,https:LC,ws:$d,wss:ZC,urn:VC,"urn:uuid":FC};Object.setPrototypeOf(zd,null);function yS(e){return e&&(zd[e]||zd[e.toLowerCase()])||void 0}Yw.exports={wsIsSecure:SS,SCHEMES:zd,isValidSchemeName:NC,getSchemeHandler:yS}});var tR=D(function(IL,Rd){var{normalizeIPv6:JC,removeDotSegments:Qa,recomposeAuthority:HC,normalizeComponentEncoding:wd,isIPv4:KC,nonSimpleDomain:GC}=_S(),{SCHEMES:BC,getSchemeHandler:Qw}=Xw();function WC(e,t){if(typeof e==="string")e=Qt(hr(e,t),t);else if(typeof e==="object")e=hr(Qt(e,t),t);return e}function YC(e,t,n){let o=n?Object.assign({scheme:"null"},n):{scheme:"null"},r=eR(hr(e,o),hr(t,o),o,!0);return o.skipEscape=!0,Qt(r,o)}function eR(e,t,n,o){let r={};if(!o)e=hr(Qt(e,n),n),t=hr(Qt(t,n),n);if(n=n||{},!n.tolerant&&t.scheme)r.scheme=t.scheme,r.userinfo=t.userinfo,r.host=t.host,r.port=t.port,r.path=Qa(t.path||""),r.query=t.query;else{if(t.userinfo!==void 0||t.host!==void 0||t.port!==void 0)r.userinfo=t.userinfo,r.host=t.host,r.port=t.port,r.path=Qa(t.path||""),r.query=t.query;else{if(!t.path)if(r.path=e.path,t.query!==void 0)r.query=t.query;else r.query=e.query;else{if(t.path[0]==="/")r.path=Qa(t.path);else{if((e.userinfo!==void 0||e.host!==void 0||e.port!==void 0)&&!e.path)r.path="/"+t.path;else if(!e.path)r.path=t.path;else r.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+t.path;r.path=Qa(r.path)}r.query=t.query}r.userinfo=e.userinfo,r.host=e.host,r.port=e.port}r.scheme=e.scheme}return r.fragment=t.fragment,r}function XC(e,t,n){if(typeof e==="string")e=unescape(e),e=Qt(wd(hr(e,n),!0),{...n,skipEscape:!0});else if(typeof e==="object")e=Qt(wd(e,!0),{...n,skipEscape:!0});if(typeof t==="string")t=unescape(t),t=Qt(wd(hr(t,n),!0),{...n,skipEscape:!0});else if(typeof t==="object")t=Qt(wd(t,!0),{...n,skipEscape:!0});return e.toLowerCase()===t.toLowerCase()}function Qt(e,t){let n={host:e.host,scheme:e.scheme,userinfo:e.userinfo,port:e.port,path:e.path,query:e.query,nid:e.nid,nss:e.nss,uuid:e.uuid,fragment:e.fragment,reference:e.reference,resourceName:e.resourceName,secure:e.secure,error:""},o=Object.assign({},t),r=[],i=Qw(o.scheme||n.scheme);if(i&&i.serialize)i.serialize(n,o);if(n.path!==void 0)if(!o.skipEscape){if(n.path=escape(n.path),n.scheme!==void 0)n.path=n.path.split("%3A").join(":")}else n.path=unescape(n.path);if(o.reference!=="suffix"&&n.scheme)r.push(n.scheme,":");let a=HC(n);if(a!==void 0){if(o.reference!=="suffix")r.push("//");if(r.push(a),n.path&&n.path[0]!=="/")r.push("/")}if(n.path!==void 0){let s=n.path;if(!o.absolutePath&&(!i||!i.absolutePath))s=Qa(s);if(a===void 0&&s[0]==="/"&&s[1]==="/")s="/%2F"+s.slice(2);r.push(s)}if(n.query!==void 0)r.push("?",n.query);if(n.fragment!==void 0)r.push("#",n.fragment);return r.join("")}var QC=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function hr(e,t){let n=Object.assign({},t),o={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},r=!1;if(n.reference==="suffix")if(n.scheme)e=n.scheme+":"+e;else e="//"+e;let i=e.match(QC);if(i){if(o.scheme=i[1],o.userinfo=i[3],o.host=i[4],o.port=parseInt(i[5],10),o.path=i[6]||"",o.query=i[7],o.fragment=i[8],isNaN(o.port))o.port=i[5];if(o.host)if(KC(o.host)===!1){let c=JC(o.host);o.host=c.host.toLowerCase(),r=c.isIPV6}else r=!0;if(o.scheme===void 0&&o.userinfo===void 0&&o.host===void 0&&o.port===void 0&&o.query===void 0&&!o.path)o.reference="same-document";else if(o.scheme===void 0)o.reference="relative";else if(o.fragment===void 0)o.reference="absolute";else o.reference="uri";if(n.reference&&n.reference!=="suffix"&&n.reference!==o.reference)o.error=o.error||"URI is not a "+n.reference+" reference.";let a=Qw(n.scheme||o.scheme);if(!n.unicodeSupport&&(!a||!a.unicodeSupport)){if(o.host&&(n.domainHost||a&&a.domainHost)&&r===!1&&GC(o.host))try{o.host=URL.domainToASCII(o.host.toLowerCase())}catch(s){o.error=o.error||"Host's domain name can not be converted to ASCII: "+s}}if(!a||a&&!a.skipNormalize){if(e.indexOf("%")!==-1){if(o.scheme!==void 0)o.scheme=unescape(o.scheme);if(o.host!==void 0)o.host=unescape(o.host)}if(o.path)o.path=escape(unescape(o.path));if(o.fragment)o.fragment=encodeURI(decodeURIComponent(o.fragment))}if(a&&a.parse)a.parse(o,n)}else o.error=o.error||"URI can not be parsed.";return o}var bS={SCHEMES:BC,normalize:WC,resolve:YC,resolveComponent:eR,equal:XC,serialize:Qt,parse:hr};Rd.exports=bS;Rd.exports.default=bS;Rd.exports.fastUri=bS});var oR=D(function(nR){Object.defineProperty(nR,"__esModule",{value:!0});var rR=tR();rR.code='require("ajv/dist/runtime/uri").default';nR.default=rR});var mR=D(function(gr){Object.defineProperty(gr,"__esModule",{value:!0});gr.CodeGen=gr.Name=gr.nil=gr.stringify=gr.str=gr._=gr.KeywordCxt=void 0;var tq=Wa();Object.defineProperty(gr,"KeywordCxt",{enumerable:!0,get:function(){return tq.KeywordCxt}});var Fo=ce();Object.defineProperty(gr,"_",{enumerable:!0,get:function(){return Fo._}});Object.defineProperty(gr,"str",{enumerable:!0,get:function(){return Fo.str}});Object.defineProperty(gr,"stringify",{enumerable:!0,get:function(){return Fo.stringify}});Object.defineProperty(gr,"nil",{enumerable:!0,get:function(){return Fo.nil}});Object.defineProperty(gr,"Name",{enumerable:!0,get:function(){return Fo.Name}});Object.defineProperty(gr,"CodeGen",{enumerable:!0,get:function(){return Fo.CodeGen}});var rq=Sd(),lR=Ya(),nq=eS(),es=bd(),oq=ce(),ts=Ka(),xd=Ha(),zS=de(),iR=Vw(),iq=oR(),uR=(e,t)=>new RegExp(e,t);uR.code="new RegExp";var aq=["removeAdditional","useDefaults","coerceTypes"],sq=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),cq={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},lq={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},aR=200;function uq(e){var t,n,o,r,i,a,s,c,l,d,m,p,f,v,g,b,w,Z,E,L,T,ne,ue,Oe,Se;let Ie=e.strict,Le=(t=e.code)===null||t===void 0?void 0:t.optimize,Rt=Le===!0||Le===void 0?1:Le||0,xt=(o=(n=e.code)===null||n===void 0?void 0:n.regExp)!==null&&o!==void 0?o:uR,gt=(r=e.uriResolver)!==null&&r!==void 0?r:iq.default;return{strictSchema:(a=(i=e.strictSchema)!==null&&i!==void 0?i:Ie)!==null&&a!==void 0?a:!0,strictNumbers:(c=(s=e.strictNumbers)!==null&&s!==void 0?s:Ie)!==null&&c!==void 0?c:!0,strictTypes:(d=(l=e.strictTypes)!==null&&l!==void 0?l:Ie)!==null&&d!==void 0?d:"log",strictTuples:(p=(m=e.strictTuples)!==null&&m!==void 0?m:Ie)!==null&&p!==void 0?p:"log",strictRequired:(v=(f=e.strictRequired)!==null&&f!==void 0?f:Ie)!==null&&v!==void 0?v:!1,code:e.code?{...e.code,optimize:Rt,regExp:xt}:{optimize:Rt,regExp:xt},loopRequired:(g=e.loopRequired)!==null&&g!==void 0?g:aR,loopEnum:(b=e.loopEnum)!==null&&b!==void 0?b:aR,meta:(w=e.meta)!==null&&w!==void 0?w:!0,messages:(Z=e.messages)!==null&&Z!==void 0?Z:!0,inlineRefs:(E=e.inlineRefs)!==null&&E!==void 0?E:!0,schemaId:(L=e.schemaId)!==null&&L!==void 0?L:"$id",addUsedSchema:(T=e.addUsedSchema)!==null&&T!==void 0?T:!0,validateSchema:(ne=e.validateSchema)!==null&&ne!==void 0?ne:!0,validateFormats:(ue=e.validateFormats)!==null&&ue!==void 0?ue:!0,unicodeRegExp:(Oe=e.unicodeRegExp)!==null&&Oe!==void 0?Oe:!0,int32range:(Se=e.int32range)!==null&&Se!==void 0?Se:!0,uriResolver:gt}}class kd{constructor(e={}){this.schemas={},this.refs={},this.formats=Object.create(null),this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts={...e,...uq(e)};let{es5:t,lines:n}=this.opts.code;this.scope=new oq.ValueScope({scope:{},prefixes:sq,es5:t,lines:n}),this.logger=gq(e.logger);let o=e.validateFormats;if(e.validateFormats=!1,this.RULES=(0,nq.getRules)(),sR.call(this,cq,e,"NOT SUPPORTED"),sR.call(this,lq,e,"DEPRECATED","warn"),this._metaOpts=fq.call(this),e.formats)mq.call(this);if(this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords)pq.call(this,e.keywords);if(typeof e.meta=="object")this.addMetaSchema(e.meta);dq.call(this),e.validateFormats=o}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:e,meta:t,schemaId:n}=this.opts,o=iR;if(n==="id")o={...iR},o.id=o.$id,delete o.$id;if(t&&e)this.addMetaSchema(o,o[n],!1)}defaultMeta(){let{meta:e,schemaId:t}=this.opts;return this.opts.defaultMeta=typeof e=="object"?e[t]||e:void 0}validate(e,t){let n;if(typeof e=="string"){if(n=this.getSchema(e),!n)throw Error(`no schema with key or ref "${e}"`)}else n=this.compile(e);let o=n(t);if(!("$async"in n))this.errors=n.errors;return o}compile(e,t){let n=this._addSchema(e,t);return n.validate||this._compileSchemaEnv(n)}compileAsync(e,t){if(typeof this.opts.loadSchema!="function")throw Error("options.loadSchema should be a function");let{loadSchema:n}=this.opts;return o.call(this,e,t);async function o(l,d){await r.call(this,l.$schema);let m=this._addSchema(l,d);return m.validate||i.call(this,m)}async function r(l){if(l&&!this.getSchema(l))await o.call(this,{$ref:l},!0)}async function i(l){try{return this._compileSchemaEnv(l)}catch(d){if(!(d instanceof lR.default))throw d;return a.call(this,d),await s.call(this,d.missingSchema),i.call(this,l)}}function a({missingSchema:l,missingRef:d}){if(this.refs[l])throw Error(`AnySchema ${l} is loaded but ${d} cannot be resolved`)}async function s(l){let d=await c.call(this,l);if(!this.refs[l])await r.call(this,d.$schema);if(!this.refs[l])this.addSchema(d,l,t)}async function c(l){let d=this._loading[l];if(d)return d;try{return await(this._loading[l]=n(l))}finally{delete this._loading[l]}}}addSchema(e,t,n,o=this.opts.validateSchema){if(Array.isArray(e)){for(let i of e)this.addSchema(i,void 0,n,o);return this}let r;if(typeof e==="object"){let{schemaId:i}=this.opts;if(r=e[i],r!==void 0&&typeof r!="string")throw Error(`schema ${i} must be string`)}return t=(0,ts.normalizeId)(t||r),this._checkUnique(t),this.schemas[t]=this._addSchema(e,n,t,o,!0),this}addMetaSchema(e,t,n=this.opts.validateSchema){return this.addSchema(e,t,!0,n),this}validateSchema(e,t){if(typeof e=="boolean")return!0;let n;if(n=e.$schema,n!==void 0&&typeof n!="string")throw Error("$schema must be a string");if(n=n||this.opts.defaultMeta||this.defaultMeta(),!n)return this.logger.warn("meta-schema not available"),this.errors=null,!0;let o=this.validate(n,e);if(!o&&t){let r="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(r);else throw Error(r)}return o}getSchema(e){let t;while(typeof(t=cR.call(this,e))=="string")e=t;if(t===void 0){let{schemaId:n}=this.opts,o=new es.SchemaEnv({schema:{},schemaId:n});if(t=es.resolveSchema.call(this,o,e),!t)return;this.refs[e]=t}return t.validate||this._compileSchemaEnv(t)}removeSchema(e){if(e instanceof RegExp)return this._removeAllSchemas(this.schemas,e),this._removeAllSchemas(this.refs,e),this;switch(typeof e){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{let t=cR.call(this,e);if(typeof t=="object")this._cache.delete(t.schema);return delete this.schemas[e],delete this.refs[e],this}case"object":{let t=e;this._cache.delete(t);let n=e[this.opts.schemaId];if(n)n=(0,ts.normalizeId)(n),delete this.schemas[n],delete this.refs[n];return this}default:throw Error("ajv.removeSchema: invalid parameter")}}addVocabulary(e){for(let t of e)this.addKeyword(t);return this}addKeyword(e,t){let n;if(typeof e=="string"){if(n=e,typeof t=="object")this.logger.warn("these parameters are deprecated, see docs for addKeyword"),t.keyword=n}else if(typeof e=="object"&&t===void 0){if(t=e,n=t.keyword,Array.isArray(n)&&!n.length)throw Error("addKeywords: keyword must be string or non-empty array")}else throw Error("invalid addKeywords parameters");if(_q.call(this,n,t),!t)return(0,zS.eachItem)(n,(r)=>$S.call(this,r)),this;yq.call(this,t);let o={...t,type:(0,xd.getJSONTypes)(t.type),schemaType:(0,xd.getJSONTypes)(t.schemaType)};return(0,zS.eachItem)(n,o.type.length===0?(r)=>$S.call(this,r,o):(r)=>o.type.forEach((i)=>$S.call(this,r,o,i))),this}getKeyword(e){let t=this.RULES.all[e];return typeof t=="object"?t.definition:!!t}removeKeyword(e){let{RULES:t}=this;delete t.keywords[e],delete t.all[e];for(let n of t.rules){let o=n.rules.findIndex((r)=>r.keyword===e);if(o>=0)n.rules.splice(o,1)}return this}addFormat(e,t){if(typeof t=="string")t=new RegExp(t);return this.formats[e]=t,this}errorsText(e=this.errors,{separator:t=", ",dataVar:n="data"}={}){if(!e||e.length===0)return"No errors";return e.map((o)=>`${n}${o.instancePath} ${o.message}`).reduce((o,r)=>o+t+r)}$dataMetaSchema(e,t){let n=this.RULES.all;e=JSON.parse(JSON.stringify(e));for(let o of t){let r=o.split("/").slice(1),i=e;for(let a of r)i=i[a];for(let a in n){let s=n[a];if(typeof s!="object")continue;let{$data:c}=s.definition,l=i[a];if(c&&l)i[a]=dR(l)}}return e}_removeAllSchemas(e,t){for(let n in e){let o=e[n];if(!t||t.test(n)){if(typeof o=="string")delete e[n];else if(o&&!o.meta)this._cache.delete(o.schema),delete e[n]}}}_addSchema(e,t,n,o=this.opts.validateSchema,r=this.opts.addUsedSchema){let i,{schemaId:a}=this.opts;if(typeof e=="object")i=e[a];else if(this.opts.jtd)throw Error("schema must be object");else if(typeof e!="boolean")throw Error("schema must be object or boolean");let s=this._cache.get(e);if(s!==void 0)return s;n=(0,ts.normalizeId)(i||n);let c=ts.getSchemaRefs.call(this,e,n);if(s=new es.SchemaEnv({schema:e,schemaId:a,meta:t,baseId:n,localRefs:c}),this._cache.set(s.schema,s),r&&!n.startsWith("#")){if(n)this._checkUnique(n);this.refs[n]=s}if(o)this.validateSchema(e,!0);return s}_checkUnique(e){if(this.schemas[e]||this.refs[e])throw Error(`schema with key or id "${e}" already exists`)}_compileSchemaEnv(e){if(e.meta)this._compileMetaSchema(e);else es.compileSchema.call(this,e);if(!e.validate)throw Error("ajv implementation error");return e.validate}_compileMetaSchema(e){let t=this.opts;this.opts=this._metaOpts;try{es.compileSchema.call(this,e)}finally{this.opts=t}}}kd.ValidationError=rq.default;kd.MissingRefError=lR.default;gr.default=kd;function sR(e,t,n,o="error"){for(let r in e){let i=r;if(i in t)this.logger[o](`${n}: option ${r}. ${e[i]}`)}}function cR(e){return e=(0,ts.normalizeId)(e),this.schemas[e]||this.refs[e]}function dq(){let e=this.opts.schemas;if(!e)return;if(Array.isArray(e))this.addSchema(e);else for(let t in e)this.addSchema(e[t],t)}function mq(){for(let e in this.opts.formats){let t=this.opts.formats[e];if(t)this.addFormat(e,t)}}function pq(e){if(Array.isArray(e)){this.addVocabulary(e);return}this.logger.warn("keywords option as map is deprecated, pass array");for(let t in e){let n=e[t];if(!n.keyword)n.keyword=t;this.addKeyword(n)}}function fq(){let e={...this.opts};for(let t of aq)delete e[t];return e}var hq={log(){},warn(){},error(){}};function gq(e){if(e===!1)return hq;if(e===void 0)return console;if(e.log&&e.warn&&e.error)return e;throw Error("logger must implement log, warn and error methods")}var vq=/^[a-z_$][a-z0-9_$:-]*$/i;function _q(e,t){let{RULES:n}=this;if((0,zS.eachItem)(e,(o)=>{if(n.keywords[o])throw Error(`Keyword ${o} is already defined`);if(!vq.test(o))throw Error(`Keyword ${o} has invalid name`)}),!t)return;if(t.$data&&!(("code"in t)||("validate"in t)))throw Error('$data keyword must have "code" or "validate" function')}function $S(e,t,n){var o;let r=t===null||t===void 0?void 0:t.post;if(n&&r)throw Error('keyword with "post" flag cannot have "type"');let{RULES:i}=this,a=r?i.post:i.rules.find(({type:c})=>c===n);if(!a)a={type:n,rules:[]},i.rules.push(a);if(i.keywords[e]=!0,!t)return;let s={keyword:e,definition:{...t,type:(0,xd.getJSONTypes)(t.type),schemaType:(0,xd.getJSONTypes)(t.schemaType)}};if(t.before)Sq.call(this,a,s,t.before);else a.rules.push(s);i.all[e]=s,(o=t.implements)===null||o===void 0||o.forEach((c)=>this.addKeyword(c))}function Sq(e,t,n){let o=e.rules.findIndex((r)=>r.keyword===n);if(o>=0)e.rules.splice(o,0,t);else e.rules.push(t),this.logger.warn(`rule ${n} is not defined`)}function yq(e){let{metaSchema:t}=e;if(t===void 0)return;if(e.$data&&this.opts.$data)t=dR(t);e.validateSchema=this.compile(t,!0)}var bq={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function dR(e){return{anyOf:[e,bq]}}});var fR=D(function(pR){Object.defineProperty(pR,"__esModule",{value:!0});var wq={keyword:"id",code(){throw Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};pR.default=wq});var yR=D(function(_R){Object.defineProperty(_R,"__esModule",{value:!0});_R.callRef=_R.getValidate=void 0;var xq=Ya(),hR=zt(),at=ce(),Jo=pr(),gR=bd(),Id=de(),kq={keyword:"$ref",schemaType:"string",code(e){let{gen:t,schema:n,it:o}=e,{baseId:r,schemaEnv:i,validateName:a,opts:s,self:c}=o,{root:l}=i;if((n==="#"||n==="#/")&&r===l.baseId)return m();let d=gR.resolveRef.call(c,l,r,n);if(d===void 0)throw new xq.default(o.opts.uriResolver,r,n);if(d instanceof gR.SchemaEnv)return p(d);return f(d);function m(){if(i===l)return Pd(e,a,i,i.$async);let v=t.scopeValue("root",{ref:l});return Pd(e,at._`${v}.validate`,l,l.$async)}function p(v){let g=vR(e,v);Pd(e,g,v,v.$async)}function f(v){let g=t.scopeValue("schema",s.code.source===!0?{ref:v,code:(0,at.stringify)(v)}:{ref:v}),b=t.name("valid"),w=e.subschema({schema:v,dataTypes:[],schemaPath:at.nil,topSchemaRef:g,errSchemaPath:n},b);e.mergeEvaluated(w),e.ok(b)}}};function vR(e,t){let{gen:n}=e;return t.validate?n.scopeValue("validate",{ref:t.validate}):at._`${n.scopeValue("wrapper",{ref:t})}.validate`}_R.getValidate=vR;function Pd(e,t,n,o){let{gen:r,it:i}=e,{allErrors:a,schemaEnv:s,opts:c}=i,l=c.passContext?Jo.default.this:at.nil;if(o)d();else m();function d(){if(!s.$async)throw Error("async schema referenced by sync schema");let v=r.let("valid");r.try(()=>{if(r.code(at._`await ${(0,hR.callValidateCode)(e,t,l)}`),f(t),!a)r.assign(v,!0)},(g)=>{if(r.if(at._`!(${g} instanceof ${i.ValidationError})`,()=>r.throw(g)),p(g),!a)r.assign(v,!1)}),e.ok(v)}function m(){e.result((0,hR.callValidateCode)(e,t,l),()=>f(t),()=>p(t))}function p(v){let g=at._`${v}.errors`;r.assign(Jo.default.vErrors,at._`${Jo.default.vErrors} === null ? ${g} : ${Jo.default.vErrors}.concat(${g})`),r.assign(Jo.default.errors,at._`${Jo.default.vErrors}.length`)}function f(v){var g;if(!i.opts.unevaluated)return;let b=(g=n===null||n===void 0?void 0:n.validate)===null||g===void 0?void 0:g.evaluated;if(i.props!==!0)if(b&&!b.dynamicProps){if(b.props!==void 0)i.props=Id.mergeEvaluated.props(r,b.props,i.props)}else{let w=r.var("props",at._`${v}.evaluated.props`);i.props=Id.mergeEvaluated.props(r,w,i.props,at.Name)}if(i.items!==!0)if(b&&!b.dynamicItems){if(b.items!==void 0)i.items=Id.mergeEvaluated.items(r,b.items,i.items)}else{let w=r.var("items",at._`${v}.evaluated.items`);i.items=Id.mergeEvaluated.items(r,w,i.items,at.Name)}}}_R.callRef=Pd;_R.default=kq});var $R=D(function(bR){Object.defineProperty(bR,"__esModule",{value:!0});var Eq=fR(),Tq=yR(),jq=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",Eq.default,Tq.default];bR.default=jq});var wR=D(function(zR){Object.defineProperty(zR,"__esModule",{value:!0});var Ed=ce(),Kr=Ed.operators,Td={maximum:{okStr:"<=",ok:Kr.LTE,fail:Kr.GT},minimum:{okStr:">=",ok:Kr.GTE,fail:Kr.LT},exclusiveMaximum:{okStr:"<",ok:Kr.LT,fail:Kr.GTE},exclusiveMinimum:{okStr:">",ok:Kr.GT,fail:Kr.LTE}},Nq={message:({keyword:e,schemaCode:t})=>Ed.str`must be ${Td[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>Ed._`{comparison: ${Td[e].okStr}, limit: ${t}}`},Cq={keyword:Object.keys(Td),type:"number",schemaType:"number",$data:!0,error:Nq,code(e){let{keyword:t,data:n,schemaCode:o}=e;e.fail$data(Ed._`${n} ${Td[t].fail} ${o} || isNaN(${n})`)}};zR.default=Cq});var xR=D(function(RR){Object.defineProperty(RR,"__esModule",{value:!0});var rs=ce(),Aq={message:({schemaCode:e})=>rs.str`must be multiple of ${e}`,params:({schemaCode:e})=>rs._`{multipleOf: ${e}}`},Mq={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:Aq,code(e){let{gen:t,data:n,schemaCode:o,it:r}=e,i=r.opts.multipleOfPrecision,a=t.let("res"),s=i?rs._`Math.abs(Math.round(${a}) - ${a}) > 1e-${i}`:rs._`${a} !== parseInt(${a})`;e.fail$data(rs._`(${o} === 0 || (${a} = ${n}/${o}, ${s}))`)}};RR.default=Mq});var PR=D(function(IR){Object.defineProperty(IR,"__esModule",{value:!0});function kR(e){let t=e.length,n=0,o=0,r;while(o<t)if(n++,r=e.charCodeAt(o++),r>=55296&&r<=56319&&o<t){if(r=e.charCodeAt(o),(r&64512)===56320)o++}return n}IR.default=kR;kR.code='require("ajv/dist/runtime/ucs2length").default'});var TR=D(function(ER){Object.defineProperty(ER,"__esModule",{value:!0});var In=ce(),Lq=de(),Zq=PR(),Vq={message({keyword:e,schemaCode:t}){let n=e==="maxLength"?"more":"fewer";return In.str`must NOT have ${n} than ${t} characters`},params:({schemaCode:e})=>In._`{limit: ${e}}`},Fq={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:Vq,code(e){let{keyword:t,data:n,schemaCode:o,it:r}=e,i=t==="maxLength"?In.operators.GT:In.operators.LT,a=r.opts.unicode===!1?In._`${n}.length`:In._`${(0,Lq.useFunc)(e.gen,Zq.default)}(${n})`;e.fail$data(In._`${a} ${i} ${o}`)}};ER.default=Fq});var OR=D(function(jR){Object.defineProperty(jR,"__esModule",{value:!0});var Hq=zt(),Kq=de(),Ho=ce(),Gq={message:({schemaCode:e})=>Ho.str`must match pattern "${e}"`,params:({schemaCode:e})=>Ho._`{pattern: ${e}}`},Bq={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:Gq,code(e){let{gen:t,data:n,$data:o,schema:r,schemaCode:i,it:a}=e,s=a.opts.unicodeRegExp?"u":"";if(o){let{regExp:c}=a.opts.code,l=c.code==="new RegExp"?Ho._`new RegExp`:(0,Kq.useFunc)(t,c),d=t.let("valid");t.try(()=>t.assign(d,Ho._`${l}(${i}, ${s}).test(${n})`),()=>t.assign(d,!1)),e.fail$data(Ho._`!${d}`)}else{let c=(0,Hq.usePattern)(e,r);e.fail$data(Ho._`!${c}.test(${n})`)}}};jR.default=Bq});var CR=D(function(NR){Object.defineProperty(NR,"__esModule",{value:!0});var ns=ce(),Yq={message({keyword:e,schemaCode:t}){let n=e==="maxProperties"?"more":"fewer";return ns.str`must NOT have ${n} than ${t} properties`},params:({schemaCode:e})=>ns._`{limit: ${e}}`},Xq={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:Yq,code(e){let{keyword:t,data:n,schemaCode:o}=e,r=t==="maxProperties"?ns.operators.GT:ns.operators.LT;e.fail$data(ns._`Object.keys(${n}).length ${r} ${o}`)}};NR.default=Xq});var AR=D(function(qR){Object.defineProperty(qR,"__esModule",{value:!0});var os=zt(),is=ce(),e1=de(),t1={message:({params:{missingProperty:e}})=>is.str`must have required property '${e}'`,params:({params:{missingProperty:e}})=>is._`{missingProperty: ${e}}`},r1={keyword:"required",type:"object",schemaType:"array",$data:!0,error:t1,code(e){let{gen:t,schema:n,schemaCode:o,data:r,$data:i,it:a}=e,{opts:s}=a;if(!i&&n.length===0)return;let c=n.length>=s.loopRequired;if(a.allErrors)l();else d();if(s.strictRequired){let f=e.parentSchema.properties,{definedProperties:v}=e.it;for(let g of n)if((f===null||f===void 0?void 0:f[g])===void 0&&!v.has(g)){let b=a.schemaEnv.baseId+a.errSchemaPath,w=`required property "${g}" is not defined at "${b}" (strictRequired)`;(0,e1.checkStrictMode)(a,w,a.opts.strictRequired)}}function l(){if(c||i)e.block$data(is.nil,m);else for(let f of n)(0,os.checkReportMissingProp)(e,f)}function d(){let f=t.let("missing");if(c||i){let v=t.let("valid",!0);e.block$data(v,()=>p(f,v)),e.ok(v)}else t.if((0,os.checkMissingProp)(e,n,f)),(0,os.reportMissingProp)(e,f),t.else()}function m(){t.forOf("prop",o,(f)=>{e.setParams({missingProperty:f}),t.if((0,os.noPropertyInData)(t,r,f,s.ownProperties),()=>e.error())})}function p(f,v){e.setParams({missingProperty:f}),t.forOf(f,o,()=>{t.assign(v,(0,os.propertyInData)(t,r,f,s.ownProperties)),t.if((0,is.not)(v),()=>{e.error(),t.break()})},is.nil)}}};qR.default=r1});var UR=D(function(MR){Object.defineProperty(MR,"__esModule",{value:!0});var as=ce(),o1={message({keyword:e,schemaCode:t}){let n=e==="maxItems"?"more":"fewer";return as.str`must NOT have ${n} than ${t} items`},params:({schemaCode:e})=>as._`{limit: ${e}}`},i1={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:o1,code(e){let{keyword:t,data:n,schemaCode:o}=e,r=t==="maxItems"?as.operators.GT:as.operators.LT;e.fail$data(as._`${n}.length ${r} ${o}`)}};MR.default=i1});var jd=D(function(LR){Object.defineProperty(LR,"__esModule",{value:!0});var DR=cS();DR.code='require("ajv/dist/runtime/equal").default';LR.default=DR});var VR=D(function(ZR){Object.defineProperty(ZR,"__esModule",{value:!0});var wS=Ha(),je=ce(),c1=de(),l1=jd(),u1={message:({params:{i:e,j:t}})=>je.str`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>je._`{i: ${e}, j: ${t}}`},d1={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:u1,code(e){let{gen:t,data:n,$data:o,schema:r,parentSchema:i,schemaCode:a,it:s}=e;if(!o&&!r)return;let c=t.let("valid"),l=i.items?(0,wS.getSchemaTypes)(i.items):[];e.block$data(c,d,je._`${a} === false`),e.ok(c);function d(){let v=t.let("i",je._`${n}.length`),g=t.let("j");e.setParams({i:v,j:g}),t.assign(c,!0),t.if(je._`${v} > 1`,()=>(m()?p:f)(v,g))}function m(){return l.length>0&&!l.some((v)=>v==="object"||v==="array")}function p(v,g){let b=t.name("item"),w=(0,wS.checkDataTypes)(l,b,s.opts.strictNumbers,wS.DataType.Wrong),Z=t.const("indices",je._`{}`);t.for(je._`;${v}--;`,()=>{if(t.let(b,je._`${n}[${v}]`),t.if(w,je._`continue`),l.length>1)t.if(je._`typeof ${b} == "string"`,je._`${b} += "_"`);t.if(je._`typeof ${Z}[${b}] == "number"`,()=>{t.assign(g,je._`${Z}[${b}]`),e.error(),t.assign(c,!1).break()}).code(je._`${Z}[${b}] = ${v}`)})}function f(v,g){let b=(0,c1.useFunc)(t,l1.default),w=t.name("outer");t.label(w).for(je._`;${v}--;`,()=>t.for(je._`${g} = ${v}; ${g}--;`,()=>t.if(je._`${b}(${n}[${v}], ${n}[${g}])`,()=>{e.error(),t.assign(c,!1).break(w)})))}}};ZR.default=d1});var JR=D(function(FR){Object.defineProperty(FR,"__esModule",{value:!0});var RS=ce(),p1=de(),f1=jd(),h1={message:"must be equal to constant",params:({schemaCode:e})=>RS._`{allowedValue: ${e}}`},g1={keyword:"const",$data:!0,error:h1,code(e){let{gen:t,data:n,$data:o,schemaCode:r,schema:i}=e;if(o||i&&typeof i=="object")e.fail$data(RS._`!${(0,p1.useFunc)(t,f1.default)}(${n}, ${r})`);else e.fail(RS._`${i} !== ${n}`)}};FR.default=g1});var KR=D(function(HR){Object.defineProperty(HR,"__esModule",{value:!0});var ss=ce(),_1=de(),S1=jd(),y1={message:"must be equal to one of the allowed values",params:({schemaCode:e})=>ss._`{allowedValues: ${e}}`},b1={keyword:"enum",schemaType:"array",$data:!0,error:y1,code(e){let{gen:t,data:n,$data:o,schema:r,schemaCode:i,it:a}=e;if(!o&&r.length===0)throw Error("enum must have non-empty array");let s=r.length>=a.opts.loopEnum,c,l=()=>c!==null&&c!==void 0?c:c=(0,_1.useFunc)(t,S1.default),d;if(s||o)d=t.let("valid"),e.block$data(d,m);else{if(!Array.isArray(r))throw Error("ajv implementation error");let f=t.const("vSchema",i);d=(0,ss.or)(...r.map((v,g)=>p(f,g)))}e.pass(d);function m(){t.assign(d,!1),t.forOf("v",i,(f)=>t.if(ss._`${l()}(${n}, ${f})`,()=>t.assign(d,!0).break()))}function p(f,v){let g=r[v];return typeof g==="object"&&g!==null?ss._`${l()}(${n}, ${f}[${v}])`:ss._`${n} === ${g}`}}};HR.default=b1});var BR=D(function(GR){Object.defineProperty(GR,"__esModule",{value:!0});var z1=wR(),w1=xR(),R1=TR(),x1=OR(),k1=CR(),I1=AR(),P1=UR(),E1=VR(),T1=JR(),j1=KR(),O1=[z1.default,w1.default,R1.default,x1.default,k1.default,I1.default,P1.default,E1.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},T1.default,j1.default];GR.default=O1});var kS=D(function(YR){Object.defineProperty(YR,"__esModule",{value:!0});YR.validateAdditionalItems=void 0;var Pn=ce(),xS=de(),C1={message:({params:{len:e}})=>Pn.str`must NOT have more than ${e} items`,params:({params:{len:e}})=>Pn._`{limit: ${e}}`},q1={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:C1,code(e){let{parentSchema:t,it:n}=e,{items:o}=t;if(!Array.isArray(o)){(0,xS.checkStrictMode)(n,'"additionalItems" is ignored when "items" is not an array of schemas');return}WR(e,o)}};function WR(e,t){let{gen:n,schema:o,data:r,keyword:i,it:a}=e;a.items=!0;let s=n.const("len",Pn._`${r}.length`);if(o===!1)e.setParams({len:t.length}),e.pass(Pn._`${s} <= ${t.length}`);else if(typeof o=="object"&&!(0,xS.alwaysValidSchema)(a,o)){let l=n.var("valid",Pn._`${s} <= ${t.length}`);n.if((0,Pn.not)(l),()=>c(l)),e.ok(l)}function c(l){n.forRange("i",t.length,s,(d)=>{if(e.subschema({keyword:i,dataProp:d,dataPropType:xS.Type.Num},l),!a.allErrors)n.if((0,Pn.not)(l),()=>n.break())})}}YR.validateAdditionalItems=WR;YR.default=q1});var IS=D(function(tx){Object.defineProperty(tx,"__esModule",{value:!0});tx.validateTuple=void 0;var QR=ce(),Od=de(),M1=zt(),U1={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){let{schema:t,it:n}=e;if(Array.isArray(t))return ex(e,"additionalItems",t);if(n.items=!0,(0,Od.alwaysValidSchema)(n,t))return;e.ok((0,M1.validateArray)(e))}};function ex(e,t,n=e.schema){let{gen:o,parentSchema:r,data:i,keyword:a,it:s}=e;if(d(r),s.opts.unevaluated&&n.length&&s.items!==!0)s.items=Od.mergeEvaluated.items(o,n.length,s.items);let c=o.name("valid"),l=o.const("len",QR._`${i}.length`);n.forEach((m,p)=>{if((0,Od.alwaysValidSchema)(s,m))return;o.if(QR._`${l} > ${p}`,()=>e.subschema({keyword:a,schemaProp:p,dataProp:p},c)),e.ok(c)});function d(m){let{opts:p,errSchemaPath:f}=s,v=n.length,g=v===m.minItems&&(v===m.maxItems||m[t]===!1);if(p.strictTuples&&!g){let b=`"${a}" is ${v}-tuple, but minItems or maxItems/${t} are not specified or different at path "${f}"`;(0,Od.checkStrictMode)(s,b,p.strictTuples)}}}tx.validateTuple=ex;tx.default=U1});var ox=D(function(nx){Object.defineProperty(nx,"__esModule",{value:!0});var L1=IS(),Z1={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:(e)=>(0,L1.validateTuple)(e,"items")};nx.default=Z1});var sx=D(function(ax){Object.defineProperty(ax,"__esModule",{value:!0});var ix=ce(),F1=de(),J1=zt(),H1=kS(),K1={message:({params:{len:e}})=>ix.str`must NOT have more than ${e} items`,params:({params:{len:e}})=>ix._`{limit: ${e}}`},G1={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:K1,code(e){let{schema:t,parentSchema:n,it:o}=e,{prefixItems:r}=n;if(o.items=!0,(0,F1.alwaysValidSchema)(o,t))return;if(r)(0,H1.validateAdditionalItems)(e,r);else e.ok((0,J1.validateArray)(e))}};ax.default=G1});var lx=D(function(cx){Object.defineProperty(cx,"__esModule",{value:!0});var wt=ce(),Nd=de(),W1={message:({params:{min:e,max:t}})=>t===void 0?wt.str`must contain at least ${e} valid item(s)`:wt.str`must contain at least ${e} and no more than ${t} valid item(s)`,params:({params:{min:e,max:t}})=>t===void 0?wt._`{minContains: ${e}}`:wt._`{minContains: ${e}, maxContains: ${t}}`},Y1={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:W1,code(e){let{gen:t,schema:n,parentSchema:o,data:r,it:i}=e,a,s,{minContains:c,maxContains:l}=o;if(i.opts.next)a=c===void 0?1:c,s=l;else a=1;let d=t.const("len",wt._`${r}.length`);if(e.setParams({min:a,max:s}),s===void 0&&a===0){(0,Nd.checkStrictMode)(i,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(s!==void 0&&a>s){(0,Nd.checkStrictMode)(i,'"minContains" > "maxContains" is always invalid'),e.fail();return}if((0,Nd.alwaysValidSchema)(i,n)){let g=wt._`${d} >= ${a}`;if(s!==void 0)g=wt._`${g} && ${d} <= ${s}`;e.pass(g);return}i.items=!0;let m=t.name("valid");if(s===void 0&&a===1)f(m,()=>t.if(m,()=>t.break()));else if(a===0){if(t.let(m,!0),s!==void 0)t.if(wt._`${r}.length > 0`,p)}else t.let(m,!1),p();e.result(m,()=>e.reset());function p(){let g=t.name("_valid"),b=t.let("count",0);f(g,()=>t.if(g,()=>v(b)))}function f(g,b){t.forRange("i",0,d,(w)=>{e.subschema({keyword:"contains",dataProp:w,dataPropType:Nd.Type.Num,compositeRule:!0},g),b()})}function v(g){if(t.code(wt._`${g}++`),s===void 0)t.if(wt._`${g} >= ${a}`,()=>t.assign(m,!0).break());else if(t.if(wt._`${g} > ${s}`,()=>t.assign(m,!1).break()),a===1)t.assign(m,!0);else t.if(wt._`${g} >= ${a}`,()=>t.assign(m,!0))}}};cx.default=Y1});var hx=D(function(mx){Object.defineProperty(mx,"__esModule",{value:!0});mx.validateSchemaDeps=mx.validatePropertyDeps=mx.error=void 0;var PS=ce(),Q1=de(),cs=zt();mx.error={message:({params:{property:e,depsCount:t,deps:n}})=>{let o=t===1?"property":"properties";return PS.str`must have ${o} ${n} when property ${e} is present`},params:({params:{property:e,depsCount:t,deps:n,missingProperty:o}})=>PS._`{property: ${e},
|
|
6
|
+
|| ${a} === "boolean" || ${r} === null`).assign(s,ie._`[${r}]`)}}}function xj({gen:e,parentData:t,parentDataProperty:n},o){e.if(ie._`${t} !== undefined`,()=>e.assign(ie._`${t}[${n}]`,o))}function rS(e,t,n,o=Zo.Correct){let r=o===Zo.Correct?ie.operators.EQ:ie.operators.NEQ,i;switch(e){case"null":return ie._`${t} ${r} null`;case"array":i=ie._`Array.isArray(${t})`;break;case"object":i=ie._`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case"integer":i=a(ie._`!(${t} % 1) && !isNaN(${t})`);break;case"number":i=a();break;default:return ie._`typeof ${t} ${r} ${e}`}return o===Zo.Correct?i:ie.not(i);function a(s=ie.nil){return ie.and(ie._`typeof ${t} == "number"`,s,n?ie._`isFinite(${t})`:ie.nil)}}ow.checkDataType=rS;function nS(e,t,n,o){if(e.length===1)return rS(e[0],t,n,o);let r,i=tw.toHash(e);if(i.array&&i.object){let a=ie._`typeof ${t} != "object"`;r=i.null?a:ie._`!${t} || ${a}`,delete i.null,delete i.array,delete i.object}else r=ie.nil;if(i.number)delete i.integer;for(let a in i)r=ie.and(r,rS(a,t,n,o));return r}ow.checkDataTypes=nS;var kj={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>typeof e=="string"?ie._`{type: ${e}}`:ie._`{type: ${t}}`};function oS(e){let t=Ij(e);bj.reportError(t,kj)}ow.reportTypeError=oS;function Ij(e){let{gen:t,data:n,schema:o}=e,r=tw.schemaRefOrVal(e,o,"type");return{gen:t,keyword:"type",data:n,schema:o.type,schemaCode:r,schemaValue:r,parentSchema:o,params:{},it:e}}});var lw=U(function(sw){Object.defineProperty(sw,"__esModule",{value:!0});sw.assignDefaults=void 0;var Vo=ce(),Cj=de();function qj(e,t){let{properties:n,items:o}=e.schema;if(t==="object"&&n)for(let r in n)aw(e,r,n[r].default);else if(t==="array"&&Array.isArray(o))o.forEach((r,i)=>aw(e,i,r.default))}sw.assignDefaults=qj;function aw(e,t,n){let{gen:o,compositeRule:r,data:i,opts:a}=e;if(n===void 0)return;let s=Vo._`${i}${Vo.getProperty(t)}`;if(r){Cj.checkStrictMode(e,`default is ignored for: ${s}`);return}let c=Vo._`${s} === undefined`;if(a.useDefaults==="empty")c=Vo._`${c} || ${s} === null || ${s} === ""`;o.if(c,Vo._`${s} = ${Vo.stringify(n)}`)}});var bt=U(function(mw){Object.defineProperty(mw,"__esModule",{value:!0});mw.validateUnion=mw.validateArray=mw.usePattern=mw.callValidateCode=mw.schemaProperties=mw.allSchemaProperties=mw.noPropertyInData=mw.propertyInData=mw.isOwnProperty=mw.hasPropFunc=mw.reportMissingProp=mw.checkMissingProp=mw.checkReportMissingProp=void 0;var _e=ce(),iS=de(),Hr=mr(),Aj=de();function Mj(e,t){let{gen:n,data:o,it:r}=e;n.if(sS(n,o,t,r.opts.ownProperties),()=>{e.setParams({missingProperty:_e._`${t}`},!0),e.error()})}mw.checkReportMissingProp=Mj;function Uj({gen:e,data:t,it:{opts:n}},o,r){return _e.or(...o.map((i)=>_e.and(sS(e,t,i,n.ownProperties),_e._`${r} = ${i}`)))}mw.checkMissingProp=Uj;function Dj(e,t){e.setParams({missingProperty:t},!0),e.error()}mw.reportMissingProp=Dj;function uw(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:_e._`Object.prototype.hasOwnProperty`})}mw.hasPropFunc=uw;function aS(e,t,n){return _e._`${uw(e)}.call(${t}, ${n})`}mw.isOwnProperty=aS;function Lj(e,t,n,o){let r=_e._`${t}${_e.getProperty(n)} !== undefined`;return o?_e._`${r} && ${aS(e,t,n)}`:r}mw.propertyInData=Lj;function sS(e,t,n,o){let r=_e._`${t}${_e.getProperty(n)} === undefined`;return o?_e.or(r,_e.not(aS(e,t,n))):r}mw.noPropertyInData=sS;function dw(e){return e?Object.keys(e).filter((t)=>t!=="__proto__"):[]}mw.allSchemaProperties=dw;function Zj(e,t){return dw(t).filter((n)=>!iS.alwaysValidSchema(e,t[n]))}mw.schemaProperties=Zj;function Vj({schemaCode:e,data:t,it:{gen:n,topSchemaRef:o,schemaPath:r,errorPath:i},it:a},s,c,l){let d=l?_e._`${e}, ${t}, ${o}${r}`:t,m=[[Hr.default.instancePath,_e.strConcat(Hr.default.instancePath,i)],[Hr.default.parentData,a.parentData],[Hr.default.parentDataProperty,a.parentDataProperty],[Hr.default.rootData,Hr.default.rootData]];if(a.opts.dynamicRef)m.push([Hr.default.dynamicAnchors,Hr.default.dynamicAnchors]);let p=_e._`${d}, ${n.object(...m)}`;return c!==_e.nil?_e._`${s}.call(${c}, ${p})`:_e._`${s}(${p})`}mw.callValidateCode=Vj;var Fj=_e._`new RegExp`;function Jj({gen:e,it:{opts:t}},n){let o=t.unicodeRegExp?"u":"",{regExp:r}=t.code,i=r(n,o);return e.scopeValue("pattern",{key:i.toString(),ref:i,code:_e._`${r.code==="new RegExp"?Fj:Aj.useFunc(e,r)}(${n}, ${o})`})}mw.usePattern=Jj;function Hj(e){let{gen:t,data:n,keyword:o,it:r}=e,i=t.name("valid");if(r.allErrors){let s=t.let("valid",!0);return a(()=>t.assign(s,!1)),s}return t.var(i,!0),a(()=>t.break()),i;function a(s){let c=t.const("len",_e._`${n}.length`);t.forRange("i",0,c,(l)=>{e.subschema({keyword:o,dataProp:l,dataPropType:iS.Type.Num},i),t.if(_e.not(i),s)})}}mw.validateArray=Hj;function Kj(e){let{gen:t,schema:n,keyword:o,it:r}=e;if(!Array.isArray(n))throw Error("ajv implementation error");if(n.some((c)=>iS.alwaysValidSchema(r,c))&&!r.opts.unevaluated)return;let a=t.let("valid",!1),s=t.name("_valid");t.block(()=>n.forEach((c,l)=>{let d=e.subschema({keyword:o,schemaProp:l,compositeRule:!0},s);if(t.assign(a,_e._`${a} || ${s}`),!e.mergeValidEvaluated(d,s))t.if(_e.not(a))})),e.result(a,()=>e.reset(),()=>e.error(!0))}mw.validateUnion=Kj});var _w=U(function(gw){Object.defineProperty(gw,"__esModule",{value:!0});gw.validateKeywordUsage=gw.validSchemaType=gw.funcKeywordCode=gw.macroKeywordCode=void 0;var We=ce(),In=mr(),aO=bt(),sO=Ja();function cO(e,t){let{gen:n,keyword:o,schema:r,parentSchema:i,it:a}=e,s=t.macro.call(a.self,r,i,a),c=hw(n,o,s);if(a.opts.validateSchema!==!1)a.self.validateSchema(s,!0);let l=n.name("valid");e.subschema({schema:s,schemaPath:We.nil,errSchemaPath:`${a.errSchemaPath}/${o}`,topSchemaRef:c,compositeRule:!0},l),e.pass(l,()=>e.error(!0))}gw.macroKeywordCode=cO;function lO(e,t){var n;let{gen:o,keyword:r,schema:i,parentSchema:a,$data:s,it:c}=e;dO(c,t);let l=!s&&t.compile?t.compile.call(c.self,i,a,c):t.validate,d=hw(o,r,l),m=o.let("valid");e.block$data(m,p),e.ok((n=t.valid)!==null&&n!==void 0?n:m);function p(){if(t.errors===!1){if(g(),t.modifying)fw(e);b(()=>e.error())}else{let R=t.async?f():v();if(t.modifying)fw(e);b(()=>uO(e,R))}}function f(){let R=o.let("ruleErrs",null);return o.try(()=>g(We._`await `),(L)=>o.assign(m,!1).if(We._`${L} instanceof ${c.ValidationError}`,()=>o.assign(R,We._`${L}.errors`),()=>o.throw(L))),R}function v(){let R=We._`${d}.errors`;return o.assign(R,null),g(We.nil),R}function g(R=t.async?We._`await `:We.nil){let L=c.opts.passContext?In.default.this:In.default.self,P=!(("compile"in t)&&!s||t.schema===!1);o.assign(m,We._`${R}${aO.callValidateCode(e,d,L,P)}`,t.modifying)}function b(R){var L;o.if(We.not((L=t.valid)!==null&&L!==void 0?L:m),R)}}gw.funcKeywordCode=lO;function fw(e){let{gen:t,data:n,it:o}=e;t.if(o.parentData,()=>t.assign(n,We._`${o.parentData}[${o.parentDataProperty}]`))}function uO(e,t){let{gen:n}=e;n.if(We._`Array.isArray(${t})`,()=>{n.assign(In.default.vErrors,We._`${In.default.vErrors} === null ? ${t} : ${In.default.vErrors}.concat(${t})`).assign(In.default.errors,We._`${In.default.vErrors}.length`),sO.extendErrors(e)},()=>e.error())}function dO({schemaEnv:e},t){if(t.async&&!e.$async)throw Error("async keyword in sync schema")}function hw(e,t,n){if(n===void 0)throw Error(`keyword "${t}" failed to compile`);return e.scopeValue("keyword",typeof n=="function"?{ref:n}:{ref:n,code:We.stringify(n)})}function mO(e,t,n=!1){return!t.length||t.some((o)=>o==="array"?Array.isArray(e):o==="object"?e&&typeof e=="object"&&!Array.isArray(e):typeof e==o||n&&typeof e>"u")}gw.validSchemaType=mO;function pO({schema:e,opts:t,self:n,errSchemaPath:o},r,i){if(Array.isArray(r.keyword)?!r.keyword.includes(i):r.keyword!==i)throw Error("ajv implementation error");let a=r.dependencies;if(a===null||a===void 0?void 0:a.some((s)=>!Object.prototype.hasOwnProperty.call(e,s)))throw Error(`parent schema must have dependencies of ${i}: ${a.join(",")}`);if(r.validateSchema){if(!r.validateSchema(e[i])){let c=`keyword "${i}" value is invalid at path "${o}": `+n.errorsText(r.validateSchema.errors);if(t.validateSchema==="log")n.logger.error(c);else throw Error(c)}}}gw.validateKeywordUsage=pO});var $w=U(function(yw){Object.defineProperty(yw,"__esModule",{value:!0});yw.extendSubschemaMode=yw.extendSubschemaData=yw.getSubschema=void 0;var Yt=ce(),Sw=de();function vO(e,{keyword:t,schemaProp:n,schema:o,schemaPath:r,errSchemaPath:i,topSchemaRef:a}){if(t!==void 0&&o!==void 0)throw Error('both "keyword" and "schema" passed, only one allowed');if(t!==void 0){let s=e.schema[t];return n===void 0?{schema:s,schemaPath:Yt._`${e.schemaPath}${Yt.getProperty(t)}`,errSchemaPath:`${e.errSchemaPath}/${t}`}:{schema:s[n],schemaPath:Yt._`${e.schemaPath}${Yt.getProperty(t)}${Yt.getProperty(n)}`,errSchemaPath:`${e.errSchemaPath}/${t}/${Sw.escapeFragment(n)}`}}if(o!==void 0){if(r===void 0||i===void 0||a===void 0)throw Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:o,schemaPath:r,topSchemaRef:a,errSchemaPath:i}}throw Error('either "keyword" or "schema" must be passed')}yw.getSubschema=vO;function _O(e,t,{dataProp:n,dataPropType:o,data:r,dataTypes:i,propertyName:a}){if(r!==void 0&&n!==void 0)throw Error('both "data" and "dataProp" passed, only one allowed');let{gen:s}=t;if(n!==void 0){let{errorPath:l,dataPathArr:d,opts:m}=t,p=s.let("data",Yt._`${t.data}${Yt.getProperty(n)}`,!0);c(p),e.errorPath=Yt.str`${l}${Sw.getErrorPath(n,o,m.jsPropertySyntax)}`,e.parentDataProperty=Yt._`${n}`,e.dataPathArr=[...d,e.parentDataProperty]}if(r!==void 0){let l=r instanceof Yt.Name?r:s.let("data",r,!0);if(c(l),a!==void 0)e.propertyName=a}if(i)e.dataTypes=i;function c(l){e.data=l,e.dataLevel=t.dataLevel+1,e.dataTypes=[],t.definedProperties=new Set,e.parentData=t.data,e.dataNames=[...t.dataNames,l]}}yw.extendSubschemaData=_O;function SO(e,{jtdDiscriminator:t,jtdMetadata:n,compositeRule:o,createErrors:r,allErrors:i}){if(o!==void 0)e.compositeRule=o;if(r!==void 0)e.createErrors=r;if(i!==void 0)e.allErrors=i;e.jtdDiscriminator=t,e.jtdMetadata=n}yw.extendSubschemaMode=SO});var cS=U(function(_L,zw){zw.exports=function e(t,n){if(t===n)return!0;if(t&&n&&typeof t=="object"&&typeof n=="object"){if(t.constructor!==n.constructor)return!1;var o,r,i;if(Array.isArray(t)){if(o=t.length,o!=n.length)return!1;for(r=o;r--!==0;)if(!e(t[r],n[r]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if(i=Object.keys(t),o=i.length,o!==Object.keys(n).length)return!1;for(r=o;r--!==0;)if(!Object.prototype.hasOwnProperty.call(n,i[r]))return!1;for(r=o;r--!==0;){var a=i[r];if(!e(t[a],n[a]))return!1}return!0}return t!==t&&n!==n}});var Rw=U(function(SL,ww){var Kr=ww.exports=function(e,t,n){if(typeof t=="function")n=t,t={};n=t.cb||n;var o=typeof n=="function"?n:n.pre||function(){},r=n.post||function(){};bd(t,o,r,e,"",e)};Kr.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};Kr.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};Kr.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};Kr.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function bd(e,t,n,o,r,i,a,s,c,l){if(o&&typeof o=="object"&&!Array.isArray(o)){t(o,r,i,a,s,c,l);for(var d in o){var m=o[d];if(Array.isArray(m)){if(d in Kr.arrayKeywords)for(var p=0;p<m.length;p++)bd(e,t,n,m[p],r+"/"+d+"/"+p,i,r,d,o,p)}else if(d in Kr.propsKeywords){if(m&&typeof m=="object")for(var f in m)bd(e,t,n,m[f],r+"/"+d+"/"+$O(f),i,r,d,o,f)}else if(d in Kr.keywords||e.allKeys&&!(d in Kr.skipKeywords))bd(e,t,n,m,r+"/"+d,i,r,d,o)}n(o,r,i,a,s,c,l)}}function $O(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}});var Ka=U(function(Pw){Object.defineProperty(Pw,"__esModule",{value:!0});Pw.getSchemaRefs=Pw.resolveUrl=Pw.normalizeId=Pw._getFullPath=Pw.getFullPath=Pw.inlineRef=void 0;var zO=de(),wO=cS(),RO=Rw(),xO=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function kO(e,t=!0){if(typeof e=="boolean")return!0;if(t===!0)return!lS(e);if(!t)return!1;return xw(e)<=t}Pw.inlineRef=kO;var IO=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function lS(e){for(let t in e){if(IO.has(t))return!0;let n=e[t];if(Array.isArray(n)&&n.some(lS))return!0;if(typeof n=="object"&&lS(n))return!0}return!1}function xw(e){let t=0;for(let n in e){if(n==="$ref")return 1/0;if(t++,xO.has(n))continue;if(typeof e[n]=="object")zO.eachItem(e[n],(o)=>t+=xw(o));if(t===1/0)return 1/0}return t}function kw(e,t="",n){if(n!==!1)t=Fo(t);let o=e.parse(t);return Iw(e,o)}Pw.getFullPath=kw;function Iw(e,t){return e.serialize(t).split("#")[0]+"#"}Pw._getFullPath=Iw;var PO=/#\/?$/;function Fo(e){return e?e.replace(PO,""):""}Pw.normalizeId=Fo;function EO(e,t,n){return n=Fo(n),e.resolve(t,n)}Pw.resolveUrl=EO;var TO=/^[a-z_][-a-z0-9._]*$/i;function jO(e,t){if(typeof e=="boolean")return{};let{schemaId:n,uriResolver:o}=this.opts,r=Fo(e[n]||t),i={"":r},a=kw(o,r,!1),s={},c=new Set;return RO(e,{allKeys:!0},(m,p,f,v)=>{if(v===void 0)return;let g=a+p,b=i[v];if(typeof m[n]=="string")b=R.call(this,m[n]);L.call(this,m.$anchor),L.call(this,m.$dynamicAnchor),i[p]=b;function R(P){let D=this.opts.uriResolver.resolve;if(P=Fo(b?D(b,P):P),c.has(P))throw d(P);c.add(P);let E=this.refs[P];if(typeof E=="string")E=this.refs[E];if(typeof E=="object")l(m,E.schema,P);else if(P!==Fo(g))if(P[0]==="#")l(m,s[P],P),s[P]=m;else this.refs[P]=g;return P}function L(P){if(typeof P=="string"){if(!TO.test(P))throw Error(`invalid anchor "${P}"`);R.call(this,`#${P}`)}}}),s;function l(m,p,f){if(p!==void 0&&!wO(m,p))throw d(f)}function d(m){return Error(`reference "${m}" resolves to more than one schema`)}}Pw.getSchemaRefs=jO});var Wa=U(function(Jw){Object.defineProperty(Jw,"__esModule",{value:!0});Jw.getData=Jw.KeywordCxt=Jw.validateFunctionCode=void 0;var Nw=Gz(),Cw=Ha(),uS=tS(),$d=Ha(),MO=lw(),Ga=_w(),dS=$w(),K=ce(),ee=mr(),UO=Ka(),pr=de(),Ba=Ja();function DO(e){if(Mw(e)){if(Uw(e),Aw(e)){VO(e);return}}qw(e,()=>Nw.topBoolOrEmptySchema(e))}Jw.validateFunctionCode=DO;function qw({gen:e,validateName:t,schema:n,schemaEnv:o,opts:r},i){if(r.code.es5)e.func(t,K._`${ee.default.data}, ${ee.default.valCxt}`,o.$async,()=>{e.code(K._`"use strict"; ${Tw(n,r)}`),ZO(e,r),e.code(i)});else e.func(t,K._`${ee.default.data}, ${LO(r)}`,o.$async,()=>e.code(Tw(n,r)).code(i))}function LO(e){return K._`{${ee.default.instancePath}="", ${ee.default.parentData}, ${ee.default.parentDataProperty}, ${ee.default.rootData}=${ee.default.data}${e.dynamicRef?K._`, ${ee.default.dynamicAnchors}={}`:K.nil}}={}`}function ZO(e,t){e.if(ee.default.valCxt,()=>{if(e.var(ee.default.instancePath,K._`${ee.default.valCxt}.${ee.default.instancePath}`),e.var(ee.default.parentData,K._`${ee.default.valCxt}.${ee.default.parentData}`),e.var(ee.default.parentDataProperty,K._`${ee.default.valCxt}.${ee.default.parentDataProperty}`),e.var(ee.default.rootData,K._`${ee.default.valCxt}.${ee.default.rootData}`),t.dynamicRef)e.var(ee.default.dynamicAnchors,K._`${ee.default.valCxt}.${ee.default.dynamicAnchors}`)},()=>{if(e.var(ee.default.instancePath,K._`""`),e.var(ee.default.parentData,K._`undefined`),e.var(ee.default.parentDataProperty,K._`undefined`),e.var(ee.default.rootData,ee.default.data),t.dynamicRef)e.var(ee.default.dynamicAnchors,K._`{}`)})}function VO(e){let{schema:t,opts:n,gen:o}=e;qw(e,()=>{if(n.$comment&&t.$comment)Lw(e);if(GO(e),o.let(ee.default.vErrors,null),o.let(ee.default.errors,0),n.unevaluated)FO(e);Dw(e),YO(e)});return}function FO(e){let{gen:t,validateName:n}=e;e.evaluated=t.const("evaluated",K._`${n}.evaluated`),t.if(K._`${e.evaluated}.dynamicProps`,()=>t.assign(K._`${e.evaluated}.props`,K._`undefined`)),t.if(K._`${e.evaluated}.dynamicItems`,()=>t.assign(K._`${e.evaluated}.items`,K._`undefined`))}function Tw(e,t){let n=typeof e=="object"&&e[t.schemaId];return n&&(t.code.source||t.code.process)?K._`/*# sourceURL=${n} */`:K.nil}function JO(e,t){if(Mw(e)){if(Uw(e),Aw(e)){HO(e,t);return}}Nw.boolOrEmptySchema(e,t)}function Aw({schema:e,self:t}){if(typeof e=="boolean")return!e;for(let n in e)if(t.RULES.all[n])return!0;return!1}function Mw(e){return typeof e.schema!="boolean"}function HO(e,t){let{schema:n,gen:o,opts:r}=e;if(r.$comment&&n.$comment)Lw(e);BO(e),WO(e);let i=o.const("_errs",ee.default.errors);Dw(e,i),o.var(t,K._`${i} === ${ee.default.errors}`)}function Uw(e){pr.checkUnknownRules(e),KO(e)}function Dw(e,t){if(e.opts.jtd)return jw(e,[],!1,t);let n=Cw.getSchemaTypes(e.schema),o=Cw.coerceAndCheckDataType(e,n);jw(e,n,!o,t)}function KO(e){let{schema:t,errSchemaPath:n,opts:o,self:r}=e;if(t.$ref&&o.ignoreKeywordsWithRef&&pr.schemaHasRulesButRef(t,r.RULES))r.logger.warn(`$ref: keywords ignored in schema at path "${n}"`)}function GO(e){let{schema:t,opts:n}=e;if(t.default!==void 0&&n.useDefaults&&n.strictSchema)pr.checkStrictMode(e,"default is ignored in the schema root")}function BO(e){let t=e.schema[e.opts.schemaId];if(t)e.baseId=UO.resolveUrl(e.opts.uriResolver,e.baseId,t)}function WO(e){if(e.schema.$async&&!e.schemaEnv.$async)throw Error("async schema in sync schema")}function Lw({gen:e,schemaEnv:t,schema:n,errSchemaPath:o,opts:r}){let i=n.$comment;if(r.$comment===!0)e.code(K._`${ee.default.self}.logger.log(${i})`);else if(typeof r.$comment=="function"){let a=K.str`${o}/$comment`,s=e.scopeValue("root",{ref:t.root});e.code(K._`${ee.default.self}.opts.$comment(${i}, ${a}, ${s}.schema)`)}}function YO(e){let{gen:t,schemaEnv:n,validateName:o,ValidationError:r,opts:i}=e;if(n.$async)t.if(K._`${ee.default.errors} === 0`,()=>t.return(ee.default.data),()=>t.throw(K._`new ${r}(${ee.default.vErrors})`));else{if(t.assign(K._`${o}.errors`,ee.default.vErrors),i.unevaluated)XO(e);t.return(K._`${ee.default.errors} === 0`)}}function XO({gen:e,evaluated:t,props:n,items:o}){if(n instanceof K.Name)e.assign(K._`${t}.props`,n);if(o instanceof K.Name)e.assign(K._`${t}.items`,o)}function jw(e,t,n,o){let{gen:r,schema:i,data:a,allErrors:s,opts:c,self:l}=e,{RULES:d}=l;if(i.$ref&&(c.ignoreKeywordsWithRef||!pr.schemaHasRulesButRef(i,d))){r.block(()=>Vw(e,"$ref",d.all.$ref.definition));return}if(!c.jtd)QO(e,t);r.block(()=>{for(let p of d.rules)m(p);m(d.post)});function m(p){if(!uS.shouldUseGroup(i,p))return;if(p.type){if(r.if($d.checkDataType(p.type,a,c.strictNumbers)),Ow(e,p),t.length===1&&t[0]===p.type&&n)r.else(),$d.reportTypeError(e);r.endIf()}else Ow(e,p);if(!s)r.if(K._`${ee.default.errors} === ${o||0}`)}}function Ow(e,t){let{gen:n,schema:o,opts:{useDefaults:r}}=e;if(r)MO.assignDefaults(e,t.type);n.block(()=>{for(let i of t.rules)if(uS.shouldUseRule(o,i))Vw(e,i.keyword,i.definition,t.type)})}function QO(e,t){if(e.schemaEnv.meta||!e.opts.strictTypes)return;if(eN(e,t),!e.opts.allowUnionTypes)tN(e,t);rN(e,e.dataTypes)}function eN(e,t){if(!t.length)return;if(!e.dataTypes.length){e.dataTypes=t;return}t.forEach((n)=>{if(!Zw(e.dataTypes,n))mS(e,`type "${n}" not allowed by context "${e.dataTypes.join(",")}"`)}),oN(e,t)}function tN(e,t){if(t.length>1&&!(t.length===2&&t.includes("null")))mS(e,"use allowUnionTypes to allow union type keyword")}function rN(e,t){let n=e.self.RULES.all;for(let o in n){let r=n[o];if(typeof r=="object"&&uS.shouldUseRule(e.schema,r)){let{type:i}=r.definition;if(i.length&&!i.some((a)=>nN(t,a)))mS(e,`missing type "${i.join(",")}" for keyword "${o}"`)}}}function nN(e,t){return e.includes(t)||t==="number"&&e.includes("integer")}function Zw(e,t){return e.includes(t)||t==="integer"&&e.includes("number")}function oN(e,t){let n=[];for(let o of e.dataTypes)if(Zw(t,o))n.push(o);else if(t.includes("integer")&&o==="number")n.push("integer");e.dataTypes=n}function mS(e,t){let n=e.schemaEnv.baseId+e.errSchemaPath;t+=` at "${n}" (strictTypes)`,pr.checkStrictMode(e,t,e.opts.strictTypes)}class pS{constructor(e,t,n){if(Ga.validateKeywordUsage(e,t,n),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=n,this.data=e.data,this.schema=e.schema[n],this.$data=t.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=pr.schemaRefOrVal(e,this.schema,n,this.$data),this.schemaType=t.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=t,this.$data)this.schemaCode=e.gen.const("vSchema",Fw(this.$data,e));else if(this.schemaCode=this.schemaValue,!Ga.validSchemaType(this.schema,t.schemaType,t.allowUndefined))throw Error(`${n} value must be ${JSON.stringify(t.schemaType)}`);if("code"in t?t.trackErrors:t.errors!==!1)this.errsCount=e.gen.const("_errs",ee.default.errors)}result(e,t,n){this.failResult(K.not(e),t,n)}failResult(e,t,n){if(this.gen.if(e),n)n();else this.error();if(t){if(this.gen.else(),t(),this.allErrors)this.gen.endIf()}else if(this.allErrors)this.gen.endIf();else this.gen.else()}pass(e,t){this.failResult(K.not(e),void 0,t)}fail(e){if(e===void 0){if(this.error(),!this.allErrors)this.gen.if(!1);return}if(this.gen.if(e),this.error(),this.allErrors)this.gen.endIf();else this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);let{schemaCode:t}=this;this.fail(K._`${t} !== undefined && (${K.or(this.invalid$data(),e)})`)}error(e,t,n){if(t){this.setParams(t),this._error(e,n),this.setParams({});return}this._error(e,n)}_error(e,t){(e?Ba.reportExtraError:Ba.reportError)(this,this.def.error,t)}$dataError(){Ba.reportError(this,this.def.$dataError||Ba.keyword$DataError)}reset(){if(this.errsCount===void 0)throw Error('add "trackErrors" to keyword definition');Ba.resetErrorsCount(this.gen,this.errsCount)}ok(e){if(!this.allErrors)this.gen.if(e)}setParams(e,t){if(t)Object.assign(this.params,e);else this.params=e}block$data(e,t,n=K.nil){this.gen.block(()=>{this.check$data(e,n),t()})}check$data(e=K.nil,t=K.nil){if(!this.$data)return;let{gen:n,schemaCode:o,schemaType:r,def:i}=this;if(n.if(K.or(K._`${o} === undefined`,t)),e!==K.nil)n.assign(e,!0);if(r.length||i.validateSchema){if(n.elseIf(this.invalid$data()),this.$dataError(),e!==K.nil)n.assign(e,!1)}n.else()}invalid$data(){let{gen:e,schemaCode:t,schemaType:n,def:o,it:r}=this;return K.or(i(),a());function i(){if(n.length){if(!(t instanceof K.Name))throw Error("ajv implementation error");let s=Array.isArray(n)?n:[n];return K._`${$d.checkDataTypes(s,t,r.opts.strictNumbers,$d.DataType.Wrong)}`}return K.nil}function a(){if(o.validateSchema){let s=e.scopeValue("validate$data",{ref:o.validateSchema});return K._`!${s}(${t})`}return K.nil}}subschema(e,t){let n=dS.getSubschema(this.it,e);dS.extendSubschemaData(n,this.it,e),dS.extendSubschemaMode(n,e);let o={...this.it,...n,items:void 0,props:void 0};return JO(o,t),o}mergeEvaluated(e,t){let{it:n,gen:o}=this;if(!n.opts.unevaluated)return;if(n.props!==!0&&e.props!==void 0)n.props=pr.mergeEvaluated.props(o,e.props,n.props,t);if(n.items!==!0&&e.items!==void 0)n.items=pr.mergeEvaluated.items(o,e.items,n.items,t)}mergeValidEvaluated(e,t){let{it:n,gen:o}=this;if(n.opts.unevaluated&&(n.props!==!0||n.items!==!0))return o.if(t,()=>this.mergeEvaluated(e,K.Name)),!0}}Jw.KeywordCxt=pS;function Vw(e,t,n,o){let r=new pS(e,n,t);if("code"in n)n.code(r,o);else if(r.$data&&n.validate)Ga.funcKeywordCode(r,n);else if("macro"in n)Ga.macroKeywordCode(r,n);else if(n.compile||n.validate)Ga.funcKeywordCode(r,n)}var iN=/^\/(?:[^~]|~0|~1)*$/,aN=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function Fw(e,{dataLevel:t,dataNames:n,dataPathArr:o}){let r,i;if(e==="")return ee.default.rootData;if(e[0]==="/"){if(!iN.test(e))throw Error(`Invalid JSON-pointer: ${e}`);r=e,i=ee.default.rootData}else{let l=aN.exec(e);if(!l)throw Error(`Invalid JSON-pointer: ${e}`);let d=+l[1];if(r=l[2],r==="#"){if(d>=t)throw Error(c("property/index",d));return o[t-d]}if(d>t)throw Error(c("data",d));if(i=n[t-d],!r)return i}let a=i,s=r.split("/");for(let l of s)if(l)i=K._`${i}${K.getProperty(pr.unescapeJsonPointer(l))}`,a=K._`${a} && ${i}`;return a;function c(l,d){return`Cannot access ${l} ${d} levels up, current level is ${t}`}}Jw.getData=Fw});var zd=U(function(Gw){Object.defineProperty(Gw,"__esModule",{value:!0});class Kw extends Error{constructor(e){super("validation failed");this.errors=e,this.ajv=this.validation=!0}}Gw.default=Kw});var Ya=U(function(Ww){Object.defineProperty(Ww,"__esModule",{value:!0});var fS=Ka();class Bw extends Error{constructor(e,t,n,o){super(o||`can't resolve reference ${n} from id ${t}`);this.missingRef=fS.resolveUrl(e,t,n),this.missingSchema=fS.normalizeId(fS.getFullPath(e,this.missingRef))}}Ww.default=Bw});var Rd=U(function(Qw){Object.defineProperty(Qw,"__esModule",{value:!0});Qw.resolveSchema=Qw.getCompilingSchema=Qw.resolveRef=Qw.compileSchema=Qw.SchemaEnv=void 0;var jt=ce(),dN=zd(),Pn=mr(),Ot=Ka(),Yw=de(),mN=Wa();class Xa{constructor(e){var t;this.refs={},this.dynamicAnchors={};let n;if(typeof e.schema=="object")n=e.schema;this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=(t=e.baseId)!==null&&t!==void 0?t:Ot.normalizeId(n===null||n===void 0?void 0:n[e.schemaId||"$id"]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=n===null||n===void 0?void 0:n.$async,this.refs={}}}Qw.SchemaEnv=Xa;function gS(e){let t=Xw.call(this,e);if(t)return t;let n=Ot.getFullPath(this.opts.uriResolver,e.root.baseId),{es5:o,lines:r}=this.opts.code,{ownProperties:i}=this.opts,a=new jt.CodeGen(this.scope,{es5:o,lines:r,ownProperties:i}),s;if(e.$async)s=a.scopeValue("Error",{ref:dN.default,code:jt._`require("ajv/dist/runtime/validation_error").default`});let c=a.scopeName("validate");e.validateName=c;let l={gen:a,allErrors:this.opts.allErrors,data:Pn.default.data,parentData:Pn.default.parentData,parentDataProperty:Pn.default.parentDataProperty,dataNames:[Pn.default.data],dataPathArr:[jt.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:a.scopeValue("schema",this.opts.code.source===!0?{ref:e.schema,code:jt.stringify(e.schema)}:{ref:e.schema}),validateName:c,ValidationError:s,schema:e.schema,schemaEnv:e,rootId:n,baseId:e.baseId||n,schemaPath:jt.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:jt._`""`,opts:this.opts,self:this},d;try{this._compilations.add(e),mN.validateFunctionCode(l),a.optimize(this.opts.code.optimize);let m=a.toString();if(d=`${a.scopeRefs(Pn.default.scope)}return ${m}`,this.opts.code.process)d=this.opts.code.process(d,e);let f=Function(`${Pn.default.self}`,`${Pn.default.scope}`,d)(this,this.scope.get());if(this.scope.value(c,{ref:f}),f.errors=null,f.schema=e.schema,f.schemaEnv=e,e.$async)f.$async=!0;if(this.opts.code.source===!0)f.source={validateName:c,validateCode:m,scopeValues:a._values};if(this.opts.unevaluated){let{props:v,items:g}=l;if(f.evaluated={props:v instanceof jt.Name?void 0:v,items:g instanceof jt.Name?void 0:g,dynamicProps:v instanceof jt.Name,dynamicItems:g instanceof jt.Name},f.source)f.source.evaluated=jt.stringify(f.evaluated)}return e.validate=f,e}catch(m){if(delete e.validate,delete e.validateName,d)this.logger.error("Error compiling schema, function code:",d);throw m}finally{this._compilations.delete(e)}}Qw.compileSchema=gS;function pN(e,t,n){var o;n=Ot.resolveUrl(this.opts.uriResolver,t,n);let r=e.refs[n];if(r)return r;let i=gN.call(this,e,n);if(i===void 0){let a=(o=e.localRefs)===null||o===void 0?void 0:o[n],{schemaId:s}=this.opts;if(a)i=new Xa({schema:a,schemaId:s,root:e,baseId:t})}if(i===void 0)return;return e.refs[n]=fN.call(this,i)}Qw.resolveRef=pN;function fN(e){if(Ot.inlineRef(e.schema,this.opts.inlineRefs))return e.schema;return e.validate?e:gS.call(this,e)}function Xw(e){for(let t of this._compilations)if(hN(t,e))return t}Qw.getCompilingSchema=Xw;function hN(e,t){return e.schema===t.schema&&e.root===t.root&&e.baseId===t.baseId}function gN(e,t){let n;while(typeof(n=this.refs[t])=="string")t=n;return n||this.schemas[t]||wd.call(this,e,t)}function wd(e,t){let n=this.opts.uriResolver.parse(t),o=Ot._getFullPath(this.opts.uriResolver,n),r=Ot.getFullPath(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&o===r)return hS.call(this,n,e);let i=Ot.normalizeId(o),a=this.refs[i]||this.schemas[i];if(typeof a=="string"){let s=wd.call(this,e,a);if(typeof(s===null||s===void 0?void 0:s.schema)!=="object")return;return hS.call(this,n,s)}if(typeof(a===null||a===void 0?void 0:a.schema)!=="object")return;if(!a.validate)gS.call(this,a);if(i===Ot.normalizeId(t)){let{schema:s}=a,{schemaId:c}=this.opts,l=s[c];if(l)r=Ot.resolveUrl(this.opts.uriResolver,r,l);return new Xa({schema:s,schemaId:c,root:e,baseId:r})}return hS.call(this,n,a)}Qw.resolveSchema=wd;var vN=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function hS(e,{baseId:t,schema:n,root:o}){var r;if(((r=e.fragment)===null||r===void 0?void 0:r[0])!=="/")return;for(let s of e.fragment.slice(1).split("/")){if(typeof n==="boolean")return;let c=n[Yw.unescapeFragment(s)];if(c===void 0)return;n=c;let l=typeof n==="object"&&n[this.opts.schemaId];if(!vN.has(s)&&l)t=Ot.resolveUrl(this.opts.uriResolver,t,l)}let i;if(typeof n!="boolean"&&n.$ref&&!Yw.schemaHasRulesButRef(n,this.RULES)){let s=Ot.resolveUrl(this.opts.uriResolver,t,n.$ref);i=wd.call(this,o,s)}let{schemaId:a}=this.opts;if(i=i||new Xa({schema:n,schemaId:a,root:o,baseId:t}),i.schema!==i.root.schema)return i;return}});var tR=U(function(RL,$N){$N.exports={$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON AnySchema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1}});var _S=U(function(xL,iR){var zN=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),nR=RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u);function vS(e){let t="",n=0,o=0;for(o=0;o<e.length;o++){if(n=e[o].charCodeAt(0),n===48)continue;if(!(n>=48&&n<=57||n>=65&&n<=70||n>=97&&n<=102))return"";t+=e[o];break}for(o+=1;o<e.length;o++){if(n=e[o].charCodeAt(0),!(n>=48&&n<=57||n>=65&&n<=70||n>=97&&n<=102))return"";t+=e[o]}return t}var wN=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function rR(e){return e.length=0,!0}function RN(e,t,n){if(e.length){let o=vS(e);if(o!=="")t.push(o);else return n.error=!0,!1;e.length=0}return!0}function xN(e){let t=0,n={error:!1,address:"",zone:""},o=[],r=[],i=!1,a=!1,s=RN;for(let c=0;c<e.length;c++){let l=e[c];if(l==="["||l==="]")continue;if(l===":"){if(i===!0)a=!0;if(!s(r,o,n))break;if(++t>7){n.error=!0;break}if(c>0&&e[c-1]===":")i=!0;o.push(":");continue}else if(l==="%"){if(!s(r,o,n))break;s=rR}else{r.push(l);continue}}if(r.length)if(s===rR)n.zone=r.join("");else if(a)o.push(r.join(""));else o.push(vS(r));return n.address=o.join(""),n}function oR(e){if(kN(e,":")<2)return{host:e,isIPV6:!1};let t=xN(e);if(!t.error){let{address:n,address:o}=t;if(t.zone)n+="%"+t.zone,o+="%25"+t.zone;return{host:n,isIPV6:!0,escapedHost:o}}else return{host:e,isIPV6:!1}}function kN(e,t){let n=0;for(let o=0;o<e.length;o++)if(e[o]===t)n++;return n}function IN(e){let t=e,n=[],o=-1,r=0;while(r=t.length){if(r===1)if(t===".")break;else if(t==="/"){n.push("/");break}else{n.push(t);break}else if(r===2){if(t[0]==="."){if(t[1]===".")break;else if(t[1]==="/"){t=t.slice(2);continue}}else if(t[0]==="/"){if(t[1]==="."||t[1]==="/"){n.push("/");break}}}else if(r===3){if(t==="/.."){if(n.length!==0)n.pop();n.push("/");break}}if(t[0]==="."){if(t[1]==="."){if(t[2]==="/"){t=t.slice(3);continue}}else if(t[1]==="/"){t=t.slice(2);continue}}else if(t[0]==="/"){if(t[1]==="."){if(t[2]==="/"){t=t.slice(2);continue}else if(t[2]==="."){if(t[3]==="/"){if(t=t.slice(3),n.length!==0)n.pop();continue}}}}if((o=t.indexOf("/",1))===-1){n.push(t);break}else n.push(t.slice(0,o)),t=t.slice(o)}return n.join("")}function PN(e,t){let n=t!==!0?escape:unescape;if(e.scheme!==void 0)e.scheme=n(e.scheme);if(e.userinfo!==void 0)e.userinfo=n(e.userinfo);if(e.host!==void 0)e.host=n(e.host);if(e.path!==void 0)e.path=n(e.path);if(e.query!==void 0)e.query=n(e.query);if(e.fragment!==void 0)e.fragment=n(e.fragment);return e}function EN(e){let t=[];if(e.userinfo!==void 0)t.push(e.userinfo),t.push("@");if(e.host!==void 0){let n=unescape(e.host);if(!nR(n)){let o=oR(n);if(o.isIPV6===!0)n=`[${o.escapedHost}]`;else n=e.host}t.push(n)}if(typeof e.port==="number"||typeof e.port==="string")t.push(":"),t.push(String(e.port));return t.length?t.join(""):void 0}iR.exports={nonSimpleDomain:wN,recomposeAuthority:EN,normalizeComponentEncoding:PN,removeDotSegments:IN,isIPv4:nR,isUUID:zN,normalizeIPv6:oR,stringArrayToHexStripped:vS}});var uR=U(function(kL,lR){var{isUUID:TN}=_S(),jN=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,ON=["http","https","ws","wss","urn","urn:uuid"];function NN(e){return ON.indexOf(e)!==-1}function SS(e){if(e.secure===!0)return!0;else if(e.secure===!1)return!1;else if(e.scheme)return e.scheme.length===3&&(e.scheme[0]==="w"||e.scheme[0]==="W")&&(e.scheme[1]==="s"||e.scheme[1]==="S")&&(e.scheme[2]==="s"||e.scheme[2]==="S");else return!1}function aR(e){if(!e.host)e.error=e.error||"HTTP URIs must have a host.";return e}function sR(e){let t=String(e.scheme).toLowerCase()==="https";if(e.port===(t?443:80)||e.port==="")e.port=void 0;if(!e.path)e.path="/";return e}function CN(e){return e.secure=SS(e),e.resourceName=(e.path||"/")+(e.query?"?"+e.query:""),e.path=void 0,e.query=void 0,e}function qN(e){if(e.port===(SS(e)?443:80)||e.port==="")e.port=void 0;if(typeof e.secure==="boolean")e.scheme=e.secure?"wss":"ws",e.secure=void 0;if(e.resourceName){let[t,n]=e.resourceName.split("?");e.path=t&&t!=="/"?t:void 0,e.query=n,e.resourceName=void 0}return e.fragment=void 0,e}function AN(e,t){if(!e.path)return e.error="URN can not be parsed",e;let n=e.path.match(jN);if(n){let o=t.scheme||e.scheme||"urn";e.nid=n[1].toLowerCase(),e.nss=n[2];let r=`${o}:${t.nid||e.nid}`,i=yS(r);if(e.path=void 0,i)e=i.parse(e,t)}else e.error=e.error||"URN can not be parsed.";return e}function MN(e,t){if(e.nid===void 0)throw Error("URN without nid cannot be serialized");let n=t.scheme||e.scheme||"urn",o=e.nid.toLowerCase(),r=`${n}:${t.nid||o}`,i=yS(r);if(i)e=i.serialize(e,t);let a=e,s=e.nss;return a.path=`${o||t.nid}:${s}`,t.skipEscape=!0,a}function UN(e,t){let n=e;if(n.uuid=n.nss,n.nss=void 0,!t.tolerant&&(!n.uuid||!TN(n.uuid)))n.error=n.error||"UUID is not valid.";return n}function DN(e){let t=e;return t.nss=(e.uuid||"").toLowerCase(),t}var cR={scheme:"http",domainHost:!0,parse:aR,serialize:sR},LN={scheme:"https",domainHost:cR.domainHost,parse:aR,serialize:sR},xd={scheme:"ws",domainHost:!0,parse:CN,serialize:qN},ZN={scheme:"wss",domainHost:xd.domainHost,parse:xd.parse,serialize:xd.serialize},VN={scheme:"urn",parse:AN,serialize:MN,skipNormalize:!0},FN={scheme:"urn:uuid",parse:UN,serialize:DN,skipNormalize:!0},kd={http:cR,https:LN,ws:xd,wss:ZN,urn:VN,"urn:uuid":FN};Object.setPrototypeOf(kd,null);function yS(e){return e&&(kd[e]||kd[e.toLowerCase()])||void 0}lR.exports={wsIsSecure:SS,SCHEMES:kd,isValidSchemeName:NN,getSchemeHandler:yS}});var pR=U(function(IL,Pd){var{normalizeIPv6:JN,removeDotSegments:Qa,recomposeAuthority:HN,normalizeComponentEncoding:Id,isIPv4:KN,nonSimpleDomain:GN}=_S(),{SCHEMES:BN,getSchemeHandler:dR}=uR();function WN(e,t){if(typeof e==="string")e=Xt(fr(e,t),t);else if(typeof e==="object")e=fr(Xt(e,t),t);return e}function YN(e,t,n){let o=n?Object.assign({scheme:"null"},n):{scheme:"null"},r=mR(fr(e,o),fr(t,o),o,!0);return o.skipEscape=!0,Xt(r,o)}function mR(e,t,n,o){let r={};if(!o)e=fr(Xt(e,n),n),t=fr(Xt(t,n),n);if(n=n||{},!n.tolerant&&t.scheme)r.scheme=t.scheme,r.userinfo=t.userinfo,r.host=t.host,r.port=t.port,r.path=Qa(t.path||""),r.query=t.query;else{if(t.userinfo!==void 0||t.host!==void 0||t.port!==void 0)r.userinfo=t.userinfo,r.host=t.host,r.port=t.port,r.path=Qa(t.path||""),r.query=t.query;else{if(!t.path)if(r.path=e.path,t.query!==void 0)r.query=t.query;else r.query=e.query;else{if(t.path[0]==="/")r.path=Qa(t.path);else{if((e.userinfo!==void 0||e.host!==void 0||e.port!==void 0)&&!e.path)r.path="/"+t.path;else if(!e.path)r.path=t.path;else r.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+t.path;r.path=Qa(r.path)}r.query=t.query}r.userinfo=e.userinfo,r.host=e.host,r.port=e.port}r.scheme=e.scheme}return r.fragment=t.fragment,r}function XN(e,t,n){if(typeof e==="string")e=unescape(e),e=Xt(Id(fr(e,n),!0),{...n,skipEscape:!0});else if(typeof e==="object")e=Xt(Id(e,!0),{...n,skipEscape:!0});if(typeof t==="string")t=unescape(t),t=Xt(Id(fr(t,n),!0),{...n,skipEscape:!0});else if(typeof t==="object")t=Xt(Id(t,!0),{...n,skipEscape:!0});return e.toLowerCase()===t.toLowerCase()}function Xt(e,t){let n={host:e.host,scheme:e.scheme,userinfo:e.userinfo,port:e.port,path:e.path,query:e.query,nid:e.nid,nss:e.nss,uuid:e.uuid,fragment:e.fragment,reference:e.reference,resourceName:e.resourceName,secure:e.secure,error:""},o=Object.assign({},t),r=[],i=dR(o.scheme||n.scheme);if(i&&i.serialize)i.serialize(n,o);if(n.path!==void 0)if(!o.skipEscape){if(n.path=escape(n.path),n.scheme!==void 0)n.path=n.path.split("%3A").join(":")}else n.path=unescape(n.path);if(o.reference!=="suffix"&&n.scheme)r.push(n.scheme,":");let a=HN(n);if(a!==void 0){if(o.reference!=="suffix")r.push("//");if(r.push(a),n.path&&n.path[0]!=="/")r.push("/")}if(n.path!==void 0){let s=n.path;if(!o.absolutePath&&(!i||!i.absolutePath))s=Qa(s);if(a===void 0&&s[0]==="/"&&s[1]==="/")s="/%2F"+s.slice(2);r.push(s)}if(n.query!==void 0)r.push("?",n.query);if(n.fragment!==void 0)r.push("#",n.fragment);return r.join("")}var QN=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function fr(e,t){let n=Object.assign({},t),o={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},r=!1;if(n.reference==="suffix")if(n.scheme)e=n.scheme+":"+e;else e="//"+e;let i=e.match(QN);if(i){if(o.scheme=i[1],o.userinfo=i[3],o.host=i[4],o.port=parseInt(i[5],10),o.path=i[6]||"",o.query=i[7],o.fragment=i[8],isNaN(o.port))o.port=i[5];if(o.host)if(KN(o.host)===!1){let c=JN(o.host);o.host=c.host.toLowerCase(),r=c.isIPV6}else r=!0;if(o.scheme===void 0&&o.userinfo===void 0&&o.host===void 0&&o.port===void 0&&o.query===void 0&&!o.path)o.reference="same-document";else if(o.scheme===void 0)o.reference="relative";else if(o.fragment===void 0)o.reference="absolute";else o.reference="uri";if(n.reference&&n.reference!=="suffix"&&n.reference!==o.reference)o.error=o.error||"URI is not a "+n.reference+" reference.";let a=dR(n.scheme||o.scheme);if(!n.unicodeSupport&&(!a||!a.unicodeSupport)){if(o.host&&(n.domainHost||a&&a.domainHost)&&r===!1&&GN(o.host))try{o.host=URL.domainToASCII(o.host.toLowerCase())}catch(s){o.error=o.error||"Host's domain name can not be converted to ASCII: "+s}}if(!a||a&&!a.skipNormalize){if(e.indexOf("%")!==-1){if(o.scheme!==void 0)o.scheme=unescape(o.scheme);if(o.host!==void 0)o.host=unescape(o.host)}if(o.path)o.path=escape(unescape(o.path));if(o.fragment)o.fragment=encodeURI(decodeURIComponent(o.fragment))}if(a&&a.parse)a.parse(o,n)}else o.error=o.error||"URI can not be parsed.";return o}var bS={SCHEMES:BN,normalize:WN,resolve:YN,resolveComponent:mR,equal:XN,serialize:Xt,parse:fr};Pd.exports=bS;Pd.exports.default=bS;Pd.exports.fastUri=bS});var gR=U(function(hR){Object.defineProperty(hR,"__esModule",{value:!0});var fR=pR();fR.code='require("ajv/dist/runtime/uri").default';hR.default=fR});var wR=U(function(hr){Object.defineProperty(hr,"__esModule",{value:!0});hr.CodeGen=hr.Name=hr.nil=hr.stringify=hr.str=hr._=hr.KeywordCxt=void 0;var tC=Wa();Object.defineProperty(hr,"KeywordCxt",{enumerable:!0,get:function(){return tC.KeywordCxt}});var Jo=ce();Object.defineProperty(hr,"_",{enumerable:!0,get:function(){return Jo._}});Object.defineProperty(hr,"str",{enumerable:!0,get:function(){return Jo.str}});Object.defineProperty(hr,"stringify",{enumerable:!0,get:function(){return Jo.stringify}});Object.defineProperty(hr,"nil",{enumerable:!0,get:function(){return Jo.nil}});Object.defineProperty(hr,"Name",{enumerable:!0,get:function(){return Jo.Name}});Object.defineProperty(hr,"CodeGen",{enumerable:!0,get:function(){return Jo.CodeGen}});var rC=zd(),bR=Ya(),nC=eS(),ts=Rd(),oC=ce(),es=Ka(),Ed=Ha(),zS=de(),vR=tR(),iC=gR(),$R=(e,t)=>new RegExp(e,t);$R.code="new RegExp";var aC=["removeAdditional","useDefaults","coerceTypes"],sC=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),cC={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},lC={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},_R=200;function uC(e){var t,n,o,r,i,a,s,c,l,d,m,p,f,v,g,b,R,L,P,D,E,ne,ue,Oe,Se;let Ie=e.strict,Le=(t=e.code)===null||t===void 0?void 0:t.optimize,zt=Le===!0||Le===void 0?1:Le||0,wt=(o=(n=e.code)===null||n===void 0?void 0:n.regExp)!==null&&o!==void 0?o:$R,ft=(r=e.uriResolver)!==null&&r!==void 0?r:iC.default;return{strictSchema:(a=(i=e.strictSchema)!==null&&i!==void 0?i:Ie)!==null&&a!==void 0?a:!0,strictNumbers:(c=(s=e.strictNumbers)!==null&&s!==void 0?s:Ie)!==null&&c!==void 0?c:!0,strictTypes:(d=(l=e.strictTypes)!==null&&l!==void 0?l:Ie)!==null&&d!==void 0?d:"log",strictTuples:(p=(m=e.strictTuples)!==null&&m!==void 0?m:Ie)!==null&&p!==void 0?p:"log",strictRequired:(v=(f=e.strictRequired)!==null&&f!==void 0?f:Ie)!==null&&v!==void 0?v:!1,code:e.code?{...e.code,optimize:zt,regExp:wt}:{optimize:zt,regExp:wt},loopRequired:(g=e.loopRequired)!==null&&g!==void 0?g:_R,loopEnum:(b=e.loopEnum)!==null&&b!==void 0?b:_R,meta:(R=e.meta)!==null&&R!==void 0?R:!0,messages:(L=e.messages)!==null&&L!==void 0?L:!0,inlineRefs:(P=e.inlineRefs)!==null&&P!==void 0?P:!0,schemaId:(D=e.schemaId)!==null&&D!==void 0?D:"$id",addUsedSchema:(E=e.addUsedSchema)!==null&&E!==void 0?E:!0,validateSchema:(ne=e.validateSchema)!==null&&ne!==void 0?ne:!0,validateFormats:(ue=e.validateFormats)!==null&&ue!==void 0?ue:!0,unicodeRegExp:(Oe=e.unicodeRegExp)!==null&&Oe!==void 0?Oe:!0,int32range:(Se=e.int32range)!==null&&Se!==void 0?Se:!0,uriResolver:ft}}class Td{constructor(e={}){this.schemas={},this.refs={},this.formats=Object.create(null),this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts={...e,...uC(e)};let{es5:t,lines:n}=this.opts.code;this.scope=new oC.ValueScope({scope:{},prefixes:sC,es5:t,lines:n}),this.logger=gC(e.logger);let o=e.validateFormats;if(e.validateFormats=!1,this.RULES=nC.getRules(),SR.call(this,cC,e,"NOT SUPPORTED"),SR.call(this,lC,e,"DEPRECATED","warn"),this._metaOpts=fC.call(this),e.formats)mC.call(this);if(this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords)pC.call(this,e.keywords);if(typeof e.meta=="object")this.addMetaSchema(e.meta);dC.call(this),e.validateFormats=o}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:e,meta:t,schemaId:n}=this.opts,o=vR;if(n==="id")o={...vR},o.id=o.$id,delete o.$id;if(t&&e)this.addMetaSchema(o,o[n],!1)}defaultMeta(){let{meta:e,schemaId:t}=this.opts;return this.opts.defaultMeta=typeof e=="object"?e[t]||e:void 0}validate(e,t){let n;if(typeof e=="string"){if(n=this.getSchema(e),!n)throw Error(`no schema with key or ref "${e}"`)}else n=this.compile(e);let o=n(t);if(!("$async"in n))this.errors=n.errors;return o}compile(e,t){let n=this._addSchema(e,t);return n.validate||this._compileSchemaEnv(n)}compileAsync(e,t){if(typeof this.opts.loadSchema!="function")throw Error("options.loadSchema should be a function");let{loadSchema:n}=this.opts;return o.call(this,e,t);async function o(l,d){await r.call(this,l.$schema);let m=this._addSchema(l,d);return m.validate||i.call(this,m)}async function r(l){if(l&&!this.getSchema(l))await o.call(this,{$ref:l},!0)}async function i(l){try{return this._compileSchemaEnv(l)}catch(d){if(!(d instanceof bR.default))throw d;return a.call(this,d),await s.call(this,d.missingSchema),i.call(this,l)}}function a({missingSchema:l,missingRef:d}){if(this.refs[l])throw Error(`AnySchema ${l} is loaded but ${d} cannot be resolved`)}async function s(l){let d=await c.call(this,l);if(!this.refs[l])await r.call(this,d.$schema);if(!this.refs[l])this.addSchema(d,l,t)}async function c(l){let d=this._loading[l];if(d)return d;try{return await(this._loading[l]=n(l))}finally{delete this._loading[l]}}}addSchema(e,t,n,o=this.opts.validateSchema){if(Array.isArray(e)){for(let i of e)this.addSchema(i,void 0,n,o);return this}let r;if(typeof e==="object"){let{schemaId:i}=this.opts;if(r=e[i],r!==void 0&&typeof r!="string")throw Error(`schema ${i} must be string`)}return t=es.normalizeId(t||r),this._checkUnique(t),this.schemas[t]=this._addSchema(e,n,t,o,!0),this}addMetaSchema(e,t,n=this.opts.validateSchema){return this.addSchema(e,t,!0,n),this}validateSchema(e,t){if(typeof e=="boolean")return!0;let n;if(n=e.$schema,n!==void 0&&typeof n!="string")throw Error("$schema must be a string");if(n=n||this.opts.defaultMeta||this.defaultMeta(),!n)return this.logger.warn("meta-schema not available"),this.errors=null,!0;let o=this.validate(n,e);if(!o&&t){let r="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(r);else throw Error(r)}return o}getSchema(e){let t;while(typeof(t=yR.call(this,e))=="string")e=t;if(t===void 0){let{schemaId:n}=this.opts,o=new ts.SchemaEnv({schema:{},schemaId:n});if(t=ts.resolveSchema.call(this,o,e),!t)return;this.refs[e]=t}return t.validate||this._compileSchemaEnv(t)}removeSchema(e){if(e instanceof RegExp)return this._removeAllSchemas(this.schemas,e),this._removeAllSchemas(this.refs,e),this;switch(typeof e){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{let t=yR.call(this,e);if(typeof t=="object")this._cache.delete(t.schema);return delete this.schemas[e],delete this.refs[e],this}case"object":{let t=e;this._cache.delete(t);let n=e[this.opts.schemaId];if(n)n=es.normalizeId(n),delete this.schemas[n],delete this.refs[n];return this}default:throw Error("ajv.removeSchema: invalid parameter")}}addVocabulary(e){for(let t of e)this.addKeyword(t);return this}addKeyword(e,t){let n;if(typeof e=="string"){if(n=e,typeof t=="object")this.logger.warn("these parameters are deprecated, see docs for addKeyword"),t.keyword=n}else if(typeof e=="object"&&t===void 0){if(t=e,n=t.keyword,Array.isArray(n)&&!n.length)throw Error("addKeywords: keyword must be string or non-empty array")}else throw Error("invalid addKeywords parameters");if(_C.call(this,n,t),!t)return zS.eachItem(n,(r)=>$S.call(this,r)),this;yC.call(this,t);let o={...t,type:Ed.getJSONTypes(t.type),schemaType:Ed.getJSONTypes(t.schemaType)};return zS.eachItem(n,o.type.length===0?(r)=>$S.call(this,r,o):(r)=>o.type.forEach((i)=>$S.call(this,r,o,i))),this}getKeyword(e){let t=this.RULES.all[e];return typeof t=="object"?t.definition:!!t}removeKeyword(e){let{RULES:t}=this;delete t.keywords[e],delete t.all[e];for(let n of t.rules){let o=n.rules.findIndex((r)=>r.keyword===e);if(o>=0)n.rules.splice(o,1)}return this}addFormat(e,t){if(typeof t=="string")t=new RegExp(t);return this.formats[e]=t,this}errorsText(e=this.errors,{separator:t=", ",dataVar:n="data"}={}){if(!e||e.length===0)return"No errors";return e.map((o)=>`${n}${o.instancePath} ${o.message}`).reduce((o,r)=>o+t+r)}$dataMetaSchema(e,t){let n=this.RULES.all;e=JSON.parse(JSON.stringify(e));for(let o of t){let r=o.split("/").slice(1),i=e;for(let a of r)i=i[a];for(let a in n){let s=n[a];if(typeof s!="object")continue;let{$data:c}=s.definition,l=i[a];if(c&&l)i[a]=zR(l)}}return e}_removeAllSchemas(e,t){for(let n in e){let o=e[n];if(!t||t.test(n)){if(typeof o=="string")delete e[n];else if(o&&!o.meta)this._cache.delete(o.schema),delete e[n]}}}_addSchema(e,t,n,o=this.opts.validateSchema,r=this.opts.addUsedSchema){let i,{schemaId:a}=this.opts;if(typeof e=="object")i=e[a];else if(this.opts.jtd)throw Error("schema must be object");else if(typeof e!="boolean")throw Error("schema must be object or boolean");let s=this._cache.get(e);if(s!==void 0)return s;n=es.normalizeId(i||n);let c=es.getSchemaRefs.call(this,e,n);if(s=new ts.SchemaEnv({schema:e,schemaId:a,meta:t,baseId:n,localRefs:c}),this._cache.set(s.schema,s),r&&!n.startsWith("#")){if(n)this._checkUnique(n);this.refs[n]=s}if(o)this.validateSchema(e,!0);return s}_checkUnique(e){if(this.schemas[e]||this.refs[e])throw Error(`schema with key or id "${e}" already exists`)}_compileSchemaEnv(e){if(e.meta)this._compileMetaSchema(e);else ts.compileSchema.call(this,e);if(!e.validate)throw Error("ajv implementation error");return e.validate}_compileMetaSchema(e){let t=this.opts;this.opts=this._metaOpts;try{ts.compileSchema.call(this,e)}finally{this.opts=t}}}Td.ValidationError=rC.default;Td.MissingRefError=bR.default;hr.default=Td;function SR(e,t,n,o="error"){for(let r in e){let i=r;if(i in t)this.logger[o](`${n}: option ${r}. ${e[i]}`)}}function yR(e){return e=es.normalizeId(e),this.schemas[e]||this.refs[e]}function dC(){let e=this.opts.schemas;if(!e)return;if(Array.isArray(e))this.addSchema(e);else for(let t in e)this.addSchema(e[t],t)}function mC(){for(let e in this.opts.formats){let t=this.opts.formats[e];if(t)this.addFormat(e,t)}}function pC(e){if(Array.isArray(e)){this.addVocabulary(e);return}this.logger.warn("keywords option as map is deprecated, pass array");for(let t in e){let n=e[t];if(!n.keyword)n.keyword=t;this.addKeyword(n)}}function fC(){let e={...this.opts};for(let t of aC)delete e[t];return e}var hC={log(){},warn(){},error(){}};function gC(e){if(e===!1)return hC;if(e===void 0)return console;if(e.log&&e.warn&&e.error)return e;throw Error("logger must implement log, warn and error methods")}var vC=/^[a-z_$][a-z0-9_$:-]*$/i;function _C(e,t){let{RULES:n}=this;if(zS.eachItem(e,(o)=>{if(n.keywords[o])throw Error(`Keyword ${o} is already defined`);if(!vC.test(o))throw Error(`Keyword ${o} has invalid name`)}),!t)return;if(t.$data&&!(("code"in t)||("validate"in t)))throw Error('$data keyword must have "code" or "validate" function')}function $S(e,t,n){var o;let r=t===null||t===void 0?void 0:t.post;if(n&&r)throw Error('keyword with "post" flag cannot have "type"');let{RULES:i}=this,a=r?i.post:i.rules.find(({type:c})=>c===n);if(!a)a={type:n,rules:[]},i.rules.push(a);if(i.keywords[e]=!0,!t)return;let s={keyword:e,definition:{...t,type:Ed.getJSONTypes(t.type),schemaType:Ed.getJSONTypes(t.schemaType)}};if(t.before)SC.call(this,a,s,t.before);else a.rules.push(s);i.all[e]=s,(o=t.implements)===null||o===void 0||o.forEach((c)=>this.addKeyword(c))}function SC(e,t,n){let o=e.rules.findIndex((r)=>r.keyword===n);if(o>=0)e.rules.splice(o,0,t);else e.rules.push(t),this.logger.warn(`rule ${n} is not defined`)}function yC(e){let{metaSchema:t}=e;if(t===void 0)return;if(e.$data&&this.opts.$data)t=zR(t);e.validateSchema=this.compile(t,!0)}var bC={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function zR(e){return{anyOf:[e,bC]}}});var xR=U(function(RR){Object.defineProperty(RR,"__esModule",{value:!0});var wC={keyword:"id",code(){throw Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};RR.default=wC});var jR=U(function(ER){Object.defineProperty(ER,"__esModule",{value:!0});ER.callRef=ER.getValidate=void 0;var xC=Ya(),kR=bt(),at=ce(),Ho=mr(),IR=Rd(),jd=de(),kC={keyword:"$ref",schemaType:"string",code(e){let{gen:t,schema:n,it:o}=e,{baseId:r,schemaEnv:i,validateName:a,opts:s,self:c}=o,{root:l}=i;if((n==="#"||n==="#/")&&r===l.baseId)return m();let d=IR.resolveRef.call(c,l,r,n);if(d===void 0)throw new xC.default(o.opts.uriResolver,r,n);if(d instanceof IR.SchemaEnv)return p(d);return f(d);function m(){if(i===l)return Od(e,a,i,i.$async);let v=t.scopeValue("root",{ref:l});return Od(e,at._`${v}.validate`,l,l.$async)}function p(v){let g=PR(e,v);Od(e,g,v,v.$async)}function f(v){let g=t.scopeValue("schema",s.code.source===!0?{ref:v,code:at.stringify(v)}:{ref:v}),b=t.name("valid"),R=e.subschema({schema:v,dataTypes:[],schemaPath:at.nil,topSchemaRef:g,errSchemaPath:n},b);e.mergeEvaluated(R),e.ok(b)}}};function PR(e,t){let{gen:n}=e;return t.validate?n.scopeValue("validate",{ref:t.validate}):at._`${n.scopeValue("wrapper",{ref:t})}.validate`}ER.getValidate=PR;function Od(e,t,n,o){let{gen:r,it:i}=e,{allErrors:a,schemaEnv:s,opts:c}=i,l=c.passContext?Ho.default.this:at.nil;if(o)d();else m();function d(){if(!s.$async)throw Error("async schema referenced by sync schema");let v=r.let("valid");r.try(()=>{if(r.code(at._`await ${kR.callValidateCode(e,t,l)}`),f(t),!a)r.assign(v,!0)},(g)=>{if(r.if(at._`!(${g} instanceof ${i.ValidationError})`,()=>r.throw(g)),p(g),!a)r.assign(v,!1)}),e.ok(v)}function m(){e.result(kR.callValidateCode(e,t,l),()=>f(t),()=>p(t))}function p(v){let g=at._`${v}.errors`;r.assign(Ho.default.vErrors,at._`${Ho.default.vErrors} === null ? ${g} : ${Ho.default.vErrors}.concat(${g})`),r.assign(Ho.default.errors,at._`${Ho.default.vErrors}.length`)}function f(v){var g;if(!i.opts.unevaluated)return;let b=(g=n===null||n===void 0?void 0:n.validate)===null||g===void 0?void 0:g.evaluated;if(i.props!==!0)if(b&&!b.dynamicProps){if(b.props!==void 0)i.props=jd.mergeEvaluated.props(r,b.props,i.props)}else{let R=r.var("props",at._`${v}.evaluated.props`);i.props=jd.mergeEvaluated.props(r,R,i.props,at.Name)}if(i.items!==!0)if(b&&!b.dynamicItems){if(b.items!==void 0)i.items=jd.mergeEvaluated.items(r,b.items,i.items)}else{let R=r.var("items",at._`${v}.evaluated.items`);i.items=jd.mergeEvaluated.items(r,R,i.items,at.Name)}}}ER.callRef=Od;ER.default=kC});var NR=U(function(OR){Object.defineProperty(OR,"__esModule",{value:!0});var EC=xR(),TC=jR(),jC=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",EC.default,TC.default];OR.default=jC});var qR=U(function(CR){Object.defineProperty(CR,"__esModule",{value:!0});var Cd=ce(),Gr=Cd.operators,Nd={maximum:{okStr:"<=",ok:Gr.LTE,fail:Gr.GT},minimum:{okStr:">=",ok:Gr.GTE,fail:Gr.LT},exclusiveMaximum:{okStr:"<",ok:Gr.LT,fail:Gr.GTE},exclusiveMinimum:{okStr:">",ok:Gr.GT,fail:Gr.LTE}},NC={message:({keyword:e,schemaCode:t})=>Cd.str`must be ${Nd[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>Cd._`{comparison: ${Nd[e].okStr}, limit: ${t}}`},CC={keyword:Object.keys(Nd),type:"number",schemaType:"number",$data:!0,error:NC,code(e){let{keyword:t,data:n,schemaCode:o}=e;e.fail$data(Cd._`${n} ${Nd[t].fail} ${o} || isNaN(${n})`)}};CR.default=CC});var MR=U(function(AR){Object.defineProperty(AR,"__esModule",{value:!0});var rs=ce(),AC={message:({schemaCode:e})=>rs.str`must be multiple of ${e}`,params:({schemaCode:e})=>rs._`{multipleOf: ${e}}`},MC={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:AC,code(e){let{gen:t,data:n,schemaCode:o,it:r}=e,i=r.opts.multipleOfPrecision,a=t.let("res"),s=i?rs._`Math.abs(Math.round(${a}) - ${a}) > 1e-${i}`:rs._`${a} !== parseInt(${a})`;e.fail$data(rs._`(${o} === 0 || (${a} = ${n}/${o}, ${s}))`)}};AR.default=MC});var LR=U(function(DR){Object.defineProperty(DR,"__esModule",{value:!0});function UR(e){let t=e.length,n=0,o=0,r;while(o<t)if(n++,r=e.charCodeAt(o++),r>=55296&&r<=56319&&o<t){if(r=e.charCodeAt(o),(r&64512)===56320)o++}return n}DR.default=UR;UR.code='require("ajv/dist/runtime/ucs2length").default'});var VR=U(function(ZR){Object.defineProperty(ZR,"__esModule",{value:!0});var En=ce(),LC=de(),ZC=LR(),VC={message({keyword:e,schemaCode:t}){return En.str`must NOT have ${e==="maxLength"?"more":"fewer"} than ${t} characters`},params:({schemaCode:e})=>En._`{limit: ${e}}`},FC={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:VC,code(e){let{keyword:t,data:n,schemaCode:o,it:r}=e,i=t==="maxLength"?En.operators.GT:En.operators.LT,a=r.opts.unicode===!1?En._`${n}.length`:En._`${LC.useFunc(e.gen,ZC.default)}(${n})`;e.fail$data(En._`${a} ${i} ${o}`)}};ZR.default=FC});var JR=U(function(FR){Object.defineProperty(FR,"__esModule",{value:!0});var HC=bt(),KC=de(),Ko=ce(),GC={message:({schemaCode:e})=>Ko.str`must match pattern "${e}"`,params:({schemaCode:e})=>Ko._`{pattern: ${e}}`},BC={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:GC,code(e){let{gen:t,data:n,$data:o,schema:r,schemaCode:i,it:a}=e,s=a.opts.unicodeRegExp?"u":"";if(o){let{regExp:c}=a.opts.code,l=c.code==="new RegExp"?Ko._`new RegExp`:KC.useFunc(t,c),d=t.let("valid");t.try(()=>t.assign(d,Ko._`${l}(${i}, ${s}).test(${n})`),()=>t.assign(d,!1)),e.fail$data(Ko._`!${d}`)}else{let c=HC.usePattern(e,r);e.fail$data(Ko._`!${c}.test(${n})`)}}};FR.default=BC});var KR=U(function(HR){Object.defineProperty(HR,"__esModule",{value:!0});var ns=ce(),YC={message({keyword:e,schemaCode:t}){return ns.str`must NOT have ${e==="maxProperties"?"more":"fewer"} than ${t} properties`},params:({schemaCode:e})=>ns._`{limit: ${e}}`},XC={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:YC,code(e){let{keyword:t,data:n,schemaCode:o}=e,r=t==="maxProperties"?ns.operators.GT:ns.operators.LT;e.fail$data(ns._`Object.keys(${n}).length ${r} ${o}`)}};HR.default=XC});var BR=U(function(GR){Object.defineProperty(GR,"__esModule",{value:!0});var is=bt(),os=ce(),eq=de(),tq={message:({params:{missingProperty:e}})=>os.str`must have required property '${e}'`,params:({params:{missingProperty:e}})=>os._`{missingProperty: ${e}}`},rq={keyword:"required",type:"object",schemaType:"array",$data:!0,error:tq,code(e){let{gen:t,schema:n,schemaCode:o,data:r,$data:i,it:a}=e,{opts:s}=a;if(!i&&n.length===0)return;let c=n.length>=s.loopRequired;if(a.allErrors)l();else d();if(s.strictRequired){let f=e.parentSchema.properties,{definedProperties:v}=e.it;for(let g of n)if((f===null||f===void 0?void 0:f[g])===void 0&&!v.has(g)){let b=a.schemaEnv.baseId+a.errSchemaPath,R=`required property "${g}" is not defined at "${b}" (strictRequired)`;eq.checkStrictMode(a,R,a.opts.strictRequired)}}function l(){if(c||i)e.block$data(os.nil,m);else for(let f of n)is.checkReportMissingProp(e,f)}function d(){let f=t.let("missing");if(c||i){let v=t.let("valid",!0);e.block$data(v,()=>p(f,v)),e.ok(v)}else t.if(is.checkMissingProp(e,n,f)),is.reportMissingProp(e,f),t.else()}function m(){t.forOf("prop",o,(f)=>{e.setParams({missingProperty:f}),t.if(is.noPropertyInData(t,r,f,s.ownProperties),()=>e.error())})}function p(f,v){e.setParams({missingProperty:f}),t.forOf(f,o,()=>{t.assign(v,is.propertyInData(t,r,f,s.ownProperties)),t.if(os.not(v),()=>{e.error(),t.break()})},os.nil)}}};GR.default=rq});var YR=U(function(WR){Object.defineProperty(WR,"__esModule",{value:!0});var as=ce(),oq={message({keyword:e,schemaCode:t}){return as.str`must NOT have ${e==="maxItems"?"more":"fewer"} than ${t} items`},params:({schemaCode:e})=>as._`{limit: ${e}}`},iq={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:oq,code(e){let{keyword:t,data:n,schemaCode:o}=e,r=t==="maxItems"?as.operators.GT:as.operators.LT;e.fail$data(as._`${n}.length ${r} ${o}`)}};WR.default=iq});var qd=U(function(QR){Object.defineProperty(QR,"__esModule",{value:!0});var XR=cS();XR.code='require("ajv/dist/runtime/equal").default';QR.default=XR});var tx=U(function(ex){Object.defineProperty(ex,"__esModule",{value:!0});var wS=Ha(),je=ce(),cq=de(),lq=qd(),uq={message:({params:{i:e,j:t}})=>je.str`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>je._`{i: ${e}, j: ${t}}`},dq={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:uq,code(e){let{gen:t,data:n,$data:o,schema:r,parentSchema:i,schemaCode:a,it:s}=e;if(!o&&!r)return;let c=t.let("valid"),l=i.items?wS.getSchemaTypes(i.items):[];e.block$data(c,d,je._`${a} === false`),e.ok(c);function d(){let v=t.let("i",je._`${n}.length`),g=t.let("j");e.setParams({i:v,j:g}),t.assign(c,!0),t.if(je._`${v} > 1`,()=>(m()?p:f)(v,g))}function m(){return l.length>0&&!l.some((v)=>v==="object"||v==="array")}function p(v,g){let b=t.name("item"),R=wS.checkDataTypes(l,b,s.opts.strictNumbers,wS.DataType.Wrong),L=t.const("indices",je._`{}`);t.for(je._`;${v}--;`,()=>{if(t.let(b,je._`${n}[${v}]`),t.if(R,je._`continue`),l.length>1)t.if(je._`typeof ${b} == "string"`,je._`${b} += "_"`);t.if(je._`typeof ${L}[${b}] == "number"`,()=>{t.assign(g,je._`${L}[${b}]`),e.error(),t.assign(c,!1).break()}).code(je._`${L}[${b}] = ${v}`)})}function f(v,g){let b=cq.useFunc(t,lq.default),R=t.name("outer");t.label(R).for(je._`;${v}--;`,()=>t.for(je._`${g} = ${v}; ${g}--;`,()=>t.if(je._`${b}(${n}[${v}], ${n}[${g}])`,()=>{e.error(),t.assign(c,!1).break(R)})))}}};ex.default=dq});var nx=U(function(rx){Object.defineProperty(rx,"__esModule",{value:!0});var RS=ce(),pq=de(),fq=qd(),hq={message:"must be equal to constant",params:({schemaCode:e})=>RS._`{allowedValue: ${e}}`},gq={keyword:"const",$data:!0,error:hq,code(e){let{gen:t,data:n,$data:o,schemaCode:r,schema:i}=e;if(o||i&&typeof i=="object")e.fail$data(RS._`!${pq.useFunc(t,fq.default)}(${n}, ${r})`);else e.fail(RS._`${i} !== ${n}`)}};rx.default=gq});var ix=U(function(ox){Object.defineProperty(ox,"__esModule",{value:!0});var ss=ce(),_q=de(),Sq=qd(),yq={message:"must be equal to one of the allowed values",params:({schemaCode:e})=>ss._`{allowedValues: ${e}}`},bq={keyword:"enum",schemaType:"array",$data:!0,error:yq,code(e){let{gen:t,data:n,$data:o,schema:r,schemaCode:i,it:a}=e;if(!o&&r.length===0)throw Error("enum must have non-empty array");let s=r.length>=a.opts.loopEnum,c,l=()=>c!==null&&c!==void 0?c:c=_q.useFunc(t,Sq.default),d;if(s||o)d=t.let("valid"),e.block$data(d,m);else{if(!Array.isArray(r))throw Error("ajv implementation error");let f=t.const("vSchema",i);d=ss.or(...r.map((v,g)=>p(f,g)))}e.pass(d);function m(){t.assign(d,!1),t.forOf("v",i,(f)=>t.if(ss._`${l()}(${n}, ${f})`,()=>t.assign(d,!0).break()))}function p(f,v){let g=r[v];return typeof g==="object"&&g!==null?ss._`${l()}(${n}, ${f}[${v}])`:ss._`${n} === ${g}`}}};ox.default=bq});var sx=U(function(ax){Object.defineProperty(ax,"__esModule",{value:!0});var zq=qR(),wq=MR(),Rq=VR(),xq=JR(),kq=KR(),Iq=BR(),Pq=YR(),Eq=tx(),Tq=nx(),jq=ix(),Oq=[zq.default,wq.default,Rq.default,xq.default,kq.default,Iq.default,Pq.default,Eq.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},Tq.default,jq.default];ax.default=Oq});var kS=U(function(lx){Object.defineProperty(lx,"__esModule",{value:!0});lx.validateAdditionalItems=void 0;var Tn=ce(),xS=de(),Cq={message:({params:{len:e}})=>Tn.str`must NOT have more than ${e} items`,params:({params:{len:e}})=>Tn._`{limit: ${e}}`},qq={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:Cq,code(e){let{parentSchema:t,it:n}=e,{items:o}=t;if(!Array.isArray(o)){xS.checkStrictMode(n,'"additionalItems" is ignored when "items" is not an array of schemas');return}cx(e,o)}};function cx(e,t){let{gen:n,schema:o,data:r,keyword:i,it:a}=e;a.items=!0;let s=n.const("len",Tn._`${r}.length`);if(o===!1)e.setParams({len:t.length}),e.pass(Tn._`${s} <= ${t.length}`);else if(typeof o=="object"&&!xS.alwaysValidSchema(a,o)){let l=n.var("valid",Tn._`${s} <= ${t.length}`);n.if(Tn.not(l),()=>c(l)),e.ok(l)}function c(l){n.forRange("i",t.length,s,(d)=>{if(e.subschema({keyword:i,dataProp:d,dataPropType:xS.Type.Num},l),!a.allErrors)n.if(Tn.not(l),()=>n.break())})}}lx.validateAdditionalItems=cx;lx.default=qq});var IS=U(function(px){Object.defineProperty(px,"__esModule",{value:!0});px.validateTuple=void 0;var dx=ce(),Ad=de(),Mq=bt(),Uq={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){let{schema:t,it:n}=e;if(Array.isArray(t))return mx(e,"additionalItems",t);if(n.items=!0,Ad.alwaysValidSchema(n,t))return;e.ok(Mq.validateArray(e))}};function mx(e,t,n=e.schema){let{gen:o,parentSchema:r,data:i,keyword:a,it:s}=e;if(d(r),s.opts.unevaluated&&n.length&&s.items!==!0)s.items=Ad.mergeEvaluated.items(o,n.length,s.items);let c=o.name("valid"),l=o.const("len",dx._`${i}.length`);n.forEach((m,p)=>{if(Ad.alwaysValidSchema(s,m))return;o.if(dx._`${l} > ${p}`,()=>e.subschema({keyword:a,schemaProp:p,dataProp:p},c)),e.ok(c)});function d(m){let{opts:p,errSchemaPath:f}=s,v=n.length,g=v===m.minItems&&(v===m.maxItems||m[t]===!1);if(p.strictTuples&&!g){let b=`"${a}" is ${v}-tuple, but minItems or maxItems/${t} are not specified or different at path "${f}"`;Ad.checkStrictMode(s,b,p.strictTuples)}}}px.validateTuple=mx;px.default=Uq});var gx=U(function(hx){Object.defineProperty(hx,"__esModule",{value:!0});var Lq=IS(),Zq={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:(e)=>Lq.validateTuple(e,"items")};hx.default=Zq});var Sx=U(function(_x){Object.defineProperty(_x,"__esModule",{value:!0});var vx=ce(),Fq=de(),Jq=bt(),Hq=kS(),Kq={message:({params:{len:e}})=>vx.str`must NOT have more than ${e} items`,params:({params:{len:e}})=>vx._`{limit: ${e}}`},Gq={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:Kq,code(e){let{schema:t,parentSchema:n,it:o}=e,{prefixItems:r}=n;if(o.items=!0,Fq.alwaysValidSchema(o,t))return;if(r)Hq.validateAdditionalItems(e,r);else e.ok(Jq.validateArray(e))}};_x.default=Gq});var bx=U(function(yx){Object.defineProperty(yx,"__esModule",{value:!0});var $t=ce(),Md=de(),Wq={message:({params:{min:e,max:t}})=>t===void 0?$t.str`must contain at least ${e} valid item(s)`:$t.str`must contain at least ${e} and no more than ${t} valid item(s)`,params:({params:{min:e,max:t}})=>t===void 0?$t._`{minContains: ${e}}`:$t._`{minContains: ${e}, maxContains: ${t}}`},Yq={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:Wq,code(e){let{gen:t,schema:n,parentSchema:o,data:r,it:i}=e,a,s,{minContains:c,maxContains:l}=o;if(i.opts.next)a=c===void 0?1:c,s=l;else a=1;let d=t.const("len",$t._`${r}.length`);if(e.setParams({min:a,max:s}),s===void 0&&a===0){Md.checkStrictMode(i,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(s!==void 0&&a>s){Md.checkStrictMode(i,'"minContains" > "maxContains" is always invalid'),e.fail();return}if(Md.alwaysValidSchema(i,n)){let g=$t._`${d} >= ${a}`;if(s!==void 0)g=$t._`${g} && ${d} <= ${s}`;e.pass(g);return}i.items=!0;let m=t.name("valid");if(s===void 0&&a===1)f(m,()=>t.if(m,()=>t.break()));else if(a===0){if(t.let(m,!0),s!==void 0)t.if($t._`${r}.length > 0`,p)}else t.let(m,!1),p();e.result(m,()=>e.reset());function p(){let g=t.name("_valid"),b=t.let("count",0);f(g,()=>t.if(g,()=>v(b)))}function f(g,b){t.forRange("i",0,d,(R)=>{e.subschema({keyword:"contains",dataProp:R,dataPropType:Md.Type.Num,compositeRule:!0},g),b()})}function v(g){if(t.code($t._`${g}++`),s===void 0)t.if($t._`${g} >= ${a}`,()=>t.assign(m,!0).break());else if(t.if($t._`${g} > ${s}`,()=>t.assign(m,!1).break()),a===1)t.assign(m,!0);else t.if($t._`${g} >= ${a}`,()=>t.assign(m,!0))}}};yx.default=Yq});var kx=U(function(wx){Object.defineProperty(wx,"__esModule",{value:!0});wx.validateSchemaDeps=wx.validatePropertyDeps=wx.error=void 0;var PS=ce(),Qq=de(),cs=bt();wx.error={message:({params:{property:e,depsCount:t,deps:n}})=>PS.str`must have ${t===1?"property":"properties"} ${n} when property ${e} is present`,params:({params:{property:e,depsCount:t,deps:n,missingProperty:o}})=>PS._`{property: ${e},
|
|
7
7
|
missingProperty: ${o},
|
|
8
8
|
depsCount: ${t},
|
|
9
|
-
deps: ${n}}`};var eA={keyword:"dependencies",type:"object",schemaType:"object",error:mx.error,code(e){let[t,n]=tA(e);ux(e,t),dx(e,n)}};function tA({schema:e}){let t={},n={};for(let o in e){if(o==="__proto__")continue;let r=Array.isArray(e[o])?t:n;r[o]=e[o]}return[t,n]}function ux(e,t=e.schema){let{gen:n,data:o,it:r}=e;if(Object.keys(t).length===0)return;let i=n.let("missing");for(let a in t){let s=t[a];if(s.length===0)continue;let c=(0,cs.propertyInData)(n,o,a,r.opts.ownProperties);if(e.setParams({property:a,depsCount:s.length,deps:s.join(", ")}),r.allErrors)n.if(c,()=>{for(let l of s)(0,cs.checkReportMissingProp)(e,l)});else n.if(PS._`${c} && (${(0,cs.checkMissingProp)(e,s,i)})`),(0,cs.reportMissingProp)(e,i),n.else()}}mx.validatePropertyDeps=ux;function dx(e,t=e.schema){let{gen:n,data:o,keyword:r,it:i}=e,a=n.name("valid");for(let s in t){if((0,Q1.alwaysValidSchema)(i,t[s]))continue;n.if((0,cs.propertyInData)(n,o,s,i.opts.ownProperties),()=>{let c=e.subschema({keyword:r,schemaProp:s},a);e.mergeValidEvaluated(c,a)},()=>n.var(a,!0)),e.ok(a)}}mx.validateSchemaDeps=dx;mx.default=eA});var _x=D(function(vx){Object.defineProperty(vx,"__esModule",{value:!0});var gx=ce(),oA=de(),iA={message:"property name must be valid",params:({params:e})=>gx._`{propertyName: ${e.propertyName}}`},aA={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:iA,code(e){let{gen:t,schema:n,data:o,it:r}=e;if((0,oA.alwaysValidSchema)(r,n))return;let i=t.name("valid");t.forIn("key",o,(a)=>{e.setParams({propertyName:a}),e.subschema({keyword:"propertyNames",data:a,dataTypes:["string"],propertyName:a,compositeRule:!0},i),t.if((0,gx.not)(i),()=>{if(e.error(!0),!r.allErrors)t.break()})}),e.ok(i)}};vx.default=aA});var ES=D(function(Sx){Object.defineProperty(Sx,"__esModule",{value:!0});var Cd=zt(),qt=ce(),cA=pr(),qd=de(),lA={message:"must NOT have additional properties",params:({params:e})=>qt._`{additionalProperty: ${e.additionalProperty}}`},uA={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:lA,code(e){let{gen:t,schema:n,parentSchema:o,data:r,errsCount:i,it:a}=e;if(!i)throw Error("ajv implementation error");let{allErrors:s,opts:c}=a;if(a.props=!0,c.removeAdditional!=="all"&&(0,qd.alwaysValidSchema)(a,n))return;let l=(0,Cd.allSchemaProperties)(o.properties),d=(0,Cd.allSchemaProperties)(o.patternProperties);m(),e.ok(qt._`${i} === ${cA.default.errors}`);function m(){t.forIn("key",r,(b)=>{if(!l.length&&!d.length)v(b);else t.if(p(b),()=>v(b))})}function p(b){let w;if(l.length>8){let Z=(0,qd.schemaRefOrVal)(a,o.properties,"properties");w=(0,Cd.isOwnProperty)(t,Z,b)}else if(l.length)w=(0,qt.or)(...l.map((Z)=>qt._`${b} === ${Z}`));else w=qt.nil;if(d.length)w=(0,qt.or)(w,...d.map((Z)=>qt._`${(0,Cd.usePattern)(e,Z)}.test(${b})`));return(0,qt.not)(w)}function f(b){t.code(qt._`delete ${r}[${b}]`)}function v(b){if(c.removeAdditional==="all"||c.removeAdditional&&n===!1){f(b);return}if(n===!1){if(e.setParams({additionalProperty:b}),e.error(),!s)t.break();return}if(typeof n=="object"&&!(0,qd.alwaysValidSchema)(a,n)){let w=t.name("valid");if(c.removeAdditional==="failing")g(b,w,!1),t.if((0,qt.not)(w),()=>{e.reset(),f(b)});else if(g(b,w),!s)t.if((0,qt.not)(w),()=>t.break())}}function g(b,w,Z){let E={keyword:"additionalProperties",dataProp:b,dataPropType:qd.Type.Str};if(Z===!1)Object.assign(E,{compositeRule:!0,createErrors:!1,allErrors:!1});e.subschema(E,w)}}};Sx.default=uA});var zx=D(function($x){Object.defineProperty($x,"__esModule",{value:!0});var mA=Wa(),yx=zt(),TS=de(),bx=ES(),pA={keyword:"properties",type:"object",schemaType:"object",code(e){let{gen:t,schema:n,parentSchema:o,data:r,it:i}=e;if(i.opts.removeAdditional==="all"&&o.additionalProperties===void 0)bx.default.code(new mA.KeywordCxt(i,bx.default,"additionalProperties"));let a=(0,yx.allSchemaProperties)(n);for(let m of a)i.definedProperties.add(m);if(i.opts.unevaluated&&a.length&&i.props!==!0)i.props=TS.mergeEvaluated.props(t,(0,TS.toHash)(a),i.props);let s=a.filter((m)=>!(0,TS.alwaysValidSchema)(i,n[m]));if(s.length===0)return;let c=t.name("valid");for(let m of s){if(l(m))d(m);else{if(t.if((0,yx.propertyInData)(t,r,m,i.opts.ownProperties)),d(m),!i.allErrors)t.else().var(c,!0);t.endIf()}e.it.definedProperties.add(m),e.ok(c)}function l(m){return i.opts.useDefaults&&!i.compositeRule&&n[m].default!==void 0}function d(m){e.subschema({keyword:"properties",schemaProp:m,dataProp:m},c)}}};$x.default=pA});var Ix=D(function(kx){Object.defineProperty(kx,"__esModule",{value:!0});var wx=zt(),Ad=ce(),Rx=de(),xx=de(),hA={keyword:"patternProperties",type:"object",schemaType:"object",code(e){let{gen:t,schema:n,data:o,parentSchema:r,it:i}=e,{opts:a}=i,s=(0,wx.allSchemaProperties)(n),c=s.filter((g)=>(0,Rx.alwaysValidSchema)(i,n[g]));if(s.length===0||c.length===s.length&&(!i.opts.unevaluated||i.props===!0))return;let l=a.strictSchema&&!a.allowMatchingProperties&&r.properties,d=t.name("valid");if(i.props!==!0&&!(i.props instanceof Ad.Name))i.props=(0,xx.evaluatedPropsToName)(t,i.props);let{props:m}=i;p();function p(){for(let g of s){if(l)f(g);if(i.allErrors)v(g);else t.var(d,!0),v(g),t.if(d)}}function f(g){for(let b in l)if(new RegExp(g).test(b))(0,Rx.checkStrictMode)(i,`property ${b} matches pattern ${g} (use allowMatchingProperties)`)}function v(g){t.forIn("key",o,(b)=>{t.if(Ad._`${(0,wx.usePattern)(e,g)}.test(${b})`,()=>{let w=c.includes(g);if(!w)e.subschema({keyword:"patternProperties",schemaProp:g,dataProp:b,dataPropType:xx.Type.Str},d);if(i.opts.unevaluated&&m!==!0)t.assign(Ad._`${m}[${b}]`,!0);else if(!w&&!i.allErrors)t.if((0,Ad.not)(d),()=>t.break())})})}}};kx.default=hA});var Ex=D(function(Px){Object.defineProperty(Px,"__esModule",{value:!0});var vA=de(),_A={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){let{gen:t,schema:n,it:o}=e;if((0,vA.alwaysValidSchema)(o,n)){e.fail();return}let r=t.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},r),e.failResult(r,()=>e.reset(),()=>e.error())},error:{message:"must NOT be valid"}};Px.default=_A});var jx=D(function(Tx){Object.defineProperty(Tx,"__esModule",{value:!0});var yA=zt(),bA={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:yA.validateUnion,error:{message:"must match a schema in anyOf"}};Tx.default=bA});var Nx=D(function(Ox){Object.defineProperty(Ox,"__esModule",{value:!0});var Md=ce(),zA=de(),wA={message:"must match exactly one schema in oneOf",params:({params:e})=>Md._`{passingSchemas: ${e.passing}}`},RA={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:wA,code(e){let{gen:t,schema:n,parentSchema:o,it:r}=e;if(!Array.isArray(n))throw Error("ajv implementation error");if(r.opts.discriminator&&o.discriminator)return;let i=n,a=t.let("valid",!1),s=t.let("passing",null),c=t.name("_valid");e.setParams({passing:s}),t.block(l),e.result(a,()=>e.reset(),()=>e.error(!0));function l(){i.forEach((d,m)=>{let p;if((0,zA.alwaysValidSchema)(r,d))t.var(c,!0);else p=e.subschema({keyword:"oneOf",schemaProp:m,compositeRule:!0},c);if(m>0)t.if(Md._`${c} && ${a}`).assign(a,!1).assign(s,Md._`[${s}, ${m}]`).else();t.if(c,()=>{if(t.assign(a,!0),t.assign(s,m),p)e.mergeEvaluated(p,Md.Name)})})}}};Ox.default=RA});var qx=D(function(Cx){Object.defineProperty(Cx,"__esModule",{value:!0});var kA=de(),IA={keyword:"allOf",schemaType:"array",code(e){let{gen:t,schema:n,it:o}=e;if(!Array.isArray(n))throw Error("ajv implementation error");let r=t.name("valid");n.forEach((i,a)=>{if((0,kA.alwaysValidSchema)(o,i))return;let s=e.subschema({keyword:"allOf",schemaProp:a},r);e.ok(r),e.mergeEvaluated(s)})}};Cx.default=IA});var Dx=D(function(Ux){Object.defineProperty(Ux,"__esModule",{value:!0});var Ud=ce(),Mx=de(),EA={message:({params:e})=>Ud.str`must match "${e.ifClause}" schema`,params:({params:e})=>Ud._`{failingKeyword: ${e.ifClause}}`},TA={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:EA,code(e){let{gen:t,parentSchema:n,it:o}=e;if(n.then===void 0&&n.else===void 0)(0,Mx.checkStrictMode)(o,'"if" without "then" and "else" is ignored');let r=Ax(o,"then"),i=Ax(o,"else");if(!r&&!i)return;let a=t.let("valid",!0),s=t.name("_valid");if(c(),e.reset(),r&&i){let d=t.let("ifClause");e.setParams({ifClause:d}),t.if(s,l("then",d),l("else",d))}else if(r)t.if(s,l("then"));else t.if((0,Ud.not)(s),l("else"));e.pass(a,()=>e.error(!0));function c(){let d=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},s);e.mergeEvaluated(d)}function l(d,m){return()=>{let p=e.subschema({keyword:d},s);if(t.assign(a,s),e.mergeValidEvaluated(p,a),m)t.assign(m,Ud._`${d}`);else e.setParams({ifClause:d})}}}};function Ax(e,t){let n=e.schema[t];return n!==void 0&&!(0,Mx.alwaysValidSchema)(e,n)}Ux.default=TA});var Zx=D(function(Lx){Object.defineProperty(Lx,"__esModule",{value:!0});var OA=de(),NA={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:n}){if(t.if===void 0)(0,OA.checkStrictMode)(n,`"${e}" without "if" is ignored`)}};Lx.default=NA});var Fx=D(function(Vx){Object.defineProperty(Vx,"__esModule",{value:!0});var qA=kS(),AA=ox(),MA=IS(),UA=sx(),DA=lx(),LA=hx(),ZA=_x(),VA=ES(),FA=zx(),JA=Ix(),HA=Ex(),KA=jx(),GA=Nx(),BA=qx(),WA=Dx(),YA=Zx();function XA(e=!1){let t=[HA.default,KA.default,GA.default,BA.default,WA.default,YA.default,ZA.default,VA.default,LA.default,FA.default,JA.default];if(e)t.push(AA.default,UA.default);else t.push(qA.default,MA.default);return t.push(DA.default),t}Vx.default=XA});var Hx=D(function(Jx){Object.defineProperty(Jx,"__esModule",{value:!0});var xe=ce(),eM={message:({schemaCode:e})=>xe.str`must match format "${e}"`,params:({schemaCode:e})=>xe._`{format: ${e}}`},tM={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:eM,code(e,t){let{gen:n,data:o,$data:r,schema:i,schemaCode:a,it:s}=e,{opts:c,errSchemaPath:l,schemaEnv:d,self:m}=s;if(!c.validateFormats)return;if(r)p();else f();function p(){let v=n.scopeValue("formats",{ref:m.formats,code:c.code.formats}),g=n.const("fDef",xe._`${v}[${a}]`),b=n.let("fType"),w=n.let("format");n.if(xe._`typeof ${g} == "object" && !(${g} instanceof RegExp)`,()=>n.assign(b,xe._`${g}.type || "string"`).assign(w,xe._`${g}.validate`),()=>n.assign(b,xe._`"string"`).assign(w,g)),e.fail$data((0,xe.or)(Z(),E()));function Z(){if(c.strictSchema===!1)return xe.nil;return xe._`${a} && !${w}`}function E(){let L=d.$async?xe._`(${g}.async ? await ${w}(${o}) : ${w}(${o}))`:xe._`${w}(${o})`,T=xe._`(typeof ${w} == "function" ? ${L} : ${w}.test(${o}))`;return xe._`${w} && ${w} !== true && ${b} === ${t} && !${T}`}}function f(){let v=m.formats[i];if(!v){Z();return}if(v===!0)return;let[g,b,w]=E(v);if(g===t)e.pass(L());function Z(){if(c.strictSchema===!1){m.logger.warn(T());return}throw Error(T());function T(){return`unknown format "${i}" ignored in schema at path "${l}"`}}function E(T){let ne=T instanceof RegExp?(0,xe.regexpCode)(T):c.code.formats?xe._`${c.code.formats}${(0,xe.getProperty)(i)}`:void 0,ue=n.scopeValue("formats",{key:i,ref:T,code:ne});if(typeof T=="object"&&!(T instanceof RegExp))return[T.type||"string",T.validate,xe._`${ue}.validate`];return["string",T,ue]}function L(){if(typeof v=="object"&&!(v instanceof RegExp)&&v.async){if(!d.$async)throw Error("async format in sync schema");return xe._`await ${w}(${o})`}return typeof b=="function"?xe._`${w}(${o})`:xe._`${w}.test(${o})`}}}};Jx.default=tM});var Gx=D(function(Kx){Object.defineProperty(Kx,"__esModule",{value:!0});var nM=Hx(),oM=[nM.default];Kx.default=oM});var Yx=D(function(Bx){Object.defineProperty(Bx,"__esModule",{value:!0});Bx.contentVocabulary=Bx.metadataVocabulary=void 0;Bx.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];Bx.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});var ek=D(function(Qx){Object.defineProperty(Qx,"__esModule",{value:!0});var sM=$R(),cM=BR(),lM=Fx(),uM=Gx(),Xx=Yx(),dM=[sM.default,cM.default,(0,lM.default)(),uM.default,Xx.metadataVocabulary,Xx.contentVocabulary];Qx.default=dM});var ok=D(function(rk){Object.defineProperty(rk,"__esModule",{value:!0});rk.DiscrError=void 0;var tk;(function(e){e.Tag="tag",e.Mapping="mapping"})(tk||(rk.DiscrError=tk={}))});var sk=D(function(ak){Object.defineProperty(ak,"__esModule",{value:!0});var Ko=ce(),jS=ok(),ik=bd(),pM=Ya(),fM=de(),hM={message:({params:{discrError:e,tagName:t}})=>e===jS.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:t,tagName:n}})=>Ko._`{error: ${e}, tag: ${n}, tagValue: ${t}}`},gM={keyword:"discriminator",type:"object",schemaType:"object",error:hM,code(e){let{gen:t,data:n,schema:o,parentSchema:r,it:i}=e,{oneOf:a}=r;if(!i.opts.discriminator)throw Error("discriminator: requires discriminator option");let s=o.propertyName;if(typeof s!="string")throw Error("discriminator: requires propertyName");if(o.mapping)throw Error("discriminator: mapping is not supported");if(!a)throw Error("discriminator: requires oneOf keyword");let c=t.let("valid",!1),l=t.const("tag",Ko._`${n}${(0,Ko.getProperty)(s)}`);t.if(Ko._`typeof ${l} == "string"`,()=>d(),()=>e.error(!1,{discrError:jS.DiscrError.Tag,tag:l,tagName:s})),e.ok(c);function d(){let f=p();t.if(!1);for(let v in f)t.elseIf(Ko._`${l} === ${v}`),t.assign(c,m(f[v]));t.else(),e.error(!1,{discrError:jS.DiscrError.Mapping,tag:l,tagName:s}),t.endIf()}function m(f){let v=t.name("valid"),g=e.subschema({keyword:"oneOf",schemaProp:f},v);return e.mergeEvaluated(g,Ko.Name),v}function p(){var f;let v={},g=w(r),b=!0;for(let L=0;L<a.length;L++){let T=a[L];if((T===null||T===void 0?void 0:T.$ref)&&!(0,fM.schemaHasRulesButRef)(T,i.self.RULES)){let ue=T.$ref;if(T=ik.resolveRef.call(i.self,i.schemaEnv.root,i.baseId,ue),T instanceof ik.SchemaEnv)T=T.schema;if(T===void 0)throw new pM.default(i.opts.uriResolver,i.baseId,ue)}let ne=(f=T===null||T===void 0?void 0:T.properties)===null||f===void 0?void 0:f[s];if(typeof ne!="object")throw Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${s}"`);b=b&&(g||w(T)),Z(ne,L)}if(!b)throw Error(`discriminator: "${s}" must be required`);return v;function w({required:L}){return Array.isArray(L)&&L.includes(s)}function Z(L,T){if(L.const)E(L.const,T);else if(L.enum)for(let ne of L.enum)E(ne,T);else throw Error(`discriminator: "properties/${s}" must have "const" or "enum"`)}function E(L,T){if(typeof L!="string"||L in v)throw Error(`discriminator: "${s}" values must be unique strings`);v[L]=T}}}};ak.default=gM});var ck=D(function($2,_M){_M.exports={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0}});var uk=D(function(st,OS){Object.defineProperty(st,"__esModule",{value:!0});st.MissingRefError=st.ValidationError=st.CodeGen=st.Name=st.nil=st.stringify=st.str=st._=st.KeywordCxt=st.Ajv=void 0;var SM=mR(),yM=ek(),bM=sk(),lk=ck(),$M=["/properties"],Dd="http://json-schema.org/draft-07/schema";class ls extends SM.default{_addVocabularies(){if(super._addVocabularies(),yM.default.forEach((e)=>this.addVocabulary(e)),this.opts.discriminator)this.addKeyword(bM.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let e=this.opts.$data?this.$dataMetaSchema(lk,$M):lk;this.addMetaSchema(e,Dd,!1),this.refs["http://json-schema.org/schema"]=Dd}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(Dd)?Dd:void 0)}}st.Ajv=ls;OS.exports=st=ls;OS.exports.Ajv=ls;Object.defineProperty(st,"__esModule",{value:!0});st.default=ls;var zM=Wa();Object.defineProperty(st,"KeywordCxt",{enumerable:!0,get:function(){return zM.KeywordCxt}});var Go=ce();Object.defineProperty(st,"_",{enumerable:!0,get:function(){return Go._}});Object.defineProperty(st,"str",{enumerable:!0,get:function(){return Go.str}});Object.defineProperty(st,"stringify",{enumerable:!0,get:function(){return Go.stringify}});Object.defineProperty(st,"nil",{enumerable:!0,get:function(){return Go.nil}});Object.defineProperty(st,"Name",{enumerable:!0,get:function(){return Go.Name}});Object.defineProperty(st,"CodeGen",{enumerable:!0,get:function(){return Go.CodeGen}});var wM=Sd();Object.defineProperty(st,"ValidationError",{enumerable:!0,get:function(){return wM.default}});var RM=Ya();Object.defineProperty(st,"MissingRefError",{enumerable:!0,get:function(){return RM.default}})});var{create:$k,defineProperty:ks,getOwnPropertyDescriptor:zk,getOwnPropertyNames:wk,getPrototypeOf:Rk}=Object,xk=Object.prototype.hasOwnProperty,CS=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),qS=(e,t)=>{let n={};for(var o in e)ks(n,o,{get:e[o],enumerable:!0});if(t)ks(n,Symbol.toStringTag,{value:"Module"});return n},kk=(e,t,n,o)=>{if(t&&typeof t==="object"||typeof t==="function"){for(var r=wk(t),i=0,a=r.length,s;i<a;i++)if(s=r[i],!xk.call(e,s)&&s!==n)ks(e,s,{get:((c)=>t[c]).bind(null,s),enumerable:!(o=zk(t,s))||o.enumerable})}return e},AS=(e,t,n)=>(n=e!=null?$k(Rk(e)):{},kk(t||!e||!e.__esModule?ks(n,"default",{value:e,enumerable:!0}):n,e));var Ik=new Set(["https://json-schema.org/draft/2020-12/schema","http://json-schema.org/draft/2020-12/schema"]),MS=new Set(["https://json-schema.org/draft/2019-09/schema","http://json-schema.org/draft/2019-09/schema"]),Pk=new Set(["https://json-schema.org/draft-07/schema","http://json-schema.org/draft-07/schema"]),Ek=new Set(["https://json-schema.org/draft-06/schema","http://json-schema.org/draft-06/schema"]);function US(e){return typeof e==="string"&&MS.has(e.replace(/#$/,""))}function DS(e,t){if(!("$schema"in e)||typeof e.$schema!=="string")return"2020-12";let n=e.$schema.replace(/#$/,"");if(Ik.has(n))return"2020-12";if(MS.has(n))return"2019-09";if(Pk.has(n)||Ek.has(n))return"draft-7";throw Error(`JSON Schema declares an unsupported dialect ("$schema": "${e.$schema.slice(0,200)}"). The default validator supports JSON Schema 2020-12, 2019-09, draft-07, and draft-06; ${t}`)}var Nv={};rr(Nv,{$brand:()=>Vd,$input:()=>ih,$output:()=>oh,NEVER:()=>$i,TimePrecision:()=>uh,ZodAny:()=>Wg,ZodArray:()=>ev,ZodBase64:()=>Bc,ZodBase64URL:()=>Wc,ZodBigInt:()=>_o,ZodBigIntFormat:()=>Qc,ZodBoolean:()=>vo,ZodCIDRv4:()=>Kc,ZodCIDRv6:()=>Gc,ZodCUID:()=>Dc,ZodCUID2:()=>Lc,ZodCatch:()=>yv,ZodCodec:()=>ta,ZodCustom:()=>ra,ZodCustomStringFormat:()=>ho,ZodDate:()=>Yi,ZodDefault:()=>fv,ZodDiscriminatedUnion:()=>rv,ZodE164:()=>Yc,ZodEmail:()=>qc,ZodEmoji:()=>Mc,ZodEnum:()=>mo,ZodError:()=>sP,ZodExactOptional:()=>dv,ZodFile:()=>lv,ZodFirstPartyTypeKind:()=>jv,ZodFunction:()=>Pv,ZodGUID:()=>Ki,ZodIPv4:()=>Jc,ZodIPv6:()=>Hc,ZodISODate:()=>Ec,ZodISODateTime:()=>Pc,ZodISODuration:()=>jc,ZodISOTime:()=>Tc,ZodIntersection:()=>nv,ZodIssueCode:()=>Ov,ZodJWT:()=>Xc,ZodKSUID:()=>Fc,ZodLazy:()=>kv,ZodLiteral:()=>cv,ZodMAC:()=>Hg,ZodMap:()=>av,ZodNaN:()=>$v,ZodNanoID:()=>Uc,ZodNever:()=>Xg,ZodNonOptional:()=>ol,ZodNull:()=>Bg,ZodNullable:()=>pv,ZodNumber:()=>go,ZodNumberFormat:()=>hn,ZodObject:()=>Xi,ZodOptional:()=>nl,ZodPipe:()=>ea,ZodPrefault:()=>gv,ZodPreprocess:()=>zv,ZodPromise:()=>Iv,ZodReadonly:()=>wv,ZodRealError:()=>nt,ZodRecord:()=>uo,ZodSet:()=>sv,ZodString:()=>po,ZodStringFormat:()=>he,ZodSuccess:()=>Sv,ZodSymbol:()=>Kg,ZodTemplateLiteral:()=>xv,ZodTransform:()=>uv,ZodTuple:()=>ov,ZodType:()=>oe,ZodULID:()=>Zc,ZodURL:()=>Wi,ZodUUID:()=>Bt,ZodUndefined:()=>Gg,ZodUnion:()=>Qi,ZodUnknown:()=>Yg,ZodVoid:()=>Qg,ZodXID:()=>Vc,ZodXor:()=>tv,_ZodString:()=>Cc,_default:()=>hv,_function:()=>kb,any:()=>el,array:()=>S,base64:()=>Hy,base64url:()=>Ky,bigint:()=>ob,boolean:()=>C,catch:()=>bv,check:()=>Ib,cidrv4:()=>Fy,cidrv6:()=>Jy,clone:()=>Je,codec:()=>zb,coerce:()=>na,config:()=>be,core:()=>ir,cuid:()=>qy,cuid2:()=>Ay,custom:()=>Pb,date:()=>ub,decode:()=>Ug,decodeAsync:()=>Lg,describe:()=>Eb,discriminatedUnion:()=>Er,e164:()=>Gy,email:()=>Ac,emoji:()=>Ny,encode:()=>Mg,encodeAsync:()=>Dg,endsWith:()=>to,enum:()=>X,exactOptional:()=>mv,file:()=>Sb,flattenError:()=>Ei,float32:()=>eb,float64:()=>tb,formatError:()=>Ti,fromJSONSchema:()=>qb,function:()=>kb,getErrorMap:()=>uP,globalRegistry:()=>Te,gt:()=>Kt,gte:()=>Ke,guid:()=>Iy,hash:()=>Qy,hex:()=>Xy,hostname:()=>Yy,httpUrl:()=>Oy,includes:()=>Qn,instanceof:()=>jb,int:()=>Oc,int32:()=>rb,int64:()=>ib,intersection:()=>Et,invertCodec:()=>wb,ipv4:()=>Ly,ipv6:()=>Vy,iso:()=>ht,json:()=>Nb,jwt:()=>By,keyof:()=>db,ksuid:()=>Dy,lazy:()=>Tr,length:()=>pn,literal:()=>y,locales:()=>Zi,looseObject:()=>H,looseRecord:()=>hb,lowercase:()=>Yn,lt:()=>Ht,lte:()=>ft,mac:()=>Zy,map:()=>gb,maxLength:()=>mn,maxSize:()=>xr,meta:()=>Tb,mime:()=>ro,minLength:()=>or,minSize:()=>Gt,multipleOf:()=>Rr,nan:()=>$b,nanoid:()=>Cy,nativeEnum:()=>_b,negative:()=>bc,never:()=>tl,nonnegative:()=>zc,nonoptional:()=>_v,nonpositive:()=>$c,normalize:()=>no,null:()=>Wt,nullable:()=>Gi,nullish:()=>yb,number:()=>R,object:()=>h,optional:()=>J,overwrite:()=>Pt,parse:()=>Cg,parseAsync:()=>qg,partialRecord:()=>fb,pipe:()=>Nc,positive:()=>yc,prefault:()=>vv,preprocess:()=>ar,prettifyError:()=>tm,promise:()=>xb,property:()=>wc,readonly:()=>Rv,record:()=>j,refine:()=>Ev,regex:()=>Wn,regexes:()=>pt,registry:()=>Qs,safeDecode:()=>Vg,safeDecodeAsync:()=>Jg,safeEncode:()=>Zg,safeEncodeAsync:()=>Fg,safeParse:()=>Hi,safeParseAsync:()=>Ag,set:()=>vb,setErrorMap:()=>lP,size:()=>dn,slugify:()=>so,startsWith:()=>eo,strictObject:()=>mb,string:()=>u,stringFormat:()=>Wy,stringbool:()=>Ob,success:()=>bb,superRefine:()=>Tv,symbol:()=>sb,templateLiteral:()=>Rb,toJSONSchema:()=>fn,toLowerCase:()=>io,toUpperCase:()=>ao,transform:()=>rl,treeifyError:()=>em,trim:()=>oo,tuple:()=>iv,uint32:()=>nb,uint64:()=>ab,ulid:()=>My,undefined:()=>cb,union:()=>A,unknown:()=>F,uppercase:()=>Xn,url:()=>fo,util:()=>I,uuid:()=>Py,uuidv4:()=>Ey,uuidv6:()=>Ty,uuidv7:()=>jy,void:()=>lb,xid:()=>Uy,xor:()=>pb});var ir={};rr(ir,{$ZodAny:()=>Ep,$ZodArray:()=>Cp,$ZodAsyncError:()=>Jt,$ZodBase64:()=>yp,$ZodBase64URL:()=>bp,$ZodBigInt:()=>Bs,$ZodBigIntFormat:()=>xp,$ZodBoolean:()=>Ci,$ZodCIDRv4:()=>vp,$ZodCIDRv6:()=>_p,$ZodCUID:()=>ip,$ZodCUID2:()=>ap,$ZodCatch:()=>Qp,$ZodCheck:()=>ge,$ZodCheckBigIntFormat:()=>Cm,$ZodCheckEndsWith:()=>Km,$ZodCheckGreaterThan:()=>Zs,$ZodCheckIncludes:()=>Jm,$ZodCheckLengthEquals:()=>Lm,$ZodCheckLessThan:()=>Ls,$ZodCheckLowerCase:()=>Vm,$ZodCheckMaxLength:()=>Um,$ZodCheckMaxSize:()=>qm,$ZodCheckMimeType:()=>Bm,$ZodCheckMinLength:()=>Dm,$ZodCheckMinSize:()=>Am,$ZodCheckMultipleOf:()=>Om,$ZodCheckNumberFormat:()=>Nm,$ZodCheckOverwrite:()=>Wm,$ZodCheckProperty:()=>Gm,$ZodCheckRegex:()=>Zm,$ZodCheckSizeEquals:()=>Mm,$ZodCheckStartsWith:()=>Hm,$ZodCheckStringFormat:()=>Gn,$ZodCheckUpperCase:()=>Fm,$ZodCodec:()=>Ai,$ZodCustom:()=>cf,$ZodCustomStringFormat:()=>wp,$ZodDate:()=>Np,$ZodDefault:()=>Bp,$ZodDiscriminatedUnion:()=>Mp,$ZodE164:()=>$p,$ZodEmail:()=>tp,$ZodEmoji:()=>np,$ZodEncodeError:()=>sn,$ZodEnum:()=>Vp,$ZodError:()=>Pi,$ZodExactOptional:()=>Kp,$ZodFile:()=>Jp,$ZodFunction:()=>of,$ZodGUID:()=>Qm,$ZodIPv4:()=>fp,$ZodIPv6:()=>hp,$ZodISODate:()=>dp,$ZodISODateTime:()=>up,$ZodISODuration:()=>pp,$ZodISOTime:()=>mp,$ZodIntersection:()=>Up,$ZodJWT:()=>zp,$ZodKSUID:()=>lp,$ZodLazy:()=>sf,$ZodLiteral:()=>Fp,$ZodMAC:()=>gp,$ZodMap:()=>Lp,$ZodNaN:()=>ef,$ZodNanoID:()=>op,$ZodNever:()=>jp,$ZodNonOptional:()=>Yp,$ZodNull:()=>Pp,$ZodNullable:()=>Gp,$ZodNumber:()=>Gs,$ZodNumberFormat:()=>Rp,$ZodObject:()=>_y,$ZodObjectJIT:()=>qp,$ZodOptional:()=>Ys,$ZodPipe:()=>Xs,$ZodPrefault:()=>Wp,$ZodPreprocess:()=>tf,$ZodPromise:()=>af,$ZodReadonly:()=>rf,$ZodRealError:()=>rt,$ZodRecord:()=>Dp,$ZodRegistry:()=>ah,$ZodSet:()=>Zp,$ZodString:()=>un,$ZodStringFormat:()=>fe,$ZodSuccess:()=>Xp,$ZodSymbol:()=>kp,$ZodTemplateLiteral:()=>nf,$ZodTransform:()=>Hp,$ZodTuple:()=>Ws,$ZodType:()=>Q,$ZodULID:()=>sp,$ZodURL:()=>rp,$ZodUUID:()=>ep,$ZodUndefined:()=>Ip,$ZodUnion:()=>qi,$ZodUnknown:()=>Tp,$ZodVoid:()=>Op,$ZodXID:()=>cp,$ZodXor:()=>Ap,$brand:()=>Vd,$constructor:()=>_,$input:()=>ih,$output:()=>oh,Doc:()=>Vs,JSONSchema:()=>Ry,JSONSchemaGenerator:()=>Eg,NEVER:()=>$i,TimePrecision:()=>uh,_any:()=>Th,_array:()=>Mh,_base64:()=>gc,_base64url:()=>vc,_bigint:()=>wh,_boolean:()=>$h,_catch:()=>QI,_check:()=>wy,_cidrv4:()=>fc,_cidrv6:()=>hc,_coercedBigint:()=>Rh,_coercedBoolean:()=>zh,_coercedDate:()=>qh,_coercedNumber:()=>gh,_coercedString:()=>ch,_cuid:()=>sc,_cuid2:()=>cc,_custom:()=>Dh,_date:()=>Ch,_decode:()=>Os,_decodeAsync:()=>Cs,_default:()=>WI,_discriminatedUnion:()=>MI,_e164:()=>_c,_email:()=>ec,_emoji:()=>ic,_encode:()=>js,_encodeAsync:()=>Ns,_endsWith:()=>to,_enum:()=>FI,_file:()=>Uh,_float32:()=>_h,_float64:()=>Sh,_gt:()=>Kt,_gte:()=>Ke,_guid:()=>Vi,_includes:()=>Qn,_int:()=>vh,_int32:()=>yh,_int64:()=>xh,_intersection:()=>UI,_ipv4:()=>mc,_ipv6:()=>pc,_isoDate:()=>mh,_isoDateTime:()=>dh,_isoDuration:()=>fh,_isoTime:()=>ph,_jwt:()=>Sc,_ksuid:()=>dc,_lazy:()=>nP,_length:()=>pn,_literal:()=>HI,_lowercase:()=>Yn,_lt:()=>Ht,_lte:()=>ft,_mac:()=>lh,_map:()=>ZI,_max:()=>ft,_maxLength:()=>mn,_maxSize:()=>xr,_mime:()=>ro,_min:()=>Ke,_minLength:()=>or,_minSize:()=>Gt,_multipleOf:()=>Rr,_nan:()=>Ah,_nanoid:()=>ac,_nativeEnum:()=>JI,_negative:()=>bc,_never:()=>Oh,_nonnegative:()=>zc,_nonoptional:()=>YI,_nonpositive:()=>$c,_normalize:()=>no,_null:()=>Eh,_nullable:()=>BI,_number:()=>hh,_optional:()=>GI,_overwrite:()=>Pt,_parse:()=>Fn,_parseAsync:()=>Jn,_pipe:()=>eP,_positive:()=>yc,_promise:()=>oP,_property:()=>wc,_readonly:()=>tP,_record:()=>LI,_refine:()=>Lh,_regex:()=>Wn,_safeDecode:()=>As,_safeDecodeAsync:()=>Us,_safeEncode:()=>qs,_safeEncodeAsync:()=>Ms,_safeParse:()=>Hn,_safeParseAsync:()=>Kn,_set:()=>VI,_size:()=>dn,_slugify:()=>so,_startsWith:()=>eo,_string:()=>sh,_stringFormat:()=>co,_stringbool:()=>Jh,_success:()=>XI,_superRefine:()=>Zh,_symbol:()=>Ih,_templateLiteral:()=>rP,_toLowerCase:()=>io,_toUpperCase:()=>ao,_transform:()=>KI,_trim:()=>oo,_tuple:()=>DI,_uint32:()=>bh,_uint64:()=>kh,_ulid:()=>lc,_undefined:()=>Ph,_union:()=>qI,_unknown:()=>jh,_uppercase:()=>Xn,_url:()=>Fi,_uuid:()=>tc,_uuidv4:()=>rc,_uuidv6:()=>nc,_uuidv7:()=>oc,_void:()=>Nh,_xid:()=>uc,_xor:()=>AI,clone:()=>Je,config:()=>be,createStandardJSONSchemaMethod:()=>lo,createToJSONSchemaMethod:()=>Hh,decode:()=>o0,decodeAsync:()=>a0,describe:()=>Vh,encode:()=>n0,encodeAsync:()=>i0,extractDefs:()=>Ir,finalize:()=>Pr,flattenError:()=>Ei,formatError:()=>Ti,globalConfig:()=>an,globalRegistry:()=>Te,initializeContext:()=>kr,isValidBase64:()=>Sp,isValidBase64URL:()=>fy,isValidJWT:()=>hy,locales:()=>Zi,meta:()=>Fh,parse:()=>Es,parseAsync:()=>Ts,prettifyError:()=>tm,process:()=>pe,regexes:()=>pt,registry:()=>Qs,safeDecode:()=>c0,safeDecodeAsync:()=>u0,safeEncode:()=>s0,safeEncodeAsync:()=>l0,safeParse:()=>rm,safeParseAsync:()=>nm,toDotPath:()=>KS,toJSONSchema:()=>fn,treeifyError:()=>em,util:()=>I,version:()=>Ym});var LS,$i=Object.freeze({status:"aborted"});function _(e,t,n){function o(s,c){if(!s._zod)Object.defineProperty(s,"_zod",{value:{def:c,constr:a,traits:new Set},enumerable:!1});if(s._zod.traits.has(e))return;s._zod.traits.add(e),t(s,c);let l=a.prototype,d=Object.keys(l);for(let m=0;m<d.length;m++){let p=d[m];if(!(p in s))s[p]=l[p].bind(s)}}let r=n?.Parent??Object;class i extends r{}Object.defineProperty(i,"name",{value:e});function a(s){var c;let l=n?.Parent?new i:this;o(l,s),(c=l._zod).deferred??(c.deferred=[]);for(let d of l._zod.deferred)d();return l}return Object.defineProperty(a,"init",{value:o}),Object.defineProperty(a,Symbol.hasInstance,{value:(s)=>{if(n?.Parent&&s instanceof n.Parent)return!0;return s?._zod?.traits?.has(e)}}),Object.defineProperty(a,"name",{value:e}),a}var Vd=Symbol("zod_brand");class Jt extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class sn extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`);this.name="ZodEncodeError"}}(LS=globalThis).__zod_globalConfig??(LS.__zod_globalConfig={});var an=globalThis.__zod_globalConfig;function be(e){if(e)Object.assign(an,e);return an}var I={};rr(I,{BIGINT_FORMAT_RANGES:()=>Xd,Class:()=>JS,NUMBER_FORMAT_RANGES:()=>Yd,aborted:()=>wr,allowsEval:()=>Kd,assert:()=>Ck,assertEqual:()=>Tk,assertIs:()=>Ok,assertNever:()=>Nk,assertNotEqual:()=>jk,assignProp:()=>$r,base64ToUint8Array:()=>VS,base64urlToUint8Array:()=>Xk,cached:()=>Zn,captureStackTrace:()=>Ps,cleanEnum:()=>Yk,cleanRegex:()=>Ri,clone:()=>Je,cloneDef:()=>Ak,createTransparentProxy:()=>Vk,defineLazy:()=>se,esc:()=>Is,escapeRegex:()=>$t,explicitlyAborted:()=>Qd,extend:()=>Hk,finalizeIssue:()=>He,floatSafeRemainder:()=>Jd,getElementAtPath:()=>Mk,getEnumValues:()=>wi,getLengthableOrigin:()=>Ii,getParsedType:()=>Zk,getSizableOrigin:()=>ki,hexToUint8Array:()=>e0,isObject:()=>cn,isPlainObject:()=>zr,issue:()=>Vn,joinValues:()=>z,jsonStringifyReplacer:()=>Ln,merge:()=>Gk,mergeDefs:()=>nr,normalizeParams:()=>P,nullish:()=>br,numKeys:()=>Lk,objectClone:()=>qk,omit:()=>Jk,optionalKeys:()=>Wd,parsedType:()=>k,partial:()=>Bk,pick:()=>Fk,prefixIssues:()=>tt,primitiveTypes:()=>Bd,promiseAllObject:()=>Uk,propertyKeyTypes:()=>xi,randomString:()=>Dk,required:()=>Wk,safeExtend:()=>Kk,shallowClone:()=>Gd,slugify:()=>Hd,stringifyPrimitive:()=>x,uint8ArrayToBase64:()=>FS,uint8ArrayToBase64url:()=>Qk,uint8ArrayToHex:()=>t0,unwrapMessage:()=>zi});function Tk(e){return e}function jk(e){return e}function Ok(e){}function Nk(e){throw Error("Unexpected value in exhaustive check")}function Ck(e){}function wi(e){let t=Object.values(e).filter((o)=>typeof o==="number");return Object.entries(e).filter(([o,r])=>t.indexOf(+o)===-1).map(([o,r])=>r)}function z(e,t="|"){return e.map((n)=>x(n)).join(t)}function Ln(e,t){if(typeof t==="bigint")return t.toString();return t}function Zn(e){return{get value(){{let n=e();return Object.defineProperty(this,"value",{value:n}),n}throw Error("cached value already set")}}}function br(e){return e===null||e===void 0}function Ri(e){let t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function Jd(e,t){let n=e/t,o=Math.round(n),r=Number.EPSILON*Math.max(Math.abs(n),1);if(Math.abs(n-o)<r)return 0;return n-o}var ZS=Symbol("evaluating");function se(e,t,n){let o=void 0;Object.defineProperty(e,t,{get(){if(o===ZS)return;if(o===void 0)o=ZS,o=n();return o},set(r){Object.defineProperty(e,t,{value:r})},configurable:!0})}function qk(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function $r(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function nr(...e){let t={};for(let n of e){let o=Object.getOwnPropertyDescriptors(n);Object.assign(t,o)}return Object.defineProperties({},t)}function Ak(e){return nr(e._zod.def)}function Mk(e,t){if(!t)return e;return t.reduce((n,o)=>n?.[o],e)}function Uk(e){let t=Object.keys(e),n=t.map((o)=>e[o]);return Promise.all(n).then((o)=>{let r={};for(let i=0;i<t.length;i++)r[t[i]]=o[i];return r})}function Dk(e=10){let n="";for(let o=0;o<e;o++)n+="abcdefghijklmnopqrstuvwxyz"[Math.floor(Math.random()*26)];return n}function Is(e){return JSON.stringify(e)}function Hd(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}var Ps="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function cn(e){return typeof e==="object"&&e!==null&&!Array.isArray(e)}var Kd=Zn(()=>{if(an.jitless)return!1;if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return new Function(""),!0}catch(e){return!1}});function zr(e){if(cn(e)===!1)return!1;let t=e.constructor;if(t===void 0)return!0;if(typeof t!=="function")return!0;let n=t.prototype;if(cn(n)===!1)return!1;if(Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)return!1;return!0}function Gd(e){if(zr(e))return{...e};if(Array.isArray(e))return[...e];if(e instanceof Map)return new Map(e);if(e instanceof Set)return new Set(e);return e}function Lk(e){let t=0;for(let n in e)if(Object.prototype.hasOwnProperty.call(e,n))t++;return t}var Zk=(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":if(Array.isArray(e))return"array";if(e===null)return"null";if(e.then&&typeof e.then==="function"&&e.catch&&typeof e.catch==="function")return"promise";if(typeof Map<"u"&&e instanceof Map)return"map";if(typeof Set<"u"&&e instanceof Set)return"set";if(typeof Date<"u"&&e instanceof Date)return"date";if(typeof File<"u"&&e instanceof File)return"file";return"object";default:throw Error(`Unknown data type: ${t}`)}},xi=new Set(["string","number","symbol"]),Bd=new Set(["string","number","bigint","boolean","symbol","undefined"]);function $t(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Je(e,t,n){let o=new e._zod.constr(t??e._zod.def);if(!t||n?.parent)o._zod.parent=e;return o}function P(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 Error("Cannot specify both `message` and `error` params");t.error=t.message}if(delete t.message,typeof t.error==="string")return{...t,error:()=>t.error};return t}function Vk(e){let t;return new Proxy({},{get(n,o,r){return t??(t=e()),Reflect.get(t,o,r)},set(n,o,r,i){return t??(t=e()),Reflect.set(t,o,r,i)},has(n,o){return t??(t=e()),Reflect.has(t,o)},deleteProperty(n,o){return t??(t=e()),Reflect.deleteProperty(t,o)},ownKeys(n){return t??(t=e()),Reflect.ownKeys(t)},getOwnPropertyDescriptor(n,o){return t??(t=e()),Reflect.getOwnPropertyDescriptor(t,o)},defineProperty(n,o,r){return t??(t=e()),Reflect.defineProperty(t,o,r)}})}function x(e){if(typeof e==="bigint")return e.toString()+"n";if(typeof e==="string")return`"${e}"`;return`${e}`}function Wd(e){return Object.keys(e).filter((t)=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}var Yd={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-340282346638528860000000000000000000000,340282346638528860000000000000000000000],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},Xd={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function Fk(e,t){let n=e._zod.def,o=n.checks;if(o&&o.length>0)throw Error(".pick() cannot be used on object schemas containing refinements");let i=nr(e._zod.def,{get shape(){let a={};for(let s in t){if(!(s in n.shape))throw Error(`Unrecognized key: "${s}"`);if(!t[s])continue;a[s]=n.shape[s]}return $r(this,"shape",a),a},checks:[]});return Je(e,i)}function Jk(e,t){let n=e._zod.def,o=n.checks;if(o&&o.length>0)throw Error(".omit() cannot be used on object schemas containing refinements");let i=nr(e._zod.def,{get shape(){let a={...e._zod.def.shape};for(let s in t){if(!(s in n.shape))throw Error(`Unrecognized key: "${s}"`);if(!t[s])continue;delete a[s]}return $r(this,"shape",a),a},checks:[]});return Je(e,i)}function Hk(e,t){if(!zr(t))throw Error("Invalid input to extend: expected a plain object");let n=e._zod.def.checks;if(n&&n.length>0){let i=e._zod.def.shape;for(let a in t)if(Object.getOwnPropertyDescriptor(i,a)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let r=nr(e._zod.def,{get shape(){let i={...e._zod.def.shape,...t};return $r(this,"shape",i),i}});return Je(e,r)}function Kk(e,t){if(!zr(t))throw Error("Invalid input to safeExtend: expected a plain object");let n=nr(e._zod.def,{get shape(){let o={...e._zod.def.shape,...t};return $r(this,"shape",o),o}});return Je(e,n)}function Gk(e,t){if(e._zod.def.checks?.length)throw Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");let n=nr(e._zod.def,{get shape(){let o={...e._zod.def.shape,...t._zod.def.shape};return $r(this,"shape",o),o},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]});return Je(e,n)}function Bk(e,t,n){let r=t._zod.def.checks;if(r&&r.length>0)throw Error(".partial() cannot be used on object schemas containing refinements");let a=nr(t._zod.def,{get shape(){let s=t._zod.def.shape,c={...s};if(n)for(let l in n){if(!(l in s))throw Error(`Unrecognized key: "${l}"`);if(!n[l])continue;c[l]=e?new e({type:"optional",innerType:s[l]}):s[l]}else for(let l in s)c[l]=e?new e({type:"optional",innerType:s[l]}):s[l];return $r(this,"shape",c),c},checks:[]});return Je(t,a)}function Wk(e,t,n){let o=nr(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let a in n){if(!(a in i))throw Error(`Unrecognized key: "${a}"`);if(!n[a])continue;i[a]=new e({type:"nonoptional",innerType:r[a]})}else for(let a in r)i[a]=new e({type:"nonoptional",innerType:r[a]});return $r(this,"shape",i),i}});return Je(t,o)}function wr(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function Qd(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue===!1)return!0;return!1}function tt(e,t){return t.map((n)=>{var o;return(o=n).path??(o.path=[]),n.path.unshift(e),n})}function zi(e){return typeof e==="string"?e:e?.message}function He(e,t,n){let o=e.message?e.message:zi(e.inst?._zod.def?.error?.(e))??zi(t?.error?.(e))??zi(n.customError?.(e))??zi(n.localeError?.(e))??"Invalid input",{inst:r,continue:i,input:a,...s}=e;if(s.path??(s.path=[]),s.message=o,t?.reportInput)s.input=a;return s}function ki(e){if(e instanceof Set)return"set";if(e instanceof Map)return"map";if(e instanceof File)return"file";return"unknown"}function Ii(e){if(Array.isArray(e))return"array";if(typeof e==="string")return"string";return"unknown"}function k(e){let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"nan":"number";case"object":{if(e===null)return"null";if(Array.isArray(e))return"array";let n=e;if(n&&Object.getPrototypeOf(n)!==Object.prototype&&"constructor"in n&&n.constructor)return n.constructor.name}}return t}function Vn(...e){let[t,n,o]=e;if(typeof t==="string")return{message:t,code:"custom",input:n,inst:o};return{...t}}function Yk(e){return Object.entries(e).filter(([t,n])=>Number.isNaN(Number.parseInt(t,10))).map((t)=>t[1])}function VS(e){let t=atob(e),n=new Uint8Array(t.length);for(let o=0;o<t.length;o++)n[o]=t.charCodeAt(o);return n}function FS(e){let t="";for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return btoa(t)}function Xk(e){let t=e.replace(/-/g,"+").replace(/_/g,"/"),n="=".repeat((4-t.length%4)%4);return VS(t+n)}function Qk(e){return FS(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function e0(e){let t=e.replace(/^0x/,"");if(t.length%2!==0)throw Error("Invalid hex string length");let n=new Uint8Array(t.length/2);for(let o=0;o<t.length;o+=2)n[o/2]=Number.parseInt(t.slice(o,o+2),16);return n}function t0(e){return Array.from(e).map((t)=>t.toString(16).padStart(2,"0")).join("")}class JS{constructor(...e){}}var HS=(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,Ln,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Pi=_("$ZodError",HS),rt=_("$ZodError",HS,{Parent:Error});function Ei(e,t=(n)=>n.message){let n={},o=[];for(let r of e.issues)if(r.path.length>0)n[r.path[0]]=n[r.path[0]]||[],n[r.path[0]].push(t(r));else o.push(t(r));return{formErrors:o,fieldErrors:n}}function Ti(e,t=(n)=>n.message){let n={_errors:[]},o=(r,i=[])=>{for(let a of r.issues)if(a.code==="invalid_union"&&a.errors.length)a.errors.map((s)=>o({issues:s},[...i,...a.path]));else if(a.code==="invalid_key")o({issues:a.issues},[...i,...a.path]);else if(a.code==="invalid_element")o({issues:a.issues},[...i,...a.path]);else{let s=[...i,...a.path];if(s.length===0)n._errors.push(t(a));else{let c=n,l=0;while(l<s.length){let d=s[l];if(l!==s.length-1)c[d]=c[d]||{_errors:[]};else c[d]=c[d]||{_errors:[]},c[d]._errors.push(t(a));c=c[d],l++}}}};return o(e),n}function em(e,t=(n)=>n.message){let n={errors:[]},o=(r,i=[])=>{var a,s;for(let c of r.issues)if(c.code==="invalid_union"&&c.errors.length)c.errors.map((l)=>o({issues:l},[...i,...c.path]));else if(c.code==="invalid_key")o({issues:c.issues},[...i,...c.path]);else if(c.code==="invalid_element")o({issues:c.issues},[...i,...c.path]);else{let l=[...i,...c.path];if(l.length===0){n.errors.push(t(c));continue}let d=n,m=0;while(m<l.length){let p=l[m],f=m===l.length-1;if(typeof p==="string")d.properties??(d.properties={}),(a=d.properties)[p]??(a[p]={errors:[]}),d=d.properties[p];else d.items??(d.items=[]),(s=d.items)[p]??(s[p]={errors:[]}),d=d.items[p];if(f)d.errors.push(t(c));m++}}};return o(e),n}function KS(e){let t=[],n=e.map((o)=>typeof o==="object"?o.key:o);for(let o of n)if(typeof o==="number")t.push(`[${o}]`);else if(typeof o==="symbol")t.push(`[${JSON.stringify(String(o))}]`);else if(/[^\w$]/.test(o))t.push(`[${JSON.stringify(o)}]`);else{if(t.length)t.push(".");t.push(o)}return t.join("")}function tm(e){let t=[],n=[...e.issues].sort((o,r)=>(o.path??[]).length-(r.path??[]).length);for(let o of n)if(t.push(`✖ ${o.message}`),o.path?.length)t.push(` → at ${KS(o.path)}`);return t.join(`
|
|
10
|
-
`)}var Fn=(e)=>(t,n,o,r)=>{let i=o?{...o,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new Jt;if(a.issues.length){let s=new(r?.Err??e)(a.issues.map((c)=>He(c,i,be())));throw Ps(s,r?.callee),s}return a.value},Es=Fn(rt),Jn=(e)=>async(t,n,o,r)=>{let i=o?{...o,async:!0}:{async:!0},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)a=await a;if(a.issues.length){let s=new(r?.Err??e)(a.issues.map((c)=>He(c,i,be())));throw Ps(s,r?.callee),s}return a.value},Ts=Jn(rt),Hn=(e)=>(t,n,o)=>{let r=o?{...o,async:!1}:{async:!1},i=t._zod.run({value:n,issues:[]},r);if(i instanceof Promise)throw new Jt;return i.issues.length?{success:!1,error:new(e??Pi)(i.issues.map((a)=>He(a,r,be())))}:{success:!0,data:i.value}},rm=Hn(rt),Kn=(e)=>async(t,n,o)=>{let r=o?{...o,async:!0}:{async:!0},i=t._zod.run({value:n,issues:[]},r);if(i instanceof Promise)i=await i;return i.issues.length?{success:!1,error:new e(i.issues.map((a)=>He(a,r,be())))}:{success:!0,data:i.value}},nm=Kn(rt),js=(e)=>(t,n,o)=>{let r=o?{...o,direction:"backward"}:{direction:"backward"};return Fn(e)(t,n,r)},n0=js(rt),Os=(e)=>(t,n,o)=>Fn(e)(t,n,o),o0=Os(rt),Ns=(e)=>async(t,n,o)=>{let r=o?{...o,direction:"backward"}:{direction:"backward"};return Jn(e)(t,n,r)},i0=Ns(rt),Cs=(e)=>async(t,n,o)=>Jn(e)(t,n,o),a0=Cs(rt),qs=(e)=>(t,n,o)=>{let r=o?{...o,direction:"backward"}:{direction:"backward"};return Hn(e)(t,n,r)},s0=qs(rt),As=(e)=>(t,n,o)=>Hn(e)(t,n,o),c0=As(rt),Ms=(e)=>async(t,n,o)=>{let r=o?{...o,direction:"backward"}:{direction:"backward"};return Kn(e)(t,n,r)},l0=Ms(rt),Us=(e)=>async(t,n,o)=>Kn(e)(t,n,o),u0=Us(rt);var pt={};rr(pt,{base64:()=>Sm,base64url:()=>Ds,bigint:()=>xm,boolean:()=>Im,browserEmail:()=>_0,cidrv4:()=>vm,cidrv6:()=>_m,cuid:()=>om,cuid2:()=>im,date:()=>$m,datetime:()=>wm,domain:()=>b0,duration:()=>um,e164:()=>bm,email:()=>mm,emoji:()=>pm,extendedDuration:()=>d0,guid:()=>dm,hex:()=>$0,hostname:()=>y0,html5Email:()=>h0,httpProtocol:()=>ym,idnEmail:()=>v0,integer:()=>km,ipv4:()=>fm,ipv6:()=>hm,ksuid:()=>cm,lowercase:()=>Tm,mac:()=>gm,md5_base64:()=>w0,md5_base64url:()=>R0,md5_hex:()=>z0,nanoid:()=>lm,null:()=>Pm,number:()=>ji,rfc5322Email:()=>g0,sha1_base64:()=>k0,sha1_base64url:()=>I0,sha1_hex:()=>x0,sha256_base64:()=>E0,sha256_base64url:()=>T0,sha256_hex:()=>P0,sha384_base64:()=>O0,sha384_base64url:()=>N0,sha384_hex:()=>j0,sha512_base64:()=>q0,sha512_base64url:()=>A0,sha512_hex:()=>C0,string:()=>Rm,time:()=>zm,ulid:()=>am,undefined:()=>Em,unicodeEmail:()=>GS,uppercase:()=>jm,uuid:()=>ln,uuid4:()=>m0,uuid6:()=>p0,uuid7:()=>f0,xid:()=>sm});var om=/^[cC][0-9a-z]{6,}$/,im=/^[0-9a-z]+$/,am=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,sm=/^[0-9a-vA-V]{20}$/,cm=/^[A-Za-z0-9]{27}$/,lm=/^[a-zA-Z0-9_-]{21}$/,um=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,d0=/^[-+]?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)?)??$/,dm=/^([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})$/,ln=(e)=>{if(!e)return/^([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)$/;return 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})$`)},m0=ln(4),p0=ln(6),f0=ln(7),mm=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,h0=/^[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])?)*$/,g0=/^(([^<>()\[\]\\.,;:\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,}))$/,GS=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,v0=GS,_0=/^[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])?)*$/,S0="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function pm(){return new RegExp(S0,"u")}var fm=/^(?:(?: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])$/,hm=/^(([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}|:))$/,gm=(e)=>{let t=$t(e??":");return new RegExp(`^(?:[0-9A-F]{2}${t}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${t}){5}[0-9a-f]{2}$`)},vm=/^((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])$/,_m=/^(([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])$/,Sm=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Ds=/^[A-Za-z0-9_-]*$/,y0=/^(?=.{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])?)*\.?$/,b0=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,ym=/^https?$/,bm=/^\+[1-9]\d{6,14}$/,BS="(?:(?:\\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])))",$m=new RegExp(`^${BS}$`);function WS(e){return typeof e.precision==="number"?e.precision===-1?"(?:[01]\\d|2[0-3]):[0-5]\\d":e.precision===0?"(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d":`(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d\\.\\d{${e.precision}}`:"(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?"}function zm(e){return new RegExp(`^${WS(e)}$`)}function wm(e){let t=WS({precision:e.precision}),n=["Z"];if(e.local)n.push("");if(e.offset)n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let o=`${t}(?:${n.join("|")})`;return new RegExp(`^${BS}T(?:${o})$`)}var Rm=(e)=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},xm=/^-?\d+n?$/,km=/^-?\d+$/,ji=/^-?\d+(?:\.\d+)?$/,Im=/^(?:true|false)$/i,Pm=/^null$/i;var Em=/^undefined$/i;var Tm=/^[^A-Z]*$/,jm=/^[^a-z]*$/,$0=/^[0-9a-fA-F]*$/;function Oi(e,t){return new RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}function Ni(e){return new RegExp(`^[A-Za-z0-9_-]{${e}}$`)}var z0=/^[0-9a-fA-F]{32}$/,w0=Oi(22,"=="),R0=Ni(22),x0=/^[0-9a-fA-F]{40}$/,k0=Oi(27,"="),I0=Ni(27),P0=/^[0-9a-fA-F]{64}$/,E0=Oi(43,"="),T0=Ni(43),j0=/^[0-9a-fA-F]{96}$/,O0=Oi(64,""),N0=Ni(64),C0=/^[0-9a-fA-F]{128}$/,q0=Oi(86,"=="),A0=Ni(86);var ge=_("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),XS={number:"number",bigint:"bigint",object:"date"},Ls=_("$ZodCheckLessThan",(e,t)=>{ge.init(e,t);let n=XS[typeof t.value];e._zod.onattach.push((o)=>{let r=o._zod.bag,i=(t.inclusive?r.maximum:r.exclusiveMaximum)??Number.POSITIVE_INFINITY;if(t.value<i)if(t.inclusive)r.maximum=t.value;else r.exclusiveMaximum=t.value}),e._zod.check=(o)=>{if(t.inclusive?o.value<=t.value:o.value<t.value)return;o.issues.push({origin:n,code:"too_big",maximum:typeof t.value==="object"?t.value.getTime():t.value,input:o.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Zs=_("$ZodCheckGreaterThan",(e,t)=>{ge.init(e,t);let n=XS[typeof t.value];e._zod.onattach.push((o)=>{let r=o._zod.bag,i=(t.inclusive?r.minimum:r.exclusiveMinimum)??Number.NEGATIVE_INFINITY;if(t.value>i)if(t.inclusive)r.minimum=t.value;else r.exclusiveMinimum=t.value}),e._zod.check=(o)=>{if(t.inclusive?o.value>=t.value:o.value>t.value)return;o.issues.push({origin:n,code:"too_small",minimum:typeof t.value==="object"?t.value.getTime():t.value,input:o.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Om=_("$ZodCheckMultipleOf",(e,t)=>{ge.init(e,t),e._zod.onattach.push((n)=>{var o;(o=n._zod.bag).multipleOf??(o.multipleOf=t.value)}),e._zod.check=(n)=>{if(typeof n.value!==typeof t.value)throw Error("Cannot mix number and bigint in multiple_of check.");if(typeof n.value==="bigint"?n.value%t.value===BigInt(0):Jd(n.value,t.value)===0)return;n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),Nm=_("$ZodCheckNumberFormat",(e,t)=>{ge.init(e,t),t.format=t.format||"float64";let n=t.format?.includes("int"),o=n?"int":"number",[r,i]=Yd[t.format];e._zod.onattach.push((a)=>{let s=a._zod.bag;if(s.format=t.format,s.minimum=r,s.maximum=i,n)s.pattern=km}),e._zod.check=(a)=>{let s=a.value;if(n){if(!Number.isInteger(s)){a.issues.push({expected:o,format:t.format,code:"invalid_type",continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){if(s>0)a.issues.push({input:s,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:o,inclusive:!0,continue:!t.abort});else a.issues.push({input:s,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:o,inclusive:!0,continue:!t.abort});return}}if(s<r)a.issues.push({origin:"number",input:s,code:"too_small",minimum:r,inclusive:!0,inst:e,continue:!t.abort});if(s>i)a.issues.push({origin:"number",input:s,code:"too_big",maximum:i,inclusive:!0,inst:e,continue:!t.abort})}}),Cm=_("$ZodCheckBigIntFormat",(e,t)=>{ge.init(e,t);let[n,o]=Xd[t.format];e._zod.onattach.push((r)=>{let i=r._zod.bag;i.format=t.format,i.minimum=n,i.maximum=o}),e._zod.check=(r)=>{let i=r.value;if(i<n)r.issues.push({origin:"bigint",input:i,code:"too_small",minimum:n,inclusive:!0,inst:e,continue:!t.abort});if(i>o)r.issues.push({origin:"bigint",input:i,code:"too_big",maximum:o,inclusive:!0,inst:e,continue:!t.abort})}}),qm=_("$ZodCheckMaxSize",(e,t)=>{var n;ge.init(e,t),(n=e._zod.def).when??(n.when=(o)=>{let r=o.value;return!br(r)&&r.size!==void 0}),e._zod.onattach.push((o)=>{let r=o._zod.bag.maximum??Number.POSITIVE_INFINITY;if(t.maximum<r)o._zod.bag.maximum=t.maximum}),e._zod.check=(o)=>{let r=o.value;if(r.size<=t.maximum)return;o.issues.push({origin:ki(r),code:"too_big",maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Am=_("$ZodCheckMinSize",(e,t)=>{var n;ge.init(e,t),(n=e._zod.def).when??(n.when=(o)=>{let r=o.value;return!br(r)&&r.size!==void 0}),e._zod.onattach.push((o)=>{let r=o._zod.bag.minimum??Number.NEGATIVE_INFINITY;if(t.minimum>r)o._zod.bag.minimum=t.minimum}),e._zod.check=(o)=>{let r=o.value;if(r.size>=t.minimum)return;o.issues.push({origin:ki(r),code:"too_small",minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Mm=_("$ZodCheckSizeEquals",(e,t)=>{var n;ge.init(e,t),(n=e._zod.def).when??(n.when=(o)=>{let r=o.value;return!br(r)&&r.size!==void 0}),e._zod.onattach.push((o)=>{let r=o._zod.bag;r.minimum=t.size,r.maximum=t.size,r.size=t.size}),e._zod.check=(o)=>{let r=o.value,i=r.size;if(i===t.size)return;let a=i>t.size;o.issues.push({origin:ki(r),...a?{code:"too_big",maximum:t.size}:{code:"too_small",minimum:t.size},inclusive:!0,exact:!0,input:o.value,inst:e,continue:!t.abort})}}),Um=_("$ZodCheckMaxLength",(e,t)=>{var n;ge.init(e,t),(n=e._zod.def).when??(n.when=(o)=>{let r=o.value;return!br(r)&&r.length!==void 0}),e._zod.onattach.push((o)=>{let r=o._zod.bag.maximum??Number.POSITIVE_INFINITY;if(t.maximum<r)o._zod.bag.maximum=t.maximum}),e._zod.check=(o)=>{let r=o.value;if(r.length<=t.maximum)return;let a=Ii(r);o.issues.push({origin:a,code:"too_big",maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Dm=_("$ZodCheckMinLength",(e,t)=>{var n;ge.init(e,t),(n=e._zod.def).when??(n.when=(o)=>{let r=o.value;return!br(r)&&r.length!==void 0}),e._zod.onattach.push((o)=>{let r=o._zod.bag.minimum??Number.NEGATIVE_INFINITY;if(t.minimum>r)o._zod.bag.minimum=t.minimum}),e._zod.check=(o)=>{let r=o.value;if(r.length>=t.minimum)return;let a=Ii(r);o.issues.push({origin:a,code:"too_small",minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Lm=_("$ZodCheckLengthEquals",(e,t)=>{var n;ge.init(e,t),(n=e._zod.def).when??(n.when=(o)=>{let r=o.value;return!br(r)&&r.length!==void 0}),e._zod.onattach.push((o)=>{let r=o._zod.bag;r.minimum=t.length,r.maximum=t.length,r.length=t.length}),e._zod.check=(o)=>{let r=o.value,i=r.length;if(i===t.length)return;let a=Ii(r),s=i>t.length;o.issues.push({origin:a,...s?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:o.value,inst:e,continue:!t.abort})}}),Gn=_("$ZodCheckStringFormat",(e,t)=>{var n,o;if(ge.init(e,t),e._zod.onattach.push((r)=>{let i=r._zod.bag;if(i.format=t.format,t.pattern)i.patterns??(i.patterns=new Set),i.patterns.add(t.pattern)}),t.pattern)(n=e._zod).check??(n.check=(r)=>{if(t.pattern.lastIndex=0,t.pattern.test(r.value))return;r.issues.push({origin:"string",code:"invalid_format",format:t.format,input:r.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})});else(o=e._zod).check??(o.check=()=>{})}),Zm=_("$ZodCheckRegex",(e,t)=>{Gn.init(e,t),e._zod.check=(n)=>{if(t.pattern.lastIndex=0,t.pattern.test(n.value))return;n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),Vm=_("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=Tm),Gn.init(e,t)}),Fm=_("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=jm),Gn.init(e,t)}),Jm=_("$ZodCheckIncludes",(e,t)=>{ge.init(e,t);let n=$t(t.includes),o=new RegExp(typeof t.position==="number"?`^.{${t.position}}${n}`:n);t.pattern=o,e._zod.onattach.push((r)=>{let i=r._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(o)}),e._zod.check=(r)=>{if(r.value.includes(t.includes,t.position))return;r.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:r.value,inst:e,continue:!t.abort})}}),Hm=_("$ZodCheckStartsWith",(e,t)=>{ge.init(e,t);let n=new RegExp(`^${$t(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push((o)=>{let r=o._zod.bag;r.patterns??(r.patterns=new Set),r.patterns.add(n)}),e._zod.check=(o)=>{if(o.value.startsWith(t.prefix))return;o.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:o.value,inst:e,continue:!t.abort})}}),Km=_("$ZodCheckEndsWith",(e,t)=>{ge.init(e,t);let n=new RegExp(`.*${$t(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push((o)=>{let r=o._zod.bag;r.patterns??(r.patterns=new Set),r.patterns.add(n)}),e._zod.check=(o)=>{if(o.value.endsWith(t.suffix))return;o.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:o.value,inst:e,continue:!t.abort})}});function YS(e,t,n){if(e.issues.length)t.issues.push(...tt(n,e.issues))}var Gm=_("$ZodCheckProperty",(e,t)=>{ge.init(e,t),e._zod.check=(n)=>{let o=t.schema._zod.run({value:n.value[t.property],issues:[]},{});if(o instanceof Promise)return o.then((r)=>YS(r,n,t.property));YS(o,n,t.property);return}}),Bm=_("$ZodCheckMimeType",(e,t)=>{ge.init(e,t);let n=new Set(t.mime);e._zod.onattach.push((o)=>{o._zod.bag.mime=t.mime}),e._zod.check=(o)=>{if(n.has(o.value.type))return;o.issues.push({code:"invalid_value",values:t.mime,input:o.value.type,inst:e,continue:!t.abort})}}),Wm=_("$ZodCheckOverwrite",(e,t)=>{ge.init(e,t),e._zod.check=(n)=>{n.value=t.tx(n.value)}});class Vs{constructor(e=[]){if(this.content=[],this.indent=0,this)this.args=e}indented(e){this.indent+=1,e(this),this.indent-=1}write(e){if(typeof e==="function"){e(this,{execution:"sync"}),e(this,{execution:"async"});return}let n=e.split(`
|
|
9
|
+
deps: ${n}}`};var eA={keyword:"dependencies",type:"object",schemaType:"object",error:wx.error,code(e){let[t,n]=tA(e);$x(e,t),zx(e,n)}};function tA({schema:e}){let t={},n={};for(let o in e){if(o==="__proto__")continue;let r=Array.isArray(e[o])?t:n;r[o]=e[o]}return[t,n]}function $x(e,t=e.schema){let{gen:n,data:o,it:r}=e;if(Object.keys(t).length===0)return;let i=n.let("missing");for(let a in t){let s=t[a];if(s.length===0)continue;let c=cs.propertyInData(n,o,a,r.opts.ownProperties);if(e.setParams({property:a,depsCount:s.length,deps:s.join(", ")}),r.allErrors)n.if(c,()=>{for(let l of s)cs.checkReportMissingProp(e,l)});else n.if(PS._`${c} && (${cs.checkMissingProp(e,s,i)})`),cs.reportMissingProp(e,i),n.else()}}wx.validatePropertyDeps=$x;function zx(e,t=e.schema){let{gen:n,data:o,keyword:r,it:i}=e,a=n.name("valid");for(let s in t){if(Qq.alwaysValidSchema(i,t[s]))continue;n.if(cs.propertyInData(n,o,s,i.opts.ownProperties),()=>{let c=e.subschema({keyword:r,schemaProp:s},a);e.mergeValidEvaluated(c,a)},()=>n.var(a,!0)),e.ok(a)}}wx.validateSchemaDeps=zx;wx.default=eA});var Ex=U(function(Px){Object.defineProperty(Px,"__esModule",{value:!0});var Ix=ce(),oA=de(),iA={message:"property name must be valid",params:({params:e})=>Ix._`{propertyName: ${e.propertyName}}`},aA={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:iA,code(e){let{gen:t,schema:n,data:o,it:r}=e;if(oA.alwaysValidSchema(r,n))return;let i=t.name("valid");t.forIn("key",o,(a)=>{e.setParams({propertyName:a}),e.subschema({keyword:"propertyNames",data:a,dataTypes:["string"],propertyName:a,compositeRule:!0},i),t.if(Ix.not(i),()=>{if(e.error(!0),!r.allErrors)t.break()})}),e.ok(i)}};Px.default=aA});var ES=U(function(Tx){Object.defineProperty(Tx,"__esModule",{value:!0});var Ud=bt(),Nt=ce(),cA=mr(),Dd=de(),lA={message:"must NOT have additional properties",params:({params:e})=>Nt._`{additionalProperty: ${e.additionalProperty}}`},uA={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:lA,code(e){let{gen:t,schema:n,parentSchema:o,data:r,errsCount:i,it:a}=e;if(!i)throw Error("ajv implementation error");let{allErrors:s,opts:c}=a;if(a.props=!0,c.removeAdditional!=="all"&&Dd.alwaysValidSchema(a,n))return;let l=Ud.allSchemaProperties(o.properties),d=Ud.allSchemaProperties(o.patternProperties);m(),e.ok(Nt._`${i} === ${cA.default.errors}`);function m(){t.forIn("key",r,(b)=>{if(!l.length&&!d.length)v(b);else t.if(p(b),()=>v(b))})}function p(b){let R;if(l.length>8){let L=Dd.schemaRefOrVal(a,o.properties,"properties");R=Ud.isOwnProperty(t,L,b)}else if(l.length)R=Nt.or(...l.map((L)=>Nt._`${b} === ${L}`));else R=Nt.nil;if(d.length)R=Nt.or(R,...d.map((L)=>Nt._`${Ud.usePattern(e,L)}.test(${b})`));return Nt.not(R)}function f(b){t.code(Nt._`delete ${r}[${b}]`)}function v(b){if(c.removeAdditional==="all"||c.removeAdditional&&n===!1){f(b);return}if(n===!1){if(e.setParams({additionalProperty:b}),e.error(),!s)t.break();return}if(typeof n=="object"&&!Dd.alwaysValidSchema(a,n)){let R=t.name("valid");if(c.removeAdditional==="failing")g(b,R,!1),t.if(Nt.not(R),()=>{e.reset(),f(b)});else if(g(b,R),!s)t.if(Nt.not(R),()=>t.break())}}function g(b,R,L){let P={keyword:"additionalProperties",dataProp:b,dataPropType:Dd.Type.Str};if(L===!1)Object.assign(P,{compositeRule:!0,createErrors:!1,allErrors:!1});e.subschema(P,R)}}};Tx.default=uA});var Cx=U(function(Nx){Object.defineProperty(Nx,"__esModule",{value:!0});var mA=Wa(),Ox=bt(),TS=de(),jx=ES(),pA={keyword:"properties",type:"object",schemaType:"object",code(e){let{gen:t,schema:n,parentSchema:o,data:r,it:i}=e;if(i.opts.removeAdditional==="all"&&o.additionalProperties===void 0)jx.default.code(new mA.KeywordCxt(i,jx.default,"additionalProperties"));let a=Ox.allSchemaProperties(n);for(let m of a)i.definedProperties.add(m);if(i.opts.unevaluated&&a.length&&i.props!==!0)i.props=TS.mergeEvaluated.props(t,TS.toHash(a),i.props);let s=a.filter((m)=>!TS.alwaysValidSchema(i,n[m]));if(s.length===0)return;let c=t.name("valid");for(let m of s){if(l(m))d(m);else{if(t.if(Ox.propertyInData(t,r,m,i.opts.ownProperties)),d(m),!i.allErrors)t.else().var(c,!0);t.endIf()}e.it.definedProperties.add(m),e.ok(c)}function l(m){return i.opts.useDefaults&&!i.compositeRule&&n[m].default!==void 0}function d(m){e.subschema({keyword:"properties",schemaProp:m,dataProp:m},c)}}};Nx.default=pA});var Dx=U(function(Ux){Object.defineProperty(Ux,"__esModule",{value:!0});var qx=bt(),Ld=ce(),Ax=de(),Mx=de(),hA={keyword:"patternProperties",type:"object",schemaType:"object",code(e){let{gen:t,schema:n,data:o,parentSchema:r,it:i}=e,{opts:a}=i,s=qx.allSchemaProperties(n),c=s.filter((g)=>Ax.alwaysValidSchema(i,n[g]));if(s.length===0||c.length===s.length&&(!i.opts.unevaluated||i.props===!0))return;let l=a.strictSchema&&!a.allowMatchingProperties&&r.properties,d=t.name("valid");if(i.props!==!0&&!(i.props instanceof Ld.Name))i.props=Mx.evaluatedPropsToName(t,i.props);let{props:m}=i;p();function p(){for(let g of s){if(l)f(g);if(i.allErrors)v(g);else t.var(d,!0),v(g),t.if(d)}}function f(g){for(let b in l)if(new RegExp(g).test(b))Ax.checkStrictMode(i,`property ${b} matches pattern ${g} (use allowMatchingProperties)`)}function v(g){t.forIn("key",o,(b)=>{t.if(Ld._`${qx.usePattern(e,g)}.test(${b})`,()=>{let R=c.includes(g);if(!R)e.subschema({keyword:"patternProperties",schemaProp:g,dataProp:b,dataPropType:Mx.Type.Str},d);if(i.opts.unevaluated&&m!==!0)t.assign(Ld._`${m}[${b}]`,!0);else if(!R&&!i.allErrors)t.if(Ld.not(d),()=>t.break())})})}}};Ux.default=hA});var Zx=U(function(Lx){Object.defineProperty(Lx,"__esModule",{value:!0});var vA=de(),_A={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){let{gen:t,schema:n,it:o}=e;if(vA.alwaysValidSchema(o,n)){e.fail();return}let r=t.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},r),e.failResult(r,()=>e.reset(),()=>e.error())},error:{message:"must NOT be valid"}};Lx.default=_A});var Fx=U(function(Vx){Object.defineProperty(Vx,"__esModule",{value:!0});var yA=bt(),bA={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:yA.validateUnion,error:{message:"must match a schema in anyOf"}};Vx.default=bA});var Hx=U(function(Jx){Object.defineProperty(Jx,"__esModule",{value:!0});var Zd=ce(),zA=de(),wA={message:"must match exactly one schema in oneOf",params:({params:e})=>Zd._`{passingSchemas: ${e.passing}}`},RA={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:wA,code(e){let{gen:t,schema:n,parentSchema:o,it:r}=e;if(!Array.isArray(n))throw Error("ajv implementation error");if(r.opts.discriminator&&o.discriminator)return;let i=n,a=t.let("valid",!1),s=t.let("passing",null),c=t.name("_valid");e.setParams({passing:s}),t.block(l),e.result(a,()=>e.reset(),()=>e.error(!0));function l(){i.forEach((d,m)=>{let p;if(zA.alwaysValidSchema(r,d))t.var(c,!0);else p=e.subschema({keyword:"oneOf",schemaProp:m,compositeRule:!0},c);if(m>0)t.if(Zd._`${c} && ${a}`).assign(a,!1).assign(s,Zd._`[${s}, ${m}]`).else();t.if(c,()=>{if(t.assign(a,!0),t.assign(s,m),p)e.mergeEvaluated(p,Zd.Name)})})}}};Jx.default=RA});var Gx=U(function(Kx){Object.defineProperty(Kx,"__esModule",{value:!0});var kA=de(),IA={keyword:"allOf",schemaType:"array",code(e){let{gen:t,schema:n,it:o}=e;if(!Array.isArray(n))throw Error("ajv implementation error");let r=t.name("valid");n.forEach((i,a)=>{if(kA.alwaysValidSchema(o,i))return;let s=e.subschema({keyword:"allOf",schemaProp:a},r);e.ok(r),e.mergeEvaluated(s)})}};Kx.default=IA});var Xx=U(function(Yx){Object.defineProperty(Yx,"__esModule",{value:!0});var Vd=ce(),Wx=de(),EA={message:({params:e})=>Vd.str`must match "${e.ifClause}" schema`,params:({params:e})=>Vd._`{failingKeyword: ${e.ifClause}}`},TA={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:EA,code(e){let{gen:t,parentSchema:n,it:o}=e;if(n.then===void 0&&n.else===void 0)Wx.checkStrictMode(o,'"if" without "then" and "else" is ignored');let r=Bx(o,"then"),i=Bx(o,"else");if(!r&&!i)return;let a=t.let("valid",!0),s=t.name("_valid");if(c(),e.reset(),r&&i){let d=t.let("ifClause");e.setParams({ifClause:d}),t.if(s,l("then",d),l("else",d))}else if(r)t.if(s,l("then"));else t.if(Vd.not(s),l("else"));e.pass(a,()=>e.error(!0));function c(){let d=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},s);e.mergeEvaluated(d)}function l(d,m){return()=>{let p=e.subschema({keyword:d},s);if(t.assign(a,s),e.mergeValidEvaluated(p,a),m)t.assign(m,Vd._`${d}`);else e.setParams({ifClause:d})}}}};function Bx(e,t){let n=e.schema[t];return n!==void 0&&!Wx.alwaysValidSchema(e,n)}Yx.default=TA});var ek=U(function(Qx){Object.defineProperty(Qx,"__esModule",{value:!0});var OA=de(),NA={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:n}){if(t.if===void 0)OA.checkStrictMode(n,`"${e}" without "if" is ignored`)}};Qx.default=NA});var rk=U(function(tk){Object.defineProperty(tk,"__esModule",{value:!0});var qA=kS(),AA=gx(),MA=IS(),UA=Sx(),DA=bx(),LA=kx(),ZA=Ex(),VA=ES(),FA=Cx(),JA=Dx(),HA=Zx(),KA=Fx(),GA=Hx(),BA=Gx(),WA=Xx(),YA=ek();function XA(e=!1){let t=[HA.default,KA.default,GA.default,BA.default,WA.default,YA.default,ZA.default,VA.default,LA.default,FA.default,JA.default];if(e)t.push(AA.default,UA.default);else t.push(qA.default,MA.default);return t.push(DA.default),t}tk.default=XA});var ok=U(function(nk){Object.defineProperty(nk,"__esModule",{value:!0});var xe=ce(),eM={message:({schemaCode:e})=>xe.str`must match format "${e}"`,params:({schemaCode:e})=>xe._`{format: ${e}}`},tM={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:eM,code(e,t){let{gen:n,data:o,$data:r,schema:i,schemaCode:a,it:s}=e,{opts:c,errSchemaPath:l,schemaEnv:d,self:m}=s;if(!c.validateFormats)return;if(r)p();else f();function p(){let v=n.scopeValue("formats",{ref:m.formats,code:c.code.formats}),g=n.const("fDef",xe._`${v}[${a}]`),b=n.let("fType"),R=n.let("format");n.if(xe._`typeof ${g} == "object" && !(${g} instanceof RegExp)`,()=>n.assign(b,xe._`${g}.type || "string"`).assign(R,xe._`${g}.validate`),()=>n.assign(b,xe._`"string"`).assign(R,g)),e.fail$data(xe.or(L(),P()));function L(){if(c.strictSchema===!1)return xe.nil;return xe._`${a} && !${R}`}function P(){let D=d.$async?xe._`(${g}.async ? await ${R}(${o}) : ${R}(${o}))`:xe._`${R}(${o})`,E=xe._`(typeof ${R} == "function" ? ${D} : ${R}.test(${o}))`;return xe._`${R} && ${R} !== true && ${b} === ${t} && !${E}`}}function f(){let v=m.formats[i];if(!v){L();return}if(v===!0)return;let[g,b,R]=P(v);if(g===t)e.pass(D());function L(){if(c.strictSchema===!1){m.logger.warn(E());return}throw Error(E());function E(){return`unknown format "${i}" ignored in schema at path "${l}"`}}function P(E){let ne=E instanceof RegExp?xe.regexpCode(E):c.code.formats?xe._`${c.code.formats}${xe.getProperty(i)}`:void 0,ue=n.scopeValue("formats",{key:i,ref:E,code:ne});if(typeof E=="object"&&!(E instanceof RegExp))return[E.type||"string",E.validate,xe._`${ue}.validate`];return["string",E,ue]}function D(){if(typeof v=="object"&&!(v instanceof RegExp)&&v.async){if(!d.$async)throw Error("async format in sync schema");return xe._`await ${R}(${o})`}return typeof b=="function"?xe._`${R}(${o})`:xe._`${R}.test(${o})`}}}};nk.default=tM});var ak=U(function(ik){Object.defineProperty(ik,"__esModule",{value:!0});var nM=ok(),oM=[nM.default];ik.default=oM});var lk=U(function(sk){Object.defineProperty(sk,"__esModule",{value:!0});sk.contentVocabulary=sk.metadataVocabulary=void 0;sk.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];sk.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});var mk=U(function(dk){Object.defineProperty(dk,"__esModule",{value:!0});var sM=NR(),cM=sx(),lM=rk(),uM=ak(),uk=lk(),dM=[sM.default,cM.default,(0,lM.default)(),uM.default,uk.metadataVocabulary,uk.contentVocabulary];dk.default=dM});var gk=U(function(fk){Object.defineProperty(fk,"__esModule",{value:!0});fk.DiscrError=void 0;var pk;(function(e){e.Tag="tag",e.Mapping="mapping"})(pk||(fk.DiscrError=pk={}))});var Sk=U(function(_k){Object.defineProperty(_k,"__esModule",{value:!0});var Go=ce(),jS=gk(),vk=Rd(),pM=Ya(),fM=de(),hM={message:({params:{discrError:e,tagName:t}})=>e===jS.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:t,tagName:n}})=>Go._`{error: ${e}, tag: ${n}, tagValue: ${t}}`},gM={keyword:"discriminator",type:"object",schemaType:"object",error:hM,code(e){let{gen:t,data:n,schema:o,parentSchema:r,it:i}=e,{oneOf:a}=r;if(!i.opts.discriminator)throw Error("discriminator: requires discriminator option");let s=o.propertyName;if(typeof s!="string")throw Error("discriminator: requires propertyName");if(o.mapping)throw Error("discriminator: mapping is not supported");if(!a)throw Error("discriminator: requires oneOf keyword");let c=t.let("valid",!1),l=t.const("tag",Go._`${n}${Go.getProperty(s)}`);t.if(Go._`typeof ${l} == "string"`,()=>d(),()=>e.error(!1,{discrError:jS.DiscrError.Tag,tag:l,tagName:s})),e.ok(c);function d(){let f=p();t.if(!1);for(let v in f)t.elseIf(Go._`${l} === ${v}`),t.assign(c,m(f[v]));t.else(),e.error(!1,{discrError:jS.DiscrError.Mapping,tag:l,tagName:s}),t.endIf()}function m(f){let v=t.name("valid"),g=e.subschema({keyword:"oneOf",schemaProp:f},v);return e.mergeEvaluated(g,Go.Name),v}function p(){var f;let v={},g=R(r),b=!0;for(let D=0;D<a.length;D++){let E=a[D];if((E===null||E===void 0?void 0:E.$ref)&&!fM.schemaHasRulesButRef(E,i.self.RULES)){let ue=E.$ref;if(E=vk.resolveRef.call(i.self,i.schemaEnv.root,i.baseId,ue),E instanceof vk.SchemaEnv)E=E.schema;if(E===void 0)throw new pM.default(i.opts.uriResolver,i.baseId,ue)}let ne=(f=E===null||E===void 0?void 0:E.properties)===null||f===void 0?void 0:f[s];if(typeof ne!="object")throw Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${s}"`);b=b&&(g||R(E)),L(ne,D)}if(!b)throw Error(`discriminator: "${s}" must be required`);return v;function R({required:D}){return Array.isArray(D)&&D.includes(s)}function L(D,E){if(D.const)P(D.const,E);else if(D.enum)for(let ne of D.enum)P(ne,E);else throw Error(`discriminator: "properties/${s}" must have "const" or "enum"`)}function P(D,E){if(typeof D!="string"||D in v)throw Error(`discriminator: "${s}" values must be unique strings`);v[D]=E}}}};_k.default=gM});var yk=U(function($2,_M){_M.exports={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0}});var $k=U(function(st,OS){Object.defineProperty(st,"__esModule",{value:!0});st.MissingRefError=st.ValidationError=st.CodeGen=st.Name=st.nil=st.stringify=st.str=st._=st.KeywordCxt=st.Ajv=void 0;var SM=wR(),yM=mk(),bM=Sk(),bk=yk(),$M=["/properties"],Fd="http://json-schema.org/draft-07/schema";class ls extends SM.default{_addVocabularies(){if(super._addVocabularies(),yM.default.forEach((e)=>this.addVocabulary(e)),this.opts.discriminator)this.addKeyword(bM.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let e=this.opts.$data?this.$dataMetaSchema(bk,$M):bk;this.addMetaSchema(e,Fd,!1),this.refs["http://json-schema.org/schema"]=Fd}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(Fd)?Fd:void 0)}}st.Ajv=ls;OS.exports=st=ls;OS.exports.Ajv=ls;Object.defineProperty(st,"__esModule",{value:!0});st.default=ls;var zM=Wa();Object.defineProperty(st,"KeywordCxt",{enumerable:!0,get:function(){return zM.KeywordCxt}});var Bo=ce();Object.defineProperty(st,"_",{enumerable:!0,get:function(){return Bo._}});Object.defineProperty(st,"str",{enumerable:!0,get:function(){return Bo.str}});Object.defineProperty(st,"stringify",{enumerable:!0,get:function(){return Bo.stringify}});Object.defineProperty(st,"nil",{enumerable:!0,get:function(){return Bo.nil}});Object.defineProperty(st,"Name",{enumerable:!0,get:function(){return Bo.Name}});Object.defineProperty(st,"CodeGen",{enumerable:!0,get:function(){return Bo.CodeGen}});var wM=zd();Object.defineProperty(st,"ValidationError",{enumerable:!0,get:function(){return wM.default}});var RM=Ya();Object.defineProperty(st,"MissingRefError",{enumerable:!0,get:function(){return RM.default}})});var{create:Ok,defineProperty:ks,getOwnPropertyDescriptor:Nk,getOwnPropertyNames:Ck,getPrototypeOf:qk}=Object,Ak=Object.prototype.hasOwnProperty,qS=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),AS=(e,t)=>{let n={};for(var o in e)ks(n,o,{get:e[o],enumerable:!0});if(t)ks(n,Symbol.toStringTag,{value:"Module"});return n},Mk=(e,t,n,o)=>{if(t&&typeof t==="object"||typeof t==="function"){for(var r=Ck(t),i=0,a=r.length,s;i<a;i++)if(s=r[i],!Ak.call(e,s)&&s!==n)ks(e,s,{get:((c)=>t[c]).bind(null,s),enumerable:!(o=Nk(t,s))||o.enumerable})}return e},MS=(e,t,n)=>(n=e!=null?Ok(qk(e)):{},Mk(t||!e||!e.__esModule?ks(n,"default",{value:e,enumerable:!0}):n,e));var Uk=new Set(["https://json-schema.org/draft/2020-12/schema","http://json-schema.org/draft/2020-12/schema"]),US=new Set(["https://json-schema.org/draft/2019-09/schema","http://json-schema.org/draft/2019-09/schema"]),Dk=new Set(["https://json-schema.org/draft-07/schema","http://json-schema.org/draft-07/schema"]),Lk=new Set(["https://json-schema.org/draft-06/schema","http://json-schema.org/draft-06/schema"]);function DS(e){return typeof e==="string"&&US.has(e.replace(/#$/,""))}function LS(e,t){if(!("$schema"in e)||typeof e.$schema!=="string")return"2020-12";let n=e.$schema.replace(/#$/,"");if(Uk.has(n))return"2020-12";if(US.has(n))return"2019-09";if(Dk.has(n)||Lk.has(n))return"draft-7";throw Error(`JSON Schema declares an unsupported dialect ("$schema": "${e.$schema.slice(0,200)}"). The default validator supports JSON Schema 2020-12, 2019-09, draft-07, and draft-06; ${t}`)}var Nv={};tr(Nv,{$brand:()=>Kd,$input:()=>sh,$output:()=>ah,NEVER:()=>zi,TimePrecision:()=>mh,ZodAny:()=>Wg,ZodArray:()=>ev,ZodBase64:()=>Xc,ZodBase64URL:()=>Qc,ZodBigInt:()=>So,ZodBigIntFormat:()=>rl,ZodBoolean:()=>_o,ZodCIDRv4:()=>Wc,ZodCIDRv6:()=>Yc,ZodCUID:()=>Vc,ZodCUID2:()=>Fc,ZodCatch:()=>yv,ZodCodec:()=>ra,ZodCustom:()=>na,ZodCustomStringFormat:()=>go,ZodDate:()=>Xi,ZodDefault:()=>fv,ZodDiscriminatedUnion:()=>rv,ZodE164:()=>el,ZodEmail:()=>Uc,ZodEmoji:()=>Lc,ZodEnum:()=>po,ZodError:()=>cP,ZodExactOptional:()=>dv,ZodFile:()=>lv,ZodFirstPartyTypeKind:()=>jv,ZodFunction:()=>Pv,ZodGUID:()=>Gi,ZodIPv4:()=>Gc,ZodIPv6:()=>Bc,ZodISODate:()=>jc,ZodISODateTime:()=>Tc,ZodISODuration:()=>Cc,ZodISOTime:()=>Nc,ZodIntersection:()=>nv,ZodIssueCode:()=>Ov,ZodJWT:()=>tl,ZodKSUID:()=>Kc,ZodLazy:()=>kv,ZodLiteral:()=>cv,ZodMAC:()=>Hg,ZodMap:()=>av,ZodNaN:()=>$v,ZodNanoID:()=>Zc,ZodNever:()=>Xg,ZodNonOptional:()=>sl,ZodNull:()=>Bg,ZodNullable:()=>pv,ZodNumber:()=>vo,ZodNumberFormat:()=>vn,ZodObject:()=>Qi,ZodOptional:()=>al,ZodPipe:()=>ta,ZodPrefault:()=>gv,ZodPreprocess:()=>zv,ZodPromise:()=>Iv,ZodReadonly:()=>wv,ZodRealError:()=>nt,ZodRecord:()=>mo,ZodSet:()=>sv,ZodString:()=>fo,ZodStringFormat:()=>he,ZodSuccess:()=>Sv,ZodSymbol:()=>Kg,ZodTemplateLiteral:()=>xv,ZodTransform:()=>uv,ZodTuple:()=>ov,ZodType:()=>oe,ZodULID:()=>Jc,ZodURL:()=>Yi,ZodUUID:()=>Gt,ZodUndefined:()=>Gg,ZodUnion:()=>ea,ZodUnknown:()=>Yg,ZodVoid:()=>Qg,ZodXID:()=>Hc,ZodXor:()=>tv,_ZodString:()=>Mc,_default:()=>hv,_function:()=>Mb,any:()=>nl,array:()=>S,base64:()=>nb,base64url:()=>ob,bigint:()=>hb,boolean:()=>N,catch:()=>bv,check:()=>Ub,cidrv4:()=>tb,cidrv6:()=>rb,clone:()=>Je,codec:()=>Nb,coerce:()=>cl,config:()=>be,core:()=>or,cuid:()=>Ky,cuid2:()=>Gy,custom:()=>Db,date:()=>bb,decode:()=>Ug,decodeAsync:()=>Lg,describe:()=>Lb,discriminatedUnion:()=>Tr,e164:()=>ib,email:()=>Dc,emoji:()=>Jy,encode:()=>Mg,encodeAsync:()=>Dg,endsWith:()=>ro,enum:()=>X,exactOptional:()=>mv,file:()=>Eb,flattenError:()=>ji,float32:()=>db,float64:()=>mb,formatError:()=>Oi,fromJSONSchema:()=>Kb,function:()=>Mb,getErrorMap:()=>dP,globalRegistry:()=>Te,gt:()=>Ht,gte:()=>Ke,guid:()=>Uy,hash:()=>ub,hex:()=>lb,hostname:()=>cb,httpUrl:()=>Fy,includes:()=>eo,instanceof:()=>Vb,int:()=>qc,int32:()=>pb,int64:()=>gb,intersection:()=>It,invertCodec:()=>Cb,ipv4:()=>Xy,ipv6:()=>eb,iso:()=>Er,json:()=>Jb,jwt:()=>ab,keyof:()=>$b,ksuid:()=>Yy,lazy:()=>jr,length:()=>fn,literal:()=>y,locales:()=>Vi,looseObject:()=>H,looseRecord:()=>xb,lowercase:()=>Xn,lt:()=>Jt,lte:()=>pt,mac:()=>Qy,map:()=>kb,maxLength:()=>pn,maxSize:()=>xr,meta:()=>Zb,mime:()=>no,minLength:()=>nr,minSize:()=>Kt,multipleOf:()=>Rr,nan:()=>Ob,nanoid:()=>Hy,nativeEnum:()=>Pb,negative:()=>zc,never:()=>ol,nonnegative:()=>Rc,nonoptional:()=>_v,nonpositive:()=>wc,normalize:()=>oo,null:()=>Bt,nullable:()=>Bi,nullish:()=>Tb,number:()=>x,object:()=>h,optional:()=>F,overwrite:()=>kt,parse:()=>Cg,parseAsync:()=>qg,partialRecord:()=>Rb,pipe:()=>Ac,positive:()=>$c,prefault:()=>vv,preprocess:()=>ir,prettifyError:()=>om,promise:()=>Ab,property:()=>xc,readonly:()=>Rv,record:()=>T,refine:()=>Ev,regex:()=>Yn,regexes:()=>rr,registry:()=>tc,safeDecode:()=>Vg,safeDecodeAsync:()=>Jg,safeEncode:()=>Zg,safeEncodeAsync:()=>Fg,safeParse:()=>Ki,safeParseAsync:()=>Ag,set:()=>Ib,setErrorMap:()=>uP,size:()=>mn,slugify:()=>co,startsWith:()=>to,strictObject:()=>zb,string:()=>u,stringFormat:()=>sb,stringbool:()=>Fb,success:()=>jb,superRefine:()=>Tv,symbol:()=>_b,templateLiteral:()=>qb,toJSONSchema:()=>hn,toLowerCase:()=>ao,toUpperCase:()=>so,transform:()=>il,treeifyError:()=>nm,trim:()=>io,tuple:()=>iv,uint32:()=>fb,uint64:()=>vb,ulid:()=>By,undefined:()=>Sb,union:()=>q,unknown:()=>V,uppercase:()=>Qn,url:()=>ho,util:()=>J,uuid:()=>Dy,uuidv4:()=>Ly,uuidv6:()=>Zy,uuidv7:()=>Vy,void:()=>yb,xid:()=>Wy,xor:()=>wb});var or={};tr(or,{$ZodAny:()=>jp,$ZodArray:()=>Ap,$ZodAsyncError:()=>Vt,$ZodBase64:()=>$p,$ZodBase64URL:()=>zp,$ZodBigInt:()=>Ys,$ZodBigIntFormat:()=>Ip,$ZodBoolean:()=>qi,$ZodCIDRv4:()=>Sp,$ZodCIDRv6:()=>yp,$ZodCUID:()=>sp,$ZodCUID2:()=>cp,$ZodCatch:()=>tf,$ZodCheck:()=>ge,$ZodCheckBigIntFormat:()=>Am,$ZodCheckEndsWith:()=>Bm,$ZodCheckGreaterThan:()=>Fs,$ZodCheckIncludes:()=>Km,$ZodCheckLengthEquals:()=>Vm,$ZodCheckLessThan:()=>Vs,$ZodCheckLowerCase:()=>Jm,$ZodCheckMaxLength:()=>Lm,$ZodCheckMaxSize:()=>Mm,$ZodCheckMimeType:()=>Ym,$ZodCheckMinLength:()=>Zm,$ZodCheckMinSize:()=>Um,$ZodCheckMultipleOf:()=>Cm,$ZodCheckNumberFormat:()=>qm,$ZodCheckOverwrite:()=>Xm,$ZodCheckProperty:()=>Wm,$ZodCheckRegex:()=>Fm,$ZodCheckSizeEquals:()=>Dm,$ZodCheckStartsWith:()=>Gm,$ZodCheckStringFormat:()=>Bn,$ZodCheckUpperCase:()=>Hm,$ZodCodec:()=>Mi,$ZodCustom:()=>uf,$ZodCustomStringFormat:()=>xp,$ZodDate:()=>qp,$ZodDefault:()=>Yp,$ZodDiscriminatedUnion:()=>Dp,$ZodE164:()=>wp,$ZodEmail:()=>np,$ZodEmoji:()=>ip,$ZodEncodeError:()=>cn,$ZodEnum:()=>Jp,$ZodError:()=>Ti,$ZodExactOptional:()=>Bp,$ZodFile:()=>Kp,$ZodFunction:()=>sf,$ZodGUID:()=>tp,$ZodIPv4:()=>gp,$ZodIPv6:()=>vp,$ZodISODate:()=>pp,$ZodISODateTime:()=>mp,$ZodISODuration:()=>hp,$ZodISOTime:()=>fp,$ZodIntersection:()=>Lp,$ZodJWT:()=>Rp,$ZodKSUID:()=>dp,$ZodLazy:()=>lf,$ZodLiteral:()=>Hp,$ZodMAC:()=>_p,$ZodMap:()=>Vp,$ZodNaN:()=>rf,$ZodNanoID:()=>ap,$ZodNever:()=>Np,$ZodNonOptional:()=>Qp,$ZodNull:()=>Tp,$ZodNullable:()=>Wp,$ZodNumber:()=>Ws,$ZodNumberFormat:()=>kp,$ZodObject:()=>Py,$ZodObjectJIT:()=>Mp,$ZodOptional:()=>Qs,$ZodPipe:()=>ec,$ZodPrefault:()=>Xp,$ZodPreprocess:()=>nf,$ZodPromise:()=>cf,$ZodReadonly:()=>of,$ZodRealError:()=>rt,$ZodRecord:()=>Zp,$ZodRegistry:()=>ch,$ZodSet:()=>Fp,$ZodString:()=>dn,$ZodStringFormat:()=>fe,$ZodSuccess:()=>ef,$ZodSymbol:()=>Pp,$ZodTemplateLiteral:()=>af,$ZodTransform:()=>Gp,$ZodTuple:()=>Xs,$ZodType:()=>Q,$ZodULID:()=>lp,$ZodURL:()=>op,$ZodUUID:()=>rp,$ZodUndefined:()=>Ep,$ZodUnion:()=>Ai,$ZodUnknown:()=>Op,$ZodVoid:()=>Cp,$ZodXID:()=>up,$ZodXor:()=>Up,$brand:()=>Kd,$constructor:()=>_,$input:()=>sh,$output:()=>ah,Doc:()=>Js,JSONSchema:()=>qy,JSONSchemaGenerator:()=>jg,NEVER:()=>zi,TimePrecision:()=>mh,_any:()=>Oh,_array:()=>Dh,_base64:()=>_c,_base64url:()=>Sc,_bigint:()=>xh,_boolean:()=>wh,_catch:()=>eP,_check:()=>Cy,_cidrv4:()=>gc,_cidrv6:()=>vc,_coercedBigint:()=>kh,_coercedBoolean:()=>Rh,_coercedDate:()=>Mh,_coercedNumber:()=>_h,_coercedString:()=>uh,_cuid:()=>lc,_cuid2:()=>uc,_custom:()=>Zh,_date:()=>Ah,_decode:()=>Os,_decodeAsync:()=>Cs,_default:()=>YI,_discriminatedUnion:()=>UI,_e164:()=>yc,_email:()=>rc,_emoji:()=>sc,_encode:()=>js,_encodeAsync:()=>Ns,_endsWith:()=>ro,_enum:()=>JI,_file:()=>Lh,_float32:()=>yh,_float64:()=>bh,_gt:()=>Ht,_gte:()=>Ke,_guid:()=>Fi,_includes:()=>eo,_int:()=>Sh,_int32:()=>$h,_int64:()=>Ih,_intersection:()=>DI,_ipv4:()=>fc,_ipv6:()=>hc,_isoDate:()=>fh,_isoDateTime:()=>ph,_isoDuration:()=>gh,_isoTime:()=>hh,_jwt:()=>bc,_ksuid:()=>pc,_lazy:()=>oP,_length:()=>fn,_literal:()=>KI,_lowercase:()=>Xn,_lt:()=>Jt,_lte:()=>pt,_mac:()=>dh,_map:()=>VI,_max:()=>pt,_maxLength:()=>pn,_maxSize:()=>xr,_mime:()=>no,_min:()=>Ke,_minLength:()=>nr,_minSize:()=>Kt,_multipleOf:()=>Rr,_nan:()=>Uh,_nanoid:()=>cc,_nativeEnum:()=>HI,_negative:()=>zc,_never:()=>Ch,_nonnegative:()=>Rc,_nonoptional:()=>XI,_nonpositive:()=>wc,_normalize:()=>oo,_null:()=>jh,_nullable:()=>WI,_number:()=>vh,_optional:()=>BI,_overwrite:()=>kt,_parse:()=>Jn,_parseAsync:()=>Hn,_pipe:()=>tP,_positive:()=>$c,_promise:()=>iP,_property:()=>xc,_readonly:()=>rP,_record:()=>ZI,_refine:()=>Vh,_regex:()=>Yn,_safeDecode:()=>As,_safeDecodeAsync:()=>Us,_safeEncode:()=>qs,_safeEncodeAsync:()=>Ms,_safeParse:()=>Kn,_safeParseAsync:()=>Gn,_set:()=>FI,_size:()=>mn,_slugify:()=>co,_startsWith:()=>to,_string:()=>lh,_stringFormat:()=>lo,_stringbool:()=>Kh,_success:()=>QI,_superRefine:()=>Fh,_symbol:()=>Eh,_templateLiteral:()=>nP,_toLowerCase:()=>ao,_toUpperCase:()=>so,_transform:()=>GI,_trim:()=>io,_tuple:()=>LI,_uint32:()=>zh,_uint64:()=>Ph,_ulid:()=>dc,_undefined:()=>Th,_union:()=>AI,_unknown:()=>Nh,_uppercase:()=>Qn,_url:()=>Ji,_uuid:()=>nc,_uuidv4:()=>oc,_uuidv6:()=>ic,_uuidv7:()=>ac,_void:()=>qh,_xid:()=>mc,_xor:()=>MI,clone:()=>Je,config:()=>be,createStandardJSONSchemaMethod:()=>uo,createToJSONSchemaMethod:()=>Gh,decode:()=>c0,decodeAsync:()=>u0,describe:()=>Jh,encode:()=>s0,encodeAsync:()=>l0,extractDefs:()=>Ir,finalize:()=>Pr,flattenError:()=>ji,formatError:()=>Oi,globalConfig:()=>sn,globalRegistry:()=>Te,initializeContext:()=>kr,isValidBase64:()=>bp,isValidBase64URL:()=>Ry,isValidJWT:()=>xy,locales:()=>Vi,meta:()=>Hh,parse:()=>Es,parseAsync:()=>Ts,prettifyError:()=>om,process:()=>pe,regexes:()=>rr,registry:()=>tc,safeDecode:()=>m0,safeDecodeAsync:()=>f0,safeEncode:()=>d0,safeEncodeAsync:()=>p0,safeParse:()=>im,safeParseAsync:()=>am,toDotPath:()=>ty,toJSONSchema:()=>hn,treeifyError:()=>nm,util:()=>J,version:()=>Qm});var ZS,zi=Object.freeze({status:"aborted"});function _(e,t,n){function o(s,c){if(!s._zod)Object.defineProperty(s,"_zod",{value:{def:c,constr:a,traits:new Set},enumerable:!1});if(s._zod.traits.has(e))return;s._zod.traits.add(e),t(s,c);let l=a.prototype,d=Object.keys(l);for(let m=0;m<d.length;m++){let p=d[m];if(!(p in s))s[p]=l[p].bind(s)}}let r=n?.Parent??Object;class i extends r{}Object.defineProperty(i,"name",{value:e});function a(s){var c;let l=n?.Parent?new i:this;o(l,s),(c=l._zod).deferred??(c.deferred=[]);for(let d of l._zod.deferred)d();return l}return Object.defineProperty(a,"init",{value:o}),Object.defineProperty(a,Symbol.hasInstance,{value:(s)=>{if(n?.Parent&&s instanceof n.Parent)return!0;return s?._zod?.traits?.has(e)}}),Object.defineProperty(a,"name",{value:e}),a}var Kd=Symbol("zod_brand");class Vt extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class cn extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`);this.name="ZodEncodeError"}}(ZS=globalThis).__zod_globalConfig??(ZS.__zod_globalConfig={});var sn=globalThis.__zod_globalConfig;function be(e){if(e)Object.assign(sn,e);return sn}var J={};tr(J,{BIGINT_FORMAT_RANGES:()=>tm,Class:()=>QS,NUMBER_FORMAT_RANGES:()=>em,aborted:()=>zr,allowsEval:()=>Yd,assert:()=>Hk,assertEqual:()=>Zk,assertIs:()=>Fk,assertNever:()=>Jk,assertNotEqual:()=>Vk,assignProp:()=>br,base64ToUint8Array:()=>YS,base64urlToUint8Array:()=>r0,cached:()=>Fn,captureStackTrace:()=>Ps,cleanEnum:()=>t0,cleanRegex:()=>xi,clone:()=>Je,cloneDef:()=>Gk,createTransparentProxy:()=>e0,defineLazy:()=>ae,esc:()=>Is,escapeRegex:()=>yt,explicitlyAborted:()=>rm,extend:()=>HS,finalizeIssue:()=>He,floatSafeRemainder:()=>Bd,getElementAtPath:()=>Bk,getEnumValues:()=>Ri,getLengthableOrigin:()=>Ei,getParsedType:()=>Qk,getSizableOrigin:()=>Pi,hexToUint8Array:()=>o0,isObject:()=>ln,isPlainObject:()=>$r,issue:()=>wr,joinValues:()=>z,jsonStringifyReplacer:()=>Vn,merge:()=>GS,mergeDefs:()=>Ft,normalizeParams:()=>w,nullish:()=>yr,numKeys:()=>Xk,objectClone:()=>Kk,omit:()=>JS,optionalKeys:()=>Qd,parsedType:()=>I,partial:()=>BS,pick:()=>FS,prefixIssues:()=>tt,primitiveTypes:()=>Xd,promiseAllObject:()=>Wk,propertyKeyTypes:()=>Ii,randomString:()=>Yk,required:()=>WS,safeExtend:()=>KS,shallowClone:()=>ki,slugify:()=>Wd,stringifyPrimitive:()=>k,uint8ArrayToBase64:()=>XS,uint8ArrayToBase64url:()=>n0,uint8ArrayToHex:()=>i0,unwrapMessage:()=>wi});function Zk(e){return e}function Vk(e){return e}function Fk(e){}function Jk(e){throw Error("Unexpected value in exhaustive check")}function Hk(e){}function Ri(e){let t=Object.values(e).filter((o)=>typeof o==="number");return Object.entries(e).filter(([o,r])=>t.indexOf(+o)===-1).map(([o,r])=>r)}function z(e,t="|"){return e.map((n)=>k(n)).join(t)}function Vn(e,t){if(typeof t==="bigint")return t.toString();return t}function Fn(e){return{get value(){{let n=e();return Object.defineProperty(this,"value",{value:n}),n}throw Error("cached value already set")}}}function yr(e){return e===null||e===void 0}function xi(e){let t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function Bd(e,t){let n=e/t,o=Math.round(n),r=Number.EPSILON*Math.max(Math.abs(n),1);if(Math.abs(n-o)<r)return 0;return n-o}var VS=Symbol("evaluating");function ae(e,t,n){let o=void 0;Object.defineProperty(e,t,{get(){if(o===VS)return;if(o===void 0)o=VS,o=n();return o},set(r){Object.defineProperty(e,t,{value:r})},configurable:!0})}function Kk(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function br(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function Ft(...e){let t={};for(let n of e){let o=Object.getOwnPropertyDescriptors(n);Object.assign(t,o)}return Object.defineProperties({},t)}function Gk(e){return Ft(e._zod.def)}function Bk(e,t){if(!t)return e;return t.reduce((n,o)=>n?.[o],e)}function Wk(e){let t=Object.keys(e),n=t.map((o)=>e[o]);return Promise.all(n).then((o)=>{let r={};for(let i=0;i<t.length;i++)r[t[i]]=o[i];return r})}function Yk(e=10){let n="";for(let o=0;o<e;o++)n+="abcdefghijklmnopqrstuvwxyz"[Math.floor(Math.random()*26)];return n}function Is(e){return JSON.stringify(e)}function Wd(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}var Ps="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function ln(e){return typeof e==="object"&&e!==null&&!Array.isArray(e)}var Yd=Fn(()=>{if(sn.jitless)return!1;if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return new Function(""),!0}catch(e){return!1}});function $r(e){if(ln(e)===!1)return!1;let t=e.constructor;if(t===void 0)return!0;if(typeof t!=="function")return!0;let n=t.prototype;if(ln(n)===!1)return!1;if(Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)return!1;return!0}function ki(e){if($r(e))return{...e};if(Array.isArray(e))return[...e];if(e instanceof Map)return new Map(e);if(e instanceof Set)return new Set(e);return e}function Xk(e){let t=0;for(let n in e)if(Object.prototype.hasOwnProperty.call(e,n))t++;return t}var Qk=(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":if(Array.isArray(e))return"array";if(e===null)return"null";if(e.then&&typeof e.then==="function"&&e.catch&&typeof e.catch==="function")return"promise";if(typeof Map<"u"&&e instanceof Map)return"map";if(typeof Set<"u"&&e instanceof Set)return"set";if(typeof Date<"u"&&e instanceof Date)return"date";if(typeof File<"u"&&e instanceof File)return"file";return"object";default:throw Error(`Unknown data type: ${t}`)}},Ii=new Set(["string","number","symbol"]),Xd=new Set(["string","number","bigint","boolean","symbol","undefined"]);function yt(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Je(e,t,n){let o=new e._zod.constr(t??e._zod.def);if(!t||n?.parent)o._zod.parent=e;return o}function w(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 Error("Cannot specify both `message` and `error` params");t.error=t.message}if(delete t.message,typeof t.error==="string")return{...t,error:()=>t.error};return t}function e0(e){let t;return new Proxy({},{get(n,o,r){return t??(t=e()),Reflect.get(t,o,r)},set(n,o,r,i){return t??(t=e()),Reflect.set(t,o,r,i)},has(n,o){return t??(t=e()),Reflect.has(t,o)},deleteProperty(n,o){return t??(t=e()),Reflect.deleteProperty(t,o)},ownKeys(n){return t??(t=e()),Reflect.ownKeys(t)},getOwnPropertyDescriptor(n,o){return t??(t=e()),Reflect.getOwnPropertyDescriptor(t,o)},defineProperty(n,o,r){return t??(t=e()),Reflect.defineProperty(t,o,r)}})}function k(e){if(typeof e==="bigint")return e.toString()+"n";if(typeof e==="string")return`"${e}"`;return`${e}`}function Qd(e){return Object.keys(e).filter((t)=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}var em={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-340282346638528860000000000000000000000,340282346638528860000000000000000000000],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},tm={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function FS(e,t){let n=e._zod.def,o=n.checks;if(o&&o.length>0)throw Error(".pick() cannot be used on object schemas containing refinements");let i=Ft(e._zod.def,{get shape(){let a={};for(let s in t){if(!(s in n.shape))throw Error(`Unrecognized key: "${s}"`);if(!t[s])continue;a[s]=n.shape[s]}return br(this,"shape",a),a},checks:[]});return Je(e,i)}function JS(e,t){let n=e._zod.def,o=n.checks;if(o&&o.length>0)throw Error(".omit() cannot be used on object schemas containing refinements");let i=Ft(e._zod.def,{get shape(){let a={...e._zod.def.shape};for(let s in t){if(!(s in n.shape))throw Error(`Unrecognized key: "${s}"`);if(!t[s])continue;delete a[s]}return br(this,"shape",a),a},checks:[]});return Je(e,i)}function HS(e,t){if(!$r(t))throw Error("Invalid input to extend: expected a plain object");let n=e._zod.def.checks;if(n&&n.length>0){let i=e._zod.def.shape;for(let a in t)if(Object.getOwnPropertyDescriptor(i,a)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let r=Ft(e._zod.def,{get shape(){let i={...e._zod.def.shape,...t};return br(this,"shape",i),i}});return Je(e,r)}function KS(e,t){if(!$r(t))throw Error("Invalid input to safeExtend: expected a plain object");let n=Ft(e._zod.def,{get shape(){let o={...e._zod.def.shape,...t};return br(this,"shape",o),o}});return Je(e,n)}function GS(e,t){if(e._zod.def.checks?.length)throw Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");let n=Ft(e._zod.def,{get shape(){let o={...e._zod.def.shape,...t._zod.def.shape};return br(this,"shape",o),o},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]});return Je(e,n)}function BS(e,t,n){let r=t._zod.def.checks;if(r&&r.length>0)throw Error(".partial() cannot be used on object schemas containing refinements");let a=Ft(t._zod.def,{get shape(){let s=t._zod.def.shape,c={...s};if(n)for(let l in n){if(!(l in s))throw Error(`Unrecognized key: "${l}"`);if(!n[l])continue;c[l]=e?new e({type:"optional",innerType:s[l]}):s[l]}else for(let l in s)c[l]=e?new e({type:"optional",innerType:s[l]}):s[l];return br(this,"shape",c),c},checks:[]});return Je(t,a)}function WS(e,t,n){let o=Ft(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let a in n){if(!(a in i))throw Error(`Unrecognized key: "${a}"`);if(!n[a])continue;i[a]=new e({type:"nonoptional",innerType:r[a]})}else for(let a in r)i[a]=new e({type:"nonoptional",innerType:r[a]});return br(this,"shape",i),i}});return Je(t,o)}function zr(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function rm(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue===!1)return!0;return!1}function tt(e,t){return t.map((n)=>{var o;return(o=n).path??(o.path=[]),n.path.unshift(e),n})}function wi(e){return typeof e==="string"?e:e?.message}function He(e,t,n){let o=e.message?e.message:wi(e.inst?._zod.def?.error?.(e))??wi(t?.error?.(e))??wi(n.customError?.(e))??wi(n.localeError?.(e))??"Invalid input",{inst:r,continue:i,input:a,...s}=e;if(s.path??(s.path=[]),s.message=o,t?.reportInput)s.input=a;return s}function Pi(e){if(e instanceof Set)return"set";if(e instanceof Map)return"map";if(e instanceof File)return"file";return"unknown"}function Ei(e){if(Array.isArray(e))return"array";if(typeof e==="string")return"string";return"unknown"}function I(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 n=e;if(n&&Object.getPrototypeOf(n)!==Object.prototype&&"constructor"in n&&n.constructor)return n.constructor.name}}return t}function wr(...e){let[t,n,o]=e;if(typeof t==="string")return{message:t,code:"custom",input:n,inst:o};return{...t}}function t0(e){return Object.entries(e).filter(([t,n])=>Number.isNaN(Number.parseInt(t,10))).map((t)=>t[1])}function YS(e){let t=atob(e),n=new Uint8Array(t.length);for(let o=0;o<t.length;o++)n[o]=t.charCodeAt(o);return n}function XS(e){let t="";for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return btoa(t)}function r0(e){let t=e.replace(/-/g,"+").replace(/_/g,"/"),n="=".repeat((4-t.length%4)%4);return YS(t+n)}function n0(e){return XS(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function o0(e){let t=e.replace(/^0x/,"");if(t.length%2!==0)throw Error("Invalid hex string length");let n=new Uint8Array(t.length/2);for(let o=0;o<t.length;o+=2)n[o/2]=Number.parseInt(t.slice(o,o+2),16);return n}function i0(e){return Array.from(e).map((t)=>t.toString(16).padStart(2,"0")).join("")}class QS{constructor(...e){}}var ey=(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,Vn,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Ti=_("$ZodError",ey),rt=_("$ZodError",ey,{Parent:Error});function ji(e,t=(n)=>n.message){let n={},o=[];for(let r of e.issues)if(r.path.length>0)n[r.path[0]]=n[r.path[0]]||[],n[r.path[0]].push(t(r));else o.push(t(r));return{formErrors:o,fieldErrors:n}}function Oi(e,t=(n)=>n.message){let n={_errors:[]},o=(r,i=[])=>{for(let a of r.issues)if(a.code==="invalid_union"&&a.errors.length)a.errors.map((s)=>o({issues:s},[...i,...a.path]));else if(a.code==="invalid_key")o({issues:a.issues},[...i,...a.path]);else if(a.code==="invalid_element")o({issues:a.issues},[...i,...a.path]);else{let s=[...i,...a.path];if(s.length===0)n._errors.push(t(a));else{let c=n,l=0;while(l<s.length){let d=s[l];if(l!==s.length-1)c[d]=c[d]||{_errors:[]};else c[d]=c[d]||{_errors:[]},c[d]._errors.push(t(a));c=c[d],l++}}}};return o(e),n}function nm(e,t=(n)=>n.message){let n={errors:[]},o=(r,i=[])=>{var a,s;for(let c of r.issues)if(c.code==="invalid_union"&&c.errors.length)c.errors.map((l)=>o({issues:l},[...i,...c.path]));else if(c.code==="invalid_key")o({issues:c.issues},[...i,...c.path]);else if(c.code==="invalid_element")o({issues:c.issues},[...i,...c.path]);else{let l=[...i,...c.path];if(l.length===0){n.errors.push(t(c));continue}let d=n,m=0;while(m<l.length){let p=l[m],f=m===l.length-1;if(typeof p==="string")d.properties??(d.properties={}),(a=d.properties)[p]??(a[p]={errors:[]}),d=d.properties[p];else d.items??(d.items=[]),(s=d.items)[p]??(s[p]={errors:[]}),d=d.items[p];if(f)d.errors.push(t(c));m++}}};return o(e),n}function ty(e){let t=[],n=e.map((o)=>typeof o==="object"?o.key:o);for(let o of n)if(typeof o==="number")t.push(`[${o}]`);else if(typeof o==="symbol")t.push(`[${JSON.stringify(String(o))}]`);else if(/[^\w$]/.test(o))t.push(`[${JSON.stringify(o)}]`);else{if(t.length)t.push(".");t.push(o)}return t.join("")}function om(e){let t=[],n=[...e.issues].sort((o,r)=>(o.path??[]).length-(r.path??[]).length);for(let o of n)if(t.push(`✖ ${o.message}`),o.path?.length)t.push(` → at ${ty(o.path)}`);return t.join(`
|
|
10
|
+
`)}var Jn=(e)=>(t,n,o,r)=>{let i=o?{...o,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new Vt;if(a.issues.length){let s=new(r?.Err??e)(a.issues.map((c)=>He(c,i,be())));throw Ps(s,r?.callee),s}return a.value},Es=Jn(rt),Hn=(e)=>async(t,n,o,r)=>{let i=o?{...o,async:!0}:{async:!0},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)a=await a;if(a.issues.length){let s=new(r?.Err??e)(a.issues.map((c)=>He(c,i,be())));throw Ps(s,r?.callee),s}return a.value},Ts=Hn(rt),Kn=(e)=>(t,n,o)=>{let r=o?{...o,async:!1}:{async:!1},i=t._zod.run({value:n,issues:[]},r);if(i instanceof Promise)throw new Vt;return i.issues.length?{success:!1,error:new(e??Ti)(i.issues.map((a)=>He(a,r,be())))}:{success:!0,data:i.value}},im=Kn(rt),Gn=(e)=>async(t,n,o)=>{let r=o?{...o,async:!0}:{async:!0},i=t._zod.run({value:n,issues:[]},r);if(i instanceof Promise)i=await i;return i.issues.length?{success:!1,error:new e(i.issues.map((a)=>He(a,r,be())))}:{success:!0,data:i.value}},am=Gn(rt),js=(e)=>(t,n,o)=>{let r=o?{...o,direction:"backward"}:{direction:"backward"};return Jn(e)(t,n,r)},s0=js(rt),Os=(e)=>(t,n,o)=>Jn(e)(t,n,o),c0=Os(rt),Ns=(e)=>async(t,n,o)=>{let r=o?{...o,direction:"backward"}:{direction:"backward"};return Hn(e)(t,n,r)},l0=Ns(rt),Cs=(e)=>async(t,n,o)=>Hn(e)(t,n,o),u0=Cs(rt),qs=(e)=>(t,n,o)=>{let r=o?{...o,direction:"backward"}:{direction:"backward"};return Kn(e)(t,n,r)},d0=qs(rt),As=(e)=>(t,n,o)=>Kn(e)(t,n,o),m0=As(rt),Ms=(e)=>async(t,n,o)=>{let r=o?{...o,direction:"backward"}:{direction:"backward"};return Gn(e)(t,n,r)},p0=Ms(rt),Us=(e)=>async(t,n,o)=>Gn(e)(t,n,o),f0=Us(rt);var rr={};tr(rr,{base64:()=>$m,base64url:()=>Ds,bigint:()=>Im,boolean:()=>Em,browserEmail:()=>$0,cidrv4:()=>ym,cidrv6:()=>bm,cuid:()=>sm,cuid2:()=>cm,date:()=>wm,datetime:()=>xm,domain:()=>oy,duration:()=>pm,e164:()=>zm,email:()=>hm,emoji:()=>gm,extendedDuration:()=>h0,guid:()=>fm,hex:()=>sy,hostname:()=>ny,html5Email:()=>S0,httpProtocol:()=>Ls,idnEmail:()=>b0,integer:()=>Pm,ipv4:()=>vm,ipv6:()=>_m,ksuid:()=>dm,lowercase:()=>Om,mac:()=>Sm,md5_base64:()=>R0,md5_base64url:()=>x0,md5_hex:()=>w0,nanoid:()=>mm,null:()=>Tm,number:()=>Zs,rfc5322Email:()=>y0,sha1_base64:()=>I0,sha1_base64url:()=>P0,sha1_hex:()=>k0,sha256_base64:()=>T0,sha256_base64url:()=>j0,sha256_hex:()=>E0,sha384_base64:()=>N0,sha384_base64url:()=>C0,sha384_hex:()=>O0,sha512_base64:()=>A0,sha512_base64url:()=>M0,sha512_hex:()=>q0,string:()=>km,time:()=>Rm,ulid:()=>lm,undefined:()=>jm,unicodeEmail:()=>ry,uppercase:()=>Nm,uuid:()=>un,uuid4:()=>g0,uuid6:()=>v0,uuid7:()=>_0,xid:()=>um});var sm=/^[cC][0-9a-z]{6,}$/,cm=/^[0-9a-z]+$/,lm=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,um=/^[0-9a-vA-V]{20}$/,dm=/^[A-Za-z0-9]{27}$/,mm=/^[a-zA-Z0-9_-]{21}$/,pm=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,h0=/^[-+]?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)?)??$/,fm=/^([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})$/,un=(e)=>{if(!e)return/^([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)$/;return 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})$`)},g0=un(4),v0=un(6),_0=un(7),hm=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,S0=/^[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])?)*$/,y0=/^(([^<>()\[\]\\.,;:\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,}))$/,ry=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,b0=ry,$0=/^[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])?)*$/,z0="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function gm(){return new RegExp(z0,"u")}var vm=/^(?:(?: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])$/,_m=/^(([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}|:))$/,Sm=(e)=>{let t=yt(e??":");return new RegExp(`^(?:[0-9A-F]{2}${t}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${t}){5}[0-9a-f]{2}$`)},ym=/^((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])$/,bm=/^(([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])$/,$m=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Ds=/^[A-Za-z0-9_-]*$/,ny=/^(?=.{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])?)*\.?$/,oy=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,Ls=/^https?$/,zm=/^\+[1-9]\d{6,14}$/,iy="(?:(?:\\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])))",wm=new RegExp(`^${iy}$`);function ay(e){return typeof e.precision==="number"?e.precision===-1?"(?:[01]\\d|2[0-3]):[0-5]\\d":e.precision===0?"(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d":`(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d\\.\\d{${e.precision}}`:"(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?"}function Rm(e){return new RegExp(`^${ay(e)}$`)}function xm(e){let t=ay({precision:e.precision}),n=["Z"];if(e.local)n.push("");if(e.offset)n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let o=`${t}(?:${n.join("|")})`;return new RegExp(`^${iy}T(?:${o})$`)}var km=(e)=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},Im=/^-?\d+n?$/,Pm=/^-?\d+$/,Zs=/^-?\d+(?:\.\d+)?$/,Em=/^(?:true|false)$/i,Tm=/^null$/i;var jm=/^undefined$/i;var Om=/^[^A-Z]*$/,Nm=/^[^a-z]*$/,sy=/^[0-9a-fA-F]*$/;function Ni(e,t){return new RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}function Ci(e){return new RegExp(`^[A-Za-z0-9_-]{${e}}$`)}var w0=/^[0-9a-fA-F]{32}$/,R0=Ni(22,"=="),x0=Ci(22),k0=/^[0-9a-fA-F]{40}$/,I0=Ni(27,"="),P0=Ci(27),E0=/^[0-9a-fA-F]{64}$/,T0=Ni(43,"="),j0=Ci(43),O0=/^[0-9a-fA-F]{96}$/,N0=Ni(64,""),C0=Ci(64),q0=/^[0-9a-fA-F]{128}$/,A0=Ni(86,"=="),M0=Ci(86);var ge=_("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),ly={number:"number",bigint:"bigint",object:"date"},Vs=_("$ZodCheckLessThan",(e,t)=>{ge.init(e,t);let n=ly[typeof t.value];e._zod.onattach.push((o)=>{let r=o._zod.bag,i=(t.inclusive?r.maximum:r.exclusiveMaximum)??Number.POSITIVE_INFINITY;if(t.value<i)if(t.inclusive)r.maximum=t.value;else r.exclusiveMaximum=t.value}),e._zod.check=(o)=>{if(t.inclusive?o.value<=t.value:o.value<t.value)return;o.issues.push({origin:n,code:"too_big",maximum:typeof t.value==="object"?t.value.getTime():t.value,input:o.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Fs=_("$ZodCheckGreaterThan",(e,t)=>{ge.init(e,t);let n=ly[typeof t.value];e._zod.onattach.push((o)=>{let r=o._zod.bag,i=(t.inclusive?r.minimum:r.exclusiveMinimum)??Number.NEGATIVE_INFINITY;if(t.value>i)if(t.inclusive)r.minimum=t.value;else r.exclusiveMinimum=t.value}),e._zod.check=(o)=>{if(t.inclusive?o.value>=t.value:o.value>t.value)return;o.issues.push({origin:n,code:"too_small",minimum:typeof t.value==="object"?t.value.getTime():t.value,input:o.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Cm=_("$ZodCheckMultipleOf",(e,t)=>{ge.init(e,t),e._zod.onattach.push((n)=>{var o;(o=n._zod.bag).multipleOf??(o.multipleOf=t.value)}),e._zod.check=(n)=>{if(typeof n.value!==typeof t.value)throw Error("Cannot mix number and bigint in multiple_of check.");if(typeof n.value==="bigint"?n.value%t.value===BigInt(0):Bd(n.value,t.value)===0)return;n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),qm=_("$ZodCheckNumberFormat",(e,t)=>{ge.init(e,t),t.format=t.format||"float64";let n=t.format?.includes("int"),o=n?"int":"number",[r,i]=em[t.format];e._zod.onattach.push((a)=>{let s=a._zod.bag;if(s.format=t.format,s.minimum=r,s.maximum=i,n)s.pattern=Pm}),e._zod.check=(a)=>{let s=a.value;if(n){if(!Number.isInteger(s)){a.issues.push({expected:o,format:t.format,code:"invalid_type",continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){if(s>0)a.issues.push({input:s,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:o,inclusive:!0,continue:!t.abort});else a.issues.push({input:s,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:o,inclusive:!0,continue:!t.abort});return}}if(s<r)a.issues.push({origin:"number",input:s,code:"too_small",minimum:r,inclusive:!0,inst:e,continue:!t.abort});if(s>i)a.issues.push({origin:"number",input:s,code:"too_big",maximum:i,inclusive:!0,inst:e,continue:!t.abort})}}),Am=_("$ZodCheckBigIntFormat",(e,t)=>{ge.init(e,t);let[n,o]=tm[t.format];e._zod.onattach.push((r)=>{let i=r._zod.bag;i.format=t.format,i.minimum=n,i.maximum=o}),e._zod.check=(r)=>{let i=r.value;if(i<n)r.issues.push({origin:"bigint",input:i,code:"too_small",minimum:n,inclusive:!0,inst:e,continue:!t.abort});if(i>o)r.issues.push({origin:"bigint",input:i,code:"too_big",maximum:o,inclusive:!0,inst:e,continue:!t.abort})}}),Mm=_("$ZodCheckMaxSize",(e,t)=>{var n;ge.init(e,t),(n=e._zod.def).when??(n.when=(o)=>{let r=o.value;return!yr(r)&&r.size!==void 0}),e._zod.onattach.push((o)=>{let r=o._zod.bag.maximum??Number.POSITIVE_INFINITY;if(t.maximum<r)o._zod.bag.maximum=t.maximum}),e._zod.check=(o)=>{let r=o.value;if(r.size<=t.maximum)return;o.issues.push({origin:Pi(r),code:"too_big",maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Um=_("$ZodCheckMinSize",(e,t)=>{var n;ge.init(e,t),(n=e._zod.def).when??(n.when=(o)=>{let r=o.value;return!yr(r)&&r.size!==void 0}),e._zod.onattach.push((o)=>{let r=o._zod.bag.minimum??Number.NEGATIVE_INFINITY;if(t.minimum>r)o._zod.bag.minimum=t.minimum}),e._zod.check=(o)=>{let r=o.value;if(r.size>=t.minimum)return;o.issues.push({origin:Pi(r),code:"too_small",minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Dm=_("$ZodCheckSizeEquals",(e,t)=>{var n;ge.init(e,t),(n=e._zod.def).when??(n.when=(o)=>{let r=o.value;return!yr(r)&&r.size!==void 0}),e._zod.onattach.push((o)=>{let r=o._zod.bag;r.minimum=t.size,r.maximum=t.size,r.size=t.size}),e._zod.check=(o)=>{let r=o.value,i=r.size;if(i===t.size)return;let a=i>t.size;o.issues.push({origin:Pi(r),...a?{code:"too_big",maximum:t.size}:{code:"too_small",minimum:t.size},inclusive:!0,exact:!0,input:o.value,inst:e,continue:!t.abort})}}),Lm=_("$ZodCheckMaxLength",(e,t)=>{var n;ge.init(e,t),(n=e._zod.def).when??(n.when=(o)=>{let r=o.value;return!yr(r)&&r.length!==void 0}),e._zod.onattach.push((o)=>{let r=o._zod.bag.maximum??Number.POSITIVE_INFINITY;if(t.maximum<r)o._zod.bag.maximum=t.maximum}),e._zod.check=(o)=>{let r=o.value;if(r.length<=t.maximum)return;let a=Ei(r);o.issues.push({origin:a,code:"too_big",maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Zm=_("$ZodCheckMinLength",(e,t)=>{var n;ge.init(e,t),(n=e._zod.def).when??(n.when=(o)=>{let r=o.value;return!yr(r)&&r.length!==void 0}),e._zod.onattach.push((o)=>{let r=o._zod.bag.minimum??Number.NEGATIVE_INFINITY;if(t.minimum>r)o._zod.bag.minimum=t.minimum}),e._zod.check=(o)=>{let r=o.value;if(r.length>=t.minimum)return;let a=Ei(r);o.issues.push({origin:a,code:"too_small",minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Vm=_("$ZodCheckLengthEquals",(e,t)=>{var n;ge.init(e,t),(n=e._zod.def).when??(n.when=(o)=>{let r=o.value;return!yr(r)&&r.length!==void 0}),e._zod.onattach.push((o)=>{let r=o._zod.bag;r.minimum=t.length,r.maximum=t.length,r.length=t.length}),e._zod.check=(o)=>{let r=o.value,i=r.length;if(i===t.length)return;let a=Ei(r),s=i>t.length;o.issues.push({origin:a,...s?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:o.value,inst:e,continue:!t.abort})}}),Bn=_("$ZodCheckStringFormat",(e,t)=>{var n,o;if(ge.init(e,t),e._zod.onattach.push((r)=>{let i=r._zod.bag;if(i.format=t.format,t.pattern)i.patterns??(i.patterns=new Set),i.patterns.add(t.pattern)}),t.pattern)(n=e._zod).check??(n.check=(r)=>{if(t.pattern.lastIndex=0,t.pattern.test(r.value))return;r.issues.push({origin:"string",code:"invalid_format",format:t.format,input:r.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})});else(o=e._zod).check??(o.check=()=>{})}),Fm=_("$ZodCheckRegex",(e,t)=>{Bn.init(e,t),e._zod.check=(n)=>{if(t.pattern.lastIndex=0,t.pattern.test(n.value))return;n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),Jm=_("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=Om),Bn.init(e,t)}),Hm=_("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=Nm),Bn.init(e,t)}),Km=_("$ZodCheckIncludes",(e,t)=>{ge.init(e,t);let n=yt(t.includes),o=new RegExp(typeof t.position==="number"?`^.{${t.position}}${n}`:n);t.pattern=o,e._zod.onattach.push((r)=>{let i=r._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(o)}),e._zod.check=(r)=>{if(r.value.includes(t.includes,t.position))return;r.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:r.value,inst:e,continue:!t.abort})}}),Gm=_("$ZodCheckStartsWith",(e,t)=>{ge.init(e,t);let n=new RegExp(`^${yt(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push((o)=>{let r=o._zod.bag;r.patterns??(r.patterns=new Set),r.patterns.add(n)}),e._zod.check=(o)=>{if(o.value.startsWith(t.prefix))return;o.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:o.value,inst:e,continue:!t.abort})}}),Bm=_("$ZodCheckEndsWith",(e,t)=>{ge.init(e,t);let n=new RegExp(`.*${yt(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push((o)=>{let r=o._zod.bag;r.patterns??(r.patterns=new Set),r.patterns.add(n)}),e._zod.check=(o)=>{if(o.value.endsWith(t.suffix))return;o.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:o.value,inst:e,continue:!t.abort})}});function cy(e,t,n){if(e.issues.length)t.issues.push(...tt(n,e.issues))}var Wm=_("$ZodCheckProperty",(e,t)=>{ge.init(e,t),e._zod.check=(n)=>{let o=t.schema._zod.run({value:n.value[t.property],issues:[]},{});if(o instanceof Promise)return o.then((r)=>cy(r,n,t.property));cy(o,n,t.property);return}}),Ym=_("$ZodCheckMimeType",(e,t)=>{ge.init(e,t);let n=new Set(t.mime);e._zod.onattach.push((o)=>{o._zod.bag.mime=t.mime}),e._zod.check=(o)=>{if(n.has(o.value.type))return;o.issues.push({code:"invalid_value",values:t.mime,input:o.value.type,inst:e,continue:!t.abort})}}),Xm=_("$ZodCheckOverwrite",(e,t)=>{ge.init(e,t),e._zod.check=(n)=>{n.value=t.tx(n.value)}});class Js{constructor(e=[]){if(this.content=[],this.indent=0,this)this.args=e}indented(e){this.indent+=1,e(this),this.indent-=1}write(e){if(typeof e==="function"){e(this,{execution:"sync"}),e(this,{execution:"async"});return}let n=e.split(`
|
|
11
11
|
`).filter((i)=>i),o=Math.min(...n.map((i)=>i.length-i.trimStart().length)),r=n.map((i)=>i.slice(o)).map((i)=>" ".repeat(this.indent*2)+i);for(let i of r)this.content.push(i)}compile(){let e=Function,t=this?.args,o=[...(this?.content??[""]).map((r)=>` ${r}`)];return new e(...t,o.join(`
|
|
12
|
-
`))}}var Ym={major:4,minor:4,patch:3};var Q=_("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Ym;let o=[...e._zod.def.checks??[]];if(e._zod.traits.has("$ZodCheck"))o.unshift(e);for(let r of o)for(let i of r._zod.onattach)i(e);if(o.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let r=(a,s,c)=>{let l=wr(a),d;for(let m of s){if(m._zod.def.when){if(Qd(a))continue;if(!m._zod.def.when(a))continue}else if(l)continue;let p=a.issues.length,f=m._zod.check(a);if(f instanceof Promise&&c?.async===!1)throw new Jt;if(d||f instanceof Promise)d=(d??Promise.resolve()).then(async()=>{if(await f,a.issues.length===p)return;if(!l)l=wr(a,p)});else{if(a.issues.length===p)continue;if(!l)l=wr(a,p)}}if(d)return d.then(()=>a);return a},i=(a,s,c)=>{if(wr(a))return a.aborted=!0,a;let l=r(s,o,c);if(l instanceof Promise){if(c.async===!1)throw new Jt;return l.then((d)=>e._zod.parse(d,c))}return e._zod.parse(l,c)};e._zod.run=(a,s)=>{if(s.skipChecks)return e._zod.parse(a,s);if(s.direction==="backward"){let l=e._zod.parse({value:a.value,issues:[]},{...s,skipChecks:!0});if(l instanceof Promise)return l.then((d)=>i(d,a,s));return i(l,a,s)}let c=e._zod.parse(a,s);if(c instanceof Promise){if(s.async===!1)throw new Jt;return c.then((l)=>r(l,o,s))}return r(c,o,s)}}se(e,"~standard",()=>({validate:(r)=>{try{let i=rm(e,r);return i.success?{value:i.data}:{issues:i.error?.issues}}catch(i){return nm(e,r).then((a)=>a.success?{value:a.data}:{issues:a.error?.issues})}},vendor:"zod",version:1}))}),un=_("$ZodString",(e,t)=>{Q.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??Rm(e._zod.bag),e._zod.parse=(n,o)=>{if(t.coerce)try{n.value=String(n.value)}catch(r){}if(typeof n.value==="string")return n;return n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:e}),n}}),fe=_("$ZodStringFormat",(e,t)=>{Gn.init(e,t),un.init(e,t)}),Qm=_("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=dm),fe.init(e,t)}),ep=_("$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 Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=ln(o))}else t.pattern??(t.pattern=ln());fe.init(e,t)}),tp=_("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=mm),fe.init(e,t)}),rp=_("$ZodURL",(e,t)=>{fe.init(e,t),e._zod.check=(n)=>{try{let o=n.value.trim();if(!t.normalize&&t.protocol?.source===ym.source){if(!/^https?:\/\//i.test(o)){n.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:n.value,inst:e,continue:!t.abort});return}}let r=new URL(o);if(t.hostname){if(t.hostname.lastIndex=0,!t.hostname.test(r.hostname))n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})}if(t.protocol){if(t.protocol.lastIndex=0,!t.protocol.test(r.protocol.endsWith(":")?r.protocol.slice(0,-1):r.protocol))n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})}if(t.normalize)n.value=r.href;else n.value=o;return}catch(o){n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),np=_("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=pm()),fe.init(e,t)}),op=_("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=lm),fe.init(e,t)}),ip=_("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=om),fe.init(e,t)}),ap=_("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=im),fe.init(e,t)}),sp=_("$ZodULID",(e,t)=>{t.pattern??(t.pattern=am),fe.init(e,t)}),cp=_("$ZodXID",(e,t)=>{t.pattern??(t.pattern=sm),fe.init(e,t)}),lp=_("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=cm),fe.init(e,t)}),up=_("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=wm(t)),fe.init(e,t)}),dp=_("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=$m),fe.init(e,t)}),mp=_("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=zm(t)),fe.init(e,t)}),pp=_("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=um),fe.init(e,t)}),fp=_("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=fm),fe.init(e,t),e._zod.bag.format="ipv4"}),hp=_("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=hm),fe.init(e,t),e._zod.bag.format="ipv6",e._zod.check=(n)=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}}),gp=_("$ZodMAC",(e,t)=>{t.pattern??(t.pattern=gm(t.delimiter)),fe.init(e,t),e._zod.bag.format="mac"}),vp=_("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=vm),fe.init(e,t)}),_p=_("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=_m),fe.init(e,t),e._zod.check=(n)=>{let o=n.value.split("/");try{if(o.length!==2)throw Error();let[r,i]=o;if(!i)throw Error();let a=Number(i);if(`${a}`!==i)throw Error();if(a<0||a>128)throw Error();new URL(`http://[${r}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}}});function Sp(e){if(e==="")return!0;if(/\s/.test(e))return!1;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}var yp=_("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=Sm),fe.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=(n)=>{if(Sp(n.value))return;n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});function fy(e){if(!Ds.test(e))return!1;let t=e.replace(/[-_]/g,(o)=>o==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return Sp(n)}var bp=_("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=Ds),fe.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=(n)=>{if(fy(n.value))return;n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),$p=_("$ZodE164",(e,t)=>{t.pattern??(t.pattern=bm),fe.init(e,t)});function hy(e,t=null){try{let n=e.split(".");if(n.length!==3)return!1;let[o]=n;if(!o)return!1;let r=JSON.parse(atob(o));if("typ"in r&&r?.typ!=="JWT")return!1;if(!r.alg)return!1;if(t&&(!("alg"in r)||r.alg!==t))return!1;return!0}catch{return!1}}var zp=_("$ZodJWT",(e,t)=>{fe.init(e,t),e._zod.check=(n)=>{if(hy(n.value,t.alg))return;n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),wp=_("$ZodCustomStringFormat",(e,t)=>{fe.init(e,t),e._zod.check=(n)=>{if(t.fn(n.value))return;n.issues.push({code:"invalid_format",format:t.format,input:n.value,inst:e,continue:!t.abort})}}),Gs=_("$ZodNumber",(e,t)=>{Q.init(e,t),e._zod.pattern=e._zod.bag.pattern??ji,e._zod.parse=(n,o)=>{if(t.coerce)try{n.value=Number(n.value)}catch(a){}let r=n.value;if(typeof r==="number"&&!Number.isNaN(r)&&Number.isFinite(r))return n;let i=typeof r==="number"?Number.isNaN(r)?"NaN":!Number.isFinite(r)?"Infinity":void 0:void 0;return n.issues.push({expected:"number",code:"invalid_type",input:r,inst:e,...i?{received:i}:{}}),n}}),Rp=_("$ZodNumberFormat",(e,t)=>{Nm.init(e,t),Gs.init(e,t)}),Ci=_("$ZodBoolean",(e,t)=>{Q.init(e,t),e._zod.pattern=Im,e._zod.parse=(n,o)=>{if(t.coerce)try{n.value=Boolean(n.value)}catch(i){}let r=n.value;if(typeof r==="boolean")return n;return n.issues.push({expected:"boolean",code:"invalid_type",input:r,inst:e}),n}}),Bs=_("$ZodBigInt",(e,t)=>{Q.init(e,t),e._zod.pattern=xm,e._zod.parse=(n,o)=>{if(t.coerce)try{n.value=BigInt(n.value)}catch(r){}if(typeof n.value==="bigint")return n;return n.issues.push({expected:"bigint",code:"invalid_type",input:n.value,inst:e}),n}}),xp=_("$ZodBigIntFormat",(e,t)=>{Cm.init(e,t),Bs.init(e,t)}),kp=_("$ZodSymbol",(e,t)=>{Q.init(e,t),e._zod.parse=(n,o)=>{let r=n.value;if(typeof r==="symbol")return n;return n.issues.push({expected:"symbol",code:"invalid_type",input:r,inst:e}),n}}),Ip=_("$ZodUndefined",(e,t)=>{Q.init(e,t),e._zod.pattern=Em,e._zod.values=new Set([void 0]),e._zod.parse=(n,o)=>{let r=n.value;if(typeof r>"u")return n;return n.issues.push({expected:"undefined",code:"invalid_type",input:r,inst:e}),n}}),Pp=_("$ZodNull",(e,t)=>{Q.init(e,t),e._zod.pattern=Pm,e._zod.values=new Set([null]),e._zod.parse=(n,o)=>{let r=n.value;if(r===null)return n;return n.issues.push({expected:"null",code:"invalid_type",input:r,inst:e}),n}}),Ep=_("$ZodAny",(e,t)=>{Q.init(e,t),e._zod.parse=(n)=>n}),Tp=_("$ZodUnknown",(e,t)=>{Q.init(e,t),e._zod.parse=(n)=>n}),jp=_("$ZodNever",(e,t)=>{Q.init(e,t),e._zod.parse=(n,o)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)}),Op=_("$ZodVoid",(e,t)=>{Q.init(e,t),e._zod.parse=(n,o)=>{let r=n.value;if(typeof r>"u")return n;return n.issues.push({expected:"void",code:"invalid_type",input:r,inst:e}),n}}),Np=_("$ZodDate",(e,t)=>{Q.init(e,t),e._zod.parse=(n,o)=>{if(t.coerce)try{n.value=new Date(n.value)}catch(s){}let r=n.value,i=r instanceof Date;if(i&&!Number.isNaN(r.getTime()))return n;return n.issues.push({expected:"date",code:"invalid_type",input:r,...i?{received:"Invalid Date"}:{},inst:e}),n}});function ey(e,t,n){if(e.issues.length)t.issues.push(...tt(n,e.issues));t.value[n]=e.value}var Cp=_("$ZodArray",(e,t)=>{Q.init(e,t),e._zod.parse=(n,o)=>{let r=n.value;if(!Array.isArray(r))return n.issues.push({expected:"array",code:"invalid_type",input:r,inst:e}),n;n.value=Array(r.length);let i=[];for(let a=0;a<r.length;a++){let s=r[a],c=t.element._zod.run({value:s,issues:[]},o);if(c instanceof Promise)i.push(c.then((l)=>ey(l,n,a)));else ey(c,n,a)}if(i.length)return Promise.all(i).then(()=>n);return n}});function Ks(e,t,n,o,r,i){let a=n in o;if(e.issues.length){if(r&&i&&!a)return;t.issues.push(...tt(n,e.issues))}if(!a&&!r){if(!e.issues.length)t.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[n]});return}if(e.value===void 0){if(a)t.value[n]=void 0}else t.value[n]=e.value}function gy(e){let t=Object.keys(e.shape);for(let o of t)if(!e.shape?.[o]?._zod?.traits?.has("$ZodType"))throw Error(`Invalid element at key "${o}": expected a Zod schema`);let n=Wd(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function vy(e,t,n,o,r,i){let a=[],s=r.keySet,c=r.catchall._zod,l=c.def.type,d=c.optin==="optional",m=c.optout==="optional";for(let p in t){if(p==="__proto__")continue;if(s.has(p))continue;if(l==="never"){a.push(p);continue}let f=c.run({value:t[p],issues:[]},o);if(f instanceof Promise)e.push(f.then((v)=>Ks(v,n,p,t,d,m)));else Ks(f,n,p,t,d,m)}if(a.length)n.issues.push({code:"unrecognized_keys",keys:a,input:t,inst:i});if(!e.length)return n;return Promise.all(e).then(()=>n)}var _y=_("$ZodObject",(e,t)=>{if(Q.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){let s=t.shape;Object.defineProperty(t,"shape",{get:()=>{let c={...s};return Object.defineProperty(t,"shape",{value:c}),c}})}let o=Zn(()=>gy(t));se(e._zod,"propValues",()=>{let s=t.shape,c={};for(let l in s){let d=s[l]._zod;if(d.values){c[l]??(c[l]=new Set);for(let m of d.values)c[l].add(m)}}return c});let r=cn,i=t.catchall,a;e._zod.parse=(s,c)=>{a??(a=o.value);let l=s.value;if(!r(l))return s.issues.push({expected:"object",code:"invalid_type",input:l,inst:e}),s;s.value={};let d=[],m=a.shape;for(let p of a.keys){let f=m[p],v=f._zod.optin==="optional",g=f._zod.optout==="optional",b=f._zod.run({value:l[p],issues:[]},c);if(b instanceof Promise)d.push(b.then((w)=>Ks(w,s,p,l,v,g)));else Ks(b,s,p,l,v,g)}if(!i)return d.length?Promise.all(d).then(()=>s):s;return vy(d,l,s,c,o.value,e)}}),qp=_("$ZodObjectJIT",(e,t)=>{_y.init(e,t);let n=e._zod.parse,o=Zn(()=>gy(t)),r=(p)=>{let f=new Vs(["shape","payload","ctx"]),v=o.value,g=(E)=>{let L=Is(E);return`shape[${L}]._zod.run({ value: input[${L}], issues: [] }, ctx)`};f.write("const input = payload.value;");let b=Object.create(null),w=0;for(let E of v.keys)b[E]=`key_${w++}`;f.write("const newResult = {};");for(let E of v.keys){let L=b[E],T=Is(E),ne=p[E],ue=ne?._zod?.optin==="optional",Oe=ne?._zod?.optout==="optional";if(f.write(`const ${L} = ${g(E)};`),ue&&Oe)f.write(`
|
|
13
|
-
if (${
|
|
14
|
-
if (${
|
|
15
|
-
payload.issues = payload.issues.concat(${
|
|
12
|
+
`))}}var Qm={major:4,minor:4,patch:3};var Q=_("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Qm;let o=[...e._zod.def.checks??[]];if(e._zod.traits.has("$ZodCheck"))o.unshift(e);for(let r of o)for(let i of r._zod.onattach)i(e);if(o.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let r=(a,s,c)=>{let l=zr(a),d;for(let m of s){if(m._zod.def.when){if(rm(a))continue;if(!m._zod.def.when(a))continue}else if(l)continue;let p=a.issues.length,f=m._zod.check(a);if(f instanceof Promise&&c?.async===!1)throw new Vt;if(d||f instanceof Promise)d=(d??Promise.resolve()).then(async()=>{if(await f,a.issues.length===p)return;if(!l)l=zr(a,p)});else{if(a.issues.length===p)continue;if(!l)l=zr(a,p)}}if(d)return d.then(()=>a);return a},i=(a,s,c)=>{if(zr(a))return a.aborted=!0,a;let l=r(s,o,c);if(l instanceof Promise){if(c.async===!1)throw new Vt;return l.then((d)=>e._zod.parse(d,c))}return e._zod.parse(l,c)};e._zod.run=(a,s)=>{if(s.skipChecks)return e._zod.parse(a,s);if(s.direction==="backward"){let l=e._zod.parse({value:a.value,issues:[]},{...s,skipChecks:!0});if(l instanceof Promise)return l.then((d)=>i(d,a,s));return i(l,a,s)}let c=e._zod.parse(a,s);if(c instanceof Promise){if(s.async===!1)throw new Vt;return c.then((l)=>r(l,o,s))}return r(c,o,s)}}ae(e,"~standard",()=>({validate:(r)=>{try{let i=im(e,r);return i.success?{value:i.data}:{issues:i.error?.issues}}catch(i){return am(e,r).then((a)=>a.success?{value:a.data}:{issues:a.error?.issues})}},vendor:"zod",version:1}))}),dn=_("$ZodString",(e,t)=>{Q.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??km(e._zod.bag),e._zod.parse=(n,o)=>{if(t.coerce)try{n.value=String(n.value)}catch(r){}if(typeof n.value==="string")return n;return n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:e}),n}}),fe=_("$ZodStringFormat",(e,t)=>{Bn.init(e,t),dn.init(e,t)}),tp=_("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=fm),fe.init(e,t)}),rp=_("$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 Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=un(o))}else t.pattern??(t.pattern=un());fe.init(e,t)}),np=_("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=hm),fe.init(e,t)}),op=_("$ZodURL",(e,t)=>{fe.init(e,t),e._zod.check=(n)=>{try{let o=n.value.trim();if(!t.normalize&&t.protocol?.source===Ls.source){if(!/^https?:\/\//i.test(o)){n.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:n.value,inst:e,continue:!t.abort});return}}let r=new URL(o);if(t.hostname){if(t.hostname.lastIndex=0,!t.hostname.test(r.hostname))n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})}if(t.protocol){if(t.protocol.lastIndex=0,!t.protocol.test(r.protocol.endsWith(":")?r.protocol.slice(0,-1):r.protocol))n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})}if(t.normalize)n.value=r.href;else n.value=o;return}catch(o){n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),ip=_("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=gm()),fe.init(e,t)}),ap=_("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=mm),fe.init(e,t)}),sp=_("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=sm),fe.init(e,t)}),cp=_("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=cm),fe.init(e,t)}),lp=_("$ZodULID",(e,t)=>{t.pattern??(t.pattern=lm),fe.init(e,t)}),up=_("$ZodXID",(e,t)=>{t.pattern??(t.pattern=um),fe.init(e,t)}),dp=_("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=dm),fe.init(e,t)}),mp=_("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=xm(t)),fe.init(e,t)}),pp=_("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=wm),fe.init(e,t)}),fp=_("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=Rm(t)),fe.init(e,t)}),hp=_("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=pm),fe.init(e,t)}),gp=_("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=vm),fe.init(e,t),e._zod.bag.format="ipv4"}),vp=_("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=_m),fe.init(e,t),e._zod.bag.format="ipv6",e._zod.check=(n)=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}}),_p=_("$ZodMAC",(e,t)=>{t.pattern??(t.pattern=Sm(t.delimiter)),fe.init(e,t),e._zod.bag.format="mac"}),Sp=_("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=ym),fe.init(e,t)}),yp=_("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=bm),fe.init(e,t),e._zod.check=(n)=>{let o=n.value.split("/");try{if(o.length!==2)throw Error();let[r,i]=o;if(!i)throw Error();let a=Number(i);if(`${a}`!==i)throw Error();if(a<0||a>128)throw Error();new URL(`http://[${r}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}}});function bp(e){if(e==="")return!0;if(/\s/.test(e))return!1;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}var $p=_("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=$m),fe.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=(n)=>{if(bp(n.value))return;n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});function Ry(e){if(!Ds.test(e))return!1;let t=e.replace(/[-_]/g,(o)=>o==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return bp(n)}var zp=_("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=Ds),fe.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=(n)=>{if(Ry(n.value))return;n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),wp=_("$ZodE164",(e,t)=>{t.pattern??(t.pattern=zm),fe.init(e,t)});function xy(e,t=null){try{let n=e.split(".");if(n.length!==3)return!1;let[o]=n;if(!o)return!1;let r=JSON.parse(atob(o));if("typ"in r&&r?.typ!=="JWT")return!1;if(!r.alg)return!1;if(t&&(!("alg"in r)||r.alg!==t))return!1;return!0}catch{return!1}}var Rp=_("$ZodJWT",(e,t)=>{fe.init(e,t),e._zod.check=(n)=>{if(xy(n.value,t.alg))return;n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),xp=_("$ZodCustomStringFormat",(e,t)=>{fe.init(e,t),e._zod.check=(n)=>{if(t.fn(n.value))return;n.issues.push({code:"invalid_format",format:t.format,input:n.value,inst:e,continue:!t.abort})}}),Ws=_("$ZodNumber",(e,t)=>{Q.init(e,t),e._zod.pattern=e._zod.bag.pattern??Zs,e._zod.parse=(n,o)=>{if(t.coerce)try{n.value=Number(n.value)}catch(a){}let r=n.value;if(typeof r==="number"&&!Number.isNaN(r)&&Number.isFinite(r))return n;let i=typeof r==="number"?Number.isNaN(r)?"NaN":!Number.isFinite(r)?"Infinity":void 0:void 0;return n.issues.push({expected:"number",code:"invalid_type",input:r,inst:e,...i?{received:i}:{}}),n}}),kp=_("$ZodNumberFormat",(e,t)=>{qm.init(e,t),Ws.init(e,t)}),qi=_("$ZodBoolean",(e,t)=>{Q.init(e,t),e._zod.pattern=Em,e._zod.parse=(n,o)=>{if(t.coerce)try{n.value=Boolean(n.value)}catch(i){}let r=n.value;if(typeof r==="boolean")return n;return n.issues.push({expected:"boolean",code:"invalid_type",input:r,inst:e}),n}}),Ys=_("$ZodBigInt",(e,t)=>{Q.init(e,t),e._zod.pattern=Im,e._zod.parse=(n,o)=>{if(t.coerce)try{n.value=BigInt(n.value)}catch(r){}if(typeof n.value==="bigint")return n;return n.issues.push({expected:"bigint",code:"invalid_type",input:n.value,inst:e}),n}}),Ip=_("$ZodBigIntFormat",(e,t)=>{Am.init(e,t),Ys.init(e,t)}),Pp=_("$ZodSymbol",(e,t)=>{Q.init(e,t),e._zod.parse=(n,o)=>{let r=n.value;if(typeof r==="symbol")return n;return n.issues.push({expected:"symbol",code:"invalid_type",input:r,inst:e}),n}}),Ep=_("$ZodUndefined",(e,t)=>{Q.init(e,t),e._zod.pattern=jm,e._zod.values=new Set([void 0]),e._zod.parse=(n,o)=>{let r=n.value;if(typeof r>"u")return n;return n.issues.push({expected:"undefined",code:"invalid_type",input:r,inst:e}),n}}),Tp=_("$ZodNull",(e,t)=>{Q.init(e,t),e._zod.pattern=Tm,e._zod.values=new Set([null]),e._zod.parse=(n,o)=>{let r=n.value;if(r===null)return n;return n.issues.push({expected:"null",code:"invalid_type",input:r,inst:e}),n}}),jp=_("$ZodAny",(e,t)=>{Q.init(e,t),e._zod.parse=(n)=>n}),Op=_("$ZodUnknown",(e,t)=>{Q.init(e,t),e._zod.parse=(n)=>n}),Np=_("$ZodNever",(e,t)=>{Q.init(e,t),e._zod.parse=(n,o)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)}),Cp=_("$ZodVoid",(e,t)=>{Q.init(e,t),e._zod.parse=(n,o)=>{let r=n.value;if(typeof r>"u")return n;return n.issues.push({expected:"void",code:"invalid_type",input:r,inst:e}),n}}),qp=_("$ZodDate",(e,t)=>{Q.init(e,t),e._zod.parse=(n,o)=>{if(t.coerce)try{n.value=new Date(n.value)}catch(s){}let r=n.value,i=r instanceof Date;if(i&&!Number.isNaN(r.getTime()))return n;return n.issues.push({expected:"date",code:"invalid_type",input:r,...i?{received:"Invalid Date"}:{},inst:e}),n}});function dy(e,t,n){if(e.issues.length)t.issues.push(...tt(n,e.issues));t.value[n]=e.value}var Ap=_("$ZodArray",(e,t)=>{Q.init(e,t),e._zod.parse=(n,o)=>{let r=n.value;if(!Array.isArray(r))return n.issues.push({expected:"array",code:"invalid_type",input:r,inst:e}),n;n.value=Array(r.length);let i=[];for(let a=0;a<r.length;a++){let s=r[a],c=t.element._zod.run({value:s,issues:[]},o);if(c instanceof Promise)i.push(c.then((l)=>dy(l,n,a)));else dy(c,n,a)}if(i.length)return Promise.all(i).then(()=>n);return n}});function Bs(e,t,n,o,r,i){let a=n in o;if(e.issues.length){if(r&&i&&!a)return;t.issues.push(...tt(n,e.issues))}if(!a&&!r){if(!e.issues.length)t.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[n]});return}if(e.value===void 0){if(a)t.value[n]=void 0}else t.value[n]=e.value}function ky(e){let t=Object.keys(e.shape);for(let o of t)if(!e.shape?.[o]?._zod?.traits?.has("$ZodType"))throw Error(`Invalid element at key "${o}": expected a Zod schema`);let n=Qd(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function Iy(e,t,n,o,r,i){let a=[],s=r.keySet,c=r.catchall._zod,l=c.def.type,d=c.optin==="optional",m=c.optout==="optional";for(let p in t){if(p==="__proto__")continue;if(s.has(p))continue;if(l==="never"){a.push(p);continue}let f=c.run({value:t[p],issues:[]},o);if(f instanceof Promise)e.push(f.then((v)=>Bs(v,n,p,t,d,m)));else Bs(f,n,p,t,d,m)}if(a.length)n.issues.push({code:"unrecognized_keys",keys:a,input:t,inst:i});if(!e.length)return n;return Promise.all(e).then(()=>n)}var Py=_("$ZodObject",(e,t)=>{if(Q.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){let s=t.shape;Object.defineProperty(t,"shape",{get:()=>{let c={...s};return Object.defineProperty(t,"shape",{value:c}),c}})}let o=Fn(()=>ky(t));ae(e._zod,"propValues",()=>{let s=t.shape,c={};for(let l in s){let d=s[l]._zod;if(d.values){c[l]??(c[l]=new Set);for(let m of d.values)c[l].add(m)}}return c});let r=ln,i=t.catchall,a;e._zod.parse=(s,c)=>{a??(a=o.value);let l=s.value;if(!r(l))return s.issues.push({expected:"object",code:"invalid_type",input:l,inst:e}),s;s.value={};let d=[],m=a.shape;for(let p of a.keys){let f=m[p],v=f._zod.optin==="optional",g=f._zod.optout==="optional",b=f._zod.run({value:l[p],issues:[]},c);if(b instanceof Promise)d.push(b.then((R)=>Bs(R,s,p,l,v,g)));else Bs(b,s,p,l,v,g)}if(!i)return d.length?Promise.all(d).then(()=>s):s;return Iy(d,l,s,c,o.value,e)}}),Mp=_("$ZodObjectJIT",(e,t)=>{Py.init(e,t);let n=e._zod.parse,o=Fn(()=>ky(t)),r=(p)=>{let f=new Js(["shape","payload","ctx"]),v=o.value,g=(P)=>{let D=Is(P);return`shape[${D}]._zod.run({ value: input[${D}], issues: [] }, ctx)`};f.write("const input = payload.value;");let b=Object.create(null),R=0;for(let P of v.keys)b[P]=`key_${R++}`;f.write("const newResult = {};");for(let P of v.keys){let D=b[P],E=Is(P),ne=p[P],ue=ne?._zod?.optin==="optional",Oe=ne?._zod?.optout==="optional";if(f.write(`const ${D} = ${g(P)};`),ue&&Oe)f.write(`
|
|
13
|
+
if (${D}.issues.length) {
|
|
14
|
+
if (${E} in input) {
|
|
15
|
+
payload.issues = payload.issues.concat(${D}.issues.map(iss => ({
|
|
16
16
|
...iss,
|
|
17
|
-
path: iss.path ? [${
|
|
17
|
+
path: iss.path ? [${E}, ...iss.path] : [${E}]
|
|
18
18
|
})));
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
if (${
|
|
23
|
-
if (${
|
|
24
|
-
newResult[${
|
|
22
|
+
if (${D}.value === undefined) {
|
|
23
|
+
if (${E} in input) {
|
|
24
|
+
newResult[${E}] = undefined;
|
|
25
25
|
}
|
|
26
26
|
} else {
|
|
27
|
-
newResult[${
|
|
27
|
+
newResult[${E}] = ${D}.value;
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
`);else if(!ue)f.write(`
|
|
31
|
-
const ${
|
|
32
|
-
if (${
|
|
33
|
-
payload.issues = payload.issues.concat(${
|
|
31
|
+
const ${D}_present = ${E} in input;
|
|
32
|
+
if (${D}.issues.length) {
|
|
33
|
+
payload.issues = payload.issues.concat(${D}.issues.map(iss => ({
|
|
34
34
|
...iss,
|
|
35
|
-
path: iss.path ? [${
|
|
35
|
+
path: iss.path ? [${E}, ...iss.path] : [${E}]
|
|
36
36
|
})));
|
|
37
37
|
}
|
|
38
|
-
if (!${
|
|
38
|
+
if (!${D}_present && !${D}.issues.length) {
|
|
39
39
|
payload.issues.push({
|
|
40
40
|
code: "invalid_type",
|
|
41
41
|
expected: "nonoptional",
|
|
42
42
|
input: undefined,
|
|
43
|
-
path: [${
|
|
43
|
+
path: [${E}]
|
|
44
44
|
});
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
-
if (${
|
|
48
|
-
if (${
|
|
49
|
-
newResult[${
|
|
47
|
+
if (${D}_present) {
|
|
48
|
+
if (${D}.value === undefined) {
|
|
49
|
+
newResult[${E}] = undefined;
|
|
50
50
|
} else {
|
|
51
|
-
newResult[${
|
|
51
|
+
newResult[${E}] = ${D}.value;
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
`);else f.write(`
|
|
56
|
-
if (${
|
|
57
|
-
payload.issues = payload.issues.concat(${
|
|
56
|
+
if (${D}.issues.length) {
|
|
57
|
+
payload.issues = payload.issues.concat(${D}.issues.map(iss => ({
|
|
58
58
|
...iss,
|
|
59
|
-
path: iss.path ? [${
|
|
59
|
+
path: iss.path ? [${E}, ...iss.path] : [${E}]
|
|
60
60
|
})));
|
|
61
61
|
}
|
|
62
62
|
|
|
63
|
-
if (${
|
|
64
|
-
if (${
|
|
65
|
-
newResult[${
|
|
63
|
+
if (${D}.value === undefined) {
|
|
64
|
+
if (${E} in input) {
|
|
65
|
+
newResult[${E}] = undefined;
|
|
66
66
|
}
|
|
67
67
|
} else {
|
|
68
|
-
newResult[${
|
|
68
|
+
newResult[${E}] = ${D}.value;
|
|
69
69
|
}
|
|
70
70
|
|
|
71
|
-
`)}f.write("payload.value = newResult;"),f.write("return payload;");let Z=f.compile();return(E,L)=>Z(p,E,L)},i,a=cn,s=!an.jitless,l=s&&Kd.value,d=t.catchall,m;e._zod.parse=(p,f)=>{m??(m=o.value);let v=p.value;if(!a(v))return p.issues.push({expected:"object",code:"invalid_type",input:v,inst:e}),p;if(s&&l&&f?.async===!1&&f.jitless!==!0){if(!i)i=r(t.shape);if(p=i(p,f),!d)return p;return vy([],v,p,f,m,e)}return n(p,f)}});function ty(e,t,n,o){for(let i of e)if(i.issues.length===0)return t.value=i.value,t;let r=e.filter((i)=>!wr(i));if(r.length===1)return t.value=r[0].value,r[0];return t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map((i)=>i.issues.map((a)=>He(a,o,be())))}),t}var qi=_("$ZodUnion",(e,t)=>{Q.init(e,t),se(e._zod,"optin",()=>t.options.some((o)=>o._zod.optin==="optional")?"optional":void 0),se(e._zod,"optout",()=>t.options.some((o)=>o._zod.optout==="optional")?"optional":void 0),se(e._zod,"values",()=>{if(t.options.every((o)=>o._zod.values))return new Set(t.options.flatMap((o)=>Array.from(o._zod.values)));return}),se(e._zod,"pattern",()=>{if(t.options.every((o)=>o._zod.pattern)){let o=t.options.map((r)=>r._zod.pattern);return new RegExp(`^(${o.map((r)=>Ri(r.source)).join("|")})$`)}return});let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(o,r)=>{if(n)return n(o,r);let i=!1,a=[];for(let s of t.options){let c=s._zod.run({value:o.value,issues:[]},r);if(c instanceof Promise)a.push(c),i=!0;else{if(c.issues.length===0)return c;a.push(c)}}if(!i)return ty(a,o,e,r);return Promise.all(a).then((s)=>ty(s,o,e,r))}});function ry(e,t,n,o){let r=e.filter((i)=>i.issues.length===0);if(r.length===1)return t.value=r[0].value,t;if(r.length===0)t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map((i)=>i.issues.map((a)=>He(a,o,be())))});else t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:[],inclusive:!1});return t}var Ap=_("$ZodXor",(e,t)=>{qi.init(e,t),t.inclusive=!1;let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(o,r)=>{if(n)return n(o,r);let i=!1,a=[];for(let s of t.options){let c=s._zod.run({value:o.value,issues:[]},r);if(c instanceof Promise)a.push(c),i=!0;else a.push(c)}if(!i)return ry(a,o,e,r);return Promise.all(a).then((s)=>ry(s,o,e,r))}}),Mp=_("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,qi.init(e,t);let n=e._zod.parse;se(e._zod,"propValues",()=>{let r={};for(let i of t.options){let a=i._zod.propValues;if(!a||Object.keys(a).length===0)throw Error(`Invalid discriminated union option at index "${t.options.indexOf(i)}"`);for(let[s,c]of Object.entries(a)){if(!r[s])r[s]=new Set;for(let l of c)r[s].add(l)}}return r});let o=Zn(()=>{let r=t.options,i=new Map;for(let a of r){let s=a._zod.propValues?.[t.discriminator];if(!s||s.size===0)throw Error(`Invalid discriminated union option at index "${t.options.indexOf(a)}"`);for(let c of s){if(i.has(c))throw Error(`Duplicate discriminator value "${String(c)}"`);i.set(c,a)}}return i});e._zod.parse=(r,i)=>{let a=r.value;if(!cn(a))return r.issues.push({code:"invalid_type",expected:"object",input:a,inst:e}),r;let s=o.value.get(a?.[t.discriminator]);if(s)return s._zod.run(r,i);if(t.unionFallback||i.direction==="backward")return n(r,i);return r.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,options:Array.from(o.value.keys()),input:a,path:[t.discriminator],inst:e}),r}}),Up=_("$ZodIntersection",(e,t)=>{Q.init(e,t),e._zod.parse=(n,o)=>{let r=n.value,i=t.left._zod.run({value:r,issues:[]},o),a=t.right._zod.run({value:r,issues:[]},o);if(i instanceof Promise||a instanceof Promise)return Promise.all([i,a]).then(([c,l])=>ny(n,c,l));return ny(n,i,a)}});function Xm(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(zr(e)&&zr(t)){let n=Object.keys(t),o=Object.keys(e).filter((i)=>n.indexOf(i)!==-1),r={...e,...t};for(let i of o){let a=Xm(e[i],t[i]);if(!a.valid)return{valid:!1,mergeErrorPath:[i,...a.mergeErrorPath]};r[i]=a.data}return{valid:!0,data:r}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let o=0;o<e.length;o++){let r=e[o],i=t[o],a=Xm(r,i);if(!a.valid)return{valid:!1,mergeErrorPath:[o,...a.mergeErrorPath]};n.push(a.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function ny(e,t,n){let o=new Map,r;for(let s of t.issues)if(s.code==="unrecognized_keys"){r??(r=s);for(let c of s.keys){if(!o.has(c))o.set(c,{});o.get(c).l=!0}}else e.issues.push(s);for(let s of n.issues)if(s.code==="unrecognized_keys")for(let c of s.keys){if(!o.has(c))o.set(c,{});o.get(c).r=!0}else e.issues.push(s);let i=[...o].filter(([,s])=>s.l&&s.r).map(([s])=>s);if(i.length&&r)e.issues.push({...r,keys:i});if(wr(e))return e;let a=Xm(t.value,n.value);if(!a.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(a.mergeErrorPath)}`);return e.value=a.data,e}var Ws=_("$ZodTuple",(e,t)=>{Q.init(e,t);let n=t.items;e._zod.parse=(o,r)=>{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 a=[],s=oy(n,"optin"),c=oy(n,"optout");if(!t.rest){if(i.length<s)return o.issues.push({code:"too_small",minimum:s,inclusive:!0,input:i,inst:e,origin:"array"}),o;if(i.length>n.length)o.issues.push({code:"too_big",maximum:n.length,inclusive:!0,input:i,inst:e,origin:"array"})}let l=Array(n.length);for(let d=0;d<n.length;d++){let m=n[d]._zod.run({value:i[d],issues:[]},r);if(m instanceof Promise)a.push(m.then((p)=>{l[d]=p}));else l[d]=m}if(t.rest){let d=n.length-1,m=i.slice(n.length);for(let p of m){d++;let f=t.rest._zod.run({value:p,issues:[]},r);if(f instanceof Promise)a.push(f.then((v)=>iy(v,o,d)));else iy(f,o,d)}}if(a.length)return Promise.all(a).then(()=>ay(l,o,n,i,c));return ay(l,o,n,i,c)}});function oy(e,t){for(let n=e.length-1;n>=0;n--)if(e[n]._zod[t]!=="optional")return n+1;return 0}function iy(e,t,n){if(e.issues.length)t.issues.push(...tt(n,e.issues));t.value[n]=e.value}function ay(e,t,n,o,r){for(let i=0;i<n.length;i++){let a=e[i],s=i<o.length;if(a.issues.length){if(!s&&i>=r){t.value.length=i;break}t.issues.push(...tt(i,a.issues))}t.value[i]=a.value}for(let i=t.value.length-1;i>=o.length;i--)if(n[i]._zod.optout==="optional"&&t.value[i]===void 0)t.value.length=i;else break;return t}var Dp=_("$ZodRecord",(e,t)=>{Q.init(e,t),e._zod.parse=(n,o)=>{let r=n.value;if(!zr(r))return n.issues.push({expected:"record",code:"invalid_type",input:r,inst:e}),n;let i=[],a=t.keyType._zod.values;if(a){n.value={};let s=new Set;for(let l of a)if(typeof l==="string"||typeof l==="number"||typeof l==="symbol"){s.add(typeof l==="number"?l.toString():l);let d=t.keyType._zod.run({value:l,issues:[]},o);if(d instanceof Promise)throw Error("Async schemas not supported in object keys currently");if(d.issues.length){n.issues.push({code:"invalid_key",origin:"record",issues:d.issues.map((f)=>He(f,o,be())),input:l,path:[l],inst:e});continue}let m=d.value,p=t.valueType._zod.run({value:r[l],issues:[]},o);if(p instanceof Promise)i.push(p.then((f)=>{if(f.issues.length)n.issues.push(...tt(l,f.issues));n.value[m]=f.value}));else{if(p.issues.length)n.issues.push(...tt(l,p.issues));n.value[m]=p.value}}let c;for(let l in r)if(!s.has(l))c=c??[],c.push(l);if(c&&c.length>0)n.issues.push({code:"unrecognized_keys",input:r,inst:e,keys:c})}else{n.value={};for(let s of Reflect.ownKeys(r)){if(s==="__proto__")continue;if(!Object.prototype.propertyIsEnumerable.call(r,s))continue;let c=t.keyType._zod.run({value:s,issues:[]},o);if(c instanceof Promise)throw Error("Async schemas not supported in object keys currently");if(typeof s==="string"&&ji.test(s)&&c.issues.length){let m=t.keyType._zod.run({value:Number(s),issues:[]},o);if(m instanceof Promise)throw Error("Async schemas not supported in object keys currently");if(m.issues.length===0)c=m}if(c.issues.length){if(t.mode==="loose")n.value[s]=r[s];else n.issues.push({code:"invalid_key",origin:"record",issues:c.issues.map((m)=>He(m,o,be())),input:s,path:[s],inst:e});continue}let d=t.valueType._zod.run({value:r[s],issues:[]},o);if(d instanceof Promise)i.push(d.then((m)=>{if(m.issues.length)n.issues.push(...tt(s,m.issues));n.value[c.value]=m.value}));else{if(d.issues.length)n.issues.push(...tt(s,d.issues));n.value[c.value]=d.value}}}if(i.length)return Promise.all(i).then(()=>n);return n}}),Lp=_("$ZodMap",(e,t)=>{Q.init(e,t),e._zod.parse=(n,o)=>{let r=n.value;if(!(r instanceof Map))return n.issues.push({expected:"map",code:"invalid_type",input:r,inst:e}),n;let i=[];n.value=new Map;for(let[a,s]of r){let c=t.keyType._zod.run({value:a,issues:[]},o),l=t.valueType._zod.run({value:s,issues:[]},o);if(c instanceof Promise||l instanceof Promise)i.push(Promise.all([c,l]).then(([d,m])=>{sy(d,m,n,a,r,e,o)}));else sy(c,l,n,a,r,e,o)}if(i.length)return Promise.all(i).then(()=>n);return n}});function sy(e,t,n,o,r,i,a){if(e.issues.length)if(xi.has(typeof o))n.issues.push(...tt(o,e.issues));else n.issues.push({code:"invalid_key",origin:"map",input:r,inst:i,issues:e.issues.map((s)=>He(s,a,be()))});if(t.issues.length)if(xi.has(typeof o))n.issues.push(...tt(o,t.issues));else n.issues.push({origin:"map",code:"invalid_element",input:r,inst:i,key:o,issues:t.issues.map((s)=>He(s,a,be()))});n.value.set(e.value,t.value)}var Zp=_("$ZodSet",(e,t)=>{Q.init(e,t),e._zod.parse=(n,o)=>{let r=n.value;if(!(r instanceof Set))return n.issues.push({input:r,inst:e,expected:"set",code:"invalid_type"}),n;let i=[];n.value=new Set;for(let a of r){let s=t.valueType._zod.run({value:a,issues:[]},o);if(s instanceof Promise)i.push(s.then((c)=>cy(c,n)));else cy(s,n)}if(i.length)return Promise.all(i).then(()=>n);return n}});function cy(e,t){if(e.issues.length)t.issues.push(...e.issues);t.value.add(e.value)}var Vp=_("$ZodEnum",(e,t)=>{Q.init(e,t);let n=wi(t.entries),o=new Set(n);e._zod.values=o,e._zod.pattern=new RegExp(`^(${n.filter((r)=>xi.has(typeof r)).map((r)=>typeof r==="string"?$t(r):r.toString()).join("|")})$`),e._zod.parse=(r,i)=>{let a=r.value;if(o.has(a))return r;return r.issues.push({code:"invalid_value",values:n,input:a,inst:e}),r}}),Fp=_("$ZodLiteral",(e,t)=>{if(Q.init(e,t),t.values.length===0)throw Error("Cannot create literal schema with no valid values");let n=new Set(t.values);e._zod.values=n,e._zod.pattern=new RegExp(`^(${t.values.map((o)=>typeof o==="string"?$t(o):o?$t(o.toString()):String(o)).join("|")})$`),e._zod.parse=(o,r)=>{let i=o.value;if(n.has(i))return o;return o.issues.push({code:"invalid_value",values:t.values,input:i,inst:e}),o}}),Jp=_("$ZodFile",(e,t)=>{Q.init(e,t),e._zod.parse=(n,o)=>{let r=n.value;if(r instanceof File)return n;return n.issues.push({expected:"file",code:"invalid_type",input:r,inst:e}),n}}),Hp=_("$ZodTransform",(e,t)=>{Q.init(e,t),e._zod.optin="optional",e._zod.parse=(n,o)=>{if(o.direction==="backward")throw new sn(e.constructor.name);let r=t.transform(n.value,n);if(o.async)return(r instanceof Promise?r:Promise.resolve(r)).then((a)=>(n.value=a,n.fallback=!0,n));if(r instanceof Promise)throw new Jt;return n.value=r,n.fallback=!0,n}});function ly(e,t){if(t===void 0&&(e.issues.length||e.fallback))return{issues:[],value:void 0};return e}var Ys=_("$ZodOptional",(e,t)=>{Q.init(e,t),e._zod.optin="optional",e._zod.optout="optional",se(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),se(e._zod,"pattern",()=>{let n=t.innerType._zod.pattern;return n?new RegExp(`^(${Ri(n.source)})?$`):void 0}),e._zod.parse=(n,o)=>{if(t.innerType._zod.optin==="optional"){let r=n.value,i=t.innerType._zod.run(n,o);if(i instanceof Promise)return i.then((a)=>ly(a,r));return ly(i,r)}if(n.value===void 0)return n;return t.innerType._zod.run(n,o)}}),Kp=_("$ZodExactOptional",(e,t)=>{Ys.init(e,t),se(e._zod,"values",()=>t.innerType._zod.values),se(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(n,o)=>t.innerType._zod.run(n,o)}),Gp=_("$ZodNullable",(e,t)=>{Q.init(e,t),se(e._zod,"optin",()=>t.innerType._zod.optin),se(e._zod,"optout",()=>t.innerType._zod.optout),se(e._zod,"pattern",()=>{let n=t.innerType._zod.pattern;return n?new RegExp(`^(${Ri(n.source)}|null)$`):void 0}),se(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(n,o)=>{if(n.value===null)return n;return t.innerType._zod.run(n,o)}}),Bp=_("$ZodDefault",(e,t)=>{Q.init(e,t),e._zod.optin="optional",se(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,o)=>{if(o.direction==="backward")return t.innerType._zod.run(n,o);if(n.value===void 0)return n.value=t.defaultValue,n;let r=t.innerType._zod.run(n,o);if(r instanceof Promise)return r.then((i)=>uy(i,t));return uy(r,t)}});function uy(e,t){if(e.value===void 0)e.value=t.defaultValue;return e}var Wp=_("$ZodPrefault",(e,t)=>{Q.init(e,t),e._zod.optin="optional",se(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,o)=>{if(o.direction==="backward")return t.innerType._zod.run(n,o);if(n.value===void 0)n.value=t.defaultValue;return t.innerType._zod.run(n,o)}}),Yp=_("$ZodNonOptional",(e,t)=>{Q.init(e,t),se(e._zod,"values",()=>{let n=t.innerType._zod.values;return n?new Set([...n].filter((o)=>o!==void 0)):void 0}),e._zod.parse=(n,o)=>{let r=t.innerType._zod.run(n,o);if(r instanceof Promise)return r.then((i)=>dy(i,e));return dy(r,e)}});function dy(e,t){if(!e.issues.length&&e.value===void 0)e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t});return e}var Xp=_("$ZodSuccess",(e,t)=>{Q.init(e,t),e._zod.parse=(n,o)=>{if(o.direction==="backward")throw new sn("ZodSuccess");let r=t.innerType._zod.run(n,o);if(r instanceof Promise)return r.then((i)=>(n.value=i.issues.length===0,n));return n.value=r.issues.length===0,n}}),Qp=_("$ZodCatch",(e,t)=>{Q.init(e,t),e._zod.optin="optional",se(e._zod,"optout",()=>t.innerType._zod.optout),se(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,o)=>{if(o.direction==="backward")return t.innerType._zod.run(n,o);let r=t.innerType._zod.run(n,o);if(r instanceof Promise)return r.then((i)=>{if(n.value=i.value,i.issues.length)n.value=t.catchValue({...n,error:{issues:i.issues.map((a)=>He(a,o,be()))},input:n.value}),n.issues=[],n.fallback=!0;return n});if(n.value=r.value,r.issues.length)n.value=t.catchValue({...n,error:{issues:r.issues.map((i)=>He(i,o,be()))},input:n.value}),n.issues=[],n.fallback=!0;return n}}),ef=_("$ZodNaN",(e,t)=>{Q.init(e,t),e._zod.parse=(n,o)=>{if(typeof n.value!=="number"||!Number.isNaN(n.value))return n.issues.push({input:n.value,inst:e,expected:"nan",code:"invalid_type"}),n;return n}}),Xs=_("$ZodPipe",(e,t)=>{Q.init(e,t),se(e._zod,"values",()=>t.in._zod.values),se(e._zod,"optin",()=>t.in._zod.optin),se(e._zod,"optout",()=>t.out._zod.optout),se(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,o)=>{if(o.direction==="backward"){let i=t.out._zod.run(n,o);if(i instanceof Promise)return i.then((a)=>Fs(a,t.in,o));return Fs(i,t.in,o)}let r=t.in._zod.run(n,o);if(r instanceof Promise)return r.then((i)=>Fs(i,t.out,o));return Fs(r,t.out,o)}});function Fs(e,t,n){if(e.issues.length)return e.aborted=!0,e;return t._zod.run({value:e.value,issues:e.issues,fallback:e.fallback},n)}var Ai=_("$ZodCodec",(e,t)=>{Q.init(e,t),se(e._zod,"values",()=>t.in._zod.values),se(e._zod,"optin",()=>t.in._zod.optin),se(e._zod,"optout",()=>t.out._zod.optout),se(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,o)=>{if((o.direction||"forward")==="forward"){let i=t.in._zod.run(n,o);if(i instanceof Promise)return i.then((a)=>Js(a,t,o));return Js(i,t,o)}else{let i=t.out._zod.run(n,o);if(i instanceof Promise)return i.then((a)=>Js(a,t,o));return Js(i,t,o)}}});function Js(e,t,n){if(e.issues.length)return e.aborted=!0,e;if((n.direction||"forward")==="forward"){let r=t.transform(e.value,e);if(r instanceof Promise)return r.then((i)=>Hs(e,i,t.out,n));return Hs(e,r,t.out,n)}else{let r=t.reverseTransform(e.value,e);if(r instanceof Promise)return r.then((i)=>Hs(e,i,t.in,n));return Hs(e,r,t.in,n)}}function Hs(e,t,n,o){if(e.issues.length)return e.aborted=!0,e;return n._zod.run({value:t,issues:e.issues},o)}var tf=_("$ZodPreprocess",(e,t)=>{Xs.init(e,t)}),rf=_("$ZodReadonly",(e,t)=>{Q.init(e,t),se(e._zod,"propValues",()=>t.innerType._zod.propValues),se(e._zod,"values",()=>t.innerType._zod.values),se(e._zod,"optin",()=>t.innerType?._zod?.optin),se(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(n,o)=>{if(o.direction==="backward")return t.innerType._zod.run(n,o);let r=t.innerType._zod.run(n,o);if(r instanceof Promise)return r.then(my);return my(r)}});function my(e){return e.value=Object.freeze(e.value),e}var nf=_("$ZodTemplateLiteral",(e,t)=>{Q.init(e,t);let n=[];for(let o of t.parts)if(typeof o==="object"&&o!==null){if(!o._zod.pattern)throw Error(`Invalid template literal part, no pattern found: ${[...o._zod.traits].shift()}`);let r=o._zod.pattern instanceof RegExp?o._zod.pattern.source:o._zod.pattern;if(!r)throw Error(`Invalid template literal part: ${o._zod.traits}`);let i=r.startsWith("^")?1:0,a=r.endsWith("$")?r.length-1:r.length;n.push(r.slice(i,a))}else if(o===null||Bd.has(typeof o))n.push($t(`${o}`));else throw Error(`Invalid template literal part: ${o}`);e._zod.pattern=new RegExp(`^${n.join("")}$`),e._zod.parse=(o,r)=>{if(typeof o.value!=="string")return o.issues.push({input:o.value,inst:e,expected:"string",code:"invalid_type"}),o;if(e._zod.pattern.lastIndex=0,!e._zod.pattern.test(o.value))return o.issues.push({input:o.value,inst:e,code:"invalid_format",format:t.format??"template_literal",pattern:e._zod.pattern.source}),o;return o}}),of=_("$ZodFunction",(e,t)=>(Q.init(e,t),e._def=t,e._zod.def=t,e.implement=(n)=>{if(typeof n!=="function")throw Error("implement() must be called with a function");return function(...o){let r=e._def.input?Es(e._def.input,o):o,i=Reflect.apply(n,this,r);if(e._def.output)return Es(e._def.output,i);return i}},e.implementAsync=(n)=>{if(typeof n!=="function")throw Error("implementAsync() must be called with a function");return async function(...o){let r=e._def.input?await Ts(e._def.input,o):o,i=await Reflect.apply(n,this,r);if(e._def.output)return await Ts(e._def.output,i);return i}},e._zod.parse=(n,o)=>{if(typeof n.value!=="function")return n.issues.push({code:"invalid_type",expected:"function",input:n.value,inst:e}),n;if(e._def.output&&e._def.output._zod.def.type==="promise")n.value=e.implementAsync(n.value);else n.value=e.implement(n.value);return n},e.input=(...n)=>{let o=e.constructor;if(Array.isArray(n[0]))return new o({type:"function",input:new Ws({type:"tuple",items:n[0],rest:n[1]}),output:e._def.output});return new o({type:"function",input:n[0],output:e._def.output})},e.output=(n)=>new e.constructor({type:"function",input:e._def.input,output:n}),e)),af=_("$ZodPromise",(e,t)=>{Q.init(e,t),e._zod.parse=(n,o)=>Promise.resolve(n.value).then((r)=>t.innerType._zod.run({value:r,issues:[]},o))}),sf=_("$ZodLazy",(e,t)=>{Q.init(e,t),se(e._zod,"innerType",()=>{let n=t;if(!n._cachedInner)n._cachedInner=t.getter();return n._cachedInner}),se(e._zod,"pattern",()=>e._zod.innerType?._zod?.pattern),se(e._zod,"propValues",()=>e._zod.innerType?._zod?.propValues),se(e._zod,"optin",()=>e._zod.innerType?._zod?.optin??void 0),se(e._zod,"optout",()=>e._zod.innerType?._zod?.optout??void 0),e._zod.parse=(n,o)=>e._zod.innerType._zod.run(n,o)}),cf=_("$ZodCustom",(e,t)=>{ge.init(e,t),Q.init(e,t),e._zod.parse=(n,o)=>n,e._zod.check=(n)=>{let o=n.value,r=t.fn(o);if(r instanceof Promise)return r.then((i)=>py(i,n,o,e));py(r,n,o,e);return}});function py(e,t,n,o){if(!e){let r={code:"custom",input:n,inst:o,path:[...o._zod.def.path??[]],continue:!o._zod.def.abort};if(o._zod.def.params)r.params=o._zod.def.params;t.issues.push(Vn(r))}}var Zi={};rr(Zi,{ar:()=>lf,az:()=>uf,be:()=>df,bg:()=>mf,ca:()=>pf,cs:()=>ff,da:()=>hf,de:()=>gf,el:()=>vf,en:()=>Mi,eo:()=>_f,es:()=>Sf,fa:()=>yf,fi:()=>bf,fr:()=>$f,frCA:()=>zf,he:()=>wf,hr:()=>Rf,hu:()=>xf,hy:()=>kf,id:()=>If,is:()=>Pf,it:()=>Ef,ja:()=>Tf,ka:()=>jf,kh:()=>Of,km:()=>Ui,ko:()=>Nf,lt:()=>Cf,mk:()=>qf,ms:()=>Af,nl:()=>Mf,no:()=>Uf,ota:()=>Df,pl:()=>Zf,ps:()=>Lf,pt:()=>Vf,ro:()=>Ff,ru:()=>Jf,sl:()=>Hf,sv:()=>Kf,ta:()=>Gf,th:()=>Bf,tr:()=>Wf,ua:()=>Yf,uk:()=>Li,ur:()=>Xf,uz:()=>Qf,vi:()=>eh,yo:()=>nh,zhCN:()=>th,zhTW:()=>rh});var U0=()=>{let e={string:{unit:"حرف",verb:"أن يحوي"},file:{unit:"بايت",verb:"أن يحوي"},array:{unit:"عنصر",verb:"أن يحوي"},set:{unit:"عنصر",verb:"أن يحوي"}};function t(r){return e[r]??null}let n={regex:"مدخل",email:"بريد إلكتروني",url:"رابط",emoji:"إيموجي",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"تاريخ ووقت بمعيار ISO",date:"تاريخ بمعيار ISO",time:"وقت بمعيار ISO",duration:"مدة بمعيار ISO",ipv4:"عنوان IPv4",ipv6:"عنوان IPv6",cidrv4:"مدى عناوين بصيغة IPv4",cidrv6:"مدى عناوين بصيغة IPv6",base64:"نَص بترميز base64-encoded",base64url:"نَص بترميز base64url-encoded",json_string:"نَص على هيئة JSON",e164:"رقم هاتف بمعيار E.164",jwt:"JWT",template_literal:"مدخل"},o={nan:"NaN"};return(r)=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=k(r.input),s=o[a]??a;if(/^[A-Z]/.test(r.expected))return`مدخلات غير مقبولة: يفترض إدخال instanceof ${r.expected}، ولكن تم إدخال ${s}`;return`مدخلات غير مقبولة: يفترض إدخال ${i}، ولكن تم إدخال ${s}`}case"invalid_value":if(r.values.length===1)return`مدخلات غير مقبولة: يفترض إدخال ${x(r.values[0])}`;return`اختيار غير مقبول: يتوقع انتقاء أحد هذه الخيارات: ${z(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);if(a)return` أكبر من اللازم: يفترض أن تكون ${r.origin??"القيمة"} ${i} ${r.maximum.toString()} ${a.unit??"عنصر"}`;return`أكبر من اللازم: يفترض أن تكون ${r.origin??"القيمة"} ${i} ${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);if(a)return`أصغر من اللازم: يفترض لـ ${r.origin} أن يكون ${i} ${r.minimum.toString()} ${a.unit}`;return`أصغر من اللازم: يفترض لـ ${r.origin} أن يكون ${i} ${r.minimum.toString()}`}case"invalid_format":{let i=r;if(i.format==="starts_with")return`نَص غير مقبول: يجب أن يبدأ بـ "${r.prefix}"`;if(i.format==="ends_with")return`نَص غير مقبول: يجب أن ينتهي بـ "${i.suffix}"`;if(i.format==="includes")return`نَص غير مقبول: يجب أن يتضمَّن "${i.includes}"`;if(i.format==="regex")return`نَص غير مقبول: يجب أن يطابق النمط ${i.pattern}`;return`${n[i.format]??r.format} غير مقبول`}case"not_multiple_of":return`رقم غير مقبول: يجب أن يكون من مضاعفات ${r.divisor}`;case"unrecognized_keys":return`معرف${r.keys.length>1?"ات":""} غريب${r.keys.length>1?"ة":""}: ${z(r.keys,"، ")}`;case"invalid_key":return`معرف غير مقبول في ${r.origin}`;case"invalid_union":return"مدخل غير مقبول";case"invalid_element":return`مدخل غير مقبول في ${r.origin}`;default:return"مدخل غير مقبول"}}};function lf(){return{localeError:U0()}}var D0=()=>{let e={string:{unit:"simvol",verb:"olmalıdır"},file:{unit:"bayt",verb:"olmalıdır"},array:{unit:"element",verb:"olmalıdır"},set:{unit:"element",verb:"olmalıdır"}};function t(r){return e[r]??null}let n={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(r)=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=k(r.input),s=o[a]??a;if(/^[A-Z]/.test(r.expected))return`Yanlış dəyər: gözlənilən instanceof ${r.expected}, daxil olan ${s}`;return`Yanlış dəyər: gözlənilən ${i}, daxil olan ${s}`}case"invalid_value":if(r.values.length===1)return`Yanlış dəyər: gözlənilən ${x(r.values[0])}`;return`Yanlış seçim: aşağıdakılardan biri olmalıdır: ${z(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);if(a)return`Çox böyük: gözlənilən ${r.origin??"dəyər"} ${i}${r.maximum.toString()} ${a.unit??"element"}`;return`Çox böyük: gözlənilən ${r.origin??"dəyər"} ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);if(a)return`Çox kiçik: gözlənilən ${r.origin} ${i}${r.minimum.toString()} ${a.unit}`;return`Çox kiçik: gözlənilən ${r.origin} ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;if(i.format==="starts_with")return`Yanlış mətn: "${i.prefix}" ilə başlamalıdır`;if(i.format==="ends_with")return`Yanlış mətn: "${i.suffix}" ilə bitməlidir`;if(i.format==="includes")return`Yanlış mətn: "${i.includes}" daxil olmalıdır`;if(i.format==="regex")return`Yanlış mətn: ${i.pattern} şablonuna uyğun olmalıdır`;return`Yanlış ${n[i.format]??r.format}`}case"not_multiple_of":return`Yanlış ədəd: ${r.divisor} ilə bölünə bilən olmalıdır`;case"unrecognized_keys":return`Tanınmayan açar${r.keys.length>1?"lar":""}: ${z(r.keys,", ")}`;case"invalid_key":return`${r.origin} daxilində yanlış açar`;case"invalid_union":return"Yanlış dəyər";case"invalid_element":return`${r.origin} daxilində yanlış dəyər`;default:return"Yanlış dəyər"}}};function uf(){return{localeError:D0()}}function Sy(e,t,n,o){let r=Math.abs(e),i=r%10,a=r%100;if(a>=11&&a<=19)return o;if(i===1)return t;if(i>=2&&i<=4)return n;return o}var L0=()=>{let e={string:{unit:{one:"сімвал",few:"сімвалы",many:"сімвалаў"},verb:"мець"},array:{unit:{one:"элемент",few:"элементы",many:"элементаў"},verb:"мець"},set:{unit:{one:"элемент",few:"элементы",many:"элементаў"},verb:"мець"},file:{unit:{one:"байт",few:"байты",many:"байтаў"},verb:"мець"}};function t(r){return e[r]??null}let n={regex:"увод",email:"email адрас",url:"URL",emoji:"эмодзі",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO дата і час",date:"ISO дата",time:"ISO час",duration:"ISO працягласць",ipv4:"IPv4 адрас",ipv6:"IPv6 адрас",cidrv4:"IPv4 дыяпазон",cidrv6:"IPv6 дыяпазон",base64:"радок у фармаце base64",base64url:"радок у фармаце base64url",json_string:"JSON радок",e164:"нумар E.164",jwt:"JWT",template_literal:"увод"},o={nan:"NaN",number:"лік",array:"масіў"};return(r)=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=k(r.input),s=o[a]??a;if(/^[A-Z]/.test(r.expected))return`Няправільны ўвод: чакаўся instanceof ${r.expected}, атрымана ${s}`;return`Няправільны ўвод: чакаўся ${i}, атрымана ${s}`}case"invalid_value":if(r.values.length===1)return`Няправільны ўвод: чакалася ${x(r.values[0])}`;return`Няправільны варыянт: чакаўся адзін з ${z(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);if(a){let s=Number(r.maximum),c=Sy(s,a.unit.one,a.unit.few,a.unit.many);return`Занадта вялікі: чакалася, што ${r.origin??"значэнне"} павінна ${a.verb} ${i}${r.maximum.toString()} ${c}`}return`Занадта вялікі: чакалася, што ${r.origin??"значэнне"} павінна быць ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);if(a){let s=Number(r.minimum),c=Sy(s,a.unit.one,a.unit.few,a.unit.many);return`Занадта малы: чакалася, што ${r.origin} павінна ${a.verb} ${i}${r.minimum.toString()} ${c}`}return`Занадта малы: чакалася, што ${r.origin} павінна быць ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;if(i.format==="starts_with")return`Няправільны радок: павінен пачынацца з "${i.prefix}"`;if(i.format==="ends_with")return`Няправільны радок: павінен заканчвацца на "${i.suffix}"`;if(i.format==="includes")return`Няправільны радок: павінен змяшчаць "${i.includes}"`;if(i.format==="regex")return`Няправільны радок: павінен адпавядаць шаблону ${i.pattern}`;return`Няправільны ${n[i.format]??r.format}`}case"not_multiple_of":return`Няправільны лік: павінен быць кратным ${r.divisor}`;case"unrecognized_keys":return`Нераспазнаны ${r.keys.length>1?"ключы":"ключ"}: ${z(r.keys,", ")}`;case"invalid_key":return`Няправільны ключ у ${r.origin}`;case"invalid_union":return"Няправільны ўвод";case"invalid_element":return`Няправільнае значэнне ў ${r.origin}`;default:return"Няправільны ўвод"}}};function df(){return{localeError:L0()}}var Z0=()=>{let e={string:{unit:"символа",verb:"да съдържа"},file:{unit:"байта",verb:"да съдържа"},array:{unit:"елемента",verb:"да съдържа"},set:{unit:"елемента",verb:"да съдържа"}};function t(r){return e[r]??null}let n={regex:"вход",email:"имейл адрес",url:"URL",emoji:"емоджи",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO време",date:"ISO дата",time:"ISO време",duration:"ISO продължителност",ipv4:"IPv4 адрес",ipv6:"IPv6 адрес",cidrv4:"IPv4 диапазон",cidrv6:"IPv6 диапазон",base64:"base64-кодиран низ",base64url:"base64url-кодиран низ",json_string:"JSON низ",e164:"E.164 номер",jwt:"JWT",template_literal:"вход"},o={nan:"NaN",number:"число",array:"масив"};return(r)=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=k(r.input),s=o[a]??a;if(/^[A-Z]/.test(r.expected))return`Невалиден вход: очакван instanceof ${r.expected}, получен ${s}`;return`Невалиден вход: очакван ${i}, получен ${s}`}case"invalid_value":if(r.values.length===1)return`Невалиден вход: очакван ${x(r.values[0])}`;return`Невалидна опция: очаквано едно от ${z(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);if(a)return`Твърде голямо: очаква се ${r.origin??"стойност"} да съдържа ${i}${r.maximum.toString()} ${a.unit??"елемента"}`;return`Твърде голямо: очаква се ${r.origin??"стойност"} да бъде ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);if(a)return`Твърде малко: очаква се ${r.origin} да съдържа ${i}${r.minimum.toString()} ${a.unit}`;return`Твърде малко: очаква се ${r.origin} да бъде ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;if(i.format==="starts_with")return`Невалиден низ: трябва да започва с "${i.prefix}"`;if(i.format==="ends_with")return`Невалиден низ: трябва да завършва с "${i.suffix}"`;if(i.format==="includes")return`Невалиден низ: трябва да включва "${i.includes}"`;if(i.format==="regex")return`Невалиден низ: трябва да съвпада с ${i.pattern}`;let a="Невалиден";if(i.format==="emoji")a="Невалидно";if(i.format==="datetime")a="Невалидно";if(i.format==="date")a="Невалидна";if(i.format==="time")a="Невалидно";if(i.format==="duration")a="Невалидна";return`${a} ${n[i.format]??r.format}`}case"not_multiple_of":return`Невалидно число: трябва да бъде кратно на ${r.divisor}`;case"unrecognized_keys":return`Неразпознат${r.keys.length>1?"и":""} ключ${r.keys.length>1?"ове":""}: ${z(r.keys,", ")}`;case"invalid_key":return`Невалиден ключ в ${r.origin}`;case"invalid_union":return"Невалиден вход";case"invalid_element":return`Невалидна стойност в ${r.origin}`;default:return"Невалиден вход"}}};function mf(){return{localeError:Z0()}}var V0=()=>{let e={string:{unit:"caràcters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"}};function t(r){return e[r]??null}let n={regex:"entrada",email:"adreça electrònica",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ça IPv4",ipv6:"adreça IPv6",cidrv4:"rang IPv4",cidrv6:"rang IPv6",base64:"cadena codificada en base64",base64url:"cadena codificada en base64url",json_string:"cadena JSON",e164:"número E.164",jwt:"JWT",template_literal:"entrada"},o={nan:"NaN"};return(r)=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=k(r.input),s=o[a]??a;if(/^[A-Z]/.test(r.expected))return`Tipus invàlid: s'esperava instanceof ${r.expected}, s'ha rebut ${s}`;return`Tipus invàlid: s'esperava ${i}, s'ha rebut ${s}`}case"invalid_value":if(r.values.length===1)return`Valor invàlid: s'esperava ${x(r.values[0])}`;return`Opció invàlida: s'esperava una de ${z(r.values," o ")}`;case"too_big":{let i=r.inclusive?"com a màxim":"menys de",a=t(r.origin);if(a)return`Massa gran: s'esperava que ${r.origin??"el valor"} contingués ${i} ${r.maximum.toString()} ${a.unit??"elements"}`;return`Massa gran: s'esperava que ${r.origin??"el valor"} fos ${i} ${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?"com a mínim":"més de",a=t(r.origin);if(a)return`Massa petit: s'esperava que ${r.origin} contingués ${i} ${r.minimum.toString()} ${a.unit}`;return`Massa petit: s'esperava que ${r.origin} fos ${i} ${r.minimum.toString()}`}case"invalid_format":{let i=r;if(i.format==="starts_with")return`Format invàlid: ha de començar amb "${i.prefix}"`;if(i.format==="ends_with")return`Format invàlid: ha d'acabar amb "${i.suffix}"`;if(i.format==="includes")return`Format invàlid: ha d'incloure "${i.includes}"`;if(i.format==="regex")return`Format invàlid: ha de coincidir amb el patró ${i.pattern}`;return`Format invàlid per a ${n[i.format]??r.format}`}case"not_multiple_of":return`Número invàlid: ha de ser múltiple de ${r.divisor}`;case"unrecognized_keys":return`Clau${r.keys.length>1?"s":""} no reconeguda${r.keys.length>1?"s":""}: ${z(r.keys,", ")}`;case"invalid_key":return`Clau invàlida a ${r.origin}`;case"invalid_union":return"Entrada invàlida";case"invalid_element":return`Element invàlid a ${r.origin}`;default:return"Entrada invàlida"}}};function pf(){return{localeError:V0()}}var F0=()=>{let e={string:{unit:"znaků",verb:"mít"},file:{unit:"bajtů",verb:"mít"},array:{unit:"prvků",verb:"mít"},set:{unit:"prvků",verb:"mít"}};function t(r){return e[r]??null}let n={regex:"regulární výraz",email:"e-mailová 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 čas ve formátu ISO",date:"datum ve formátu ISO",time:"čas ve formátu ISO",duration:"doba trvání ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"řetězec zakódovaný ve formátu base64",base64url:"řetězec zakódovaný ve formátu base64url",json_string:"řetězec ve formátu JSON",e164:"číslo E.164",jwt:"JWT",template_literal:"vstup"},o={nan:"NaN",number:"číslo",string:"řetězec",function:"funkce",array:"pole"};return(r)=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=k(r.input),s=o[a]??a;if(/^[A-Z]/.test(r.expected))return`Neplatný vstup: očekáváno instanceof ${r.expected}, obdrženo ${s}`;return`Neplatný vstup: očekáváno ${i}, obdrženo ${s}`}case"invalid_value":if(r.values.length===1)return`Neplatný vstup: očekáváno ${x(r.values[0])}`;return`Neplatná možnost: očekávána jedna z hodnot ${z(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);if(a)return`Hodnota je příliš velká: ${r.origin??"hodnota"} musí mít ${i}${r.maximum.toString()} ${a.unit??"prvků"}`;return`Hodnota je příliš velká: ${r.origin??"hodnota"} musí být ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);if(a)return`Hodnota je příliš malá: ${r.origin??"hodnota"} musí mít ${i}${r.minimum.toString()} ${a.unit??"prvků"}`;return`Hodnota je příliš malá: ${r.origin??"hodnota"} musí být ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;if(i.format==="starts_with")return`Neplatný řetězec: musí začínat na "${i.prefix}"`;if(i.format==="ends_with")return`Neplatný řetězec: musí končit na "${i.suffix}"`;if(i.format==="includes")return`Neplatný řetězec: musí obsahovat "${i.includes}"`;if(i.format==="regex")return`Neplatný řetězec: musí odpovídat vzoru ${i.pattern}`;return`Neplatný formát ${n[i.format]??r.format}`}case"not_multiple_of":return`Neplatné číslo: musí být násobkem ${r.divisor}`;case"unrecognized_keys":return`Neznámé klíče: ${z(r.keys,", ")}`;case"invalid_key":return`Neplatný klíč v ${r.origin}`;case"invalid_union":return"Neplatný vstup";case"invalid_element":return`Neplatná hodnota v ${r.origin}`;default:return"Neplatný vstup"}}};function ff(){return{localeError:F0()}}var J0=()=>{let e={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"}};function t(r){return e[r]??null}let n={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æt",date:"ISO-dato",time:"ISO-klokkeslæt",duration:"ISO-varighed",ipv4:"IPv4-område",ipv6:"IPv6-område",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æt",file:"fil"};return(r)=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=k(r.input),s=o[a]??a;if(/^[A-Z]/.test(r.expected))return`Ugyldigt input: forventede instanceof ${r.expected}, fik ${s}`;return`Ugyldigt input: forventede ${i}, fik ${s}`}case"invalid_value":if(r.values.length===1)return`Ugyldig værdi: forventede ${x(r.values[0])}`;return`Ugyldigt valg: forventede en af følgende ${z(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin),s=o[r.origin]??r.origin;if(a)return`For stor: forventede ${s??"value"} ${a.verb} ${i} ${r.maximum.toString()} ${a.unit??"elementer"}`;return`For stor: forventede ${s??"value"} havde ${i} ${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin),s=o[r.origin]??r.origin;if(a)return`For lille: forventede ${s} ${a.verb} ${i} ${r.minimum.toString()} ${a.unit}`;return`For lille: forventede ${s} havde ${i} ${r.minimum.toString()}`}case"invalid_format":{let i=r;if(i.format==="starts_with")return`Ugyldig streng: skal starte med "${i.prefix}"`;if(i.format==="ends_with")return`Ugyldig streng: skal ende med "${i.suffix}"`;if(i.format==="includes")return`Ugyldig streng: skal indeholde "${i.includes}"`;if(i.format==="regex")return`Ugyldig streng: skal matche mønsteret ${i.pattern}`;return`Ugyldig ${n[i.format]??r.format}`}case"not_multiple_of":return`Ugyldigt tal: skal være deleligt med ${r.divisor}`;case"unrecognized_keys":return`${r.keys.length>1?"Ukendte nøgler":"Ukendt nøgle"}: ${z(r.keys,", ")}`;case"invalid_key":return`Ugyldig nøgle i ${r.origin}`;case"invalid_union":return"Ugyldigt input: matcher ingen af de tilladte typer";case"invalid_element":return`Ugyldig værdi i ${r.origin}`;default:return"Ugyldigt input"}}};function hf(){return{localeError:J0()}}var H0=()=>{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(r){return e[r]??null}let n={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(r)=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=k(r.input),s=o[a]??a;if(/^[A-Z]/.test(r.expected))return`Ungültige Eingabe: erwartet instanceof ${r.expected}, erhalten ${s}`;return`Ungültige Eingabe: erwartet ${i}, erhalten ${s}`}case"invalid_value":if(r.values.length===1)return`Ungültige Eingabe: erwartet ${x(r.values[0])}`;return`Ungültige Option: erwartet eine von ${z(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);if(a)return`Zu groß: erwartet, dass ${r.origin??"Wert"} ${i}${r.maximum.toString()} ${a.unit??"Elemente"} hat`;return`Zu groß: erwartet, dass ${r.origin??"Wert"} ${i}${r.maximum.toString()} ist`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);if(a)return`Zu klein: erwartet, dass ${r.origin} ${i}${r.minimum.toString()} ${a.unit} hat`;return`Zu klein: erwartet, dass ${r.origin} ${i}${r.minimum.toString()} ist`}case"invalid_format":{let i=r;if(i.format==="starts_with")return`Ungültiger String: muss mit "${i.prefix}" beginnen`;if(i.format==="ends_with")return`Ungültiger String: muss mit "${i.suffix}" enden`;if(i.format==="includes")return`Ungültiger String: muss "${i.includes}" enthalten`;if(i.format==="regex")return`Ungültiger String: muss dem Muster ${i.pattern} entsprechen`;return`Ungültig: ${n[i.format]??r.format}`}case"not_multiple_of":return`Ungültige Zahl: muss ein Vielfaches von ${r.divisor} sein`;case"unrecognized_keys":return`${r.keys.length>1?"Unbekannte Schlüssel":"Unbekannter Schlüssel"}: ${z(r.keys,", ")}`;case"invalid_key":return`Ungültiger Schlüssel in ${r.origin}`;case"invalid_union":return"Ungültige Eingabe";case"invalid_element":return`Ungültiger Wert in ${r.origin}`;default:return"Ungültige Eingabe"}}};function gf(){return{localeError:H0()}}var K0=()=>{let e={string:{unit:"χαρακτήρες",verb:"να έχει"},file:{unit:"bytes",verb:"να έχει"},array:{unit:"στοιχεία",verb:"να έχει"},set:{unit:"στοιχεία",verb:"να έχει"},map:{unit:"καταχωρήσεις",verb:"να έχει"}};function t(r){return e[r]??null}let n={regex:"είσοδος",email:"διεύθυνση 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 ημερομηνία και ώρα",date:"ISO ημερομηνία",time:"ISO ώρα",duration:"ISO διάρκεια",ipv4:"διεύθυνση IPv4",ipv6:"διεύθυνση IPv6",mac:"διεύθυνση MAC",cidrv4:"εύρος IPv4",cidrv6:"εύρος IPv6",base64:"συμβολοσειρά κωδικοποιημένη σε base64",base64url:"συμβολοσειρά κωδικοποιημένη σε base64url",json_string:"συμβολοσειρά JSON",e164:"αριθμός E.164",jwt:"JWT",template_literal:"είσοδος"},o={nan:"NaN"};return(r)=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=k(r.input),s=o[a]??a;if(typeof r.expected==="string"&&/^[A-Z]/.test(r.expected))return`Μη έγκυρη είσοδος: αναμενόταν instanceof ${r.expected}, λήφθηκε ${s}`;return`Μη έγκυρη είσοδος: αναμενόταν ${i}, λήφθηκε ${s}`}case"invalid_value":if(r.values.length===1)return`Μη έγκυρη είσοδος: αναμενόταν ${x(r.values[0])}`;return`Μη έγκυρη επιλογή: αναμενόταν ένα από ${z(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);if(a)return`Πολύ μεγάλο: αναμενόταν ${r.origin??"τιμή"} να έχει ${i}${r.maximum.toString()} ${a.unit??"στοιχεία"}`;return`Πολύ μεγάλο: αναμενόταν ${r.origin??"τιμή"} να είναι ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);if(a)return`Πολύ μικρό: αναμενόταν ${r.origin} να έχει ${i}${r.minimum.toString()} ${a.unit}`;return`Πολύ μικρό: αναμενόταν ${r.origin} να είναι ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;if(i.format==="starts_with")return`Μη έγκυρη συμβολοσειρά: πρέπει να ξεκινά με "${i.prefix}"`;if(i.format==="ends_with")return`Μη έγκυρη συμβολοσειρά: πρέπει να τελειώνει με "${i.suffix}"`;if(i.format==="includes")return`Μη έγκυρη συμβολοσειρά: πρέπει να περιέχει "${i.includes}"`;if(i.format==="regex")return`Μη έγκυρη συμβολοσειρά: πρέπει να ταιριάζει με το μοτίβο ${i.pattern}`;return`Μη έγκυρο: ${n[i.format]??r.format}`}case"not_multiple_of":return`Μη έγκυρος αριθμός: πρέπει να είναι πολλαπλάσιο του ${r.divisor}`;case"unrecognized_keys":return`Άγνωστ${r.keys.length>1?"α":"ο"} κλειδ${r.keys.length>1?"ιά":"ί"}: ${z(r.keys,", ")}`;case"invalid_key":return`Μη έγκυρο κλειδί στο ${r.origin}`;case"invalid_union":return"Μη έγκυρη είσοδος";case"invalid_element":return`Μη έγκυρη τιμή στο ${r.origin}`;default:return"Μη έγκυρη είσοδος"}}};function vf(){return{localeError:K0()}}var G0=()=>{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(r){return e[r]??null}let n={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(r)=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=k(r.input),s=o[a]??a;return`Invalid input: expected ${i}, received ${s}`}case"invalid_value":if(r.values.length===1)return`Invalid input: expected ${x(r.values[0])}`;return`Invalid option: expected one of ${z(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);if(a)return`Too big: expected ${r.origin??"value"} to have ${i}${r.maximum.toString()} ${a.unit??"elements"}`;return`Too big: expected ${r.origin??"value"} to be ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);if(a)return`Too small: expected ${r.origin} to have ${i}${r.minimum.toString()} ${a.unit}`;return`Too small: expected ${r.origin} to be ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;if(i.format==="starts_with")return`Invalid string: must start with "${i.prefix}"`;if(i.format==="ends_with")return`Invalid string: must end with "${i.suffix}"`;if(i.format==="includes")return`Invalid string: must include "${i.includes}"`;if(i.format==="regex")return`Invalid string: must match pattern ${i.pattern}`;return`Invalid ${n[i.format]??r.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${r.divisor}`;case"unrecognized_keys":return`Unrecognized key${r.keys.length>1?"s":""}: ${z(r.keys,", ")}`;case"invalid_key":return`Invalid key in ${r.origin}`;case"invalid_union":if(r.options&&Array.isArray(r.options)&&r.options.length>0)return`Invalid discriminator value. Expected ${r.options.map((a)=>`'${a}'`).join(" | ")}`;return"Invalid input";case"invalid_element":return`Invalid value in ${r.origin}`;default:return"Invalid input"}}};function Mi(){return{localeError:G0()}}var B0=()=>{let e={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function t(r){return e[r]??null}let n={regex:"enigo",email:"retadreso",url:"URL",emoji:"emoĝio",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ŭro",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(r)=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=k(r.input),s=o[a]??a;if(/^[A-Z]/.test(r.expected))return`Nevalida enigo: atendiĝis instanceof ${r.expected}, riceviĝis ${s}`;return`Nevalida enigo: atendiĝis ${i}, riceviĝis ${s}`}case"invalid_value":if(r.values.length===1)return`Nevalida enigo: atendiĝis ${x(r.values[0])}`;return`Nevalida opcio: atendiĝis unu el ${z(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);if(a)return`Tro granda: atendiĝis ke ${r.origin??"valoro"} havu ${i}${r.maximum.toString()} ${a.unit??"elementojn"}`;return`Tro granda: atendiĝis ke ${r.origin??"valoro"} havu ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);if(a)return`Tro malgranda: atendiĝis ke ${r.origin} havu ${i}${r.minimum.toString()} ${a.unit}`;return`Tro malgranda: atendiĝis ke ${r.origin} estu ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;if(i.format==="starts_with")return`Nevalida karaktraro: devas komenciĝi per "${i.prefix}"`;if(i.format==="ends_with")return`Nevalida karaktraro: devas finiĝi per "${i.suffix}"`;if(i.format==="includes")return`Nevalida karaktraro: devas inkluzivi "${i.includes}"`;if(i.format==="regex")return`Nevalida karaktraro: devas kongrui kun la modelo ${i.pattern}`;return`Nevalida ${n[i.format]??r.format}`}case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${r.divisor}`;case"unrecognized_keys":return`Nekonata${r.keys.length>1?"j":""} ŝlosilo${r.keys.length>1?"j":""}: ${z(r.keys,", ")}`;case"invalid_key":return`Nevalida ŝlosilo en ${r.origin}`;case"invalid_union":return"Nevalida enigo";case"invalid_element":return`Nevalida valoro en ${r.origin}`;default:return"Nevalida enigo"}}};function _f(){return{localeError:B0()}}var W0=()=>{let e={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}};function t(r){return e[r]??null}let n={regex:"entrada",email:"dirección de correo electrónico",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ón ISO",ipv4:"dirección IPv4",ipv6:"dirección IPv6",cidrv4:"rango IPv4",cidrv6:"rango IPv6",base64:"cadena codificada en base64",base64url:"URL codificada en base64",json_string:"cadena JSON",e164:"número E.164",jwt:"JWT",template_literal:"entrada"},o={nan:"NaN",string:"texto",number:"número",boolean:"booleano",array:"arreglo",object:"objeto",set:"conjunto",file:"archivo",date:"fecha",bigint:"número grande",symbol:"símbolo",undefined:"indefinido",null:"nulo",function:"función",map:"mapa",record:"registro",tuple:"tupla",enum:"enumeración",union:"unión",literal:"literal",promise:"promesa",void:"vacío",never:"nunca",unknown:"desconocido",any:"cualquiera"};return(r)=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=k(r.input),s=o[a]??a;if(/^[A-Z]/.test(r.expected))return`Entrada inválida: se esperaba instanceof ${r.expected}, recibido ${s}`;return`Entrada inválida: se esperaba ${i}, recibido ${s}`}case"invalid_value":if(r.values.length===1)return`Entrada inválida: se esperaba ${x(r.values[0])}`;return`Opción inválida: se esperaba una de ${z(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin),s=o[r.origin]??r.origin;if(a)return`Demasiado grande: se esperaba que ${s??"valor"} tuviera ${i}${r.maximum.toString()} ${a.unit??"elementos"}`;return`Demasiado grande: se esperaba que ${s??"valor"} fuera ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin),s=o[r.origin]??r.origin;if(a)return`Demasiado pequeño: se esperaba que ${s} tuviera ${i}${r.minimum.toString()} ${a.unit}`;return`Demasiado pequeño: se esperaba que ${s} fuera ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;if(i.format==="starts_with")return`Cadena inválida: debe comenzar con "${i.prefix}"`;if(i.format==="ends_with")return`Cadena inválida: debe terminar en "${i.suffix}"`;if(i.format==="includes")return`Cadena inválida: debe incluir "${i.includes}"`;if(i.format==="regex")return`Cadena inválida: debe coincidir con el patrón ${i.pattern}`;return`Inválido ${n[i.format]??r.format}`}case"not_multiple_of":return`Número inválido: debe ser múltiplo de ${r.divisor}`;case"unrecognized_keys":return`Llave${r.keys.length>1?"s":""} desconocida${r.keys.length>1?"s":""}: ${z(r.keys,", ")}`;case"invalid_key":return`Llave inválida en ${o[r.origin]??r.origin}`;case"invalid_union":return"Entrada inválida";case"invalid_element":return`Valor inválido en ${o[r.origin]??r.origin}`;default:return"Entrada inválida"}}};function Sf(){return{localeError:W0()}}var Y0=()=>{let e={string:{unit:"کاراکتر",verb:"داشته باشد"},file:{unit:"بایت",verb:"داشته باشد"},array:{unit:"آیتم",verb:"داشته باشد"},set:{unit:"آیتم",verb:"داشته باشد"}};function t(r){return e[r]??null}let n={regex:"ورودی",email:"آدرس ایمیل",url:"URL",emoji:"ایموجی",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"تاریخ و زمان ایزو",date:"تاریخ ایزو",time:"زمان ایزو",duration:"مدت زمان ایزو",ipv4:"IPv4 آدرس",ipv6:"IPv6 آدرس",cidrv4:"IPv4 دامنه",cidrv6:"IPv6 دامنه",base64:"base64-encoded رشته",base64url:"base64url-encoded رشته",json_string:"JSON رشته",e164:"E.164 عدد",jwt:"JWT",template_literal:"ورودی"},o={nan:"NaN",number:"عدد",array:"آرایه"};return(r)=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=k(r.input),s=o[a]??a;if(/^[A-Z]/.test(r.expected))return`ورودی نامعتبر: میبایست instanceof ${r.expected} میبود، ${s} دریافت شد`;return`ورودی نامعتبر: میبایست ${i} میبود، ${s} دریافت شد`}case"invalid_value":if(r.values.length===1)return`ورودی نامعتبر: میبایست ${x(r.values[0])} میبود`;return`گزینه نامعتبر: میبایست یکی از ${z(r.values,"|")} میبود`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);if(a)return`خیلی بزرگ: ${r.origin??"مقدار"} باید ${i}${r.maximum.toString()} ${a.unit??"عنصر"} باشد`;return`خیلی بزرگ: ${r.origin??"مقدار"} باید ${i}${r.maximum.toString()} باشد`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);if(a)return`خیلی کوچک: ${r.origin} باید ${i}${r.minimum.toString()} ${a.unit} باشد`;return`خیلی کوچک: ${r.origin} باید ${i}${r.minimum.toString()} باشد`}case"invalid_format":{let i=r;if(i.format==="starts_with")return`رشته نامعتبر: باید با "${i.prefix}" شروع شود`;if(i.format==="ends_with")return`رشته نامعتبر: باید با "${i.suffix}" تمام شود`;if(i.format==="includes")return`رشته نامعتبر: باید شامل "${i.includes}" باشد`;if(i.format==="regex")return`رشته نامعتبر: باید با الگوی ${i.pattern} مطابقت داشته باشد`;return`${n[i.format]??r.format} نامعتبر`}case"not_multiple_of":return`عدد نامعتبر: باید مضرب ${r.divisor} باشد`;case"unrecognized_keys":return`کلید${r.keys.length>1?"های":""} ناشناس: ${z(r.keys,", ")}`;case"invalid_key":return`کلید ناشناس در ${r.origin}`;case"invalid_union":return"ورودی نامعتبر";case"invalid_element":return`مقدار نامعتبر در ${r.origin}`;default:return"ورودی نامعتبر"}}};function yf(){return{localeError:Y0()}}var X0=()=>{let e={string:{unit:"merkkiä",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äivämäärän"}};function t(r){return e[r]??null}let n={regex:"säännöllinen lauseke",email:"sähköpostiosoite",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äivämäärä",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(r)=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=k(r.input),s=o[a]??a;if(/^[A-Z]/.test(r.expected))return`Virheellinen tyyppi: odotettiin instanceof ${r.expected}, oli ${s}`;return`Virheellinen tyyppi: odotettiin ${i}, oli ${s}`}case"invalid_value":if(r.values.length===1)return`Virheellinen syöte: täytyy olla ${x(r.values[0])}`;return`Virheellinen valinta: täytyy olla yksi seuraavista: ${z(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);if(a)return`Liian suuri: ${a.subject} täytyy olla ${i}${r.maximum.toString()} ${a.unit}`.trim();return`Liian suuri: arvon täytyy olla ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);if(a)return`Liian pieni: ${a.subject} täytyy olla ${i}${r.minimum.toString()} ${a.unit}`.trim();return`Liian pieni: arvon täytyy olla ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;if(i.format==="starts_with")return`Virheellinen syöte: täytyy alkaa "${i.prefix}"`;if(i.format==="ends_with")return`Virheellinen syöte: täytyy loppua "${i.suffix}"`;if(i.format==="includes")return`Virheellinen syöte: täytyy sisältää "${i.includes}"`;if(i.format==="regex")return`Virheellinen syöte: täytyy vastata säännöllistä lauseketta ${i.pattern}`;return`Virheellinen ${n[i.format]??r.format}`}case"not_multiple_of":return`Virheellinen luku: täytyy olla luvun ${r.divisor} monikerta`;case"unrecognized_keys":return`${r.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${z(r.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öte"}}};function bf(){return{localeError:X0()}}var Q0=()=>{let e={string:{unit:"caractères",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"éléments",verb:"avoir"},set:{unit:"éléments",verb:"avoir"}};function t(r){return e[r]??null}let n={regex:"entrée",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ée ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"chaîne encodée en base64",base64url:"chaîne encodée en base64url",json_string:"chaîne JSON",e164:"numéro E.164",jwt:"JWT",template_literal:"entrée"},o={string:"chaîne",number:"nombre",int:"entier",boolean:"booléen",bigint:"grand entier",symbol:"symbole",undefined:"indéfini",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(r)=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=k(r.input),s=o[a]??a;if(/^[A-Z]/.test(r.expected))return`Entrée invalide : instanceof ${r.expected} attendu, ${s} reçu`;return`Entrée invalide : ${i} attendu, ${s} reçu`}case"invalid_value":if(r.values.length===1)return`Entrée invalide : ${x(r.values[0])} attendu`;return`Option invalide : une valeur parmi ${z(r.values,"|")} attendue`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);if(a)return`Trop grand : ${o[r.origin]??"valeur"} doit ${a.verb} ${i}${r.maximum.toString()} ${a.unit??"élément(s)"}`;return`Trop grand : ${o[r.origin]??"valeur"} doit être ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);if(a)return`Trop petit : ${o[r.origin]??"valeur"} doit ${a.verb} ${i}${r.minimum.toString()} ${a.unit}`;return`Trop petit : ${o[r.origin]??"valeur"} doit être ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;if(i.format==="starts_with")return`Chaîne invalide : doit commencer par "${i.prefix}"`;if(i.format==="ends_with")return`Chaîne invalide : doit se terminer par "${i.suffix}"`;if(i.format==="includes")return`Chaîne invalide : doit inclure "${i.includes}"`;if(i.format==="regex")return`Chaîne invalide : doit correspondre au modèle ${i.pattern}`;return`${n[i.format]??r.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit être un multiple de ${r.divisor}`;case"unrecognized_keys":return`Clé${r.keys.length>1?"s":""} non reconnue${r.keys.length>1?"s":""} : ${z(r.keys,", ")}`;case"invalid_key":return`Clé invalide dans ${r.origin}`;case"invalid_union":return"Entrée invalide";case"invalid_element":return`Valeur invalide dans ${r.origin}`;default:return"Entrée invalide"}}};function $f(){return{localeError:Q0()}}var eI=()=>{let e={string:{unit:"caractères",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"éléments",verb:"avoir"},set:{unit:"éléments",verb:"avoir"}};function t(r){return e[r]??null}let n={regex:"entrée",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ée ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"chaîne encodée en base64",base64url:"chaîne encodée en base64url",json_string:"chaîne JSON",e164:"numéro E.164",jwt:"JWT",template_literal:"entrée"},o={nan:"NaN"};return(r)=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=k(r.input),s=o[a]??a;if(/^[A-Z]/.test(r.expected))return`Entrée invalide : attendu instanceof ${r.expected}, reçu ${s}`;return`Entrée invalide : attendu ${i}, reçu ${s}`}case"invalid_value":if(r.values.length===1)return`Entrée invalide : attendu ${x(r.values[0])}`;return`Option invalide : attendu l'une des valeurs suivantes ${z(r.values,"|")}`;case"too_big":{let i=r.inclusive?"≤":"<",a=t(r.origin);if(a)return`Trop grand : attendu que ${r.origin??"la valeur"} ait ${i}${r.maximum.toString()} ${a.unit}`;return`Trop grand : attendu que ${r.origin??"la valeur"} soit ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?"≥":">",a=t(r.origin);if(a)return`Trop petit : attendu que ${r.origin} ait ${i}${r.minimum.toString()} ${a.unit}`;return`Trop petit : attendu que ${r.origin} soit ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;if(i.format==="starts_with")return`Chaîne invalide : doit commencer par "${i.prefix}"`;if(i.format==="ends_with")return`Chaîne invalide : doit se terminer par "${i.suffix}"`;if(i.format==="includes")return`Chaîne invalide : doit inclure "${i.includes}"`;if(i.format==="regex")return`Chaîne invalide : doit correspondre au motif ${i.pattern}`;return`${n[i.format]??r.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit être un multiple de ${r.divisor}`;case"unrecognized_keys":return`Clé${r.keys.length>1?"s":""} non reconnue${r.keys.length>1?"s":""} : ${z(r.keys,", ")}`;case"invalid_key":return`Clé invalide dans ${r.origin}`;case"invalid_union":return"Entrée invalide";case"invalid_element":return`Valeur invalide dans ${r.origin}`;default:return"Entrée invalide"}}};function zf(){return{localeError:eI()}}var tI=()=>{let e={string:{label:"מחרוזת",gender:"f"},number:{label:"מספר",gender:"m"},boolean:{label:"ערך בוליאני",gender:"m"},bigint:{label:"BigInt",gender:"m"},date:{label:"תאריך",gender:"m"},array:{label:"מערך",gender:"m"},object:{label:"אובייקט",gender:"m"},null:{label:"ערך ריק (null)",gender:"m"},undefined:{label:"ערך לא מוגדר (undefined)",gender:"m"},symbol:{label:"סימבול (Symbol)",gender:"m"},function:{label:"פונקציה",gender:"f"},map:{label:"מפה (Map)",gender:"f"},set:{label:"קבוצה (Set)",gender:"f"},file:{label:"קובץ",gender:"m"},promise:{label:"Promise",gender:"m"},NaN:{label:"NaN",gender:"m"},unknown:{label:"ערך לא ידוע",gender:"m"},value:{label:"ערך",gender:"m"}},t={string:{unit:"תווים",shortLabel:"קצר",longLabel:"ארוך"},file:{unit:"בייטים",shortLabel:"קטן",longLabel:"גדול"},array:{unit:"פריטים",shortLabel:"קטן",longLabel:"גדול"},set:{unit:"פריטים",shortLabel:"קטן",longLabel:"גדול"},number:{unit:"",shortLabel:"קטן",longLabel:"גדול"}},n=(l)=>l?e[l]:void 0,o=(l)=>{let d=n(l);if(d)return d.label;return l??e.unknown.label},r=(l)=>`ה${o(l)}`,i=(l)=>(n(l)?.gender??"m")==="f"?"צריכה להיות":"צריך להיות",a=(l)=>{if(!l)return null;return t[l]??null},s={regex:{label:"קלט",gender:"m"},email:{label:"כתובת אימייל",gender:"f"},url:{label:"כתובת רשת",gender:"f"},emoji:{label:"אימוג'י",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:"תאריך וזמן ISO",gender:"m"},date:{label:"תאריך ISO",gender:"m"},time:{label:"זמן ISO",gender:"m"},duration:{label:"משך זמן ISO",gender:"m"},ipv4:{label:"כתובת IPv4",gender:"f"},ipv6:{label:"כתובת IPv6",gender:"f"},cidrv4:{label:"טווח IPv4",gender:"m"},cidrv6:{label:"טווח IPv6",gender:"m"},base64:{label:"מחרוזת בבסיס 64",gender:"f"},base64url:{label:"מחרוזת בבסיס 64 לכתובות רשת",gender:"f"},json_string:{label:"מחרוזת JSON",gender:"f"},e164:{label:"מספר E.164",gender:"m"},jwt:{label:"JWT",gender:"m"},ends_with:{label:"קלט",gender:"m"},includes:{label:"קלט",gender:"m"},lowercase:{label:"קלט",gender:"m"},starts_with:{label:"קלט",gender:"m"},uppercase:{label:"קלט",gender:"m"}},c={nan:"NaN"};return(l)=>{switch(l.code){case"invalid_type":{let d=l.expected,m=c[d??""]??o(d),p=k(l.input),f=c[p]??e[p]?.label??p;if(/^[A-Z]/.test(l.expected))return`קלט לא תקין: צריך להיות instanceof ${l.expected}, התקבל ${f}`;return`קלט לא תקין: צריך להיות ${m}, התקבל ${f}`}case"invalid_value":{if(l.values.length===1)return`ערך לא תקין: הערך חייב להיות ${x(l.values[0])}`;let d=l.values.map((f)=>x(f));if(l.values.length===2)return`ערך לא תקין: האפשרויות המתאימות הן ${d[0]} או ${d[1]}`;let m=d[d.length-1];return`ערך לא תקין: האפשרויות המתאימות הן ${d.slice(0,-1).join(", ")} או ${m}`}case"too_big":{let d=a(l.origin),m=r(l.origin??"value");if(l.origin==="string")return`${d?.longLabel??"ארוך"} מדי: ${m} צריכה להכיל ${l.maximum.toString()} ${d?.unit??""} ${l.inclusive?"או פחות":"לכל היותר"}`.trim();if(l.origin==="number"){let v=l.inclusive?`קטן או שווה ל-${l.maximum}`:`קטן מ-${l.maximum}`;return`גדול מדי: ${m} צריך להיות ${v}`}if(l.origin==="array"||l.origin==="set"){let v=l.origin==="set"?"צריכה":"צריך",g=l.inclusive?`${l.maximum} ${d?.unit??""} או פחות`:`פחות מ-${l.maximum} ${d?.unit??""}`;return`גדול מדי: ${m} ${v} להכיל ${g}`.trim()}let p=l.inclusive?"<=":"<",f=i(l.origin??"value");if(d?.unit)return`${d.longLabel} מדי: ${m} ${f} ${p}${l.maximum.toString()} ${d.unit}`;return`${d?.longLabel??"גדול"} מדי: ${m} ${f} ${p}${l.maximum.toString()}`}case"too_small":{let d=a(l.origin),m=r(l.origin??"value");if(l.origin==="string")return`${d?.shortLabel??"קצר"} מדי: ${m} צריכה להכיל ${l.minimum.toString()} ${d?.unit??""} ${l.inclusive?"או יותר":"לפחות"}`.trim();if(l.origin==="number"){let v=l.inclusive?`גדול או שווה ל-${l.minimum}`:`גדול מ-${l.minimum}`;return`קטן מדי: ${m} צריך להיות ${v}`}if(l.origin==="array"||l.origin==="set"){let v=l.origin==="set"?"צריכה":"צריך";if(l.minimum===1&&l.inclusive){let b=l.origin==="set"?"לפחות פריט אחד":"לפחות פריט אחד";return`קטן מדי: ${m} ${v} להכיל ${b}`}let g=l.inclusive?`${l.minimum} ${d?.unit??""} או יותר`:`יותר מ-${l.minimum} ${d?.unit??""}`;return`קטן מדי: ${m} ${v} להכיל ${g}`.trim()}let p=l.inclusive?">=":">",f=i(l.origin??"value");if(d?.unit)return`${d.shortLabel} מדי: ${m} ${f} ${p}${l.minimum.toString()} ${d.unit}`;return`${d?.shortLabel??"קטן"} מדי: ${m} ${f} ${p}${l.minimum.toString()}`}case"invalid_format":{let d=l;if(d.format==="starts_with")return`המחרוזת חייבת להתחיל ב "${d.prefix}"`;if(d.format==="ends_with")return`המחרוזת חייבת להסתיים ב "${d.suffix}"`;if(d.format==="includes")return`המחרוזת חייבת לכלול "${d.includes}"`;if(d.format==="regex")return`המחרוזת חייבת להתאים לתבנית ${d.pattern}`;let m=s[d.format],p=m?.label??d.format,v=(m?.gender??"m")==="f"?"תקינה":"תקין";return`${p} לא ${v}`}case"not_multiple_of":return`מספר לא תקין: חייב להיות מכפלה של ${l.divisor}`;case"unrecognized_keys":return`מפתח${l.keys.length>1?"ות":""} לא מזוה${l.keys.length>1?"ים":"ה"}: ${z(l.keys,", ")}`;case"invalid_key":return"שדה לא תקין באובייקט";case"invalid_union":return"קלט לא תקין";case"invalid_element":return`ערך לא תקין ב${r(l.origin??"array")}`;default:return"קלט לא תקין"}}};function wf(){return{localeError:tI()}}var rI=()=>{let e={string:{unit:"znakova",verb:"imati"},file:{unit:"bajtova",verb:"imati"},array:{unit:"stavki",verb:"imati"},set:{unit:"stavki",verb:"imati"}};function t(r){return e[r]??null}let n={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(r)=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=k(r.input),s=o[a]??a;if(/^[A-Z]/.test(r.expected))return`Neispravan unos: očekuje se instanceof ${r.expected}, a primljeno je ${s}`;return`Neispravan unos: očekuje se ${i}, a primljeno je ${s}`}case"invalid_value":if(r.values.length===1)return`Neispravna vrijednost: očekivano ${x(r.values[0])}`;return`Neispravna opcija: očekivano jedno od ${z(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin),s=o[r.origin]??r.origin;if(a)return`Preveliko: očekivano da ${s??"vrijednost"} ima ${i}${r.maximum.toString()} ${a.unit??"elemenata"}`;return`Preveliko: očekivano da ${s??"vrijednost"} bude ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin),s=o[r.origin]??r.origin;if(a)return`Premalo: očekivano da ${s} ima ${i}${r.minimum.toString()} ${a.unit}`;return`Premalo: očekivano da ${s} bude ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;if(i.format==="starts_with")return`Neispravan tekst: mora započinjati s "${i.prefix}"`;if(i.format==="ends_with")return`Neispravan tekst: mora završavati s "${i.suffix}"`;if(i.format==="includes")return`Neispravan tekst: mora sadržavati "${i.includes}"`;if(i.format==="regex")return`Neispravan tekst: mora odgovarati uzorku ${i.pattern}`;return`Neispravna ${n[i.format]??r.format}`}case"not_multiple_of":return`Neispravan broj: mora biti višekratnik od ${r.divisor}`;case"unrecognized_keys":return`Neprepoznat${r.keys.length>1?"i ključevi":" ključ"}: ${z(r.keys,", ")}`;case"invalid_key":return`Neispravan ključ u ${o[r.origin]??r.origin}`;case"invalid_union":return"Neispravan unos";case"invalid_element":return`Neispravna vrijednost u ${o[r.origin]??r.origin}`;default:return"Neispravan unos"}}};function Rf(){return{localeError:rI()}}var nI=()=>{let e={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}};function t(r){return e[r]??null}let n={regex:"bemenet",email:"email cím",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őbélyeg",date:"ISO dátum",time:"ISO idő",duration:"ISO időintervallum",ipv4:"IPv4 cím",ipv6:"IPv6 cím",cidrv4:"IPv4 tartomány",cidrv6:"IPv6 tartomány",base64:"base64-kódolt string",base64url:"base64url-kódolt string",json_string:"JSON string",e164:"E.164 szám",jwt:"JWT",template_literal:"bemenet"},o={nan:"NaN",number:"szám",array:"tömb"};return(r)=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=k(r.input),s=o[a]??a;if(/^[A-Z]/.test(r.expected))return`Érvénytelen bemenet: a várt érték instanceof ${r.expected}, a kapott érték ${s}`;return`Érvénytelen bemenet: a várt érték ${i}, a kapott érték ${s}`}case"invalid_value":if(r.values.length===1)return`Érvénytelen bemenet: a várt érték ${x(r.values[0])}`;return`Érvénytelen opció: valamelyik érték várt ${z(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);if(a)return`Túl nagy: ${r.origin??"érték"} mérete túl nagy ${i}${r.maximum.toString()} ${a.unit??"elem"}`;return`Túl nagy: a bemeneti érték ${r.origin??"érték"} túl nagy: ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);if(a)return`Túl kicsi: a bemeneti érték ${r.origin} mérete túl kicsi ${i}${r.minimum.toString()} ${a.unit}`;return`Túl kicsi: a bemeneti érték ${r.origin} túl kicsi ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;if(i.format==="starts_with")return`Érvénytelen string: "${i.prefix}" értékkel kell kezdődnie`;if(i.format==="ends_with")return`Érvénytelen string: "${i.suffix}" értékkel kell végződnie`;if(i.format==="includes")return`Érvénytelen string: "${i.includes}" értéket kell tartalmaznia`;if(i.format==="regex")return`Érvénytelen string: ${i.pattern} mintának kell megfelelnie`;return`Érvénytelen ${n[i.format]??r.format}`}case"not_multiple_of":return`Érvénytelen szám: ${r.divisor} többszörösének kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${r.keys.length>1?"s":""}: ${z(r.keys,", ")}`;case"invalid_key":return`Érvénytelen kulcs ${r.origin}`;case"invalid_union":return"Érvénytelen bemenet";case"invalid_element":return`Érvénytelen érték: ${r.origin}`;default:return"Érvénytelen bemenet"}}};function xf(){return{localeError:nI()}}function yy(e,t,n){return Math.abs(e)===1?t:n}function Bn(e){if(!e)return"";let t=["ա","ե","ը","ի","ո","ու","օ"],n=e[e.length-1];return e+(t.includes(n)?"ն":"ը")}var oI=()=>{let e={string:{unit:{one:"նշան",many:"նշաններ"},verb:"ունենալ"},file:{unit:{one:"բայթ",many:"բայթեր"},verb:"ունենալ"},array:{unit:{one:"տարր",many:"տարրեր"},verb:"ունենալ"},set:{unit:{one:"տարր",many:"տարրեր"},verb:"ունենալ"}};function t(r){return e[r]??null}let n={regex:"մուտք",email:"էլ. հասցե",url:"URL",emoji:"էմոջի",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO ամսաթիվ և ժամ",date:"ISO ամսաթիվ",time:"ISO ժամ",duration:"ISO տևողություն",ipv4:"IPv4 հասցե",ipv6:"IPv6 հասցե",cidrv4:"IPv4 միջակայք",cidrv6:"IPv6 միջակայք",base64:"base64 ձևաչափով տող",base64url:"base64url ձևաչափով տող",json_string:"JSON տող",e164:"E.164 համար",jwt:"JWT",template_literal:"մուտք"},o={nan:"NaN",number:"թիվ",array:"զանգված"};return(r)=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=k(r.input),s=o[a]??a;if(/^[A-Z]/.test(r.expected))return`Սխալ մուտքագրում․ սպասվում էր instanceof ${r.expected}, ստացվել է ${s}`;return`Սխալ մուտքագրում․ սպասվում էր ${i}, ստացվել է ${s}`}case"invalid_value":if(r.values.length===1)return`Սխալ մուտքագրում․ սպասվում էր ${x(r.values[1])}`;return`Սխալ տարբերակ․ սպասվում էր հետևյալներից մեկը՝ ${z(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);if(a){let s=Number(r.maximum),c=yy(s,a.unit.one,a.unit.many);return`Չափազանց մեծ արժեք․ սպասվում է, որ ${Bn(r.origin??"արժեք")} կունենա ${i}${r.maximum.toString()} ${c}`}return`Չափազանց մեծ արժեք․ սպասվում է, որ ${Bn(r.origin??"արժեք")} լինի ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);if(a){let s=Number(r.minimum),c=yy(s,a.unit.one,a.unit.many);return`Չափազանց փոքր արժեք․ սպասվում է, որ ${Bn(r.origin)} կունենա ${i}${r.minimum.toString()} ${c}`}return`Չափազանց փոքր արժեք․ սպասվում է, որ ${Bn(r.origin)} լինի ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;if(i.format==="starts_with")return`Սխալ տող․ պետք է սկսվի "${i.prefix}"-ով`;if(i.format==="ends_with")return`Սխալ տող․ պետք է ավարտվի "${i.suffix}"-ով`;if(i.format==="includes")return`Սխալ տող․ պետք է պարունակի "${i.includes}"`;if(i.format==="regex")return`Սխալ տող․ պետք է համապատասխանի ${i.pattern} ձևաչափին`;return`Սխալ ${n[i.format]??r.format}`}case"not_multiple_of":return`Սխալ թիվ․ պետք է բազմապատիկ լինի ${r.divisor}-ի`;case"unrecognized_keys":return`Չճանաչված բանալի${r.keys.length>1?"ներ":""}. ${z(r.keys,", ")}`;case"invalid_key":return`Սխալ բանալի ${Bn(r.origin)}-ում`;case"invalid_union":return"Սխալ մուտքագրում";case"invalid_element":return`Սխալ արժեք ${Bn(r.origin)}-ում`;default:return"Սխալ մուտքագրում"}}};function kf(){return{localeError:oI()}}var iI=()=>{let e={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}};function t(r){return e[r]??null}let n={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(r)=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=k(r.input),s=o[a]??a;if(/^[A-Z]/.test(r.expected))return`Input tidak valid: diharapkan instanceof ${r.expected}, diterima ${s}`;return`Input tidak valid: diharapkan ${i}, diterima ${s}`}case"invalid_value":if(r.values.length===1)return`Input tidak valid: diharapkan ${x(r.values[0])}`;return`Pilihan tidak valid: diharapkan salah satu dari ${z(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);if(a)return`Terlalu besar: diharapkan ${r.origin??"value"} memiliki ${i}${r.maximum.toString()} ${a.unit??"elemen"}`;return`Terlalu besar: diharapkan ${r.origin??"value"} menjadi ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);if(a)return`Terlalu kecil: diharapkan ${r.origin} memiliki ${i}${r.minimum.toString()} ${a.unit}`;return`Terlalu kecil: diharapkan ${r.origin} menjadi ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;if(i.format==="starts_with")return`String tidak valid: harus dimulai dengan "${i.prefix}"`;if(i.format==="ends_with")return`String tidak valid: harus berakhir dengan "${i.suffix}"`;if(i.format==="includes")return`String tidak valid: harus menyertakan "${i.includes}"`;if(i.format==="regex")return`String tidak valid: harus sesuai pola ${i.pattern}`;return`${n[i.format]??r.format} tidak valid`}case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${r.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${r.keys.length>1?"s":""}: ${z(r.keys,", ")}`;case"invalid_key":return`Kunci tidak valid di ${r.origin}`;case"invalid_union":return"Input tidak valid";case"invalid_element":return`Nilai tidak valid di ${r.origin}`;default:return"Input tidak valid"}}};function If(){return{localeError:iI()}}var aI=()=>{let e={string:{unit:"stafi",verb:"að hafa"},file:{unit:"bæti",verb:"að hafa"},array:{unit:"hluti",verb:"að hafa"},set:{unit:"hluti",verb:"að hafa"}};function t(r){return e[r]??null}let n={regex:"gildi",email:"netfang",url:"vefslóð",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ími",date:"ISO dagsetning",time:"ISO tími",duration:"ISO tímalengd",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ölugildi",jwt:"JWT",template_literal:"gildi"},o={nan:"NaN",number:"númer",array:"fylki"};return(r)=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=k(r.input),s=o[a]??a;if(/^[A-Z]/.test(r.expected))return`Rangt gildi: Þú slóst inn ${s} þar sem á að vera instanceof ${r.expected}`;return`Rangt gildi: Þú slóst inn ${s} þar sem á að vera ${i}`}case"invalid_value":if(r.values.length===1)return`Rangt gildi: gert ráð fyrir ${x(r.values[0])}`;return`Ógilt val: má vera eitt af eftirfarandi ${z(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);if(a)return`Of stórt: gert er ráð fyrir að ${r.origin??"gildi"} hafi ${i}${r.maximum.toString()} ${a.unit??"hluti"}`;return`Of stórt: gert er ráð fyrir að ${r.origin??"gildi"} sé ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);if(a)return`Of lítið: gert er ráð fyrir að ${r.origin} hafi ${i}${r.minimum.toString()} ${a.unit}`;return`Of lítið: gert er ráð fyrir að ${r.origin} sé ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;if(i.format==="starts_with")return`Ógildur strengur: verður að byrja á "${i.prefix}"`;if(i.format==="ends_with")return`Ógildur strengur: verður að enda á "${i.suffix}"`;if(i.format==="includes")return`Ógildur strengur: verður að innihalda "${i.includes}"`;if(i.format==="regex")return`Ógildur strengur: verður að fylgja mynstri ${i.pattern}`;return`Rangt ${n[i.format]??r.format}`}case"not_multiple_of":return`Röng tala: verður að vera margfeldi af ${r.divisor}`;case"unrecognized_keys":return`Óþekkt ${r.keys.length>1?"ir lyklar":"ur lykill"}: ${z(r.keys,", ")}`;case"invalid_key":return`Rangur lykill í ${r.origin}`;case"invalid_union":return"Rangt gildi";case"invalid_element":return`Rangt gildi í ${r.origin}`;default:return"Rangt gildi"}}};function Pf(){return{localeError:aI()}}var sI=()=>{let e={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}};function t(r){return e[r]??null}let n={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(r)=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=k(r.input),s=o[a]??a;if(/^[A-Z]/.test(r.expected))return`Input non valido: atteso instanceof ${r.expected}, ricevuto ${s}`;return`Input non valido: atteso ${i}, ricevuto ${s}`}case"invalid_value":if(r.values.length===1)return`Input non valido: atteso ${x(r.values[0])}`;return`Opzione non valida: atteso uno tra ${z(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);if(a)return`Troppo grande: ${r.origin??"valore"} deve avere ${i}${r.maximum.toString()} ${a.unit??"elementi"}`;return`Troppo grande: ${r.origin??"valore"} deve essere ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);if(a)return`Troppo piccolo: ${r.origin} deve avere ${i}${r.minimum.toString()} ${a.unit}`;return`Troppo piccolo: ${r.origin} deve essere ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;if(i.format==="starts_with")return`Stringa non valida: deve iniziare con "${i.prefix}"`;if(i.format==="ends_with")return`Stringa non valida: deve terminare con "${i.suffix}"`;if(i.format==="includes")return`Stringa non valida: deve includere "${i.includes}"`;if(i.format==="regex")return`Stringa non valida: deve corrispondere al pattern ${i.pattern}`;return`Input non valido: ${n[i.format]??r.format}`}case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${r.divisor}`;case"unrecognized_keys":return`Chiav${r.keys.length>1?"i":"e"} non riconosciut${r.keys.length>1?"e":"a"}: ${z(r.keys,", ")}`;case"invalid_key":return`Chiave non valida in ${r.origin}`;case"invalid_union":return"Input non valido";case"invalid_element":return`Valore non valido in ${r.origin}`;default:return"Input non valido"}}};function Ef(){return{localeError:sI()}}var cI=()=>{let e={string:{unit:"文字",verb:"である"},file:{unit:"バイト",verb:"である"},array:{unit:"要素",verb:"である"},set:{unit:"要素",verb:"である"}};function t(r){return e[r]??null}let n={regex:"入力値",email:"メールアドレス",url:"URL",emoji:"絵文字",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO日時",date:"ISO日付",time:"ISO時刻",duration:"ISO期間",ipv4:"IPv4アドレス",ipv6:"IPv6アドレス",cidrv4:"IPv4範囲",cidrv6:"IPv6範囲",base64:"base64エンコード文字列",base64url:"base64urlエンコード文字列",json_string:"JSON文字列",e164:"E.164番号",jwt:"JWT",template_literal:"入力値"},o={nan:"NaN",number:"数値",array:"配列"};return(r)=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=k(r.input),s=o[a]??a;if(/^[A-Z]/.test(r.expected))return`無効な入力: instanceof ${r.expected}が期待されましたが、${s}が入力されました`;return`無効な入力: ${i}が期待されましたが、${s}が入力されました`}case"invalid_value":if(r.values.length===1)return`無効な入力: ${x(r.values[0])}が期待されました`;return`無効な選択: ${z(r.values,"、")}のいずれかである必要があります`;case"too_big":{let i=r.inclusive?"以下である":"より小さい",a=t(r.origin);if(a)return`大きすぎる値: ${r.origin??"値"}は${r.maximum.toString()}${a.unit??"要素"}${i}必要があります`;return`大きすぎる値: ${r.origin??"値"}は${r.maximum.toString()}${i}必要があります`}case"too_small":{let i=r.inclusive?"以上である":"より大きい",a=t(r.origin);if(a)return`小さすぎる値: ${r.origin}は${r.minimum.toString()}${a.unit}${i}必要があります`;return`小さすぎる値: ${r.origin}は${r.minimum.toString()}${i}必要があります`}case"invalid_format":{let i=r;if(i.format==="starts_with")return`無効な文字列: "${i.prefix}"で始まる必要があります`;if(i.format==="ends_with")return`無効な文字列: "${i.suffix}"で終わる必要があります`;if(i.format==="includes")return`無効な文字列: "${i.includes}"を含む必要があります`;if(i.format==="regex")return`無効な文字列: パターン${i.pattern}に一致する必要があります`;return`無効な${n[i.format]??r.format}`}case"not_multiple_of":return`無効な数値: ${r.divisor}の倍数である必要があります`;case"unrecognized_keys":return`認識されていないキー${r.keys.length>1?"群":""}: ${z(r.keys,"、")}`;case"invalid_key":return`${r.origin}内の無効なキー`;case"invalid_union":return"無効な入力";case"invalid_element":return`${r.origin}内の無効な値`;default:return"無効な入力"}}};function Tf(){return{localeError:cI()}}var lI=()=>{let e={string:{unit:"სიმბოლო",verb:"უნდა შეიცავდეს"},file:{unit:"ბაიტი",verb:"უნდა შეიცავდეს"},array:{unit:"ელემენტი",verb:"უნდა შეიცავდეს"},set:{unit:"ელემენტი",verb:"უნდა შეიცავდეს"}};function t(r){return e[r]??null}let n={regex:"შეყვანა",email:"ელ-ფოსტის მისამართი",url:"URL",emoji:"ემოჯი",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"თარიღი-დრო",date:"თარიღი",time:"დრო",duration:"ხანგრძლივობა",ipv4:"IPv4 მისამართი",ipv6:"IPv6 მისამართი",cidrv4:"IPv4 დიაპაზონი",cidrv6:"IPv6 დიაპაზონი",base64:"base64-კოდირებული ველი",base64url:"base64url-კოდირებული ველი",json_string:"JSON ველი",e164:"E.164 ნომერი",jwt:"JWT",template_literal:"შეყვანა"},o={nan:"NaN",number:"რიცხვი",string:"ველი",boolean:"ბულეანი",function:"ფუნქცია",array:"მასივი"};return(r)=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=k(r.input),s=o[a]??a;if(/^[A-Z]/.test(r.expected))return`არასწორი შეყვანა: მოსალოდნელი instanceof ${r.expected}, მიღებული ${s}`;return`არასწორი შეყვანა: მოსალოდნელი ${i}, მიღებული ${s}`}case"invalid_value":if(r.values.length===1)return`არასწორი შეყვანა: მოსალოდნელი ${x(r.values[0])}`;return`არასწორი ვარიანტი: მოსალოდნელია ერთ-ერთი ${z(r.values,"|")}-დან`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);if(a)return`ზედმეტად დიდი: მოსალოდნელი ${r.origin??"მნიშვნელობა"} ${a.verb} ${i}${r.maximum.toString()} ${a.unit}`;return`ზედმეტად დიდი: მოსალოდნელი ${r.origin??"მნიშვნელობა"} იყოს ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);if(a)return`ზედმეტად პატარა: მოსალოდნელი ${r.origin} ${a.verb} ${i}${r.minimum.toString()} ${a.unit}`;return`ზედმეტად პატარა: მოსალოდნელი ${r.origin} იყოს ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;if(i.format==="starts_with")return`არასწორი ველი: უნდა იწყებოდეს "${i.prefix}"-ით`;if(i.format==="ends_with")return`არასწორი ველი: უნდა მთავრდებოდეს "${i.suffix}"-ით`;if(i.format==="includes")return`არასწორი ველი: უნდა შეიცავდეს "${i.includes}"-ს`;if(i.format==="regex")return`არასწორი ველი: უნდა შეესაბამებოდეს შაბლონს ${i.pattern}`;return`არასწორი ${n[i.format]??r.format}`}case"not_multiple_of":return`არასწორი რიცხვი: უნდა იყოს ${r.divisor}-ის ჯერადი`;case"unrecognized_keys":return`უცნობი გასაღებ${r.keys.length>1?"ები":"ი"}: ${z(r.keys,", ")}`;case"invalid_key":return`არასწორი გასაღები ${r.origin}-ში`;case"invalid_union":return"არასწორი შეყვანა";case"invalid_element":return`არასწორი მნიშვნელობა ${r.origin}-ში`;default:return"არასწორი შეყვანა"}}};function jf(){return{localeError:lI()}}var uI=()=>{let e={string:{unit:"តួអក្សរ",verb:"គួរមាន"},file:{unit:"បៃ",verb:"គួរមាន"},array:{unit:"ធាតុ",verb:"គួរមាន"},set:{unit:"ធាតុ",verb:"គួរមាន"}};function t(r){return e[r]??null}let n={regex:"ទិន្នន័យបញ្ចូល",email:"អាសយដ្ឋានអ៊ីមែល",url:"URL",emoji:"សញ្ញាអារម្មណ៍",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"កាលបរិច្ឆេទ និងម៉ោង ISO",date:"កាលបរិច្ឆេទ ISO",time:"ម៉ោង ISO",duration:"រយៈពេល ISO",ipv4:"អាសយដ្ឋាន IPv4",ipv6:"អាសយដ្ឋាន IPv6",cidrv4:"ដែនអាសយដ្ឋាន IPv4",cidrv6:"ដែនអាសយដ្ឋាន IPv6",base64:"ខ្សែអក្សរអ៊ិកូដ base64",base64url:"ខ្សែអក្សរអ៊ិកូដ base64url",json_string:"ខ្សែអក្សរ JSON",e164:"លេខ E.164",jwt:"JWT",template_literal:"ទិន្នន័យបញ្ចូល"},o={nan:"NaN",number:"លេខ",array:"អារេ (Array)",null:"គ្មានតម្លៃ (null)"};return(r)=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=k(r.input),s=o[a]??a;if(/^[A-Z]/.test(r.expected))return`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ instanceof ${r.expected} ប៉ុន្តែទទួលបាន ${s}`;return`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${i} ប៉ុន្តែទទួលបាន ${s}`}case"invalid_value":if(r.values.length===1)return`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${x(r.values[0])}`;return`ជម្រើសមិនត្រឹមត្រូវ៖ ត្រូវជាមួយក្នុងចំណោម ${z(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);if(a)return`ធំពេក៖ ត្រូវការ ${r.origin??"តម្លៃ"} ${i} ${r.maximum.toString()} ${a.unit??"ធាតុ"}`;return`ធំពេក៖ ត្រូវការ ${r.origin??"តម្លៃ"} ${i} ${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);if(a)return`តូចពេក៖ ត្រូវការ ${r.origin} ${i} ${r.minimum.toString()} ${a.unit}`;return`តូចពេក៖ ត្រូវការ ${r.origin} ${i} ${r.minimum.toString()}`}case"invalid_format":{let i=r;if(i.format==="starts_with")return`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវចាប់ផ្តើមដោយ "${i.prefix}"`;if(i.format==="ends_with")return`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវបញ្ចប់ដោយ "${i.suffix}"`;if(i.format==="includes")return`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវមាន "${i.includes}"`;if(i.format==="regex")return`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវតែផ្គូផ្គងនឹងទម្រង់ដែលបានកំណត់ ${i.pattern}`;return`មិនត្រឹមត្រូវ៖ ${n[i.format]??r.format}`}case"not_multiple_of":return`លេខមិនត្រឹមត្រូវ៖ ត្រូវតែជាពហុគុណនៃ ${r.divisor}`;case"unrecognized_keys":return`រកឃើញសោមិនស្គាល់៖ ${z(r.keys,", ")}`;case"invalid_key":return`សោមិនត្រឹមត្រូវនៅក្នុង ${r.origin}`;case"invalid_union":return"ទិន្នន័យមិនត្រឹមត្រូវ";case"invalid_element":return`ទិន្នន័យមិនត្រឹមត្រូវនៅក្នុង ${r.origin}`;default:return"ទិន្នន័យមិនត្រឹមត្រូវ"}}};function Ui(){return{localeError:uI()}}function Of(){return Ui()}var dI=()=>{let e={string:{unit:"문자",verb:"to have"},file:{unit:"바이트",verb:"to have"},array:{unit:"개",verb:"to have"},set:{unit:"개",verb:"to have"}};function t(r){return e[r]??null}let n={regex:"입력",email:"이메일 주소",url:"URL",emoji:"이모지",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO 날짜시간",date:"ISO 날짜",time:"ISO 시간",duration:"ISO 기간",ipv4:"IPv4 주소",ipv6:"IPv6 주소",cidrv4:"IPv4 범위",cidrv6:"IPv6 범위",base64:"base64 인코딩 문자열",base64url:"base64url 인코딩 문자열",json_string:"JSON 문자열",e164:"E.164 번호",jwt:"JWT",template_literal:"입력"},o={nan:"NaN"};return(r)=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=k(r.input),s=o[a]??a;if(/^[A-Z]/.test(r.expected))return`잘못된 입력: 예상 타입은 instanceof ${r.expected}, 받은 타입은 ${s}입니다`;return`잘못된 입력: 예상 타입은 ${i}, 받은 타입은 ${s}입니다`}case"invalid_value":if(r.values.length===1)return`잘못된 입력: 값은 ${x(r.values[0])} 이어야 합니다`;return`잘못된 옵션: ${z(r.values,"또는 ")} 중 하나여야 합니다`;case"too_big":{let i=r.inclusive?"이하":"미만",a=i==="미만"?"이어야 합니다":"여야 합니다",s=t(r.origin),c=s?.unit??"요소";if(s)return`${r.origin??"값"}이 너무 큽니다: ${r.maximum.toString()}${c} ${i}${a}`;return`${r.origin??"값"}이 너무 큽니다: ${r.maximum.toString()} ${i}${a}`}case"too_small":{let i=r.inclusive?"이상":"초과",a=i==="이상"?"이어야 합니다":"여야 합니다",s=t(r.origin),c=s?.unit??"요소";if(s)return`${r.origin??"값"}이 너무 작습니다: ${r.minimum.toString()}${c} ${i}${a}`;return`${r.origin??"값"}이 너무 작습니다: ${r.minimum.toString()} ${i}${a}`}case"invalid_format":{let i=r;if(i.format==="starts_with")return`잘못된 문자열: "${i.prefix}"(으)로 시작해야 합니다`;if(i.format==="ends_with")return`잘못된 문자열: "${i.suffix}"(으)로 끝나야 합니다`;if(i.format==="includes")return`잘못된 문자열: "${i.includes}"을(를) 포함해야 합니다`;if(i.format==="regex")return`잘못된 문자열: 정규식 ${i.pattern} 패턴과 일치해야 합니다`;return`잘못된 ${n[i.format]??r.format}`}case"not_multiple_of":return`잘못된 숫자: ${r.divisor}의 배수여야 합니다`;case"unrecognized_keys":return`인식할 수 없는 키: ${z(r.keys,", ")}`;case"invalid_key":return`잘못된 키: ${r.origin}`;case"invalid_union":return"잘못된 입력";case"invalid_element":return`잘못된 값: ${r.origin}`;default:return"잘못된 입력"}}};function Nf(){return{localeError:dI()}}var Di=(e)=>e.charAt(0).toUpperCase()+e.slice(1);function by(e){let t=Math.abs(e),n=t%10,o=t%100;if(o>=11&&o<=19||n===0)return"many";if(n===1)return"one";return"few"}var mI=()=>{let e={string:{unit:{one:"simbolis",few:"simboliai",many:"simbolių"},verb:{smaller:{inclusive:"turi būti ne ilgesnė kaip",notInclusive:"turi būti trumpesnė kaip"},bigger:{inclusive:"turi būti ne trumpesnė kaip",notInclusive:"turi būti ilgesnė kaip"}}},file:{unit:{one:"baitas",few:"baitai",many:"baitų"},verb:{smaller:{inclusive:"turi būti ne didesnis kaip",notInclusive:"turi būti mažesnis kaip"},bigger:{inclusive:"turi būti ne mažesnis kaip",notInclusive:"turi būti didesnis kaip"}}},array:{unit:{one:"elementą",few:"elementus",many:"elementų"},verb:{smaller:{inclusive:"turi turėti ne daugiau kaip",notInclusive:"turi turėti mažiau kaip"},bigger:{inclusive:"turi turėti ne mažiau kaip",notInclusive:"turi turėti daugiau kaip"}}},set:{unit:{one:"elementą",few:"elementus",many:"elementų"},verb:{smaller:{inclusive:"turi turėti ne daugiau kaip",notInclusive:"turi turėti mažiau kaip"},bigger:{inclusive:"turi turėti ne mažiau kaip",notInclusive:"turi turėti daugiau kaip"}}}};function t(r,i,a,s){let c=e[r]??null;if(c===null)return c;return{unit:c.unit[i],verb:c.verb[s][a?"inclusive":"notInclusive"]}}let n={regex:"įvestis",email:"el. pašto 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ė",ipv4:"IPv4 adresas",ipv6:"IPv6 adresas",cidrv4:"IPv4 tinklo prefiksas (CIDR)",cidrv6:"IPv6 tinklo prefiksas (CIDR)",base64:"base64 užkoduota eilutė",base64url:"base64url užkoduota eilutė",json_string:"JSON eilutė",e164:"E.164 numeris",jwt:"JWT",template_literal:"įvestis"},o={nan:"NaN",number:"skaičius",bigint:"sveikasis skaičius",string:"eilutė",boolean:"loginė reikšmė",undefined:"neapibrėžta reikšmė",function:"funkcija",symbol:"simbolis",array:"masyvas",object:"objektas",null:"nulinė reikšmė"};return(r)=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=k(r.input),s=o[a]??a;if(/^[A-Z]/.test(r.expected))return`Gautas tipas ${s}, o tikėtasi - instanceof ${r.expected}`;return`Gautas tipas ${s}, o tikėtasi - ${i}`}case"invalid_value":if(r.values.length===1)return`Privalo būti ${x(r.values[0])}`;return`Privalo būti vienas iš ${z(r.values,"|")} pasirinkimų`;case"too_big":{let i=o[r.origin]??r.origin,a=t(r.origin,by(Number(r.maximum)),r.inclusive??!1,"smaller");if(a?.verb)return`${Di(i??r.origin??"reikšmė")} ${a.verb} ${r.maximum.toString()} ${a.unit??"elementų"}`;let s=r.inclusive?"ne didesnis kaip":"mažesnis kaip";return`${Di(i??r.origin??"reikšmė")} turi būti ${s} ${r.maximum.toString()} ${a?.unit}`}case"too_small":{let i=o[r.origin]??r.origin,a=t(r.origin,by(Number(r.minimum)),r.inclusive??!1,"bigger");if(a?.verb)return`${Di(i??r.origin??"reikšmė")} ${a.verb} ${r.minimum.toString()} ${a.unit??"elementų"}`;let s=r.inclusive?"ne mažesnis kaip":"didesnis kaip";return`${Di(i??r.origin??"reikšmė")} turi būti ${s} ${r.minimum.toString()} ${a?.unit}`}case"invalid_format":{let i=r;if(i.format==="starts_with")return`Eilutė privalo prasidėti "${i.prefix}"`;if(i.format==="ends_with")return`Eilutė privalo pasibaigti "${i.suffix}"`;if(i.format==="includes")return`Eilutė privalo įtraukti "${i.includes}"`;if(i.format==="regex")return`Eilutė privalo atitikti ${i.pattern}`;return`Neteisingas ${n[i.format]??r.format}`}case"not_multiple_of":return`Skaičius privalo būti ${r.divisor} kartotinis.`;case"unrecognized_keys":return`Neatpažint${r.keys.length>1?"i":"as"} rakt${r.keys.length>1?"ai":"as"}: ${z(r.keys,", ")}`;case"invalid_key":return"Rastas klaidingas raktas";case"invalid_union":return"Klaidinga įvestis";case"invalid_element":{let i=o[r.origin]??r.origin;return`${Di(i??r.origin??"reikšmė")} turi klaidingą įvestį`}default:return"Klaidinga įvestis"}}};function Cf(){return{localeError:mI()}}var pI=()=>{let e={string:{unit:"знаци",verb:"да имаат"},file:{unit:"бајти",verb:"да имаат"},array:{unit:"ставки",verb:"да имаат"},set:{unit:"ставки",verb:"да имаат"}};function t(r){return e[r]??null}let n={regex:"внес",email:"адреса на е-пошта",url:"URL",emoji:"емоџи",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO датум и време",date:"ISO датум",time:"ISO време",duration:"ISO времетраење",ipv4:"IPv4 адреса",ipv6:"IPv6 адреса",cidrv4:"IPv4 опсег",cidrv6:"IPv6 опсег",base64:"base64-енкодирана низа",base64url:"base64url-енкодирана низа",json_string:"JSON низа",e164:"E.164 број",jwt:"JWT",template_literal:"внес"},o={nan:"NaN",number:"број",array:"низа"};return(r)=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=k(r.input),s=o[a]??a;if(/^[A-Z]/.test(r.expected))return`Грешен внес: се очекува instanceof ${r.expected}, примено ${s}`;return`Грешен внес: се очекува ${i}, примено ${s}`}case"invalid_value":if(r.values.length===1)return`Invalid input: expected ${x(r.values[0])}`;return`Грешана опција: се очекува една ${z(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);if(a)return`Премногу голем: се очекува ${r.origin??"вредноста"} да има ${i}${r.maximum.toString()} ${a.unit??"елементи"}`;return`Премногу голем: се очекува ${r.origin??"вредноста"} да биде ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);if(a)return`Премногу мал: се очекува ${r.origin} да има ${i}${r.minimum.toString()} ${a.unit}`;return`Премногу мал: се очекува ${r.origin} да биде ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;if(i.format==="starts_with")return`Неважечка низа: мора да започнува со "${i.prefix}"`;if(i.format==="ends_with")return`Неважечка низа: мора да завршува со "${i.suffix}"`;if(i.format==="includes")return`Неважечка низа: мора да вклучува "${i.includes}"`;if(i.format==="regex")return`Неважечка низа: мора да одгоара на патернот ${i.pattern}`;return`Invalid ${n[i.format]??r.format}`}case"not_multiple_of":return`Грешен број: мора да биде делив со ${r.divisor}`;case"unrecognized_keys":return`${r.keys.length>1?"Непрепознаени клучеви":"Непрепознаен клуч"}: ${z(r.keys,", ")}`;case"invalid_key":return`Грешен клуч во ${r.origin}`;case"invalid_union":return"Грешен внес";case"invalid_element":return`Грешна вредност во ${r.origin}`;default:return"Грешен внес"}}};function qf(){return{localeError:pI()}}var fI=()=>{let e={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}};function t(r){return e[r]??null}let n={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(r)=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=k(r.input),s=o[a]??a;if(/^[A-Z]/.test(r.expected))return`Input tidak sah: dijangka instanceof ${r.expected}, diterima ${s}`;return`Input tidak sah: dijangka ${i}, diterima ${s}`}case"invalid_value":if(r.values.length===1)return`Input tidak sah: dijangka ${x(r.values[0])}`;return`Pilihan tidak sah: dijangka salah satu daripada ${z(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);if(a)return`Terlalu besar: dijangka ${r.origin??"nilai"} ${a.verb} ${i}${r.maximum.toString()} ${a.unit??"elemen"}`;return`Terlalu besar: dijangka ${r.origin??"nilai"} adalah ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);if(a)return`Terlalu kecil: dijangka ${r.origin} ${a.verb} ${i}${r.minimum.toString()} ${a.unit}`;return`Terlalu kecil: dijangka ${r.origin} adalah ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;if(i.format==="starts_with")return`String tidak sah: mesti bermula dengan "${i.prefix}"`;if(i.format==="ends_with")return`String tidak sah: mesti berakhir dengan "${i.suffix}"`;if(i.format==="includes")return`String tidak sah: mesti mengandungi "${i.includes}"`;if(i.format==="regex")return`String tidak sah: mesti sepadan dengan corak ${i.pattern}`;return`${n[i.format]??r.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${r.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${z(r.keys,", ")}`;case"invalid_key":return`Kunci tidak sah dalam ${r.origin}`;case"invalid_union":return"Input tidak sah";case"invalid_element":return`Nilai tidak sah dalam ${r.origin}`;default:return"Input tidak sah"}}};function Af(){return{localeError:fI()}}var hI=()=>{let e={string:{unit:"tekens",verb:"heeft"},file:{unit:"bytes",verb:"heeft"},array:{unit:"elementen",verb:"heeft"},set:{unit:"elementen",verb:"heeft"}};function t(r){return e[r]??null}let n={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(r)=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=k(r.input),s=o[a]??a;if(/^[A-Z]/.test(r.expected))return`Ongeldige invoer: verwacht instanceof ${r.expected}, ontving ${s}`;return`Ongeldige invoer: verwacht ${i}, ontving ${s}`}case"invalid_value":if(r.values.length===1)return`Ongeldige invoer: verwacht ${x(r.values[0])}`;return`Ongeldige optie: verwacht één van ${z(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin),s=r.origin==="date"?"laat":r.origin==="string"?"lang":"groot";if(a)return`Te ${s}: verwacht dat ${r.origin??"waarde"} ${i}${r.maximum.toString()} ${a.unit??"elementen"} ${a.verb}`;return`Te ${s}: verwacht dat ${r.origin??"waarde"} ${i}${r.maximum.toString()} is`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin),s=r.origin==="date"?"vroeg":r.origin==="string"?"kort":"klein";if(a)return`Te ${s}: verwacht dat ${r.origin} ${i}${r.minimum.toString()} ${a.unit} ${a.verb}`;return`Te ${s}: verwacht dat ${r.origin} ${i}${r.minimum.toString()} is`}case"invalid_format":{let i=r;if(i.format==="starts_with")return`Ongeldige tekst: moet met "${i.prefix}" beginnen`;if(i.format==="ends_with")return`Ongeldige tekst: moet op "${i.suffix}" eindigen`;if(i.format==="includes")return`Ongeldige tekst: moet "${i.includes}" bevatten`;if(i.format==="regex")return`Ongeldige tekst: moet overeenkomen met patroon ${i.pattern}`;return`Ongeldig: ${n[i.format]??r.format}`}case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${r.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${r.keys.length>1?"s":""}: ${z(r.keys,", ")}`;case"invalid_key":return`Ongeldige key in ${r.origin}`;case"invalid_union":return"Ongeldige invoer";case"invalid_element":return`Ongeldige waarde in ${r.origin}`;default:return"Ongeldige invoer"}}};function Mf(){return{localeError:hI()}}var gI=()=>{let e={string:{unit:"tegn",verb:"å ha"},file:{unit:"bytes",verb:"å ha"},array:{unit:"elementer",verb:"å inneholde"},set:{unit:"elementer",verb:"å inneholde"}};function t(r){return e[r]??null}let n={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åde",ipv6:"IPv6-område",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(r)=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=k(r.input),s=o[a]??a;if(/^[A-Z]/.test(r.expected))return`Ugyldig input: forventet instanceof ${r.expected}, fikk ${s}`;return`Ugyldig input: forventet ${i}, fikk ${s}`}case"invalid_value":if(r.values.length===1)return`Ugyldig verdi: forventet ${x(r.values[0])}`;return`Ugyldig valg: forventet en av ${z(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);if(a)return`For stor(t): forventet ${r.origin??"value"} til å ha ${i}${r.maximum.toString()} ${a.unit??"elementer"}`;return`For stor(t): forventet ${r.origin??"value"} til å ha ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);if(a)return`For lite(n): forventet ${r.origin} til å ha ${i}${r.minimum.toString()} ${a.unit}`;return`For lite(n): forventet ${r.origin} til å ha ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;if(i.format==="starts_with")return`Ugyldig streng: må starte med "${i.prefix}"`;if(i.format==="ends_with")return`Ugyldig streng: må ende med "${i.suffix}"`;if(i.format==="includes")return`Ugyldig streng: må inneholde "${i.includes}"`;if(i.format==="regex")return`Ugyldig streng: må matche mønsteret ${i.pattern}`;return`Ugyldig ${n[i.format]??r.format}`}case"not_multiple_of":return`Ugyldig tall: må være et multiplum av ${r.divisor}`;case"unrecognized_keys":return`${r.keys.length>1?"Ukjente nøkler":"Ukjent nøkkel"}: ${z(r.keys,", ")}`;case"invalid_key":return`Ugyldig nøkkel i ${r.origin}`;case"invalid_union":return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${r.origin}`;default:return"Ugyldig input"}}};function Uf(){return{localeError:gI()}}var vI=()=>{let e={string:{unit:"harf",verb:"olmalıdır"},file:{unit:"bayt",verb:"olmalıdır"},array:{unit:"unsur",verb:"olmalıdır"},set:{unit:"unsur",verb:"olmalıdır"}};function t(r){return e[r]??null}let n={regex:"giren",email:"epostagâh",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âmı",date:"ISO tarihi",time:"ISO zamanı",duration:"ISO müddeti",ipv4:"IPv4 nişânı",ipv6:"IPv6 nişânı",cidrv4:"IPv4 menzili",cidrv6:"IPv6 menzili",base64:"base64-şifreli metin",base64url:"base64url-şifreli metin",json_string:"JSON metin",e164:"E.164 sayısı",jwt:"JWT",template_literal:"giren"},o={nan:"NaN",number:"numara",array:"saf",null:"gayb"};return(r)=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=k(r.input),s=o[a]??a;if(/^[A-Z]/.test(r.expected))return`Fâsit giren: umulan instanceof ${r.expected}, alınan ${s}`;return`Fâsit giren: umulan ${i}, alınan ${s}`}case"invalid_value":if(r.values.length===1)return`Fâsit giren: umulan ${x(r.values[0])}`;return`Fâsit tercih: mûteberler ${z(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);if(a)return`Fazla büyük: ${r.origin??"value"}, ${i}${r.maximum.toString()} ${a.unit??"elements"} sahip olmalıydı.`;return`Fazla büyük: ${r.origin??"value"}, ${i}${r.maximum.toString()} olmalıydı.`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);if(a)return`Fazla küçük: ${r.origin}, ${i}${r.minimum.toString()} ${a.unit} sahip olmalıydı.`;return`Fazla küçük: ${r.origin}, ${i}${r.minimum.toString()} olmalıydı.`}case"invalid_format":{let i=r;if(i.format==="starts_with")return`Fâsit metin: "${i.prefix}" ile başlamalı.`;if(i.format==="ends_with")return`Fâsit metin: "${i.suffix}" ile bitmeli.`;if(i.format==="includes")return`Fâsit metin: "${i.includes}" ihtivâ etmeli.`;if(i.format==="regex")return`Fâsit metin: ${i.pattern} nakşına uymalı.`;return`Fâsit ${n[i.format]??r.format}`}case"not_multiple_of":return`Fâsit sayı: ${r.divisor} katı olmalıydı.`;case"unrecognized_keys":return`Tanınmayan anahtar ${r.keys.length>1?"s":""}: ${z(r.keys,", ")}`;case"invalid_key":return`${r.origin} için tanınmayan anahtar var.`;case"invalid_union":return"Giren tanınamadı.";case"invalid_element":return`${r.origin} için tanınmayan kıymet var.`;default:return"Kıymet tanınamadı."}}};function Df(){return{localeError:vI()}}var _I=()=>{let e={string:{unit:"توکي",verb:"ولري"},file:{unit:"بایټس",verb:"ولري"},array:{unit:"توکي",verb:"ولري"},set:{unit:"توکي",verb:"ولري"}};function t(r){return e[r]??null}let n={regex:"ورودي",email:"بریښنالیک",url:"یو آر ال",emoji:"ایموجي",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"نیټه او وخت",date:"نېټه",time:"وخت",duration:"موده",ipv4:"د IPv4 پته",ipv6:"د IPv6 پته",cidrv4:"د IPv4 ساحه",cidrv6:"د IPv6 ساحه",base64:"base64-encoded متن",base64url:"base64url-encoded متن",json_string:"JSON متن",e164:"د E.164 شمېره",jwt:"JWT",template_literal:"ورودي"},o={nan:"NaN",number:"عدد",array:"ارې"};return(r)=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=k(r.input),s=o[a]??a;if(/^[A-Z]/.test(r.expected))return`ناسم ورودي: باید instanceof ${r.expected} وای, مګر ${s} ترلاسه شو`;return`ناسم ورودي: باید ${i} وای, مګر ${s} ترلاسه شو`}case"invalid_value":if(r.values.length===1)return`ناسم ورودي: باید ${x(r.values[0])} وای`;return`ناسم انتخاب: باید یو له ${z(r.values,"|")} څخه وای`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);if(a)return`ډیر لوی: ${r.origin??"ارزښت"} باید ${i}${r.maximum.toString()} ${a.unit??"عنصرونه"} ولري`;return`ډیر لوی: ${r.origin??"ارزښت"} باید ${i}${r.maximum.toString()} وي`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);if(a)return`ډیر کوچنی: ${r.origin} باید ${i}${r.minimum.toString()} ${a.unit} ولري`;return`ډیر کوچنی: ${r.origin} باید ${i}${r.minimum.toString()} وي`}case"invalid_format":{let i=r;if(i.format==="starts_with")return`ناسم متن: باید د "${i.prefix}" سره پیل شي`;if(i.format==="ends_with")return`ناسم متن: باید د "${i.suffix}" سره پای ته ورسيږي`;if(i.format==="includes")return`ناسم متن: باید "${i.includes}" ولري`;if(i.format==="regex")return`ناسم متن: باید د ${i.pattern} سره مطابقت ولري`;return`${n[i.format]??r.format} ناسم دی`}case"not_multiple_of":return`ناسم عدد: باید د ${r.divisor} مضرب وي`;case"unrecognized_keys":return`ناسم ${r.keys.length>1?"کلیډونه":"کلیډ"}: ${z(r.keys,", ")}`;case"invalid_key":return`ناسم کلیډ په ${r.origin} کې`;case"invalid_union":return"ناسمه ورودي";case"invalid_element":return`ناسم عنصر په ${r.origin} کې`;default:return"ناسمه ورودي"}}};function Lf(){return{localeError:_I()}}var SI=()=>{let e={string:{unit:"znaków",verb:"mieć"},file:{unit:"bajtów",verb:"mieć"},array:{unit:"elementów",verb:"mieć"},set:{unit:"elementów",verb:"mieć"}};function t(r){return e[r]??null}let n={regex:"wyrażenie",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ąg znaków zakodowany w formacie base64",base64url:"ciąg znaków zakodowany w formacie base64url",json_string:"ciąg znaków w formacie JSON",e164:"liczba E.164",jwt:"JWT",template_literal:"wejście"},o={nan:"NaN",number:"liczba",array:"tablica"};return(r)=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=k(r.input),s=o[a]??a;if(/^[A-Z]/.test(r.expected))return`Nieprawidłowe dane wejściowe: oczekiwano instanceof ${r.expected}, otrzymano ${s}`;return`Nieprawidłowe dane wejściowe: oczekiwano ${i}, otrzymano ${s}`}case"invalid_value":if(r.values.length===1)return`Nieprawidłowe dane wejściowe: oczekiwano ${x(r.values[0])}`;return`Nieprawidłowa opcja: oczekiwano jednej z wartości ${z(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);if(a)return`Za duża wartość: oczekiwano, że ${r.origin??"wartość"} będzie mieć ${i}${r.maximum.toString()} ${a.unit??"elementów"}`;return`Zbyt duż(y/a/e): oczekiwano, że ${r.origin??"wartość"} będzie wynosić ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);if(a)return`Za mała wartość: oczekiwano, że ${r.origin??"wartość"} będzie mieć ${i}${r.minimum.toString()} ${a.unit??"elementów"}`;return`Zbyt mał(y/a/e): oczekiwano, że ${r.origin??"wartość"} będzie wynosić ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;if(i.format==="starts_with")return`Nieprawidłowy ciąg znaków: musi zaczynać się od "${i.prefix}"`;if(i.format==="ends_with")return`Nieprawidłowy ciąg znaków: musi kończyć się na "${i.suffix}"`;if(i.format==="includes")return`Nieprawidłowy ciąg znaków: musi zawierać "${i.includes}"`;if(i.format==="regex")return`Nieprawidłowy ciąg znaków: musi odpowiadać wzorcowi ${i.pattern}`;return`Nieprawidłow(y/a/e) ${n[i.format]??r.format}`}case"not_multiple_of":return`Nieprawidłowa liczba: musi być wielokrotnością ${r.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${r.keys.length>1?"s":""}: ${z(r.keys,", ")}`;case"invalid_key":return`Nieprawidłowy klucz w ${r.origin}`;case"invalid_union":return"Nieprawidłowe dane wejściowe";case"invalid_element":return`Nieprawidłowa wartość w ${r.origin}`;default:return"Nieprawidłowe dane wejściowe"}}};function Zf(){return{localeError:SI()}}var yI=()=>{let e={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function t(r){return e[r]??null}let n={regex:"padrão",email:"endereço 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ção ISO",ipv4:"endereço IPv4",ipv6:"endereço 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úmero E.164",jwt:"JWT",template_literal:"entrada"},o={nan:"NaN",number:"número",null:"nulo"};return(r)=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=k(r.input),s=o[a]??a;if(/^[A-Z]/.test(r.expected))return`Tipo inválido: esperado instanceof ${r.expected}, recebido ${s}`;return`Tipo inválido: esperado ${i}, recebido ${s}`}case"invalid_value":if(r.values.length===1)return`Entrada inválida: esperado ${x(r.values[0])}`;return`Opção inválida: esperada uma das ${z(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);if(a)return`Muito grande: esperado que ${r.origin??"valor"} tivesse ${i}${r.maximum.toString()} ${a.unit??"elementos"}`;return`Muito grande: esperado que ${r.origin??"valor"} fosse ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);if(a)return`Muito pequeno: esperado que ${r.origin} tivesse ${i}${r.minimum.toString()} ${a.unit}`;return`Muito pequeno: esperado que ${r.origin} fosse ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;if(i.format==="starts_with")return`Texto inválido: deve começar com "${i.prefix}"`;if(i.format==="ends_with")return`Texto inválido: deve terminar com "${i.suffix}"`;if(i.format==="includes")return`Texto inválido: deve incluir "${i.includes}"`;if(i.format==="regex")return`Texto inválido: deve corresponder ao padrão ${i.pattern}`;return`${n[i.format]??r.format} inválido`}case"not_multiple_of":return`Número inválido: deve ser múltiplo de ${r.divisor}`;case"unrecognized_keys":return`Chave${r.keys.length>1?"s":""} desconhecida${r.keys.length>1?"s":""}: ${z(r.keys,", ")}`;case"invalid_key":return`Chave inválida em ${r.origin}`;case"invalid_union":return"Entrada inválida";case"invalid_element":return`Valor inválido em ${r.origin}`;default:return"Campo inválido"}}};function Vf(){return{localeError:yI()}}var bI=()=>{let e={string:{unit:"caractere",verb:"să aibă"},file:{unit:"octeți",verb:"să aibă"},array:{unit:"elemente",verb:"să aibă"},set:{unit:"elemente",verb:"să aibă"},map:{unit:"intrări",verb:"să aibă"}};function t(r){return e[r]??null}let n={regex:"intrare",email:"adresă 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ă și oră ISO",date:"dată ISO",time:"oră ISO",duration:"durată ISO",ipv4:"adresă IPv4",ipv6:"adresă IPv6",mac:"adresă MAC",cidrv4:"interval IPv4",cidrv6:"interval IPv6",base64:"șir codat base64",base64url:"șir codat base64url",json_string:"șir JSON",e164:"număr E.164",jwt:"JWT",template_literal:"intrare"},o={nan:"NaN",string:"șir",number:"număr",boolean:"boolean",function:"funcție",array:"matrice",object:"obiect",undefined:"nedefinit",symbol:"simbol",bigint:"număr mare",void:"void",never:"never",map:"hartă",set:"set"};return(r)=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=k(r.input),s=o[a]??a;return`Intrare invalidă: așteptat ${i}, primit ${s}`}case"invalid_value":if(r.values.length===1)return`Intrare invalidă: așteptat ${x(r.values[0])}`;return`Opțiune invalidă: așteptat una dintre ${z(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);if(a)return`Prea mare: așteptat ca ${r.origin??"valoarea"} ${a.verb} ${i}${r.maximum.toString()} ${a.unit??"elemente"}`;return`Prea mare: așteptat ca ${r.origin??"valoarea"} să fie ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);if(a)return`Prea mic: așteptat ca ${r.origin} ${a.verb} ${i}${r.minimum.toString()} ${a.unit}`;return`Prea mic: așteptat ca ${r.origin} să fie ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;if(i.format==="starts_with")return`Șir invalid: trebuie să înceapă cu "${i.prefix}"`;if(i.format==="ends_with")return`Șir invalid: trebuie să se termine cu "${i.suffix}"`;if(i.format==="includes")return`Șir invalid: trebuie să includă "${i.includes}"`;if(i.format==="regex")return`Șir invalid: trebuie să se potrivească cu modelul ${i.pattern}`;return`Format invalid: ${n[i.format]??r.format}`}case"not_multiple_of":return`Număr invalid: trebuie să fie multiplu de ${r.divisor}`;case"unrecognized_keys":return`Chei nerecunoscute: ${z(r.keys,", ")}`;case"invalid_key":return`Cheie invalidă în ${r.origin}`;case"invalid_union":return"Intrare invalidă";case"invalid_element":return`Valoare invalidă în ${r.origin}`;default:return"Intrare invalidă"}}};function Ff(){return{localeError:bI()}}function $y(e,t,n,o){let r=Math.abs(e),i=r%10,a=r%100;if(a>=11&&a<=19)return o;if(i===1)return t;if(i>=2&&i<=4)return n;return o}var $I=()=>{let e={string:{unit:{one:"символ",few:"символа",many:"символов"},verb:"иметь"},file:{unit:{one:"байт",few:"байта",many:"байт"},verb:"иметь"},array:{unit:{one:"элемент",few:"элемента",many:"элементов"},verb:"иметь"},set:{unit:{one:"элемент",few:"элемента",many:"элементов"},verb:"иметь"}};function t(r){return e[r]??null}let n={regex:"ввод",email:"email адрес",url:"URL",emoji:"эмодзи",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO дата и время",date:"ISO дата",time:"ISO время",duration:"ISO длительность",ipv4:"IPv4 адрес",ipv6:"IPv6 адрес",cidrv4:"IPv4 диапазон",cidrv6:"IPv6 диапазон",base64:"строка в формате base64",base64url:"строка в формате base64url",json_string:"JSON строка",e164:"номер E.164",jwt:"JWT",template_literal:"ввод"},o={nan:"NaN",number:"число",array:"массив"};return(r)=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=k(r.input),s=o[a]??a;if(/^[A-Z]/.test(r.expected))return`Неверный ввод: ожидалось instanceof ${r.expected}, получено ${s}`;return`Неверный ввод: ожидалось ${i}, получено ${s}`}case"invalid_value":if(r.values.length===1)return`Неверный ввод: ожидалось ${x(r.values[0])}`;return`Неверный вариант: ожидалось одно из ${z(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);if(a){let s=Number(r.maximum),c=$y(s,a.unit.one,a.unit.few,a.unit.many);return`Слишком большое значение: ожидалось, что ${r.origin??"значение"} будет иметь ${i}${r.maximum.toString()} ${c}`}return`Слишком большое значение: ожидалось, что ${r.origin??"значение"} будет ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);if(a){let s=Number(r.minimum),c=$y(s,a.unit.one,a.unit.few,a.unit.many);return`Слишком маленькое значение: ожидалось, что ${r.origin} будет иметь ${i}${r.minimum.toString()} ${c}`}return`Слишком маленькое значение: ожидалось, что ${r.origin} будет ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;if(i.format==="starts_with")return`Неверная строка: должна начинаться с "${i.prefix}"`;if(i.format==="ends_with")return`Неверная строка: должна заканчиваться на "${i.suffix}"`;if(i.format==="includes")return`Неверная строка: должна содержать "${i.includes}"`;if(i.format==="regex")return`Неверная строка: должна соответствовать шаблону ${i.pattern}`;return`Неверный ${n[i.format]??r.format}`}case"not_multiple_of":return`Неверное число: должно быть кратным ${r.divisor}`;case"unrecognized_keys":return`Нераспознанн${r.keys.length>1?"ые":"ый"} ключ${r.keys.length>1?"и":""}: ${z(r.keys,", ")}`;case"invalid_key":return`Неверный ключ в ${r.origin}`;case"invalid_union":return"Неверные входные данные";case"invalid_element":return`Неверное значение в ${r.origin}`;default:return"Неверные входные данные"}}};function Jf(){return{localeError:$I()}}var zI=()=>{let e={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}};function t(r){return e[r]??null}let n={regex:"vnos",email:"e-poštni 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 čas",date:"ISO datum",time:"ISO čas",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 številka",jwt:"JWT",template_literal:"vnos"},o={nan:"NaN",number:"število",array:"tabela"};return(r)=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=k(r.input),s=o[a]??a;if(/^[A-Z]/.test(r.expected))return`Neveljaven vnos: pričakovano instanceof ${r.expected}, prejeto ${s}`;return`Neveljaven vnos: pričakovano ${i}, prejeto ${s}`}case"invalid_value":if(r.values.length===1)return`Neveljaven vnos: pričakovano ${x(r.values[0])}`;return`Neveljavna možnost: pričakovano eno izmed ${z(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);if(a)return`Preveliko: pričakovano, da bo ${r.origin??"vrednost"} imelo ${i}${r.maximum.toString()} ${a.unit??"elementov"}`;return`Preveliko: pričakovano, da bo ${r.origin??"vrednost"} ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);if(a)return`Premajhno: pričakovano, da bo ${r.origin} imelo ${i}${r.minimum.toString()} ${a.unit}`;return`Premajhno: pričakovano, da bo ${r.origin} ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;if(i.format==="starts_with")return`Neveljaven niz: mora se začeti z "${i.prefix}"`;if(i.format==="ends_with")return`Neveljaven niz: mora se končati z "${i.suffix}"`;if(i.format==="includes")return`Neveljaven niz: mora vsebovati "${i.includes}"`;if(i.format==="regex")return`Neveljaven niz: mora ustrezati vzorcu ${i.pattern}`;return`Neveljaven ${n[i.format]??r.format}`}case"not_multiple_of":return`Neveljavno število: mora biti večkratnik ${r.divisor}`;case"unrecognized_keys":return`Neprepoznan${r.keys.length>1?"i ključi":" ključ"}: ${z(r.keys,", ")}`;case"invalid_key":return`Neveljaven ključ v ${r.origin}`;case"invalid_union":return"Neveljaven vnos";case"invalid_element":return`Neveljavna vrednost v ${r.origin}`;default:return"Neveljaven vnos"}}};function Hf(){return{localeError:zI()}}var wI=()=>{let e={string:{unit:"tecken",verb:"att ha"},file:{unit:"bytes",verb:"att ha"},array:{unit:"objekt",verb:"att innehålla"},set:{unit:"objekt",verb:"att innehålla"}};function t(r){return e[r]??null}let n={regex:"reguljärt 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äng",base64url:"base64url-kodad sträng",json_string:"JSON-sträng",e164:"E.164-nummer",jwt:"JWT",template_literal:"mall-literal"},o={nan:"NaN",number:"antal",array:"lista"};return(r)=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=k(r.input),s=o[a]??a;if(/^[A-Z]/.test(r.expected))return`Ogiltig inmatning: förväntat instanceof ${r.expected}, fick ${s}`;return`Ogiltig inmatning: förväntat ${i}, fick ${s}`}case"invalid_value":if(r.values.length===1)return`Ogiltig inmatning: förväntat ${x(r.values[0])}`;return`Ogiltigt val: förväntade en av ${z(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);if(a)return`För stor(t): förväntade ${r.origin??"värdet"} att ha ${i}${r.maximum.toString()} ${a.unit??"element"}`;return`För stor(t): förväntat ${r.origin??"värdet"} att ha ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);if(a)return`För lite(t): förväntade ${r.origin??"värdet"} att ha ${i}${r.minimum.toString()} ${a.unit}`;return`För lite(t): förväntade ${r.origin??"värdet"} att ha ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;if(i.format==="starts_with")return`Ogiltig sträng: måste börja med "${i.prefix}"`;if(i.format==="ends_with")return`Ogiltig sträng: måste sluta med "${i.suffix}"`;if(i.format==="includes")return`Ogiltig sträng: måste innehålla "${i.includes}"`;if(i.format==="regex")return`Ogiltig sträng: måste matcha mönstret "${i.pattern}"`;return`Ogiltig(t) ${n[i.format]??r.format}`}case"not_multiple_of":return`Ogiltigt tal: måste vara en multipel av ${r.divisor}`;case"unrecognized_keys":return`${r.keys.length>1?"Okända nycklar":"Okänd nyckel"}: ${z(r.keys,", ")}`;case"invalid_key":return`Ogiltig nyckel i ${r.origin??"värdet"}`;case"invalid_union":return"Ogiltig input";case"invalid_element":return`Ogiltigt värde i ${r.origin??"värdet"}`;default:return"Ogiltig input"}}};function Kf(){return{localeError:wI()}}var RI=()=>{let e={string:{unit:"எழுத்துக்கள்",verb:"கொண்டிருக்க வேண்டும்"},file:{unit:"பைட்டுகள்",verb:"கொண்டிருக்க வேண்டும்"},array:{unit:"உறுப்புகள்",verb:"கொண்டிருக்க வேண்டும்"},set:{unit:"உறுப்புகள்",verb:"கொண்டிருக்க வேண்டும்"}};function t(r){return e[r]??null}let n={regex:"உள்ளீடு",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 தேதி நேரம்",date:"ISO தேதி",time:"ISO நேரம்",duration:"ISO கால அளவு",ipv4:"IPv4 முகவரி",ipv6:"IPv6 முகவரி",cidrv4:"IPv4 வரம்பு",cidrv6:"IPv6 வரம்பு",base64:"base64-encoded சரம்",base64url:"base64url-encoded சரம்",json_string:"JSON சரம்",e164:"E.164 எண்",jwt:"JWT",template_literal:"input"},o={nan:"NaN",number:"எண்",array:"அணி",null:"வெறுமை"};return(r)=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=k(r.input),s=o[a]??a;if(/^[A-Z]/.test(r.expected))return`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது instanceof ${r.expected}, பெறப்பட்டது ${s}`;return`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${i}, பெறப்பட்டது ${s}`}case"invalid_value":if(r.values.length===1)return`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${x(r.values[0])}`;return`தவறான விருப்பம்: எதிர்பார்க்கப்பட்டது ${z(r.values,"|")} இல் ஒன்று`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);if(a)return`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${r.origin??"மதிப்பு"} ${i}${r.maximum.toString()} ${a.unit??"உறுப்புகள்"} ஆக இருக்க வேண்டும்`;return`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${r.origin??"மதிப்பு"} ${i}${r.maximum.toString()} ஆக இருக்க வேண்டும்`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);if(a)return`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${r.origin} ${i}${r.minimum.toString()} ${a.unit} ஆக இருக்க வேண்டும்`;return`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${r.origin} ${i}${r.minimum.toString()} ஆக இருக்க வேண்டும்`}case"invalid_format":{let i=r;if(i.format==="starts_with")return`தவறான சரம்: "${i.prefix}" இல் தொடங்க வேண்டும்`;if(i.format==="ends_with")return`தவறான சரம்: "${i.suffix}" இல் முடிவடைய வேண்டும்`;if(i.format==="includes")return`தவறான சரம்: "${i.includes}" ஐ உள்ளடக்க வேண்டும்`;if(i.format==="regex")return`தவறான சரம்: ${i.pattern} முறைபாட்டுடன் பொருந்த வேண்டும்`;return`தவறான ${n[i.format]??r.format}`}case"not_multiple_of":return`தவறான எண்: ${r.divisor} இன் பலமாக இருக்க வேண்டும்`;case"unrecognized_keys":return`அடையாளம் தெரியாத விசை${r.keys.length>1?"கள்":""}: ${z(r.keys,", ")}`;case"invalid_key":return`${r.origin} இல் தவறான விசை`;case"invalid_union":return"தவறான உள்ளீடு";case"invalid_element":return`${r.origin} இல் தவறான மதிப்பு`;default:return"தவறான உள்ளீடு"}}};function Gf(){return{localeError:RI()}}var xI=()=>{let e={string:{unit:"ตัวอักษร",verb:"ควรมี"},file:{unit:"ไบต์",verb:"ควรมี"},array:{unit:"รายการ",verb:"ควรมี"},set:{unit:"รายการ",verb:"ควรมี"}};function t(r){return e[r]??null}let n={regex:"ข้อมูลที่ป้อน",email:"ที่อยู่อีเมล",url:"URL",emoji:"อิโมจิ",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"วันที่เวลาแบบ ISO",date:"วันที่แบบ ISO",time:"เวลาแบบ ISO",duration:"ช่วงเวลาแบบ ISO",ipv4:"ที่อยู่ IPv4",ipv6:"ที่อยู่ IPv6",cidrv4:"ช่วง IP แบบ IPv4",cidrv6:"ช่วง IP แบบ IPv6",base64:"ข้อความแบบ Base64",base64url:"ข้อความแบบ Base64 สำหรับ URL",json_string:"ข้อความแบบ JSON",e164:"เบอร์โทรศัพท์ระหว่างประเทศ (E.164)",jwt:"โทเคน JWT",template_literal:"ข้อมูลที่ป้อน"},o={nan:"NaN",number:"ตัวเลข",array:"อาร์เรย์ (Array)",null:"ไม่มีค่า (null)"};return(r)=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=k(r.input),s=o[a]??a;if(/^[A-Z]/.test(r.expected))return`ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น instanceof ${r.expected} แต่ได้รับ ${s}`;return`ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น ${i} แต่ได้รับ ${s}`}case"invalid_value":if(r.values.length===1)return`ค่าไม่ถูกต้อง: ควรเป็น ${x(r.values[0])}`;return`ตัวเลือกไม่ถูกต้อง: ควรเป็นหนึ่งใน ${z(r.values,"|")}`;case"too_big":{let i=r.inclusive?"ไม่เกิน":"น้อยกว่า",a=t(r.origin);if(a)return`เกินกำหนด: ${r.origin??"ค่า"} ควรมี${i} ${r.maximum.toString()} ${a.unit??"รายการ"}`;return`เกินกำหนด: ${r.origin??"ค่า"} ควรมี${i} ${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?"อย่างน้อย":"มากกว่า",a=t(r.origin);if(a)return`น้อยกว่ากำหนด: ${r.origin} ควรมี${i} ${r.minimum.toString()} ${a.unit}`;return`น้อยกว่ากำหนด: ${r.origin} ควรมี${i} ${r.minimum.toString()}`}case"invalid_format":{let i=r;if(i.format==="starts_with")return`รูปแบบไม่ถูกต้อง: ข้อความต้องขึ้นต้นด้วย "${i.prefix}"`;if(i.format==="ends_with")return`รูปแบบไม่ถูกต้อง: ข้อความต้องลงท้ายด้วย "${i.suffix}"`;if(i.format==="includes")return`รูปแบบไม่ถูกต้อง: ข้อความต้องมี "${i.includes}" อยู่ในข้อความ`;if(i.format==="regex")return`รูปแบบไม่ถูกต้อง: ต้องตรงกับรูปแบบที่กำหนด ${i.pattern}`;return`รูปแบบไม่ถูกต้อง: ${n[i.format]??r.format}`}case"not_multiple_of":return`ตัวเลขไม่ถูกต้อง: ต้องเป็นจำนวนที่หารด้วย ${r.divisor} ได้ลงตัว`;case"unrecognized_keys":return`พบคีย์ที่ไม่รู้จัก: ${z(r.keys,", ")}`;case"invalid_key":return`คีย์ไม่ถูกต้องใน ${r.origin}`;case"invalid_union":return"ข้อมูลไม่ถูกต้อง: ไม่ตรงกับรูปแบบยูเนียนที่กำหนดไว้";case"invalid_element":return`ข้อมูลไม่ถูกต้องใน ${r.origin}`;default:return"ข้อมูลไม่ถูกต้อง"}}};function Bf(){return{localeError:xI()}}var kI=()=>{let e={string:{unit:"karakter",verb:"olmalı"},file:{unit:"bayt",verb:"olmalı"},array:{unit:"öğe",verb:"olmalı"},set:{unit:"öğe",verb:"olmalı"}};function t(r){return e[r]??null}let n={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üre",ipv4:"IPv4 adresi",ipv6:"IPv6 adresi",cidrv4:"IPv4 aralığı",cidrv6:"IPv6 aralığı",base64:"base64 ile şifrelenmiş metin",base64url:"base64url ile şifrelenmiş metin",json_string:"JSON dizesi",e164:"E.164 sayısı",jwt:"JWT",template_literal:"Şablon dizesi"},o={nan:"NaN"};return(r)=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=k(r.input),s=o[a]??a;if(/^[A-Z]/.test(r.expected))return`Geçersiz değer: beklenen instanceof ${r.expected}, alınan ${s}`;return`Geçersiz değer: beklenen ${i}, alınan ${s}`}case"invalid_value":if(r.values.length===1)return`Geçersiz değer: beklenen ${x(r.values[0])}`;return`Geçersiz seçenek: aşağıdakilerden biri olmalı: ${z(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);if(a)return`Çok büyük: beklenen ${r.origin??"değer"} ${i}${r.maximum.toString()} ${a.unit??"öğe"}`;return`Çok büyük: beklenen ${r.origin??"değer"} ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);if(a)return`Çok küçük: beklenen ${r.origin} ${i}${r.minimum.toString()} ${a.unit}`;return`Çok küçük: beklenen ${r.origin} ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;if(i.format==="starts_with")return`Geçersiz metin: "${i.prefix}" ile başlamalı`;if(i.format==="ends_with")return`Geçersiz metin: "${i.suffix}" ile bitmeli`;if(i.format==="includes")return`Geçersiz metin: "${i.includes}" içermeli`;if(i.format==="regex")return`Geçersiz metin: ${i.pattern} desenine uymalı`;return`Geçersiz ${n[i.format]??r.format}`}case"not_multiple_of":return`Geçersiz sayı: ${r.divisor} ile tam bölünebilmeli`;case"unrecognized_keys":return`Tanınmayan anahtar${r.keys.length>1?"lar":""}: ${z(r.keys,", ")}`;case"invalid_key":return`${r.origin} içinde geçersiz anahtar`;case"invalid_union":return"Geçersiz değer";case"invalid_element":return`${r.origin} içinde geçersiz değer`;default:return"Geçersiz değer"}}};function Wf(){return{localeError:kI()}}var II=()=>{let e={string:{unit:"символів",verb:"матиме"},file:{unit:"байтів",verb:"матиме"},array:{unit:"елементів",verb:"матиме"},set:{unit:"елементів",verb:"матиме"}};function t(r){return e[r]??null}let n={regex:"вхідні дані",email:"адреса електронної пошти",url:"URL",emoji:"емодзі",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"дата та час ISO",date:"дата ISO",time:"час ISO",duration:"тривалість ISO",ipv4:"адреса IPv4",ipv6:"адреса IPv6",cidrv4:"діапазон IPv4",cidrv6:"діапазон IPv6",base64:"рядок у кодуванні base64",base64url:"рядок у кодуванні base64url",json_string:"рядок JSON",e164:"номер E.164",jwt:"JWT",template_literal:"вхідні дані"},o={nan:"NaN",number:"число",array:"масив"};return(r)=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=k(r.input),s=o[a]??a;if(/^[A-Z]/.test(r.expected))return`Неправильні вхідні дані: очікується instanceof ${r.expected}, отримано ${s}`;return`Неправильні вхідні дані: очікується ${i}, отримано ${s}`}case"invalid_value":if(r.values.length===1)return`Неправильні вхідні дані: очікується ${x(r.values[0])}`;return`Неправильна опція: очікується одне з ${z(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);if(a)return`Занадто велике: очікується, що ${r.origin??"значення"} ${a.verb} ${i}${r.maximum.toString()} ${a.unit??"елементів"}`;return`Занадто велике: очікується, що ${r.origin??"значення"} буде ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);if(a)return`Занадто мале: очікується, що ${r.origin} ${a.verb} ${i}${r.minimum.toString()} ${a.unit}`;return`Занадто мале: очікується, що ${r.origin} буде ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;if(i.format==="starts_with")return`Неправильний рядок: повинен починатися з "${i.prefix}"`;if(i.format==="ends_with")return`Неправильний рядок: повинен закінчуватися на "${i.suffix}"`;if(i.format==="includes")return`Неправильний рядок: повинен містити "${i.includes}"`;if(i.format==="regex")return`Неправильний рядок: повинен відповідати шаблону ${i.pattern}`;return`Неправильний ${n[i.format]??r.format}`}case"not_multiple_of":return`Неправильне число: повинно бути кратним ${r.divisor}`;case"unrecognized_keys":return`Нерозпізнаний ключ${r.keys.length>1?"і":""}: ${z(r.keys,", ")}`;case"invalid_key":return`Неправильний ключ у ${r.origin}`;case"invalid_union":return"Неправильні вхідні дані";case"invalid_element":return`Неправильне значення у ${r.origin}`;default:return"Неправильні вхідні дані"}}};function Li(){return{localeError:II()}}function Yf(){return Li()}var PI=()=>{let e={string:{unit:"حروف",verb:"ہونا"},file:{unit:"بائٹس",verb:"ہونا"},array:{unit:"آئٹمز",verb:"ہونا"},set:{unit:"آئٹمز",verb:"ہونا"}};function t(r){return e[r]??null}let n={regex:"ان پٹ",email:"ای میل ایڈریس",url:"یو آر ایل",emoji:"ایموجی",uuid:"یو یو آئی ڈی",uuidv4:"یو یو آئی ڈی وی 4",uuidv6:"یو یو آئی ڈی وی 6",nanoid:"نینو آئی ڈی",guid:"جی یو آئی ڈی",cuid:"سی یو آئی ڈی",cuid2:"سی یو آئی ڈی 2",ulid:"یو ایل آئی ڈی",xid:"ایکس آئی ڈی",ksuid:"کے ایس یو آئی ڈی",datetime:"آئی ایس او ڈیٹ ٹائم",date:"آئی ایس او تاریخ",time:"آئی ایس او وقت",duration:"آئی ایس او مدت",ipv4:"آئی پی وی 4 ایڈریس",ipv6:"آئی پی وی 6 ایڈریس",cidrv4:"آئی پی وی 4 رینج",cidrv6:"آئی پی وی 6 رینج",base64:"بیس 64 ان کوڈڈ سٹرنگ",base64url:"بیس 64 یو آر ایل ان کوڈڈ سٹرنگ",json_string:"جے ایس او این سٹرنگ",e164:"ای 164 نمبر",jwt:"جے ڈبلیو ٹی",template_literal:"ان پٹ"},o={nan:"NaN",number:"نمبر",array:"آرے",null:"نل"};return(r)=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=k(r.input),s=o[a]??a;if(/^[A-Z]/.test(r.expected))return`غلط ان پٹ: instanceof ${r.expected} متوقع تھا، ${s} موصول ہوا`;return`غلط ان پٹ: ${i} متوقع تھا، ${s} موصول ہوا`}case"invalid_value":if(r.values.length===1)return`غلط ان پٹ: ${x(r.values[0])} متوقع تھا`;return`غلط آپشن: ${z(r.values,"|")} میں سے ایک متوقع تھا`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);if(a)return`بہت بڑا: ${r.origin??"ویلیو"} کے ${i}${r.maximum.toString()} ${a.unit??"عناصر"} ہونے متوقع تھے`;return`بہت بڑا: ${r.origin??"ویلیو"} کا ${i}${r.maximum.toString()} ہونا متوقع تھا`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);if(a)return`بہت چھوٹا: ${r.origin} کے ${i}${r.minimum.toString()} ${a.unit} ہونے متوقع تھے`;return`بہت چھوٹا: ${r.origin} کا ${i}${r.minimum.toString()} ہونا متوقع تھا`}case"invalid_format":{let i=r;if(i.format==="starts_with")return`غلط سٹرنگ: "${i.prefix}" سے شروع ہونا چاہیے`;if(i.format==="ends_with")return`غلط سٹرنگ: "${i.suffix}" پر ختم ہونا چاہیے`;if(i.format==="includes")return`غلط سٹرنگ: "${i.includes}" شامل ہونا چاہیے`;if(i.format==="regex")return`غلط سٹرنگ: پیٹرن ${i.pattern} سے میچ ہونا چاہیے`;return`غلط ${n[i.format]??r.format}`}case"not_multiple_of":return`غلط نمبر: ${r.divisor} کا مضاعف ہونا چاہیے`;case"unrecognized_keys":return`غیر تسلیم شدہ کی${r.keys.length>1?"ز":""}: ${z(r.keys,"، ")}`;case"invalid_key":return`${r.origin} میں غلط کی`;case"invalid_union":return"غلط ان پٹ";case"invalid_element":return`${r.origin} میں غلط ویلیو`;default:return"غلط ان پٹ"}}};function Xf(){return{localeError:PI()}}var EI=()=>{let e={string:{unit:"belgi",verb:"bo‘lishi kerak"},file:{unit:"bayt",verb:"bo‘lishi kerak"},array:{unit:"element",verb:"bo‘lishi kerak"},set:{unit:"element",verb:"bo‘lishi kerak"},map:{unit:"yozuv",verb:"bo‘lishi kerak"}};function t(r){return e[r]??null}let n={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(r)=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=k(r.input),s=o[a]??a;if(/^[A-Z]/.test(r.expected))return`Noto‘g‘ri kirish: kutilgan instanceof ${r.expected}, qabul qilingan ${s}`;return`Noto‘g‘ri kirish: kutilgan ${i}, qabul qilingan ${s}`}case"invalid_value":if(r.values.length===1)return`Noto‘g‘ri kirish: kutilgan ${x(r.values[0])}`;return`Noto‘g‘ri variant: quyidagilardan biri kutilgan ${z(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);if(a)return`Juda katta: kutilgan ${r.origin??"qiymat"} ${i}${r.maximum.toString()} ${a.unit} ${a.verb}`;return`Juda katta: kutilgan ${r.origin??"qiymat"} ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);if(a)return`Juda kichik: kutilgan ${r.origin} ${i}${r.minimum.toString()} ${a.unit} ${a.verb}`;return`Juda kichik: kutilgan ${r.origin} ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;if(i.format==="starts_with")return`Noto‘g‘ri satr: "${i.prefix}" bilan boshlanishi kerak`;if(i.format==="ends_with")return`Noto‘g‘ri satr: "${i.suffix}" bilan tugashi kerak`;if(i.format==="includes")return`Noto‘g‘ri satr: "${i.includes}" ni o‘z ichiga olishi kerak`;if(i.format==="regex")return`Noto‘g‘ri satr: ${i.pattern} shabloniga mos kelishi kerak`;return`Noto‘g‘ri ${n[i.format]??r.format}`}case"not_multiple_of":return`Noto‘g‘ri raqam: ${r.divisor} ning karralisi bo‘lishi kerak`;case"unrecognized_keys":return`Noma’lum kalit${r.keys.length>1?"lar":""}: ${z(r.keys,", ")}`;case"invalid_key":return`${r.origin} dagi kalit noto‘g‘ri`;case"invalid_union":return"Noto‘g‘ri kirish";case"invalid_element":return`${r.origin} da noto‘g‘ri qiymat`;default:return"Noto‘g‘ri kirish"}}};function Qf(){return{localeError:EI()}}var TI=()=>{let e={string:{unit:"ký tự",verb:"có"},file:{unit:"byte",verb:"có"},array:{unit:"phần tử",verb:"có"},set:{unit:"phần tử",verb:"có"}};function t(r){return e[r]??null}let n={regex:"đầu vào",email:"địa chỉ 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ày giờ ISO",date:"ngày ISO",time:"giờ ISO",duration:"khoảng thời gian ISO",ipv4:"địa chỉ IPv4",ipv6:"địa chỉ IPv6",cidrv4:"dải IPv4",cidrv6:"dải IPv6",base64:"chuỗi mã hóa base64",base64url:"chuỗi mã hóa base64url",json_string:"chuỗi JSON",e164:"số E.164",jwt:"JWT",template_literal:"đầu vào"},o={nan:"NaN",number:"số",array:"mảng"};return(r)=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=k(r.input),s=o[a]??a;if(/^[A-Z]/.test(r.expected))return`Đầu vào không hợp lệ: mong đợi instanceof ${r.expected}, nhận được ${s}`;return`Đầu vào không hợp lệ: mong đợi ${i}, nhận được ${s}`}case"invalid_value":if(r.values.length===1)return`Đầu vào không hợp lệ: mong đợi ${x(r.values[0])}`;return`Tùy chọn không hợp lệ: mong đợi một trong các giá trị ${z(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);if(a)return`Quá lớn: mong đợi ${r.origin??"giá trị"} ${a.verb} ${i}${r.maximum.toString()} ${a.unit??"phần tử"}`;return`Quá lớn: mong đợi ${r.origin??"giá trị"} ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);if(a)return`Quá nhỏ: mong đợi ${r.origin} ${a.verb} ${i}${r.minimum.toString()} ${a.unit}`;return`Quá nhỏ: mong đợi ${r.origin} ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;if(i.format==="starts_with")return`Chuỗi không hợp lệ: phải bắt đầu bằng "${i.prefix}"`;if(i.format==="ends_with")return`Chuỗi không hợp lệ: phải kết thúc bằng "${i.suffix}"`;if(i.format==="includes")return`Chuỗi không hợp lệ: phải bao gồm "${i.includes}"`;if(i.format==="regex")return`Chuỗi không hợp lệ: phải khớp với mẫu ${i.pattern}`;return`${n[i.format]??r.format} không hợp lệ`}case"not_multiple_of":return`Số không hợp lệ: phải là bội số của ${r.divisor}`;case"unrecognized_keys":return`Khóa không được nhận dạng: ${z(r.keys,", ")}`;case"invalid_key":return`Khóa không hợp lệ trong ${r.origin}`;case"invalid_union":return"Đầu vào không hợp lệ";case"invalid_element":return`Giá trị không hợp lệ trong ${r.origin}`;default:return"Đầu vào không hợp lệ"}}};function eh(){return{localeError:TI()}}var jI=()=>{let e={string:{unit:"字符",verb:"包含"},file:{unit:"字节",verb:"包含"},array:{unit:"项",verb:"包含"},set:{unit:"项",verb:"包含"}};function t(r){return e[r]??null}let n={regex:"输入",email:"电子邮件",url:"URL",emoji:"表情符号",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO日期时间",date:"ISO日期",time:"ISO时间",duration:"ISO时长",ipv4:"IPv4地址",ipv6:"IPv6地址",cidrv4:"IPv4网段",cidrv6:"IPv6网段",base64:"base64编码字符串",base64url:"base64url编码字符串",json_string:"JSON字符串",e164:"E.164号码",jwt:"JWT",template_literal:"输入"},o={nan:"NaN",number:"数字",array:"数组",null:"空值(null)"};return(r)=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=k(r.input),s=o[a]??a;if(/^[A-Z]/.test(r.expected))return`无效输入:期望 instanceof ${r.expected},实际接收 ${s}`;return`无效输入:期望 ${i},实际接收 ${s}`}case"invalid_value":if(r.values.length===1)return`无效输入:期望 ${x(r.values[0])}`;return`无效选项:期望以下之一 ${z(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);if(a)return`数值过大:期望 ${r.origin??"值"} ${i}${r.maximum.toString()} ${a.unit??"个元素"}`;return`数值过大:期望 ${r.origin??"值"} ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);if(a)return`数值过小:期望 ${r.origin} ${i}${r.minimum.toString()} ${a.unit}`;return`数值过小:期望 ${r.origin} ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;if(i.format==="starts_with")return`无效字符串:必须以 "${i.prefix}" 开头`;if(i.format==="ends_with")return`无效字符串:必须以 "${i.suffix}" 结尾`;if(i.format==="includes")return`无效字符串:必须包含 "${i.includes}"`;if(i.format==="regex")return`无效字符串:必须满足正则表达式 ${i.pattern}`;return`无效${n[i.format]??r.format}`}case"not_multiple_of":return`无效数字:必须是 ${r.divisor} 的倍数`;case"unrecognized_keys":return`出现未知的键(key): ${z(r.keys,", ")}`;case"invalid_key":return`${r.origin} 中的键(key)无效`;case"invalid_union":return"无效输入";case"invalid_element":return`${r.origin} 中包含无效值(value)`;default:return"无效输入"}}};function th(){return{localeError:jI()}}var OI=()=>{let e={string:{unit:"字元",verb:"擁有"},file:{unit:"位元組",verb:"擁有"},array:{unit:"項目",verb:"擁有"},set:{unit:"項目",verb:"擁有"}};function t(r){return e[r]??null}let n={regex:"輸入",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 日期時間",date:"ISO 日期",time:"ISO 時間",duration:"ISO 期間",ipv4:"IPv4 位址",ipv6:"IPv6 位址",cidrv4:"IPv4 範圍",cidrv6:"IPv6 範圍",base64:"base64 編碼字串",base64url:"base64url 編碼字串",json_string:"JSON 字串",e164:"E.164 數值",jwt:"JWT",template_literal:"輸入"},o={nan:"NaN"};return(r)=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=k(r.input),s=o[a]??a;if(/^[A-Z]/.test(r.expected))return`無效的輸入值:預期為 instanceof ${r.expected},但收到 ${s}`;return`無效的輸入值:預期為 ${i},但收到 ${s}`}case"invalid_value":if(r.values.length===1)return`無效的輸入值:預期為 ${x(r.values[0])}`;return`無效的選項:預期為以下其中之一 ${z(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);if(a)return`數值過大:預期 ${r.origin??"值"} 應為 ${i}${r.maximum.toString()} ${a.unit??"個元素"}`;return`數值過大:預期 ${r.origin??"值"} 應為 ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);if(a)return`數值過小:預期 ${r.origin} 應為 ${i}${r.minimum.toString()} ${a.unit}`;return`數值過小:預期 ${r.origin} 應為 ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;if(i.format==="starts_with")return`無效的字串:必須以 "${i.prefix}" 開頭`;if(i.format==="ends_with")return`無效的字串:必須以 "${i.suffix}" 結尾`;if(i.format==="includes")return`無效的字串:必須包含 "${i.includes}"`;if(i.format==="regex")return`無效的字串:必須符合格式 ${i.pattern}`;return`無效的 ${n[i.format]??r.format}`}case"not_multiple_of":return`無效的數字:必須為 ${r.divisor} 的倍數`;case"unrecognized_keys":return`無法識別的鍵值${r.keys.length>1?"們":""}:${z(r.keys,"、")}`;case"invalid_key":return`${r.origin} 中有無效的鍵值`;case"invalid_union":return"無效的輸入值";case"invalid_element":return`${r.origin} 中有無效的值`;default:return"無效的輸入值"}}};function rh(){return{localeError:OI()}}var NI=()=>{let e={string:{unit:"àmi",verb:"ní"},file:{unit:"bytes",verb:"ní"},array:{unit:"nkan",verb:"ní"},set:{unit:"nkan",verb:"ní"}};function t(r){return e[r]??null}let n={regex:"ẹ̀rọ ìbáwọlé",email:"àdírẹ́sì ìmẹ́lì",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:"àkókò ISO",date:"ọjọ́ ISO",time:"àkókò ISO",duration:"àkókò tó pé ISO",ipv4:"àdírẹ́sì IPv4",ipv6:"àdírẹ́sì IPv6",cidrv4:"àgbègbè IPv4",cidrv6:"àgbègbè IPv6",base64:"ọ̀rọ̀ tí a kọ́ ní base64",base64url:"ọ̀rọ̀ base64url",json_string:"ọ̀rọ̀ JSON",e164:"nọ́mbà E.164",jwt:"JWT",template_literal:"ẹ̀rọ ìbáwọlé"},o={nan:"NaN",number:"nọ́mbà",array:"akopọ"};return(r)=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=k(r.input),s=o[a]??a;if(/^[A-Z]/.test(r.expected))return`Ìbáwọlé aṣìṣe: a ní láti fi instanceof ${r.expected}, àmọ̀ a rí ${s}`;return`Ìbáwọlé aṣìṣe: a ní láti fi ${i}, àmọ̀ a rí ${s}`}case"invalid_value":if(r.values.length===1)return`Ìbáwọlé aṣìṣe: a ní láti fi ${x(r.values[0])}`;return`Àṣàyàn aṣìṣe: yan ọ̀kan lára ${z(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);if(a)return`Tó pọ̀ jù: a ní láti jẹ́ pé ${r.origin??"iye"} ${a.verb} ${i}${r.maximum} ${a.unit}`;return`Tó pọ̀ jù: a ní láti jẹ́ ${i}${r.maximum}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);if(a)return`Kéré ju: a ní láti jẹ́ pé ${r.origin} ${a.verb} ${i}${r.minimum} ${a.unit}`;return`Kéré ju: a ní láti jẹ́ ${i}${r.minimum}`}case"invalid_format":{let i=r;if(i.format==="starts_with")return`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ bẹ̀rẹ̀ pẹ̀lú "${i.prefix}"`;if(i.format==="ends_with")return`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ parí pẹ̀lú "${i.suffix}"`;if(i.format==="includes")return`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ ní "${i.includes}"`;if(i.format==="regex")return`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ bá àpẹẹrẹ mu ${i.pattern}`;return`Aṣìṣe: ${n[i.format]??r.format}`}case"not_multiple_of":return`Nọ́mbà aṣìṣe: gbọ́dọ̀ jẹ́ èyà pípín ti ${r.divisor}`;case"unrecognized_keys":return`Bọtìnì àìmọ̀: ${z(r.keys,", ")}`;case"invalid_key":return`Bọtìnì aṣìṣe nínú ${r.origin}`;case"invalid_union":return"Ìbáwọlé aṣìṣe";case"invalid_element":return`Iye aṣìṣe nínú ${r.origin}`;default:return"Ìbáwọlé aṣìṣe"}}};function nh(){return{localeError:NI()}}var zy,oh=Symbol("ZodOutput"),ih=Symbol("ZodInput");class ah{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let n=t[0];if(this._map.set(e,n),n&&typeof n==="object"&&"id"in n)this._idmap.set(n.id,e);return this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);if(t&&typeof t==="object"&&"id"in t)this._idmap.delete(t.id);return this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let n={...this.get(t)??{}};delete n.id;let o={...n,...this._map.get(e)};return Object.keys(o).length?o:void 0}return this._map.get(e)}has(e){return this._map.has(e)}}function Qs(){return new ah}(zy=globalThis).__zod_globalRegistry??(zy.__zod_globalRegistry=Qs());var Te=globalThis.__zod_globalRegistry;function sh(e,t){return new e({type:"string",...P(t)})}function ch(e,t){return new e({type:"string",coerce:!0,...P(t)})}function ec(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...P(t)})}function Vi(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...P(t)})}function tc(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...P(t)})}function rc(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...P(t)})}function nc(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...P(t)})}function oc(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...P(t)})}function Fi(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...P(t)})}function ic(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...P(t)})}function ac(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...P(t)})}function sc(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...P(t)})}function cc(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...P(t)})}function lc(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...P(t)})}function uc(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...P(t)})}function dc(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...P(t)})}function mc(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...P(t)})}function pc(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...P(t)})}function lh(e,t){return new e({type:"string",format:"mac",check:"string_format",abort:!1,...P(t)})}function fc(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...P(t)})}function hc(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...P(t)})}function gc(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...P(t)})}function vc(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...P(t)})}function _c(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...P(t)})}function Sc(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...P(t)})}var uh={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function dh(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...P(t)})}function mh(e,t){return new e({type:"string",format:"date",check:"string_format",...P(t)})}function ph(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...P(t)})}function fh(e,t){return new e({type:"string",format:"duration",check:"string_format",...P(t)})}function hh(e,t){return new e({type:"number",checks:[],...P(t)})}function gh(e,t){return new e({type:"number",coerce:!0,checks:[],...P(t)})}function vh(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...P(t)})}function _h(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float32",...P(t)})}function Sh(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float64",...P(t)})}function yh(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"int32",...P(t)})}function bh(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"uint32",...P(t)})}function $h(e,t){return new e({type:"boolean",...P(t)})}function zh(e,t){return new e({type:"boolean",coerce:!0,...P(t)})}function wh(e,t){return new e({type:"bigint",...P(t)})}function Rh(e,t){return new e({type:"bigint",coerce:!0,...P(t)})}function xh(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...P(t)})}function kh(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...P(t)})}function Ih(e,t){return new e({type:"symbol",...P(t)})}function Ph(e,t){return new e({type:"undefined",...P(t)})}function Eh(e,t){return new e({type:"null",...P(t)})}function Th(e){return new e({type:"any"})}function jh(e){return new e({type:"unknown"})}function Oh(e,t){return new e({type:"never",...P(t)})}function Nh(e,t){return new e({type:"void",...P(t)})}function Ch(e,t){return new e({type:"date",...P(t)})}function qh(e,t){return new e({type:"date",coerce:!0,...P(t)})}function Ah(e,t){return new e({type:"nan",...P(t)})}function Ht(e,t){return new Ls({check:"less_than",...P(t),value:e,inclusive:!1})}function ft(e,t){return new Ls({check:"less_than",...P(t),value:e,inclusive:!0})}function Kt(e,t){return new Zs({check:"greater_than",...P(t),value:e,inclusive:!1})}function Ke(e,t){return new Zs({check:"greater_than",...P(t),value:e,inclusive:!0})}function yc(e){return Kt(0,e)}function bc(e){return Ht(0,e)}function $c(e){return ft(0,e)}function zc(e){return Ke(0,e)}function Rr(e,t){return new Om({check:"multiple_of",...P(t),value:e})}function xr(e,t){return new qm({check:"max_size",...P(t),maximum:e})}function Gt(e,t){return new Am({check:"min_size",...P(t),minimum:e})}function dn(e,t){return new Mm({check:"size_equals",...P(t),size:e})}function mn(e,t){return new Um({check:"max_length",...P(t),maximum:e})}function or(e,t){return new Dm({check:"min_length",...P(t),minimum:e})}function pn(e,t){return new Lm({check:"length_equals",...P(t),length:e})}function Wn(e,t){return new Zm({check:"string_format",format:"regex",...P(t),pattern:e})}function Yn(e){return new Vm({check:"string_format",format:"lowercase",...P(e)})}function Xn(e){return new Fm({check:"string_format",format:"uppercase",...P(e)})}function Qn(e,t){return new Jm({check:"string_format",format:"includes",...P(t),includes:e})}function eo(e,t){return new Hm({check:"string_format",format:"starts_with",...P(t),prefix:e})}function to(e,t){return new Km({check:"string_format",format:"ends_with",...P(t),suffix:e})}function wc(e,t,n){return new Gm({check:"property",property:e,schema:t,...P(n)})}function ro(e,t){return new Bm({check:"mime_type",mime:e,...P(t)})}function Pt(e){return new Wm({check:"overwrite",tx:e})}function no(e){return Pt((t)=>t.normalize(e))}function oo(){return Pt((e)=>e.trim())}function io(){return Pt((e)=>e.toLowerCase())}function ao(){return Pt((e)=>e.toUpperCase())}function so(){return Pt((e)=>Hd(e))}function Mh(e,t,n){return new e({type:"array",element:t,...P(n)})}function qI(e,t,n){return new e({type:"union",options:t,...P(n)})}function AI(e,t,n){return new e({type:"union",options:t,inclusive:!1,...P(n)})}function MI(e,t,n,o){return new e({type:"union",options:n,discriminator:t,...P(o)})}function UI(e,t,n){return new e({type:"intersection",left:t,right:n})}function DI(e,t,n,o){let r=n instanceof Q;return new e({type:"tuple",items:t,rest:r?n:null,...P(r?o:n)})}function LI(e,t,n,o){return new e({type:"record",keyType:t,valueType:n,...P(o)})}function ZI(e,t,n,o){return new e({type:"map",keyType:t,valueType:n,...P(o)})}function VI(e,t,n){return new e({type:"set",valueType:t,...P(n)})}function FI(e,t,n){let o=Array.isArray(t)?Object.fromEntries(t.map((r)=>[r,r])):t;return new e({type:"enum",entries:o,...P(n)})}function JI(e,t,n){return new e({type:"enum",entries:t,...P(n)})}function HI(e,t,n){return new e({type:"literal",values:Array.isArray(t)?t:[t],...P(n)})}function Uh(e,t){return new e({type:"file",...P(t)})}function KI(e,t){return new e({type:"transform",transform:t})}function GI(e,t){return new e({type:"optional",innerType:t})}function BI(e,t){return new e({type:"nullable",innerType:t})}function WI(e,t,n){return new e({type:"default",innerType:t,get defaultValue(){return typeof n==="function"?n():Gd(n)}})}function YI(e,t,n){return new e({type:"nonoptional",innerType:t,...P(n)})}function XI(e,t){return new e({type:"success",innerType:t})}function QI(e,t,n){return new e({type:"catch",innerType:t,catchValue:typeof n==="function"?n:()=>n})}function eP(e,t,n){return new e({type:"pipe",in:t,out:n})}function tP(e,t){return new e({type:"readonly",innerType:t})}function rP(e,t,n){return new e({type:"template_literal",parts:t,...P(n)})}function nP(e,t){return new e({type:"lazy",getter:t})}function oP(e,t){return new e({type:"promise",innerType:t})}function Dh(e,t,n){let o=P(n);return o.abort??(o.abort=!0),new e({type:"custom",check:"custom",fn:t,...o})}function Lh(e,t,n){return new e({type:"custom",check:"custom",fn:t,...P(n)})}function Zh(e,t){let n=wy((o)=>(o.addIssue=(r)=>{if(typeof r==="string")o.issues.push(Vn(r,o.value,n._zod.def));else{let i=r;if(i.fatal)i.continue=!1;i.code??(i.code="custom"),i.input??(i.input=o.value),i.inst??(i.inst=n),i.continue??(i.continue=!n._zod.def.abort),o.issues.push(Vn(i))}},e(o.value,o)),t);return n}function wy(e,t){let n=new ge({check:"custom",...P(t)});return n._zod.check=e,n}function Vh(e){let t=new ge({check:"describe"});return t._zod.onattach=[(n)=>{let o=Te.get(n)??{};Te.add(n,{...o,description:e})}],t._zod.check=()=>{},t}function Fh(e){let t=new ge({check:"meta"});return t._zod.onattach=[(n)=>{let o=Te.get(n)??{};Te.add(n,{...o,...e})}],t._zod.check=()=>{},t}function Jh(e,t){let n=P(t),o=n.truthy??["true","1","yes","on","y","enabled"],r=n.falsy??["false","0","no","off","n","disabled"];if(n.case!=="sensitive")o=o.map((f)=>typeof f==="string"?f.toLowerCase():f),r=r.map((f)=>typeof f==="string"?f.toLowerCase():f);let i=new Set(o),a=new Set(r),s=e.Codec??Ai,c=e.Boolean??Ci,d=new(e.String??un)({type:"string",error:n.error}),m=new c({type:"boolean",error:n.error}),p=new s({type:"pipe",in:d,out:m,transform:(f,v)=>{let g=f;if(n.case!=="sensitive")g=g.toLowerCase();if(i.has(g))return!0;else if(a.has(g))return!1;else return v.issues.push({code:"invalid_value",expected:"stringbool",values:[...i,...a],input:v.value,inst:p,continue:!1}),{}},reverseTransform:(f,v)=>{if(f===!0)return o[0]||"true";else return r[0]||"false"},error:n.error});return p}function co(e,t,n,o={}){let r=P(o),i={...P(o),check:"string_format",type:"string",format:t,fn:typeof n==="function"?n:(s)=>n.test(s),...r};if(n instanceof RegExp)i.pattern=n;return new e(i)}function kr(e){let t=e?.target??"draft-2020-12";if(t==="draft-4")t="draft-04";if(t==="draft-7")t="draft-07";return{processors:e.processors??{},metadataRegistry:e?.metadata??Te,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 pe(e,t,n={path:[],schemaPath:[]}){var o;let r=e._zod.def,i=t.seen.get(e);if(i){if(i.count++,n.schemaPath.includes(e))i.cycle=n.path;return i.schema}let a={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,a);let s=e._zod.toJSONSchema?.();if(s)a.schema=s;else{let d={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,a.schema,d);else{let p=a.schema,f=t.processors[r.type];if(!f)throw Error(`[toJSONSchema]: Non-representable type encountered: ${r.type}`);f(e,t,p,d)}let m=e._zod.parent;if(m){if(!a.ref)a.ref=m;pe(m,t,d),t.seen.get(m).isParent=!0}}let c=t.metadataRegistry.get(e);if(c)Object.assign(a.schema,c);if(t.io==="input"&&Ge(e))delete a.schema.examples,delete a.schema.default;if(t.io==="input"&&"_prefault"in a.schema)(o=a.schema).default??(o.default=a.schema._prefault);return delete a.schema._prefault,t.seen.get(e).schema}function Ir(e,t){let n=e.seen.get(t);if(!n)throw Error("Unprocessed schema. This is a bug in Zod.");let o=new Map;for(let a of e.seen.entries()){let s=e.metadataRegistry.get(a[0])?.id;if(s){let c=o.get(s);if(c&&c!==a[0])throw Error(`Duplicate schema id "${s}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);o.set(s,a[0])}}let r=(a)=>{let s=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){let m=e.external.registry.get(a[0])?.id,p=e.external.uri??((v)=>v);if(m)return{ref:p(m)};let f=a[1].defId??a[1].schema.id??`schema${e.counter++}`;return a[1].defId=f,{defId:f,ref:`${p("__shared")}#/${s}/${f}`}}if(a[1]===n)return{ref:"#"};let l=`${"#"}/${s}/`,d=a[1].schema.id??`__schema${e.counter++}`;return{defId:d,ref:l+d}},i=(a)=>{if(a[1].schema.$ref)return;let s=a[1],{ref:c,defId:l}=r(a);if(s.def={...s.schema},l)s.defId=l;let d=s.schema;for(let m in d)delete d[m];d.$ref=c};if(e.cycles==="throw")for(let a of e.seen.entries()){let s=a[1];if(s.cycle)throw Error(`Cycle detected: #/${s.cycle?.join("/")}/<root>
|
|
71
|
+
`)}f.write("payload.value = newResult;"),f.write("return payload;");let L=f.compile();return(P,D)=>L(p,P,D)},i,a=ln,s=!sn.jitless,l=s&&Yd.value,d=t.catchall,m;e._zod.parse=(p,f)=>{m??(m=o.value);let v=p.value;if(!a(v))return p.issues.push({expected:"object",code:"invalid_type",input:v,inst:e}),p;if(s&&l&&f?.async===!1&&f.jitless!==!0){if(!i)i=r(t.shape);if(p=i(p,f),!d)return p;return Iy([],v,p,f,m,e)}return n(p,f)}});function my(e,t,n,o){for(let i of e)if(i.issues.length===0)return t.value=i.value,t;let r=e.filter((i)=>!zr(i));if(r.length===1)return t.value=r[0].value,r[0];return t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map((i)=>i.issues.map((a)=>He(a,o,be())))}),t}var Ai=_("$ZodUnion",(e,t)=>{Q.init(e,t),ae(e._zod,"optin",()=>t.options.some((o)=>o._zod.optin==="optional")?"optional":void 0),ae(e._zod,"optout",()=>t.options.some((o)=>o._zod.optout==="optional")?"optional":void 0),ae(e._zod,"values",()=>{if(t.options.every((o)=>o._zod.values))return new Set(t.options.flatMap((o)=>Array.from(o._zod.values)));return}),ae(e._zod,"pattern",()=>{if(t.options.every((o)=>o._zod.pattern)){let o=t.options.map((r)=>r._zod.pattern);return new RegExp(`^(${o.map((r)=>xi(r.source)).join("|")})$`)}return});let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(o,r)=>{if(n)return n(o,r);let i=!1,a=[];for(let s of t.options){let c=s._zod.run({value:o.value,issues:[]},r);if(c instanceof Promise)a.push(c),i=!0;else{if(c.issues.length===0)return c;a.push(c)}}if(!i)return my(a,o,e,r);return Promise.all(a).then((s)=>my(s,o,e,r))}});function py(e,t,n,o){let r=e.filter((i)=>i.issues.length===0);if(r.length===1)return t.value=r[0].value,t;if(r.length===0)t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map((i)=>i.issues.map((a)=>He(a,o,be())))});else t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:[],inclusive:!1});return t}var Up=_("$ZodXor",(e,t)=>{Ai.init(e,t),t.inclusive=!1;let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(o,r)=>{if(n)return n(o,r);let i=!1,a=[];for(let s of t.options){let c=s._zod.run({value:o.value,issues:[]},r);if(c instanceof Promise)a.push(c),i=!0;else a.push(c)}if(!i)return py(a,o,e,r);return Promise.all(a).then((s)=>py(s,o,e,r))}}),Dp=_("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,Ai.init(e,t);let n=e._zod.parse;ae(e._zod,"propValues",()=>{let r={};for(let i of t.options){let a=i._zod.propValues;if(!a||Object.keys(a).length===0)throw Error(`Invalid discriminated union option at index "${t.options.indexOf(i)}"`);for(let[s,c]of Object.entries(a)){if(!r[s])r[s]=new Set;for(let l of c)r[s].add(l)}}return r});let o=Fn(()=>{let r=t.options,i=new Map;for(let a of r){let s=a._zod.propValues?.[t.discriminator];if(!s||s.size===0)throw Error(`Invalid discriminated union option at index "${t.options.indexOf(a)}"`);for(let c of s){if(i.has(c))throw Error(`Duplicate discriminator value "${String(c)}"`);i.set(c,a)}}return i});e._zod.parse=(r,i)=>{let a=r.value;if(!ln(a))return r.issues.push({code:"invalid_type",expected:"object",input:a,inst:e}),r;let s=o.value.get(a?.[t.discriminator]);if(s)return s._zod.run(r,i);if(t.unionFallback||i.direction==="backward")return n(r,i);return r.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,options:Array.from(o.value.keys()),input:a,path:[t.discriminator],inst:e}),r}}),Lp=_("$ZodIntersection",(e,t)=>{Q.init(e,t),e._zod.parse=(n,o)=>{let r=n.value,i=t.left._zod.run({value:r,issues:[]},o),a=t.right._zod.run({value:r,issues:[]},o);if(i instanceof Promise||a instanceof Promise)return Promise.all([i,a]).then(([c,l])=>fy(n,c,l));return fy(n,i,a)}});function ep(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($r(e)&&$r(t)){let n=Object.keys(t),o=Object.keys(e).filter((i)=>n.indexOf(i)!==-1),r={...e,...t};for(let i of o){let a=ep(e[i],t[i]);if(!a.valid)return{valid:!1,mergeErrorPath:[i,...a.mergeErrorPath]};r[i]=a.data}return{valid:!0,data:r}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let o=0;o<e.length;o++){let r=e[o],i=t[o],a=ep(r,i);if(!a.valid)return{valid:!1,mergeErrorPath:[o,...a.mergeErrorPath]};n.push(a.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function fy(e,t,n){let o=new Map,r;for(let s of t.issues)if(s.code==="unrecognized_keys"){r??(r=s);for(let c of s.keys){if(!o.has(c))o.set(c,{});o.get(c).l=!0}}else e.issues.push(s);for(let s of n.issues)if(s.code==="unrecognized_keys")for(let c of s.keys){if(!o.has(c))o.set(c,{});o.get(c).r=!0}else e.issues.push(s);let i=[...o].filter(([,s])=>s.l&&s.r).map(([s])=>s);if(i.length&&r)e.issues.push({...r,keys:i});if(zr(e))return e;let a=ep(t.value,n.value);if(!a.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(a.mergeErrorPath)}`);return e.value=a.data,e}var Xs=_("$ZodTuple",(e,t)=>{Q.init(e,t);let n=t.items;e._zod.parse=(o,r)=>{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 a=[],s=hy(n,"optin"),c=hy(n,"optout");if(!t.rest){if(i.length<s)return o.issues.push({code:"too_small",minimum:s,inclusive:!0,input:i,inst:e,origin:"array"}),o;if(i.length>n.length)o.issues.push({code:"too_big",maximum:n.length,inclusive:!0,input:i,inst:e,origin:"array"})}let l=Array(n.length);for(let d=0;d<n.length;d++){let m=n[d]._zod.run({value:i[d],issues:[]},r);if(m instanceof Promise)a.push(m.then((p)=>{l[d]=p}));else l[d]=m}if(t.rest){let d=n.length-1,m=i.slice(n.length);for(let p of m){d++;let f=t.rest._zod.run({value:p,issues:[]},r);if(f instanceof Promise)a.push(f.then((v)=>gy(v,o,d)));else gy(f,o,d)}}if(a.length)return Promise.all(a).then(()=>vy(l,o,n,i,c));return vy(l,o,n,i,c)}});function hy(e,t){for(let n=e.length-1;n>=0;n--)if(e[n]._zod[t]!=="optional")return n+1;return 0}function gy(e,t,n){if(e.issues.length)t.issues.push(...tt(n,e.issues));t.value[n]=e.value}function vy(e,t,n,o,r){for(let i=0;i<n.length;i++){let a=e[i],s=i<o.length;if(a.issues.length){if(!s&&i>=r){t.value.length=i;break}t.issues.push(...tt(i,a.issues))}t.value[i]=a.value}for(let i=t.value.length-1;i>=o.length;i--)if(n[i]._zod.optout==="optional"&&t.value[i]===void 0)t.value.length=i;else break;return t}var Zp=_("$ZodRecord",(e,t)=>{Q.init(e,t),e._zod.parse=(n,o)=>{let r=n.value;if(!$r(r))return n.issues.push({expected:"record",code:"invalid_type",input:r,inst:e}),n;let i=[],a=t.keyType._zod.values;if(a){n.value={};let s=new Set;for(let l of a)if(typeof l==="string"||typeof l==="number"||typeof l==="symbol"){s.add(typeof l==="number"?l.toString():l);let d=t.keyType._zod.run({value:l,issues:[]},o);if(d instanceof Promise)throw Error("Async schemas not supported in object keys currently");if(d.issues.length){n.issues.push({code:"invalid_key",origin:"record",issues:d.issues.map((f)=>He(f,o,be())),input:l,path:[l],inst:e});continue}let m=d.value,p=t.valueType._zod.run({value:r[l],issues:[]},o);if(p instanceof Promise)i.push(p.then((f)=>{if(f.issues.length)n.issues.push(...tt(l,f.issues));n.value[m]=f.value}));else{if(p.issues.length)n.issues.push(...tt(l,p.issues));n.value[m]=p.value}}let c;for(let l in r)if(!s.has(l))c=c??[],c.push(l);if(c&&c.length>0)n.issues.push({code:"unrecognized_keys",input:r,inst:e,keys:c})}else{n.value={};for(let s of Reflect.ownKeys(r)){if(s==="__proto__")continue;if(!Object.prototype.propertyIsEnumerable.call(r,s))continue;let c=t.keyType._zod.run({value:s,issues:[]},o);if(c instanceof Promise)throw Error("Async schemas not supported in object keys currently");if(typeof s==="string"&&Zs.test(s)&&c.issues.length){let m=t.keyType._zod.run({value:Number(s),issues:[]},o);if(m instanceof Promise)throw Error("Async schemas not supported in object keys currently");if(m.issues.length===0)c=m}if(c.issues.length){if(t.mode==="loose")n.value[s]=r[s];else n.issues.push({code:"invalid_key",origin:"record",issues:c.issues.map((m)=>He(m,o,be())),input:s,path:[s],inst:e});continue}let d=t.valueType._zod.run({value:r[s],issues:[]},o);if(d instanceof Promise)i.push(d.then((m)=>{if(m.issues.length)n.issues.push(...tt(s,m.issues));n.value[c.value]=m.value}));else{if(d.issues.length)n.issues.push(...tt(s,d.issues));n.value[c.value]=d.value}}}if(i.length)return Promise.all(i).then(()=>n);return n}}),Vp=_("$ZodMap",(e,t)=>{Q.init(e,t),e._zod.parse=(n,o)=>{let r=n.value;if(!(r instanceof Map))return n.issues.push({expected:"map",code:"invalid_type",input:r,inst:e}),n;let i=[];n.value=new Map;for(let[a,s]of r){let c=t.keyType._zod.run({value:a,issues:[]},o),l=t.valueType._zod.run({value:s,issues:[]},o);if(c instanceof Promise||l instanceof Promise)i.push(Promise.all([c,l]).then(([d,m])=>{_y(d,m,n,a,r,e,o)}));else _y(c,l,n,a,r,e,o)}if(i.length)return Promise.all(i).then(()=>n);return n}});function _y(e,t,n,o,r,i,a){if(e.issues.length)if(Ii.has(typeof o))n.issues.push(...tt(o,e.issues));else n.issues.push({code:"invalid_key",origin:"map",input:r,inst:i,issues:e.issues.map((s)=>He(s,a,be()))});if(t.issues.length)if(Ii.has(typeof o))n.issues.push(...tt(o,t.issues));else n.issues.push({origin:"map",code:"invalid_element",input:r,inst:i,key:o,issues:t.issues.map((s)=>He(s,a,be()))});n.value.set(e.value,t.value)}var Fp=_("$ZodSet",(e,t)=>{Q.init(e,t),e._zod.parse=(n,o)=>{let r=n.value;if(!(r instanceof Set))return n.issues.push({input:r,inst:e,expected:"set",code:"invalid_type"}),n;let i=[];n.value=new Set;for(let a of r){let s=t.valueType._zod.run({value:a,issues:[]},o);if(s instanceof Promise)i.push(s.then((c)=>Sy(c,n)));else Sy(s,n)}if(i.length)return Promise.all(i).then(()=>n);return n}});function Sy(e,t){if(e.issues.length)t.issues.push(...e.issues);t.value.add(e.value)}var Jp=_("$ZodEnum",(e,t)=>{Q.init(e,t);let n=Ri(t.entries),o=new Set(n);e._zod.values=o,e._zod.pattern=new RegExp(`^(${n.filter((r)=>Ii.has(typeof r)).map((r)=>typeof r==="string"?yt(r):r.toString()).join("|")})$`),e._zod.parse=(r,i)=>{let a=r.value;if(o.has(a))return r;return r.issues.push({code:"invalid_value",values:n,input:a,inst:e}),r}}),Hp=_("$ZodLiteral",(e,t)=>{if(Q.init(e,t),t.values.length===0)throw Error("Cannot create literal schema with no valid values");let n=new Set(t.values);e._zod.values=n,e._zod.pattern=new RegExp(`^(${t.values.map((o)=>typeof o==="string"?yt(o):o?yt(o.toString()):String(o)).join("|")})$`),e._zod.parse=(o,r)=>{let i=o.value;if(n.has(i))return o;return o.issues.push({code:"invalid_value",values:t.values,input:i,inst:e}),o}}),Kp=_("$ZodFile",(e,t)=>{Q.init(e,t),e._zod.parse=(n,o)=>{let r=n.value;if(r instanceof File)return n;return n.issues.push({expected:"file",code:"invalid_type",input:r,inst:e}),n}}),Gp=_("$ZodTransform",(e,t)=>{Q.init(e,t),e._zod.optin="optional",e._zod.parse=(n,o)=>{if(o.direction==="backward")throw new cn(e.constructor.name);let r=t.transform(n.value,n);if(o.async)return(r instanceof Promise?r:Promise.resolve(r)).then((a)=>(n.value=a,n.fallback=!0,n));if(r instanceof Promise)throw new Vt;return n.value=r,n.fallback=!0,n}});function yy(e,t){if(t===void 0&&(e.issues.length||e.fallback))return{issues:[],value:void 0};return e}var Qs=_("$ZodOptional",(e,t)=>{Q.init(e,t),e._zod.optin="optional",e._zod.optout="optional",ae(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),ae(e._zod,"pattern",()=>{let n=t.innerType._zod.pattern;return n?new RegExp(`^(${xi(n.source)})?$`):void 0}),e._zod.parse=(n,o)=>{if(t.innerType._zod.optin==="optional"){let r=n.value,i=t.innerType._zod.run(n,o);if(i instanceof Promise)return i.then((a)=>yy(a,r));return yy(i,r)}if(n.value===void 0)return n;return t.innerType._zod.run(n,o)}}),Bp=_("$ZodExactOptional",(e,t)=>{Qs.init(e,t),ae(e._zod,"values",()=>t.innerType._zod.values),ae(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(n,o)=>t.innerType._zod.run(n,o)}),Wp=_("$ZodNullable",(e,t)=>{Q.init(e,t),ae(e._zod,"optin",()=>t.innerType._zod.optin),ae(e._zod,"optout",()=>t.innerType._zod.optout),ae(e._zod,"pattern",()=>{let n=t.innerType._zod.pattern;return n?new RegExp(`^(${xi(n.source)}|null)$`):void 0}),ae(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(n,o)=>{if(n.value===null)return n;return t.innerType._zod.run(n,o)}}),Yp=_("$ZodDefault",(e,t)=>{Q.init(e,t),e._zod.optin="optional",ae(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,o)=>{if(o.direction==="backward")return t.innerType._zod.run(n,o);if(n.value===void 0)return n.value=t.defaultValue,n;let r=t.innerType._zod.run(n,o);if(r instanceof Promise)return r.then((i)=>by(i,t));return by(r,t)}});function by(e,t){if(e.value===void 0)e.value=t.defaultValue;return e}var Xp=_("$ZodPrefault",(e,t)=>{Q.init(e,t),e._zod.optin="optional",ae(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,o)=>{if(o.direction==="backward")return t.innerType._zod.run(n,o);if(n.value===void 0)n.value=t.defaultValue;return t.innerType._zod.run(n,o)}}),Qp=_("$ZodNonOptional",(e,t)=>{Q.init(e,t),ae(e._zod,"values",()=>{let n=t.innerType._zod.values;return n?new Set([...n].filter((o)=>o!==void 0)):void 0}),e._zod.parse=(n,o)=>{let r=t.innerType._zod.run(n,o);if(r instanceof Promise)return r.then((i)=>$y(i,e));return $y(r,e)}});function $y(e,t){if(!e.issues.length&&e.value===void 0)e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t});return e}var ef=_("$ZodSuccess",(e,t)=>{Q.init(e,t),e._zod.parse=(n,o)=>{if(o.direction==="backward")throw new cn("ZodSuccess");let r=t.innerType._zod.run(n,o);if(r instanceof Promise)return r.then((i)=>(n.value=i.issues.length===0,n));return n.value=r.issues.length===0,n}}),tf=_("$ZodCatch",(e,t)=>{Q.init(e,t),e._zod.optin="optional",ae(e._zod,"optout",()=>t.innerType._zod.optout),ae(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,o)=>{if(o.direction==="backward")return t.innerType._zod.run(n,o);let r=t.innerType._zod.run(n,o);if(r instanceof Promise)return r.then((i)=>{if(n.value=i.value,i.issues.length)n.value=t.catchValue({...n,error:{issues:i.issues.map((a)=>He(a,o,be()))},input:n.value}),n.issues=[],n.fallback=!0;return n});if(n.value=r.value,r.issues.length)n.value=t.catchValue({...n,error:{issues:r.issues.map((i)=>He(i,o,be()))},input:n.value}),n.issues=[],n.fallback=!0;return n}}),rf=_("$ZodNaN",(e,t)=>{Q.init(e,t),e._zod.parse=(n,o)=>{if(typeof n.value!=="number"||!Number.isNaN(n.value))return n.issues.push({input:n.value,inst:e,expected:"nan",code:"invalid_type"}),n;return n}}),ec=_("$ZodPipe",(e,t)=>{Q.init(e,t),ae(e._zod,"values",()=>t.in._zod.values),ae(e._zod,"optin",()=>t.in._zod.optin),ae(e._zod,"optout",()=>t.out._zod.optout),ae(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,o)=>{if(o.direction==="backward"){let i=t.out._zod.run(n,o);if(i instanceof Promise)return i.then((a)=>Hs(a,t.in,o));return Hs(i,t.in,o)}let r=t.in._zod.run(n,o);if(r instanceof Promise)return r.then((i)=>Hs(i,t.out,o));return Hs(r,t.out,o)}});function Hs(e,t,n){if(e.issues.length)return e.aborted=!0,e;return t._zod.run({value:e.value,issues:e.issues,fallback:e.fallback},n)}var Mi=_("$ZodCodec",(e,t)=>{Q.init(e,t),ae(e._zod,"values",()=>t.in._zod.values),ae(e._zod,"optin",()=>t.in._zod.optin),ae(e._zod,"optout",()=>t.out._zod.optout),ae(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,o)=>{if((o.direction||"forward")==="forward"){let i=t.in._zod.run(n,o);if(i instanceof Promise)return i.then((a)=>Ks(a,t,o));return Ks(i,t,o)}else{let i=t.out._zod.run(n,o);if(i instanceof Promise)return i.then((a)=>Ks(a,t,o));return Ks(i,t,o)}}});function Ks(e,t,n){if(e.issues.length)return e.aborted=!0,e;if((n.direction||"forward")==="forward"){let r=t.transform(e.value,e);if(r instanceof Promise)return r.then((i)=>Gs(e,i,t.out,n));return Gs(e,r,t.out,n)}else{let r=t.reverseTransform(e.value,e);if(r instanceof Promise)return r.then((i)=>Gs(e,i,t.in,n));return Gs(e,r,t.in,n)}}function Gs(e,t,n,o){if(e.issues.length)return e.aborted=!0,e;return n._zod.run({value:t,issues:e.issues},o)}var nf=_("$ZodPreprocess",(e,t)=>{ec.init(e,t)}),of=_("$ZodReadonly",(e,t)=>{Q.init(e,t),ae(e._zod,"propValues",()=>t.innerType._zod.propValues),ae(e._zod,"values",()=>t.innerType._zod.values),ae(e._zod,"optin",()=>t.innerType?._zod?.optin),ae(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(n,o)=>{if(o.direction==="backward")return t.innerType._zod.run(n,o);let r=t.innerType._zod.run(n,o);if(r instanceof Promise)return r.then(zy);return zy(r)}});function zy(e){return e.value=Object.freeze(e.value),e}var af=_("$ZodTemplateLiteral",(e,t)=>{Q.init(e,t);let n=[];for(let o of t.parts)if(typeof o==="object"&&o!==null){if(!o._zod.pattern)throw Error(`Invalid template literal part, no pattern found: ${[...o._zod.traits].shift()}`);let r=o._zod.pattern instanceof RegExp?o._zod.pattern.source:o._zod.pattern;if(!r)throw Error(`Invalid template literal part: ${o._zod.traits}`);let i=r.startsWith("^")?1:0,a=r.endsWith("$")?r.length-1:r.length;n.push(r.slice(i,a))}else if(o===null||Xd.has(typeof o))n.push(yt(`${o}`));else throw Error(`Invalid template literal part: ${o}`);e._zod.pattern=new RegExp(`^${n.join("")}$`),e._zod.parse=(o,r)=>{if(typeof o.value!=="string")return o.issues.push({input:o.value,inst:e,expected:"string",code:"invalid_type"}),o;if(e._zod.pattern.lastIndex=0,!e._zod.pattern.test(o.value))return o.issues.push({input:o.value,inst:e,code:"invalid_format",format:t.format??"template_literal",pattern:e._zod.pattern.source}),o;return o}}),sf=_("$ZodFunction",(e,t)=>(Q.init(e,t),e._def=t,e._zod.def=t,e.implement=(n)=>{if(typeof n!=="function")throw Error("implement() must be called with a function");return function(...o){let r=e._def.input?Es(e._def.input,o):o,i=Reflect.apply(n,this,r);if(e._def.output)return Es(e._def.output,i);return i}},e.implementAsync=(n)=>{if(typeof n!=="function")throw Error("implementAsync() must be called with a function");return async function(...o){let r=e._def.input?await Ts(e._def.input,o):o,i=await Reflect.apply(n,this,r);if(e._def.output)return await Ts(e._def.output,i);return i}},e._zod.parse=(n,o)=>{if(typeof n.value!=="function")return n.issues.push({code:"invalid_type",expected:"function",input:n.value,inst:e}),n;if(e._def.output&&e._def.output._zod.def.type==="promise")n.value=e.implementAsync(n.value);else n.value=e.implement(n.value);return n},e.input=(...n)=>{let o=e.constructor;if(Array.isArray(n[0]))return new o({type:"function",input:new Xs({type:"tuple",items:n[0],rest:n[1]}),output:e._def.output});return new o({type:"function",input:n[0],output:e._def.output})},e.output=(n)=>new e.constructor({type:"function",input:e._def.input,output:n}),e)),cf=_("$ZodPromise",(e,t)=>{Q.init(e,t),e._zod.parse=(n,o)=>Promise.resolve(n.value).then((r)=>t.innerType._zod.run({value:r,issues:[]},o))}),lf=_("$ZodLazy",(e,t)=>{Q.init(e,t),ae(e._zod,"innerType",()=>{let n=t;if(!n._cachedInner)n._cachedInner=t.getter();return n._cachedInner}),ae(e._zod,"pattern",()=>e._zod.innerType?._zod?.pattern),ae(e._zod,"propValues",()=>e._zod.innerType?._zod?.propValues),ae(e._zod,"optin",()=>e._zod.innerType?._zod?.optin??void 0),ae(e._zod,"optout",()=>e._zod.innerType?._zod?.optout??void 0),e._zod.parse=(n,o)=>e._zod.innerType._zod.run(n,o)}),uf=_("$ZodCustom",(e,t)=>{ge.init(e,t),Q.init(e,t),e._zod.parse=(n,o)=>n,e._zod.check=(n)=>{let o=n.value,r=t.fn(o);if(r instanceof Promise)return r.then((i)=>wy(i,n,o,e));wy(r,n,o,e);return}});function wy(e,t,n,o){if(!e){let r={code:"custom",input:n,inst:o,path:[...o._zod.def.path??[]],continue:!o._zod.def.abort};if(o._zod.def.params)r.params=o._zod.def.params;t.issues.push(wr(r))}}var Vi={};tr(Vi,{ar:()=>df,az:()=>mf,be:()=>pf,bg:()=>ff,ca:()=>hf,cs:()=>gf,da:()=>vf,de:()=>_f,el:()=>Sf,en:()=>Ui,eo:()=>yf,es:()=>bf,fa:()=>$f,fi:()=>zf,fr:()=>wf,frCA:()=>Rf,he:()=>xf,hr:()=>kf,hu:()=>If,hy:()=>Pf,id:()=>Ef,is:()=>Tf,it:()=>jf,ja:()=>Of,ka:()=>Nf,kh:()=>Cf,km:()=>Di,ko:()=>qf,lt:()=>Af,mk:()=>Mf,ms:()=>Uf,nl:()=>Df,no:()=>Lf,ota:()=>Zf,pl:()=>Ff,ps:()=>Vf,pt:()=>Jf,ro:()=>Hf,ru:()=>Kf,sl:()=>Gf,sv:()=>Bf,ta:()=>Wf,th:()=>Yf,tr:()=>Xf,ua:()=>Qf,uk:()=>Zi,ur:()=>eh,uz:()=>th,vi:()=>rh,yo:()=>ih,zhCN:()=>nh,zhTW:()=>oh});var D0=()=>{let e={string:{unit:"حرف",verb:"أن يحوي"},file:{unit:"بايت",verb:"أن يحوي"},array:{unit:"عنصر",verb:"أن يحوي"},set:{unit:"عنصر",verb:"أن يحوي"}};function t(r){return e[r]??null}let n={regex:"مدخل",email:"بريد إلكتروني",url:"رابط",emoji:"إيموجي",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"تاريخ ووقت بمعيار ISO",date:"تاريخ بمعيار ISO",time:"وقت بمعيار ISO",duration:"مدة بمعيار ISO",ipv4:"عنوان IPv4",ipv6:"عنوان IPv6",cidrv4:"مدى عناوين بصيغة IPv4",cidrv6:"مدى عناوين بصيغة IPv6",base64:"نَص بترميز base64-encoded",base64url:"نَص بترميز base64url-encoded",json_string:"نَص على هيئة JSON",e164:"رقم هاتف بمعيار E.164",jwt:"JWT",template_literal:"مدخل"},o={nan:"NaN"};return(r)=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=I(r.input),s=o[a]??a;if(/^[A-Z]/.test(r.expected))return`مدخلات غير مقبولة: يفترض إدخال instanceof ${r.expected}، ولكن تم إدخال ${s}`;return`مدخلات غير مقبولة: يفترض إدخال ${i}، ولكن تم إدخال ${s}`}case"invalid_value":if(r.values.length===1)return`مدخلات غير مقبولة: يفترض إدخال ${k(r.values[0])}`;return`اختيار غير مقبول: يتوقع انتقاء أحد هذه الخيارات: ${z(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);if(a)return` أكبر من اللازم: يفترض أن تكون ${r.origin??"القيمة"} ${i} ${r.maximum.toString()} ${a.unit??"عنصر"}`;return`أكبر من اللازم: يفترض أن تكون ${r.origin??"القيمة"} ${i} ${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);if(a)return`أصغر من اللازم: يفترض لـ ${r.origin} أن يكون ${i} ${r.minimum.toString()} ${a.unit}`;return`أصغر من اللازم: يفترض لـ ${r.origin} أن يكون ${i} ${r.minimum.toString()}`}case"invalid_format":{let i=r;if(i.format==="starts_with")return`نَص غير مقبول: يجب أن يبدأ بـ "${r.prefix}"`;if(i.format==="ends_with")return`نَص غير مقبول: يجب أن ينتهي بـ "${i.suffix}"`;if(i.format==="includes")return`نَص غير مقبول: يجب أن يتضمَّن "${i.includes}"`;if(i.format==="regex")return`نَص غير مقبول: يجب أن يطابق النمط ${i.pattern}`;return`${n[i.format]??r.format} غير مقبول`}case"not_multiple_of":return`رقم غير مقبول: يجب أن يكون من مضاعفات ${r.divisor}`;case"unrecognized_keys":return`معرف${r.keys.length>1?"ات":""} غريب${r.keys.length>1?"ة":""}: ${z(r.keys,"، ")}`;case"invalid_key":return`معرف غير مقبول في ${r.origin}`;case"invalid_union":return"مدخل غير مقبول";case"invalid_element":return`مدخل غير مقبول في ${r.origin}`;default:return"مدخل غير مقبول"}}};function df(){return{localeError:D0()}}var L0=()=>{let e={string:{unit:"simvol",verb:"olmalıdır"},file:{unit:"bayt",verb:"olmalıdır"},array:{unit:"element",verb:"olmalıdır"},set:{unit:"element",verb:"olmalıdır"}};function t(r){return e[r]??null}let n={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(r)=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=I(r.input),s=o[a]??a;if(/^[A-Z]/.test(r.expected))return`Yanlış dəyər: gözlənilən instanceof ${r.expected}, daxil olan ${s}`;return`Yanlış dəyər: gözlənilən ${i}, daxil olan ${s}`}case"invalid_value":if(r.values.length===1)return`Yanlış dəyər: gözlənilən ${k(r.values[0])}`;return`Yanlış seçim: aşağıdakılardan biri olmalıdır: ${z(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);if(a)return`Çox böyük: gözlənilən ${r.origin??"dəyər"} ${i}${r.maximum.toString()} ${a.unit??"element"}`;return`Çox böyük: gözlənilən ${r.origin??"dəyər"} ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);if(a)return`Çox kiçik: gözlənilən ${r.origin} ${i}${r.minimum.toString()} ${a.unit}`;return`Çox kiçik: gözlənilən ${r.origin} ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;if(i.format==="starts_with")return`Yanlış mətn: "${i.prefix}" ilə başlamalıdır`;if(i.format==="ends_with")return`Yanlış mətn: "${i.suffix}" ilə bitməlidir`;if(i.format==="includes")return`Yanlış mətn: "${i.includes}" daxil olmalıdır`;if(i.format==="regex")return`Yanlış mətn: ${i.pattern} şablonuna uyğun olmalıdır`;return`Yanlış ${n[i.format]??r.format}`}case"not_multiple_of":return`Yanlış ədəd: ${r.divisor} ilə bölünə bilən olmalıdır`;case"unrecognized_keys":return`Tanınmayan açar${r.keys.length>1?"lar":""}: ${z(r.keys,", ")}`;case"invalid_key":return`${r.origin} daxilində yanlış açar`;case"invalid_union":return"Yanlış dəyər";case"invalid_element":return`${r.origin} daxilində yanlış dəyər`;default:return"Yanlış dəyər"}}};function mf(){return{localeError:L0()}}function Ey(e,t,n,o){let r=Math.abs(e),i=r%10,a=r%100;if(a>=11&&a<=19)return o;if(i===1)return t;if(i>=2&&i<=4)return n;return o}var Z0=()=>{let e={string:{unit:{one:"сімвал",few:"сімвалы",many:"сімвалаў"},verb:"мець"},array:{unit:{one:"элемент",few:"элементы",many:"элементаў"},verb:"мець"},set:{unit:{one:"элемент",few:"элементы",many:"элементаў"},verb:"мець"},file:{unit:{one:"байт",few:"байты",many:"байтаў"},verb:"мець"}};function t(r){return e[r]??null}let n={regex:"увод",email:"email адрас",url:"URL",emoji:"эмодзі",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO дата і час",date:"ISO дата",time:"ISO час",duration:"ISO працягласць",ipv4:"IPv4 адрас",ipv6:"IPv6 адрас",cidrv4:"IPv4 дыяпазон",cidrv6:"IPv6 дыяпазон",base64:"радок у фармаце base64",base64url:"радок у фармаце base64url",json_string:"JSON радок",e164:"нумар E.164",jwt:"JWT",template_literal:"увод"},o={nan:"NaN",number:"лік",array:"масіў"};return(r)=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=I(r.input),s=o[a]??a;if(/^[A-Z]/.test(r.expected))return`Няправільны ўвод: чакаўся instanceof ${r.expected}, атрымана ${s}`;return`Няправільны ўвод: чакаўся ${i}, атрымана ${s}`}case"invalid_value":if(r.values.length===1)return`Няправільны ўвод: чакалася ${k(r.values[0])}`;return`Няправільны варыянт: чакаўся адзін з ${z(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);if(a){let s=Number(r.maximum),c=Ey(s,a.unit.one,a.unit.few,a.unit.many);return`Занадта вялікі: чакалася, што ${r.origin??"значэнне"} павінна ${a.verb} ${i}${r.maximum.toString()} ${c}`}return`Занадта вялікі: чакалася, што ${r.origin??"значэнне"} павінна быць ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);if(a){let s=Number(r.minimum),c=Ey(s,a.unit.one,a.unit.few,a.unit.many);return`Занадта малы: чакалася, што ${r.origin} павінна ${a.verb} ${i}${r.minimum.toString()} ${c}`}return`Занадта малы: чакалася, што ${r.origin} павінна быць ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;if(i.format==="starts_with")return`Няправільны радок: павінен пачынацца з "${i.prefix}"`;if(i.format==="ends_with")return`Няправільны радок: павінен заканчвацца на "${i.suffix}"`;if(i.format==="includes")return`Няправільны радок: павінен змяшчаць "${i.includes}"`;if(i.format==="regex")return`Няправільны радок: павінен адпавядаць шаблону ${i.pattern}`;return`Няправільны ${n[i.format]??r.format}`}case"not_multiple_of":return`Няправільны лік: павінен быць кратным ${r.divisor}`;case"unrecognized_keys":return`Нераспазнаны ${r.keys.length>1?"ключы":"ключ"}: ${z(r.keys,", ")}`;case"invalid_key":return`Няправільны ключ у ${r.origin}`;case"invalid_union":return"Няправільны ўвод";case"invalid_element":return`Няправільнае значэнне ў ${r.origin}`;default:return"Няправільны ўвод"}}};function pf(){return{localeError:Z0()}}var V0=()=>{let e={string:{unit:"символа",verb:"да съдържа"},file:{unit:"байта",verb:"да съдържа"},array:{unit:"елемента",verb:"да съдържа"},set:{unit:"елемента",verb:"да съдържа"}};function t(r){return e[r]??null}let n={regex:"вход",email:"имейл адрес",url:"URL",emoji:"емоджи",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO време",date:"ISO дата",time:"ISO време",duration:"ISO продължителност",ipv4:"IPv4 адрес",ipv6:"IPv6 адрес",cidrv4:"IPv4 диапазон",cidrv6:"IPv6 диапазон",base64:"base64-кодиран низ",base64url:"base64url-кодиран низ",json_string:"JSON низ",e164:"E.164 номер",jwt:"JWT",template_literal:"вход"},o={nan:"NaN",number:"число",array:"масив"};return(r)=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=I(r.input),s=o[a]??a;if(/^[A-Z]/.test(r.expected))return`Невалиден вход: очакван instanceof ${r.expected}, получен ${s}`;return`Невалиден вход: очакван ${i}, получен ${s}`}case"invalid_value":if(r.values.length===1)return`Невалиден вход: очакван ${k(r.values[0])}`;return`Невалидна опция: очаквано едно от ${z(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);if(a)return`Твърде голямо: очаква се ${r.origin??"стойност"} да съдържа ${i}${r.maximum.toString()} ${a.unit??"елемента"}`;return`Твърде голямо: очаква се ${r.origin??"стойност"} да бъде ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);if(a)return`Твърде малко: очаква се ${r.origin} да съдържа ${i}${r.minimum.toString()} ${a.unit}`;return`Твърде малко: очаква се ${r.origin} да бъде ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;if(i.format==="starts_with")return`Невалиден низ: трябва да започва с "${i.prefix}"`;if(i.format==="ends_with")return`Невалиден низ: трябва да завършва с "${i.suffix}"`;if(i.format==="includes")return`Невалиден низ: трябва да включва "${i.includes}"`;if(i.format==="regex")return`Невалиден низ: трябва да съвпада с ${i.pattern}`;let a="Невалиден";if(i.format==="emoji")a="Невалидно";if(i.format==="datetime")a="Невалидно";if(i.format==="date")a="Невалидна";if(i.format==="time")a="Невалидно";if(i.format==="duration")a="Невалидна";return`${a} ${n[i.format]??r.format}`}case"not_multiple_of":return`Невалидно число: трябва да бъде кратно на ${r.divisor}`;case"unrecognized_keys":return`Неразпознат${r.keys.length>1?"и":""} ключ${r.keys.length>1?"ове":""}: ${z(r.keys,", ")}`;case"invalid_key":return`Невалиден ключ в ${r.origin}`;case"invalid_union":return"Невалиден вход";case"invalid_element":return`Невалидна стойност в ${r.origin}`;default:return"Невалиден вход"}}};function ff(){return{localeError:V0()}}var F0=()=>{let e={string:{unit:"caràcters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"}};function t(r){return e[r]??null}let n={regex:"entrada",email:"adreça electrònica",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ça IPv4",ipv6:"adreça IPv6",cidrv4:"rang IPv4",cidrv6:"rang IPv6",base64:"cadena codificada en base64",base64url:"cadena codificada en base64url",json_string:"cadena JSON",e164:"número E.164",jwt:"JWT",template_literal:"entrada"},o={nan:"NaN"};return(r)=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=I(r.input),s=o[a]??a;if(/^[A-Z]/.test(r.expected))return`Tipus invàlid: s'esperava instanceof ${r.expected}, s'ha rebut ${s}`;return`Tipus invàlid: s'esperava ${i}, s'ha rebut ${s}`}case"invalid_value":if(r.values.length===1)return`Valor invàlid: s'esperava ${k(r.values[0])}`;return`Opció invàlida: s'esperava una de ${z(r.values," o ")}`;case"too_big":{let i=r.inclusive?"com a màxim":"menys de",a=t(r.origin);if(a)return`Massa gran: s'esperava que ${r.origin??"el valor"} contingués ${i} ${r.maximum.toString()} ${a.unit??"elements"}`;return`Massa gran: s'esperava que ${r.origin??"el valor"} fos ${i} ${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?"com a mínim":"més de",a=t(r.origin);if(a)return`Massa petit: s'esperava que ${r.origin} contingués ${i} ${r.minimum.toString()} ${a.unit}`;return`Massa petit: s'esperava que ${r.origin} fos ${i} ${r.minimum.toString()}`}case"invalid_format":{let i=r;if(i.format==="starts_with")return`Format invàlid: ha de començar amb "${i.prefix}"`;if(i.format==="ends_with")return`Format invàlid: ha d'acabar amb "${i.suffix}"`;if(i.format==="includes")return`Format invàlid: ha d'incloure "${i.includes}"`;if(i.format==="regex")return`Format invàlid: ha de coincidir amb el patró ${i.pattern}`;return`Format invàlid per a ${n[i.format]??r.format}`}case"not_multiple_of":return`Número invàlid: ha de ser múltiple de ${r.divisor}`;case"unrecognized_keys":return`Clau${r.keys.length>1?"s":""} no reconeguda${r.keys.length>1?"s":""}: ${z(r.keys,", ")}`;case"invalid_key":return`Clau invàlida a ${r.origin}`;case"invalid_union":return"Entrada invàlida";case"invalid_element":return`Element invàlid a ${r.origin}`;default:return"Entrada invàlida"}}};function hf(){return{localeError:F0()}}var J0=()=>{let e={string:{unit:"znaků",verb:"mít"},file:{unit:"bajtů",verb:"mít"},array:{unit:"prvků",verb:"mít"},set:{unit:"prvků",verb:"mít"}};function t(r){return e[r]??null}let n={regex:"regulární výraz",email:"e-mailová 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 čas ve formátu ISO",date:"datum ve formátu ISO",time:"čas ve formátu ISO",duration:"doba trvání ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"řetězec zakódovaný ve formátu base64",base64url:"řetězec zakódovaný ve formátu base64url",json_string:"řetězec ve formátu JSON",e164:"číslo E.164",jwt:"JWT",template_literal:"vstup"},o={nan:"NaN",number:"číslo",string:"řetězec",function:"funkce",array:"pole"};return(r)=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=I(r.input),s=o[a]??a;if(/^[A-Z]/.test(r.expected))return`Neplatný vstup: očekáváno instanceof ${r.expected}, obdrženo ${s}`;return`Neplatný vstup: očekáváno ${i}, obdrženo ${s}`}case"invalid_value":if(r.values.length===1)return`Neplatný vstup: očekáváno ${k(r.values[0])}`;return`Neplatná možnost: očekávána jedna z hodnot ${z(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);if(a)return`Hodnota je příliš velká: ${r.origin??"hodnota"} musí mít ${i}${r.maximum.toString()} ${a.unit??"prvků"}`;return`Hodnota je příliš velká: ${r.origin??"hodnota"} musí být ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);if(a)return`Hodnota je příliš malá: ${r.origin??"hodnota"} musí mít ${i}${r.minimum.toString()} ${a.unit??"prvků"}`;return`Hodnota je příliš malá: ${r.origin??"hodnota"} musí být ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;if(i.format==="starts_with")return`Neplatný řetězec: musí začínat na "${i.prefix}"`;if(i.format==="ends_with")return`Neplatný řetězec: musí končit na "${i.suffix}"`;if(i.format==="includes")return`Neplatný řetězec: musí obsahovat "${i.includes}"`;if(i.format==="regex")return`Neplatný řetězec: musí odpovídat vzoru ${i.pattern}`;return`Neplatný formát ${n[i.format]??r.format}`}case"not_multiple_of":return`Neplatné číslo: musí být násobkem ${r.divisor}`;case"unrecognized_keys":return`Neznámé klíče: ${z(r.keys,", ")}`;case"invalid_key":return`Neplatný klíč v ${r.origin}`;case"invalid_union":return"Neplatný vstup";case"invalid_element":return`Neplatná hodnota v ${r.origin}`;default:return"Neplatný vstup"}}};function gf(){return{localeError:J0()}}var H0=()=>{let e={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"}};function t(r){return e[r]??null}let n={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æt",date:"ISO-dato",time:"ISO-klokkeslæt",duration:"ISO-varighed",ipv4:"IPv4-område",ipv6:"IPv6-område",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æt",file:"fil"};return(r)=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=I(r.input),s=o[a]??a;if(/^[A-Z]/.test(r.expected))return`Ugyldigt input: forventede instanceof ${r.expected}, fik ${s}`;return`Ugyldigt input: forventede ${i}, fik ${s}`}case"invalid_value":if(r.values.length===1)return`Ugyldig værdi: forventede ${k(r.values[0])}`;return`Ugyldigt valg: forventede en af følgende ${z(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin),s=o[r.origin]??r.origin;if(a)return`For stor: forventede ${s??"value"} ${a.verb} ${i} ${r.maximum.toString()} ${a.unit??"elementer"}`;return`For stor: forventede ${s??"value"} havde ${i} ${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin),s=o[r.origin]??r.origin;if(a)return`For lille: forventede ${s} ${a.verb} ${i} ${r.minimum.toString()} ${a.unit}`;return`For lille: forventede ${s} havde ${i} ${r.minimum.toString()}`}case"invalid_format":{let i=r;if(i.format==="starts_with")return`Ugyldig streng: skal starte med "${i.prefix}"`;if(i.format==="ends_with")return`Ugyldig streng: skal ende med "${i.suffix}"`;if(i.format==="includes")return`Ugyldig streng: skal indeholde "${i.includes}"`;if(i.format==="regex")return`Ugyldig streng: skal matche mønsteret ${i.pattern}`;return`Ugyldig ${n[i.format]??r.format}`}case"not_multiple_of":return`Ugyldigt tal: skal være deleligt med ${r.divisor}`;case"unrecognized_keys":return`${r.keys.length>1?"Ukendte nøgler":"Ukendt nøgle"}: ${z(r.keys,", ")}`;case"invalid_key":return`Ugyldig nøgle i ${r.origin}`;case"invalid_union":return"Ugyldigt input: matcher ingen af de tilladte typer";case"invalid_element":return`Ugyldig værdi i ${r.origin}`;default:return"Ugyldigt input"}}};function vf(){return{localeError:H0()}}var K0=()=>{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(r){return e[r]??null}let n={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(r)=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=I(r.input),s=o[a]??a;if(/^[A-Z]/.test(r.expected))return`Ungültige Eingabe: erwartet instanceof ${r.expected}, erhalten ${s}`;return`Ungültige Eingabe: erwartet ${i}, erhalten ${s}`}case"invalid_value":if(r.values.length===1)return`Ungültige Eingabe: erwartet ${k(r.values[0])}`;return`Ungültige Option: erwartet eine von ${z(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);if(a)return`Zu groß: erwartet, dass ${r.origin??"Wert"} ${i}${r.maximum.toString()} ${a.unit??"Elemente"} hat`;return`Zu groß: erwartet, dass ${r.origin??"Wert"} ${i}${r.maximum.toString()} ist`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);if(a)return`Zu klein: erwartet, dass ${r.origin} ${i}${r.minimum.toString()} ${a.unit} hat`;return`Zu klein: erwartet, dass ${r.origin} ${i}${r.minimum.toString()} ist`}case"invalid_format":{let i=r;if(i.format==="starts_with")return`Ungültiger String: muss mit "${i.prefix}" beginnen`;if(i.format==="ends_with")return`Ungültiger String: muss mit "${i.suffix}" enden`;if(i.format==="includes")return`Ungültiger String: muss "${i.includes}" enthalten`;if(i.format==="regex")return`Ungültiger String: muss dem Muster ${i.pattern} entsprechen`;return`Ungültig: ${n[i.format]??r.format}`}case"not_multiple_of":return`Ungültige Zahl: muss ein Vielfaches von ${r.divisor} sein`;case"unrecognized_keys":return`${r.keys.length>1?"Unbekannte Schlüssel":"Unbekannter Schlüssel"}: ${z(r.keys,", ")}`;case"invalid_key":return`Ungültiger Schlüssel in ${r.origin}`;case"invalid_union":return"Ungültige Eingabe";case"invalid_element":return`Ungültiger Wert in ${r.origin}`;default:return"Ungültige Eingabe"}}};function _f(){return{localeError:K0()}}var G0=()=>{let e={string:{unit:"χαρακτήρες",verb:"να έχει"},file:{unit:"bytes",verb:"να έχει"},array:{unit:"στοιχεία",verb:"να έχει"},set:{unit:"στοιχεία",verb:"να έχει"},map:{unit:"καταχωρήσεις",verb:"να έχει"}};function t(r){return e[r]??null}let n={regex:"είσοδος",email:"διεύθυνση 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 ημερομηνία και ώρα",date:"ISO ημερομηνία",time:"ISO ώρα",duration:"ISO διάρκεια",ipv4:"διεύθυνση IPv4",ipv6:"διεύθυνση IPv6",mac:"διεύθυνση MAC",cidrv4:"εύρος IPv4",cidrv6:"εύρος IPv6",base64:"συμβολοσειρά κωδικοποιημένη σε base64",base64url:"συμβολοσειρά κωδικοποιημένη σε base64url",json_string:"συμβολοσειρά JSON",e164:"αριθμός E.164",jwt:"JWT",template_literal:"είσοδος"},o={nan:"NaN"};return(r)=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=I(r.input),s=o[a]??a;if(typeof r.expected==="string"&&/^[A-Z]/.test(r.expected))return`Μη έγκυρη είσοδος: αναμενόταν instanceof ${r.expected}, λήφθηκε ${s}`;return`Μη έγκυρη είσοδος: αναμενόταν ${i}, λήφθηκε ${s}`}case"invalid_value":if(r.values.length===1)return`Μη έγκυρη είσοδος: αναμενόταν ${k(r.values[0])}`;return`Μη έγκυρη επιλογή: αναμενόταν ένα από ${z(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);if(a)return`Πολύ μεγάλο: αναμενόταν ${r.origin??"τιμή"} να έχει ${i}${r.maximum.toString()} ${a.unit??"στοιχεία"}`;return`Πολύ μεγάλο: αναμενόταν ${r.origin??"τιμή"} να είναι ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);if(a)return`Πολύ μικρό: αναμενόταν ${r.origin} να έχει ${i}${r.minimum.toString()} ${a.unit}`;return`Πολύ μικρό: αναμενόταν ${r.origin} να είναι ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;if(i.format==="starts_with")return`Μη έγκυρη συμβολοσειρά: πρέπει να ξεκινά με "${i.prefix}"`;if(i.format==="ends_with")return`Μη έγκυρη συμβολοσειρά: πρέπει να τελειώνει με "${i.suffix}"`;if(i.format==="includes")return`Μη έγκυρη συμβολοσειρά: πρέπει να περιέχει "${i.includes}"`;if(i.format==="regex")return`Μη έγκυρη συμβολοσειρά: πρέπει να ταιριάζει με το μοτίβο ${i.pattern}`;return`Μη έγκυρο: ${n[i.format]??r.format}`}case"not_multiple_of":return`Μη έγκυρος αριθμός: πρέπει να είναι πολλαπλάσιο του ${r.divisor}`;case"unrecognized_keys":return`Άγνωστ${r.keys.length>1?"α":"ο"} κλειδ${r.keys.length>1?"ιά":"ί"}: ${z(r.keys,", ")}`;case"invalid_key":return`Μη έγκυρο κλειδί στο ${r.origin}`;case"invalid_union":return"Μη έγκυρη είσοδος";case"invalid_element":return`Μη έγκυρη τιμή στο ${r.origin}`;default:return"Μη έγκυρη είσοδος"}}};function Sf(){return{localeError:G0()}}var B0=()=>{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(r){return e[r]??null}let n={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(r)=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=I(r.input),s=o[a]??a;return`Invalid input: expected ${i}, received ${s}`}case"invalid_value":if(r.values.length===1)return`Invalid input: expected ${k(r.values[0])}`;return`Invalid option: expected one of ${z(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);if(a)return`Too big: expected ${r.origin??"value"} to have ${i}${r.maximum.toString()} ${a.unit??"elements"}`;return`Too big: expected ${r.origin??"value"} to be ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);if(a)return`Too small: expected ${r.origin} to have ${i}${r.minimum.toString()} ${a.unit}`;return`Too small: expected ${r.origin} to be ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;if(i.format==="starts_with")return`Invalid string: must start with "${i.prefix}"`;if(i.format==="ends_with")return`Invalid string: must end with "${i.suffix}"`;if(i.format==="includes")return`Invalid string: must include "${i.includes}"`;if(i.format==="regex")return`Invalid string: must match pattern ${i.pattern}`;return`Invalid ${n[i.format]??r.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${r.divisor}`;case"unrecognized_keys":return`Unrecognized key${r.keys.length>1?"s":""}: ${z(r.keys,", ")}`;case"invalid_key":return`Invalid key in ${r.origin}`;case"invalid_union":if(r.options&&Array.isArray(r.options)&&r.options.length>0)return`Invalid discriminator value. Expected ${r.options.map((a)=>`'${a}'`).join(" | ")}`;return"Invalid input";case"invalid_element":return`Invalid value in ${r.origin}`;default:return"Invalid input"}}};function Ui(){return{localeError:B0()}}var W0=()=>{let e={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function t(r){return e[r]??null}let n={regex:"enigo",email:"retadreso",url:"URL",emoji:"emoĝio",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ŭro",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(r)=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=I(r.input),s=o[a]??a;if(/^[A-Z]/.test(r.expected))return`Nevalida enigo: atendiĝis instanceof ${r.expected}, riceviĝis ${s}`;return`Nevalida enigo: atendiĝis ${i}, riceviĝis ${s}`}case"invalid_value":if(r.values.length===1)return`Nevalida enigo: atendiĝis ${k(r.values[0])}`;return`Nevalida opcio: atendiĝis unu el ${z(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);if(a)return`Tro granda: atendiĝis ke ${r.origin??"valoro"} havu ${i}${r.maximum.toString()} ${a.unit??"elementojn"}`;return`Tro granda: atendiĝis ke ${r.origin??"valoro"} havu ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);if(a)return`Tro malgranda: atendiĝis ke ${r.origin} havu ${i}${r.minimum.toString()} ${a.unit}`;return`Tro malgranda: atendiĝis ke ${r.origin} estu ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;if(i.format==="starts_with")return`Nevalida karaktraro: devas komenciĝi per "${i.prefix}"`;if(i.format==="ends_with")return`Nevalida karaktraro: devas finiĝi per "${i.suffix}"`;if(i.format==="includes")return`Nevalida karaktraro: devas inkluzivi "${i.includes}"`;if(i.format==="regex")return`Nevalida karaktraro: devas kongrui kun la modelo ${i.pattern}`;return`Nevalida ${n[i.format]??r.format}`}case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${r.divisor}`;case"unrecognized_keys":return`Nekonata${r.keys.length>1?"j":""} ŝlosilo${r.keys.length>1?"j":""}: ${z(r.keys,", ")}`;case"invalid_key":return`Nevalida ŝlosilo en ${r.origin}`;case"invalid_union":return"Nevalida enigo";case"invalid_element":return`Nevalida valoro en ${r.origin}`;default:return"Nevalida enigo"}}};function yf(){return{localeError:W0()}}var Y0=()=>{let e={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}};function t(r){return e[r]??null}let n={regex:"entrada",email:"dirección de correo electrónico",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ón ISO",ipv4:"dirección IPv4",ipv6:"dirección IPv6",cidrv4:"rango IPv4",cidrv6:"rango IPv6",base64:"cadena codificada en base64",base64url:"URL codificada en base64",json_string:"cadena JSON",e164:"número E.164",jwt:"JWT",template_literal:"entrada"},o={nan:"NaN",string:"texto",number:"número",boolean:"booleano",array:"arreglo",object:"objeto",set:"conjunto",file:"archivo",date:"fecha",bigint:"número grande",symbol:"símbolo",undefined:"indefinido",null:"nulo",function:"función",map:"mapa",record:"registro",tuple:"tupla",enum:"enumeración",union:"unión",literal:"literal",promise:"promesa",void:"vacío",never:"nunca",unknown:"desconocido",any:"cualquiera"};return(r)=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=I(r.input),s=o[a]??a;if(/^[A-Z]/.test(r.expected))return`Entrada inválida: se esperaba instanceof ${r.expected}, recibido ${s}`;return`Entrada inválida: se esperaba ${i}, recibido ${s}`}case"invalid_value":if(r.values.length===1)return`Entrada inválida: se esperaba ${k(r.values[0])}`;return`Opción inválida: se esperaba una de ${z(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin),s=o[r.origin]??r.origin;if(a)return`Demasiado grande: se esperaba que ${s??"valor"} tuviera ${i}${r.maximum.toString()} ${a.unit??"elementos"}`;return`Demasiado grande: se esperaba que ${s??"valor"} fuera ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin),s=o[r.origin]??r.origin;if(a)return`Demasiado pequeño: se esperaba que ${s} tuviera ${i}${r.minimum.toString()} ${a.unit}`;return`Demasiado pequeño: se esperaba que ${s} fuera ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;if(i.format==="starts_with")return`Cadena inválida: debe comenzar con "${i.prefix}"`;if(i.format==="ends_with")return`Cadena inválida: debe terminar en "${i.suffix}"`;if(i.format==="includes")return`Cadena inválida: debe incluir "${i.includes}"`;if(i.format==="regex")return`Cadena inválida: debe coincidir con el patrón ${i.pattern}`;return`Inválido ${n[i.format]??r.format}`}case"not_multiple_of":return`Número inválido: debe ser múltiplo de ${r.divisor}`;case"unrecognized_keys":return`Llave${r.keys.length>1?"s":""} desconocida${r.keys.length>1?"s":""}: ${z(r.keys,", ")}`;case"invalid_key":return`Llave inválida en ${o[r.origin]??r.origin}`;case"invalid_union":return"Entrada inválida";case"invalid_element":return`Valor inválido en ${o[r.origin]??r.origin}`;default:return"Entrada inválida"}}};function bf(){return{localeError:Y0()}}var X0=()=>{let e={string:{unit:"کاراکتر",verb:"داشته باشد"},file:{unit:"بایت",verb:"داشته باشد"},array:{unit:"آیتم",verb:"داشته باشد"},set:{unit:"آیتم",verb:"داشته باشد"}};function t(r){return e[r]??null}let n={regex:"ورودی",email:"آدرس ایمیل",url:"URL",emoji:"ایموجی",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"تاریخ و زمان ایزو",date:"تاریخ ایزو",time:"زمان ایزو",duration:"مدت زمان ایزو",ipv4:"IPv4 آدرس",ipv6:"IPv6 آدرس",cidrv4:"IPv4 دامنه",cidrv6:"IPv6 دامنه",base64:"base64-encoded رشته",base64url:"base64url-encoded رشته",json_string:"JSON رشته",e164:"E.164 عدد",jwt:"JWT",template_literal:"ورودی"},o={nan:"NaN",number:"عدد",array:"آرایه"};return(r)=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=I(r.input),s=o[a]??a;if(/^[A-Z]/.test(r.expected))return`ورودی نامعتبر: میبایست instanceof ${r.expected} میبود، ${s} دریافت شد`;return`ورودی نامعتبر: میبایست ${i} میبود، ${s} دریافت شد`}case"invalid_value":if(r.values.length===1)return`ورودی نامعتبر: میبایست ${k(r.values[0])} میبود`;return`گزینه نامعتبر: میبایست یکی از ${z(r.values,"|")} میبود`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);if(a)return`خیلی بزرگ: ${r.origin??"مقدار"} باید ${i}${r.maximum.toString()} ${a.unit??"عنصر"} باشد`;return`خیلی بزرگ: ${r.origin??"مقدار"} باید ${i}${r.maximum.toString()} باشد`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);if(a)return`خیلی کوچک: ${r.origin} باید ${i}${r.minimum.toString()} ${a.unit} باشد`;return`خیلی کوچک: ${r.origin} باید ${i}${r.minimum.toString()} باشد`}case"invalid_format":{let i=r;if(i.format==="starts_with")return`رشته نامعتبر: باید با "${i.prefix}" شروع شود`;if(i.format==="ends_with")return`رشته نامعتبر: باید با "${i.suffix}" تمام شود`;if(i.format==="includes")return`رشته نامعتبر: باید شامل "${i.includes}" باشد`;if(i.format==="regex")return`رشته نامعتبر: باید با الگوی ${i.pattern} مطابقت داشته باشد`;return`${n[i.format]??r.format} نامعتبر`}case"not_multiple_of":return`عدد نامعتبر: باید مضرب ${r.divisor} باشد`;case"unrecognized_keys":return`کلید${r.keys.length>1?"های":""} ناشناس: ${z(r.keys,", ")}`;case"invalid_key":return`کلید ناشناس در ${r.origin}`;case"invalid_union":return"ورودی نامعتبر";case"invalid_element":return`مقدار نامعتبر در ${r.origin}`;default:return"ورودی نامعتبر"}}};function $f(){return{localeError:X0()}}var Q0=()=>{let e={string:{unit:"merkkiä",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äivämäärän"}};function t(r){return e[r]??null}let n={regex:"säännöllinen lauseke",email:"sähköpostiosoite",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äivämäärä",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(r)=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=I(r.input),s=o[a]??a;if(/^[A-Z]/.test(r.expected))return`Virheellinen tyyppi: odotettiin instanceof ${r.expected}, oli ${s}`;return`Virheellinen tyyppi: odotettiin ${i}, oli ${s}`}case"invalid_value":if(r.values.length===1)return`Virheellinen syöte: täytyy olla ${k(r.values[0])}`;return`Virheellinen valinta: täytyy olla yksi seuraavista: ${z(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);if(a)return`Liian suuri: ${a.subject} täytyy olla ${i}${r.maximum.toString()} ${a.unit}`.trim();return`Liian suuri: arvon täytyy olla ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);if(a)return`Liian pieni: ${a.subject} täytyy olla ${i}${r.minimum.toString()} ${a.unit}`.trim();return`Liian pieni: arvon täytyy olla ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;if(i.format==="starts_with")return`Virheellinen syöte: täytyy alkaa "${i.prefix}"`;if(i.format==="ends_with")return`Virheellinen syöte: täytyy loppua "${i.suffix}"`;if(i.format==="includes")return`Virheellinen syöte: täytyy sisältää "${i.includes}"`;if(i.format==="regex")return`Virheellinen syöte: täytyy vastata säännöllistä lauseketta ${i.pattern}`;return`Virheellinen ${n[i.format]??r.format}`}case"not_multiple_of":return`Virheellinen luku: täytyy olla luvun ${r.divisor} monikerta`;case"unrecognized_keys":return`${r.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${z(r.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öte"}}};function zf(){return{localeError:Q0()}}var eI=()=>{let e={string:{unit:"caractères",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"éléments",verb:"avoir"},set:{unit:"éléments",verb:"avoir"}};function t(r){return e[r]??null}let n={regex:"entrée",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ée ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"chaîne encodée en base64",base64url:"chaîne encodée en base64url",json_string:"chaîne JSON",e164:"numéro E.164",jwt:"JWT",template_literal:"entrée"},o={string:"chaîne",number:"nombre",int:"entier",boolean:"booléen",bigint:"grand entier",symbol:"symbole",undefined:"indéfini",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(r)=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=I(r.input),s=o[a]??a;if(/^[A-Z]/.test(r.expected))return`Entrée invalide : instanceof ${r.expected} attendu, ${s} reçu`;return`Entrée invalide : ${i} attendu, ${s} reçu`}case"invalid_value":if(r.values.length===1)return`Entrée invalide : ${k(r.values[0])} attendu`;return`Option invalide : une valeur parmi ${z(r.values,"|")} attendue`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);if(a)return`Trop grand : ${o[r.origin]??"valeur"} doit ${a.verb} ${i}${r.maximum.toString()} ${a.unit??"élément(s)"}`;return`Trop grand : ${o[r.origin]??"valeur"} doit être ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);if(a)return`Trop petit : ${o[r.origin]??"valeur"} doit ${a.verb} ${i}${r.minimum.toString()} ${a.unit}`;return`Trop petit : ${o[r.origin]??"valeur"} doit être ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;if(i.format==="starts_with")return`Chaîne invalide : doit commencer par "${i.prefix}"`;if(i.format==="ends_with")return`Chaîne invalide : doit se terminer par "${i.suffix}"`;if(i.format==="includes")return`Chaîne invalide : doit inclure "${i.includes}"`;if(i.format==="regex")return`Chaîne invalide : doit correspondre au modèle ${i.pattern}`;return`${n[i.format]??r.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit être un multiple de ${r.divisor}`;case"unrecognized_keys":return`Clé${r.keys.length>1?"s":""} non reconnue${r.keys.length>1?"s":""} : ${z(r.keys,", ")}`;case"invalid_key":return`Clé invalide dans ${r.origin}`;case"invalid_union":return"Entrée invalide";case"invalid_element":return`Valeur invalide dans ${r.origin}`;default:return"Entrée invalide"}}};function wf(){return{localeError:eI()}}var tI=()=>{let e={string:{unit:"caractères",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"éléments",verb:"avoir"},set:{unit:"éléments",verb:"avoir"}};function t(r){return e[r]??null}let n={regex:"entrée",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ée ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"chaîne encodée en base64",base64url:"chaîne encodée en base64url",json_string:"chaîne JSON",e164:"numéro E.164",jwt:"JWT",template_literal:"entrée"},o={nan:"NaN"};return(r)=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=I(r.input),s=o[a]??a;if(/^[A-Z]/.test(r.expected))return`Entrée invalide : attendu instanceof ${r.expected}, reçu ${s}`;return`Entrée invalide : attendu ${i}, reçu ${s}`}case"invalid_value":if(r.values.length===1)return`Entrée invalide : attendu ${k(r.values[0])}`;return`Option invalide : attendu l'une des valeurs suivantes ${z(r.values,"|")}`;case"too_big":{let i=r.inclusive?"≤":"<",a=t(r.origin);if(a)return`Trop grand : attendu que ${r.origin??"la valeur"} ait ${i}${r.maximum.toString()} ${a.unit}`;return`Trop grand : attendu que ${r.origin??"la valeur"} soit ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?"≥":">",a=t(r.origin);if(a)return`Trop petit : attendu que ${r.origin} ait ${i}${r.minimum.toString()} ${a.unit}`;return`Trop petit : attendu que ${r.origin} soit ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;if(i.format==="starts_with")return`Chaîne invalide : doit commencer par "${i.prefix}"`;if(i.format==="ends_with")return`Chaîne invalide : doit se terminer par "${i.suffix}"`;if(i.format==="includes")return`Chaîne invalide : doit inclure "${i.includes}"`;if(i.format==="regex")return`Chaîne invalide : doit correspondre au motif ${i.pattern}`;return`${n[i.format]??r.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit être un multiple de ${r.divisor}`;case"unrecognized_keys":return`Clé${r.keys.length>1?"s":""} non reconnue${r.keys.length>1?"s":""} : ${z(r.keys,", ")}`;case"invalid_key":return`Clé invalide dans ${r.origin}`;case"invalid_union":return"Entrée invalide";case"invalid_element":return`Valeur invalide dans ${r.origin}`;default:return"Entrée invalide"}}};function Rf(){return{localeError:tI()}}var rI=()=>{let e={string:{label:"מחרוזת",gender:"f"},number:{label:"מספר",gender:"m"},boolean:{label:"ערך בוליאני",gender:"m"},bigint:{label:"BigInt",gender:"m"},date:{label:"תאריך",gender:"m"},array:{label:"מערך",gender:"m"},object:{label:"אובייקט",gender:"m"},null:{label:"ערך ריק (null)",gender:"m"},undefined:{label:"ערך לא מוגדר (undefined)",gender:"m"},symbol:{label:"סימבול (Symbol)",gender:"m"},function:{label:"פונקציה",gender:"f"},map:{label:"מפה (Map)",gender:"f"},set:{label:"קבוצה (Set)",gender:"f"},file:{label:"קובץ",gender:"m"},promise:{label:"Promise",gender:"m"},NaN:{label:"NaN",gender:"m"},unknown:{label:"ערך לא ידוע",gender:"m"},value:{label:"ערך",gender:"m"}},t={string:{unit:"תווים",shortLabel:"קצר",longLabel:"ארוך"},file:{unit:"בייטים",shortLabel:"קטן",longLabel:"גדול"},array:{unit:"פריטים",shortLabel:"קטן",longLabel:"גדול"},set:{unit:"פריטים",shortLabel:"קטן",longLabel:"גדול"},number:{unit:"",shortLabel:"קטן",longLabel:"גדול"}},n=(l)=>l?e[l]:void 0,o=(l)=>{let d=n(l);if(d)return d.label;return l??e.unknown.label},r=(l)=>`ה${o(l)}`,i=(l)=>(n(l)?.gender??"m")==="f"?"צריכה להיות":"צריך להיות",a=(l)=>{if(!l)return null;return t[l]??null},s={regex:{label:"קלט",gender:"m"},email:{label:"כתובת אימייל",gender:"f"},url:{label:"כתובת רשת",gender:"f"},emoji:{label:"אימוג'י",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:"תאריך וזמן ISO",gender:"m"},date:{label:"תאריך ISO",gender:"m"},time:{label:"זמן ISO",gender:"m"},duration:{label:"משך זמן ISO",gender:"m"},ipv4:{label:"כתובת IPv4",gender:"f"},ipv6:{label:"כתובת IPv6",gender:"f"},cidrv4:{label:"טווח IPv4",gender:"m"},cidrv6:{label:"טווח IPv6",gender:"m"},base64:{label:"מחרוזת בבסיס 64",gender:"f"},base64url:{label:"מחרוזת בבסיס 64 לכתובות רשת",gender:"f"},json_string:{label:"מחרוזת JSON",gender:"f"},e164:{label:"מספר E.164",gender:"m"},jwt:{label:"JWT",gender:"m"},ends_with:{label:"קלט",gender:"m"},includes:{label:"קלט",gender:"m"},lowercase:{label:"קלט",gender:"m"},starts_with:{label:"קלט",gender:"m"},uppercase:{label:"קלט",gender:"m"}},c={nan:"NaN"};return(l)=>{switch(l.code){case"invalid_type":{let d=l.expected,m=c[d??""]??o(d),p=I(l.input),f=c[p]??e[p]?.label??p;if(/^[A-Z]/.test(l.expected))return`קלט לא תקין: צריך להיות instanceof ${l.expected}, התקבל ${f}`;return`קלט לא תקין: צריך להיות ${m}, התקבל ${f}`}case"invalid_value":{if(l.values.length===1)return`ערך לא תקין: הערך חייב להיות ${k(l.values[0])}`;let d=l.values.map((f)=>k(f));if(l.values.length===2)return`ערך לא תקין: האפשרויות המתאימות הן ${d[0]} או ${d[1]}`;let m=d[d.length-1];return`ערך לא תקין: האפשרויות המתאימות הן ${d.slice(0,-1).join(", ")} או ${m}`}case"too_big":{let d=a(l.origin),m=r(l.origin??"value");if(l.origin==="string")return`${d?.longLabel??"ארוך"} מדי: ${m} צריכה להכיל ${l.maximum.toString()} ${d?.unit??""} ${l.inclusive?"או פחות":"לכל היותר"}`.trim();if(l.origin==="number"){let v=l.inclusive?`קטן או שווה ל-${l.maximum}`:`קטן מ-${l.maximum}`;return`גדול מדי: ${m} צריך להיות ${v}`}if(l.origin==="array"||l.origin==="set"){let v=l.origin==="set"?"צריכה":"צריך",g=l.inclusive?`${l.maximum} ${d?.unit??""} או פחות`:`פחות מ-${l.maximum} ${d?.unit??""}`;return`גדול מדי: ${m} ${v} להכיל ${g}`.trim()}let p=l.inclusive?"<=":"<",f=i(l.origin??"value");if(d?.unit)return`${d.longLabel} מדי: ${m} ${f} ${p}${l.maximum.toString()} ${d.unit}`;return`${d?.longLabel??"גדול"} מדי: ${m} ${f} ${p}${l.maximum.toString()}`}case"too_small":{let d=a(l.origin),m=r(l.origin??"value");if(l.origin==="string")return`${d?.shortLabel??"קצר"} מדי: ${m} צריכה להכיל ${l.minimum.toString()} ${d?.unit??""} ${l.inclusive?"או יותר":"לפחות"}`.trim();if(l.origin==="number"){let v=l.inclusive?`גדול או שווה ל-${l.minimum}`:`גדול מ-${l.minimum}`;return`קטן מדי: ${m} צריך להיות ${v}`}if(l.origin==="array"||l.origin==="set"){let v=l.origin==="set"?"צריכה":"צריך";if(l.minimum===1&&l.inclusive){let b=l.origin==="set"?"לפחות פריט אחד":"לפחות פריט אחד";return`קטן מדי: ${m} ${v} להכיל ${b}`}let g=l.inclusive?`${l.minimum} ${d?.unit??""} או יותר`:`יותר מ-${l.minimum} ${d?.unit??""}`;return`קטן מדי: ${m} ${v} להכיל ${g}`.trim()}let p=l.inclusive?">=":">",f=i(l.origin??"value");if(d?.unit)return`${d.shortLabel} מדי: ${m} ${f} ${p}${l.minimum.toString()} ${d.unit}`;return`${d?.shortLabel??"קטן"} מדי: ${m} ${f} ${p}${l.minimum.toString()}`}case"invalid_format":{let d=l;if(d.format==="starts_with")return`המחרוזת חייבת להתחיל ב "${d.prefix}"`;if(d.format==="ends_with")return`המחרוזת חייבת להסתיים ב "${d.suffix}"`;if(d.format==="includes")return`המחרוזת חייבת לכלול "${d.includes}"`;if(d.format==="regex")return`המחרוזת חייבת להתאים לתבנית ${d.pattern}`;let m=s[d.format],p=m?.label??d.format,v=(m?.gender??"m")==="f"?"תקינה":"תקין";return`${p} לא ${v}`}case"not_multiple_of":return`מספר לא תקין: חייב להיות מכפלה של ${l.divisor}`;case"unrecognized_keys":return`מפתח${l.keys.length>1?"ות":""} לא מזוה${l.keys.length>1?"ים":"ה"}: ${z(l.keys,", ")}`;case"invalid_key":return"שדה לא תקין באובייקט";case"invalid_union":return"קלט לא תקין";case"invalid_element":return`ערך לא תקין ב${r(l.origin??"array")}`;default:return"קלט לא תקין"}}};function xf(){return{localeError:rI()}}var nI=()=>{let e={string:{unit:"znakova",verb:"imati"},file:{unit:"bajtova",verb:"imati"},array:{unit:"stavki",verb:"imati"},set:{unit:"stavki",verb:"imati"}};function t(r){return e[r]??null}let n={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(r)=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=I(r.input),s=o[a]??a;if(/^[A-Z]/.test(r.expected))return`Neispravan unos: očekuje se instanceof ${r.expected}, a primljeno je ${s}`;return`Neispravan unos: očekuje se ${i}, a primljeno je ${s}`}case"invalid_value":if(r.values.length===1)return`Neispravna vrijednost: očekivano ${k(r.values[0])}`;return`Neispravna opcija: očekivano jedno od ${z(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin),s=o[r.origin]??r.origin;if(a)return`Preveliko: očekivano da ${s??"vrijednost"} ima ${i}${r.maximum.toString()} ${a.unit??"elemenata"}`;return`Preveliko: očekivano da ${s??"vrijednost"} bude ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin),s=o[r.origin]??r.origin;if(a)return`Premalo: očekivano da ${s} ima ${i}${r.minimum.toString()} ${a.unit}`;return`Premalo: očekivano da ${s} bude ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;if(i.format==="starts_with")return`Neispravan tekst: mora započinjati s "${i.prefix}"`;if(i.format==="ends_with")return`Neispravan tekst: mora završavati s "${i.suffix}"`;if(i.format==="includes")return`Neispravan tekst: mora sadržavati "${i.includes}"`;if(i.format==="regex")return`Neispravan tekst: mora odgovarati uzorku ${i.pattern}`;return`Neispravna ${n[i.format]??r.format}`}case"not_multiple_of":return`Neispravan broj: mora biti višekratnik od ${r.divisor}`;case"unrecognized_keys":return`Neprepoznat${r.keys.length>1?"i ključevi":" ključ"}: ${z(r.keys,", ")}`;case"invalid_key":return`Neispravan ključ u ${o[r.origin]??r.origin}`;case"invalid_union":return"Neispravan unos";case"invalid_element":return`Neispravna vrijednost u ${o[r.origin]??r.origin}`;default:return"Neispravan unos"}}};function kf(){return{localeError:nI()}}var oI=()=>{let e={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}};function t(r){return e[r]??null}let n={regex:"bemenet",email:"email cím",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őbélyeg",date:"ISO dátum",time:"ISO idő",duration:"ISO időintervallum",ipv4:"IPv4 cím",ipv6:"IPv6 cím",cidrv4:"IPv4 tartomány",cidrv6:"IPv6 tartomány",base64:"base64-kódolt string",base64url:"base64url-kódolt string",json_string:"JSON string",e164:"E.164 szám",jwt:"JWT",template_literal:"bemenet"},o={nan:"NaN",number:"szám",array:"tömb"};return(r)=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=I(r.input),s=o[a]??a;if(/^[A-Z]/.test(r.expected))return`Érvénytelen bemenet: a várt érték instanceof ${r.expected}, a kapott érték ${s}`;return`Érvénytelen bemenet: a várt érték ${i}, a kapott érték ${s}`}case"invalid_value":if(r.values.length===1)return`Érvénytelen bemenet: a várt érték ${k(r.values[0])}`;return`Érvénytelen opció: valamelyik érték várt ${z(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);if(a)return`Túl nagy: ${r.origin??"érték"} mérete túl nagy ${i}${r.maximum.toString()} ${a.unit??"elem"}`;return`Túl nagy: a bemeneti érték ${r.origin??"érték"} túl nagy: ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);if(a)return`Túl kicsi: a bemeneti érték ${r.origin} mérete túl kicsi ${i}${r.minimum.toString()} ${a.unit}`;return`Túl kicsi: a bemeneti érték ${r.origin} túl kicsi ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;if(i.format==="starts_with")return`Érvénytelen string: "${i.prefix}" értékkel kell kezdődnie`;if(i.format==="ends_with")return`Érvénytelen string: "${i.suffix}" értékkel kell végződnie`;if(i.format==="includes")return`Érvénytelen string: "${i.includes}" értéket kell tartalmaznia`;if(i.format==="regex")return`Érvénytelen string: ${i.pattern} mintának kell megfelelnie`;return`Érvénytelen ${n[i.format]??r.format}`}case"not_multiple_of":return`Érvénytelen szám: ${r.divisor} többszörösének kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${r.keys.length>1?"s":""}: ${z(r.keys,", ")}`;case"invalid_key":return`Érvénytelen kulcs ${r.origin}`;case"invalid_union":return"Érvénytelen bemenet";case"invalid_element":return`Érvénytelen érték: ${r.origin}`;default:return"Érvénytelen bemenet"}}};function If(){return{localeError:oI()}}function Ty(e,t,n){return Math.abs(e)===1?t:n}function Wn(e){if(!e)return"";let t=["ա","ե","ը","ի","ո","ու","օ"],n=e[e.length-1];return e+(t.includes(n)?"ն":"ը")}var iI=()=>{let e={string:{unit:{one:"նշան",many:"նշաններ"},verb:"ունենալ"},file:{unit:{one:"բայթ",many:"բայթեր"},verb:"ունենալ"},array:{unit:{one:"տարր",many:"տարրեր"},verb:"ունենալ"},set:{unit:{one:"տարր",many:"տարրեր"},verb:"ունենալ"}};function t(r){return e[r]??null}let n={regex:"մուտք",email:"էլ. հասցե",url:"URL",emoji:"էմոջի",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO ամսաթիվ և ժամ",date:"ISO ամսաթիվ",time:"ISO ժամ",duration:"ISO տևողություն",ipv4:"IPv4 հասցե",ipv6:"IPv6 հասցե",cidrv4:"IPv4 միջակայք",cidrv6:"IPv6 միջակայք",base64:"base64 ձևաչափով տող",base64url:"base64url ձևաչափով տող",json_string:"JSON տող",e164:"E.164 համար",jwt:"JWT",template_literal:"մուտք"},o={nan:"NaN",number:"թիվ",array:"զանգված"};return(r)=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=I(r.input),s=o[a]??a;if(/^[A-Z]/.test(r.expected))return`Սխալ մուտքագրում․ սպասվում էր instanceof ${r.expected}, ստացվել է ${s}`;return`Սխալ մուտքագրում․ սպասվում էր ${i}, ստացվել է ${s}`}case"invalid_value":if(r.values.length===1)return`Սխալ մուտքագրում․ սպասվում էր ${k(r.values[1])}`;return`Սխալ տարբերակ․ սպասվում էր հետևյալներից մեկը՝ ${z(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);if(a){let s=Number(r.maximum),c=Ty(s,a.unit.one,a.unit.many);return`Չափազանց մեծ արժեք․ սպասվում է, որ ${Wn(r.origin??"արժեք")} կունենա ${i}${r.maximum.toString()} ${c}`}return`Չափազանց մեծ արժեք․ սպասվում է, որ ${Wn(r.origin??"արժեք")} լինի ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);if(a){let s=Number(r.minimum),c=Ty(s,a.unit.one,a.unit.many);return`Չափազանց փոքր արժեք․ սպասվում է, որ ${Wn(r.origin)} կունենա ${i}${r.minimum.toString()} ${c}`}return`Չափազանց փոքր արժեք․ սպասվում է, որ ${Wn(r.origin)} լինի ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;if(i.format==="starts_with")return`Սխալ տող․ պետք է սկսվի "${i.prefix}"-ով`;if(i.format==="ends_with")return`Սխալ տող․ պետք է ավարտվի "${i.suffix}"-ով`;if(i.format==="includes")return`Սխալ տող․ պետք է պարունակի "${i.includes}"`;if(i.format==="regex")return`Սխալ տող․ պետք է համապատասխանի ${i.pattern} ձևաչափին`;return`Սխալ ${n[i.format]??r.format}`}case"not_multiple_of":return`Սխալ թիվ․ պետք է բազմապատիկ լինի ${r.divisor}-ի`;case"unrecognized_keys":return`Չճանաչված բանալի${r.keys.length>1?"ներ":""}. ${z(r.keys,", ")}`;case"invalid_key":return`Սխալ բանալի ${Wn(r.origin)}-ում`;case"invalid_union":return"Սխալ մուտքագրում";case"invalid_element":return`Սխալ արժեք ${Wn(r.origin)}-ում`;default:return"Սխալ մուտքագրում"}}};function Pf(){return{localeError:iI()}}var aI=()=>{let e={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}};function t(r){return e[r]??null}let n={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(r)=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=I(r.input),s=o[a]??a;if(/^[A-Z]/.test(r.expected))return`Input tidak valid: diharapkan instanceof ${r.expected}, diterima ${s}`;return`Input tidak valid: diharapkan ${i}, diterima ${s}`}case"invalid_value":if(r.values.length===1)return`Input tidak valid: diharapkan ${k(r.values[0])}`;return`Pilihan tidak valid: diharapkan salah satu dari ${z(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);if(a)return`Terlalu besar: diharapkan ${r.origin??"value"} memiliki ${i}${r.maximum.toString()} ${a.unit??"elemen"}`;return`Terlalu besar: diharapkan ${r.origin??"value"} menjadi ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);if(a)return`Terlalu kecil: diharapkan ${r.origin} memiliki ${i}${r.minimum.toString()} ${a.unit}`;return`Terlalu kecil: diharapkan ${r.origin} menjadi ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;if(i.format==="starts_with")return`String tidak valid: harus dimulai dengan "${i.prefix}"`;if(i.format==="ends_with")return`String tidak valid: harus berakhir dengan "${i.suffix}"`;if(i.format==="includes")return`String tidak valid: harus menyertakan "${i.includes}"`;if(i.format==="regex")return`String tidak valid: harus sesuai pola ${i.pattern}`;return`${n[i.format]??r.format} tidak valid`}case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${r.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${r.keys.length>1?"s":""}: ${z(r.keys,", ")}`;case"invalid_key":return`Kunci tidak valid di ${r.origin}`;case"invalid_union":return"Input tidak valid";case"invalid_element":return`Nilai tidak valid di ${r.origin}`;default:return"Input tidak valid"}}};function Ef(){return{localeError:aI()}}var sI=()=>{let e={string:{unit:"stafi",verb:"að hafa"},file:{unit:"bæti",verb:"að hafa"},array:{unit:"hluti",verb:"að hafa"},set:{unit:"hluti",verb:"að hafa"}};function t(r){return e[r]??null}let n={regex:"gildi",email:"netfang",url:"vefslóð",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ími",date:"ISO dagsetning",time:"ISO tími",duration:"ISO tímalengd",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ölugildi",jwt:"JWT",template_literal:"gildi"},o={nan:"NaN",number:"númer",array:"fylki"};return(r)=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=I(r.input),s=o[a]??a;if(/^[A-Z]/.test(r.expected))return`Rangt gildi: Þú slóst inn ${s} þar sem á að vera instanceof ${r.expected}`;return`Rangt gildi: Þú slóst inn ${s} þar sem á að vera ${i}`}case"invalid_value":if(r.values.length===1)return`Rangt gildi: gert ráð fyrir ${k(r.values[0])}`;return`Ógilt val: má vera eitt af eftirfarandi ${z(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);if(a)return`Of stórt: gert er ráð fyrir að ${r.origin??"gildi"} hafi ${i}${r.maximum.toString()} ${a.unit??"hluti"}`;return`Of stórt: gert er ráð fyrir að ${r.origin??"gildi"} sé ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);if(a)return`Of lítið: gert er ráð fyrir að ${r.origin} hafi ${i}${r.minimum.toString()} ${a.unit}`;return`Of lítið: gert er ráð fyrir að ${r.origin} sé ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;if(i.format==="starts_with")return`Ógildur strengur: verður að byrja á "${i.prefix}"`;if(i.format==="ends_with")return`Ógildur strengur: verður að enda á "${i.suffix}"`;if(i.format==="includes")return`Ógildur strengur: verður að innihalda "${i.includes}"`;if(i.format==="regex")return`Ógildur strengur: verður að fylgja mynstri ${i.pattern}`;return`Rangt ${n[i.format]??r.format}`}case"not_multiple_of":return`Röng tala: verður að vera margfeldi af ${r.divisor}`;case"unrecognized_keys":return`Óþekkt ${r.keys.length>1?"ir lyklar":"ur lykill"}: ${z(r.keys,", ")}`;case"invalid_key":return`Rangur lykill í ${r.origin}`;case"invalid_union":return"Rangt gildi";case"invalid_element":return`Rangt gildi í ${r.origin}`;default:return"Rangt gildi"}}};function Tf(){return{localeError:sI()}}var cI=()=>{let e={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}};function t(r){return e[r]??null}let n={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(r)=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=I(r.input),s=o[a]??a;if(/^[A-Z]/.test(r.expected))return`Input non valido: atteso instanceof ${r.expected}, ricevuto ${s}`;return`Input non valido: atteso ${i}, ricevuto ${s}`}case"invalid_value":if(r.values.length===1)return`Input non valido: atteso ${k(r.values[0])}`;return`Opzione non valida: atteso uno tra ${z(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);if(a)return`Troppo grande: ${r.origin??"valore"} deve avere ${i}${r.maximum.toString()} ${a.unit??"elementi"}`;return`Troppo grande: ${r.origin??"valore"} deve essere ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);if(a)return`Troppo piccolo: ${r.origin} deve avere ${i}${r.minimum.toString()} ${a.unit}`;return`Troppo piccolo: ${r.origin} deve essere ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;if(i.format==="starts_with")return`Stringa non valida: deve iniziare con "${i.prefix}"`;if(i.format==="ends_with")return`Stringa non valida: deve terminare con "${i.suffix}"`;if(i.format==="includes")return`Stringa non valida: deve includere "${i.includes}"`;if(i.format==="regex")return`Stringa non valida: deve corrispondere al pattern ${i.pattern}`;return`Input non valido: ${n[i.format]??r.format}`}case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${r.divisor}`;case"unrecognized_keys":return`Chiav${r.keys.length>1?"i":"e"} non riconosciut${r.keys.length>1?"e":"a"}: ${z(r.keys,", ")}`;case"invalid_key":return`Chiave non valida in ${r.origin}`;case"invalid_union":return"Input non valido";case"invalid_element":return`Valore non valido in ${r.origin}`;default:return"Input non valido"}}};function jf(){return{localeError:cI()}}var lI=()=>{let e={string:{unit:"文字",verb:"である"},file:{unit:"バイト",verb:"である"},array:{unit:"要素",verb:"である"},set:{unit:"要素",verb:"である"}};function t(r){return e[r]??null}let n={regex:"入力値",email:"メールアドレス",url:"URL",emoji:"絵文字",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO日時",date:"ISO日付",time:"ISO時刻",duration:"ISO期間",ipv4:"IPv4アドレス",ipv6:"IPv6アドレス",cidrv4:"IPv4範囲",cidrv6:"IPv6範囲",base64:"base64エンコード文字列",base64url:"base64urlエンコード文字列",json_string:"JSON文字列",e164:"E.164番号",jwt:"JWT",template_literal:"入力値"},o={nan:"NaN",number:"数値",array:"配列"};return(r)=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=I(r.input),s=o[a]??a;if(/^[A-Z]/.test(r.expected))return`無効な入力: instanceof ${r.expected}が期待されましたが、${s}が入力されました`;return`無効な入力: ${i}が期待されましたが、${s}が入力されました`}case"invalid_value":if(r.values.length===1)return`無効な入力: ${k(r.values[0])}が期待されました`;return`無効な選択: ${z(r.values,"、")}のいずれかである必要があります`;case"too_big":{let i=r.inclusive?"以下である":"より小さい",a=t(r.origin);if(a)return`大きすぎる値: ${r.origin??"値"}は${r.maximum.toString()}${a.unit??"要素"}${i}必要があります`;return`大きすぎる値: ${r.origin??"値"}は${r.maximum.toString()}${i}必要があります`}case"too_small":{let i=r.inclusive?"以上である":"より大きい",a=t(r.origin);if(a)return`小さすぎる値: ${r.origin}は${r.minimum.toString()}${a.unit}${i}必要があります`;return`小さすぎる値: ${r.origin}は${r.minimum.toString()}${i}必要があります`}case"invalid_format":{let i=r;if(i.format==="starts_with")return`無効な文字列: "${i.prefix}"で始まる必要があります`;if(i.format==="ends_with")return`無効な文字列: "${i.suffix}"で終わる必要があります`;if(i.format==="includes")return`無効な文字列: "${i.includes}"を含む必要があります`;if(i.format==="regex")return`無効な文字列: パターン${i.pattern}に一致する必要があります`;return`無効な${n[i.format]??r.format}`}case"not_multiple_of":return`無効な数値: ${r.divisor}の倍数である必要があります`;case"unrecognized_keys":return`認識されていないキー${r.keys.length>1?"群":""}: ${z(r.keys,"、")}`;case"invalid_key":return`${r.origin}内の無効なキー`;case"invalid_union":return"無効な入力";case"invalid_element":return`${r.origin}内の無効な値`;default:return"無効な入力"}}};function Of(){return{localeError:lI()}}var uI=()=>{let e={string:{unit:"სიმბოლო",verb:"უნდა შეიცავდეს"},file:{unit:"ბაიტი",verb:"უნდა შეიცავდეს"},array:{unit:"ელემენტი",verb:"უნდა შეიცავდეს"},set:{unit:"ელემენტი",verb:"უნდა შეიცავდეს"}};function t(r){return e[r]??null}let n={regex:"შეყვანა",email:"ელ-ფოსტის მისამართი",url:"URL",emoji:"ემოჯი",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"თარიღი-დრო",date:"თარიღი",time:"დრო",duration:"ხანგრძლივობა",ipv4:"IPv4 მისამართი",ipv6:"IPv6 მისამართი",cidrv4:"IPv4 დიაპაზონი",cidrv6:"IPv6 დიაპაზონი",base64:"base64-კოდირებული ველი",base64url:"base64url-კოდირებული ველი",json_string:"JSON ველი",e164:"E.164 ნომერი",jwt:"JWT",template_literal:"შეყვანა"},o={nan:"NaN",number:"რიცხვი",string:"ველი",boolean:"ბულეანი",function:"ფუნქცია",array:"მასივი"};return(r)=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=I(r.input),s=o[a]??a;if(/^[A-Z]/.test(r.expected))return`არასწორი შეყვანა: მოსალოდნელი instanceof ${r.expected}, მიღებული ${s}`;return`არასწორი შეყვანა: მოსალოდნელი ${i}, მიღებული ${s}`}case"invalid_value":if(r.values.length===1)return`არასწორი შეყვანა: მოსალოდნელი ${k(r.values[0])}`;return`არასწორი ვარიანტი: მოსალოდნელია ერთ-ერთი ${z(r.values,"|")}-დან`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);if(a)return`ზედმეტად დიდი: მოსალოდნელი ${r.origin??"მნიშვნელობა"} ${a.verb} ${i}${r.maximum.toString()} ${a.unit}`;return`ზედმეტად დიდი: მოსალოდნელი ${r.origin??"მნიშვნელობა"} იყოს ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);if(a)return`ზედმეტად პატარა: მოსალოდნელი ${r.origin} ${a.verb} ${i}${r.minimum.toString()} ${a.unit}`;return`ზედმეტად პატარა: მოსალოდნელი ${r.origin} იყოს ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;if(i.format==="starts_with")return`არასწორი ველი: უნდა იწყებოდეს "${i.prefix}"-ით`;if(i.format==="ends_with")return`არასწორი ველი: უნდა მთავრდებოდეს "${i.suffix}"-ით`;if(i.format==="includes")return`არასწორი ველი: უნდა შეიცავდეს "${i.includes}"-ს`;if(i.format==="regex")return`არასწორი ველი: უნდა შეესაბამებოდეს შაბლონს ${i.pattern}`;return`არასწორი ${n[i.format]??r.format}`}case"not_multiple_of":return`არასწორი რიცხვი: უნდა იყოს ${r.divisor}-ის ჯერადი`;case"unrecognized_keys":return`უცნობი გასაღებ${r.keys.length>1?"ები":"ი"}: ${z(r.keys,", ")}`;case"invalid_key":return`არასწორი გასაღები ${r.origin}-ში`;case"invalid_union":return"არასწორი შეყვანა";case"invalid_element":return`არასწორი მნიშვნელობა ${r.origin}-ში`;default:return"არასწორი შეყვანა"}}};function Nf(){return{localeError:uI()}}var dI=()=>{let e={string:{unit:"តួអក្សរ",verb:"គួរមាន"},file:{unit:"បៃ",verb:"គួរមាន"},array:{unit:"ធាតុ",verb:"គួរមាន"},set:{unit:"ធាតុ",verb:"គួរមាន"}};function t(r){return e[r]??null}let n={regex:"ទិន្នន័យបញ្ចូល",email:"អាសយដ្ឋានអ៊ីមែល",url:"URL",emoji:"សញ្ញាអារម្មណ៍",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"កាលបរិច្ឆេទ និងម៉ោង ISO",date:"កាលបរិច្ឆេទ ISO",time:"ម៉ោង ISO",duration:"រយៈពេល ISO",ipv4:"អាសយដ្ឋាន IPv4",ipv6:"អាសយដ្ឋាន IPv6",cidrv4:"ដែនអាសយដ្ឋាន IPv4",cidrv6:"ដែនអាសយដ្ឋាន IPv6",base64:"ខ្សែអក្សរអ៊ិកូដ base64",base64url:"ខ្សែអក្សរអ៊ិកូដ base64url",json_string:"ខ្សែអក្សរ JSON",e164:"លេខ E.164",jwt:"JWT",template_literal:"ទិន្នន័យបញ្ចូល"},o={nan:"NaN",number:"លេខ",array:"អារេ (Array)",null:"គ្មានតម្លៃ (null)"};return(r)=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=I(r.input),s=o[a]??a;if(/^[A-Z]/.test(r.expected))return`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ instanceof ${r.expected} ប៉ុន្តែទទួលបាន ${s}`;return`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${i} ប៉ុន្តែទទួលបាន ${s}`}case"invalid_value":if(r.values.length===1)return`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${k(r.values[0])}`;return`ជម្រើសមិនត្រឹមត្រូវ៖ ត្រូវជាមួយក្នុងចំណោម ${z(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);if(a)return`ធំពេក៖ ត្រូវការ ${r.origin??"តម្លៃ"} ${i} ${r.maximum.toString()} ${a.unit??"ធាតុ"}`;return`ធំពេក៖ ត្រូវការ ${r.origin??"តម្លៃ"} ${i} ${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);if(a)return`តូចពេក៖ ត្រូវការ ${r.origin} ${i} ${r.minimum.toString()} ${a.unit}`;return`តូចពេក៖ ត្រូវការ ${r.origin} ${i} ${r.minimum.toString()}`}case"invalid_format":{let i=r;if(i.format==="starts_with")return`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវចាប់ផ្តើមដោយ "${i.prefix}"`;if(i.format==="ends_with")return`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវបញ្ចប់ដោយ "${i.suffix}"`;if(i.format==="includes")return`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវមាន "${i.includes}"`;if(i.format==="regex")return`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវតែផ្គូផ្គងនឹងទម្រង់ដែលបានកំណត់ ${i.pattern}`;return`មិនត្រឹមត្រូវ៖ ${n[i.format]??r.format}`}case"not_multiple_of":return`លេខមិនត្រឹមត្រូវ៖ ត្រូវតែជាពហុគុណនៃ ${r.divisor}`;case"unrecognized_keys":return`រកឃើញសោមិនស្គាល់៖ ${z(r.keys,", ")}`;case"invalid_key":return`សោមិនត្រឹមត្រូវនៅក្នុង ${r.origin}`;case"invalid_union":return"ទិន្នន័យមិនត្រឹមត្រូវ";case"invalid_element":return`ទិន្នន័យមិនត្រឹមត្រូវនៅក្នុង ${r.origin}`;default:return"ទិន្នន័យមិនត្រឹមត្រូវ"}}};function Di(){return{localeError:dI()}}function Cf(){return Di()}var mI=()=>{let e={string:{unit:"문자",verb:"to have"},file:{unit:"바이트",verb:"to have"},array:{unit:"개",verb:"to have"},set:{unit:"개",verb:"to have"}};function t(r){return e[r]??null}let n={regex:"입력",email:"이메일 주소",url:"URL",emoji:"이모지",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO 날짜시간",date:"ISO 날짜",time:"ISO 시간",duration:"ISO 기간",ipv4:"IPv4 주소",ipv6:"IPv6 주소",cidrv4:"IPv4 범위",cidrv6:"IPv6 범위",base64:"base64 인코딩 문자열",base64url:"base64url 인코딩 문자열",json_string:"JSON 문자열",e164:"E.164 번호",jwt:"JWT",template_literal:"입력"},o={nan:"NaN"};return(r)=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=I(r.input),s=o[a]??a;if(/^[A-Z]/.test(r.expected))return`잘못된 입력: 예상 타입은 instanceof ${r.expected}, 받은 타입은 ${s}입니다`;return`잘못된 입력: 예상 타입은 ${i}, 받은 타입은 ${s}입니다`}case"invalid_value":if(r.values.length===1)return`잘못된 입력: 값은 ${k(r.values[0])} 이어야 합니다`;return`잘못된 옵션: ${z(r.values,"또는 ")} 중 하나여야 합니다`;case"too_big":{let i=r.inclusive?"이하":"미만",a=i==="미만"?"이어야 합니다":"여야 합니다",s=t(r.origin),c=s?.unit??"요소";if(s)return`${r.origin??"값"}이 너무 큽니다: ${r.maximum.toString()}${c} ${i}${a}`;return`${r.origin??"값"}이 너무 큽니다: ${r.maximum.toString()} ${i}${a}`}case"too_small":{let i=r.inclusive?"이상":"초과",a=i==="이상"?"이어야 합니다":"여야 합니다",s=t(r.origin),c=s?.unit??"요소";if(s)return`${r.origin??"값"}이 너무 작습니다: ${r.minimum.toString()}${c} ${i}${a}`;return`${r.origin??"값"}이 너무 작습니다: ${r.minimum.toString()} ${i}${a}`}case"invalid_format":{let i=r;if(i.format==="starts_with")return`잘못된 문자열: "${i.prefix}"(으)로 시작해야 합니다`;if(i.format==="ends_with")return`잘못된 문자열: "${i.suffix}"(으)로 끝나야 합니다`;if(i.format==="includes")return`잘못된 문자열: "${i.includes}"을(를) 포함해야 합니다`;if(i.format==="regex")return`잘못된 문자열: 정규식 ${i.pattern} 패턴과 일치해야 합니다`;return`잘못된 ${n[i.format]??r.format}`}case"not_multiple_of":return`잘못된 숫자: ${r.divisor}의 배수여야 합니다`;case"unrecognized_keys":return`인식할 수 없는 키: ${z(r.keys,", ")}`;case"invalid_key":return`잘못된 키: ${r.origin}`;case"invalid_union":return"잘못된 입력";case"invalid_element":return`잘못된 값: ${r.origin}`;default:return"잘못된 입력"}}};function qf(){return{localeError:mI()}}var Li=(e)=>e.charAt(0).toUpperCase()+e.slice(1);function jy(e){let t=Math.abs(e),n=t%10,o=t%100;if(o>=11&&o<=19||n===0)return"many";if(n===1)return"one";return"few"}var pI=()=>{let e={string:{unit:{one:"simbolis",few:"simboliai",many:"simbolių"},verb:{smaller:{inclusive:"turi būti ne ilgesnė kaip",notInclusive:"turi būti trumpesnė kaip"},bigger:{inclusive:"turi būti ne trumpesnė kaip",notInclusive:"turi būti ilgesnė kaip"}}},file:{unit:{one:"baitas",few:"baitai",many:"baitų"},verb:{smaller:{inclusive:"turi būti ne didesnis kaip",notInclusive:"turi būti mažesnis kaip"},bigger:{inclusive:"turi būti ne mažesnis kaip",notInclusive:"turi būti didesnis kaip"}}},array:{unit:{one:"elementą",few:"elementus",many:"elementų"},verb:{smaller:{inclusive:"turi turėti ne daugiau kaip",notInclusive:"turi turėti mažiau kaip"},bigger:{inclusive:"turi turėti ne mažiau kaip",notInclusive:"turi turėti daugiau kaip"}}},set:{unit:{one:"elementą",few:"elementus",many:"elementų"},verb:{smaller:{inclusive:"turi turėti ne daugiau kaip",notInclusive:"turi turėti mažiau kaip"},bigger:{inclusive:"turi turėti ne mažiau kaip",notInclusive:"turi turėti daugiau kaip"}}}};function t(r,i,a,s){let c=e[r]??null;if(c===null)return c;return{unit:c.unit[i],verb:c.verb[s][a?"inclusive":"notInclusive"]}}let n={regex:"įvestis",email:"el. pašto 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ė",ipv4:"IPv4 adresas",ipv6:"IPv6 adresas",cidrv4:"IPv4 tinklo prefiksas (CIDR)",cidrv6:"IPv6 tinklo prefiksas (CIDR)",base64:"base64 užkoduota eilutė",base64url:"base64url užkoduota eilutė",json_string:"JSON eilutė",e164:"E.164 numeris",jwt:"JWT",template_literal:"įvestis"},o={nan:"NaN",number:"skaičius",bigint:"sveikasis skaičius",string:"eilutė",boolean:"loginė reikšmė",undefined:"neapibrėžta reikšmė",function:"funkcija",symbol:"simbolis",array:"masyvas",object:"objektas",null:"nulinė reikšmė"};return(r)=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=I(r.input),s=o[a]??a;if(/^[A-Z]/.test(r.expected))return`Gautas tipas ${s}, o tikėtasi - instanceof ${r.expected}`;return`Gautas tipas ${s}, o tikėtasi - ${i}`}case"invalid_value":if(r.values.length===1)return`Privalo būti ${k(r.values[0])}`;return`Privalo būti vienas iš ${z(r.values,"|")} pasirinkimų`;case"too_big":{let i=o[r.origin]??r.origin,a=t(r.origin,jy(Number(r.maximum)),r.inclusive??!1,"smaller");if(a?.verb)return`${Li(i??r.origin??"reikšmė")} ${a.verb} ${r.maximum.toString()} ${a.unit??"elementų"}`;let s=r.inclusive?"ne didesnis kaip":"mažesnis kaip";return`${Li(i??r.origin??"reikšmė")} turi būti ${s} ${r.maximum.toString()} ${a?.unit}`}case"too_small":{let i=o[r.origin]??r.origin,a=t(r.origin,jy(Number(r.minimum)),r.inclusive??!1,"bigger");if(a?.verb)return`${Li(i??r.origin??"reikšmė")} ${a.verb} ${r.minimum.toString()} ${a.unit??"elementų"}`;let s=r.inclusive?"ne mažesnis kaip":"didesnis kaip";return`${Li(i??r.origin??"reikšmė")} turi būti ${s} ${r.minimum.toString()} ${a?.unit}`}case"invalid_format":{let i=r;if(i.format==="starts_with")return`Eilutė privalo prasidėti "${i.prefix}"`;if(i.format==="ends_with")return`Eilutė privalo pasibaigti "${i.suffix}"`;if(i.format==="includes")return`Eilutė privalo įtraukti "${i.includes}"`;if(i.format==="regex")return`Eilutė privalo atitikti ${i.pattern}`;return`Neteisingas ${n[i.format]??r.format}`}case"not_multiple_of":return`Skaičius privalo būti ${r.divisor} kartotinis.`;case"unrecognized_keys":return`Neatpažint${r.keys.length>1?"i":"as"} rakt${r.keys.length>1?"ai":"as"}: ${z(r.keys,", ")}`;case"invalid_key":return"Rastas klaidingas raktas";case"invalid_union":return"Klaidinga įvestis";case"invalid_element":{let i=o[r.origin]??r.origin;return`${Li(i??r.origin??"reikšmė")} turi klaidingą įvestį`}default:return"Klaidinga įvestis"}}};function Af(){return{localeError:pI()}}var fI=()=>{let e={string:{unit:"знаци",verb:"да имаат"},file:{unit:"бајти",verb:"да имаат"},array:{unit:"ставки",verb:"да имаат"},set:{unit:"ставки",verb:"да имаат"}};function t(r){return e[r]??null}let n={regex:"внес",email:"адреса на е-пошта",url:"URL",emoji:"емоџи",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO датум и време",date:"ISO датум",time:"ISO време",duration:"ISO времетраење",ipv4:"IPv4 адреса",ipv6:"IPv6 адреса",cidrv4:"IPv4 опсег",cidrv6:"IPv6 опсег",base64:"base64-енкодирана низа",base64url:"base64url-енкодирана низа",json_string:"JSON низа",e164:"E.164 број",jwt:"JWT",template_literal:"внес"},o={nan:"NaN",number:"број",array:"низа"};return(r)=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=I(r.input),s=o[a]??a;if(/^[A-Z]/.test(r.expected))return`Грешен внес: се очекува instanceof ${r.expected}, примено ${s}`;return`Грешен внес: се очекува ${i}, примено ${s}`}case"invalid_value":if(r.values.length===1)return`Invalid input: expected ${k(r.values[0])}`;return`Грешана опција: се очекува една ${z(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);if(a)return`Премногу голем: се очекува ${r.origin??"вредноста"} да има ${i}${r.maximum.toString()} ${a.unit??"елементи"}`;return`Премногу голем: се очекува ${r.origin??"вредноста"} да биде ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);if(a)return`Премногу мал: се очекува ${r.origin} да има ${i}${r.minimum.toString()} ${a.unit}`;return`Премногу мал: се очекува ${r.origin} да биде ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;if(i.format==="starts_with")return`Неважечка низа: мора да започнува со "${i.prefix}"`;if(i.format==="ends_with")return`Неважечка низа: мора да завршува со "${i.suffix}"`;if(i.format==="includes")return`Неважечка низа: мора да вклучува "${i.includes}"`;if(i.format==="regex")return`Неважечка низа: мора да одгоара на патернот ${i.pattern}`;return`Invalid ${n[i.format]??r.format}`}case"not_multiple_of":return`Грешен број: мора да биде делив со ${r.divisor}`;case"unrecognized_keys":return`${r.keys.length>1?"Непрепознаени клучеви":"Непрепознаен клуч"}: ${z(r.keys,", ")}`;case"invalid_key":return`Грешен клуч во ${r.origin}`;case"invalid_union":return"Грешен внес";case"invalid_element":return`Грешна вредност во ${r.origin}`;default:return"Грешен внес"}}};function Mf(){return{localeError:fI()}}var hI=()=>{let e={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}};function t(r){return e[r]??null}let n={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(r)=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=I(r.input),s=o[a]??a;if(/^[A-Z]/.test(r.expected))return`Input tidak sah: dijangka instanceof ${r.expected}, diterima ${s}`;return`Input tidak sah: dijangka ${i}, diterima ${s}`}case"invalid_value":if(r.values.length===1)return`Input tidak sah: dijangka ${k(r.values[0])}`;return`Pilihan tidak sah: dijangka salah satu daripada ${z(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);if(a)return`Terlalu besar: dijangka ${r.origin??"nilai"} ${a.verb} ${i}${r.maximum.toString()} ${a.unit??"elemen"}`;return`Terlalu besar: dijangka ${r.origin??"nilai"} adalah ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);if(a)return`Terlalu kecil: dijangka ${r.origin} ${a.verb} ${i}${r.minimum.toString()} ${a.unit}`;return`Terlalu kecil: dijangka ${r.origin} adalah ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;if(i.format==="starts_with")return`String tidak sah: mesti bermula dengan "${i.prefix}"`;if(i.format==="ends_with")return`String tidak sah: mesti berakhir dengan "${i.suffix}"`;if(i.format==="includes")return`String tidak sah: mesti mengandungi "${i.includes}"`;if(i.format==="regex")return`String tidak sah: mesti sepadan dengan corak ${i.pattern}`;return`${n[i.format]??r.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${r.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${z(r.keys,", ")}`;case"invalid_key":return`Kunci tidak sah dalam ${r.origin}`;case"invalid_union":return"Input tidak sah";case"invalid_element":return`Nilai tidak sah dalam ${r.origin}`;default:return"Input tidak sah"}}};function Uf(){return{localeError:hI()}}var gI=()=>{let e={string:{unit:"tekens",verb:"heeft"},file:{unit:"bytes",verb:"heeft"},array:{unit:"elementen",verb:"heeft"},set:{unit:"elementen",verb:"heeft"}};function t(r){return e[r]??null}let n={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(r)=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=I(r.input),s=o[a]??a;if(/^[A-Z]/.test(r.expected))return`Ongeldige invoer: verwacht instanceof ${r.expected}, ontving ${s}`;return`Ongeldige invoer: verwacht ${i}, ontving ${s}`}case"invalid_value":if(r.values.length===1)return`Ongeldige invoer: verwacht ${k(r.values[0])}`;return`Ongeldige optie: verwacht één van ${z(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin),s=r.origin==="date"?"laat":r.origin==="string"?"lang":"groot";if(a)return`Te ${s}: verwacht dat ${r.origin??"waarde"} ${i}${r.maximum.toString()} ${a.unit??"elementen"} ${a.verb}`;return`Te ${s}: verwacht dat ${r.origin??"waarde"} ${i}${r.maximum.toString()} is`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin),s=r.origin==="date"?"vroeg":r.origin==="string"?"kort":"klein";if(a)return`Te ${s}: verwacht dat ${r.origin} ${i}${r.minimum.toString()} ${a.unit} ${a.verb}`;return`Te ${s}: verwacht dat ${r.origin} ${i}${r.minimum.toString()} is`}case"invalid_format":{let i=r;if(i.format==="starts_with")return`Ongeldige tekst: moet met "${i.prefix}" beginnen`;if(i.format==="ends_with")return`Ongeldige tekst: moet op "${i.suffix}" eindigen`;if(i.format==="includes")return`Ongeldige tekst: moet "${i.includes}" bevatten`;if(i.format==="regex")return`Ongeldige tekst: moet overeenkomen met patroon ${i.pattern}`;return`Ongeldig: ${n[i.format]??r.format}`}case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${r.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${r.keys.length>1?"s":""}: ${z(r.keys,", ")}`;case"invalid_key":return`Ongeldige key in ${r.origin}`;case"invalid_union":return"Ongeldige invoer";case"invalid_element":return`Ongeldige waarde in ${r.origin}`;default:return"Ongeldige invoer"}}};function Df(){return{localeError:gI()}}var vI=()=>{let e={string:{unit:"tegn",verb:"å ha"},file:{unit:"bytes",verb:"å ha"},array:{unit:"elementer",verb:"å inneholde"},set:{unit:"elementer",verb:"å inneholde"}};function t(r){return e[r]??null}let n={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åde",ipv6:"IPv6-område",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(r)=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=I(r.input),s=o[a]??a;if(/^[A-Z]/.test(r.expected))return`Ugyldig input: forventet instanceof ${r.expected}, fikk ${s}`;return`Ugyldig input: forventet ${i}, fikk ${s}`}case"invalid_value":if(r.values.length===1)return`Ugyldig verdi: forventet ${k(r.values[0])}`;return`Ugyldig valg: forventet en av ${z(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);if(a)return`For stor(t): forventet ${r.origin??"value"} til å ha ${i}${r.maximum.toString()} ${a.unit??"elementer"}`;return`For stor(t): forventet ${r.origin??"value"} til å ha ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);if(a)return`For lite(n): forventet ${r.origin} til å ha ${i}${r.minimum.toString()} ${a.unit}`;return`For lite(n): forventet ${r.origin} til å ha ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;if(i.format==="starts_with")return`Ugyldig streng: må starte med "${i.prefix}"`;if(i.format==="ends_with")return`Ugyldig streng: må ende med "${i.suffix}"`;if(i.format==="includes")return`Ugyldig streng: må inneholde "${i.includes}"`;if(i.format==="regex")return`Ugyldig streng: må matche mønsteret ${i.pattern}`;return`Ugyldig ${n[i.format]??r.format}`}case"not_multiple_of":return`Ugyldig tall: må være et multiplum av ${r.divisor}`;case"unrecognized_keys":return`${r.keys.length>1?"Ukjente nøkler":"Ukjent nøkkel"}: ${z(r.keys,", ")}`;case"invalid_key":return`Ugyldig nøkkel i ${r.origin}`;case"invalid_union":return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${r.origin}`;default:return"Ugyldig input"}}};function Lf(){return{localeError:vI()}}var _I=()=>{let e={string:{unit:"harf",verb:"olmalıdır"},file:{unit:"bayt",verb:"olmalıdır"},array:{unit:"unsur",verb:"olmalıdır"},set:{unit:"unsur",verb:"olmalıdır"}};function t(r){return e[r]??null}let n={regex:"giren",email:"epostagâh",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âmı",date:"ISO tarihi",time:"ISO zamanı",duration:"ISO müddeti",ipv4:"IPv4 nişânı",ipv6:"IPv6 nişânı",cidrv4:"IPv4 menzili",cidrv6:"IPv6 menzili",base64:"base64-şifreli metin",base64url:"base64url-şifreli metin",json_string:"JSON metin",e164:"E.164 sayısı",jwt:"JWT",template_literal:"giren"},o={nan:"NaN",number:"numara",array:"saf",null:"gayb"};return(r)=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=I(r.input),s=o[a]??a;if(/^[A-Z]/.test(r.expected))return`Fâsit giren: umulan instanceof ${r.expected}, alınan ${s}`;return`Fâsit giren: umulan ${i}, alınan ${s}`}case"invalid_value":if(r.values.length===1)return`Fâsit giren: umulan ${k(r.values[0])}`;return`Fâsit tercih: mûteberler ${z(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);if(a)return`Fazla büyük: ${r.origin??"value"}, ${i}${r.maximum.toString()} ${a.unit??"elements"} sahip olmalıydı.`;return`Fazla büyük: ${r.origin??"value"}, ${i}${r.maximum.toString()} olmalıydı.`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);if(a)return`Fazla küçük: ${r.origin}, ${i}${r.minimum.toString()} ${a.unit} sahip olmalıydı.`;return`Fazla küçük: ${r.origin}, ${i}${r.minimum.toString()} olmalıydı.`}case"invalid_format":{let i=r;if(i.format==="starts_with")return`Fâsit metin: "${i.prefix}" ile başlamalı.`;if(i.format==="ends_with")return`Fâsit metin: "${i.suffix}" ile bitmeli.`;if(i.format==="includes")return`Fâsit metin: "${i.includes}" ihtivâ etmeli.`;if(i.format==="regex")return`Fâsit metin: ${i.pattern} nakşına uymalı.`;return`Fâsit ${n[i.format]??r.format}`}case"not_multiple_of":return`Fâsit sayı: ${r.divisor} katı olmalıydı.`;case"unrecognized_keys":return`Tanınmayan anahtar ${r.keys.length>1?"s":""}: ${z(r.keys,", ")}`;case"invalid_key":return`${r.origin} için tanınmayan anahtar var.`;case"invalid_union":return"Giren tanınamadı.";case"invalid_element":return`${r.origin} için tanınmayan kıymet var.`;default:return"Kıymet tanınamadı."}}};function Zf(){return{localeError:_I()}}var SI=()=>{let e={string:{unit:"توکي",verb:"ولري"},file:{unit:"بایټس",verb:"ولري"},array:{unit:"توکي",verb:"ولري"},set:{unit:"توکي",verb:"ولري"}};function t(r){return e[r]??null}let n={regex:"ورودي",email:"بریښنالیک",url:"یو آر ال",emoji:"ایموجي",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"نیټه او وخت",date:"نېټه",time:"وخت",duration:"موده",ipv4:"د IPv4 پته",ipv6:"د IPv6 پته",cidrv4:"د IPv4 ساحه",cidrv6:"د IPv6 ساحه",base64:"base64-encoded متن",base64url:"base64url-encoded متن",json_string:"JSON متن",e164:"د E.164 شمېره",jwt:"JWT",template_literal:"ورودي"},o={nan:"NaN",number:"عدد",array:"ارې"};return(r)=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=I(r.input),s=o[a]??a;if(/^[A-Z]/.test(r.expected))return`ناسم ورودي: باید instanceof ${r.expected} وای, مګر ${s} ترلاسه شو`;return`ناسم ورودي: باید ${i} وای, مګر ${s} ترلاسه شو`}case"invalid_value":if(r.values.length===1)return`ناسم ورودي: باید ${k(r.values[0])} وای`;return`ناسم انتخاب: باید یو له ${z(r.values,"|")} څخه وای`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);if(a)return`ډیر لوی: ${r.origin??"ارزښت"} باید ${i}${r.maximum.toString()} ${a.unit??"عنصرونه"} ولري`;return`ډیر لوی: ${r.origin??"ارزښت"} باید ${i}${r.maximum.toString()} وي`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);if(a)return`ډیر کوچنی: ${r.origin} باید ${i}${r.minimum.toString()} ${a.unit} ولري`;return`ډیر کوچنی: ${r.origin} باید ${i}${r.minimum.toString()} وي`}case"invalid_format":{let i=r;if(i.format==="starts_with")return`ناسم متن: باید د "${i.prefix}" سره پیل شي`;if(i.format==="ends_with")return`ناسم متن: باید د "${i.suffix}" سره پای ته ورسيږي`;if(i.format==="includes")return`ناسم متن: باید "${i.includes}" ولري`;if(i.format==="regex")return`ناسم متن: باید د ${i.pattern} سره مطابقت ولري`;return`${n[i.format]??r.format} ناسم دی`}case"not_multiple_of":return`ناسم عدد: باید د ${r.divisor} مضرب وي`;case"unrecognized_keys":return`ناسم ${r.keys.length>1?"کلیډونه":"کلیډ"}: ${z(r.keys,", ")}`;case"invalid_key":return`ناسم کلیډ په ${r.origin} کې`;case"invalid_union":return"ناسمه ورودي";case"invalid_element":return`ناسم عنصر په ${r.origin} کې`;default:return"ناسمه ورودي"}}};function Vf(){return{localeError:SI()}}var yI=()=>{let e={string:{unit:"znaków",verb:"mieć"},file:{unit:"bajtów",verb:"mieć"},array:{unit:"elementów",verb:"mieć"},set:{unit:"elementów",verb:"mieć"}};function t(r){return e[r]??null}let n={regex:"wyrażenie",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ąg znaków zakodowany w formacie base64",base64url:"ciąg znaków zakodowany w formacie base64url",json_string:"ciąg znaków w formacie JSON",e164:"liczba E.164",jwt:"JWT",template_literal:"wejście"},o={nan:"NaN",number:"liczba",array:"tablica"};return(r)=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=I(r.input),s=o[a]??a;if(/^[A-Z]/.test(r.expected))return`Nieprawidłowe dane wejściowe: oczekiwano instanceof ${r.expected}, otrzymano ${s}`;return`Nieprawidłowe dane wejściowe: oczekiwano ${i}, otrzymano ${s}`}case"invalid_value":if(r.values.length===1)return`Nieprawidłowe dane wejściowe: oczekiwano ${k(r.values[0])}`;return`Nieprawidłowa opcja: oczekiwano jednej z wartości ${z(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);if(a)return`Za duża wartość: oczekiwano, że ${r.origin??"wartość"} będzie mieć ${i}${r.maximum.toString()} ${a.unit??"elementów"}`;return`Zbyt duż(y/a/e): oczekiwano, że ${r.origin??"wartość"} będzie wynosić ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);if(a)return`Za mała wartość: oczekiwano, że ${r.origin??"wartość"} będzie mieć ${i}${r.minimum.toString()} ${a.unit??"elementów"}`;return`Zbyt mał(y/a/e): oczekiwano, że ${r.origin??"wartość"} będzie wynosić ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;if(i.format==="starts_with")return`Nieprawidłowy ciąg znaków: musi zaczynać się od "${i.prefix}"`;if(i.format==="ends_with")return`Nieprawidłowy ciąg znaków: musi kończyć się na "${i.suffix}"`;if(i.format==="includes")return`Nieprawidłowy ciąg znaków: musi zawierać "${i.includes}"`;if(i.format==="regex")return`Nieprawidłowy ciąg znaków: musi odpowiadać wzorcowi ${i.pattern}`;return`Nieprawidłow(y/a/e) ${n[i.format]??r.format}`}case"not_multiple_of":return`Nieprawidłowa liczba: musi być wielokrotnością ${r.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${r.keys.length>1?"s":""}: ${z(r.keys,", ")}`;case"invalid_key":return`Nieprawidłowy klucz w ${r.origin}`;case"invalid_union":return"Nieprawidłowe dane wejściowe";case"invalid_element":return`Nieprawidłowa wartość w ${r.origin}`;default:return"Nieprawidłowe dane wejściowe"}}};function Ff(){return{localeError:yI()}}var bI=()=>{let e={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function t(r){return e[r]??null}let n={regex:"padrão",email:"endereço 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ção ISO",ipv4:"endereço IPv4",ipv6:"endereço 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úmero E.164",jwt:"JWT",template_literal:"entrada"},o={nan:"NaN",number:"número",null:"nulo"};return(r)=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=I(r.input),s=o[a]??a;if(/^[A-Z]/.test(r.expected))return`Tipo inválido: esperado instanceof ${r.expected}, recebido ${s}`;return`Tipo inválido: esperado ${i}, recebido ${s}`}case"invalid_value":if(r.values.length===1)return`Entrada inválida: esperado ${k(r.values[0])}`;return`Opção inválida: esperada uma das ${z(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);if(a)return`Muito grande: esperado que ${r.origin??"valor"} tivesse ${i}${r.maximum.toString()} ${a.unit??"elementos"}`;return`Muito grande: esperado que ${r.origin??"valor"} fosse ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);if(a)return`Muito pequeno: esperado que ${r.origin} tivesse ${i}${r.minimum.toString()} ${a.unit}`;return`Muito pequeno: esperado que ${r.origin} fosse ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;if(i.format==="starts_with")return`Texto inválido: deve começar com "${i.prefix}"`;if(i.format==="ends_with")return`Texto inválido: deve terminar com "${i.suffix}"`;if(i.format==="includes")return`Texto inválido: deve incluir "${i.includes}"`;if(i.format==="regex")return`Texto inválido: deve corresponder ao padrão ${i.pattern}`;return`${n[i.format]??r.format} inválido`}case"not_multiple_of":return`Número inválido: deve ser múltiplo de ${r.divisor}`;case"unrecognized_keys":return`Chave${r.keys.length>1?"s":""} desconhecida${r.keys.length>1?"s":""}: ${z(r.keys,", ")}`;case"invalid_key":return`Chave inválida em ${r.origin}`;case"invalid_union":return"Entrada inválida";case"invalid_element":return`Valor inválido em ${r.origin}`;default:return"Campo inválido"}}};function Jf(){return{localeError:bI()}}var $I=()=>{let e={string:{unit:"caractere",verb:"să aibă"},file:{unit:"octeți",verb:"să aibă"},array:{unit:"elemente",verb:"să aibă"},set:{unit:"elemente",verb:"să aibă"},map:{unit:"intrări",verb:"să aibă"}};function t(r){return e[r]??null}let n={regex:"intrare",email:"adresă 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ă și oră ISO",date:"dată ISO",time:"oră ISO",duration:"durată ISO",ipv4:"adresă IPv4",ipv6:"adresă IPv6",mac:"adresă MAC",cidrv4:"interval IPv4",cidrv6:"interval IPv6",base64:"șir codat base64",base64url:"șir codat base64url",json_string:"șir JSON",e164:"număr E.164",jwt:"JWT",template_literal:"intrare"},o={nan:"NaN",string:"șir",number:"număr",boolean:"boolean",function:"funcție",array:"matrice",object:"obiect",undefined:"nedefinit",symbol:"simbol",bigint:"număr mare",void:"void",never:"never",map:"hartă",set:"set"};return(r)=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=I(r.input),s=o[a]??a;return`Intrare invalidă: așteptat ${i}, primit ${s}`}case"invalid_value":if(r.values.length===1)return`Intrare invalidă: așteptat ${k(r.values[0])}`;return`Opțiune invalidă: așteptat una dintre ${z(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);if(a)return`Prea mare: așteptat ca ${r.origin??"valoarea"} ${a.verb} ${i}${r.maximum.toString()} ${a.unit??"elemente"}`;return`Prea mare: așteptat ca ${r.origin??"valoarea"} să fie ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);if(a)return`Prea mic: așteptat ca ${r.origin} ${a.verb} ${i}${r.minimum.toString()} ${a.unit}`;return`Prea mic: așteptat ca ${r.origin} să fie ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;if(i.format==="starts_with")return`Șir invalid: trebuie să înceapă cu "${i.prefix}"`;if(i.format==="ends_with")return`Șir invalid: trebuie să se termine cu "${i.suffix}"`;if(i.format==="includes")return`Șir invalid: trebuie să includă "${i.includes}"`;if(i.format==="regex")return`Șir invalid: trebuie să se potrivească cu modelul ${i.pattern}`;return`Format invalid: ${n[i.format]??r.format}`}case"not_multiple_of":return`Număr invalid: trebuie să fie multiplu de ${r.divisor}`;case"unrecognized_keys":return`Chei nerecunoscute: ${z(r.keys,", ")}`;case"invalid_key":return`Cheie invalidă în ${r.origin}`;case"invalid_union":return"Intrare invalidă";case"invalid_element":return`Valoare invalidă în ${r.origin}`;default:return"Intrare invalidă"}}};function Hf(){return{localeError:$I()}}function Oy(e,t,n,o){let r=Math.abs(e),i=r%10,a=r%100;if(a>=11&&a<=19)return o;if(i===1)return t;if(i>=2&&i<=4)return n;return o}var zI=()=>{let e={string:{unit:{one:"символ",few:"символа",many:"символов"},verb:"иметь"},file:{unit:{one:"байт",few:"байта",many:"байт"},verb:"иметь"},array:{unit:{one:"элемент",few:"элемента",many:"элементов"},verb:"иметь"},set:{unit:{one:"элемент",few:"элемента",many:"элементов"},verb:"иметь"}};function t(r){return e[r]??null}let n={regex:"ввод",email:"email адрес",url:"URL",emoji:"эмодзи",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO дата и время",date:"ISO дата",time:"ISO время",duration:"ISO длительность",ipv4:"IPv4 адрес",ipv6:"IPv6 адрес",cidrv4:"IPv4 диапазон",cidrv6:"IPv6 диапазон",base64:"строка в формате base64",base64url:"строка в формате base64url",json_string:"JSON строка",e164:"номер E.164",jwt:"JWT",template_literal:"ввод"},o={nan:"NaN",number:"число",array:"массив"};return(r)=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=I(r.input),s=o[a]??a;if(/^[A-Z]/.test(r.expected))return`Неверный ввод: ожидалось instanceof ${r.expected}, получено ${s}`;return`Неверный ввод: ожидалось ${i}, получено ${s}`}case"invalid_value":if(r.values.length===1)return`Неверный ввод: ожидалось ${k(r.values[0])}`;return`Неверный вариант: ожидалось одно из ${z(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);if(a){let s=Number(r.maximum),c=Oy(s,a.unit.one,a.unit.few,a.unit.many);return`Слишком большое значение: ожидалось, что ${r.origin??"значение"} будет иметь ${i}${r.maximum.toString()} ${c}`}return`Слишком большое значение: ожидалось, что ${r.origin??"значение"} будет ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);if(a){let s=Number(r.minimum),c=Oy(s,a.unit.one,a.unit.few,a.unit.many);return`Слишком маленькое значение: ожидалось, что ${r.origin} будет иметь ${i}${r.minimum.toString()} ${c}`}return`Слишком маленькое значение: ожидалось, что ${r.origin} будет ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;if(i.format==="starts_with")return`Неверная строка: должна начинаться с "${i.prefix}"`;if(i.format==="ends_with")return`Неверная строка: должна заканчиваться на "${i.suffix}"`;if(i.format==="includes")return`Неверная строка: должна содержать "${i.includes}"`;if(i.format==="regex")return`Неверная строка: должна соответствовать шаблону ${i.pattern}`;return`Неверный ${n[i.format]??r.format}`}case"not_multiple_of":return`Неверное число: должно быть кратным ${r.divisor}`;case"unrecognized_keys":return`Нераспознанн${r.keys.length>1?"ые":"ый"} ключ${r.keys.length>1?"и":""}: ${z(r.keys,", ")}`;case"invalid_key":return`Неверный ключ в ${r.origin}`;case"invalid_union":return"Неверные входные данные";case"invalid_element":return`Неверное значение в ${r.origin}`;default:return"Неверные входные данные"}}};function Kf(){return{localeError:zI()}}var wI=()=>{let e={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}};function t(r){return e[r]??null}let n={regex:"vnos",email:"e-poštni 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 čas",date:"ISO datum",time:"ISO čas",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 številka",jwt:"JWT",template_literal:"vnos"},o={nan:"NaN",number:"število",array:"tabela"};return(r)=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=I(r.input),s=o[a]??a;if(/^[A-Z]/.test(r.expected))return`Neveljaven vnos: pričakovano instanceof ${r.expected}, prejeto ${s}`;return`Neveljaven vnos: pričakovano ${i}, prejeto ${s}`}case"invalid_value":if(r.values.length===1)return`Neveljaven vnos: pričakovano ${k(r.values[0])}`;return`Neveljavna možnost: pričakovano eno izmed ${z(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);if(a)return`Preveliko: pričakovano, da bo ${r.origin??"vrednost"} imelo ${i}${r.maximum.toString()} ${a.unit??"elementov"}`;return`Preveliko: pričakovano, da bo ${r.origin??"vrednost"} ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);if(a)return`Premajhno: pričakovano, da bo ${r.origin} imelo ${i}${r.minimum.toString()} ${a.unit}`;return`Premajhno: pričakovano, da bo ${r.origin} ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;if(i.format==="starts_with")return`Neveljaven niz: mora se začeti z "${i.prefix}"`;if(i.format==="ends_with")return`Neveljaven niz: mora se končati z "${i.suffix}"`;if(i.format==="includes")return`Neveljaven niz: mora vsebovati "${i.includes}"`;if(i.format==="regex")return`Neveljaven niz: mora ustrezati vzorcu ${i.pattern}`;return`Neveljaven ${n[i.format]??r.format}`}case"not_multiple_of":return`Neveljavno število: mora biti večkratnik ${r.divisor}`;case"unrecognized_keys":return`Neprepoznan${r.keys.length>1?"i ključi":" ključ"}: ${z(r.keys,", ")}`;case"invalid_key":return`Neveljaven ključ v ${r.origin}`;case"invalid_union":return"Neveljaven vnos";case"invalid_element":return`Neveljavna vrednost v ${r.origin}`;default:return"Neveljaven vnos"}}};function Gf(){return{localeError:wI()}}var RI=()=>{let e={string:{unit:"tecken",verb:"att ha"},file:{unit:"bytes",verb:"att ha"},array:{unit:"objekt",verb:"att innehålla"},set:{unit:"objekt",verb:"att innehålla"}};function t(r){return e[r]??null}let n={regex:"reguljärt 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äng",base64url:"base64url-kodad sträng",json_string:"JSON-sträng",e164:"E.164-nummer",jwt:"JWT",template_literal:"mall-literal"},o={nan:"NaN",number:"antal",array:"lista"};return(r)=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=I(r.input),s=o[a]??a;if(/^[A-Z]/.test(r.expected))return`Ogiltig inmatning: förväntat instanceof ${r.expected}, fick ${s}`;return`Ogiltig inmatning: förväntat ${i}, fick ${s}`}case"invalid_value":if(r.values.length===1)return`Ogiltig inmatning: förväntat ${k(r.values[0])}`;return`Ogiltigt val: förväntade en av ${z(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);if(a)return`För stor(t): förväntade ${r.origin??"värdet"} att ha ${i}${r.maximum.toString()} ${a.unit??"element"}`;return`För stor(t): förväntat ${r.origin??"värdet"} att ha ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);if(a)return`För lite(t): förväntade ${r.origin??"värdet"} att ha ${i}${r.minimum.toString()} ${a.unit}`;return`För lite(t): förväntade ${r.origin??"värdet"} att ha ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;if(i.format==="starts_with")return`Ogiltig sträng: måste börja med "${i.prefix}"`;if(i.format==="ends_with")return`Ogiltig sträng: måste sluta med "${i.suffix}"`;if(i.format==="includes")return`Ogiltig sträng: måste innehålla "${i.includes}"`;if(i.format==="regex")return`Ogiltig sträng: måste matcha mönstret "${i.pattern}"`;return`Ogiltig(t) ${n[i.format]??r.format}`}case"not_multiple_of":return`Ogiltigt tal: måste vara en multipel av ${r.divisor}`;case"unrecognized_keys":return`${r.keys.length>1?"Okända nycklar":"Okänd nyckel"}: ${z(r.keys,", ")}`;case"invalid_key":return`Ogiltig nyckel i ${r.origin??"värdet"}`;case"invalid_union":return"Ogiltig input";case"invalid_element":return`Ogiltigt värde i ${r.origin??"värdet"}`;default:return"Ogiltig input"}}};function Bf(){return{localeError:RI()}}var xI=()=>{let e={string:{unit:"எழுத்துக்கள்",verb:"கொண்டிருக்க வேண்டும்"},file:{unit:"பைட்டுகள்",verb:"கொண்டிருக்க வேண்டும்"},array:{unit:"உறுப்புகள்",verb:"கொண்டிருக்க வேண்டும்"},set:{unit:"உறுப்புகள்",verb:"கொண்டிருக்க வேண்டும்"}};function t(r){return e[r]??null}let n={regex:"உள்ளீடு",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 தேதி நேரம்",date:"ISO தேதி",time:"ISO நேரம்",duration:"ISO கால அளவு",ipv4:"IPv4 முகவரி",ipv6:"IPv6 முகவரி",cidrv4:"IPv4 வரம்பு",cidrv6:"IPv6 வரம்பு",base64:"base64-encoded சரம்",base64url:"base64url-encoded சரம்",json_string:"JSON சரம்",e164:"E.164 எண்",jwt:"JWT",template_literal:"input"},o={nan:"NaN",number:"எண்",array:"அணி",null:"வெறுமை"};return(r)=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=I(r.input),s=o[a]??a;if(/^[A-Z]/.test(r.expected))return`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது instanceof ${r.expected}, பெறப்பட்டது ${s}`;return`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${i}, பெறப்பட்டது ${s}`}case"invalid_value":if(r.values.length===1)return`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${k(r.values[0])}`;return`தவறான விருப்பம்: எதிர்பார்க்கப்பட்டது ${z(r.values,"|")} இல் ஒன்று`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);if(a)return`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${r.origin??"மதிப்பு"} ${i}${r.maximum.toString()} ${a.unit??"உறுப்புகள்"} ஆக இருக்க வேண்டும்`;return`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${r.origin??"மதிப்பு"} ${i}${r.maximum.toString()} ஆக இருக்க வேண்டும்`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);if(a)return`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${r.origin} ${i}${r.minimum.toString()} ${a.unit} ஆக இருக்க வேண்டும்`;return`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${r.origin} ${i}${r.minimum.toString()} ஆக இருக்க வேண்டும்`}case"invalid_format":{let i=r;if(i.format==="starts_with")return`தவறான சரம்: "${i.prefix}" இல் தொடங்க வேண்டும்`;if(i.format==="ends_with")return`தவறான சரம்: "${i.suffix}" இல் முடிவடைய வேண்டும்`;if(i.format==="includes")return`தவறான சரம்: "${i.includes}" ஐ உள்ளடக்க வேண்டும்`;if(i.format==="regex")return`தவறான சரம்: ${i.pattern} முறைபாட்டுடன் பொருந்த வேண்டும்`;return`தவறான ${n[i.format]??r.format}`}case"not_multiple_of":return`தவறான எண்: ${r.divisor} இன் பலமாக இருக்க வேண்டும்`;case"unrecognized_keys":return`அடையாளம் தெரியாத விசை${r.keys.length>1?"கள்":""}: ${z(r.keys,", ")}`;case"invalid_key":return`${r.origin} இல் தவறான விசை`;case"invalid_union":return"தவறான உள்ளீடு";case"invalid_element":return`${r.origin} இல் தவறான மதிப்பு`;default:return"தவறான உள்ளீடு"}}};function Wf(){return{localeError:xI()}}var kI=()=>{let e={string:{unit:"ตัวอักษร",verb:"ควรมี"},file:{unit:"ไบต์",verb:"ควรมี"},array:{unit:"รายการ",verb:"ควรมี"},set:{unit:"รายการ",verb:"ควรมี"}};function t(r){return e[r]??null}let n={regex:"ข้อมูลที่ป้อน",email:"ที่อยู่อีเมล",url:"URL",emoji:"อิโมจิ",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"วันที่เวลาแบบ ISO",date:"วันที่แบบ ISO",time:"เวลาแบบ ISO",duration:"ช่วงเวลาแบบ ISO",ipv4:"ที่อยู่ IPv4",ipv6:"ที่อยู่ IPv6",cidrv4:"ช่วง IP แบบ IPv4",cidrv6:"ช่วง IP แบบ IPv6",base64:"ข้อความแบบ Base64",base64url:"ข้อความแบบ Base64 สำหรับ URL",json_string:"ข้อความแบบ JSON",e164:"เบอร์โทรศัพท์ระหว่างประเทศ (E.164)",jwt:"โทเคน JWT",template_literal:"ข้อมูลที่ป้อน"},o={nan:"NaN",number:"ตัวเลข",array:"อาร์เรย์ (Array)",null:"ไม่มีค่า (null)"};return(r)=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=I(r.input),s=o[a]??a;if(/^[A-Z]/.test(r.expected))return`ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น instanceof ${r.expected} แต่ได้รับ ${s}`;return`ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น ${i} แต่ได้รับ ${s}`}case"invalid_value":if(r.values.length===1)return`ค่าไม่ถูกต้อง: ควรเป็น ${k(r.values[0])}`;return`ตัวเลือกไม่ถูกต้อง: ควรเป็นหนึ่งใน ${z(r.values,"|")}`;case"too_big":{let i=r.inclusive?"ไม่เกิน":"น้อยกว่า",a=t(r.origin);if(a)return`เกินกำหนด: ${r.origin??"ค่า"} ควรมี${i} ${r.maximum.toString()} ${a.unit??"รายการ"}`;return`เกินกำหนด: ${r.origin??"ค่า"} ควรมี${i} ${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?"อย่างน้อย":"มากกว่า",a=t(r.origin);if(a)return`น้อยกว่ากำหนด: ${r.origin} ควรมี${i} ${r.minimum.toString()} ${a.unit}`;return`น้อยกว่ากำหนด: ${r.origin} ควรมี${i} ${r.minimum.toString()}`}case"invalid_format":{let i=r;if(i.format==="starts_with")return`รูปแบบไม่ถูกต้อง: ข้อความต้องขึ้นต้นด้วย "${i.prefix}"`;if(i.format==="ends_with")return`รูปแบบไม่ถูกต้อง: ข้อความต้องลงท้ายด้วย "${i.suffix}"`;if(i.format==="includes")return`รูปแบบไม่ถูกต้อง: ข้อความต้องมี "${i.includes}" อยู่ในข้อความ`;if(i.format==="regex")return`รูปแบบไม่ถูกต้อง: ต้องตรงกับรูปแบบที่กำหนด ${i.pattern}`;return`รูปแบบไม่ถูกต้อง: ${n[i.format]??r.format}`}case"not_multiple_of":return`ตัวเลขไม่ถูกต้อง: ต้องเป็นจำนวนที่หารด้วย ${r.divisor} ได้ลงตัว`;case"unrecognized_keys":return`พบคีย์ที่ไม่รู้จัก: ${z(r.keys,", ")}`;case"invalid_key":return`คีย์ไม่ถูกต้องใน ${r.origin}`;case"invalid_union":return"ข้อมูลไม่ถูกต้อง: ไม่ตรงกับรูปแบบยูเนียนที่กำหนดไว้";case"invalid_element":return`ข้อมูลไม่ถูกต้องใน ${r.origin}`;default:return"ข้อมูลไม่ถูกต้อง"}}};function Yf(){return{localeError:kI()}}var II=()=>{let e={string:{unit:"karakter",verb:"olmalı"},file:{unit:"bayt",verb:"olmalı"},array:{unit:"öğe",verb:"olmalı"},set:{unit:"öğe",verb:"olmalı"}};function t(r){return e[r]??null}let n={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üre",ipv4:"IPv4 adresi",ipv6:"IPv6 adresi",cidrv4:"IPv4 aralığı",cidrv6:"IPv6 aralığı",base64:"base64 ile şifrelenmiş metin",base64url:"base64url ile şifrelenmiş metin",json_string:"JSON dizesi",e164:"E.164 sayısı",jwt:"JWT",template_literal:"Şablon dizesi"},o={nan:"NaN"};return(r)=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=I(r.input),s=o[a]??a;if(/^[A-Z]/.test(r.expected))return`Geçersiz değer: beklenen instanceof ${r.expected}, alınan ${s}`;return`Geçersiz değer: beklenen ${i}, alınan ${s}`}case"invalid_value":if(r.values.length===1)return`Geçersiz değer: beklenen ${k(r.values[0])}`;return`Geçersiz seçenek: aşağıdakilerden biri olmalı: ${z(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);if(a)return`Çok büyük: beklenen ${r.origin??"değer"} ${i}${r.maximum.toString()} ${a.unit??"öğe"}`;return`Çok büyük: beklenen ${r.origin??"değer"} ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);if(a)return`Çok küçük: beklenen ${r.origin} ${i}${r.minimum.toString()} ${a.unit}`;return`Çok küçük: beklenen ${r.origin} ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;if(i.format==="starts_with")return`Geçersiz metin: "${i.prefix}" ile başlamalı`;if(i.format==="ends_with")return`Geçersiz metin: "${i.suffix}" ile bitmeli`;if(i.format==="includes")return`Geçersiz metin: "${i.includes}" içermeli`;if(i.format==="regex")return`Geçersiz metin: ${i.pattern} desenine uymalı`;return`Geçersiz ${n[i.format]??r.format}`}case"not_multiple_of":return`Geçersiz sayı: ${r.divisor} ile tam bölünebilmeli`;case"unrecognized_keys":return`Tanınmayan anahtar${r.keys.length>1?"lar":""}: ${z(r.keys,", ")}`;case"invalid_key":return`${r.origin} içinde geçersiz anahtar`;case"invalid_union":return"Geçersiz değer";case"invalid_element":return`${r.origin} içinde geçersiz değer`;default:return"Geçersiz değer"}}};function Xf(){return{localeError:II()}}var PI=()=>{let e={string:{unit:"символів",verb:"матиме"},file:{unit:"байтів",verb:"матиме"},array:{unit:"елементів",verb:"матиме"},set:{unit:"елементів",verb:"матиме"}};function t(r){return e[r]??null}let n={regex:"вхідні дані",email:"адреса електронної пошти",url:"URL",emoji:"емодзі",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"дата та час ISO",date:"дата ISO",time:"час ISO",duration:"тривалість ISO",ipv4:"адреса IPv4",ipv6:"адреса IPv6",cidrv4:"діапазон IPv4",cidrv6:"діапазон IPv6",base64:"рядок у кодуванні base64",base64url:"рядок у кодуванні base64url",json_string:"рядок JSON",e164:"номер E.164",jwt:"JWT",template_literal:"вхідні дані"},o={nan:"NaN",number:"число",array:"масив"};return(r)=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=I(r.input),s=o[a]??a;if(/^[A-Z]/.test(r.expected))return`Неправильні вхідні дані: очікується instanceof ${r.expected}, отримано ${s}`;return`Неправильні вхідні дані: очікується ${i}, отримано ${s}`}case"invalid_value":if(r.values.length===1)return`Неправильні вхідні дані: очікується ${k(r.values[0])}`;return`Неправильна опція: очікується одне з ${z(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);if(a)return`Занадто велике: очікується, що ${r.origin??"значення"} ${a.verb} ${i}${r.maximum.toString()} ${a.unit??"елементів"}`;return`Занадто велике: очікується, що ${r.origin??"значення"} буде ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);if(a)return`Занадто мале: очікується, що ${r.origin} ${a.verb} ${i}${r.minimum.toString()} ${a.unit}`;return`Занадто мале: очікується, що ${r.origin} буде ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;if(i.format==="starts_with")return`Неправильний рядок: повинен починатися з "${i.prefix}"`;if(i.format==="ends_with")return`Неправильний рядок: повинен закінчуватися на "${i.suffix}"`;if(i.format==="includes")return`Неправильний рядок: повинен містити "${i.includes}"`;if(i.format==="regex")return`Неправильний рядок: повинен відповідати шаблону ${i.pattern}`;return`Неправильний ${n[i.format]??r.format}`}case"not_multiple_of":return`Неправильне число: повинно бути кратним ${r.divisor}`;case"unrecognized_keys":return`Нерозпізнаний ключ${r.keys.length>1?"і":""}: ${z(r.keys,", ")}`;case"invalid_key":return`Неправильний ключ у ${r.origin}`;case"invalid_union":return"Неправильні вхідні дані";case"invalid_element":return`Неправильне значення у ${r.origin}`;default:return"Неправильні вхідні дані"}}};function Zi(){return{localeError:PI()}}function Qf(){return Zi()}var EI=()=>{let e={string:{unit:"حروف",verb:"ہونا"},file:{unit:"بائٹس",verb:"ہونا"},array:{unit:"آئٹمز",verb:"ہونا"},set:{unit:"آئٹمز",verb:"ہونا"}};function t(r){return e[r]??null}let n={regex:"ان پٹ",email:"ای میل ایڈریس",url:"یو آر ایل",emoji:"ایموجی",uuid:"یو یو آئی ڈی",uuidv4:"یو یو آئی ڈی وی 4",uuidv6:"یو یو آئی ڈی وی 6",nanoid:"نینو آئی ڈی",guid:"جی یو آئی ڈی",cuid:"سی یو آئی ڈی",cuid2:"سی یو آئی ڈی 2",ulid:"یو ایل آئی ڈی",xid:"ایکس آئی ڈی",ksuid:"کے ایس یو آئی ڈی",datetime:"آئی ایس او ڈیٹ ٹائم",date:"آئی ایس او تاریخ",time:"آئی ایس او وقت",duration:"آئی ایس او مدت",ipv4:"آئی پی وی 4 ایڈریس",ipv6:"آئی پی وی 6 ایڈریس",cidrv4:"آئی پی وی 4 رینج",cidrv6:"آئی پی وی 6 رینج",base64:"بیس 64 ان کوڈڈ سٹرنگ",base64url:"بیس 64 یو آر ایل ان کوڈڈ سٹرنگ",json_string:"جے ایس او این سٹرنگ",e164:"ای 164 نمبر",jwt:"جے ڈبلیو ٹی",template_literal:"ان پٹ"},o={nan:"NaN",number:"نمبر",array:"آرے",null:"نل"};return(r)=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=I(r.input),s=o[a]??a;if(/^[A-Z]/.test(r.expected))return`غلط ان پٹ: instanceof ${r.expected} متوقع تھا، ${s} موصول ہوا`;return`غلط ان پٹ: ${i} متوقع تھا، ${s} موصول ہوا`}case"invalid_value":if(r.values.length===1)return`غلط ان پٹ: ${k(r.values[0])} متوقع تھا`;return`غلط آپشن: ${z(r.values,"|")} میں سے ایک متوقع تھا`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);if(a)return`بہت بڑا: ${r.origin??"ویلیو"} کے ${i}${r.maximum.toString()} ${a.unit??"عناصر"} ہونے متوقع تھے`;return`بہت بڑا: ${r.origin??"ویلیو"} کا ${i}${r.maximum.toString()} ہونا متوقع تھا`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);if(a)return`بہت چھوٹا: ${r.origin} کے ${i}${r.minimum.toString()} ${a.unit} ہونے متوقع تھے`;return`بہت چھوٹا: ${r.origin} کا ${i}${r.minimum.toString()} ہونا متوقع تھا`}case"invalid_format":{let i=r;if(i.format==="starts_with")return`غلط سٹرنگ: "${i.prefix}" سے شروع ہونا چاہیے`;if(i.format==="ends_with")return`غلط سٹرنگ: "${i.suffix}" پر ختم ہونا چاہیے`;if(i.format==="includes")return`غلط سٹرنگ: "${i.includes}" شامل ہونا چاہیے`;if(i.format==="regex")return`غلط سٹرنگ: پیٹرن ${i.pattern} سے میچ ہونا چاہیے`;return`غلط ${n[i.format]??r.format}`}case"not_multiple_of":return`غلط نمبر: ${r.divisor} کا مضاعف ہونا چاہیے`;case"unrecognized_keys":return`غیر تسلیم شدہ کی${r.keys.length>1?"ز":""}: ${z(r.keys,"، ")}`;case"invalid_key":return`${r.origin} میں غلط کی`;case"invalid_union":return"غلط ان پٹ";case"invalid_element":return`${r.origin} میں غلط ویلیو`;default:return"غلط ان پٹ"}}};function eh(){return{localeError:EI()}}var TI=()=>{let e={string:{unit:"belgi",verb:"bo‘lishi kerak"},file:{unit:"bayt",verb:"bo‘lishi kerak"},array:{unit:"element",verb:"bo‘lishi kerak"},set:{unit:"element",verb:"bo‘lishi kerak"},map:{unit:"yozuv",verb:"bo‘lishi kerak"}};function t(r){return e[r]??null}let n={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(r)=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=I(r.input),s=o[a]??a;if(/^[A-Z]/.test(r.expected))return`Noto‘g‘ri kirish: kutilgan instanceof ${r.expected}, qabul qilingan ${s}`;return`Noto‘g‘ri kirish: kutilgan ${i}, qabul qilingan ${s}`}case"invalid_value":if(r.values.length===1)return`Noto‘g‘ri kirish: kutilgan ${k(r.values[0])}`;return`Noto‘g‘ri variant: quyidagilardan biri kutilgan ${z(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);if(a)return`Juda katta: kutilgan ${r.origin??"qiymat"} ${i}${r.maximum.toString()} ${a.unit} ${a.verb}`;return`Juda katta: kutilgan ${r.origin??"qiymat"} ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);if(a)return`Juda kichik: kutilgan ${r.origin} ${i}${r.minimum.toString()} ${a.unit} ${a.verb}`;return`Juda kichik: kutilgan ${r.origin} ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;if(i.format==="starts_with")return`Noto‘g‘ri satr: "${i.prefix}" bilan boshlanishi kerak`;if(i.format==="ends_with")return`Noto‘g‘ri satr: "${i.suffix}" bilan tugashi kerak`;if(i.format==="includes")return`Noto‘g‘ri satr: "${i.includes}" ni o‘z ichiga olishi kerak`;if(i.format==="regex")return`Noto‘g‘ri satr: ${i.pattern} shabloniga mos kelishi kerak`;return`Noto‘g‘ri ${n[i.format]??r.format}`}case"not_multiple_of":return`Noto‘g‘ri raqam: ${r.divisor} ning karralisi bo‘lishi kerak`;case"unrecognized_keys":return`Noma’lum kalit${r.keys.length>1?"lar":""}: ${z(r.keys,", ")}`;case"invalid_key":return`${r.origin} dagi kalit noto‘g‘ri`;case"invalid_union":return"Noto‘g‘ri kirish";case"invalid_element":return`${r.origin} da noto‘g‘ri qiymat`;default:return"Noto‘g‘ri kirish"}}};function th(){return{localeError:TI()}}var jI=()=>{let e={string:{unit:"ký tự",verb:"có"},file:{unit:"byte",verb:"có"},array:{unit:"phần tử",verb:"có"},set:{unit:"phần tử",verb:"có"}};function t(r){return e[r]??null}let n={regex:"đầu vào",email:"địa chỉ 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ày giờ ISO",date:"ngày ISO",time:"giờ ISO",duration:"khoảng thời gian ISO",ipv4:"địa chỉ IPv4",ipv6:"địa chỉ IPv6",cidrv4:"dải IPv4",cidrv6:"dải IPv6",base64:"chuỗi mã hóa base64",base64url:"chuỗi mã hóa base64url",json_string:"chuỗi JSON",e164:"số E.164",jwt:"JWT",template_literal:"đầu vào"},o={nan:"NaN",number:"số",array:"mảng"};return(r)=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=I(r.input),s=o[a]??a;if(/^[A-Z]/.test(r.expected))return`Đầu vào không hợp lệ: mong đợi instanceof ${r.expected}, nhận được ${s}`;return`Đầu vào không hợp lệ: mong đợi ${i}, nhận được ${s}`}case"invalid_value":if(r.values.length===1)return`Đầu vào không hợp lệ: mong đợi ${k(r.values[0])}`;return`Tùy chọn không hợp lệ: mong đợi một trong các giá trị ${z(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);if(a)return`Quá lớn: mong đợi ${r.origin??"giá trị"} ${a.verb} ${i}${r.maximum.toString()} ${a.unit??"phần tử"}`;return`Quá lớn: mong đợi ${r.origin??"giá trị"} ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);if(a)return`Quá nhỏ: mong đợi ${r.origin} ${a.verb} ${i}${r.minimum.toString()} ${a.unit}`;return`Quá nhỏ: mong đợi ${r.origin} ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;if(i.format==="starts_with")return`Chuỗi không hợp lệ: phải bắt đầu bằng "${i.prefix}"`;if(i.format==="ends_with")return`Chuỗi không hợp lệ: phải kết thúc bằng "${i.suffix}"`;if(i.format==="includes")return`Chuỗi không hợp lệ: phải bao gồm "${i.includes}"`;if(i.format==="regex")return`Chuỗi không hợp lệ: phải khớp với mẫu ${i.pattern}`;return`${n[i.format]??r.format} không hợp lệ`}case"not_multiple_of":return`Số không hợp lệ: phải là bội số của ${r.divisor}`;case"unrecognized_keys":return`Khóa không được nhận dạng: ${z(r.keys,", ")}`;case"invalid_key":return`Khóa không hợp lệ trong ${r.origin}`;case"invalid_union":return"Đầu vào không hợp lệ";case"invalid_element":return`Giá trị không hợp lệ trong ${r.origin}`;default:return"Đầu vào không hợp lệ"}}};function rh(){return{localeError:jI()}}var OI=()=>{let e={string:{unit:"字符",verb:"包含"},file:{unit:"字节",verb:"包含"},array:{unit:"项",verb:"包含"},set:{unit:"项",verb:"包含"}};function t(r){return e[r]??null}let n={regex:"输入",email:"电子邮件",url:"URL",emoji:"表情符号",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO日期时间",date:"ISO日期",time:"ISO时间",duration:"ISO时长",ipv4:"IPv4地址",ipv6:"IPv6地址",cidrv4:"IPv4网段",cidrv6:"IPv6网段",base64:"base64编码字符串",base64url:"base64url编码字符串",json_string:"JSON字符串",e164:"E.164号码",jwt:"JWT",template_literal:"输入"},o={nan:"NaN",number:"数字",array:"数组",null:"空值(null)"};return(r)=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=I(r.input),s=o[a]??a;if(/^[A-Z]/.test(r.expected))return`无效输入:期望 instanceof ${r.expected},实际接收 ${s}`;return`无效输入:期望 ${i},实际接收 ${s}`}case"invalid_value":if(r.values.length===1)return`无效输入:期望 ${k(r.values[0])}`;return`无效选项:期望以下之一 ${z(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);if(a)return`数值过大:期望 ${r.origin??"值"} ${i}${r.maximum.toString()} ${a.unit??"个元素"}`;return`数值过大:期望 ${r.origin??"值"} ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);if(a)return`数值过小:期望 ${r.origin} ${i}${r.minimum.toString()} ${a.unit}`;return`数值过小:期望 ${r.origin} ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;if(i.format==="starts_with")return`无效字符串:必须以 "${i.prefix}" 开头`;if(i.format==="ends_with")return`无效字符串:必须以 "${i.suffix}" 结尾`;if(i.format==="includes")return`无效字符串:必须包含 "${i.includes}"`;if(i.format==="regex")return`无效字符串:必须满足正则表达式 ${i.pattern}`;return`无效${n[i.format]??r.format}`}case"not_multiple_of":return`无效数字:必须是 ${r.divisor} 的倍数`;case"unrecognized_keys":return`出现未知的键(key): ${z(r.keys,", ")}`;case"invalid_key":return`${r.origin} 中的键(key)无效`;case"invalid_union":return"无效输入";case"invalid_element":return`${r.origin} 中包含无效值(value)`;default:return"无效输入"}}};function nh(){return{localeError:OI()}}var NI=()=>{let e={string:{unit:"字元",verb:"擁有"},file:{unit:"位元組",verb:"擁有"},array:{unit:"項目",verb:"擁有"},set:{unit:"項目",verb:"擁有"}};function t(r){return e[r]??null}let n={regex:"輸入",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 日期時間",date:"ISO 日期",time:"ISO 時間",duration:"ISO 期間",ipv4:"IPv4 位址",ipv6:"IPv6 位址",cidrv4:"IPv4 範圍",cidrv6:"IPv6 範圍",base64:"base64 編碼字串",base64url:"base64url 編碼字串",json_string:"JSON 字串",e164:"E.164 數值",jwt:"JWT",template_literal:"輸入"},o={nan:"NaN"};return(r)=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=I(r.input),s=o[a]??a;if(/^[A-Z]/.test(r.expected))return`無效的輸入值:預期為 instanceof ${r.expected},但收到 ${s}`;return`無效的輸入值:預期為 ${i},但收到 ${s}`}case"invalid_value":if(r.values.length===1)return`無效的輸入值:預期為 ${k(r.values[0])}`;return`無效的選項:預期為以下其中之一 ${z(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);if(a)return`數值過大:預期 ${r.origin??"值"} 應為 ${i}${r.maximum.toString()} ${a.unit??"個元素"}`;return`數值過大:預期 ${r.origin??"值"} 應為 ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);if(a)return`數值過小:預期 ${r.origin} 應為 ${i}${r.minimum.toString()} ${a.unit}`;return`數值過小:預期 ${r.origin} 應為 ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;if(i.format==="starts_with")return`無效的字串:必須以 "${i.prefix}" 開頭`;if(i.format==="ends_with")return`無效的字串:必須以 "${i.suffix}" 結尾`;if(i.format==="includes")return`無效的字串:必須包含 "${i.includes}"`;if(i.format==="regex")return`無效的字串:必須符合格式 ${i.pattern}`;return`無效的 ${n[i.format]??r.format}`}case"not_multiple_of":return`無效的數字:必須為 ${r.divisor} 的倍數`;case"unrecognized_keys":return`無法識別的鍵值${r.keys.length>1?"們":""}:${z(r.keys,"、")}`;case"invalid_key":return`${r.origin} 中有無效的鍵值`;case"invalid_union":return"無效的輸入值";case"invalid_element":return`${r.origin} 中有無效的值`;default:return"無效的輸入值"}}};function oh(){return{localeError:NI()}}var CI=()=>{let e={string:{unit:"àmi",verb:"ní"},file:{unit:"bytes",verb:"ní"},array:{unit:"nkan",verb:"ní"},set:{unit:"nkan",verb:"ní"}};function t(r){return e[r]??null}let n={regex:"ẹ̀rọ ìbáwọlé",email:"àdírẹ́sì ìmẹ́lì",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:"àkókò ISO",date:"ọjọ́ ISO",time:"àkókò ISO",duration:"àkókò tó pé ISO",ipv4:"àdírẹ́sì IPv4",ipv6:"àdírẹ́sì IPv6",cidrv4:"àgbègbè IPv4",cidrv6:"àgbègbè IPv6",base64:"ọ̀rọ̀ tí a kọ́ ní base64",base64url:"ọ̀rọ̀ base64url",json_string:"ọ̀rọ̀ JSON",e164:"nọ́mbà E.164",jwt:"JWT",template_literal:"ẹ̀rọ ìbáwọlé"},o={nan:"NaN",number:"nọ́mbà",array:"akopọ"};return(r)=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=I(r.input),s=o[a]??a;if(/^[A-Z]/.test(r.expected))return`Ìbáwọlé aṣìṣe: a ní láti fi instanceof ${r.expected}, àmọ̀ a rí ${s}`;return`Ìbáwọlé aṣìṣe: a ní láti fi ${i}, àmọ̀ a rí ${s}`}case"invalid_value":if(r.values.length===1)return`Ìbáwọlé aṣìṣe: a ní láti fi ${k(r.values[0])}`;return`Àṣàyàn aṣìṣe: yan ọ̀kan lára ${z(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);if(a)return`Tó pọ̀ jù: a ní láti jẹ́ pé ${r.origin??"iye"} ${a.verb} ${i}${r.maximum} ${a.unit}`;return`Tó pọ̀ jù: a ní láti jẹ́ ${i}${r.maximum}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);if(a)return`Kéré ju: a ní láti jẹ́ pé ${r.origin} ${a.verb} ${i}${r.minimum} ${a.unit}`;return`Kéré ju: a ní láti jẹ́ ${i}${r.minimum}`}case"invalid_format":{let i=r;if(i.format==="starts_with")return`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ bẹ̀rẹ̀ pẹ̀lú "${i.prefix}"`;if(i.format==="ends_with")return`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ parí pẹ̀lú "${i.suffix}"`;if(i.format==="includes")return`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ ní "${i.includes}"`;if(i.format==="regex")return`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ bá àpẹẹrẹ mu ${i.pattern}`;return`Aṣìṣe: ${n[i.format]??r.format}`}case"not_multiple_of":return`Nọ́mbà aṣìṣe: gbọ́dọ̀ jẹ́ èyà pípín ti ${r.divisor}`;case"unrecognized_keys":return`Bọtìnì àìmọ̀: ${z(r.keys,", ")}`;case"invalid_key":return`Bọtìnì aṣìṣe nínú ${r.origin}`;case"invalid_union":return"Ìbáwọlé aṣìṣe";case"invalid_element":return`Iye aṣìṣe nínú ${r.origin}`;default:return"Ìbáwọlé aṣìṣe"}}};function ih(){return{localeError:CI()}}var Ny,ah=Symbol("ZodOutput"),sh=Symbol("ZodInput");class ch{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let n=t[0];if(this._map.set(e,n),n&&typeof n==="object"&&"id"in n)this._idmap.set(n.id,e);return this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);if(t&&typeof t==="object"&&"id"in t)this._idmap.delete(t.id);return this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let n={...this.get(t)??{}};delete n.id;let o={...n,...this._map.get(e)};return Object.keys(o).length?o:void 0}return this._map.get(e)}has(e){return this._map.has(e)}}function tc(){return new ch}(Ny=globalThis).__zod_globalRegistry??(Ny.__zod_globalRegistry=tc());var Te=globalThis.__zod_globalRegistry;function lh(e,t){return new e({type:"string",...w(t)})}function uh(e,t){return new e({type:"string",coerce:!0,...w(t)})}function rc(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...w(t)})}function Fi(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...w(t)})}function nc(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...w(t)})}function oc(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...w(t)})}function ic(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...w(t)})}function ac(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...w(t)})}function Ji(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...w(t)})}function sc(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...w(t)})}function cc(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...w(t)})}function lc(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...w(t)})}function uc(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...w(t)})}function dc(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...w(t)})}function mc(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...w(t)})}function pc(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...w(t)})}function fc(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...w(t)})}function hc(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...w(t)})}function dh(e,t){return new e({type:"string",format:"mac",check:"string_format",abort:!1,...w(t)})}function gc(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...w(t)})}function vc(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...w(t)})}function _c(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...w(t)})}function Sc(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...w(t)})}function yc(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...w(t)})}function bc(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...w(t)})}var mh={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function ph(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...w(t)})}function fh(e,t){return new e({type:"string",format:"date",check:"string_format",...w(t)})}function hh(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...w(t)})}function gh(e,t){return new e({type:"string",format:"duration",check:"string_format",...w(t)})}function vh(e,t){return new e({type:"number",checks:[],...w(t)})}function _h(e,t){return new e({type:"number",coerce:!0,checks:[],...w(t)})}function Sh(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...w(t)})}function yh(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float32",...w(t)})}function bh(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float64",...w(t)})}function $h(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"int32",...w(t)})}function zh(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"uint32",...w(t)})}function wh(e,t){return new e({type:"boolean",...w(t)})}function Rh(e,t){return new e({type:"boolean",coerce:!0,...w(t)})}function xh(e,t){return new e({type:"bigint",...w(t)})}function kh(e,t){return new e({type:"bigint",coerce:!0,...w(t)})}function Ih(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...w(t)})}function Ph(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...w(t)})}function Eh(e,t){return new e({type:"symbol",...w(t)})}function Th(e,t){return new e({type:"undefined",...w(t)})}function jh(e,t){return new e({type:"null",...w(t)})}function Oh(e){return new e({type:"any"})}function Nh(e){return new e({type:"unknown"})}function Ch(e,t){return new e({type:"never",...w(t)})}function qh(e,t){return new e({type:"void",...w(t)})}function Ah(e,t){return new e({type:"date",...w(t)})}function Mh(e,t){return new e({type:"date",coerce:!0,...w(t)})}function Uh(e,t){return new e({type:"nan",...w(t)})}function Jt(e,t){return new Vs({check:"less_than",...w(t),value:e,inclusive:!1})}function pt(e,t){return new Vs({check:"less_than",...w(t),value:e,inclusive:!0})}function Ht(e,t){return new Fs({check:"greater_than",...w(t),value:e,inclusive:!1})}function Ke(e,t){return new Fs({check:"greater_than",...w(t),value:e,inclusive:!0})}function $c(e){return Ht(0,e)}function zc(e){return Jt(0,e)}function wc(e){return pt(0,e)}function Rc(e){return Ke(0,e)}function Rr(e,t){return new Cm({check:"multiple_of",...w(t),value:e})}function xr(e,t){return new Mm({check:"max_size",...w(t),maximum:e})}function Kt(e,t){return new Um({check:"min_size",...w(t),minimum:e})}function mn(e,t){return new Dm({check:"size_equals",...w(t),size:e})}function pn(e,t){return new Lm({check:"max_length",...w(t),maximum:e})}function nr(e,t){return new Zm({check:"min_length",...w(t),minimum:e})}function fn(e,t){return new Vm({check:"length_equals",...w(t),length:e})}function Yn(e,t){return new Fm({check:"string_format",format:"regex",...w(t),pattern:e})}function Xn(e){return new Jm({check:"string_format",format:"lowercase",...w(e)})}function Qn(e){return new Hm({check:"string_format",format:"uppercase",...w(e)})}function eo(e,t){return new Km({check:"string_format",format:"includes",...w(t),includes:e})}function to(e,t){return new Gm({check:"string_format",format:"starts_with",...w(t),prefix:e})}function ro(e,t){return new Bm({check:"string_format",format:"ends_with",...w(t),suffix:e})}function xc(e,t,n){return new Wm({check:"property",property:e,schema:t,...w(n)})}function no(e,t){return new Ym({check:"mime_type",mime:e,...w(t)})}function kt(e){return new Xm({check:"overwrite",tx:e})}function oo(e){return kt((t)=>t.normalize(e))}function io(){return kt((e)=>e.trim())}function ao(){return kt((e)=>e.toLowerCase())}function so(){return kt((e)=>e.toUpperCase())}function co(){return kt((e)=>Wd(e))}function Dh(e,t,n){return new e({type:"array",element:t,...w(n)})}function AI(e,t,n){return new e({type:"union",options:t,...w(n)})}function MI(e,t,n){return new e({type:"union",options:t,inclusive:!1,...w(n)})}function UI(e,t,n,o){return new e({type:"union",options:n,discriminator:t,...w(o)})}function DI(e,t,n){return new e({type:"intersection",left:t,right:n})}function LI(e,t,n,o){let r=n instanceof Q;return new e({type:"tuple",items:t,rest:r?n:null,...w(r?o:n)})}function ZI(e,t,n,o){return new e({type:"record",keyType:t,valueType:n,...w(o)})}function VI(e,t,n,o){return new e({type:"map",keyType:t,valueType:n,...w(o)})}function FI(e,t,n){return new e({type:"set",valueType:t,...w(n)})}function JI(e,t,n){let o=Array.isArray(t)?Object.fromEntries(t.map((r)=>[r,r])):t;return new e({type:"enum",entries:o,...w(n)})}function HI(e,t,n){return new e({type:"enum",entries:t,...w(n)})}function KI(e,t,n){return new e({type:"literal",values:Array.isArray(t)?t:[t],...w(n)})}function Lh(e,t){return new e({type:"file",...w(t)})}function GI(e,t){return new e({type:"transform",transform:t})}function BI(e,t){return new e({type:"optional",innerType:t})}function WI(e,t){return new e({type:"nullable",innerType:t})}function YI(e,t,n){return new e({type:"default",innerType:t,get defaultValue(){return typeof n==="function"?n():ki(n)}})}function XI(e,t,n){return new e({type:"nonoptional",innerType:t,...w(n)})}function QI(e,t){return new e({type:"success",innerType:t})}function eP(e,t,n){return new e({type:"catch",innerType:t,catchValue:typeof n==="function"?n:()=>n})}function tP(e,t,n){return new e({type:"pipe",in:t,out:n})}function rP(e,t){return new e({type:"readonly",innerType:t})}function nP(e,t,n){return new e({type:"template_literal",parts:t,...w(n)})}function oP(e,t){return new e({type:"lazy",getter:t})}function iP(e,t){return new e({type:"promise",innerType:t})}function Zh(e,t,n){let o=w(n);return o.abort??(o.abort=!0),new e({type:"custom",check:"custom",fn:t,...o})}function Vh(e,t,n){return new e({type:"custom",check:"custom",fn:t,...w(n)})}function Fh(e,t){let n=Cy((o)=>(o.addIssue=(r)=>{if(typeof r==="string")o.issues.push(wr(r,o.value,n._zod.def));else{let i=r;if(i.fatal)i.continue=!1;i.code??(i.code="custom"),i.input??(i.input=o.value),i.inst??(i.inst=n),i.continue??(i.continue=!n._zod.def.abort),o.issues.push(wr(i))}},e(o.value,o)),t);return n}function Cy(e,t){let n=new ge({check:"custom",...w(t)});return n._zod.check=e,n}function Jh(e){let t=new ge({check:"describe"});return t._zod.onattach=[(n)=>{let o=Te.get(n)??{};Te.add(n,{...o,description:e})}],t._zod.check=()=>{},t}function Hh(e){let t=new ge({check:"meta"});return t._zod.onattach=[(n)=>{let o=Te.get(n)??{};Te.add(n,{...o,...e})}],t._zod.check=()=>{},t}function Kh(e,t){let n=w(t),o=n.truthy??["true","1","yes","on","y","enabled"],r=n.falsy??["false","0","no","off","n","disabled"];if(n.case!=="sensitive")o=o.map((f)=>typeof f==="string"?f.toLowerCase():f),r=r.map((f)=>typeof f==="string"?f.toLowerCase():f);let i=new Set(o),a=new Set(r),s=e.Codec??Mi,c=e.Boolean??qi,d=new(e.String??dn)({type:"string",error:n.error}),m=new c({type:"boolean",error:n.error}),p=new s({type:"pipe",in:d,out:m,transform:(f,v)=>{let g=f;if(n.case!=="sensitive")g=g.toLowerCase();if(i.has(g))return!0;else if(a.has(g))return!1;else return v.issues.push({code:"invalid_value",expected:"stringbool",values:[...i,...a],input:v.value,inst:p,continue:!1}),{}},reverseTransform:(f,v)=>{if(f===!0)return o[0]||"true";else return r[0]||"false"},error:n.error});return p}function lo(e,t,n,o={}){let r=w(o),i={...w(o),check:"string_format",type:"string",format:t,fn:typeof n==="function"?n:(s)=>n.test(s),...r};if(n instanceof RegExp)i.pattern=n;return new e(i)}function kr(e){let t=e?.target??"draft-2020-12";if(t==="draft-4")t="draft-04";if(t==="draft-7")t="draft-07";return{processors:e.processors??{},metadataRegistry:e?.metadata??Te,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 pe(e,t,n={path:[],schemaPath:[]}){var o;let r=e._zod.def,i=t.seen.get(e);if(i){if(i.count++,n.schemaPath.includes(e))i.cycle=n.path;return i.schema}let a={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,a);let s=e._zod.toJSONSchema?.();if(s)a.schema=s;else{let d={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,a.schema,d);else{let p=a.schema,f=t.processors[r.type];if(!f)throw Error(`[toJSONSchema]: Non-representable type encountered: ${r.type}`);f(e,t,p,d)}let m=e._zod.parent;if(m){if(!a.ref)a.ref=m;pe(m,t,d),t.seen.get(m).isParent=!0}}let c=t.metadataRegistry.get(e);if(c)Object.assign(a.schema,c);if(t.io==="input"&&Ge(e))delete a.schema.examples,delete a.schema.default;if(t.io==="input"&&"_prefault"in a.schema)(o=a.schema).default??(o.default=a.schema._prefault);return delete a.schema._prefault,t.seen.get(e).schema}function Ir(e,t){let n=e.seen.get(t);if(!n)throw Error("Unprocessed schema. This is a bug in Zod.");let o=new Map;for(let a of e.seen.entries()){let s=e.metadataRegistry.get(a[0])?.id;if(s){let c=o.get(s);if(c&&c!==a[0])throw Error(`Duplicate schema id "${s}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);o.set(s,a[0])}}let r=(a)=>{let s=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){let m=e.external.registry.get(a[0])?.id,p=e.external.uri??((v)=>v);if(m)return{ref:p(m)};let f=a[1].defId??a[1].schema.id??`schema${e.counter++}`;return a[1].defId=f,{defId:f,ref:`${p("__shared")}#/${s}/${f}`}}if(a[1]===n)return{ref:"#"};let l=`${"#"}/${s}/`,d=a[1].schema.id??`__schema${e.counter++}`;return{defId:d,ref:l+d}},i=(a)=>{if(a[1].schema.$ref)return;let s=a[1],{ref:c,defId:l}=r(a);if(s.def={...s.schema},l)s.defId=l;let d=s.schema;for(let m in d)delete d[m];d.$ref=c};if(e.cycles==="throw")for(let a of e.seen.entries()){let s=a[1];if(s.cycle)throw Error(`Cycle detected: #/${s.cycle?.join("/")}/<root>
|
|
72
72
|
|
|
73
|
-
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let a of e.seen.entries()){let s=a[1];if(t===a[0]){i(a);continue}if(e.external){let l=e.external.registry.get(a[0])?.id;if(t!==a[0]&&l){i(a);continue}}if(e.metadataRegistry.get(a[0])?.id){i(a);continue}if(s.cycle){i(a);continue}if(s.count>1){if(e.reused==="ref"){i(a);continue}}}}function Pr(e,t){let n=e.seen.get(t);if(!n)throw Error("Unprocessed schema. This is a bug in Zod.");let o=(s)=>{let c=e.seen.get(s);if(c.ref===null)return;let l=c.def??c.schema,d={...l},m=c.ref;if(c.ref=null,m){o(m);let f=e.seen.get(m),v=f.schema;if(v.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0"))l.allOf=l.allOf??[],l.allOf.push(v);else Object.assign(l,v);if(Object.assign(l,d),s._zod.parent===m)for(let b in l){if(b==="$ref"||b==="allOf")continue;if(!(b in d))delete l[b]}if(v.$ref&&f.def)for(let b in l){if(b==="$ref"||b==="allOf")continue;if(b in f.def&&JSON.stringify(l[b])===JSON.stringify(f.def[b]))delete l[b]}}let p=s._zod.parent;if(p&&p!==m){o(p);let f=e.seen.get(p);if(f?.schema.$ref){if(l.$ref=f.schema.$ref,f.def)for(let v in l){if(v==="$ref"||v==="allOf")continue;if(v in f.def&&JSON.stringify(l[v])===JSON.stringify(f.def[v]))delete l[v]}}}e.override({zodSchema:s,jsonSchema:l,path:c.path??[]})};for(let s of[...e.seen.entries()].reverse())o(s[0]);let r={};if(e.target==="draft-2020-12")r.$schema="https://json-schema.org/draft/2020-12/schema";else if(e.target==="draft-07")r.$schema="http://json-schema.org/draft-07/schema#";else if(e.target==="draft-04")r.$schema="http://json-schema.org/draft-04/schema#";else if(e.target==="openapi-3.0");if(e.external?.uri){let s=e.external.registry.get(t)?.id;if(!s)throw Error("Schema is missing an `id` property");r.$id=e.external.uri(s)}Object.assign(r,n.def??n.schema);let i=e.metadataRegistry.get(t)?.id;if(i!==void 0&&r.id===i)delete r.id;let a=e.external?.defs??{};for(let s of e.seen.entries()){let c=s[1];if(c.def&&c.defId){if(c.def.id===c.defId)delete c.def.id;a[c.defId]=c.def}}if(e.external);else if(Object.keys(a).length>0)if(e.target==="draft-2020-12")r.$defs=a;else r.definitions=a;try{let s=JSON.parse(JSON.stringify(r));return Object.defineProperty(s,"~standard",{value:{...t["~standard"],jsonSchema:{input:lo(t,"input",e.processors),output:lo(t,"output",e.processors)}},enumerable:!1,writable:!1}),s}catch(s){throw Error("Error converting schema to JSON.")}}function Ge(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let o=e._zod.def;if(o.type==="transform")return!0;if(o.type==="array")return Ge(o.element,n);if(o.type==="set")return Ge(o.valueType,n);if(o.type==="lazy")return Ge(o.getter(),n);if(o.type==="promise"||o.type==="optional"||o.type==="nonoptional"||o.type==="nullable"||o.type==="readonly"||o.type==="default"||o.type==="prefault")return Ge(o.innerType,n);if(o.type==="intersection")return Ge(o.left,n)||Ge(o.right,n);if(o.type==="record"||o.type==="map")return Ge(o.keyType,n)||Ge(o.valueType,n);if(o.type==="pipe"){if(e._zod.traits.has("$ZodCodec"))return!0;return Ge(o.in,n)||Ge(o.out,n)}if(o.type==="object"){for(let r in o.shape)if(Ge(o.shape[r],n))return!0;return!1}if(o.type==="union"){for(let r of o.options)if(Ge(r,n))return!0;return!1}if(o.type==="tuple"){for(let r of o.items)if(Ge(r,n))return!0;if(o.rest&&Ge(o.rest,n))return!0;return!1}return!1}var Hh=(e,t={})=>(n)=>{let o=kr({...n,processors:t});return pe(e,o),Ir(o,e),Pr(o,e)},lo=(e,t,n={})=>(o)=>{let{libraryOptions:r,target:i}=o??{},a=kr({...r??{},target:i,io:t,processors:n});return pe(e,a),Ir(a,e),Pr(a,e)};var iP={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},Kh=(e,t,n,o)=>{let r=n;r.type="string";let{minimum:i,maximum:a,format:s,patterns:c,contentEncoding:l}=e._zod.bag;if(typeof i==="number")r.minLength=i;if(typeof a==="number")r.maxLength=a;if(s){if(r.format=iP[s]??s,r.format==="")delete r.format;if(s==="time")delete r.format}if(l)r.contentEncoding=l;if(c&&c.size>0){let d=[...c];if(d.length===1)r.pattern=d[0].source;else if(d.length>1)r.allOf=[...d.map((m)=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:m.source}))]}},Gh=(e,t,n,o)=>{let r=n,{minimum:i,maximum:a,format:s,multipleOf:c,exclusiveMaximum:l,exclusiveMinimum:d}=e._zod.bag;if(typeof s==="string"&&s.includes("int"))r.type="integer";else r.type="number";let m=typeof d==="number"&&d>=(i??Number.NEGATIVE_INFINITY),p=typeof l==="number"&&l<=(a??Number.POSITIVE_INFINITY),f=t.target==="draft-04"||t.target==="openapi-3.0";if(m)if(f)r.minimum=d,r.exclusiveMinimum=!0;else r.exclusiveMinimum=d;else if(typeof i==="number")r.minimum=i;if(p)if(f)r.maximum=l,r.exclusiveMaximum=!0;else r.exclusiveMaximum=l;else if(typeof a==="number")r.maximum=a;if(typeof c==="number")r.multipleOf=c},Bh=(e,t,n,o)=>{n.type="boolean"},Wh=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw Error("BigInt cannot be represented in JSON Schema")},Yh=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw Error("Symbols cannot be represented in JSON Schema")},Xh=(e,t,n,o)=>{if(t.target==="openapi-3.0")n.type="string",n.nullable=!0,n.enum=[null];else n.type="null"},Qh=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw Error("Undefined cannot be represented in JSON Schema")},eg=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw Error("Void cannot be represented in JSON Schema")},tg=(e,t,n,o)=>{n.not={}},rg=(e,t,n,o)=>{},ng=(e,t,n,o)=>{},og=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw Error("Date cannot be represented in JSON Schema")},ig=(e,t,n,o)=>{let r=e._zod.def,i=wi(r.entries);if(i.every((a)=>typeof a==="number"))n.type="number";if(i.every((a)=>typeof a==="string"))n.type="string";n.enum=i},ag=(e,t,n,o)=>{let r=e._zod.def,i=[];for(let a of r.values)if(a===void 0){if(t.unrepresentable==="throw")throw Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof a==="bigint")if(t.unrepresentable==="throw")throw Error("BigInt literals cannot be represented in JSON Schema");else i.push(Number(a));else i.push(a);if(i.length===0);else if(i.length===1){let a=i[0];if(n.type=a===null?"null":typeof a,t.target==="draft-04"||t.target==="openapi-3.0")n.enum=[a];else n.const=a}else{if(i.every((a)=>typeof a==="number"))n.type="number";if(i.every((a)=>typeof a==="string"))n.type="string";if(i.every((a)=>typeof a==="boolean"))n.type="boolean";if(i.every((a)=>a===null))n.type="null";n.enum=i}},sg=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw Error("NaN cannot be represented in JSON Schema")},cg=(e,t,n,o)=>{let r=n,i=e._zod.pattern;if(!i)throw Error("Pattern not found in template literal");r.type="string",r.pattern=i.source},lg=(e,t,n,o)=>{let r=n,i={type:"string",format:"binary",contentEncoding:"binary"},{minimum:a,maximum:s,mime:c}=e._zod.bag;if(a!==void 0)i.minLength=a;if(s!==void 0)i.maxLength=s;if(c)if(c.length===1)i.contentMediaType=c[0],Object.assign(r,i);else Object.assign(r,i),r.anyOf=c.map((l)=>({contentMediaType:l}));else Object.assign(r,i)},ug=(e,t,n,o)=>{n.type="boolean"},dg=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw Error("Custom types cannot be represented in JSON Schema")},mg=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw Error("Function types cannot be represented in JSON Schema")},pg=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw Error("Transforms cannot be represented in JSON Schema")},fg=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw Error("Map cannot be represented in JSON Schema")},hg=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw Error("Set cannot be represented in JSON Schema")},gg=(e,t,n,o)=>{let r=n,i=e._zod.def,{minimum:a,maximum:s}=e._zod.bag;if(typeof a==="number")r.minItems=a;if(typeof s==="number")r.maxItems=s;r.type="array",r.items=pe(i.element,t,{...o,path:[...o.path,"items"]})},vg=(e,t,n,o)=>{let r=n,i=e._zod.def;r.type="object",r.properties={};let a=i.shape;for(let l in a)r.properties[l]=pe(a[l],t,{...o,path:[...o.path,"properties",l]});let s=new Set(Object.keys(a)),c=new Set([...s].filter((l)=>{let d=i.shape[l]._zod;if(t.io==="input")return d.optin===void 0;else return d.optout===void 0}));if(c.size>0)r.required=Array.from(c);if(i.catchall?._zod.def.type==="never")r.additionalProperties=!1;else if(!i.catchall){if(t.io==="output")r.additionalProperties=!1}else if(i.catchall)r.additionalProperties=pe(i.catchall,t,{...o,path:[...o.path,"additionalProperties"]})},xc=(e,t,n,o)=>{let r=e._zod.def,i=r.inclusive===!1,a=r.options.map((s,c)=>pe(s,t,{...o,path:[...o.path,i?"oneOf":"anyOf",c]}));if(i)n.oneOf=a;else n.anyOf=a},_g=(e,t,n,o)=>{let r=e._zod.def,i=pe(r.left,t,{...o,path:[...o.path,"allOf",0]}),a=pe(r.right,t,{...o,path:[...o.path,"allOf",1]}),s=(l)=>("allOf"in l)&&Object.keys(l).length===1,c=[...s(i)?i.allOf:[i],...s(a)?a.allOf:[a]];n.allOf=c},Sg=(e,t,n,o)=>{let r=n,i=e._zod.def;r.type="array";let a=t.target==="draft-2020-12"?"prefixItems":"items",s=t.target==="draft-2020-12"?"items":t.target==="openapi-3.0"?"items":"additionalItems",c=i.items.map((p,f)=>pe(p,t,{...o,path:[...o.path,a,f]})),l=i.rest?pe(i.rest,t,{...o,path:[...o.path,s,...t.target==="openapi-3.0"?[i.items.length]:[]]}):null;if(t.target==="draft-2020-12"){if(r.prefixItems=c,l)r.items=l}else if(t.target==="openapi-3.0"){if(r.items={anyOf:c},l)r.items.anyOf.push(l);if(r.minItems=c.length,!l)r.maxItems=c.length}else if(r.items=c,l)r.additionalItems=l;let{minimum:d,maximum:m}=e._zod.bag;if(typeof d==="number")r.minItems=d;if(typeof m==="number")r.maxItems=m},yg=(e,t,n,o)=>{let r=n,i=e._zod.def;r.type="object";let a=i.keyType,c=a._zod.bag?.patterns;if(i.mode==="loose"&&c&&c.size>0){let d=pe(i.valueType,t,{...o,path:[...o.path,"patternProperties","*"]});r.patternProperties={};for(let m of c)r.patternProperties[m.source]=d}else{if(t.target==="draft-07"||t.target==="draft-2020-12")r.propertyNames=pe(i.keyType,t,{...o,path:[...o.path,"propertyNames"]});r.additionalProperties=pe(i.valueType,t,{...o,path:[...o.path,"additionalProperties"]})}let l=a._zod.values;if(l){let d=[...l].filter((m)=>typeof m==="string"||typeof m==="number");if(d.length>0)r.required=d}},bg=(e,t,n,o)=>{let r=e._zod.def,i=pe(r.innerType,t,o),a=t.seen.get(e);if(t.target==="openapi-3.0")a.ref=r.innerType,n.nullable=!0;else n.anyOf=[i,{type:"null"}]},$g=(e,t,n,o)=>{let r=e._zod.def;pe(r.innerType,t,o);let i=t.seen.get(e);i.ref=r.innerType},zg=(e,t,n,o)=>{let r=e._zod.def;pe(r.innerType,t,o);let i=t.seen.get(e);i.ref=r.innerType,n.default=JSON.parse(JSON.stringify(r.defaultValue))},wg=(e,t,n,o)=>{let r=e._zod.def;pe(r.innerType,t,o);let i=t.seen.get(e);if(i.ref=r.innerType,t.io==="input")n._prefault=JSON.parse(JSON.stringify(r.defaultValue))},Rg=(e,t,n,o)=>{let r=e._zod.def;pe(r.innerType,t,o);let i=t.seen.get(e);i.ref=r.innerType;let a;try{a=r.catchValue(void 0)}catch{throw Error("Dynamic catch values are not supported in JSON Schema")}n.default=a},xg=(e,t,n,o)=>{let r=e._zod.def,i=r.in._zod.traits.has("$ZodTransform"),a=t.io==="input"?i?r.out:r.in:r.out;pe(a,t,o);let s=t.seen.get(e);s.ref=a},kg=(e,t,n,o)=>{let r=e._zod.def;pe(r.innerType,t,o);let i=t.seen.get(e);i.ref=r.innerType,n.readOnly=!0},Ig=(e,t,n,o)=>{let r=e._zod.def;pe(r.innerType,t,o);let i=t.seen.get(e);i.ref=r.innerType},kc=(e,t,n,o)=>{let r=e._zod.def;pe(r.innerType,t,o);let i=t.seen.get(e);i.ref=r.innerType},Pg=(e,t,n,o)=>{let r=e._zod.innerType;pe(r,t,o);let i=t.seen.get(e);i.ref=r},Rc={string:Kh,number:Gh,boolean:Bh,bigint:Wh,symbol:Yh,null:Xh,undefined:Qh,void:eg,never:tg,any:rg,unknown:ng,date:og,enum:ig,literal:ag,nan:sg,template_literal:cg,file:lg,success:ug,custom:dg,function:mg,transform:pg,map:fg,set:hg,array:gg,object:vg,union:xc,intersection:_g,tuple:Sg,record:yg,nullable:bg,nonoptional:$g,default:zg,prefault:wg,catch:Rg,pipe:xg,readonly:kg,promise:Ig,optional:kc,lazy:Pg};function fn(e,t){if("_idmap"in e){let o=e,r=kr({...t,processors:Rc}),i={};for(let c of o._idmap.entries()){let[l,d]=c;pe(d,r)}let a={},s={registry:o,uri:t?.uri,defs:i};r.external=s;for(let c of o._idmap.entries()){let[l,d]=c;Ir(r,d),a[l]=Pr(r,d)}if(Object.keys(i).length>0){let c=r.target==="draft-2020-12"?"$defs":"definitions";a.__shared={[c]:i}}return{schemas:a}}let n=kr({...t,processors:Rc});return pe(e,n),Ir(n,e),Pr(n,e)}class Eg{get metadataRegistry(){return this.ctx.metadataRegistry}get target(){return this.ctx.target}get unrepresentable(){return this.ctx.unrepresentable}get override(){return this.ctx.override}get io(){return this.ctx.io}get counter(){return this.ctx.counter}set counter(e){this.ctx.counter=e}get seen(){return this.ctx.seen}constructor(e){let t=e?.target??"draft-2020-12";if(t==="draft-4")t="draft-04";if(t==="draft-7")t="draft-07";this.ctx=kr({processors:Rc,target:t,...e?.metadata&&{metadata:e.metadata},...e?.unrepresentable&&{unrepresentable:e.unrepresentable},...e?.override&&{override:e.override},...e?.io&&{io:e.io}})}process(e,t={path:[],schemaPath:[]}){return pe(e,this.ctx,t)}emit(e,t){if(t){if(t.cycles)this.ctx.cycles=t.cycles;if(t.reused)this.ctx.reused=t.reused;if(t.external)this.ctx.external=t.external}Ir(this.ctx,e);let n=Pr(this.ctx,e),{"~standard":o,...r}=n;return r}}var Ry={};var Ji={};rr(Ji,{ZodAny:()=>Wg,ZodArray:()=>ev,ZodBase64:()=>Bc,ZodBase64URL:()=>Wc,ZodBigInt:()=>_o,ZodBigIntFormat:()=>Qc,ZodBoolean:()=>vo,ZodCIDRv4:()=>Kc,ZodCIDRv6:()=>Gc,ZodCUID:()=>Dc,ZodCUID2:()=>Lc,ZodCatch:()=>yv,ZodCodec:()=>ta,ZodCustom:()=>ra,ZodCustomStringFormat:()=>ho,ZodDate:()=>Yi,ZodDefault:()=>fv,ZodDiscriminatedUnion:()=>rv,ZodE164:()=>Yc,ZodEmail:()=>qc,ZodEmoji:()=>Mc,ZodEnum:()=>mo,ZodExactOptional:()=>dv,ZodFile:()=>lv,ZodFunction:()=>Pv,ZodGUID:()=>Ki,ZodIPv4:()=>Jc,ZodIPv6:()=>Hc,ZodIntersection:()=>nv,ZodJWT:()=>Xc,ZodKSUID:()=>Fc,ZodLazy:()=>kv,ZodLiteral:()=>cv,ZodMAC:()=>Hg,ZodMap:()=>av,ZodNaN:()=>$v,ZodNanoID:()=>Uc,ZodNever:()=>Xg,ZodNonOptional:()=>ol,ZodNull:()=>Bg,ZodNullable:()=>pv,ZodNumber:()=>go,ZodNumberFormat:()=>hn,ZodObject:()=>Xi,ZodOptional:()=>nl,ZodPipe:()=>ea,ZodPrefault:()=>gv,ZodPreprocess:()=>zv,ZodPromise:()=>Iv,ZodReadonly:()=>wv,ZodRecord:()=>uo,ZodSet:()=>sv,ZodString:()=>po,ZodStringFormat:()=>he,ZodSuccess:()=>Sv,ZodSymbol:()=>Kg,ZodTemplateLiteral:()=>xv,ZodTransform:()=>uv,ZodTuple:()=>ov,ZodType:()=>oe,ZodULID:()=>Zc,ZodURL:()=>Wi,ZodUUID:()=>Bt,ZodUndefined:()=>Gg,ZodUnion:()=>Qi,ZodUnknown:()=>Yg,ZodVoid:()=>Qg,ZodXID:()=>Vc,ZodXor:()=>tv,_ZodString:()=>Cc,_default:()=>hv,_function:()=>kb,any:()=>el,array:()=>S,base64:()=>Hy,base64url:()=>Ky,bigint:()=>ob,boolean:()=>C,catch:()=>bv,check:()=>Ib,cidrv4:()=>Fy,cidrv6:()=>Jy,codec:()=>zb,cuid:()=>qy,cuid2:()=>Ay,custom:()=>Pb,date:()=>ub,describe:()=>Eb,discriminatedUnion:()=>Er,e164:()=>Gy,email:()=>Ac,emoji:()=>Ny,enum:()=>X,exactOptional:()=>mv,file:()=>Sb,float32:()=>eb,float64:()=>tb,function:()=>kb,guid:()=>Iy,hash:()=>Qy,hex:()=>Xy,hostname:()=>Yy,httpUrl:()=>Oy,instanceof:()=>jb,int:()=>Oc,int32:()=>rb,int64:()=>ib,intersection:()=>Et,invertCodec:()=>wb,ipv4:()=>Ly,ipv6:()=>Vy,json:()=>Nb,jwt:()=>By,keyof:()=>db,ksuid:()=>Dy,lazy:()=>Tr,literal:()=>y,looseObject:()=>H,looseRecord:()=>hb,mac:()=>Zy,map:()=>gb,meta:()=>Tb,nan:()=>$b,nanoid:()=>Cy,nativeEnum:()=>_b,never:()=>tl,nonoptional:()=>_v,null:()=>Wt,nullable:()=>Gi,nullish:()=>yb,number:()=>R,object:()=>h,optional:()=>J,partialRecord:()=>fb,pipe:()=>Nc,prefault:()=>vv,preprocess:()=>ar,promise:()=>xb,readonly:()=>Rv,record:()=>j,refine:()=>Ev,set:()=>vb,strictObject:()=>mb,string:()=>u,stringFormat:()=>Wy,stringbool:()=>Ob,success:()=>bb,superRefine:()=>Tv,symbol:()=>sb,templateLiteral:()=>Rb,transform:()=>rl,tuple:()=>iv,uint32:()=>nb,uint64:()=>ab,ulid:()=>My,undefined:()=>cb,union:()=>A,unknown:()=>F,url:()=>fo,uuid:()=>Py,uuidv4:()=>Ey,uuidv6:()=>Ty,uuidv7:()=>jy,void:()=>lb,xid:()=>Uy,xor:()=>pb});var Ic={};rr(Ic,{endsWith:()=>to,gt:()=>Kt,gte:()=>Ke,includes:()=>Qn,length:()=>pn,lowercase:()=>Yn,lt:()=>Ht,lte:()=>ft,maxLength:()=>mn,maxSize:()=>xr,mime:()=>ro,minLength:()=>or,minSize:()=>Gt,multipleOf:()=>Rr,negative:()=>bc,nonnegative:()=>zc,nonpositive:()=>$c,normalize:()=>no,overwrite:()=>Pt,positive:()=>yc,property:()=>wc,regex:()=>Wn,size:()=>dn,slugify:()=>so,startsWith:()=>eo,toLowerCase:()=>io,toUpperCase:()=>ao,trim:()=>oo,uppercase:()=>Xn});var ht={};rr(ht,{ZodISODate:()=>Ec,ZodISODateTime:()=>Pc,ZodISODuration:()=>jc,ZodISOTime:()=>Tc,date:()=>jg,datetime:()=>Tg,duration:()=>Ng,time:()=>Og});var Pc=_("ZodISODateTime",(e,t)=>{up.init(e,t),he.init(e,t)});function Tg(e){return dh(Pc,e)}var Ec=_("ZodISODate",(e,t)=>{dp.init(e,t),he.init(e,t)});function jg(e){return mh(Ec,e)}var Tc=_("ZodISOTime",(e,t)=>{mp.init(e,t),he.init(e,t)});function Og(e){return ph(Tc,e)}var jc=_("ZodISODuration",(e,t)=>{pp.init(e,t),he.init(e,t)});function Ng(e){return fh(jc,e)}var xy=(e,t)=>{Pi.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:(n)=>Ti(e,n)},flatten:{value:(n)=>Ei(e,n)},addIssue:{value:(n)=>{e.issues.push(n),e.message=JSON.stringify(e.issues,Ln,2)}},addIssues:{value:(n)=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,Ln,2)}},isEmpty:{get(){return e.issues.length===0}}})},sP=_("ZodError",xy),nt=_("ZodError",xy,{Parent:Error});var Cg=Fn(nt),qg=Jn(nt),Hi=Hn(nt),Ag=Kn(nt),Mg=js(nt),Ug=Os(nt),Dg=Ns(nt),Lg=Cs(nt),Zg=qs(nt),Vg=As(nt),Fg=Ms(nt),Jg=Us(nt);var ky=new WeakMap;function Bi(e,t,n){let o=Object.getPrototypeOf(e),r=ky.get(o);if(!r)r=new Set,ky.set(o,r);if(r.has(t))return;r.add(t);for(let i in n){let a=n[i];Object.defineProperty(o,i,{configurable:!0,enumerable:!1,get(){let s=a.bind(this);return Object.defineProperty(this,i,{configurable:!0,writable:!0,enumerable:!0,value:s}),s},set(s){Object.defineProperty(this,i,{configurable:!0,writable:!0,enumerable:!0,value:s})}})}}var oe=_("ZodType",(e,t)=>(Q.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:lo(e,"input"),output:lo(e,"output")}}),e.toJSONSchema=Hh(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(n,o)=>Cg(e,n,o,{callee:e.parse}),e.safeParse=(n,o)=>Hi(e,n,o),e.parseAsync=async(n,o)=>qg(e,n,o,{callee:e.parseAsync}),e.safeParseAsync=async(n,o)=>Ag(e,n,o),e.spa=e.safeParseAsync,e.encode=(n,o)=>Mg(e,n,o),e.decode=(n,o)=>Ug(e,n,o),e.encodeAsync=async(n,o)=>Dg(e,n,o),e.decodeAsync=async(n,o)=>Lg(e,n,o),e.safeEncode=(n,o)=>Zg(e,n,o),e.safeDecode=(n,o)=>Vg(e,n,o),e.safeEncodeAsync=async(n,o)=>Fg(e,n,o),e.safeDecodeAsync=async(n,o)=>Jg(e,n,o),Bi(e,"ZodType",{check(...n){let o=this.def;return this.clone(I.mergeDefs(o,{checks:[...o.checks??[],...n.map((r)=>typeof r==="function"?{_zod:{check:r,def:{check:"custom"},onattach:[]}}:r)]}),{parent:!0})},with(...n){return this.check(...n)},clone(n,o){return Je(this,n,o)},brand(){return this},register(n,o){return n.add(this,o),this},refine(n,o){return this.check(Ev(n,o))},superRefine(n,o){return this.check(Tv(n,o))},overwrite(n){return this.check(Pt(n))},optional(){return J(this)},exactOptional(){return mv(this)},nullable(){return Gi(this)},nullish(){return J(Gi(this))},nonoptional(n){return _v(this,n)},array(){return S(this)},or(n){return A([this,n])},and(n){return Et(this,n)},transform(n){return Nc(this,rl(n))},default(n){return hv(this,n)},prefault(n){return vv(this,n)},catch(n){return bv(this,n)},pipe(n){return Nc(this,n)},readonly(){return Rv(this)},describe(n){let o=this.clone();return Te.add(o,{description:n}),o},meta(...n){if(n.length===0)return Te.get(this);let o=this.clone();return Te.add(o,n[0]),o},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(n){return n(this)}}),Object.defineProperty(e,"description",{get(){return Te.get(e)?.description},configurable:!0}),e)),Cc=_("_ZodString",(e,t)=>{un.init(e,t),oe.init(e,t),e._zod.processJSONSchema=(o,r,i)=>Kh(e,o,r,i);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,Bi(e,"_ZodString",{regex(...o){return this.check(Wn(...o))},includes(...o){return this.check(Qn(...o))},startsWith(...o){return this.check(eo(...o))},endsWith(...o){return this.check(to(...o))},min(...o){return this.check(or(...o))},max(...o){return this.check(mn(...o))},length(...o){return this.check(pn(...o))},nonempty(...o){return this.check(or(1,...o))},lowercase(o){return this.check(Yn(o))},uppercase(o){return this.check(Xn(o))},trim(){return this.check(oo())},normalize(...o){return this.check(no(...o))},toLowerCase(){return this.check(io())},toUpperCase(){return this.check(ao())},slugify(){return this.check(so())}})}),po=_("ZodString",(e,t)=>{un.init(e,t),Cc.init(e,t),e.email=(n)=>e.check(ec(qc,n)),e.url=(n)=>e.check(Fi(Wi,n)),e.jwt=(n)=>e.check(Sc(Xc,n)),e.emoji=(n)=>e.check(ic(Mc,n)),e.guid=(n)=>e.check(Vi(Ki,n)),e.uuid=(n)=>e.check(tc(Bt,n)),e.uuidv4=(n)=>e.check(rc(Bt,n)),e.uuidv6=(n)=>e.check(nc(Bt,n)),e.uuidv7=(n)=>e.check(oc(Bt,n)),e.nanoid=(n)=>e.check(ac(Uc,n)),e.guid=(n)=>e.check(Vi(Ki,n)),e.cuid=(n)=>e.check(sc(Dc,n)),e.cuid2=(n)=>e.check(cc(Lc,n)),e.ulid=(n)=>e.check(lc(Zc,n)),e.base64=(n)=>e.check(gc(Bc,n)),e.base64url=(n)=>e.check(vc(Wc,n)),e.xid=(n)=>e.check(uc(Vc,n)),e.ksuid=(n)=>e.check(dc(Fc,n)),e.ipv4=(n)=>e.check(mc(Jc,n)),e.ipv6=(n)=>e.check(pc(Hc,n)),e.cidrv4=(n)=>e.check(fc(Kc,n)),e.cidrv6=(n)=>e.check(hc(Gc,n)),e.e164=(n)=>e.check(_c(Yc,n)),e.datetime=(n)=>e.check(Tg(n)),e.date=(n)=>e.check(jg(n)),e.time=(n)=>e.check(Og(n)),e.duration=(n)=>e.check(Ng(n))});function u(e){return sh(po,e)}var he=_("ZodStringFormat",(e,t)=>{fe.init(e,t),Cc.init(e,t)}),qc=_("ZodEmail",(e,t)=>{tp.init(e,t),he.init(e,t)});function Ac(e){return ec(qc,e)}var Ki=_("ZodGUID",(e,t)=>{Qm.init(e,t),he.init(e,t)});function Iy(e){return Vi(Ki,e)}var Bt=_("ZodUUID",(e,t)=>{ep.init(e,t),he.init(e,t)});function Py(e){return tc(Bt,e)}function Ey(e){return rc(Bt,e)}function Ty(e){return nc(Bt,e)}function jy(e){return oc(Bt,e)}var Wi=_("ZodURL",(e,t)=>{rp.init(e,t),he.init(e,t)});function fo(e){return Fi(Wi,e)}function Oy(e){return Fi(Wi,{protocol:pt.httpProtocol,hostname:pt.domain,...I.normalizeParams(e)})}var Mc=_("ZodEmoji",(e,t)=>{np.init(e,t),he.init(e,t)});function Ny(e){return ic(Mc,e)}var Uc=_("ZodNanoID",(e,t)=>{op.init(e,t),he.init(e,t)});function Cy(e){return ac(Uc,e)}var Dc=_("ZodCUID",(e,t)=>{ip.init(e,t),he.init(e,t)});function qy(e){return sc(Dc,e)}var Lc=_("ZodCUID2",(e,t)=>{ap.init(e,t),he.init(e,t)});function Ay(e){return cc(Lc,e)}var Zc=_("ZodULID",(e,t)=>{sp.init(e,t),he.init(e,t)});function My(e){return lc(Zc,e)}var Vc=_("ZodXID",(e,t)=>{cp.init(e,t),he.init(e,t)});function Uy(e){return uc(Vc,e)}var Fc=_("ZodKSUID",(e,t)=>{lp.init(e,t),he.init(e,t)});function Dy(e){return dc(Fc,e)}var Jc=_("ZodIPv4",(e,t)=>{fp.init(e,t),he.init(e,t)});function Ly(e){return mc(Jc,e)}var Hg=_("ZodMAC",(e,t)=>{gp.init(e,t),he.init(e,t)});function Zy(e){return lh(Hg,e)}var Hc=_("ZodIPv6",(e,t)=>{hp.init(e,t),he.init(e,t)});function Vy(e){return pc(Hc,e)}var Kc=_("ZodCIDRv4",(e,t)=>{vp.init(e,t),he.init(e,t)});function Fy(e){return fc(Kc,e)}var Gc=_("ZodCIDRv6",(e,t)=>{_p.init(e,t),he.init(e,t)});function Jy(e){return hc(Gc,e)}var Bc=_("ZodBase64",(e,t)=>{yp.init(e,t),he.init(e,t)});function Hy(e){return gc(Bc,e)}var Wc=_("ZodBase64URL",(e,t)=>{bp.init(e,t),he.init(e,t)});function Ky(e){return vc(Wc,e)}var Yc=_("ZodE164",(e,t)=>{$p.init(e,t),he.init(e,t)});function Gy(e){return _c(Yc,e)}var Xc=_("ZodJWT",(e,t)=>{zp.init(e,t),he.init(e,t)});function By(e){return Sc(Xc,e)}var ho=_("ZodCustomStringFormat",(e,t)=>{wp.init(e,t),he.init(e,t)});function Wy(e,t,n={}){return co(ho,e,t,n)}function Yy(e){return co(ho,"hostname",pt.hostname,e)}function Xy(e){return co(ho,"hex",pt.hex,e)}function Qy(e,t){let n=t?.enc??"hex",o=`${e}_${n}`,r=pt[o];if(!r)throw Error(`Unrecognized hash format: ${o}`);return co(ho,o,r,t)}var go=_("ZodNumber",(e,t)=>{Gs.init(e,t),oe.init(e,t),e._zod.processJSONSchema=(o,r,i)=>Gh(e,o,r,i),Bi(e,"ZodNumber",{gt(o,r){return this.check(Kt(o,r))},gte(o,r){return this.check(Ke(o,r))},min(o,r){return this.check(Ke(o,r))},lt(o,r){return this.check(Ht(o,r))},lte(o,r){return this.check(ft(o,r))},max(o,r){return this.check(ft(o,r))},int(o){return this.check(Oc(o))},safe(o){return this.check(Oc(o))},positive(o){return this.check(Kt(0,o))},nonnegative(o){return this.check(Ke(0,o))},negative(o){return this.check(Ht(0,o))},nonpositive(o){return this.check(ft(0,o))},multipleOf(o,r){return this.check(Rr(o,r))},step(o,r){return this.check(Rr(o,r))},finite(){return this}});let n=e._zod.bag;e.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??0.5),e.isFinite=!0,e.format=n.format??null});function R(e){return hh(go,e)}var hn=_("ZodNumberFormat",(e,t)=>{Rp.init(e,t),go.init(e,t)});function Oc(e){return vh(hn,e)}function eb(e){return _h(hn,e)}function tb(e){return Sh(hn,e)}function rb(e){return yh(hn,e)}function nb(e){return bh(hn,e)}var vo=_("ZodBoolean",(e,t)=>{Ci.init(e,t),oe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Bh(e,n,o,r)});function C(e){return $h(vo,e)}var _o=_("ZodBigInt",(e,t)=>{Bs.init(e,t),oe.init(e,t),e._zod.processJSONSchema=(o,r,i)=>Wh(e,o,r,i),e.gte=(o,r)=>e.check(Ke(o,r)),e.min=(o,r)=>e.check(Ke(o,r)),e.gt=(o,r)=>e.check(Kt(o,r)),e.gte=(o,r)=>e.check(Ke(o,r)),e.min=(o,r)=>e.check(Ke(o,r)),e.lt=(o,r)=>e.check(Ht(o,r)),e.lte=(o,r)=>e.check(ft(o,r)),e.max=(o,r)=>e.check(ft(o,r)),e.positive=(o)=>e.check(Kt(BigInt(0),o)),e.negative=(o)=>e.check(Ht(BigInt(0),o)),e.nonpositive=(o)=>e.check(ft(BigInt(0),o)),e.nonnegative=(o)=>e.check(Ke(BigInt(0),o)),e.multipleOf=(o,r)=>e.check(Rr(o,r));let n=e._zod.bag;e.minValue=n.minimum??null,e.maxValue=n.maximum??null,e.format=n.format??null});function ob(e){return wh(_o,e)}var Qc=_("ZodBigIntFormat",(e,t)=>{xp.init(e,t),_o.init(e,t)});function ib(e){return xh(Qc,e)}function ab(e){return kh(Qc,e)}var Kg=_("ZodSymbol",(e,t)=>{kp.init(e,t),oe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Yh(e,n,o,r)});function sb(e){return Ih(Kg,e)}var Gg=_("ZodUndefined",(e,t)=>{Ip.init(e,t),oe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Qh(e,n,o,r)});function cb(e){return Ph(Gg,e)}var Bg=_("ZodNull",(e,t)=>{Pp.init(e,t),oe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Xh(e,n,o,r)});function Wt(e){return Eh(Bg,e)}var Wg=_("ZodAny",(e,t)=>{Ep.init(e,t),oe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>rg(e,n,o,r)});function el(){return Th(Wg)}var Yg=_("ZodUnknown",(e,t)=>{Tp.init(e,t),oe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>ng(e,n,o,r)});function F(){return jh(Yg)}var Xg=_("ZodNever",(e,t)=>{jp.init(e,t),oe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>tg(e,n,o,r)});function tl(e){return Oh(Xg,e)}var Qg=_("ZodVoid",(e,t)=>{Op.init(e,t),oe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>eg(e,n,o,r)});function lb(e){return Nh(Qg,e)}var Yi=_("ZodDate",(e,t)=>{Np.init(e,t),oe.init(e,t),e._zod.processJSONSchema=(o,r,i)=>og(e,o,r,i),e.min=(o,r)=>e.check(Ke(o,r)),e.max=(o,r)=>e.check(ft(o,r));let n=e._zod.bag;e.minDate=n.minimum?new Date(n.minimum):null,e.maxDate=n.maximum?new Date(n.maximum):null});function ub(e){return Ch(Yi,e)}var ev=_("ZodArray",(e,t)=>{Cp.init(e,t),oe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>gg(e,n,o,r),e.element=t.element,Bi(e,"ZodArray",{min(n,o){return this.check(or(n,o))},nonempty(n){return this.check(or(1,n))},max(n,o){return this.check(mn(n,o))},length(n,o){return this.check(pn(n,o))},unwrap(){return this.element}})});function S(e,t){return Mh(ev,e,t)}function db(e){let t=e._zod.def.shape;return X(Object.keys(t))}var Xi=_("ZodObject",(e,t)=>{qp.init(e,t),oe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>vg(e,n,o,r),I.defineLazy(e,"shape",()=>t.shape),Bi(e,"ZodObject",{keyof(){return X(Object.keys(this._zod.def.shape))},catchall(n){return this.clone({...this._zod.def,catchall:n})},passthrough(){return this.clone({...this._zod.def,catchall:F()})},loose(){return this.clone({...this._zod.def,catchall:F()})},strict(){return this.clone({...this._zod.def,catchall:tl()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(n){return I.extend(this,n)},safeExtend(n){return I.safeExtend(this,n)},merge(n){return I.merge(this,n)},pick(n){return I.pick(this,n)},omit(n){return I.omit(this,n)},partial(...n){return I.partial(nl,this,n[0])},required(...n){return I.required(ol,this,n[0])}})});function h(e,t){let n={type:"object",shape:e??{},...I.normalizeParams(t)};return new Xi(n)}function mb(e,t){return new Xi({type:"object",shape:e,catchall:tl(),...I.normalizeParams(t)})}function H(e,t){return new Xi({type:"object",shape:e,catchall:F(),...I.normalizeParams(t)})}var Qi=_("ZodUnion",(e,t)=>{qi.init(e,t),oe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>xc(e,n,o,r),e.options=t.options});function A(e,t){return new Qi({type:"union",options:e,...I.normalizeParams(t)})}var tv=_("ZodXor",(e,t)=>{Qi.init(e,t),Ap.init(e,t),e._zod.processJSONSchema=(n,o,r)=>xc(e,n,o,r),e.options=t.options});function pb(e,t){return new tv({type:"union",options:e,inclusive:!1,...I.normalizeParams(t)})}var rv=_("ZodDiscriminatedUnion",(e,t)=>{Qi.init(e,t),Mp.init(e,t)});function Er(e,t,n){return new rv({type:"union",options:t,discriminator:e,...I.normalizeParams(n)})}var nv=_("ZodIntersection",(e,t)=>{Up.init(e,t),oe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>_g(e,n,o,r)});function Et(e,t){return new nv({type:"intersection",left:e,right:t})}var ov=_("ZodTuple",(e,t)=>{Ws.init(e,t),oe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Sg(e,n,o,r),e.rest=(n)=>e.clone({...e._zod.def,rest:n})});function iv(e,t,n){let o=t instanceof Q,r=o?n:t;return new ov({type:"tuple",items:e,rest:o?t:null,...I.normalizeParams(r)})}var uo=_("ZodRecord",(e,t)=>{Dp.init(e,t),oe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>yg(e,n,o,r),e.keyType=t.keyType,e.valueType=t.valueType});function j(e,t,n){if(!t||!t._zod)return new uo({type:"record",keyType:u(),valueType:e,...I.normalizeParams(t)});return new uo({type:"record",keyType:e,valueType:t,...I.normalizeParams(n)})}function fb(e,t,n){let o=Je(e);return o._zod.values=void 0,new uo({type:"record",keyType:o,valueType:t,...I.normalizeParams(n)})}function hb(e,t,n){return new uo({type:"record",keyType:e,valueType:t,mode:"loose",...I.normalizeParams(n)})}var av=_("ZodMap",(e,t)=>{Lp.init(e,t),oe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>fg(e,n,o,r),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...n)=>e.check(Gt(...n)),e.nonempty=(n)=>e.check(Gt(1,n)),e.max=(...n)=>e.check(xr(...n)),e.size=(...n)=>e.check(dn(...n))});function gb(e,t,n){return new av({type:"map",keyType:e,valueType:t,...I.normalizeParams(n)})}var sv=_("ZodSet",(e,t)=>{Zp.init(e,t),oe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>hg(e,n,o,r),e.min=(...n)=>e.check(Gt(...n)),e.nonempty=(n)=>e.check(Gt(1,n)),e.max=(...n)=>e.check(xr(...n)),e.size=(...n)=>e.check(dn(...n))});function vb(e,t){return new sv({type:"set",valueType:e,...I.normalizeParams(t)})}var mo=_("ZodEnum",(e,t)=>{Vp.init(e,t),oe.init(e,t),e._zod.processJSONSchema=(o,r,i)=>ig(e,o,r,i),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(o,r)=>{let i={};for(let a of o)if(n.has(a))i[a]=t.entries[a];else throw Error(`Key ${a} not found in enum`);return new mo({...t,checks:[],...I.normalizeParams(r),entries:i})},e.exclude=(o,r)=>{let i={...t.entries};for(let a of o)if(n.has(a))delete i[a];else throw Error(`Key ${a} not found in enum`);return new mo({...t,checks:[],...I.normalizeParams(r),entries:i})}});function X(e,t){let n=Array.isArray(e)?Object.fromEntries(e.map((o)=>[o,o])):e;return new mo({type:"enum",entries:n,...I.normalizeParams(t)})}function _b(e,t){return new mo({type:"enum",entries:e,...I.normalizeParams(t)})}var cv=_("ZodLiteral",(e,t)=>{Fp.init(e,t),oe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>ag(e,n,o,r),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function y(e,t){return new cv({type:"literal",values:Array.isArray(e)?e:[e],...I.normalizeParams(t)})}var lv=_("ZodFile",(e,t)=>{Jp.init(e,t),oe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>lg(e,n,o,r),e.min=(n,o)=>e.check(Gt(n,o)),e.max=(n,o)=>e.check(xr(n,o)),e.mime=(n,o)=>e.check(ro(Array.isArray(n)?n:[n],o))});function Sb(e){return Uh(lv,e)}var uv=_("ZodTransform",(e,t)=>{Hp.init(e,t),oe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>pg(e,n,o,r),e._zod.parse=(n,o)=>{if(o.direction==="backward")throw new sn(e.constructor.name);n.addIssue=(i)=>{if(typeof i==="string")n.issues.push(I.issue(i,n.value,t));else{let a=i;if(a.fatal)a.continue=!1;a.code??(a.code="custom"),a.input??(a.input=n.value),a.inst??(a.inst=e),n.issues.push(I.issue(a))}};let r=t.transform(n.value,n);if(r instanceof Promise)return r.then((i)=>(n.value=i,n.fallback=!0,n));return n.value=r,n.fallback=!0,n}});function rl(e){return new uv({type:"transform",transform:e})}var nl=_("ZodOptional",(e,t)=>{Ys.init(e,t),oe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>kc(e,n,o,r),e.unwrap=()=>e._zod.def.innerType});function J(e){return new nl({type:"optional",innerType:e})}var dv=_("ZodExactOptional",(e,t)=>{Kp.init(e,t),oe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>kc(e,n,o,r),e.unwrap=()=>e._zod.def.innerType});function mv(e){return new dv({type:"optional",innerType:e})}var pv=_("ZodNullable",(e,t)=>{Gp.init(e,t),oe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>bg(e,n,o,r),e.unwrap=()=>e._zod.def.innerType});function Gi(e){return new pv({type:"nullable",innerType:e})}function yb(e){return J(Gi(e))}var fv=_("ZodDefault",(e,t)=>{Bp.init(e,t),oe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>zg(e,n,o,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function hv(e,t){return new fv({type:"default",innerType:e,get defaultValue(){return typeof t==="function"?t():I.shallowClone(t)}})}var gv=_("ZodPrefault",(e,t)=>{Wp.init(e,t),oe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>wg(e,n,o,r),e.unwrap=()=>e._zod.def.innerType});function vv(e,t){return new gv({type:"prefault",innerType:e,get defaultValue(){return typeof t==="function"?t():I.shallowClone(t)}})}var ol=_("ZodNonOptional",(e,t)=>{Yp.init(e,t),oe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>$g(e,n,o,r),e.unwrap=()=>e._zod.def.innerType});function _v(e,t){return new ol({type:"nonoptional",innerType:e,...I.normalizeParams(t)})}var Sv=_("ZodSuccess",(e,t)=>{Xp.init(e,t),oe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>ug(e,n,o,r),e.unwrap=()=>e._zod.def.innerType});function bb(e){return new Sv({type:"success",innerType:e})}var yv=_("ZodCatch",(e,t)=>{Qp.init(e,t),oe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Rg(e,n,o,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function bv(e,t){return new yv({type:"catch",innerType:e,catchValue:typeof t==="function"?t:()=>t})}var $v=_("ZodNaN",(e,t)=>{ef.init(e,t),oe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>sg(e,n,o,r)});function $b(e){return Ah($v,e)}var ea=_("ZodPipe",(e,t)=>{Xs.init(e,t),oe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>xg(e,n,o,r),e.in=t.in,e.out=t.out});function Nc(e,t){return new ea({type:"pipe",in:e,out:t})}var ta=_("ZodCodec",(e,t)=>{ea.init(e,t),Ai.init(e,t)});function zb(e,t,n){return new ta({type:"pipe",in:e,out:t,transform:n.decode,reverseTransform:n.encode})}function wb(e){let t=e._zod.def;return new ta({type:"pipe",in:t.out,out:t.in,transform:t.reverseTransform,reverseTransform:t.transform})}var zv=_("ZodPreprocess",(e,t)=>{ea.init(e,t),tf.init(e,t)}),wv=_("ZodReadonly",(e,t)=>{rf.init(e,t),oe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>kg(e,n,o,r),e.unwrap=()=>e._zod.def.innerType});function Rv(e){return new wv({type:"readonly",innerType:e})}var xv=_("ZodTemplateLiteral",(e,t)=>{nf.init(e,t),oe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>cg(e,n,o,r)});function Rb(e,t){return new xv({type:"template_literal",parts:e,...I.normalizeParams(t)})}var kv=_("ZodLazy",(e,t)=>{sf.init(e,t),oe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Pg(e,n,o,r),e.unwrap=()=>e._zod.def.getter()});function Tr(e){return new kv({type:"lazy",getter:e})}var Iv=_("ZodPromise",(e,t)=>{af.init(e,t),oe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Ig(e,n,o,r),e.unwrap=()=>e._zod.def.innerType});function xb(e){return new Iv({type:"promise",innerType:e})}var Pv=_("ZodFunction",(e,t)=>{of.init(e,t),oe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>mg(e,n,o,r)});function kb(e){return new Pv({type:"function",input:Array.isArray(e?.input)?iv(e?.input):e?.input??S(F()),output:e?.output??F()})}var ra=_("ZodCustom",(e,t)=>{cf.init(e,t),oe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>dg(e,n,o,r)});function Ib(e){let t=new ge({check:"custom"});return t._zod.check=e,t}function Pb(e,t){return Dh(ra,e??(()=>!0),t)}function Ev(e,t={}){return Lh(ra,e,t)}function Tv(e,t){return Zh(e,t)}var Eb=Vh,Tb=Fh;function jb(e,t={}){let n=new ra({type:"custom",check:"custom",fn:(o)=>o instanceof e,abort:!0,...I.normalizeParams(t)});return n._zod.bag.Class=e,n._zod.check=(o)=>{if(!(o.value instanceof e))o.issues.push({code:"invalid_type",expected:e.name,input:o.value,inst:n,path:[...n._zod.def.path??[]]})},n}var Ob=(...e)=>Jh({Codec:ta,Boolean:vo,String:po},...e);function Nb(e){let t=Tr(()=>A([u(e),R(),C(),Wt(),S(t),j(u(),t)]));return t}function ar(e,t){return new zv({type:"pipe",in:rl(e),out:t})}var Ov={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 lP(e){be({customError:e})}function uP(){return be().customError}var jv;(function(e){})(jv||(jv={}));var q={...Ji,...Ic,iso:ht},dP=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 mP(e,t){let n=e.$schema;if(n==="https://json-schema.org/draft/2020-12/schema")return"draft-2020-12";if(n==="http://json-schema.org/draft-07/schema#")return"draft-7";if(n==="http://json-schema.org/draft-04/schema#")return"draft-4";return t??"draft-2020-12"}function pP(e,t){if(!e.startsWith("#"))throw Error("External $ref is not supported, only local refs (#/...) are allowed");let n=e.slice(1).split("/").filter(Boolean);if(n.length===0)return t.rootSchema;let o=t.version==="draft-2020-12"?"$defs":"definitions";if(n[0]===o){let r=n[1];if(!r||!t.defs[r])throw Error(`Reference not found: ${e}`);return t.defs[r]}throw Error(`Reference not found: ${e}`)}function Cb(e,t){if(e.not!==void 0){if(typeof e.not==="object"&&Object.keys(e.not).length===0)return q.never();throw Error("not is not supported in Zod (except { not: {} } for never)")}if(e.unevaluatedItems!==void 0)throw Error("unevaluatedItems is not supported");if(e.unevaluatedProperties!==void 0)throw Error("unevaluatedProperties is not supported");if(e.if!==void 0||e.then!==void 0||e.else!==void 0)throw Error("Conditional schemas (if/then/else) are not supported");if(e.dependentSchemas!==void 0||e.dependentRequired!==void 0)throw Error("dependentSchemas and dependentRequired are not supported");if(e.$ref){let r=e.$ref;if(t.refs.has(r))return t.refs.get(r);if(t.processing.has(r))return q.lazy(()=>{if(!t.refs.has(r))throw Error(`Circular reference not resolved: ${r}`);return t.refs.get(r)});t.processing.add(r);let i=pP(r,t),a=Ae(i,t);return t.refs.set(r,a),t.processing.delete(r),a}if(e.enum!==void 0){let r=e.enum;if(t.version==="openapi-3.0"&&e.nullable===!0&&r.length===1&&r[0]===null)return q.null();if(r.length===0)return q.never();if(r.length===1)return q.literal(r[0]);if(r.every((a)=>typeof a==="string"))return q.enum(r);let i=r.map((a)=>q.literal(a));if(i.length<2)return i[0];return q.union([i[0],i[1],...i.slice(2)])}if(e.const!==void 0)return q.literal(e.const);let n=e.type;if(Array.isArray(n)){let r=n.map((i)=>{let a={...e,type:i};return Cb(a,t)});if(r.length===0)return q.never();if(r.length===1)return r[0];return q.union(r)}if(!n)return q.any();let o;switch(n){case"string":{let r=q.string();if(e.format){let i=e.format;if(i==="email")r=r.check(q.email());else if(i==="uri"||i==="uri-reference")r=r.check(q.url());else if(i==="uuid"||i==="guid")r=r.check(q.uuid());else if(i==="date-time")r=r.check(q.iso.datetime());else if(i==="date")r=r.check(q.iso.date());else if(i==="time")r=r.check(q.iso.time());else if(i==="duration")r=r.check(q.iso.duration());else if(i==="ipv4")r=r.check(q.ipv4());else if(i==="ipv6")r=r.check(q.ipv6());else if(i==="mac")r=r.check(q.mac());else if(i==="cidr")r=r.check(q.cidrv4());else if(i==="cidr-v6")r=r.check(q.cidrv6());else if(i==="base64")r=r.check(q.base64());else if(i==="base64url")r=r.check(q.base64url());else if(i==="e164")r=r.check(q.e164());else if(i==="jwt")r=r.check(q.jwt());else if(i==="emoji")r=r.check(q.emoji());else if(i==="nanoid")r=r.check(q.nanoid());else if(i==="cuid")r=r.check(q.cuid());else if(i==="cuid2")r=r.check(q.cuid2());else if(i==="ulid")r=r.check(q.ulid());else if(i==="xid")r=r.check(q.xid());else if(i==="ksuid")r=r.check(q.ksuid())}if(typeof e.minLength==="number")r=r.min(e.minLength);if(typeof e.maxLength==="number")r=r.max(e.maxLength);if(e.pattern)r=r.regex(new RegExp(e.pattern));o=r;break}case"number":case"integer":{let r=n==="integer"?q.number().int():q.number();if(typeof e.minimum==="number")r=r.min(e.minimum);if(typeof e.maximum==="number")r=r.max(e.maximum);if(typeof e.exclusiveMinimum==="number")r=r.gt(e.exclusiveMinimum);else if(e.exclusiveMinimum===!0&&typeof e.minimum==="number")r=r.gt(e.minimum);if(typeof e.exclusiveMaximum==="number")r=r.lt(e.exclusiveMaximum);else if(e.exclusiveMaximum===!0&&typeof e.maximum==="number")r=r.lt(e.maximum);if(typeof e.multipleOf==="number")r=r.multipleOf(e.multipleOf);o=r;break}case"boolean":{o=q.boolean();break}case"null":{o=q.null();break}case"object":{let r={},i=e.properties||{},a=new Set(e.required||[]);for(let[c,l]of Object.entries(i)){let d=Ae(l,t);r[c]=a.has(c)?d:d.optional()}if(e.propertyNames){let c=Ae(e.propertyNames,t),l=e.additionalProperties&&typeof e.additionalProperties==="object"?Ae(e.additionalProperties,t):q.any();if(Object.keys(r).length===0){o=q.record(c,l);break}let d=q.object(r).passthrough(),m=q.looseRecord(c,l);o=q.intersection(d,m);break}if(e.patternProperties){let c=e.patternProperties,l=Object.keys(c),d=[];for(let p of l){let f=Ae(c[p],t),v=q.string().regex(new RegExp(p));d.push(q.looseRecord(v,f))}let m=[];if(Object.keys(r).length>0)m.push(q.object(r).passthrough());if(m.push(...d),m.length===0)o=q.object({}).passthrough();else if(m.length===1)o=m[0];else{let p=q.intersection(m[0],m[1]);for(let f=2;f<m.length;f++)p=q.intersection(p,m[f]);o=p}break}let s=q.object(r);if(e.additionalProperties===!1)o=s.strict();else if(typeof e.additionalProperties==="object")o=s.catchall(Ae(e.additionalProperties,t));else o=s.passthrough();break}case"array":{let{prefixItems:r,items:i}=e;if(r&&Array.isArray(r)){let a=r.map((c)=>Ae(c,t)),s=i&&typeof i==="object"&&!Array.isArray(i)?Ae(i,t):void 0;if(s)o=q.tuple(a).rest(s);else o=q.tuple(a);if(typeof e.minItems==="number")o=o.check(q.minLength(e.minItems));if(typeof e.maxItems==="number")o=o.check(q.maxLength(e.maxItems))}else if(Array.isArray(i)){let a=i.map((c)=>Ae(c,t)),s=e.additionalItems&&typeof e.additionalItems==="object"?Ae(e.additionalItems,t):void 0;if(s)o=q.tuple(a).rest(s);else o=q.tuple(a);if(typeof e.minItems==="number")o=o.check(q.minLength(e.minItems));if(typeof e.maxItems==="number")o=o.check(q.maxLength(e.maxItems))}else if(i!==void 0){let a=Ae(i,t),s=q.array(a);if(typeof e.minItems==="number")s=s.min(e.minItems);if(typeof e.maxItems==="number")s=s.max(e.maxItems);o=s}else o=q.array(q.any());break}default:throw Error(`Unsupported type: ${n}`)}return o}function Ae(e,t){if(typeof e==="boolean")return e?q.any():q.never();let n=Cb(e,t),o=e.type||e.enum!==void 0||e.const!==void 0;if(e.anyOf&&Array.isArray(e.anyOf)){let s=e.anyOf.map((l)=>Ae(l,t)),c=q.union(s);n=o?q.intersection(n,c):c}if(e.oneOf&&Array.isArray(e.oneOf)){let s=e.oneOf.map((l)=>Ae(l,t)),c=q.xor(s);n=o?q.intersection(n,c):c}if(e.allOf&&Array.isArray(e.allOf))if(e.allOf.length===0)n=o?n:q.any();else{let s=o?n:Ae(e.allOf[0],t),c=o?0:1;for(let l=c;l<e.allOf.length;l++)s=q.intersection(s,Ae(e.allOf[l],t));n=s}if(e.nullable===!0&&t.version==="openapi-3.0")n=q.nullable(n);if(e.readOnly===!0)n=q.readonly(n);if(e.default!==void 0)n=n.default(e.default);let r={},i=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(let s of i)if(s in e)r[s]=e[s];let a=["contentEncoding","contentMediaType","contentSchema"];for(let s of a)if(s in e)r[s]=e[s];for(let s of Object.keys(e))if(!dP.has(s))r[s]=e[s];if(Object.keys(r).length>0)t.registry.add(n,r);if(e.description)n=n.describe(e.description);return n}function qb(e,t){if(typeof e==="boolean")return e?q.any():q.never();let n;try{n=JSON.parse(JSON.stringify(e))}catch{throw Error("fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas")}let o=mP(n,t?.defaultTarget),r=n.$defs||n.definitions||{},i={version:o,defs:r,refs:new Map,processing:new Set,rootSchema:n,registry:t?.registry??Te};return Ae(n,i)}var na={};rr(na,{bigint:()=>vP,boolean:()=>gP,date:()=>_P,number:()=>hP,string:()=>fP});function fP(e){return ch(po,e)}function hP(e){return gh(go,e)}function gP(e){return zh(vo,e)}function vP(e){return Rh(_o,e)}function _P(e){return qh(Yi,e)}be(Mi());var vn="2025-11-25",il="2025-03-26",oa=[vn,"2025-06-18","2025-03-26","2024-11-05","2024-10-07"],al="io.modelcontextprotocol/related-task",_n="io.modelcontextprotocol/protocolVersion",So="io.modelcontextprotocol/clientInfo",cr="io.modelcontextprotocol/serverInfo",lr="io.modelcontextprotocol/clientCapabilities",ia="io.modelcontextprotocol/subscriptionId",Or="io.modelcontextprotocol/logLevel";var Sn="2.0";var jr=Tr(()=>A([u(),R(),C(),Wt(),j(u(),jr),S(jr)])),$e=j(u(),jr),qv=S(jr),aa=A([u(),R().int()]),sa=u(),sl=h({ttl:R().optional()}),cl=h({taskId:u()}),ca=H({progressToken:aa.optional(),[al]:cl.optional()}),Ee=h({_meta:ca.optional()}),yn=Ee.extend({task:sl.optional()}),ze=h({method:u(),params:Ee.loose().optional()}),Me=h({_meta:ca.optional()}),Ue=h({method:u(),params:Me.loose().optional()}),la=H({get[cr](){return zo.optional().catch(void 0)}}),we=H({_meta:la.optional()}),Nr=A([u(),R().int()]),ua=h({jsonrpc:y(Sn),id:Nr,...ze.shape}).strict(),da=h({jsonrpc:y(Sn),...Ue.shape}).strict(),yo=h({jsonrpc:y(Sn),id:Nr,result:we}).strict(),bo=h({jsonrpc:y(Sn),id:Nr.optional(),error:h({code:R().int(),message:u(),data:F().optional()})}).strict(),$o=A([ua,da,yo,bo]),Av=A([yo,bo]),ma=we.strict(),ll=Me.extend({requestId:Nr.optional(),reason:u().optional()}),pa=Ue.extend({method:y("notifications/cancelled"),params:ll}),ul=h({src:u(),mimeType:u().optional(),sizes:S(u()).optional(),theme:X(["light","dark"]).optional()}),Cr=h({icons:S(ul).optional()}),sr=h({name:u(),title:u().optional()}),zo=sr.extend({...sr.shape,...Cr.shape,version:u(),websiteUrl:u().optional(),description:u().optional()}),yP=Et(h({applyDefaults:C().optional()}),$e),bP=ar((e)=>{if(e&&typeof e==="object"&&!Array.isArray(e)&&Object.keys(e).length===0)return{form:{}};return e},Et(h({form:yP.optional(),url:$e.optional()}),$e.optional())),dl=H({list:$e.optional(),cancel:$e.optional(),requests:H({sampling:H({createMessage:$e.optional()}).optional(),elicitation:H({create:$e.optional()}).optional()}).optional()}),ml=H({list:$e.optional(),cancel:$e.optional(),requests:H({tools:H({call:$e.optional()}).optional()}).optional()}),pl=h({experimental:j(u(),$e).optional(),sampling:h({context:$e.optional(),tools:$e.optional()}).optional(),elicitation:bP.optional(),roots:h({listChanged:C().optional()}).optional(),tasks:dl.optional(),extensions:j(u(),$e).optional()}),fl=Ee.extend({protocolVersion:u(),capabilities:pl,clientInfo:zo}),fa=ze.extend({method:y("initialize"),params:fl}),ha=h({experimental:j(u(),$e).optional(),logging:$e.optional(),completions:$e.optional(),prompts:h({listChanged:C().optional()}).optional(),resources:h({subscribe:C().optional(),listChanged:C().optional()}).optional(),tools:h({listChanged:C().optional()}).optional(),tasks:ml.optional(),extensions:j(u(),$e).optional()}),hl=we.extend({protocolVersion:u(),capabilities:ha,serverInfo:zo,instructions:u().optional()}),gl=Ue.extend({method:y("notifications/initialized"),params:Me.optional()}),vl=ze.extend({method:y("server/discover"),params:Ee.optional()}),_l=we.extend({supportedVersions:S(u()),capabilities:ha,instructions:u().optional()}),ga=ze.extend({method:y("ping"),params:Ee.optional()}),Sl=h({progress:R(),total:J(R()),message:J(u())}),yl=h({...Me.shape,...Sl.shape,progressToken:aa}),va=Ue.extend({method:y("notifications/progress"),params:yl}),bl=Ee.extend({cursor:sa.optional()}),qr=ze.extend({params:bl.optional()}),Ar=we.extend({nextCursor:sa.optional()}),_a=h({uri:u(),mimeType:J(u()),_meta:j(u(),F()).optional()}),Sa=_a.extend({text:u()}),Mv=u().refine((e)=>{try{return atob(e),!0}catch{return!1}},{message:"Invalid Base64 string"}),ya=_a.extend({blob:Mv}),Mr=X(["user","assistant"]),ur=h({audience:S(Mr).optional(),priority:R().min(0).max(1).optional(),lastModified:ht.datetime({offset:!0}).optional()}),ba=h({...sr.shape,...Cr.shape,uri:u(),description:J(u()),mimeType:J(u()),size:J(R()),annotations:ur.optional(),_meta:J(H({}))}),$l=h({...sr.shape,...Cr.shape,uriTemplate:u(),description:J(u()),mimeType:J(u()),annotations:ur.optional(),_meta:J(H({}))}),zl=qr.extend({method:y("resources/list")}),wl=Ar.extend({resources:S(ba)}),Rl=qr.extend({method:y("resources/templates/list")}),xl=Ar.extend({resourceTemplates:S($l)}),wo=Ee.extend({uri:u()}),kl=wo,Il=ze.extend({method:y("resources/read"),params:kl}),Pl=we.extend({contents:S(A([Sa,ya]))}),El=Ue.extend({method:y("notifications/resources/list_changed"),params:Me.optional()}),Tl=wo,jl=ze.extend({method:y("resources/subscribe"),params:Tl}),Ol=wo,Nl=ze.extend({method:y("resources/unsubscribe"),params:Ol}),$a=h({toolsListChanged:C().optional(),promptsListChanged:C().optional(),resourcesListChanged:C().optional(),resourceSubscriptions:S(u()).optional()}),Cl=Ee.extend({notifications:$a}),ql=ze.extend({method:y("subscriptions/listen"),params:Cl}),Al=Me.extend({notifications:$a}),Ml=Ue.extend({method:y("notifications/subscriptions/acknowledged"),params:Al}),Ul=la.extend({[ia]:Nr}),Dl=we.extend({_meta:Ul}),Ll=Me.extend({uri:u()}),Zl=Ue.extend({method:y("notifications/resources/updated"),params:Ll}),Vl=h({name:u(),description:J(u()),required:J(C())}),Fl=h({...sr.shape,...Cr.shape,description:J(u()),arguments:J(S(Vl)),_meta:J(H({}))}),Jl=qr.extend({method:y("prompts/list")}),Hl=Ar.extend({prompts:S(Fl)}),Kl=Ee.extend({name:u(),arguments:j(u(),u()).optional()}),Gl=ze.extend({method:y("prompts/get"),params:Kl}),Ro=h({type:y("text"),text:u(),annotations:ur.optional(),_meta:j(u(),F()).optional()}),xo=h({type:y("image"),data:Mv,mimeType:u(),annotations:ur.optional(),_meta:j(u(),F()).optional()}),ko=h({type:y("audio"),data:Mv,mimeType:u(),annotations:ur.optional(),_meta:j(u(),F()).optional()}),Bl=h({type:y("tool_use"),name:u(),id:u(),input:j(u(),F()),_meta:j(u(),F()).optional()}),Wl=h({type:y("resource"),resource:A([Sa,ya]),annotations:ur.optional(),_meta:j(u(),F()).optional()}),Yl=ba.extend({type:y("resource_link")}),Io=A([Ro,xo,ko,Yl,Wl]),Xl=h({role:Mr,content:Io}),Ql=we.extend({description:u().optional(),messages:S(Xl)}),eu=Ue.extend({method:y("notifications/prompts/list_changed"),params:Me.optional()}),tu=h({title:u().optional(),readOnlyHint:C().optional(),destructiveHint:C().optional(),idempotentHint:C().optional(),openWorldHint:C().optional()}),ru=h({taskSupport:X(["required","optional","forbidden"]).optional()}),za=h({...sr.shape,...Cr.shape,description:u().optional(),inputSchema:h({type:y("object"),properties:j(u(),jr).optional(),required:S(u()).optional()}).catchall(F()),outputSchema:H({$schema:u().optional()}).optional(),annotations:tu.optional(),execution:ru.optional(),_meta:j(u(),F()).optional()}),nu=qr.extend({method:y("tools/list")}),ou=Ar.extend({tools:S(za)}),wa=we.extend({content:S(Io).default([]),structuredContent:F().optional(),isError:C().optional()}),Uv=wa.or(we.extend({toolResult:F()})),iu=yn.extend({name:u(),arguments:j(u(),F()).optional()}),au=ze.extend({method:y("tools/call"),params:iu}),su=Ue.extend({method:y("notifications/tools/list_changed"),params:Me.optional()}),Dv=h({autoRefresh:C().default(!0),debounceMs:R().int().nonnegative().default(300)}),Ur=X(["debug","info","notice","warning","error","critical","alert","emergency"]),cu=Ee.extend({level:Ur}),lu=ze.extend({method:y("logging/setLevel"),params:cu}),uu=Me.extend({level:Ur,logger:u().optional(),data:F()}),du=Ue.extend({method:y("notifications/message"),params:uu}),mu=h({name:u().optional()}),pu=h({hints:S(mu).optional(),costPriority:R().min(0).max(1).optional(),speedPriority:R().min(0).max(1).optional(),intelligencePriority:R().min(0).max(1).optional()}),fu=h({mode:X(["auto","required","none"]).optional()}),hu=h({type:y("tool_result"),toolUseId:u().describe("The unique identifier for the corresponding tool call."),content:S(Io),structuredContent:F().optional(),isError:C().optional(),_meta:j(u(),F()).optional()}),gu=Er("type",[Ro,xo,ko]),gn=Er("type",[Ro,xo,ko,Bl,hu]),vu=h({role:Mr,content:A([gn,S(gn)]),_meta:j(u(),F()).optional()}),_u=yn.extend({messages:S(vu),modelPreferences:pu.optional(),systemPrompt:u().optional(),includeContext:X(["none","thisServer","allServers"]).optional(),temperature:R().optional(),maxTokens:R().int(),stopSequences:S(u()).optional(),metadata:$e.optional(),tools:S(za).optional(),toolChoice:fu.optional()}),Su=ze.extend({method:y("sampling/createMessage"),params:_u}),yu=we.extend({model:u(),stopReason:J(X(["endTurn","stopSequence","maxTokens"]).or(u())),role:Mr,content:gu}),bu=we.extend({model:u(),stopReason:J(X(["endTurn","stopSequence","maxTokens","toolUse"]).or(u())),role:Mr,content:A([gn,S(gn)])}),Ra=h({type:y("boolean"),title:u().optional(),description:u().optional(),default:C().optional()}),Po=h({type:y("string"),title:u().optional(),description:u().optional(),minLength:R().optional(),maxLength:R().optional(),format:X(["email","uri","date","date-time"]).optional(),default:u().optional()}),Eo=h({type:X(["number","integer"]),title:u().optional(),description:u().optional(),minimum:R().optional(),maximum:R().optional(),default:R().optional()}),xa=h({type:y("string"),title:u().optional(),description:u().optional(),enum:S(u()),default:u().optional()}),ka=h({type:y("string"),title:u().optional(),description:u().optional(),oneOf:S(h({const:u(),title:u()})),default:u().optional()}),Ia=h({type:y("string"),title:u().optional(),description:u().optional(),enum:S(u()),enumNames:S(u()).optional(),default:u().optional()}),$u=A([xa,ka]),Pa=h({type:y("array"),title:u().optional(),description:u().optional(),minItems:R().optional(),maxItems:R().optional(),items:h({type:y("string"),enum:S(u())}),default:S(u()).optional()}),Ea=h({type:y("array"),title:u().optional(),description:u().optional(),minItems:R().optional(),maxItems:R().optional(),items:h({anyOf:S(h({const:u(),title:u()}))}),default:S(u()).optional()}),zu=A([Pa,Ea]),wu=A([Ia,$u,zu]),Ta=A([wu,Ra,Po,Eo]),To=yn.extend({mode:y("form").optional(),message:u(),requestedSchema:h({type:y("object"),properties:j(u(),Ta),required:S(u()).optional()}).catchall(F())}),Ru=yn.extend({mode:y("url"),message:u(),elicitationId:u(),url:u().url()}),xu=A([To,Ru]),ku=ze.extend({method:y("elicitation/create"),params:xu}),Iu=Me.extend({elicitationId:u()}),Pu=Ue.extend({method:y("notifications/elicitation/complete"),params:Iu}),Eu=we.extend({action:X(["accept","decline","cancel"]),content:ar((e)=>e===null?void 0:e,j(u(),A([u(),R(),C(),S(u())])).optional())}),Tu=h({type:y("ref/resource"),uri:u()}),ju=h({type:y("ref/prompt"),name:u()}),Ou=Ee.extend({ref:A([ju,Tu]),argument:h({name:u(),value:u()}),context:h({arguments:j(u(),u()).optional()}).optional()}),Nu=ze.extend({method:y("completion/complete"),params:Ou}),Cu=we.extend({completion:H({values:S(u()).max(100),total:J(R().int()),hasMore:J(C())})}),qu=h({uri:u().startsWith("file://"),name:u().optional(),_meta:j(u(),F()).optional()}),Au=ze.extend({method:y("roots/list"),params:Ee.optional()}),Mu=we.extend({roots:S(qu)}),Uu=Ue.extend({method:y("notifications/roots/list_changed"),params:Me.optional()}),Lv=H({ttl:R().optional(),pollInterval:R().optional()}),Du=X(["working","input_required","completed","failed","cancelled"]),Dr=h({taskId:u(),status:Du,ttl:A([R(),Wt()]),createdAt:u(),lastUpdatedAt:u(),pollInterval:J(R()),statusMessage:J(u())}),Zv=we.extend({task:Dr}),Lu=Me.merge(Dr),Vv=Ue.extend({method:y("notifications/tasks/status"),params:Lu}),Fv=ze.extend({method:y("tasks/get"),params:Ee.extend({taskId:u()})}),Jv=we.merge(Dr),Hv=ze.extend({method:y("tasks/result"),params:Ee.extend({taskId:u()})}),Kv=we.loose(),Gv=qr.extend({method:y("tasks/list")}),Bv=Ar.extend({tasks:S(Dr)}),Wv=ze.extend({method:y("tasks/cancel"),params:Ee.extend({taskId:u()})}),Yv=we.merge(Dr),Xv=A([ga,fa,vl,Nu,lu,Gl,Jl,zl,Rl,Il,jl,Nl,ql,au,nu]),Qv=A([pa,va,gl,Uu]),e_=A([ma,yu,bu,Eu,Mu]),t_=A([ga,Su,ku,Au]),r_=A([pa,va,du,Zl,El,su,eu,Ml,Pu]),n_=A([ma,hl,_l,Cu,Ql,Hl,wl,xl,Pl,wa,ou,Dl]),Pe=fo().superRefine((e,t)=>{if(!URL.canParse(e))return t.addIssue({code:Ov.custom,message:"URL must be parseable",fatal:!0}),$i}).refine((e)=>{let t=new URL(e);return t.protocol!=="javascript:"&&t.protocol!=="data:"&&t.protocol!=="vbscript:"},{message:"URL cannot use javascript:, data:, or vbscript: scheme"}),o_=H({resource:u().url(),authorization_servers:S(Pe).optional(),jwks_uri:u().url().optional(),scopes_supported:S(u()).optional(),bearer_methods_supported:S(u()).optional(),resource_signing_alg_values_supported:S(u()).optional(),resource_name:u().optional(),resource_documentation:u().optional(),resource_policy_uri:u().url().optional(),resource_tos_uri:u().url().optional(),tls_client_certificate_bound_access_tokens:C().optional(),authorization_details_types_supported:S(u()).optional(),dpop_signing_alg_values_supported:S(u()).optional(),dpop_bound_access_tokens_required:C().optional()}),Zu=H({issuer:u(),authorization_endpoint:Pe,token_endpoint:Pe,registration_endpoint:Pe.optional(),scopes_supported:S(u()).optional(),response_types_supported:S(u()),response_modes_supported:S(u()).optional(),grant_types_supported:S(u()).optional(),token_endpoint_auth_methods_supported:S(u()).optional(),token_endpoint_auth_signing_alg_values_supported:S(u()).optional(),service_documentation:Pe.optional(),revocation_endpoint:Pe.optional(),revocation_endpoint_auth_methods_supported:S(u()).optional(),revocation_endpoint_auth_signing_alg_values_supported:S(u()).optional(),introspection_endpoint:u().optional(),introspection_endpoint_auth_methods_supported:S(u()).optional(),introspection_endpoint_auth_signing_alg_values_supported:S(u()).optional(),code_challenge_methods_supported:S(u()).optional(),client_id_metadata_document_supported:C().optional(),authorization_response_iss_parameter_supported:C().optional().catch(void 0)}),Vu=H({issuer:u(),authorization_endpoint:Pe,token_endpoint:Pe,userinfo_endpoint:Pe.optional(),jwks_uri:Pe,registration_endpoint:Pe.optional(),scopes_supported:S(u()).optional(),response_types_supported:S(u()),response_modes_supported:S(u()).optional(),grant_types_supported:S(u()).optional(),acr_values_supported:S(u()).optional(),subject_types_supported:S(u()),id_token_signing_alg_values_supported:S(u()),id_token_encryption_alg_values_supported:S(u()).optional(),id_token_encryption_enc_values_supported:S(u()).optional(),userinfo_signing_alg_values_supported:S(u()).optional(),userinfo_encryption_alg_values_supported:S(u()).optional(),userinfo_encryption_enc_values_supported:S(u()).optional(),request_object_signing_alg_values_supported:S(u()).optional(),request_object_encryption_alg_values_supported:S(u()).optional(),request_object_encryption_enc_values_supported:S(u()).optional(),token_endpoint_auth_methods_supported:S(u()).optional(),token_endpoint_auth_signing_alg_values_supported:S(u()).optional(),display_values_supported:S(u()).optional(),claim_types_supported:S(u()).optional(),claims_supported:S(u()).optional(),service_documentation:u().optional(),claims_locales_supported:S(u()).optional(),ui_locales_supported:S(u()).optional(),claims_parameter_supported:C().optional(),request_parameter_supported:C().optional(),request_uri_parameter_supported:C().optional(),require_request_uri_registration:C().optional(),op_policy_uri:Pe.optional(),op_tos_uri:Pe.optional(),client_id_metadata_document_supported:C().optional(),authorization_response_iss_parameter_supported:C().optional().catch(void 0)}),i_=h({...Vu.shape,...Zu.pick({code_challenge_methods_supported:!0}).shape}),a_=h({access_token:u(),id_token:u().optional(),token_type:u(),expires_in:na.number().optional(),scope:u().optional(),refresh_token:u().optional()}).strip(),s_=h({issued_token_type:y("urn:ietf:params:oauth:token-type:id-jag"),access_token:u(),token_type:u().optional(),expires_in:R().optional(),scope:u().optional()}).strip(),c_=h({error:u(),error_description:u().optional(),error_uri:u().optional()}),Cv=Pe.optional().or(y("").transform(()=>{return})),Fu=h({redirect_uris:S(Pe),token_endpoint_auth_method:u().optional(),grant_types:S(u()).optional(),response_types:S(u()).optional(),application_type:u().optional(),client_name:u().optional(),client_uri:Pe.optional(),logo_uri:Cv,scope:u().optional(),contacts:S(u()).optional(),tos_uri:Cv,policy_uri:u().optional(),jwks_uri:Pe.optional(),jwks:el().optional(),software_id:u().optional(),software_version:u().optional(),software_statement:u().optional()}).strip(),Ju=h({client_id:u(),client_secret:u().optional(),client_id_issued_at:R().optional(),client_secret_expires_at:R().optional()}).strip(),l_=Fu.merge(Ju),u_=h({error:u(),error_description:u().optional()}).strip(),d_=h({token:u(),token_type_hint:u().optional()}).strip();var h_=Symbol.for("mcp.sdk.errorBrands");function S_(e,t){let n=new Set,o=t;while(typeof o==="function"){let r=o.mcpBrand;if(Object.prototype.hasOwnProperty.call(o,"mcpBrand")&&typeof r==="string")n.add(r);o=Object.getPrototypeOf(o)}if(n.size===0)return;Object.defineProperty(e,h_,{value:n,enumerable:!1,configurable:!0})}function Oo(e,t){try{if(typeof t==="object"&&t!==null&&Object.prototype.hasOwnProperty.call(e,"mcpBrand")&&typeof e.mcpBrand==="string"&&Object.prototype.hasOwnProperty.call(t,h_)){let n=t[h_];if(n&&typeof n.has==="function"&&n.has(e.mcpBrand))return!0}}catch{}return Function.prototype[Symbol.hasInstance].call(e,t)}var $P=class e extends Error{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.OAuthError"})}static[Symbol.hasInstance](t){return Oo(this,t)}static isInstance(t){if(typeof this!=="function")throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return Oo(this,t)}constructor(t,n,o){super(n);this.code=t,this.errorUri=o,this.name="OAuthError",S_(this,new.target)}toResponseObject(){let t={error:this.code,error_description:this.message};if(this.errorUri)t.error_uri=this.errorUri;return t}static fromResponse(t){return new e(t.error,t.error_description??t.error,t.error_uri)}},ae=function(e){return e.NotConnected="NOT_CONNECTED",e.AlreadyConnected="ALREADY_CONNECTED",e.NotInitialized="NOT_INITIALIZED",e.CapabilityNotSupported="CAPABILITY_NOT_SUPPORTED",e.RequestTimeout="REQUEST_TIMEOUT",e.ConnectionClosed="CONNECTION_CLOSED",e.SendFailed="SEND_FAILED",e.InvalidResult="INVALID_RESULT",e.UnsupportedResultType="UNSUPPORTED_RESULT_TYPE",e.InputRequiredRoundsExceeded="INPUT_REQUIRED_ROUNDS_EXCEEDED",e.ListPaginationExceeded="LIST_PAGINATION_EXCEEDED",e.MethodNotSupportedByProtocolVersion="METHOD_NOT_SUPPORTED_BY_PROTOCOL_VERSION",e.EraNegotiationFailed="ERA_NEGOTIATION_FAILED",e.ClientHttpNotImplemented="CLIENT_HTTP_NOT_IMPLEMENTED",e.ClientHttpAuthentication="CLIENT_HTTP_AUTHENTICATION",e.ClientHttpForbidden="CLIENT_HTTP_FORBIDDEN",e.ClientHttpUnexpectedContent="CLIENT_HTTP_UNEXPECTED_CONTENT",e.ClientHttpFailedToOpenStream="CLIENT_HTTP_FAILED_TO_OPEN_STREAM",e.ClientHttpFailedToTerminateSession="CLIENT_HTTP_FAILED_TO_TERMINATE_SESSION",e}({}),re=class extends Error{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.SdkError"})}static[Symbol.hasInstance](e){return Oo(this,e)}static isInstance(e){if(typeof this!=="function")throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return Oo(this,e)}constructor(e,t,n){super(t);this.code=e,this.data=n,this.name="SdkError",S_(this,new.target)}},zP=class extends re{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.SdkHttpError"})}constructor(e,t,n){super(e,t,n);this.name="SdkHttpError"}get status(){return this.data.status}get statusText(){return this.data.statusText}};function Jb(e){return e!==null&&typeof e==="object"&&!Array.isArray(e)}function wP(e,t,n){return e==="elicitation"&&t==="form"&&n.form===void 0&&n.url===void 0}function n$(e){switch(e.method){case"elicitation/create":if(e.params?.mode==="url")return{elicitation:{url:{}}};return{elicitation:{form:{}}};case"sampling/createMessage":{let t=e.params;if(t!==void 0&&(t.tools!==void 0||t.toolChoice!==void 0))return{sampling:{tools:{}}};return{sampling:{}}}case"roots/list":return{roots:{}};default:return}}function Xu(e,t){let n={};for(let[o,r]of Object.entries(e)){if(r===void 0)continue;let i=t===void 0?void 0:t[o];if(i===void 0){n[o]=r;continue}if(Jb(r)&&Jb(i)){let a={};for(let[s,c]of Object.entries(r))if(c!==void 0&&i[s]===void 0&&!wP(o,s,i))a[s]=c;if(Object.keys(a).length>0)n[o]=a}}return Object.keys(n).length>0?n:void 0}var RP="2026-07-28";function Aa(e){return e>=RP}function o$(e){return e.filter((t)=>!Aa(t))}function y_(e){return e.filter((t)=>Aa(t))}function i$(e){let t=e.structuredContent;if(t===void 0)return e;if(!(typeof t!=="object"||t===null||Array.isArray(t)))return e;if(e.content?.some((n)=>n.type==="text")??!1)return e;return{...e,content:[...e.content??[],{type:"text",text:JSON.stringify(t)}]}}var a$=["task","inputRequests","requestState"];function b_(e){if(e===null||typeof e!=="object"||Array.isArray(e)||e.content!==void 0||a$.some((t)=>(t in e)))return e;return{...e,content:[]}}function xP(){let e=Tr(()=>A([u(),R(),C(),Wt(),j(u(),e),S(e)])),t=j(u(),e),n=A([u(),R().int()]),o=u(),r=h({ttl:R().optional()}),i=h({taskId:u()}),a=H({progressToken:n.optional(),"io.modelcontextprotocol/related-task":i.optional()}),s=h({_meta:a.optional()}),c=s.extend({task:r.optional()}),l=h({method:u(),params:s.loose().optional()}),d=h({_meta:a.optional()}),m=h({method:u(),params:d.loose().optional()}),p=H({_meta:a.optional()}),f=A([u(),R().int()]),v=p.strict(),g=d.extend({requestId:f.optional(),reason:u().optional()}),b=m.extend({method:y("notifications/cancelled"),params:g}),w=h({src:u(),mimeType:u().optional(),sizes:S(u()).optional(),theme:X(["light","dark"]).optional()}),Z=h({icons:S(w).optional()}),E=h({name:u(),title:u().optional()}),L=E.extend({...E.shape,...Z.shape,version:u(),websiteUrl:u().optional(),description:u().optional()}),T=Et(h({applyDefaults:C().optional()}),t),ne=ar((qe)=>{if(qe&&typeof qe==="object"&&!Array.isArray(qe)&&Object.keys(qe).length===0)return{form:{}};return qe},Et(h({form:T.optional(),url:t.optional()}),t.optional())),ue=H({list:t.optional(),cancel:t.optional(),requests:H({sampling:H({createMessage:t.optional()}).optional(),elicitation:H({create:t.optional()}).optional()}).optional()}),Oe=H({list:t.optional(),cancel:t.optional(),requests:H({tools:H({call:t.optional()}).optional()}).optional()}),Se=h({experimental:j(u(),t).optional(),sampling:h({context:t.optional(),tools:t.optional()}).optional(),elicitation:ne.optional(),roots:h({listChanged:C().optional()}).optional(),tasks:ue.optional(),extensions:j(u(),t).optional()}),Ie=s.extend({protocolVersion:u(),capabilities:Se,clientInfo:L}),Le=l.extend({method:y("initialize"),params:Ie}),Rt=h({experimental:j(u(),t).optional(),logging:t.optional(),completions:t.optional(),prompts:h({listChanged:C().optional()}).optional(),resources:h({subscribe:C().optional(),listChanged:C().optional()}).optional(),tools:h({listChanged:C().optional()}).optional(),tasks:Oe.optional(),extensions:j(u(),t).optional()}),xt=p.extend({protocolVersion:u(),capabilities:Rt,serverInfo:L,instructions:u().optional()}),gt=m.extend({method:y("notifications/initialized"),params:d.optional()}),vt=l.extend({method:y("ping"),params:s.optional()}),At=h({progress:R(),total:J(R()),message:J(u())}),Ye=h({...d.shape,...At.shape,progressToken:n}),_t=m.extend({method:y("notifications/progress"),params:Ye}),Mt=s.extend({cursor:o.optional()}),ct=l.extend({params:Mt.optional()}),Ze=p.extend({nextCursor:o.optional()}),er=h({uri:u(),mimeType:J(u()),_meta:j(u(),F()).optional()}),tr=er.extend({text:u()}),Ut=u().refine((qe)=>{try{return atob(qe),!0}catch{return!1}},{message:"Invalid Base64 string"}),Ne=er.extend({blob:Ut}),Ve=X(["user","assistant"]),Fe=h({audience:S(Ve).optional(),priority:R().min(0).max(1).optional(),lastModified:ht.datetime({offset:!0}).optional()}),kt=h({...E.shape,...Z.shape,uri:u(),description:J(u()),mimeType:J(u()),size:J(R()),annotations:Fe.optional(),_meta:J(H({}))}),Gr=h({...E.shape,...Z.shape,uriTemplate:u(),description:J(u()),mimeType:J(u()),annotations:Fe.optional(),_meta:J(H({}))}),lt=ct.extend({method:y("resources/list")}),ut=Ze.extend({resources:S(kt)}),Xe=ct.extend({method:y("resources/templates/list")}),St=Ze.extend({resourceTemplates:S(Gr)}),yt=s.extend({uri:u()}),Dt=yt,Lt=l.extend({method:y("resources/read"),params:Dt}),vr=p.extend({contents:S(A([tr,Ne]))}),Zt=m.extend({method:y("notifications/resources/list_changed"),params:d.optional()}),Br=yt,M=l.extend({method:y("resources/subscribe"),params:Br}),Vt=yt,B=l.extend({method:y("resources/unsubscribe"),params:Vt}),V=d.extend({uri:u()}),te=m.extend({method:y("notifications/resources/updated"),params:V}),U=h({name:u(),description:J(u()),required:J(C())}),N=h({...E.shape,...Z.shape,description:J(u()),arguments:J(S(U)),_meta:J(H({}))}),Y=ct.extend({method:y("prompts/list")}),W=Ze.extend({prompts:S(N)}),ke=s.extend({name:u(),arguments:j(u(),u()).optional()}),Wr=l.extend({method:y("prompts/get"),params:ke}),Ft=h({type:y("text"),text:u(),annotations:Fe.optional(),_meta:j(u(),F()).optional()}),Yr=h({type:y("image"),data:Ut,mimeType:u(),annotations:Fe.optional(),_meta:j(u(),F()).optional()}),Xr=h({type:y("audio"),data:Ut,mimeType:u(),annotations:Fe.optional(),_meta:j(u(),F()).optional()}),Bo=h({type:y("tool_use"),name:u(),id:u(),input:j(u(),F()),_meta:j(u(),F()).optional()}),_r=h({type:y("resource"),resource:A([tr,Ne]),annotations:Fe.optional(),_meta:j(u(),F()).optional()}),Wo=kt.extend({type:y("resource_link")}),bt=A([Ft,Yr,Xr,Wo,_r]),En=h({role:Ve,content:bt}),Tn=p.extend({description:u().optional(),messages:S(En)}),Qr=m.extend({method:y("notifications/prompts/list_changed"),params:d.optional()}),Yo=h({title:u().optional(),readOnlyHint:C().optional(),destructiveHint:C().optional(),idempotentHint:C().optional(),openWorldHint:C().optional()}),jn=h({taskSupport:X(["required","optional","forbidden"]).optional()}),en=h({...E.shape,...Z.shape,description:u().optional(),inputSchema:h({type:y("object"),properties:j(u(),e).optional(),required:S(u()).optional()}).catchall(F()),outputSchema:h({type:y("object"),properties:j(u(),e).optional(),required:S(u()).optional()}).catchall(F()).optional(),annotations:Yo.optional(),execution:jn.optional(),_meta:j(u(),F()).optional()}),On=ct.extend({method:y("tools/list")}),Nn=Ze.extend({tools:S(en)}),Cn=p.extend({content:S(bt),structuredContent:j(u(),F()).optional(),isError:C().optional()}),Ce=c.extend({name:u(),arguments:j(u(),F()).optional()}),Xo=l.extend({method:y("tools/call"),params:Ce}),us=m.extend({method:y("notifications/tools/list_changed"),params:d.optional()}),qn=X(["debug","info","notice","warning","error","critical","alert","emergency"]),Qo=s.extend({level:qn}),ei=l.extend({method:y("logging/setLevel"),params:Qo}),ti=d.extend({level:qn,logger:u().optional(),data:F()}),ri=m.extend({method:y("notifications/message"),params:ti}),ni=h({name:u().optional()}),oi=h({hints:S(ni).optional(),costPriority:R().min(0).max(1).optional(),speedPriority:R().min(0).max(1).optional(),intelligencePriority:R().min(0).max(1).optional()}),ii=h({mode:X(["auto","required","none"]).optional()}),ds=h({type:y("tool_result"),toolUseId:u().describe("The unique identifier for the corresponding tool call."),content:S(bt),structuredContent:h({}).loose().optional(),isError:C().optional(),_meta:j(u(),F()).optional()}),ai=Er("type",[Ft,Yr,Xr]),Sr=Er("type",[Ft,Yr,Xr,Bo,ds]),si=h({role:Ve,content:A([Sr,S(Sr)]),_meta:j(u(),F()).optional()}),ci=c.extend({messages:S(si),modelPreferences:oi.optional(),systemPrompt:u().optional(),includeContext:X(["none","thisServer","allServers"]).optional(),temperature:R().optional(),maxTokens:R().int(),stopSequences:S(u()).optional(),metadata:t.optional(),tools:S(en).optional(),toolChoice:ii.optional()}),li=l.extend({method:y("sampling/createMessage"),params:ci}),ui=p.extend({model:u(),stopReason:J(X(["endTurn","stopSequence","maxTokens"]).or(u())),role:Ve,content:ai}),di=p.extend({model:u(),stopReason:J(X(["endTurn","stopSequence","maxTokens","toolUse"]).or(u())),role:Ve,content:A([Sr,S(Sr)])}),mi=h({type:y("boolean"),title:u().optional(),description:u().optional(),default:C().optional()}),pi=h({type:y("string"),title:u().optional(),description:u().optional(),minLength:R().optional(),maxLength:R().optional(),format:X(["email","uri","date","date-time"]).optional(),default:u().optional()}),fi=h({type:X(["number","integer"]),title:u().optional(),description:u().optional(),minimum:R().optional(),maximum:R().optional(),default:R().optional()}),hi=h({type:y("string"),title:u().optional(),description:u().optional(),enum:S(u()),default:u().optional()}),gi=h({type:y("string"),title:u().optional(),description:u().optional(),oneOf:S(h({const:u(),title:u()})),default:u().optional()}),vi=h({type:y("string"),title:u().optional(),description:u().optional(),enum:S(u()),enumNames:S(u()).optional(),default:u().optional()}),_i=A([hi,gi]),tn=h({type:y("array"),title:u().optional(),description:u().optional(),minItems:R().optional(),maxItems:R().optional(),items:h({type:y("string"),enum:S(u())}),default:S(u()).optional()}),rn=h({type:y("array"),title:u().optional(),description:u().optional(),minItems:R().optional(),maxItems:R().optional(),items:h({anyOf:S(h({const:u(),title:u()}))}),default:S(u()).optional()}),ms=A([tn,rn]),ps=A([vi,_i,ms]),dt=A([ps,mi,pi,fi]),mt=c.extend({mode:y("form").optional(),message:u(),requestedSchema:h({type:y("object"),properties:j(u(),dt),required:S(u()).optional()}).catchall(F())}),Si=c.extend({mode:y("url"),message:u(),elicitationId:u(),url:u().url()}),It=A([mt,Si]),fs=l.extend({method:y("elicitation/create"),params:It}),hs=d.extend({elicitationId:u()}),gs=m.extend({method:y("notifications/elicitation/complete"),params:hs}),vs=p.extend({action:X(["accept","decline","cancel"]),content:ar((qe)=>qe===null?void 0:qe,j(u(),A([u(),R(),C(),S(u())])).optional())}),_s=h({type:y("ref/resource"),uri:u()}),Ss=h({type:y("ref/prompt"),name:u()}),ys=s.extend({ref:A([Ss,_s]),argument:h({name:u(),value:u()}),context:h({arguments:j(u(),u()).optional()}).optional()}),yi=l.extend({method:y("completion/complete"),params:ys}),bs=p.extend({completion:H({values:S(u()).max(100),total:J(R().int()),hasMore:J(C())})}),$s=h({uri:u().startsWith("file://"),name:u().optional(),_meta:j(u(),F()).optional()}),An=l.extend({method:y("roots/list"),params:s.optional()}),bi=p.extend({roots:S($s)}),zs=m.extend({method:y("notifications/roots/list_changed"),params:d.optional()}),ws=H({ttl:R().optional(),pollInterval:R().optional()}),Rs=X(["working","input_required","completed","failed","cancelled"]),yr=h({taskId:u(),status:Rs,ttl:A([R(),Wt()]),createdAt:u(),lastUpdatedAt:u(),pollInterval:J(R()),statusMessage:J(u())}),Qe=p.extend({task:yr}),xs=d.merge(yr),nn=m.extend({method:y("notifications/tasks/status"),params:xs}),Mn=l.extend({method:y("tasks/get"),params:s.extend({taskId:u()})}),Un=p.merge(yr),Dn=l.extend({method:y("tasks/result"),params:s.extend({taskId:u()})}),Ld=p.loose(),et=ct.extend({method:y("tasks/list")}),Re=Ze.extend({tasks:S(yr)}),on=l.extend({method:y("tasks/cancel"),params:s.extend({taskId:u()})});return{JSONValueSchema:e,JSONObjectSchema:t,ProgressTokenSchema:n,CursorSchema:o,TaskMetadataSchema:r,RelatedTaskMetadataSchema:i,RequestMetaSchema:a,BaseRequestParamsSchema:s,TaskAugmentedRequestParamsSchema:c,RequestSchema:l,NotificationsParamsSchema:d,NotificationSchema:m,ResultSchema:p,RequestIdSchema:f,EmptyResultSchema:v,CancelledNotificationParamsSchema:g,CancelledNotificationSchema:b,IconSchema:w,IconsSchema:Z,BaseMetadataSchema:E,ImplementationSchema:L,ClientTasksCapabilitySchema:ue,ServerTasksCapabilitySchema:Oe,ClientCapabilitiesSchema:Se,InitializeRequestParamsSchema:Ie,InitializeRequestSchema:Le,ServerCapabilitiesSchema:Rt,InitializeResultSchema:xt,InitializedNotificationSchema:gt,PingRequestSchema:vt,ProgressSchema:At,ProgressNotificationParamsSchema:Ye,ProgressNotificationSchema:_t,PaginatedRequestParamsSchema:Mt,PaginatedRequestSchema:ct,PaginatedResultSchema:Ze,ResourceContentsSchema:er,TextResourceContentsSchema:tr,BlobResourceContentsSchema:Ne,RoleSchema:Ve,AnnotationsSchema:Fe,ResourceSchema:kt,ResourceTemplateSchema:Gr,ListResourcesRequestSchema:lt,ListResourcesResultSchema:ut,ListResourceTemplatesRequestSchema:Xe,ListResourceTemplatesResultSchema:St,ResourceRequestParamsSchema:yt,ReadResourceRequestParamsSchema:Dt,ReadResourceRequestSchema:Lt,ReadResourceResultSchema:vr,ResourceListChangedNotificationSchema:Zt,SubscribeRequestParamsSchema:Br,SubscribeRequestSchema:M,UnsubscribeRequestParamsSchema:Vt,UnsubscribeRequestSchema:B,ResourceUpdatedNotificationParamsSchema:V,ResourceUpdatedNotificationSchema:te,PromptArgumentSchema:U,PromptSchema:N,ListPromptsRequestSchema:Y,ListPromptsResultSchema:W,GetPromptRequestParamsSchema:ke,GetPromptRequestSchema:Wr,TextContentSchema:Ft,ImageContentSchema:Yr,AudioContentSchema:Xr,ToolUseContentSchema:Bo,EmbeddedResourceSchema:_r,ResourceLinkSchema:Wo,ContentBlockSchema:bt,PromptMessageSchema:En,GetPromptResultSchema:Tn,PromptListChangedNotificationSchema:Qr,ToolAnnotationsSchema:Yo,ToolExecutionSchema:jn,ToolSchema:en,ListToolsRequestSchema:On,ListToolsResultSchema:Nn,CallToolResultSchema:Cn,CallToolRequestParamsSchema:Ce,CallToolRequestSchema:Xo,ToolListChangedNotificationSchema:us,LoggingLevelSchema:qn,SetLevelRequestParamsSchema:Qo,SetLevelRequestSchema:ei,LoggingMessageNotificationParamsSchema:ti,LoggingMessageNotificationSchema:ri,ModelHintSchema:ni,ModelPreferencesSchema:oi,ToolChoiceSchema:ii,ToolResultContentSchema:ds,SamplingContentSchema:ai,SamplingMessageContentBlockSchema:Sr,SamplingMessageSchema:si,CreateMessageRequestParamsSchema:ci,CreateMessageRequestSchema:li,CreateMessageResultSchema:ui,CreateMessageResultWithToolsSchema:di,BooleanSchemaSchema:mi,StringSchemaSchema:pi,NumberSchemaSchema:fi,UntitledSingleSelectEnumSchemaSchema:hi,TitledSingleSelectEnumSchemaSchema:gi,LegacyTitledEnumSchemaSchema:vi,SingleSelectEnumSchemaSchema:_i,UntitledMultiSelectEnumSchemaSchema:tn,TitledMultiSelectEnumSchemaSchema:rn,MultiSelectEnumSchemaSchema:ms,EnumSchemaSchema:ps,PrimitiveSchemaDefinitionSchema:dt,ElicitRequestFormParamsSchema:mt,ElicitRequestURLParamsSchema:Si,ElicitRequestParamsSchema:It,ElicitRequestSchema:fs,ElicitationCompleteNotificationParamsSchema:hs,ElicitationCompleteNotificationSchema:gs,ElicitResultSchema:vs,ResourceTemplateReferenceSchema:_s,PromptReferenceSchema:Ss,CompleteRequestParamsSchema:ys,CompleteRequestSchema:yi,CompleteResultSchema:bs,RootSchema:$s,ListRootsRequestSchema:An,ListRootsResultSchema:bi,RootsListChangedNotificationSchema:zs,TaskCreationParamsSchema:ws,TaskStatusSchema:Rs,TaskSchema:yr,CreateTaskResultSchema:Qe,TaskStatusNotificationParamsSchema:xs,TaskStatusNotificationSchema:nn,GetTaskRequestSchema:Mn,GetTaskResultSchema:Un,GetTaskPayloadRequestSchema:Dn,GetTaskPayloadResultSchema:Ld,ListTasksRequestSchema:et,ListTasksResultSchema:Re,CancelTaskRequestSchema:on,CancelTaskResultSchema:p.merge(yr),ClientRequestSchema:A([vt,Le,yi,ei,Wr,Y,lt,Xe,Lt,M,B,Xo,On,Mn,Dn,et,on]),ClientNotificationSchema:A([b,_t,gt,zs,nn]),ClientResultSchema:A([v,ui,di,vs,bi,Un,Re,Qe]),ServerRequestSchema:A([vt,li,fs,An,Mn,Dn,et,on]),ServerNotificationSchema:A([b,_t,ri,te,Zt,us,Qr,nn,gs]),ServerResultSchema:A([v,xt,bs,Tn,W,ut,St,vr,Cn,Nn,Un,Re,Qe]),CallToolResultWireSchema:F().superRefine((qe,dk)=>{if(typeof qe!=="object"||qe===null||Array.isArray(qe)||qe.content!==void 0)return;for(let NS of a$)if(NS in qe){dk.addIssue({code:"custom",message:`content is required when the body carries '${NS}' — another result family cannot default into an empty tools/call success`});return}}).transform(b_).pipe(Cn)}}var kP;function s$(){return kP??=xP()}function c$(e){return e.type!=="object"}var IP=new Set(["const","enum","default","examples"]),PP=new Set(["properties","patternProperties","$defs","definitions","dependentSchemas","dependencies"]);function Hb(e){return e!==void 0&&!(typeof e==="string"&&e.startsWith("#"))}function EP(e){let t=typeof e.$schema==="string"?e.$schema:void 0;if(Hb(e.$id))return{...t!==void 0&&{$schema:t},type:"object",properties:{result:e},required:["result"]};let n=US(e.$schema)&&e.$recursiveAnchor!==!0,o=(r,i)=>{if(Array.isArray(r))return r.map((c)=>o(c,!1));if(r===null||typeof r!=="object")return r;if(!i&&Hb(r.$id))return r;let a={},s=!1;for(let[c,l]of Object.entries(r))if(i)a[c]=o(l,!1);else if((c==="$ref"||c==="$dynamicRef")&&typeof l==="string")a[c]=l==="#"?"#/properties/result":l.startsWith("#/")?`#/properties/result${l.slice(1)}`:l;else if(c==="$recursiveRef"&&l==="#"&&n)s=!0;else if(IP.has(c))a[c]=l;else if(PP.has(c))a[c]=o(l,!0);else a[c]=o(l,!1);if(s)if("$ref"in a)a.allOf=[...Array.isArray(a.allOf)?a.allOf:[],{$ref:"#/properties/result"}];else a.$ref="#/properties/result";return a};return{...t!==void 0&&{$schema:t},type:"object",properties:{result:o(e,!1)},required:["result"]}}var l$={ping:null,initialize:null,"completion/complete":null,"logging/setLevel":null,"prompts/get":null,"prompts/list":null,"resources/list":null,"resources/templates/list":null,"resources/read":null,"resources/subscribe":null,"resources/unsubscribe":null,"tools/call":null,"tools/list":null,"tasks/get":null,"tasks/result":null,"tasks/list":null,"tasks/cancel":null,"sampling/createMessage":null,"elicitation/create":null,"roots/list":null},u$={"notifications/cancelled":null,"notifications/progress":null,"notifications/initialized":null,"notifications/roots/list_changed":null,"notifications/tasks/status":null,"notifications/message":null,"notifications/resources/updated":null,"notifications/resources/list_changed":null,"notifications/tools/list_changed":null,"notifications/prompts/list_changed":null,"notifications/elicitation/complete":null},TP={ping:null,initialize:null,"completion/complete":null,"logging/setLevel":null,"prompts/get":null,"prompts/list":null,"resources/list":null,"resources/templates/list":null,"resources/read":null,"resources/subscribe":null,"resources/unsubscribe":null,"tools/call":null,"tools/list":null,"sampling/createMessage":null,"elicitation/create":null,"roots/list":null},Hu;function $_(){if(Hu)return Hu;let e=s$();return Hu={requestSchemas:{ping:e.PingRequestSchema,initialize:e.InitializeRequestSchema,"completion/complete":e.CompleteRequestSchema,"logging/setLevel":e.SetLevelRequestSchema,"prompts/get":e.GetPromptRequestSchema,"prompts/list":e.ListPromptsRequestSchema,"resources/list":e.ListResourcesRequestSchema,"resources/templates/list":e.ListResourceTemplatesRequestSchema,"resources/read":e.ReadResourceRequestSchema,"resources/subscribe":e.SubscribeRequestSchema,"resources/unsubscribe":e.UnsubscribeRequestSchema,"tools/call":e.CallToolRequestSchema,"tools/list":e.ListToolsRequestSchema,"tasks/get":e.GetTaskRequestSchema,"tasks/result":e.GetTaskPayloadRequestSchema,"tasks/list":e.ListTasksRequestSchema,"tasks/cancel":e.CancelTaskRequestSchema,"sampling/createMessage":e.CreateMessageRequestSchema,"elicitation/create":e.ElicitRequestSchema,"roots/list":e.ListRootsRequestSchema},notificationSchemas:{"notifications/cancelled":e.CancelledNotificationSchema,"notifications/progress":e.ProgressNotificationSchema,"notifications/initialized":e.InitializedNotificationSchema,"notifications/roots/list_changed":e.RootsListChangedNotificationSchema,"notifications/tasks/status":e.TaskStatusNotificationSchema,"notifications/message":e.LoggingMessageNotificationSchema,"notifications/resources/updated":e.ResourceUpdatedNotificationSchema,"notifications/resources/list_changed":e.ResourceListChangedNotificationSchema,"notifications/tools/list_changed":e.ToolListChangedNotificationSchema,"notifications/prompts/list_changed":e.PromptListChangedNotificationSchema,"notifications/elicitation/complete":e.ElicitationCompleteNotificationSchema},resultSchemas:{ping:e.EmptyResultSchema,initialize:e.InitializeResultSchema,"completion/complete":e.CompleteResultSchema,"logging/setLevel":e.EmptyResultSchema,"prompts/get":e.GetPromptResultSchema,"prompts/list":e.ListPromptsResultSchema,"resources/list":e.ListResourcesResultSchema,"resources/templates/list":e.ListResourceTemplatesResultSchema,"resources/read":e.ReadResourceResultSchema,"resources/subscribe":e.EmptyResultSchema,"resources/unsubscribe":e.EmptyResultSchema,"tools/call":e.CallToolResultWireSchema,"tools/list":e.ListToolsResultSchema,"sampling/createMessage":e.CreateMessageResultWithToolsSchema,"elicitation/create":e.ElicitResultSchema,"roots/list":e.ListRootsResultSchema}},Hu}function d$(e){return Object.prototype.hasOwnProperty.call(l$,e)}function m$(e){return Object.prototype.hasOwnProperty.call(u$,e)}function jP(e){return Object.prototype.hasOwnProperty.call(TP,e)}function OP(e){return jP(e)?$_().resultSchemas[e]:void 0}function NP(e){return d$(e)?$_().requestSchemas[e]:void 0}function CP(e){return m$(e)?$_().notificationSchemas[e]:void 0}var TD=Object.keys(l$),jD=Object.keys(u$);function g_(e){return e!==null&&typeof e==="object"&&!Array.isArray(e)}function Ku(e,t){if(e===void 0)return{ok:!1,reason:"not-in-era"};let n=e.safeParse(t);return n.success?{ok:!0,value:n.data}:{ok:!1,reason:"invalid",message:String(n.error)}}var Kb={ok:!1,reason:"not-in-era"};function Gb(e){return g_(e)&&g_(e.outputSchema)&&c$(e.outputSchema)}function Bb(e){return e}var z_={era:"2025-11-25",hasRequestMethod:d$,hasNotificationMethod:m$,validateRequest:(e,t)=>Ku(NP(e),t),validateResult:(e,t)=>Ku(OP(e),t),validateNotification:(e,t)=>Ku(CP(e),t),hasInputRequestMethod:()=>!1,validateInputRequest:()=>Kb,validateInputResponse:()=>Kb,samplingResultVariant:(e,t)=>{let n=s$();return Ku(e?n.CreateMessageResultWithToolsSchema:n.CreateMessageResultSchema,t)},outboundEnvelope:(e)=>{return},validateEnvelopeMeta:(e)=>[],projectCallToolResult(e,t){let n=i$(e),o=n.structuredContent;if(o===void 0)return n;let r=typeof o!=="object"||o===null||Array.isArray(o),i=t!==void 0&&c$(t);if(!r&&!i)return n;return{...n,structuredContent:{result:o}}},decodeResult(e,t){if(g_(t)&&"resultType"in t){let n={...t};return delete n.resultType,{kind:"complete",result:Bb(n)}}return{kind:"complete",result:Bb(t)}},encodeResult(e,t){if(e!=="tools/list")return t;let n=t.tools;if(!Array.isArray(n)||!n.some((o)=>Gb(o)))return t;return{...t,tools:n.map((o)=>Gb(o)?{...o,outputSchema:EP(o.outputSchema)}:o)}},encodeErrorCode:(e)=>e===-32002?-32602:e,checkInboundEnvelope:(e)=>{return}};function qP(){let e=Tr(()=>A([u(),R(),C(),Wt(),j(u(),e),S(e)])),t=j(u(),e),n=A([u(),R().int()]),o=u(),r=A([u(),R().int()]),i=X(["user","assistant"]),a=X(["debug","info","notice","warning","error","critical","alert","emergency"]),s=u().refine((Re)=>{try{return atob(Re),!0}catch{return!1}},{message:"Invalid Base64 string"}),c=h({ttl:R().optional()}),l=h({taskId:u()}),d=H({progressToken:n.optional(),"io.modelcontextprotocol/related-task":l.optional()}),m=h({_meta:d.optional()}),p=m.extend({task:c.optional()}),f=h({_meta:d.optional()}),v=h({method:u(),params:f.loose().optional()}),g=h({src:u(),mimeType:u().optional(),sizes:S(u()).optional(),theme:X(["light","dark"]).optional()}),b=h({icons:S(g).optional()}),w=h({name:u(),title:u().optional()}),Z=w.extend({...w.shape,...b.shape,version:u(),websiteUrl:u().optional(),description:u().optional()}),E=Et(h({applyDefaults:C().optional()}),t),L=ar((Re)=>{if(Re&&typeof Re==="object"&&!Array.isArray(Re)&&Object.keys(Re).length===0)return{form:{}};return Re},Et(h({form:E.optional(),url:t.optional()}),t.optional())),T=H({list:t.optional(),cancel:t.optional(),requests:H({sampling:H({createMessage:t.optional()}).optional(),elicitation:H({create:t.optional()}).optional()}).optional()}),ne=H({list:t.optional(),cancel:t.optional(),requests:H({tools:H({call:t.optional()}).optional()}).optional()}),ue=h({experimental:j(u(),t).optional(),sampling:h({context:t.optional(),tools:t.optional()}).optional(),elicitation:L.optional(),roots:h({listChanged:C().optional()}).optional(),tasks:T.optional(),extensions:j(u(),t).optional()}),Oe=h({experimental:j(u(),t).optional(),logging:t.optional(),completions:t.optional(),prompts:h({listChanged:C().optional()}).optional(),resources:h({subscribe:C().optional(),listChanged:C().optional()}).optional(),tools:h({listChanged:C().optional()}).optional(),tasks:ne.optional(),extensions:j(u(),t).optional()}),Se=h({progress:R(),total:J(R()),message:J(u())}),Ie=h({...f.shape,...Se.shape,progressToken:n}),Le=v.extend({method:y("notifications/progress"),params:Ie}),Rt=f.extend({level:a,logger:u().optional(),data:F()}),xt=v.extend({method:y("notifications/message"),params:Rt}),gt=h({uri:u(),mimeType:J(u()),_meta:j(u(),F()).optional()}),vt=gt.extend({text:u()}),At=gt.extend({blob:s}),Ye=h({audience:S(i).optional(),priority:R().min(0).max(1).optional(),lastModified:ht.datetime({offset:!0}).optional()}),_t=h({...w.shape,...b.shape,uri:u(),description:J(u()),mimeType:J(u()),size:J(R()),annotations:Ye.optional(),_meta:J(H({}))}),Mt=h({...w.shape,...b.shape,uriTemplate:u(),description:J(u()),mimeType:J(u()),annotations:Ye.optional(),_meta:J(H({}))}),ct=v.extend({method:y("notifications/resources/list_changed"),params:f.optional()}),Ze=f.extend({uri:u()}),er=v.extend({method:y("notifications/resources/updated"),params:Ze}),tr=h({name:u(),description:J(u()),required:J(C())}),Ut=h({...w.shape,...b.shape,description:J(u()),arguments:J(S(tr)),_meta:J(H({}))}),Ne=v.extend({method:y("notifications/prompts/list_changed"),params:f.optional()}),Ve=h({type:y("text"),text:u(),annotations:Ye.optional(),_meta:j(u(),F()).optional()}),Fe=h({type:y("image"),data:s,mimeType:u(),annotations:Ye.optional(),_meta:j(u(),F()).optional()}),kt=h({type:y("audio"),data:s,mimeType:u(),annotations:Ye.optional(),_meta:j(u(),F()).optional()}),Gr=h({type:y("tool_use"),name:u(),id:u(),input:j(u(),F()),_meta:j(u(),F()).optional()}),lt=h({type:y("resource"),resource:A([vt,At]),annotations:Ye.optional(),_meta:j(u(),F()).optional()}),ut=_t.extend({type:y("resource_link")}),Xe=A([Ve,Fe,kt,ut,lt]),St=h({role:i,content:Xe}),yt=h({title:u().optional(),readOnlyHint:C().optional(),destructiveHint:C().optional(),idempotentHint:C().optional(),openWorldHint:C().optional()}),Dt=v.extend({method:y("notifications/tools/list_changed"),params:f.optional()}),Lt=h({name:u().optional()}),vr=h({hints:S(Lt).optional(),costPriority:R().min(0).max(1).optional(),speedPriority:R().min(0).max(1).optional(),intelligencePriority:R().min(0).max(1).optional()}),Zt=h({mode:X(["auto","required","none"]).optional()}),Br=h({type:y("boolean"),title:u().optional(),description:u().optional(),default:C().optional()}),M=h({type:y("string"),title:u().optional(),description:u().optional(),minLength:R().optional(),maxLength:R().optional(),format:X(["email","uri","date","date-time"]).optional(),default:u().optional()}),Vt=h({type:X(["number","integer"]),title:u().optional(),description:u().optional(),minimum:R().optional(),maximum:R().optional(),default:R().optional()}),B=h({type:y("string"),title:u().optional(),description:u().optional(),enum:S(u()),default:u().optional()}),V=h({type:y("string"),title:u().optional(),description:u().optional(),oneOf:S(h({const:u(),title:u()})),default:u().optional()}),te=h({type:y("string"),title:u().optional(),description:u().optional(),enum:S(u()),enumNames:S(u()).optional(),default:u().optional()}),U=A([B,V]),N=h({type:y("array"),title:u().optional(),description:u().optional(),minItems:R().optional(),maxItems:R().optional(),items:h({type:y("string"),enum:S(u())}),default:S(u()).optional()}),Y=h({type:y("array"),title:u().optional(),description:u().optional(),minItems:R().optional(),maxItems:R().optional(),items:h({anyOf:S(h({const:u(),title:u()}))}),default:S(u()).optional()}),W=A([N,Y]),ke=A([te,U,W]),Wr=A([ke,Br,M,Vt]),Ft=p.extend({mode:y("form").optional(),message:u(),requestedSchema:h({type:y("object"),properties:j(u(),Wr),required:S(u()).optional()}).catchall(F())}),Yr=h({type:y("ref/resource"),uri:u()}),Xr=h({type:y("ref/prompt"),name:u()}),Bo=h({uri:u().startsWith("file://"),name:u().optional(),_meta:j(u(),F()).optional()}),_r=ue.shape,Wo=h({experimental:_r.experimental,sampling:_r.sampling,elicitation:_r.elicitation,roots:_r.roots,extensions:_r.extensions}),bt=Oe.shape,En=h({experimental:bt.experimental,logging:bt.logging,completions:bt.completions,prompts:bt.prompts,resources:bt.resources,tools:bt.tools,extensions:bt.extensions}),Tn=H({progressToken:n.optional(),[_n]:u(),[So]:Z.optional(),[lr]:Wo,[Or]:a.optional()}),Qr=h({...w.shape,...b.shape,description:u().optional(),inputSchema:H({$schema:u().optional(),type:y("object")}),outputSchema:H({$schema:u().optional()}).optional(),annotations:yt.optional(),_meta:j(u(),F()).optional()}),Yo=h({type:y("tool_result"),toolUseId:u(),content:S(Xe),structuredContent:F().optional(),isError:C().optional(),_meta:j(u(),F()).optional()}),jn=A([Ve,Fe,kt,Gr,Yo]),en=h({role:i,content:A([jn,S(jn)]),_meta:j(u(),F()).optional()}),On=u(),Nn=H({[cr]:Z.optional().catch(void 0)}),Cn=Nn.optional();function Ce(Re){return H({_meta:Cn,resultType:On.default("complete"),...Re})}let Xo=Ce({}),us=Ce({nextCursor:o.optional()}),qn=Ce({content:S(Xe),structuredContent:F().optional(),isError:C().optional()}),Qo=Ce({ttlMs:R().int().min(0),cacheScope:X(["public","private"]),tools:S(Qr),nextCursor:o.optional()}),ei=Ce({ttlMs:R().int().min(0),cacheScope:X(["public","private"]),prompts:S(Ut),nextCursor:o.optional()}),ti=Ce({description:u().optional(),messages:S(St)}),ri=Ce({ttlMs:R().int().min(0),cacheScope:X(["public","private"]),resources:S(_t),nextCursor:o.optional()}),ni=Ce({ttlMs:R().int().min(0),cacheScope:X(["public","private"]),resourceTemplates:S(Mt),nextCursor:o.optional()}),oi=Ce({ttlMs:R().int().min(0),cacheScope:X(["public","private"]),contents:S(A([vt,At]))}),ii=Ce({completion:h({values:S(u()).max(100),total:R().int().optional(),hasMore:C().optional()}).loose()}),ds=Ce({ttlMs:R().int().min(0),cacheScope:X(["public","private"])}),ai=Ce({ttlMs:R().int().min(0).catch(0),cacheScope:X(["public","private"]).catch("private"),supportedVersions:S(u()),capabilities:En,instructions:u().optional()}),Sr=h({messages:S(en),modelPreferences:vr.optional(),systemPrompt:u().optional(),includeContext:X(["none","thisServer","allServers"]).optional(),temperature:R().optional(),maxTokens:R().int(),stopSequences:S(u()).optional(),metadata:t.optional(),tools:S(Qr).optional(),toolChoice:Zt.optional()}),si=h({method:y("sampling/createMessage"),params:Sr}),ci=h({method:y("roots/list"),params:h({_meta:j(u(),F()).optional()}).optional()}),li=h({...en.shape,model:u(),stopReason:u().optional()}),ui=h({roots:S(Bo)}),di=h({action:X(["accept","decline","cancel"]),content:j(u(),A([u(),R(),C(),S(u())])).optional()}),mi=h({mode:y("url"),message:u(),url:u().url()}),pi=A([Ft,mi]),fi=h({method:y("elicitation/create"),params:pi}),hi=A([si,ci,fi]),gi=A([li,ui,di]),vi=j(u(),hi),_i=j(u(),gi),tn=Ce({inputRequests:vi.optional(),requestState:u().optional()}),rn={inputResponses:_i.optional(),requestState:u().optional()},ms=h({_meta:Tn,...rn}),ps=H({progressToken:n.optional()});function dt(Re,on){return h({method:y(Re),params:h({_meta:Tn,...on})})}function mt(Re,on){return h({method:y(Re),params:h({_meta:ps.optional(),...on}).optional()})}let Si={name:u(),arguments:j(u(),F()).optional(),...rn},It={cursor:o.optional()},fs=dt("tools/call",Si),hs=dt("tools/list",It),gs=dt("prompts/list",It),vs=dt("prompts/get",{name:u(),arguments:j(u(),u()).optional(),...rn}),_s=dt("resources/list",It),Ss=dt("resources/templates/list",It),ys=dt("resources/read",{uri:u(),...rn}),yi={ref:A([Xr,Yr]),argument:h({name:u(),value:u()}),context:h({arguments:j(u(),u()).optional()}).optional()},bs=dt("completion/complete",yi),$s=dt("server/discover",{}),An=h({toolsListChanged:C().optional(),promptsListChanged:C().optional(),resourcesListChanged:C().optional(),resourceSubscriptions:S(u()).optional()}),bi={notifications:An},zs=dt("subscriptions/listen",bi),ws=Nn.extend({"io.modelcontextprotocol/subscriptionId":r}),Rs=H({_meta:ws,resultType:On.default("complete")}),yr={"tools/call":mt("tools/call",Si),"tools/list":mt("tools/list",It),"prompts/get":mt("prompts/get",{name:u(),arguments:j(u(),u()).optional()}),"prompts/list":mt("prompts/list",It),"resources/list":mt("resources/list",It),"resources/templates/list":mt("resources/templates/list",It),"resources/read":mt("resources/read",{uri:u()}),"completion/complete":mt("completion/complete",yi),"server/discover":mt("server/discover",{}),"subscriptions/listen":mt("subscriptions/listen",bi)};function Qe(Re){return H({_meta:Cn,...Re})}let xs={"tools/call":Qe({content:S(Xe),structuredContent:F().optional(),isError:C().optional()}),"tools/list":Qe({ttlMs:R().int().min(0),cacheScope:X(["public","private"]),tools:S(Qr),nextCursor:o.optional()}),"prompts/get":Qe({description:u().optional(),messages:S(St)}),"prompts/list":Qe({ttlMs:R().int().min(0),cacheScope:X(["public","private"]),prompts:S(Ut),nextCursor:o.optional()}),"resources/list":Qe({ttlMs:R().int().min(0),cacheScope:X(["public","private"]),resources:S(_t),nextCursor:o.optional()}),"resources/templates/list":Qe({ttlMs:R().int().min(0),cacheScope:X(["public","private"]),resourceTemplates:S(Mt),nextCursor:o.optional()}),"resources/read":Qe({ttlMs:R().int().min(0),cacheScope:X(["public","private"]),contents:S(A([vt,At]))}),"completion/complete":Qe({completion:h({values:S(u()).max(100),total:R().int().optional(),hasMore:C().optional()}).loose()}),"server/discover":Qe({ttlMs:R().int().min(0).catch(0),cacheScope:X(["public","private"]).catch("private"),supportedVersions:S(u()),capabilities:En,instructions:u().optional()}),"subscriptions/listen":Qe({})},nn=H({"io.modelcontextprotocol/subscriptionId":r.optional()}),Mn=h({method:y("notifications/subscriptions/acknowledged"),params:h({_meta:nn.optional(),notifications:An})}),Un=h({_meta:nn.optional(),requestId:r,reason:u().optional()}),Dn=h({method:y("notifications/cancelled"),params:Un}),Ld={"notifications/cancelled":Dn,"notifications/progress":Le,"notifications/message":xt,"notifications/resources/updated":er,"notifications/resources/list_changed":ct,"notifications/tools/list_changed":Dt,"notifications/prompts/list_changed":Ne,"notifications/subscriptions/acknowledged":Mn},et=(Re)=>h({jsonrpc:y("2.0"),id:A([u(),R().int()]),result:Re}).strict();return{JSONValueSchema:e,JSONObjectSchema:t,ProgressTokenSchema:n,CursorSchema:o,RequestIdSchema:r,RoleSchema:i,LoggingLevelSchema:a,TaskMetadataSchema:c,RelatedTaskMetadataSchema:l,RequestMetaSchema:d,BaseRequestParamsSchema:m,TaskAugmentedRequestParamsSchema:p,NotificationsParamsSchema:f,NotificationSchema:v,IconSchema:g,IconsSchema:b,BaseMetadataSchema:w,ImplementationSchema:Z,ClientTasksCapabilitySchema:T,ServerTasksCapabilitySchema:ne,ClientCapabilitiesSchema:ue,ServerCapabilitiesSchema:Oe,ProgressSchema:Se,ProgressNotificationParamsSchema:Ie,ProgressNotificationSchema:Le,LoggingMessageNotificationParamsSchema:Rt,LoggingMessageNotificationSchema:xt,ResourceContentsSchema:gt,TextResourceContentsSchema:vt,BlobResourceContentsSchema:At,AnnotationsSchema:Ye,ResourceSchema:_t,ResourceTemplateSchema:Mt,ResourceListChangedNotificationSchema:ct,ResourceUpdatedNotificationParamsSchema:Ze,ResourceUpdatedNotificationSchema:er,PromptArgumentSchema:tr,PromptSchema:Ut,PromptListChangedNotificationSchema:Ne,TextContentSchema:Ve,ImageContentSchema:Fe,AudioContentSchema:kt,ToolUseContentSchema:Gr,EmbeddedResourceSchema:lt,ResourceLinkSchema:ut,ContentBlockSchema:Xe,PromptMessageSchema:St,ToolAnnotationsSchema:yt,ToolListChangedNotificationSchema:Dt,ModelHintSchema:Lt,ModelPreferencesSchema:vr,ToolChoiceSchema:Zt,BooleanSchemaSchema:Br,StringSchemaSchema:M,NumberSchemaSchema:Vt,UntitledSingleSelectEnumSchemaSchema:B,TitledSingleSelectEnumSchemaSchema:V,LegacyTitledEnumSchemaSchema:te,SingleSelectEnumSchemaSchema:U,UntitledMultiSelectEnumSchemaSchema:N,TitledMultiSelectEnumSchemaSchema:Y,MultiSelectEnumSchemaSchema:W,EnumSchemaSchema:ke,PrimitiveSchemaDefinitionSchema:Wr,ElicitRequestFormParamsSchema:Ft,ResourceTemplateReferenceSchema:Yr,PromptReferenceSchema:Xr,RootSchema:Bo,ClientCapabilities2026Schema:Wo,ServerCapabilities2026Schema:En,RequestMetaEnvelopeSchema:Tn,ToolSchema:Qr,ToolResultContentSchema:Yo,SamplingMessageContentBlockSchema:jn,SamplingMessageSchema:en,ResultTypeSchema:On,ResultMetaSchema:Nn,ResultSchema:Xo,PaginatedResultSchema:us,CallToolResultSchema:qn,ListToolsResultSchema:Qo,ListPromptsResultSchema:ei,GetPromptResultSchema:ti,ListResourcesResultSchema:ri,ListResourceTemplatesResultSchema:ni,ReadResourceResultSchema:oi,CompleteResultSchema:ii,CacheableResultSchema:ds,DiscoverResultSchema:ai,CreateMessageRequestParamsSchema:Sr,CreateMessageRequestSchema:si,ListRootsRequestSchema:ci,CreateMessageResultSchema:li,ListRootsResultSchema:ui,ElicitResultSchema:di,ElicitRequestURLParamsSchema:mi,ElicitRequestParamsSchema:pi,ElicitRequestSchema:fi,InputRequestSchema:hi,InputResponseSchema:gi,InputRequestsSchema:vi,InputResponsesSchema:_i,InputRequiredResultSchema:tn,InputResponseRequestParamsSchema:ms,CallToolRequestSchema:fs,ListToolsRequestSchema:hs,ListPromptsRequestSchema:gs,GetPromptRequestSchema:vs,ListResourcesRequestSchema:_s,ListResourceTemplatesRequestSchema:Ss,ReadResourceRequestSchema:ys,CompleteRequestSchema:bs,DiscoverRequestSchema:$s,SubscriptionFilterSchema:An,SubscriptionsListenRequestSchema:zs,SubscriptionsListenResultMetaSchema:ws,SubscriptionsListenResultSchema:Rs,dispatchRequestSchemas:yr,dispatchResultSchemas:xs,NotificationMetaSchema:nn,SubscriptionsAcknowledgedNotificationSchema:Mn,CancelledNotificationParamsSchema:Un,CancelledNotificationSchema:Dn,notificationSchemas2026:Ld,JSONRPCResultResponseSchema:et(Xo),CallToolResultResponseSchema:et(A([qn,tn])),ListToolsResultResponseSchema:et(Qo),ListPromptsResultResponseSchema:et(ei),GetPromptResultResponseSchema:et(A([ti,tn])),ListResourcesResultResponseSchema:et(ri),ListResourceTemplatesResultResponseSchema:et(ni),ReadResourceResultResponseSchema:et(A([oi,tn])),CompleteResultResponseSchema:et(ii),DiscoverResultResponseSchema:et(ai)}}var AP;function $n(){return AP??=qP()}var MP=["tools/list","prompts/list","resources/list","resources/templates/list","resources/read","server/discover"];function UP(e){return MP.includes(e)}var jo=Symbol("modelcontextprotocol.resultCacheHintFallback");function Qu(e,t){if(t===void 0)return e;let n=e[jo];if(n===void 0)return{...e,[jo]:t};let o={},r=n.ttlMs??t.ttlMs;if(r!==void 0)o.ttlMs=r;let i=n.cacheScope??t.cacheScope;if(i!==void 0)o.cacheScope=i;return{...e,[jo]:o}}function DP(e){return e[jo]}function w_(e){return typeof e==="number"&&Number.isSafeInteger(e)&&e>=0}function R_(e){return e==="public"||e==="private"}function x_(e,t){if(e.ttlMs!==void 0&&!w_(e.ttlMs))throw RangeError(`Invalid cache hint for ${t}: ttlMs must be a non-negative safe integer (got ${String(e.ttlMs)})`);if(e.cacheScope!==void 0&&!R_(e.cacheScope))throw RangeError(`Invalid cache hint for ${t}: cacheScope must be 'public' or 'private' (got ${String(e.cacheScope)})`)}var O=function(e){return e[e.ParseError=-32700]="ParseError",e[e.InvalidRequest=-32600]="InvalidRequest",e[e.MethodNotFound=-32601]="MethodNotFound",e[e.InvalidParams=-32602]="InvalidParams",e[e.InternalError=-32603]="InternalError",e[e.ResourceNotFound=-32002]="ResourceNotFound",e[e.MissingRequiredClientCapability=-32021]="MissingRequiredClientCapability",e[e.UnsupportedProtocolVersion=-32022]="UnsupportedProtocolVersion",e[e.UrlElicitationRequired=-32042]="UrlElicitationRequired",e}({}),G=class e extends Error{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.ProtocolError"})}static[Symbol.hasInstance](t){return Oo(this,t)}static isInstance(t){if(typeof this!=="function")throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return Oo(this,t)}constructor(t,n,o){super(n);this.code=t,this.data=o,this.name="ProtocolError",S_(this,new.target)}static fromError(t,n,o){if(t===O.UrlElicitationRequired&&o){let r=o;if(r.elicitations)return new p$(r.elicitations,n)}if(t===O.UnsupportedProtocolVersion&&o){let r=o;if(Array.isArray(r.supported)&&typeof r.requested==="string")return new f$({supported:r.supported,requested:r.requested},n)}if(t===O.InvalidParams||t===O.ResourceNotFound){let r=o;if(typeof r?.uri==="string"&&(t===O.ResourceNotFound||Object.keys(r).length===1))return new ed(r.uri,n)}if(t===O.MissingRequiredClientCapability&&o){let r=o;if(r.requiredCapabilities!==null&&typeof r.requiredCapabilities==="object"&&!Array.isArray(r.requiredCapabilities))return new td({requiredCapabilities:r.requiredCapabilities},n)}return new e(t,n,o)}},ed=class extends G{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.ResourceNotFoundError"})}constructor(e,t=`Resource not found: ${e}`){super(O.InvalidParams,t,{uri:e})}get uri(){return this.data.uri}},p$=class extends G{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.UrlElicitationRequiredError"})}constructor(e,t=`URL elicitation${e.length>1?"s":""} required`){super(O.UrlElicitationRequired,t,{elicitations:e})}get elicitations(){return this.data?.elicitations??[]}},f$=class extends G{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.UnsupportedProtocolVersionError"})}constructor(e,t=`Unsupported protocol version: ${e.requested}`){super(O.UnsupportedProtocolVersion,t,e)}get supported(){return this.data.supported}get requested(){return this.data.requested}},td=class extends G{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.MissingRequiredClientCapabilityError"})}constructor(e,t=`Missing required client capabilities: ${Object.keys(e.requiredCapabilities).join(", ")}`){super(O.MissingRequiredClientCapability,t,e)}get requiredCapabilities(){return this.data.requiredCapabilities}},LP=0,ZP="private",VP=["tools/call","prompts/get","resources/read"];function FP(e,t){let n=t.resultType;if(n===void 0)return{...t,resultType:"complete"};if(n==="complete")return t;if(VP.includes(e))return t;throw new G(O.InternalError,`Handler for ${e} returned resultType '${String(n)}', but results of ${e} only support 'complete' on protocol revision 2026-07-28`)}function JP(e,t){let n=DP(t);if(t.resultType!=="complete"||!UP(e))return n===void 0?t:WP(t);let o=t,r=w_(o.ttlMs)?o.ttlMs:GP(n),i=R_(o.cacheScope)?o.cacheScope:BP(n),a={...o,ttlMs:r,cacheScope:i};return delete a[jo],a}function HP(e){return e!==null&&typeof e==="object"&&!Array.isArray(e)}function KP(e,t){if(t===void 0)return e;let n=e._meta;if(n===void 0)return{...e,_meta:{[cr]:t}};if(!HP(n))return e;if(n[cr]!==void 0)return e;return{...e,_meta:{...n,[cr]:t}}}function GP(e){return e!==void 0&&w_(e.ttlMs)?e.ttlMs:LP}function BP(e){return e!==void 0&&R_(e.cacheScope)?e.cacheScope:ZP}function WP(e){let t={...e};return delete t[jo],t}var YP=["elicitation/create","sampling/createMessage","roots/list"],Gu;function h$(){if(Gu)return Gu;let e=$n();return Gu={request:{"elicitation/create":h({method:y("elicitation/create"),params:e.ElicitRequestParamsSchema}),"sampling/createMessage":h({method:y("sampling/createMessage"),params:e.CreateMessageRequestParamsSchema}),"roots/list":h({method:y("roots/list"),params:H({}).optional()})},response:{"elicitation/create":e.ElicitResultSchema,"sampling/createMessage":e.CreateMessageResultSchema,"roots/list":e.ListRootsResultSchema}},Gu}function g$(e){return YP.includes(e)}function m_(e){return g$(e)?h$().request[e]:void 0}function XP(e){return g$(e)?h$().response[e]:void 0}var k_={"tools/call":null,"tools/list":null,"prompts/get":null,"prompts/list":null,"resources/list":null,"resources/templates/list":null,"resources/read":null,"completion/complete":null,"server/discover":null,"subscriptions/listen":null},v$={"notifications/cancelled":null,"notifications/progress":null,"notifications/message":null,"notifications/resources/updated":null,"notifications/resources/list_changed":null,"notifications/tools/list_changed":null,"notifications/prompts/list_changed":null,"notifications/subscriptions/acknowledged":null};function _$(e){return Object.prototype.hasOwnProperty.call(k_,e)}function S$(e){return Object.prototype.hasOwnProperty.call(v$,e)}function QP(e){return Object.prototype.hasOwnProperty.call(k_,e)}function eE(e){return _$(e)?$n().dispatchRequestSchemas[e]:void 0}function tE(e){return QP(e)?$n().dispatchResultSchemas[e]:void 0}function rE(e){return S$(e)?$n().notificationSchemas2026[e]:void 0}var OD=Object.keys(k_),ND=Object.keys(v$);function Na(e){return e!==null&&typeof e==="object"&&!Array.isArray(e)}function ja(e,t){if(e===void 0)return{ok:!1,reason:"not-in-era"};let n=e.safeParse(t);return n.success?{ok:!0,value:n.data}:{ok:!1,reason:"invalid",message:String(n.error)}}var nE={ok:!1,reason:"not-in-era"},oE=[_n,lr];function iE(e,t){let n=t,o=!1,r=()=>{if(!o)n={...n},o=!0;return n},i=t.tools;if(e==="tools/list"&&Array.isArray(i)&&i.some((s)=>Na(s)&&("execution"in s)))r().tools=i.map((s)=>{if(!Na(s)||!("execution"in s))return s;let c={...s};return delete c.execution,c});let a=t.capabilities;if(Na(a)&&"tasks"in a){let s={...a};delete s.tasks,r().capabilities=s}return n}var I_={era:"2026-07-28",hasRequestMethod:_$,hasNotificationMethod:S$,hasInputRequestMethod:(e)=>m_(e)!==void 0,validateRequest:(e,t)=>ja(eE(e),t),validateResult:(e,t)=>ja(tE(e),t),validateNotification:(e,t)=>ja(rE(e),t),validateInputRequest:(e,t)=>ja(m_(e),t),validateInputResponse:(e,t)=>ja(XP(e),t),samplingResultVariant:()=>nE,outboundEnvelope(e){return{[_n]:e.protocolVersion,[So]:e.clientInfo,[lr]:e.clientCapabilities,...e.logLevel!==void 0&&{[Or]:e.logLevel}}},validateEnvelopeMeta(e){let t=[];for(let o of oE)if(!(o in e))t.push({key:o,problem:"missing"});let n=$n().RequestMetaEnvelopeSchema.safeParse(e);if(!n.success)for(let o of n.error.issues){let r=o.path.map(String),i=r.length>0?r.join("."):"_meta";if(r.length===1&&t.some((a)=>a.key===i&&a.problem==="missing"))continue;t.push({key:i,problem:o.message})}return t},projectCallToolResult:(e)=>i$(e),inputRequestSchema:m_,decodeResult(e,t){if(!Na(t))return{kind:"invalid",error:new re(ae.InvalidResult,`Invalid result for ${e}: not an object`,{method:e})};let n=t.resultType;if(n===void 0)return{kind:"invalid",error:new re(ae.InvalidResult,`Invalid result for ${e}: missing required resultType — servers implementing protocol revision 2026-07-28 MUST include it (the absent-means-complete bridge applies only to earlier-revision servers)`,{method:e,violation:"missing-resultType"})};if(typeof n!=="string")return{kind:"invalid",error:new re(ae.InvalidResult,`Invalid result for ${e}: non-string resultType`,{method:e,resultType:n})};if(n==="input_required"){let a=t.inputRequests,s=Na(a)?a:{},c=t.requestState;if(Object.keys(s).length===0&&typeof c!=="string")return{kind:"invalid",error:new re(ae.InvalidResult,`Invalid result for ${e}: input_required carries neither inputRequests nor requestState (every input_required result must include at least one of the two)`,{method:e,violation:"input-required-missing-both"})};return{kind:"input_required",inputRequests:s,...typeof c==="string"&&{requestState:c}}}if(n!=="complete")return{kind:"invalid",error:new re(ae.UnsupportedResultType,`Unsupported result type '${n}' for ${e}`,{resultType:n,method:e})};let o=aE(),r=Object.hasOwn(o,e)?o[e]:void 0;if(r!==void 0){let a=r.safeParse(t);if(!a.success)return{kind:"invalid",error:new re(ae.InvalidResult,`Invalid result for ${e}: ${a.error}`,{method:e})}}let i={...t};return delete i.resultType,{kind:"complete",result:i}},encodeResult(e,t,n){return KP(JP(e,FP(e,iE(e,t))),n)},encodeErrorCode:(e)=>e===-32002?-32602:e,checkInboundEnvelope(e){if(e.envelope===void 0)return"Request is missing the required _meta envelope for protocol revision 2026-07-28 (io.modelcontextprotocol/protocolVersion, io.modelcontextprotocol/clientCapabilities)";let t=$n().RequestMetaEnvelopeSchema.safeParse(e.envelope);if(!t.success)return`Invalid _meta envelope for protocol revision 2026-07-28: ${t.error.issues.map((n)=>n.message).join("; ")}`}},Bu;function aE(){if(Bu)return Bu;let e=$n();return Bu={"tools/call":e.CallToolResultSchema,"tools/list":e.ListToolsResultSchema,"prompts/get":e.GetPromptResultSchema,"prompts/list":e.ListPromptsResultSchema,"resources/list":e.ListResourcesResultSchema,"resources/templates/list":e.ListResourceTemplatesResultSchema,"resources/read":e.ReadResourceResultSchema,"completion/complete":e.CompleteResultSchema,"server/discover":e.DiscoverResultSchema},Bu}var P_="2026-07-28";function No(e){return e!==void 0&&Aa(e)?I_:z_}function Wb(e){if(e.revision!==void 0)return No(e.revision).era;return e.era==="modern"?I_.era:z_.era}function p_(e){return y$.some((t)=>t.hasRequestMethod(e))}function f_(e){return y$.some((t)=>t.hasNotificationMethod(e))}var y$=[z_,I_];var sE=qS({AnnotationsSchema:()=>ur,AudioContentSchema:()=>ko,BaseMetadataSchema:()=>sr,BaseRequestParamsSchema:()=>Ee,BlobResourceContentsSchema:()=>ya,BooleanSchemaSchema:()=>Ra,CallToolRequestParamsSchema:()=>iu,CallToolRequestSchema:()=>au,CallToolResultSchema:()=>wa,CancelTaskRequestSchema:()=>Wv,CancelTaskResultSchema:()=>Yv,CancelledNotificationParamsSchema:()=>ll,CancelledNotificationSchema:()=>pa,ClientCapabilitiesSchema:()=>pl,ClientNotificationSchema:()=>Qv,ClientRequestSchema:()=>Xv,ClientResultSchema:()=>e_,ClientTasksCapabilitySchema:()=>dl,CompatibilityCallToolResultSchema:()=>Uv,CompleteRequestParamsSchema:()=>Ou,CompleteRequestSchema:()=>Nu,CompleteResultSchema:()=>Cu,ContentBlockSchema:()=>Io,CreateMessageRequestParamsSchema:()=>_u,CreateMessageRequestSchema:()=>Su,CreateMessageResultSchema:()=>yu,CreateMessageResultWithToolsSchema:()=>bu,CreateTaskResultSchema:()=>Zv,CursorSchema:()=>sa,DiscoverRequestSchema:()=>vl,DiscoverResultSchema:()=>_l,ElicitRequestFormParamsSchema:()=>To,ElicitRequestParamsSchema:()=>xu,ElicitRequestSchema:()=>ku,ElicitRequestURLParamsSchema:()=>Ru,ElicitResultSchema:()=>Eu,ElicitationCompleteNotificationParamsSchema:()=>Iu,ElicitationCompleteNotificationSchema:()=>Pu,EmbeddedResourceSchema:()=>Wl,EmptyResultSchema:()=>ma,EnumSchemaSchema:()=>wu,GetPromptRequestParamsSchema:()=>Kl,GetPromptRequestSchema:()=>Gl,GetPromptResultSchema:()=>Ql,GetTaskPayloadRequestSchema:()=>Hv,GetTaskPayloadResultSchema:()=>Kv,GetTaskRequestSchema:()=>Fv,GetTaskResultSchema:()=>Jv,IconSchema:()=>ul,IconsSchema:()=>Cr,ImageContentSchema:()=>xo,ImplementationSchema:()=>zo,InitializeRequestParamsSchema:()=>fl,InitializeRequestSchema:()=>fa,InitializeResultSchema:()=>hl,InitializedNotificationSchema:()=>gl,JSONArraySchema:()=>qv,JSONObjectSchema:()=>$e,JSONRPCErrorResponseSchema:()=>bo,JSONRPCMessageSchema:()=>$o,JSONRPCNotificationSchema:()=>da,JSONRPCRequestSchema:()=>ua,JSONRPCResponseSchema:()=>Av,JSONRPCResultResponseSchema:()=>yo,JSONValueSchema:()=>jr,LegacyTitledEnumSchemaSchema:()=>Ia,ListChangedOptionsBaseSchema:()=>Dv,ListPromptsRequestSchema:()=>Jl,ListPromptsResultSchema:()=>Hl,ListResourceTemplatesRequestSchema:()=>Rl,ListResourceTemplatesResultSchema:()=>xl,ListResourcesRequestSchema:()=>zl,ListResourcesResultSchema:()=>wl,ListRootsRequestSchema:()=>Au,ListRootsResultSchema:()=>Mu,ListTasksRequestSchema:()=>Gv,ListTasksResultSchema:()=>Bv,ListToolsRequestSchema:()=>nu,ListToolsResultSchema:()=>ou,LoggingLevelSchema:()=>Ur,LoggingMessageNotificationParamsSchema:()=>uu,LoggingMessageNotificationSchema:()=>du,ModelHintSchema:()=>mu,ModelPreferencesSchema:()=>pu,MultiSelectEnumSchemaSchema:()=>zu,NotificationSchema:()=>Ue,NotificationsParamsSchema:()=>Me,NumberSchemaSchema:()=>Eo,PaginatedRequestParamsSchema:()=>bl,PaginatedRequestSchema:()=>qr,PaginatedResultSchema:()=>Ar,PingRequestSchema:()=>ga,PrimitiveSchemaDefinitionSchema:()=>Ta,ProgressNotificationParamsSchema:()=>yl,ProgressNotificationSchema:()=>va,ProgressSchema:()=>Sl,ProgressTokenSchema:()=>aa,PromptArgumentSchema:()=>Vl,PromptListChangedNotificationSchema:()=>eu,PromptMessageSchema:()=>Xl,PromptReferenceSchema:()=>ju,PromptSchema:()=>Fl,ReadResourceRequestParamsSchema:()=>kl,ReadResourceRequestSchema:()=>Il,ReadResourceResultSchema:()=>Pl,RelatedTaskMetadataSchema:()=>cl,RequestIdSchema:()=>Nr,RequestMetaSchema:()=>ca,RequestSchema:()=>ze,ResourceContentsSchema:()=>_a,ResourceLinkSchema:()=>Yl,ResourceListChangedNotificationSchema:()=>El,ResourceRequestParamsSchema:()=>wo,ResourceSchema:()=>ba,ResourceTemplateReferenceSchema:()=>Tu,ResourceTemplateSchema:()=>$l,ResourceUpdatedNotificationParamsSchema:()=>Ll,ResourceUpdatedNotificationSchema:()=>Zl,ResultMetaObjectSchema:()=>la,ResultSchema:()=>we,RoleSchema:()=>Mr,RootSchema:()=>qu,RootsListChangedNotificationSchema:()=>Uu,SamplingContentSchema:()=>gu,SamplingMessageContentBlockSchema:()=>gn,SamplingMessageSchema:()=>vu,ServerCapabilitiesSchema:()=>ha,ServerNotificationSchema:()=>r_,ServerRequestSchema:()=>t_,ServerResultSchema:()=>n_,ServerTasksCapabilitySchema:()=>ml,SetLevelRequestParamsSchema:()=>cu,SetLevelRequestSchema:()=>lu,SingleSelectEnumSchemaSchema:()=>$u,StringSchemaSchema:()=>Po,SubscribeRequestParamsSchema:()=>Tl,SubscribeRequestSchema:()=>jl,SubscriptionFilterSchema:()=>$a,SubscriptionsAcknowledgedNotificationParamsSchema:()=>Al,SubscriptionsAcknowledgedNotificationSchema:()=>Ml,SubscriptionsListenRequestParamsSchema:()=>Cl,SubscriptionsListenRequestSchema:()=>ql,SubscriptionsListenResultMetaSchema:()=>Ul,SubscriptionsListenResultSchema:()=>Dl,TaskAugmentedRequestParamsSchema:()=>yn,TaskCreationParamsSchema:()=>Lv,TaskMetadataSchema:()=>sl,TaskSchema:()=>Dr,TaskStatusNotificationParamsSchema:()=>Lu,TaskStatusNotificationSchema:()=>Vv,TaskStatusSchema:()=>Du,TextContentSchema:()=>Ro,TextResourceContentsSchema:()=>Sa,TitledMultiSelectEnumSchemaSchema:()=>Ea,TitledSingleSelectEnumSchemaSchema:()=>ka,ToolAnnotationsSchema:()=>tu,ToolChoiceSchema:()=>fu,ToolExecutionSchema:()=>ru,ToolListChangedNotificationSchema:()=>su,ToolResultContentSchema:()=>hu,ToolSchema:()=>za,ToolUseContentSchema:()=>Bl,UnsubscribeRequestParamsSchema:()=>Ol,UnsubscribeRequestSchema:()=>Nl,UntitledMultiSelectEnumSchemaSchema:()=>Pa,UntitledSingleSelectEnumSchemaSchema:()=>xa});var Ao=(e)=>ua.safeParse(e).success,b$=(e)=>da.safeParse(e).success,Co=(e)=>yo.safeParse(e).success,Ma=(e)=>bo.safeParse(e).success;var dr=(e)=>typeof e==="object"&&e!==null&&!Array.isArray(e)&&e.resultType==="input_required";var E_=(e)=>fa.safeParse(e).success;function T_(e){if(e.params.ref.type!=="ref/prompt")throw TypeError(`Expected CompleteRequestPrompt, but got ${e.params.ref.type}`)}function j_(e){if(e.params.ref.type!=="ref/resource")throw TypeError(`Expected CompleteRequestResourceTemplate, but got ${e.params.ref.type}`)}var Yb="x-mcp-header",cE=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/,lE=new Set(["string","integer","boolean","number"]);function O_(e){let t=[],n=new Map,o=(i,a,s)=>{if(i===null||typeof i!=="object")return;let c=i;if(Yb in c){if(!s||a.length===0)return`${Wu(a)}: x-mcp-header is only permitted on properties statically reachable via a chain of 'properties' keys (not under items, additionalProperties, oneOf/anyOf/allOf/not, if/then/else, or $ref)`;let d=c[Yb];if(typeof d!=="string"||d.length===0)return`${Wu(a)}: x-mcp-header MUST be a non-empty string`;if(!cE.test(d))return`${Wu(a)}: x-mcp-header '${d}' is not a valid RFC 9110 token (no spaces, control characters or HTTP delimiters)`;let m=typeof c.type==="string"?c.type:void 0;if(m===void 0||!lE.has(m))return`${Wu(a)}: x-mcp-header is only permitted on primitive-typed properties (string, integer, boolean); got ${m??"<none>"}`;let p=d.toLowerCase(),f=n.get(p);if(f!==void 0)return`x-mcp-header '${d}' is not case-insensitively unique (also declared as '${f}')`;n.set(p,d),t.push({path:a,headerName:d,type:m})}let l=c.properties;if(l!==null&&typeof l==="object")for(let[d,m]of Object.entries(l)){let p=o(m,[...a,d],s);if(p!==void 0)return p}for(let d of uE){let m=c[d];if(m===void 0)continue;let p=Array.isArray(m)?m:m!==null&&typeof m==="object"&&dE.has(d)?Object.values(m):[m];for(let f of p){let v=o(f,[...a,`<${d}>`],!1);if(v!==void 0)return v}}},r=o(e,[],!0);return r===void 0?{valid:!0,declarations:t}:{valid:!1,reason:r}}var uE=["items","prefixItems","contains","additionalProperties","unevaluatedProperties","unevaluatedItems","propertyNames","patternProperties","dependentSchemas","oneOf","anyOf","allOf","not","if","then","else","$defs","definitions"],dE=new Set(["patternProperties","dependentSchemas","$defs","definitions"]);function Wu(e){return e.length===0?"<root>":e.join(".")}var Yu=-32020,CD=[{rung:"http-method",order:1,evaluatedAt:"edge",codes:[-32000],conformance:[],rationale:"The modern era is POST-only; GET/DELETE are body-less 2025-era session operations and are method-routed to legacy serving (405 when legacy serving is not configured), before any body is read."},{rung:"jsonrpc-shape",order:2,evaluatedAt:"edge",codes:[O.InvalidRequest],conformance:["server-stateless"],rationale:"The body must be a JSON-RPC request or notification: posted responses and batch arrays containing a modern or invalid element are rejected before classification (element-wise batch rule); all-legacy arrays stay legacy traffic."},{rung:"era-classification",order:3,evaluatedAt:"edge",codes:[Yu,O.UnsupportedProtocolVersion],conformance:["server-stateless","http-header-validation","http-custom-header-server-validation"],rationale:"Body-primary era classification with the protocol-version header as a cross-check; a header/body disagreement is rejected with -32020 (HeaderMismatch), and an envelope-less request on a modern-only endpoint is answered with the unsupported-protocol-version error naming the supported revisions."},{rung:"envelope",order:4,evaluatedAt:"edge",codes:[O.InvalidParams],conformance:["server-stateless"],rationale:"A present envelope claim with a malformed envelope — and a missing envelope on a request whose protocol-version header names a modern revision — is an invalid-params rejection naming the offending or missing key(s); never a silent fall back to legacy handling. This is the only place an invalid-params rejection maps to HTTP 400."},{rung:"method-registry",order:5,evaluatedAt:"dispatch",codes:[O.MethodNotFound],conformance:["server-stateless"],rationale:"Method existence outranks parameter validity: a method absent from the negotiated revision’s registry (or with no handler installed) answers method-not-found before params or capabilities are looked at."},{rung:"request-params",order:6,evaluatedAt:"dispatch",codes:[O.InvalidParams],conformance:[],rationale:"Per-method params validation; emitted in-band by the dispatch layer (HTTP 200), never via the ladder status table."},{rung:"standard-header-validation",order:7,evaluatedAt:"pre-dispatch",codes:[Yu],conformance:["http-header-validation"],rationale:"SEP-2243 standard `Mcp-Method` / `Mcp-Name` headers — presence, sentinel decoding, and `Mcp-Name` ↔ body cross-check — are validated by the HTTP entry on a modern-classified request after the supported-revision gate and before dispatch. The classifier’s own header-mismatch cells (protocol-version, `Mcp-Method` mismatch) stay on the edge `era-classification` rung; this rung carries the entry-layer presence/`Mcp-Name` half. Evaluated before the capability gate, the factory call, and the `Mcp-Param-*` rung so a request that fails several rungs is answered by the standard-header rung first. The documented order (after method-registry 5 and request-params 6) is NOT the observed precedence: serveModern evaluates this rung immediately after the supported-revision gate, so a request that also fails a dispatch rung is answered here before the dispatch rungs (5–6) are consulted."},{rung:"client-capabilities",order:8,evaluatedAt:"pre-dispatch",codes:[O.MissingRequiredClientCapability],conformance:["server-stateless"],rationale:"The capability requirement is checked by the HTTP entry, pre-dispatch, against the validated envelope the classifier produced — pinning the spec-mandated HTTP 400 independently of how dispatch- and handler-produced errors are mapped. The documented order (after method resolution and params validation) is preserved observably only while the requirement table is empty: once a served method gains a requirement entry, a request that is missing the capability and would also fail a dispatch rung is answered by this gate first, so the entry must consult the method registry before the gate if the documented precedence is to stay observable."},{rung:"param-header-validation",order:9,evaluatedAt:"pre-dispatch",codes:[Yu],conformance:["http-custom-header-server-validation"],rationale:"SEP-2243 `Mcp-Param-*` headers are validated against the named tool’s `x-mcp-header` declarations and the body `arguments` after the tool registry is known and before dispatch reaches the handler; a missing/disagreeing/malformed header is rejected 400 / -32020 with the same shape as the standard-header cross-checks. The documented order (after method resolution and params validation) is preserved observably only when the body `arguments` would otherwise validate: the check runs pre-dispatch, so a `tools/call` that fails BOTH this rung and a dispatch-time rung (e.g. order-6 `request-params`, -32602) is answered by this gate first with 400 / -32020, not by the earlier-ordered rung."}],mE={[O.ParseError]:400,[O.InvalidRequest]:400,[O.MethodNotFound]:404,[O.UnsupportedProtocolVersion]:400,[O.MissingRequiredClientCapability]:400,[Yu]:400};function rd(e,t){return Hi(e,t)}function Oa(e){return new Set(e.flatMap((t)=>Object.keys(t.shape)))}function qo(e){if(e==null)return!1;let t=typeof e;if(t!=="object"&&t!=="function")return!1;if(!("~standard"in e))return!1;return typeof e["~standard"]?.validate==="function"}var Xb=!1,v_="draft-2020-12";function Lr(e,t="input"){let n=e["~standard"],o;if(n.jsonSchema)o=n.jsonSchema[t]({target:v_});else if(n.vendor==="zod"){if(!("_zod"in e))throw Error("Schema appears to be from zod 3, which the SDK cannot convert to JSON Schema. Upgrade to zod >=4.2.0, or wrap your JSON Schema with fromJsonSchema().");if(!Xb)Xb=!0,console.warn("[mcp-sdk] Your zod version does not implement `~standard.jsonSchema` (added in zod 4.2.0). Falling back to z.toJSONSchema(). Upgrade to zod >=4.2.0 to silence this warning.");o=fn(e,{target:v_,io:t})}else throw Error(`Schema library "${n.vendor}" does not implement StandardJSONSchemaV1 (\`~standard.jsonSchema\`). Upgrade to a version that does, or wrap your JSON Schema with fromJsonSchema().`);if(t==="output"){if(o.type!==void 0)return o;return $$(o)?{type:"object",...o}:o}if(o.type!==void 0&&o.type!=="object")throw Error(`MCP tool and prompt schemas must describe objects (got type: ${JSON.stringify(o.type)}). Wrap your schema in z.object({...}) or equivalent.`);return{type:"object",...o}}function $$(e){if("properties"in e||"patternProperties"in e||"additionalProperties"in e||"required"in e)return!0;for(let t of["oneOf","anyOf","allOf"]){let n=e[t];if(Array.isArray(n)&&n.length>0)return n.every((o)=>o!==null&&typeof o==="object"&&(o.type==="object"||$$(o)))}return!1}function pE(e){if(!e.path?.length)return e.message;return`${e.path.map((t)=>String(typeof t==="object"?t.key:t)).join(".")}: ${e.message}`}async function bn(e,t){let n=await e["~standard"].validate(t);if(n.issues&&n.issues.length>0)return{success:!1,error:n.issues.map((o)=>pE(o)).join(", ")};return{success:!0,data:n.value}}function fE(e){let t=fn(e,{target:v_,io:"input"});return typeof t.pattern==="string"?t.pattern:void 0}var hE=/\\\.\\d\{(\d+)\}/;function gE(e){let t=hE.exec(e),n=[void 0,-1,0];if(t)n.push(Number(t[1]));return[!1,!0].flatMap((o)=>[!1,!0].flatMap((r)=>n.map((i)=>ht.datetime({local:o,offset:r,precision:i}))))}function vE(e,t){let n;switch(e){case"email":n=[Ac()];break;case"uri":n=[fo()];break;case"date":n=[ht.date()];break;case"date-time":n=gE(t);break}return new Set(n.map((o)=>fE(o)).filter((o)=>o!==void 0))}function _E(e,t,n){if(n!=="zod")return!0;return vE(e,t).has(t)}function z$(e){let t=Lr(e,"input"),n=t.properties||{},o=t.required||[];return Object.entries(n).map(([r,i])=>({name:r,description:i?.description,required:o.includes(r)}))}function qa(e){return typeof e==="object"&&e!==null&&!Array.isArray(e)}function SE(e){try{return Lr(e,"input")}catch(t){let n=t instanceof Error?t.message:String(t);throw new G(O.InvalidParams,`Elicitation requestedSchema must describe an object with flat primitive properties: ${n}`)}}var yE=new Set(["$comment","deprecated","description","examples","readOnly","title","writeOnly"]);function N_(e){return yE.has(e)||e.startsWith("x-")}var bE=new Set(["$schema",...Object.keys(To.shape.requestedSchema.shape)]),Qb={string:Oa([Po,xa,ka,Ia]),number:Oa([Eo]),integer:Oa([Eo]),boolean:Oa([Ra]),array:Oa([Pa,Ea])},$E=new Set(Po.shape.format.unwrap().options);function zE(e,t,n,o){if(!qa(e))return e;let r=typeof e.type==="string"&&Object.hasOwn(Qb,e.type)?Qb[e.type]:void 0;if(r===void 0)return e;let i={};for(let[a,s]of Object.entries(e))if(r.has(a)||N_(a))i[a]=s;else if(a==="pattern"&&e.type==="string"&&typeof e.format==="string"){if(!$E.has(e.format))i[a]=s;else if(typeof s!=="string"||!_E(e.format,s,n))o.push(`${t}.${a}`)}else o.push(`${t}.${a}`);return i}function wE(e,t){let n={},o=[];for(let[r,i]of Object.entries(e))if(r==="properties"&&qa(i))n[r]=Object.fromEntries(Object.entries(i).map(([a,s])=>[a,zE(s,`properties.${a}`,t,o)]));else if(bE.has(r))n[r]=i;else if(!N_(r))o.push(r);if(o.length>0)throw new G(O.InvalidParams,`Elicitation requestedSchema contains unsupported JSON Schema constraint(s) after Standard Schema conversion: ${o.join(", ")}`);return n}function RE(e,t){if(!qa(e.properties))return t;let n=Object.entries(e.properties).filter(([,o])=>!rd(Ta,o).success).map(([o])=>`properties.${o}`);return n.length>0?n.join(", "):t}function __(e,t,n=""){if(Array.isArray(e)&&Array.isArray(t))return e.flatMap((o,r)=>__(o,t[r],`${n}[${r}]`));if(!qa(e)||!qa(t))return[];return Object.entries(e).flatMap(([o,r])=>{let i=n?`${n}.${o}`:o;if(!Object.prototype.hasOwnProperty.call(t,o))return N_(o)?[]:[i];return __(r,t[o],i)})}function xE(e){if(!qo(e.requestedSchema))return{...e,mode:"form",requestedSchema:e.requestedSchema};let t=e.requestedSchema["~standard"].vendor,n=wE(SE(e.requestedSchema),t),o=rd(To.shape.requestedSchema,n);if(!o.success)throw new G(O.InvalidParams,`Elicitation requestedSchema only supports flat primitive properties (string, number, integer, boolean, and string enums): ${RE(n,o.error.message)}`);let r=__(n,o.data);if(r.length>0)throw new G(O.InvalidParams,`Elicitation requestedSchema contains unsupported JSON Schema constraint(s) after Standard Schema conversion: ${r.join(", ")}`);let i=(o.data.required??[]).filter((a)=>!Object.prototype.hasOwnProperty.call(o.data.properties,a));if(i.length>0)throw new G(O.InvalidParams,`Elicitation requestedSchema lists required properties that are not defined in properties: ${i.join(", ")}`);return{...e,mode:"form",requestedSchema:o.data}}function kE(e){let t=e.inputRequests!==void 0&&Object.keys(e.inputRequests).length>0,n=typeof e.requestState==="string";if(!t&&!n)throw TypeError("inputRequired() requires at least one of inputRequests (with at least one entry) or requestState (spec: every InputRequiredResult MUST include at least one of the two)");return{resultType:"input_required",...e.inputRequests!==void 0&&{inputRequests:e.inputRequests},...e.requestState!==void 0&&{requestState:e.requestState}}}var IE=Object.assign(kE,{elicit(e){try{return{method:"elicitation/create",params:xE(e)}}catch(t){throw t instanceof G?TypeError(t.message,{cause:t}):t}},elicitUrl(e){return{method:"elicitation/create",params:{...e,mode:"url"}}},createMessage(e){return{method:"sampling/createMessage",params:e}},listRoots(){return{method:"roots/list"}}});var w$=250;function R$(e,t){return`Multi-round-trip request '${e}' still required input after ${t} rounds (inputRequired.maxRounds)`}function x$(e,t){return new Promise((n,o)=>{if(t?.aborted){o(t.reason instanceof re?t.reason:new re(ae.RequestTimeout,String(t.reason)));return}let r=setTimeout(()=>{t?.removeEventListener("abort",i),n()},e),i=()=>{clearTimeout(r),o(t?.reason instanceof re?t.reason:new re(ae.RequestTimeout,String(t?.reason)))};t?.addEventListener("abort",i,{once:!0})})}function k$(e){let t=new AbortController,n=()=>t.abort(e?.reason);if(e?.addEventListener("abort",n,{once:!0}),e?.aborted)t.abort(e.reason);return{signal:t.signal,abort:(o)=>t.abort(o),dispose:()=>e?.removeEventListener("abort",n)}}var PE=["AnnotationsSchema","AudioContentSchema","BaseMetadataSchema","BlobResourceContentsSchema","BooleanSchemaSchema","CallToolRequestSchema","CallToolRequestParamsSchema","CallToolResultSchema","CancelledNotificationSchema","CancelledNotificationParamsSchema","CancelTaskRequestSchema","CancelTaskResultSchema","ClientCapabilitiesSchema","ClientNotificationSchema","ClientRequestSchema","ClientResultSchema","CompatibilityCallToolResultSchema","CompleteRequestSchema","CompleteRequestParamsSchema","CompleteResultSchema","ContentBlockSchema","CreateMessageRequestSchema","CreateMessageRequestParamsSchema","CreateMessageResultSchema","CreateMessageResultWithToolsSchema","CreateTaskResultSchema","CursorSchema","DiscoverRequestSchema","DiscoverResultSchema","ElicitationCompleteNotificationSchema","ElicitationCompleteNotificationParamsSchema","ElicitRequestSchema","ElicitRequestFormParamsSchema","ElicitRequestParamsSchema","ElicitRequestURLParamsSchema","ElicitResultSchema","EmbeddedResourceSchema","EmptyResultSchema","EnumSchemaSchema","GetPromptRequestSchema","GetPromptRequestParamsSchema","GetPromptResultSchema","GetTaskPayloadRequestSchema","GetTaskPayloadResultSchema","GetTaskRequestSchema","GetTaskResultSchema","IconSchema","IconsSchema","ImageContentSchema","ImplementationSchema","InitializedNotificationSchema","InitializeRequestSchema","InitializeRequestParamsSchema","InitializeResultSchema","JSONArraySchema","JSONObjectSchema","JSONRPCErrorResponseSchema","JSONRPCMessageSchema","JSONRPCNotificationSchema","JSONRPCRequestSchema","JSONRPCResponseSchema","JSONRPCResultResponseSchema","JSONValueSchema","LegacyTitledEnumSchemaSchema","ListPromptsRequestSchema","ListPromptsResultSchema","ListResourcesRequestSchema","ListResourcesResultSchema","ListResourceTemplatesRequestSchema","ListResourceTemplatesResultSchema","ListRootsRequestSchema","ListRootsResultSchema","ListTasksRequestSchema","ListTasksResultSchema","ListToolsRequestSchema","ListToolsResultSchema","LoggingLevelSchema","LoggingMessageNotificationSchema","LoggingMessageNotificationParamsSchema","ModelHintSchema","ModelPreferencesSchema","MultiSelectEnumSchemaSchema","NotificationSchema","NumberSchemaSchema","PaginatedRequestSchema","PaginatedRequestParamsSchema","PaginatedResultSchema","PingRequestSchema","PrimitiveSchemaDefinitionSchema","ProgressSchema","ProgressNotificationSchema","ProgressNotificationParamsSchema","ProgressTokenSchema","PromptSchema","PromptArgumentSchema","PromptListChangedNotificationSchema","PromptMessageSchema","PromptReferenceSchema","ReadResourceRequestSchema","ReadResourceRequestParamsSchema","ReadResourceResultSchema","RelatedTaskMetadataSchema","RequestSchema","RequestIdSchema","RequestMetaSchema","ResourceSchema","ResourceContentsSchema","ResourceLinkSchema","ResourceListChangedNotificationSchema","ResourceRequestParamsSchema","ResourceTemplateSchema","ResourceTemplateReferenceSchema","ResourceUpdatedNotificationSchema","ResourceUpdatedNotificationParamsSchema","ResultMetaObjectSchema","ResultSchema","RoleSchema","RootSchema","RootsListChangedNotificationSchema","SamplingContentSchema","SamplingMessageSchema","SamplingMessageContentBlockSchema","ServerCapabilitiesSchema","ServerNotificationSchema","ServerRequestSchema","ServerResultSchema","SetLevelRequestSchema","SetLevelRequestParamsSchema","SingleSelectEnumSchemaSchema","StringSchemaSchema","SubscribeRequestSchema","SubscribeRequestParamsSchema","SubscriptionFilterSchema","SubscriptionsAcknowledgedNotificationSchema","SubscriptionsAcknowledgedNotificationParamsSchema","SubscriptionsListenRequestSchema","SubscriptionsListenRequestParamsSchema","SubscriptionsListenResultSchema","SubscriptionsListenResultMetaSchema","TaskAugmentedRequestParamsSchema","TaskCreationParamsSchema","TaskMetadataSchema","TaskSchema","TaskStatusSchema","TaskStatusNotificationSchema","TaskStatusNotificationParamsSchema","TextContentSchema","TextResourceContentsSchema","TitledMultiSelectEnumSchemaSchema","TitledSingleSelectEnumSchemaSchema","ToolSchema","ToolAnnotationsSchema","ToolChoiceSchema","ToolExecutionSchema","ToolListChangedNotificationSchema","ToolResultContentSchema","ToolUseContentSchema","UnsubscribeRequestSchema","UnsubscribeRequestParamsSchema","UntitledMultiSelectEnumSchemaSchema","UntitledSingleSelectEnumSchemaSchema"],EE={IdJagTokenExchangeResponseSchema:s_,OAuthClientInformationFullSchema:l_,OAuthClientInformationSchema:Ju,OAuthClientMetadataSchema:Fu,OAuthClientRegistrationErrorSchema:u_,OAuthErrorResponseSchema:c_,OAuthMetadataSchema:Zu,OAuthProtectedResourceMetadataSchema:o_,OAuthTokenRevocationRequestSchema:d_,OAuthTokensSchema:a_,OpenIdProviderDiscoveryMetadataSchema:i_,OpenIdProviderMetadataSchema:Vu},I$={},P$={};function E$(e,t){let n=e.slice(0,-6);I$[n]=t,P$[n]=(o)=>t.safeParse(o).success}for(let e of PE)E$(e,sE[e]);for(let[e,t]of Object.entries(EE))E$(e,t);var TE=Object.freeze(I$),jE=Object.freeze(P$);function OE(e){switch(e){case"initialize":case"notifications/initialized":return No(void 0);case"server/discover":return No(P_);default:return}}var T$=60000,NE=[_n,So,lr,Or],CE=["inputResponses","requestState"];function e$(e,t){let n=e.params;if(!Ca(n))return{message:e,lifted:{}};let o=n._meta,r=Ca(o)?NE.filter((c)=>(c in o)):[],i=t==="request"?CE.filter((c)=>(c in n)):[];if(r.length===0&&i.length===0)return{message:e,lifted:{}};let a={},s={...n};if(r.length>0&&Ca(o)){let c={},l={...o};for(let d of r)c[d]=o[d],delete l[d];if(a.envelope=c,Object.keys(l).length>0)s._meta=l;else delete s._meta}for(let c of i){if(c==="inputResponses")a.inputResponses=s[c];if(c==="requestState")a.requestState=s[c];delete s[c]}return{message:{...e,params:s},lifted:a}}function t$(e,t){let n=e.validateResult(t,void 0);if(!n.ok&&n.reason==="not-in-era")return;return{"~standard":{version:1,vendor:"mcp-wire-codec",validate(o){let r=e.validateResult(t,o);if(r.ok)return{value:r.value};return{issues:[{message:r.reason==="invalid"?r.message:`not-in-era: ${t}`}]}}}}}function Ua(e){return()=>e}var qE=Ua(void 0);function C_(e,t){return{...e,mcpReq:{...e.mcpReq,requestState:Ua(t)}}}var AE;var q_=class{_transport;_requestMessageId=0;_requestHandlers=new Map;_requestHandlerAbortControllers=new Map;_notificationHandlers=new Map;_responseHandlers=new Map;_progressHandlers=new Map;_timeoutInfo=new Map;_pendingDebouncedNotifications=new Set;_negotiatedProtocolVersion;static{AE=(e,t)=>{e._negotiatedProtocolVersion=t}}_supportedProtocolVersions;onclose;onerror;fallbackRequestHandler;fallbackNotificationHandler;constructor(e){this._options=e,this._supportedProtocolVersions=e?.supportedProtocolVersions??oa,this.setNotificationHandler("notifications/cancelled",(t)=>{this._oncancel(t)}),this.setNotificationHandler("notifications/progress",(t)=>{this._onprogress(t)}),this.setRequestHandler("ping",(t)=>({}))}_shouldDropInbound(e){}_outboundMetaEnvelope(){}_envelopeOutbound(e){let t=this._outboundMetaEnvelope();if(t===void 0)return e;let n=e.params??{};return{...e,params:{...n,_meta:{...t,...n._meta}}}}_resolveNonCompleteResult(e,t){return Promise.reject(new re(ae.UnsupportedResultType,`Unsupported result type '${e.kind}' for ${t.request.method}`,{resultType:e.kind,method:t.request.method}))}_getRequestHandler(e){return this._requestHandlers.get(e)}async _oncancel(e){if(!e.params.requestId)return;this._requestHandlerAbortControllers.get(e.params.requestId)?.abort(e.params.reason)}_setupTimeout(e,t,n,o,r=!1){this._timeoutInfo.set(e,{timeoutId:setTimeout(o,t),startTime:Date.now(),timeout:t,maxTotalTimeout:n,resetTimeoutOnProgress:r,onTimeout:o})}_resetTimeout(e){let t=this._timeoutInfo.get(e);if(!t)return!1;let n=Date.now()-t.startTime;if(t.maxTotalTimeout&&n>=t.maxTotalTimeout)throw this._timeoutInfo.delete(e),new re(ae.RequestTimeout,"Maximum total timeout exceeded",{maxTotalTimeout:t.maxTotalTimeout,totalElapsed:n});return clearTimeout(t.timeoutId),t.timeoutId=setTimeout(t.onTimeout,t.timeout),!0}_cleanupTimeout(e){let t=this._timeoutInfo.get(e);if(t)clearTimeout(t.timeoutId),this._timeoutInfo.delete(e)}async connect(e){this._transport=e;let t=this.transport?.onclose;this._transport.onclose=()=>{try{t?.()}finally{this._onclose()}};let n=this.transport?.onerror;this._transport.onerror=(r)=>{n?.(r),this._onerror(r)};let o=this._transport?.onmessage;this._transport.onmessage=(r,i)=>{if(o?.(r,i),Co(r)||Ma(r))this._onresponse(r);else if(Ao(r))this._onrequest(r,i);else if(b$(r))this._onnotification(r,i);else this._onerror(Error(`Unknown message type: ${JSON.stringify(r)}`))},e.setSupportedProtocolVersions?.(this._supportedProtocolVersions),await this._transport.start()}_onclose(){let e=this._responseHandlers;this._responseHandlers=new Map,this._progressHandlers.clear(),this._pendingDebouncedNotifications.clear();for(let o of this._timeoutInfo.values())clearTimeout(o.timeoutId);this._timeoutInfo.clear();let t=this._requestHandlerAbortControllers;this._requestHandlerAbortControllers=new Map;let n=new re(ae.ConnectionClosed,"Connection closed");this._transport=void 0;try{this.onclose?.()}finally{for(let o of e.values())o(n);for(let o of t.values())o.abort(n)}}_onerror(e){this.onerror?.(e)}_onnotification(e,t){let{message:n}=e$(e,"notification"),o=this._negotiatedWireCodec();if(t?.classification===void 0&&this._shouldDropInbound(e)==="drop")return;if(t?.classification!==void 0){let a=Wb(t.classification);if(a!==o.era){this._onerror(Error(`Era mismatch on inbound notification '${n.method}': classified as ${a} but this instance serves ${o.era}`));return}}if(f_(n.method)&&!o.hasNotificationMethod(n.method))return;let r=this._notificationHandlers.get(n.method),i=this.fallbackNotificationHandler;if(r===void 0&&i===void 0)return;Promise.resolve().then(()=>r===void 0?i(n):r(n,o)).catch((a)=>this._onerror(Error(`Uncaught error in notification handler: ${a}`)))}_onrequest(e,t){let{message:n,lifted:o}=e$(e,"request"),r=this._negotiatedWireCodec();if(t?.classification===void 0&&this._shouldDropInbound(e)==="drop"){this._onerror(Error(`Dropped inbound request '${e.method}': not servable on this connection's protocol era`));return}let i=this._transport,a=(g,b,w)=>{let Z={jsonrpc:"2.0",id:n.id,error:{code:g,message:b,...w!==void 0&&{data:w}}};i?.send(Z).catch((E)=>this._onerror(Error(`Failed to send an error response: ${E}`)))};if(t?.classification!==void 0){let g=Wb(t.classification);if(g!==r.era){this._onerror(Error(`Era mismatch on inbound request '${n.method}': classified as ${g} but this instance serves ${r.era}`));let b=t.classification.revision??g;a(O.UnsupportedProtocolVersion,`Unsupported protocol version: ${b}`,{supported:this._supportedProtocolVersions,requested:b});return}}if(p_(n.method)&&!r.hasRequestMethod(n.method)){a(O.MethodNotFound,"Method not found");return}let s=this._requestHandlers.get(n.method)??this.fallbackRequestHandler;if(s===void 0){a(O.MethodNotFound,"Method not found");return}let c=r.checkInboundEnvelope(o);if(c!==void 0){a(O.InvalidParams,c);return}let l=(g,b)=>this._notificationViaCodec(this._resolveOutboundCodec(g.method),g,{...b,relatedRequestId:n.id}),d=(g,b,w)=>this._requestWithSchemaViaCodec(this._resolveOutboundCodec(g.method),g,b,{...w,relatedRequestId:n.id}),m=new AbortController;this._requestHandlerAbortControllers.set(n.id,m);let p=o.inputResponses===void 0?void 0:ME(o.inputResponses),f={sessionId:i?.sessionId,mcpReq:{id:n.id,method:n.method,_meta:n.params?._meta,...o.envelope!==void 0&&{envelope:o.envelope},...p!==void 0&&{inputResponses:p.accepted},...p!==void 0&&p.droppedKeys.length>0&&{droppedInputResponseKeys:p.droppedKeys},requestState:o.requestState===void 0?qE:Ua(o.requestState),signal:m.signal,send:(g,b,w)=>{let Z=this._resolveOutboundCodec(g.method);if(this._assertOutboundRequestInEra(Z,g.method),qo(b))return d(g,b,w);let E=t$(Z,g.method);if(E===void 0)throw TypeError(`'${g.method}' is not a spec method; pass a result schema as the second argument to ctx.mcpReq.send().`);return d(g,E,b)},notify:l},http:t?.authInfo?{authInfo:t.authInfo}:void 0},v=this.buildContext(f,t);Promise.resolve().then(()=>s(n,v)).then(async(g)=>{if(m.signal.aborted)return;let b;try{b=r.encodeResult(n.method,g,this._outboundServerInfo())}catch(Z){this._onerror(Error(`Failed to encode result for ${n.method}: ${Z}`)),a(O.InternalError,"Internal error");return}let w={result:b,jsonrpc:"2.0",id:n.id};await i?.send(w)},async(g)=>{if(m.signal.aborted)return;let b=Number.isSafeInteger(g.code)?g.code:O.InternalError,w={jsonrpc:"2.0",id:n.id,error:{code:r.encodeErrorCode(b),message:g.message??"Internal error",...g.data!==void 0&&{data:g.data}}};await i?.send(w)}).catch((g)=>this._onerror(Error(`Failed to send response: ${g}`))).finally(()=>{if(this._requestHandlerAbortControllers.get(n.id)===m)this._requestHandlerAbortControllers.delete(n.id)})}_onprogress(e){let{progressToken:t,...n}=e.params,o=Number(t),r=this._progressHandlers.get(o);if(!r){this._onerror(Error(`Received a progress notification for an unknown token: ${JSON.stringify(e)}`));return}let i=this._responseHandlers.get(o),a=this._timeoutInfo.get(o);if(a&&i&&a.resetTimeoutOnProgress)try{this._resetTimeout(o)}catch(s){this._responseHandlers.delete(o),this._progressHandlers.delete(o),this._cleanupTimeout(o),i(s);return}r(n)}_onresponse(e){let t=Number(e.id),n=this._responseHandlers.get(t);if(n===void 0){this._onerror(Error(`Received a response for an unknown message ID: ${JSON.stringify(e)}`));return}if(this._responseHandlers.delete(t),this._cleanupTimeout(t),this._progressHandlers.delete(t),Co(e))n(e);else n(G.fromError(e.error.code,e.error.message,e.error.data))}get transport(){return this._transport}async close(){await this._transport?.close()}request(e,t,n){let o=this._resolveOutboundCodec(e.method);if(this._assertOutboundRequestInEra(o,e.method),qo(t))return this._requestWithSchemaViaCodec(o,e,t,n);let r=t$(o,e.method);if(r===void 0)throw TypeError(`'${e.method}' is not a spec method; pass a result schema as the second argument to request().`);return this._requestWithSchemaViaCodec(o,e,r,t)}_negotiatedWireCodec(){return No(this._negotiatedProtocolVersion)}_wireCodec(){return this._negotiatedWireCodec()}_resolveOutboundCodec(e){if(this._negotiatedProtocolVersion===void 0){let t=OE(e);if(t)return t}return this._negotiatedWireCodec()}_assertOutboundRequestInEra(e,t){if(p_(t)&&!e.hasRequestMethod(t))throw new re(ae.MethodNotSupportedByProtocolVersion,`Method '${t}' is not supported by the negotiated protocol version (wire era ${e.era})`,{method:t,era:e.era})}_requestWithSchema(e,t,n){let o=this._resolveOutboundCodec(e.method);return this._assertOutboundRequestInEra(o,e.method),this._requestWithSchemaViaCodec(o,e,t,n)}_requestWithSchemaViaCodec(e,t,n,o){let{relatedRequestId:r,resumptionToken:i,onresumptiontoken:a,headers:s}=o??{},c=Date.now(),l,d;return new Promise((m,p)=>{let f=(ne)=>{p(ne)};if(!this._transport){f(Error("Not connected"));return}if(this._options?.enforceStrictCapabilities===!0)try{this.assertCapabilityForMethod(t.method)}catch(ne){f(ne);return}if(o?.signal?.aborted){let ne=o.signal.reason;throw ne instanceof re?ne:new re(ae.RequestTimeout,String(ne))}let v=e.era===P_&&this._transport.hasPerRequestStream===!0?new AbortController:void 0,g=this._requestMessageId++;d=g;let b={...t,jsonrpc:"2.0",id:g};if(o?.onprogress)this._progressHandlers.set(g,o.onprogress),b.params={...t.params,_meta:{...t.params?._meta,progressToken:g}};let w=this._envelopeOutbound(b),Z=!1,E=(ne)=>{if(Z)return;if(this._progressHandlers.delete(g),v===void 0)this._transport?.send(this._envelopeOutbound({jsonrpc:"2.0",method:"notifications/cancelled",params:{requestId:g,reason:String(ne)}}),{relatedRequestId:r,resumptionToken:i,onresumptiontoken:a}).catch((ue)=>this._onerror(Error(`Failed to send cancellation: ${ue}`)));else v.abort();p(ne instanceof re?ne:new re(ae.RequestTimeout,String(ne)))};this._responseHandlers.set(g,(ne)=>{if(o?.signal?.aborted)return;if(Z=!0,ne instanceof Error)return p(ne);let ue;try{ue=e.decodeResult(t.method,ne.result)}catch(Se){return p(Se instanceof Error?Se:Error(String(Se)))}if(ue.kind==="invalid")return p(ue.error);if(ue.kind==="input_required"){if(o?.allowInputRequired===!0)return m(UE(ue));let Se={codec:e,request:t,resultSchema:n,options:o,flowStartedAt:c,retry:(Ie,Le)=>this._requestWithSchemaViaCodec(e,Ie===void 0?{method:t.method}:{method:t.method,params:Ie},n,Le)};return m(this._resolveNonCompleteResult(ue,Se))}let Oe=ue.result;bn(n,Oe).then((Se)=>{if(Se.success)m(Se.data);else p(new re(ae.InvalidResult,`Invalid result for ${t.method}: ${Se.error}`))},p)}),l=()=>E(o?.signal?.reason),o?.signal?.addEventListener("abort",l,{once:!0});let L=o?.timeout??T$,T=()=>E(new re(ae.RequestTimeout,"Request timed out",{timeout:L}));this._setupTimeout(g,L,o?.maxTotalTimeout,T,o?.resetTimeoutOnProgress??!1),this._transport.send(w,{relatedRequestId:r,resumptionToken:i,onresumptiontoken:a,headers:s,requestSignal:v?.signal}).catch((ne)=>{this._progressHandlers.delete(g),p(ne)})}).finally(()=>{if(l)o?.signal?.removeEventListener("abort",l);if(d!==void 0)this._responseHandlers.delete(d),this._cleanupTimeout(d)})}async notification(e,t){return this._notificationViaCodec(this._resolveOutboundCodec(e.method),e,t)}async _notificationViaCodec(e,t,n){if(!this._transport)throw new re(ae.NotConnected,"Not connected");if(f_(t.method)&&!e.hasNotificationMethod(t.method))throw new re(ae.MethodNotSupportedByProtocolVersion,`Notification '${t.method}' is not supported by the negotiated protocol version (wire era ${e.era})`,{method:t.method,era:e.era});this.assertNotificationCapability(t.method);let o=this._envelopeOutbound({jsonrpc:"2.0",...t});if((this._options?.debouncedNotificationMethods??[]).includes(t.method)&&!t.params&&!n?.relatedRequestId){if(this._pendingDebouncedNotifications.has(t.method))return;this._pendingDebouncedNotifications.add(t.method),Promise.resolve().then(()=>{if(this._pendingDebouncedNotifications.delete(t.method),!this._transport)return;this._transport?.send(o,n).catch((r)=>this._onerror(r))});return}await this._transport.send(o,n)}setRequestHandler(e,t,n){this.assertRequestHandlerCapability(e);let o;if(typeof t==="function"){if(!p_(e))throw TypeError(`'${e}' is not a spec request method; pass schemas as the second argument to setRequestHandler().`);o=(r,i)=>{let a=this._negotiatedWireCodec(),s=a.validateRequest(e,r);if(!s.ok&&s.reason==="not-in-era")s=a.validateInputRequest(e,r);if(!s.ok){if(s.reason==="not-in-era")throw new G(O.InternalError,`No wire schema for ${e} in the resolved era`);throw Error(s.message)}return Promise.resolve(t(s.value,i))}}else if(n)o=async(r,i)=>{let a=await bn(t.params,{...r.params});if(!a.success)throw new G(O.InvalidParams,`Invalid params for ${e}: ${a.error}`);return n(a.data,i)};else throw TypeError("setRequestHandler: handler is required");this._requestHandlers.set(e,this._wrapHandler(e,o))}_wrapHandler(e,t){return t}_outboundServerInfo(){}removeRequestHandler(e){this._requestHandlers.delete(e)}assertCanSetRequestHandler(e){if(this._requestHandlers.has(e))throw Error(`A request handler for ${e} already exists, which would be overridden`)}setNotificationHandler(e,t,n){if(typeof t==="function"){if(!f_(e))throw TypeError(`'${e}' is not a spec notification method; pass schemas as the second argument to setNotificationHandler().`);this._notificationHandlers.set(e,(o,r)=>{let i=r.validateNotification(e,o);if(!i.ok){if(i.reason==="not-in-era")throw new G(O.InternalError,`No wire schema for ${e} in the resolved era`);throw Error(i.message)}return Promise.resolve(t(i.value))});return}if(!n)throw TypeError("setNotificationHandler: handler is required");this._notificationHandlers.set(e,async(o)=>{let r=await bn(t.params,{...o.params});if(!r.success)throw new G(O.InvalidParams,`Invalid params for notification ${e}: ${r.error}`);await n(r.data,o)})}removeNotificationHandler(e){this._notificationHandlers.delete(e)}};function Ca(e){return e!==null&&typeof e==="object"&&!Array.isArray(e)}function A_(e,t){let n={...e};for(let o in t){let r=o,i=t[r];if(i===void 0)continue;let a=n[r];n[r]=Ca(a)&&Ca(i)?{...a,...i}:i}return n}function r$(e){return typeof e==="object"&&e!==null&&!Array.isArray(e)}function ME(e){let t={},n=[];if(!r$(e))return{accepted:t,droppedKeys:n};for(let[o,r]of Object.entries(e)){if(!r$(r)||"method"in r||"result"in r){n.push(o);continue}t[o]=r}return{accepted:t,droppedKeys:n}}function UE(e){return{resultType:"input_required",inputRequests:e.inputRequests,...e.requestState!==void 0&&{requestState:e.requestState}}}/*!
|
|
73
|
+
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let a of e.seen.entries()){let s=a[1];if(t===a[0]){i(a);continue}if(e.external){let l=e.external.registry.get(a[0])?.id;if(t!==a[0]&&l){i(a);continue}}if(e.metadataRegistry.get(a[0])?.id){i(a);continue}if(s.cycle){i(a);continue}if(s.count>1){if(e.reused==="ref"){i(a);continue}}}}function Pr(e,t){let n=e.seen.get(t);if(!n)throw Error("Unprocessed schema. This is a bug in Zod.");let o=(s)=>{let c=e.seen.get(s);if(c.ref===null)return;let l=c.def??c.schema,d={...l},m=c.ref;if(c.ref=null,m){o(m);let f=e.seen.get(m),v=f.schema;if(v.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0"))l.allOf=l.allOf??[],l.allOf.push(v);else Object.assign(l,v);if(Object.assign(l,d),s._zod.parent===m)for(let b in l){if(b==="$ref"||b==="allOf")continue;if(!(b in d))delete l[b]}if(v.$ref&&f.def)for(let b in l){if(b==="$ref"||b==="allOf")continue;if(b in f.def&&JSON.stringify(l[b])===JSON.stringify(f.def[b]))delete l[b]}}let p=s._zod.parent;if(p&&p!==m){o(p);let f=e.seen.get(p);if(f?.schema.$ref){if(l.$ref=f.schema.$ref,f.def)for(let v in l){if(v==="$ref"||v==="allOf")continue;if(v in f.def&&JSON.stringify(l[v])===JSON.stringify(f.def[v]))delete l[v]}}}e.override({zodSchema:s,jsonSchema:l,path:c.path??[]})};for(let s of[...e.seen.entries()].reverse())o(s[0]);let r={};if(e.target==="draft-2020-12")r.$schema="https://json-schema.org/draft/2020-12/schema";else if(e.target==="draft-07")r.$schema="http://json-schema.org/draft-07/schema#";else if(e.target==="draft-04")r.$schema="http://json-schema.org/draft-04/schema#";else if(e.target==="openapi-3.0");if(e.external?.uri){let s=e.external.registry.get(t)?.id;if(!s)throw Error("Schema is missing an `id` property");r.$id=e.external.uri(s)}Object.assign(r,n.def??n.schema);let i=e.metadataRegistry.get(t)?.id;if(i!==void 0&&r.id===i)delete r.id;let a=e.external?.defs??{};for(let s of e.seen.entries()){let c=s[1];if(c.def&&c.defId){if(c.def.id===c.defId)delete c.def.id;a[c.defId]=c.def}}if(e.external);else if(Object.keys(a).length>0)if(e.target==="draft-2020-12")r.$defs=a;else r.definitions=a;try{let s=JSON.parse(JSON.stringify(r));return Object.defineProperty(s,"~standard",{value:{...t["~standard"],jsonSchema:{input:uo(t,"input",e.processors),output:uo(t,"output",e.processors)}},enumerable:!1,writable:!1}),s}catch(s){throw Error("Error converting schema to JSON.")}}function Ge(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let o=e._zod.def;if(o.type==="transform")return!0;if(o.type==="array")return Ge(o.element,n);if(o.type==="set")return Ge(o.valueType,n);if(o.type==="lazy")return Ge(o.getter(),n);if(o.type==="promise"||o.type==="optional"||o.type==="nonoptional"||o.type==="nullable"||o.type==="readonly"||o.type==="default"||o.type==="prefault")return Ge(o.innerType,n);if(o.type==="intersection")return Ge(o.left,n)||Ge(o.right,n);if(o.type==="record"||o.type==="map")return Ge(o.keyType,n)||Ge(o.valueType,n);if(o.type==="pipe"){if(e._zod.traits.has("$ZodCodec"))return!0;return Ge(o.in,n)||Ge(o.out,n)}if(o.type==="object"){for(let r in o.shape)if(Ge(o.shape[r],n))return!0;return!1}if(o.type==="union"){for(let r of o.options)if(Ge(r,n))return!0;return!1}if(o.type==="tuple"){for(let r of o.items)if(Ge(r,n))return!0;if(o.rest&&Ge(o.rest,n))return!0;return!1}return!1}var Gh=(e,t={})=>(n)=>{let o=kr({...n,processors:t});return pe(e,o),Ir(o,e),Pr(o,e)},uo=(e,t,n={})=>(o)=>{let{libraryOptions:r,target:i}=o??{},a=kr({...r??{},target:i,io:t,processors:n});return pe(e,a),Ir(a,e),Pr(a,e)};var aP={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},Bh=(e,t,n,o)=>{let r=n;r.type="string";let{minimum:i,maximum:a,format:s,patterns:c,contentEncoding:l}=e._zod.bag;if(typeof i==="number")r.minLength=i;if(typeof a==="number")r.maxLength=a;if(s){if(r.format=aP[s]??s,r.format==="")delete r.format;if(s==="time")delete r.format}if(l)r.contentEncoding=l;if(c&&c.size>0){let d=[...c];if(d.length===1)r.pattern=d[0].source;else if(d.length>1)r.allOf=[...d.map((m)=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:m.source}))]}},Wh=(e,t,n,o)=>{let r=n,{minimum:i,maximum:a,format:s,multipleOf:c,exclusiveMaximum:l,exclusiveMinimum:d}=e._zod.bag;if(typeof s==="string"&&s.includes("int"))r.type="integer";else r.type="number";let m=typeof d==="number"&&d>=(i??Number.NEGATIVE_INFINITY),p=typeof l==="number"&&l<=(a??Number.POSITIVE_INFINITY),f=t.target==="draft-04"||t.target==="openapi-3.0";if(m)if(f)r.minimum=d,r.exclusiveMinimum=!0;else r.exclusiveMinimum=d;else if(typeof i==="number")r.minimum=i;if(p)if(f)r.maximum=l,r.exclusiveMaximum=!0;else r.exclusiveMaximum=l;else if(typeof a==="number")r.maximum=a;if(typeof c==="number")r.multipleOf=c},Yh=(e,t,n,o)=>{n.type="boolean"},Xh=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw Error("BigInt cannot be represented in JSON Schema")},Qh=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw Error("Symbols cannot be represented in JSON Schema")},eg=(e,t,n,o)=>{if(t.target==="openapi-3.0")n.type="string",n.nullable=!0,n.enum=[null];else n.type="null"},tg=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw Error("Undefined cannot be represented in JSON Schema")},rg=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw Error("Void cannot be represented in JSON Schema")},ng=(e,t,n,o)=>{n.not={}},og=(e,t,n,o)=>{},ig=(e,t,n,o)=>{},ag=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw Error("Date cannot be represented in JSON Schema")},sg=(e,t,n,o)=>{let r=e._zod.def,i=Ri(r.entries);if(i.every((a)=>typeof a==="number"))n.type="number";if(i.every((a)=>typeof a==="string"))n.type="string";n.enum=i},cg=(e,t,n,o)=>{let r=e._zod.def,i=[];for(let a of r.values)if(a===void 0){if(t.unrepresentable==="throw")throw Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof a==="bigint")if(t.unrepresentable==="throw")throw Error("BigInt literals cannot be represented in JSON Schema");else i.push(Number(a));else i.push(a);if(i.length===0);else if(i.length===1){let a=i[0];if(n.type=a===null?"null":typeof a,t.target==="draft-04"||t.target==="openapi-3.0")n.enum=[a];else n.const=a}else{if(i.every((a)=>typeof a==="number"))n.type="number";if(i.every((a)=>typeof a==="string"))n.type="string";if(i.every((a)=>typeof a==="boolean"))n.type="boolean";if(i.every((a)=>a===null))n.type="null";n.enum=i}},lg=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw Error("NaN cannot be represented in JSON Schema")},ug=(e,t,n,o)=>{let r=n,i=e._zod.pattern;if(!i)throw Error("Pattern not found in template literal");r.type="string",r.pattern=i.source},dg=(e,t,n,o)=>{let r=n,i={type:"string",format:"binary",contentEncoding:"binary"},{minimum:a,maximum:s,mime:c}=e._zod.bag;if(a!==void 0)i.minLength=a;if(s!==void 0)i.maxLength=s;if(c)if(c.length===1)i.contentMediaType=c[0],Object.assign(r,i);else Object.assign(r,i),r.anyOf=c.map((l)=>({contentMediaType:l}));else Object.assign(r,i)},mg=(e,t,n,o)=>{n.type="boolean"},pg=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw Error("Custom types cannot be represented in JSON Schema")},fg=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw Error("Function types cannot be represented in JSON Schema")},hg=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw Error("Transforms cannot be represented in JSON Schema")},gg=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw Error("Map cannot be represented in JSON Schema")},vg=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw Error("Set cannot be represented in JSON Schema")},_g=(e,t,n,o)=>{let r=n,i=e._zod.def,{minimum:a,maximum:s}=e._zod.bag;if(typeof a==="number")r.minItems=a;if(typeof s==="number")r.maxItems=s;r.type="array",r.items=pe(i.element,t,{...o,path:[...o.path,"items"]})},Sg=(e,t,n,o)=>{let r=n,i=e._zod.def;r.type="object",r.properties={};let a=i.shape;for(let l in a)r.properties[l]=pe(a[l],t,{...o,path:[...o.path,"properties",l]});let s=new Set(Object.keys(a)),c=new Set([...s].filter((l)=>{let d=i.shape[l]._zod;if(t.io==="input")return d.optin===void 0;else return d.optout===void 0}));if(c.size>0)r.required=Array.from(c);if(i.catchall?._zod.def.type==="never")r.additionalProperties=!1;else if(!i.catchall){if(t.io==="output")r.additionalProperties=!1}else if(i.catchall)r.additionalProperties=pe(i.catchall,t,{...o,path:[...o.path,"additionalProperties"]})},Ic=(e,t,n,o)=>{let r=e._zod.def,i=r.inclusive===!1,a=r.options.map((s,c)=>pe(s,t,{...o,path:[...o.path,i?"oneOf":"anyOf",c]}));if(i)n.oneOf=a;else n.anyOf=a},yg=(e,t,n,o)=>{let r=e._zod.def,i=pe(r.left,t,{...o,path:[...o.path,"allOf",0]}),a=pe(r.right,t,{...o,path:[...o.path,"allOf",1]}),s=(l)=>("allOf"in l)&&Object.keys(l).length===1,c=[...s(i)?i.allOf:[i],...s(a)?a.allOf:[a]];n.allOf=c},bg=(e,t,n,o)=>{let r=n,i=e._zod.def;r.type="array";let a=t.target==="draft-2020-12"?"prefixItems":"items",s=t.target==="draft-2020-12"?"items":t.target==="openapi-3.0"?"items":"additionalItems",c=i.items.map((p,f)=>pe(p,t,{...o,path:[...o.path,a,f]})),l=i.rest?pe(i.rest,t,{...o,path:[...o.path,s,...t.target==="openapi-3.0"?[i.items.length]:[]]}):null;if(t.target==="draft-2020-12"){if(r.prefixItems=c,l)r.items=l}else if(t.target==="openapi-3.0"){if(r.items={anyOf:c},l)r.items.anyOf.push(l);if(r.minItems=c.length,!l)r.maxItems=c.length}else if(r.items=c,l)r.additionalItems=l;let{minimum:d,maximum:m}=e._zod.bag;if(typeof d==="number")r.minItems=d;if(typeof m==="number")r.maxItems=m},$g=(e,t,n,o)=>{let r=n,i=e._zod.def;r.type="object";let a=i.keyType,c=a._zod.bag?.patterns;if(i.mode==="loose"&&c&&c.size>0){let d=pe(i.valueType,t,{...o,path:[...o.path,"patternProperties","*"]});r.patternProperties={};for(let m of c)r.patternProperties[m.source]=d}else{if(t.target==="draft-07"||t.target==="draft-2020-12")r.propertyNames=pe(i.keyType,t,{...o,path:[...o.path,"propertyNames"]});r.additionalProperties=pe(i.valueType,t,{...o,path:[...o.path,"additionalProperties"]})}let l=a._zod.values;if(l){let d=[...l].filter((m)=>typeof m==="string"||typeof m==="number");if(d.length>0)r.required=d}},zg=(e,t,n,o)=>{let r=e._zod.def,i=pe(r.innerType,t,o),a=t.seen.get(e);if(t.target==="openapi-3.0")a.ref=r.innerType,n.nullable=!0;else n.anyOf=[i,{type:"null"}]},wg=(e,t,n,o)=>{let r=e._zod.def;pe(r.innerType,t,o);let i=t.seen.get(e);i.ref=r.innerType},Rg=(e,t,n,o)=>{let r=e._zod.def;pe(r.innerType,t,o);let i=t.seen.get(e);i.ref=r.innerType,n.default=JSON.parse(JSON.stringify(r.defaultValue))},xg=(e,t,n,o)=>{let r=e._zod.def;pe(r.innerType,t,o);let i=t.seen.get(e);if(i.ref=r.innerType,t.io==="input")n._prefault=JSON.parse(JSON.stringify(r.defaultValue))},kg=(e,t,n,o)=>{let r=e._zod.def;pe(r.innerType,t,o);let i=t.seen.get(e);i.ref=r.innerType;let a;try{a=r.catchValue(void 0)}catch{throw Error("Dynamic catch values are not supported in JSON Schema")}n.default=a},Ig=(e,t,n,o)=>{let r=e._zod.def,i=r.in._zod.traits.has("$ZodTransform"),a=t.io==="input"?i?r.out:r.in:r.out;pe(a,t,o);let s=t.seen.get(e);s.ref=a},Pg=(e,t,n,o)=>{let r=e._zod.def;pe(r.innerType,t,o);let i=t.seen.get(e);i.ref=r.innerType,n.readOnly=!0},Eg=(e,t,n,o)=>{let r=e._zod.def;pe(r.innerType,t,o);let i=t.seen.get(e);i.ref=r.innerType},Pc=(e,t,n,o)=>{let r=e._zod.def;pe(r.innerType,t,o);let i=t.seen.get(e);i.ref=r.innerType},Tg=(e,t,n,o)=>{let r=e._zod.innerType;pe(r,t,o);let i=t.seen.get(e);i.ref=r},kc={string:Bh,number:Wh,boolean:Yh,bigint:Xh,symbol:Qh,null:eg,undefined:tg,void:rg,never:ng,any:og,unknown:ig,date:ag,enum:sg,literal:cg,nan:lg,template_literal:ug,file:dg,success:mg,custom:pg,function:fg,transform:hg,map:gg,set:vg,array:_g,object:Sg,union:Ic,intersection:yg,tuple:bg,record:$g,nullable:zg,nonoptional:wg,default:Rg,prefault:xg,catch:kg,pipe:Ig,readonly:Pg,promise:Eg,optional:Pc,lazy:Tg};function hn(e,t){if("_idmap"in e){let o=e,r=kr({...t,processors:kc}),i={};for(let c of o._idmap.entries()){let[l,d]=c;pe(d,r)}let a={},s={registry:o,uri:t?.uri,defs:i};r.external=s;for(let c of o._idmap.entries()){let[l,d]=c;Ir(r,d),a[l]=Pr(r,d)}if(Object.keys(i).length>0){let c=r.target==="draft-2020-12"?"$defs":"definitions";a.__shared={[c]:i}}return{schemas:a}}let n=kr({...t,processors:kc});return pe(e,n),Ir(n,e),Pr(n,e)}class jg{get metadataRegistry(){return this.ctx.metadataRegistry}get target(){return this.ctx.target}get unrepresentable(){return this.ctx.unrepresentable}get override(){return this.ctx.override}get io(){return this.ctx.io}get counter(){return this.ctx.counter}set counter(e){this.ctx.counter=e}get seen(){return this.ctx.seen}constructor(e){let t=e?.target??"draft-2020-12";if(t==="draft-4")t="draft-04";if(t==="draft-7")t="draft-07";this.ctx=kr({processors:kc,target:t,...e?.metadata&&{metadata:e.metadata},...e?.unrepresentable&&{unrepresentable:e.unrepresentable},...e?.override&&{override:e.override},...e?.io&&{io:e.io}})}process(e,t={path:[],schemaPath:[]}){return pe(e,this.ctx,t)}emit(e,t){if(t){if(t.cycles)this.ctx.cycles=t.cycles;if(t.reused)this.ctx.reused=t.reused;if(t.external)this.ctx.external=t.external}Ir(this.ctx,e);let n=Pr(this.ctx,e),{"~standard":o,...r}=n;return r}}var qy={};var Hi={};tr(Hi,{ZodAny:()=>Wg,ZodArray:()=>ev,ZodBase64:()=>Xc,ZodBase64URL:()=>Qc,ZodBigInt:()=>So,ZodBigIntFormat:()=>rl,ZodBoolean:()=>_o,ZodCIDRv4:()=>Wc,ZodCIDRv6:()=>Yc,ZodCUID:()=>Vc,ZodCUID2:()=>Fc,ZodCatch:()=>yv,ZodCodec:()=>ra,ZodCustom:()=>na,ZodCustomStringFormat:()=>go,ZodDate:()=>Xi,ZodDefault:()=>fv,ZodDiscriminatedUnion:()=>rv,ZodE164:()=>el,ZodEmail:()=>Uc,ZodEmoji:()=>Lc,ZodEnum:()=>po,ZodExactOptional:()=>dv,ZodFile:()=>lv,ZodFunction:()=>Pv,ZodGUID:()=>Gi,ZodIPv4:()=>Gc,ZodIPv6:()=>Bc,ZodIntersection:()=>nv,ZodJWT:()=>tl,ZodKSUID:()=>Kc,ZodLazy:()=>kv,ZodLiteral:()=>cv,ZodMAC:()=>Hg,ZodMap:()=>av,ZodNaN:()=>$v,ZodNanoID:()=>Zc,ZodNever:()=>Xg,ZodNonOptional:()=>sl,ZodNull:()=>Bg,ZodNullable:()=>pv,ZodNumber:()=>vo,ZodNumberFormat:()=>vn,ZodObject:()=>Qi,ZodOptional:()=>al,ZodPipe:()=>ta,ZodPrefault:()=>gv,ZodPreprocess:()=>zv,ZodPromise:()=>Iv,ZodReadonly:()=>wv,ZodRecord:()=>mo,ZodSet:()=>sv,ZodString:()=>fo,ZodStringFormat:()=>he,ZodSuccess:()=>Sv,ZodSymbol:()=>Kg,ZodTemplateLiteral:()=>xv,ZodTransform:()=>uv,ZodTuple:()=>ov,ZodType:()=>oe,ZodULID:()=>Jc,ZodURL:()=>Yi,ZodUUID:()=>Gt,ZodUndefined:()=>Gg,ZodUnion:()=>ea,ZodUnknown:()=>Yg,ZodVoid:()=>Qg,ZodXID:()=>Hc,ZodXor:()=>tv,_ZodString:()=>Mc,_default:()=>hv,_function:()=>Mb,any:()=>nl,array:()=>S,base64:()=>nb,base64url:()=>ob,bigint:()=>hb,boolean:()=>N,catch:()=>bv,check:()=>Ub,cidrv4:()=>tb,cidrv6:()=>rb,codec:()=>Nb,cuid:()=>Ky,cuid2:()=>Gy,custom:()=>Db,date:()=>bb,describe:()=>Lb,discriminatedUnion:()=>Tr,e164:()=>ib,email:()=>Dc,emoji:()=>Jy,enum:()=>X,exactOptional:()=>mv,file:()=>Eb,float32:()=>db,float64:()=>mb,function:()=>Mb,guid:()=>Uy,hash:()=>ub,hex:()=>lb,hostname:()=>cb,httpUrl:()=>Fy,instanceof:()=>Vb,int:()=>qc,int32:()=>pb,int64:()=>gb,intersection:()=>It,invertCodec:()=>Cb,ipv4:()=>Xy,ipv6:()=>eb,json:()=>Jb,jwt:()=>ab,keyof:()=>$b,ksuid:()=>Yy,lazy:()=>jr,literal:()=>y,looseObject:()=>H,looseRecord:()=>xb,mac:()=>Qy,map:()=>kb,meta:()=>Zb,nan:()=>Ob,nanoid:()=>Hy,nativeEnum:()=>Pb,never:()=>ol,nonoptional:()=>_v,null:()=>Bt,nullable:()=>Bi,nullish:()=>Tb,number:()=>x,object:()=>h,optional:()=>F,partialRecord:()=>Rb,pipe:()=>Ac,prefault:()=>vv,preprocess:()=>ir,promise:()=>Ab,readonly:()=>Rv,record:()=>T,refine:()=>Ev,set:()=>Ib,strictObject:()=>zb,string:()=>u,stringFormat:()=>sb,stringbool:()=>Fb,success:()=>jb,superRefine:()=>Tv,symbol:()=>_b,templateLiteral:()=>qb,transform:()=>il,tuple:()=>iv,uint32:()=>fb,uint64:()=>vb,ulid:()=>By,undefined:()=>Sb,union:()=>q,unknown:()=>V,url:()=>ho,uuid:()=>Dy,uuidv4:()=>Ly,uuidv6:()=>Zy,uuidv7:()=>Vy,void:()=>yb,xid:()=>Wy,xor:()=>wb});var Ec={};tr(Ec,{endsWith:()=>ro,gt:()=>Ht,gte:()=>Ke,includes:()=>eo,length:()=>fn,lowercase:()=>Xn,lt:()=>Jt,lte:()=>pt,maxLength:()=>pn,maxSize:()=>xr,mime:()=>no,minLength:()=>nr,minSize:()=>Kt,multipleOf:()=>Rr,negative:()=>zc,nonnegative:()=>Rc,nonpositive:()=>wc,normalize:()=>oo,overwrite:()=>kt,positive:()=>$c,property:()=>xc,regex:()=>Yn,size:()=>mn,slugify:()=>co,startsWith:()=>to,toLowerCase:()=>ao,toUpperCase:()=>so,trim:()=>io,uppercase:()=>Qn});var Er={};tr(Er,{ZodISODate:()=>jc,ZodISODateTime:()=>Tc,ZodISODuration:()=>Cc,ZodISOTime:()=>Nc,date:()=>Oc,datetime:()=>gn,duration:()=>Ng,time:()=>Og});var Tc=_("ZodISODateTime",(e,t)=>{mp.init(e,t),he.init(e,t)});function gn(e){return ph(Tc,e)}var jc=_("ZodISODate",(e,t)=>{pp.init(e,t),he.init(e,t)});function Oc(e){return fh(jc,e)}var Nc=_("ZodISOTime",(e,t)=>{fp.init(e,t),he.init(e,t)});function Og(e){return hh(Nc,e)}var Cc=_("ZodISODuration",(e,t)=>{hp.init(e,t),he.init(e,t)});function Ng(e){return gh(Cc,e)}var Ay=(e,t)=>{Ti.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:(n)=>Oi(e,n)},flatten:{value:(n)=>ji(e,n)},addIssue:{value:(n)=>{e.issues.push(n),e.message=JSON.stringify(e.issues,Vn,2)}},addIssues:{value:(n)=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,Vn,2)}},isEmpty:{get(){return e.issues.length===0}}})},cP=_("ZodError",Ay),nt=_("ZodError",Ay,{Parent:Error});var Cg=Jn(nt),qg=Hn(nt),Ki=Kn(nt),Ag=Gn(nt),Mg=js(nt),Ug=Os(nt),Dg=Ns(nt),Lg=Cs(nt),Zg=qs(nt),Vg=As(nt),Fg=Ms(nt),Jg=Us(nt);var My=new WeakMap;function Wi(e,t,n){let o=Object.getPrototypeOf(e),r=My.get(o);if(!r)r=new Set,My.set(o,r);if(r.has(t))return;r.add(t);for(let i in n){let a=n[i];Object.defineProperty(o,i,{configurable:!0,enumerable:!1,get(){let s=a.bind(this);return Object.defineProperty(this,i,{configurable:!0,writable:!0,enumerable:!0,value:s}),s},set(s){Object.defineProperty(this,i,{configurable:!0,writable:!0,enumerable:!0,value:s})}})}}var oe=_("ZodType",(e,t)=>(Q.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:uo(e,"input"),output:uo(e,"output")}}),e.toJSONSchema=Gh(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(n,o)=>Cg(e,n,o,{callee:e.parse}),e.safeParse=(n,o)=>Ki(e,n,o),e.parseAsync=async(n,o)=>qg(e,n,o,{callee:e.parseAsync}),e.safeParseAsync=async(n,o)=>Ag(e,n,o),e.spa=e.safeParseAsync,e.encode=(n,o)=>Mg(e,n,o),e.decode=(n,o)=>Ug(e,n,o),e.encodeAsync=async(n,o)=>Dg(e,n,o),e.decodeAsync=async(n,o)=>Lg(e,n,o),e.safeEncode=(n,o)=>Zg(e,n,o),e.safeDecode=(n,o)=>Vg(e,n,o),e.safeEncodeAsync=async(n,o)=>Fg(e,n,o),e.safeDecodeAsync=async(n,o)=>Jg(e,n,o),Wi(e,"ZodType",{check(...n){let o=this.def;return this.clone(Ft(o,{checks:[...o.checks??[],...n.map((r)=>typeof r==="function"?{_zod:{check:r,def:{check:"custom"},onattach:[]}}:r)]}),{parent:!0})},with(...n){return this.check(...n)},clone(n,o){return Je(this,n,o)},brand(){return this},register(n,o){return n.add(this,o),this},refine(n,o){return this.check(Ev(n,o))},superRefine(n,o){return this.check(Tv(n,o))},overwrite(n){return this.check(kt(n))},optional(){return F(this)},exactOptional(){return mv(this)},nullable(){return Bi(this)},nullish(){return F(Bi(this))},nonoptional(n){return _v(this,n)},array(){return S(this)},or(n){return q([this,n])},and(n){return It(this,n)},transform(n){return Ac(this,il(n))},default(n){return hv(this,n)},prefault(n){return vv(this,n)},catch(n){return bv(this,n)},pipe(n){return Ac(this,n)},readonly(){return Rv(this)},describe(n){let o=this.clone();return Te.add(o,{description:n}),o},meta(...n){if(n.length===0)return Te.get(this);let o=this.clone();return Te.add(o,n[0]),o},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(n){return n(this)}}),Object.defineProperty(e,"description",{get(){return Te.get(e)?.description},configurable:!0}),e)),Mc=_("_ZodString",(e,t)=>{dn.init(e,t),oe.init(e,t),e._zod.processJSONSchema=(o,r,i)=>Bh(e,o,r,i);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,Wi(e,"_ZodString",{regex(...o){return this.check(Yn(...o))},includes(...o){return this.check(eo(...o))},startsWith(...o){return this.check(to(...o))},endsWith(...o){return this.check(ro(...o))},min(...o){return this.check(nr(...o))},max(...o){return this.check(pn(...o))},length(...o){return this.check(fn(...o))},nonempty(...o){return this.check(nr(1,...o))},lowercase(o){return this.check(Xn(o))},uppercase(o){return this.check(Qn(o))},trim(){return this.check(io())},normalize(...o){return this.check(oo(...o))},toLowerCase(){return this.check(ao())},toUpperCase(){return this.check(so())},slugify(){return this.check(co())}})}),fo=_("ZodString",(e,t)=>{dn.init(e,t),Mc.init(e,t),e.email=(n)=>e.check(rc(Uc,n)),e.url=(n)=>e.check(Ji(Yi,n)),e.jwt=(n)=>e.check(bc(tl,n)),e.emoji=(n)=>e.check(sc(Lc,n)),e.guid=(n)=>e.check(Fi(Gi,n)),e.uuid=(n)=>e.check(nc(Gt,n)),e.uuidv4=(n)=>e.check(oc(Gt,n)),e.uuidv6=(n)=>e.check(ic(Gt,n)),e.uuidv7=(n)=>e.check(ac(Gt,n)),e.nanoid=(n)=>e.check(cc(Zc,n)),e.guid=(n)=>e.check(Fi(Gi,n)),e.cuid=(n)=>e.check(lc(Vc,n)),e.cuid2=(n)=>e.check(uc(Fc,n)),e.ulid=(n)=>e.check(dc(Jc,n)),e.base64=(n)=>e.check(_c(Xc,n)),e.base64url=(n)=>e.check(Sc(Qc,n)),e.xid=(n)=>e.check(mc(Hc,n)),e.ksuid=(n)=>e.check(pc(Kc,n)),e.ipv4=(n)=>e.check(fc(Gc,n)),e.ipv6=(n)=>e.check(hc(Bc,n)),e.cidrv4=(n)=>e.check(gc(Wc,n)),e.cidrv6=(n)=>e.check(vc(Yc,n)),e.e164=(n)=>e.check(yc(el,n)),e.datetime=(n)=>e.check(gn(n)),e.date=(n)=>e.check(Oc(n)),e.time=(n)=>e.check(Og(n)),e.duration=(n)=>e.check(Ng(n))});function u(e){return lh(fo,e)}var he=_("ZodStringFormat",(e,t)=>{fe.init(e,t),Mc.init(e,t)}),Uc=_("ZodEmail",(e,t)=>{np.init(e,t),he.init(e,t)});function Dc(e){return rc(Uc,e)}var Gi=_("ZodGUID",(e,t)=>{tp.init(e,t),he.init(e,t)});function Uy(e){return Fi(Gi,e)}var Gt=_("ZodUUID",(e,t)=>{rp.init(e,t),he.init(e,t)});function Dy(e){return nc(Gt,e)}function Ly(e){return oc(Gt,e)}function Zy(e){return ic(Gt,e)}function Vy(e){return ac(Gt,e)}var Yi=_("ZodURL",(e,t)=>{op.init(e,t),he.init(e,t)});function ho(e){return Ji(Yi,e)}function Fy(e){return Ji(Yi,{protocol:Ls,hostname:oy,...w(e)})}var Lc=_("ZodEmoji",(e,t)=>{ip.init(e,t),he.init(e,t)});function Jy(e){return sc(Lc,e)}var Zc=_("ZodNanoID",(e,t)=>{ap.init(e,t),he.init(e,t)});function Hy(e){return cc(Zc,e)}var Vc=_("ZodCUID",(e,t)=>{sp.init(e,t),he.init(e,t)});function Ky(e){return lc(Vc,e)}var Fc=_("ZodCUID2",(e,t)=>{cp.init(e,t),he.init(e,t)});function Gy(e){return uc(Fc,e)}var Jc=_("ZodULID",(e,t)=>{lp.init(e,t),he.init(e,t)});function By(e){return dc(Jc,e)}var Hc=_("ZodXID",(e,t)=>{up.init(e,t),he.init(e,t)});function Wy(e){return mc(Hc,e)}var Kc=_("ZodKSUID",(e,t)=>{dp.init(e,t),he.init(e,t)});function Yy(e){return pc(Kc,e)}var Gc=_("ZodIPv4",(e,t)=>{gp.init(e,t),he.init(e,t)});function Xy(e){return fc(Gc,e)}var Hg=_("ZodMAC",(e,t)=>{_p.init(e,t),he.init(e,t)});function Qy(e){return dh(Hg,e)}var Bc=_("ZodIPv6",(e,t)=>{vp.init(e,t),he.init(e,t)});function eb(e){return hc(Bc,e)}var Wc=_("ZodCIDRv4",(e,t)=>{Sp.init(e,t),he.init(e,t)});function tb(e){return gc(Wc,e)}var Yc=_("ZodCIDRv6",(e,t)=>{yp.init(e,t),he.init(e,t)});function rb(e){return vc(Yc,e)}var Xc=_("ZodBase64",(e,t)=>{$p.init(e,t),he.init(e,t)});function nb(e){return _c(Xc,e)}var Qc=_("ZodBase64URL",(e,t)=>{zp.init(e,t),he.init(e,t)});function ob(e){return Sc(Qc,e)}var el=_("ZodE164",(e,t)=>{wp.init(e,t),he.init(e,t)});function ib(e){return yc(el,e)}var tl=_("ZodJWT",(e,t)=>{Rp.init(e,t),he.init(e,t)});function ab(e){return bc(tl,e)}var go=_("ZodCustomStringFormat",(e,t)=>{xp.init(e,t),he.init(e,t)});function sb(e,t,n={}){return lo(go,e,t,n)}function cb(e){return lo(go,"hostname",ny,e)}function lb(e){return lo(go,"hex",sy,e)}function ub(e,t){let n=t?.enc??"hex",o=`${e}_${n}`,r=rr[o];if(!r)throw Error(`Unrecognized hash format: ${o}`);return lo(go,o,r,t)}var vo=_("ZodNumber",(e,t)=>{Ws.init(e,t),oe.init(e,t),e._zod.processJSONSchema=(o,r,i)=>Wh(e,o,r,i),Wi(e,"ZodNumber",{gt(o,r){return this.check(Ht(o,r))},gte(o,r){return this.check(Ke(o,r))},min(o,r){return this.check(Ke(o,r))},lt(o,r){return this.check(Jt(o,r))},lte(o,r){return this.check(pt(o,r))},max(o,r){return this.check(pt(o,r))},int(o){return this.check(qc(o))},safe(o){return this.check(qc(o))},positive(o){return this.check(Ht(0,o))},nonnegative(o){return this.check(Ke(0,o))},negative(o){return this.check(Jt(0,o))},nonpositive(o){return this.check(pt(0,o))},multipleOf(o,r){return this.check(Rr(o,r))},step(o,r){return this.check(Rr(o,r))},finite(){return this}});let n=e._zod.bag;e.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??0.5),e.isFinite=!0,e.format=n.format??null});function x(e){return vh(vo,e)}var vn=_("ZodNumberFormat",(e,t)=>{kp.init(e,t),vo.init(e,t)});function qc(e){return Sh(vn,e)}function db(e){return yh(vn,e)}function mb(e){return bh(vn,e)}function pb(e){return $h(vn,e)}function fb(e){return zh(vn,e)}var _o=_("ZodBoolean",(e,t)=>{qi.init(e,t),oe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Yh(e,n,o,r)});function N(e){return wh(_o,e)}var So=_("ZodBigInt",(e,t)=>{Ys.init(e,t),oe.init(e,t),e._zod.processJSONSchema=(o,r,i)=>Xh(e,o,r,i),e.gte=(o,r)=>e.check(Ke(o,r)),e.min=(o,r)=>e.check(Ke(o,r)),e.gt=(o,r)=>e.check(Ht(o,r)),e.gte=(o,r)=>e.check(Ke(o,r)),e.min=(o,r)=>e.check(Ke(o,r)),e.lt=(o,r)=>e.check(Jt(o,r)),e.lte=(o,r)=>e.check(pt(o,r)),e.max=(o,r)=>e.check(pt(o,r)),e.positive=(o)=>e.check(Ht(BigInt(0),o)),e.negative=(o)=>e.check(Jt(BigInt(0),o)),e.nonpositive=(o)=>e.check(pt(BigInt(0),o)),e.nonnegative=(o)=>e.check(Ke(BigInt(0),o)),e.multipleOf=(o,r)=>e.check(Rr(o,r));let n=e._zod.bag;e.minValue=n.minimum??null,e.maxValue=n.maximum??null,e.format=n.format??null});function hb(e){return xh(So,e)}var rl=_("ZodBigIntFormat",(e,t)=>{Ip.init(e,t),So.init(e,t)});function gb(e){return Ih(rl,e)}function vb(e){return Ph(rl,e)}var Kg=_("ZodSymbol",(e,t)=>{Pp.init(e,t),oe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Qh(e,n,o,r)});function _b(e){return Eh(Kg,e)}var Gg=_("ZodUndefined",(e,t)=>{Ep.init(e,t),oe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>tg(e,n,o,r)});function Sb(e){return Th(Gg,e)}var Bg=_("ZodNull",(e,t)=>{Tp.init(e,t),oe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>eg(e,n,o,r)});function Bt(e){return jh(Bg,e)}var Wg=_("ZodAny",(e,t)=>{jp.init(e,t),oe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>og(e,n,o,r)});function nl(){return Oh(Wg)}var Yg=_("ZodUnknown",(e,t)=>{Op.init(e,t),oe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>ig(e,n,o,r)});function V(){return Nh(Yg)}var Xg=_("ZodNever",(e,t)=>{Np.init(e,t),oe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>ng(e,n,o,r)});function ol(e){return Ch(Xg,e)}var Qg=_("ZodVoid",(e,t)=>{Cp.init(e,t),oe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>rg(e,n,o,r)});function yb(e){return qh(Qg,e)}var Xi=_("ZodDate",(e,t)=>{qp.init(e,t),oe.init(e,t),e._zod.processJSONSchema=(o,r,i)=>ag(e,o,r,i),e.min=(o,r)=>e.check(Ke(o,r)),e.max=(o,r)=>e.check(pt(o,r));let n=e._zod.bag;e.minDate=n.minimum?new Date(n.minimum):null,e.maxDate=n.maximum?new Date(n.maximum):null});function bb(e){return Ah(Xi,e)}var ev=_("ZodArray",(e,t)=>{Ap.init(e,t),oe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>_g(e,n,o,r),e.element=t.element,Wi(e,"ZodArray",{min(n,o){return this.check(nr(n,o))},nonempty(n){return this.check(nr(1,n))},max(n,o){return this.check(pn(n,o))},length(n,o){return this.check(fn(n,o))},unwrap(){return this.element}})});function S(e,t){return Dh(ev,e,t)}function $b(e){let t=e._zod.def.shape;return X(Object.keys(t))}var Qi=_("ZodObject",(e,t)=>{Mp.init(e,t),oe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Sg(e,n,o,r),ae(e,"shape",()=>t.shape),Wi(e,"ZodObject",{keyof(){return X(Object.keys(this._zod.def.shape))},catchall(n){return this.clone({...this._zod.def,catchall:n})},passthrough(){return this.clone({...this._zod.def,catchall:V()})},loose(){return this.clone({...this._zod.def,catchall:V()})},strict(){return this.clone({...this._zod.def,catchall:ol()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(n){return HS(this,n)},safeExtend(n){return KS(this,n)},merge(n){return GS(this,n)},pick(n){return FS(this,n)},omit(n){return JS(this,n)},partial(...n){return BS(al,this,n[0])},required(...n){return WS(sl,this,n[0])}})});function h(e,t){let n={type:"object",shape:e??{},...w(t)};return new Qi(n)}function zb(e,t){return new Qi({type:"object",shape:e,catchall:ol(),...w(t)})}function H(e,t){return new Qi({type:"object",shape:e,catchall:V(),...w(t)})}var ea=_("ZodUnion",(e,t)=>{Ai.init(e,t),oe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Ic(e,n,o,r),e.options=t.options});function q(e,t){return new ea({type:"union",options:e,...w(t)})}var tv=_("ZodXor",(e,t)=>{ea.init(e,t),Up.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Ic(e,n,o,r),e.options=t.options});function wb(e,t){return new tv({type:"union",options:e,inclusive:!1,...w(t)})}var rv=_("ZodDiscriminatedUnion",(e,t)=>{ea.init(e,t),Dp.init(e,t)});function Tr(e,t,n){return new rv({type:"union",options:t,discriminator:e,...w(n)})}var nv=_("ZodIntersection",(e,t)=>{Lp.init(e,t),oe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>yg(e,n,o,r)});function It(e,t){return new nv({type:"intersection",left:e,right:t})}var ov=_("ZodTuple",(e,t)=>{Xs.init(e,t),oe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>bg(e,n,o,r),e.rest=(n)=>e.clone({...e._zod.def,rest:n})});function iv(e,t,n){let o=t instanceof Q,r=o?n:t;return new ov({type:"tuple",items:e,rest:o?t:null,...w(r)})}var mo=_("ZodRecord",(e,t)=>{Zp.init(e,t),oe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>$g(e,n,o,r),e.keyType=t.keyType,e.valueType=t.valueType});function T(e,t,n){if(!t||!t._zod)return new mo({type:"record",keyType:u(),valueType:e,...w(t)});return new mo({type:"record",keyType:e,valueType:t,...w(n)})}function Rb(e,t,n){let o=Je(e);return o._zod.values=void 0,new mo({type:"record",keyType:o,valueType:t,...w(n)})}function xb(e,t,n){return new mo({type:"record",keyType:e,valueType:t,mode:"loose",...w(n)})}var av=_("ZodMap",(e,t)=>{Vp.init(e,t),oe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>gg(e,n,o,r),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...n)=>e.check(Kt(...n)),e.nonempty=(n)=>e.check(Kt(1,n)),e.max=(...n)=>e.check(xr(...n)),e.size=(...n)=>e.check(mn(...n))});function kb(e,t,n){return new av({type:"map",keyType:e,valueType:t,...w(n)})}var sv=_("ZodSet",(e,t)=>{Fp.init(e,t),oe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>vg(e,n,o,r),e.min=(...n)=>e.check(Kt(...n)),e.nonempty=(n)=>e.check(Kt(1,n)),e.max=(...n)=>e.check(xr(...n)),e.size=(...n)=>e.check(mn(...n))});function Ib(e,t){return new sv({type:"set",valueType:e,...w(t)})}var po=_("ZodEnum",(e,t)=>{Jp.init(e,t),oe.init(e,t),e._zod.processJSONSchema=(o,r,i)=>sg(e,o,r,i),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(o,r)=>{let i={};for(let a of o)if(n.has(a))i[a]=t.entries[a];else throw Error(`Key ${a} not found in enum`);return new po({...t,checks:[],...w(r),entries:i})},e.exclude=(o,r)=>{let i={...t.entries};for(let a of o)if(n.has(a))delete i[a];else throw Error(`Key ${a} not found in enum`);return new po({...t,checks:[],...w(r),entries:i})}});function X(e,t){let n=Array.isArray(e)?Object.fromEntries(e.map((o)=>[o,o])):e;return new po({type:"enum",entries:n,...w(t)})}function Pb(e,t){return new po({type:"enum",entries:e,...w(t)})}var cv=_("ZodLiteral",(e,t)=>{Hp.init(e,t),oe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>cg(e,n,o,r),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function y(e,t){return new cv({type:"literal",values:Array.isArray(e)?e:[e],...w(t)})}var lv=_("ZodFile",(e,t)=>{Kp.init(e,t),oe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>dg(e,n,o,r),e.min=(n,o)=>e.check(Kt(n,o)),e.max=(n,o)=>e.check(xr(n,o)),e.mime=(n,o)=>e.check(no(Array.isArray(n)?n:[n],o))});function Eb(e){return Lh(lv,e)}var uv=_("ZodTransform",(e,t)=>{Gp.init(e,t),oe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>hg(e,n,o,r),e._zod.parse=(n,o)=>{if(o.direction==="backward")throw new cn(e.constructor.name);n.addIssue=(i)=>{if(typeof i==="string")n.issues.push(wr(i,n.value,t));else{let a=i;if(a.fatal)a.continue=!1;a.code??(a.code="custom"),a.input??(a.input=n.value),a.inst??(a.inst=e),n.issues.push(wr(a))}};let r=t.transform(n.value,n);if(r instanceof Promise)return r.then((i)=>(n.value=i,n.fallback=!0,n));return n.value=r,n.fallback=!0,n}});function il(e){return new uv({type:"transform",transform:e})}var al=_("ZodOptional",(e,t)=>{Qs.init(e,t),oe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Pc(e,n,o,r),e.unwrap=()=>e._zod.def.innerType});function F(e){return new al({type:"optional",innerType:e})}var dv=_("ZodExactOptional",(e,t)=>{Bp.init(e,t),oe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Pc(e,n,o,r),e.unwrap=()=>e._zod.def.innerType});function mv(e){return new dv({type:"optional",innerType:e})}var pv=_("ZodNullable",(e,t)=>{Wp.init(e,t),oe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>zg(e,n,o,r),e.unwrap=()=>e._zod.def.innerType});function Bi(e){return new pv({type:"nullable",innerType:e})}function Tb(e){return F(Bi(e))}var fv=_("ZodDefault",(e,t)=>{Yp.init(e,t),oe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Rg(e,n,o,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function hv(e,t){return new fv({type:"default",innerType:e,get defaultValue(){return typeof t==="function"?t():ki(t)}})}var gv=_("ZodPrefault",(e,t)=>{Xp.init(e,t),oe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>xg(e,n,o,r),e.unwrap=()=>e._zod.def.innerType});function vv(e,t){return new gv({type:"prefault",innerType:e,get defaultValue(){return typeof t==="function"?t():ki(t)}})}var sl=_("ZodNonOptional",(e,t)=>{Qp.init(e,t),oe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>wg(e,n,o,r),e.unwrap=()=>e._zod.def.innerType});function _v(e,t){return new sl({type:"nonoptional",innerType:e,...w(t)})}var Sv=_("ZodSuccess",(e,t)=>{ef.init(e,t),oe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>mg(e,n,o,r),e.unwrap=()=>e._zod.def.innerType});function jb(e){return new Sv({type:"success",innerType:e})}var yv=_("ZodCatch",(e,t)=>{tf.init(e,t),oe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>kg(e,n,o,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function bv(e,t){return new yv({type:"catch",innerType:e,catchValue:typeof t==="function"?t:()=>t})}var $v=_("ZodNaN",(e,t)=>{rf.init(e,t),oe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>lg(e,n,o,r)});function Ob(e){return Uh($v,e)}var ta=_("ZodPipe",(e,t)=>{ec.init(e,t),oe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Ig(e,n,o,r),e.in=t.in,e.out=t.out});function Ac(e,t){return new ta({type:"pipe",in:e,out:t})}var ra=_("ZodCodec",(e,t)=>{ta.init(e,t),Mi.init(e,t)});function Nb(e,t,n){return new ra({type:"pipe",in:e,out:t,transform:n.decode,reverseTransform:n.encode})}function Cb(e){let t=e._zod.def;return new ra({type:"pipe",in:t.out,out:t.in,transform:t.reverseTransform,reverseTransform:t.transform})}var zv=_("ZodPreprocess",(e,t)=>{ta.init(e,t),nf.init(e,t)}),wv=_("ZodReadonly",(e,t)=>{of.init(e,t),oe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Pg(e,n,o,r),e.unwrap=()=>e._zod.def.innerType});function Rv(e){return new wv({type:"readonly",innerType:e})}var xv=_("ZodTemplateLiteral",(e,t)=>{af.init(e,t),oe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>ug(e,n,o,r)});function qb(e,t){return new xv({type:"template_literal",parts:e,...w(t)})}var kv=_("ZodLazy",(e,t)=>{lf.init(e,t),oe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Tg(e,n,o,r),e.unwrap=()=>e._zod.def.getter()});function jr(e){return new kv({type:"lazy",getter:e})}var Iv=_("ZodPromise",(e,t)=>{cf.init(e,t),oe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Eg(e,n,o,r),e.unwrap=()=>e._zod.def.innerType});function Ab(e){return new Iv({type:"promise",innerType:e})}var Pv=_("ZodFunction",(e,t)=>{sf.init(e,t),oe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>fg(e,n,o,r)});function Mb(e){return new Pv({type:"function",input:Array.isArray(e?.input)?iv(e?.input):e?.input??S(V()),output:e?.output??V()})}var na=_("ZodCustom",(e,t)=>{uf.init(e,t),oe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>pg(e,n,o,r)});function Ub(e){let t=new ge({check:"custom"});return t._zod.check=e,t}function Db(e,t){return Zh(na,e??(()=>!0),t)}function Ev(e,t={}){return Vh(na,e,t)}function Tv(e,t){return Fh(e,t)}var Lb=Jh,Zb=Hh;function Vb(e,t={}){let n=new na({type:"custom",check:"custom",fn:(o)=>o instanceof e,abort:!0,...w(t)});return n._zod.bag.Class=e,n._zod.check=(o)=>{if(!(o.value instanceof e))o.issues.push({code:"invalid_type",expected:e.name,input:o.value,inst:n,path:[...n._zod.def.path??[]]})},n}var Fb=(...e)=>Kh({Codec:ra,Boolean:_o,String:fo},...e);function Jb(e){let t=jr(()=>q([u(e),x(),N(),Bt(),S(t),T(u(),t)]));return t}function ir(e,t){return new zv({type:"pipe",in:il(e),out:t})}var Ov={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 uP(e){be({customError:e})}function dP(){return be().customError}var jv;(function(e){})(jv||(jv={}));var C={...Hi,...Ec,iso:Er},mP=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 pP(e,t){let n=e.$schema;if(n==="https://json-schema.org/draft/2020-12/schema")return"draft-2020-12";if(n==="http://json-schema.org/draft-07/schema#")return"draft-7";if(n==="http://json-schema.org/draft-04/schema#")return"draft-4";return t??"draft-2020-12"}function fP(e,t){if(!e.startsWith("#"))throw Error("External $ref is not supported, only local refs (#/...) are allowed");let n=e.slice(1).split("/").filter(Boolean);if(n.length===0)return t.rootSchema;let o=t.version==="draft-2020-12"?"$defs":"definitions";if(n[0]===o){let r=n[1];if(!r||!t.defs[r])throw Error(`Reference not found: ${e}`);return t.defs[r]}throw Error(`Reference not found: ${e}`)}function Hb(e,t){if(e.not!==void 0){if(typeof e.not==="object"&&Object.keys(e.not).length===0)return C.never();throw Error("not is not supported in Zod (except { not: {} } for never)")}if(e.unevaluatedItems!==void 0)throw Error("unevaluatedItems is not supported");if(e.unevaluatedProperties!==void 0)throw Error("unevaluatedProperties is not supported");if(e.if!==void 0||e.then!==void 0||e.else!==void 0)throw Error("Conditional schemas (if/then/else) are not supported");if(e.dependentSchemas!==void 0||e.dependentRequired!==void 0)throw Error("dependentSchemas and dependentRequired are not supported");if(e.$ref){let r=e.$ref;if(t.refs.has(r))return t.refs.get(r);if(t.processing.has(r))return C.lazy(()=>{if(!t.refs.has(r))throw Error(`Circular reference not resolved: ${r}`);return t.refs.get(r)});t.processing.add(r);let i=fP(r,t),a=Ae(i,t);return t.refs.set(r,a),t.processing.delete(r),a}if(e.enum!==void 0){let r=e.enum;if(t.version==="openapi-3.0"&&e.nullable===!0&&r.length===1&&r[0]===null)return C.null();if(r.length===0)return C.never();if(r.length===1)return C.literal(r[0]);if(r.every((a)=>typeof a==="string"))return C.enum(r);let i=r.map((a)=>C.literal(a));if(i.length<2)return i[0];return C.union([i[0],i[1],...i.slice(2)])}if(e.const!==void 0)return C.literal(e.const);let n=e.type;if(Array.isArray(n)){let r=n.map((i)=>{let a={...e,type:i};return Hb(a,t)});if(r.length===0)return C.never();if(r.length===1)return r[0];return C.union(r)}if(!n)return C.any();let o;switch(n){case"string":{let r=C.string();if(e.format){let i=e.format;if(i==="email")r=r.check(C.email());else if(i==="uri"||i==="uri-reference")r=r.check(C.url());else if(i==="uuid"||i==="guid")r=r.check(C.uuid());else if(i==="date-time")r=r.check(C.iso.datetime());else if(i==="date")r=r.check(C.iso.date());else if(i==="time")r=r.check(C.iso.time());else if(i==="duration")r=r.check(C.iso.duration());else if(i==="ipv4")r=r.check(C.ipv4());else if(i==="ipv6")r=r.check(C.ipv6());else if(i==="mac")r=r.check(C.mac());else if(i==="cidr")r=r.check(C.cidrv4());else if(i==="cidr-v6")r=r.check(C.cidrv6());else if(i==="base64")r=r.check(C.base64());else if(i==="base64url")r=r.check(C.base64url());else if(i==="e164")r=r.check(C.e164());else if(i==="jwt")r=r.check(C.jwt());else if(i==="emoji")r=r.check(C.emoji());else if(i==="nanoid")r=r.check(C.nanoid());else if(i==="cuid")r=r.check(C.cuid());else if(i==="cuid2")r=r.check(C.cuid2());else if(i==="ulid")r=r.check(C.ulid());else if(i==="xid")r=r.check(C.xid());else if(i==="ksuid")r=r.check(C.ksuid())}if(typeof e.minLength==="number")r=r.min(e.minLength);if(typeof e.maxLength==="number")r=r.max(e.maxLength);if(e.pattern)r=r.regex(new RegExp(e.pattern));o=r;break}case"number":case"integer":{let r=n==="integer"?C.number().int():C.number();if(typeof e.minimum==="number")r=r.min(e.minimum);if(typeof e.maximum==="number")r=r.max(e.maximum);if(typeof e.exclusiveMinimum==="number")r=r.gt(e.exclusiveMinimum);else if(e.exclusiveMinimum===!0&&typeof e.minimum==="number")r=r.gt(e.minimum);if(typeof e.exclusiveMaximum==="number")r=r.lt(e.exclusiveMaximum);else if(e.exclusiveMaximum===!0&&typeof e.maximum==="number")r=r.lt(e.maximum);if(typeof e.multipleOf==="number")r=r.multipleOf(e.multipleOf);o=r;break}case"boolean":{o=C.boolean();break}case"null":{o=C.null();break}case"object":{let r={},i=e.properties||{},a=new Set(e.required||[]);for(let[c,l]of Object.entries(i)){let d=Ae(l,t);r[c]=a.has(c)?d:d.optional()}if(e.propertyNames){let c=Ae(e.propertyNames,t),l=e.additionalProperties&&typeof e.additionalProperties==="object"?Ae(e.additionalProperties,t):C.any();if(Object.keys(r).length===0){o=C.record(c,l);break}let d=C.object(r).passthrough(),m=C.looseRecord(c,l);o=C.intersection(d,m);break}if(e.patternProperties){let c=e.patternProperties,l=Object.keys(c),d=[];for(let p of l){let f=Ae(c[p],t),v=C.string().regex(new RegExp(p));d.push(C.looseRecord(v,f))}let m=[];if(Object.keys(r).length>0)m.push(C.object(r).passthrough());if(m.push(...d),m.length===0)o=C.object({}).passthrough();else if(m.length===1)o=m[0];else{let p=C.intersection(m[0],m[1]);for(let f=2;f<m.length;f++)p=C.intersection(p,m[f]);o=p}break}let s=C.object(r);if(e.additionalProperties===!1)o=s.strict();else if(typeof e.additionalProperties==="object")o=s.catchall(Ae(e.additionalProperties,t));else o=s.passthrough();break}case"array":{let{prefixItems:r,items:i}=e;if(r&&Array.isArray(r)){let a=r.map((c)=>Ae(c,t)),s=i&&typeof i==="object"&&!Array.isArray(i)?Ae(i,t):void 0;if(s)o=C.tuple(a).rest(s);else o=C.tuple(a);if(typeof e.minItems==="number")o=o.check(C.minLength(e.minItems));if(typeof e.maxItems==="number")o=o.check(C.maxLength(e.maxItems))}else if(Array.isArray(i)){let a=i.map((c)=>Ae(c,t)),s=e.additionalItems&&typeof e.additionalItems==="object"?Ae(e.additionalItems,t):void 0;if(s)o=C.tuple(a).rest(s);else o=C.tuple(a);if(typeof e.minItems==="number")o=o.check(C.minLength(e.minItems));if(typeof e.maxItems==="number")o=o.check(C.maxLength(e.maxItems))}else if(i!==void 0){let a=Ae(i,t),s=C.array(a);if(typeof e.minItems==="number")s=s.min(e.minItems);if(typeof e.maxItems==="number")s=s.max(e.maxItems);o=s}else o=C.array(C.any());break}default:throw Error(`Unsupported type: ${n}`)}return o}function Ae(e,t){if(typeof e==="boolean")return e?C.any():C.never();let n=Hb(e,t),o=e.type||e.enum!==void 0||e.const!==void 0;if(e.anyOf&&Array.isArray(e.anyOf)){let s=e.anyOf.map((l)=>Ae(l,t)),c=C.union(s);n=o?C.intersection(n,c):c}if(e.oneOf&&Array.isArray(e.oneOf)){let s=e.oneOf.map((l)=>Ae(l,t)),c=C.xor(s);n=o?C.intersection(n,c):c}if(e.allOf&&Array.isArray(e.allOf))if(e.allOf.length===0)n=o?n:C.any();else{let s=o?n:Ae(e.allOf[0],t),c=o?0:1;for(let l=c;l<e.allOf.length;l++)s=C.intersection(s,Ae(e.allOf[l],t));n=s}if(e.nullable===!0&&t.version==="openapi-3.0")n=C.nullable(n);if(e.readOnly===!0)n=C.readonly(n);if(e.default!==void 0)n=n.default(e.default);let r={},i=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(let s of i)if(s in e)r[s]=e[s];let a=["contentEncoding","contentMediaType","contentSchema"];for(let s of a)if(s in e)r[s]=e[s];for(let s of Object.keys(e))if(!mP.has(s))r[s]=e[s];if(Object.keys(r).length>0)t.registry.add(n,r);if(e.description)n=n.describe(e.description);return n}function Kb(e,t){if(typeof e==="boolean")return e?C.any():C.never();let n;try{n=JSON.parse(JSON.stringify(e))}catch{throw Error("fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas")}let o=pP(n,t?.defaultTarget),r=n.$defs||n.definitions||{},i={version:o,defs:r,refs:new Map,processing:new Set,rootSchema:n,registry:t?.registry??Te};return Ae(n,i)}var cl={};tr(cl,{bigint:()=>vP,boolean:()=>gP,date:()=>_P,number:()=>Gb,string:()=>hP});function hP(e){return uh(fo,e)}function Gb(e){return _h(vo,e)}function gP(e){return Rh(_o,e)}function vP(e){return kh(So,e)}function _P(e){return Mh(Xi,e)}be(Ui());var Sn="2025-11-25",ll="2025-03-26",oa=[Sn,"2025-06-18","2025-03-26","2024-11-05","2024-10-07"],ul="io.modelcontextprotocol/related-task",yn="io.modelcontextprotocol/protocolVersion",yo="io.modelcontextprotocol/clientInfo",sr="io.modelcontextprotocol/serverInfo",cr="io.modelcontextprotocol/clientCapabilities",ia="io.modelcontextprotocol/subscriptionId",Nr="io.modelcontextprotocol/logLevel";var bn="2.0";var Or=jr(()=>q([u(),x(),N(),Bt(),T(u(),Or),S(Or)])),$e=T(u(),Or),qv=S(Or),aa=q([u(),x().int()]),sa=u(),dl=h({ttl:x().optional()}),ml=h({taskId:u()}),ca=H({progressToken:aa.optional(),[ul]:ml.optional()}),Ee=h({_meta:ca.optional()}),$n=Ee.extend({task:dl.optional()}),ze=h({method:u(),params:Ee.loose().optional()}),Me=h({_meta:ca.optional()}),Ue=h({method:u(),params:Me.loose().optional()}),la=H({get[sr](){return wo.optional().catch(void 0)}}),we=H({_meta:la.optional()}),Cr=q([u(),x().int()]),ua=h({jsonrpc:y(bn),id:Cr,...ze.shape}).strict(),da=h({jsonrpc:y(bn),...Ue.shape}).strict(),bo=h({jsonrpc:y(bn),id:Cr,result:we}).strict(),$o=h({jsonrpc:y(bn),id:Cr.optional(),error:h({code:x().int(),message:u(),data:V().optional()})}).strict(),zo=q([ua,da,bo,$o]),Av=q([bo,$o]),ma=we.strict(),pl=Me.extend({requestId:Cr.optional(),reason:u().optional()}),pa=Ue.extend({method:y("notifications/cancelled"),params:pl}),fl=h({src:u(),mimeType:u().optional(),sizes:S(u()).optional(),theme:X(["light","dark"]).optional()}),qr=h({icons:S(fl).optional()}),ar=h({name:u(),title:u().optional()}),wo=ar.extend({...ar.shape,...qr.shape,version:u(),websiteUrl:u().optional(),description:u().optional()}),yP=It(h({applyDefaults:N().optional()}),$e),bP=ir((e)=>{if(e&&typeof e==="object"&&!Array.isArray(e)&&Object.keys(e).length===0)return{form:{}};return e},It(h({form:yP.optional(),url:$e.optional()}),$e.optional())),hl=H({list:$e.optional(),cancel:$e.optional(),requests:H({sampling:H({createMessage:$e.optional()}).optional(),elicitation:H({create:$e.optional()}).optional()}).optional()}),gl=H({list:$e.optional(),cancel:$e.optional(),requests:H({tools:H({call:$e.optional()}).optional()}).optional()}),vl=h({experimental:T(u(),$e).optional(),sampling:h({context:$e.optional(),tools:$e.optional()}).optional(),elicitation:bP.optional(),roots:h({listChanged:N().optional()}).optional(),tasks:hl.optional(),extensions:T(u(),$e).optional()}),_l=Ee.extend({protocolVersion:u(),capabilities:vl,clientInfo:wo}),fa=ze.extend({method:y("initialize"),params:_l}),ha=h({experimental:T(u(),$e).optional(),logging:$e.optional(),completions:$e.optional(),prompts:h({listChanged:N().optional()}).optional(),resources:h({subscribe:N().optional(),listChanged:N().optional()}).optional(),tools:h({listChanged:N().optional()}).optional(),tasks:gl.optional(),extensions:T(u(),$e).optional()}),Sl=we.extend({protocolVersion:u(),capabilities:ha,serverInfo:wo,instructions:u().optional()}),yl=Ue.extend({method:y("notifications/initialized"),params:Me.optional()}),bl=ze.extend({method:y("server/discover"),params:Ee.optional()}),$l=we.extend({supportedVersions:S(u()),capabilities:ha,instructions:u().optional()}),ga=ze.extend({method:y("ping"),params:Ee.optional()}),zl=h({progress:x(),total:F(x()),message:F(u())}),wl=h({...Me.shape,...zl.shape,progressToken:aa}),va=Ue.extend({method:y("notifications/progress"),params:wl}),Rl=Ee.extend({cursor:sa.optional()}),Ar=ze.extend({params:Rl.optional()}),Mr=we.extend({nextCursor:sa.optional()}),_a=h({uri:u(),mimeType:F(u()),_meta:T(u(),V()).optional()}),Sa=_a.extend({text:u()}),Mv=u().refine((e)=>{try{return atob(e),!0}catch{return!1}},{message:"Invalid Base64 string"}),ya=_a.extend({blob:Mv}),Ur=X(["user","assistant"]),lr=h({audience:S(Ur).optional(),priority:x().min(0).max(1).optional(),lastModified:gn({offset:!0}).optional()}),ba=h({...ar.shape,...qr.shape,uri:u(),description:F(u()),mimeType:F(u()),size:F(x()),annotations:lr.optional(),_meta:F(H({}))}),xl=h({...ar.shape,...qr.shape,uriTemplate:u(),description:F(u()),mimeType:F(u()),annotations:lr.optional(),_meta:F(H({}))}),kl=Ar.extend({method:y("resources/list")}),Il=Mr.extend({resources:S(ba)}),Pl=Ar.extend({method:y("resources/templates/list")}),El=Mr.extend({resourceTemplates:S(xl)}),Ro=Ee.extend({uri:u()}),Tl=Ro,jl=ze.extend({method:y("resources/read"),params:Tl}),Ol=we.extend({contents:S(q([Sa,ya]))}),Nl=Ue.extend({method:y("notifications/resources/list_changed"),params:Me.optional()}),Cl=Ro,ql=ze.extend({method:y("resources/subscribe"),params:Cl}),Al=Ro,Ml=ze.extend({method:y("resources/unsubscribe"),params:Al}),$a=h({toolsListChanged:N().optional(),promptsListChanged:N().optional(),resourcesListChanged:N().optional(),resourceSubscriptions:S(u()).optional()}),Ul=Ee.extend({notifications:$a}),Dl=ze.extend({method:y("subscriptions/listen"),params:Ul}),Ll=Me.extend({notifications:$a}),Zl=Ue.extend({method:y("notifications/subscriptions/acknowledged"),params:Ll}),Vl=la.extend({[ia]:Cr}),Fl=we.extend({_meta:Vl}),Jl=Me.extend({uri:u()}),Hl=Ue.extend({method:y("notifications/resources/updated"),params:Jl}),Kl=h({name:u(),description:F(u()),required:F(N())}),Gl=h({...ar.shape,...qr.shape,description:F(u()),arguments:F(S(Kl)),_meta:F(H({}))}),Bl=Ar.extend({method:y("prompts/list")}),Wl=Mr.extend({prompts:S(Gl)}),Yl=Ee.extend({name:u(),arguments:T(u(),u()).optional()}),Xl=ze.extend({method:y("prompts/get"),params:Yl}),xo=h({type:y("text"),text:u(),annotations:lr.optional(),_meta:T(u(),V()).optional()}),ko=h({type:y("image"),data:Mv,mimeType:u(),annotations:lr.optional(),_meta:T(u(),V()).optional()}),Io=h({type:y("audio"),data:Mv,mimeType:u(),annotations:lr.optional(),_meta:T(u(),V()).optional()}),Ql=h({type:y("tool_use"),name:u(),id:u(),input:T(u(),V()),_meta:T(u(),V()).optional()}),eu=h({type:y("resource"),resource:q([Sa,ya]),annotations:lr.optional(),_meta:T(u(),V()).optional()}),tu=ba.extend({type:y("resource_link")}),Po=q([xo,ko,Io,tu,eu]),ru=h({role:Ur,content:Po}),nu=we.extend({description:u().optional(),messages:S(ru)}),ou=Ue.extend({method:y("notifications/prompts/list_changed"),params:Me.optional()}),iu=h({title:u().optional(),readOnlyHint:N().optional(),destructiveHint:N().optional(),idempotentHint:N().optional(),openWorldHint:N().optional()}),au=h({taskSupport:X(["required","optional","forbidden"]).optional()}),za=h({...ar.shape,...qr.shape,description:u().optional(),inputSchema:h({type:y("object"),properties:T(u(),Or).optional(),required:S(u()).optional()}).catchall(V()),outputSchema:H({$schema:u().optional()}).optional(),annotations:iu.optional(),execution:au.optional(),_meta:T(u(),V()).optional()}),su=Ar.extend({method:y("tools/list")}),cu=Mr.extend({tools:S(za)}),wa=we.extend({content:S(Po).default([]),structuredContent:V().optional(),isError:N().optional()}),Uv=wa.or(we.extend({toolResult:V()})),lu=$n.extend({name:u(),arguments:T(u(),V()).optional()}),uu=ze.extend({method:y("tools/call"),params:lu}),du=Ue.extend({method:y("notifications/tools/list_changed"),params:Me.optional()}),Dv=h({autoRefresh:N().default(!0),debounceMs:x().int().nonnegative().default(300)}),Dr=X(["debug","info","notice","warning","error","critical","alert","emergency"]),mu=Ee.extend({level:Dr}),pu=ze.extend({method:y("logging/setLevel"),params:mu}),fu=Me.extend({level:Dr,logger:u().optional(),data:V()}),hu=Ue.extend({method:y("notifications/message"),params:fu}),gu=h({name:u().optional()}),vu=h({hints:S(gu).optional(),costPriority:x().min(0).max(1).optional(),speedPriority:x().min(0).max(1).optional(),intelligencePriority:x().min(0).max(1).optional()}),_u=h({mode:X(["auto","required","none"]).optional()}),Su=h({type:y("tool_result"),toolUseId:u().describe("The unique identifier for the corresponding tool call."),content:S(Po),structuredContent:V().optional(),isError:N().optional(),_meta:T(u(),V()).optional()}),yu=Tr("type",[xo,ko,Io]),_n=Tr("type",[xo,ko,Io,Ql,Su]),bu=h({role:Ur,content:q([_n,S(_n)]),_meta:T(u(),V()).optional()}),$u=$n.extend({messages:S(bu),modelPreferences:vu.optional(),systemPrompt:u().optional(),includeContext:X(["none","thisServer","allServers"]).optional(),temperature:x().optional(),maxTokens:x().int(),stopSequences:S(u()).optional(),metadata:$e.optional(),tools:S(za).optional(),toolChoice:_u.optional()}),zu=ze.extend({method:y("sampling/createMessage"),params:$u}),wu=we.extend({model:u(),stopReason:F(X(["endTurn","stopSequence","maxTokens"]).or(u())),role:Ur,content:yu}),Ru=we.extend({model:u(),stopReason:F(X(["endTurn","stopSequence","maxTokens","toolUse"]).or(u())),role:Ur,content:q([_n,S(_n)])}),Ra=h({type:y("boolean"),title:u().optional(),description:u().optional(),default:N().optional()}),Eo=h({type:y("string"),title:u().optional(),description:u().optional(),minLength:x().optional(),maxLength:x().optional(),format:X(["email","uri","date","date-time"]).optional(),default:u().optional()}),To=h({type:X(["number","integer"]),title:u().optional(),description:u().optional(),minimum:x().optional(),maximum:x().optional(),default:x().optional()}),xa=h({type:y("string"),title:u().optional(),description:u().optional(),enum:S(u()),default:u().optional()}),ka=h({type:y("string"),title:u().optional(),description:u().optional(),oneOf:S(h({const:u(),title:u()})),default:u().optional()}),Ia=h({type:y("string"),title:u().optional(),description:u().optional(),enum:S(u()),enumNames:S(u()).optional(),default:u().optional()}),xu=q([xa,ka]),Pa=h({type:y("array"),title:u().optional(),description:u().optional(),minItems:x().optional(),maxItems:x().optional(),items:h({type:y("string"),enum:S(u())}),default:S(u()).optional()}),Ea=h({type:y("array"),title:u().optional(),description:u().optional(),minItems:x().optional(),maxItems:x().optional(),items:h({anyOf:S(h({const:u(),title:u()}))}),default:S(u()).optional()}),ku=q([Pa,Ea]),Iu=q([Ia,xu,ku]),Ta=q([Iu,Ra,Eo,To]),jo=$n.extend({mode:y("form").optional(),message:u(),requestedSchema:h({type:y("object"),properties:T(u(),Ta),required:S(u()).optional()}).catchall(V())}),Pu=$n.extend({mode:y("url"),message:u(),elicitationId:u(),url:u().url()}),Eu=q([jo,Pu]),Tu=ze.extend({method:y("elicitation/create"),params:Eu}),ju=Me.extend({elicitationId:u()}),Ou=Ue.extend({method:y("notifications/elicitation/complete"),params:ju}),Nu=we.extend({action:X(["accept","decline","cancel"]),content:ir((e)=>e===null?void 0:e,T(u(),q([u(),x(),N(),S(u())])).optional())}),Cu=h({type:y("ref/resource"),uri:u()}),qu=h({type:y("ref/prompt"),name:u()}),Au=Ee.extend({ref:q([qu,Cu]),argument:h({name:u(),value:u()}),context:h({arguments:T(u(),u()).optional()}).optional()}),Mu=ze.extend({method:y("completion/complete"),params:Au}),Uu=we.extend({completion:H({values:S(u()).max(100),total:F(x().int()),hasMore:F(N())})}),Du=h({uri:u().startsWith("file://"),name:u().optional(),_meta:T(u(),V()).optional()}),Lu=ze.extend({method:y("roots/list"),params:Ee.optional()}),Zu=we.extend({roots:S(Du)}),Vu=Ue.extend({method:y("notifications/roots/list_changed"),params:Me.optional()}),Lv=H({ttl:x().optional(),pollInterval:x().optional()}),Fu=X(["working","input_required","completed","failed","cancelled"]),Lr=h({taskId:u(),status:Fu,ttl:q([x(),Bt()]),createdAt:u(),lastUpdatedAt:u(),pollInterval:F(x()),statusMessage:F(u())}),Zv=we.extend({task:Lr}),Ju=Me.merge(Lr),Vv=Ue.extend({method:y("notifications/tasks/status"),params:Ju}),Fv=ze.extend({method:y("tasks/get"),params:Ee.extend({taskId:u()})}),Jv=we.merge(Lr),Hv=ze.extend({method:y("tasks/result"),params:Ee.extend({taskId:u()})}),Kv=we.loose(),Gv=Ar.extend({method:y("tasks/list")}),Bv=Mr.extend({tasks:S(Lr)}),Wv=ze.extend({method:y("tasks/cancel"),params:Ee.extend({taskId:u()})}),Yv=we.merge(Lr),Xv=q([ga,fa,bl,Mu,pu,Xl,Bl,kl,Pl,jl,ql,Ml,Dl,uu,su]),Qv=q([pa,va,yl,Vu]),e_=q([ma,wu,Ru,Nu,Zu]),t_=q([ga,zu,Tu,Lu]),r_=q([pa,va,hu,Hl,Nl,du,ou,Zl,Ou]),n_=q([ma,Sl,$l,Uu,nu,Wl,Il,El,Ol,wa,cu,Fl]),Pe=ho().superRefine((e,t)=>{if(!URL.canParse(e))return t.addIssue({code:Ov.custom,message:"URL must be parseable",fatal:!0}),zi}).refine((e)=>{let t=new URL(e);return t.protocol!=="javascript:"&&t.protocol!=="data:"&&t.protocol!=="vbscript:"},{message:"URL cannot use javascript:, data:, or vbscript: scheme"}),o_=H({resource:u().url(),authorization_servers:S(Pe).optional(),jwks_uri:u().url().optional(),scopes_supported:S(u()).optional(),bearer_methods_supported:S(u()).optional(),resource_signing_alg_values_supported:S(u()).optional(),resource_name:u().optional(),resource_documentation:u().optional(),resource_policy_uri:u().url().optional(),resource_tos_uri:u().url().optional(),tls_client_certificate_bound_access_tokens:N().optional(),authorization_details_types_supported:S(u()).optional(),dpop_signing_alg_values_supported:S(u()).optional(),dpop_bound_access_tokens_required:N().optional()}),Hu=H({issuer:u(),authorization_endpoint:Pe,token_endpoint:Pe,registration_endpoint:Pe.optional(),scopes_supported:S(u()).optional(),response_types_supported:S(u()),response_modes_supported:S(u()).optional(),grant_types_supported:S(u()).optional(),token_endpoint_auth_methods_supported:S(u()).optional(),token_endpoint_auth_signing_alg_values_supported:S(u()).optional(),service_documentation:Pe.optional(),revocation_endpoint:Pe.optional(),revocation_endpoint_auth_methods_supported:S(u()).optional(),revocation_endpoint_auth_signing_alg_values_supported:S(u()).optional(),introspection_endpoint:u().optional(),introspection_endpoint_auth_methods_supported:S(u()).optional(),introspection_endpoint_auth_signing_alg_values_supported:S(u()).optional(),code_challenge_methods_supported:S(u()).optional(),client_id_metadata_document_supported:N().optional(),authorization_response_iss_parameter_supported:N().optional().catch(void 0)}),Ku=H({issuer:u(),authorization_endpoint:Pe,token_endpoint:Pe,userinfo_endpoint:Pe.optional(),jwks_uri:Pe,registration_endpoint:Pe.optional(),scopes_supported:S(u()).optional(),response_types_supported:S(u()),response_modes_supported:S(u()).optional(),grant_types_supported:S(u()).optional(),acr_values_supported:S(u()).optional(),subject_types_supported:S(u()),id_token_signing_alg_values_supported:S(u()),id_token_encryption_alg_values_supported:S(u()).optional(),id_token_encryption_enc_values_supported:S(u()).optional(),userinfo_signing_alg_values_supported:S(u()).optional(),userinfo_encryption_alg_values_supported:S(u()).optional(),userinfo_encryption_enc_values_supported:S(u()).optional(),request_object_signing_alg_values_supported:S(u()).optional(),request_object_encryption_alg_values_supported:S(u()).optional(),request_object_encryption_enc_values_supported:S(u()).optional(),token_endpoint_auth_methods_supported:S(u()).optional(),token_endpoint_auth_signing_alg_values_supported:S(u()).optional(),display_values_supported:S(u()).optional(),claim_types_supported:S(u()).optional(),claims_supported:S(u()).optional(),service_documentation:u().optional(),claims_locales_supported:S(u()).optional(),ui_locales_supported:S(u()).optional(),claims_parameter_supported:N().optional(),request_parameter_supported:N().optional(),request_uri_parameter_supported:N().optional(),require_request_uri_registration:N().optional(),op_policy_uri:Pe.optional(),op_tos_uri:Pe.optional(),client_id_metadata_document_supported:N().optional(),authorization_response_iss_parameter_supported:N().optional().catch(void 0)}),i_=h({...Ku.shape,...Hu.pick({code_challenge_methods_supported:!0}).shape}),a_=h({access_token:u(),id_token:u().optional(),token_type:u(),expires_in:Gb().optional(),scope:u().optional(),refresh_token:u().optional()}).strip(),s_=h({issued_token_type:y("urn:ietf:params:oauth:token-type:id-jag"),access_token:u(),token_type:u().optional(),expires_in:x().optional(),scope:u().optional()}).strip(),c_=h({error:u(),error_description:u().optional(),error_uri:u().optional()}),Cv=Pe.optional().or(y("").transform(()=>{return})),Gu=h({redirect_uris:S(Pe),token_endpoint_auth_method:u().optional(),grant_types:S(u()).optional(),response_types:S(u()).optional(),application_type:u().optional(),client_name:u().optional(),client_uri:Pe.optional(),logo_uri:Cv,scope:u().optional(),contacts:S(u()).optional(),tos_uri:Cv,policy_uri:u().optional(),jwks_uri:Pe.optional(),jwks:nl().optional(),software_id:u().optional(),software_version:u().optional(),software_statement:u().optional()}).strip(),Bu=h({client_id:u(),client_secret:u().optional(),client_id_issued_at:x().optional(),client_secret_expires_at:x().optional()}).strip(),l_=Gu.merge(Bu),u_=h({error:u(),error_description:u().optional()}).strip(),d_=h({token:u(),token_type_hint:u().optional()}).strip();var h_=Symbol.for("mcp.sdk.errorBrands");function S_(e,t){let n=new Set,o=t;while(typeof o==="function"){let r=o.mcpBrand;if(Object.prototype.hasOwnProperty.call(o,"mcpBrand")&&typeof r==="string")n.add(r);o=Object.getPrototypeOf(o)}if(n.size===0)return;Object.defineProperty(e,h_,{value:n,enumerable:!1,configurable:!0})}function No(e,t){try{if(typeof t==="object"&&t!==null&&Object.prototype.hasOwnProperty.call(e,"mcpBrand")&&typeof e.mcpBrand==="string"&&Object.prototype.hasOwnProperty.call(t,h_)){let n=t[h_];if(n&&typeof n.has==="function"&&n.has(e.mcpBrand))return!0}}catch{}return Function.prototype[Symbol.hasInstance].call(e,t)}var $P=class e extends Error{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.OAuthError"})}static[Symbol.hasInstance](t){return No(this,t)}static isInstance(t){if(typeof this!=="function")throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return No(this,t)}constructor(t,n,o){super(n);this.code=t,this.errorUri=o,this.name="OAuthError",S_(this,new.target)}toResponseObject(){let t={error:this.code,error_description:this.message};if(this.errorUri)t.error_uri=this.errorUri;return t}static fromResponse(t){return new e(t.error,t.error_description??t.error,t.error_uri)}},se=function(e){return e.NotConnected="NOT_CONNECTED",e.AlreadyConnected="ALREADY_CONNECTED",e.NotInitialized="NOT_INITIALIZED",e.CapabilityNotSupported="CAPABILITY_NOT_SUPPORTED",e.RequestTimeout="REQUEST_TIMEOUT",e.ConnectionClosed="CONNECTION_CLOSED",e.SendFailed="SEND_FAILED",e.InvalidResult="INVALID_RESULT",e.UnsupportedResultType="UNSUPPORTED_RESULT_TYPE",e.InputRequiredRoundsExceeded="INPUT_REQUIRED_ROUNDS_EXCEEDED",e.ListPaginationExceeded="LIST_PAGINATION_EXCEEDED",e.MethodNotSupportedByProtocolVersion="METHOD_NOT_SUPPORTED_BY_PROTOCOL_VERSION",e.EraNegotiationFailed="ERA_NEGOTIATION_FAILED",e.ClientHttpNotImplemented="CLIENT_HTTP_NOT_IMPLEMENTED",e.ClientHttpAuthentication="CLIENT_HTTP_AUTHENTICATION",e.ClientHttpForbidden="CLIENT_HTTP_FORBIDDEN",e.ClientHttpUnexpectedContent="CLIENT_HTTP_UNEXPECTED_CONTENT",e.ClientHttpFailedToOpenStream="CLIENT_HTTP_FAILED_TO_OPEN_STREAM",e.ClientHttpFailedToTerminateSession="CLIENT_HTTP_FAILED_TO_TERMINATE_SESSION",e}({}),re=class extends Error{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.SdkError"})}static[Symbol.hasInstance](e){return No(this,e)}static isInstance(e){if(typeof this!=="function")throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return No(this,e)}constructor(e,t,n){super(t);this.code=e,this.data=n,this.name="SdkError",S_(this,new.target)}},zP=class extends re{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.SdkHttpError"})}constructor(e,t,n){super(e,t,n);this.name="SdkHttpError"}get status(){return this.data.status}get statusText(){return this.data.statusText}};function n$(e){return e!==null&&typeof e==="object"&&!Array.isArray(e)}function wP(e,t,n){return e==="elicitation"&&t==="form"&&n.form===void 0&&n.url===void 0}function h$(e){switch(e.method){case"elicitation/create":if(e.params?.mode==="url")return{elicitation:{url:{}}};return{elicitation:{form:{}}};case"sampling/createMessage":{let t=e.params;if(t!==void 0&&(t.tools!==void 0||t.toolChoice!==void 0))return{sampling:{tools:{}}};return{sampling:{}}}case"roots/list":return{roots:{}};default:return}}function rd(e,t){let n={};for(let[o,r]of Object.entries(e)){if(r===void 0)continue;let i=t===void 0?void 0:t[o];if(i===void 0){n[o]=r;continue}if(n$(r)&&n$(i)){let a={};for(let[s,c]of Object.entries(r))if(c!==void 0&&i[s]===void 0&&!wP(o,s,i))a[s]=c;if(Object.keys(a).length>0)n[o]=a}}return Object.keys(n).length>0?n:void 0}var RP="2026-07-28";function Aa(e){return e>=RP}function g$(e){return e.filter((t)=>!Aa(t))}function y_(e){return e.filter((t)=>Aa(t))}function v$(e){let t=e.structuredContent;if(t===void 0)return e;if(!(typeof t!=="object"||t===null||Array.isArray(t)))return e;if(e.content?.some((n)=>n.type==="text")??!1)return e;return{...e,content:[...e.content??[],{type:"text",text:JSON.stringify(t)}]}}var _$=["task","inputRequests","requestState"];function b_(e){if(e===null||typeof e!=="object"||Array.isArray(e)||e.content!==void 0||_$.some((t)=>(t in e)))return e;return{...e,content:[]}}function xP(){let e=jr(()=>q([u(),x(),N(),Bt(),T(u(),e),S(e)])),t=T(u(),e),n=q([u(),x().int()]),o=u(),r=h({ttl:x().optional()}),i=h({taskId:u()}),a=H({progressToken:n.optional(),"io.modelcontextprotocol/related-task":i.optional()}),s=h({_meta:a.optional()}),c=s.extend({task:r.optional()}),l=h({method:u(),params:s.loose().optional()}),d=h({_meta:a.optional()}),m=h({method:u(),params:d.loose().optional()}),p=H({_meta:a.optional()}),f=q([u(),x().int()]),v=p.strict(),g=d.extend({requestId:f.optional(),reason:u().optional()}),b=m.extend({method:y("notifications/cancelled"),params:g}),R=h({src:u(),mimeType:u().optional(),sizes:S(u()).optional(),theme:X(["light","dark"]).optional()}),L=h({icons:S(R).optional()}),P=h({name:u(),title:u().optional()}),D=P.extend({...P.shape,...L.shape,version:u(),websiteUrl:u().optional(),description:u().optional()}),E=It(h({applyDefaults:N().optional()}),t),ne=ir((qe)=>{if(qe&&typeof qe==="object"&&!Array.isArray(qe)&&Object.keys(qe).length===0)return{form:{}};return qe},It(h({form:E.optional(),url:t.optional()}),t.optional())),ue=H({list:t.optional(),cancel:t.optional(),requests:H({sampling:H({createMessage:t.optional()}).optional(),elicitation:H({create:t.optional()}).optional()}).optional()}),Oe=H({list:t.optional(),cancel:t.optional(),requests:H({tools:H({call:t.optional()}).optional()}).optional()}),Se=h({experimental:T(u(),t).optional(),sampling:h({context:t.optional(),tools:t.optional()}).optional(),elicitation:ne.optional(),roots:h({listChanged:N().optional()}).optional(),tasks:ue.optional(),extensions:T(u(),t).optional()}),Ie=s.extend({protocolVersion:u(),capabilities:Se,clientInfo:D}),Le=l.extend({method:y("initialize"),params:Ie}),zt=h({experimental:T(u(),t).optional(),logging:t.optional(),completions:t.optional(),prompts:h({listChanged:N().optional()}).optional(),resources:h({subscribe:N().optional(),listChanged:N().optional()}).optional(),tools:h({listChanged:N().optional()}).optional(),tasks:Oe.optional(),extensions:T(u(),t).optional()}),wt=p.extend({protocolVersion:u(),capabilities:zt,serverInfo:D,instructions:u().optional()}),ft=m.extend({method:y("notifications/initialized"),params:d.optional()}),ht=l.extend({method:y("ping"),params:s.optional()}),Ct=h({progress:x(),total:F(x()),message:F(u())}),Ye=h({...d.shape,...Ct.shape,progressToken:n}),gt=m.extend({method:y("notifications/progress"),params:Ye}),qt=s.extend({cursor:o.optional()}),ct=l.extend({params:qt.optional()}),Ze=p.extend({nextCursor:o.optional()}),Qt=h({uri:u(),mimeType:F(u()),_meta:T(u(),V()).optional()}),er=Qt.extend({text:u()}),At=u().refine((qe)=>{try{return atob(qe),!0}catch{return!1}},{message:"Invalid Base64 string"}),Ne=Qt.extend({blob:At}),Ve=X(["user","assistant"]),Fe=h({audience:S(Ve).optional(),priority:x().min(0).max(1).optional(),lastModified:gn({offset:!0}).optional()}),Rt=h({...P.shape,...L.shape,uri:u(),description:F(u()),mimeType:F(u()),size:F(x()),annotations:Fe.optional(),_meta:F(H({}))}),Br=h({...P.shape,...L.shape,uriTemplate:u(),description:F(u()),mimeType:F(u()),annotations:Fe.optional(),_meta:F(H({}))}),lt=ct.extend({method:y("resources/list")}),ut=Ze.extend({resources:S(Rt)}),Xe=ct.extend({method:y("resources/templates/list")}),vt=Ze.extend({resourceTemplates:S(Br)}),_t=s.extend({uri:u()}),Mt=_t,Ut=l.extend({method:y("resources/read"),params:Mt}),gr=p.extend({contents:S(q([er,Ne]))}),Dt=m.extend({method:y("notifications/resources/list_changed"),params:d.optional()}),Wr=_t,A=l.extend({method:y("resources/subscribe"),params:Wr}),Lt=_t,B=l.extend({method:y("resources/unsubscribe"),params:Lt}),Z=d.extend({uri:u()}),te=m.extend({method:y("notifications/resources/updated"),params:Z}),M=h({name:u(),description:F(u()),required:F(N())}),O=h({...P.shape,...L.shape,description:F(u()),arguments:F(S(M)),_meta:F(H({}))}),Y=ct.extend({method:y("prompts/list")}),W=Ze.extend({prompts:S(O)}),ke=s.extend({name:u(),arguments:T(u(),u()).optional()}),Yr=l.extend({method:y("prompts/get"),params:ke}),Zt=h({type:y("text"),text:u(),annotations:Fe.optional(),_meta:T(u(),V()).optional()}),Xr=h({type:y("image"),data:At,mimeType:u(),annotations:Fe.optional(),_meta:T(u(),V()).optional()}),Qr=h({type:y("audio"),data:At,mimeType:u(),annotations:Fe.optional(),_meta:T(u(),V()).optional()}),Wo=h({type:y("tool_use"),name:u(),id:u(),input:T(u(),V()),_meta:T(u(),V()).optional()}),vr=h({type:y("resource"),resource:q([er,Ne]),annotations:Fe.optional(),_meta:T(u(),V()).optional()}),Yo=Rt.extend({type:y("resource_link")}),St=q([Zt,Xr,Qr,Yo,vr]),jn=h({role:Ve,content:St}),On=p.extend({description:u().optional(),messages:S(jn)}),en=m.extend({method:y("notifications/prompts/list_changed"),params:d.optional()}),Xo=h({title:u().optional(),readOnlyHint:N().optional(),destructiveHint:N().optional(),idempotentHint:N().optional(),openWorldHint:N().optional()}),Nn=h({taskSupport:X(["required","optional","forbidden"]).optional()}),tn=h({...P.shape,...L.shape,description:u().optional(),inputSchema:h({type:y("object"),properties:T(u(),e).optional(),required:S(u()).optional()}).catchall(V()),outputSchema:h({type:y("object"),properties:T(u(),e).optional(),required:S(u()).optional()}).catchall(V()).optional(),annotations:Xo.optional(),execution:Nn.optional(),_meta:T(u(),V()).optional()}),Cn=ct.extend({method:y("tools/list")}),qn=Ze.extend({tools:S(tn)}),An=p.extend({content:S(St),structuredContent:T(u(),V()).optional(),isError:N().optional()}),Ce=c.extend({name:u(),arguments:T(u(),V()).optional()}),Qo=l.extend({method:y("tools/call"),params:Ce}),us=m.extend({method:y("notifications/tools/list_changed"),params:d.optional()}),Mn=X(["debug","info","notice","warning","error","critical","alert","emergency"]),ei=s.extend({level:Mn}),ti=l.extend({method:y("logging/setLevel"),params:ei}),ri=d.extend({level:Mn,logger:u().optional(),data:V()}),ni=m.extend({method:y("notifications/message"),params:ri}),oi=h({name:u().optional()}),ii=h({hints:S(oi).optional(),costPriority:x().min(0).max(1).optional(),speedPriority:x().min(0).max(1).optional(),intelligencePriority:x().min(0).max(1).optional()}),ai=h({mode:X(["auto","required","none"]).optional()}),ds=h({type:y("tool_result"),toolUseId:u().describe("The unique identifier for the corresponding tool call."),content:S(St),structuredContent:h({}).loose().optional(),isError:N().optional(),_meta:T(u(),V()).optional()}),si=Tr("type",[Zt,Xr,Qr]),_r=Tr("type",[Zt,Xr,Qr,Wo,ds]),ci=h({role:Ve,content:q([_r,S(_r)]),_meta:T(u(),V()).optional()}),li=c.extend({messages:S(ci),modelPreferences:ii.optional(),systemPrompt:u().optional(),includeContext:X(["none","thisServer","allServers"]).optional(),temperature:x().optional(),maxTokens:x().int(),stopSequences:S(u()).optional(),metadata:t.optional(),tools:S(tn).optional(),toolChoice:ai.optional()}),ui=l.extend({method:y("sampling/createMessage"),params:li}),di=p.extend({model:u(),stopReason:F(X(["endTurn","stopSequence","maxTokens"]).or(u())),role:Ve,content:si}),mi=p.extend({model:u(),stopReason:F(X(["endTurn","stopSequence","maxTokens","toolUse"]).or(u())),role:Ve,content:q([_r,S(_r)])}),pi=h({type:y("boolean"),title:u().optional(),description:u().optional(),default:N().optional()}),fi=h({type:y("string"),title:u().optional(),description:u().optional(),minLength:x().optional(),maxLength:x().optional(),format:X(["email","uri","date","date-time"]).optional(),default:u().optional()}),hi=h({type:X(["number","integer"]),title:u().optional(),description:u().optional(),minimum:x().optional(),maximum:x().optional(),default:x().optional()}),gi=h({type:y("string"),title:u().optional(),description:u().optional(),enum:S(u()),default:u().optional()}),vi=h({type:y("string"),title:u().optional(),description:u().optional(),oneOf:S(h({const:u(),title:u()})),default:u().optional()}),_i=h({type:y("string"),title:u().optional(),description:u().optional(),enum:S(u()),enumNames:S(u()).optional(),default:u().optional()}),Si=q([gi,vi]),rn=h({type:y("array"),title:u().optional(),description:u().optional(),minItems:x().optional(),maxItems:x().optional(),items:h({type:y("string"),enum:S(u())}),default:S(u()).optional()}),nn=h({type:y("array"),title:u().optional(),description:u().optional(),minItems:x().optional(),maxItems:x().optional(),items:h({anyOf:S(h({const:u(),title:u()}))}),default:S(u()).optional()}),ms=q([rn,nn]),ps=q([_i,Si,ms]),dt=q([ps,pi,fi,hi]),mt=c.extend({mode:y("form").optional(),message:u(),requestedSchema:h({type:y("object"),properties:T(u(),dt),required:S(u()).optional()}).catchall(V())}),yi=c.extend({mode:y("url"),message:u(),elicitationId:u(),url:u().url()}),xt=q([mt,yi]),fs=l.extend({method:y("elicitation/create"),params:xt}),hs=d.extend({elicitationId:u()}),gs=m.extend({method:y("notifications/elicitation/complete"),params:hs}),vs=p.extend({action:X(["accept","decline","cancel"]),content:ir((qe)=>qe===null?void 0:qe,T(u(),q([u(),x(),N(),S(u())])).optional())}),_s=h({type:y("ref/resource"),uri:u()}),Ss=h({type:y("ref/prompt"),name:u()}),ys=s.extend({ref:q([Ss,_s]),argument:h({name:u(),value:u()}),context:h({arguments:T(u(),u()).optional()}).optional()}),bi=l.extend({method:y("completion/complete"),params:ys}),bs=p.extend({completion:H({values:S(u()).max(100),total:F(x().int()),hasMore:F(N())})}),$s=h({uri:u().startsWith("file://"),name:u().optional(),_meta:T(u(),V()).optional()}),Un=l.extend({method:y("roots/list"),params:s.optional()}),$i=p.extend({roots:S($s)}),zs=m.extend({method:y("notifications/roots/list_changed"),params:d.optional()}),ws=H({ttl:x().optional(),pollInterval:x().optional()}),Rs=X(["working","input_required","completed","failed","cancelled"]),Sr=h({taskId:u(),status:Rs,ttl:q([x(),Bt()]),createdAt:u(),lastUpdatedAt:u(),pollInterval:F(x()),statusMessage:F(u())}),Qe=p.extend({task:Sr}),xs=d.merge(Sr),on=m.extend({method:y("notifications/tasks/status"),params:xs}),Dn=l.extend({method:y("tasks/get"),params:s.extend({taskId:u()})}),Ln=p.merge(Sr),Zn=l.extend({method:y("tasks/result"),params:s.extend({taskId:u()})}),Jd=p.loose(),et=ct.extend({method:y("tasks/list")}),Re=Ze.extend({tasks:S(Sr)}),an=l.extend({method:y("tasks/cancel"),params:s.extend({taskId:u()})});return{JSONValueSchema:e,JSONObjectSchema:t,ProgressTokenSchema:n,CursorSchema:o,TaskMetadataSchema:r,RelatedTaskMetadataSchema:i,RequestMetaSchema:a,BaseRequestParamsSchema:s,TaskAugmentedRequestParamsSchema:c,RequestSchema:l,NotificationsParamsSchema:d,NotificationSchema:m,ResultSchema:p,RequestIdSchema:f,EmptyResultSchema:v,CancelledNotificationParamsSchema:g,CancelledNotificationSchema:b,IconSchema:R,IconsSchema:L,BaseMetadataSchema:P,ImplementationSchema:D,ClientTasksCapabilitySchema:ue,ServerTasksCapabilitySchema:Oe,ClientCapabilitiesSchema:Se,InitializeRequestParamsSchema:Ie,InitializeRequestSchema:Le,ServerCapabilitiesSchema:zt,InitializeResultSchema:wt,InitializedNotificationSchema:ft,PingRequestSchema:ht,ProgressSchema:Ct,ProgressNotificationParamsSchema:Ye,ProgressNotificationSchema:gt,PaginatedRequestParamsSchema:qt,PaginatedRequestSchema:ct,PaginatedResultSchema:Ze,ResourceContentsSchema:Qt,TextResourceContentsSchema:er,BlobResourceContentsSchema:Ne,RoleSchema:Ve,AnnotationsSchema:Fe,ResourceSchema:Rt,ResourceTemplateSchema:Br,ListResourcesRequestSchema:lt,ListResourcesResultSchema:ut,ListResourceTemplatesRequestSchema:Xe,ListResourceTemplatesResultSchema:vt,ResourceRequestParamsSchema:_t,ReadResourceRequestParamsSchema:Mt,ReadResourceRequestSchema:Ut,ReadResourceResultSchema:gr,ResourceListChangedNotificationSchema:Dt,SubscribeRequestParamsSchema:Wr,SubscribeRequestSchema:A,UnsubscribeRequestParamsSchema:Lt,UnsubscribeRequestSchema:B,ResourceUpdatedNotificationParamsSchema:Z,ResourceUpdatedNotificationSchema:te,PromptArgumentSchema:M,PromptSchema:O,ListPromptsRequestSchema:Y,ListPromptsResultSchema:W,GetPromptRequestParamsSchema:ke,GetPromptRequestSchema:Yr,TextContentSchema:Zt,ImageContentSchema:Xr,AudioContentSchema:Qr,ToolUseContentSchema:Wo,EmbeddedResourceSchema:vr,ResourceLinkSchema:Yo,ContentBlockSchema:St,PromptMessageSchema:jn,GetPromptResultSchema:On,PromptListChangedNotificationSchema:en,ToolAnnotationsSchema:Xo,ToolExecutionSchema:Nn,ToolSchema:tn,ListToolsRequestSchema:Cn,ListToolsResultSchema:qn,CallToolResultSchema:An,CallToolRequestParamsSchema:Ce,CallToolRequestSchema:Qo,ToolListChangedNotificationSchema:us,LoggingLevelSchema:Mn,SetLevelRequestParamsSchema:ei,SetLevelRequestSchema:ti,LoggingMessageNotificationParamsSchema:ri,LoggingMessageNotificationSchema:ni,ModelHintSchema:oi,ModelPreferencesSchema:ii,ToolChoiceSchema:ai,ToolResultContentSchema:ds,SamplingContentSchema:si,SamplingMessageContentBlockSchema:_r,SamplingMessageSchema:ci,CreateMessageRequestParamsSchema:li,CreateMessageRequestSchema:ui,CreateMessageResultSchema:di,CreateMessageResultWithToolsSchema:mi,BooleanSchemaSchema:pi,StringSchemaSchema:fi,NumberSchemaSchema:hi,UntitledSingleSelectEnumSchemaSchema:gi,TitledSingleSelectEnumSchemaSchema:vi,LegacyTitledEnumSchemaSchema:_i,SingleSelectEnumSchemaSchema:Si,UntitledMultiSelectEnumSchemaSchema:rn,TitledMultiSelectEnumSchemaSchema:nn,MultiSelectEnumSchemaSchema:ms,EnumSchemaSchema:ps,PrimitiveSchemaDefinitionSchema:dt,ElicitRequestFormParamsSchema:mt,ElicitRequestURLParamsSchema:yi,ElicitRequestParamsSchema:xt,ElicitRequestSchema:fs,ElicitationCompleteNotificationParamsSchema:hs,ElicitationCompleteNotificationSchema:gs,ElicitResultSchema:vs,ResourceTemplateReferenceSchema:_s,PromptReferenceSchema:Ss,CompleteRequestParamsSchema:ys,CompleteRequestSchema:bi,CompleteResultSchema:bs,RootSchema:$s,ListRootsRequestSchema:Un,ListRootsResultSchema:$i,RootsListChangedNotificationSchema:zs,TaskCreationParamsSchema:ws,TaskStatusSchema:Rs,TaskSchema:Sr,CreateTaskResultSchema:Qe,TaskStatusNotificationParamsSchema:xs,TaskStatusNotificationSchema:on,GetTaskRequestSchema:Dn,GetTaskResultSchema:Ln,GetTaskPayloadRequestSchema:Zn,GetTaskPayloadResultSchema:Jd,ListTasksRequestSchema:et,ListTasksResultSchema:Re,CancelTaskRequestSchema:an,CancelTaskResultSchema:p.merge(Sr),ClientRequestSchema:q([ht,Le,bi,ti,Yr,Y,lt,Xe,Ut,A,B,Qo,Cn,Dn,Zn,et,an]),ClientNotificationSchema:q([b,gt,ft,zs,on]),ClientResultSchema:q([v,di,mi,vs,$i,Ln,Re,Qe]),ServerRequestSchema:q([ht,ui,fs,Un,Dn,Zn,et,an]),ServerNotificationSchema:q([b,gt,ni,te,Dt,us,en,on,gs]),ServerResultSchema:q([v,wt,bs,On,W,ut,vt,gr,An,qn,Ln,Re,Qe]),CallToolResultWireSchema:V().superRefine((qe,zk)=>{if(typeof qe!=="object"||qe===null||Array.isArray(qe)||qe.content!==void 0)return;for(let NS of _$)if(NS in qe){zk.addIssue({code:"custom",message:`content is required when the body carries '${NS}' — another result family cannot default into an empty tools/call success`});return}}).transform(b_).pipe(An)}}var kP;function S$(){return kP??=xP()}function y$(e){return e.type!=="object"}var IP=new Set(["const","enum","default","examples"]),PP=new Set(["properties","patternProperties","$defs","definitions","dependentSchemas","dependencies"]);function o$(e){return e!==void 0&&!(typeof e==="string"&&e.startsWith("#"))}function EP(e){let t=typeof e.$schema==="string"?e.$schema:void 0;if(o$(e.$id))return{...t!==void 0&&{$schema:t},type:"object",properties:{result:e},required:["result"]};let n=DS(e.$schema)&&e.$recursiveAnchor!==!0,o=(r,i)=>{if(Array.isArray(r))return r.map((c)=>o(c,!1));if(r===null||typeof r!=="object")return r;if(!i&&o$(r.$id))return r;let a={},s=!1;for(let[c,l]of Object.entries(r))if(i)a[c]=o(l,!1);else if((c==="$ref"||c==="$dynamicRef")&&typeof l==="string")a[c]=l==="#"?"#/properties/result":l.startsWith("#/")?`#/properties/result${l.slice(1)}`:l;else if(c==="$recursiveRef"&&l==="#"&&n)s=!0;else if(IP.has(c))a[c]=l;else if(PP.has(c))a[c]=o(l,!0);else a[c]=o(l,!1);if(s)if("$ref"in a)a.allOf=[...Array.isArray(a.allOf)?a.allOf:[],{$ref:"#/properties/result"}];else a.$ref="#/properties/result";return a};return{...t!==void 0&&{$schema:t},type:"object",properties:{result:o(e,!1)},required:["result"]}}var b$={ping:null,initialize:null,"completion/complete":null,"logging/setLevel":null,"prompts/get":null,"prompts/list":null,"resources/list":null,"resources/templates/list":null,"resources/read":null,"resources/subscribe":null,"resources/unsubscribe":null,"tools/call":null,"tools/list":null,"tasks/get":null,"tasks/result":null,"tasks/list":null,"tasks/cancel":null,"sampling/createMessage":null,"elicitation/create":null,"roots/list":null},$$={"notifications/cancelled":null,"notifications/progress":null,"notifications/initialized":null,"notifications/roots/list_changed":null,"notifications/tasks/status":null,"notifications/message":null,"notifications/resources/updated":null,"notifications/resources/list_changed":null,"notifications/tools/list_changed":null,"notifications/prompts/list_changed":null,"notifications/elicitation/complete":null},TP={ping:null,initialize:null,"completion/complete":null,"logging/setLevel":null,"prompts/get":null,"prompts/list":null,"resources/list":null,"resources/templates/list":null,"resources/read":null,"resources/subscribe":null,"resources/unsubscribe":null,"tools/call":null,"tools/list":null,"sampling/createMessage":null,"elicitation/create":null,"roots/list":null},Wu;function $_(){if(Wu)return Wu;let e=S$();return Wu={requestSchemas:{ping:e.PingRequestSchema,initialize:e.InitializeRequestSchema,"completion/complete":e.CompleteRequestSchema,"logging/setLevel":e.SetLevelRequestSchema,"prompts/get":e.GetPromptRequestSchema,"prompts/list":e.ListPromptsRequestSchema,"resources/list":e.ListResourcesRequestSchema,"resources/templates/list":e.ListResourceTemplatesRequestSchema,"resources/read":e.ReadResourceRequestSchema,"resources/subscribe":e.SubscribeRequestSchema,"resources/unsubscribe":e.UnsubscribeRequestSchema,"tools/call":e.CallToolRequestSchema,"tools/list":e.ListToolsRequestSchema,"tasks/get":e.GetTaskRequestSchema,"tasks/result":e.GetTaskPayloadRequestSchema,"tasks/list":e.ListTasksRequestSchema,"tasks/cancel":e.CancelTaskRequestSchema,"sampling/createMessage":e.CreateMessageRequestSchema,"elicitation/create":e.ElicitRequestSchema,"roots/list":e.ListRootsRequestSchema},notificationSchemas:{"notifications/cancelled":e.CancelledNotificationSchema,"notifications/progress":e.ProgressNotificationSchema,"notifications/initialized":e.InitializedNotificationSchema,"notifications/roots/list_changed":e.RootsListChangedNotificationSchema,"notifications/tasks/status":e.TaskStatusNotificationSchema,"notifications/message":e.LoggingMessageNotificationSchema,"notifications/resources/updated":e.ResourceUpdatedNotificationSchema,"notifications/resources/list_changed":e.ResourceListChangedNotificationSchema,"notifications/tools/list_changed":e.ToolListChangedNotificationSchema,"notifications/prompts/list_changed":e.PromptListChangedNotificationSchema,"notifications/elicitation/complete":e.ElicitationCompleteNotificationSchema},resultSchemas:{ping:e.EmptyResultSchema,initialize:e.InitializeResultSchema,"completion/complete":e.CompleteResultSchema,"logging/setLevel":e.EmptyResultSchema,"prompts/get":e.GetPromptResultSchema,"prompts/list":e.ListPromptsResultSchema,"resources/list":e.ListResourcesResultSchema,"resources/templates/list":e.ListResourceTemplatesResultSchema,"resources/read":e.ReadResourceResultSchema,"resources/subscribe":e.EmptyResultSchema,"resources/unsubscribe":e.EmptyResultSchema,"tools/call":e.CallToolResultWireSchema,"tools/list":e.ListToolsResultSchema,"sampling/createMessage":e.CreateMessageResultWithToolsSchema,"elicitation/create":e.ElicitResultSchema,"roots/list":e.ListRootsResultSchema}},Wu}function z$(e){return Object.prototype.hasOwnProperty.call(b$,e)}function w$(e){return Object.prototype.hasOwnProperty.call($$,e)}function jP(e){return Object.prototype.hasOwnProperty.call(TP,e)}function OP(e){return jP(e)?$_().resultSchemas[e]:void 0}function NP(e){return z$(e)?$_().requestSchemas[e]:void 0}function CP(e){return w$(e)?$_().notificationSchemas[e]:void 0}var TD=Object.keys(b$),jD=Object.keys($$);function g_(e){return e!==null&&typeof e==="object"&&!Array.isArray(e)}function Yu(e,t){if(e===void 0)return{ok:!1,reason:"not-in-era"};let n=e.safeParse(t);return n.success?{ok:!0,value:n.data}:{ok:!1,reason:"invalid",message:String(n.error)}}var i$={ok:!1,reason:"not-in-era"};function a$(e){return g_(e)&&g_(e.outputSchema)&&y$(e.outputSchema)}function s$(e){return e}var z_={era:"2025-11-25",hasRequestMethod:z$,hasNotificationMethod:w$,validateRequest:(e,t)=>Yu(NP(e),t),validateResult:(e,t)=>Yu(OP(e),t),validateNotification:(e,t)=>Yu(CP(e),t),hasInputRequestMethod:()=>!1,validateInputRequest:()=>i$,validateInputResponse:()=>i$,samplingResultVariant:(e,t)=>{let n=S$();return Yu(e?n.CreateMessageResultWithToolsSchema:n.CreateMessageResultSchema,t)},outboundEnvelope:(e)=>{return},validateEnvelopeMeta:(e)=>[],projectCallToolResult(e,t){let n=v$(e),o=n.structuredContent;if(o===void 0)return n;let r=typeof o!=="object"||o===null||Array.isArray(o),i=t!==void 0&&y$(t);if(!r&&!i)return n;return{...n,structuredContent:{result:o}}},decodeResult(e,t){if(g_(t)&&"resultType"in t){let n={...t};return delete n.resultType,{kind:"complete",result:s$(n)}}return{kind:"complete",result:s$(t)}},encodeResult(e,t){if(e!=="tools/list")return t;let n=t.tools;if(!Array.isArray(n)||!n.some((o)=>a$(o)))return t;return{...t,tools:n.map((o)=>a$(o)?{...o,outputSchema:EP(o.outputSchema)}:o)}},encodeErrorCode:(e)=>e===-32002?-32602:e,checkInboundEnvelope:(e)=>{return}};function qP(){let e=jr(()=>q([u(),x(),N(),Bt(),T(u(),e),S(e)])),t=T(u(),e),n=q([u(),x().int()]),o=u(),r=q([u(),x().int()]),i=X(["user","assistant"]),a=X(["debug","info","notice","warning","error","critical","alert","emergency"]),s=u().refine((Re)=>{try{return atob(Re),!0}catch{return!1}},{message:"Invalid Base64 string"}),c=h({ttl:x().optional()}),l=h({taskId:u()}),d=H({progressToken:n.optional(),"io.modelcontextprotocol/related-task":l.optional()}),m=h({_meta:d.optional()}),p=m.extend({task:c.optional()}),f=h({_meta:d.optional()}),v=h({method:u(),params:f.loose().optional()}),g=h({src:u(),mimeType:u().optional(),sizes:S(u()).optional(),theme:X(["light","dark"]).optional()}),b=h({icons:S(g).optional()}),R=h({name:u(),title:u().optional()}),L=R.extend({...R.shape,...b.shape,version:u(),websiteUrl:u().optional(),description:u().optional()}),P=It(h({applyDefaults:N().optional()}),t),D=ir((Re)=>{if(Re&&typeof Re==="object"&&!Array.isArray(Re)&&Object.keys(Re).length===0)return{form:{}};return Re},It(h({form:P.optional(),url:t.optional()}),t.optional())),E=H({list:t.optional(),cancel:t.optional(),requests:H({sampling:H({createMessage:t.optional()}).optional(),elicitation:H({create:t.optional()}).optional()}).optional()}),ne=H({list:t.optional(),cancel:t.optional(),requests:H({tools:H({call:t.optional()}).optional()}).optional()}),ue=h({experimental:T(u(),t).optional(),sampling:h({context:t.optional(),tools:t.optional()}).optional(),elicitation:D.optional(),roots:h({listChanged:N().optional()}).optional(),tasks:E.optional(),extensions:T(u(),t).optional()}),Oe=h({experimental:T(u(),t).optional(),logging:t.optional(),completions:t.optional(),prompts:h({listChanged:N().optional()}).optional(),resources:h({subscribe:N().optional(),listChanged:N().optional()}).optional(),tools:h({listChanged:N().optional()}).optional(),tasks:ne.optional(),extensions:T(u(),t).optional()}),Se=h({progress:x(),total:F(x()),message:F(u())}),Ie=h({...f.shape,...Se.shape,progressToken:n}),Le=v.extend({method:y("notifications/progress"),params:Ie}),zt=f.extend({level:a,logger:u().optional(),data:V()}),wt=v.extend({method:y("notifications/message"),params:zt}),ft=h({uri:u(),mimeType:F(u()),_meta:T(u(),V()).optional()}),ht=ft.extend({text:u()}),Ct=ft.extend({blob:s}),Ye=h({audience:S(i).optional(),priority:x().min(0).max(1).optional(),lastModified:gn({offset:!0}).optional()}),gt=h({...R.shape,...b.shape,uri:u(),description:F(u()),mimeType:F(u()),size:F(x()),annotations:Ye.optional(),_meta:F(H({}))}),qt=h({...R.shape,...b.shape,uriTemplate:u(),description:F(u()),mimeType:F(u()),annotations:Ye.optional(),_meta:F(H({}))}),ct=v.extend({method:y("notifications/resources/list_changed"),params:f.optional()}),Ze=f.extend({uri:u()}),Qt=v.extend({method:y("notifications/resources/updated"),params:Ze}),er=h({name:u(),description:F(u()),required:F(N())}),At=h({...R.shape,...b.shape,description:F(u()),arguments:F(S(er)),_meta:F(H({}))}),Ne=v.extend({method:y("notifications/prompts/list_changed"),params:f.optional()}),Ve=h({type:y("text"),text:u(),annotations:Ye.optional(),_meta:T(u(),V()).optional()}),Fe=h({type:y("image"),data:s,mimeType:u(),annotations:Ye.optional(),_meta:T(u(),V()).optional()}),Rt=h({type:y("audio"),data:s,mimeType:u(),annotations:Ye.optional(),_meta:T(u(),V()).optional()}),Br=h({type:y("tool_use"),name:u(),id:u(),input:T(u(),V()),_meta:T(u(),V()).optional()}),lt=h({type:y("resource"),resource:q([ht,Ct]),annotations:Ye.optional(),_meta:T(u(),V()).optional()}),ut=gt.extend({type:y("resource_link")}),Xe=q([Ve,Fe,Rt,ut,lt]),vt=h({role:i,content:Xe}),_t=h({title:u().optional(),readOnlyHint:N().optional(),destructiveHint:N().optional(),idempotentHint:N().optional(),openWorldHint:N().optional()}),Mt=v.extend({method:y("notifications/tools/list_changed"),params:f.optional()}),Ut=h({name:u().optional()}),gr=h({hints:S(Ut).optional(),costPriority:x().min(0).max(1).optional(),speedPriority:x().min(0).max(1).optional(),intelligencePriority:x().min(0).max(1).optional()}),Dt=h({mode:X(["auto","required","none"]).optional()}),Wr=h({type:y("boolean"),title:u().optional(),description:u().optional(),default:N().optional()}),A=h({type:y("string"),title:u().optional(),description:u().optional(),minLength:x().optional(),maxLength:x().optional(),format:X(["email","uri","date","date-time"]).optional(),default:u().optional()}),Lt=h({type:X(["number","integer"]),title:u().optional(),description:u().optional(),minimum:x().optional(),maximum:x().optional(),default:x().optional()}),B=h({type:y("string"),title:u().optional(),description:u().optional(),enum:S(u()),default:u().optional()}),Z=h({type:y("string"),title:u().optional(),description:u().optional(),oneOf:S(h({const:u(),title:u()})),default:u().optional()}),te=h({type:y("string"),title:u().optional(),description:u().optional(),enum:S(u()),enumNames:S(u()).optional(),default:u().optional()}),M=q([B,Z]),O=h({type:y("array"),title:u().optional(),description:u().optional(),minItems:x().optional(),maxItems:x().optional(),items:h({type:y("string"),enum:S(u())}),default:S(u()).optional()}),Y=h({type:y("array"),title:u().optional(),description:u().optional(),minItems:x().optional(),maxItems:x().optional(),items:h({anyOf:S(h({const:u(),title:u()}))}),default:S(u()).optional()}),W=q([O,Y]),ke=q([te,M,W]),Yr=q([ke,Wr,A,Lt]),Zt=p.extend({mode:y("form").optional(),message:u(),requestedSchema:h({type:y("object"),properties:T(u(),Yr),required:S(u()).optional()}).catchall(V())}),Xr=h({type:y("ref/resource"),uri:u()}),Qr=h({type:y("ref/prompt"),name:u()}),Wo=h({uri:u().startsWith("file://"),name:u().optional(),_meta:T(u(),V()).optional()}),vr=ue.shape,Yo=h({experimental:vr.experimental,sampling:vr.sampling,elicitation:vr.elicitation,roots:vr.roots,extensions:vr.extensions}),St=Oe.shape,jn=h({experimental:St.experimental,logging:St.logging,completions:St.completions,prompts:St.prompts,resources:St.resources,tools:St.tools,extensions:St.extensions}),On=H({progressToken:n.optional(),[yn]:u(),[yo]:L.optional(),[cr]:Yo,[Nr]:a.optional()}),en=h({...R.shape,...b.shape,description:u().optional(),inputSchema:H({$schema:u().optional(),type:y("object")}),outputSchema:H({$schema:u().optional()}).optional(),annotations:_t.optional(),_meta:T(u(),V()).optional()}),Xo=h({type:y("tool_result"),toolUseId:u(),content:S(Xe),structuredContent:V().optional(),isError:N().optional(),_meta:T(u(),V()).optional()}),Nn=q([Ve,Fe,Rt,Br,Xo]),tn=h({role:i,content:q([Nn,S(Nn)]),_meta:T(u(),V()).optional()}),Cn=u(),qn=H({[sr]:L.optional().catch(void 0)}),An=qn.optional();function Ce(Re){return H({_meta:An,resultType:Cn.default("complete"),...Re})}let Qo=Ce({}),us=Ce({nextCursor:o.optional()}),Mn=Ce({content:S(Xe),structuredContent:V().optional(),isError:N().optional()}),ei=Ce({ttlMs:x().int().min(0),cacheScope:X(["public","private"]),tools:S(en),nextCursor:o.optional()}),ti=Ce({ttlMs:x().int().min(0),cacheScope:X(["public","private"]),prompts:S(At),nextCursor:o.optional()}),ri=Ce({description:u().optional(),messages:S(vt)}),ni=Ce({ttlMs:x().int().min(0),cacheScope:X(["public","private"]),resources:S(gt),nextCursor:o.optional()}),oi=Ce({ttlMs:x().int().min(0),cacheScope:X(["public","private"]),resourceTemplates:S(qt),nextCursor:o.optional()}),ii=Ce({ttlMs:x().int().min(0),cacheScope:X(["public","private"]),contents:S(q([ht,Ct]))}),ai=Ce({completion:h({values:S(u()).max(100),total:x().int().optional(),hasMore:N().optional()}).loose()}),ds=Ce({ttlMs:x().int().min(0),cacheScope:X(["public","private"])}),si=Ce({ttlMs:x().int().min(0).catch(0),cacheScope:X(["public","private"]).catch("private"),supportedVersions:S(u()),capabilities:jn,instructions:u().optional()}),_r=h({messages:S(tn),modelPreferences:gr.optional(),systemPrompt:u().optional(),includeContext:X(["none","thisServer","allServers"]).optional(),temperature:x().optional(),maxTokens:x().int(),stopSequences:S(u()).optional(),metadata:t.optional(),tools:S(en).optional(),toolChoice:Dt.optional()}),ci=h({method:y("sampling/createMessage"),params:_r}),li=h({method:y("roots/list"),params:h({_meta:T(u(),V()).optional()}).optional()}),ui=h({...tn.shape,model:u(),stopReason:u().optional()}),di=h({roots:S(Wo)}),mi=h({action:X(["accept","decline","cancel"]),content:T(u(),q([u(),x(),N(),S(u())])).optional()}),pi=h({mode:y("url"),message:u(),url:u().url()}),fi=q([Zt,pi]),hi=h({method:y("elicitation/create"),params:fi}),gi=q([ci,li,hi]),vi=q([ui,di,mi]),_i=T(u(),gi),Si=T(u(),vi),rn=Ce({inputRequests:_i.optional(),requestState:u().optional()}),nn={inputResponses:Si.optional(),requestState:u().optional()},ms=h({_meta:On,...nn}),ps=H({progressToken:n.optional()});function dt(Re,an){return h({method:y(Re),params:h({_meta:On,...an})})}function mt(Re,an){return h({method:y(Re),params:h({_meta:ps.optional(),...an}).optional()})}let yi={name:u(),arguments:T(u(),V()).optional(),...nn},xt={cursor:o.optional()},fs=dt("tools/call",yi),hs=dt("tools/list",xt),gs=dt("prompts/list",xt),vs=dt("prompts/get",{name:u(),arguments:T(u(),u()).optional(),...nn}),_s=dt("resources/list",xt),Ss=dt("resources/templates/list",xt),ys=dt("resources/read",{uri:u(),...nn}),bi={ref:q([Qr,Xr]),argument:h({name:u(),value:u()}),context:h({arguments:T(u(),u()).optional()}).optional()},bs=dt("completion/complete",bi),$s=dt("server/discover",{}),Un=h({toolsListChanged:N().optional(),promptsListChanged:N().optional(),resourcesListChanged:N().optional(),resourceSubscriptions:S(u()).optional()}),$i={notifications:Un},zs=dt("subscriptions/listen",$i),ws=qn.extend({"io.modelcontextprotocol/subscriptionId":r}),Rs=H({_meta:ws,resultType:Cn.default("complete")}),Sr={"tools/call":mt("tools/call",yi),"tools/list":mt("tools/list",xt),"prompts/get":mt("prompts/get",{name:u(),arguments:T(u(),u()).optional()}),"prompts/list":mt("prompts/list",xt),"resources/list":mt("resources/list",xt),"resources/templates/list":mt("resources/templates/list",xt),"resources/read":mt("resources/read",{uri:u()}),"completion/complete":mt("completion/complete",bi),"server/discover":mt("server/discover",{}),"subscriptions/listen":mt("subscriptions/listen",$i)};function Qe(Re){return H({_meta:An,...Re})}let xs={"tools/call":Qe({content:S(Xe),structuredContent:V().optional(),isError:N().optional()}),"tools/list":Qe({ttlMs:x().int().min(0),cacheScope:X(["public","private"]),tools:S(en),nextCursor:o.optional()}),"prompts/get":Qe({description:u().optional(),messages:S(vt)}),"prompts/list":Qe({ttlMs:x().int().min(0),cacheScope:X(["public","private"]),prompts:S(At),nextCursor:o.optional()}),"resources/list":Qe({ttlMs:x().int().min(0),cacheScope:X(["public","private"]),resources:S(gt),nextCursor:o.optional()}),"resources/templates/list":Qe({ttlMs:x().int().min(0),cacheScope:X(["public","private"]),resourceTemplates:S(qt),nextCursor:o.optional()}),"resources/read":Qe({ttlMs:x().int().min(0),cacheScope:X(["public","private"]),contents:S(q([ht,Ct]))}),"completion/complete":Qe({completion:h({values:S(u()).max(100),total:x().int().optional(),hasMore:N().optional()}).loose()}),"server/discover":Qe({ttlMs:x().int().min(0).catch(0),cacheScope:X(["public","private"]).catch("private"),supportedVersions:S(u()),capabilities:jn,instructions:u().optional()}),"subscriptions/listen":Qe({})},on=H({"io.modelcontextprotocol/subscriptionId":r.optional()}),Dn=h({method:y("notifications/subscriptions/acknowledged"),params:h({_meta:on.optional(),notifications:Un})}),Ln=h({_meta:on.optional(),requestId:r,reason:u().optional()}),Zn=h({method:y("notifications/cancelled"),params:Ln}),Jd={"notifications/cancelled":Zn,"notifications/progress":Le,"notifications/message":wt,"notifications/resources/updated":Qt,"notifications/resources/list_changed":ct,"notifications/tools/list_changed":Mt,"notifications/prompts/list_changed":Ne,"notifications/subscriptions/acknowledged":Dn},et=(Re)=>h({jsonrpc:y("2.0"),id:q([u(),x().int()]),result:Re}).strict();return{JSONValueSchema:e,JSONObjectSchema:t,ProgressTokenSchema:n,CursorSchema:o,RequestIdSchema:r,RoleSchema:i,LoggingLevelSchema:a,TaskMetadataSchema:c,RelatedTaskMetadataSchema:l,RequestMetaSchema:d,BaseRequestParamsSchema:m,TaskAugmentedRequestParamsSchema:p,NotificationsParamsSchema:f,NotificationSchema:v,IconSchema:g,IconsSchema:b,BaseMetadataSchema:R,ImplementationSchema:L,ClientTasksCapabilitySchema:E,ServerTasksCapabilitySchema:ne,ClientCapabilitiesSchema:ue,ServerCapabilitiesSchema:Oe,ProgressSchema:Se,ProgressNotificationParamsSchema:Ie,ProgressNotificationSchema:Le,LoggingMessageNotificationParamsSchema:zt,LoggingMessageNotificationSchema:wt,ResourceContentsSchema:ft,TextResourceContentsSchema:ht,BlobResourceContentsSchema:Ct,AnnotationsSchema:Ye,ResourceSchema:gt,ResourceTemplateSchema:qt,ResourceListChangedNotificationSchema:ct,ResourceUpdatedNotificationParamsSchema:Ze,ResourceUpdatedNotificationSchema:Qt,PromptArgumentSchema:er,PromptSchema:At,PromptListChangedNotificationSchema:Ne,TextContentSchema:Ve,ImageContentSchema:Fe,AudioContentSchema:Rt,ToolUseContentSchema:Br,EmbeddedResourceSchema:lt,ResourceLinkSchema:ut,ContentBlockSchema:Xe,PromptMessageSchema:vt,ToolAnnotationsSchema:_t,ToolListChangedNotificationSchema:Mt,ModelHintSchema:Ut,ModelPreferencesSchema:gr,ToolChoiceSchema:Dt,BooleanSchemaSchema:Wr,StringSchemaSchema:A,NumberSchemaSchema:Lt,UntitledSingleSelectEnumSchemaSchema:B,TitledSingleSelectEnumSchemaSchema:Z,LegacyTitledEnumSchemaSchema:te,SingleSelectEnumSchemaSchema:M,UntitledMultiSelectEnumSchemaSchema:O,TitledMultiSelectEnumSchemaSchema:Y,MultiSelectEnumSchemaSchema:W,EnumSchemaSchema:ke,PrimitiveSchemaDefinitionSchema:Yr,ElicitRequestFormParamsSchema:Zt,ResourceTemplateReferenceSchema:Xr,PromptReferenceSchema:Qr,RootSchema:Wo,ClientCapabilities2026Schema:Yo,ServerCapabilities2026Schema:jn,RequestMetaEnvelopeSchema:On,ToolSchema:en,ToolResultContentSchema:Xo,SamplingMessageContentBlockSchema:Nn,SamplingMessageSchema:tn,ResultTypeSchema:Cn,ResultMetaSchema:qn,ResultSchema:Qo,PaginatedResultSchema:us,CallToolResultSchema:Mn,ListToolsResultSchema:ei,ListPromptsResultSchema:ti,GetPromptResultSchema:ri,ListResourcesResultSchema:ni,ListResourceTemplatesResultSchema:oi,ReadResourceResultSchema:ii,CompleteResultSchema:ai,CacheableResultSchema:ds,DiscoverResultSchema:si,CreateMessageRequestParamsSchema:_r,CreateMessageRequestSchema:ci,ListRootsRequestSchema:li,CreateMessageResultSchema:ui,ListRootsResultSchema:di,ElicitResultSchema:mi,ElicitRequestURLParamsSchema:pi,ElicitRequestParamsSchema:fi,ElicitRequestSchema:hi,InputRequestSchema:gi,InputResponseSchema:vi,InputRequestsSchema:_i,InputResponsesSchema:Si,InputRequiredResultSchema:rn,InputResponseRequestParamsSchema:ms,CallToolRequestSchema:fs,ListToolsRequestSchema:hs,ListPromptsRequestSchema:gs,GetPromptRequestSchema:vs,ListResourcesRequestSchema:_s,ListResourceTemplatesRequestSchema:Ss,ReadResourceRequestSchema:ys,CompleteRequestSchema:bs,DiscoverRequestSchema:$s,SubscriptionFilterSchema:Un,SubscriptionsListenRequestSchema:zs,SubscriptionsListenResultMetaSchema:ws,SubscriptionsListenResultSchema:Rs,dispatchRequestSchemas:Sr,dispatchResultSchemas:xs,NotificationMetaSchema:on,SubscriptionsAcknowledgedNotificationSchema:Dn,CancelledNotificationParamsSchema:Ln,CancelledNotificationSchema:Zn,notificationSchemas2026:Jd,JSONRPCResultResponseSchema:et(Qo),CallToolResultResponseSchema:et(q([Mn,rn])),ListToolsResultResponseSchema:et(ei),ListPromptsResultResponseSchema:et(ti),GetPromptResultResponseSchema:et(q([ri,rn])),ListResourcesResultResponseSchema:et(ni),ListResourceTemplatesResultResponseSchema:et(oi),ReadResourceResultResponseSchema:et(q([ii,rn])),CompleteResultResponseSchema:et(ai),DiscoverResultResponseSchema:et(si)}}var AP;function wn(){return AP??=qP()}var MP=["tools/list","prompts/list","resources/list","resources/templates/list","resources/read","server/discover"];function UP(e){return MP.includes(e)}var Oo=Symbol("modelcontextprotocol.resultCacheHintFallback");function nd(e,t){if(t===void 0)return e;let n=e[Oo];if(n===void 0)return{...e,[Oo]:t};let o={},r=n.ttlMs??t.ttlMs;if(r!==void 0)o.ttlMs=r;let i=n.cacheScope??t.cacheScope;if(i!==void 0)o.cacheScope=i;return{...e,[Oo]:o}}function DP(e){return e[Oo]}function w_(e){return typeof e==="number"&&Number.isSafeInteger(e)&&e>=0}function R_(e){return e==="public"||e==="private"}function x_(e,t){if(e.ttlMs!==void 0&&!w_(e.ttlMs))throw RangeError(`Invalid cache hint for ${t}: ttlMs must be a non-negative safe integer (got ${String(e.ttlMs)})`);if(e.cacheScope!==void 0&&!R_(e.cacheScope))throw RangeError(`Invalid cache hint for ${t}: cacheScope must be 'public' or 'private' (got ${String(e.cacheScope)})`)}var j=function(e){return e[e.ParseError=-32700]="ParseError",e[e.InvalidRequest=-32600]="InvalidRequest",e[e.MethodNotFound=-32601]="MethodNotFound",e[e.InvalidParams=-32602]="InvalidParams",e[e.InternalError=-32603]="InternalError",e[e.ResourceNotFound=-32002]="ResourceNotFound",e[e.MissingRequiredClientCapability=-32021]="MissingRequiredClientCapability",e[e.UnsupportedProtocolVersion=-32022]="UnsupportedProtocolVersion",e[e.UrlElicitationRequired=-32042]="UrlElicitationRequired",e}({}),G=class e extends Error{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.ProtocolError"})}static[Symbol.hasInstance](t){return No(this,t)}static isInstance(t){if(typeof this!=="function")throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return No(this,t)}constructor(t,n,o){super(n);this.code=t,this.data=o,this.name="ProtocolError",S_(this,new.target)}static fromError(t,n,o){if(t===j.UrlElicitationRequired&&o){let r=o;if(r.elicitations)return new R$(r.elicitations,n)}if(t===j.UnsupportedProtocolVersion&&o){let r=o;if(Array.isArray(r.supported)&&typeof r.requested==="string")return new x$({supported:r.supported,requested:r.requested},n)}if(t===j.InvalidParams||t===j.ResourceNotFound){let r=o;if(typeof r?.uri==="string"&&(t===j.ResourceNotFound||Object.keys(r).length===1))return new od(r.uri,n)}if(t===j.MissingRequiredClientCapability&&o){let r=o;if(r.requiredCapabilities!==null&&typeof r.requiredCapabilities==="object"&&!Array.isArray(r.requiredCapabilities))return new id({requiredCapabilities:r.requiredCapabilities},n)}return new e(t,n,o)}},od=class extends G{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.ResourceNotFoundError"})}constructor(e,t=`Resource not found: ${e}`){super(j.InvalidParams,t,{uri:e})}get uri(){return this.data.uri}},R$=class extends G{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.UrlElicitationRequiredError"})}constructor(e,t=`URL elicitation${e.length>1?"s":""} required`){super(j.UrlElicitationRequired,t,{elicitations:e})}get elicitations(){return this.data?.elicitations??[]}},x$=class extends G{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.UnsupportedProtocolVersionError"})}constructor(e,t=`Unsupported protocol version: ${e.requested}`){super(j.UnsupportedProtocolVersion,t,e)}get supported(){return this.data.supported}get requested(){return this.data.requested}},id=class extends G{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.MissingRequiredClientCapabilityError"})}constructor(e,t=`Missing required client capabilities: ${Object.keys(e.requiredCapabilities).join(", ")}`){super(j.MissingRequiredClientCapability,t,e)}get requiredCapabilities(){return this.data.requiredCapabilities}},LP=0,ZP="private",VP=["tools/call","prompts/get","resources/read"];function FP(e,t){let n=t.resultType;if(n===void 0)return{...t,resultType:"complete"};if(n==="complete")return t;if(VP.includes(e))return t;throw new G(j.InternalError,`Handler for ${e} returned resultType '${String(n)}', but results of ${e} only support 'complete' on protocol revision 2026-07-28`)}function JP(e,t){let n=DP(t);if(t.resultType!=="complete"||!UP(e))return n===void 0?t:WP(t);let o=t,r=w_(o.ttlMs)?o.ttlMs:GP(n),i=R_(o.cacheScope)?o.cacheScope:BP(n),a={...o,ttlMs:r,cacheScope:i};return delete a[Oo],a}function HP(e){return e!==null&&typeof e==="object"&&!Array.isArray(e)}function KP(e,t){if(t===void 0)return e;let n=e._meta;if(n===void 0)return{...e,_meta:{[sr]:t}};if(!HP(n))return e;if(n[sr]!==void 0)return e;return{...e,_meta:{...n,[sr]:t}}}function GP(e){return e!==void 0&&w_(e.ttlMs)?e.ttlMs:LP}function BP(e){return e!==void 0&&R_(e.cacheScope)?e.cacheScope:ZP}function WP(e){let t={...e};return delete t[Oo],t}var YP=["elicitation/create","sampling/createMessage","roots/list"],Xu;function k$(){if(Xu)return Xu;let e=wn();return Xu={request:{"elicitation/create":h({method:y("elicitation/create"),params:e.ElicitRequestParamsSchema}),"sampling/createMessage":h({method:y("sampling/createMessage"),params:e.CreateMessageRequestParamsSchema}),"roots/list":h({method:y("roots/list"),params:H({}).optional()})},response:{"elicitation/create":e.ElicitResultSchema,"sampling/createMessage":e.CreateMessageResultSchema,"roots/list":e.ListRootsResultSchema}},Xu}function I$(e){return YP.includes(e)}function m_(e){return I$(e)?k$().request[e]:void 0}function XP(e){return I$(e)?k$().response[e]:void 0}var k_={"tools/call":null,"tools/list":null,"prompts/get":null,"prompts/list":null,"resources/list":null,"resources/templates/list":null,"resources/read":null,"completion/complete":null,"server/discover":null,"subscriptions/listen":null},P$={"notifications/cancelled":null,"notifications/progress":null,"notifications/message":null,"notifications/resources/updated":null,"notifications/resources/list_changed":null,"notifications/tools/list_changed":null,"notifications/prompts/list_changed":null,"notifications/subscriptions/acknowledged":null};function E$(e){return Object.prototype.hasOwnProperty.call(k_,e)}function T$(e){return Object.prototype.hasOwnProperty.call(P$,e)}function QP(e){return Object.prototype.hasOwnProperty.call(k_,e)}function eE(e){return E$(e)?wn().dispatchRequestSchemas[e]:void 0}function tE(e){return QP(e)?wn().dispatchResultSchemas[e]:void 0}function rE(e){return T$(e)?wn().notificationSchemas2026[e]:void 0}var OD=Object.keys(k_),ND=Object.keys(P$);function Na(e){return e!==null&&typeof e==="object"&&!Array.isArray(e)}function ja(e,t){if(e===void 0)return{ok:!1,reason:"not-in-era"};let n=e.safeParse(t);return n.success?{ok:!0,value:n.data}:{ok:!1,reason:"invalid",message:String(n.error)}}var nE={ok:!1,reason:"not-in-era"},oE=[yn,cr];function iE(e,t){let n=t,o=!1,r=()=>{if(!o)n={...n},o=!0;return n},i=t.tools;if(e==="tools/list"&&Array.isArray(i)&&i.some((s)=>Na(s)&&("execution"in s)))r().tools=i.map((s)=>{if(!Na(s)||!("execution"in s))return s;let c={...s};return delete c.execution,c});let a=t.capabilities;if(Na(a)&&"tasks"in a){let s={...a};delete s.tasks,r().capabilities=s}return n}var I_={era:"2026-07-28",hasRequestMethod:E$,hasNotificationMethod:T$,hasInputRequestMethod:(e)=>m_(e)!==void 0,validateRequest:(e,t)=>ja(eE(e),t),validateResult:(e,t)=>ja(tE(e),t),validateNotification:(e,t)=>ja(rE(e),t),validateInputRequest:(e,t)=>ja(m_(e),t),validateInputResponse:(e,t)=>ja(XP(e),t),samplingResultVariant:()=>nE,outboundEnvelope(e){return{[yn]:e.protocolVersion,[yo]:e.clientInfo,[cr]:e.clientCapabilities,...e.logLevel!==void 0&&{[Nr]:e.logLevel}}},validateEnvelopeMeta(e){let t=[];for(let o of oE)if(!(o in e))t.push({key:o,problem:"missing"});let n=wn().RequestMetaEnvelopeSchema.safeParse(e);if(!n.success)for(let o of n.error.issues){let r=o.path.map(String),i=r.length>0?r.join("."):"_meta";if(r.length===1&&t.some((a)=>a.key===i&&a.problem==="missing"))continue;t.push({key:i,problem:o.message})}return t},projectCallToolResult:(e)=>v$(e),inputRequestSchema:m_,decodeResult(e,t){if(!Na(t))return{kind:"invalid",error:new re(se.InvalidResult,`Invalid result for ${e}: not an object`,{method:e})};let n=t.resultType;if(n===void 0)return{kind:"invalid",error:new re(se.InvalidResult,`Invalid result for ${e}: missing required resultType — servers implementing protocol revision 2026-07-28 MUST include it (the absent-means-complete bridge applies only to earlier-revision servers)`,{method:e,violation:"missing-resultType"})};if(typeof n!=="string")return{kind:"invalid",error:new re(se.InvalidResult,`Invalid result for ${e}: non-string resultType`,{method:e,resultType:n})};if(n==="input_required"){let a=t.inputRequests,s=Na(a)?a:{},c=t.requestState;if(Object.keys(s).length===0&&typeof c!=="string")return{kind:"invalid",error:new re(se.InvalidResult,`Invalid result for ${e}: input_required carries neither inputRequests nor requestState (every input_required result must include at least one of the two)`,{method:e,violation:"input-required-missing-both"})};return{kind:"input_required",inputRequests:s,...typeof c==="string"&&{requestState:c}}}if(n!=="complete")return{kind:"invalid",error:new re(se.UnsupportedResultType,`Unsupported result type '${n}' for ${e}`,{resultType:n,method:e})};let o=aE(),r=Object.hasOwn(o,e)?o[e]:void 0;if(r!==void 0){let a=r.safeParse(t);if(!a.success)return{kind:"invalid",error:new re(se.InvalidResult,`Invalid result for ${e}: ${a.error}`,{method:e})}}let i={...t};return delete i.resultType,{kind:"complete",result:i}},encodeResult(e,t,n){return KP(JP(e,FP(e,iE(e,t))),n)},encodeErrorCode:(e)=>e===-32002?-32602:e,checkInboundEnvelope(e){if(e.envelope===void 0)return"Request is missing the required _meta envelope for protocol revision 2026-07-28 (io.modelcontextprotocol/protocolVersion, io.modelcontextprotocol/clientCapabilities)";let t=wn().RequestMetaEnvelopeSchema.safeParse(e.envelope);if(!t.success)return`Invalid _meta envelope for protocol revision 2026-07-28: ${t.error.issues.map((n)=>n.message).join("; ")}`}},Qu;function aE(){if(Qu)return Qu;let e=wn();return Qu={"tools/call":e.CallToolResultSchema,"tools/list":e.ListToolsResultSchema,"prompts/get":e.GetPromptResultSchema,"prompts/list":e.ListPromptsResultSchema,"resources/list":e.ListResourcesResultSchema,"resources/templates/list":e.ListResourceTemplatesResultSchema,"resources/read":e.ReadResourceResultSchema,"completion/complete":e.CompleteResultSchema,"server/discover":e.DiscoverResultSchema},Qu}var P_="2026-07-28";function Co(e){return e!==void 0&&Aa(e)?I_:z_}function c$(e){if(e.revision!==void 0)return Co(e.revision).era;return e.era==="modern"?I_.era:z_.era}function p_(e){return j$.some((t)=>t.hasRequestMethod(e))}function f_(e){return j$.some((t)=>t.hasNotificationMethod(e))}var j$=[z_,I_];var sE=AS({AnnotationsSchema:()=>lr,AudioContentSchema:()=>Io,BaseMetadataSchema:()=>ar,BaseRequestParamsSchema:()=>Ee,BlobResourceContentsSchema:()=>ya,BooleanSchemaSchema:()=>Ra,CallToolRequestParamsSchema:()=>lu,CallToolRequestSchema:()=>uu,CallToolResultSchema:()=>wa,CancelTaskRequestSchema:()=>Wv,CancelTaskResultSchema:()=>Yv,CancelledNotificationParamsSchema:()=>pl,CancelledNotificationSchema:()=>pa,ClientCapabilitiesSchema:()=>vl,ClientNotificationSchema:()=>Qv,ClientRequestSchema:()=>Xv,ClientResultSchema:()=>e_,ClientTasksCapabilitySchema:()=>hl,CompatibilityCallToolResultSchema:()=>Uv,CompleteRequestParamsSchema:()=>Au,CompleteRequestSchema:()=>Mu,CompleteResultSchema:()=>Uu,ContentBlockSchema:()=>Po,CreateMessageRequestParamsSchema:()=>$u,CreateMessageRequestSchema:()=>zu,CreateMessageResultSchema:()=>wu,CreateMessageResultWithToolsSchema:()=>Ru,CreateTaskResultSchema:()=>Zv,CursorSchema:()=>sa,DiscoverRequestSchema:()=>bl,DiscoverResultSchema:()=>$l,ElicitRequestFormParamsSchema:()=>jo,ElicitRequestParamsSchema:()=>Eu,ElicitRequestSchema:()=>Tu,ElicitRequestURLParamsSchema:()=>Pu,ElicitResultSchema:()=>Nu,ElicitationCompleteNotificationParamsSchema:()=>ju,ElicitationCompleteNotificationSchema:()=>Ou,EmbeddedResourceSchema:()=>eu,EmptyResultSchema:()=>ma,EnumSchemaSchema:()=>Iu,GetPromptRequestParamsSchema:()=>Yl,GetPromptRequestSchema:()=>Xl,GetPromptResultSchema:()=>nu,GetTaskPayloadRequestSchema:()=>Hv,GetTaskPayloadResultSchema:()=>Kv,GetTaskRequestSchema:()=>Fv,GetTaskResultSchema:()=>Jv,IconSchema:()=>fl,IconsSchema:()=>qr,ImageContentSchema:()=>ko,ImplementationSchema:()=>wo,InitializeRequestParamsSchema:()=>_l,InitializeRequestSchema:()=>fa,InitializeResultSchema:()=>Sl,InitializedNotificationSchema:()=>yl,JSONArraySchema:()=>qv,JSONObjectSchema:()=>$e,JSONRPCErrorResponseSchema:()=>$o,JSONRPCMessageSchema:()=>zo,JSONRPCNotificationSchema:()=>da,JSONRPCRequestSchema:()=>ua,JSONRPCResponseSchema:()=>Av,JSONRPCResultResponseSchema:()=>bo,JSONValueSchema:()=>Or,LegacyTitledEnumSchemaSchema:()=>Ia,ListChangedOptionsBaseSchema:()=>Dv,ListPromptsRequestSchema:()=>Bl,ListPromptsResultSchema:()=>Wl,ListResourceTemplatesRequestSchema:()=>Pl,ListResourceTemplatesResultSchema:()=>El,ListResourcesRequestSchema:()=>kl,ListResourcesResultSchema:()=>Il,ListRootsRequestSchema:()=>Lu,ListRootsResultSchema:()=>Zu,ListTasksRequestSchema:()=>Gv,ListTasksResultSchema:()=>Bv,ListToolsRequestSchema:()=>su,ListToolsResultSchema:()=>cu,LoggingLevelSchema:()=>Dr,LoggingMessageNotificationParamsSchema:()=>fu,LoggingMessageNotificationSchema:()=>hu,ModelHintSchema:()=>gu,ModelPreferencesSchema:()=>vu,MultiSelectEnumSchemaSchema:()=>ku,NotificationSchema:()=>Ue,NotificationsParamsSchema:()=>Me,NumberSchemaSchema:()=>To,PaginatedRequestParamsSchema:()=>Rl,PaginatedRequestSchema:()=>Ar,PaginatedResultSchema:()=>Mr,PingRequestSchema:()=>ga,PrimitiveSchemaDefinitionSchema:()=>Ta,ProgressNotificationParamsSchema:()=>wl,ProgressNotificationSchema:()=>va,ProgressSchema:()=>zl,ProgressTokenSchema:()=>aa,PromptArgumentSchema:()=>Kl,PromptListChangedNotificationSchema:()=>ou,PromptMessageSchema:()=>ru,PromptReferenceSchema:()=>qu,PromptSchema:()=>Gl,ReadResourceRequestParamsSchema:()=>Tl,ReadResourceRequestSchema:()=>jl,ReadResourceResultSchema:()=>Ol,RelatedTaskMetadataSchema:()=>ml,RequestIdSchema:()=>Cr,RequestMetaSchema:()=>ca,RequestSchema:()=>ze,ResourceContentsSchema:()=>_a,ResourceLinkSchema:()=>tu,ResourceListChangedNotificationSchema:()=>Nl,ResourceRequestParamsSchema:()=>Ro,ResourceSchema:()=>ba,ResourceTemplateReferenceSchema:()=>Cu,ResourceTemplateSchema:()=>xl,ResourceUpdatedNotificationParamsSchema:()=>Jl,ResourceUpdatedNotificationSchema:()=>Hl,ResultMetaObjectSchema:()=>la,ResultSchema:()=>we,RoleSchema:()=>Ur,RootSchema:()=>Du,RootsListChangedNotificationSchema:()=>Vu,SamplingContentSchema:()=>yu,SamplingMessageContentBlockSchema:()=>_n,SamplingMessageSchema:()=>bu,ServerCapabilitiesSchema:()=>ha,ServerNotificationSchema:()=>r_,ServerRequestSchema:()=>t_,ServerResultSchema:()=>n_,ServerTasksCapabilitySchema:()=>gl,SetLevelRequestParamsSchema:()=>mu,SetLevelRequestSchema:()=>pu,SingleSelectEnumSchemaSchema:()=>xu,StringSchemaSchema:()=>Eo,SubscribeRequestParamsSchema:()=>Cl,SubscribeRequestSchema:()=>ql,SubscriptionFilterSchema:()=>$a,SubscriptionsAcknowledgedNotificationParamsSchema:()=>Ll,SubscriptionsAcknowledgedNotificationSchema:()=>Zl,SubscriptionsListenRequestParamsSchema:()=>Ul,SubscriptionsListenRequestSchema:()=>Dl,SubscriptionsListenResultMetaSchema:()=>Vl,SubscriptionsListenResultSchema:()=>Fl,TaskAugmentedRequestParamsSchema:()=>$n,TaskCreationParamsSchema:()=>Lv,TaskMetadataSchema:()=>dl,TaskSchema:()=>Lr,TaskStatusNotificationParamsSchema:()=>Ju,TaskStatusNotificationSchema:()=>Vv,TaskStatusSchema:()=>Fu,TextContentSchema:()=>xo,TextResourceContentsSchema:()=>Sa,TitledMultiSelectEnumSchemaSchema:()=>Ea,TitledSingleSelectEnumSchemaSchema:()=>ka,ToolAnnotationsSchema:()=>iu,ToolChoiceSchema:()=>_u,ToolExecutionSchema:()=>au,ToolListChangedNotificationSchema:()=>du,ToolResultContentSchema:()=>Su,ToolSchema:()=>za,ToolUseContentSchema:()=>Ql,UnsubscribeRequestParamsSchema:()=>Al,UnsubscribeRequestSchema:()=>Ml,UntitledMultiSelectEnumSchemaSchema:()=>Pa,UntitledSingleSelectEnumSchemaSchema:()=>xa});var Mo=(e)=>ua.safeParse(e).success,O$=(e)=>da.safeParse(e).success,qo=(e)=>bo.safeParse(e).success,Ma=(e)=>$o.safeParse(e).success;var ur=(e)=>typeof e==="object"&&e!==null&&!Array.isArray(e)&&e.resultType==="input_required";var E_=(e)=>fa.safeParse(e).success;function T_(e){if(e.params.ref.type!=="ref/prompt")throw TypeError(`Expected CompleteRequestPrompt, but got ${e.params.ref.type}`)}function j_(e){if(e.params.ref.type!=="ref/resource")throw TypeError(`Expected CompleteRequestResourceTemplate, but got ${e.params.ref.type}`)}var l$="x-mcp-header",cE=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/,lE=new Set(["string","integer","boolean","number"]);function O_(e){let t=[],n=new Map,o=(i,a,s)=>{if(i===null||typeof i!=="object")return;let c=i;if(l$ in c){if(!s||a.length===0)return`${ed(a)}: x-mcp-header is only permitted on properties statically reachable via a chain of 'properties' keys (not under items, additionalProperties, oneOf/anyOf/allOf/not, if/then/else, or $ref)`;let d=c[l$];if(typeof d!=="string"||d.length===0)return`${ed(a)}: x-mcp-header MUST be a non-empty string`;if(!cE.test(d))return`${ed(a)}: x-mcp-header '${d}' is not a valid RFC 9110 token (no spaces, control characters or HTTP delimiters)`;let m=typeof c.type==="string"?c.type:void 0;if(m===void 0||!lE.has(m))return`${ed(a)}: x-mcp-header is only permitted on primitive-typed properties (string, integer, boolean); got ${m??"<none>"}`;let p=d.toLowerCase(),f=n.get(p);if(f!==void 0)return`x-mcp-header '${d}' is not case-insensitively unique (also declared as '${f}')`;n.set(p,d),t.push({path:a,headerName:d,type:m})}let l=c.properties;if(l!==null&&typeof l==="object")for(let[d,m]of Object.entries(l)){let p=o(m,[...a,d],s);if(p!==void 0)return p}for(let d of uE){let m=c[d];if(m===void 0)continue;let p=Array.isArray(m)?m:m!==null&&typeof m==="object"&&dE.has(d)?Object.values(m):[m];for(let f of p){let v=o(f,[...a,`<${d}>`],!1);if(v!==void 0)return v}}},r=o(e,[],!0);return r===void 0?{valid:!0,declarations:t}:{valid:!1,reason:r}}var uE=["items","prefixItems","contains","additionalProperties","unevaluatedProperties","unevaluatedItems","propertyNames","patternProperties","dependentSchemas","oneOf","anyOf","allOf","not","if","then","else","$defs","definitions"],dE=new Set(["patternProperties","dependentSchemas","$defs","definitions"]);function ed(e){return e.length===0?"<root>":e.join(".")}var td=-32020,CD=[{rung:"http-method",order:1,evaluatedAt:"edge",codes:[-32000],conformance:[],rationale:"The modern era is POST-only; GET/DELETE are body-less 2025-era session operations and are method-routed to legacy serving (405 when legacy serving is not configured), before any body is read."},{rung:"jsonrpc-shape",order:2,evaluatedAt:"edge",codes:[j.InvalidRequest],conformance:["server-stateless"],rationale:"The body must be a JSON-RPC request or notification: posted responses and batch arrays containing a modern or invalid element are rejected before classification (element-wise batch rule); all-legacy arrays stay legacy traffic."},{rung:"era-classification",order:3,evaluatedAt:"edge",codes:[td,j.UnsupportedProtocolVersion],conformance:["server-stateless","http-header-validation","http-custom-header-server-validation"],rationale:"Body-primary era classification with the protocol-version header as a cross-check; a header/body disagreement is rejected with -32020 (HeaderMismatch), and an envelope-less request on a modern-only endpoint is answered with the unsupported-protocol-version error naming the supported revisions."},{rung:"envelope",order:4,evaluatedAt:"edge",codes:[j.InvalidParams],conformance:["server-stateless"],rationale:"A present envelope claim with a malformed envelope — and a missing envelope on a request whose protocol-version header names a modern revision — is an invalid-params rejection naming the offending or missing key(s); never a silent fall back to legacy handling. This is the only place an invalid-params rejection maps to HTTP 400."},{rung:"method-registry",order:5,evaluatedAt:"dispatch",codes:[j.MethodNotFound],conformance:["server-stateless"],rationale:"Method existence outranks parameter validity: a method absent from the negotiated revision’s registry (or with no handler installed) answers method-not-found before params or capabilities are looked at."},{rung:"request-params",order:6,evaluatedAt:"dispatch",codes:[j.InvalidParams],conformance:[],rationale:"Per-method params validation; emitted in-band by the dispatch layer (HTTP 200), never via the ladder status table."},{rung:"standard-header-validation",order:7,evaluatedAt:"pre-dispatch",codes:[td],conformance:["http-header-validation"],rationale:"SEP-2243 standard `Mcp-Method` / `Mcp-Name` headers — presence, sentinel decoding, and `Mcp-Name` ↔ body cross-check — are validated by the HTTP entry on a modern-classified request after the supported-revision gate and before dispatch. The classifier’s own header-mismatch cells (protocol-version, `Mcp-Method` mismatch) stay on the edge `era-classification` rung; this rung carries the entry-layer presence/`Mcp-Name` half. Evaluated before the capability gate, the factory call, and the `Mcp-Param-*` rung so a request that fails several rungs is answered by the standard-header rung first. The documented order (after method-registry 5 and request-params 6) is NOT the observed precedence: serveModern evaluates this rung immediately after the supported-revision gate, so a request that also fails a dispatch rung is answered here before the dispatch rungs (5–6) are consulted."},{rung:"client-capabilities",order:8,evaluatedAt:"pre-dispatch",codes:[j.MissingRequiredClientCapability],conformance:["server-stateless"],rationale:"The capability requirement is checked by the HTTP entry, pre-dispatch, against the validated envelope the classifier produced — pinning the spec-mandated HTTP 400 independently of how dispatch- and handler-produced errors are mapped. The documented order (after method resolution and params validation) is preserved observably only while the requirement table is empty: once a served method gains a requirement entry, a request that is missing the capability and would also fail a dispatch rung is answered by this gate first, so the entry must consult the method registry before the gate if the documented precedence is to stay observable."},{rung:"param-header-validation",order:9,evaluatedAt:"pre-dispatch",codes:[td],conformance:["http-custom-header-server-validation"],rationale:"SEP-2243 `Mcp-Param-*` headers are validated against the named tool’s `x-mcp-header` declarations and the body `arguments` after the tool registry is known and before dispatch reaches the handler; a missing/disagreeing/malformed header is rejected 400 / -32020 with the same shape as the standard-header cross-checks. The documented order (after method resolution and params validation) is preserved observably only when the body `arguments` would otherwise validate: the check runs pre-dispatch, so a `tools/call` that fails BOTH this rung and a dispatch-time rung (e.g. order-6 `request-params`, -32602) is answered by this gate first with 400 / -32020, not by the earlier-ordered rung."}],mE={[j.ParseError]:400,[j.InvalidRequest]:400,[j.MethodNotFound]:404,[j.UnsupportedProtocolVersion]:400,[j.MissingRequiredClientCapability]:400,[td]:400};function ad(e,t){return Ki(e,t)}function Oa(e){return new Set(e.flatMap((t)=>Object.keys(t.shape)))}function Ao(e){if(e==null)return!1;let t=typeof e;if(t!=="object"&&t!=="function")return!1;if(!("~standard"in e))return!1;return typeof e["~standard"]?.validate==="function"}var u$=!1,v_="draft-2020-12";function Zr(e,t="input"){let n=e["~standard"],o;if(n.jsonSchema)o=n.jsonSchema[t]({target:v_});else if(n.vendor==="zod"){if(!("_zod"in e))throw Error("Schema appears to be from zod 3, which the SDK cannot convert to JSON Schema. Upgrade to zod >=4.2.0, or wrap your JSON Schema with fromJsonSchema().");if(!u$)u$=!0,console.warn("[mcp-sdk] Your zod version does not implement `~standard.jsonSchema` (added in zod 4.2.0). Falling back to z.toJSONSchema(). Upgrade to zod >=4.2.0 to silence this warning.");o=hn(e,{target:v_,io:t})}else throw Error(`Schema library "${n.vendor}" does not implement StandardJSONSchemaV1 (\`~standard.jsonSchema\`). Upgrade to a version that does, or wrap your JSON Schema with fromJsonSchema().`);if(t==="output"){if(o.type!==void 0)return o;return N$(o)?{type:"object",...o}:o}if(o.type!==void 0&&o.type!=="object")throw Error(`MCP tool and prompt schemas must describe objects (got type: ${JSON.stringify(o.type)}). Wrap your schema in z.object({...}) or equivalent.`);return{type:"object",...o}}function N$(e){if("properties"in e||"patternProperties"in e||"additionalProperties"in e||"required"in e)return!0;for(let t of["oneOf","anyOf","allOf"]){let n=e[t];if(Array.isArray(n)&&n.length>0)return n.every((o)=>o!==null&&typeof o==="object"&&(o.type==="object"||N$(o)))}return!1}function pE(e){if(!e.path?.length)return e.message;return`${e.path.map((t)=>String(typeof t==="object"?t.key:t)).join(".")}: ${e.message}`}async function zn(e,t){let n=await e["~standard"].validate(t);if(n.issues&&n.issues.length>0)return{success:!1,error:n.issues.map((o)=>pE(o)).join(", ")};return{success:!0,data:n.value}}function fE(e){let t=hn(e,{target:v_,io:"input"});return typeof t.pattern==="string"?t.pattern:void 0}var hE=/\\\.\\d\{(\d+)\}/;function gE(e){let t=hE.exec(e),n=[void 0,-1,0];if(t)n.push(Number(t[1]));return[!1,!0].flatMap((o)=>[!1,!0].flatMap((r)=>n.map((i)=>gn({local:o,offset:r,precision:i}))))}function vE(e,t){let n;switch(e){case"email":n=[Dc()];break;case"uri":n=[ho()];break;case"date":n=[Oc()];break;case"date-time":n=gE(t);break}return new Set(n.map((o)=>fE(o)).filter((o)=>o!==void 0))}function _E(e,t,n){if(n!=="zod")return!0;return vE(e,t).has(t)}function C$(e){let t=Zr(e,"input"),n=t.properties||{},o=t.required||[];return Object.entries(n).map(([r,i])=>({name:r,description:i?.description,required:o.includes(r)}))}function qa(e){return typeof e==="object"&&e!==null&&!Array.isArray(e)}function SE(e){try{return Zr(e,"input")}catch(t){let n=t instanceof Error?t.message:String(t);throw new G(j.InvalidParams,`Elicitation requestedSchema must describe an object with flat primitive properties: ${n}`)}}var yE=new Set(["$comment","deprecated","description","examples","readOnly","title","writeOnly"]);function N_(e){return yE.has(e)||e.startsWith("x-")}var bE=new Set(["$schema",...Object.keys(jo.shape.requestedSchema.shape)]),d$={string:Oa([Eo,xa,ka,Ia]),number:Oa([To]),integer:Oa([To]),boolean:Oa([Ra]),array:Oa([Pa,Ea])},$E=new Set(Eo.shape.format.unwrap().options);function zE(e,t,n,o){if(!qa(e))return e;let r=typeof e.type==="string"&&Object.hasOwn(d$,e.type)?d$[e.type]:void 0;if(r===void 0)return e;let i={};for(let[a,s]of Object.entries(e))if(r.has(a)||N_(a))i[a]=s;else if(a==="pattern"&&e.type==="string"&&typeof e.format==="string"){if(!$E.has(e.format))i[a]=s;else if(typeof s!=="string"||!_E(e.format,s,n))o.push(`${t}.${a}`)}else o.push(`${t}.${a}`);return i}function wE(e,t){let n={},o=[];for(let[r,i]of Object.entries(e))if(r==="properties"&&qa(i))n[r]=Object.fromEntries(Object.entries(i).map(([a,s])=>[a,zE(s,`properties.${a}`,t,o)]));else if(bE.has(r))n[r]=i;else if(!N_(r))o.push(r);if(o.length>0)throw new G(j.InvalidParams,`Elicitation requestedSchema contains unsupported JSON Schema constraint(s) after Standard Schema conversion: ${o.join(", ")}`);return n}function RE(e,t){if(!qa(e.properties))return t;let n=Object.entries(e.properties).filter(([,o])=>!ad(Ta,o).success).map(([o])=>`properties.${o}`);return n.length>0?n.join(", "):t}function __(e,t,n=""){if(Array.isArray(e)&&Array.isArray(t))return e.flatMap((o,r)=>__(o,t[r],`${n}[${r}]`));if(!qa(e)||!qa(t))return[];return Object.entries(e).flatMap(([o,r])=>{let i=n?`${n}.${o}`:o;if(!Object.prototype.hasOwnProperty.call(t,o))return N_(o)?[]:[i];return __(r,t[o],i)})}function xE(e){if(!Ao(e.requestedSchema))return{...e,mode:"form",requestedSchema:e.requestedSchema};let t=e.requestedSchema["~standard"].vendor,n=wE(SE(e.requestedSchema),t),o=ad(jo.shape.requestedSchema,n);if(!o.success)throw new G(j.InvalidParams,`Elicitation requestedSchema only supports flat primitive properties (string, number, integer, boolean, and string enums): ${RE(n,o.error.message)}`);let r=__(n,o.data);if(r.length>0)throw new G(j.InvalidParams,`Elicitation requestedSchema contains unsupported JSON Schema constraint(s) after Standard Schema conversion: ${r.join(", ")}`);let i=(o.data.required??[]).filter((a)=>!Object.prototype.hasOwnProperty.call(o.data.properties,a));if(i.length>0)throw new G(j.InvalidParams,`Elicitation requestedSchema lists required properties that are not defined in properties: ${i.join(", ")}`);return{...e,mode:"form",requestedSchema:o.data}}function kE(e){let t=e.inputRequests!==void 0&&Object.keys(e.inputRequests).length>0,n=typeof e.requestState==="string";if(!t&&!n)throw TypeError("inputRequired() requires at least one of inputRequests (with at least one entry) or requestState (spec: every InputRequiredResult MUST include at least one of the two)");return{resultType:"input_required",...e.inputRequests!==void 0&&{inputRequests:e.inputRequests},...e.requestState!==void 0&&{requestState:e.requestState}}}var IE=Object.assign(kE,{elicit(e){try{return{method:"elicitation/create",params:xE(e)}}catch(t){throw t instanceof G?TypeError(t.message,{cause:t}):t}},elicitUrl(e){return{method:"elicitation/create",params:{...e,mode:"url"}}},createMessage(e){return{method:"sampling/createMessage",params:e}},listRoots(){return{method:"roots/list"}}});var q$=250;function A$(e,t){return`Multi-round-trip request '${e}' still required input after ${t} rounds (inputRequired.maxRounds)`}function M$(e,t){return new Promise((n,o)=>{if(t?.aborted){o(t.reason instanceof re?t.reason:new re(se.RequestTimeout,String(t.reason)));return}let r=setTimeout(()=>{t?.removeEventListener("abort",i),n()},e),i=()=>{clearTimeout(r),o(t?.reason instanceof re?t.reason:new re(se.RequestTimeout,String(t?.reason)))};t?.addEventListener("abort",i,{once:!0})})}function U$(e){let t=new AbortController,n=()=>t.abort(e?.reason);if(e?.addEventListener("abort",n,{once:!0}),e?.aborted)t.abort(e.reason);return{signal:t.signal,abort:(o)=>t.abort(o),dispose:()=>e?.removeEventListener("abort",n)}}var PE=["AnnotationsSchema","AudioContentSchema","BaseMetadataSchema","BlobResourceContentsSchema","BooleanSchemaSchema","CallToolRequestSchema","CallToolRequestParamsSchema","CallToolResultSchema","CancelledNotificationSchema","CancelledNotificationParamsSchema","CancelTaskRequestSchema","CancelTaskResultSchema","ClientCapabilitiesSchema","ClientNotificationSchema","ClientRequestSchema","ClientResultSchema","CompatibilityCallToolResultSchema","CompleteRequestSchema","CompleteRequestParamsSchema","CompleteResultSchema","ContentBlockSchema","CreateMessageRequestSchema","CreateMessageRequestParamsSchema","CreateMessageResultSchema","CreateMessageResultWithToolsSchema","CreateTaskResultSchema","CursorSchema","DiscoverRequestSchema","DiscoverResultSchema","ElicitationCompleteNotificationSchema","ElicitationCompleteNotificationParamsSchema","ElicitRequestSchema","ElicitRequestFormParamsSchema","ElicitRequestParamsSchema","ElicitRequestURLParamsSchema","ElicitResultSchema","EmbeddedResourceSchema","EmptyResultSchema","EnumSchemaSchema","GetPromptRequestSchema","GetPromptRequestParamsSchema","GetPromptResultSchema","GetTaskPayloadRequestSchema","GetTaskPayloadResultSchema","GetTaskRequestSchema","GetTaskResultSchema","IconSchema","IconsSchema","ImageContentSchema","ImplementationSchema","InitializedNotificationSchema","InitializeRequestSchema","InitializeRequestParamsSchema","InitializeResultSchema","JSONArraySchema","JSONObjectSchema","JSONRPCErrorResponseSchema","JSONRPCMessageSchema","JSONRPCNotificationSchema","JSONRPCRequestSchema","JSONRPCResponseSchema","JSONRPCResultResponseSchema","JSONValueSchema","LegacyTitledEnumSchemaSchema","ListPromptsRequestSchema","ListPromptsResultSchema","ListResourcesRequestSchema","ListResourcesResultSchema","ListResourceTemplatesRequestSchema","ListResourceTemplatesResultSchema","ListRootsRequestSchema","ListRootsResultSchema","ListTasksRequestSchema","ListTasksResultSchema","ListToolsRequestSchema","ListToolsResultSchema","LoggingLevelSchema","LoggingMessageNotificationSchema","LoggingMessageNotificationParamsSchema","ModelHintSchema","ModelPreferencesSchema","MultiSelectEnumSchemaSchema","NotificationSchema","NumberSchemaSchema","PaginatedRequestSchema","PaginatedRequestParamsSchema","PaginatedResultSchema","PingRequestSchema","PrimitiveSchemaDefinitionSchema","ProgressSchema","ProgressNotificationSchema","ProgressNotificationParamsSchema","ProgressTokenSchema","PromptSchema","PromptArgumentSchema","PromptListChangedNotificationSchema","PromptMessageSchema","PromptReferenceSchema","ReadResourceRequestSchema","ReadResourceRequestParamsSchema","ReadResourceResultSchema","RelatedTaskMetadataSchema","RequestSchema","RequestIdSchema","RequestMetaSchema","ResourceSchema","ResourceContentsSchema","ResourceLinkSchema","ResourceListChangedNotificationSchema","ResourceRequestParamsSchema","ResourceTemplateSchema","ResourceTemplateReferenceSchema","ResourceUpdatedNotificationSchema","ResourceUpdatedNotificationParamsSchema","ResultMetaObjectSchema","ResultSchema","RoleSchema","RootSchema","RootsListChangedNotificationSchema","SamplingContentSchema","SamplingMessageSchema","SamplingMessageContentBlockSchema","ServerCapabilitiesSchema","ServerNotificationSchema","ServerRequestSchema","ServerResultSchema","SetLevelRequestSchema","SetLevelRequestParamsSchema","SingleSelectEnumSchemaSchema","StringSchemaSchema","SubscribeRequestSchema","SubscribeRequestParamsSchema","SubscriptionFilterSchema","SubscriptionsAcknowledgedNotificationSchema","SubscriptionsAcknowledgedNotificationParamsSchema","SubscriptionsListenRequestSchema","SubscriptionsListenRequestParamsSchema","SubscriptionsListenResultSchema","SubscriptionsListenResultMetaSchema","TaskAugmentedRequestParamsSchema","TaskCreationParamsSchema","TaskMetadataSchema","TaskSchema","TaskStatusSchema","TaskStatusNotificationSchema","TaskStatusNotificationParamsSchema","TextContentSchema","TextResourceContentsSchema","TitledMultiSelectEnumSchemaSchema","TitledSingleSelectEnumSchemaSchema","ToolSchema","ToolAnnotationsSchema","ToolChoiceSchema","ToolExecutionSchema","ToolListChangedNotificationSchema","ToolResultContentSchema","ToolUseContentSchema","UnsubscribeRequestSchema","UnsubscribeRequestParamsSchema","UntitledMultiSelectEnumSchemaSchema","UntitledSingleSelectEnumSchemaSchema"],EE={IdJagTokenExchangeResponseSchema:s_,OAuthClientInformationFullSchema:l_,OAuthClientInformationSchema:Bu,OAuthClientMetadataSchema:Gu,OAuthClientRegistrationErrorSchema:u_,OAuthErrorResponseSchema:c_,OAuthMetadataSchema:Hu,OAuthProtectedResourceMetadataSchema:o_,OAuthTokenRevocationRequestSchema:d_,OAuthTokensSchema:a_,OpenIdProviderDiscoveryMetadataSchema:i_,OpenIdProviderMetadataSchema:Ku},D$={},L$={};function Z$(e,t){let n=e.slice(0,-6);D$[n]=t,L$[n]=(o)=>t.safeParse(o).success}for(let e of PE)Z$(e,sE[e]);for(let[e,t]of Object.entries(EE))Z$(e,t);var TE=Object.freeze(D$),jE=Object.freeze(L$);function OE(e){switch(e){case"initialize":case"notifications/initialized":return Co(void 0);case"server/discover":return Co(P_);default:return}}var V$=60000,NE=[yn,yo,cr,Nr],CE=["inputResponses","requestState"];function m$(e,t){let n=e.params;if(!Ca(n))return{message:e,lifted:{}};let o=n._meta,r=Ca(o)?NE.filter((c)=>(c in o)):[],i=t==="request"?CE.filter((c)=>(c in n)):[];if(r.length===0&&i.length===0)return{message:e,lifted:{}};let a={},s={...n};if(r.length>0&&Ca(o)){let c={},l={...o};for(let d of r)c[d]=o[d],delete l[d];if(a.envelope=c,Object.keys(l).length>0)s._meta=l;else delete s._meta}for(let c of i){if(c==="inputResponses")a.inputResponses=s[c];if(c==="requestState")a.requestState=s[c];delete s[c]}return{message:{...e,params:s},lifted:a}}function p$(e,t){let n=e.validateResult(t,void 0);if(!n.ok&&n.reason==="not-in-era")return;return{"~standard":{version:1,vendor:"mcp-wire-codec",validate(o){let r=e.validateResult(t,o);if(r.ok)return{value:r.value};return{issues:[{message:r.reason==="invalid"?r.message:`not-in-era: ${t}`}]}}}}}function Ua(e){return()=>e}var qE=Ua(void 0);function C_(e,t){return{...e,mcpReq:{...e.mcpReq,requestState:Ua(t)}}}var AE;var q_=class{_transport;_requestMessageId=0;_requestHandlers=new Map;_requestHandlerAbortControllers=new Map;_notificationHandlers=new Map;_responseHandlers=new Map;_progressHandlers=new Map;_timeoutInfo=new Map;_pendingDebouncedNotifications=new Set;_negotiatedProtocolVersion;static{AE=(e,t)=>{e._negotiatedProtocolVersion=t}}_supportedProtocolVersions;onclose;onerror;fallbackRequestHandler;fallbackNotificationHandler;constructor(e){this._options=e,this._supportedProtocolVersions=e?.supportedProtocolVersions??oa,this.setNotificationHandler("notifications/cancelled",(t)=>{this._oncancel(t)}),this.setNotificationHandler("notifications/progress",(t)=>{this._onprogress(t)}),this.setRequestHandler("ping",(t)=>({}))}_shouldDropInbound(e){}_outboundMetaEnvelope(){}_envelopeOutbound(e){let t=this._outboundMetaEnvelope();if(t===void 0)return e;let n=e.params??{};return{...e,params:{...n,_meta:{...t,...n._meta}}}}_resolveNonCompleteResult(e,t){return Promise.reject(new re(se.UnsupportedResultType,`Unsupported result type '${e.kind}' for ${t.request.method}`,{resultType:e.kind,method:t.request.method}))}_getRequestHandler(e){return this._requestHandlers.get(e)}async _oncancel(e){if(!e.params.requestId)return;this._requestHandlerAbortControllers.get(e.params.requestId)?.abort(e.params.reason)}_setupTimeout(e,t,n,o,r=!1){this._timeoutInfo.set(e,{timeoutId:setTimeout(o,t),startTime:Date.now(),timeout:t,maxTotalTimeout:n,resetTimeoutOnProgress:r,onTimeout:o})}_resetTimeout(e){let t=this._timeoutInfo.get(e);if(!t)return!1;let n=Date.now()-t.startTime;if(t.maxTotalTimeout&&n>=t.maxTotalTimeout)throw this._timeoutInfo.delete(e),new re(se.RequestTimeout,"Maximum total timeout exceeded",{maxTotalTimeout:t.maxTotalTimeout,totalElapsed:n});return clearTimeout(t.timeoutId),t.timeoutId=setTimeout(t.onTimeout,t.timeout),!0}_cleanupTimeout(e){let t=this._timeoutInfo.get(e);if(t)clearTimeout(t.timeoutId),this._timeoutInfo.delete(e)}async connect(e){this._transport=e;let t=this.transport?.onclose;this._transport.onclose=()=>{try{t?.()}finally{this._onclose()}};let n=this.transport?.onerror;this._transport.onerror=(r)=>{n?.(r),this._onerror(r)};let o=this._transport?.onmessage;this._transport.onmessage=(r,i)=>{if(o?.(r,i),qo(r)||Ma(r))this._onresponse(r);else if(Mo(r))this._onrequest(r,i);else if(O$(r))this._onnotification(r,i);else this._onerror(Error(`Unknown message type: ${JSON.stringify(r)}`))},e.setSupportedProtocolVersions?.(this._supportedProtocolVersions),await this._transport.start()}_onclose(){let e=this._responseHandlers;this._responseHandlers=new Map,this._progressHandlers.clear(),this._pendingDebouncedNotifications.clear();for(let o of this._timeoutInfo.values())clearTimeout(o.timeoutId);this._timeoutInfo.clear();let t=this._requestHandlerAbortControllers;this._requestHandlerAbortControllers=new Map;let n=new re(se.ConnectionClosed,"Connection closed");this._transport=void 0;try{this.onclose?.()}finally{for(let o of e.values())o(n);for(let o of t.values())o.abort(n)}}_onerror(e){this.onerror?.(e)}_onnotification(e,t){let{message:n}=m$(e,"notification"),o=this._negotiatedWireCodec();if(t?.classification===void 0&&this._shouldDropInbound(e)==="drop")return;if(t?.classification!==void 0){let a=c$(t.classification);if(a!==o.era){this._onerror(Error(`Era mismatch on inbound notification '${n.method}': classified as ${a} but this instance serves ${o.era}`));return}}if(f_(n.method)&&!o.hasNotificationMethod(n.method))return;let r=this._notificationHandlers.get(n.method),i=this.fallbackNotificationHandler;if(r===void 0&&i===void 0)return;Promise.resolve().then(()=>r===void 0?i(n):r(n,o)).catch((a)=>this._onerror(Error(`Uncaught error in notification handler: ${a}`)))}_onrequest(e,t){let{message:n,lifted:o}=m$(e,"request"),r=this._negotiatedWireCodec();if(t?.classification===void 0&&this._shouldDropInbound(e)==="drop"){this._onerror(Error(`Dropped inbound request '${e.method}': not servable on this connection's protocol era`));return}let i=this._transport,a=(g,b,R)=>{let L={jsonrpc:"2.0",id:n.id,error:{code:g,message:b,...R!==void 0&&{data:R}}};i?.send(L).catch((P)=>this._onerror(Error(`Failed to send an error response: ${P}`)))};if(t?.classification!==void 0){let g=c$(t.classification);if(g!==r.era){this._onerror(Error(`Era mismatch on inbound request '${n.method}': classified as ${g} but this instance serves ${r.era}`));let b=t.classification.revision??g;a(j.UnsupportedProtocolVersion,`Unsupported protocol version: ${b}`,{supported:this._supportedProtocolVersions,requested:b});return}}if(p_(n.method)&&!r.hasRequestMethod(n.method)){a(j.MethodNotFound,"Method not found");return}let s=this._requestHandlers.get(n.method)??this.fallbackRequestHandler;if(s===void 0){a(j.MethodNotFound,"Method not found");return}let c=r.checkInboundEnvelope(o);if(c!==void 0){a(j.InvalidParams,c);return}let l=(g,b)=>this._notificationViaCodec(this._resolveOutboundCodec(g.method),g,{...b,relatedRequestId:n.id}),d=(g,b,R)=>this._requestWithSchemaViaCodec(this._resolveOutboundCodec(g.method),g,b,{...R,relatedRequestId:n.id}),m=new AbortController;this._requestHandlerAbortControllers.set(n.id,m);let p=o.inputResponses===void 0?void 0:ME(o.inputResponses),f={sessionId:i?.sessionId,mcpReq:{id:n.id,method:n.method,_meta:n.params?._meta,...o.envelope!==void 0&&{envelope:o.envelope},...p!==void 0&&{inputResponses:p.accepted},...p!==void 0&&p.droppedKeys.length>0&&{droppedInputResponseKeys:p.droppedKeys},requestState:o.requestState===void 0?qE:Ua(o.requestState),signal:m.signal,send:(g,b,R)=>{let L=this._resolveOutboundCodec(g.method);if(this._assertOutboundRequestInEra(L,g.method),Ao(b))return d(g,b,R);let P=p$(L,g.method);if(P===void 0)throw TypeError(`'${g.method}' is not a spec method; pass a result schema as the second argument to ctx.mcpReq.send().`);return d(g,P,b)},notify:l},http:t?.authInfo?{authInfo:t.authInfo}:void 0},v=this.buildContext(f,t);Promise.resolve().then(()=>s(n,v)).then(async(g)=>{if(m.signal.aborted)return;let b;try{b=r.encodeResult(n.method,g,this._outboundServerInfo())}catch(L){this._onerror(Error(`Failed to encode result for ${n.method}: ${L}`)),a(j.InternalError,"Internal error");return}let R={result:b,jsonrpc:"2.0",id:n.id};await i?.send(R)},async(g)=>{if(m.signal.aborted)return;let b=Number.isSafeInteger(g.code)?g.code:j.InternalError,R={jsonrpc:"2.0",id:n.id,error:{code:r.encodeErrorCode(b),message:g.message??"Internal error",...g.data!==void 0&&{data:g.data}}};await i?.send(R)}).catch((g)=>this._onerror(Error(`Failed to send response: ${g}`))).finally(()=>{if(this._requestHandlerAbortControllers.get(n.id)===m)this._requestHandlerAbortControllers.delete(n.id)})}_onprogress(e){let{progressToken:t,...n}=e.params,o=Number(t),r=this._progressHandlers.get(o);if(!r){this._onerror(Error(`Received a progress notification for an unknown token: ${JSON.stringify(e)}`));return}let i=this._responseHandlers.get(o),a=this._timeoutInfo.get(o);if(a&&i&&a.resetTimeoutOnProgress)try{this._resetTimeout(o)}catch(s){this._responseHandlers.delete(o),this._progressHandlers.delete(o),this._cleanupTimeout(o),i(s);return}r(n)}_onresponse(e){let t=Number(e.id),n=this._responseHandlers.get(t);if(n===void 0){this._onerror(Error(`Received a response for an unknown message ID: ${JSON.stringify(e)}`));return}if(this._responseHandlers.delete(t),this._cleanupTimeout(t),this._progressHandlers.delete(t),qo(e))n(e);else n(G.fromError(e.error.code,e.error.message,e.error.data))}get transport(){return this._transport}async close(){await this._transport?.close()}request(e,t,n){let o=this._resolveOutboundCodec(e.method);if(this._assertOutboundRequestInEra(o,e.method),Ao(t))return this._requestWithSchemaViaCodec(o,e,t,n);let r=p$(o,e.method);if(r===void 0)throw TypeError(`'${e.method}' is not a spec method; pass a result schema as the second argument to request().`);return this._requestWithSchemaViaCodec(o,e,r,t)}_negotiatedWireCodec(){return Co(this._negotiatedProtocolVersion)}_wireCodec(){return this._negotiatedWireCodec()}_resolveOutboundCodec(e){if(this._negotiatedProtocolVersion===void 0){let t=OE(e);if(t)return t}return this._negotiatedWireCodec()}_assertOutboundRequestInEra(e,t){if(p_(t)&&!e.hasRequestMethod(t))throw new re(se.MethodNotSupportedByProtocolVersion,`Method '${t}' is not supported by the negotiated protocol version (wire era ${e.era})`,{method:t,era:e.era})}_requestWithSchema(e,t,n){let o=this._resolveOutboundCodec(e.method);return this._assertOutboundRequestInEra(o,e.method),this._requestWithSchemaViaCodec(o,e,t,n)}_requestWithSchemaViaCodec(e,t,n,o){let{relatedRequestId:r,resumptionToken:i,onresumptiontoken:a,headers:s}=o??{},c=Date.now(),l,d;return new Promise((m,p)=>{let f=(ne)=>{p(ne)};if(!this._transport){f(Error("Not connected"));return}if(this._options?.enforceStrictCapabilities===!0)try{this.assertCapabilityForMethod(t.method)}catch(ne){f(ne);return}if(o?.signal?.aborted){let ne=o.signal.reason;throw ne instanceof re?ne:new re(se.RequestTimeout,String(ne))}let v=e.era===P_&&this._transport.hasPerRequestStream===!0?new AbortController:void 0,g=this._requestMessageId++;d=g;let b={...t,jsonrpc:"2.0",id:g};if(o?.onprogress)this._progressHandlers.set(g,o.onprogress),b.params={...t.params,_meta:{...t.params?._meta,progressToken:g}};let R=this._envelopeOutbound(b),L=!1,P=(ne)=>{if(L)return;if(this._progressHandlers.delete(g),v===void 0)this._transport?.send(this._envelopeOutbound({jsonrpc:"2.0",method:"notifications/cancelled",params:{requestId:g,reason:String(ne)}}),{relatedRequestId:r,resumptionToken:i,onresumptiontoken:a}).catch((ue)=>this._onerror(Error(`Failed to send cancellation: ${ue}`)));else v.abort();p(ne instanceof re?ne:new re(se.RequestTimeout,String(ne)))};this._responseHandlers.set(g,(ne)=>{if(o?.signal?.aborted)return;if(L=!0,ne instanceof Error)return p(ne);let ue;try{ue=e.decodeResult(t.method,ne.result)}catch(Se){return p(Se instanceof Error?Se:Error(String(Se)))}if(ue.kind==="invalid")return p(ue.error);if(ue.kind==="input_required"){if(o?.allowInputRequired===!0)return m(UE(ue));let Se={codec:e,request:t,resultSchema:n,options:o,flowStartedAt:c,retry:(Ie,Le)=>this._requestWithSchemaViaCodec(e,Ie===void 0?{method:t.method}:{method:t.method,params:Ie},n,Le)};return m(this._resolveNonCompleteResult(ue,Se))}let Oe=ue.result;zn(n,Oe).then((Se)=>{if(Se.success)m(Se.data);else p(new re(se.InvalidResult,`Invalid result for ${t.method}: ${Se.error}`))},p)}),l=()=>P(o?.signal?.reason),o?.signal?.addEventListener("abort",l,{once:!0});let D=o?.timeout??V$,E=()=>P(new re(se.RequestTimeout,"Request timed out",{timeout:D}));this._setupTimeout(g,D,o?.maxTotalTimeout,E,o?.resetTimeoutOnProgress??!1),this._transport.send(R,{relatedRequestId:r,resumptionToken:i,onresumptiontoken:a,headers:s,requestSignal:v?.signal}).catch((ne)=>{this._progressHandlers.delete(g),p(ne)})}).finally(()=>{if(l)o?.signal?.removeEventListener("abort",l);if(d!==void 0)this._responseHandlers.delete(d),this._cleanupTimeout(d)})}async notification(e,t){return this._notificationViaCodec(this._resolveOutboundCodec(e.method),e,t)}async _notificationViaCodec(e,t,n){if(!this._transport)throw new re(se.NotConnected,"Not connected");if(f_(t.method)&&!e.hasNotificationMethod(t.method))throw new re(se.MethodNotSupportedByProtocolVersion,`Notification '${t.method}' is not supported by the negotiated protocol version (wire era ${e.era})`,{method:t.method,era:e.era});this.assertNotificationCapability(t.method);let o=this._envelopeOutbound({jsonrpc:"2.0",...t});if((this._options?.debouncedNotificationMethods??[]).includes(t.method)&&!t.params&&!n?.relatedRequestId){if(this._pendingDebouncedNotifications.has(t.method))return;this._pendingDebouncedNotifications.add(t.method),Promise.resolve().then(()=>{if(this._pendingDebouncedNotifications.delete(t.method),!this._transport)return;this._transport?.send(o,n).catch((r)=>this._onerror(r))});return}await this._transport.send(o,n)}setRequestHandler(e,t,n){this.assertRequestHandlerCapability(e);let o;if(typeof t==="function"){if(!p_(e))throw TypeError(`'${e}' is not a spec request method; pass schemas as the second argument to setRequestHandler().`);o=(r,i)=>{let a=this._negotiatedWireCodec(),s=a.validateRequest(e,r);if(!s.ok&&s.reason==="not-in-era")s=a.validateInputRequest(e,r);if(!s.ok){if(s.reason==="not-in-era")throw new G(j.InternalError,`No wire schema for ${e} in the resolved era`);throw Error(s.message)}return Promise.resolve(t(s.value,i))}}else if(n)o=async(r,i)=>{let a=await zn(t.params,{...r.params});if(!a.success)throw new G(j.InvalidParams,`Invalid params for ${e}: ${a.error}`);return n(a.data,i)};else throw TypeError("setRequestHandler: handler is required");this._requestHandlers.set(e,this._wrapHandler(e,o))}_wrapHandler(e,t){return t}_outboundServerInfo(){}removeRequestHandler(e){this._requestHandlers.delete(e)}assertCanSetRequestHandler(e){if(this._requestHandlers.has(e))throw Error(`A request handler for ${e} already exists, which would be overridden`)}setNotificationHandler(e,t,n){if(typeof t==="function"){if(!f_(e))throw TypeError(`'${e}' is not a spec notification method; pass schemas as the second argument to setNotificationHandler().`);this._notificationHandlers.set(e,(o,r)=>{let i=r.validateNotification(e,o);if(!i.ok){if(i.reason==="not-in-era")throw new G(j.InternalError,`No wire schema for ${e} in the resolved era`);throw Error(i.message)}return Promise.resolve(t(i.value))});return}if(!n)throw TypeError("setNotificationHandler: handler is required");this._notificationHandlers.set(e,async(o)=>{let r=await zn(t.params,{...o.params});if(!r.success)throw new G(j.InvalidParams,`Invalid params for notification ${e}: ${r.error}`);await n(r.data,o)})}removeNotificationHandler(e){this._notificationHandlers.delete(e)}};function Ca(e){return e!==null&&typeof e==="object"&&!Array.isArray(e)}function A_(e,t){let n={...e};for(let o in t){let r=o,i=t[r];if(i===void 0)continue;let a=n[r];n[r]=Ca(a)&&Ca(i)?{...a,...i}:i}return n}function f$(e){return typeof e==="object"&&e!==null&&!Array.isArray(e)}function ME(e){let t={},n=[];if(!f$(e))return{accepted:t,droppedKeys:n};for(let[o,r]of Object.entries(e)){if(!f$(r)||"method"in r||"result"in r){n.push(o);continue}t[o]=r}return{accepted:t,droppedKeys:n}}function UE(e){return{resultType:"input_required",inputRequests:e.inputRequests,...e.requestState!==void 0&&{requestState:e.requestState}}}/*!
|
|
74
74
|
* content-type
|
|
75
75
|
* Copyright(c) 2015 Douglas Christopher Wilson
|
|
76
76
|
* MIT Licensed
|
|
77
|
-
*/var DE=CS((e)=>{var t=/; *([!#$%&'*+.^_`|~0-9A-Za-z-]+) *= *("(?:[\u000b\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u000b\u0020-\u00ff])*"|[!#$%&'*+.^_`|~0-9A-Za-z-]+) */g,n=/\\([\u000b\u0020-\u00ff])/g,o=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/;e.parse=r;function r(s){if(!s)throw TypeError("argument string is required");var c=typeof s==="object"?i(s):s;if(typeof c!=="string")throw TypeError("argument string is required to be a string");var l=c.indexOf(";"),d=l!==-1?c.slice(0,l).trim():c.trim();if(!o.test(d))throw TypeError("invalid media type");var m=new a(d.toLowerCase());if(l!==-1){var p,f,v;t.lastIndex=l;while(f=t.exec(c)){if(f.index!==l)throw TypeError("invalid parameter format");if(l+=f[0].length,p=f[1].toLowerCase(),v=f[2],v.charCodeAt(0)===34){if(v=v.slice(1,-1),v.indexOf("\\")!==-1)v=v.replace(n,"$1")}m.parameters[p]=v}if(l!==c.length)throw TypeError("invalid parameter format")}return m}function i(s){var c;if(typeof s.getHeader==="function")c=s.getHeader("content-type");else if(typeof s.headers==="object")c=s.headers&&s.headers["content-type"];if(typeof c!=="string")throw TypeError("content-type header is missing from object");return c}function a(s){this.parameters=Object.create(null),this.type=s}}),LE=AS(DE(),1);function j$(e){if(!e)return;try{return LE.parse(e).type}catch{let t=(e.split(";",1)[0]??"").trim().toLowerCase();if(t===""||e.slice(t.length).includes(","))return;return t}}function O$(e){if(e==="application/json")return!0;return j$(e)==="application/json"}var ZE=/^[A-Za-z0-9._-]{1,128}$/;function VE(e){let t=[];if(e.length===0)return{isValid:!1,warnings:["Tool name cannot be empty"]};if(e.length>128)return{isValid:!1,warnings:[`Tool name exceeds maximum length of 128 characters (current: ${e.length})`]};if(e.includes(" "))t.push("Tool name contains spaces, which may cause parsing issues");if(e.includes(","))t.push("Tool name contains commas, which may cause parsing issues");if(e.startsWith("-")||e.endsWith("-"))t.push("Tool name starts or ends with a dash, which may cause parsing issues in some contexts");if(e.startsWith(".")||e.endsWith("."))t.push("Tool name starts or ends with a dot, which may cause parsing issues in some contexts");if(!ZE.test(e)){let n=[...e].filter((o)=>!/[A-Za-z0-9._-]/.test(o)).filter((o,r,i)=>i.indexOf(o)===r);return t.push(`Tool name contains invalid characters: ${n.map((o)=>`"${o}"`).join(", ")}`,"Allowed characters are: A-Z, a-z, 0-9, underscore (_), dash (-), and dot (.)"),{isValid:!1,warnings:t}}return{isValid:!0,warnings:t}}function FE(e,t){if(t.length>0){console.warn(`Tool name validation warning for "${e}":`);for(let n of t)console.warn(` - ${n}`);console.warn("Tool registration will proceed, but this may cause compatibility issues."),console.warn("Consider updating the tool name to conform to the MCP tool naming standard."),console.warn("See SEP: Specify Format for Tool Names (https://github.com/modelcontextprotocol/modelcontextprotocol/issues/986) for more details.")}}function M_(e){let t=VE(e);return FE(e,t.warnings),t.isValid}function JE(e){return typeof e==="object"&&e!==null&&"_zod"in e}function HE(e){return typeof e==="object"&&e!==null&&!("_zod"in e)&&"_def"in e&&typeof e._def?.typeName==="string"}function KE(e){if(typeof e!=="object"||e===null)return!1;if(qo(e))return!1;let t=Object.getPrototypeOf(e);if(t!==Object.prototype&&t!==null)return!1;return Object.values(e).every((n)=>JE(n))}function nd(e){if(e===void 0)return;if(KE(e))return h(e);if(typeof e==="object"&&e!==null&&!qo(e)&&Object.values(e).some((t)=>HE(t)))throw TypeError("Raw-shape inputSchema/outputSchema/argsSchema fields must be Zod v4 schemas. Got a Zod v3 field schema. Import from `zod/v4` (or upgrade your zod import), or wrap with `z.object({...})` yourself.");if(!qo(e))throw TypeError("inputSchema/outputSchema/argsSchema must be a Standard Schema (e.g. z.object({...})) or a raw Zod shape ({ field: z.string() }).");return e}function Da(e,t){let n=typeof e;if(n!==typeof t)return!1;if(Array.isArray(e)){if(!Array.isArray(t))return!1;let o=e.length;if(o!==t.length)return!1;for(let r=0;r<o;r++)if(!Da(e[r],t[r]))return!1;return!0}if(n==="object"){if(!e||!t)return e===t;let o=Object.keys(e),r=Object.keys(t);if(o.length!==r.length)return!1;for(let i of o)if(!Da(e[i],t[i]))return!1;return!0}return e===t}function Tt(e){return encodeURI(GE(e))}function GE(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}var BE={prefixItems:!0,items:!0,allOf:!0,anyOf:!0,oneOf:!0},WE={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependentSchemas:!0},YE={id:!0,$id:!0,$ref:!0,$schema:!0,$anchor:!0,$vocabulary:!0,$comment:!0,default:!0,enum:!0,const:!0,required:!0,type:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0},XE=typeof self<"u"&&self.location&&self.location.origin!=="null"?new URL(self.location.origin+self.location.pathname+location.search):new URL("https://github.com/cfworker");function zn(e,t=Object.create(null),n=XE,o=""){if(e&&typeof e==="object"&&!Array.isArray(e)){let i=e.$id||e.id;if(i){let a=new URL(i,n.href);if(a.hash.length>1)t[a.href]=e;else if(a.hash="",o==="")n=a;else zn(e,t,n)}}else if(e!==!0&&e!==!1)return t;let r=n.href+(o?"#"+o:"");if(t[r]!==void 0)throw Error(`Duplicate schema URI "${r}".`);if(t[r]=e,e===!0||e===!1)return t;if(e.__absolute_uri__===void 0)Object.defineProperty(e,"__absolute_uri__",{enumerable:!1,value:r});if(e.$ref&&e.__absolute_ref__===void 0){let i=new URL(e.$ref,n.href);i.hash=i.hash,Object.defineProperty(e,"__absolute_ref__",{enumerable:!1,value:i.href})}if(e.$recursiveRef&&e.__absolute_recursive_ref__===void 0){let i=new URL(e.$recursiveRef,n.href);i.hash=i.hash,Object.defineProperty(e,"__absolute_recursive_ref__",{enumerable:!1,value:i.href})}if(e.$anchor){let i=new URL("#"+e.$anchor,n.href);t[i.href]=e}for(let i in e){if(YE[i])continue;let a=`${o}/${Tt(i)}`,s=e[i];if(Array.isArray(s)){if(BE[i]){let c=s.length;for(let l=0;l<c;l++)zn(s[l],t,n,`${a}/${l}`)}}else if(WE[i])for(let c in s)zn(s[c],t,n,`${a}/${Tt(c)}`);else zn(s,t,n,a)}return t}var QE=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,eT=[0,31,28,31,30,31,30,31,31,30,31,30,31],tT=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i,rT=/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,nT=/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,oT=/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,iT=/^(?:(?:https?|ftp):\/\/)(?:\S+(?::\S*)?@)?(?:(?!10(?:\.\d{1,3}){3})(?!127(?:\.\d{1,3}){3})(?!169\.254(?:\.\d{1,3}){2})(?!192\.168(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u{00a1}-\u{ffff}0-9]+-?)*[a-z\u{00a1}-\u{ffff}0-9]+)(?:\.(?:[a-z\u{00a1}-\u{ffff}0-9]+-?)*[a-z\u{00a1}-\u{ffff}0-9]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,aT=/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,sT=/^(?:\/(?:[^~/]|~0|~1)*)*$/,cT=/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,lT=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,uT=(e)=>{if(e[0]==='"')return!1;let[t,n,...o]=e.split("@");if(!t||!n||o.length!==0||t.length>64||n.length>253)return!1;if(t[0]==="."||t.endsWith(".")||t.includes(".."))return!1;if(!/^[a-z0-9.-]+$/i.test(n)||!/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+$/i.test(t))return!1;return n.split(".").every((r)=>/^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$/i.test(r))},dT=/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,mT=/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,pT=(e)=>e.length>1&&e.length<80&&(/^P\d+([.,]\d+)?W$/.test(e)||/^P[\dYMDTHS]*(\d[.,]\d+)?[YMDHS]$/.test(e)&&/^P([.,\d]+Y)?([.,\d]+M)?([.,\d]+D)?(T([.,\d]+H)?([.,\d]+M)?([.,\d]+S)?)?$/.test(e));function Yt(e){return e.test.bind(e)}var N$={date:C$,time:q$.bind(void 0,!1),"date-time":gT,duration:pT,uri:ST,"uri-reference":Yt(nT),"uri-template":Yt(oT),url:Yt(iT),email:uT,hostname:Yt(rT),ipv4:Yt(dT),ipv6:Yt(mT),regex:bT,uuid:Yt(aT),"json-pointer":Yt(sT),"json-pointer-uri-fragment":Yt(cT),"relative-json-pointer":Yt(lT)};function fT(e){return e%4===0&&(e%100!==0||e%400===0)}function C$(e){let t=e.match(QE);if(!t)return!1;let n=+t[1],o=+t[2],r=+t[3];return o>=1&&o<=12&&r>=1&&r<=(o==2&&fT(n)?29:eT[o])}function q$(e,t){let n=t.match(tT);if(!n)return!1;let o=+n[1],r=+n[2],i=+n[3],a=!!n[5];return(o<=23&&r<=59&&i<=59||o==23&&r==59&&i==60)&&(!e||a)}var hT=/t|\s/i;function gT(e){let t=e.split(hT);return t.length==2&&C$(t[0])&&q$(!0,t[1])}var vT=/\/|:/,_T=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function ST(e){return vT.test(e)&&_T.test(e)}var yT=/[^\\]\\Z/;function bT(e){if(yT.test(e))return!1;try{return new RegExp(e,"u"),!0}catch(t){return!1}}function $T(e){let t=0,n=e.length,o=0,r;while(o<n)if(t++,r=e.charCodeAt(o++),r>=55296&&r<=56319&&o<n){if(r=e.charCodeAt(o),(r&64512)==56320)o++}return t}function ye(e,t,n="2019-09",o=zn(t),r=!0,i=null,a="#",s="#",c=Object.create(null)){if(t===!0)return{valid:!0,errors:[]};if(t===!1)return{valid:!1,errors:[{instanceLocation:a,keyword:"false",keywordLocation:a,error:"False boolean schema."}]};let l=typeof e,d;switch(l){case"boolean":case"number":case"string":d=l;break;case"object":if(e===null)d="null";else if(Array.isArray(e))d="array";else d="object";break;default:throw Error(`Instances of "${l}" type are not supported.`)}let{$ref:m,$recursiveRef:p,$recursiveAnchor:f,type:v,const:g,enum:b,required:w,not:Z,anyOf:E,allOf:L,oneOf:T,if:ne,then:ue,else:Oe,format:Se,properties:Ie,patternProperties:Le,additionalProperties:Rt,unevaluatedProperties:xt,minProperties:gt,maxProperties:vt,propertyNames:At,dependentRequired:Ye,dependentSchemas:_t,dependencies:Mt,prefixItems:ct,items:Ze,additionalItems:er,unevaluatedItems:tr,contains:Ut,minContains:Ne,maxContains:Ve,minItems:Fe,maxItems:kt,uniqueItems:Gr,minimum:lt,maximum:ut,exclusiveMinimum:Xe,exclusiveMaximum:St,multipleOf:yt,minLength:Dt,maxLength:Lt,pattern:vr,__absolute_ref__:Zt,__absolute_recursive_ref__:Br}=t,M=[];if(f===!0&&i===null)i=t;if(p==="#"){let B=i===null?o[Br]:i,V=`${s}/$recursiveRef`,te=ye(e,i===null?t:i,n,o,r,B,a,V,c);if(!te.valid)M.push({instanceLocation:a,keyword:"$recursiveRef",keywordLocation:V,error:"A subschema had errors."},...te.errors)}if(m!==void 0){let B=o[Zt||m];if(B===void 0){let U=`Unresolved $ref "${m}".`;if(Zt&&Zt!==m)U+=` Absolute URI "${Zt}".`;throw U+=`
|
|
77
|
+
*/var DE=qS((e)=>{var t=/; *([!#$%&'*+.^_`|~0-9A-Za-z-]+) *= *("(?:[\u000b\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u000b\u0020-\u00ff])*"|[!#$%&'*+.^_`|~0-9A-Za-z-]+) */g,n=/\\([\u000b\u0020-\u00ff])/g,o=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/;e.parse=r;function r(s){if(!s)throw TypeError("argument string is required");var c=typeof s==="object"?i(s):s;if(typeof c!=="string")throw TypeError("argument string is required to be a string");var l=c.indexOf(";"),d=l!==-1?c.slice(0,l).trim():c.trim();if(!o.test(d))throw TypeError("invalid media type");var m=new a(d.toLowerCase());if(l!==-1){var p,f,v;t.lastIndex=l;while(f=t.exec(c)){if(f.index!==l)throw TypeError("invalid parameter format");if(l+=f[0].length,p=f[1].toLowerCase(),v=f[2],v.charCodeAt(0)===34){if(v=v.slice(1,-1),v.indexOf("\\")!==-1)v=v.replace(n,"$1")}m.parameters[p]=v}if(l!==c.length)throw TypeError("invalid parameter format")}return m}function i(s){var c;if(typeof s.getHeader==="function")c=s.getHeader("content-type");else if(typeof s.headers==="object")c=s.headers&&s.headers["content-type"];if(typeof c!=="string")throw TypeError("content-type header is missing from object");return c}function a(s){this.parameters=Object.create(null),this.type=s}}),LE=MS(DE(),1);function F$(e){if(!e)return;try{return LE.parse(e).type}catch{let t=(e.split(";",1)[0]??"").trim().toLowerCase();if(t===""||e.slice(t.length).includes(","))return;return t}}function J$(e){if(e==="application/json")return!0;return F$(e)==="application/json"}var ZE=/^[A-Za-z0-9._-]{1,128}$/;function VE(e){let t=[];if(e.length===0)return{isValid:!1,warnings:["Tool name cannot be empty"]};if(e.length>128)return{isValid:!1,warnings:[`Tool name exceeds maximum length of 128 characters (current: ${e.length})`]};if(e.includes(" "))t.push("Tool name contains spaces, which may cause parsing issues");if(e.includes(","))t.push("Tool name contains commas, which may cause parsing issues");if(e.startsWith("-")||e.endsWith("-"))t.push("Tool name starts or ends with a dash, which may cause parsing issues in some contexts");if(e.startsWith(".")||e.endsWith("."))t.push("Tool name starts or ends with a dot, which may cause parsing issues in some contexts");if(!ZE.test(e)){let n=[...e].filter((o)=>!/[A-Za-z0-9._-]/.test(o)).filter((o,r,i)=>i.indexOf(o)===r);return t.push(`Tool name contains invalid characters: ${n.map((o)=>`"${o}"`).join(", ")}`,"Allowed characters are: A-Z, a-z, 0-9, underscore (_), dash (-), and dot (.)"),{isValid:!1,warnings:t}}return{isValid:!0,warnings:t}}function FE(e,t){if(t.length>0){console.warn(`Tool name validation warning for "${e}":`);for(let n of t)console.warn(` - ${n}`);console.warn("Tool registration will proceed, but this may cause compatibility issues."),console.warn("Consider updating the tool name to conform to the MCP tool naming standard."),console.warn("See SEP: Specify Format for Tool Names (https://github.com/modelcontextprotocol/modelcontextprotocol/issues/986) for more details.")}}function M_(e){let t=VE(e);return FE(e,t.warnings),t.isValid}function JE(e){return typeof e==="object"&&e!==null&&"_zod"in e}function HE(e){return typeof e==="object"&&e!==null&&!("_zod"in e)&&"_def"in e&&typeof e._def?.typeName==="string"}function KE(e){if(typeof e!=="object"||e===null)return!1;if(Ao(e))return!1;let t=Object.getPrototypeOf(e);if(t!==Object.prototype&&t!==null)return!1;return Object.values(e).every((n)=>JE(n))}function sd(e){if(e===void 0)return;if(KE(e))return h(e);if(typeof e==="object"&&e!==null&&!Ao(e)&&Object.values(e).some((t)=>HE(t)))throw TypeError("Raw-shape inputSchema/outputSchema/argsSchema fields must be Zod v4 schemas. Got a Zod v3 field schema. Import from `zod/v4` (or upgrade your zod import), or wrap with `z.object({...})` yourself.");if(!Ao(e))throw TypeError("inputSchema/outputSchema/argsSchema must be a Standard Schema (e.g. z.object({...})) or a raw Zod shape ({ field: z.string() }).");return e}function Da(e,t){let n=typeof e;if(n!==typeof t)return!1;if(Array.isArray(e)){if(!Array.isArray(t))return!1;let o=e.length;if(o!==t.length)return!1;for(let r=0;r<o;r++)if(!Da(e[r],t[r]))return!1;return!0}if(n==="object"){if(!e||!t)return e===t;let o=Object.keys(e),r=Object.keys(t);if(o.length!==r.length)return!1;for(let i of o)if(!Da(e[i],t[i]))return!1;return!0}return e===t}function Pt(e){return encodeURI(GE(e))}function GE(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}var BE={prefixItems:!0,items:!0,allOf:!0,anyOf:!0,oneOf:!0},WE={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependentSchemas:!0},YE={id:!0,$id:!0,$ref:!0,$schema:!0,$anchor:!0,$vocabulary:!0,$comment:!0,default:!0,enum:!0,const:!0,required:!0,type:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0},XE=typeof self<"u"&&self.location&&self.location.origin!=="null"?new URL(self.location.origin+self.location.pathname+location.search):new URL("https://github.com/cfworker");function Rn(e,t=Object.create(null),n=XE,o=""){if(e&&typeof e==="object"&&!Array.isArray(e)){let i=e.$id||e.id;if(i){let a=new URL(i,n.href);if(a.hash.length>1)t[a.href]=e;else if(a.hash="",o==="")n=a;else Rn(e,t,n)}}else if(e!==!0&&e!==!1)return t;let r=n.href+(o?"#"+o:"");if(t[r]!==void 0)throw Error(`Duplicate schema URI "${r}".`);if(t[r]=e,e===!0||e===!1)return t;if(e.__absolute_uri__===void 0)Object.defineProperty(e,"__absolute_uri__",{enumerable:!1,value:r});if(e.$ref&&e.__absolute_ref__===void 0){let i=new URL(e.$ref,n.href);i.hash=i.hash,Object.defineProperty(e,"__absolute_ref__",{enumerable:!1,value:i.href})}if(e.$recursiveRef&&e.__absolute_recursive_ref__===void 0){let i=new URL(e.$recursiveRef,n.href);i.hash=i.hash,Object.defineProperty(e,"__absolute_recursive_ref__",{enumerable:!1,value:i.href})}if(e.$anchor){let i=new URL("#"+e.$anchor,n.href);t[i.href]=e}for(let i in e){if(YE[i])continue;let a=`${o}/${Pt(i)}`,s=e[i];if(Array.isArray(s)){if(BE[i]){let c=s.length;for(let l=0;l<c;l++)Rn(s[l],t,n,`${a}/${l}`)}}else if(WE[i])for(let c in s)Rn(s[c],t,n,`${a}/${Pt(c)}`);else Rn(s,t,n,a)}return t}var QE=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,eT=[0,31,28,31,30,31,30,31,31,30,31,30,31],tT=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i,rT=/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,nT=/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,oT=/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,iT=/^(?:(?:https?|ftp):\/\/)(?:\S+(?::\S*)?@)?(?:(?!10(?:\.\d{1,3}){3})(?!127(?:\.\d{1,3}){3})(?!169\.254(?:\.\d{1,3}){2})(?!192\.168(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u{00a1}-\u{ffff}0-9]+-?)*[a-z\u{00a1}-\u{ffff}0-9]+)(?:\.(?:[a-z\u{00a1}-\u{ffff}0-9]+-?)*[a-z\u{00a1}-\u{ffff}0-9]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,aT=/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,sT=/^(?:\/(?:[^~/]|~0|~1)*)*$/,cT=/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,lT=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,uT=(e)=>{if(e[0]==='"')return!1;let[t,n,...o]=e.split("@");if(!t||!n||o.length!==0||t.length>64||n.length>253)return!1;if(t[0]==="."||t.endsWith(".")||t.includes(".."))return!1;if(!/^[a-z0-9.-]+$/i.test(n)||!/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+$/i.test(t))return!1;return n.split(".").every((r)=>/^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$/i.test(r))},dT=/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,mT=/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,pT=(e)=>e.length>1&&e.length<80&&(/^P\d+([.,]\d+)?W$/.test(e)||/^P[\dYMDTHS]*(\d[.,]\d+)?[YMDHS]$/.test(e)&&/^P([.,\d]+Y)?([.,\d]+M)?([.,\d]+D)?(T([.,\d]+H)?([.,\d]+M)?([.,\d]+S)?)?$/.test(e));function Wt(e){return e.test.bind(e)}var H$={date:K$,time:G$.bind(void 0,!1),"date-time":gT,duration:pT,uri:ST,"uri-reference":Wt(nT),"uri-template":Wt(oT),url:Wt(iT),email:uT,hostname:Wt(rT),ipv4:Wt(dT),ipv6:Wt(mT),regex:bT,uuid:Wt(aT),"json-pointer":Wt(sT),"json-pointer-uri-fragment":Wt(cT),"relative-json-pointer":Wt(lT)};function fT(e){return e%4===0&&(e%100!==0||e%400===0)}function K$(e){let t=e.match(QE);if(!t)return!1;let n=+t[1],o=+t[2],r=+t[3];return o>=1&&o<=12&&r>=1&&r<=(o==2&&fT(n)?29:eT[o])}function G$(e,t){let n=t.match(tT);if(!n)return!1;let o=+n[1],r=+n[2],i=+n[3],a=!!n[5];return(o<=23&&r<=59&&i<=59||o==23&&r==59&&i==60)&&(!e||a)}var hT=/t|\s/i;function gT(e){let t=e.split(hT);return t.length==2&&K$(t[0])&&G$(!0,t[1])}var vT=/\/|:/,_T=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function ST(e){return vT.test(e)&&_T.test(e)}var yT=/[^\\]\\Z/;function bT(e){if(yT.test(e))return!1;try{return new RegExp(e,"u"),!0}catch(t){return!1}}function $T(e){let t=0,n=e.length,o=0,r;while(o<n)if(t++,r=e.charCodeAt(o++),r>=55296&&r<=56319&&o<n){if(r=e.charCodeAt(o),(r&64512)==56320)o++}return t}function ye(e,t,n="2019-09",o=Rn(t),r=!0,i=null,a="#",s="#",c=Object.create(null)){if(t===!0)return{valid:!0,errors:[]};if(t===!1)return{valid:!1,errors:[{instanceLocation:a,keyword:"false",keywordLocation:a,error:"False boolean schema."}]};let l=typeof e,d;switch(l){case"boolean":case"number":case"string":d=l;break;case"object":if(e===null)d="null";else if(Array.isArray(e))d="array";else d="object";break;default:throw Error(`Instances of "${l}" type are not supported.`)}let{$ref:m,$recursiveRef:p,$recursiveAnchor:f,type:v,const:g,enum:b,required:R,not:L,anyOf:P,allOf:D,oneOf:E,if:ne,then:ue,else:Oe,format:Se,properties:Ie,patternProperties:Le,additionalProperties:zt,unevaluatedProperties:wt,minProperties:ft,maxProperties:ht,propertyNames:Ct,dependentRequired:Ye,dependentSchemas:gt,dependencies:qt,prefixItems:ct,items:Ze,additionalItems:Qt,unevaluatedItems:er,contains:At,minContains:Ne,maxContains:Ve,minItems:Fe,maxItems:Rt,uniqueItems:Br,minimum:lt,maximum:ut,exclusiveMinimum:Xe,exclusiveMaximum:vt,multipleOf:_t,minLength:Mt,maxLength:Ut,pattern:gr,__absolute_ref__:Dt,__absolute_recursive_ref__:Wr}=t,A=[];if(f===!0&&i===null)i=t;if(p==="#"){let B=i===null?o[Wr]:i,Z=`${s}/$recursiveRef`,te=ye(e,i===null?t:i,n,o,r,B,a,Z,c);if(!te.valid)A.push({instanceLocation:a,keyword:"$recursiveRef",keywordLocation:Z,error:"A subschema had errors."},...te.errors)}if(m!==void 0){let B=o[Dt||m];if(B===void 0){let M=`Unresolved $ref "${m}".`;if(Dt&&Dt!==m)M+=` Absolute URI "${Dt}".`;throw M+=`
|
|
78
78
|
Known schemas:
|
|
79
79
|
- ${Object.keys(o).join(`
|
|
80
|
-
- `)}`,Error(U)}let V=`${s}/$ref`,te=ye(e,B,n,o,r,i,a,V,c);if(!te.valid)M.push({instanceLocation:a,keyword:"$ref",keywordLocation:V,error:"A subschema had errors."},...te.errors);if(n==="4"||n==="7")return{valid:M.length===0,errors:M}}if(Array.isArray(v)){let B=v.length,V=!1;for(let te=0;te<B;te++)if(d===v[te]||v[te]==="integer"&&d==="number"&&e%1===0&&e===e){V=!0;break}if(!V)M.push({instanceLocation:a,keyword:"type",keywordLocation:`${s}/type`,error:`Instance type "${d}" is invalid. Expected "${v.join('", "')}".`})}else if(v==="integer"){if(d!=="number"||e%1||e!==e)M.push({instanceLocation:a,keyword:"type",keywordLocation:`${s}/type`,error:`Instance type "${d}" is invalid. Expected "${v}".`})}else if(v!==void 0&&d!==v)M.push({instanceLocation:a,keyword:"type",keywordLocation:`${s}/type`,error:`Instance type "${d}" is invalid. Expected "${v}".`});if(g!==void 0){if(d==="object"||d==="array"){if(!Da(e,g))M.push({instanceLocation:a,keyword:"const",keywordLocation:`${s}/const`,error:`Instance does not match ${JSON.stringify(g)}.`})}else if(e!==g)M.push({instanceLocation:a,keyword:"const",keywordLocation:`${s}/const`,error:`Instance does not match ${JSON.stringify(g)}.`})}if(b!==void 0){if(d==="object"||d==="array"){if(!b.some((B)=>Da(e,B)))M.push({instanceLocation:a,keyword:"enum",keywordLocation:`${s}/enum`,error:`Instance does not match any of ${JSON.stringify(b)}.`})}else if(!b.some((B)=>e===B))M.push({instanceLocation:a,keyword:"enum",keywordLocation:`${s}/enum`,error:`Instance does not match any of ${JSON.stringify(b)}.`})}if(Z!==void 0){let B=`${s}/not`;if(ye(e,Z,n,o,r,i,a,B).valid)M.push({instanceLocation:a,keyword:"not",keywordLocation:B,error:'Instance matched "not" schema.'})}let Vt=[];if(E!==void 0){let B=`${s}/anyOf`,V=M.length,te=!1;for(let U=0;U<E.length;U++){let N=E[U],Y=Object.create(c),W=ye(e,N,n,o,r,f===!0?i:null,a,`${B}/${U}`,Y);if(M.push(...W.errors),te=te||W.valid,W.valid)Vt.push(Y)}if(te)M.length=V;else M.splice(V,0,{instanceLocation:a,keyword:"anyOf",keywordLocation:B,error:"Instance does not match any subschemas."})}if(L!==void 0){let B=`${s}/allOf`,V=M.length,te=!0;for(let U=0;U<L.length;U++){let N=L[U],Y=Object.create(c),W=ye(e,N,n,o,r,f===!0?i:null,a,`${B}/${U}`,Y);if(M.push(...W.errors),te=te&&W.valid,W.valid)Vt.push(Y)}if(te)M.length=V;else M.splice(V,0,{instanceLocation:a,keyword:"allOf",keywordLocation:B,error:"Instance does not match every subschema."})}if(T!==void 0){let B=`${s}/oneOf`,V=M.length,te=T.filter((U,N)=>{let Y=Object.create(c),W=ye(e,U,n,o,r,f===!0?i:null,a,`${B}/${N}`,Y);if(M.push(...W.errors),W.valid)Vt.push(Y);return W.valid}).length;if(te===1)M.length=V;else M.splice(V,0,{instanceLocation:a,keyword:"oneOf",keywordLocation:B,error:`Instance does not match exactly one subschema (${te} matches).`})}if(d==="object"||d==="array")Object.assign(c,...Vt);if(ne!==void 0){let B=`${s}/if`;if(ye(e,ne,n,o,r,i,a,B,c).valid){if(ue!==void 0){let V=ye(e,ue,n,o,r,i,a,`${s}/then`,c);if(!V.valid)M.push({instanceLocation:a,keyword:"if",keywordLocation:B,error:'Instance does not match "then" schema.'},...V.errors)}}else if(Oe!==void 0){let V=ye(e,Oe,n,o,r,i,a,`${s}/else`,c);if(!V.valid)M.push({instanceLocation:a,keyword:"if",keywordLocation:B,error:'Instance does not match "else" schema.'},...V.errors)}}if(d==="object"){if(w!==void 0){for(let U of w)if(!(U in e))M.push({instanceLocation:a,keyword:"required",keywordLocation:`${s}/required`,error:`Instance does not have required property "${U}".`})}let B=Object.keys(e);if(gt!==void 0&&B.length<gt)M.push({instanceLocation:a,keyword:"minProperties",keywordLocation:`${s}/minProperties`,error:`Instance does not have at least ${gt} properties.`});if(vt!==void 0&&B.length>vt)M.push({instanceLocation:a,keyword:"maxProperties",keywordLocation:`${s}/maxProperties`,error:`Instance does not have at least ${vt} properties.`});if(At!==void 0){let U=`${s}/propertyNames`;for(let N in e){let Y=`${a}/${Tt(N)}`,W=ye(N,At,n,o,r,i,Y,U);if(!W.valid)M.push({instanceLocation:a,keyword:"propertyNames",keywordLocation:U,error:`Property name "${N}" does not match schema.`},...W.errors)}}if(Ye!==void 0){let U=`${s}/dependantRequired`;for(let N in Ye)if(N in e){let Y=Ye[N];for(let W of Y)if(!(W in e))M.push({instanceLocation:a,keyword:"dependentRequired",keywordLocation:U,error:`Instance has "${N}" but does not have "${W}".`})}}if(_t!==void 0)for(let U in _t){let N=`${s}/dependentSchemas`;if(U in e){let Y=ye(e,_t[U],n,o,r,i,a,`${N}/${Tt(U)}`,c);if(!Y.valid)M.push({instanceLocation:a,keyword:"dependentSchemas",keywordLocation:N,error:`Instance has "${U}" but does not match dependant schema.`},...Y.errors)}}if(Mt!==void 0){let U=`${s}/dependencies`;for(let N in Mt)if(N in e){let Y=Mt[N];if(Array.isArray(Y)){for(let W of Y)if(!(W in e))M.push({instanceLocation:a,keyword:"dependencies",keywordLocation:U,error:`Instance has "${N}" but does not have "${W}".`})}else{let W=ye(e,Y,n,o,r,i,a,`${U}/${Tt(N)}`);if(!W.valid)M.push({instanceLocation:a,keyword:"dependencies",keywordLocation:U,error:`Instance has "${N}" but does not match dependant schema.`},...W.errors)}}}let V=Object.create(null),te=!1;if(Ie!==void 0){let U=`${s}/properties`;for(let N in Ie){if(!(N in e))continue;let Y=`${a}/${Tt(N)}`,W=ye(e[N],Ie[N],n,o,r,i,Y,`${U}/${Tt(N)}`);if(W.valid)c[N]=V[N]=!0;else if(te=r,M.push({instanceLocation:a,keyword:"properties",keywordLocation:U,error:`Property "${N}" does not match schema.`},...W.errors),te)break}}if(!te&&Le!==void 0){let U=`${s}/patternProperties`;for(let N in Le){let Y=new RegExp(N,"u"),W=Le[N];for(let ke in e){if(!Y.test(ke))continue;let Wr=`${a}/${Tt(ke)}`,Ft=ye(e[ke],W,n,o,r,i,Wr,`${U}/${Tt(N)}`);if(Ft.valid)c[ke]=V[ke]=!0;else te=r,M.push({instanceLocation:a,keyword:"patternProperties",keywordLocation:U,error:`Property "${ke}" matches pattern "${N}" but does not match associated schema.`},...Ft.errors)}}}if(!te&&Rt!==void 0){let U=`${s}/additionalProperties`;for(let N in e){if(V[N])continue;let Y=`${a}/${Tt(N)}`,W=ye(e[N],Rt,n,o,r,i,Y,U);if(W.valid)c[N]=!0;else te=r,M.push({instanceLocation:a,keyword:"additionalProperties",keywordLocation:U,error:`Property "${N}" does not match additional properties schema.`},...W.errors)}}else if(!te&&xt!==void 0){let U=`${s}/unevaluatedProperties`;for(let N in e)if(!c[N]){let Y=`${a}/${Tt(N)}`,W=ye(e[N],xt,n,o,r,i,Y,U);if(W.valid)c[N]=!0;else M.push({instanceLocation:a,keyword:"unevaluatedProperties",keywordLocation:U,error:`Property "${N}" does not match unevaluated properties schema.`},...W.errors)}}}else if(d==="array"){if(kt!==void 0&&e.length>kt)M.push({instanceLocation:a,keyword:"maxItems",keywordLocation:`${s}/maxItems`,error:`Array has too many items (${e.length} > ${kt}).`});if(Fe!==void 0&&e.length<Fe)M.push({instanceLocation:a,keyword:"minItems",keywordLocation:`${s}/minItems`,error:`Array has too few items (${e.length} < ${Fe}).`});let B=e.length,V=0,te=!1;if(ct!==void 0){let U=`${s}/prefixItems`,N=Math.min(ct.length,B);for(;V<N;V++){let Y=ye(e[V],ct[V],n,o,r,i,`${a}/${V}`,`${U}/${V}`);if(c[V]=!0,!Y.valid){if(te=r,M.push({instanceLocation:a,keyword:"prefixItems",keywordLocation:U,error:"Items did not match schema."},...Y.errors),te)break}}}if(Ze!==void 0){let U=`${s}/items`;if(Array.isArray(Ze)){let N=Math.min(Ze.length,B);for(;V<N;V++){let Y=ye(e[V],Ze[V],n,o,r,i,`${a}/${V}`,`${U}/${V}`);if(c[V]=!0,!Y.valid){if(te=r,M.push({instanceLocation:a,keyword:"items",keywordLocation:U,error:"Items did not match schema."},...Y.errors),te)break}}}else for(;V<B;V++){let N=ye(e[V],Ze,n,o,r,i,`${a}/${V}`,U);if(c[V]=!0,!N.valid){if(te=r,M.push({instanceLocation:a,keyword:"items",keywordLocation:U,error:"Items did not match schema."},...N.errors),te)break}}if(!te&&er!==void 0){let N=`${s}/additionalItems`;for(;V<B;V++){let Y=ye(e[V],er,n,o,r,i,`${a}/${V}`,N);if(c[V]=!0,!Y.valid)te=r,M.push({instanceLocation:a,keyword:"additionalItems",keywordLocation:N,error:"Items did not match additional items schema."},...Y.errors)}}}if(Ut!==void 0)if(B===0&&Ne===void 0)M.push({instanceLocation:a,keyword:"contains",keywordLocation:`${s}/contains`,error:"Array is empty. It must contain at least one item matching the schema."});else if(Ne!==void 0&&B<Ne)M.push({instanceLocation:a,keyword:"minContains",keywordLocation:`${s}/minContains`,error:`Array has less items (${B}) than minContains (${Ne}).`});else{let U=`${s}/contains`,N=M.length,Y=0;for(let W=0;W<B;W++){let ke=ye(e[W],Ut,n,o,r,i,`${a}/${W}`,U);if(ke.valid)c[W]=!0,Y++;else M.push(...ke.errors)}if(Y>=(Ne||0))M.length=N;if(Ne===void 0&&Ve===void 0&&Y===0)M.splice(N,0,{instanceLocation:a,keyword:"contains",keywordLocation:U,error:"Array does not contain item matching schema."});else if(Ne!==void 0&&Y<Ne)M.push({instanceLocation:a,keyword:"minContains",keywordLocation:`${s}/minContains`,error:`Array must contain at least ${Ne} items matching schema. Only ${Y} items were found.`});else if(Ve!==void 0&&Y>Ve)M.push({instanceLocation:a,keyword:"maxContains",keywordLocation:`${s}/maxContains`,error:`Array may contain at most ${Ve} items matching schema. ${Y} items were found.`})}if(!te&&tr!==void 0){let U=`${s}/unevaluatedItems`;for(;V<B;V++){if(c[V])continue;let N=ye(e[V],tr,n,o,r,i,`${a}/${V}`,U);if(c[V]=!0,!N.valid)M.push({instanceLocation:a,keyword:"unevaluatedItems",keywordLocation:U,error:"Items did not match unevaluated items schema."},...N.errors)}}if(Gr)for(let U=0;U<B;U++){let N=e[U],Y=typeof N==="object"&&N!==null;for(let W=0;W<B;W++){if(U===W)continue;let ke=e[W];if(N===ke||Y&&typeof ke==="object"&&ke!==null&&Da(N,ke))M.push({instanceLocation:a,keyword:"uniqueItems",keywordLocation:`${s}/uniqueItems`,error:`Duplicate items at indexes ${U} and ${W}.`}),U=Number.MAX_SAFE_INTEGER,W=Number.MAX_SAFE_INTEGER}}}else if(d==="number"){if(n==="4"){if(lt!==void 0&&(Xe===!0&&e<=lt||e<lt))M.push({instanceLocation:a,keyword:"minimum",keywordLocation:`${s}/minimum`,error:`${e} is less than ${Xe?"or equal to ":""} ${lt}.`});if(ut!==void 0&&(St===!0&&e>=ut||e>ut))M.push({instanceLocation:a,keyword:"maximum",keywordLocation:`${s}/maximum`,error:`${e} is greater than ${St?"or equal to ":""} ${ut}.`})}else{if(lt!==void 0&&e<lt)M.push({instanceLocation:a,keyword:"minimum",keywordLocation:`${s}/minimum`,error:`${e} is less than ${lt}.`});if(ut!==void 0&&e>ut)M.push({instanceLocation:a,keyword:"maximum",keywordLocation:`${s}/maximum`,error:`${e} is greater than ${ut}.`});if(Xe!==void 0&&e<=Xe)M.push({instanceLocation:a,keyword:"exclusiveMinimum",keywordLocation:`${s}/exclusiveMinimum`,error:`${e} is less than ${Xe}.`});if(St!==void 0&&e>=St)M.push({instanceLocation:a,keyword:"exclusiveMaximum",keywordLocation:`${s}/exclusiveMaximum`,error:`${e} is greater than or equal to ${St}.`})}if(yt!==void 0){let B=e%yt;if(Math.abs(0-B)>=0.00000011920929&&Math.abs(yt-B)>=0.00000011920929)M.push({instanceLocation:a,keyword:"multipleOf",keywordLocation:`${s}/multipleOf`,error:`${e} is not a multiple of ${yt}.`})}}else if(d==="string"){let B=Dt===void 0&&Lt===void 0?0:$T(e);if(Dt!==void 0&&B<Dt)M.push({instanceLocation:a,keyword:"minLength",keywordLocation:`${s}/minLength`,error:`String is too short (${B} < ${Dt}).`});if(Lt!==void 0&&B>Lt)M.push({instanceLocation:a,keyword:"maxLength",keywordLocation:`${s}/maxLength`,error:`String is too long (${B} > ${Lt}).`});if(vr!==void 0&&!new RegExp(vr,"u").test(e))M.push({instanceLocation:a,keyword:"pattern",keywordLocation:`${s}/pattern`,error:"String does not match pattern."});if(Se!==void 0&&N$[Se]&&!N$[Se](e))M.push({instanceLocation:a,keyword:"format",keywordLocation:`${s}/format`,error:`String does not match format "${Se}".`})}return{valid:M.length===0,errors:M}}var zT=class{schema;draft;shortCircuit;lookup;constructor(e,t="2019-09",n=!0){this.schema=e,this.draft=t,this.shortCircuit=n,this.lookup=zn(e)}validate(e){return ye(e,this.schema,this.draft,this.lookup,this.shortCircuit)}addSchema(e,t){if(t)e={...e,$id:t};zn(e,this.lookup)}},od=class{shortcircuit;draft;constructor(e){this.shortcircuit=e?.shortcircuit??!0,this.draft=e?.draft}_draftFor(e){let t=DS(e,"pass an explicit { draft } to CfWorkerJsonSchemaValidator to validate other dialects.");return t==="draft-7"?"7":t}getValidator(e){let t=new zT(e,this.draft??this._draftFor(e),this.shortcircuit);return(n)=>{let o=t.validate(n);return o.valid?{valid:!0,data:n,errorMessage:void 0}:{valid:!1,data:void 0,errorMessage:o.errors.map((r)=>`${r.instanceLocation}: ${r.error}`).join("; ")}}}};var F$=Symbol.for("mcp.completable");function D_(e){return!!e&&typeof e==="object"&&F$ in e}function RT(e){return e[F$]?.complete}var J$=15000,xT=2147483647;function H$(e,t){if(!Number.isFinite(e)||e<1)return;let n=setInterval(t,Math.min(e,xT));return n.unref?.(),n}var kT=8,IT=600000;function PT(e){if(e?.maxRounds!==void 0&&(!Number.isInteger(e.maxRounds)||e.maxRounds<1))throw RangeError(`inputRequired.maxRounds must be a positive integer (got ${e.maxRounds})`);if(e?.roundTimeoutMs!==void 0&&(!Number.isFinite(e.roundTimeoutMs)||e.roundTimeoutMs<=0))throw RangeError(`inputRequired.roundTimeoutMs must be a positive number (got ${e.roundTimeoutMs})`);return{maxRounds:e?.maxRounds??kT,roundTimeoutMs:e?.roundTimeoutMs??IT,legacyShim:e?.legacyShim??!0}}function K$(e,t,n){if(n===null||typeof n!=="object"||typeof n.method!=="string")throw new G(O.InternalError,`Handler for ${e} returned an invalid input request '${t}': each inputRequests entry must be an embedded elicitation/create, sampling/createMessage, or roots/list request`);let o=n,r=n$(o);if(r===void 0)throw new G(O.InternalError,`Handler for ${e} returned an input request '${t}' of kind '${o.method}', which is not an embedded request the 2026-07-28 revision defines`);return{embedded:o,required:r}}function ET(){let e=globalThis.crypto;if(e?.randomUUID!==void 0)return e.randomUUID();let t=new Uint8Array(16);e.getRandomValues(t),t[6]=t[6]&15|64,t[8]=t[8]&63|128;let n=[...t].map((o)=>o.toString(16).padStart(2,"0")).join("");return`${n.slice(0,8)}-${n.slice(8,12)}-${n.slice(12,16)}-${n.slice(16,20)}-${n.slice(20)}`}function U_(e,t){if(e==="tools/call")return{content:[{type:"text",text:t}],isError:!0};throw new G(O.InternalError,t)}var TT=class{constructor(e){this._host=e}async fulfill(e,t,n,o,r){let{maxRounds:i,roundTimeoutMs:a}=this._host,s=o.mcpReq.signal,c=r,l=0;while(!0){if(l+=1,l>i)return U_(e,R$(e,i));let d=c.inputRequests,m=d!=null&&Object.keys(d).length>0,p=typeof c.requestState==="string"?c.requestState:void 0;if(!m&&p===void 0)throw new G(O.InternalError,`Handler for ${e} returned an input-required result with neither inputRequests nor requestState (every InputRequiredResult must include at least one of the two)`);let f;if(m){let b=this._host.resolvedClientCapabilities(o),w=[];for(let[E,L]of Object.entries(d)){let{embedded:T,required:ne}=K$(e,E,L);if(T.method!=="roots/list"&&T.params===void 0)throw new G(O.InternalError,`Handler for ${e} returned an input request '${E}' of kind '${T.method}' without params`);if(Xu(ne,b)!==void 0)return U_(e,`Cannot request input '${E}' (${T.method}): the client on this 2025-era connection did not declare the required capability${b===void 0?" (no client capabilities are available on this connection — per-request legacy serving cannot receive server-to-client requests)":""}`);w.push([E,T])}let Z=k$(s);try{let E={relatedRequestId:o.mcpReq.id,timeout:a,resetTimeoutOnProgress:!0,onprogress:()=>{},signal:Z.signal},L=await Promise.all(w.map(async([T,ne])=>{try{return[T,await this._dispatchLeg(ne,E)]}catch(ue){throw Z.abort(ue),ue}}));f=Object.fromEntries(L)}catch(E){if(s.aborted)throw E;return U_(e,`Fulfilling input required by '${e}' failed: ${E instanceof Error?E.message:String(E)}`)}finally{Z.dispose()}}else await x$(w$,s);let v={...o,mcpReq:{...o.mcpReq,inputResponses:f,droppedInputResponseKeys:void 0,requestState:Ua(p)}};if(p!==void 0){let b=await this._host.verifyRequestState(p,v,e);if(b!==void 0)v=C_(v,b)}let g=await t(n,v);if(!dr(g))return g;c=g}}async _dispatchLeg(e,t){switch(e.method){case"elicitation/create":{let n=e.params;if(n.mode==="url"&&n.elicitationId===void 0)n={...n,elicitationId:ET()};return await this._host.sendElicitation(n,t)}case"sampling/createMessage":return await this._host.sendSampling(e.params,t);case"roots/list":return await this._host.listRoots(e.params,t)}}},jT=new Set(["tools/call","prompts/get","resources/read"]),OT,NT,CT;var G$=class extends q_{_clientCapabilities;_clientVersion;static{OT=(e,t)=>{if(t.clientCapabilities!==void 0)e._clientCapabilities=t.clientCapabilities;if(t.clientInfo!==void 0)e._clientVersion=t.clientInfo},NT=(e,t)=>{let n=t.filter((o)=>!e._supportedProtocolVersions.includes(o));if(n.length>0)e._supportedProtocolVersions=[...e._supportedProtocolVersions,...n];e.setRequestHandler("server/discover",()=>e._ondiscover())},CT=(e)=>e._serverInfo}_capabilities;_instructions;_jsonSchemaValidator;_cacheHints;_requestStateVerify;_inputRequiredServing;_legacyShim;_legacyInputRequiredShim(){return this._legacyShim??=new TT({maxRounds:this._inputRequiredServing.maxRounds,roundTimeoutMs:this._inputRequiredServing.roundTimeoutMs,resolvedClientCapabilities:(e)=>this._inputRequestCapabilityView(e),verifyRequestState:(e,t,n)=>this._verifyRequestState(e,t,n),sendElicitation:(e,t)=>this._sendElicitationLeg(e,t,{validateAcceptedContent:!1}),sendSampling:(e,t)=>this.createMessage(e,t),listRoots:(e,t)=>this.listRoots(e,t)})}oninitialized;constructor(e,t){super(t);if(this._serverInfo=e,this._capabilities=t?.capabilities?{...t.capabilities}:{},this._instructions=t?.instructions,this._jsonSchemaValidator=t?.jsonSchemaValidator??new od,this._requestStateVerify=t?.requestState?.verify,this._inputRequiredServing=PT(t?.inputRequired),t?.cacheHints!==void 0){for(let[n,o]of Object.entries(t.cacheHints))if(o!==void 0)x_(o,`cacheHints['${n}']`);this._cacheHints=t.cacheHints}if(this.setRequestHandler("initialize",(n)=>this._oninitialize(n)),this.setNotificationHandler("notifications/initialized",()=>this.oninitialized?.()),y_(this._supportedProtocolVersions).length>0)this.setRequestHandler("server/discover",()=>this._ondiscover());if(this._capabilities.logging)this._registerLoggingHandler()}_registerLoggingHandler(){this.setRequestHandler("logging/setLevel",async(e,t)=>{let n=t.sessionId||t.http?.req?.headers.get("mcp-session-id")||void 0,{level:o}=e.params,r=rd(Ur,o);if(r.success)this._loggingLevels.set(n,r.data);return{}})}buildContext(e,t){let n=e.http||t?.request||t?.closeSSEStream||t?.closeStandaloneSSEStream;return{...e,mcpReq:{...e.mcpReq,log:(o,r,i)=>{if(!this._capabilities.logging)return Promise.resolve();let a;if(this._servedModernEra()){if(a=e.mcpReq.envelope?.[Or],a===void 0)return Promise.resolve()}else a=this._loggingLevels.get(e.sessionId)??this._loggingLevels.get(void 0);if(a!==void 0&&this.LOG_LEVEL_SEVERITY.get(o)<this.LOG_LEVEL_SEVERITY.get(a))return Promise.resolve();return e.mcpReq.notify({method:"notifications/message",params:{level:o,data:r,logger:i}})},elicitInput:(o,r)=>this.elicitInput(o,r),requestSampling:(o,r)=>this.createMessage(o,r)},http:n?{...e.http,req:t?.request,closeSSE:t?.closeSSEStream,closeStandaloneSSE:t?.closeStandaloneSSEStream}:void 0}}_loggingLevels=new Map;LOG_LEVEL_SEVERITY=new Map(Ur.options.map((e,t)=>[e,t]));isMessageIgnored=(e,t)=>{let n=this._loggingLevels.get(t);return n?this.LOG_LEVEL_SEVERITY.get(e)<this.LOG_LEVEL_SEVERITY.get(n):!1};registerCapabilities(e){if(this.transport)throw new re(ae.AlreadyConnected,"Cannot register capabilities after connecting to transport");let t=!!this._capabilities.logging;if(this._capabilities=A_(this._capabilities,e),!t&&this._capabilities.logging)this._registerLoggingHandler()}_wrapHandler(e,t){if(e!=="tools/call"){let n=this._cacheHints?.[e],o=jT.has(e);if(n===void 0&&!o)return async(r,i)=>{let a=await t(r,i);if(dr(a))throw new G(O.InternalError,`Handler for ${e} returned an input-required result, but only tools/call, prompts/get and resources/read support input_required (protocol revision 2026-07-28)`);return a};return async(r,i)=>{let a=o?await this._invokeInputRequiredCapableHandler(e,t,r,i):await t(r,i);if(dr(a)){if(!o)throw new G(O.InternalError,`Handler for ${e} returned an input-required result, but only tools/call, prompts/get and resources/read support input_required (protocol revision 2026-07-28)`);return a}return n===void 0?a:Qu(a,n)}}return async(n,o)=>{let r=No(this._negotiatedProtocolVersion),i=r.validateRequest("tools/call",n);if(!i.ok)throw new G(i.reason==="not-in-era"?O.InternalError:O.InvalidParams,i.reason==="not-in-era"?"No wire schema for tools/call in the resolved era":`Invalid tools/call request: ${i.message}`);let a=await this._invokeInputRequiredCapableHandler("tools/call",t,n,o);if(dr(a))return a;let s=b_(a),c=r.validateResult("tools/call",s);if(!c.ok)throw new G(c.reason==="not-in-era"?O.InternalError:O.InvalidParams,c.reason==="not-in-era"?"No wire schema for tools/call in the resolved era":`Invalid tools/call result: ${c.message}`);return c.value}}_servedModernEra(){return this._negotiatedProtocolVersion!==void 0&&Aa(this._negotiatedProtocolVersion)}async _invokeInputRequiredCapableHandler(e,t,n,o){let r=this._servedModernEra(),i=o.mcpReq.requestState();if(i!==void 0&&typeof i!=="string")throw new G(O.InvalidParams,"Invalid or expired requestState",{reason:"invalid_request_state"});let a=o;if(typeof i==="string"){let m=await this._verifyRequestState(i,o,e);if(m!==void 0)a=C_(o,m)}let s;try{s=await t(n,a)}catch(m){if(m instanceof G&&m.code===O.UrlElicitationRequired){if(!r)throw m;throw new G(O.InternalError,`URL elicitation cannot be signalled by throwing UrlElicitationRequiredError on protocol revision ${this._negotiatedProtocolVersion}: return inputRequired({ inputRequests: { …: inputRequired.elicitUrl(...) } }) from the handler instead. The urlElicitationRequired error (-32042) of earlier revisions is not available on this revision.`)}throw m}if(!dr(s))return s;if(!r){if(!this._inputRequiredServing.legacyShim)throw new G(O.InternalError,`Handler for ${e} returned an input-required result, but this request is served on protocol revision ${this._negotiatedProtocolVersion??vn}, which has no input_required vocabulary`);return await this._legacyInputRequiredShim().fulfill(e,t,n,a,s)}let c=s.inputRequests,l=c!=null&&Object.keys(c).length>0,d=typeof s.requestState==="string";if(!l&&!d)throw new G(O.InternalError,`Handler for ${e} returned an input-required result with neither inputRequests nor requestState (every InputRequiredResult must include at least one of the two)`);if(l){let m=this._inputRequestCapabilityView(o);for(let[p,f]of Object.entries(c)){let{embedded:v,required:g}=K$(e,p,f),b=Xu(g,m);if(b!==void 0)throw new td({requiredCapabilities:b},`Cannot request input '${p}' (${v.method}): the request's client capabilities do not declare the required capability`)}}return s}async _verifyRequestState(e,t,n){if(this._requestStateVerify===void 0)return;try{return await this._requestStateVerify(e,t)}catch(o){throw this.onerror?.(Error(`requestState verification rejected ${n}: ${o instanceof Error?o.message:String(o)}`)),new G(O.InvalidParams,"Invalid or expired requestState",{reason:"invalid_request_state"})}}_inputRequestCapabilityView(e){return this._servedModernEra()?e.mcpReq.envelope?.[lr]:this._clientCapabilities}_assertPushApiInServedEra(e){if(this._servedModernEra())throw new re(ae.MethodNotSupportedByProtocolVersion,`Server-to-client requests are not available on protocol revision ${this._negotiatedProtocolVersion}: '${e}' cannot be sent while serving a request on that revision. Return inputRequired({ ... }) from the handler instead — the client fulfils the embedded requests and retries the original request (multi round-trip requests).`,{method:e,era:"2026-07-28"})}assertCapabilityForMethod(e){switch(e){case"sampling/createMessage":if(!this._clientCapabilities?.sampling)throw new re(ae.CapabilityNotSupported,`Client does not support sampling (required for ${e})`);break;case"elicitation/create":if(!this._clientCapabilities?.elicitation)throw new re(ae.CapabilityNotSupported,`Client does not support elicitation (required for ${e})`);break;case"roots/list":if(!this._clientCapabilities?.roots)throw new re(ae.CapabilityNotSupported,`Client does not support listing roots (required for ${e})`);break;case"ping":break}}assertNotificationCapability(e){switch(e){case"notifications/message":if(!this._capabilities.logging)throw new re(ae.CapabilityNotSupported,`Server does not support logging (required for ${e})`);break;case"notifications/resources/updated":case"notifications/resources/list_changed":if(!this._capabilities.resources)throw new re(ae.CapabilityNotSupported,`Server does not support notifying about resources (required for ${e})`);break;case"notifications/tools/list_changed":if(!this._capabilities.tools)throw new re(ae.CapabilityNotSupported,`Server does not support notifying of tool list changes (required for ${e})`);break;case"notifications/prompts/list_changed":if(!this._capabilities.prompts)throw new re(ae.CapabilityNotSupported,`Server does not support notifying of prompt list changes (required for ${e})`);break;case"notifications/elicitation/complete":if(!this._clientCapabilities?.elicitation?.url)throw new re(ae.CapabilityNotSupported,`Client does not support URL elicitation (required for ${e})`);break;case"notifications/cancelled":break;case"notifications/progress":break}}assertRequestHandlerCapability(e){switch(e){case"completion/complete":if(!this._capabilities.completions)throw new re(ae.CapabilityNotSupported,`Server does not support completions (required for ${e})`);break;case"logging/setLevel":if(!this._capabilities.logging)throw new re(ae.CapabilityNotSupported,`Server does not support logging (required for ${e})`);break;case"prompts/get":case"prompts/list":if(!this._capabilities.prompts)throw new re(ae.CapabilityNotSupported,`Server does not support prompts (required for ${e})`);break;case"resources/list":case"resources/templates/list":case"resources/read":if(!this._capabilities.resources)throw new re(ae.CapabilityNotSupported,`Server does not support resources (required for ${e})`);break;case"tools/call":case"tools/list":if(!this._capabilities.tools)throw new re(ae.CapabilityNotSupported,`Server does not support tools (required for ${e})`);break;case"ping":case"initialize":break}}async _oninitialize(e){let t=e.params.protocolVersion;this._clientCapabilities=e.params.capabilities,this._clientVersion=e.params.clientInfo;let n=o$(this._supportedProtocolVersions),o=n.includes(t)?t:n[0]??vn;return this._negotiatedProtocolVersion=o,this.transport?.setProtocolVersion?.(o),{protocolVersion:o,capabilities:this.getCapabilities(),serverInfo:this._serverInfo,...this._instructions&&{instructions:this._instructions}}}_ondiscover(){return{supportedVersions:y_(this._supportedProtocolVersions),capabilities:qT(this.getCapabilities()),...this._instructions&&{instructions:this._instructions}}}_outboundServerInfo(){return this._serverInfo}getClientCapabilities(){return this._clientCapabilities}getClientVersion(){return this._clientVersion}getNegotiatedProtocolVersion(){return this._negotiatedProtocolVersion}projectCallToolResult(e,t){return this._wireCodec().projectCallToolResult(e,t)}getCapabilities(){return this._capabilities}async ping(){return this._assertPushApiInServedEra("ping"),this.request({method:"ping"})}async createMessage(e,t){if(this._assertPushApiInServedEra("sampling/createMessage"),(e.tools||e.toolChoice)&&!this._clientCapabilities?.sampling?.tools)throw new re(ae.CapabilityNotSupported,"Client does not support sampling tools capability.");if(e.messages.length>0){let i=e.messages.at(-1),a=Array.isArray(i.content)?i.content:[i.content],s=a.some((m)=>m.type==="tool_result"),c=e.messages.length>1?e.messages.at(-2):void 0,l=c?Array.isArray(c.content)?c.content:[c.content]:[],d=l.some((m)=>m.type==="tool_use");if(s){if(a.some((m)=>m.type!=="tool_result"))throw new G(O.InvalidParams,"The last message must contain only tool_result content if any is present");if(!d)throw new G(O.InvalidParams,"tool_result blocks are not matching any tool_use from the previous message")}if(d){let m=new Set(l.filter((f)=>f.type==="tool_use").map((f)=>f.id)),p=new Set(a.filter((f)=>f.type==="tool_result").map((f)=>f.toolUseId));if(m.size!==p.size||![...m].every((f)=>p.has(f)))throw new G(O.InvalidParams,"ids of tool_result blocks and tool_use blocks from previous message do not match")}}let n=Boolean(e.tools||e.toolChoice),o=await this.request({method:"sampling/createMessage",params:e},t),r=this._wireCodec().samplingResultVariant(n,o);if(!r.ok)throw new re(ae.InvalidResult,`Invalid sampling/createMessage result: ${r.reason==="invalid"?r.message:r.reason}`);return r.value}async elicitInput(e,t){switch(this._assertPushApiInServedEra("elicitation/create"),e.mode??"form"){case"url":if(!this._clientCapabilities?.elicitation?.url)throw new re(ae.CapabilityNotSupported,"Client does not support url elicitation.");break;case"form":if(!this._clientCapabilities?.elicitation?.form)throw new re(ae.CapabilityNotSupported,"Client does not support form elicitation.");break}return this._sendElicitationLeg(e,t)}async _sendElicitationLeg(e,t,n){let o=e.mode??"form",r=n?.validateAcceptedContent??!0;switch(o){case"url":{let i=e;return this.request({method:"elicitation/create",params:i},t)}case"form":{let i=e.mode==="form"?e:{...e,mode:"form"},a=await this.request({method:"elicitation/create",params:i},t);if(r&&a.action==="accept"&&a.content&&i.requestedSchema)try{let s=this._jsonSchemaValidator.getValidator(i.requestedSchema)(a.content);if(!s.valid)throw new G(O.InvalidParams,`Elicitation response content does not match requested schema: ${s.errorMessage}`)}catch(s){if(s instanceof G)throw s;throw new G(O.InternalError,`Error validating elicitation response: ${s instanceof Error?s.message:String(s)}`)}return a}}}createElicitationCompletionNotifier(e,t){if(!this._clientCapabilities?.elicitation?.url)throw new re(ae.CapabilityNotSupported,"Client does not support URL elicitation (required for notifications/elicitation/complete)");return()=>this.notification({method:"notifications/elicitation/complete",params:{elicitationId:e}},t)}async listRoots(e,t){return this._assertPushApiInServedEra("roots/list"),this.request({method:"roots/list",params:e},t)}async sendLoggingMessage(e,t){if(this._capabilities.logging&&!this.isMessageIgnored(e.level,t))return this.notification({method:"notifications/message",params:e})}async sendResourceUpdated(e){return this.notification({method:"notifications/resources/updated",params:e})}async sendResourceListChanged(){return this.notification({method:"notifications/resources/list_changed"})}async sendToolListChanged(){return this.notification({method:"notifications/tools/list_changed"})}async sendPromptListChanged(){return this.notification({method:"notifications/prompts/list_changed"})}};function qT(e){return{...e}}var B$=class{server;_registeredResources={};_registeredResourceTemplates={};_registeredTools={};_registeredPrompts={};_toolInputSchemaJson={};toolInputSchemaJson(e){let t=this._registeredTools[e];if(t===void 0||!t.enabled)return;if(Object.hasOwn(this._toolInputSchemaJson,e))return this._toolInputSchemaJson[e];if(t.inputSchema===void 0)return M$;try{let n=Lr(t.inputSchema,"input");return this._toolInputSchemaJson[e]=n,n}catch{return}}constructor(e,t){if(this.server=new G$(e,t),t?.capabilities?.tools)this.setToolRequestHandlers();if(t?.capabilities?.resources)this.setResourceRequestHandlers();if(t?.capabilities?.prompts)this.setPromptRequestHandlers()}async connect(e){return await this.server.connect(e)}async close(){await this.server.close()}_toolHandlersInitialized=!1;setToolRequestHandlers(){if(this._toolHandlersInitialized)return;this.server.assertCanSetRequestHandler("tools/list"),this.server.assertCanSetRequestHandler("tools/call"),this.server.registerCapabilities({tools:{listChanged:this.server.getCapabilities().tools?.listChanged??!0}}),this.server.setRequestHandler("tools/list",()=>({tools:Object.entries(this._registeredTools).filter(([,e])=>e.enabled).map(([e,t])=>{let n={name:e,title:t.title,description:t.description,inputSchema:t.inputSchema?Lr(t.inputSchema,"input"):M$,annotations:t.annotations,icons:t.icons,execution:t.execution,_meta:t._meta};if(t.outputSchema)n.outputSchema=Lr(t.outputSchema,"output");return n})})),this.server.setRequestHandler("tools/call",async(e,t)=>{let n=this._registeredTools[e.params.name];if(!n)throw new G(O.InvalidParams,`Tool ${e.params.name} not found`);if(!n.enabled)throw new G(O.InvalidParams,`Tool ${e.params.name} disabled`);try{let o=await this.validateToolInput(n,e.params.arguments,e.params.name),r=await this.executeToolHandler(n,o,t);if(await this.validateToolOutput(n,r,e.params.name),dr(r))return r;return this.server.projectCallToolResult(r,n.outputSchemaJson)}catch(o){if(o instanceof G&&o.code===O.UrlElicitationRequired)throw o;return this.createToolError(o instanceof Error?o.message:String(o))}}),this._toolHandlersInitialized=!0}createToolError(e){return{content:[{type:"text",text:e}],isError:!0}}async validateToolInput(e,t,n){if(!e.inputSchema)return;let o=await bn(e.inputSchema,t??{});if(!o.success)throw new G(O.InvalidParams,`Input validation error: Invalid arguments for tool ${n}: ${o.error}`);return o.data}async validateToolOutput(e,t,n){if(!e.outputSchema)return;if(dr(t))return;if(t.isError)return;if(t.structuredContent===void 0)throw new G(O.InvalidParams,`Output validation error: Tool ${n} has an output schema but no structured content was provided`);let o=await bn(e.outputSchema,t.structuredContent);if(!o.success)throw new G(O.InvalidParams,`Output validation error: Invalid structured content for tool ${n}: ${o.error}`)}async executeToolHandler(e,t,n){return e.executor(t,n)}_completionHandlerInitialized=!1;setCompletionRequestHandler(){if(this._completionHandlerInitialized)return;this.server.assertCanSetRequestHandler("completion/complete"),this.server.registerCapabilities({completions:{}}),this.server.setRequestHandler("completion/complete",async(e)=>{switch(e.params.ref.type){case"ref/prompt":return T_(e),this.handlePromptCompletion(e,e.params.ref);case"ref/resource":return j_(e),this.handleResourceCompletion(e,e.params.ref);default:throw new G(O.InvalidParams,`Invalid completion reference: ${e.params.ref}`)}}),this._completionHandlerInitialized=!0}async handlePromptCompletion(e,t){let n=this._registeredPrompts[t.name];if(!n)throw new G(O.InvalidParams,`Prompt ${t.name} not found`);if(!n.enabled)throw new G(O.InvalidParams,`Prompt ${t.name} disabled`);if(!n.argsSchema)return La;let o=V$(Z$(n.argsSchema)?.[e.params.argument.name]);if(!D_(o))return La;let r=RT(o);if(!r)return La;return L$(await r(e.params.argument.value,e.params.context))}async handleResourceCompletion(e,t){let n=Object.values(this._registeredResourceTemplates).find((r)=>r.resourceTemplate.uriTemplate.toString()===t.uri);if(!n){if(this._registeredResources[t.uri])return La;throw new G(O.InvalidParams,`Resource template ${e.params.ref.uri} not found`)}let o=n.resourceTemplate.completeCallback(e.params.argument.name);if(!o)return La;return L$(await o(e.params.argument.value,e.params.context))}_resourceHandlersInitialized=!1;setResourceRequestHandlers(){if(this._resourceHandlersInitialized)return;this.server.assertCanSetRequestHandler("resources/list"),this.server.assertCanSetRequestHandler("resources/templates/list"),this.server.assertCanSetRequestHandler("resources/read"),this.server.registerCapabilities({resources:{listChanged:this.server.getCapabilities().resources?.listChanged??!0}}),this.server.setRequestHandler("resources/list",async(e,t)=>{let n=Object.entries(this._registeredResources).filter(([r,i])=>i.enabled).map(([r,i])=>({uri:r,name:i.name,...i.metadata})),o=[];for(let r of Object.values(this._registeredResourceTemplates)){if(!r.resourceTemplate.listCallback)continue;let i=await r.resourceTemplate.listCallback(t);for(let a of i.resources)o.push({...r.metadata,...a})}return{resources:[...n,...o]}}),this.server.setRequestHandler("resources/templates/list",async()=>({resourceTemplates:Object.entries(this._registeredResourceTemplates).map(([e,t])=>({name:e,uriTemplate:t.resourceTemplate.uriTemplate.toString(),...t.metadata}))})),this.server.setRequestHandler("resources/read",async(e,t)=>{let n;try{n=new URL(e.params.uri)}catch{throw new G(O.InvalidParams,`Resource URI ${e.params.uri} is invalid`,{uri:e.params.uri,reason:"invalid_uri"})}let o=this._registeredResources[n.toString()];if(o){if(!o.enabled)throw new G(O.InvalidParams,`Resource ${n} disabled`);return Qu(await o.readCallback(n,t),o.cacheHint)}for(let r of Object.values(this._registeredResourceTemplates)){let i=r.resourceTemplate.uriTemplate.match(n.toString());if(i)return Qu(await r.readCallback(n,i,t),r.cacheHint)}throw new ed(e.params.uri)}),this._resourceHandlersInitialized=!0}_promptHandlersInitialized=!1;setPromptRequestHandlers(){if(this._promptHandlersInitialized)return;this.server.assertCanSetRequestHandler("prompts/list"),this.server.assertCanSetRequestHandler("prompts/get"),this.server.registerCapabilities({prompts:{listChanged:this.server.getCapabilities().prompts?.listChanged??!0}}),this.server.setRequestHandler("prompts/list",()=>({prompts:Object.entries(this._registeredPrompts).filter(([,e])=>e.enabled).map(([e,t])=>({name:e,title:t.title,description:t.description,arguments:t.argsSchema?z$(t.argsSchema):void 0,icons:t.icons,_meta:t._meta}))})),this.server.setRequestHandler("prompts/get",async(e,t)=>{let n=this._registeredPrompts[e.params.name];if(!n)throw new G(O.InvalidParams,`Prompt ${e.params.name} not found`);if(!n.enabled)throw new G(O.InvalidParams,`Prompt ${e.params.name} disabled`);return n.handler(e.params.arguments,t)}),this._promptHandlersInitialized=!0}registerResource(e,t,n,o){let r=n.cacheHint,i=n;if(r!==void 0){x_(r,`resource ${e}`);let a={...n};delete a.cacheHint,i=a}if(typeof t==="string"){if(this._registeredResources[t])throw Error(`Resource ${t} is already registered`);let a=this._createRegisteredResource(e,n.title,t,i,o);if(r!==void 0)a.cacheHint=r;return this.setResourceRequestHandlers(),this.sendResourceListChanged(),a}else{if(this._registeredResourceTemplates[e])throw Error(`Resource template ${e} is already registered`);let a=this._createRegisteredResourceTemplate(e,n.title,t,i,o);if(r!==void 0)a.cacheHint=r;return this.setResourceRequestHandlers(),this.sendResourceListChanged(),a}}_createRegisteredResource(e,t,n,o,r){let i={name:e,title:t,metadata:o,readCallback:r,enabled:!0,disable:()=>i.update({enabled:!1}),enable:()=>i.update({enabled:!0}),remove:()=>i.update({uri:null}),update:(a)=>{if(a.uri!==void 0&&a.uri!==n){if(delete this._registeredResources[n],a.uri)this._registeredResources[a.uri]=i}if(a.name!==void 0)i.name=a.name;if(a.title!==void 0)i.title=a.title;if(a.metadata!==void 0)i.metadata=a.metadata;if(a.callback!==void 0)i.readCallback=a.callback;if(a.enabled!==void 0)i.enabled=a.enabled;this.sendResourceListChanged()}};return this._registeredResources[n]=i,i}_createRegisteredResourceTemplate(e,t,n,o,r){let i={resourceTemplate:n,title:t,metadata:o,readCallback:r,enabled:!0,disable:()=>i.update({enabled:!1}),enable:()=>i.update({enabled:!0}),remove:()=>i.update({name:null}),update:(s)=>{if(s.name!==void 0&&s.name!==e){if(delete this._registeredResourceTemplates[e],s.name)this._registeredResourceTemplates[s.name]=i}if(s.title!==void 0)i.title=s.title;if(s.template!==void 0)i.resourceTemplate=s.template;if(s.metadata!==void 0)i.metadata=s.metadata;if(s.callback!==void 0)i.readCallback=s.callback;if(s.enabled!==void 0)i.enabled=s.enabled;this.sendResourceListChanged()}};this._registeredResourceTemplates[e]=i;let a=n.uriTemplate.variableNames;if(Array.isArray(a)&&a.some((s)=>!!n.completeCallback(s)))this.setCompletionRequestHandler();return i}_createRegisteredPrompt(e,t,n,o,r,i,a){let s=o,c=r,l={title:t,description:n,argsSchema:o,icons:i,_meta:a,handler:D$(e,o,r),enabled:!0,disable:()=>l.update({enabled:!1}),enable:()=>l.update({enabled:!0}),remove:()=>l.update({name:null}),update:(d)=>{if(d.name!==void 0&&d.name!==e){if(delete this._registeredPrompts[e],d.name)this._registeredPrompts[d.name]=l}if(d.title!==void 0)l.title=d.title;if(d.description!==void 0)l.description=d.description;if(d.icons!==void 0)l.icons=d.icons;if(d._meta!==void 0)l._meta=d._meta;let m=!1;if(d.argsSchema!==void 0)l.argsSchema=d.argsSchema,s=d.argsSchema,m=!0;if(d.callback!==void 0)c=d.callback,m=!0;if(m)l.handler=D$(e,s,c);if(d.enabled!==void 0)l.enabled=d.enabled;this.sendPromptListChanged()}};if(this._registeredPrompts[e]=l,o){let d=Z$(o);if(d){if(Object.values(d).some((m)=>D_(V$(m))))this.setCompletionRequestHandler()}}return l}_createRegisteredTool(e,t,n,o,r,i,a,s,c,l){if(M_(e),o!==void 0)try{let p=Lr(o,"input");this._toolInputSchemaJson[e]=p;let f=O_(p);if(!f.valid)console.warn(`[mcp-sdk] tool '${e}' carries an invalid x-mcp-header declaration and will be excluded by conforming Streamable HTTP clients: ${f.reason}`)}catch{}let d=l,m={title:t,description:n,inputSchema:o,outputSchema:r,outputSchemaJson:U$(r),annotations:i,icons:a,execution:s,_meta:c,handler:l,executor:A$(o,l),enabled:!0,disable:()=>m.update({enabled:!1}),enable:()=>m.update({enabled:!0}),remove:()=>m.update({name:null}),update:(p)=>{if(p.name!==void 0&&p.name!==e){if(typeof p.name==="string")M_(p.name);if(delete this._registeredTools[e],delete this._toolInputSchemaJson[e],p.name)delete this._toolInputSchemaJson[p.name],this._registeredTools[p.name]=m,e=p.name}if(p.title!==void 0)m.title=p.title;if(p.description!==void 0)m.description=p.description;let f=!1;if(p.paramsSchema!==void 0)m.inputSchema=p.paramsSchema,delete this._toolInputSchemaJson[e],f=!0;if(p.callback!==void 0)m.handler=p.callback,d=p.callback,f=!0;if(f)m.executor=A$(m.inputSchema,d);if(p.outputSchema!==void 0)m.outputSchema=p.outputSchema,m.outputSchemaJson=U$(p.outputSchema);if(p.annotations!==void 0)m.annotations=p.annotations;if(p.icons!==void 0)m.icons=p.icons;if(p._meta!==void 0)m._meta=p._meta;if(p.enabled!==void 0)m.enabled=p.enabled;this.sendToolListChanged()}};return this._registeredTools[e]=m,this.setToolRequestHandlers(),this.sendToolListChanged(),m}registerTool(e,t,n){if(this._registeredTools[e])throw Error(`Tool ${e} is already registered`);let{title:o,description:r,inputSchema:i,outputSchema:a,annotations:s,icons:c,_meta:l}=t;return this._createRegisteredTool(e,o,r,nd(i),nd(a),s,c,void 0,l,n)}registerPrompt(e,t,n){if(this._registeredPrompts[e])throw Error(`Prompt ${e} is already registered`);let{title:o,description:r,argsSchema:i,icons:a,_meta:s}=t,c=this._createRegisteredPrompt(e,o,r,nd(i),n,a,s);return this.setPromptRequestHandlers(),this.sendPromptListChanged(),c}isConnected(){return this.server.transport!==void 0}async sendLoggingMessage(e,t){return this.server.sendLoggingMessage(e,t)}sendResourceListChanged(){if(this.isConnected())this.server.sendResourceListChanged()}sendToolListChanged(){if(this.isConnected())this.server.sendToolListChanged()}sendPromptListChanged(){if(this.isConnected())this.server.sendPromptListChanged()}};function A$(e,t){if(e){let o=t;return async(r,i)=>o(r,i)}let n=t;return async(o,r)=>n(r)}var M$={type:"object",properties:{}};function U$(e){if(e===void 0)return;try{return Lr(e,"output")}catch{return}}function D$(e,t,n){if(t){let o=n;return async(r,i)=>{let a=await bn(t,r);if(!a.success)throw new G(O.InvalidParams,`Invalid arguments for prompt ${e}: ${a.error}`);return o(a.data,i)}}else{let o=n;return async(r,i)=>o(i)}}function L$(e){return{completion:{values:e.map(String).slice(0,100),total:e.length,hasMore:e.length>100}}}var La={completion:{values:[],hasMore:!1}};function Z$(e){let t=e;if(t.shape&&typeof t.shape==="object")return t.shape}function AT(e){return e?.type==="optional"}function V$(e){if(!AT(e))return e;return e.def?.innerType??e}var MT=class{sessionIdGenerator;_started=!1;_closed=!1;_streamMapping=new Map;_requestToStreamMapping=new Map;_requestResponseMap=new Map;_initialized=!1;_enableJsonResponse=!1;_standaloneSseStreamId="_GET_stream";_eventStore;_onsessioninitialized;_onsessionclosed;_allowedHosts;_allowedOrigins;_enableDnsRebindingProtection;_retryInterval;_supportedProtocolVersions;_keepAliveMs;sessionId;onclose;onerror;onmessage;constructor(e={}){this.sessionIdGenerator=e.sessionIdGenerator,this._enableJsonResponse=e.enableJsonResponse??!1,this._eventStore=e.eventStore,this._onsessioninitialized=e.onsessioninitialized,this._onsessionclosed=e.onsessionclosed,this._allowedHosts=e.allowedHosts,this._allowedOrigins=e.allowedOrigins,this._enableDnsRebindingProtection=e.enableDnsRebindingProtection??!1,this._retryInterval=e.retryInterval,this._supportedProtocolVersions=e.supportedProtocolVersions??oa,this._keepAliveMs=e.keepAliveMs??J$}startKeepAlive(e,t){if(this._closed)return;let n=H$(this._keepAliveMs,()=>{try{e.enqueue(t.encode(`: keepalive
|
|
80
|
+
- `)}`,Error(M)}let Z=`${s}/$ref`,te=ye(e,B,n,o,r,i,a,Z,c);if(!te.valid)A.push({instanceLocation:a,keyword:"$ref",keywordLocation:Z,error:"A subschema had errors."},...te.errors);if(n==="4"||n==="7")return{valid:A.length===0,errors:A}}if(Array.isArray(v)){let B=v.length,Z=!1;for(let te=0;te<B;te++)if(d===v[te]||v[te]==="integer"&&d==="number"&&e%1===0&&e===e){Z=!0;break}if(!Z)A.push({instanceLocation:a,keyword:"type",keywordLocation:`${s}/type`,error:`Instance type "${d}" is invalid. Expected "${v.join('", "')}".`})}else if(v==="integer"){if(d!=="number"||e%1||e!==e)A.push({instanceLocation:a,keyword:"type",keywordLocation:`${s}/type`,error:`Instance type "${d}" is invalid. Expected "${v}".`})}else if(v!==void 0&&d!==v)A.push({instanceLocation:a,keyword:"type",keywordLocation:`${s}/type`,error:`Instance type "${d}" is invalid. Expected "${v}".`});if(g!==void 0){if(d==="object"||d==="array"){if(!Da(e,g))A.push({instanceLocation:a,keyword:"const",keywordLocation:`${s}/const`,error:`Instance does not match ${JSON.stringify(g)}.`})}else if(e!==g)A.push({instanceLocation:a,keyword:"const",keywordLocation:`${s}/const`,error:`Instance does not match ${JSON.stringify(g)}.`})}if(b!==void 0){if(d==="object"||d==="array"){if(!b.some((B)=>Da(e,B)))A.push({instanceLocation:a,keyword:"enum",keywordLocation:`${s}/enum`,error:`Instance does not match any of ${JSON.stringify(b)}.`})}else if(!b.some((B)=>e===B))A.push({instanceLocation:a,keyword:"enum",keywordLocation:`${s}/enum`,error:`Instance does not match any of ${JSON.stringify(b)}.`})}if(L!==void 0){let B=`${s}/not`;if(ye(e,L,n,o,r,i,a,B).valid)A.push({instanceLocation:a,keyword:"not",keywordLocation:B,error:'Instance matched "not" schema.'})}let Lt=[];if(P!==void 0){let B=`${s}/anyOf`,Z=A.length,te=!1;for(let M=0;M<P.length;M++){let O=P[M],Y=Object.create(c),W=ye(e,O,n,o,r,f===!0?i:null,a,`${B}/${M}`,Y);if(A.push(...W.errors),te=te||W.valid,W.valid)Lt.push(Y)}if(te)A.length=Z;else A.splice(Z,0,{instanceLocation:a,keyword:"anyOf",keywordLocation:B,error:"Instance does not match any subschemas."})}if(D!==void 0){let B=`${s}/allOf`,Z=A.length,te=!0;for(let M=0;M<D.length;M++){let O=D[M],Y=Object.create(c),W=ye(e,O,n,o,r,f===!0?i:null,a,`${B}/${M}`,Y);if(A.push(...W.errors),te=te&&W.valid,W.valid)Lt.push(Y)}if(te)A.length=Z;else A.splice(Z,0,{instanceLocation:a,keyword:"allOf",keywordLocation:B,error:"Instance does not match every subschema."})}if(E!==void 0){let B=`${s}/oneOf`,Z=A.length,te=E.filter((M,O)=>{let Y=Object.create(c),W=ye(e,M,n,o,r,f===!0?i:null,a,`${B}/${O}`,Y);if(A.push(...W.errors),W.valid)Lt.push(Y);return W.valid}).length;if(te===1)A.length=Z;else A.splice(Z,0,{instanceLocation:a,keyword:"oneOf",keywordLocation:B,error:`Instance does not match exactly one subschema (${te} matches).`})}if(d==="object"||d==="array")Object.assign(c,...Lt);if(ne!==void 0){let B=`${s}/if`;if(ye(e,ne,n,o,r,i,a,B,c).valid){if(ue!==void 0){let Z=ye(e,ue,n,o,r,i,a,`${s}/then`,c);if(!Z.valid)A.push({instanceLocation:a,keyword:"if",keywordLocation:B,error:'Instance does not match "then" schema.'},...Z.errors)}}else if(Oe!==void 0){let Z=ye(e,Oe,n,o,r,i,a,`${s}/else`,c);if(!Z.valid)A.push({instanceLocation:a,keyword:"if",keywordLocation:B,error:'Instance does not match "else" schema.'},...Z.errors)}}if(d==="object"){if(R!==void 0){for(let M of R)if(!(M in e))A.push({instanceLocation:a,keyword:"required",keywordLocation:`${s}/required`,error:`Instance does not have required property "${M}".`})}let B=Object.keys(e);if(ft!==void 0&&B.length<ft)A.push({instanceLocation:a,keyword:"minProperties",keywordLocation:`${s}/minProperties`,error:`Instance does not have at least ${ft} properties.`});if(ht!==void 0&&B.length>ht)A.push({instanceLocation:a,keyword:"maxProperties",keywordLocation:`${s}/maxProperties`,error:`Instance does not have at least ${ht} properties.`});if(Ct!==void 0){let M=`${s}/propertyNames`;for(let O in e){let Y=`${a}/${Pt(O)}`,W=ye(O,Ct,n,o,r,i,Y,M);if(!W.valid)A.push({instanceLocation:a,keyword:"propertyNames",keywordLocation:M,error:`Property name "${O}" does not match schema.`},...W.errors)}}if(Ye!==void 0){let M=`${s}/dependantRequired`;for(let O in Ye)if(O in e){let Y=Ye[O];for(let W of Y)if(!(W in e))A.push({instanceLocation:a,keyword:"dependentRequired",keywordLocation:M,error:`Instance has "${O}" but does not have "${W}".`})}}if(gt!==void 0)for(let M in gt){let O=`${s}/dependentSchemas`;if(M in e){let Y=ye(e,gt[M],n,o,r,i,a,`${O}/${Pt(M)}`,c);if(!Y.valid)A.push({instanceLocation:a,keyword:"dependentSchemas",keywordLocation:O,error:`Instance has "${M}" but does not match dependant schema.`},...Y.errors)}}if(qt!==void 0){let M=`${s}/dependencies`;for(let O in qt)if(O in e){let Y=qt[O];if(Array.isArray(Y)){for(let W of Y)if(!(W in e))A.push({instanceLocation:a,keyword:"dependencies",keywordLocation:M,error:`Instance has "${O}" but does not have "${W}".`})}else{let W=ye(e,Y,n,o,r,i,a,`${M}/${Pt(O)}`);if(!W.valid)A.push({instanceLocation:a,keyword:"dependencies",keywordLocation:M,error:`Instance has "${O}" but does not match dependant schema.`},...W.errors)}}}let Z=Object.create(null),te=!1;if(Ie!==void 0){let M=`${s}/properties`;for(let O in Ie){if(!(O in e))continue;let Y=`${a}/${Pt(O)}`,W=ye(e[O],Ie[O],n,o,r,i,Y,`${M}/${Pt(O)}`);if(W.valid)c[O]=Z[O]=!0;else if(te=r,A.push({instanceLocation:a,keyword:"properties",keywordLocation:M,error:`Property "${O}" does not match schema.`},...W.errors),te)break}}if(!te&&Le!==void 0){let M=`${s}/patternProperties`;for(let O in Le){let Y=new RegExp(O,"u"),W=Le[O];for(let ke in e){if(!Y.test(ke))continue;let Yr=`${a}/${Pt(ke)}`,Zt=ye(e[ke],W,n,o,r,i,Yr,`${M}/${Pt(O)}`);if(Zt.valid)c[ke]=Z[ke]=!0;else te=r,A.push({instanceLocation:a,keyword:"patternProperties",keywordLocation:M,error:`Property "${ke}" matches pattern "${O}" but does not match associated schema.`},...Zt.errors)}}}if(!te&&zt!==void 0){let M=`${s}/additionalProperties`;for(let O in e){if(Z[O])continue;let Y=`${a}/${Pt(O)}`,W=ye(e[O],zt,n,o,r,i,Y,M);if(W.valid)c[O]=!0;else te=r,A.push({instanceLocation:a,keyword:"additionalProperties",keywordLocation:M,error:`Property "${O}" does not match additional properties schema.`},...W.errors)}}else if(!te&&wt!==void 0){let M=`${s}/unevaluatedProperties`;for(let O in e)if(!c[O]){let Y=`${a}/${Pt(O)}`,W=ye(e[O],wt,n,o,r,i,Y,M);if(W.valid)c[O]=!0;else A.push({instanceLocation:a,keyword:"unevaluatedProperties",keywordLocation:M,error:`Property "${O}" does not match unevaluated properties schema.`},...W.errors)}}}else if(d==="array"){if(Rt!==void 0&&e.length>Rt)A.push({instanceLocation:a,keyword:"maxItems",keywordLocation:`${s}/maxItems`,error:`Array has too many items (${e.length} > ${Rt}).`});if(Fe!==void 0&&e.length<Fe)A.push({instanceLocation:a,keyword:"minItems",keywordLocation:`${s}/minItems`,error:`Array has too few items (${e.length} < ${Fe}).`});let B=e.length,Z=0,te=!1;if(ct!==void 0){let M=`${s}/prefixItems`,O=Math.min(ct.length,B);for(;Z<O;Z++){let Y=ye(e[Z],ct[Z],n,o,r,i,`${a}/${Z}`,`${M}/${Z}`);if(c[Z]=!0,!Y.valid){if(te=r,A.push({instanceLocation:a,keyword:"prefixItems",keywordLocation:M,error:"Items did not match schema."},...Y.errors),te)break}}}if(Ze!==void 0){let M=`${s}/items`;if(Array.isArray(Ze)){let O=Math.min(Ze.length,B);for(;Z<O;Z++){let Y=ye(e[Z],Ze[Z],n,o,r,i,`${a}/${Z}`,`${M}/${Z}`);if(c[Z]=!0,!Y.valid){if(te=r,A.push({instanceLocation:a,keyword:"items",keywordLocation:M,error:"Items did not match schema."},...Y.errors),te)break}}}else for(;Z<B;Z++){let O=ye(e[Z],Ze,n,o,r,i,`${a}/${Z}`,M);if(c[Z]=!0,!O.valid){if(te=r,A.push({instanceLocation:a,keyword:"items",keywordLocation:M,error:"Items did not match schema."},...O.errors),te)break}}if(!te&&Qt!==void 0){let O=`${s}/additionalItems`;for(;Z<B;Z++){let Y=ye(e[Z],Qt,n,o,r,i,`${a}/${Z}`,O);if(c[Z]=!0,!Y.valid)te=r,A.push({instanceLocation:a,keyword:"additionalItems",keywordLocation:O,error:"Items did not match additional items schema."},...Y.errors)}}}if(At!==void 0)if(B===0&&Ne===void 0)A.push({instanceLocation:a,keyword:"contains",keywordLocation:`${s}/contains`,error:"Array is empty. It must contain at least one item matching the schema."});else if(Ne!==void 0&&B<Ne)A.push({instanceLocation:a,keyword:"minContains",keywordLocation:`${s}/minContains`,error:`Array has less items (${B}) than minContains (${Ne}).`});else{let M=`${s}/contains`,O=A.length,Y=0;for(let W=0;W<B;W++){let ke=ye(e[W],At,n,o,r,i,`${a}/${W}`,M);if(ke.valid)c[W]=!0,Y++;else A.push(...ke.errors)}if(Y>=(Ne||0))A.length=O;if(Ne===void 0&&Ve===void 0&&Y===0)A.splice(O,0,{instanceLocation:a,keyword:"contains",keywordLocation:M,error:"Array does not contain item matching schema."});else if(Ne!==void 0&&Y<Ne)A.push({instanceLocation:a,keyword:"minContains",keywordLocation:`${s}/minContains`,error:`Array must contain at least ${Ne} items matching schema. Only ${Y} items were found.`});else if(Ve!==void 0&&Y>Ve)A.push({instanceLocation:a,keyword:"maxContains",keywordLocation:`${s}/maxContains`,error:`Array may contain at most ${Ve} items matching schema. ${Y} items were found.`})}if(!te&&er!==void 0){let M=`${s}/unevaluatedItems`;for(;Z<B;Z++){if(c[Z])continue;let O=ye(e[Z],er,n,o,r,i,`${a}/${Z}`,M);if(c[Z]=!0,!O.valid)A.push({instanceLocation:a,keyword:"unevaluatedItems",keywordLocation:M,error:"Items did not match unevaluated items schema."},...O.errors)}}if(Br)for(let M=0;M<B;M++){let O=e[M],Y=typeof O==="object"&&O!==null;for(let W=0;W<B;W++){if(M===W)continue;let ke=e[W];if(O===ke||Y&&typeof ke==="object"&&ke!==null&&Da(O,ke))A.push({instanceLocation:a,keyword:"uniqueItems",keywordLocation:`${s}/uniqueItems`,error:`Duplicate items at indexes ${M} and ${W}.`}),M=Number.MAX_SAFE_INTEGER,W=Number.MAX_SAFE_INTEGER}}}else if(d==="number"){if(n==="4"){if(lt!==void 0&&(Xe===!0&&e<=lt||e<lt))A.push({instanceLocation:a,keyword:"minimum",keywordLocation:`${s}/minimum`,error:`${e} is less than ${Xe?"or equal to ":""} ${lt}.`});if(ut!==void 0&&(vt===!0&&e>=ut||e>ut))A.push({instanceLocation:a,keyword:"maximum",keywordLocation:`${s}/maximum`,error:`${e} is greater than ${vt?"or equal to ":""} ${ut}.`})}else{if(lt!==void 0&&e<lt)A.push({instanceLocation:a,keyword:"minimum",keywordLocation:`${s}/minimum`,error:`${e} is less than ${lt}.`});if(ut!==void 0&&e>ut)A.push({instanceLocation:a,keyword:"maximum",keywordLocation:`${s}/maximum`,error:`${e} is greater than ${ut}.`});if(Xe!==void 0&&e<=Xe)A.push({instanceLocation:a,keyword:"exclusiveMinimum",keywordLocation:`${s}/exclusiveMinimum`,error:`${e} is less than ${Xe}.`});if(vt!==void 0&&e>=vt)A.push({instanceLocation:a,keyword:"exclusiveMaximum",keywordLocation:`${s}/exclusiveMaximum`,error:`${e} is greater than or equal to ${vt}.`})}if(_t!==void 0){let B=e%_t;if(Math.abs(0-B)>=0.00000011920929&&Math.abs(_t-B)>=0.00000011920929)A.push({instanceLocation:a,keyword:"multipleOf",keywordLocation:`${s}/multipleOf`,error:`${e} is not a multiple of ${_t}.`})}}else if(d==="string"){let B=Mt===void 0&&Ut===void 0?0:$T(e);if(Mt!==void 0&&B<Mt)A.push({instanceLocation:a,keyword:"minLength",keywordLocation:`${s}/minLength`,error:`String is too short (${B} < ${Mt}).`});if(Ut!==void 0&&B>Ut)A.push({instanceLocation:a,keyword:"maxLength",keywordLocation:`${s}/maxLength`,error:`String is too long (${B} > ${Ut}).`});if(gr!==void 0&&!new RegExp(gr,"u").test(e))A.push({instanceLocation:a,keyword:"pattern",keywordLocation:`${s}/pattern`,error:"String does not match pattern."});if(Se!==void 0&&H$[Se]&&!H$[Se](e))A.push({instanceLocation:a,keyword:"format",keywordLocation:`${s}/format`,error:`String does not match format "${Se}".`})}return{valid:A.length===0,errors:A}}var zT=class{schema;draft;shortCircuit;lookup;constructor(e,t="2019-09",n=!0){this.schema=e,this.draft=t,this.shortCircuit=n,this.lookup=Rn(e)}validate(e){return ye(e,this.schema,this.draft,this.lookup,this.shortCircuit)}addSchema(e,t){if(t)e={...e,$id:t};Rn(e,this.lookup)}},cd=class{shortcircuit;draft;constructor(e){this.shortcircuit=e?.shortcircuit??!0,this.draft=e?.draft}_draftFor(e){let t=LS(e,"pass an explicit { draft } to CfWorkerJsonSchemaValidator to validate other dialects.");return t==="draft-7"?"7":t}getValidator(e){let t=new zT(e,this.draft??this._draftFor(e),this.shortcircuit);return(n)=>{let o=t.validate(n);return o.valid?{valid:!0,data:n,errorMessage:void 0}:{valid:!1,data:void 0,errorMessage:o.errors.map((r)=>`${r.instanceLocation}: ${r.error}`).join("; ")}}}};var rz=Symbol.for("mcp.completable");function D_(e){return!!e&&typeof e==="object"&&rz in e}function RT(e){return e[rz]?.complete}var nz=15000,xT=2147483647;function oz(e,t){if(!Number.isFinite(e)||e<1)return;let n=setInterval(t,Math.min(e,xT));return n.unref?.(),n}var kT=8,IT=600000;function PT(e){if(e?.maxRounds!==void 0&&(!Number.isInteger(e.maxRounds)||e.maxRounds<1))throw RangeError(`inputRequired.maxRounds must be a positive integer (got ${e.maxRounds})`);if(e?.roundTimeoutMs!==void 0&&(!Number.isFinite(e.roundTimeoutMs)||e.roundTimeoutMs<=0))throw RangeError(`inputRequired.roundTimeoutMs must be a positive number (got ${e.roundTimeoutMs})`);return{maxRounds:e?.maxRounds??kT,roundTimeoutMs:e?.roundTimeoutMs??IT,legacyShim:e?.legacyShim??!0}}function iz(e,t,n){if(n===null||typeof n!=="object"||typeof n.method!=="string")throw new G(j.InternalError,`Handler for ${e} returned an invalid input request '${t}': each inputRequests entry must be an embedded elicitation/create, sampling/createMessage, or roots/list request`);let o=n,r=h$(o);if(r===void 0)throw new G(j.InternalError,`Handler for ${e} returned an input request '${t}' of kind '${o.method}', which is not an embedded request the 2026-07-28 revision defines`);return{embedded:o,required:r}}function ET(){let e=globalThis.crypto;if(e?.randomUUID!==void 0)return e.randomUUID();let t=new Uint8Array(16);e.getRandomValues(t),t[6]=t[6]&15|64,t[8]=t[8]&63|128;let n=[...t].map((o)=>o.toString(16).padStart(2,"0")).join("");return`${n.slice(0,8)}-${n.slice(8,12)}-${n.slice(12,16)}-${n.slice(16,20)}-${n.slice(20)}`}function U_(e,t){if(e==="tools/call")return{content:[{type:"text",text:t}],isError:!0};throw new G(j.InternalError,t)}var TT=class{constructor(e){this._host=e}async fulfill(e,t,n,o,r){let{maxRounds:i,roundTimeoutMs:a}=this._host,s=o.mcpReq.signal,c=r,l=0;while(!0){if(l+=1,l>i)return U_(e,A$(e,i));let d=c.inputRequests,m=d!=null&&Object.keys(d).length>0,p=typeof c.requestState==="string"?c.requestState:void 0;if(!m&&p===void 0)throw new G(j.InternalError,`Handler for ${e} returned an input-required result with neither inputRequests nor requestState (every InputRequiredResult must include at least one of the two)`);let f;if(m){let b=this._host.resolvedClientCapabilities(o),R=[];for(let[P,D]of Object.entries(d)){let{embedded:E,required:ne}=iz(e,P,D);if(E.method!=="roots/list"&&E.params===void 0)throw new G(j.InternalError,`Handler for ${e} returned an input request '${P}' of kind '${E.method}' without params`);if(rd(ne,b)!==void 0)return U_(e,`Cannot request input '${P}' (${E.method}): the client on this 2025-era connection did not declare the required capability${b===void 0?" (no client capabilities are available on this connection — per-request legacy serving cannot receive server-to-client requests)":""}`);R.push([P,E])}let L=U$(s);try{let P={relatedRequestId:o.mcpReq.id,timeout:a,resetTimeoutOnProgress:!0,onprogress:()=>{},signal:L.signal},D=await Promise.all(R.map(async([E,ne])=>{try{return[E,await this._dispatchLeg(ne,P)]}catch(ue){throw L.abort(ue),ue}}));f=Object.fromEntries(D)}catch(P){if(s.aborted)throw P;return U_(e,`Fulfilling input required by '${e}' failed: ${P instanceof Error?P.message:String(P)}`)}finally{L.dispose()}}else await M$(q$,s);let v={...o,mcpReq:{...o.mcpReq,inputResponses:f,droppedInputResponseKeys:void 0,requestState:Ua(p)}};if(p!==void 0){let b=await this._host.verifyRequestState(p,v,e);if(b!==void 0)v=C_(v,b)}let g=await t(n,v);if(!ur(g))return g;c=g}}async _dispatchLeg(e,t){switch(e.method){case"elicitation/create":{let n=e.params;if(n.mode==="url"&&n.elicitationId===void 0)n={...n,elicitationId:ET()};return await this._host.sendElicitation(n,t)}case"sampling/createMessage":return await this._host.sendSampling(e.params,t);case"roots/list":return await this._host.listRoots(e.params,t)}}},jT=new Set(["tools/call","prompts/get","resources/read"]),OT,NT,CT;var az=class extends q_{_clientCapabilities;_clientVersion;static{OT=(e,t)=>{if(t.clientCapabilities!==void 0)e._clientCapabilities=t.clientCapabilities;if(t.clientInfo!==void 0)e._clientVersion=t.clientInfo},NT=(e,t)=>{let n=t.filter((o)=>!e._supportedProtocolVersions.includes(o));if(n.length>0)e._supportedProtocolVersions=[...e._supportedProtocolVersions,...n];e.setRequestHandler("server/discover",()=>e._ondiscover())},CT=(e)=>e._serverInfo}_capabilities;_instructions;_jsonSchemaValidator;_cacheHints;_requestStateVerify;_inputRequiredServing;_legacyShim;_legacyInputRequiredShim(){return this._legacyShim??=new TT({maxRounds:this._inputRequiredServing.maxRounds,roundTimeoutMs:this._inputRequiredServing.roundTimeoutMs,resolvedClientCapabilities:(e)=>this._inputRequestCapabilityView(e),verifyRequestState:(e,t,n)=>this._verifyRequestState(e,t,n),sendElicitation:(e,t)=>this._sendElicitationLeg(e,t,{validateAcceptedContent:!1}),sendSampling:(e,t)=>this.createMessage(e,t),listRoots:(e,t)=>this.listRoots(e,t)})}oninitialized;constructor(e,t){super(t);if(this._serverInfo=e,this._capabilities=t?.capabilities?{...t.capabilities}:{},this._instructions=t?.instructions,this._jsonSchemaValidator=t?.jsonSchemaValidator??new cd,this._requestStateVerify=t?.requestState?.verify,this._inputRequiredServing=PT(t?.inputRequired),t?.cacheHints!==void 0){for(let[n,o]of Object.entries(t.cacheHints))if(o!==void 0)x_(o,`cacheHints['${n}']`);this._cacheHints=t.cacheHints}if(this.setRequestHandler("initialize",(n)=>this._oninitialize(n)),this.setNotificationHandler("notifications/initialized",()=>this.oninitialized?.()),y_(this._supportedProtocolVersions).length>0)this.setRequestHandler("server/discover",()=>this._ondiscover());if(this._capabilities.logging)this._registerLoggingHandler()}_registerLoggingHandler(){this.setRequestHandler("logging/setLevel",async(e,t)=>{let n=t.sessionId||t.http?.req?.headers.get("mcp-session-id")||void 0,{level:o}=e.params,r=ad(Dr,o);if(r.success)this._loggingLevels.set(n,r.data);return{}})}buildContext(e,t){let n=e.http||t?.request||t?.closeSSEStream||t?.closeStandaloneSSEStream;return{...e,mcpReq:{...e.mcpReq,log:(o,r,i)=>{if(!this._capabilities.logging)return Promise.resolve();let a;if(this._servedModernEra()){if(a=e.mcpReq.envelope?.[Nr],a===void 0)return Promise.resolve()}else a=this._loggingLevels.get(e.sessionId)??this._loggingLevels.get(void 0);if(a!==void 0&&this.LOG_LEVEL_SEVERITY.get(o)<this.LOG_LEVEL_SEVERITY.get(a))return Promise.resolve();return e.mcpReq.notify({method:"notifications/message",params:{level:o,data:r,logger:i}})},elicitInput:(o,r)=>this.elicitInput(o,r),requestSampling:(o,r)=>this.createMessage(o,r)},http:n?{...e.http,req:t?.request,closeSSE:t?.closeSSEStream,closeStandaloneSSE:t?.closeStandaloneSSEStream}:void 0}}_loggingLevels=new Map;LOG_LEVEL_SEVERITY=new Map(Dr.options.map((e,t)=>[e,t]));isMessageIgnored=(e,t)=>{let n=this._loggingLevels.get(t);return n?this.LOG_LEVEL_SEVERITY.get(e)<this.LOG_LEVEL_SEVERITY.get(n):!1};registerCapabilities(e){if(this.transport)throw new re(se.AlreadyConnected,"Cannot register capabilities after connecting to transport");let t=!!this._capabilities.logging;if(this._capabilities=A_(this._capabilities,e),!t&&this._capabilities.logging)this._registerLoggingHandler()}_wrapHandler(e,t){if(e!=="tools/call"){let n=this._cacheHints?.[e],o=jT.has(e);if(n===void 0&&!o)return async(r,i)=>{let a=await t(r,i);if(ur(a))throw new G(j.InternalError,`Handler for ${e} returned an input-required result, but only tools/call, prompts/get and resources/read support input_required (protocol revision 2026-07-28)`);return a};return async(r,i)=>{let a=o?await this._invokeInputRequiredCapableHandler(e,t,r,i):await t(r,i);if(ur(a)){if(!o)throw new G(j.InternalError,`Handler for ${e} returned an input-required result, but only tools/call, prompts/get and resources/read support input_required (protocol revision 2026-07-28)`);return a}return n===void 0?a:nd(a,n)}}return async(n,o)=>{let r=Co(this._negotiatedProtocolVersion),i=r.validateRequest("tools/call",n);if(!i.ok)throw new G(i.reason==="not-in-era"?j.InternalError:j.InvalidParams,i.reason==="not-in-era"?"No wire schema for tools/call in the resolved era":`Invalid tools/call request: ${i.message}`);let a=await this._invokeInputRequiredCapableHandler("tools/call",t,n,o);if(ur(a))return a;let s=b_(a),c=r.validateResult("tools/call",s);if(!c.ok)throw new G(c.reason==="not-in-era"?j.InternalError:j.InvalidParams,c.reason==="not-in-era"?"No wire schema for tools/call in the resolved era":`Invalid tools/call result: ${c.message}`);return c.value}}_servedModernEra(){return this._negotiatedProtocolVersion!==void 0&&Aa(this._negotiatedProtocolVersion)}async _invokeInputRequiredCapableHandler(e,t,n,o){let r=this._servedModernEra(),i=o.mcpReq.requestState();if(i!==void 0&&typeof i!=="string")throw new G(j.InvalidParams,"Invalid or expired requestState",{reason:"invalid_request_state"});let a=o;if(typeof i==="string"){let m=await this._verifyRequestState(i,o,e);if(m!==void 0)a=C_(o,m)}let s;try{s=await t(n,a)}catch(m){if(m instanceof G&&m.code===j.UrlElicitationRequired){if(!r)throw m;throw new G(j.InternalError,`URL elicitation cannot be signalled by throwing UrlElicitationRequiredError on protocol revision ${this._negotiatedProtocolVersion}: return inputRequired({ inputRequests: { …: inputRequired.elicitUrl(...) } }) from the handler instead. The urlElicitationRequired error (-32042) of earlier revisions is not available on this revision.`)}throw m}if(!ur(s))return s;if(!r){if(!this._inputRequiredServing.legacyShim)throw new G(j.InternalError,`Handler for ${e} returned an input-required result, but this request is served on protocol revision ${this._negotiatedProtocolVersion??Sn}, which has no input_required vocabulary`);return await this._legacyInputRequiredShim().fulfill(e,t,n,a,s)}let c=s.inputRequests,l=c!=null&&Object.keys(c).length>0,d=typeof s.requestState==="string";if(!l&&!d)throw new G(j.InternalError,`Handler for ${e} returned an input-required result with neither inputRequests nor requestState (every InputRequiredResult must include at least one of the two)`);if(l){let m=this._inputRequestCapabilityView(o);for(let[p,f]of Object.entries(c)){let{embedded:v,required:g}=iz(e,p,f),b=rd(g,m);if(b!==void 0)throw new id({requiredCapabilities:b},`Cannot request input '${p}' (${v.method}): the request's client capabilities do not declare the required capability`)}}return s}async _verifyRequestState(e,t,n){if(this._requestStateVerify===void 0)return;try{return await this._requestStateVerify(e,t)}catch(o){throw this.onerror?.(Error(`requestState verification rejected ${n}: ${o instanceof Error?o.message:String(o)}`)),new G(j.InvalidParams,"Invalid or expired requestState",{reason:"invalid_request_state"})}}_inputRequestCapabilityView(e){return this._servedModernEra()?e.mcpReq.envelope?.[cr]:this._clientCapabilities}_assertPushApiInServedEra(e){if(this._servedModernEra())throw new re(se.MethodNotSupportedByProtocolVersion,`Server-to-client requests are not available on protocol revision ${this._negotiatedProtocolVersion}: '${e}' cannot be sent while serving a request on that revision. Return inputRequired({ ... }) from the handler instead — the client fulfils the embedded requests and retries the original request (multi round-trip requests).`,{method:e,era:"2026-07-28"})}assertCapabilityForMethod(e){switch(e){case"sampling/createMessage":if(!this._clientCapabilities?.sampling)throw new re(se.CapabilityNotSupported,`Client does not support sampling (required for ${e})`);break;case"elicitation/create":if(!this._clientCapabilities?.elicitation)throw new re(se.CapabilityNotSupported,`Client does not support elicitation (required for ${e})`);break;case"roots/list":if(!this._clientCapabilities?.roots)throw new re(se.CapabilityNotSupported,`Client does not support listing roots (required for ${e})`);break;case"ping":break}}assertNotificationCapability(e){switch(e){case"notifications/message":if(!this._capabilities.logging)throw new re(se.CapabilityNotSupported,`Server does not support logging (required for ${e})`);break;case"notifications/resources/updated":case"notifications/resources/list_changed":if(!this._capabilities.resources)throw new re(se.CapabilityNotSupported,`Server does not support notifying about resources (required for ${e})`);break;case"notifications/tools/list_changed":if(!this._capabilities.tools)throw new re(se.CapabilityNotSupported,`Server does not support notifying of tool list changes (required for ${e})`);break;case"notifications/prompts/list_changed":if(!this._capabilities.prompts)throw new re(se.CapabilityNotSupported,`Server does not support notifying of prompt list changes (required for ${e})`);break;case"notifications/elicitation/complete":if(!this._clientCapabilities?.elicitation?.url)throw new re(se.CapabilityNotSupported,`Client does not support URL elicitation (required for ${e})`);break;case"notifications/cancelled":break;case"notifications/progress":break}}assertRequestHandlerCapability(e){switch(e){case"completion/complete":if(!this._capabilities.completions)throw new re(se.CapabilityNotSupported,`Server does not support completions (required for ${e})`);break;case"logging/setLevel":if(!this._capabilities.logging)throw new re(se.CapabilityNotSupported,`Server does not support logging (required for ${e})`);break;case"prompts/get":case"prompts/list":if(!this._capabilities.prompts)throw new re(se.CapabilityNotSupported,`Server does not support prompts (required for ${e})`);break;case"resources/list":case"resources/templates/list":case"resources/read":if(!this._capabilities.resources)throw new re(se.CapabilityNotSupported,`Server does not support resources (required for ${e})`);break;case"tools/call":case"tools/list":if(!this._capabilities.tools)throw new re(se.CapabilityNotSupported,`Server does not support tools (required for ${e})`);break;case"ping":case"initialize":break}}async _oninitialize(e){let t=e.params.protocolVersion;this._clientCapabilities=e.params.capabilities,this._clientVersion=e.params.clientInfo;let n=g$(this._supportedProtocolVersions),o=n.includes(t)?t:n[0]??Sn;return this._negotiatedProtocolVersion=o,this.transport?.setProtocolVersion?.(o),{protocolVersion:o,capabilities:this.getCapabilities(),serverInfo:this._serverInfo,...this._instructions&&{instructions:this._instructions}}}_ondiscover(){return{supportedVersions:y_(this._supportedProtocolVersions),capabilities:qT(this.getCapabilities()),...this._instructions&&{instructions:this._instructions}}}_outboundServerInfo(){return this._serverInfo}getClientCapabilities(){return this._clientCapabilities}getClientVersion(){return this._clientVersion}getNegotiatedProtocolVersion(){return this._negotiatedProtocolVersion}projectCallToolResult(e,t){return this._wireCodec().projectCallToolResult(e,t)}getCapabilities(){return this._capabilities}async ping(){return this._assertPushApiInServedEra("ping"),this.request({method:"ping"})}async createMessage(e,t){if(this._assertPushApiInServedEra("sampling/createMessage"),(e.tools||e.toolChoice)&&!this._clientCapabilities?.sampling?.tools)throw new re(se.CapabilityNotSupported,"Client does not support sampling tools capability.");if(e.messages.length>0){let i=e.messages.at(-1),a=Array.isArray(i.content)?i.content:[i.content],s=a.some((m)=>m.type==="tool_result"),c=e.messages.length>1?e.messages.at(-2):void 0,l=c?Array.isArray(c.content)?c.content:[c.content]:[],d=l.some((m)=>m.type==="tool_use");if(s){if(a.some((m)=>m.type!=="tool_result"))throw new G(j.InvalidParams,"The last message must contain only tool_result content if any is present");if(!d)throw new G(j.InvalidParams,"tool_result blocks are not matching any tool_use from the previous message")}if(d){let m=new Set(l.filter((f)=>f.type==="tool_use").map((f)=>f.id)),p=new Set(a.filter((f)=>f.type==="tool_result").map((f)=>f.toolUseId));if(m.size!==p.size||![...m].every((f)=>p.has(f)))throw new G(j.InvalidParams,"ids of tool_result blocks and tool_use blocks from previous message do not match")}}let n=Boolean(e.tools||e.toolChoice),o=await this.request({method:"sampling/createMessage",params:e},t),r=this._wireCodec().samplingResultVariant(n,o);if(!r.ok)throw new re(se.InvalidResult,`Invalid sampling/createMessage result: ${r.reason==="invalid"?r.message:r.reason}`);return r.value}async elicitInput(e,t){switch(this._assertPushApiInServedEra("elicitation/create"),e.mode??"form"){case"url":if(!this._clientCapabilities?.elicitation?.url)throw new re(se.CapabilityNotSupported,"Client does not support url elicitation.");break;case"form":if(!this._clientCapabilities?.elicitation?.form)throw new re(se.CapabilityNotSupported,"Client does not support form elicitation.");break}return this._sendElicitationLeg(e,t)}async _sendElicitationLeg(e,t,n){let o=e.mode??"form",r=n?.validateAcceptedContent??!0;switch(o){case"url":{let i=e;return this.request({method:"elicitation/create",params:i},t)}case"form":{let i=e.mode==="form"?e:{...e,mode:"form"},a=await this.request({method:"elicitation/create",params:i},t);if(r&&a.action==="accept"&&a.content&&i.requestedSchema)try{let s=this._jsonSchemaValidator.getValidator(i.requestedSchema)(a.content);if(!s.valid)throw new G(j.InvalidParams,`Elicitation response content does not match requested schema: ${s.errorMessage}`)}catch(s){if(s instanceof G)throw s;throw new G(j.InternalError,`Error validating elicitation response: ${s instanceof Error?s.message:String(s)}`)}return a}}}createElicitationCompletionNotifier(e,t){if(!this._clientCapabilities?.elicitation?.url)throw new re(se.CapabilityNotSupported,"Client does not support URL elicitation (required for notifications/elicitation/complete)");return()=>this.notification({method:"notifications/elicitation/complete",params:{elicitationId:e}},t)}async listRoots(e,t){return this._assertPushApiInServedEra("roots/list"),this.request({method:"roots/list",params:e},t)}async sendLoggingMessage(e,t){if(this._capabilities.logging&&!this.isMessageIgnored(e.level,t))return this.notification({method:"notifications/message",params:e})}async sendResourceUpdated(e){return this.notification({method:"notifications/resources/updated",params:e})}async sendResourceListChanged(){return this.notification({method:"notifications/resources/list_changed"})}async sendToolListChanged(){return this.notification({method:"notifications/tools/list_changed"})}async sendPromptListChanged(){return this.notification({method:"notifications/prompts/list_changed"})}};function qT(e){return{...e}}var sz=class{server;_registeredResources={};_registeredResourceTemplates={};_registeredTools={};_registeredPrompts={};_toolInputSchemaJson={};toolInputSchemaJson(e){let t=this._registeredTools[e];if(t===void 0||!t.enabled)return;if(Object.hasOwn(this._toolInputSchemaJson,e))return this._toolInputSchemaJson[e];if(t.inputSchema===void 0)return W$;try{let n=Zr(t.inputSchema,"input");return this._toolInputSchemaJson[e]=n,n}catch{return}}constructor(e,t){if(this.server=new az(e,t),t?.capabilities?.tools)this.setToolRequestHandlers();if(t?.capabilities?.resources)this.setResourceRequestHandlers();if(t?.capabilities?.prompts)this.setPromptRequestHandlers()}async connect(e){return await this.server.connect(e)}async close(){await this.server.close()}_toolHandlersInitialized=!1;setToolRequestHandlers(){if(this._toolHandlersInitialized)return;this.server.assertCanSetRequestHandler("tools/list"),this.server.assertCanSetRequestHandler("tools/call"),this.server.registerCapabilities({tools:{listChanged:this.server.getCapabilities().tools?.listChanged??!0}}),this.server.setRequestHandler("tools/list",()=>({tools:Object.entries(this._registeredTools).filter(([,e])=>e.enabled).map(([e,t])=>{let n={name:e,title:t.title,description:t.description,inputSchema:t.inputSchema?Zr(t.inputSchema,"input"):W$,annotations:t.annotations,icons:t.icons,execution:t.execution,_meta:t._meta};if(t.outputSchema)n.outputSchema=Zr(t.outputSchema,"output");return n})})),this.server.setRequestHandler("tools/call",async(e,t)=>{let n=this._registeredTools[e.params.name];if(!n)throw new G(j.InvalidParams,`Tool ${e.params.name} not found`);if(!n.enabled)throw new G(j.InvalidParams,`Tool ${e.params.name} disabled`);try{let o=await this.validateToolInput(n,e.params.arguments,e.params.name),r=await this.executeToolHandler(n,o,t);if(await this.validateToolOutput(n,r,e.params.name),ur(r))return r;return this.server.projectCallToolResult(r,n.outputSchemaJson)}catch(o){if(o instanceof G&&o.code===j.UrlElicitationRequired)throw o;return this.createToolError(o instanceof Error?o.message:String(o))}}),this._toolHandlersInitialized=!0}createToolError(e){return{content:[{type:"text",text:e}],isError:!0}}async validateToolInput(e,t,n){if(!e.inputSchema)return;let o=await zn(e.inputSchema,t??{});if(!o.success)throw new G(j.InvalidParams,`Input validation error: Invalid arguments for tool ${n}: ${o.error}`);return o.data}async validateToolOutput(e,t,n){if(!e.outputSchema)return;if(ur(t))return;if(t.isError)return;if(t.structuredContent===void 0)throw new G(j.InvalidParams,`Output validation error: Tool ${n} has an output schema but no structured content was provided`);let o=await zn(e.outputSchema,t.structuredContent);if(!o.success)throw new G(j.InvalidParams,`Output validation error: Invalid structured content for tool ${n}: ${o.error}`)}async executeToolHandler(e,t,n){return e.executor(t,n)}_completionHandlerInitialized=!1;setCompletionRequestHandler(){if(this._completionHandlerInitialized)return;this.server.assertCanSetRequestHandler("completion/complete"),this.server.registerCapabilities({completions:{}}),this.server.setRequestHandler("completion/complete",async(e)=>{switch(e.params.ref.type){case"ref/prompt":return T_(e),this.handlePromptCompletion(e,e.params.ref);case"ref/resource":return j_(e),this.handleResourceCompletion(e,e.params.ref);default:throw new G(j.InvalidParams,`Invalid completion reference: ${e.params.ref}`)}}),this._completionHandlerInitialized=!0}async handlePromptCompletion(e,t){let n=this._registeredPrompts[t.name];if(!n)throw new G(j.InvalidParams,`Prompt ${t.name} not found`);if(!n.enabled)throw new G(j.InvalidParams,`Prompt ${t.name} disabled`);if(!n.argsSchema)return La;let o=tz(ez(n.argsSchema)?.[e.params.argument.name]);if(!D_(o))return La;let r=RT(o);if(!r)return La;return Q$(await r(e.params.argument.value,e.params.context))}async handleResourceCompletion(e,t){let n=Object.values(this._registeredResourceTemplates).find((r)=>r.resourceTemplate.uriTemplate.toString()===t.uri);if(!n){if(this._registeredResources[t.uri])return La;throw new G(j.InvalidParams,`Resource template ${e.params.ref.uri} not found`)}let o=n.resourceTemplate.completeCallback(e.params.argument.name);if(!o)return La;return Q$(await o(e.params.argument.value,e.params.context))}_resourceHandlersInitialized=!1;setResourceRequestHandlers(){if(this._resourceHandlersInitialized)return;this.server.assertCanSetRequestHandler("resources/list"),this.server.assertCanSetRequestHandler("resources/templates/list"),this.server.assertCanSetRequestHandler("resources/read"),this.server.registerCapabilities({resources:{listChanged:this.server.getCapabilities().resources?.listChanged??!0}}),this.server.setRequestHandler("resources/list",async(e,t)=>{let n=Object.entries(this._registeredResources).filter(([r,i])=>i.enabled).map(([r,i])=>({uri:r,name:i.name,...i.metadata})),o=[];for(let r of Object.values(this._registeredResourceTemplates)){if(!r.resourceTemplate.listCallback)continue;let i=await r.resourceTemplate.listCallback(t);for(let a of i.resources)o.push({...r.metadata,...a})}return{resources:[...n,...o]}}),this.server.setRequestHandler("resources/templates/list",async()=>({resourceTemplates:Object.entries(this._registeredResourceTemplates).map(([e,t])=>({name:e,uriTemplate:t.resourceTemplate.uriTemplate.toString(),...t.metadata}))})),this.server.setRequestHandler("resources/read",async(e,t)=>{let n;try{n=new URL(e.params.uri)}catch{throw new G(j.InvalidParams,`Resource URI ${e.params.uri} is invalid`,{uri:e.params.uri,reason:"invalid_uri"})}let o=this._registeredResources[n.toString()];if(o){if(!o.enabled)throw new G(j.InvalidParams,`Resource ${n} disabled`);return nd(await o.readCallback(n,t),o.cacheHint)}for(let r of Object.values(this._registeredResourceTemplates)){let i=r.resourceTemplate.uriTemplate.match(n.toString());if(i)return nd(await r.readCallback(n,i,t),r.cacheHint)}throw new od(e.params.uri)}),this._resourceHandlersInitialized=!0}_promptHandlersInitialized=!1;setPromptRequestHandlers(){if(this._promptHandlersInitialized)return;this.server.assertCanSetRequestHandler("prompts/list"),this.server.assertCanSetRequestHandler("prompts/get"),this.server.registerCapabilities({prompts:{listChanged:this.server.getCapabilities().prompts?.listChanged??!0}}),this.server.setRequestHandler("prompts/list",()=>({prompts:Object.entries(this._registeredPrompts).filter(([,e])=>e.enabled).map(([e,t])=>({name:e,title:t.title,description:t.description,arguments:t.argsSchema?C$(t.argsSchema):void 0,icons:t.icons,_meta:t._meta}))})),this.server.setRequestHandler("prompts/get",async(e,t)=>{let n=this._registeredPrompts[e.params.name];if(!n)throw new G(j.InvalidParams,`Prompt ${e.params.name} not found`);if(!n.enabled)throw new G(j.InvalidParams,`Prompt ${e.params.name} disabled`);return n.handler(e.params.arguments,t)}),this._promptHandlersInitialized=!0}registerResource(e,t,n,o){let r=n.cacheHint,i=n;if(r!==void 0){x_(r,`resource ${e}`);let a={...n};delete a.cacheHint,i=a}if(typeof t==="string"){if(this._registeredResources[t])throw Error(`Resource ${t} is already registered`);let a=this._createRegisteredResource(e,n.title,t,i,o);if(r!==void 0)a.cacheHint=r;return this.setResourceRequestHandlers(),this.sendResourceListChanged(),a}else{if(this._registeredResourceTemplates[e])throw Error(`Resource template ${e} is already registered`);let a=this._createRegisteredResourceTemplate(e,n.title,t,i,o);if(r!==void 0)a.cacheHint=r;return this.setResourceRequestHandlers(),this.sendResourceListChanged(),a}}_createRegisteredResource(e,t,n,o,r){let i={name:e,title:t,metadata:o,readCallback:r,enabled:!0,disable:()=>i.update({enabled:!1}),enable:()=>i.update({enabled:!0}),remove:()=>i.update({uri:null}),update:(a)=>{if(a.uri!==void 0&&a.uri!==n){if(delete this._registeredResources[n],a.uri)this._registeredResources[a.uri]=i}if(a.name!==void 0)i.name=a.name;if(a.title!==void 0)i.title=a.title;if(a.metadata!==void 0)i.metadata=a.metadata;if(a.callback!==void 0)i.readCallback=a.callback;if(a.enabled!==void 0)i.enabled=a.enabled;this.sendResourceListChanged()}};return this._registeredResources[n]=i,i}_createRegisteredResourceTemplate(e,t,n,o,r){let i={resourceTemplate:n,title:t,metadata:o,readCallback:r,enabled:!0,disable:()=>i.update({enabled:!1}),enable:()=>i.update({enabled:!0}),remove:()=>i.update({name:null}),update:(s)=>{if(s.name!==void 0&&s.name!==e){if(delete this._registeredResourceTemplates[e],s.name)this._registeredResourceTemplates[s.name]=i}if(s.title!==void 0)i.title=s.title;if(s.template!==void 0)i.resourceTemplate=s.template;if(s.metadata!==void 0)i.metadata=s.metadata;if(s.callback!==void 0)i.readCallback=s.callback;if(s.enabled!==void 0)i.enabled=s.enabled;this.sendResourceListChanged()}};this._registeredResourceTemplates[e]=i;let a=n.uriTemplate.variableNames;if(Array.isArray(a)&&a.some((s)=>!!n.completeCallback(s)))this.setCompletionRequestHandler();return i}_createRegisteredPrompt(e,t,n,o,r,i,a){let s=o,c=r,l={title:t,description:n,argsSchema:o,icons:i,_meta:a,handler:X$(e,o,r),enabled:!0,disable:()=>l.update({enabled:!1}),enable:()=>l.update({enabled:!0}),remove:()=>l.update({name:null}),update:(d)=>{if(d.name!==void 0&&d.name!==e){if(delete this._registeredPrompts[e],d.name)this._registeredPrompts[d.name]=l}if(d.title!==void 0)l.title=d.title;if(d.description!==void 0)l.description=d.description;if(d.icons!==void 0)l.icons=d.icons;if(d._meta!==void 0)l._meta=d._meta;let m=!1;if(d.argsSchema!==void 0)l.argsSchema=d.argsSchema,s=d.argsSchema,m=!0;if(d.callback!==void 0)c=d.callback,m=!0;if(m)l.handler=X$(e,s,c);if(d.enabled!==void 0)l.enabled=d.enabled;this.sendPromptListChanged()}};if(this._registeredPrompts[e]=l,o){let d=ez(o);if(d){if(Object.values(d).some((m)=>D_(tz(m))))this.setCompletionRequestHandler()}}return l}_createRegisteredTool(e,t,n,o,r,i,a,s,c,l){if(M_(e),o!==void 0)try{let p=Zr(o,"input");this._toolInputSchemaJson[e]=p;let f=O_(p);if(!f.valid)console.warn(`[mcp-sdk] tool '${e}' carries an invalid x-mcp-header declaration and will be excluded by conforming Streamable HTTP clients: ${f.reason}`)}catch{}let d=l,m={title:t,description:n,inputSchema:o,outputSchema:r,outputSchemaJson:Y$(r),annotations:i,icons:a,execution:s,_meta:c,handler:l,executor:B$(o,l),enabled:!0,disable:()=>m.update({enabled:!1}),enable:()=>m.update({enabled:!0}),remove:()=>m.update({name:null}),update:(p)=>{if(p.name!==void 0&&p.name!==e){if(typeof p.name==="string")M_(p.name);if(delete this._registeredTools[e],delete this._toolInputSchemaJson[e],p.name)delete this._toolInputSchemaJson[p.name],this._registeredTools[p.name]=m,e=p.name}if(p.title!==void 0)m.title=p.title;if(p.description!==void 0)m.description=p.description;let f=!1;if(p.paramsSchema!==void 0)m.inputSchema=p.paramsSchema,delete this._toolInputSchemaJson[e],f=!0;if(p.callback!==void 0)m.handler=p.callback,d=p.callback,f=!0;if(f)m.executor=B$(m.inputSchema,d);if(p.outputSchema!==void 0)m.outputSchema=p.outputSchema,m.outputSchemaJson=Y$(p.outputSchema);if(p.annotations!==void 0)m.annotations=p.annotations;if(p.icons!==void 0)m.icons=p.icons;if(p._meta!==void 0)m._meta=p._meta;if(p.enabled!==void 0)m.enabled=p.enabled;this.sendToolListChanged()}};return this._registeredTools[e]=m,this.setToolRequestHandlers(),this.sendToolListChanged(),m}registerTool(e,t,n){if(this._registeredTools[e])throw Error(`Tool ${e} is already registered`);let{title:o,description:r,inputSchema:i,outputSchema:a,annotations:s,icons:c,_meta:l}=t;return this._createRegisteredTool(e,o,r,sd(i),sd(a),s,c,void 0,l,n)}registerPrompt(e,t,n){if(this._registeredPrompts[e])throw Error(`Prompt ${e} is already registered`);let{title:o,description:r,argsSchema:i,icons:a,_meta:s}=t,c=this._createRegisteredPrompt(e,o,r,sd(i),n,a,s);return this.setPromptRequestHandlers(),this.sendPromptListChanged(),c}isConnected(){return this.server.transport!==void 0}async sendLoggingMessage(e,t){return this.server.sendLoggingMessage(e,t)}sendResourceListChanged(){if(this.isConnected())this.server.sendResourceListChanged()}sendToolListChanged(){if(this.isConnected())this.server.sendToolListChanged()}sendPromptListChanged(){if(this.isConnected())this.server.sendPromptListChanged()}};function B$(e,t){if(e){let o=t;return async(r,i)=>o(r,i)}let n=t;return async(o,r)=>n(r)}var W$={type:"object",properties:{}};function Y$(e){if(e===void 0)return;try{return Zr(e,"output")}catch{return}}function X$(e,t,n){if(t){let o=n;return async(r,i)=>{let a=await zn(t,r);if(!a.success)throw new G(j.InvalidParams,`Invalid arguments for prompt ${e}: ${a.error}`);return o(a.data,i)}}else{let o=n;return async(r,i)=>o(i)}}function Q$(e){return{completion:{values:e.map(String).slice(0,100),total:e.length,hasMore:e.length>100}}}var La={completion:{values:[],hasMore:!1}};function ez(e){let t=e;if(t.shape&&typeof t.shape==="object")return t.shape}function AT(e){return e?.type==="optional"}function tz(e){if(!AT(e))return e;return e.def?.innerType??e}var MT=class{sessionIdGenerator;_started=!1;_closed=!1;_streamMapping=new Map;_requestToStreamMapping=new Map;_requestResponseMap=new Map;_initialized=!1;_enableJsonResponse=!1;_standaloneSseStreamId="_GET_stream";_eventStore;_onsessioninitialized;_onsessionclosed;_allowedHosts;_allowedOrigins;_enableDnsRebindingProtection;_retryInterval;_supportedProtocolVersions;_keepAliveMs;sessionId;onclose;onerror;onmessage;constructor(e={}){this.sessionIdGenerator=e.sessionIdGenerator,this._enableJsonResponse=e.enableJsonResponse??!1,this._eventStore=e.eventStore,this._onsessioninitialized=e.onsessioninitialized,this._onsessionclosed=e.onsessionclosed,this._allowedHosts=e.allowedHosts,this._allowedOrigins=e.allowedOrigins,this._enableDnsRebindingProtection=e.enableDnsRebindingProtection??!1,this._retryInterval=e.retryInterval,this._supportedProtocolVersions=e.supportedProtocolVersions??oa,this._keepAliveMs=e.keepAliveMs??nz}startKeepAlive(e,t){if(this._closed)return;let n=oz(this._keepAliveMs,()=>{try{e.enqueue(t.encode(`: keepalive
|
|
81
81
|
|
|
82
82
|
`))}catch{if(n!==void 0)clearInterval(n)}});return n}async start(){if(this._started)throw Error("Transport already started");this._started=!0}setSupportedProtocolVersions(e){this._supportedProtocolVersions=e}createJsonErrorResponse(e,t,n,o){let r={code:t,message:n};if(o?.data!==void 0)r.data=o.data;return Response.json({jsonrpc:"2.0",error:r,id:null},{status:e,headers:{"Content-Type":"application/json",...o?.headers}})}validateRequestHeaders(e){if(!this._enableDnsRebindingProtection)return;if(this._allowedHosts&&this._allowedHosts.length>0){let t=e.headers.get("host");if(!t||!this._allowedHosts.includes(t)){let n=`Invalid Host header: ${t}`;return this.onerror?.(Error(n)),this.createJsonErrorResponse(403,-32000,n)}}if(this._allowedOrigins&&this._allowedOrigins.length>0){let t=e.headers.get("origin");if(t&&!this._allowedOrigins.includes(t)){let n=`Invalid Origin header: ${t}`;return this.onerror?.(Error(n)),this.createJsonErrorResponse(403,-32000,n)}}}async handleRequest(e,t){if(this._closed)return this.createJsonErrorResponse(404,-32001,"Session not found");let n=this.validateRequestHeaders(e);if(n)return n;switch(e.method){case"POST":return this.handlePostRequest(e,t);case"GET":return this.handleGetRequest(e);case"DELETE":return this.handleDeleteRequest(e);default:return this.handleUnsupportedRequest()}}supportsEmptySSEData(e){return this._supportedProtocolVersions.includes(e)&&e>="2025-11-25"}async writePrimingEvent(e,t,n,o){if(!this._eventStore)return;if(!this.supportsEmptySSEData(o))return;let r=await this._eventStore.storeEvent(n,{}),i=`id: ${r}
|
|
83
83
|
data:
|
|
@@ -90,4 +90,4 @@ data:
|
|
|
90
90
|
`;if(o)r+=`id: ${o}
|
|
91
91
|
`;return r+=`data: ${JSON.stringify(n)}
|
|
92
92
|
|
|
93
|
-
`,e.enqueue(t.encode(r)),!0}catch(r){return this.onerror?.(r),!1}}handleUnsupportedRequest(){return this.onerror?.(Error("Method not allowed.")),Response.json({jsonrpc:"2.0",error:{code:-32000,message:"Method not allowed."},id:null},{status:405,headers:{Allow:"GET, POST, DELETE","Content-Type":"application/json"}})}async handlePostRequest(e,t){try{let n=e.headers.get("accept");if(!n?.includes("application/json")||!n.includes("text/event-stream"))return this.onerror?.(Error("Not Acceptable: Client must accept both application/json and text/event-stream")),this.createJsonErrorResponse(406,-32000,"Not Acceptable: Client must accept both application/json and text/event-stream");if(!
|
|
93
|
+
`,e.enqueue(t.encode(r)),!0}catch(r){return this.onerror?.(r),!1}}handleUnsupportedRequest(){return this.onerror?.(Error("Method not allowed.")),Response.json({jsonrpc:"2.0",error:{code:-32000,message:"Method not allowed."},id:null},{status:405,headers:{Allow:"GET, POST, DELETE","Content-Type":"application/json"}})}async handlePostRequest(e,t){try{let n=e.headers.get("accept");if(!n?.includes("application/json")||!n.includes("text/event-stream"))return this.onerror?.(Error("Not Acceptable: Client must accept both application/json and text/event-stream")),this.createJsonErrorResponse(406,-32000,"Not Acceptable: Client must accept both application/json and text/event-stream");if(!J$(e.headers.get("content-type")))return this.onerror?.(Error("Unsupported Media Type: Content-Type must be application/json")),this.createJsonErrorResponse(415,-32000,"Unsupported Media Type: Content-Type must be application/json");let o=e,r;if(t?.parsedBody===void 0)try{r=await e.json()}catch(g){return this.onerror?.(g),this.createJsonErrorResponse(400,-32700,"Parse error: Invalid JSON")}else r=t.parsedBody;let i;try{i=Array.isArray(r)?r.map((g)=>zo.parse(g)):[zo.parse(r)]}catch(g){return this.onerror?.(g),this.createJsonErrorResponse(400,-32700,"Parse error: Invalid JSON-RPC message")}if(this._closed)return this.createJsonErrorResponse(404,-32001,"Session not found");let a=i.some((g)=>E_(g));if(a){if(this._initialized&&this.sessionId!==void 0)return this.onerror?.(Error("Invalid Request: Server already initialized")),this.createJsonErrorResponse(400,-32600,"Invalid Request: Server already initialized");if(i.length>1)return this.onerror?.(Error("Invalid Request: Only one initialization request is allowed")),this.createJsonErrorResponse(400,-32600,"Invalid Request: Only one initialization request is allowed");if(this.sessionId=this.sessionIdGenerator?.(),this._initialized=!0,this.sessionId&&this._onsessioninitialized)await Promise.resolve(this._onsessioninitialized(this.sessionId))}if(!a){let g=this.validateSession(e);if(g)return g;let b=this.validateProtocolVersion(e);if(b)return b}if(this._closed)return this.createJsonErrorResponse(404,-32001,"Session not found");if(!i.some((g)=>Mo(g))){for(let g of i)this.onmessage?.(g,{authInfo:t?.authInfo,request:o});return new Response(null,{status:202})}let s=crypto.randomUUID(),c=i.find((g)=>E_(g)),l=c?c.params.protocolVersion:e.headers.get("mcp-protocol-version")??ll;if(this._enableJsonResponse)return new Promise((g)=>{this._streamMapping.set(s,{resolveJson:g,cleanup:()=>{this._streamMapping.delete(s)}});for(let b of i)if(Mo(b))this._requestToStreamMapping.set(b.id,s);for(let b of i)this.onmessage?.(b,{authInfo:t?.authInfo,request:o})});let d=new TextEncoder,m,p,f=new ReadableStream({start:(g)=>{m=g},cancel:()=>{if(p!==void 0)clearInterval(p);if(this._streamMapping.get(s)?.controller===m)this._streamMapping.delete(s)}}),v={"Content-Type":"text/event-stream","Cache-Control":"no-cache, no-transform",Connection:"keep-alive","X-Accel-Buffering":"no"};if(this.sessionId!==void 0)v["mcp-session-id"]=this.sessionId;for(let g of i)if(Mo(g))this._streamMapping.set(s,{controller:m,encoder:d,cleanup:()=>{if(p!==void 0)clearInterval(p);this._streamMapping.delete(s);try{m.close()}catch{}}}),this._requestToStreamMapping.set(g.id,s);await this.writePrimingEvent(m,d,s,l);for(let g of i){let b,R;if(Mo(g)&&this._eventStore&&this.supportsEmptySSEData(l))b=()=>{this.closeSSEStream(g.id)},R=()=>{this.closeStandaloneSSEStream()};this.onmessage?.(g,{authInfo:t?.authInfo,request:o,closeSSEStream:b,closeStandaloneSSEStream:R})}if(this._streamMapping.get(s)?.controller===m)p=this.startKeepAlive(m,d);return new Response(f,{status:200,headers:v})}catch(n){return this.onerror?.(n),this.createJsonErrorResponse(400,-32700,"Parse error",{data:String(n)})}}async handleDeleteRequest(e){let t=this.validateSession(e);if(t)return t;let n=this.validateProtocolVersion(e);if(n)return n;try{return await Promise.resolve(this._onsessionclosed?.(this.sessionId)),new Response(null,{status:200})}finally{await this.close()}}validateSession(e){if(this.sessionIdGenerator===void 0)return;if(!this._initialized)return this.onerror?.(Error("Bad Request: Server not initialized")),this.createJsonErrorResponse(400,-32000,"Bad Request: Server not initialized");let t=e.headers.get("mcp-session-id");if(!t)return this.onerror?.(Error("Bad Request: Mcp-Session-Id header is required")),this.createJsonErrorResponse(400,-32000,"Bad Request: Mcp-Session-Id header is required");if(t!==this.sessionId)return this.onerror?.(Error("Session not found")),this.createJsonErrorResponse(404,-32001,"Session not found")}validateProtocolVersion(e){let t=e.headers.get("mcp-protocol-version");if(t!==null&&!this._supportedProtocolVersions.includes(t)){let n=`Bad Request: Unsupported protocol version: ${t} (supported versions: ${this._supportedProtocolVersions.join(", ")})`;return this.onerror?.(Error(n)),this.createJsonErrorResponse(400,-32000,n)}}async close(){if(this._closed)return;this._closed=!0;for(let{cleanup:e}of this._streamMapping.values())e();this._streamMapping.clear(),this._requestResponseMap.clear(),this.onclose?.()}closeSSEStream(e){let t=this._requestToStreamMapping.get(e);if(!t)return;let n=this._streamMapping.get(t);if(n)n.cleanup()}closeStandaloneSSEStream(){let e=this._streamMapping.get(this._standaloneSseStreamId);if(e)e.cleanup()}async send(e,t){let n=t?.relatedRequestId;if(qo(e)||Ma(e))n=e.id;if(n===void 0){if(qo(e)||Ma(e))throw Error("Cannot send a response on a standalone SSE stream unless resuming a previous client request");let i;if(this._eventStore)i=await this._eventStore.storeEvent(this._standaloneSseStreamId,e);let a=this._streamMapping.get(this._standaloneSseStreamId);if(a===void 0)return;if(a.controller&&a.encoder&&(i===void 0||!a.replayedEventIds?.has(i)))this.writeSSEEvent(a.controller,a.encoder,e,i);return}let o=this._requestToStreamMapping.get(n);if(!o)throw Error(`No connection established for request ID: ${String(n)}`);let r=this._streamMapping.get(o);if(!this._enableJsonResponse){let i;if(this._eventStore)i=await this._eventStore.storeEvent(o,e),r=this._streamMapping.get(o);if(r?.controller&&r?.encoder&&(i===void 0||!r.replayedEventIds?.has(i)))this.writeSSEEvent(r.controller,r.encoder,e,i)}if(qo(e)||Ma(e)){this._requestResponseMap.set(n,e);let i=[...this._requestToStreamMapping.entries()].filter(([a,s])=>s===o).map(([a])=>a);if(i.every((a)=>this._requestResponseMap.has(a))){if(!r){if(this._enableJsonResponse)throw Error(`No connection established for request ID: ${String(n)}`);if(!this._eventStore){this.onerror?.(Error(`Response for request ID ${String(n)} is undeliverable: per-request stream is disconnected and no eventStore is configured`));for(let a of i)this._requestResponseMap.delete(a),this._requestToStreamMapping.delete(a);return}for(let a of i)this._requestResponseMap.delete(a),this._requestToStreamMapping.delete(a);return}if(this._enableJsonResponse&&r.resolveJson){let a={"Content-Type":"application/json"};if(this.sessionId!==void 0)a["mcp-session-id"]=this.sessionId;let s=i.map((c)=>this._requestResponseMap.get(c));if(s.length===1)r.resolveJson(Response.json(s[0],{status:200,headers:a}));else r.resolveJson(Response.json(s,{status:200,headers:a}));r.cleanup()}else r.cleanup();for(let a of i)this._requestResponseMap.delete(a),this._requestToStreamMapping.delete(a)}}}};var IM=Ek($k(),1);var C2=IM.default;export{C2 as Ajv,G as McpError,sz as McpServer,G as ProtocolError,MT as WebStandardStreamableHTTPServerTransport,Nv as z};
|