@aetherwealth/mcp 0.2.13 → 0.2.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +9 -9
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
// @bun
|
|
3
3
|
import{createRequire as mH}from"node:module";var uH=Object.create;var{getPrototypeOf:xH,defineProperty:sX,getOwnPropertyNames:fH}=Object;var _H=Object.prototype.hasOwnProperty;function iH($){return this[$]}var yH,nH,w7=($,v,D)=>{var X=$!=null&&typeof $==="object";if(X){var U=v?yH??=new WeakMap:nH??=new WeakMap,G=U.get($);if(G)return G}D=$!=null?uH(xH($)):{};let J=v||!$||!$.__esModule?sX(D,"default",{value:$,enumerable:!0}):D;for(let Q of fH($))if(!_H.call(J,Q))sX(J,Q,{get:iH.bind($,Q),enumerable:!0});if(X)U.set($,J);return J};var b=($,v)=>()=>(v||$((v={exports:{}}).exports,v),v.exports);var lH=($)=>$;function hH($,v){this[$]=lH.bind(null,v)}var C4=($,v)=>{for(var D in v)sX($,D,{get:v[D],enumerable:!0,configurable:!0,set:hH.bind(v,D)})};var cH=mH(import.meta.url);var $0=b((mV)=>{Object.defineProperty(mV,"__esModule",{value:!0});mV.regexpCode=mV.getEsmExportName=mV.getProperty=mV.safeStringify=mV.stringify=mV.strConcat=mV.addCodeArg=mV.str=mV._=mV.nil=mV._Code=mV.Name=mV.IDENTIFIER=mV._CodeOrName=void 0;class hD{}mV._CodeOrName=hD;mV.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class M1 extends hD{constructor($){super();if(!mV.IDENTIFIER.test($))throw Error("CodeGen: name must be a valid identifier");this.str=$}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}mV.Name=M1;class V4 extends hD{constructor($){super();this._items=typeof $==="string"?[$]:$}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let $=this._items[0];return $===""||$==='""'}get str(){var $;return($=this._str)!==null&&$!==void 0?$:this._str=this._items.reduce((v,D)=>`${v}${D}`,"")}get names(){var $;return($=this._names)!==null&&$!==void 0?$:this._names=this._items.reduce((v,D)=>{if(D instanceof M1)v[D.str]=(v[D.str]||0)+1;return v},{})}}mV._Code=V4;mV.nil=new V4("");function lV($,...v){let D=[$[0]],X=0;while(X<v.length)gz(D,v[X]),D.push($[++X]);return new V4(D)}mV._=lV;var Rz=new V4("+");function hV($,...v){let D=[sv($[0])],X=0;while(X<v.length)D.push(Rz),gz(D,v[X]),D.push(Rz,sv($[++X]));return bM(D),new V4(D)}mV.str=hV;function gz($,v){if(v instanceof V4)$.push(...v._items);else if(v instanceof M1)$.push(v);else $.push(kM(v))}mV.addCodeArg=gz;function bM($){let v=1;while(v<$.length-1){if($[v]===Rz){let D=qM($[v-1],$[v+1]);if(D!==void 0){$.splice(v-1,3,D);continue}$[v++]="+"}v++}}function qM($,v){if(v==='""')return $;if($==='""')return v;if(typeof $=="string"){if(v instanceof M1||$[$.length-1]!=='"')return;if(typeof v!="string")return`${$.slice(0,-1)}${v}"`;if(v[0]==='"')return $.slice(0,-1)+v.slice(1);return}if(typeof v=="string"&&v[0]==='"'&&!($ instanceof M1))return`"${$}${v.slice(1)}`;return}function SM($,v){return v.emptyStr()?$:$.emptyStr()?v:hV`${$}${v}`}mV.strConcat=SM;function kM($){return typeof $=="number"||typeof $=="boolean"||$===null?$:sv(Array.isArray($)?$.join(","):$)}function EM($){return new V4(sv($))}mV.stringify=EM;function sv($){return JSON.stringify($).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}mV.safeStringify=sv;function TM($){return typeof $=="string"&&mV.IDENTIFIER.test($)?new V4(`.${$}`):lV`[${$}]`}mV.getProperty=TM;function RM($){if(typeof $=="string"&&mV.IDENTIFIER.test($))return new V4(`${$}`);throw Error(`CodeGen: invalid export name: ${$}, use explicit $id name mapping`)}mV.getEsmExportName=RM;function gM($){return new V4($.toString())}mV.regexpCode=gM});var fz=b((pV)=>{Object.defineProperty(pV,"__esModule",{value:!0});pV.ValueScope=pV.ValueScopeName=pV.Scope=pV.varKinds=pV.UsedValueState=void 0;var m$=$0();class dV extends Error{constructor($){super(`CodeGen: "code" for ${$} not defined`);this.value=$.value}}var cD;(function($){$[$.Started=0]="Started",$[$.Completed=1]="Completed"})(cD||(pV.UsedValueState=cD={}));pV.varKinds={const:new m$.Name("const"),let:new m$.Name("let"),var:new m$.Name("var")};class uz{constructor({prefixes:$,parent:v}={}){this._names={},this._prefixes=$,this._parent=v}toName($){return $ instanceof m$.Name?$:this.name($)}name($){return new m$.Name(this._newName($))}_newName($){let v=this._names[$]||this._nameGroup($);return`${$}${v.index++}`}_nameGroup($){var v,D;if(((D=(v=this._parent)===null||v===void 0?void 0:v._prefixes)===null||D===void 0?void 0:D.has($))||this._prefixes&&!this._prefixes.has($))throw Error(`CodeGen: prefix "${$}" is not allowed in this scope`);return this._names[$]={prefix:$,index:0}}}pV.Scope=uz;class xz extends m$.Name{constructor($,v){super(v);this.prefix=$}setValue($,{property:v,itemIndex:D}){this.value=$,this.scopePath=m$._`.${new m$.Name(v)}[${D}]`}}pV.ValueScopeName=xz;var dM=m$._`\n`;class rV extends uz{constructor($){super($);this._values={},this._scope=$.scope,this.opts={...$,_n:$.lines?dM:m$.nil}}get(){return this._scope}name($){return new xz($,this._newName($))}value($,v){var D;if(v.ref===void 0)throw Error("CodeGen: ref must be passed in value");let X=this.toName($),{prefix:U}=X,G=(D=v.key)!==null&&D!==void 0?D:v.ref,J=this._values[U];if(J){let z=J.get(G);if(z)return z}else J=this._values[U]=new Map;J.set(G,X);let Q=this._scope[U]||(this._scope[U]=[]),W=Q.length;return Q[W]=v.ref,X.setValue(v,{property:U,itemIndex:W}),X}getValue($,v){let D=this._values[$];if(!D)return;return D.get(v)}scopeRefs($,v=this._values){return this._reduceValues(v,(D)=>{if(D.scopePath===void 0)throw Error(`CodeGen: name "${D}" has no value`);return m$._`${$}${D.scopePath}`})}scopeCode($=this._values,v,D){return this._reduceValues($,(X)=>{if(X.value===void 0)throw Error(`CodeGen: name "${X}" has no value`);return X.value.code},v,D)}_reduceValues($,v,D={},X){let U=m$.nil;for(let G in $){let J=$[G];if(!J)continue;let Q=D[G]=D[G]||new Map;J.forEach((W)=>{if(Q.has(W))return;Q.set(W,cD.Started);let z=v(W);if(z){let Y=this.opts.es5?pV.varKinds.var:pV.varKinds.const;U=m$._`${U}${Y} ${W} = ${z};${this.opts._n}`}else if(z=X===null||X===void 0?void 0:X(W))U=m$._`${U}${z}${this.opts._n}`;else throw new dV(W);Q.set(W,cD.Completed)})}return U}}pV.ValueScope=rV});var h=b((c$)=>{Object.defineProperty(c$,"__esModule",{value:!0});c$.or=c$.and=c$.not=c$.CodeGen=c$.operators=c$.varKinds=c$.ValueScopeName=c$.ValueScope=c$.Scope=c$.Name=c$.regexpCode=c$.stringify=c$.getProperty=c$.nil=c$.strConcat=c$.str=c$._=void 0;var d=$0(),K4=fz(),Y6=$0();Object.defineProperty(c$,"_",{enumerable:!0,get:function(){return Y6._}});Object.defineProperty(c$,"str",{enumerable:!0,get:function(){return Y6.str}});Object.defineProperty(c$,"strConcat",{enumerable:!0,get:function(){return Y6.strConcat}});Object.defineProperty(c$,"nil",{enumerable:!0,get:function(){return Y6.nil}});Object.defineProperty(c$,"getProperty",{enumerable:!0,get:function(){return Y6.getProperty}});Object.defineProperty(c$,"stringify",{enumerable:!0,get:function(){return Y6.stringify}});Object.defineProperty(c$,"regexpCode",{enumerable:!0,get:function(){return Y6.regexpCode}});Object.defineProperty(c$,"Name",{enumerable:!0,get:function(){return Y6.Name}});var aD=fz();Object.defineProperty(c$,"Scope",{enumerable:!0,get:function(){return aD.Scope}});Object.defineProperty(c$,"ValueScope",{enumerable:!0,get:function(){return aD.ValueScope}});Object.defineProperty(c$,"ValueScopeName",{enumerable:!0,get:function(){return aD.ValueScopeName}});Object.defineProperty(c$,"varKinds",{enumerable:!0,get:function(){return aD.varKinds}});c$.operators={GT:new d._Code(">"),GTE:new d._Code(">="),LT:new d._Code("<"),LTE:new d._Code("<="),EQ:new d._Code("==="),NEQ:new d._Code("!=="),NOT:new d._Code("!"),OR:new d._Code("||"),AND:new d._Code("&&"),ADD:new d._Code("+")};class I6{optimizeNodes(){return this}optimizeNames($,v){return this}}class oV extends I6{constructor($,v,D){super();this.varKind=$,this.name=v,this.rhs=D}render({es5:$,_n:v}){let D=$?K4.varKinds.var:this.varKind,X=this.rhs===void 0?"":` = ${this.rhs}`;return`${D} ${this.name}${X};`+v}optimizeNames($,v){if(!$[this.name.str])return;if(this.rhs)this.rhs=b1(this.rhs,$,v);return this}get names(){return this.rhs instanceof d._CodeOrName?this.rhs.names:{}}}class yz extends I6{constructor($,v,D){super();this.lhs=$,this.rhs=v,this.sideEffects=D}render({_n:$}){return`${this.lhs} = ${this.rhs};`+$}optimizeNames($,v){if(this.lhs instanceof d.Name&&!$[this.lhs.str]&&!this.sideEffects)return;return this.rhs=b1(this.rhs,$,v),this}get names(){let $=this.lhs instanceof d.Name?{}:{...this.lhs.names};return oD($,this.rhs)}}class aV extends yz{constructor($,v,D,X){super($,D,X);this.op=v}render({_n:$}){return`${this.lhs} ${this.op}= ${this.rhs};`+$}}class eV extends I6{constructor($){super();this.label=$,this.names={}}render({_n:$}){return`${this.label}:`+$}}class sV extends I6{constructor($){super();this.label=$,this.names={}}render({_n:$}){return`break${this.label?` ${this.label}`:""};`+$}}class $K extends I6{constructor($){super();this.error=$}render({_n:$}){return`throw ${this.error};`+$}get names(){return this.error.names}}class vK extends I6{constructor($){super();this.code=$}render({_n:$}){return`${this.code};`+$}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames($,v){return this.code=b1(this.code,$,v),this}get names(){return this.code instanceof d._CodeOrName?this.code.names:{}}}class eD extends I6{constructor($=[]){super();this.nodes=$}render($){return this.nodes.reduce((v,D)=>v+D.render($),"")}optimizeNodes(){let{nodes:$}=this,v=$.length;while(v--){let D=$[v].optimizeNodes();if(Array.isArray(D))$.splice(v,1,...D);else if(D)$[v]=D;else $.splice(v,1)}return $.length>0?this:void 0}optimizeNames($,v){let{nodes:D}=this,X=D.length;while(X--){let U=D[X];if(U.optimizeNames($,v))continue;oM($,U.names),D.splice(X,1)}return D.length>0?this:void 0}get names(){return this.nodes.reduce(($,v)=>S6($,v.names),{})}}class V6 extends eD{render($){return"{"+$._n+super.render($)+"}"+$._n}}class UK extends eD{}class v0 extends V6{}v0.kind="else";class h4 extends V6{constructor($,v){super(v);this.condition=$}render($){let v=`if(${this.condition})`+super.render($);if(this.else)v+="else "+this.else.render($);return v}optimizeNodes(){super.optimizeNodes();let $=this.condition;if($===!0)return this.nodes;let v=this.else;if(v){let D=v.optimizeNodes();v=this.else=Array.isArray(D)?new v0(D):D}if(v){if($===!1)return v instanceof h4?v:v.nodes;if(this.nodes.length)return this;return new h4(QK($),v instanceof h4?[v]:v.nodes)}if($===!1||!this.nodes.length)return;return this}optimizeNames($,v){var D;if(this.else=(D=this.else)===null||D===void 0?void 0:D.optimizeNames($,v),!(super.optimizeNames($,v)||this.else))return;return this.condition=b1(this.condition,$,v),this}get names(){let $=super.names;if(oD($,this.condition),this.else)S6($,this.else.names);return $}}h4.kind="if";class P1 extends V6{}P1.kind="for";class DK extends P1{constructor($){super();this.iteration=$}render($){return`for(${this.iteration})`+super.render($)}optimizeNames($,v){if(!super.optimizeNames($,v))return;return this.iteration=b1(this.iteration,$,v),this}get names(){return S6(super.names,this.iteration.names)}}class XK extends P1{constructor($,v,D,X){super();this.varKind=$,this.name=v,this.from=D,this.to=X}render($){let v=$.es5?K4.varKinds.var:this.varKind,{name:D,from:X,to:U}=this;return`for(${v} ${D}=${X}; ${D}<${U}; ${D}++)`+super.render($)}get names(){let $=oD(super.names,this.from);return oD($,this.to)}}class _z extends P1{constructor($,v,D,X){super();this.loop=$,this.varKind=v,this.name=D,this.iterable=X}render($){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render($)}optimizeNames($,v){if(!super.optimizeNames($,v))return;return this.iterable=b1(this.iterable,$,v),this}get names(){return S6(super.names,this.iterable.names)}}class dD extends V6{constructor($,v,D){super();this.name=$,this.args=v,this.async=D}render($){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render($)}}dD.kind="func";class rD extends eD{render($){return"return "+super.render($)}}rD.kind="return";class GK extends V6{render($){let v="try"+super.render($);if(this.catch)v+=this.catch.render($);if(this.finally)v+=this.finally.render($);return v}optimizeNodes(){var $,v;return super.optimizeNodes(),($=this.catch)===null||$===void 0||$.optimizeNodes(),(v=this.finally)===null||v===void 0||v.optimizeNodes(),this}optimizeNames($,v){var D,X;return super.optimizeNames($,v),(D=this.catch)===null||D===void 0||D.optimizeNames($,v),(X=this.finally)===null||X===void 0||X.optimizeNames($,v),this}get names(){let $=super.names;if(this.catch)S6($,this.catch.names);if(this.finally)S6($,this.finally.names);return $}}class pD extends V6{constructor($){super();this.error=$}render($){return`catch(${this.error})`+super.render($)}}pD.kind="catch";class tD extends V6{render($){return"finally"+super.render($)}}tD.kind="finally";class JK{constructor($,v={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...v,_n:v.lines?`
|
|
4
|
-
`:""},this._extScope=$,this._scope=new K4.Scope({parent:$}),this._nodes=[new UK]}toString(){return this._root.render(this.opts)}name($){return this._scope.name($)}scopeName($){return this._extScope.name($)}scopeValue($,v){let D=this._extScope.value($,v);return(this._values[D.prefix]||(this._values[D.prefix]=new Set)).add(D),D}getScopeValue($,v){return this._extScope.getValue($,v)}scopeRefs($){return this._extScope.scopeRefs($,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def($,v,D,X){let U=this._scope.toName(v);if(D!==void 0&&X)this._constants[U.str]=D;return this._leafNode(new oV($,U,D)),U}const($,v,D){return this._def(K4.varKinds.const,$,v,D)}let($,v,D){return this._def(K4.varKinds.let,$,v,D)}var($,v,D){return this._def(K4.varKinds.var,$,v,D)}assign($,v,D){return this._leafNode(new yz($,v,D))}add($,v){return this._leafNode(new aV($,c$.operators.ADD,v))}code($){if(typeof $=="function")$();else if($!==d.nil)this._leafNode(new vK($));return this}object(...$){let v=["{"];for(let[D,X]of $){if(v.length>1)v.push(",");if(v.push(D),D!==X||this.opts.es5)v.push(":"),(0,d.addCodeArg)(v,X)}return v.push("}"),new d._Code(v)}if($,v,D){if(this._blockNode(new h4($)),v&&D)this.code(v).else().code(D).endIf();else if(v)this.code(v).endIf();else if(D)throw Error('CodeGen: "else" body without "then" body');return this}elseIf($){return this._elseNode(new h4($))}else(){return this._elseNode(new v0)}endIf(){return this._endBlockNode(h4,v0)}_for($,v){if(this._blockNode($),v)this.code(v).endFor();return this}for($,v){return this._for(new DK($),v)}forRange($,v,D,X,U=this.opts.es5?K4.varKinds.var:K4.varKinds.let){let G=this._scope.toName($);return this._for(new XK(U,G,v,D),()=>X(G))}forOf($,v,D,X=K4.varKinds.const){let U=this._scope.toName($);if(this.opts.es5){let G=v instanceof d.Name?v:this.var("_arr",v);return this.forRange("_i",0,d._`${G}.length`,(J)=>{this.var(U,d._`${G}[${J}]`),D(U)})}return this._for(new _z("of",X,U,v),()=>D(U))}forIn($,v,D,X=this.opts.es5?K4.varKinds.var:K4.varKinds.const){if(this.opts.ownProperties)return this.forOf($,d._`Object.keys(${v})`,D);let U=this._scope.toName($);return this._for(new _z("in",X,U,v),()=>D(U))}endFor(){return this._endBlockNode(P1)}label($){return this._leafNode(new eV($))}break($){return this._leafNode(new sV($))}return($){let v=new rD;if(this._blockNode(v),this.code($),v.nodes.length!==1)throw Error('CodeGen: "return" should have one node');return this._endBlockNode(rD)}try($,v,D){if(!v&&!D)throw Error('CodeGen: "try" without "catch" and "finally"');let X=new GK;if(this._blockNode(X),this.code($),v){let U=this.name("e");this._currNode=X.catch=new pD(U),v(U)}if(D)this._currNode=X.finally=new tD,this.code(D);return this._endBlockNode(pD,tD)}throw($){return this._leafNode(new $K($))}block($,v){if(this._blockStarts.push(this._nodes.length),$)this.code($).endBlock(v);return this}endBlock($){let v=this._blockStarts.pop();if(v===void 0)throw Error("CodeGen: not in self-balancing block");let D=this._nodes.length-v;if(D<0||$!==void 0&&D!==$)throw Error(`CodeGen: wrong number of nodes: ${D} vs ${$} expected`);return this._nodes.length=v,this}func($,v=d.nil,D,X){if(this._blockNode(new dD($,v,D)),X)this.code(X).endFunc();return this}endFunc(){return this._endBlockNode(dD)}optimize($=1){while($-- >0)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode($){return this._currNode.nodes.push($),this}_blockNode($){this._currNode.nodes.push($),this._nodes.push($)}_endBlockNode($,v){let D=this._currNode;if(D instanceof $||v&&D instanceof v)return this._nodes.pop(),this;throw Error(`CodeGen: not in block "${v?`${$.kind}/${v.kind}`:$.kind}"`)}_elseNode($){let v=this._currNode;if(!(v instanceof h4))throw Error('CodeGen: "else" without "if"');return this._currNode=v.else=$,this}get _root(){return this._nodes[0]}get _currNode(){let $=this._nodes;return $[$.length-1]}set _currNode($){let v=this._nodes;v[v.length-1]=$}}c$.CodeGen=JK;function S6($,v){for(let D in v)$[D]=($[D]||0)+(v[D]||0);return $}function oD($,v){return v instanceof d._CodeOrName?S6($,v.names):$}function b1($,v,D){if($ instanceof d.Name)return X($);if(!U($))return $;return new d._Code($._items.reduce((G,J)=>{if(J instanceof d.Name)J=X(J);if(J instanceof d._Code)G.push(...J._items);else G.push(J);return G},[]));function X(G){let J=D[G.str];if(J===void 0||v[G.str]!==1)return G;return delete v[G.str],J}function U(G){return G instanceof d._Code&&G._items.some((J)=>J instanceof d.Name&&v[J.str]===1&&D[J.str]!==void 0)}}function oM($,v){for(let D in v)$[D]=($[D]||0)-(v[D]||0)}function QK($){return typeof $=="boolean"||typeof $=="number"||$===null?!$:d._`!${iz($)}`}c$.not=QK;var aM=WK(c$.operators.AND);function eM(...$){return $.reduce(aM)}c$.and=eM;var sM=WK(c$.operators.OR);function $P(...$){return $.reduce(sM)}c$.or=$P;function WK($){return(v,D)=>v===d.nil?D:D===d.nil?v:d._`${iz(v)} ${$} ${iz(D)}`}function iz($){return $ instanceof d.Name?$:d._`(${$})`}});var r=b((ZK)=>{Object.defineProperty(ZK,"__esModule",{value:!0});ZK.checkStrictMode=ZK.getErrorPath=ZK.Type=ZK.useFunc=ZK.setEvaluated=ZK.evaluatedPropsToName=ZK.mergeEvaluated=ZK.eachItem=ZK.unescapeJsonPointer=ZK.escapeJsonPointer=ZK.escapeFragment=ZK.unescapeFragment=ZK.schemaRefOrVal=ZK.schemaHasRulesButRef=ZK.schemaHasRules=ZK.checkUnknownRules=ZK.alwaysValidSchema=ZK.toHash=void 0;var Q$=h(),XP=$0();function GP($){let v={};for(let D of $)v[D]=!0;return v}ZK.toHash=GP;function JP($,v){if(typeof v=="boolean")return v;if(Object.keys(v).length===0)return!0;return VK($,v),!KK(v,$.self.RULES.all)}ZK.alwaysValidSchema=JP;function VK($,v=$.schema){let{opts:D,self:X}=$;if(!D.strictSchema)return;if(typeof v==="boolean")return;let U=X.RULES.keywords;for(let G in v)if(!U[G])NK($,`unknown keyword: "${G}"`)}ZK.checkUnknownRules=VK;function KK($,v){if(typeof $=="boolean")return!$;for(let D in $)if(v[D])return!0;return!1}ZK.schemaHasRules=KK;function QP($,v){if(typeof $=="boolean")return!$;for(let D in $)if(D!=="$ref"&&v.all[D])return!0;return!1}ZK.schemaHasRulesButRef=QP;function WP({topSchemaRef:$,schemaPath:v},D,X,U){if(!U){if(typeof D=="number"||typeof D=="boolean")return D;if(typeof D=="string")return Q$._`${D}`}return Q$._`${$}${v}${(0,Q$.getProperty)(X)}`}ZK.schemaRefOrVal=WP;function zP($){return LK(decodeURIComponent($))}ZK.unescapeFragment=zP;function YP($){return encodeURIComponent(lz($))}ZK.escapeFragment=YP;function lz($){if(typeof $=="number")return`${$}`;return $.replace(/~/g,"~0").replace(/\//g,"~1")}ZK.escapeJsonPointer=lz;function LK($){return $.replace(/~1/g,"/").replace(/~0/g,"~")}ZK.unescapeJsonPointer=LK;function IP($,v){if(Array.isArray($))for(let D of $)v(D);else v($)}ZK.eachItem=IP;function YK({mergeNames:$,mergeToName:v,mergeValues:D,resultToName:X}){return(U,G,J,Q)=>{let W=J===void 0?G:J instanceof Q$.Name?(G instanceof Q$.Name?$(U,G,J):v(U,G,J),J):G instanceof Q$.Name?(v(U,J,G),G):D(G,J);return Q===Q$.Name&&!(W instanceof Q$.Name)?X(U,W):W}}ZK.mergeEvaluated={props:YK({mergeNames:($,v,D)=>$.if(Q$._`${D} !== true && ${v} !== undefined`,()=>{$.if(Q$._`${v} === true`,()=>$.assign(D,!0),()=>$.assign(D,Q$._`${D} || {}`).code(Q$._`Object.assign(${D}, ${v})`))}),mergeToName:($,v,D)=>$.if(Q$._`${D} !== true`,()=>{if(v===!0)$.assign(D,!0);else $.assign(D,Q$._`${D} || {}`),hz($,D,v)}),mergeValues:($,v)=>$===!0?!0:{...$,...v},resultToName:BK}),items:YK({mergeNames:($,v,D)=>$.if(Q$._`${D} !== true && ${v} !== undefined`,()=>$.assign(D,Q$._`${v} === true ? true : ${D} > ${v} ? ${D} : ${v}`)),mergeToName:($,v,D)=>$.if(Q$._`${D} !== true`,()=>$.assign(D,v===!0?!0:Q$._`${D} > ${v} ? ${D} : ${v}`)),mergeValues:($,v)=>$===!0?!0:Math.max($,v),resultToName:($,v)=>$.var("items",v)})};function BK($,v){if(v===!0)return $.var("props",!0);let D=$.var("props",Q$._`{}`);if(v!==void 0)hz($,D,v);return D}ZK.evaluatedPropsToName=BK;function hz($,v,D){Object.keys(D).forEach((X)=>$.assign(Q$._`${v}${(0,Q$.getProperty)(X)}`,!0))}ZK.setEvaluated=hz;var IK={};function VP($,v){return $.scopeValue("func",{ref:v,code:IK[v.code]||(IK[v.code]=new XP._Code(v.code))})}ZK.useFunc=VP;var nz;(function($){$[$.Num=0]="Num",$[$.Str=1]="Str"})(nz||(ZK.Type=nz={}));function KP($,v,D){if($ instanceof Q$.Name){let X=v===nz.Num;return D?X?Q$._`"[" + ${$} + "]"`:Q$._`"['" + ${$} + "']"`:X?Q$._`"/" + ${$}`:Q$._`"/" + ${$}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return D?(0,Q$.getProperty)($).toString():"/"+lz($)}ZK.getErrorPath=KP;function NK($,v,D=$.opts.strictSchema){if(!D)return;if(v=`strict mode: ${v}`,D===!0)throw Error(v);$.self.logger.warn(v)}ZK.checkStrictMode=NK});var m4=b((HK)=>{Object.defineProperty(HK,"__esModule",{value:!0});var T$=h(),TP={data:new T$.Name("data"),valCxt:new T$.Name("valCxt"),instancePath:new T$.Name("instancePath"),parentData:new T$.Name("parentData"),parentDataProperty:new T$.Name("parentDataProperty"),rootData:new T$.Name("rootData"),dynamicAnchors:new T$.Name("dynamicAnchors"),vErrors:new T$.Name("vErrors"),errors:new T$.Name("errors"),this:new T$.Name("this"),self:new T$.Name("self"),scope:new T$.Name("scope"),json:new T$.Name("json"),jsonPos:new T$.Name("jsonPos"),jsonLen:new T$.Name("jsonLen"),jsonPart:new T$.Name("jsonPart")};HK.default=TP});var U0=b((wK)=>{Object.defineProperty(wK,"__esModule",{value:!0});wK.extendErrors=wK.resetErrorsCount=wK.reportExtraError=wK.reportError=wK.keyword$DataError=wK.keywordError=void 0;var p=h(),$X=r(),_$=m4();wK.keywordError={message:({keyword:$})=>p.str`must pass "${$}" keyword validation`};wK.keyword$DataError={message:({keyword:$,schemaType:v})=>v?p.str`"${$}" keyword must be ${v} ($data)`:p.str`"${$}" keyword is invalid ($data)`};function gP($,v=wK.keywordError,D,X){let{it:U}=$,{gen:G,compositeRule:J,allErrors:Q}=U,W=AK($,v,D);if(X!==null&&X!==void 0?X:J||Q)FK(G,W);else jK(U,p._`[${W}]`)}wK.reportError=gP;function CP($,v=wK.keywordError,D){let{it:X}=$,{gen:U,compositeRule:G,allErrors:J}=X,Q=AK($,v,D);if(FK(U,Q),!(G||J))jK(X,_$.default.vErrors)}wK.reportExtraError=CP;function uP($,v){$.assign(_$.default.errors,v),$.if(p._`${_$.default.vErrors} !== null`,()=>$.if(v,()=>$.assign(p._`${_$.default.vErrors}.length`,v),()=>$.assign(_$.default.vErrors,null)))}wK.resetErrorsCount=uP;function xP({gen:$,keyword:v,schemaValue:D,data:X,errsCount:U,it:G}){if(U===void 0)throw Error("ajv implementation error");let J=$.name("err");$.forRange("i",U,_$.default.errors,(Q)=>{if($.const(J,p._`${_$.default.vErrors}[${Q}]`),$.if(p._`${J}.instancePath === undefined`,()=>$.assign(p._`${J}.instancePath`,(0,p.strConcat)(_$.default.instancePath,G.errorPath))),$.assign(p._`${J}.schemaPath`,p.str`${G.errSchemaPath}/${v}`),G.opts.verbose)$.assign(p._`${J}.schema`,D),$.assign(p._`${J}.data`,X)})}wK.extendErrors=xP;function FK($,v){let D=$.const("err",v);$.if(p._`${_$.default.vErrors} === null`,()=>$.assign(_$.default.vErrors,p._`[${D}]`),p._`${_$.default.vErrors}.push(${D})`),$.code(p._`${_$.default.errors}++`)}function jK($,v){let{gen:D,validateName:X,schemaEnv:U}=$;if(U.$async)D.throw(p._`new ${$.ValidationError}(${v})`);else D.assign(p._`${X}.errors`,v),D.return(!1)}var k6={keyword:new p.Name("keyword"),schemaPath:new p.Name("schemaPath"),params:new p.Name("params"),propertyName:new p.Name("propertyName"),message:new p.Name("message"),schema:new p.Name("schema"),parentSchema:new p.Name("parentSchema")};function AK($,v,D){let{createErrors:X}=$.it;if(X===!1)return p._`{}`;return fP($,v,D)}function fP($,v,D={}){let{gen:X,it:U}=$,G=[_P(U,D),iP($,D)];return yP($,v,G),X.object(...G)}function _P({errorPath:$},{instancePath:v}){let D=v?p.str`${$}${(0,$X.getErrorPath)(v,$X.Type.Str)}`:$;return[_$.default.instancePath,(0,p.strConcat)(_$.default.instancePath,D)]}function iP({keyword:$,it:{errSchemaPath:v}},{schemaPath:D,parentSchema:X}){let U=X?v:p.str`${v}/${$}`;if(D)U=p.str`${U}${(0,$X.getErrorPath)(D,$X.Type.Str)}`;return[k6.schemaPath,U]}function yP($,{params:v,message:D},X){let{keyword:U,data:G,schemaValue:J,it:Q}=$,{opts:W,propertyName:z,topSchemaRef:Y,schemaPath:I}=Q;if(X.push([k6.keyword,U],[k6.params,typeof v=="function"?v($):v||p._`{}`]),W.messages)X.push([k6.message,typeof D=="function"?D($):D]);if(W.verbose)X.push([k6.schema,J],[k6.parentSchema,p._`${Y}${I}`],[_$.default.data,G]);if(z)X.push([k6.propertyName,z])}});var SK=b((bK)=>{Object.defineProperty(bK,"__esModule",{value:!0});bK.boolOrEmptySchema=bK.topBoolOrEmptySchema=void 0;var cP=U0(),dP=h(),rP=m4(),pP={message:"boolean schema is false"};function tP($){let{gen:v,schema:D,validateName:X}=$;if(D===!1)PK($,!1);else if(typeof D=="object"&&D.$async===!0)v.return(rP.default.data);else v.assign(dP._`${X}.errors`,null),v.return(!0)}bK.topBoolOrEmptySchema=tP;function oP($,v){let{gen:D,schema:X}=$;if(X===!1)D.var(v,!1),PK($);else D.var(v,!0)}bK.boolOrEmptySchema=oP;function PK($,v){let{gen:D,data:X}=$,U={gen:D,keyword:"false schema",data:X,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:$};(0,cP.reportError)(U,pP,void 0,v)}});var cz=b((kK)=>{Object.defineProperty(kK,"__esModule",{value:!0});kK.getRules=kK.isJSONType=void 0;var eP=["string","number","integer","boolean","null","object","array"],sP=new Set(eP);function $b($){return typeof $=="string"&&sP.has($)}kK.isJSONType=$b;function vb(){let $={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...$,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},$.number,$.string,$.array,$.object],post:{rules:[]},all:{},keywords:{}}}kK.getRules=vb});var dz=b((gK)=>{Object.defineProperty(gK,"__esModule",{value:!0});gK.shouldUseRule=gK.shouldUseGroup=gK.schemaHasRulesForType=void 0;function Db({schema:$,self:v},D){let X=v.RULES.types[D];return X&&X!==!0&&TK($,X)}gK.schemaHasRulesForType=Db;function TK($,v){return v.rules.some((D)=>RK($,D))}gK.shouldUseGroup=TK;function RK($,v){var D;return $[v.keyword]!==void 0||((D=v.definition.implements)===null||D===void 0?void 0:D.some((X)=>$[X]!==void 0))}gK.shouldUseRule=RK});var D0=b((_K)=>{Object.defineProperty(_K,"__esModule",{value:!0});_K.reportTypeError=_K.checkDataTypes=_K.checkDataType=_K.coerceAndCheckDataType=_K.getJSONTypes=_K.getSchemaTypes=_K.DataType=void 0;var Jb=cz(),Qb=dz(),Wb=U0(),n=h(),uK=r(),q1;(function($){$[$.Correct=0]="Correct",$[$.Wrong=1]="Wrong"})(q1||(_K.DataType=q1={}));function zb($){let v=xK($.type);if(v.includes("null")){if($.nullable===!1)throw Error("type: null contradicts nullable: false")}else{if(!v.length&&$.nullable!==void 0)throw Error('"nullable" cannot be used without "type"');if($.nullable===!0)v.push("null")}return v}_K.getSchemaTypes=zb;function xK($){let v=Array.isArray($)?$:$?[$]:[];if(v.every(Jb.isJSONType))return v;throw Error("type must be JSONType or JSONType[]: "+v.join(","))}_K.getJSONTypes=xK;function Yb($,v){let{gen:D,data:X,opts:U}=$,G=Ib(v,U.coerceTypes),J=v.length>0&&!(G.length===0&&v.length===1&&(0,Qb.schemaHasRulesForType)($,v[0]));if(J){let Q=pz(v,X,U.strictNumbers,q1.Wrong);D.if(Q,()=>{if(G.length)Vb($,v,G);else tz($)})}return J}_K.coerceAndCheckDataType=Yb;var fK=new Set(["string","number","integer","boolean","null"]);function Ib($,v){return v?$.filter((D)=>fK.has(D)||v==="array"&&D==="array"):[]}function Vb($,v,D){let{gen:X,data:U,opts:G}=$,J=X.let("dataType",n._`typeof ${U}`),Q=X.let("coerced",n._`undefined`);if(G.coerceTypes==="array")X.if(n._`${J} == 'object' && Array.isArray(${U}) && ${U}.length == 1`,()=>X.assign(U,n._`${U}[0]`).assign(J,n._`typeof ${U}`).if(pz(v,U,G.strictNumbers),()=>X.assign(Q,U)));X.if(n._`${Q} !== undefined`);for(let z of D)if(fK.has(z)||z==="array"&&G.coerceTypes==="array")W(z);X.else(),tz($),X.endIf(),X.if(n._`${Q} !== undefined`,()=>{X.assign(U,Q),Kb($,Q)});function W(z){switch(z){case"string":X.elseIf(n._`${J} == "number" || ${J} == "boolean"`).assign(Q,n._`"" + ${U}`).elseIf(n._`${U} === null`).assign(Q,n._`""`);return;case"number":X.elseIf(n._`${J} == "boolean" || ${U} === null
|
|
4
|
+
`:""},this._extScope=$,this._scope=new K4.Scope({parent:$}),this._nodes=[new UK]}toString(){return this._root.render(this.opts)}name($){return this._scope.name($)}scopeName($){return this._extScope.name($)}scopeValue($,v){let D=this._extScope.value($,v);return(this._values[D.prefix]||(this._values[D.prefix]=new Set)).add(D),D}getScopeValue($,v){return this._extScope.getValue($,v)}scopeRefs($){return this._extScope.scopeRefs($,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def($,v,D,X){let U=this._scope.toName(v);if(D!==void 0&&X)this._constants[U.str]=D;return this._leafNode(new oV($,U,D)),U}const($,v,D){return this._def(K4.varKinds.const,$,v,D)}let($,v,D){return this._def(K4.varKinds.let,$,v,D)}var($,v,D){return this._def(K4.varKinds.var,$,v,D)}assign($,v,D){return this._leafNode(new yz($,v,D))}add($,v){return this._leafNode(new aV($,c$.operators.ADD,v))}code($){if(typeof $=="function")$();else if($!==d.nil)this._leafNode(new vK($));return this}object(...$){let v=["{"];for(let[D,X]of $){if(v.length>1)v.push(",");if(v.push(D),D!==X||this.opts.es5)v.push(":"),(0,d.addCodeArg)(v,X)}return v.push("}"),new d._Code(v)}if($,v,D){if(this._blockNode(new h4($)),v&&D)this.code(v).else().code(D).endIf();else if(v)this.code(v).endIf();else if(D)throw Error('CodeGen: "else" body without "then" body');return this}elseIf($){return this._elseNode(new h4($))}else(){return this._elseNode(new v0)}endIf(){return this._endBlockNode(h4,v0)}_for($,v){if(this._blockNode($),v)this.code(v).endFor();return this}for($,v){return this._for(new DK($),v)}forRange($,v,D,X,U=this.opts.es5?K4.varKinds.var:K4.varKinds.let){let G=this._scope.toName($);return this._for(new XK(U,G,v,D),()=>X(G))}forOf($,v,D,X=K4.varKinds.const){let U=this._scope.toName($);if(this.opts.es5){let G=v instanceof d.Name?v:this.var("_arr",v);return this.forRange("_i",0,d._`${G}.length`,(J)=>{this.var(U,d._`${G}[${J}]`),D(U)})}return this._for(new _z("of",X,U,v),()=>D(U))}forIn($,v,D,X=this.opts.es5?K4.varKinds.var:K4.varKinds.const){if(this.opts.ownProperties)return this.forOf($,d._`Object.keys(${v})`,D);let U=this._scope.toName($);return this._for(new _z("in",X,U,v),()=>D(U))}endFor(){return this._endBlockNode(P1)}label($){return this._leafNode(new eV($))}break($){return this._leafNode(new sV($))}return($){let v=new rD;if(this._blockNode(v),this.code($),v.nodes.length!==1)throw Error('CodeGen: "return" should have one node');return this._endBlockNode(rD)}try($,v,D){if(!v&&!D)throw Error('CodeGen: "try" without "catch" and "finally"');let X=new GK;if(this._blockNode(X),this.code($),v){let U=this.name("e");this._currNode=X.catch=new pD(U),v(U)}if(D)this._currNode=X.finally=new tD,this.code(D);return this._endBlockNode(pD,tD)}throw($){return this._leafNode(new $K($))}block($,v){if(this._blockStarts.push(this._nodes.length),$)this.code($).endBlock(v);return this}endBlock($){let v=this._blockStarts.pop();if(v===void 0)throw Error("CodeGen: not in self-balancing block");let D=this._nodes.length-v;if(D<0||$!==void 0&&D!==$)throw Error(`CodeGen: wrong number of nodes: ${D} vs ${$} expected`);return this._nodes.length=v,this}func($,v=d.nil,D,X){if(this._blockNode(new dD($,v,D)),X)this.code(X).endFunc();return this}endFunc(){return this._endBlockNode(dD)}optimize($=1){while($-- >0)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode($){return this._currNode.nodes.push($),this}_blockNode($){this._currNode.nodes.push($),this._nodes.push($)}_endBlockNode($,v){let D=this._currNode;if(D instanceof $||v&&D instanceof v)return this._nodes.pop(),this;throw Error(`CodeGen: not in block "${v?`${$.kind}/${v.kind}`:$.kind}"`)}_elseNode($){let v=this._currNode;if(!(v instanceof h4))throw Error('CodeGen: "else" without "if"');return this._currNode=v.else=$,this}get _root(){return this._nodes[0]}get _currNode(){let $=this._nodes;return $[$.length-1]}set _currNode($){let v=this._nodes;v[v.length-1]=$}}c$.CodeGen=JK;function S6($,v){for(let D in v)$[D]=($[D]||0)+(v[D]||0);return $}function oD($,v){return v instanceof d._CodeOrName?S6($,v.names):$}function b1($,v,D){if($ instanceof d.Name)return X($);if(!U($))return $;return new d._Code($._items.reduce((G,J)=>{if(J instanceof d.Name)J=X(J);if(J instanceof d._Code)G.push(...J._items);else G.push(J);return G},[]));function X(G){let J=D[G.str];if(J===void 0||v[G.str]!==1)return G;return delete v[G.str],J}function U(G){return G instanceof d._Code&&G._items.some((J)=>J instanceof d.Name&&v[J.str]===1&&D[J.str]!==void 0)}}function oM($,v){for(let D in v)$[D]=($[D]||0)-(v[D]||0)}function QK($){return typeof $=="boolean"||typeof $=="number"||$===null?!$:d._`!${iz($)}`}c$.not=QK;var aM=WK(c$.operators.AND);function eM(...$){return $.reduce(aM)}c$.and=eM;var sM=WK(c$.operators.OR);function $P(...$){return $.reduce(sM)}c$.or=$P;function WK($){return(v,D)=>v===d.nil?D:D===d.nil?v:d._`${iz(v)} ${$} ${iz(D)}`}function iz($){return $ instanceof d.Name?$:d._`(${$})`}});var r=b((ZK)=>{Object.defineProperty(ZK,"__esModule",{value:!0});ZK.checkStrictMode=ZK.getErrorPath=ZK.Type=ZK.useFunc=ZK.setEvaluated=ZK.evaluatedPropsToName=ZK.mergeEvaluated=ZK.eachItem=ZK.unescapeJsonPointer=ZK.escapeJsonPointer=ZK.escapeFragment=ZK.unescapeFragment=ZK.schemaRefOrVal=ZK.schemaHasRulesButRef=ZK.schemaHasRules=ZK.checkUnknownRules=ZK.alwaysValidSchema=ZK.toHash=void 0;var Q$=h(),XP=$0();function GP($){let v={};for(let D of $)v[D]=!0;return v}ZK.toHash=GP;function JP($,v){if(typeof v=="boolean")return v;if(Object.keys(v).length===0)return!0;return VK($,v),!KK(v,$.self.RULES.all)}ZK.alwaysValidSchema=JP;function VK($,v=$.schema){let{opts:D,self:X}=$;if(!D.strictSchema)return;if(typeof v==="boolean")return;let U=X.RULES.keywords;for(let G in v)if(!U[G])NK($,`unknown keyword: "${G}"`)}ZK.checkUnknownRules=VK;function KK($,v){if(typeof $=="boolean")return!$;for(let D in $)if(v[D])return!0;return!1}ZK.schemaHasRules=KK;function QP($,v){if(typeof $=="boolean")return!$;for(let D in $)if(D!=="$ref"&&v.all[D])return!0;return!1}ZK.schemaHasRulesButRef=QP;function WP({topSchemaRef:$,schemaPath:v},D,X,U){if(!U){if(typeof D=="number"||typeof D=="boolean")return D;if(typeof D=="string")return Q$._`${D}`}return Q$._`${$}${v}${(0,Q$.getProperty)(X)}`}ZK.schemaRefOrVal=WP;function zP($){return LK(decodeURIComponent($))}ZK.unescapeFragment=zP;function YP($){return encodeURIComponent(lz($))}ZK.escapeFragment=YP;function lz($){if(typeof $=="number")return`${$}`;return $.replace(/~/g,"~0").replace(/\//g,"~1")}ZK.escapeJsonPointer=lz;function LK($){return $.replace(/~1/g,"/").replace(/~0/g,"~")}ZK.unescapeJsonPointer=LK;function IP($,v){if(Array.isArray($))for(let D of $)v(D);else v($)}ZK.eachItem=IP;function YK({mergeNames:$,mergeToName:v,mergeValues:D,resultToName:X}){return(U,G,J,Q)=>{let W=J===void 0?G:J instanceof Q$.Name?(G instanceof Q$.Name?$(U,G,J):v(U,G,J),J):G instanceof Q$.Name?(v(U,J,G),G):D(G,J);return Q===Q$.Name&&!(W instanceof Q$.Name)?X(U,W):W}}ZK.mergeEvaluated={props:YK({mergeNames:($,v,D)=>$.if(Q$._`${D} !== true && ${v} !== undefined`,()=>{$.if(Q$._`${v} === true`,()=>$.assign(D,!0),()=>$.assign(D,Q$._`${D} || {}`).code(Q$._`Object.assign(${D}, ${v})`))}),mergeToName:($,v,D)=>$.if(Q$._`${D} !== true`,()=>{if(v===!0)$.assign(D,!0);else $.assign(D,Q$._`${D} || {}`),hz($,D,v)}),mergeValues:($,v)=>$===!0?!0:{...$,...v},resultToName:BK}),items:YK({mergeNames:($,v,D)=>$.if(Q$._`${D} !== true && ${v} !== undefined`,()=>$.assign(D,Q$._`${v} === true ? true : ${D} > ${v} ? ${D} : ${v}`)),mergeToName:($,v,D)=>$.if(Q$._`${D} !== true`,()=>$.assign(D,v===!0?!0:Q$._`${D} > ${v} ? ${D} : ${v}`)),mergeValues:($,v)=>$===!0?!0:Math.max($,v),resultToName:($,v)=>$.var("items",v)})};function BK($,v){if(v===!0)return $.var("props",!0);let D=$.var("props",Q$._`{}`);if(v!==void 0)hz($,D,v);return D}ZK.evaluatedPropsToName=BK;function hz($,v,D){Object.keys(D).forEach((X)=>$.assign(Q$._`${v}${(0,Q$.getProperty)(X)}`,!0))}ZK.setEvaluated=hz;var IK={};function VP($,v){return $.scopeValue("func",{ref:v,code:IK[v.code]||(IK[v.code]=new XP._Code(v.code))})}ZK.useFunc=VP;var nz;(function($){$[$.Num=0]="Num",$[$.Str=1]="Str"})(nz||(ZK.Type=nz={}));function KP($,v,D){if($ instanceof Q$.Name){let X=v===nz.Num;return D?X?Q$._`"[" + ${$} + "]"`:Q$._`"['" + ${$} + "']"`:X?Q$._`"/" + ${$}`:Q$._`"/" + ${$}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return D?(0,Q$.getProperty)($).toString():"/"+lz($)}ZK.getErrorPath=KP;function NK($,v,D=$.opts.strictSchema){if(!D)return;if(v=`strict mode: ${v}`,D===!0)throw Error(v);$.self.logger.warn(v)}ZK.checkStrictMode=NK});var m4=b((HK)=>{Object.defineProperty(HK,"__esModule",{value:!0});var T$=h(),TP={data:new T$.Name("data"),valCxt:new T$.Name("valCxt"),instancePath:new T$.Name("instancePath"),parentData:new T$.Name("parentData"),parentDataProperty:new T$.Name("parentDataProperty"),rootData:new T$.Name("rootData"),dynamicAnchors:new T$.Name("dynamicAnchors"),vErrors:new T$.Name("vErrors"),errors:new T$.Name("errors"),this:new T$.Name("this"),self:new T$.Name("self"),scope:new T$.Name("scope"),json:new T$.Name("json"),jsonPos:new T$.Name("jsonPos"),jsonLen:new T$.Name("jsonLen"),jsonPart:new T$.Name("jsonPart")};HK.default=TP});var U0=b((wK)=>{Object.defineProperty(wK,"__esModule",{value:!0});wK.extendErrors=wK.resetErrorsCount=wK.reportExtraError=wK.reportError=wK.keyword$DataError=wK.keywordError=void 0;var p=h(),$X=r(),f$=m4();wK.keywordError={message:({keyword:$})=>p.str`must pass "${$}" keyword validation`};wK.keyword$DataError={message:({keyword:$,schemaType:v})=>v?p.str`"${$}" keyword must be ${v} ($data)`:p.str`"${$}" keyword is invalid ($data)`};function gP($,v=wK.keywordError,D,X){let{it:U}=$,{gen:G,compositeRule:J,allErrors:Q}=U,W=AK($,v,D);if(X!==null&&X!==void 0?X:J||Q)FK(G,W);else jK(U,p._`[${W}]`)}wK.reportError=gP;function CP($,v=wK.keywordError,D){let{it:X}=$,{gen:U,compositeRule:G,allErrors:J}=X,Q=AK($,v,D);if(FK(U,Q),!(G||J))jK(X,f$.default.vErrors)}wK.reportExtraError=CP;function uP($,v){$.assign(f$.default.errors,v),$.if(p._`${f$.default.vErrors} !== null`,()=>$.if(v,()=>$.assign(p._`${f$.default.vErrors}.length`,v),()=>$.assign(f$.default.vErrors,null)))}wK.resetErrorsCount=uP;function xP({gen:$,keyword:v,schemaValue:D,data:X,errsCount:U,it:G}){if(U===void 0)throw Error("ajv implementation error");let J=$.name("err");$.forRange("i",U,f$.default.errors,(Q)=>{if($.const(J,p._`${f$.default.vErrors}[${Q}]`),$.if(p._`${J}.instancePath === undefined`,()=>$.assign(p._`${J}.instancePath`,(0,p.strConcat)(f$.default.instancePath,G.errorPath))),$.assign(p._`${J}.schemaPath`,p.str`${G.errSchemaPath}/${v}`),G.opts.verbose)$.assign(p._`${J}.schema`,D),$.assign(p._`${J}.data`,X)})}wK.extendErrors=xP;function FK($,v){let D=$.const("err",v);$.if(p._`${f$.default.vErrors} === null`,()=>$.assign(f$.default.vErrors,p._`[${D}]`),p._`${f$.default.vErrors}.push(${D})`),$.code(p._`${f$.default.errors}++`)}function jK($,v){let{gen:D,validateName:X,schemaEnv:U}=$;if(U.$async)D.throw(p._`new ${$.ValidationError}(${v})`);else D.assign(p._`${X}.errors`,v),D.return(!1)}var k6={keyword:new p.Name("keyword"),schemaPath:new p.Name("schemaPath"),params:new p.Name("params"),propertyName:new p.Name("propertyName"),message:new p.Name("message"),schema:new p.Name("schema"),parentSchema:new p.Name("parentSchema")};function AK($,v,D){let{createErrors:X}=$.it;if(X===!1)return p._`{}`;return fP($,v,D)}function fP($,v,D={}){let{gen:X,it:U}=$,G=[_P(U,D),iP($,D)];return yP($,v,G),X.object(...G)}function _P({errorPath:$},{instancePath:v}){let D=v?p.str`${$}${(0,$X.getErrorPath)(v,$X.Type.Str)}`:$;return[f$.default.instancePath,(0,p.strConcat)(f$.default.instancePath,D)]}function iP({keyword:$,it:{errSchemaPath:v}},{schemaPath:D,parentSchema:X}){let U=X?v:p.str`${v}/${$}`;if(D)U=p.str`${U}${(0,$X.getErrorPath)(D,$X.Type.Str)}`;return[k6.schemaPath,U]}function yP($,{params:v,message:D},X){let{keyword:U,data:G,schemaValue:J,it:Q}=$,{opts:W,propertyName:z,topSchemaRef:Y,schemaPath:I}=Q;if(X.push([k6.keyword,U],[k6.params,typeof v=="function"?v($):v||p._`{}`]),W.messages)X.push([k6.message,typeof D=="function"?D($):D]);if(W.verbose)X.push([k6.schema,J],[k6.parentSchema,p._`${Y}${I}`],[f$.default.data,G]);if(z)X.push([k6.propertyName,z])}});var SK=b((bK)=>{Object.defineProperty(bK,"__esModule",{value:!0});bK.boolOrEmptySchema=bK.topBoolOrEmptySchema=void 0;var cP=U0(),dP=h(),rP=m4(),pP={message:"boolean schema is false"};function tP($){let{gen:v,schema:D,validateName:X}=$;if(D===!1)PK($,!1);else if(typeof D=="object"&&D.$async===!0)v.return(rP.default.data);else v.assign(dP._`${X}.errors`,null),v.return(!0)}bK.topBoolOrEmptySchema=tP;function oP($,v){let{gen:D,schema:X}=$;if(X===!1)D.var(v,!1),PK($);else D.var(v,!0)}bK.boolOrEmptySchema=oP;function PK($,v){let{gen:D,data:X}=$,U={gen:D,keyword:"false schema",data:X,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:$};(0,cP.reportError)(U,pP,void 0,v)}});var cz=b((kK)=>{Object.defineProperty(kK,"__esModule",{value:!0});kK.getRules=kK.isJSONType=void 0;var eP=["string","number","integer","boolean","null","object","array"],sP=new Set(eP);function $b($){return typeof $=="string"&&sP.has($)}kK.isJSONType=$b;function vb(){let $={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...$,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},$.number,$.string,$.array,$.object],post:{rules:[]},all:{},keywords:{}}}kK.getRules=vb});var dz=b((gK)=>{Object.defineProperty(gK,"__esModule",{value:!0});gK.shouldUseRule=gK.shouldUseGroup=gK.schemaHasRulesForType=void 0;function Db({schema:$,self:v},D){let X=v.RULES.types[D];return X&&X!==!0&&TK($,X)}gK.schemaHasRulesForType=Db;function TK($,v){return v.rules.some((D)=>RK($,D))}gK.shouldUseGroup=TK;function RK($,v){var D;return $[v.keyword]!==void 0||((D=v.definition.implements)===null||D===void 0?void 0:D.some((X)=>$[X]!==void 0))}gK.shouldUseRule=RK});var D0=b((_K)=>{Object.defineProperty(_K,"__esModule",{value:!0});_K.reportTypeError=_K.checkDataTypes=_K.checkDataType=_K.coerceAndCheckDataType=_K.getJSONTypes=_K.getSchemaTypes=_K.DataType=void 0;var Jb=cz(),Qb=dz(),Wb=U0(),n=h(),uK=r(),q1;(function($){$[$.Correct=0]="Correct",$[$.Wrong=1]="Wrong"})(q1||(_K.DataType=q1={}));function zb($){let v=xK($.type);if(v.includes("null")){if($.nullable===!1)throw Error("type: null contradicts nullable: false")}else{if(!v.length&&$.nullable!==void 0)throw Error('"nullable" cannot be used without "type"');if($.nullable===!0)v.push("null")}return v}_K.getSchemaTypes=zb;function xK($){let v=Array.isArray($)?$:$?[$]:[];if(v.every(Jb.isJSONType))return v;throw Error("type must be JSONType or JSONType[]: "+v.join(","))}_K.getJSONTypes=xK;function Yb($,v){let{gen:D,data:X,opts:U}=$,G=Ib(v,U.coerceTypes),J=v.length>0&&!(G.length===0&&v.length===1&&(0,Qb.schemaHasRulesForType)($,v[0]));if(J){let Q=pz(v,X,U.strictNumbers,q1.Wrong);D.if(Q,()=>{if(G.length)Vb($,v,G);else tz($)})}return J}_K.coerceAndCheckDataType=Yb;var fK=new Set(["string","number","integer","boolean","null"]);function Ib($,v){return v?$.filter((D)=>fK.has(D)||v==="array"&&D==="array"):[]}function Vb($,v,D){let{gen:X,data:U,opts:G}=$,J=X.let("dataType",n._`typeof ${U}`),Q=X.let("coerced",n._`undefined`);if(G.coerceTypes==="array")X.if(n._`${J} == 'object' && Array.isArray(${U}) && ${U}.length == 1`,()=>X.assign(U,n._`${U}[0]`).assign(J,n._`typeof ${U}`).if(pz(v,U,G.strictNumbers),()=>X.assign(Q,U)));X.if(n._`${Q} !== undefined`);for(let z of D)if(fK.has(z)||z==="array"&&G.coerceTypes==="array")W(z);X.else(),tz($),X.endIf(),X.if(n._`${Q} !== undefined`,()=>{X.assign(U,Q),Kb($,Q)});function W(z){switch(z){case"string":X.elseIf(n._`${J} == "number" || ${J} == "boolean"`).assign(Q,n._`"" + ${U}`).elseIf(n._`${U} === null`).assign(Q,n._`""`);return;case"number":X.elseIf(n._`${J} == "boolean" || ${U} === null
|
|
5
5
|
|| (${J} == "string" && ${U} && ${U} == +${U})`).assign(Q,n._`+${U}`);return;case"integer":X.elseIf(n._`${J} === "boolean" || ${U} === null
|
|
6
6
|
|| (${J} === "string" && ${U} && ${U} == +${U} && !(${U} % 1))`).assign(Q,n._`+${U}`);return;case"boolean":X.elseIf(n._`${U} === "false" || ${U} === 0 || ${U} === null`).assign(Q,!1).elseIf(n._`${U} === "true" || ${U} === 1`).assign(Q,!0);return;case"null":X.elseIf(n._`${U} === "" || ${U} === 0 || ${U} === false`),X.assign(Q,null);return;case"array":X.elseIf(n._`${J} === "string" || ${J} === "number"
|
|
7
|
-
|| ${J} === "boolean" || ${U} === null`).assign(Q,n._`[${U}]`)}}}function Kb({gen:$,parentData:v,parentDataProperty:D},X){$.if(n._`${v} !== undefined`,()=>$.assign(n._`${v}[${D}]`,X))}function rz($,v,D,X=q1.Correct){let U=X===q1.Correct?n.operators.EQ:n.operators.NEQ,G;switch($){case"null":return n._`${v} ${U} null`;case"array":G=n._`Array.isArray(${v})`;break;case"object":G=n._`${v} && typeof ${v} == "object" && !Array.isArray(${v})`;break;case"integer":G=J(n._`!(${v} % 1) && !isNaN(${v})`);break;case"number":G=J();break;default:return n._`typeof ${v} ${U} ${$}`}return X===q1.Correct?G:(0,n.not)(G);function J(Q=n.nil){return(0,n.and)(n._`typeof ${v} == "number"`,Q,D?n._`isFinite(${v})`:n.nil)}}_K.checkDataType=rz;function pz($,v,D,X){if($.length===1)return rz($[0],v,D,X);let U,G=(0,uK.toHash)($);if(G.array&&G.object){let J=n._`typeof ${v} != "object"`;U=G.null?J:n._`!${v} || ${J}`,delete G.null,delete G.array,delete G.object}else U=n.nil;if(G.number)delete G.integer;for(let J in G)U=(0,n.and)(U,rz(J,v,D,X));return U}_K.checkDataTypes=pz;var Lb={message:({schema:$})=>`must be ${$}`,params:({schema:$,schemaValue:v})=>typeof $=="string"?n._`{type: ${$}}`:n._`{type: ${v}}`};function tz($){let v=Bb($);(0,Wb.reportError)(v,Lb)}_K.reportTypeError=tz;function Bb($){let{gen:v,data:D,schema:X}=$,U=(0,uK.schemaRefOrVal)($,X,"type");return{gen:v,keyword:"type",data:D,schema:X.type,schemaCode:U,schemaValue:U,parentSchema:X,params:{},it:$}}});var hK=b((nK)=>{Object.defineProperty(nK,"__esModule",{value:!0});nK.assignDefaults=void 0;var S1=h(),Ab=r();function wb($,v){let{properties:D,items:X}=$.schema;if(v==="object"&&D)for(let U in D)yK($,U,D[U].default);else if(v==="array"&&Array.isArray(X))X.forEach((U,G)=>yK($,G,U.default))}nK.assignDefaults=wb;function yK($,v,D){let{gen:X,compositeRule:U,data:G,opts:J}=$;if(D===void 0)return;let Q=S1._`${G}${(0,S1.getProperty)(v)}`;if(U){(0,Ab.checkStrictMode)($,`default is ignored for: ${Q}`);return}let W=S1._`${Q} === undefined`;if(J.useDefaults==="empty")W=S1._`${W} || ${Q} === null || ${Q} === ""`;X.if(W,S1._`${Q} = ${(0,S1.stringify)(D)}`)}});var X4=b((dK)=>{Object.defineProperty(dK,"__esModule",{value:!0});dK.validateUnion=dK.validateArray=dK.usePattern=dK.callValidateCode=dK.schemaProperties=dK.allSchemaProperties=dK.noPropertyInData=dK.propertyInData=dK.isOwnProperty=dK.hasPropFunc=dK.reportMissingProp=dK.checkMissingProp=dK.checkReportMissingProp=void 0;var W$=h(),oz=r(),K6=m4(),Mb=r();function Pb($,v){let{gen:D,data:X,it:U}=$;D.if(ez(D,X,v,U.opts.ownProperties),()=>{$.setParams({missingProperty:W$._`${v}`},!0),$.error()})}dK.checkReportMissingProp=Pb;function bb({gen:$,data:v,it:{opts:D}},X,U){return(0,W$.or)(...X.map((G)=>(0,W$.and)(ez($,v,G,D.ownProperties),W$._`${U} = ${G}`)))}dK.checkMissingProp=bb;function qb($,v){$.setParams({missingProperty:v},!0),$.error()}dK.reportMissingProp=qb;function mK($){return $.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:W$._`Object.prototype.hasOwnProperty`})}dK.hasPropFunc=mK;function az($,v,D){return W$._`${mK($)}.call(${v}, ${D})`}dK.isOwnProperty=az;function Sb($,v,D,X){let U=W$._`${v}${(0,W$.getProperty)(D)} !== undefined`;return X?W$._`${U} && ${az($,v,D)}`:U}dK.propertyInData=Sb;function ez($,v,D,X){let U=W$._`${v}${(0,W$.getProperty)(D)} === undefined`;return X?(0,W$.or)(U,(0,W$.not)(az($,v,D))):U}dK.noPropertyInData=ez;function cK($){return $?Object.keys($).filter((v)=>v!=="__proto__"):[]}dK.allSchemaProperties=cK;function kb($,v){return cK(v).filter((D)=>!(0,oz.alwaysValidSchema)($,v[D]))}dK.schemaProperties=kb;function Eb({schemaCode:$,data:v,it:{gen:D,topSchemaRef:X,schemaPath:U,errorPath:G},it:J},Q,W,z){let Y=z?W$._`${$}, ${v}, ${X}${U}`:v,I=[[K6.default.instancePath,(0,W$.strConcat)(K6.default.instancePath,G)],[K6.default.parentData,J.parentData],[K6.default.parentDataProperty,J.parentDataProperty],[K6.default.rootData,K6.default.rootData]];if(J.opts.dynamicRef)I.push([K6.default.dynamicAnchors,K6.default.dynamicAnchors]);let V=W$._`${Y}, ${D.object(...I)}`;return W!==W$.nil?W$._`${Q}.call(${W}, ${V})`:W$._`${Q}(${V})`}dK.callValidateCode=Eb;var Tb=W$._`new RegExp`;function Rb({gen:$,it:{opts:v}},D){let X=v.unicodeRegExp?"u":"",{regExp:U}=v.code,G=U(D,X);return $.scopeValue("pattern",{key:G.toString(),ref:G,code:W$._`${U.code==="new RegExp"?Tb:(0,Mb.useFunc)($,U)}(${D}, ${X})`})}dK.usePattern=Rb;function gb($){let{gen:v,data:D,keyword:X,it:U}=$,G=v.name("valid");if(U.allErrors){let Q=v.let("valid",!0);return J(()=>v.assign(Q,!1)),Q}return v.var(G,!0),J(()=>v.break()),G;function J(Q){let W=v.const("len",W$._`${D}.length`);v.forRange("i",0,W,(z)=>{$.subschema({keyword:X,dataProp:z,dataPropType:oz.Type.Num},G),v.if((0,W$.not)(G),Q)})}}dK.validateArray=gb;function Cb($){let{gen:v,schema:D,keyword:X,it:U}=$;if(!Array.isArray(D))throw Error("ajv implementation error");if(D.some((W)=>(0,oz.alwaysValidSchema)(U,W))&&!U.opts.unevaluated)return;let J=v.let("valid",!1),Q=v.name("_valid");v.block(()=>D.forEach((W,z)=>{let Y=$.subschema({keyword:X,schemaProp:z,compositeRule:!0},Q);if(v.assign(J,W$._`${J} || ${Q}`),!$.mergeValidEvaluated(Y,Q))v.if((0,W$.not)(J))})),$.result(J,()=>$.reset(),()=>$.error(!0))}dK.validateUnion=Cb});var eK=b((oK)=>{Object.defineProperty(oK,"__esModule",{value:!0});oK.validateKeywordUsage=oK.validSchemaType=oK.funcKeywordCode=oK.macroKeywordCode=void 0;var i$=h(),E6=m4(),rb=X4(),pb=U0();function tb($,v){let{gen:D,keyword:X,schema:U,parentSchema:G,it:J}=$,Q=v.macro.call(J.self,U,G,J),W=tK(D,X,Q);if(J.opts.validateSchema!==!1)J.self.validateSchema(Q,!0);let z=D.name("valid");$.subschema({schema:Q,schemaPath:i$.nil,errSchemaPath:`${J.errSchemaPath}/${X}`,topSchemaRef:W,compositeRule:!0},z),$.pass(z,()=>$.error(!0))}oK.macroKeywordCode=tb;function ob($,v){var D;let{gen:X,keyword:U,schema:G,parentSchema:J,$data:Q,it:W}=$;eb(W,v);let z=!Q&&v.compile?v.compile.call(W.self,G,J,W):v.validate,Y=tK(X,U,z),I=X.let("valid");$.block$data(I,V),$.ok((D=v.valid)!==null&&D!==void 0?D:I);function V(){if(v.errors===!1){if(N(),v.modifying)pK($);Z(()=>$.error())}else{let F=v.async?K():L();if(v.modifying)pK($);Z(()=>ab($,F))}}function K(){let F=X.let("ruleErrs",null);return X.try(()=>N(i$._`await `),(S)=>X.assign(I,!1).if(i$._`${S} instanceof ${W.ValidationError}`,()=>X.assign(F,i$._`${S}.errors`),()=>X.throw(S))),F}function L(){let F=i$._`${Y}.errors`;return X.assign(F,null),N(i$.nil),F}function N(F=v.async?i$._`await `:i$.nil){let S=W.opts.passContext?E6.default.this:E6.default.self,g=!(("compile"in v)&&!Q||v.schema===!1);X.assign(I,i$._`${F}${(0,rb.callValidateCode)($,Y,S,g)}`,v.modifying)}function Z(F){var S;X.if((0,i$.not)((S=v.valid)!==null&&S!==void 0?S:I),F)}}oK.funcKeywordCode=ob;function pK($){let{gen:v,data:D,it:X}=$;v.if(X.parentData,()=>v.assign(D,i$._`${X.parentData}[${X.parentDataProperty}]`))}function ab($,v){let{gen:D}=$;D.if(i$._`Array.isArray(${v})`,()=>{D.assign(E6.default.vErrors,i$._`${E6.default.vErrors} === null ? ${v} : ${E6.default.vErrors}.concat(${v})`).assign(E6.default.errors,i$._`${E6.default.vErrors}.length`),(0,pb.extendErrors)($)},()=>$.error())}function eb({schemaEnv:$},v){if(v.async&&!$.$async)throw Error("async keyword in sync schema")}function tK($,v,D){if(D===void 0)throw Error(`keyword "${v}" failed to compile`);return $.scopeValue("keyword",typeof D=="function"?{ref:D}:{ref:D,code:(0,i$.stringify)(D)})}function sb($,v,D=!1){return!v.length||v.some((X)=>X==="array"?Array.isArray($):X==="object"?$&&typeof $=="object"&&!Array.isArray($):typeof $==X||D&&typeof $>"u")}oK.validSchemaType=sb;function $q({schema:$,opts:v,self:D,errSchemaPath:X},U,G){if(Array.isArray(U.keyword)?!U.keyword.includes(G):U.keyword!==G)throw Error("ajv implementation error");let J=U.dependencies;if(J===null||J===void 0?void 0:J.some((Q)=>!Object.prototype.hasOwnProperty.call($,Q)))throw Error(`parent schema must have dependencies of ${G}: ${J.join(",")}`);if(U.validateSchema){if(!U.validateSchema($[G])){let W=`keyword "${G}" value is invalid at path "${X}": `+D.errorsText(U.validateSchema.errors);if(v.validateSchema==="log")D.logger.error(W);else throw Error(W)}}}oK.validateKeywordUsage=$q});var UL=b(($L)=>{Object.defineProperty($L,"__esModule",{value:!0});$L.extendSubschemaMode=$L.extendSubschemaData=$L.getSubschema=void 0;var k4=h(),sK=r();function Xq($,{keyword:v,schemaProp:D,schema:X,schemaPath:U,errSchemaPath:G,topSchemaRef:J}){if(v!==void 0&&X!==void 0)throw Error('both "keyword" and "schema" passed, only one allowed');if(v!==void 0){let Q=$.schema[v];return D===void 0?{schema:Q,schemaPath:k4._`${$.schemaPath}${(0,k4.getProperty)(v)}`,errSchemaPath:`${$.errSchemaPath}/${v}`}:{schema:Q[D],schemaPath:k4._`${$.schemaPath}${(0,k4.getProperty)(v)}${(0,k4.getProperty)(D)}`,errSchemaPath:`${$.errSchemaPath}/${v}/${(0,sK.escapeFragment)(D)}`}}if(X!==void 0){if(U===void 0||G===void 0||J===void 0)throw Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:X,schemaPath:U,topSchemaRef:J,errSchemaPath:G}}throw Error('either "keyword" or "schema" must be passed')}$L.getSubschema=Xq;function Gq($,v,{dataProp:D,dataPropType:X,data:U,dataTypes:G,propertyName:J}){if(U!==void 0&&D!==void 0)throw Error('both "data" and "dataProp" passed, only one allowed');let{gen:Q}=v;if(D!==void 0){let{errorPath:z,dataPathArr:Y,opts:I}=v,V=Q.let("data",k4._`${v.data}${(0,k4.getProperty)(D)}`,!0);W(V),$.errorPath=k4.str`${z}${(0,sK.getErrorPath)(D,X,I.jsPropertySyntax)}`,$.parentDataProperty=k4._`${D}`,$.dataPathArr=[...Y,$.parentDataProperty]}if(U!==void 0){let z=U instanceof k4.Name?U:Q.let("data",U,!0);if(W(z),J!==void 0)$.propertyName=J}if(G)$.dataTypes=G;function W(z){$.data=z,$.dataLevel=v.dataLevel+1,$.dataTypes=[],v.definedProperties=new Set,$.parentData=v.data,$.dataNames=[...v.dataNames,z]}}$L.extendSubschemaData=Gq;function Jq($,{jtdDiscriminator:v,jtdMetadata:D,compositeRule:X,createErrors:U,allErrors:G}){if(X!==void 0)$.compositeRule=X;if(U!==void 0)$.createErrors=U;if(G!==void 0)$.allErrors=G;$.jtdDiscriminator=v,$.jtdMetadata=D}$L.extendSubschemaMode=Jq});var sz=b((jd,DL)=>{DL.exports=function $(v,D){if(v===D)return!0;if(v&&D&&typeof v=="object"&&typeof D=="object"){if(v.constructor!==D.constructor)return!1;var X,U,G;if(Array.isArray(v)){if(X=v.length,X!=D.length)return!1;for(U=X;U--!==0;)if(!$(v[U],D[U]))return!1;return!0}if(v.constructor===RegExp)return v.source===D.source&&v.flags===D.flags;if(v.valueOf!==Object.prototype.valueOf)return v.valueOf()===D.valueOf();if(v.toString!==Object.prototype.toString)return v.toString()===D.toString();if(G=Object.keys(v),X=G.length,X!==Object.keys(D).length)return!1;for(U=X;U--!==0;)if(!Object.prototype.hasOwnProperty.call(D,G[U]))return!1;for(U=X;U--!==0;){var J=G[U];if(!$(v[J],D[J]))return!1}return!0}return v!==v&&D!==D}});var GL=b((Ad,XL)=>{var L6=XL.exports=function($,v,D){if(typeof v=="function")D=v,v={};D=v.cb||D;var X=typeof D=="function"?D:D.pre||function(){},U=D.post||function(){};vX(v,X,U,$,"",$)};L6.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};L6.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};L6.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};L6.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 vX($,v,D,X,U,G,J,Q,W,z){if(X&&typeof X=="object"&&!Array.isArray(X)){v(X,U,G,J,Q,W,z);for(var Y in X){var I=X[Y];if(Array.isArray(I)){if(Y in L6.arrayKeywords)for(var V=0;V<I.length;V++)vX($,v,D,I[V],U+"/"+Y+"/"+V,G,U,Y,X,V)}else if(Y in L6.propsKeywords){if(I&&typeof I=="object")for(var K in I)vX($,v,D,I[K],U+"/"+Y+"/"+zq(K),G,U,Y,X,K)}else if(Y in L6.keywords||$.allKeys&&!(Y in L6.skipKeywords))vX($,v,D,I,U+"/"+Y,G,U,Y,X)}D(X,U,G,J,Q,W,z)}}function zq($){return $.replace(/~/g,"~0").replace(/\//g,"~1")}});var X0=b((zL)=>{Object.defineProperty(zL,"__esModule",{value:!0});zL.getSchemaRefs=zL.resolveUrl=zL.normalizeId=zL._getFullPath=zL.getFullPath=zL.inlineRef=void 0;var Yq=r(),Iq=sz(),Vq=GL(),Kq=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function Lq($,v=!0){if(typeof $=="boolean")return!0;if(v===!0)return!$5($);if(!v)return!1;return JL($)<=v}zL.inlineRef=Lq;var Bq=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function $5($){for(let v in $){if(Bq.has(v))return!0;let D=$[v];if(Array.isArray(D)&&D.some($5))return!0;if(typeof D=="object"&&$5(D))return!0}return!1}function JL($){let v=0;for(let D in $){if(D==="$ref")return 1/0;if(v++,Kq.has(D))continue;if(typeof $[D]=="object")(0,Yq.eachItem)($[D],(X)=>v+=JL(X));if(v===1/0)return 1/0}return v}function QL($,v="",D){if(D!==!1)v=k1(v);let X=$.parse(v);return WL($,X)}zL.getFullPath=QL;function WL($,v){return $.serialize(v).split("#")[0]+"#"}zL._getFullPath=WL;var Nq=/#\/?$/;function k1($){return $?$.replace(Nq,""):""}zL.normalizeId=k1;function Zq($,v,D){return D=k1(D),$.resolve(v,D)}zL.resolveUrl=Zq;var Oq=/^[a-z_][-a-z0-9._]*$/i;function Hq($,v){if(typeof $=="boolean")return{};let{schemaId:D,uriResolver:X}=this.opts,U=k1($[D]||v),G={"":U},J=QL(X,U,!1),Q={},W=new Set;return Vq($,{allKeys:!0},(I,V,K,L)=>{if(L===void 0)return;let N=J+V,Z=G[L];if(typeof I[D]=="string")Z=F.call(this,I[D]);S.call(this,I.$anchor),S.call(this,I.$dynamicAnchor),G[V]=Z;function F(g){let u=this.opts.uriResolver.resolve;if(g=k1(Z?u(Z,g):g),W.has(g))throw Y(g);W.add(g);let k=this.refs[g];if(typeof k=="string")k=this.refs[k];if(typeof k=="object")z(I,k.schema,g);else if(g!==k1(N))if(g[0]==="#")z(I,Q[g],g),Q[g]=I;else this.refs[g]=N;return g}function S(g){if(typeof g=="string"){if(!Oq.test(g))throw Error(`invalid anchor "${g}"`);F.call(this,`#${g}`)}}}),Q;function z(I,V,K){if(V!==void 0&&!Iq(I,V))throw Y(K)}function Y(I){return Error(`reference "${I}" resolves to more than one schema`)}}zL.getSchemaRefs=Hq});var Q0=b((PL)=>{Object.defineProperty(PL,"__esModule",{value:!0});PL.getData=PL.KeywordCxt=PL.validateFunctionCode=void 0;var BL=SK(),IL=D0(),U5=dz(),UX=D0(),Pq=hK(),J0=eK(),v5=UL(),C=h(),i=m4(),bq=X0(),c4=r(),G0=U0();function qq($){if(OL($)){if(HL($),ZL($)){Eq($);return}}NL($,()=>(0,BL.topBoolOrEmptySchema)($))}PL.validateFunctionCode=qq;function NL({gen:$,validateName:v,schema:D,schemaEnv:X,opts:U},G){if(U.code.es5)$.func(v,C._`${i.default.data}, ${i.default.valCxt}`,X.$async,()=>{$.code(C._`"use strict"; ${VL(D,U)}`),kq($,U),$.code(G)});else $.func(v,C._`${i.default.data}, ${Sq(U)}`,X.$async,()=>$.code(VL(D,U)).code(G))}function Sq($){return C._`{${i.default.instancePath}="", ${i.default.parentData}, ${i.default.parentDataProperty}, ${i.default.rootData}=${i.default.data}${$.dynamicRef?C._`, ${i.default.dynamicAnchors}={}`:C.nil}}={}`}function kq($,v){$.if(i.default.valCxt,()=>{if($.var(i.default.instancePath,C._`${i.default.valCxt}.${i.default.instancePath}`),$.var(i.default.parentData,C._`${i.default.valCxt}.${i.default.parentData}`),$.var(i.default.parentDataProperty,C._`${i.default.valCxt}.${i.default.parentDataProperty}`),$.var(i.default.rootData,C._`${i.default.valCxt}.${i.default.rootData}`),v.dynamicRef)$.var(i.default.dynamicAnchors,C._`${i.default.valCxt}.${i.default.dynamicAnchors}`)},()=>{if($.var(i.default.instancePath,C._`""`),$.var(i.default.parentData,C._`undefined`),$.var(i.default.parentDataProperty,C._`undefined`),$.var(i.default.rootData,i.default.data),v.dynamicRef)$.var(i.default.dynamicAnchors,C._`{}`)})}function Eq($){let{schema:v,opts:D,gen:X}=$;NL($,()=>{if(D.$comment&&v.$comment)jL($);if(uq($),X.let(i.default.vErrors,null),X.let(i.default.errors,0),D.unevaluated)Tq($);FL($),_q($)});return}function Tq($){let{gen:v,validateName:D}=$;$.evaluated=v.const("evaluated",C._`${D}.evaluated`),v.if(C._`${$.evaluated}.dynamicProps`,()=>v.assign(C._`${$.evaluated}.props`,C._`undefined`)),v.if(C._`${$.evaluated}.dynamicItems`,()=>v.assign(C._`${$.evaluated}.items`,C._`undefined`))}function VL($,v){let D=typeof $=="object"&&$[v.schemaId];return D&&(v.code.source||v.code.process)?C._`/*# sourceURL=${D} */`:C.nil}function Rq($,v){if(OL($)){if(HL($),ZL($)){gq($,v);return}}(0,BL.boolOrEmptySchema)($,v)}function ZL({schema:$,self:v}){if(typeof $=="boolean")return!$;for(let D in $)if(v.RULES.all[D])return!0;return!1}function OL($){return typeof $.schema!="boolean"}function gq($,v){let{schema:D,gen:X,opts:U}=$;if(U.$comment&&D.$comment)jL($);xq($),fq($);let G=X.const("_errs",i.default.errors);FL($,G),X.var(v,C._`${G} === ${i.default.errors}`)}function HL($){(0,c4.checkUnknownRules)($),Cq($)}function FL($,v){if($.opts.jtd)return KL($,[],!1,v);let D=(0,IL.getSchemaTypes)($.schema),X=(0,IL.coerceAndCheckDataType)($,D);KL($,D,!X,v)}function Cq($){let{schema:v,errSchemaPath:D,opts:X,self:U}=$;if(v.$ref&&X.ignoreKeywordsWithRef&&(0,c4.schemaHasRulesButRef)(v,U.RULES))U.logger.warn(`$ref: keywords ignored in schema at path "${D}"`)}function uq($){let{schema:v,opts:D}=$;if(v.default!==void 0&&D.useDefaults&&D.strictSchema)(0,c4.checkStrictMode)($,"default is ignored in the schema root")}function xq($){let v=$.schema[$.opts.schemaId];if(v)$.baseId=(0,bq.resolveUrl)($.opts.uriResolver,$.baseId,v)}function fq($){if($.schema.$async&&!$.schemaEnv.$async)throw Error("async schema in sync schema")}function jL({gen:$,schemaEnv:v,schema:D,errSchemaPath:X,opts:U}){let G=D.$comment;if(U.$comment===!0)$.code(C._`${i.default.self}.logger.log(${G})`);else if(typeof U.$comment=="function"){let J=C.str`${X}/$comment`,Q=$.scopeValue("root",{ref:v.root});$.code(C._`${i.default.self}.opts.$comment(${G}, ${J}, ${Q}.schema)`)}}function _q($){let{gen:v,schemaEnv:D,validateName:X,ValidationError:U,opts:G}=$;if(D.$async)v.if(C._`${i.default.errors} === 0`,()=>v.return(i.default.data),()=>v.throw(C._`new ${U}(${i.default.vErrors})`));else{if(v.assign(C._`${X}.errors`,i.default.vErrors),G.unevaluated)iq($);v.return(C._`${i.default.errors} === 0`)}}function iq({gen:$,evaluated:v,props:D,items:X}){if(D instanceof C.Name)$.assign(C._`${v}.props`,D);if(X instanceof C.Name)$.assign(C._`${v}.items`,X)}function KL($,v,D,X){let{gen:U,schema:G,data:J,allErrors:Q,opts:W,self:z}=$,{RULES:Y}=z;if(G.$ref&&(W.ignoreKeywordsWithRef||!(0,c4.schemaHasRulesButRef)(G,Y))){U.block(()=>wL($,"$ref",Y.all.$ref.definition));return}if(!W.jtd)yq($,v);U.block(()=>{for(let V of Y.rules)I(V);I(Y.post)});function I(V){if(!(0,U5.shouldUseGroup)(G,V))return;if(V.type){if(U.if((0,UX.checkDataType)(V.type,J,W.strictNumbers)),LL($,V),v.length===1&&v[0]===V.type&&D)U.else(),(0,UX.reportTypeError)($);U.endIf()}else LL($,V);if(!Q)U.if(C._`${i.default.errors} === ${X||0}`)}}function LL($,v){let{gen:D,schema:X,opts:{useDefaults:U}}=$;if(U)(0,Pq.assignDefaults)($,v.type);D.block(()=>{for(let G of v.rules)if((0,U5.shouldUseRule)(X,G))wL($,G.keyword,G.definition,v.type)})}function yq($,v){if($.schemaEnv.meta||!$.opts.strictTypes)return;if(nq($,v),!$.opts.allowUnionTypes)lq($,v);hq($,$.dataTypes)}function nq($,v){if(!v.length)return;if(!$.dataTypes.length){$.dataTypes=v;return}v.forEach((D)=>{if(!AL($.dataTypes,D))D5($,`type "${D}" not allowed by context "${$.dataTypes.join(",")}"`)}),cq($,v)}function lq($,v){if(v.length>1&&!(v.length===2&&v.includes("null")))D5($,"use allowUnionTypes to allow union type keyword")}function hq($,v){let D=$.self.RULES.all;for(let X in D){let U=D[X];if(typeof U=="object"&&(0,U5.shouldUseRule)($.schema,U)){let{type:G}=U.definition;if(G.length&&!G.some((J)=>mq(v,J)))D5($,`missing type "${G.join(",")}" for keyword "${X}"`)}}}function mq($,v){return $.includes(v)||v==="number"&&$.includes("integer")}function AL($,v){return $.includes(v)||v==="integer"&&$.includes("number")}function cq($,v){let D=[];for(let X of $.dataTypes)if(AL(v,X))D.push(X);else if(v.includes("integer")&&X==="number")D.push("integer");$.dataTypes=D}function D5($,v){let D=$.schemaEnv.baseId+$.errSchemaPath;v+=` at "${D}" (strictTypes)`,(0,c4.checkStrictMode)($,v,$.opts.strictTypes)}class X5{constructor($,v,D){if((0,J0.validateKeywordUsage)($,v,D),this.gen=$.gen,this.allErrors=$.allErrors,this.keyword=D,this.data=$.data,this.schema=$.schema[D],this.$data=v.$data&&$.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,c4.schemaRefOrVal)($,this.schema,D,this.$data),this.schemaType=v.schemaType,this.parentSchema=$.schema,this.params={},this.it=$,this.def=v,this.$data)this.schemaCode=$.gen.const("vSchema",ML(this.$data,$));else if(this.schemaCode=this.schemaValue,!(0,J0.validSchemaType)(this.schema,v.schemaType,v.allowUndefined))throw Error(`${D} value must be ${JSON.stringify(v.schemaType)}`);if("code"in v?v.trackErrors:v.errors!==!1)this.errsCount=$.gen.const("_errs",i.default.errors)}result($,v,D){this.failResult((0,C.not)($),v,D)}failResult($,v,D){if(this.gen.if($),D)D();else this.error();if(v){if(this.gen.else(),v(),this.allErrors)this.gen.endIf()}else if(this.allErrors)this.gen.endIf();else this.gen.else()}pass($,v){this.failResult((0,C.not)($),void 0,v)}fail($){if($===void 0){if(this.error(),!this.allErrors)this.gen.if(!1);return}if(this.gen.if($),this.error(),this.allErrors)this.gen.endIf();else this.gen.else()}fail$data($){if(!this.$data)return this.fail($);let{schemaCode:v}=this;this.fail(C._`${v} !== undefined && (${(0,C.or)(this.invalid$data(),$)})`)}error($,v,D){if(v){this.setParams(v),this._error($,D),this.setParams({});return}this._error($,D)}_error($,v){($?G0.reportExtraError:G0.reportError)(this,this.def.error,v)}$dataError(){(0,G0.reportError)(this,this.def.$dataError||G0.keyword$DataError)}reset(){if(this.errsCount===void 0)throw Error('add "trackErrors" to keyword definition');(0,G0.resetErrorsCount)(this.gen,this.errsCount)}ok($){if(!this.allErrors)this.gen.if($)}setParams($,v){if(v)Object.assign(this.params,$);else this.params=$}block$data($,v,D=C.nil){this.gen.block(()=>{this.check$data($,D),v()})}check$data($=C.nil,v=C.nil){if(!this.$data)return;let{gen:D,schemaCode:X,schemaType:U,def:G}=this;if(D.if((0,C.or)(C._`${X} === undefined`,v)),$!==C.nil)D.assign($,!0);if(U.length||G.validateSchema){if(D.elseIf(this.invalid$data()),this.$dataError(),$!==C.nil)D.assign($,!1)}D.else()}invalid$data(){let{gen:$,schemaCode:v,schemaType:D,def:X,it:U}=this;return(0,C.or)(G(),J());function G(){if(D.length){if(!(v instanceof C.Name))throw Error("ajv implementation error");let Q=Array.isArray(D)?D:[D];return C._`${(0,UX.checkDataTypes)(Q,v,U.opts.strictNumbers,UX.DataType.Wrong)}`}return C.nil}function J(){if(X.validateSchema){let Q=$.scopeValue("validate$data",{ref:X.validateSchema});return C._`!${Q}(${v})`}return C.nil}}subschema($,v){let D=(0,v5.getSubschema)(this.it,$);(0,v5.extendSubschemaData)(D,this.it,$),(0,v5.extendSubschemaMode)(D,$);let X={...this.it,...D,items:void 0,props:void 0};return Rq(X,v),X}mergeEvaluated($,v){let{it:D,gen:X}=this;if(!D.opts.unevaluated)return;if(D.props!==!0&&$.props!==void 0)D.props=c4.mergeEvaluated.props(X,$.props,D.props,v);if(D.items!==!0&&$.items!==void 0)D.items=c4.mergeEvaluated.items(X,$.items,D.items,v)}mergeValidEvaluated($,v){let{it:D,gen:X}=this;if(D.opts.unevaluated&&(D.props!==!0||D.items!==!0))return X.if(v,()=>this.mergeEvaluated($,C.Name)),!0}}PL.KeywordCxt=X5;function wL($,v,D,X){let U=new X5($,D,v);if("code"in D)D.code(U,X);else if(U.$data&&D.validate)(0,J0.funcKeywordCode)(U,D);else if("macro"in D)(0,J0.macroKeywordCode)(U,D);else if(D.compile||D.validate)(0,J0.funcKeywordCode)(U,D)}var dq=/^\/(?:[^~]|~0|~1)*$/,rq=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function ML($,{dataLevel:v,dataNames:D,dataPathArr:X}){let U,G;if($==="")return i.default.rootData;if($[0]==="/"){if(!dq.test($))throw Error(`Invalid JSON-pointer: ${$}`);U=$,G=i.default.rootData}else{let z=rq.exec($);if(!z)throw Error(`Invalid JSON-pointer: ${$}`);let Y=+z[1];if(U=z[2],U==="#"){if(Y>=v)throw Error(W("property/index",Y));return X[v-Y]}if(Y>v)throw Error(W("data",Y));if(G=D[v-Y],!U)return G}let J=G,Q=U.split("/");for(let z of Q)if(z)G=C._`${G}${(0,C.getProperty)((0,c4.unescapeJsonPointer)(z))}`,J=C._`${J} && ${G}`;return J;function W(z,Y){return`Cannot access ${z} ${Y} levels up, current level is ${v}`}}PL.getData=ML});var DX=b((SL)=>{Object.defineProperty(SL,"__esModule",{value:!0});class qL extends Error{constructor($){super("validation failed");this.errors=$,this.ajv=this.validation=!0}}SL.default=qL});var W0=b((EL)=>{Object.defineProperty(EL,"__esModule",{value:!0});var G5=X0();class kL extends Error{constructor($,v,D,X){super(X||`can't resolve reference ${D} from id ${v}`);this.missingRef=(0,G5.resolveUrl)($,v,D),this.missingSchema=(0,G5.normalizeId)((0,G5.getFullPath)($,this.missingRef))}}EL.default=kL});var GX=b((gL)=>{Object.defineProperty(gL,"__esModule",{value:!0});gL.resolveSchema=gL.getCompilingSchema=gL.resolveRef=gL.compileSchema=gL.SchemaEnv=void 0;var L4=h(),eq=DX(),T6=m4(),B4=X0(),TL=r(),sq=Q0();class z0{constructor($){var v;this.refs={},this.dynamicAnchors={};let D;if(typeof $.schema=="object")D=$.schema;this.schema=$.schema,this.schemaId=$.schemaId,this.root=$.root||this,this.baseId=(v=$.baseId)!==null&&v!==void 0?v:(0,B4.normalizeId)(D===null||D===void 0?void 0:D[$.schemaId||"$id"]),this.schemaPath=$.schemaPath,this.localRefs=$.localRefs,this.meta=$.meta,this.$async=D===null||D===void 0?void 0:D.$async,this.refs={}}}gL.SchemaEnv=z0;function Q5($){let v=RL.call(this,$);if(v)return v;let D=(0,B4.getFullPath)(this.opts.uriResolver,$.root.baseId),{es5:X,lines:U}=this.opts.code,{ownProperties:G}=this.opts,J=new L4.CodeGen(this.scope,{es5:X,lines:U,ownProperties:G}),Q;if($.$async)Q=J.scopeValue("Error",{ref:eq.default,code:L4._`require("ajv/dist/runtime/validation_error").default`});let W=J.scopeName("validate");$.validateName=W;let z={gen:J,allErrors:this.opts.allErrors,data:T6.default.data,parentData:T6.default.parentData,parentDataProperty:T6.default.parentDataProperty,dataNames:[T6.default.data],dataPathArr:[L4.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:J.scopeValue("schema",this.opts.code.source===!0?{ref:$.schema,code:(0,L4.stringify)($.schema)}:{ref:$.schema}),validateName:W,ValidationError:Q,schema:$.schema,schemaEnv:$,rootId:D,baseId:$.baseId||D,schemaPath:L4.nil,errSchemaPath:$.schemaPath||(this.opts.jtd?"":"#"),errorPath:L4._`""`,opts:this.opts,self:this},Y;try{this._compilations.add($),(0,sq.validateFunctionCode)(z),J.optimize(this.opts.code.optimize);let I=J.toString();if(Y=`${J.scopeRefs(T6.default.scope)}return ${I}`,this.opts.code.process)Y=this.opts.code.process(Y,$);let K=Function(`${T6.default.self}`,`${T6.default.scope}`,Y)(this,this.scope.get());if(this.scope.value(W,{ref:K}),K.errors=null,K.schema=$.schema,K.schemaEnv=$,$.$async)K.$async=!0;if(this.opts.code.source===!0)K.source={validateName:W,validateCode:I,scopeValues:J._values};if(this.opts.unevaluated){let{props:L,items:N}=z;if(K.evaluated={props:L instanceof L4.Name?void 0:L,items:N instanceof L4.Name?void 0:N,dynamicProps:L instanceof L4.Name,dynamicItems:N instanceof L4.Name},K.source)K.source.evaluated=(0,L4.stringify)(K.evaluated)}return $.validate=K,$}catch(I){if(delete $.validate,delete $.validateName,Y)this.logger.error("Error compiling schema, function code:",Y);throw I}finally{this._compilations.delete($)}}gL.compileSchema=Q5;function $S($,v,D){var X;D=(0,B4.resolveUrl)(this.opts.uriResolver,v,D);let U=$.refs[D];if(U)return U;let G=DS.call(this,$,D);if(G===void 0){let J=(X=$.localRefs)===null||X===void 0?void 0:X[D],{schemaId:Q}=this.opts;if(J)G=new z0({schema:J,schemaId:Q,root:$,baseId:v})}if(G===void 0)return;return $.refs[D]=vS.call(this,G)}gL.resolveRef=$S;function vS($){if((0,B4.inlineRef)($.schema,this.opts.inlineRefs))return $.schema;return $.validate?$:Q5.call(this,$)}function RL($){for(let v of this._compilations)if(US(v,$))return v}gL.getCompilingSchema=RL;function US($,v){return $.schema===v.schema&&$.root===v.root&&$.baseId===v.baseId}function DS($,v){let D;while(typeof(D=this.refs[v])=="string")v=D;return D||this.schemas[v]||XX.call(this,$,v)}function XX($,v){let D=this.opts.uriResolver.parse(v),X=(0,B4._getFullPath)(this.opts.uriResolver,D),U=(0,B4.getFullPath)(this.opts.uriResolver,$.baseId,void 0);if(Object.keys($.schema).length>0&&X===U)return J5.call(this,D,$);let G=(0,B4.normalizeId)(X),J=this.refs[G]||this.schemas[G];if(typeof J=="string"){let Q=XX.call(this,$,J);if(typeof(Q===null||Q===void 0?void 0:Q.schema)!=="object")return;return J5.call(this,D,Q)}if(typeof(J===null||J===void 0?void 0:J.schema)!=="object")return;if(!J.validate)Q5.call(this,J);if(G===(0,B4.normalizeId)(v)){let{schema:Q}=J,{schemaId:W}=this.opts,z=Q[W];if(z)U=(0,B4.resolveUrl)(this.opts.uriResolver,U,z);return new z0({schema:Q,schemaId:W,root:$,baseId:U})}return J5.call(this,D,J)}gL.resolveSchema=XX;var XS=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function J5($,{baseId:v,schema:D,root:X}){var U;if(((U=$.fragment)===null||U===void 0?void 0:U[0])!=="/")return;for(let Q of $.fragment.slice(1).split("/")){if(typeof D==="boolean")return;let W=D[(0,TL.unescapeFragment)(Q)];if(W===void 0)return;D=W;let z=typeof D==="object"&&D[this.opts.schemaId];if(!XS.has(Q)&&z)v=(0,B4.resolveUrl)(this.opts.uriResolver,v,z)}let G;if(typeof D!="boolean"&&D.$ref&&!(0,TL.schemaHasRulesButRef)(D,this.RULES)){let Q=(0,B4.resolveUrl)(this.opts.uriResolver,v,D.$ref);G=XX.call(this,X,Q)}let{schemaId:J}=this.opts;if(G=G||new z0({schema:D,schemaId:J,root:X,baseId:v}),G.schema!==G.root.schema)return G;return}});var uL=b((Sd,zS)=>{zS.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 Y5=b((kd,nL)=>{var YS=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),fL=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),W5=RegExp.prototype.test.bind(/^[\da-f]{2}$/iu),_L=RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu),IS=RegExp.prototype.test.bind(/^[\da-z\-._~!$&'()*+,;=:@/]$/iu);function z5($){let v="",D=0,X=0;for(X=0;X<$.length;X++){if(D=$[X].charCodeAt(0),D===48)continue;if(!(D>=48&&D<=57||D>=65&&D<=70||D>=97&&D<=102))return"";v+=$[X];break}for(X+=1;X<$.length;X++){if(D=$[X].charCodeAt(0),!(D>=48&&D<=57||D>=65&&D<=70||D>=97&&D<=102))return"";v+=$[X]}return v}var VS=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function xL($){return $.length=0,!0}function KS($,v,D){if($.length){let X=z5($);if(X!=="")v.push(X);else return D.error=!0,!1;$.length=0}return!0}function LS($){let v=0,D={error:!1,address:"",zone:""},X=[],U=[],G=!1,J=!1,Q=KS;for(let W=0;W<$.length;W++){let z=$[W];if(z==="["||z==="]")continue;if(z===":"){if(G===!0)J=!0;if(!Q(U,X,D))break;if(++v>7){D.error=!0;break}if(W>0&&$[W-1]===":")G=!0;X.push(":");continue}else if(z==="%"){if(!Q(U,X,D))break;Q=xL}else{U.push(z);continue}}if(U.length)if(Q===xL)D.zone=U.join("");else if(J)X.push(U.join(""));else X.push(z5(U));return D.address=X.join(""),D}function iL($){if(BS($,":")<2)return{host:$,isIPV6:!1};let v=LS($);if(!v.error){let{address:D,address:X}=v;if(v.zone)D+="%"+v.zone,X+="%25"+v.zone;return{host:D,isIPV6:!0,escapedHost:X}}else return{host:$,isIPV6:!1}}function BS($,v){let D=0;for(let X=0;X<$.length;X++)if($[X]===v)D++;return D}function NS($){let v=$,D=[],X=-1,U=0;while(U=v.length){if(U===1)if(v===".")break;else if(v==="/"){D.push("/");break}else{D.push(v);break}else if(U===2){if(v[0]==="."){if(v[1]===".")break;else if(v[1]==="/"){v=v.slice(2);continue}}else if(v[0]==="/"){if(v[1]==="."||v[1]==="/"){D.push("/");break}}}else if(U===3){if(v==="/.."){if(D.length!==0)D.pop();D.push("/");break}}if(v[0]==="."){if(v[1]==="."){if(v[2]==="/"){v=v.slice(3);continue}}else if(v[1]==="/"){v=v.slice(2);continue}}else if(v[0]==="/"){if(v[1]==="."){if(v[2]==="/"){v=v.slice(2);continue}else if(v[2]==="."){if(v[3]==="/"){if(v=v.slice(3),D.length!==0)D.pop();continue}}}}if((X=v.indexOf("/",1))===-1){D.push(v);break}else D.push(v.slice(0,X)),v=v.slice(X)}return D.join("")}var ZS={"@":"%40","/":"%2F","?":"%3F","#":"%23",":":"%3A"},OS=/[@/?#:]/g,HS=/[@/?#]/g;function yL($,v){let D=v?HS:OS;return D.lastIndex=0,$.replace(D,(X)=>ZS[X])}function FS($,v=!1){if($.indexOf("%")===-1)return $;let D="";for(let X=0;X<$.length;X++){if($[X]==="%"&&X+2<$.length){let U=$.slice(X+1,X+3);if(W5(U)){let G=U.toUpperCase(),J=String.fromCharCode(parseInt(G,16));if(v&&_L(J))D+=J;else D+="%"+G;X+=2;continue}}D+=$[X]}return D}function jS($){let v="";for(let D=0;D<$.length;D++){if($[D]==="%"&&D+2<$.length){let X=$.slice(D+1,D+3);if(W5(X)){let U=X.toUpperCase(),G=String.fromCharCode(parseInt(U,16));if(G!=="."&&_L(G))v+=G;else v+="%"+U;D+=2;continue}}if(IS($[D]))v+=$[D];else v+=escape($[D])}return v}function AS($){let v="";for(let D=0;D<$.length;D++){if($[D]==="%"&&D+2<$.length){let X=$.slice(D+1,D+3);if(W5(X)){v+="%"+X.toUpperCase(),D+=2;continue}}v+=escape($[D])}return v}function wS($){let v=[];if($.userinfo!==void 0)v.push($.userinfo),v.push("@");if($.host!==void 0){let D=unescape($.host);if(!fL(D)){let X=iL(D);if(X.isIPV6===!0)D=`[${X.escapedHost}]`;else D=yL(D,!1)}v.push(D)}if(typeof $.port==="number"||typeof $.port==="string")v.push(":"),v.push(String($.port));return v.length?v.join(""):void 0}nL.exports={nonSimpleDomain:VS,recomposeAuthority:wS,reescapeHostDelimiters:yL,normalizePercentEncoding:FS,normalizePathEncoding:jS,escapePreservingEscapes:AS,removeDotSegments:NS,isIPv4:fL,isUUID:YS,normalizeIPv6:iL,stringArrayToHexStripped:z5}});var dL=b((Ed,cL)=>{var{isUUID:MS}=Y5(),PS=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,bS=["http","https","ws","wss","urn","urn:uuid"];function qS($){return bS.indexOf($)!==-1}function I5($){if($.secure===!0)return!0;else if($.secure===!1)return!1;else if($.scheme)return $.scheme.length===3&&($.scheme[0]==="w"||$.scheme[0]==="W")&&($.scheme[1]==="s"||$.scheme[1]==="S")&&($.scheme[2]==="s"||$.scheme[2]==="S");else return!1}function lL($){if(!$.host)$.error=$.error||"HTTP URIs must have a host.";return $}function hL($){let v=String($.scheme).toLowerCase()==="https";if($.port===(v?443:80)||$.port==="")$.port=void 0;if(!$.path)$.path="/";return $}function SS($){return $.secure=I5($),$.resourceName=($.path||"/")+($.query?"?"+$.query:""),$.path=void 0,$.query=void 0,$}function kS($){if($.port===(I5($)?443:80)||$.port==="")$.port=void 0;if(typeof $.secure==="boolean")$.scheme=$.secure?"wss":"ws",$.secure=void 0;if($.resourceName){let[v,D]=$.resourceName.split("?");$.path=v&&v!=="/"?v:void 0,$.query=D,$.resourceName=void 0}return $.fragment=void 0,$}function ES($,v){if(!$.path)return $.error="URN can not be parsed",$;let D=$.path.match(PS);if(D){let X=v.scheme||$.scheme||"urn";$.nid=D[1].toLowerCase(),$.nss=D[2];let U=`${X}:${v.nid||$.nid}`,G=V5(U);if($.path=void 0,G)$=G.parse($,v)}else $.error=$.error||"URN can not be parsed.";return $}function TS($,v){if($.nid===void 0)throw Error("URN without nid cannot be serialized");let D=v.scheme||$.scheme||"urn",X=$.nid.toLowerCase(),U=`${D}:${v.nid||X}`,G=V5(U);if(G)$=G.serialize($,v);let J=$,Q=$.nss;return J.path=`${X||v.nid}:${Q}`,v.skipEscape=!0,J}function RS($,v){let D=$;if(D.uuid=D.nss,D.nss=void 0,!v.tolerant&&(!D.uuid||!MS(D.uuid)))D.error=D.error||"UUID is not valid.";return D}function gS($){let v=$;return v.nss=($.uuid||"").toLowerCase(),v}var mL={scheme:"http",domainHost:!0,parse:lL,serialize:hL},CS={scheme:"https",domainHost:mL.domainHost,parse:lL,serialize:hL},JX={scheme:"ws",domainHost:!0,parse:SS,serialize:kS},uS={scheme:"wss",domainHost:JX.domainHost,parse:JX.parse,serialize:JX.serialize},xS={scheme:"urn",parse:ES,serialize:TS,skipNormalize:!0},fS={scheme:"urn:uuid",parse:RS,serialize:gS,skipNormalize:!0},QX={http:mL,https:CS,ws:JX,wss:uS,urn:xS,"urn:uuid":fS};Object.setPrototypeOf(QX,null);function V5($){return $&&(QX[$]||QX[$.toLowerCase()])||void 0}cL.exports={wsIsSecure:I5,SCHEMES:QX,isValidSchemeName:qS,getSchemeHandler:V5}});var eL=b((Td,WX)=>{var{normalizeIPv6:_S,removeDotSegments:Y0,recomposeAuthority:iS,normalizePercentEncoding:yS,normalizePathEncoding:nS,escapePreservingEscapes:lS,reescapeHostDelimiters:hS,isIPv4:mS,nonSimpleDomain:cS}=Y5(),{SCHEMES:dS,getSchemeHandler:pL}=dL();function rS($,v){if(typeof $==="string")$=eS($,v);else if(typeof $==="object")$=E1(R6($,v),v);return $}function pS($,v,D){let X=D?Object.assign({scheme:"null"},D):{scheme:"null"},U=tL(E1($,X),E1(v,X),X,!0);return X.skipEscape=!0,R6(U,X)}function tL($,v,D,X){let U={};if(!X)$=E1(R6($,D),D),v=E1(R6(v,D),D);if(D=D||{},!D.tolerant&&v.scheme)U.scheme=v.scheme,U.userinfo=v.userinfo,U.host=v.host,U.port=v.port,U.path=Y0(v.path||""),U.query=v.query;else{if(v.userinfo!==void 0||v.host!==void 0||v.port!==void 0)U.userinfo=v.userinfo,U.host=v.host,U.port=v.port,U.path=Y0(v.path||""),U.query=v.query;else{if(!v.path)if(U.path=$.path,v.query!==void 0)U.query=v.query;else U.query=$.query;else{if(v.path[0]==="/")U.path=Y0(v.path);else{if(($.userinfo!==void 0||$.host!==void 0||$.port!==void 0)&&!$.path)U.path="/"+v.path;else if(!$.path)U.path=v.path;else U.path=$.path.slice(0,$.path.lastIndexOf("/")+1)+v.path;U.path=Y0(U.path)}U.query=v.query}U.userinfo=$.userinfo,U.host=$.host,U.port=$.port}U.scheme=$.scheme}return U.fragment=v.fragment,U}function tS($,v,D){let X=rL($,D),U=rL(v,D);return X!==void 0&&U!==void 0&&X.toLowerCase()===U.toLowerCase()}function R6($,v){let D={host:$.host,scheme:$.scheme,userinfo:$.userinfo,port:$.port,path:$.path,query:$.query,nid:$.nid,nss:$.nss,uuid:$.uuid,fragment:$.fragment,reference:$.reference,resourceName:$.resourceName,secure:$.secure,error:""},X=Object.assign({},v),U=[],G=pL(X.scheme||D.scheme);if(G&&G.serialize)G.serialize(D,X);if(D.path!==void 0)if(!X.skipEscape){if(D.path=lS(D.path),D.scheme!==void 0)D.path=D.path.split("%3A").join(":")}else D.path=yS(D.path);if(X.reference!=="suffix"&&D.scheme)U.push(D.scheme,":");let J=iS(D);if(J!==void 0){if(X.reference!=="suffix")U.push("//");if(U.push(J),D.path&&D.path[0]!=="/")U.push("/")}if(D.path!==void 0){let Q=D.path;if(!X.absolutePath&&(!G||!G.absolutePath))Q=Y0(Q);if(J===void 0&&Q[0]==="/"&&Q[1]==="/")Q="/%2F"+Q.slice(2);U.push(Q)}if(D.query!==void 0)U.push("?",D.query);if(D.fragment!==void 0)U.push("#",D.fragment);return U.join("")}var oS=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function aS($,v){if(v[2]!==void 0&&$.path&&$.path[0]!=="/")return'URI path must start with "/" when authority is present.';if(typeof $.port==="number"&&($.port<0||$.port>65535))return"URI port is malformed.";return}function oL($,v){let D=Object.assign({},v),X={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},U=!1,G=!1;if(D.reference==="suffix")if(D.scheme)$=D.scheme+":"+$;else $="//"+$;let J=$.match(oS);if(J){if(X.scheme=J[1],X.userinfo=J[3],X.host=J[4],X.port=parseInt(J[5],10),X.path=J[6]||"",X.query=J[7],X.fragment=J[8],isNaN(X.port))X.port=J[5];let Q=aS(X,J);if(Q!==void 0)X.error=X.error||Q,U=!0;if(X.host)if(mS(X.host)===!1){let Y=_S(X.host);X.host=Y.host.toLowerCase(),G=Y.isIPV6}else G=!0;if(X.scheme===void 0&&X.userinfo===void 0&&X.host===void 0&&X.port===void 0&&X.query===void 0&&!X.path)X.reference="same-document";else if(X.scheme===void 0)X.reference="relative";else if(X.fragment===void 0)X.reference="absolute";else X.reference="uri";if(D.reference&&D.reference!=="suffix"&&D.reference!==X.reference)X.error=X.error||"URI is not a "+D.reference+" reference.";let W=pL(D.scheme||X.scheme);if(!D.unicodeSupport&&(!W||!W.unicodeSupport)){if(X.host&&(D.domainHost||W&&W.domainHost)&&G===!1&&cS(X.host))try{X.host=URL.domainToASCII(X.host.toLowerCase())}catch(z){X.error=X.error||"Host's domain name can not be converted to ASCII: "+z}}if(!W||W&&!W.skipNormalize){if($.indexOf("%")!==-1){if(X.scheme!==void 0)X.scheme=unescape(X.scheme);if(X.host!==void 0)X.host=hS(unescape(X.host),G)}if(X.path)X.path=nS(X.path);if(X.fragment)try{X.fragment=encodeURI(decodeURIComponent(X.fragment))}catch{X.error=X.error||"URI malformed"}}if(W&&W.parse)W.parse(X,D)}else X.error=X.error||"URI can not be parsed.";return{parsed:X,malformedAuthorityOrPort:U}}function E1($,v){return oL($,v).parsed}function eS($,v){return aL($,v).normalized}function aL($,v){let{parsed:D,malformedAuthorityOrPort:X}=oL($,v);return{normalized:X?$:R6(D,v),malformedAuthorityOrPort:X}}function rL($,v){if(typeof $==="string"){let{normalized:D,malformedAuthorityOrPort:X}=aL($,v);return X?void 0:D}if(typeof $==="object")return R6($,v)}var K5={SCHEMES:dS,normalize:rS,resolve:pS,resolveComponent:tL,equal:tS,serialize:R6,parse:E1};WX.exports=K5;WX.exports.default=K5;WX.exports.fastUri=K5});var vB=b(($B)=>{Object.defineProperty($B,"__esModule",{value:!0});var sL=eL();sL.code='require("ajv/dist/runtime/uri").default';$B.default=sL});var zB=b((d4)=>{Object.defineProperty(d4,"__esModule",{value:!0});d4.CodeGen=d4.Name=d4.nil=d4.stringify=d4.str=d4._=d4.KeywordCxt=void 0;var $k=Q0();Object.defineProperty(d4,"KeywordCxt",{enumerable:!0,get:function(){return $k.KeywordCxt}});var T1=h();Object.defineProperty(d4,"_",{enumerable:!0,get:function(){return T1._}});Object.defineProperty(d4,"str",{enumerable:!0,get:function(){return T1.str}});Object.defineProperty(d4,"stringify",{enumerable:!0,get:function(){return T1.stringify}});Object.defineProperty(d4,"nil",{enumerable:!0,get:function(){return T1.nil}});Object.defineProperty(d4,"Name",{enumerable:!0,get:function(){return T1.Name}});Object.defineProperty(d4,"CodeGen",{enumerable:!0,get:function(){return T1.CodeGen}});var vk=DX(),JB=W0(),Uk=cz(),I0=GX(),Dk=h(),V0=X0(),zX=D0(),B5=r(),UB=uL(),Xk=vB(),QB=($,v)=>new RegExp($,v);QB.code="new RegExp";var Gk=["removeAdditional","useDefaults","coerceTypes"],Jk=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),Qk={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."},Wk={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},DB=200;function zk($){var v,D,X,U,G,J,Q,W,z,Y,I,V,K,L,N,Z,F,S,g,u,k,N$,j$,g4,Q4;let y$=$.strict,h1=(v=$.code)===null||v===void 0?void 0:v.optimize,m1=h1===!0||h1===void 0?1:h1||0,c1=(X=(D=$.code)===null||D===void 0?void 0:D.regExp)!==null&&X!==void 0?X:QB,q0=(U=$.uriResolver)!==null&&U!==void 0?U:Xk.default;return{strictSchema:(J=(G=$.strictSchema)!==null&&G!==void 0?G:y$)!==null&&J!==void 0?J:!0,strictNumbers:(W=(Q=$.strictNumbers)!==null&&Q!==void 0?Q:y$)!==null&&W!==void 0?W:!0,strictTypes:(Y=(z=$.strictTypes)!==null&&z!==void 0?z:y$)!==null&&Y!==void 0?Y:"log",strictTuples:(V=(I=$.strictTuples)!==null&&I!==void 0?I:y$)!==null&&V!==void 0?V:"log",strictRequired:(L=(K=$.strictRequired)!==null&&K!==void 0?K:y$)!==null&&L!==void 0?L:!1,code:$.code?{...$.code,optimize:m1,regExp:c1}:{optimize:m1,regExp:c1},loopRequired:(N=$.loopRequired)!==null&&N!==void 0?N:DB,loopEnum:(Z=$.loopEnum)!==null&&Z!==void 0?Z:DB,meta:(F=$.meta)!==null&&F!==void 0?F:!0,messages:(S=$.messages)!==null&&S!==void 0?S:!0,inlineRefs:(g=$.inlineRefs)!==null&&g!==void 0?g:!0,schemaId:(u=$.schemaId)!==null&&u!==void 0?u:"$id",addUsedSchema:(k=$.addUsedSchema)!==null&&k!==void 0?k:!0,validateSchema:(N$=$.validateSchema)!==null&&N$!==void 0?N$:!0,validateFormats:(j$=$.validateFormats)!==null&&j$!==void 0?j$:!0,unicodeRegExp:(g4=$.unicodeRegExp)!==null&&g4!==void 0?g4:!0,int32range:(Q4=$.int32range)!==null&&Q4!==void 0?Q4:!0,uriResolver:q0}}class YX{constructor($={}){this.schemas={},this.refs={},this.formats=Object.create(null),this._compilations=new Set,this._loading={},this._cache=new Map,$=this.opts={...$,...zk($)};let{es5:v,lines:D}=this.opts.code;this.scope=new Dk.ValueScope({scope:{},prefixes:Jk,es5:v,lines:D}),this.logger=Bk($.logger);let X=$.validateFormats;if($.validateFormats=!1,this.RULES=(0,Uk.getRules)(),XB.call(this,Qk,$,"NOT SUPPORTED"),XB.call(this,Wk,$,"DEPRECATED","warn"),this._metaOpts=Kk.call(this),$.formats)Ik.call(this);if(this._addVocabularies(),this._addDefaultMetaSchema(),$.keywords)Vk.call(this,$.keywords);if(typeof $.meta=="object")this.addMetaSchema($.meta);Yk.call(this),$.validateFormats=X}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:$,meta:v,schemaId:D}=this.opts,X=UB;if(D==="id")X={...UB},X.id=X.$id,delete X.$id;if(v&&$)this.addMetaSchema(X,X[D],!1)}defaultMeta(){let{meta:$,schemaId:v}=this.opts;return this.opts.defaultMeta=typeof $=="object"?$[v]||$:void 0}validate($,v){let D;if(typeof $=="string"){if(D=this.getSchema($),!D)throw Error(`no schema with key or ref "${$}"`)}else D=this.compile($);let X=D(v);if(!("$async"in D))this.errors=D.errors;return X}compile($,v){let D=this._addSchema($,v);return D.validate||this._compileSchemaEnv(D)}compileAsync($,v){if(typeof this.opts.loadSchema!="function")throw Error("options.loadSchema should be a function");let{loadSchema:D}=this.opts;return X.call(this,$,v);async function X(z,Y){await U.call(this,z.$schema);let I=this._addSchema(z,Y);return I.validate||G.call(this,I)}async function U(z){if(z&&!this.getSchema(z))await X.call(this,{$ref:z},!0)}async function G(z){try{return this._compileSchemaEnv(z)}catch(Y){if(!(Y instanceof JB.default))throw Y;return J.call(this,Y),await Q.call(this,Y.missingSchema),G.call(this,z)}}function J({missingSchema:z,missingRef:Y}){if(this.refs[z])throw Error(`AnySchema ${z} is loaded but ${Y} cannot be resolved`)}async function Q(z){let Y=await W.call(this,z);if(!this.refs[z])await U.call(this,Y.$schema);if(!this.refs[z])this.addSchema(Y,z,v)}async function W(z){let Y=this._loading[z];if(Y)return Y;try{return await(this._loading[z]=D(z))}finally{delete this._loading[z]}}}addSchema($,v,D,X=this.opts.validateSchema){if(Array.isArray($)){for(let G of $)this.addSchema(G,void 0,D,X);return this}let U;if(typeof $==="object"){let{schemaId:G}=this.opts;if(U=$[G],U!==void 0&&typeof U!="string")throw Error(`schema ${G} must be string`)}return v=(0,V0.normalizeId)(v||U),this._checkUnique(v),this.schemas[v]=this._addSchema($,D,v,X,!0),this}addMetaSchema($,v,D=this.opts.validateSchema){return this.addSchema($,v,!0,D),this}validateSchema($,v){if(typeof $=="boolean")return!0;let D;if(D=$.$schema,D!==void 0&&typeof D!="string")throw Error("$schema must be a string");if(D=D||this.opts.defaultMeta||this.defaultMeta(),!D)return this.logger.warn("meta-schema not available"),this.errors=null,!0;let X=this.validate(D,$);if(!X&&v){let U="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(U);else throw Error(U)}return X}getSchema($){let v;while(typeof(v=GB.call(this,$))=="string")$=v;if(v===void 0){let{schemaId:D}=this.opts,X=new I0.SchemaEnv({schema:{},schemaId:D});if(v=I0.resolveSchema.call(this,X,$),!v)return;this.refs[$]=v}return v.validate||this._compileSchemaEnv(v)}removeSchema($){if($ instanceof RegExp)return this._removeAllSchemas(this.schemas,$),this._removeAllSchemas(this.refs,$),this;switch(typeof $){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{let v=GB.call(this,$);if(typeof v=="object")this._cache.delete(v.schema);return delete this.schemas[$],delete this.refs[$],this}case"object":{let v=$;this._cache.delete(v);let D=$[this.opts.schemaId];if(D)D=(0,V0.normalizeId)(D),delete this.schemas[D],delete this.refs[D];return this}default:throw Error("ajv.removeSchema: invalid parameter")}}addVocabulary($){for(let v of $)this.addKeyword(v);return this}addKeyword($,v){let D;if(typeof $=="string"){if(D=$,typeof v=="object")this.logger.warn("these parameters are deprecated, see docs for addKeyword"),v.keyword=D}else if(typeof $=="object"&&v===void 0){if(v=$,D=v.keyword,Array.isArray(D)&&!D.length)throw Error("addKeywords: keyword must be string or non-empty array")}else throw Error("invalid addKeywords parameters");if(Zk.call(this,D,v),!v)return(0,B5.eachItem)(D,(U)=>L5.call(this,U)),this;Hk.call(this,v);let X={...v,type:(0,zX.getJSONTypes)(v.type),schemaType:(0,zX.getJSONTypes)(v.schemaType)};return(0,B5.eachItem)(D,X.type.length===0?(U)=>L5.call(this,U,X):(U)=>X.type.forEach((G)=>L5.call(this,U,X,G))),this}getKeyword($){let v=this.RULES.all[$];return typeof v=="object"?v.definition:!!v}removeKeyword($){let{RULES:v}=this;delete v.keywords[$],delete v.all[$];for(let D of v.rules){let X=D.rules.findIndex((U)=>U.keyword===$);if(X>=0)D.rules.splice(X,1)}return this}addFormat($,v){if(typeof v=="string")v=new RegExp(v);return this.formats[$]=v,this}errorsText($=this.errors,{separator:v=", ",dataVar:D="data"}={}){if(!$||$.length===0)return"No errors";return $.map((X)=>`${D}${X.instancePath} ${X.message}`).reduce((X,U)=>X+v+U)}$dataMetaSchema($,v){let D=this.RULES.all;$=JSON.parse(JSON.stringify($));for(let X of v){let U=X.split("/").slice(1),G=$;for(let J of U)G=G[J];for(let J in D){let Q=D[J];if(typeof Q!="object")continue;let{$data:W}=Q.definition,z=G[J];if(W&&z)G[J]=WB(z)}}return $}_removeAllSchemas($,v){for(let D in $){let X=$[D];if(!v||v.test(D)){if(typeof X=="string")delete $[D];else if(X&&!X.meta)this._cache.delete(X.schema),delete $[D]}}}_addSchema($,v,D,X=this.opts.validateSchema,U=this.opts.addUsedSchema){let G,{schemaId:J}=this.opts;if(typeof $=="object")G=$[J];else if(this.opts.jtd)throw Error("schema must be object");else if(typeof $!="boolean")throw Error("schema must be object or boolean");let Q=this._cache.get($);if(Q!==void 0)return Q;D=(0,V0.normalizeId)(G||D);let W=V0.getSchemaRefs.call(this,$,D);if(Q=new I0.SchemaEnv({schema:$,schemaId:J,meta:v,baseId:D,localRefs:W}),this._cache.set(Q.schema,Q),U&&!D.startsWith("#")){if(D)this._checkUnique(D);this.refs[D]=Q}if(X)this.validateSchema($,!0);return Q}_checkUnique($){if(this.schemas[$]||this.refs[$])throw Error(`schema with key or id "${$}" already exists`)}_compileSchemaEnv($){if($.meta)this._compileMetaSchema($);else I0.compileSchema.call(this,$);if(!$.validate)throw Error("ajv implementation error");return $.validate}_compileMetaSchema($){let v=this.opts;this.opts=this._metaOpts;try{I0.compileSchema.call(this,$)}finally{this.opts=v}}}YX.ValidationError=vk.default;YX.MissingRefError=JB.default;d4.default=YX;function XB($,v,D,X="error"){for(let U in $){let G=U;if(G in v)this.logger[X](`${D}: option ${U}. ${$[G]}`)}}function GB($){return $=(0,V0.normalizeId)($),this.schemas[$]||this.refs[$]}function Yk(){let $=this.opts.schemas;if(!$)return;if(Array.isArray($))this.addSchema($);else for(let v in $)this.addSchema($[v],v)}function Ik(){for(let $ in this.opts.formats){let v=this.opts.formats[$];if(v)this.addFormat($,v)}}function Vk($){if(Array.isArray($)){this.addVocabulary($);return}this.logger.warn("keywords option as map is deprecated, pass array");for(let v in $){let D=$[v];if(!D.keyword)D.keyword=v;this.addKeyword(D)}}function Kk(){let $={...this.opts};for(let v of Gk)delete $[v];return $}var Lk={log(){},warn(){},error(){}};function Bk($){if($===!1)return Lk;if($===void 0)return console;if($.log&&$.warn&&$.error)return $;throw Error("logger must implement log, warn and error methods")}var Nk=/^[a-z_$][a-z0-9_$:-]*$/i;function Zk($,v){let{RULES:D}=this;if((0,B5.eachItem)($,(X)=>{if(D.keywords[X])throw Error(`Keyword ${X} is already defined`);if(!Nk.test(X))throw Error(`Keyword ${X} has invalid name`)}),!v)return;if(v.$data&&!(("code"in v)||("validate"in v)))throw Error('$data keyword must have "code" or "validate" function')}function L5($,v,D){var X;let U=v===null||v===void 0?void 0:v.post;if(D&&U)throw Error('keyword with "post" flag cannot have "type"');let{RULES:G}=this,J=U?G.post:G.rules.find(({type:W})=>W===D);if(!J)J={type:D,rules:[]},G.rules.push(J);if(G.keywords[$]=!0,!v)return;let Q={keyword:$,definition:{...v,type:(0,zX.getJSONTypes)(v.type),schemaType:(0,zX.getJSONTypes)(v.schemaType)}};if(v.before)Ok.call(this,J,Q,v.before);else J.rules.push(Q);G.all[$]=Q,(X=v.implements)===null||X===void 0||X.forEach((W)=>this.addKeyword(W))}function Ok($,v,D){let X=$.rules.findIndex((U)=>U.keyword===D);if(X>=0)$.rules.splice(X,0,v);else $.rules.push(v),this.logger.warn(`rule ${D} is not defined`)}function Hk($){let{metaSchema:v}=$;if(v===void 0)return;if($.$data&&this.opts.$data)v=WB(v);$.validateSchema=this.compile(v,!0)}var Fk={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function WB($){return{anyOf:[$,Fk]}}});var IB=b((YB)=>{Object.defineProperty(YB,"__esModule",{value:!0});var wk={keyword:"id",code(){throw Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};YB.default=wk});var ZB=b((BB)=>{Object.defineProperty(BB,"__esModule",{value:!0});BB.callRef=BB.getValidate=void 0;var Pk=W0(),VB=X4(),d$=h(),R1=m4(),KB=GX(),IX=r(),bk={keyword:"$ref",schemaType:"string",code($){let{gen:v,schema:D,it:X}=$,{baseId:U,schemaEnv:G,validateName:J,opts:Q,self:W}=X,{root:z}=G;if((D==="#"||D==="#/")&&U===z.baseId)return I();let Y=KB.resolveRef.call(W,z,U,D);if(Y===void 0)throw new Pk.default(X.opts.uriResolver,U,D);if(Y instanceof KB.SchemaEnv)return V(Y);return K(Y);function I(){if(G===z)return VX($,J,G,G.$async);let L=v.scopeValue("root",{ref:z});return VX($,d$._`${L}.validate`,z,z.$async)}function V(L){let N=LB($,L);VX($,N,L,L.$async)}function K(L){let N=v.scopeValue("schema",Q.code.source===!0?{ref:L,code:(0,d$.stringify)(L)}:{ref:L}),Z=v.name("valid"),F=$.subschema({schema:L,dataTypes:[],schemaPath:d$.nil,topSchemaRef:N,errSchemaPath:D},Z);$.mergeEvaluated(F),$.ok(Z)}}};function LB($,v){let{gen:D}=$;return v.validate?D.scopeValue("validate",{ref:v.validate}):d$._`${D.scopeValue("wrapper",{ref:v})}.validate`}BB.getValidate=LB;function VX($,v,D,X){let{gen:U,it:G}=$,{allErrors:J,schemaEnv:Q,opts:W}=G,z=W.passContext?R1.default.this:d$.nil;if(X)Y();else I();function Y(){if(!Q.$async)throw Error("async schema referenced by sync schema");let L=U.let("valid");U.try(()=>{if(U.code(d$._`await ${(0,VB.callValidateCode)($,v,z)}`),K(v),!J)U.assign(L,!0)},(N)=>{if(U.if(d$._`!(${N} instanceof ${G.ValidationError})`,()=>U.throw(N)),V(N),!J)U.assign(L,!1)}),$.ok(L)}function I(){$.result((0,VB.callValidateCode)($,v,z),()=>K(v),()=>V(v))}function V(L){let N=d$._`${L}.errors`;U.assign(R1.default.vErrors,d$._`${R1.default.vErrors} === null ? ${N} : ${R1.default.vErrors}.concat(${N})`),U.assign(R1.default.errors,d$._`${R1.default.vErrors}.length`)}function K(L){var N;if(!G.opts.unevaluated)return;let Z=(N=D===null||D===void 0?void 0:D.validate)===null||N===void 0?void 0:N.evaluated;if(G.props!==!0)if(Z&&!Z.dynamicProps){if(Z.props!==void 0)G.props=IX.mergeEvaluated.props(U,Z.props,G.props)}else{let F=U.var("props",d$._`${L}.evaluated.props`);G.props=IX.mergeEvaluated.props(U,F,G.props,d$.Name)}if(G.items!==!0)if(Z&&!Z.dynamicItems){if(Z.items!==void 0)G.items=IX.mergeEvaluated.items(U,Z.items,G.items)}else{let F=U.var("items",d$._`${L}.evaluated.items`);G.items=IX.mergeEvaluated.items(U,F,G.items,d$.Name)}}}BB.callRef=VX;BB.default=bk});var HB=b((OB)=>{Object.defineProperty(OB,"__esModule",{value:!0});var kk=IB(),Ek=ZB(),Tk=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",kk.default,Ek.default];OB.default=Tk});var jB=b((FB)=>{Object.defineProperty(FB,"__esModule",{value:!0});var KX=h(),B6=KX.operators,LX={maximum:{okStr:"<=",ok:B6.LTE,fail:B6.GT},minimum:{okStr:">=",ok:B6.GTE,fail:B6.LT},exclusiveMaximum:{okStr:"<",ok:B6.LT,fail:B6.GTE},exclusiveMinimum:{okStr:">",ok:B6.GT,fail:B6.LTE}},gk={message:({keyword:$,schemaCode:v})=>KX.str`must be ${LX[$].okStr} ${v}`,params:({keyword:$,schemaCode:v})=>KX._`{comparison: ${LX[$].okStr}, limit: ${v}}`},Ck={keyword:Object.keys(LX),type:"number",schemaType:"number",$data:!0,error:gk,code($){let{keyword:v,data:D,schemaCode:X}=$;$.fail$data(KX._`${D} ${LX[v].fail} ${X} || isNaN(${D})`)}};FB.default=Ck});var wB=b((AB)=>{Object.defineProperty(AB,"__esModule",{value:!0});var K0=h(),xk={message:({schemaCode:$})=>K0.str`must be multiple of ${$}`,params:({schemaCode:$})=>K0._`{multipleOf: ${$}}`},fk={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:xk,code($){let{gen:v,data:D,schemaCode:X,it:U}=$,G=U.opts.multipleOfPrecision,J=v.let("res"),Q=G?K0._`Math.abs(Math.round(${J}) - ${J}) > 1e-${G}`:K0._`${J} !== parseInt(${J})`;$.fail$data(K0._`(${X} === 0 || (${J} = ${D}/${X}, ${Q}))`)}};AB.default=fk});var bB=b((PB)=>{Object.defineProperty(PB,"__esModule",{value:!0});function MB($){let v=$.length,D=0,X=0,U;while(X<v)if(D++,U=$.charCodeAt(X++),U>=55296&&U<=56319&&X<v){if(U=$.charCodeAt(X),(U&64512)===56320)X++}return D}PB.default=MB;MB.code='require("ajv/dist/runtime/ucs2length").default'});var SB=b((qB)=>{Object.defineProperty(qB,"__esModule",{value:!0});var g6=h(),yk=r(),nk=bB(),lk={message({keyword:$,schemaCode:v}){let D=$==="maxLength"?"more":"fewer";return g6.str`must NOT have ${D} than ${v} characters`},params:({schemaCode:$})=>g6._`{limit: ${$}}`},hk={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:lk,code($){let{keyword:v,data:D,schemaCode:X,it:U}=$,G=v==="maxLength"?g6.operators.GT:g6.operators.LT,J=U.opts.unicode===!1?g6._`${D}.length`:g6._`${(0,yk.useFunc)($.gen,nk.default)}(${D})`;$.fail$data(g6._`${J} ${G} ${X}`)}};qB.default=hk});var EB=b((kB)=>{Object.defineProperty(kB,"__esModule",{value:!0});var ck=X4(),dk=r(),g1=h(),rk={message:({schemaCode:$})=>g1.str`must match pattern "${$}"`,params:({schemaCode:$})=>g1._`{pattern: ${$}}`},pk={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:rk,code($){let{gen:v,data:D,$data:X,schema:U,schemaCode:G,it:J}=$,Q=J.opts.unicodeRegExp?"u":"";if(X){let{regExp:W}=J.opts.code,z=W.code==="new RegExp"?g1._`new RegExp`:(0,dk.useFunc)(v,W),Y=v.let("valid");v.try(()=>v.assign(Y,g1._`${z}(${G}, ${Q}).test(${D})`),()=>v.assign(Y,!1)),$.fail$data(g1._`!${Y}`)}else{let W=(0,ck.usePattern)($,U);$.fail$data(g1._`!${W}.test(${D})`)}}};kB.default=pk});var RB=b((TB)=>{Object.defineProperty(TB,"__esModule",{value:!0});var L0=h(),ok={message({keyword:$,schemaCode:v}){let D=$==="maxProperties"?"more":"fewer";return L0.str`must NOT have ${D} than ${v} properties`},params:({schemaCode:$})=>L0._`{limit: ${$}}`},ak={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:ok,code($){let{keyword:v,data:D,schemaCode:X}=$,U=v==="maxProperties"?L0.operators.GT:L0.operators.LT;$.fail$data(L0._`Object.keys(${D}).length ${U} ${X}`)}};TB.default=ak});var CB=b((gB)=>{Object.defineProperty(gB,"__esModule",{value:!0});var B0=X4(),N0=h(),sk=r(),$E={message:({params:{missingProperty:$}})=>N0.str`must have required property '${$}'`,params:({params:{missingProperty:$}})=>N0._`{missingProperty: ${$}}`},vE={keyword:"required",type:"object",schemaType:"array",$data:!0,error:$E,code($){let{gen:v,schema:D,schemaCode:X,data:U,$data:G,it:J}=$,{opts:Q}=J;if(!G&&D.length===0)return;let W=D.length>=Q.loopRequired;if(J.allErrors)z();else Y();if(Q.strictRequired){let K=$.parentSchema.properties,{definedProperties:L}=$.it;for(let N of D)if((K===null||K===void 0?void 0:K[N])===void 0&&!L.has(N)){let Z=J.schemaEnv.baseId+J.errSchemaPath,F=`required property "${N}" is not defined at "${Z}" (strictRequired)`;(0,sk.checkStrictMode)(J,F,J.opts.strictRequired)}}function z(){if(W||G)$.block$data(N0.nil,I);else for(let K of D)(0,B0.checkReportMissingProp)($,K)}function Y(){let K=v.let("missing");if(W||G){let L=v.let("valid",!0);$.block$data(L,()=>V(K,L)),$.ok(L)}else v.if((0,B0.checkMissingProp)($,D,K)),(0,B0.reportMissingProp)($,K),v.else()}function I(){v.forOf("prop",X,(K)=>{$.setParams({missingProperty:K}),v.if((0,B0.noPropertyInData)(v,U,K,Q.ownProperties),()=>$.error())})}function V(K,L){$.setParams({missingProperty:K}),v.forOf(K,X,()=>{v.assign(L,(0,B0.propertyInData)(v,U,K,Q.ownProperties)),v.if((0,N0.not)(L),()=>{$.error(),v.break()})},N0.nil)}}};gB.default=vE});var xB=b((uB)=>{Object.defineProperty(uB,"__esModule",{value:!0});var Z0=h(),DE={message({keyword:$,schemaCode:v}){let D=$==="maxItems"?"more":"fewer";return Z0.str`must NOT have ${D} than ${v} items`},params:({schemaCode:$})=>Z0._`{limit: ${$}}`},XE={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:DE,code($){let{keyword:v,data:D,schemaCode:X}=$,U=v==="maxItems"?Z0.operators.GT:Z0.operators.LT;$.fail$data(Z0._`${D}.length ${U} ${X}`)}};uB.default=XE});var BX=b((_B)=>{Object.defineProperty(_B,"__esModule",{value:!0});var fB=sz();fB.code='require("ajv/dist/runtime/equal").default';_B.default=fB});var yB=b((iB)=>{Object.defineProperty(iB,"__esModule",{value:!0});var N5=D0(),S$=h(),QE=r(),WE=BX(),zE={message:({params:{i:$,j:v}})=>S$.str`must NOT have duplicate items (items ## ${v} and ${$} are identical)`,params:({params:{i:$,j:v}})=>S$._`{i: ${$}, j: ${v}}`},YE={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:zE,code($){let{gen:v,data:D,$data:X,schema:U,parentSchema:G,schemaCode:J,it:Q}=$;if(!X&&!U)return;let W=v.let("valid"),z=G.items?(0,N5.getSchemaTypes)(G.items):[];$.block$data(W,Y,S$._`${J} === false`),$.ok(W);function Y(){let L=v.let("i",S$._`${D}.length`),N=v.let("j");$.setParams({i:L,j:N}),v.assign(W,!0),v.if(S$._`${L} > 1`,()=>(I()?V:K)(L,N))}function I(){return z.length>0&&!z.some((L)=>L==="object"||L==="array")}function V(L,N){let Z=v.name("item"),F=(0,N5.checkDataTypes)(z,Z,Q.opts.strictNumbers,N5.DataType.Wrong),S=v.const("indices",S$._`{}`);v.for(S$._`;${L}--;`,()=>{if(v.let(Z,S$._`${D}[${L}]`),v.if(F,S$._`continue`),z.length>1)v.if(S$._`typeof ${Z} == "string"`,S$._`${Z} += "_"`);v.if(S$._`typeof ${S}[${Z}] == "number"`,()=>{v.assign(N,S$._`${S}[${Z}]`),$.error(),v.assign(W,!1).break()}).code(S$._`${S}[${Z}] = ${L}`)})}function K(L,N){let Z=(0,QE.useFunc)(v,WE.default),F=v.name("outer");v.label(F).for(S$._`;${L}--;`,()=>v.for(S$._`${N} = ${L}; ${N}--;`,()=>v.if(S$._`${Z}(${D}[${L}], ${D}[${N}])`,()=>{$.error(),v.assign(W,!1).break(F)})))}}};iB.default=YE});var lB=b((nB)=>{Object.defineProperty(nB,"__esModule",{value:!0});var Z5=h(),VE=r(),KE=BX(),LE={message:"must be equal to constant",params:({schemaCode:$})=>Z5._`{allowedValue: ${$}}`},BE={keyword:"const",$data:!0,error:LE,code($){let{gen:v,data:D,$data:X,schemaCode:U,schema:G}=$;if(X||G&&typeof G=="object")$.fail$data(Z5._`!${(0,VE.useFunc)(v,KE.default)}(${D}, ${U})`);else $.fail(Z5._`${G} !== ${D}`)}};nB.default=BE});var mB=b((hB)=>{Object.defineProperty(hB,"__esModule",{value:!0});var O0=h(),ZE=r(),OE=BX(),HE={message:"must be equal to one of the allowed values",params:({schemaCode:$})=>O0._`{allowedValues: ${$}}`},FE={keyword:"enum",schemaType:"array",$data:!0,error:HE,code($){let{gen:v,data:D,$data:X,schema:U,schemaCode:G,it:J}=$;if(!X&&U.length===0)throw Error("enum must have non-empty array");let Q=U.length>=J.opts.loopEnum,W,z=()=>W!==null&&W!==void 0?W:W=(0,ZE.useFunc)(v,OE.default),Y;if(Q||X)Y=v.let("valid"),$.block$data(Y,I);else{if(!Array.isArray(U))throw Error("ajv implementation error");let K=v.const("vSchema",G);Y=(0,O0.or)(...U.map((L,N)=>V(K,N)))}$.pass(Y);function I(){v.assign(Y,!1),v.forOf("v",G,(K)=>v.if(O0._`${z()}(${D}, ${K})`,()=>v.assign(Y,!0).break()))}function V(K,L){let N=U[L];return typeof N==="object"&&N!==null?O0._`${z()}(${D}, ${K}[${L}])`:O0._`${D} === ${N}`}}};hB.default=FE});var dB=b((cB)=>{Object.defineProperty(cB,"__esModule",{value:!0});var AE=jB(),wE=wB(),ME=SB(),PE=EB(),bE=RB(),qE=CB(),SE=xB(),kE=yB(),EE=lB(),TE=mB(),RE=[AE.default,wE.default,ME.default,PE.default,bE.default,qE.default,SE.default,kE.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},EE.default,TE.default];cB.default=RE});var H5=b((pB)=>{Object.defineProperty(pB,"__esModule",{value:!0});pB.validateAdditionalItems=void 0;var C6=h(),O5=r(),CE={message:({params:{len:$}})=>C6.str`must NOT have more than ${$} items`,params:({params:{len:$}})=>C6._`{limit: ${$}}`},uE={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:CE,code($){let{parentSchema:v,it:D}=$,{items:X}=v;if(!Array.isArray(X)){(0,O5.checkStrictMode)(D,'"additionalItems" is ignored when "items" is not an array of schemas');return}rB($,X)}};function rB($,v){let{gen:D,schema:X,data:U,keyword:G,it:J}=$;J.items=!0;let Q=D.const("len",C6._`${U}.length`);if(X===!1)$.setParams({len:v.length}),$.pass(C6._`${Q} <= ${v.length}`);else if(typeof X=="object"&&!(0,O5.alwaysValidSchema)(J,X)){let z=D.var("valid",C6._`${Q} <= ${v.length}`);D.if((0,C6.not)(z),()=>W(z)),$.ok(z)}function W(z){D.forRange("i",v.length,Q,(Y)=>{if($.subschema({keyword:G,dataProp:Y,dataPropType:O5.Type.Num},z),!J.allErrors)D.if((0,C6.not)(z),()=>D.break())})}}pB.validateAdditionalItems=rB;pB.default=uE});var F5=b((eB)=>{Object.defineProperty(eB,"__esModule",{value:!0});eB.validateTuple=void 0;var oB=h(),NX=r(),fE=X4(),_E={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code($){let{schema:v,it:D}=$;if(Array.isArray(v))return aB($,"additionalItems",v);if(D.items=!0,(0,NX.alwaysValidSchema)(D,v))return;$.ok((0,fE.validateArray)($))}};function aB($,v,D=$.schema){let{gen:X,parentSchema:U,data:G,keyword:J,it:Q}=$;if(Y(U),Q.opts.unevaluated&&D.length&&Q.items!==!0)Q.items=NX.mergeEvaluated.items(X,D.length,Q.items);let W=X.name("valid"),z=X.const("len",oB._`${G}.length`);D.forEach((I,V)=>{if((0,NX.alwaysValidSchema)(Q,I))return;X.if(oB._`${z} > ${V}`,()=>$.subschema({keyword:J,schemaProp:V,dataProp:V},W)),$.ok(W)});function Y(I){let{opts:V,errSchemaPath:K}=Q,L=D.length,N=L===I.minItems&&(L===I.maxItems||I[v]===!1);if(V.strictTuples&&!N){let Z=`"${J}" is ${L}-tuple, but minItems or maxItems/${v} are not specified or different at path "${K}"`;(0,NX.checkStrictMode)(Q,Z,V.strictTuples)}}}eB.validateTuple=aB;eB.default=_E});var vN=b(($N)=>{Object.defineProperty($N,"__esModule",{value:!0});var yE=F5(),nE={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:($)=>(0,yE.validateTuple)($,"items")};$N.default=nE});var XN=b((DN)=>{Object.defineProperty(DN,"__esModule",{value:!0});var UN=h(),hE=r(),mE=X4(),cE=H5(),dE={message:({params:{len:$}})=>UN.str`must NOT have more than ${$} items`,params:({params:{len:$}})=>UN._`{limit: ${$}}`},rE={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:dE,code($){let{schema:v,parentSchema:D,it:X}=$,{prefixItems:U}=D;if(X.items=!0,(0,hE.alwaysValidSchema)(X,v))return;if(U)(0,cE.validateAdditionalItems)($,U);else $.ok((0,mE.validateArray)($))}};DN.default=rE});var JN=b((GN)=>{Object.defineProperty(GN,"__esModule",{value:!0});var G4=h(),ZX=r(),tE={message:({params:{min:$,max:v}})=>v===void 0?G4.str`must contain at least ${$} valid item(s)`:G4.str`must contain at least ${$} and no more than ${v} valid item(s)`,params:({params:{min:$,max:v}})=>v===void 0?G4._`{minContains: ${$}}`:G4._`{minContains: ${$}, maxContains: ${v}}`},oE={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:tE,code($){let{gen:v,schema:D,parentSchema:X,data:U,it:G}=$,J,Q,{minContains:W,maxContains:z}=X;if(G.opts.next)J=W===void 0?1:W,Q=z;else J=1;let Y=v.const("len",G4._`${U}.length`);if($.setParams({min:J,max:Q}),Q===void 0&&J===0){(0,ZX.checkStrictMode)(G,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(Q!==void 0&&J>Q){(0,ZX.checkStrictMode)(G,'"minContains" > "maxContains" is always invalid'),$.fail();return}if((0,ZX.alwaysValidSchema)(G,D)){let N=G4._`${Y} >= ${J}`;if(Q!==void 0)N=G4._`${N} && ${Y} <= ${Q}`;$.pass(N);return}G.items=!0;let I=v.name("valid");if(Q===void 0&&J===1)K(I,()=>v.if(I,()=>v.break()));else if(J===0){if(v.let(I,!0),Q!==void 0)v.if(G4._`${U}.length > 0`,V)}else v.let(I,!1),V();$.result(I,()=>$.reset());function V(){let N=v.name("_valid"),Z=v.let("count",0);K(N,()=>v.if(N,()=>L(Z)))}function K(N,Z){v.forRange("i",0,Y,(F)=>{$.subschema({keyword:"contains",dataProp:F,dataPropType:ZX.Type.Num,compositeRule:!0},N),Z()})}function L(N){if(v.code(G4._`${N}++`),Q===void 0)v.if(G4._`${N} >= ${J}`,()=>v.assign(I,!0).break());else if(v.if(G4._`${N} > ${Q}`,()=>v.assign(I,!1).break()),J===1)v.assign(I,!0);else v.if(G4._`${N} >= ${J}`,()=>v.assign(I,!0))}}};GN.default=oE});var VN=b((zN)=>{Object.defineProperty(zN,"__esModule",{value:!0});zN.validateSchemaDeps=zN.validatePropertyDeps=zN.error=void 0;var j5=h(),eE=r(),H0=X4();zN.error={message:({params:{property:$,depsCount:v,deps:D}})=>{let X=v===1?"property":"properties";return j5.str`must have ${X} ${D} when property ${$} is present`},params:({params:{property:$,depsCount:v,deps:D,missingProperty:X}})=>j5._`{property: ${$},
|
|
7
|
+
|| ${J} === "boolean" || ${U} === null`).assign(Q,n._`[${U}]`)}}}function Kb({gen:$,parentData:v,parentDataProperty:D},X){$.if(n._`${v} !== undefined`,()=>$.assign(n._`${v}[${D}]`,X))}function rz($,v,D,X=q1.Correct){let U=X===q1.Correct?n.operators.EQ:n.operators.NEQ,G;switch($){case"null":return n._`${v} ${U} null`;case"array":G=n._`Array.isArray(${v})`;break;case"object":G=n._`${v} && typeof ${v} == "object" && !Array.isArray(${v})`;break;case"integer":G=J(n._`!(${v} % 1) && !isNaN(${v})`);break;case"number":G=J();break;default:return n._`typeof ${v} ${U} ${$}`}return X===q1.Correct?G:(0,n.not)(G);function J(Q=n.nil){return(0,n.and)(n._`typeof ${v} == "number"`,Q,D?n._`isFinite(${v})`:n.nil)}}_K.checkDataType=rz;function pz($,v,D,X){if($.length===1)return rz($[0],v,D,X);let U,G=(0,uK.toHash)($);if(G.array&&G.object){let J=n._`typeof ${v} != "object"`;U=G.null?J:n._`!${v} || ${J}`,delete G.null,delete G.array,delete G.object}else U=n.nil;if(G.number)delete G.integer;for(let J in G)U=(0,n.and)(U,rz(J,v,D,X));return U}_K.checkDataTypes=pz;var Lb={message:({schema:$})=>`must be ${$}`,params:({schema:$,schemaValue:v})=>typeof $=="string"?n._`{type: ${$}}`:n._`{type: ${v}}`};function tz($){let v=Bb($);(0,Wb.reportError)(v,Lb)}_K.reportTypeError=tz;function Bb($){let{gen:v,data:D,schema:X}=$,U=(0,uK.schemaRefOrVal)($,X,"type");return{gen:v,keyword:"type",data:D,schema:X.type,schemaCode:U,schemaValue:U,parentSchema:X,params:{},it:$}}});var hK=b((nK)=>{Object.defineProperty(nK,"__esModule",{value:!0});nK.assignDefaults=void 0;var S1=h(),Ab=r();function wb($,v){let{properties:D,items:X}=$.schema;if(v==="object"&&D)for(let U in D)yK($,U,D[U].default);else if(v==="array"&&Array.isArray(X))X.forEach((U,G)=>yK($,G,U.default))}nK.assignDefaults=wb;function yK($,v,D){let{gen:X,compositeRule:U,data:G,opts:J}=$;if(D===void 0)return;let Q=S1._`${G}${(0,S1.getProperty)(v)}`;if(U){(0,Ab.checkStrictMode)($,`default is ignored for: ${Q}`);return}let W=S1._`${Q} === undefined`;if(J.useDefaults==="empty")W=S1._`${W} || ${Q} === null || ${Q} === ""`;X.if(W,S1._`${Q} = ${(0,S1.stringify)(D)}`)}});var X4=b((dK)=>{Object.defineProperty(dK,"__esModule",{value:!0});dK.validateUnion=dK.validateArray=dK.usePattern=dK.callValidateCode=dK.schemaProperties=dK.allSchemaProperties=dK.noPropertyInData=dK.propertyInData=dK.isOwnProperty=dK.hasPropFunc=dK.reportMissingProp=dK.checkMissingProp=dK.checkReportMissingProp=void 0;var W$=h(),oz=r(),K6=m4(),Mb=r();function Pb($,v){let{gen:D,data:X,it:U}=$;D.if(ez(D,X,v,U.opts.ownProperties),()=>{$.setParams({missingProperty:W$._`${v}`},!0),$.error()})}dK.checkReportMissingProp=Pb;function bb({gen:$,data:v,it:{opts:D}},X,U){return(0,W$.or)(...X.map((G)=>(0,W$.and)(ez($,v,G,D.ownProperties),W$._`${U} = ${G}`)))}dK.checkMissingProp=bb;function qb($,v){$.setParams({missingProperty:v},!0),$.error()}dK.reportMissingProp=qb;function mK($){return $.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:W$._`Object.prototype.hasOwnProperty`})}dK.hasPropFunc=mK;function az($,v,D){return W$._`${mK($)}.call(${v}, ${D})`}dK.isOwnProperty=az;function Sb($,v,D,X){let U=W$._`${v}${(0,W$.getProperty)(D)} !== undefined`;return X?W$._`${U} && ${az($,v,D)}`:U}dK.propertyInData=Sb;function ez($,v,D,X){let U=W$._`${v}${(0,W$.getProperty)(D)} === undefined`;return X?(0,W$.or)(U,(0,W$.not)(az($,v,D))):U}dK.noPropertyInData=ez;function cK($){return $?Object.keys($).filter((v)=>v!=="__proto__"):[]}dK.allSchemaProperties=cK;function kb($,v){return cK(v).filter((D)=>!(0,oz.alwaysValidSchema)($,v[D]))}dK.schemaProperties=kb;function Eb({schemaCode:$,data:v,it:{gen:D,topSchemaRef:X,schemaPath:U,errorPath:G},it:J},Q,W,z){let Y=z?W$._`${$}, ${v}, ${X}${U}`:v,I=[[K6.default.instancePath,(0,W$.strConcat)(K6.default.instancePath,G)],[K6.default.parentData,J.parentData],[K6.default.parentDataProperty,J.parentDataProperty],[K6.default.rootData,K6.default.rootData]];if(J.opts.dynamicRef)I.push([K6.default.dynamicAnchors,K6.default.dynamicAnchors]);let V=W$._`${Y}, ${D.object(...I)}`;return W!==W$.nil?W$._`${Q}.call(${W}, ${V})`:W$._`${Q}(${V})`}dK.callValidateCode=Eb;var Tb=W$._`new RegExp`;function Rb({gen:$,it:{opts:v}},D){let X=v.unicodeRegExp?"u":"",{regExp:U}=v.code,G=U(D,X);return $.scopeValue("pattern",{key:G.toString(),ref:G,code:W$._`${U.code==="new RegExp"?Tb:(0,Mb.useFunc)($,U)}(${D}, ${X})`})}dK.usePattern=Rb;function gb($){let{gen:v,data:D,keyword:X,it:U}=$,G=v.name("valid");if(U.allErrors){let Q=v.let("valid",!0);return J(()=>v.assign(Q,!1)),Q}return v.var(G,!0),J(()=>v.break()),G;function J(Q){let W=v.const("len",W$._`${D}.length`);v.forRange("i",0,W,(z)=>{$.subschema({keyword:X,dataProp:z,dataPropType:oz.Type.Num},G),v.if((0,W$.not)(G),Q)})}}dK.validateArray=gb;function Cb($){let{gen:v,schema:D,keyword:X,it:U}=$;if(!Array.isArray(D))throw Error("ajv implementation error");if(D.some((W)=>(0,oz.alwaysValidSchema)(U,W))&&!U.opts.unevaluated)return;let J=v.let("valid",!1),Q=v.name("_valid");v.block(()=>D.forEach((W,z)=>{let Y=$.subschema({keyword:X,schemaProp:z,compositeRule:!0},Q);if(v.assign(J,W$._`${J} || ${Q}`),!$.mergeValidEvaluated(Y,Q))v.if((0,W$.not)(J))})),$.result(J,()=>$.reset(),()=>$.error(!0))}dK.validateUnion=Cb});var eK=b((oK)=>{Object.defineProperty(oK,"__esModule",{value:!0});oK.validateKeywordUsage=oK.validSchemaType=oK.funcKeywordCode=oK.macroKeywordCode=void 0;var _$=h(),E6=m4(),rb=X4(),pb=U0();function tb($,v){let{gen:D,keyword:X,schema:U,parentSchema:G,it:J}=$,Q=v.macro.call(J.self,U,G,J),W=tK(D,X,Q);if(J.opts.validateSchema!==!1)J.self.validateSchema(Q,!0);let z=D.name("valid");$.subschema({schema:Q,schemaPath:_$.nil,errSchemaPath:`${J.errSchemaPath}/${X}`,topSchemaRef:W,compositeRule:!0},z),$.pass(z,()=>$.error(!0))}oK.macroKeywordCode=tb;function ob($,v){var D;let{gen:X,keyword:U,schema:G,parentSchema:J,$data:Q,it:W}=$;eb(W,v);let z=!Q&&v.compile?v.compile.call(W.self,G,J,W):v.validate,Y=tK(X,U,z),I=X.let("valid");$.block$data(I,V),$.ok((D=v.valid)!==null&&D!==void 0?D:I);function V(){if(v.errors===!1){if(N(),v.modifying)pK($);Z(()=>$.error())}else{let F=v.async?K():L();if(v.modifying)pK($);Z(()=>ab($,F))}}function K(){let F=X.let("ruleErrs",null);return X.try(()=>N(_$._`await `),(S)=>X.assign(I,!1).if(_$._`${S} instanceof ${W.ValidationError}`,()=>X.assign(F,_$._`${S}.errors`),()=>X.throw(S))),F}function L(){let F=_$._`${Y}.errors`;return X.assign(F,null),N(_$.nil),F}function N(F=v.async?_$._`await `:_$.nil){let S=W.opts.passContext?E6.default.this:E6.default.self,g=!(("compile"in v)&&!Q||v.schema===!1);X.assign(I,_$._`${F}${(0,rb.callValidateCode)($,Y,S,g)}`,v.modifying)}function Z(F){var S;X.if((0,_$.not)((S=v.valid)!==null&&S!==void 0?S:I),F)}}oK.funcKeywordCode=ob;function pK($){let{gen:v,data:D,it:X}=$;v.if(X.parentData,()=>v.assign(D,_$._`${X.parentData}[${X.parentDataProperty}]`))}function ab($,v){let{gen:D}=$;D.if(_$._`Array.isArray(${v})`,()=>{D.assign(E6.default.vErrors,_$._`${E6.default.vErrors} === null ? ${v} : ${E6.default.vErrors}.concat(${v})`).assign(E6.default.errors,_$._`${E6.default.vErrors}.length`),(0,pb.extendErrors)($)},()=>$.error())}function eb({schemaEnv:$},v){if(v.async&&!$.$async)throw Error("async keyword in sync schema")}function tK($,v,D){if(D===void 0)throw Error(`keyword "${v}" failed to compile`);return $.scopeValue("keyword",typeof D=="function"?{ref:D}:{ref:D,code:(0,_$.stringify)(D)})}function sb($,v,D=!1){return!v.length||v.some((X)=>X==="array"?Array.isArray($):X==="object"?$&&typeof $=="object"&&!Array.isArray($):typeof $==X||D&&typeof $>"u")}oK.validSchemaType=sb;function $q({schema:$,opts:v,self:D,errSchemaPath:X},U,G){if(Array.isArray(U.keyword)?!U.keyword.includes(G):U.keyword!==G)throw Error("ajv implementation error");let J=U.dependencies;if(J===null||J===void 0?void 0:J.some((Q)=>!Object.prototype.hasOwnProperty.call($,Q)))throw Error(`parent schema must have dependencies of ${G}: ${J.join(",")}`);if(U.validateSchema){if(!U.validateSchema($[G])){let W=`keyword "${G}" value is invalid at path "${X}": `+D.errorsText(U.validateSchema.errors);if(v.validateSchema==="log")D.logger.error(W);else throw Error(W)}}}oK.validateKeywordUsage=$q});var UL=b(($L)=>{Object.defineProperty($L,"__esModule",{value:!0});$L.extendSubschemaMode=$L.extendSubschemaData=$L.getSubschema=void 0;var k4=h(),sK=r();function Xq($,{keyword:v,schemaProp:D,schema:X,schemaPath:U,errSchemaPath:G,topSchemaRef:J}){if(v!==void 0&&X!==void 0)throw Error('both "keyword" and "schema" passed, only one allowed');if(v!==void 0){let Q=$.schema[v];return D===void 0?{schema:Q,schemaPath:k4._`${$.schemaPath}${(0,k4.getProperty)(v)}`,errSchemaPath:`${$.errSchemaPath}/${v}`}:{schema:Q[D],schemaPath:k4._`${$.schemaPath}${(0,k4.getProperty)(v)}${(0,k4.getProperty)(D)}`,errSchemaPath:`${$.errSchemaPath}/${v}/${(0,sK.escapeFragment)(D)}`}}if(X!==void 0){if(U===void 0||G===void 0||J===void 0)throw Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:X,schemaPath:U,topSchemaRef:J,errSchemaPath:G}}throw Error('either "keyword" or "schema" must be passed')}$L.getSubschema=Xq;function Gq($,v,{dataProp:D,dataPropType:X,data:U,dataTypes:G,propertyName:J}){if(U!==void 0&&D!==void 0)throw Error('both "data" and "dataProp" passed, only one allowed');let{gen:Q}=v;if(D!==void 0){let{errorPath:z,dataPathArr:Y,opts:I}=v,V=Q.let("data",k4._`${v.data}${(0,k4.getProperty)(D)}`,!0);W(V),$.errorPath=k4.str`${z}${(0,sK.getErrorPath)(D,X,I.jsPropertySyntax)}`,$.parentDataProperty=k4._`${D}`,$.dataPathArr=[...Y,$.parentDataProperty]}if(U!==void 0){let z=U instanceof k4.Name?U:Q.let("data",U,!0);if(W(z),J!==void 0)$.propertyName=J}if(G)$.dataTypes=G;function W(z){$.data=z,$.dataLevel=v.dataLevel+1,$.dataTypes=[],v.definedProperties=new Set,$.parentData=v.data,$.dataNames=[...v.dataNames,z]}}$L.extendSubschemaData=Gq;function Jq($,{jtdDiscriminator:v,jtdMetadata:D,compositeRule:X,createErrors:U,allErrors:G}){if(X!==void 0)$.compositeRule=X;if(U!==void 0)$.createErrors=U;if(G!==void 0)$.allErrors=G;$.jtdDiscriminator=v,$.jtdMetadata=D}$L.extendSubschemaMode=Jq});var sz=b((jd,DL)=>{DL.exports=function $(v,D){if(v===D)return!0;if(v&&D&&typeof v=="object"&&typeof D=="object"){if(v.constructor!==D.constructor)return!1;var X,U,G;if(Array.isArray(v)){if(X=v.length,X!=D.length)return!1;for(U=X;U--!==0;)if(!$(v[U],D[U]))return!1;return!0}if(v.constructor===RegExp)return v.source===D.source&&v.flags===D.flags;if(v.valueOf!==Object.prototype.valueOf)return v.valueOf()===D.valueOf();if(v.toString!==Object.prototype.toString)return v.toString()===D.toString();if(G=Object.keys(v),X=G.length,X!==Object.keys(D).length)return!1;for(U=X;U--!==0;)if(!Object.prototype.hasOwnProperty.call(D,G[U]))return!1;for(U=X;U--!==0;){var J=G[U];if(!$(v[J],D[J]))return!1}return!0}return v!==v&&D!==D}});var GL=b((Ad,XL)=>{var L6=XL.exports=function($,v,D){if(typeof v=="function")D=v,v={};D=v.cb||D;var X=typeof D=="function"?D:D.pre||function(){},U=D.post||function(){};vX(v,X,U,$,"",$)};L6.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};L6.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};L6.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};L6.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 vX($,v,D,X,U,G,J,Q,W,z){if(X&&typeof X=="object"&&!Array.isArray(X)){v(X,U,G,J,Q,W,z);for(var Y in X){var I=X[Y];if(Array.isArray(I)){if(Y in L6.arrayKeywords)for(var V=0;V<I.length;V++)vX($,v,D,I[V],U+"/"+Y+"/"+V,G,U,Y,X,V)}else if(Y in L6.propsKeywords){if(I&&typeof I=="object")for(var K in I)vX($,v,D,I[K],U+"/"+Y+"/"+zq(K),G,U,Y,X,K)}else if(Y in L6.keywords||$.allKeys&&!(Y in L6.skipKeywords))vX($,v,D,I,U+"/"+Y,G,U,Y,X)}D(X,U,G,J,Q,W,z)}}function zq($){return $.replace(/~/g,"~0").replace(/\//g,"~1")}});var X0=b((zL)=>{Object.defineProperty(zL,"__esModule",{value:!0});zL.getSchemaRefs=zL.resolveUrl=zL.normalizeId=zL._getFullPath=zL.getFullPath=zL.inlineRef=void 0;var Yq=r(),Iq=sz(),Vq=GL(),Kq=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function Lq($,v=!0){if(typeof $=="boolean")return!0;if(v===!0)return!$5($);if(!v)return!1;return JL($)<=v}zL.inlineRef=Lq;var Bq=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function $5($){for(let v in $){if(Bq.has(v))return!0;let D=$[v];if(Array.isArray(D)&&D.some($5))return!0;if(typeof D=="object"&&$5(D))return!0}return!1}function JL($){let v=0;for(let D in $){if(D==="$ref")return 1/0;if(v++,Kq.has(D))continue;if(typeof $[D]=="object")(0,Yq.eachItem)($[D],(X)=>v+=JL(X));if(v===1/0)return 1/0}return v}function QL($,v="",D){if(D!==!1)v=k1(v);let X=$.parse(v);return WL($,X)}zL.getFullPath=QL;function WL($,v){return $.serialize(v).split("#")[0]+"#"}zL._getFullPath=WL;var Nq=/#\/?$/;function k1($){return $?$.replace(Nq,""):""}zL.normalizeId=k1;function Zq($,v,D){return D=k1(D),$.resolve(v,D)}zL.resolveUrl=Zq;var Oq=/^[a-z_][-a-z0-9._]*$/i;function Hq($,v){if(typeof $=="boolean")return{};let{schemaId:D,uriResolver:X}=this.opts,U=k1($[D]||v),G={"":U},J=QL(X,U,!1),Q={},W=new Set;return Vq($,{allKeys:!0},(I,V,K,L)=>{if(L===void 0)return;let N=J+V,Z=G[L];if(typeof I[D]=="string")Z=F.call(this,I[D]);S.call(this,I.$anchor),S.call(this,I.$dynamicAnchor),G[V]=Z;function F(g){let u=this.opts.uriResolver.resolve;if(g=k1(Z?u(Z,g):g),W.has(g))throw Y(g);W.add(g);let k=this.refs[g];if(typeof k=="string")k=this.refs[k];if(typeof k=="object")z(I,k.schema,g);else if(g!==k1(N))if(g[0]==="#")z(I,Q[g],g),Q[g]=I;else this.refs[g]=N;return g}function S(g){if(typeof g=="string"){if(!Oq.test(g))throw Error(`invalid anchor "${g}"`);F.call(this,`#${g}`)}}}),Q;function z(I,V,K){if(V!==void 0&&!Iq(I,V))throw Y(K)}function Y(I){return Error(`reference "${I}" resolves to more than one schema`)}}zL.getSchemaRefs=Hq});var Q0=b((PL)=>{Object.defineProperty(PL,"__esModule",{value:!0});PL.getData=PL.KeywordCxt=PL.validateFunctionCode=void 0;var BL=SK(),IL=D0(),U5=dz(),UX=D0(),Pq=hK(),J0=eK(),v5=UL(),C=h(),i=m4(),bq=X0(),c4=r(),G0=U0();function qq($){if(OL($)){if(HL($),ZL($)){Eq($);return}}NL($,()=>(0,BL.topBoolOrEmptySchema)($))}PL.validateFunctionCode=qq;function NL({gen:$,validateName:v,schema:D,schemaEnv:X,opts:U},G){if(U.code.es5)$.func(v,C._`${i.default.data}, ${i.default.valCxt}`,X.$async,()=>{$.code(C._`"use strict"; ${VL(D,U)}`),kq($,U),$.code(G)});else $.func(v,C._`${i.default.data}, ${Sq(U)}`,X.$async,()=>$.code(VL(D,U)).code(G))}function Sq($){return C._`{${i.default.instancePath}="", ${i.default.parentData}, ${i.default.parentDataProperty}, ${i.default.rootData}=${i.default.data}${$.dynamicRef?C._`, ${i.default.dynamicAnchors}={}`:C.nil}}={}`}function kq($,v){$.if(i.default.valCxt,()=>{if($.var(i.default.instancePath,C._`${i.default.valCxt}.${i.default.instancePath}`),$.var(i.default.parentData,C._`${i.default.valCxt}.${i.default.parentData}`),$.var(i.default.parentDataProperty,C._`${i.default.valCxt}.${i.default.parentDataProperty}`),$.var(i.default.rootData,C._`${i.default.valCxt}.${i.default.rootData}`),v.dynamicRef)$.var(i.default.dynamicAnchors,C._`${i.default.valCxt}.${i.default.dynamicAnchors}`)},()=>{if($.var(i.default.instancePath,C._`""`),$.var(i.default.parentData,C._`undefined`),$.var(i.default.parentDataProperty,C._`undefined`),$.var(i.default.rootData,i.default.data),v.dynamicRef)$.var(i.default.dynamicAnchors,C._`{}`)})}function Eq($){let{schema:v,opts:D,gen:X}=$;NL($,()=>{if(D.$comment&&v.$comment)jL($);if(uq($),X.let(i.default.vErrors,null),X.let(i.default.errors,0),D.unevaluated)Tq($);FL($),_q($)});return}function Tq($){let{gen:v,validateName:D}=$;$.evaluated=v.const("evaluated",C._`${D}.evaluated`),v.if(C._`${$.evaluated}.dynamicProps`,()=>v.assign(C._`${$.evaluated}.props`,C._`undefined`)),v.if(C._`${$.evaluated}.dynamicItems`,()=>v.assign(C._`${$.evaluated}.items`,C._`undefined`))}function VL($,v){let D=typeof $=="object"&&$[v.schemaId];return D&&(v.code.source||v.code.process)?C._`/*# sourceURL=${D} */`:C.nil}function Rq($,v){if(OL($)){if(HL($),ZL($)){gq($,v);return}}(0,BL.boolOrEmptySchema)($,v)}function ZL({schema:$,self:v}){if(typeof $=="boolean")return!$;for(let D in $)if(v.RULES.all[D])return!0;return!1}function OL($){return typeof $.schema!="boolean"}function gq($,v){let{schema:D,gen:X,opts:U}=$;if(U.$comment&&D.$comment)jL($);xq($),fq($);let G=X.const("_errs",i.default.errors);FL($,G),X.var(v,C._`${G} === ${i.default.errors}`)}function HL($){(0,c4.checkUnknownRules)($),Cq($)}function FL($,v){if($.opts.jtd)return KL($,[],!1,v);let D=(0,IL.getSchemaTypes)($.schema),X=(0,IL.coerceAndCheckDataType)($,D);KL($,D,!X,v)}function Cq($){let{schema:v,errSchemaPath:D,opts:X,self:U}=$;if(v.$ref&&X.ignoreKeywordsWithRef&&(0,c4.schemaHasRulesButRef)(v,U.RULES))U.logger.warn(`$ref: keywords ignored in schema at path "${D}"`)}function uq($){let{schema:v,opts:D}=$;if(v.default!==void 0&&D.useDefaults&&D.strictSchema)(0,c4.checkStrictMode)($,"default is ignored in the schema root")}function xq($){let v=$.schema[$.opts.schemaId];if(v)$.baseId=(0,bq.resolveUrl)($.opts.uriResolver,$.baseId,v)}function fq($){if($.schema.$async&&!$.schemaEnv.$async)throw Error("async schema in sync schema")}function jL({gen:$,schemaEnv:v,schema:D,errSchemaPath:X,opts:U}){let G=D.$comment;if(U.$comment===!0)$.code(C._`${i.default.self}.logger.log(${G})`);else if(typeof U.$comment=="function"){let J=C.str`${X}/$comment`,Q=$.scopeValue("root",{ref:v.root});$.code(C._`${i.default.self}.opts.$comment(${G}, ${J}, ${Q}.schema)`)}}function _q($){let{gen:v,schemaEnv:D,validateName:X,ValidationError:U,opts:G}=$;if(D.$async)v.if(C._`${i.default.errors} === 0`,()=>v.return(i.default.data),()=>v.throw(C._`new ${U}(${i.default.vErrors})`));else{if(v.assign(C._`${X}.errors`,i.default.vErrors),G.unevaluated)iq($);v.return(C._`${i.default.errors} === 0`)}}function iq({gen:$,evaluated:v,props:D,items:X}){if(D instanceof C.Name)$.assign(C._`${v}.props`,D);if(X instanceof C.Name)$.assign(C._`${v}.items`,X)}function KL($,v,D,X){let{gen:U,schema:G,data:J,allErrors:Q,opts:W,self:z}=$,{RULES:Y}=z;if(G.$ref&&(W.ignoreKeywordsWithRef||!(0,c4.schemaHasRulesButRef)(G,Y))){U.block(()=>wL($,"$ref",Y.all.$ref.definition));return}if(!W.jtd)yq($,v);U.block(()=>{for(let V of Y.rules)I(V);I(Y.post)});function I(V){if(!(0,U5.shouldUseGroup)(G,V))return;if(V.type){if(U.if((0,UX.checkDataType)(V.type,J,W.strictNumbers)),LL($,V),v.length===1&&v[0]===V.type&&D)U.else(),(0,UX.reportTypeError)($);U.endIf()}else LL($,V);if(!Q)U.if(C._`${i.default.errors} === ${X||0}`)}}function LL($,v){let{gen:D,schema:X,opts:{useDefaults:U}}=$;if(U)(0,Pq.assignDefaults)($,v.type);D.block(()=>{for(let G of v.rules)if((0,U5.shouldUseRule)(X,G))wL($,G.keyword,G.definition,v.type)})}function yq($,v){if($.schemaEnv.meta||!$.opts.strictTypes)return;if(nq($,v),!$.opts.allowUnionTypes)lq($,v);hq($,$.dataTypes)}function nq($,v){if(!v.length)return;if(!$.dataTypes.length){$.dataTypes=v;return}v.forEach((D)=>{if(!AL($.dataTypes,D))D5($,`type "${D}" not allowed by context "${$.dataTypes.join(",")}"`)}),cq($,v)}function lq($,v){if(v.length>1&&!(v.length===2&&v.includes("null")))D5($,"use allowUnionTypes to allow union type keyword")}function hq($,v){let D=$.self.RULES.all;for(let X in D){let U=D[X];if(typeof U=="object"&&(0,U5.shouldUseRule)($.schema,U)){let{type:G}=U.definition;if(G.length&&!G.some((J)=>mq(v,J)))D5($,`missing type "${G.join(",")}" for keyword "${X}"`)}}}function mq($,v){return $.includes(v)||v==="number"&&$.includes("integer")}function AL($,v){return $.includes(v)||v==="integer"&&$.includes("number")}function cq($,v){let D=[];for(let X of $.dataTypes)if(AL(v,X))D.push(X);else if(v.includes("integer")&&X==="number")D.push("integer");$.dataTypes=D}function D5($,v){let D=$.schemaEnv.baseId+$.errSchemaPath;v+=` at "${D}" (strictTypes)`,(0,c4.checkStrictMode)($,v,$.opts.strictTypes)}class X5{constructor($,v,D){if((0,J0.validateKeywordUsage)($,v,D),this.gen=$.gen,this.allErrors=$.allErrors,this.keyword=D,this.data=$.data,this.schema=$.schema[D],this.$data=v.$data&&$.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,c4.schemaRefOrVal)($,this.schema,D,this.$data),this.schemaType=v.schemaType,this.parentSchema=$.schema,this.params={},this.it=$,this.def=v,this.$data)this.schemaCode=$.gen.const("vSchema",ML(this.$data,$));else if(this.schemaCode=this.schemaValue,!(0,J0.validSchemaType)(this.schema,v.schemaType,v.allowUndefined))throw Error(`${D} value must be ${JSON.stringify(v.schemaType)}`);if("code"in v?v.trackErrors:v.errors!==!1)this.errsCount=$.gen.const("_errs",i.default.errors)}result($,v,D){this.failResult((0,C.not)($),v,D)}failResult($,v,D){if(this.gen.if($),D)D();else this.error();if(v){if(this.gen.else(),v(),this.allErrors)this.gen.endIf()}else if(this.allErrors)this.gen.endIf();else this.gen.else()}pass($,v){this.failResult((0,C.not)($),void 0,v)}fail($){if($===void 0){if(this.error(),!this.allErrors)this.gen.if(!1);return}if(this.gen.if($),this.error(),this.allErrors)this.gen.endIf();else this.gen.else()}fail$data($){if(!this.$data)return this.fail($);let{schemaCode:v}=this;this.fail(C._`${v} !== undefined && (${(0,C.or)(this.invalid$data(),$)})`)}error($,v,D){if(v){this.setParams(v),this._error($,D),this.setParams({});return}this._error($,D)}_error($,v){($?G0.reportExtraError:G0.reportError)(this,this.def.error,v)}$dataError(){(0,G0.reportError)(this,this.def.$dataError||G0.keyword$DataError)}reset(){if(this.errsCount===void 0)throw Error('add "trackErrors" to keyword definition');(0,G0.resetErrorsCount)(this.gen,this.errsCount)}ok($){if(!this.allErrors)this.gen.if($)}setParams($,v){if(v)Object.assign(this.params,$);else this.params=$}block$data($,v,D=C.nil){this.gen.block(()=>{this.check$data($,D),v()})}check$data($=C.nil,v=C.nil){if(!this.$data)return;let{gen:D,schemaCode:X,schemaType:U,def:G}=this;if(D.if((0,C.or)(C._`${X} === undefined`,v)),$!==C.nil)D.assign($,!0);if(U.length||G.validateSchema){if(D.elseIf(this.invalid$data()),this.$dataError(),$!==C.nil)D.assign($,!1)}D.else()}invalid$data(){let{gen:$,schemaCode:v,schemaType:D,def:X,it:U}=this;return(0,C.or)(G(),J());function G(){if(D.length){if(!(v instanceof C.Name))throw Error("ajv implementation error");let Q=Array.isArray(D)?D:[D];return C._`${(0,UX.checkDataTypes)(Q,v,U.opts.strictNumbers,UX.DataType.Wrong)}`}return C.nil}function J(){if(X.validateSchema){let Q=$.scopeValue("validate$data",{ref:X.validateSchema});return C._`!${Q}(${v})`}return C.nil}}subschema($,v){let D=(0,v5.getSubschema)(this.it,$);(0,v5.extendSubschemaData)(D,this.it,$),(0,v5.extendSubschemaMode)(D,$);let X={...this.it,...D,items:void 0,props:void 0};return Rq(X,v),X}mergeEvaluated($,v){let{it:D,gen:X}=this;if(!D.opts.unevaluated)return;if(D.props!==!0&&$.props!==void 0)D.props=c4.mergeEvaluated.props(X,$.props,D.props,v);if(D.items!==!0&&$.items!==void 0)D.items=c4.mergeEvaluated.items(X,$.items,D.items,v)}mergeValidEvaluated($,v){let{it:D,gen:X}=this;if(D.opts.unevaluated&&(D.props!==!0||D.items!==!0))return X.if(v,()=>this.mergeEvaluated($,C.Name)),!0}}PL.KeywordCxt=X5;function wL($,v,D,X){let U=new X5($,D,v);if("code"in D)D.code(U,X);else if(U.$data&&D.validate)(0,J0.funcKeywordCode)(U,D);else if("macro"in D)(0,J0.macroKeywordCode)(U,D);else if(D.compile||D.validate)(0,J0.funcKeywordCode)(U,D)}var dq=/^\/(?:[^~]|~0|~1)*$/,rq=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function ML($,{dataLevel:v,dataNames:D,dataPathArr:X}){let U,G;if($==="")return i.default.rootData;if($[0]==="/"){if(!dq.test($))throw Error(`Invalid JSON-pointer: ${$}`);U=$,G=i.default.rootData}else{let z=rq.exec($);if(!z)throw Error(`Invalid JSON-pointer: ${$}`);let Y=+z[1];if(U=z[2],U==="#"){if(Y>=v)throw Error(W("property/index",Y));return X[v-Y]}if(Y>v)throw Error(W("data",Y));if(G=D[v-Y],!U)return G}let J=G,Q=U.split("/");for(let z of Q)if(z)G=C._`${G}${(0,C.getProperty)((0,c4.unescapeJsonPointer)(z))}`,J=C._`${J} && ${G}`;return J;function W(z,Y){return`Cannot access ${z} ${Y} levels up, current level is ${v}`}}PL.getData=ML});var DX=b((SL)=>{Object.defineProperty(SL,"__esModule",{value:!0});class qL extends Error{constructor($){super("validation failed");this.errors=$,this.ajv=this.validation=!0}}SL.default=qL});var W0=b((EL)=>{Object.defineProperty(EL,"__esModule",{value:!0});var G5=X0();class kL extends Error{constructor($,v,D,X){super(X||`can't resolve reference ${D} from id ${v}`);this.missingRef=(0,G5.resolveUrl)($,v,D),this.missingSchema=(0,G5.normalizeId)((0,G5.getFullPath)($,this.missingRef))}}EL.default=kL});var GX=b((gL)=>{Object.defineProperty(gL,"__esModule",{value:!0});gL.resolveSchema=gL.getCompilingSchema=gL.resolveRef=gL.compileSchema=gL.SchemaEnv=void 0;var L4=h(),eq=DX(),T6=m4(),B4=X0(),TL=r(),sq=Q0();class z0{constructor($){var v;this.refs={},this.dynamicAnchors={};let D;if(typeof $.schema=="object")D=$.schema;this.schema=$.schema,this.schemaId=$.schemaId,this.root=$.root||this,this.baseId=(v=$.baseId)!==null&&v!==void 0?v:(0,B4.normalizeId)(D===null||D===void 0?void 0:D[$.schemaId||"$id"]),this.schemaPath=$.schemaPath,this.localRefs=$.localRefs,this.meta=$.meta,this.$async=D===null||D===void 0?void 0:D.$async,this.refs={}}}gL.SchemaEnv=z0;function Q5($){let v=RL.call(this,$);if(v)return v;let D=(0,B4.getFullPath)(this.opts.uriResolver,$.root.baseId),{es5:X,lines:U}=this.opts.code,{ownProperties:G}=this.opts,J=new L4.CodeGen(this.scope,{es5:X,lines:U,ownProperties:G}),Q;if($.$async)Q=J.scopeValue("Error",{ref:eq.default,code:L4._`require("ajv/dist/runtime/validation_error").default`});let W=J.scopeName("validate");$.validateName=W;let z={gen:J,allErrors:this.opts.allErrors,data:T6.default.data,parentData:T6.default.parentData,parentDataProperty:T6.default.parentDataProperty,dataNames:[T6.default.data],dataPathArr:[L4.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:J.scopeValue("schema",this.opts.code.source===!0?{ref:$.schema,code:(0,L4.stringify)($.schema)}:{ref:$.schema}),validateName:W,ValidationError:Q,schema:$.schema,schemaEnv:$,rootId:D,baseId:$.baseId||D,schemaPath:L4.nil,errSchemaPath:$.schemaPath||(this.opts.jtd?"":"#"),errorPath:L4._`""`,opts:this.opts,self:this},Y;try{this._compilations.add($),(0,sq.validateFunctionCode)(z),J.optimize(this.opts.code.optimize);let I=J.toString();if(Y=`${J.scopeRefs(T6.default.scope)}return ${I}`,this.opts.code.process)Y=this.opts.code.process(Y,$);let K=Function(`${T6.default.self}`,`${T6.default.scope}`,Y)(this,this.scope.get());if(this.scope.value(W,{ref:K}),K.errors=null,K.schema=$.schema,K.schemaEnv=$,$.$async)K.$async=!0;if(this.opts.code.source===!0)K.source={validateName:W,validateCode:I,scopeValues:J._values};if(this.opts.unevaluated){let{props:L,items:N}=z;if(K.evaluated={props:L instanceof L4.Name?void 0:L,items:N instanceof L4.Name?void 0:N,dynamicProps:L instanceof L4.Name,dynamicItems:N instanceof L4.Name},K.source)K.source.evaluated=(0,L4.stringify)(K.evaluated)}return $.validate=K,$}catch(I){if(delete $.validate,delete $.validateName,Y)this.logger.error("Error compiling schema, function code:",Y);throw I}finally{this._compilations.delete($)}}gL.compileSchema=Q5;function $S($,v,D){var X;D=(0,B4.resolveUrl)(this.opts.uriResolver,v,D);let U=$.refs[D];if(U)return U;let G=DS.call(this,$,D);if(G===void 0){let J=(X=$.localRefs)===null||X===void 0?void 0:X[D],{schemaId:Q}=this.opts;if(J)G=new z0({schema:J,schemaId:Q,root:$,baseId:v})}if(G===void 0)return;return $.refs[D]=vS.call(this,G)}gL.resolveRef=$S;function vS($){if((0,B4.inlineRef)($.schema,this.opts.inlineRefs))return $.schema;return $.validate?$:Q5.call(this,$)}function RL($){for(let v of this._compilations)if(US(v,$))return v}gL.getCompilingSchema=RL;function US($,v){return $.schema===v.schema&&$.root===v.root&&$.baseId===v.baseId}function DS($,v){let D;while(typeof(D=this.refs[v])=="string")v=D;return D||this.schemas[v]||XX.call(this,$,v)}function XX($,v){let D=this.opts.uriResolver.parse(v),X=(0,B4._getFullPath)(this.opts.uriResolver,D),U=(0,B4.getFullPath)(this.opts.uriResolver,$.baseId,void 0);if(Object.keys($.schema).length>0&&X===U)return J5.call(this,D,$);let G=(0,B4.normalizeId)(X),J=this.refs[G]||this.schemas[G];if(typeof J=="string"){let Q=XX.call(this,$,J);if(typeof(Q===null||Q===void 0?void 0:Q.schema)!=="object")return;return J5.call(this,D,Q)}if(typeof(J===null||J===void 0?void 0:J.schema)!=="object")return;if(!J.validate)Q5.call(this,J);if(G===(0,B4.normalizeId)(v)){let{schema:Q}=J,{schemaId:W}=this.opts,z=Q[W];if(z)U=(0,B4.resolveUrl)(this.opts.uriResolver,U,z);return new z0({schema:Q,schemaId:W,root:$,baseId:U})}return J5.call(this,D,J)}gL.resolveSchema=XX;var XS=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function J5($,{baseId:v,schema:D,root:X}){var U;if(((U=$.fragment)===null||U===void 0?void 0:U[0])!=="/")return;for(let Q of $.fragment.slice(1).split("/")){if(typeof D==="boolean")return;let W=D[(0,TL.unescapeFragment)(Q)];if(W===void 0)return;D=W;let z=typeof D==="object"&&D[this.opts.schemaId];if(!XS.has(Q)&&z)v=(0,B4.resolveUrl)(this.opts.uriResolver,v,z)}let G;if(typeof D!="boolean"&&D.$ref&&!(0,TL.schemaHasRulesButRef)(D,this.RULES)){let Q=(0,B4.resolveUrl)(this.opts.uriResolver,v,D.$ref);G=XX.call(this,X,Q)}let{schemaId:J}=this.opts;if(G=G||new z0({schema:D,schemaId:J,root:X,baseId:v}),G.schema!==G.root.schema)return G;return}});var uL=b((Sd,zS)=>{zS.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 Y5=b((kd,nL)=>{var YS=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),fL=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),W5=RegExp.prototype.test.bind(/^[\da-f]{2}$/iu),_L=RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu),IS=RegExp.prototype.test.bind(/^[\da-z\-._~!$&'()*+,;=:@/]$/iu);function z5($){let v="",D=0,X=0;for(X=0;X<$.length;X++){if(D=$[X].charCodeAt(0),D===48)continue;if(!(D>=48&&D<=57||D>=65&&D<=70||D>=97&&D<=102))return"";v+=$[X];break}for(X+=1;X<$.length;X++){if(D=$[X].charCodeAt(0),!(D>=48&&D<=57||D>=65&&D<=70||D>=97&&D<=102))return"";v+=$[X]}return v}var VS=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function xL($){return $.length=0,!0}function KS($,v,D){if($.length){let X=z5($);if(X!=="")v.push(X);else return D.error=!0,!1;$.length=0}return!0}function LS($){let v=0,D={error:!1,address:"",zone:""},X=[],U=[],G=!1,J=!1,Q=KS;for(let W=0;W<$.length;W++){let z=$[W];if(z==="["||z==="]")continue;if(z===":"){if(G===!0)J=!0;if(!Q(U,X,D))break;if(++v>7){D.error=!0;break}if(W>0&&$[W-1]===":")G=!0;X.push(":");continue}else if(z==="%"){if(!Q(U,X,D))break;Q=xL}else{U.push(z);continue}}if(U.length)if(Q===xL)D.zone=U.join("");else if(J)X.push(U.join(""));else X.push(z5(U));return D.address=X.join(""),D}function iL($){if(BS($,":")<2)return{host:$,isIPV6:!1};let v=LS($);if(!v.error){let{address:D,address:X}=v;if(v.zone)D+="%"+v.zone,X+="%25"+v.zone;return{host:D,isIPV6:!0,escapedHost:X}}else return{host:$,isIPV6:!1}}function BS($,v){let D=0;for(let X=0;X<$.length;X++)if($[X]===v)D++;return D}function NS($){let v=$,D=[],X=-1,U=0;while(U=v.length){if(U===1)if(v===".")break;else if(v==="/"){D.push("/");break}else{D.push(v);break}else if(U===2){if(v[0]==="."){if(v[1]===".")break;else if(v[1]==="/"){v=v.slice(2);continue}}else if(v[0]==="/"){if(v[1]==="."||v[1]==="/"){D.push("/");break}}}else if(U===3){if(v==="/.."){if(D.length!==0)D.pop();D.push("/");break}}if(v[0]==="."){if(v[1]==="."){if(v[2]==="/"){v=v.slice(3);continue}}else if(v[1]==="/"){v=v.slice(2);continue}}else if(v[0]==="/"){if(v[1]==="."){if(v[2]==="/"){v=v.slice(2);continue}else if(v[2]==="."){if(v[3]==="/"){if(v=v.slice(3),D.length!==0)D.pop();continue}}}}if((X=v.indexOf("/",1))===-1){D.push(v);break}else D.push(v.slice(0,X)),v=v.slice(X)}return D.join("")}var ZS={"@":"%40","/":"%2F","?":"%3F","#":"%23",":":"%3A"},OS=/[@/?#:]/g,HS=/[@/?#]/g;function yL($,v){let D=v?HS:OS;return D.lastIndex=0,$.replace(D,(X)=>ZS[X])}function FS($,v=!1){if($.indexOf("%")===-1)return $;let D="";for(let X=0;X<$.length;X++){if($[X]==="%"&&X+2<$.length){let U=$.slice(X+1,X+3);if(W5(U)){let G=U.toUpperCase(),J=String.fromCharCode(parseInt(G,16));if(v&&_L(J))D+=J;else D+="%"+G;X+=2;continue}}D+=$[X]}return D}function jS($){let v="";for(let D=0;D<$.length;D++){if($[D]==="%"&&D+2<$.length){let X=$.slice(D+1,D+3);if(W5(X)){let U=X.toUpperCase(),G=String.fromCharCode(parseInt(U,16));if(G!=="."&&_L(G))v+=G;else v+="%"+U;D+=2;continue}}if(IS($[D]))v+=$[D];else v+=escape($[D])}return v}function AS($){let v="";for(let D=0;D<$.length;D++){if($[D]==="%"&&D+2<$.length){let X=$.slice(D+1,D+3);if(W5(X)){v+="%"+X.toUpperCase(),D+=2;continue}}v+=escape($[D])}return v}function wS($){let v=[];if($.userinfo!==void 0)v.push($.userinfo),v.push("@");if($.host!==void 0){let D=unescape($.host);if(!fL(D)){let X=iL(D);if(X.isIPV6===!0)D=`[${X.escapedHost}]`;else D=yL(D,!1)}v.push(D)}if(typeof $.port==="number"||typeof $.port==="string")v.push(":"),v.push(String($.port));return v.length?v.join(""):void 0}nL.exports={nonSimpleDomain:VS,recomposeAuthority:wS,reescapeHostDelimiters:yL,normalizePercentEncoding:FS,normalizePathEncoding:jS,escapePreservingEscapes:AS,removeDotSegments:NS,isIPv4:fL,isUUID:YS,normalizeIPv6:iL,stringArrayToHexStripped:z5}});var dL=b((Ed,cL)=>{var{isUUID:MS}=Y5(),PS=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,bS=["http","https","ws","wss","urn","urn:uuid"];function qS($){return bS.indexOf($)!==-1}function I5($){if($.secure===!0)return!0;else if($.secure===!1)return!1;else if($.scheme)return $.scheme.length===3&&($.scheme[0]==="w"||$.scheme[0]==="W")&&($.scheme[1]==="s"||$.scheme[1]==="S")&&($.scheme[2]==="s"||$.scheme[2]==="S");else return!1}function lL($){if(!$.host)$.error=$.error||"HTTP URIs must have a host.";return $}function hL($){let v=String($.scheme).toLowerCase()==="https";if($.port===(v?443:80)||$.port==="")$.port=void 0;if(!$.path)$.path="/";return $}function SS($){return $.secure=I5($),$.resourceName=($.path||"/")+($.query?"?"+$.query:""),$.path=void 0,$.query=void 0,$}function kS($){if($.port===(I5($)?443:80)||$.port==="")$.port=void 0;if(typeof $.secure==="boolean")$.scheme=$.secure?"wss":"ws",$.secure=void 0;if($.resourceName){let[v,D]=$.resourceName.split("?");$.path=v&&v!=="/"?v:void 0,$.query=D,$.resourceName=void 0}return $.fragment=void 0,$}function ES($,v){if(!$.path)return $.error="URN can not be parsed",$;let D=$.path.match(PS);if(D){let X=v.scheme||$.scheme||"urn";$.nid=D[1].toLowerCase(),$.nss=D[2];let U=`${X}:${v.nid||$.nid}`,G=V5(U);if($.path=void 0,G)$=G.parse($,v)}else $.error=$.error||"URN can not be parsed.";return $}function TS($,v){if($.nid===void 0)throw Error("URN without nid cannot be serialized");let D=v.scheme||$.scheme||"urn",X=$.nid.toLowerCase(),U=`${D}:${v.nid||X}`,G=V5(U);if(G)$=G.serialize($,v);let J=$,Q=$.nss;return J.path=`${X||v.nid}:${Q}`,v.skipEscape=!0,J}function RS($,v){let D=$;if(D.uuid=D.nss,D.nss=void 0,!v.tolerant&&(!D.uuid||!MS(D.uuid)))D.error=D.error||"UUID is not valid.";return D}function gS($){let v=$;return v.nss=($.uuid||"").toLowerCase(),v}var mL={scheme:"http",domainHost:!0,parse:lL,serialize:hL},CS={scheme:"https",domainHost:mL.domainHost,parse:lL,serialize:hL},JX={scheme:"ws",domainHost:!0,parse:SS,serialize:kS},uS={scheme:"wss",domainHost:JX.domainHost,parse:JX.parse,serialize:JX.serialize},xS={scheme:"urn",parse:ES,serialize:TS,skipNormalize:!0},fS={scheme:"urn:uuid",parse:RS,serialize:gS,skipNormalize:!0},QX={http:mL,https:CS,ws:JX,wss:uS,urn:xS,"urn:uuid":fS};Object.setPrototypeOf(QX,null);function V5($){return $&&(QX[$]||QX[$.toLowerCase()])||void 0}cL.exports={wsIsSecure:I5,SCHEMES:QX,isValidSchemeName:qS,getSchemeHandler:V5}});var eL=b((Td,WX)=>{var{normalizeIPv6:_S,removeDotSegments:Y0,recomposeAuthority:iS,normalizePercentEncoding:yS,normalizePathEncoding:nS,escapePreservingEscapes:lS,reescapeHostDelimiters:hS,isIPv4:mS,nonSimpleDomain:cS}=Y5(),{SCHEMES:dS,getSchemeHandler:pL}=dL();function rS($,v){if(typeof $==="string")$=eS($,v);else if(typeof $==="object")$=E1(R6($,v),v);return $}function pS($,v,D){let X=D?Object.assign({scheme:"null"},D):{scheme:"null"},U=tL(E1($,X),E1(v,X),X,!0);return X.skipEscape=!0,R6(U,X)}function tL($,v,D,X){let U={};if(!X)$=E1(R6($,D),D),v=E1(R6(v,D),D);if(D=D||{},!D.tolerant&&v.scheme)U.scheme=v.scheme,U.userinfo=v.userinfo,U.host=v.host,U.port=v.port,U.path=Y0(v.path||""),U.query=v.query;else{if(v.userinfo!==void 0||v.host!==void 0||v.port!==void 0)U.userinfo=v.userinfo,U.host=v.host,U.port=v.port,U.path=Y0(v.path||""),U.query=v.query;else{if(!v.path)if(U.path=$.path,v.query!==void 0)U.query=v.query;else U.query=$.query;else{if(v.path[0]==="/")U.path=Y0(v.path);else{if(($.userinfo!==void 0||$.host!==void 0||$.port!==void 0)&&!$.path)U.path="/"+v.path;else if(!$.path)U.path=v.path;else U.path=$.path.slice(0,$.path.lastIndexOf("/")+1)+v.path;U.path=Y0(U.path)}U.query=v.query}U.userinfo=$.userinfo,U.host=$.host,U.port=$.port}U.scheme=$.scheme}return U.fragment=v.fragment,U}function tS($,v,D){let X=rL($,D),U=rL(v,D);return X!==void 0&&U!==void 0&&X.toLowerCase()===U.toLowerCase()}function R6($,v){let D={host:$.host,scheme:$.scheme,userinfo:$.userinfo,port:$.port,path:$.path,query:$.query,nid:$.nid,nss:$.nss,uuid:$.uuid,fragment:$.fragment,reference:$.reference,resourceName:$.resourceName,secure:$.secure,error:""},X=Object.assign({},v),U=[],G=pL(X.scheme||D.scheme);if(G&&G.serialize)G.serialize(D,X);if(D.path!==void 0)if(!X.skipEscape){if(D.path=lS(D.path),D.scheme!==void 0)D.path=D.path.split("%3A").join(":")}else D.path=yS(D.path);if(X.reference!=="suffix"&&D.scheme)U.push(D.scheme,":");let J=iS(D);if(J!==void 0){if(X.reference!=="suffix")U.push("//");if(U.push(J),D.path&&D.path[0]!=="/")U.push("/")}if(D.path!==void 0){let Q=D.path;if(!X.absolutePath&&(!G||!G.absolutePath))Q=Y0(Q);if(J===void 0&&Q[0]==="/"&&Q[1]==="/")Q="/%2F"+Q.slice(2);U.push(Q)}if(D.query!==void 0)U.push("?",D.query);if(D.fragment!==void 0)U.push("#",D.fragment);return U.join("")}var oS=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function aS($,v){if(v[2]!==void 0&&$.path&&$.path[0]!=="/")return'URI path must start with "/" when authority is present.';if(typeof $.port==="number"&&($.port<0||$.port>65535))return"URI port is malformed.";return}function oL($,v){let D=Object.assign({},v),X={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},U=!1,G=!1;if(D.reference==="suffix")if(D.scheme)$=D.scheme+":"+$;else $="//"+$;let J=$.match(oS);if(J){if(X.scheme=J[1],X.userinfo=J[3],X.host=J[4],X.port=parseInt(J[5],10),X.path=J[6]||"",X.query=J[7],X.fragment=J[8],isNaN(X.port))X.port=J[5];let Q=aS(X,J);if(Q!==void 0)X.error=X.error||Q,U=!0;if(X.host)if(mS(X.host)===!1){let Y=_S(X.host);X.host=Y.host.toLowerCase(),G=Y.isIPV6}else G=!0;if(X.scheme===void 0&&X.userinfo===void 0&&X.host===void 0&&X.port===void 0&&X.query===void 0&&!X.path)X.reference="same-document";else if(X.scheme===void 0)X.reference="relative";else if(X.fragment===void 0)X.reference="absolute";else X.reference="uri";if(D.reference&&D.reference!=="suffix"&&D.reference!==X.reference)X.error=X.error||"URI is not a "+D.reference+" reference.";let W=pL(D.scheme||X.scheme);if(!D.unicodeSupport&&(!W||!W.unicodeSupport)){if(X.host&&(D.domainHost||W&&W.domainHost)&&G===!1&&cS(X.host))try{X.host=URL.domainToASCII(X.host.toLowerCase())}catch(z){X.error=X.error||"Host's domain name can not be converted to ASCII: "+z}}if(!W||W&&!W.skipNormalize){if($.indexOf("%")!==-1){if(X.scheme!==void 0)X.scheme=unescape(X.scheme);if(X.host!==void 0)X.host=hS(unescape(X.host),G)}if(X.path)X.path=nS(X.path);if(X.fragment)try{X.fragment=encodeURI(decodeURIComponent(X.fragment))}catch{X.error=X.error||"URI malformed"}}if(W&&W.parse)W.parse(X,D)}else X.error=X.error||"URI can not be parsed.";return{parsed:X,malformedAuthorityOrPort:U}}function E1($,v){return oL($,v).parsed}function eS($,v){return aL($,v).normalized}function aL($,v){let{parsed:D,malformedAuthorityOrPort:X}=oL($,v);return{normalized:X?$:R6(D,v),malformedAuthorityOrPort:X}}function rL($,v){if(typeof $==="string"){let{normalized:D,malformedAuthorityOrPort:X}=aL($,v);return X?void 0:D}if(typeof $==="object")return R6($,v)}var K5={SCHEMES:dS,normalize:rS,resolve:pS,resolveComponent:tL,equal:tS,serialize:R6,parse:E1};WX.exports=K5;WX.exports.default=K5;WX.exports.fastUri=K5});var vB=b(($B)=>{Object.defineProperty($B,"__esModule",{value:!0});var sL=eL();sL.code='require("ajv/dist/runtime/uri").default';$B.default=sL});var zB=b((d4)=>{Object.defineProperty(d4,"__esModule",{value:!0});d4.CodeGen=d4.Name=d4.nil=d4.stringify=d4.str=d4._=d4.KeywordCxt=void 0;var $k=Q0();Object.defineProperty(d4,"KeywordCxt",{enumerable:!0,get:function(){return $k.KeywordCxt}});var T1=h();Object.defineProperty(d4,"_",{enumerable:!0,get:function(){return T1._}});Object.defineProperty(d4,"str",{enumerable:!0,get:function(){return T1.str}});Object.defineProperty(d4,"stringify",{enumerable:!0,get:function(){return T1.stringify}});Object.defineProperty(d4,"nil",{enumerable:!0,get:function(){return T1.nil}});Object.defineProperty(d4,"Name",{enumerable:!0,get:function(){return T1.Name}});Object.defineProperty(d4,"CodeGen",{enumerable:!0,get:function(){return T1.CodeGen}});var vk=DX(),JB=W0(),Uk=cz(),I0=GX(),Dk=h(),V0=X0(),zX=D0(),B5=r(),UB=uL(),Xk=vB(),QB=($,v)=>new RegExp($,v);QB.code="new RegExp";var Gk=["removeAdditional","useDefaults","coerceTypes"],Jk=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),Qk={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."},Wk={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},DB=200;function zk($){var v,D,X,U,G,J,Q,W,z,Y,I,V,K,L,N,Z,F,S,g,u,k,N$,j$,g4,Q4;let y$=$.strict,h1=(v=$.code)===null||v===void 0?void 0:v.optimize,m1=h1===!0||h1===void 0?1:h1||0,c1=(X=(D=$.code)===null||D===void 0?void 0:D.regExp)!==null&&X!==void 0?X:QB,q0=(U=$.uriResolver)!==null&&U!==void 0?U:Xk.default;return{strictSchema:(J=(G=$.strictSchema)!==null&&G!==void 0?G:y$)!==null&&J!==void 0?J:!0,strictNumbers:(W=(Q=$.strictNumbers)!==null&&Q!==void 0?Q:y$)!==null&&W!==void 0?W:!0,strictTypes:(Y=(z=$.strictTypes)!==null&&z!==void 0?z:y$)!==null&&Y!==void 0?Y:"log",strictTuples:(V=(I=$.strictTuples)!==null&&I!==void 0?I:y$)!==null&&V!==void 0?V:"log",strictRequired:(L=(K=$.strictRequired)!==null&&K!==void 0?K:y$)!==null&&L!==void 0?L:!1,code:$.code?{...$.code,optimize:m1,regExp:c1}:{optimize:m1,regExp:c1},loopRequired:(N=$.loopRequired)!==null&&N!==void 0?N:DB,loopEnum:(Z=$.loopEnum)!==null&&Z!==void 0?Z:DB,meta:(F=$.meta)!==null&&F!==void 0?F:!0,messages:(S=$.messages)!==null&&S!==void 0?S:!0,inlineRefs:(g=$.inlineRefs)!==null&&g!==void 0?g:!0,schemaId:(u=$.schemaId)!==null&&u!==void 0?u:"$id",addUsedSchema:(k=$.addUsedSchema)!==null&&k!==void 0?k:!0,validateSchema:(N$=$.validateSchema)!==null&&N$!==void 0?N$:!0,validateFormats:(j$=$.validateFormats)!==null&&j$!==void 0?j$:!0,unicodeRegExp:(g4=$.unicodeRegExp)!==null&&g4!==void 0?g4:!0,int32range:(Q4=$.int32range)!==null&&Q4!==void 0?Q4:!0,uriResolver:q0}}class YX{constructor($={}){this.schemas={},this.refs={},this.formats=Object.create(null),this._compilations=new Set,this._loading={},this._cache=new Map,$=this.opts={...$,...zk($)};let{es5:v,lines:D}=this.opts.code;this.scope=new Dk.ValueScope({scope:{},prefixes:Jk,es5:v,lines:D}),this.logger=Bk($.logger);let X=$.validateFormats;if($.validateFormats=!1,this.RULES=(0,Uk.getRules)(),XB.call(this,Qk,$,"NOT SUPPORTED"),XB.call(this,Wk,$,"DEPRECATED","warn"),this._metaOpts=Kk.call(this),$.formats)Ik.call(this);if(this._addVocabularies(),this._addDefaultMetaSchema(),$.keywords)Vk.call(this,$.keywords);if(typeof $.meta=="object")this.addMetaSchema($.meta);Yk.call(this),$.validateFormats=X}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:$,meta:v,schemaId:D}=this.opts,X=UB;if(D==="id")X={...UB},X.id=X.$id,delete X.$id;if(v&&$)this.addMetaSchema(X,X[D],!1)}defaultMeta(){let{meta:$,schemaId:v}=this.opts;return this.opts.defaultMeta=typeof $=="object"?$[v]||$:void 0}validate($,v){let D;if(typeof $=="string"){if(D=this.getSchema($),!D)throw Error(`no schema with key or ref "${$}"`)}else D=this.compile($);let X=D(v);if(!("$async"in D))this.errors=D.errors;return X}compile($,v){let D=this._addSchema($,v);return D.validate||this._compileSchemaEnv(D)}compileAsync($,v){if(typeof this.opts.loadSchema!="function")throw Error("options.loadSchema should be a function");let{loadSchema:D}=this.opts;return X.call(this,$,v);async function X(z,Y){await U.call(this,z.$schema);let I=this._addSchema(z,Y);return I.validate||G.call(this,I)}async function U(z){if(z&&!this.getSchema(z))await X.call(this,{$ref:z},!0)}async function G(z){try{return this._compileSchemaEnv(z)}catch(Y){if(!(Y instanceof JB.default))throw Y;return J.call(this,Y),await Q.call(this,Y.missingSchema),G.call(this,z)}}function J({missingSchema:z,missingRef:Y}){if(this.refs[z])throw Error(`AnySchema ${z} is loaded but ${Y} cannot be resolved`)}async function Q(z){let Y=await W.call(this,z);if(!this.refs[z])await U.call(this,Y.$schema);if(!this.refs[z])this.addSchema(Y,z,v)}async function W(z){let Y=this._loading[z];if(Y)return Y;try{return await(this._loading[z]=D(z))}finally{delete this._loading[z]}}}addSchema($,v,D,X=this.opts.validateSchema){if(Array.isArray($)){for(let G of $)this.addSchema(G,void 0,D,X);return this}let U;if(typeof $==="object"){let{schemaId:G}=this.opts;if(U=$[G],U!==void 0&&typeof U!="string")throw Error(`schema ${G} must be string`)}return v=(0,V0.normalizeId)(v||U),this._checkUnique(v),this.schemas[v]=this._addSchema($,D,v,X,!0),this}addMetaSchema($,v,D=this.opts.validateSchema){return this.addSchema($,v,!0,D),this}validateSchema($,v){if(typeof $=="boolean")return!0;let D;if(D=$.$schema,D!==void 0&&typeof D!="string")throw Error("$schema must be a string");if(D=D||this.opts.defaultMeta||this.defaultMeta(),!D)return this.logger.warn("meta-schema not available"),this.errors=null,!0;let X=this.validate(D,$);if(!X&&v){let U="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(U);else throw Error(U)}return X}getSchema($){let v;while(typeof(v=GB.call(this,$))=="string")$=v;if(v===void 0){let{schemaId:D}=this.opts,X=new I0.SchemaEnv({schema:{},schemaId:D});if(v=I0.resolveSchema.call(this,X,$),!v)return;this.refs[$]=v}return v.validate||this._compileSchemaEnv(v)}removeSchema($){if($ instanceof RegExp)return this._removeAllSchemas(this.schemas,$),this._removeAllSchemas(this.refs,$),this;switch(typeof $){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{let v=GB.call(this,$);if(typeof v=="object")this._cache.delete(v.schema);return delete this.schemas[$],delete this.refs[$],this}case"object":{let v=$;this._cache.delete(v);let D=$[this.opts.schemaId];if(D)D=(0,V0.normalizeId)(D),delete this.schemas[D],delete this.refs[D];return this}default:throw Error("ajv.removeSchema: invalid parameter")}}addVocabulary($){for(let v of $)this.addKeyword(v);return this}addKeyword($,v){let D;if(typeof $=="string"){if(D=$,typeof v=="object")this.logger.warn("these parameters are deprecated, see docs for addKeyword"),v.keyword=D}else if(typeof $=="object"&&v===void 0){if(v=$,D=v.keyword,Array.isArray(D)&&!D.length)throw Error("addKeywords: keyword must be string or non-empty array")}else throw Error("invalid addKeywords parameters");if(Zk.call(this,D,v),!v)return(0,B5.eachItem)(D,(U)=>L5.call(this,U)),this;Hk.call(this,v);let X={...v,type:(0,zX.getJSONTypes)(v.type),schemaType:(0,zX.getJSONTypes)(v.schemaType)};return(0,B5.eachItem)(D,X.type.length===0?(U)=>L5.call(this,U,X):(U)=>X.type.forEach((G)=>L5.call(this,U,X,G))),this}getKeyword($){let v=this.RULES.all[$];return typeof v=="object"?v.definition:!!v}removeKeyword($){let{RULES:v}=this;delete v.keywords[$],delete v.all[$];for(let D of v.rules){let X=D.rules.findIndex((U)=>U.keyword===$);if(X>=0)D.rules.splice(X,1)}return this}addFormat($,v){if(typeof v=="string")v=new RegExp(v);return this.formats[$]=v,this}errorsText($=this.errors,{separator:v=", ",dataVar:D="data"}={}){if(!$||$.length===0)return"No errors";return $.map((X)=>`${D}${X.instancePath} ${X.message}`).reduce((X,U)=>X+v+U)}$dataMetaSchema($,v){let D=this.RULES.all;$=JSON.parse(JSON.stringify($));for(let X of v){let U=X.split("/").slice(1),G=$;for(let J of U)G=G[J];for(let J in D){let Q=D[J];if(typeof Q!="object")continue;let{$data:W}=Q.definition,z=G[J];if(W&&z)G[J]=WB(z)}}return $}_removeAllSchemas($,v){for(let D in $){let X=$[D];if(!v||v.test(D)){if(typeof X=="string")delete $[D];else if(X&&!X.meta)this._cache.delete(X.schema),delete $[D]}}}_addSchema($,v,D,X=this.opts.validateSchema,U=this.opts.addUsedSchema){let G,{schemaId:J}=this.opts;if(typeof $=="object")G=$[J];else if(this.opts.jtd)throw Error("schema must be object");else if(typeof $!="boolean")throw Error("schema must be object or boolean");let Q=this._cache.get($);if(Q!==void 0)return Q;D=(0,V0.normalizeId)(G||D);let W=V0.getSchemaRefs.call(this,$,D);if(Q=new I0.SchemaEnv({schema:$,schemaId:J,meta:v,baseId:D,localRefs:W}),this._cache.set(Q.schema,Q),U&&!D.startsWith("#")){if(D)this._checkUnique(D);this.refs[D]=Q}if(X)this.validateSchema($,!0);return Q}_checkUnique($){if(this.schemas[$]||this.refs[$])throw Error(`schema with key or id "${$}" already exists`)}_compileSchemaEnv($){if($.meta)this._compileMetaSchema($);else I0.compileSchema.call(this,$);if(!$.validate)throw Error("ajv implementation error");return $.validate}_compileMetaSchema($){let v=this.opts;this.opts=this._metaOpts;try{I0.compileSchema.call(this,$)}finally{this.opts=v}}}YX.ValidationError=vk.default;YX.MissingRefError=JB.default;d4.default=YX;function XB($,v,D,X="error"){for(let U in $){let G=U;if(G in v)this.logger[X](`${D}: option ${U}. ${$[G]}`)}}function GB($){return $=(0,V0.normalizeId)($),this.schemas[$]||this.refs[$]}function Yk(){let $=this.opts.schemas;if(!$)return;if(Array.isArray($))this.addSchema($);else for(let v in $)this.addSchema($[v],v)}function Ik(){for(let $ in this.opts.formats){let v=this.opts.formats[$];if(v)this.addFormat($,v)}}function Vk($){if(Array.isArray($)){this.addVocabulary($);return}this.logger.warn("keywords option as map is deprecated, pass array");for(let v in $){let D=$[v];if(!D.keyword)D.keyword=v;this.addKeyword(D)}}function Kk(){let $={...this.opts};for(let v of Gk)delete $[v];return $}var Lk={log(){},warn(){},error(){}};function Bk($){if($===!1)return Lk;if($===void 0)return console;if($.log&&$.warn&&$.error)return $;throw Error("logger must implement log, warn and error methods")}var Nk=/^[a-z_$][a-z0-9_$:-]*$/i;function Zk($,v){let{RULES:D}=this;if((0,B5.eachItem)($,(X)=>{if(D.keywords[X])throw Error(`Keyword ${X} is already defined`);if(!Nk.test(X))throw Error(`Keyword ${X} has invalid name`)}),!v)return;if(v.$data&&!(("code"in v)||("validate"in v)))throw Error('$data keyword must have "code" or "validate" function')}function L5($,v,D){var X;let U=v===null||v===void 0?void 0:v.post;if(D&&U)throw Error('keyword with "post" flag cannot have "type"');let{RULES:G}=this,J=U?G.post:G.rules.find(({type:W})=>W===D);if(!J)J={type:D,rules:[]},G.rules.push(J);if(G.keywords[$]=!0,!v)return;let Q={keyword:$,definition:{...v,type:(0,zX.getJSONTypes)(v.type),schemaType:(0,zX.getJSONTypes)(v.schemaType)}};if(v.before)Ok.call(this,J,Q,v.before);else J.rules.push(Q);G.all[$]=Q,(X=v.implements)===null||X===void 0||X.forEach((W)=>this.addKeyword(W))}function Ok($,v,D){let X=$.rules.findIndex((U)=>U.keyword===D);if(X>=0)$.rules.splice(X,0,v);else $.rules.push(v),this.logger.warn(`rule ${D} is not defined`)}function Hk($){let{metaSchema:v}=$;if(v===void 0)return;if($.$data&&this.opts.$data)v=WB(v);$.validateSchema=this.compile(v,!0)}var Fk={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function WB($){return{anyOf:[$,Fk]}}});var IB=b((YB)=>{Object.defineProperty(YB,"__esModule",{value:!0});var wk={keyword:"id",code(){throw Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};YB.default=wk});var ZB=b((BB)=>{Object.defineProperty(BB,"__esModule",{value:!0});BB.callRef=BB.getValidate=void 0;var Pk=W0(),VB=X4(),d$=h(),R1=m4(),KB=GX(),IX=r(),bk={keyword:"$ref",schemaType:"string",code($){let{gen:v,schema:D,it:X}=$,{baseId:U,schemaEnv:G,validateName:J,opts:Q,self:W}=X,{root:z}=G;if((D==="#"||D==="#/")&&U===z.baseId)return I();let Y=KB.resolveRef.call(W,z,U,D);if(Y===void 0)throw new Pk.default(X.opts.uriResolver,U,D);if(Y instanceof KB.SchemaEnv)return V(Y);return K(Y);function I(){if(G===z)return VX($,J,G,G.$async);let L=v.scopeValue("root",{ref:z});return VX($,d$._`${L}.validate`,z,z.$async)}function V(L){let N=LB($,L);VX($,N,L,L.$async)}function K(L){let N=v.scopeValue("schema",Q.code.source===!0?{ref:L,code:(0,d$.stringify)(L)}:{ref:L}),Z=v.name("valid"),F=$.subschema({schema:L,dataTypes:[],schemaPath:d$.nil,topSchemaRef:N,errSchemaPath:D},Z);$.mergeEvaluated(F),$.ok(Z)}}};function LB($,v){let{gen:D}=$;return v.validate?D.scopeValue("validate",{ref:v.validate}):d$._`${D.scopeValue("wrapper",{ref:v})}.validate`}BB.getValidate=LB;function VX($,v,D,X){let{gen:U,it:G}=$,{allErrors:J,schemaEnv:Q,opts:W}=G,z=W.passContext?R1.default.this:d$.nil;if(X)Y();else I();function Y(){if(!Q.$async)throw Error("async schema referenced by sync schema");let L=U.let("valid");U.try(()=>{if(U.code(d$._`await ${(0,VB.callValidateCode)($,v,z)}`),K(v),!J)U.assign(L,!0)},(N)=>{if(U.if(d$._`!(${N} instanceof ${G.ValidationError})`,()=>U.throw(N)),V(N),!J)U.assign(L,!1)}),$.ok(L)}function I(){$.result((0,VB.callValidateCode)($,v,z),()=>K(v),()=>V(v))}function V(L){let N=d$._`${L}.errors`;U.assign(R1.default.vErrors,d$._`${R1.default.vErrors} === null ? ${N} : ${R1.default.vErrors}.concat(${N})`),U.assign(R1.default.errors,d$._`${R1.default.vErrors}.length`)}function K(L){var N;if(!G.opts.unevaluated)return;let Z=(N=D===null||D===void 0?void 0:D.validate)===null||N===void 0?void 0:N.evaluated;if(G.props!==!0)if(Z&&!Z.dynamicProps){if(Z.props!==void 0)G.props=IX.mergeEvaluated.props(U,Z.props,G.props)}else{let F=U.var("props",d$._`${L}.evaluated.props`);G.props=IX.mergeEvaluated.props(U,F,G.props,d$.Name)}if(G.items!==!0)if(Z&&!Z.dynamicItems){if(Z.items!==void 0)G.items=IX.mergeEvaluated.items(U,Z.items,G.items)}else{let F=U.var("items",d$._`${L}.evaluated.items`);G.items=IX.mergeEvaluated.items(U,F,G.items,d$.Name)}}}BB.callRef=VX;BB.default=bk});var HB=b((OB)=>{Object.defineProperty(OB,"__esModule",{value:!0});var kk=IB(),Ek=ZB(),Tk=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",kk.default,Ek.default];OB.default=Tk});var jB=b((FB)=>{Object.defineProperty(FB,"__esModule",{value:!0});var KX=h(),B6=KX.operators,LX={maximum:{okStr:"<=",ok:B6.LTE,fail:B6.GT},minimum:{okStr:">=",ok:B6.GTE,fail:B6.LT},exclusiveMaximum:{okStr:"<",ok:B6.LT,fail:B6.GTE},exclusiveMinimum:{okStr:">",ok:B6.GT,fail:B6.LTE}},gk={message:({keyword:$,schemaCode:v})=>KX.str`must be ${LX[$].okStr} ${v}`,params:({keyword:$,schemaCode:v})=>KX._`{comparison: ${LX[$].okStr}, limit: ${v}}`},Ck={keyword:Object.keys(LX),type:"number",schemaType:"number",$data:!0,error:gk,code($){let{keyword:v,data:D,schemaCode:X}=$;$.fail$data(KX._`${D} ${LX[v].fail} ${X} || isNaN(${D})`)}};FB.default=Ck});var wB=b((AB)=>{Object.defineProperty(AB,"__esModule",{value:!0});var K0=h(),xk={message:({schemaCode:$})=>K0.str`must be multiple of ${$}`,params:({schemaCode:$})=>K0._`{multipleOf: ${$}}`},fk={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:xk,code($){let{gen:v,data:D,schemaCode:X,it:U}=$,G=U.opts.multipleOfPrecision,J=v.let("res"),Q=G?K0._`Math.abs(Math.round(${J}) - ${J}) > 1e-${G}`:K0._`${J} !== parseInt(${J})`;$.fail$data(K0._`(${X} === 0 || (${J} = ${D}/${X}, ${Q}))`)}};AB.default=fk});var bB=b((PB)=>{Object.defineProperty(PB,"__esModule",{value:!0});function MB($){let v=$.length,D=0,X=0,U;while(X<v)if(D++,U=$.charCodeAt(X++),U>=55296&&U<=56319&&X<v){if(U=$.charCodeAt(X),(U&64512)===56320)X++}return D}PB.default=MB;MB.code='require("ajv/dist/runtime/ucs2length").default'});var SB=b((qB)=>{Object.defineProperty(qB,"__esModule",{value:!0});var g6=h(),yk=r(),nk=bB(),lk={message({keyword:$,schemaCode:v}){let D=$==="maxLength"?"more":"fewer";return g6.str`must NOT have ${D} than ${v} characters`},params:({schemaCode:$})=>g6._`{limit: ${$}}`},hk={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:lk,code($){let{keyword:v,data:D,schemaCode:X,it:U}=$,G=v==="maxLength"?g6.operators.GT:g6.operators.LT,J=U.opts.unicode===!1?g6._`${D}.length`:g6._`${(0,yk.useFunc)($.gen,nk.default)}(${D})`;$.fail$data(g6._`${J} ${G} ${X}`)}};qB.default=hk});var EB=b((kB)=>{Object.defineProperty(kB,"__esModule",{value:!0});var ck=X4(),dk=r(),g1=h(),rk={message:({schemaCode:$})=>g1.str`must match pattern "${$}"`,params:({schemaCode:$})=>g1._`{pattern: ${$}}`},pk={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:rk,code($){let{gen:v,data:D,$data:X,schema:U,schemaCode:G,it:J}=$,Q=J.opts.unicodeRegExp?"u":"";if(X){let{regExp:W}=J.opts.code,z=W.code==="new RegExp"?g1._`new RegExp`:(0,dk.useFunc)(v,W),Y=v.let("valid");v.try(()=>v.assign(Y,g1._`${z}(${G}, ${Q}).test(${D})`),()=>v.assign(Y,!1)),$.fail$data(g1._`!${Y}`)}else{let W=(0,ck.usePattern)($,U);$.fail$data(g1._`!${W}.test(${D})`)}}};kB.default=pk});var RB=b((TB)=>{Object.defineProperty(TB,"__esModule",{value:!0});var L0=h(),ok={message({keyword:$,schemaCode:v}){let D=$==="maxProperties"?"more":"fewer";return L0.str`must NOT have ${D} than ${v} properties`},params:({schemaCode:$})=>L0._`{limit: ${$}}`},ak={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:ok,code($){let{keyword:v,data:D,schemaCode:X}=$,U=v==="maxProperties"?L0.operators.GT:L0.operators.LT;$.fail$data(L0._`Object.keys(${D}).length ${U} ${X}`)}};TB.default=ak});var CB=b((gB)=>{Object.defineProperty(gB,"__esModule",{value:!0});var B0=X4(),N0=h(),sk=r(),$E={message:({params:{missingProperty:$}})=>N0.str`must have required property '${$}'`,params:({params:{missingProperty:$}})=>N0._`{missingProperty: ${$}}`},vE={keyword:"required",type:"object",schemaType:"array",$data:!0,error:$E,code($){let{gen:v,schema:D,schemaCode:X,data:U,$data:G,it:J}=$,{opts:Q}=J;if(!G&&D.length===0)return;let W=D.length>=Q.loopRequired;if(J.allErrors)z();else Y();if(Q.strictRequired){let K=$.parentSchema.properties,{definedProperties:L}=$.it;for(let N of D)if((K===null||K===void 0?void 0:K[N])===void 0&&!L.has(N)){let Z=J.schemaEnv.baseId+J.errSchemaPath,F=`required property "${N}" is not defined at "${Z}" (strictRequired)`;(0,sk.checkStrictMode)(J,F,J.opts.strictRequired)}}function z(){if(W||G)$.block$data(N0.nil,I);else for(let K of D)(0,B0.checkReportMissingProp)($,K)}function Y(){let K=v.let("missing");if(W||G){let L=v.let("valid",!0);$.block$data(L,()=>V(K,L)),$.ok(L)}else v.if((0,B0.checkMissingProp)($,D,K)),(0,B0.reportMissingProp)($,K),v.else()}function I(){v.forOf("prop",X,(K)=>{$.setParams({missingProperty:K}),v.if((0,B0.noPropertyInData)(v,U,K,Q.ownProperties),()=>$.error())})}function V(K,L){$.setParams({missingProperty:K}),v.forOf(K,X,()=>{v.assign(L,(0,B0.propertyInData)(v,U,K,Q.ownProperties)),v.if((0,N0.not)(L),()=>{$.error(),v.break()})},N0.nil)}}};gB.default=vE});var xB=b((uB)=>{Object.defineProperty(uB,"__esModule",{value:!0});var Z0=h(),DE={message({keyword:$,schemaCode:v}){let D=$==="maxItems"?"more":"fewer";return Z0.str`must NOT have ${D} than ${v} items`},params:({schemaCode:$})=>Z0._`{limit: ${$}}`},XE={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:DE,code($){let{keyword:v,data:D,schemaCode:X}=$,U=v==="maxItems"?Z0.operators.GT:Z0.operators.LT;$.fail$data(Z0._`${D}.length ${U} ${X}`)}};uB.default=XE});var BX=b((_B)=>{Object.defineProperty(_B,"__esModule",{value:!0});var fB=sz();fB.code='require("ajv/dist/runtime/equal").default';_B.default=fB});var yB=b((iB)=>{Object.defineProperty(iB,"__esModule",{value:!0});var N5=D0(),S$=h(),QE=r(),WE=BX(),zE={message:({params:{i:$,j:v}})=>S$.str`must NOT have duplicate items (items ## ${v} and ${$} are identical)`,params:({params:{i:$,j:v}})=>S$._`{i: ${$}, j: ${v}}`},YE={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:zE,code($){let{gen:v,data:D,$data:X,schema:U,parentSchema:G,schemaCode:J,it:Q}=$;if(!X&&!U)return;let W=v.let("valid"),z=G.items?(0,N5.getSchemaTypes)(G.items):[];$.block$data(W,Y,S$._`${J} === false`),$.ok(W);function Y(){let L=v.let("i",S$._`${D}.length`),N=v.let("j");$.setParams({i:L,j:N}),v.assign(W,!0),v.if(S$._`${L} > 1`,()=>(I()?V:K)(L,N))}function I(){return z.length>0&&!z.some((L)=>L==="object"||L==="array")}function V(L,N){let Z=v.name("item"),F=(0,N5.checkDataTypes)(z,Z,Q.opts.strictNumbers,N5.DataType.Wrong),S=v.const("indices",S$._`{}`);v.for(S$._`;${L}--;`,()=>{if(v.let(Z,S$._`${D}[${L}]`),v.if(F,S$._`continue`),z.length>1)v.if(S$._`typeof ${Z} == "string"`,S$._`${Z} += "_"`);v.if(S$._`typeof ${S}[${Z}] == "number"`,()=>{v.assign(N,S$._`${S}[${Z}]`),$.error(),v.assign(W,!1).break()}).code(S$._`${S}[${Z}] = ${L}`)})}function K(L,N){let Z=(0,QE.useFunc)(v,WE.default),F=v.name("outer");v.label(F).for(S$._`;${L}--;`,()=>v.for(S$._`${N} = ${L}; ${N}--;`,()=>v.if(S$._`${Z}(${D}[${L}], ${D}[${N}])`,()=>{$.error(),v.assign(W,!1).break(F)})))}}};iB.default=YE});var lB=b((nB)=>{Object.defineProperty(nB,"__esModule",{value:!0});var Z5=h(),VE=r(),KE=BX(),LE={message:"must be equal to constant",params:({schemaCode:$})=>Z5._`{allowedValue: ${$}}`},BE={keyword:"const",$data:!0,error:LE,code($){let{gen:v,data:D,$data:X,schemaCode:U,schema:G}=$;if(X||G&&typeof G=="object")$.fail$data(Z5._`!${(0,VE.useFunc)(v,KE.default)}(${D}, ${U})`);else $.fail(Z5._`${G} !== ${D}`)}};nB.default=BE});var mB=b((hB)=>{Object.defineProperty(hB,"__esModule",{value:!0});var O0=h(),ZE=r(),OE=BX(),HE={message:"must be equal to one of the allowed values",params:({schemaCode:$})=>O0._`{allowedValues: ${$}}`},FE={keyword:"enum",schemaType:"array",$data:!0,error:HE,code($){let{gen:v,data:D,$data:X,schema:U,schemaCode:G,it:J}=$;if(!X&&U.length===0)throw Error("enum must have non-empty array");let Q=U.length>=J.opts.loopEnum,W,z=()=>W!==null&&W!==void 0?W:W=(0,ZE.useFunc)(v,OE.default),Y;if(Q||X)Y=v.let("valid"),$.block$data(Y,I);else{if(!Array.isArray(U))throw Error("ajv implementation error");let K=v.const("vSchema",G);Y=(0,O0.or)(...U.map((L,N)=>V(K,N)))}$.pass(Y);function I(){v.assign(Y,!1),v.forOf("v",G,(K)=>v.if(O0._`${z()}(${D}, ${K})`,()=>v.assign(Y,!0).break()))}function V(K,L){let N=U[L];return typeof N==="object"&&N!==null?O0._`${z()}(${D}, ${K}[${L}])`:O0._`${D} === ${N}`}}};hB.default=FE});var dB=b((cB)=>{Object.defineProperty(cB,"__esModule",{value:!0});var AE=jB(),wE=wB(),ME=SB(),PE=EB(),bE=RB(),qE=CB(),SE=xB(),kE=yB(),EE=lB(),TE=mB(),RE=[AE.default,wE.default,ME.default,PE.default,bE.default,qE.default,SE.default,kE.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},EE.default,TE.default];cB.default=RE});var H5=b((pB)=>{Object.defineProperty(pB,"__esModule",{value:!0});pB.validateAdditionalItems=void 0;var C6=h(),O5=r(),CE={message:({params:{len:$}})=>C6.str`must NOT have more than ${$} items`,params:({params:{len:$}})=>C6._`{limit: ${$}}`},uE={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:CE,code($){let{parentSchema:v,it:D}=$,{items:X}=v;if(!Array.isArray(X)){(0,O5.checkStrictMode)(D,'"additionalItems" is ignored when "items" is not an array of schemas');return}rB($,X)}};function rB($,v){let{gen:D,schema:X,data:U,keyword:G,it:J}=$;J.items=!0;let Q=D.const("len",C6._`${U}.length`);if(X===!1)$.setParams({len:v.length}),$.pass(C6._`${Q} <= ${v.length}`);else if(typeof X=="object"&&!(0,O5.alwaysValidSchema)(J,X)){let z=D.var("valid",C6._`${Q} <= ${v.length}`);D.if((0,C6.not)(z),()=>W(z)),$.ok(z)}function W(z){D.forRange("i",v.length,Q,(Y)=>{if($.subschema({keyword:G,dataProp:Y,dataPropType:O5.Type.Num},z),!J.allErrors)D.if((0,C6.not)(z),()=>D.break())})}}pB.validateAdditionalItems=rB;pB.default=uE});var F5=b((eB)=>{Object.defineProperty(eB,"__esModule",{value:!0});eB.validateTuple=void 0;var oB=h(),NX=r(),fE=X4(),_E={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code($){let{schema:v,it:D}=$;if(Array.isArray(v))return aB($,"additionalItems",v);if(D.items=!0,(0,NX.alwaysValidSchema)(D,v))return;$.ok((0,fE.validateArray)($))}};function aB($,v,D=$.schema){let{gen:X,parentSchema:U,data:G,keyword:J,it:Q}=$;if(Y(U),Q.opts.unevaluated&&D.length&&Q.items!==!0)Q.items=NX.mergeEvaluated.items(X,D.length,Q.items);let W=X.name("valid"),z=X.const("len",oB._`${G}.length`);D.forEach((I,V)=>{if((0,NX.alwaysValidSchema)(Q,I))return;X.if(oB._`${z} > ${V}`,()=>$.subschema({keyword:J,schemaProp:V,dataProp:V},W)),$.ok(W)});function Y(I){let{opts:V,errSchemaPath:K}=Q,L=D.length,N=L===I.minItems&&(L===I.maxItems||I[v]===!1);if(V.strictTuples&&!N){let Z=`"${J}" is ${L}-tuple, but minItems or maxItems/${v} are not specified or different at path "${K}"`;(0,NX.checkStrictMode)(Q,Z,V.strictTuples)}}}eB.validateTuple=aB;eB.default=_E});var vN=b(($N)=>{Object.defineProperty($N,"__esModule",{value:!0});var yE=F5(),nE={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:($)=>(0,yE.validateTuple)($,"items")};$N.default=nE});var XN=b((DN)=>{Object.defineProperty(DN,"__esModule",{value:!0});var UN=h(),hE=r(),mE=X4(),cE=H5(),dE={message:({params:{len:$}})=>UN.str`must NOT have more than ${$} items`,params:({params:{len:$}})=>UN._`{limit: ${$}}`},rE={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:dE,code($){let{schema:v,parentSchema:D,it:X}=$,{prefixItems:U}=D;if(X.items=!0,(0,hE.alwaysValidSchema)(X,v))return;if(U)(0,cE.validateAdditionalItems)($,U);else $.ok((0,mE.validateArray)($))}};DN.default=rE});var JN=b((GN)=>{Object.defineProperty(GN,"__esModule",{value:!0});var G4=h(),ZX=r(),tE={message:({params:{min:$,max:v}})=>v===void 0?G4.str`must contain at least ${$} valid item(s)`:G4.str`must contain at least ${$} and no more than ${v} valid item(s)`,params:({params:{min:$,max:v}})=>v===void 0?G4._`{minContains: ${$}}`:G4._`{minContains: ${$}, maxContains: ${v}}`},oE={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:tE,code($){let{gen:v,schema:D,parentSchema:X,data:U,it:G}=$,J,Q,{minContains:W,maxContains:z}=X;if(G.opts.next)J=W===void 0?1:W,Q=z;else J=1;let Y=v.const("len",G4._`${U}.length`);if($.setParams({min:J,max:Q}),Q===void 0&&J===0){(0,ZX.checkStrictMode)(G,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(Q!==void 0&&J>Q){(0,ZX.checkStrictMode)(G,'"minContains" > "maxContains" is always invalid'),$.fail();return}if((0,ZX.alwaysValidSchema)(G,D)){let N=G4._`${Y} >= ${J}`;if(Q!==void 0)N=G4._`${N} && ${Y} <= ${Q}`;$.pass(N);return}G.items=!0;let I=v.name("valid");if(Q===void 0&&J===1)K(I,()=>v.if(I,()=>v.break()));else if(J===0){if(v.let(I,!0),Q!==void 0)v.if(G4._`${U}.length > 0`,V)}else v.let(I,!1),V();$.result(I,()=>$.reset());function V(){let N=v.name("_valid"),Z=v.let("count",0);K(N,()=>v.if(N,()=>L(Z)))}function K(N,Z){v.forRange("i",0,Y,(F)=>{$.subschema({keyword:"contains",dataProp:F,dataPropType:ZX.Type.Num,compositeRule:!0},N),Z()})}function L(N){if(v.code(G4._`${N}++`),Q===void 0)v.if(G4._`${N} >= ${J}`,()=>v.assign(I,!0).break());else if(v.if(G4._`${N} > ${Q}`,()=>v.assign(I,!1).break()),J===1)v.assign(I,!0);else v.if(G4._`${N} >= ${J}`,()=>v.assign(I,!0))}}};GN.default=oE});var VN=b((zN)=>{Object.defineProperty(zN,"__esModule",{value:!0});zN.validateSchemaDeps=zN.validatePropertyDeps=zN.error=void 0;var j5=h(),eE=r(),H0=X4();zN.error={message:({params:{property:$,depsCount:v,deps:D}})=>{let X=v===1?"property":"properties";return j5.str`must have ${X} ${D} when property ${$} is present`},params:({params:{property:$,depsCount:v,deps:D,missingProperty:X}})=>j5._`{property: ${$},
|
|
8
8
|
missingProperty: ${X},
|
|
9
9
|
depsCount: ${v},
|
|
10
10
|
deps: ${D}}`};var sE={keyword:"dependencies",type:"object",schemaType:"object",error:zN.error,code($){let[v,D]=$T($);QN($,v),WN($,D)}};function $T({schema:$}){let v={},D={};for(let X in $){if(X==="__proto__")continue;let U=Array.isArray($[X])?v:D;U[X]=$[X]}return[v,D]}function QN($,v=$.schema){let{gen:D,data:X,it:U}=$;if(Object.keys(v).length===0)return;let G=D.let("missing");for(let J in v){let Q=v[J];if(Q.length===0)continue;let W=(0,H0.propertyInData)(D,X,J,U.opts.ownProperties);if($.setParams({property:J,depsCount:Q.length,deps:Q.join(", ")}),U.allErrors)D.if(W,()=>{for(let z of Q)(0,H0.checkReportMissingProp)($,z)});else D.if(j5._`${W} && (${(0,H0.checkMissingProp)($,Q,G)})`),(0,H0.reportMissingProp)($,G),D.else()}}zN.validatePropertyDeps=QN;function WN($,v=$.schema){let{gen:D,data:X,keyword:U,it:G}=$,J=D.name("valid");for(let Q in v){if((0,eE.alwaysValidSchema)(G,v[Q]))continue;D.if((0,H0.propertyInData)(D,X,Q,G.opts.ownProperties),()=>{let W=$.subschema({keyword:U,schemaProp:Q},J);$.mergeValidEvaluated(W,J)},()=>D.var(J,!0)),$.ok(J)}}zN.validateSchemaDeps=WN;zN.default=sE});var BN=b((LN)=>{Object.defineProperty(LN,"__esModule",{value:!0});var KN=h(),DT=r(),XT={message:"property name must be valid",params:({params:$})=>KN._`{propertyName: ${$.propertyName}}`},GT={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:XT,code($){let{gen:v,schema:D,data:X,it:U}=$;if((0,DT.alwaysValidSchema)(U,D))return;let G=v.name("valid");v.forIn("key",X,(J)=>{$.setParams({propertyName:J}),$.subschema({keyword:"propertyNames",data:J,dataTypes:["string"],propertyName:J,compositeRule:!0},G),v.if((0,KN.not)(G),()=>{if($.error(!0),!U.allErrors)v.break()})}),$.ok(G)}};LN.default=GT});var A5=b((NN)=>{Object.defineProperty(NN,"__esModule",{value:!0});var OX=X4(),N4=h(),QT=m4(),HX=r(),WT={message:"must NOT have additional properties",params:({params:$})=>N4._`{additionalProperty: ${$.additionalProperty}}`},zT={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:WT,code($){let{gen:v,schema:D,parentSchema:X,data:U,errsCount:G,it:J}=$;if(!G)throw Error("ajv implementation error");let{allErrors:Q,opts:W}=J;if(J.props=!0,W.removeAdditional!=="all"&&(0,HX.alwaysValidSchema)(J,D))return;let z=(0,OX.allSchemaProperties)(X.properties),Y=(0,OX.allSchemaProperties)(X.patternProperties);I(),$.ok(N4._`${G} === ${QT.default.errors}`);function I(){v.forIn("key",U,(Z)=>{if(!z.length&&!Y.length)L(Z);else v.if(V(Z),()=>L(Z))})}function V(Z){let F;if(z.length>8){let S=(0,HX.schemaRefOrVal)(J,X.properties,"properties");F=(0,OX.isOwnProperty)(v,S,Z)}else if(z.length)F=(0,N4.or)(...z.map((S)=>N4._`${Z} === ${S}`));else F=N4.nil;if(Y.length)F=(0,N4.or)(F,...Y.map((S)=>N4._`${(0,OX.usePattern)($,S)}.test(${Z})`));return(0,N4.not)(F)}function K(Z){v.code(N4._`delete ${U}[${Z}]`)}function L(Z){if(W.removeAdditional==="all"||W.removeAdditional&&D===!1){K(Z);return}if(D===!1){if($.setParams({additionalProperty:Z}),$.error(),!Q)v.break();return}if(typeof D=="object"&&!(0,HX.alwaysValidSchema)(J,D)){let F=v.name("valid");if(W.removeAdditional==="failing")N(Z,F,!1),v.if((0,N4.not)(F),()=>{$.reset(),K(Z)});else if(N(Z,F),!Q)v.if((0,N4.not)(F),()=>v.break())}}function N(Z,F,S){let g={keyword:"additionalProperties",dataProp:Z,dataPropType:HX.Type.Str};if(S===!1)Object.assign(g,{compositeRule:!0,createErrors:!1,allErrors:!1});$.subschema(g,F)}}};NN.default=zT});var FN=b((HN)=>{Object.defineProperty(HN,"__esModule",{value:!0});var IT=Q0(),ZN=X4(),w5=r(),ON=A5(),VT={keyword:"properties",type:"object",schemaType:"object",code($){let{gen:v,schema:D,parentSchema:X,data:U,it:G}=$;if(G.opts.removeAdditional==="all"&&X.additionalProperties===void 0)ON.default.code(new IT.KeywordCxt(G,ON.default,"additionalProperties"));let J=(0,ZN.allSchemaProperties)(D);for(let I of J)G.definedProperties.add(I);if(G.opts.unevaluated&&J.length&&G.props!==!0)G.props=w5.mergeEvaluated.props(v,(0,w5.toHash)(J),G.props);let Q=J.filter((I)=>!(0,w5.alwaysValidSchema)(G,D[I]));if(Q.length===0)return;let W=v.name("valid");for(let I of Q){if(z(I))Y(I);else{if(v.if((0,ZN.propertyInData)(v,U,I,G.opts.ownProperties)),Y(I),!G.allErrors)v.else().var(W,!0);v.endIf()}$.it.definedProperties.add(I),$.ok(W)}function z(I){return G.opts.useDefaults&&!G.compositeRule&&D[I].default!==void 0}function Y(I){$.subschema({keyword:"properties",schemaProp:I,dataProp:I},W)}}};HN.default=VT});var PN=b((MN)=>{Object.defineProperty(MN,"__esModule",{value:!0});var jN=X4(),FX=h(),AN=r(),wN=r(),LT={keyword:"patternProperties",type:"object",schemaType:"object",code($){let{gen:v,schema:D,data:X,parentSchema:U,it:G}=$,{opts:J}=G,Q=(0,jN.allSchemaProperties)(D),W=Q.filter((N)=>(0,AN.alwaysValidSchema)(G,D[N]));if(Q.length===0||W.length===Q.length&&(!G.opts.unevaluated||G.props===!0))return;let z=J.strictSchema&&!J.allowMatchingProperties&&U.properties,Y=v.name("valid");if(G.props!==!0&&!(G.props instanceof FX.Name))G.props=(0,wN.evaluatedPropsToName)(v,G.props);let{props:I}=G;V();function V(){for(let N of Q){if(z)K(N);if(G.allErrors)L(N);else v.var(Y,!0),L(N),v.if(Y)}}function K(N){for(let Z in z)if(new RegExp(N).test(Z))(0,AN.checkStrictMode)(G,`property ${Z} matches pattern ${N} (use allowMatchingProperties)`)}function L(N){v.forIn("key",X,(Z)=>{v.if(FX._`${(0,jN.usePattern)($,N)}.test(${Z})`,()=>{let F=W.includes(N);if(!F)$.subschema({keyword:"patternProperties",schemaProp:N,dataProp:Z,dataPropType:wN.Type.Str},Y);if(G.opts.unevaluated&&I!==!0)v.assign(FX._`${I}[${Z}]`,!0);else if(!F&&!G.allErrors)v.if((0,FX.not)(Y),()=>v.break())})})}}};MN.default=LT});var qN=b((bN)=>{Object.defineProperty(bN,"__esModule",{value:!0});var NT=r(),ZT={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code($){let{gen:v,schema:D,it:X}=$;if((0,NT.alwaysValidSchema)(X,D)){$.fail();return}let U=v.name("valid");$.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},U),$.failResult(U,()=>$.reset(),()=>$.error())},error:{message:"must NOT be valid"}};bN.default=ZT});var kN=b((SN)=>{Object.defineProperty(SN,"__esModule",{value:!0});var HT=X4(),FT={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:HT.validateUnion,error:{message:"must match a schema in anyOf"}};SN.default=FT});var TN=b((EN)=>{Object.defineProperty(EN,"__esModule",{value:!0});var jX=h(),AT=r(),wT={message:"must match exactly one schema in oneOf",params:({params:$})=>jX._`{passingSchemas: ${$.passing}}`},MT={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:wT,code($){let{gen:v,schema:D,parentSchema:X,it:U}=$;if(!Array.isArray(D))throw Error("ajv implementation error");if(U.opts.discriminator&&X.discriminator)return;let G=D,J=v.let("valid",!1),Q=v.let("passing",null),W=v.name("_valid");$.setParams({passing:Q}),v.block(z),$.result(J,()=>$.reset(),()=>$.error(!0));function z(){G.forEach((Y,I)=>{let V;if((0,AT.alwaysValidSchema)(U,Y))v.var(W,!0);else V=$.subschema({keyword:"oneOf",schemaProp:I,compositeRule:!0},W);if(I>0)v.if(jX._`${W} && ${J}`).assign(J,!1).assign(Q,jX._`[${Q}, ${I}]`).else();v.if(W,()=>{if(v.assign(J,!0),v.assign(Q,I),V)$.mergeEvaluated(V,jX.Name)})})}}};EN.default=MT});var gN=b((RN)=>{Object.defineProperty(RN,"__esModule",{value:!0});var bT=r(),qT={keyword:"allOf",schemaType:"array",code($){let{gen:v,schema:D,it:X}=$;if(!Array.isArray(D))throw Error("ajv implementation error");let U=v.name("valid");D.forEach((G,J)=>{if((0,bT.alwaysValidSchema)(X,G))return;let Q=$.subschema({keyword:"allOf",schemaProp:J},U);$.ok(U),$.mergeEvaluated(Q)})}};RN.default=qT});var fN=b((xN)=>{Object.defineProperty(xN,"__esModule",{value:!0});var AX=h(),uN=r(),kT={message:({params:$})=>AX.str`must match "${$.ifClause}" schema`,params:({params:$})=>AX._`{failingKeyword: ${$.ifClause}}`},ET={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:kT,code($){let{gen:v,parentSchema:D,it:X}=$;if(D.then===void 0&&D.else===void 0)(0,uN.checkStrictMode)(X,'"if" without "then" and "else" is ignored');let U=CN(X,"then"),G=CN(X,"else");if(!U&&!G)return;let J=v.let("valid",!0),Q=v.name("_valid");if(W(),$.reset(),U&&G){let Y=v.let("ifClause");$.setParams({ifClause:Y}),v.if(Q,z("then",Y),z("else",Y))}else if(U)v.if(Q,z("then"));else v.if((0,AX.not)(Q),z("else"));$.pass(J,()=>$.error(!0));function W(){let Y=$.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},Q);$.mergeEvaluated(Y)}function z(Y,I){return()=>{let V=$.subschema({keyword:Y},Q);if(v.assign(J,Q),$.mergeValidEvaluated(V,J),I)v.assign(I,AX._`${Y}`);else $.setParams({ifClause:Y})}}}};function CN($,v){let D=$.schema[v];return D!==void 0&&!(0,uN.alwaysValidSchema)($,D)}xN.default=ET});var iN=b((_N)=>{Object.defineProperty(_N,"__esModule",{value:!0});var RT=r(),gT={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:$,parentSchema:v,it:D}){if(v.if===void 0)(0,RT.checkStrictMode)(D,`"${$}" without "if" is ignored`)}};_N.default=gT});var nN=b((yN)=>{Object.defineProperty(yN,"__esModule",{value:!0});var uT=H5(),xT=vN(),fT=F5(),_T=XN(),iT=JN(),yT=VN(),nT=BN(),lT=A5(),hT=FN(),mT=PN(),cT=qN(),dT=kN(),rT=TN(),pT=gN(),tT=fN(),oT=iN();function aT($=!1){let v=[cT.default,dT.default,rT.default,pT.default,tT.default,oT.default,nT.default,lT.default,yT.default,hT.default,mT.default];if($)v.push(xT.default,_T.default);else v.push(uT.default,fT.default);return v.push(iT.default),v}yN.default=aT});var hN=b((lN)=>{Object.defineProperty(lN,"__esModule",{value:!0});var L$=h(),sT={message:({schemaCode:$})=>L$.str`must match format "${$}"`,params:({schemaCode:$})=>L$._`{format: ${$}}`},$2={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:sT,code($,v){let{gen:D,data:X,$data:U,schema:G,schemaCode:J,it:Q}=$,{opts:W,errSchemaPath:z,schemaEnv:Y,self:I}=Q;if(!W.validateFormats)return;if(U)V();else K();function V(){let L=D.scopeValue("formats",{ref:I.formats,code:W.code.formats}),N=D.const("fDef",L$._`${L}[${J}]`),Z=D.let("fType"),F=D.let("format");D.if(L$._`typeof ${N} == "object" && !(${N} instanceof RegExp)`,()=>D.assign(Z,L$._`${N}.type || "string"`).assign(F,L$._`${N}.validate`),()=>D.assign(Z,L$._`"string"`).assign(F,N)),$.fail$data((0,L$.or)(S(),g()));function S(){if(W.strictSchema===!1)return L$.nil;return L$._`${J} && !${F}`}function g(){let u=Y.$async?L$._`(${N}.async ? await ${F}(${X}) : ${F}(${X}))`:L$._`${F}(${X})`,k=L$._`(typeof ${F} == "function" ? ${u} : ${F}.test(${X}))`;return L$._`${F} && ${F} !== true && ${Z} === ${v} && !${k}`}}function K(){let L=I.formats[G];if(!L){S();return}if(L===!0)return;let[N,Z,F]=g(L);if(N===v)$.pass(u());function S(){if(W.strictSchema===!1){I.logger.warn(k());return}throw Error(k());function k(){return`unknown format "${G}" ignored in schema at path "${z}"`}}function g(k){let N$=k instanceof RegExp?(0,L$.regexpCode)(k):W.code.formats?L$._`${W.code.formats}${(0,L$.getProperty)(G)}`:void 0,j$=D.scopeValue("formats",{key:G,ref:k,code:N$});if(typeof k=="object"&&!(k instanceof RegExp))return[k.type||"string",k.validate,L$._`${j$}.validate`];return["string",k,j$]}function u(){if(typeof L=="object"&&!(L instanceof RegExp)&&L.async){if(!Y.$async)throw Error("async format in sync schema");return L$._`await ${F}(${X})`}return typeof Z=="function"?L$._`${F}(${X})`:L$._`${F}.test(${X})`}}}};lN.default=$2});var cN=b((mN)=>{Object.defineProperty(mN,"__esModule",{value:!0});var U2=hN(),D2=[U2.default];mN.default=D2});var pN=b((dN)=>{Object.defineProperty(dN,"__esModule",{value:!0});dN.contentVocabulary=dN.metadataVocabulary=void 0;dN.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];dN.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});var aN=b((oN)=>{Object.defineProperty(oN,"__esModule",{value:!0});var J2=HB(),Q2=dB(),W2=nN(),z2=cN(),tN=pN(),Y2=[J2.default,Q2.default,(0,W2.default)(),z2.default,tN.metadataVocabulary,tN.contentVocabulary];oN.default=Y2});var vZ=b((sN)=>{Object.defineProperty(sN,"__esModule",{value:!0});sN.DiscrError=void 0;var eN;(function($){$.Tag="tag",$.Mapping="mapping"})(eN||(sN.DiscrError=eN={}))});var XZ=b((DZ)=>{Object.defineProperty(DZ,"__esModule",{value:!0});var C1=h(),M5=vZ(),UZ=GX(),V2=W0(),K2=r(),L2={message:({params:{discrError:$,tagName:v}})=>$===M5.DiscrError.Tag?`tag "${v}" must be string`:`value of tag "${v}" must be in oneOf`,params:({params:{discrError:$,tag:v,tagName:D}})=>C1._`{error: ${$}, tag: ${D}, tagValue: ${v}}`},B2={keyword:"discriminator",type:"object",schemaType:"object",error:L2,code($){let{gen:v,data:D,schema:X,parentSchema:U,it:G}=$,{oneOf:J}=U;if(!G.opts.discriminator)throw Error("discriminator: requires discriminator option");let Q=X.propertyName;if(typeof Q!="string")throw Error("discriminator: requires propertyName");if(X.mapping)throw Error("discriminator: mapping is not supported");if(!J)throw Error("discriminator: requires oneOf keyword");let W=v.let("valid",!1),z=v.const("tag",C1._`${D}${(0,C1.getProperty)(Q)}`);v.if(C1._`typeof ${z} == "string"`,()=>Y(),()=>$.error(!1,{discrError:M5.DiscrError.Tag,tag:z,tagName:Q})),$.ok(W);function Y(){let K=V();v.if(!1);for(let L in K)v.elseIf(C1._`${z} === ${L}`),v.assign(W,I(K[L]));v.else(),$.error(!1,{discrError:M5.DiscrError.Mapping,tag:z,tagName:Q}),v.endIf()}function I(K){let L=v.name("valid"),N=$.subschema({keyword:"oneOf",schemaProp:K},L);return $.mergeEvaluated(N,C1.Name),L}function V(){var K;let L={},N=F(U),Z=!0;for(let u=0;u<J.length;u++){let k=J[u];if((k===null||k===void 0?void 0:k.$ref)&&!(0,K2.schemaHasRulesButRef)(k,G.self.RULES)){let j$=k.$ref;if(k=UZ.resolveRef.call(G.self,G.schemaEnv.root,G.baseId,j$),k instanceof UZ.SchemaEnv)k=k.schema;if(k===void 0)throw new V2.default(G.opts.uriResolver,G.baseId,j$)}let N$=(K=k===null||k===void 0?void 0:k.properties)===null||K===void 0?void 0:K[Q];if(typeof N$!="object")throw Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${Q}"`);Z=Z&&(N||F(k)),S(N$,u)}if(!Z)throw Error(`discriminator: "${Q}" must be required`);return L;function F({required:u}){return Array.isArray(u)&&u.includes(Q)}function S(u,k){if(u.const)g(u.const,k);else if(u.enum)for(let N$ of u.enum)g(N$,k);else throw Error(`discriminator: "properties/${Q}" must have "const" or "enum"`)}function g(u,k){if(typeof u!="string"||u in L)throw Error(`discriminator: "${Q}" values must be unique strings`);L[u]=k}}}};DZ.default=B2});var GZ=b((Pr,Z2)=>{Z2.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 b5=b((r$,P5)=>{Object.defineProperty(r$,"__esModule",{value:!0});r$.MissingRefError=r$.ValidationError=r$.CodeGen=r$.Name=r$.nil=r$.stringify=r$.str=r$._=r$.KeywordCxt=r$.Ajv=void 0;var O2=zB(),H2=aN(),F2=XZ(),JZ=GZ(),j2=["/properties"],wX="http://json-schema.org/draft-07/schema";class F0 extends O2.default{_addVocabularies(){if(super._addVocabularies(),H2.default.forEach(($)=>this.addVocabulary($)),this.opts.discriminator)this.addKeyword(F2.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let $=this.opts.$data?this.$dataMetaSchema(JZ,j2):JZ;this.addMetaSchema($,wX,!1),this.refs["http://json-schema.org/schema"]=wX}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(wX)?wX:void 0)}}r$.Ajv=F0;P5.exports=r$=F0;P5.exports.Ajv=F0;Object.defineProperty(r$,"__esModule",{value:!0});r$.default=F0;var A2=Q0();Object.defineProperty(r$,"KeywordCxt",{enumerable:!0,get:function(){return A2.KeywordCxt}});var u1=h();Object.defineProperty(r$,"_",{enumerable:!0,get:function(){return u1._}});Object.defineProperty(r$,"str",{enumerable:!0,get:function(){return u1.str}});Object.defineProperty(r$,"stringify",{enumerable:!0,get:function(){return u1.stringify}});Object.defineProperty(r$,"nil",{enumerable:!0,get:function(){return u1.nil}});Object.defineProperty(r$,"Name",{enumerable:!0,get:function(){return u1.Name}});Object.defineProperty(r$,"CodeGen",{enumerable:!0,get:function(){return u1.CodeGen}});var w2=DX();Object.defineProperty(r$,"ValidationError",{enumerable:!0,get:function(){return w2.default}});var M2=W0();Object.defineProperty(r$,"MissingRefError",{enumerable:!0,get:function(){return M2.default}})});var NZ=b((LZ)=>{Object.defineProperty(LZ,"__esModule",{value:!0});LZ.formatNames=LZ.fastFormats=LZ.fullFormats=void 0;function E4($,v){return{validate:$,compare:v}}LZ.fullFormats={date:E4(YZ,E5),time:E4(S5(!0),T5),"date-time":E4(QZ(!0),VZ),"iso-time":E4(S5(),IZ),"iso-date-time":E4(QZ(),KZ),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:R2,"uri-reference":/^(?:[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,"uri-template":/^(?:(?:[^\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,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|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-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{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,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/,ipv6:/^((([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,regex:i2,uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:g2,int32:{type:"number",validate:x2},int64:{type:"number",validate:f2},float:{type:"number",validate:zZ},double:{type:"number",validate:zZ},password:!0,binary:!0};LZ.fastFormats={...LZ.fullFormats,date:E4(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,E5),time:E4(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,T5),"date-time":E4(/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,VZ),"iso-time":E4(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,IZ),"iso-date-time":E4(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,KZ),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i};LZ.formatNames=Object.keys(LZ.fullFormats);function q2($){return $%4===0&&($%100!==0||$%400===0)}var S2=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,k2=[0,31,28,31,30,31,30,31,31,30,31,30,31];function YZ($){let v=S2.exec($);if(!v)return!1;let D=+v[1],X=+v[2],U=+v[3];return X>=1&&X<=12&&U>=1&&U<=(X===2&&q2(D)?29:k2[X])}function E5($,v){if(!($&&v))return;if($>v)return 1;if($<v)return-1;return 0}var q5=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function S5($){return function(D){let X=q5.exec(D);if(!X)return!1;let U=+X[1],G=+X[2],J=+X[3],Q=X[4],W=X[5]==="-"?-1:1,z=+(X[6]||0),Y=+(X[7]||0);if(z>23||Y>59||$&&!Q)return!1;if(U<=23&&G<=59&&J<60)return!0;let I=G-Y*W,V=U-z*W-(I<0?1:0);return(V===23||V===-1)&&(I===59||I===-1)&&J<61}}function T5($,v){if(!($&&v))return;let D=new Date("2020-01-01T"+$).valueOf(),X=new Date("2020-01-01T"+v).valueOf();if(!(D&&X))return;return D-X}function IZ($,v){if(!($&&v))return;let D=q5.exec($),X=q5.exec(v);if(!(D&&X))return;if($=D[1]+D[2]+D[3],v=X[1]+X[2]+X[3],$>v)return 1;if($<v)return-1;return 0}var k5=/t|\s/i;function QZ($){let v=S5($);return function(X){let U=X.split(k5);return U.length===2&&YZ(U[0])&&v(U[1])}}function VZ($,v){if(!($&&v))return;let D=new Date($).valueOf(),X=new Date(v).valueOf();if(!(D&&X))return;return D-X}function KZ($,v){if(!($&&v))return;let[D,X]=$.split(k5),[U,G]=v.split(k5),J=E5(D,U);if(J===void 0)return;return J||T5(X,G)}var E2=/\/|:/,T2=/^(?:[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 R2($){return E2.test($)&&T2.test($)}var WZ=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function g2($){return WZ.lastIndex=0,WZ.test($)}var C2=-2147483648,u2=2147483647;function x2($){return Number.isInteger($)&&$<=u2&&$>=C2}function f2($){return Number.isInteger($)}function zZ(){return!0}var _2=/[^\\]\\Z/;function i2($){if(_2.test($))return!1;try{return new RegExp($),!0}catch(v){return!1}}});var OZ=b((ZZ)=>{Object.defineProperty(ZZ,"__esModule",{value:!0});ZZ.formatLimitDefinition=void 0;var n2=b5(),Z4=h(),N6=Z4.operators,MX={formatMaximum:{okStr:"<=",ok:N6.LTE,fail:N6.GT},formatMinimum:{okStr:">=",ok:N6.GTE,fail:N6.LT},formatExclusiveMaximum:{okStr:"<",ok:N6.LT,fail:N6.GTE},formatExclusiveMinimum:{okStr:">",ok:N6.GT,fail:N6.LTE}},l2={message:({keyword:$,schemaCode:v})=>Z4.str`should be ${MX[$].okStr} ${v}`,params:({keyword:$,schemaCode:v})=>Z4._`{comparison: ${MX[$].okStr}, limit: ${v}}`};ZZ.formatLimitDefinition={keyword:Object.keys(MX),type:"string",schemaType:"string",$data:!0,error:l2,code($){let{gen:v,data:D,schemaCode:X,keyword:U,it:G}=$,{opts:J,self:Q}=G;if(!J.validateFormats)return;let W=new n2.KeywordCxt(G,Q.RULES.all.format.definition,"format");if(W.$data)z();else Y();function z(){let V=v.scopeValue("formats",{ref:Q.formats,code:J.code.formats}),K=v.const("fmt",Z4._`${V}[${W.schemaCode}]`);$.fail$data((0,Z4.or)(Z4._`typeof ${K} != "object"`,Z4._`${K} instanceof RegExp`,Z4._`typeof ${K}.compare != "function"`,I(K)))}function Y(){let V=W.schema,K=Q.formats[V];if(!K||K===!0)return;if(typeof K!="object"||K instanceof RegExp||typeof K.compare!="function")throw Error(`"${U}": format "${V}" does not define "compare" function`);let L=v.scopeValue("formats",{key:V,ref:K,code:J.code.formats?Z4._`${J.code.formats}${(0,Z4.getProperty)(V)}`:void 0});$.fail$data(I(L))}function I(V){return Z4._`${V}.compare(${D}, ${X}) ${MX[U].fail} 0`}},dependencies:["format"]};var h2=($)=>{return $.addKeyword(ZZ.formatLimitDefinition),$};ZZ.default=h2});var AZ=b((j0,jZ)=>{Object.defineProperty(j0,"__esModule",{value:!0});var x1=NZ(),c2=OZ(),C5=h(),HZ=new C5.Name("fullFormats"),d2=new C5.Name("fastFormats"),u5=($,v={keywords:!0})=>{if(Array.isArray(v))return FZ($,v,x1.fullFormats,HZ),$;let[D,X]=v.mode==="fast"?[x1.fastFormats,d2]:[x1.fullFormats,HZ],U=v.formats||x1.formatNames;if(FZ($,U,D,X),v.keywords)(0,c2.default)($);return $};u5.get=($,v="full")=>{let X=(v==="fast"?x1.fastFormats:x1.fullFormats)[$];if(!X)throw Error(`Unknown format "${$}"`);return X};function FZ($,v,D,X){var U,G;(U=(G=$.opts.code).formats)!==null&&U!==void 0||(G.formats=C5._`require("ajv-formats/dist/formats").${X}`);for(let J of v)$.addFormat(J,D[J])}jZ.exports=j0=u5;Object.defineProperty(j0,"__esModule",{value:!0});j0.default=u5});var r4="/auth/api";import{spawn as dH}from"node:child_process";function rH($,v){if($==="darwin")return{command:"open",args:[v]};if($==="win32")return{command:"cmd",args:["/c","start","",v]};return{command:"xdg-open",args:[v]}}function S0($,v=process.platform){return new Promise((D)=>{let{command:X,args:U}=rH(v,$);try{let G=dH(X,U,{stdio:"ignore",detached:!0});G.once("spawn",()=>{G.unref(),D(!0)}),G.once("error",()=>D(!1))}catch{D(!1)}})}import{chmod as pH,mkdir as tH,readFile as oH,rename as aH,rm as eH,writeFile as sH}from"node:fs/promises";import{homedir as $3}from"node:os";import{dirname as v3,join as M7}from"node:path";function P7($){if(typeof $!=="object"||$===null)return null;let{accessToken:v,expiresAt:D}=$;if(typeof v==="string"&&typeof D==="number")return{accessToken:v,expiresAt:D};return null}function U3($){try{return P7(JSON.parse($))}catch{return null}}class b7{Entry;keychainService;constructor($,v){this.Entry=$;this.keychainService=v}async get($){try{return U3(new this.Entry(this.keychainService,$).getPassword())}catch{return null}}async set($,v){new this.Entry(this.keychainService,$).setPassword(JSON.stringify(v))}async clear($){try{new this.Entry(this.keychainService,$).deletePassword()}catch{}}}class $G{filePath;constructor($){this.filePath=$}async readAll(){try{let $=JSON.parse(await oH(this.filePath,"utf8"));if(typeof $!=="object"||$===null)return{};return $}catch{return{}}}async writeAll($){await tH(v3(this.filePath),{recursive:!0,mode:448});let v=`${this.filePath}.${process.pid}.tmp`;await sH(v,JSON.stringify($,null,2),{mode:384}),await pH(v,384),await aH(v,this.filePath)}async get($){return P7((await this.readAll())[$])}async set($,v){let D=await this.readAll();D[$]=v,await this.writeAll(D)}async clear($){let v=await this.readAll();if(!($ in v))return;if(delete v[$],Object.keys(v).length===0){await eH(this.filePath,{force:!0});return}await this.writeAll(v)}}function k0($,v=process.env){let D=v.XDG_CONFIG_HOME||M7($3(),".config");return M7(D,$,"credentials.json")}async function E0($){let v=$.credentialsFilePath,D=Boolean($.forceFileEnvVar&&process.env[$.forceFileEnvVar]);if($.forceFile||D)return new $G(v);try{let X=$.loadKeyring??(()=>import("@napi-rs/keyring")),{Entry:U}=await X();return new b7(U,$.keychainService)}catch{return new $G(v)}}async function F4($){let v=await $.text();if(!v)return{};try{let D=JSON.parse(v);return typeof D==="object"&&D!==null?D:{}}catch{return{}}}var D3=`${r4}/.well-known/openid-configuration`;async function T0($,v=fetch){let D=`${$.replace(/\/$/,"")}${D3}`,X;try{X=await v(D)}catch(Q){throw Error(`OAuth discovery request failed for ${D}`,{cause:Q})}if(!X.ok)throw Error(`OAuth discovery returned ${X.status} for ${D}`);let U=await F4(X),G=U.authorization_endpoint,J=U.token_endpoint;if(typeof G!=="string"||typeof J!=="string")throw Error(`OAuth discovery at ${D} is missing authorization_endpoint or token_endpoint`);return q7($,G,D),q7($,J,D),{authorizationEndpoint:G,tokenEndpoint:J}}function q7($,v,D){let X;try{X=new URL(v).origin}catch{throw Error(`OAuth discovery at ${D} returned an invalid endpoint: ${v}`)}if(X!==new URL($).origin)throw Error(`OAuth discovery at ${D} returned a cross-origin endpoint: ${v}`)}var u4="127.0.0.1",vG=["localhost","127.0.0.1","[::1]"];function j4($){return vG.includes($)}function R0($){let v;try{v=new URL($)}catch{throw Error(`Invalid base URL: "${$}"`)}if(v.protocol!=="https:"&&!j4(v.hostname))throw Error(`Base URL must use https (loopback hosts exempt): "${$}"`)}function g0($,v){return`http://${u4}:${v}${$}`}import{createServer as X3}from"node:http";function k7($){let v=$.ok?"accent":"danger",D=$.ok?"✓":"!";return`<!doctype html><html lang="en"><head><meta charset="utf-8">
|
|
@@ -25,8 +25,8 @@ ${K}
|
|
|
25
25
|
`),!await($.openBrowserImpl??S0)(K))D(`Could not open a browser automatically — open the URL above manually.
|
|
26
26
|
`);let{code:N,state:Z}=await I.waitForCode(DG);if(Z!==Y)throw Error("OAuth state mismatch — aborting login (possible CSRF).");return await GG(W.tokenEndpoint,{code:N,codeVerifier:z.verifier,redirectUri:I.redirectUri,clientId:U},v,X)}finally{await I.close()}}function XG($,v){let D=new URL($);if(D.searchParams.set("response_type","code"),D.searchParams.set("client_id",v.clientId),D.searchParams.set("redirect_uri",v.redirectUri),D.searchParams.set("scope",v.scope),D.searchParams.set("state",v.state),D.searchParams.set("code_challenge",v.codeChallenge),D.searchParams.set("code_challenge_method","S256"),v.prompt)D.searchParams.set("prompt",v.prompt);return D.toString()}function z3($){try{return j4(new URL($).hostname)}catch{return!1}}async function GG($,v,D=fetch,X=Date.now){let U=new URLSearchParams({grant_type:"authorization_code",code:v.code,redirect_uri:v.redirectUri,client_id:v.clientId,code_verifier:v.codeVerifier}),G=await D($,{method:"POST",headers:{"content-type":"application/x-www-form-urlencoded",accept:"application/json"},body:U.toString()}),J=await F4(G),Q=J.access_token,W=J.expires_in;if(!G.ok||typeof Q!=="string")throw Error(`OAuth token exchange failed: ${Y3(J,G.status)}`);if(typeof W!=="number"||W<=0)throw Error("OAuth token exchange returned no valid expires_in");return{accessToken:Q,expiresAt:X()+W*1000}}function Y3($,v){if(typeof $.error_description==="string")return $.error_description;if(typeof $.error==="string")return $.error;return`HTTP ${v}`}var d1=`${r4}/oauth2/userinfo`;async function JG($,v,D=fetch){let X=`${$.replace(/\/$/,"")}${d1}`,U;try{U=await D(X,{method:"GET",headers:{authorization:`Bearer ${v}`,accept:"application/json"}})}catch(z){throw Error(`Could not reach the Aether Wealth userinfo endpoint at ${X}`,{cause:z})}if(!U.ok)throw Error(`Aether Wealth userinfo request failed (HTTP ${U.status})`);let G=await F4(U),J=G.sub;if(typeof J!=="string"||J.length===0)throw Error("Aether Wealth userinfo response did not include a user id");let Q=typeof G.email==="string"?G.email:void 0,W=typeof G.name==="string"?G.name:void 0;return{sub:J,...Q?{email:Q}:{},...W?{name:W}:{}}}async function _0($,v,D=fetch){return(await JG($,v,D)).sub}class r1{target;store;identity;deps;constructor($,v,D,X={}){this.target=$;this.store=v;this.identity=D;this.deps=X}cachedUserId=null;async getStoredCredential(){let $=await this.store.get(this.target.host);if(!$)return null;let v=(this.deps.now??Date.now)();if($.expiresAt<=v)return await this.store.clear(this.target.host),null;return $}async getAccessToken(){return(await this.getStoredCredential())?.accessToken??null}async getUserId(){let $=await this.getAccessToken();if(!$)throw Error('Not signed in to Aether Wealth. Call "login" first.');if(this.cachedUserId?.token===$)return this.cachedUserId.userId;let v=await _0(this.target.baseUrl,$);return this.cachedUserId={token:$,userId:v},v}async login(){let $=await(this.deps.runLoginImpl??f0)({authBaseUrl:this.target.baseUrl,identity:this.identity,...this.deps.log?{log:this.deps.log}:{},...this.deps.now?{now:this.deps.now}:{}});await this.store.set(this.target.host,{accessToken:$.accessToken,expiresAt:$.expiresAt})}async logout(){await this.store.clear(this.target.host)}}var{create:I3,defineProperty:T7,getOwnPropertyDescriptor:V3,getOwnPropertyNames:R7,getPrototypeOf:K3}=Object,L3=Object.prototype.hasOwnProperty,W4=($,v)=>function(){return v||(0,$[R7($)[0]])((v={exports:{}}).exports,v),v.exports},B3=($,v,D,X)=>{if(v&&typeof v==="object"||typeof v==="function"){for(var U=R7(v),G=0,J=U.length,Q;G<J;G++)if(Q=U[G],!L3.call($,Q)&&Q!==D)T7($,Q,{get:((W)=>v[W]).bind(null,Q),enumerable:!(X=V3(v,Q))||X.enumerable})}return $},$$=($,v,D)=>(D=$!=null?I3(K3($)):{},B3(v||!$||!$.__esModule?T7(D,"default",{value:$,enumerable:!0}):D,$)),g7=W4({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/typeof.js"($,v){function D(X){return v.exports=D=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(U){return typeof U}:function(U){return U&&typeof Symbol=="function"&&U.constructor===Symbol&&U!==Symbol.prototype?"symbol":typeof U},v.exports.__esModule=!0,v.exports.default=v.exports,D(X)}v.exports=D,v.exports.__esModule=!0,v.exports.default=v.exports}}),N3=W4({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/toPrimitive.js"($,v){var D=g7().default;function X(U,G){if(D(U)!="object"||!U)return U;var J=U[Symbol.toPrimitive];if(J!==void 0){var Q=J.call(U,G||"default");if(D(Q)!="object")return Q;throw TypeError("@@toPrimitive must return a primitive value.")}return(G==="string"?String:Number)(U)}v.exports=X,v.exports.__esModule=!0,v.exports.default=v.exports}}),Z3=W4({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/toPropertyKey.js"($,v){var D=g7().default,X=N3();function U(G){var J=X(G,"string");return D(J)=="symbol"?J:J+""}v.exports=U,v.exports.__esModule=!0,v.exports.default=v.exports}}),A4=W4({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/defineProperty.js"($,v){var D=Z3();function X(U,G,J){return(G=D(G))in U?Object.defineProperty(U,G,{value:J,enumerable:!0,configurable:!0,writable:!0}):U[G]=J,U}v.exports=X,v.exports.__esModule=!0,v.exports.default=v.exports}}),H$=W4({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/objectSpread2.js"($,v){var D=A4();function X(G,J){var Q=Object.keys(G);if(Object.getOwnPropertySymbols){var W=Object.getOwnPropertySymbols(G);J&&(W=W.filter(function(z){return Object.getOwnPropertyDescriptor(G,z).enumerable})),Q.push.apply(Q,W)}return Q}function U(G){for(var J=1;J<arguments.length;J++){var Q=arguments[J]!=null?arguments[J]:{};J%2?X(Object(Q),!0).forEach(function(W){D(G,W,Q[W])}):Object.getOwnPropertyDescriptors?Object.defineProperties(G,Object.getOwnPropertyDescriptors(Q)):X(Object(Q)).forEach(function(W){Object.defineProperty(G,W,Object.getOwnPropertyDescriptor(Q,W))})}return G}v.exports=U,v.exports.__esModule=!0,v.exports.default=v.exports}});function z4($){let v={subscribe(D){let X=null,U=!1,G=!1,J=!1;function Q(){if(X===null){J=!0;return}if(G)return;if(G=!0,typeof X==="function")X();else if(X)X.unsubscribe()}if(X=$({next(W){var z;if(U)return;(z=D.next)===null||z===void 0||z.call(D,W)},error(W){var z;if(U)return;U=!0,(z=D.error)===null||z===void 0||z.call(D,W),Q()},complete(){var W;if(U)return;U=!0,(W=D.complete)===null||W===void 0||W.call(D),Q()}}),J)Q();return{unsubscribe:Q}},pipe(...D){return D.reduce(O3,v)}};return v}function O3($,v){return v($)}function QG($){let v=new AbortController;return new Promise((X,U)=>{let G=!1;function J(){if(G)return;G=!0,Q.unsubscribe()}v.signal.addEventListener("abort",()=>{U(v.signal.reason)});let Q=$.subscribe({next(W){G=!0,X(W),J()},error(W){U(W)},complete(){v.abort(),J()}})})}function WG($){return(v)=>{let D=0,X=null,U=[];function G(){if(X)return;X=v.subscribe({next(Q){for(let z of U){var W;(W=z.next)===null||W===void 0||W.call(z,Q)}},error(Q){for(let z of U){var W;(W=z.error)===null||W===void 0||W.call(z,Q)}},complete(){for(let W of U){var Q;(Q=W.complete)===null||Q===void 0||Q.call(W)}}})}function J(){if(D===0&&X){let Q=X;X=null,Q.unsubscribe()}}return z4((Q)=>{return D++,U.push(Q),G(),{unsubscribe(){D--,J();let W=U.findIndex((z)=>z===Q);if(W>-1)U.splice(W,1)}}})}}var mu=Symbol();function i0($){let v=$,D=[],X=(J)=>{if(v!==void 0)J.next(v);D.push(J)},U=(J)=>{D.splice(D.indexOf(J),1)},G=z4((J)=>{return X(J),()=>{U(J)}});return G.next=(J)=>{if(v===J)return;v=J;for(let Q of D)Q.next(J)},G.get=()=>v,G}function C7($){return z4((v)=>{function D(U=0,G=$.op){let J=$.links[U];if(!J)throw Error("No more links to execute - did you forget to add an ending link?");return J({op:G,next(W){return D(U+1,W)}})}return D().subscribe(v)})}function x4($){return!!$&&!Array.isArray($)&&typeof $==="object"}function y0(){return Object.create(null)}var x6={PARSE_ERROR:-32700,BAD_REQUEST:-32600,INTERNAL_SERVER_ERROR:-32603,NOT_IMPLEMENTED:-32603,BAD_GATEWAY:-32603,SERVICE_UNAVAILABLE:-32603,GATEWAY_TIMEOUT:-32603,UNAUTHORIZED:-32001,PAYMENT_REQUIRED:-32002,FORBIDDEN:-32003,NOT_FOUND:-32004,METHOD_NOT_SUPPORTED:-32005,TIMEOUT:-32008,CONFLICT:-32009,PRECONDITION_FAILED:-32012,PAYLOAD_TOO_LARGE:-32013,UNSUPPORTED_MEDIA_TYPE:-32015,UNPROCESSABLE_CONTENT:-32022,PRECONDITION_REQUIRED:-32028,TOO_MANY_REQUESTS:-32029,CLIENT_CLOSED_REQUEST:-32099};var u7=[x6.BAD_GATEWAY,x6.SERVICE_UNAVAILABLE,x6.GATEWAY_TIMEOUT,x6.INTERNAL_SERVER_ERROR];var{create:F3,defineProperty:f7,getOwnPropertyDescriptor:j3,getOwnPropertyNames:_7,getPrototypeOf:A3}=Object,w3=Object.prototype.hasOwnProperty,p1=($,v)=>function(){return v||(0,$[_7($)[0]])((v={exports:{}}).exports,v),v.exports},M3=($,v,D,X)=>{if(v&&typeof v==="object"||typeof v==="function"){for(var U=_7(v),G=0,J=U.length,Q;G<J;G++)if(Q=U[G],!w3.call($,Q)&&Q!==D)f7($,Q,{get:((W)=>v[W]).bind(null,Q),enumerable:!(X=j3(v,Q))||X.enumerable})}return $},t1=($,v,D)=>(D=$!=null?F3(A3($)):{},M3(v||!$||!$.__esModule?f7(D,"default",{value:$,enumerable:!0}):D,$)),i7=()=>{},x7=($)=>{if(Object.freeze)Object.freeze($)};function y7($,v,D){var X;let U=v.join(".");return(X=D[U])!==null&&X!==void 0||(D[U]=new Proxy(i7,{get(G,J){if(typeof J!=="string"||J==="then")return;return y7($,[...v,J],D)},apply(G,J,Q){let W=v[v.length-1];if(W==="valueOf"||W==="toString"||W==="toJSON")return`tRPC.proxy(${v.slice(0,-1).join(".")})`;let z={args:Q,path:v};if(W==="call")z={args:Q.length>=2?[Q[1]]:[],path:v.slice(0,-1)};else if(W==="apply")z={args:Q.length>=2?Q[1]:[],path:v.slice(0,-1)};return x7(z.args),x7(z.path),$(z)}})),D[U]}var n0=($)=>y7($,[],y0()),zG=($)=>{return new Proxy(i7,{get(v,D){if(D==="then")return;return $(D)}})};var n7=p1({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/typeof.js"($,v){function D(X){return v.exports=D=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(U){return typeof U}:function(U){return U&&typeof Symbol=="function"&&U.constructor===Symbol&&U!==Symbol.prototype?"symbol":typeof U},v.exports.__esModule=!0,v.exports.default=v.exports,D(X)}v.exports=D,v.exports.__esModule=!0,v.exports.default=v.exports}}),P3=p1({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/toPrimitive.js"($,v){var D=n7().default;function X(U,G){if(D(U)!="object"||!U)return U;var J=U[Symbol.toPrimitive];if(J!==void 0){var Q=J.call(U,G||"default");if(D(Q)!="object")return Q;throw TypeError("@@toPrimitive must return a primitive value.")}return(G==="string"?String:Number)(U)}v.exports=X,v.exports.__esModule=!0,v.exports.default=v.exports}}),b3=p1({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/toPropertyKey.js"($,v){var D=n7().default,X=P3();function U(G){var J=X(G,"string");return D(J)=="symbol"?J:J+""}v.exports=U,v.exports.__esModule=!0,v.exports.default=v.exports}}),YG=p1({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/defineProperty.js"($,v){var D=b3();function X(U,G,J){return(G=D(G))in U?Object.defineProperty(U,G,{value:J,enumerable:!0,configurable:!0,writable:!0}):U[G]=J,U}v.exports=X,v.exports.__esModule=!0,v.exports.default=v.exports}}),l0=p1({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/objectSpread2.js"($,v){var D=YG();function X(G,J){var Q=Object.keys(G);if(Object.getOwnPropertySymbols){var W=Object.getOwnPropertySymbols(G);J&&(W=W.filter(function(z){return Object.getOwnPropertyDescriptor(G,z).enumerable})),Q.push.apply(Q,W)}return Q}function U(G){for(var J=1;J<arguments.length;J++){var Q=arguments[J]!=null?arguments[J]:{};J%2?X(Object(Q),!0).forEach(function(W){D(G,W,Q[W])}):Object.getOwnPropertyDescriptors?Object.defineProperties(G,Object.getOwnPropertyDescriptors(Q)):X(Object(Q)).forEach(function(W){Object.defineProperty(G,W,Object.getOwnPropertyDescriptor(Q,W))})}return G}v.exports=U,v.exports.__esModule=!0,v.exports.default=v.exports}}),Gx=t1(l0(),1);var zx=t1(YG(),1);var h0=t1(l0(),1);function k3($,v){if("error"in $){let X=v.deserialize($.error);return{ok:!1,error:(0,h0.default)((0,h0.default)({},$),{},{error:X})}}return{ok:!0,result:(0,h0.default)((0,h0.default)({},$.result),(!$.result.type||$.result.type==="data")&&{type:"data",data:v.deserialize($.result.data)})}}var IG=class extends Error{constructor(){super("Unable to transform response from server")}};function VG($,v){let D;try{D=k3($,v)}catch(X){throw new IG}if(!D.ok&&(!x4(D.error.error)||typeof D.error.error.code!=="number"))throw new IG;if(D.ok&&!x4(D.result))throw new IG;return D}var Yx=t1(l0(),1);var Ix=Symbol();var m0=$$(A4(),1),f6=$$(H$(),1);function l7($){return $ instanceof w4}function g3($){return x4($)&&x4($.error)&&typeof $.error.code==="number"&&typeof $.error.message==="string"}function C3($,v){if(typeof $==="string")return $;if(x4($)&&typeof $.message==="string")return $.message;return v}var w4=class $ extends Error{constructor(v,D){var X,U;let G=D===null||D===void 0?void 0:D.cause;super(v,{cause:G});(0,m0.default)(this,"cause",void 0),(0,m0.default)(this,"shape",void 0),(0,m0.default)(this,"data",void 0),(0,m0.default)(this,"meta",void 0),this.meta=D===null||D===void 0?void 0:D.meta,this.cause=G,this.shape=D===null||D===void 0||(X=D.result)===null||X===void 0?void 0:X.error,this.data=D===null||D===void 0||(U=D.result)===null||U===void 0?void 0:U.error.data,this.name="TRPCClientError",Object.setPrototypeOf(this,$.prototype)}static from(v,D={}){let X=v;if(l7(X)){if(D.meta)X.meta=(0,f6.default)((0,f6.default)({},X.meta),D.meta);return X}if(g3(X))return new $(X.error.message,(0,f6.default)((0,f6.default)({},D),{},{result:X,cause:D.cause}));return new $(C3(X,"Unknown error"),(0,f6.default)((0,f6.default)({},D),{},{cause:X}))}};function c0($){let v=$;if(!v)return{input:{serialize:(D)=>D,deserialize:(D)=>D},output:{serialize:(D)=>D,deserialize:(D)=>D}};if("input"in v)return v;return{input:v,output:v}}var h7=($)=>typeof $==="function";function m7($){if($)return $;if(typeof window<"u"&&h7(window.fetch))return window.fetch;if(typeof globalThis<"u"&&h7(globalThis.fetch))return globalThis.fetch;throw Error("No fetch implementation found")}var o1=$$(H$());function d0($){return{url:$.url.toString(),fetch:$.fetch,transformer:c0($.transformer),methodOverride:$.methodOverride}}function u3($){let v={};for(let D=0;D<$.length;D++){let X=$[D];v[D]=X}return v}var x3={query:"GET",mutation:"POST",subscription:"PATCH"};function c7($){return"input"in $?$.transformer.input.serialize($.input):u3($.inputs.map((v)=>$.transformer.input.serialize(v)))}var a1=($)=>{let v=$.url.split("?"),X=v[0].replace(/\/$/,"")+"/"+$.path,U=[];if(v[1])U.push(v[1]);if("inputs"in $)U.push("batch=1");if($.type==="query"||$.type==="subscription"){let G=c7($);if(G!==void 0&&$.methodOverride!=="POST")U.push(`input=${encodeURIComponent(JSON.stringify(G))}`)}if(U.length)X+="?"+U.join("&");return X},d7=($)=>{if($.type==="query"&&$.methodOverride!=="POST")return;let v=c7($);return v!==void 0?JSON.stringify(v):void 0},KG=($)=>{return p7((0,o1.default)((0,o1.default)({},$),{},{contentTypeHeader:"application/json",getUrl:a1,getBody:d7}))},f3=class extends Error{constructor(){super("AbortError");this.name="AbortError",this.message="AbortError"}},_3=($)=>{var v;if(!($===null||$===void 0?void 0:$.aborted))return;if((v=$.throwIfAborted)===null||v===void 0||v.call($),typeof DOMException<"u")throw new DOMException("AbortError","AbortError");throw new f3};async function r7($){var v,D;_3($.signal);let X=$.getUrl($),U=$.getBody($),G=(v=$.methodOverride)!==null&&v!==void 0?v:x3[$.type],J=await(async()=>{let W=await $.headers();if(Symbol.iterator in W)return Object.fromEntries(W);return W})(),Q=(0,o1.default)((0,o1.default)((0,o1.default)({},$.contentTypeHeader&&G!=="GET"?{"content-type":$.contentTypeHeader}:{}),$.trpcAcceptHeader?{[(D=$.trpcAcceptHeaderKey)!==null&&D!==void 0?D:"trpc-accept"]:$.trpcAcceptHeader}:void 0),J);return m7($.fetch)(X,{method:G,signal:$.signal,body:U,headers:Q})}async function p7($){let v={},D=await r7($);v.response=D;let X=await D.json();return v.responseJSON=X,{json:X,meta:v}}var Ff=$$(H$(),1);var t7=()=>{throw Error("Something went wrong. Please submit an issue at https://github.com/trpc/trpc/issues/new")};function LG($){let v=null,D=null,X=()=>{clearTimeout(D),D=null,v=null};function U(Q){let W=[[]],z=0;while(!0){let V=Q[z];if(!V)break;let K=W[W.length-1];if(V.aborted){var Y;(Y=V.reject)===null||Y===void 0||Y.call(V,Error("Aborted")),z++;continue}if($.validate(K.concat(V).map((N)=>N.key))){K.push(V),z++;continue}if(K.length===0){var I;(I=V.reject)===null||I===void 0||I.call(V,Error("Input is too big for a single dispatch")),z++;continue}W.push([])}return W}function G(){let Q=U(v);X();for(let W of Q){if(!W.length)continue;let z={items:W};for(let I of W)I.batch=z;$.fetch(z.items.map((I)=>I.key)).then(async(I)=>{await Promise.all(I.map(async(K,L)=>{let N=z.items[L];try{var Z;let S=await Promise.resolve(K);(Z=N.resolve)===null||Z===void 0||Z.call(N,S)}catch(S){var F;(F=N.reject)===null||F===void 0||F.call(N,S)}N.batch=null,N.reject=null,N.resolve=null}));for(let K of z.items){var V;(V=K.reject)===null||V===void 0||V.call(K,Error("Missing result")),K.batch=null}}).catch((I)=>{for(let K of z.items){var V;(V=K.reject)===null||V===void 0||V.call(K,I),K.batch=null}})}}function J(Q){var W;let z={aborted:!1,key:Q,batch:null,resolve:t7,reject:t7},Y=new Promise((I,V)=>{var K;z.reject=V,z.resolve=I,(K=v)!==null&&K!==void 0||(v=[]),v.push(z)});return(W=D)!==null&&W!==void 0||(D=setTimeout(G)),Y}return{load:J}}function o7(...$){let v=new AbortController,D=$.length,X=0,U=()=>{if(++X===D)v.abort()};for(let G of $)if(G===null||G===void 0?void 0:G.aborted)U();else G===null||G===void 0||G.addEventListener("abort",U,{once:!0});return v.signal}var r0=$$(H$(),1);function BG($){var v,D;let X=d0($),U=(v=$.maxURLLength)!==null&&v!==void 0?v:1/0,G=(D=$.maxItems)!==null&&D!==void 0?D:1/0;return()=>{let J=(Y)=>{return{validate(I){if(U===1/0&&G===1/0)return!0;if(I.length>G)return!1;let V=I.map((N)=>N.path).join(","),K=I.map((N)=>N.input);return a1((0,r0.default)((0,r0.default)({},X),{},{type:Y,path:V,inputs:K,signal:null})).length<=U},async fetch(I){let V=I.map((S)=>S.path).join(","),K=I.map((S)=>S.input),L=o7(...I.map((S)=>S.signal)),N=await KG((0,r0.default)((0,r0.default)({},X),{},{path:V,inputs:K,type:Y,headers(){if(!$.headers)return{};if(typeof $.headers==="function")return $.headers({opList:I});return $.headers},signal:L}));return(Array.isArray(N.json)?N.json:I.map(()=>N.json)).map((S)=>({meta:N.meta,json:S}))}}},Q=LG(J("query")),W=LG(J("mutation")),z={query:Q,mutation:W};return({op:Y})=>{return z4((I)=>{if(Y.type==="subscription")throw Error("Subscriptions are unsupported by `httpLink` - use `httpSubscriptionLink` or `wsLink`");let K=z[Y.type].load(Y),L=void 0;return K.then((N)=>{L=N;let Z=VG(N.json,X.transformer.output);if(!Z.ok){I.error(w4.from(Z.error,{meta:N.meta}));return}I.next({context:N.meta,result:Z.result}),I.complete()}).catch((N)=>{I.error(w4.from(N,{meta:L===null||L===void 0?void 0:L.meta}))}),()=>{}})}}}var kf=$$(H$(),1);var NG=($,...v)=>{return typeof $==="function"?$(...v):$},uf=$$(A4(),1);function i3(){let $,v;return{promise:new Promise((X,U)=>{$=X,v=U}),resolve:$,reject:v}}async function y3($){let v=await NG($.url);if(!$.connectionParams)return v;let X=`${v.includes("?")?"&":"?"}connectionParams=1`;return v+X}async function n3($,v){let D={method:"connectionParams",data:await NG($)};return v.encode(D)}var xf=$$(A4(),1);var p4=$$(A4(),1);function l3($){let{promise:v,resolve:D,reject:X}=i3();return $.addEventListener("open",()=>{$.removeEventListener("error",X),D()}),$.addEventListener("error",X),v}function h3($,{intervalMs:v,pongTimeoutMs:D}){let X,U;function G(){X=setTimeout(()=>{$.send("PING"),U=setTimeout(()=>{$.close()},D)},v)}function J(){clearTimeout(X),G()}function Q(){clearTimeout(U),J()}$.addEventListener("open",G),$.addEventListener("message",({data:W})=>{if(clearTimeout(X),G(),W==="PONG")Q()}),$.addEventListener("close",()=>{clearTimeout(X),clearTimeout(U)})}var m3=class ${constructor(v){var D;if((0,p4.default)(this,"id",++$.connectCount),(0,p4.default)(this,"WebSocketPonyfill",void 0),(0,p4.default)(this,"urlOptions",void 0),(0,p4.default)(this,"keepAliveOpts",void 0),(0,p4.default)(this,"encoder",void 0),(0,p4.default)(this,"wsObservable",i0(null)),(0,p4.default)(this,"openPromise",null),this.WebSocketPonyfill=(D=v.WebSocketPonyfill)!==null&&D!==void 0?D:WebSocket,!this.WebSocketPonyfill)throw Error("No WebSocket implementation found - you probably don't want to use this on the server, but if you do you need to pass a `WebSocket`-ponyfill");this.urlOptions=v.urlOptions,this.keepAliveOpts=v.keepAlive,this.encoder=v.encoder}get ws(){return this.wsObservable.get()}set ws(v){this.wsObservable.next(v)}isOpen(){return!!this.ws&&this.ws.readyState===this.WebSocketPonyfill.OPEN&&!this.openPromise}isClosed(){return!!this.ws&&(this.ws.readyState===this.WebSocketPonyfill.CLOSING||this.ws.readyState===this.WebSocketPonyfill.CLOSED)}async open(){var v=this;if(v.openPromise)return v.openPromise;v.id=++$.connectCount;let D=y3(v.urlOptions).then((X)=>new v.WebSocketPonyfill(X));v.openPromise=D.then(async(X)=>{if(v.ws=X,X.binaryType="arraybuffer",X.addEventListener("message",function({data:U}){if(U==="PING")this.send("PONG")}),v.keepAliveOpts.enabled)h3(X,v.keepAliveOpts);if(X.addEventListener("close",()=>{if(v.ws===X)v.ws=null}),await l3(X),v.urlOptions.connectionParams)X.send(await n3(v.urlOptions.connectionParams,v.encoder))});try{await v.openPromise}finally{v.openPromise=null}}async close(){var v=this;try{await v.openPromise}finally{var D;(D=v.ws)===null||D===void 0||D.close()}}};(0,p4.default)(m3,"connectCount",0);var ff=$$(A4(),1),_f=$$(H$(),1);var ZG=$$(A4(),1),a7=$$(H$(),1),c3=class{constructor($){(0,ZG.default)(this,"links",void 0),(0,ZG.default)(this,"runtime",void 0),(0,ZG.default)(this,"requestId",void 0),this.requestId=0,this.runtime={},this.links=$.links.map((v)=>v(this.runtime))}$request($){var v;return C7({links:this.links,op:(0,a7.default)((0,a7.default)({},$),{},{context:(v=$.context)!==null&&v!==void 0?v:{},id:++this.requestId})}).pipe(WG())}async requestAsPromise($){var v=this;try{let D=v.$request($);return(await QG(D)).result.data}catch(D){throw w4.from(D)}}query($,v,D){return this.requestAsPromise({type:"query",path:$,input:v,context:D===null||D===void 0?void 0:D.context,signal:D===null||D===void 0?void 0:D.signal})}mutation($,v,D){return this.requestAsPromise({type:"mutation",path:$,input:v,context:D===null||D===void 0?void 0:D.context,signal:D===null||D===void 0?void 0:D.signal})}subscription($,v,D){return this.$request({type:"subscription",path:$,input:v,context:D.context,signal:D.signal}).subscribe({next(U){switch(U.result.type){case"state":{var G;(G=D.onConnectionStateChange)===null||G===void 0||G.call(D,U.result);break}case"started":{var J;(J=D.onStarted)===null||J===void 0||J.call(D,{context:U.context});break}case"stopped":{var Q;(Q=D.onStopped)===null||Q===void 0||Q.call(D);break}case"data":case void 0:{var W;(W=D.onData)===null||W===void 0||W.call(D,U.result.data);break}}},error(U){var G;(G=D.onError)===null||G===void 0||G.call(D,U)},complete(){var U;(U=D.onComplete)===null||U===void 0||U.call(D)}})}};var d3=Symbol.for("trpc_untypedClient"),r3={query:"query",mutate:"mutation",subscribe:"subscription"},p3=($)=>{return r3[$]};function t3($){let v=n0(({path:D,args:X})=>{let U=[...D],G=p3(U.pop()),J=U.join(".");return $[G](J,...X)});return zG((D)=>{if(D===d3)return $;return v[D]})}function $Y($){let v=new c3($);return t3(v)}var L_=$$(H$(),1);var e7=$$(H$(),1);function o3($,v){if(!v)return $;if($!=null&&typeof $!=="object")return $;return(0,e7.default)((0,e7.default)({},$!==null&&$!==void 0?$:{}),{},{lastEventId:v})}var a3=W4({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/asyncIterator.js"($,v){function D(U){var G,J,Q,W=2;for(typeof Symbol<"u"&&(J=Symbol.asyncIterator,Q=Symbol.iterator);W--;){if(J&&(G=U[J])!=null)return G.call(U);if(Q&&(G=U[Q])!=null)return new X(G.call(U));J="@@asyncIterator",Q="@@iterator"}throw TypeError("Object is not async iterable")}function X(U){function G(J){if(Object(J)!==J)return Promise.reject(TypeError(J+" is not an object."));var Q=J.done;return Promise.resolve(J.value).then(function(W){return{value:W,done:Q}})}return X=function(Q){this.s=Q,this.n=Q.next},X.prototype={s:null,n:null,next:function(){return G(this.n.apply(this.s,arguments))},return:function(Q){var W=this.s.return;return W===void 0?Promise.resolve({value:Q,done:!0}):G(W.apply(this.s,arguments))},throw:function(Q){var W=this.s.return;return W===void 0?Promise.reject(Q):G(W.apply(this.s,arguments))}},new X(U)}v.exports=D,v.exports.__esModule=!0,v.exports.default=v.exports}}),B_=$$(a3(),1);var s7=$$(H$(),1);function vY($){return()=>{return(v)=>{return z4((D)=>{let X,U=void 0,G=void 0;Q(1);function J(){let W=v.op;if(!G)return W;return(0,s7.default)((0,s7.default)({},W),{},{input:o3(W.input,G)})}function Q(W){let z=J();X=v.next(z).subscribe({error(Y){var I,V;if(!$.retry({op:z,attempts:W,error:Y})){D.error(Y);return}let L=(I=(V=$.retryDelayMs)===null||V===void 0?void 0:V.call($,W))!==null&&I!==void 0?I:0;if(L<=0){Q(W+1);return}U=setTimeout(()=>Q(W+1),L)},next(Y){if((!Y.result.type||Y.result.type==="data")&&Y.result.id)G=Y.result.id;D.next(Y)},complete(){D.complete()}})}return()=>{X.unsubscribe(),clearTimeout(U)}})}}}var e3=W4({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/usingCtx.js"($,v){function D(){var X=typeof SuppressedError=="function"?SuppressedError:function(Q,W){var z=Error();return z.name="SuppressedError",z.error=Q,z.suppressed=W,z},U={},G=[];function J(Q,W){if(W!=null){if(Object(W)!==W)throw TypeError("using declarations can only be used with objects, functions, null, or undefined.");if(Q)var z=W[Symbol.asyncDispose||Symbol.for("Symbol.asyncDispose")];if(z===void 0&&(z=W[Symbol.dispose||Symbol.for("Symbol.dispose")],Q))var Y=z;if(typeof z!="function")throw TypeError("Object is not disposable.");Y&&(z=function(){try{Y.call(W)}catch(V){return Promise.reject(V)}}),G.push({v:W,d:z,a:Q})}else Q&&G.push({d:W,a:Q});return W}return{e:U,u:J.bind(null,!1),a:J.bind(null,!0),d:function(){var W,z=this.e,Y=0;function I(){for(;W=G.pop();)try{if(!W.a&&Y===1)return Y=0,G.push(W),Promise.resolve().then(I);if(W.d){var K=W.d.call(W.v);if(W.a)return Y|=2,Promise.resolve(K).then(I,V)}else Y|=1}catch(L){return V(L)}if(Y===1)return z!==U?Promise.reject(z):Promise.resolve();if(z!==U)throw z}function V(K){return z=z!==U?new X(K,z):K,I()}return I()}}}v.exports=D,v.exports.__esModule=!0,v.exports.default=v.exports}}),UY=W4({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/OverloadYield.js"($,v){function D(X,U){this.v=X,this.k=U}v.exports=D,v.exports.__esModule=!0,v.exports.default=v.exports}}),s3=W4({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/awaitAsyncGenerator.js"($,v){var D=UY();function X(U){return new D(U,0)}v.exports=X,v.exports.__esModule=!0,v.exports.default=v.exports}}),$F=W4({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/wrapAsyncGenerator.js"($,v){var D=UY();function X(G){return function(){return new U(G.apply(this,arguments))}}function U(G){var J,Q;function W(Y,I){try{var V=G[Y](I),K=V.value,L=K instanceof D;Promise.resolve(L?K.v:K).then(function(N){if(L){var Z=Y==="return"?"return":"next";if(!K.k||N.done)return W(Z,N);N=G[Z](N).value}z(V.done?"return":"normal",N)},function(N){W("throw",N)})}catch(N){z("throw",N)}}function z(Y,I){switch(Y){case"return":J.resolve({value:I,done:!0});break;case"throw":J.reject(I);break;default:J.resolve({value:I,done:!1})}(J=J.next)?W(J.key,J.arg):Q=null}this._invoke=function(Y,I){return new Promise(function(V,K){var L={key:Y,arg:I,resolve:V,reject:K,next:null};Q?Q=Q.next=L:(J=Q=L,W(Y,I))})},typeof G.return!="function"&&(this.return=void 0)}U.prototype[typeof Symbol=="function"&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},U.prototype.next=function(G){return this._invoke("next",G)},U.prototype.throw=function(G){return this._invoke("throw",G)},U.prototype.return=function(G){return this._invoke("return",G)},v.exports=X,v.exports.__esModule=!0,v.exports.default=v.exports}}),N_=$$(e3(),1),Z_=$$(s3(),1),O_=$$($F(),1),H_=$$(H$(),1);var vF=4,UF=300,DF=4000;function OG($){if(!($ instanceof w4))return!1;let v=$.data;return v?.code==="TOO_MANY_REQUESTS"||v?.httpStatus===429}function t4($,v,D={}){return R0($),$Y({links:[vY({retry:({op:X,error:U,attempts:G})=>X.type==="query"&&G<vF&&OG(U),retryDelayMs:(X)=>Math.min(UF*2**X,DF)}),BG({url:$,...D.fetch?{fetch:D.fetch}:{},headers:async()=>{let X=await v();return X?{authorization:`Bearer ${X}`}:{}}})]})}function p0($){let v=/^(\d+)\.(\d+)\.(\d+)/.exec($.trim());if(!v)return null;return[Number(v[1]),Number(v[2]),Number(v[3])]}function t0($,v){let D=p0($),X=p0(v);if(!D||!X)return 0;for(let U=0;U<3;U++){let G=D[U],J=X[U];if(G!==J)return G<J?-1:1}return 0}function HG($){let{ownVersion:v,minVersion:D,latestVersion:X}=$;if(D&&t0(v,D)<0)return{blocked:!0,blockedMessage:`This Aether Wealth MCP (v${v}) is below the minimum supported version (v${D}) and can no longer be used. Update it and restart your MCP client:
|
|
27
27
|
npm install -g @aetherwealth/mcp@latest`};if(X&&t0(v,X)<0)return{blocked:!1,nudge:`A newer Aether Wealth MCP is available (v${v} -> v${X}). Update for the latest tools:
|
|
28
|
-
npm install -g @aetherwealth/mcp@latest`};return{blocked:!1}}async function o0($){let v=`https://registry.npmjs.org/${encodeURIComponent($)}/latest`,D=new AbortController,X=setTimeout(()=>D.abort(),4000);try{let U=await fetch(v,{signal:D.signal});if(!U.ok)return null;let G=await U.json();return typeof G.version==="string"?G.version:null}catch{return null}finally{clearTimeout(X)}}var DY=5000;function XY($,v,D){return new Promise((X)=>{let U=setTimeout(()=>X(D),v),G=(J)=>{clearTimeout(U),X(J)};$.then(G,()=>G(D))})}async function a0($){let[v,D]=await Promise.all([XY($.fetchMinVersion(),DY,null),XY($.fetchLatestVersion(),DY,null)]);return HG({ownVersion:$.ownVersion,minVersion:v,latestVersion:D})}var GY="https://api.aetherwealth.ai",JY="http://localhost:9006",f4="https://app.aetherwealth.ai";var Y4=typeof __MCPB_BUILD__==="boolean"?__MCPB_BUILD__:!1;function XF($){let v=$.NODE_ENV;return v==="development"||v==="test"}function QY($){let v=$.AETHER_BASE_URL,D="";if(v&&v.trim().length>0)D=v.trim();else if(XF($))D=JY;else D=GY;let X;try{X=new URL(D)}catch{return{config:null,errors:[`AETHER_BASE_URL is not a valid URL: "${D}"`]}}if(X.protocol!=="https:"&&!j4(X.hostname))return{config:null,errors:[`AETHER_BASE_URL must use https (loopback hosts exempt): "${D}"`]};let U=D.replace(/\/$/,"");return{config:{baseUrl:U,trpcUrl:`${U}/trpc`,host:X.host},errors:[]}}var WY="@aetherwealth/mcp";function zY($={}){let v=$.maxPerWindow??120,D=$.now??Date.now,X=new Map;return{check(U){let G=U.startsWith("ip:")?v*4:v,J=D(),Q=X.get(U);if(!Q||J-Q.windowStart>=60000){if(X.size>=1e4){let W=X.keys().next().value;if(W!==void 0)X.delete(W)}return X.delete(U),X.set(U,{windowStart:J,count:1}),{allowed:!0}}if(Q.count>=G)return{allowed:!1,retryAfterSeconds:Math.max(1,Math.ceil((Q.windowStart+60000-J)/1000))};return Q.count+=1,{allowed:!0}}}}function YY($){let v=async()=>{throw Error("hosted mode: tool invoked without a per-request context (wiring bug)")};return{session:{getAccessToken:v,getUserId:v,login:v,logout:v},trpc:t4($,v)}}var GF=60000,JF=1000,QF=4000;function IY($){let v=$.fetchImpl??fetch,D=$.now??Date.now,X=$.ttlMs??GF,U=`${$.baseUrl.replace(/\/$/,"")}${d1}`,G=new Map,J=new Map,Q=async(W)=>{let z=await WF(U,W,v);if(!z.ok)return z;if(G.size>=JF){let Y=G.keys().next().value;if(Y!==void 0)G.delete(Y)}return G.set(W,{userId:z.userId,expiresAt:D()+X}),z};return{async verify(W){let z=G.get(W);if(z&&z.expiresAt>D())return{ok:!0,userId:z.userId};G.delete(W);let Y=J.get(W);if(Y)return Y;let I=Q(W);J.set(W,I);try{return await I}finally{J.delete(W)}},invalidate(W){G.delete(W)}}}async function WF($,v,D){let X=new AbortController,U=setTimeout(()=>X.abort(),QF),G;try{G=await D($,{method:"GET",headers:{authorization:`Bearer ${v}`,accept:"application/json"},signal:X.signal})}catch(Q){throw Error(`token verification could not reach userinfo at ${$}`,{cause:Q})}finally{clearTimeout(U)}if(G.status===401||G.status===403)return{ok:!1};if(!G.ok)throw Error(`token verification failed upstream (HTTP ${G.status})`);let J=(await F4(G)).sub;if(typeof J!=="string"||J.length===0)throw Error("userinfo response did not include a user id");return{ok:!0,userId:J}}import{timingSafeEqual as HH}from"node:crypto";import{createServer as LC}from"node:http";var l={};C4(l,{xor:()=>tI,xid:()=>FI,void:()=>cI,uuidv7:()=>VI,uuidv6:()=>II,uuidv4:()=>YI,uuid:()=>zI,util:()=>w,url:()=>KI,uppercase:()=>o6,unknown:()=>D$,union:()=>X$,undefined:()=>hI,ulid:()=>HI,uint64:()=>nI,uint32:()=>_I,tuple:()=>uW,trim:()=>U1,treeifyError:()=>RG,transform:()=>wD,toUpperCase:()=>X1,toLowerCase:()=>D1,toJSONSchema:()=>oU,templateLiteral:()=>QV,symbol:()=>lI,superRefine:()=>Wz,success:()=>DV,stringbool:()=>LV,stringFormat:()=>TI,string:()=>H,strictObject:()=>pI,startsWith:()=>e6,slugify:()=>G1,size:()=>w6,setErrorMap:()=>CA,set:()=>sI,safeParseAsync:()=>KW,safeParse:()=>VW,safeEncodeAsync:()=>FW,safeEncode:()=>OW,safeDecodeAsync:()=>jW,safeDecode:()=>HW,registry:()=>jU,regexes:()=>a$,regex:()=>p6,refine:()=>Qz,record:()=>s,readonly:()=>vz,property:()=>dU,promise:()=>WV,prettifyError:()=>gG,preprocess:()=>xv,prefault:()=>rW,positive:()=>lU,pipe:()=>DD,partialRecord:()=>oI,parseAsync:()=>IW,parse:()=>YW,overwrite:()=>I4,optional:()=>J$,object:()=>q,number:()=>t,nullish:()=>UV,nullable:()=>Pv,null:()=>Sv,normalize:()=>v1,nonpositive:()=>mU,nonoptional:()=>pW,nonnegative:()=>cU,never:()=>AD,negative:()=>hU,nativeEnum:()=>$V,nanoid:()=>NI,nan:()=>XV,multipleOf:()=>$6,minSize:()=>q4,minLength:()=>i4,mime:()=>$1,meta:()=>VV,maxSize:()=>v6,maxLength:()=>M6,map:()=>eI,mac:()=>wI,lte:()=>e$,lt:()=>P4,lowercase:()=>t6,looseRecord:()=>aI,looseObject:()=>w$,locales:()=>Fv,literal:()=>R,length:()=>P6,lazy:()=>Xz,ksuid:()=>jI,keyof:()=>rI,jwt:()=>EI,json:()=>BV,iso:()=>G6,ipv6:()=>MI,ipv4:()=>AI,invertCodec:()=>JV,intersection:()=>B1,int64:()=>yI,int32:()=>fI,int:()=>UD,instanceof:()=>KV,includes:()=>a6,httpUrl:()=>LI,hostname:()=>RI,hex:()=>gI,hash:()=>CI,guid:()=>WI,gte:()=>x$,gt:()=>b4,globalRegistry:()=>A$,getErrorMap:()=>uA,function:()=>zV,fromJSONSchema:()=>ZV,formatError:()=>Jv,float64:()=>xI,float32:()=>uI,flattenError:()=>Gv,file:()=>vV,exactOptional:()=>lW,enum:()=>M$,endsWith:()=>s6,encodeAsync:()=>NW,encode:()=>LW,emoji:()=>BI,email:()=>QI,e164:()=>kI,discriminatedUnion:()=>Rv,describe:()=>IV,decodeAsync:()=>ZW,decode:()=>BW,date:()=>dI,custom:()=>bD,cuid2:()=>OI,cuid:()=>ZI,core:()=>y4,config:()=>V$,coerce:()=>Yz,codec:()=>GV,clone:()=>C$,cidrv6:()=>bI,cidrv4:()=>PI,check:()=>YV,catch:()=>aW,boolean:()=>K$,bigint:()=>iI,base64url:()=>SI,base64:()=>qI,array:()=>c,any:()=>mI,_function:()=>zV,_default:()=>cW,_ZodString:()=>XD,ZodXor:()=>TW,ZodXID:()=>ID,ZodVoid:()=>kW,ZodUnknown:()=>qW,ZodUnion:()=>Tv,ZodUndefined:()=>MW,ZodUUID:()=>S4,ZodURL:()=>qv,ZodULID:()=>YD,ZodType:()=>y,ZodTuple:()=>CW,ZodTransform:()=>yW,ZodTemplateLiteral:()=>Uz,ZodSymbol:()=>wW,ZodSuccess:()=>tW,ZodStringFormat:()=>U$,ZodString:()=>Y1,ZodSet:()=>fW,ZodRecord:()=>W1,ZodRealError:()=>h$,ZodReadonly:()=>$z,ZodPromise:()=>Gz,ZodPreprocess:()=>sW,ZodPrefault:()=>dW,ZodPipe:()=>gv,ZodOptional:()=>MD,ZodObject:()=>Ev,ZodNumberFormat:()=>b6,ZodNumber:()=>V1,ZodNullable:()=>hW,ZodNull:()=>PW,ZodNonOptional:()=>PD,ZodNever:()=>SW,ZodNanoID:()=>QD,ZodNaN:()=>eW,ZodMap:()=>xW,ZodMAC:()=>AW,ZodLiteral:()=>_W,ZodLazy:()=>Dz,ZodKSUID:()=>VD,ZodJWT:()=>FD,ZodIssueCode:()=>gA,ZodIntersection:()=>gW,ZodISOTime:()=>$D,ZodISODuration:()=>vD,ZodISODateTime:()=>eU,ZodISODate:()=>sU,ZodIPv6:()=>LD,ZodIPv4:()=>KD,ZodGUID:()=>Mv,ZodFunction:()=>Jz,ZodFirstPartyTypeKind:()=>zz,ZodFile:()=>iW,ZodExactOptional:()=>nW,ZodError:()=>TA,ZodEnum:()=>z1,ZodEmoji:()=>JD,ZodEmail:()=>GD,ZodE164:()=>HD,ZodDiscriminatedUnion:()=>RW,ZodDefault:()=>mW,ZodDate:()=>kv,ZodCustomStringFormat:()=>I1,ZodCustom:()=>uv,ZodCodec:()=>Cv,ZodCatch:()=>oW,ZodCUID2:()=>zD,ZodCUID:()=>WD,ZodCIDRv6:()=>ND,ZodCIDRv4:()=>BD,ZodBoolean:()=>K1,ZodBigIntFormat:()=>jD,ZodBigInt:()=>L1,ZodBase64URL:()=>OD,ZodBase64:()=>ZD,ZodArray:()=>EW,ZodAny:()=>bW,TimePrecision:()=>iQ,NEVER:()=>FG,$output:()=>gQ,$input:()=>CQ,$brand:()=>jG});var y4={};C4(y4,{version:()=>qJ,util:()=>w,treeifyError:()=>RG,toJSONSchema:()=>oU,toDotPath:()=>OY,safeParseAsync:()=>zv,safeParse:()=>m6,safeEncodeAsync:()=>PY,safeEncode:()=>wY,safeDecodeAsync:()=>bY,safeDecode:()=>MY,registry:()=>jU,regexes:()=>a$,process:()=>e,prettifyError:()=>gG,parseAsync:()=>Wv,parse:()=>Qv,meta:()=>H9,locales:()=>Fv,isValidJWT:()=>pY,isValidBase64URL:()=>rY,isValidBase64:()=>tJ,initializeContext:()=>U6,globalRegistry:()=>A$,globalConfig:()=>O6,formatError:()=>Jv,flattenError:()=>Gv,finalize:()=>X6,extractDefs:()=>D6,encodeAsync:()=>jY,encode:()=>HY,describe:()=>O9,decodeAsync:()=>AY,decode:()=>FY,createToJSONSchemaMethod:()=>j9,createStandardJSONSchemaMethod:()=>Q1,config:()=>V$,clone:()=>C$,_xor:()=>QA,_xid:()=>RU,_void:()=>z9,_uuidv7:()=>bU,_uuidv6:()=>PU,_uuidv4:()=>MU,_uuid:()=>wU,_url:()=>Av,_uppercase:()=>o6,_unknown:()=>Q9,_union:()=>JA,_undefined:()=>X9,_ulid:()=>TU,_uint64:()=>U9,_uint32:()=>oQ,_tuple:()=>YA,_trim:()=>U1,_transform:()=>ZA,_toUpperCase:()=>X1,_toLowerCase:()=>D1,_templateLiteral:()=>bA,_symbol:()=>D9,_superRefine:()=>Z9,_success:()=>AA,_stringbool:()=>F9,_stringFormat:()=>J1,_string:()=>xQ,_startsWith:()=>e6,_slugify:()=>G1,_size:()=>w6,_set:()=>KA,_safeParseAsync:()=>c6,_safeParse:()=>h6,_safeEncodeAsync:()=>JU,_safeEncode:()=>XU,_safeDecodeAsync:()=>QU,_safeDecode:()=>GU,_regex:()=>p6,_refine:()=>N9,_record:()=>IA,_readonly:()=>PA,_property:()=>dU,_promise:()=>SA,_positive:()=>lU,_pipe:()=>MA,_parseAsync:()=>l6,_parse:()=>n6,_overwrite:()=>I4,_optional:()=>OA,_number:()=>mQ,_nullable:()=>HA,_null:()=>G9,_normalize:()=>v1,_nonpositive:()=>mU,_nonoptional:()=>jA,_nonnegative:()=>cU,_never:()=>W9,_negative:()=>hU,_nativeEnum:()=>BA,_nanoid:()=>SU,_nan:()=>V9,_multipleOf:()=>$6,_minSize:()=>q4,_minLength:()=>i4,_min:()=>x$,_mime:()=>$1,_maxSize:()=>v6,_maxLength:()=>M6,_max:()=>e$,_map:()=>VA,_mac:()=>_Q,_lte:()=>e$,_lt:()=>P4,_lowercase:()=>t6,_literal:()=>NA,_length:()=>P6,_lazy:()=>qA,_ksuid:()=>gU,_jwt:()=>nU,_isoTime:()=>lQ,_isoDuration:()=>hQ,_isoDateTime:()=>yQ,_isoDate:()=>nQ,_ipv6:()=>uU,_ipv4:()=>CU,_intersection:()=>zA,_int64:()=>v9,_int32:()=>tQ,_int:()=>dQ,_includes:()=>a6,_guid:()=>jv,_gte:()=>x$,_gt:()=>b4,_float64:()=>pQ,_float32:()=>rQ,_file:()=>L9,_enum:()=>LA,_endsWith:()=>s6,_encodeAsync:()=>UU,_encode:()=>$U,_emoji:()=>qU,_email:()=>AU,_e164:()=>yU,_discriminatedUnion:()=>WA,_default:()=>FA,_decodeAsync:()=>DU,_decode:()=>vU,_date:()=>Y9,_custom:()=>B9,_cuid2:()=>EU,_cuid:()=>kU,_coercedString:()=>fQ,_coercedNumber:()=>cQ,_coercedDate:()=>I9,_coercedBoolean:()=>eQ,_coercedBigint:()=>$9,_cidrv6:()=>fU,_cidrv4:()=>xU,_check:()=>DI,_catch:()=>wA,_boolean:()=>aQ,_bigint:()=>sQ,_base64url:()=>iU,_base64:()=>_U,_array:()=>K9,_any:()=>J9,TimePrecision:()=>iQ,NEVER:()=>FG,JSONSchemaGenerator:()=>GW,JSONSchema:()=>XI,Doc:()=>IU,$output:()=>gQ,$input:()=>CQ,$constructor:()=>B,$brand:()=>jG,$ZodXor:()=>K8,$ZodXID:()=>_J,$ZodVoid:()=>z8,$ZodUnknown:()=>Q8,$ZodUnion:()=>Lv,$ZodUndefined:()=>X8,$ZodUUID:()=>EJ,$ZodURL:()=>RJ,$ZodULID:()=>fJ,$ZodType:()=>_,$ZodTuple:()=>OU,$ZodTransform:()=>A8,$ZodTemplateLiteral:()=>g8,$ZodSymbol:()=>D8,$ZodSuccess:()=>S8,$ZodStringFormat:()=>v$,$ZodString:()=>A6,$ZodSet:()=>O8,$ZodRegistry:()=>uQ,$ZodRecord:()=>N8,$ZodRealError:()=>l$,$ZodReadonly:()=>R8,$ZodPromise:()=>u8,$ZodPreprocess:()=>T8,$ZodPrefault:()=>b8,$ZodPipe:()=>FU,$ZodOptional:()=>HU,$ZodObjectJIT:()=>V8,$ZodObject:()=>aY,$ZodNumberFormat:()=>v8,$ZodNumber:()=>NU,$ZodNullable:()=>M8,$ZodNull:()=>G8,$ZodNonOptional:()=>q8,$ZodNever:()=>W8,$ZodNanoID:()=>CJ,$ZodNaN:()=>E8,$ZodMap:()=>Z8,$ZodMAC:()=>dJ,$ZodLiteral:()=>F8,$ZodLazy:()=>x8,$ZodKSUID:()=>iJ,$ZodJWT:()=>sJ,$ZodIntersection:()=>B8,$ZodISOTime:()=>lJ,$ZodISODuration:()=>hJ,$ZodISODateTime:()=>yJ,$ZodISODate:()=>nJ,$ZodIPv6:()=>cJ,$ZodIPv4:()=>mJ,$ZodGUID:()=>kJ,$ZodFunction:()=>C8,$ZodFile:()=>j8,$ZodExactOptional:()=>w8,$ZodError:()=>Xv,$ZodEnum:()=>H8,$ZodEncodeError:()=>H6,$ZodEmoji:()=>gJ,$ZodEmail:()=>TJ,$ZodE164:()=>eJ,$ZodDiscriminatedUnion:()=>L8,$ZodDefault:()=>P8,$ZodDate:()=>Y8,$ZodCustomStringFormat:()=>$8,$ZodCustom:()=>f8,$ZodCodec:()=>Bv,$ZodCheckUpperCase:()=>FJ,$ZodCheckStringFormat:()=>d6,$ZodCheckStartsWith:()=>AJ,$ZodCheckSizeEquals:()=>LJ,$ZodCheckRegex:()=>OJ,$ZodCheckProperty:()=>MJ,$ZodCheckOverwrite:()=>bJ,$ZodCheckNumberFormat:()=>YJ,$ZodCheckMultipleOf:()=>zJ,$ZodCheckMinSize:()=>KJ,$ZodCheckMinLength:()=>NJ,$ZodCheckMimeType:()=>PJ,$ZodCheckMaxSize:()=>VJ,$ZodCheckMaxLength:()=>BJ,$ZodCheckLowerCase:()=>HJ,$ZodCheckLessThan:()=>zU,$ZodCheckLengthEquals:()=>ZJ,$ZodCheckIncludes:()=>jJ,$ZodCheckGreaterThan:()=>YU,$ZodCheckEndsWith:()=>wJ,$ZodCheckBigIntFormat:()=>IJ,$ZodCheck:()=>G$,$ZodCatch:()=>k8,$ZodCUID2:()=>xJ,$ZodCUID:()=>uJ,$ZodCIDRv6:()=>pJ,$ZodCIDRv4:()=>rJ,$ZodBoolean:()=>Kv,$ZodBigIntFormat:()=>U8,$ZodBigInt:()=>ZU,$ZodBase64URL:()=>aJ,$ZodBase64:()=>oJ,$ZodAsyncError:()=>M4,$ZodArray:()=>I8,$ZodAny:()=>J8});var VY,FG=Object.freeze({status:"aborted"});function B($,v,D){function X(Q,W){if(!Q._zod)Object.defineProperty(Q,"_zod",{value:{def:W,constr:J,traits:new Set},enumerable:!1});if(Q._zod.traits.has($))return;Q._zod.traits.add($),v(Q,W);let z=J.prototype,Y=Object.keys(z);for(let I=0;I<Y.length;I++){let V=Y[I];if(!(V in Q))Q[V]=z[V].bind(Q)}}let U=D?.Parent??Object;class G extends U{}Object.defineProperty(G,"name",{value:$});function J(Q){var W;let z=D?.Parent?new G:this;X(z,Q),(W=z._zod).deferred??(W.deferred=[]);for(let Y of z._zod.deferred)Y();return z}return Object.defineProperty(J,"init",{value:X}),Object.defineProperty(J,Symbol.hasInstance,{value:(Q)=>{if(D?.Parent&&Q instanceof D.Parent)return!0;return Q?._zod?.traits?.has($)}}),Object.defineProperty(J,"name",{value:$}),J}var jG=Symbol("zod_brand");class M4 extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class H6 extends Error{constructor($){super(`Encountered unidirectional transform during encode: ${$}`);this.name="ZodEncodeError"}}(VY=globalThis).__zod_globalConfig??(VY.__zod_globalConfig={});var O6=globalThis.__zod_globalConfig;function V$($){if($)Object.assign(O6,$);return O6}var w={};C4(w,{unwrapMessage:()=>e1,uint8ArrayToHex:()=>gF,uint8ArrayToBase64url:()=>TF,uint8ArrayToBase64:()=>BY,stringifyPrimitive:()=>j,slugify:()=>MG,shallowClone:()=>bG,safeExtend:()=>PF,required:()=>SF,randomString:()=>OF,propertyKeyTypes:()=>vv,promiseAllObject:()=>ZF,primitiveTypes:()=>qG,prefixIssues:()=>n$,pick:()=>AF,partial:()=>qF,parsedType:()=>A,optionalKeys:()=>SG,omit:()=>wF,objectClone:()=>LF,numKeys:()=>HF,nullish:()=>o4,normalizeParams:()=>M,mergeDefs:()=>_4,merge:()=>bF,jsonStringifyReplacer:()=>_6,joinValues:()=>O,issue:()=>y6,isPlainObject:()=>e4,isObject:()=>F6,hexToUint8Array:()=>RF,getSizableOrigin:()=>Uv,getParsedType:()=>FF,getLengthableOrigin:()=>Dv,getEnumValues:()=>s1,getElementAtPath:()=>NF,floatSafeRemainder:()=>wG,finalizeIssue:()=>u$,extend:()=>MF,explicitlyAborted:()=>TG,escapeRegex:()=>v4,esc:()=>e0,defineLazy:()=>m,createTransparentProxy:()=>jF,cloneDef:()=>BF,clone:()=>C$,cleanRegex:()=>$v,cleanEnum:()=>kF,captureStackTrace:()=>s0,cached:()=>i6,base64urlToUint8Array:()=>EF,base64ToUint8Array:()=>LY,assignProp:()=>a4,assertNotEqual:()=>YF,assertNever:()=>VF,assertIs:()=>IF,assertEqual:()=>zF,assert:()=>KF,allowsEval:()=>PG,aborted:()=>s4,NUMBER_FORMAT_RANGES:()=>kG,Class:()=>NY,BIGINT_FORMAT_RANGES:()=>EG});function zF($){return $}function YF($){return $}function IF($){}function VF($){throw Error("Unexpected value in exhaustive check")}function KF($){}function s1($){let v=Object.values($).filter((X)=>typeof X==="number");return Object.entries($).filter(([X,U])=>v.indexOf(+X)===-1).map(([X,U])=>U)}function O($,v="|"){return $.map((D)=>j(D)).join(v)}function _6($,v){if(typeof v==="bigint")return v.toString();return v}function i6($){return{get value(){{let D=$();return Object.defineProperty(this,"value",{value:D}),D}throw Error("cached value already set")}}}function o4($){return $===null||$===void 0}function $v($){let v=$.startsWith("^")?1:0,D=$.endsWith("$")?$.length-1:$.length;return $.slice(v,D)}function wG($,v){let D=$/v,X=Math.round(D),U=Number.EPSILON*Math.max(Math.abs(D),1);if(Math.abs(D-X)<U)return 0;return D-X}var KY=Symbol("evaluating");function m($,v,D){let X=void 0;Object.defineProperty($,v,{get(){if(X===KY)return;if(X===void 0)X=KY,X=D();return X},set(U){Object.defineProperty($,v,{value:U})},configurable:!0})}function LF($){return Object.create(Object.getPrototypeOf($),Object.getOwnPropertyDescriptors($))}function a4($,v,D){Object.defineProperty($,v,{value:D,writable:!0,enumerable:!0,configurable:!0})}function _4(...$){let v={};for(let D of $){let X=Object.getOwnPropertyDescriptors(D);Object.assign(v,X)}return Object.defineProperties({},v)}function BF($){return _4($._zod.def)}function NF($,v){if(!v)return $;return v.reduce((D,X)=>D?.[X],$)}function ZF($){let v=Object.keys($),D=v.map((X)=>$[X]);return Promise.all(D).then((X)=>{let U={};for(let G=0;G<v.length;G++)U[v[G]]=X[G];return U})}function OF($=10){let D="";for(let X=0;X<$;X++)D+="abcdefghijklmnopqrstuvwxyz"[Math.floor(Math.random()*26)];return D}function e0($){return JSON.stringify($)}function MG($){return $.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}var s0="captureStackTrace"in Error?Error.captureStackTrace:(...$)=>{};function F6($){return typeof $==="object"&&$!==null&&!Array.isArray($)}var PG=i6(()=>{if(O6.jitless)return!1;if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return new Function(""),!0}catch($){return!1}});function e4($){if(F6($)===!1)return!1;let v=$.constructor;if(v===void 0)return!0;if(typeof v!=="function")return!0;let D=v.prototype;if(F6(D)===!1)return!1;if(Object.prototype.hasOwnProperty.call(D,"isPrototypeOf")===!1)return!1;return!0}function bG($){if(e4($))return{...$};if(Array.isArray($))return[...$];if($ instanceof Map)return new Map($);if($ instanceof Set)return new Set($);return $}function HF($){let v=0;for(let D in $)if(Object.prototype.hasOwnProperty.call($,D))v++;return v}var FF=($)=>{let v=typeof $;switch(v){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN($)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":if(Array.isArray($))return"array";if($===null)return"null";if($.then&&typeof $.then==="function"&&$.catch&&typeof $.catch==="function")return"promise";if(typeof Map<"u"&&$ instanceof Map)return"map";if(typeof Set<"u"&&$ instanceof Set)return"set";if(typeof Date<"u"&&$ instanceof Date)return"date";if(typeof File<"u"&&$ instanceof File)return"file";return"object";default:throw Error(`Unknown data type: ${v}`)}},vv=new Set(["string","number","symbol"]),qG=new Set(["string","number","bigint","boolean","symbol","undefined"]);function v4($){return $.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function C$($,v,D){let X=new $._zod.constr(v??$._zod.def);if(!v||D?.parent)X._zod.parent=$;return X}function M($){let v=$;if(!v)return{};if(typeof v==="string")return{error:()=>v};if(v?.message!==void 0){if(v?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");v.error=v.message}if(delete v.message,typeof v.error==="string")return{...v,error:()=>v.error};return v}function jF($){let v;return new Proxy({},{get(D,X,U){return v??(v=$()),Reflect.get(v,X,U)},set(D,X,U,G){return v??(v=$()),Reflect.set(v,X,U,G)},has(D,X){return v??(v=$()),Reflect.has(v,X)},deleteProperty(D,X){return v??(v=$()),Reflect.deleteProperty(v,X)},ownKeys(D){return v??(v=$()),Reflect.ownKeys(v)},getOwnPropertyDescriptor(D,X){return v??(v=$()),Reflect.getOwnPropertyDescriptor(v,X)},defineProperty(D,X,U){return v??(v=$()),Reflect.defineProperty(v,X,U)}})}function j($){if(typeof $==="bigint")return $.toString()+"n";if(typeof $==="string")return`"${$}"`;return`${$}`}function SG($){return Object.keys($).filter((v)=>{return $[v]._zod.optin==="optional"&&$[v]._zod.optout==="optional"})}var kG={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]},EG={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function AF($,v){let D=$._zod.def,X=D.checks;if(X&&X.length>0)throw Error(".pick() cannot be used on object schemas containing refinements");let G=_4($._zod.def,{get shape(){let J={};for(let Q in v){if(!(Q in D.shape))throw Error(`Unrecognized key: "${Q}"`);if(!v[Q])continue;J[Q]=D.shape[Q]}return a4(this,"shape",J),J},checks:[]});return C$($,G)}function wF($,v){let D=$._zod.def,X=D.checks;if(X&&X.length>0)throw Error(".omit() cannot be used on object schemas containing refinements");let G=_4($._zod.def,{get shape(){let J={...$._zod.def.shape};for(let Q in v){if(!(Q in D.shape))throw Error(`Unrecognized key: "${Q}"`);if(!v[Q])continue;delete J[Q]}return a4(this,"shape",J),J},checks:[]});return C$($,G)}function MF($,v){if(!e4(v))throw Error("Invalid input to extend: expected a plain object");let D=$._zod.def.checks;if(D&&D.length>0){let G=$._zod.def.shape;for(let J in v)if(Object.getOwnPropertyDescriptor(G,J)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let U=_4($._zod.def,{get shape(){let G={...$._zod.def.shape,...v};return a4(this,"shape",G),G}});return C$($,U)}function PF($,v){if(!e4(v))throw Error("Invalid input to safeExtend: expected a plain object");let D=_4($._zod.def,{get shape(){let X={...$._zod.def.shape,...v};return a4(this,"shape",X),X}});return C$($,D)}function bF($,v){if($._zod.def.checks?.length)throw Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");let D=_4($._zod.def,{get shape(){let X={...$._zod.def.shape,...v._zod.def.shape};return a4(this,"shape",X),X},get catchall(){return v._zod.def.catchall},checks:v._zod.def.checks??[]});return C$($,D)}function qF($,v,D){let U=v._zod.def.checks;if(U&&U.length>0)throw Error(".partial() cannot be used on object schemas containing refinements");let J=_4(v._zod.def,{get shape(){let Q=v._zod.def.shape,W={...Q};if(D)for(let z in D){if(!(z in Q))throw Error(`Unrecognized key: "${z}"`);if(!D[z])continue;W[z]=$?new $({type:"optional",innerType:Q[z]}):Q[z]}else for(let z in Q)W[z]=$?new $({type:"optional",innerType:Q[z]}):Q[z];return a4(this,"shape",W),W},checks:[]});return C$(v,J)}function SF($,v,D){let X=_4(v._zod.def,{get shape(){let U=v._zod.def.shape,G={...U};if(D)for(let J in D){if(!(J in G))throw Error(`Unrecognized key: "${J}"`);if(!D[J])continue;G[J]=new $({type:"nonoptional",innerType:U[J]})}else for(let J in U)G[J]=new $({type:"nonoptional",innerType:U[J]});return a4(this,"shape",G),G}});return C$(v,X)}function s4($,v=0){if($.aborted===!0)return!0;for(let D=v;D<$.issues.length;D++)if($.issues[D]?.continue!==!0)return!0;return!1}function TG($,v=0){if($.aborted===!0)return!0;for(let D=v;D<$.issues.length;D++)if($.issues[D]?.continue===!1)return!0;return!1}function n$($,v){return v.map((D)=>{var X;return(X=D).path??(X.path=[]),D.path.unshift($),D})}function e1($){return typeof $==="string"?$:$?.message}function u$($,v,D){let X=$.message?$.message:e1($.inst?._zod.def?.error?.($))??e1(v?.error?.($))??e1(D.customError?.($))??e1(D.localeError?.($))??"Invalid input",{inst:U,continue:G,input:J,...Q}=$;if(Q.path??(Q.path=[]),Q.message=X,v?.reportInput)Q.input=J;return Q}function Uv($){if($ instanceof Set)return"set";if($ instanceof Map)return"map";if($ instanceof File)return"file";return"unknown"}function Dv($){if(Array.isArray($))return"array";if(typeof $==="string")return"string";return"unknown"}function A($){let v=typeof $;switch(v){case"number":return Number.isNaN($)?"nan":"number";case"object":{if($===null)return"null";if(Array.isArray($))return"array";let D=$;if(D&&Object.getPrototypeOf(D)!==Object.prototype&&"constructor"in D&&D.constructor)return D.constructor.name}}return v}function y6(...$){let[v,D,X]=$;if(typeof v==="string")return{message:v,code:"custom",input:D,inst:X};return{...v}}function kF($){return Object.entries($).filter(([v,D])=>{return Number.isNaN(Number.parseInt(v,10))}).map((v)=>v[1])}function LY($){let v=atob($),D=new Uint8Array(v.length);for(let X=0;X<v.length;X++)D[X]=v.charCodeAt(X);return D}function BY($){let v="";for(let D=0;D<$.length;D++)v+=String.fromCharCode($[D]);return btoa(v)}function EF($){let v=$.replace(/-/g,"+").replace(/_/g,"/"),D="=".repeat((4-v.length%4)%4);return LY(v+D)}function TF($){return BY($).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function RF($){let v=$.replace(/^0x/,"");if(v.length%2!==0)throw Error("Invalid hex string length");let D=new Uint8Array(v.length/2);for(let X=0;X<v.length;X+=2)D[X/2]=Number.parseInt(v.slice(X,X+2),16);return D}function gF($){return Array.from($).map((v)=>v.toString(16).padStart(2,"0")).join("")}class NY{constructor(...$){}}var ZY=($,v)=>{$.name="$ZodError",Object.defineProperty($,"_zod",{value:$._zod,enumerable:!1}),Object.defineProperty($,"issues",{value:v,enumerable:!1}),$.message=JSON.stringify(v,_6,2),Object.defineProperty($,"toString",{value:()=>$.message,enumerable:!1})},Xv=B("$ZodError",ZY),l$=B("$ZodError",ZY,{Parent:Error});function Gv($,v=(D)=>D.message){let D={},X=[];for(let U of $.issues)if(U.path.length>0)D[U.path[0]]=D[U.path[0]]||[],D[U.path[0]].push(v(U));else X.push(v(U));return{formErrors:X,fieldErrors:D}}function Jv($,v=(D)=>D.message){let D={_errors:[]},X=(U,G=[])=>{for(let J of U.issues)if(J.code==="invalid_union"&&J.errors.length)J.errors.map((Q)=>X({issues:Q},[...G,...J.path]));else if(J.code==="invalid_key")X({issues:J.issues},[...G,...J.path]);else if(J.code==="invalid_element")X({issues:J.issues},[...G,...J.path]);else{let Q=[...G,...J.path];if(Q.length===0)D._errors.push(v(J));else{let W=D,z=0;while(z<Q.length){let Y=Q[z];if(z!==Q.length-1)W[Y]=W[Y]||{_errors:[]};else W[Y]=W[Y]||{_errors:[]},W[Y]._errors.push(v(J));W=W[Y],z++}}}};return X($),D}function RG($,v=(D)=>D.message){let D={errors:[]},X=(U,G=[])=>{var J,Q;for(let W of U.issues)if(W.code==="invalid_union"&&W.errors.length)W.errors.map((z)=>X({issues:z},[...G,...W.path]));else if(W.code==="invalid_key")X({issues:W.issues},[...G,...W.path]);else if(W.code==="invalid_element")X({issues:W.issues},[...G,...W.path]);else{let z=[...G,...W.path];if(z.length===0){D.errors.push(v(W));continue}let Y=D,I=0;while(I<z.length){let V=z[I],K=I===z.length-1;if(typeof V==="string")Y.properties??(Y.properties={}),(J=Y.properties)[V]??(J[V]={errors:[]}),Y=Y.properties[V];else Y.items??(Y.items=[]),(Q=Y.items)[V]??(Q[V]={errors:[]}),Y=Y.items[V];if(K)Y.errors.push(v(W));I++}}};return X($),D}function OY($){let v=[],D=$.map((X)=>typeof X==="object"?X.key:X);for(let X of D)if(typeof X==="number")v.push(`[${X}]`);else if(typeof X==="symbol")v.push(`[${JSON.stringify(String(X))}]`);else if(/[^\w$]/.test(X))v.push(`[${JSON.stringify(X)}]`);else{if(v.length)v.push(".");v.push(X)}return v.join("")}function gG($){let v=[],D=[...$.issues].sort((X,U)=>(X.path??[]).length-(U.path??[]).length);for(let X of D)if(v.push(`✖ ${X.message}`),X.path?.length)v.push(` → at ${OY(X.path)}`);return v.join(`
|
|
29
|
-
`)}var n6=($)=>(v,D,X,U)=>{let G=X?{...X,async:!1}:{async:!1},J=v._zod.run({value:D,issues:[]},G);if(J instanceof Promise)throw new M4;if(J.issues.length){let Q=new(U?.Err??$)(J.issues.map((W)=>u$(W,G,V$())));throw s0(Q,U?.callee),Q}return J.value},Qv=n6(l$),l6=($)=>async(v,D,X,U)=>{let G=X?{...X,async:!0}:{async:!0},J=v._zod.run({value:D,issues:[]},G);if(J instanceof Promise)J=await J;if(J.issues.length){let Q=new(U?.Err??$)(J.issues.map((W)=>u$(W,G,V$())));throw s0(Q,U?.callee),Q}return J.value},Wv=l6(l$),h6=($)=>(v,D,X)=>{let U=X?{...X,async:!1}:{async:!1},G=v._zod.run({value:D,issues:[]},U);if(G instanceof Promise)throw new M4;return G.issues.length?{success:!1,error:new($??Xv)(G.issues.map((J)=>u$(J,U,V$())))}:{success:!0,data:G.value}},m6=h6(l$),c6=($)=>async(v,D,X)=>{let U=X?{...X,async:!0}:{async:!0},G=v._zod.run({value:D,issues:[]},U);if(G instanceof Promise)G=await G;return G.issues.length?{success:!1,error:new $(G.issues.map((J)=>u$(J,U,V$())))}:{success:!0,data:G.value}},zv=c6(l$),$U=($)=>(v,D,X)=>{let U=X?{...X,direction:"backward"}:{direction:"backward"};return n6($)(v,D,U)},HY=$U(l$),vU=($)=>(v,D,X)=>{return n6($)(v,D,X)},FY=vU(l$),UU=($)=>async(v,D,X)=>{let U=X?{...X,direction:"backward"}:{direction:"backward"};return l6($)(v,D,U)},jY=UU(l$),DU=($)=>async(v,D,X)=>{return l6($)(v,D,X)},AY=DU(l$),XU=($)=>(v,D,X)=>{let U=X?{...X,direction:"backward"}:{direction:"backward"};return h6($)(v,D,U)},wY=XU(l$),GU=($)=>(v,D,X)=>{return h6($)(v,D,X)},MY=GU(l$),JU=($)=>async(v,D,X)=>{let U=X?{...X,direction:"backward"}:{direction:"backward"};return c6($)(v,D,U)},PY=JU(l$),QU=($)=>async(v,D,X)=>{return c6($)(v,D,X)},bY=QU(l$);var a$={};C4(a$,{xid:()=>fG,uuid7:()=>_F,uuid6:()=>fF,uuid4:()=>xF,uuid:()=>j6,uppercase:()=>WJ,unicodeEmail:()=>qY,undefined:()=>JJ,ulid:()=>xG,time:()=>sG,string:()=>vJ,sha512_hex:()=>Gj,sha512_base64url:()=>Qj,sha512_base64:()=>Jj,sha384_hex:()=>Uj,sha384_base64url:()=>Xj,sha384_base64:()=>Dj,sha256_hex:()=>sF,sha256_base64url:()=>vj,sha256_base64:()=>$j,sha1_hex:()=>oF,sha1_base64url:()=>eF,sha1_base64:()=>aF,rfc5322Email:()=>yF,number:()=>Yv,null:()=>GJ,nanoid:()=>iG,md5_hex:()=>rF,md5_base64url:()=>tF,md5_base64:()=>pF,mac:()=>dG,lowercase:()=>QJ,ksuid:()=>_G,ipv6:()=>cG,ipv4:()=>mG,integer:()=>DJ,idnEmail:()=>nF,httpProtocol:()=>oG,html5Email:()=>iF,hostname:()=>mF,hex:()=>dF,guid:()=>nG,extendedDuration:()=>uF,emoji:()=>hG,email:()=>lG,e164:()=>aG,duration:()=>yG,domain:()=>cF,datetime:()=>$J,date:()=>eG,cuid2:()=>uG,cuid:()=>CG,cidrv6:()=>pG,cidrv4:()=>rG,browserEmail:()=>lF,boolean:()=>XJ,bigint:()=>UJ,base64url:()=>WU,base64:()=>tG});var CG=/^[cC][0-9a-z]{6,}$/,uG=/^[0-9a-z]+$/,xG=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,fG=/^[0-9a-vA-V]{20}$/,_G=/^[A-Za-z0-9]{27}$/,iG=/^[a-zA-Z0-9_-]{21}$/,yG=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,uF=/^[-+]?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)?)??$/,nG=/^([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})$/,j6=($)=>{if(!$)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}-${$}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`)},xF=j6(4),fF=j6(6),_F=j6(7),lG=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,iF=/^[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])?)*$/,yF=/^(([^<>()\[\]\\.,;:\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,}))$/,qY=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,nF=qY,lF=/^[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])?)*$/,hF="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function hG(){return new RegExp(hF,"u")}var mG=/^(?:(?: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])$/,cG=/^(([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}|:))$/,dG=($)=>{let v=v4($??":");return new RegExp(`^(?:[0-9A-F]{2}${v}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${v}){5}[0-9a-f]{2}$`)},rG=/^((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])$/,pG=/^(([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])$/,tG=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,WU=/^[A-Za-z0-9_-]*$/,mF=/^(?=.{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])?)*\.?$/,cF=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,oG=/^https?$/,aG=/^\+[1-9]\d{6,14}$/,SY="(?:(?:\\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])))",eG=new RegExp(`^${SY}$`);function kY($){return typeof $.precision==="number"?$.precision===-1?"(?:[01]\\d|2[0-3]):[0-5]\\d":$.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{${$.precision}}`:"(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?"}function sG($){return new RegExp(`^${kY($)}$`)}function $J($){let v=kY({precision:$.precision}),D=["Z"];if($.local)D.push("");if($.offset)D.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let X=`${v}(?:${D.join("|")})`;return new RegExp(`^${SY}T(?:${X})$`)}var vJ=($)=>{let v=$?`[\\s\\S]{${$?.minimum??0},${$?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${v}$`)},UJ=/^-?\d+n?$/,DJ=/^-?\d+$/,Yv=/^-?\d+(?:\.\d+)?$/,XJ=/^(?:true|false)$/i,GJ=/^null$/i;var JJ=/^undefined$/i;var QJ=/^[^A-Z]*$/,WJ=/^[^a-z]*$/,dF=/^[0-9a-fA-F]*$/;function Iv($,v){return new RegExp(`^[A-Za-z0-9+/]{${$}}${v}$`)}function Vv($){return new RegExp(`^[A-Za-z0-9_-]{${$}}$`)}var rF=/^[0-9a-fA-F]{32}$/,pF=Iv(22,"=="),tF=Vv(22),oF=/^[0-9a-fA-F]{40}$/,aF=Iv(27,"="),eF=Vv(27),sF=/^[0-9a-fA-F]{64}$/,$j=Iv(43,"="),vj=Vv(43),Uj=/^[0-9a-fA-F]{96}$/,Dj=Iv(64,""),Xj=Vv(64),Gj=/^[0-9a-fA-F]{128}$/,Jj=Iv(86,"=="),Qj=Vv(86);var G$=B("$ZodCheck",($,v)=>{var D;$._zod??($._zod={}),$._zod.def=v,(D=$._zod).onattach??(D.onattach=[])}),TY={number:"number",bigint:"bigint",object:"date"},zU=B("$ZodCheckLessThan",($,v)=>{G$.init($,v);let D=TY[typeof v.value];$._zod.onattach.push((X)=>{let U=X._zod.bag,G=(v.inclusive?U.maximum:U.exclusiveMaximum)??Number.POSITIVE_INFINITY;if(v.value<G)if(v.inclusive)U.maximum=v.value;else U.exclusiveMaximum=v.value}),$._zod.check=(X)=>{if(v.inclusive?X.value<=v.value:X.value<v.value)return;X.issues.push({origin:D,code:"too_big",maximum:typeof v.value==="object"?v.value.getTime():v.value,input:X.value,inclusive:v.inclusive,inst:$,continue:!v.abort})}}),YU=B("$ZodCheckGreaterThan",($,v)=>{G$.init($,v);let D=TY[typeof v.value];$._zod.onattach.push((X)=>{let U=X._zod.bag,G=(v.inclusive?U.minimum:U.exclusiveMinimum)??Number.NEGATIVE_INFINITY;if(v.value>G)if(v.inclusive)U.minimum=v.value;else U.exclusiveMinimum=v.value}),$._zod.check=(X)=>{if(v.inclusive?X.value>=v.value:X.value>v.value)return;X.issues.push({origin:D,code:"too_small",minimum:typeof v.value==="object"?v.value.getTime():v.value,input:X.value,inclusive:v.inclusive,inst:$,continue:!v.abort})}}),zJ=B("$ZodCheckMultipleOf",($,v)=>{G$.init($,v),$._zod.onattach.push((D)=>{var X;(X=D._zod.bag).multipleOf??(X.multipleOf=v.value)}),$._zod.check=(D)=>{if(typeof D.value!==typeof v.value)throw Error("Cannot mix number and bigint in multiple_of check.");if(typeof D.value==="bigint"?D.value%v.value===BigInt(0):wG(D.value,v.value)===0)return;D.issues.push({origin:typeof D.value,code:"not_multiple_of",divisor:v.value,input:D.value,inst:$,continue:!v.abort})}}),YJ=B("$ZodCheckNumberFormat",($,v)=>{G$.init($,v),v.format=v.format||"float64";let D=v.format?.includes("int"),X=D?"int":"number",[U,G]=kG[v.format];$._zod.onattach.push((J)=>{let Q=J._zod.bag;if(Q.format=v.format,Q.minimum=U,Q.maximum=G,D)Q.pattern=DJ}),$._zod.check=(J)=>{let Q=J.value;if(D){if(!Number.isInteger(Q)){J.issues.push({expected:X,format:v.format,code:"invalid_type",continue:!1,input:Q,inst:$});return}if(!Number.isSafeInteger(Q)){if(Q>0)J.issues.push({input:Q,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:$,origin:X,inclusive:!0,continue:!v.abort});else J.issues.push({input:Q,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:$,origin:X,inclusive:!0,continue:!v.abort});return}}if(Q<U)J.issues.push({origin:"number",input:Q,code:"too_small",minimum:U,inclusive:!0,inst:$,continue:!v.abort});if(Q>G)J.issues.push({origin:"number",input:Q,code:"too_big",maximum:G,inclusive:!0,inst:$,continue:!v.abort})}}),IJ=B("$ZodCheckBigIntFormat",($,v)=>{G$.init($,v);let[D,X]=EG[v.format];$._zod.onattach.push((U)=>{let G=U._zod.bag;G.format=v.format,G.minimum=D,G.maximum=X}),$._zod.check=(U)=>{let G=U.value;if(G<D)U.issues.push({origin:"bigint",input:G,code:"too_small",minimum:D,inclusive:!0,inst:$,continue:!v.abort});if(G>X)U.issues.push({origin:"bigint",input:G,code:"too_big",maximum:X,inclusive:!0,inst:$,continue:!v.abort})}}),VJ=B("$ZodCheckMaxSize",($,v)=>{var D;G$.init($,v),(D=$._zod.def).when??(D.when=(X)=>{let U=X.value;return!o4(U)&&U.size!==void 0}),$._zod.onattach.push((X)=>{let U=X._zod.bag.maximum??Number.POSITIVE_INFINITY;if(v.maximum<U)X._zod.bag.maximum=v.maximum}),$._zod.check=(X)=>{let U=X.value;if(U.size<=v.maximum)return;X.issues.push({origin:Uv(U),code:"too_big",maximum:v.maximum,inclusive:!0,input:U,inst:$,continue:!v.abort})}}),KJ=B("$ZodCheckMinSize",($,v)=>{var D;G$.init($,v),(D=$._zod.def).when??(D.when=(X)=>{let U=X.value;return!o4(U)&&U.size!==void 0}),$._zod.onattach.push((X)=>{let U=X._zod.bag.minimum??Number.NEGATIVE_INFINITY;if(v.minimum>U)X._zod.bag.minimum=v.minimum}),$._zod.check=(X)=>{let U=X.value;if(U.size>=v.minimum)return;X.issues.push({origin:Uv(U),code:"too_small",minimum:v.minimum,inclusive:!0,input:U,inst:$,continue:!v.abort})}}),LJ=B("$ZodCheckSizeEquals",($,v)=>{var D;G$.init($,v),(D=$._zod.def).when??(D.when=(X)=>{let U=X.value;return!o4(U)&&U.size!==void 0}),$._zod.onattach.push((X)=>{let U=X._zod.bag;U.minimum=v.size,U.maximum=v.size,U.size=v.size}),$._zod.check=(X)=>{let U=X.value,G=U.size;if(G===v.size)return;let J=G>v.size;X.issues.push({origin:Uv(U),...J?{code:"too_big",maximum:v.size}:{code:"too_small",minimum:v.size},inclusive:!0,exact:!0,input:X.value,inst:$,continue:!v.abort})}}),BJ=B("$ZodCheckMaxLength",($,v)=>{var D;G$.init($,v),(D=$._zod.def).when??(D.when=(X)=>{let U=X.value;return!o4(U)&&U.length!==void 0}),$._zod.onattach.push((X)=>{let U=X._zod.bag.maximum??Number.POSITIVE_INFINITY;if(v.maximum<U)X._zod.bag.maximum=v.maximum}),$._zod.check=(X)=>{let U=X.value;if(U.length<=v.maximum)return;let J=Dv(U);X.issues.push({origin:J,code:"too_big",maximum:v.maximum,inclusive:!0,input:U,inst:$,continue:!v.abort})}}),NJ=B("$ZodCheckMinLength",($,v)=>{var D;G$.init($,v),(D=$._zod.def).when??(D.when=(X)=>{let U=X.value;return!o4(U)&&U.length!==void 0}),$._zod.onattach.push((X)=>{let U=X._zod.bag.minimum??Number.NEGATIVE_INFINITY;if(v.minimum>U)X._zod.bag.minimum=v.minimum}),$._zod.check=(X)=>{let U=X.value;if(U.length>=v.minimum)return;let J=Dv(U);X.issues.push({origin:J,code:"too_small",minimum:v.minimum,inclusive:!0,input:U,inst:$,continue:!v.abort})}}),ZJ=B("$ZodCheckLengthEquals",($,v)=>{var D;G$.init($,v),(D=$._zod.def).when??(D.when=(X)=>{let U=X.value;return!o4(U)&&U.length!==void 0}),$._zod.onattach.push((X)=>{let U=X._zod.bag;U.minimum=v.length,U.maximum=v.length,U.length=v.length}),$._zod.check=(X)=>{let U=X.value,G=U.length;if(G===v.length)return;let J=Dv(U),Q=G>v.length;X.issues.push({origin:J,...Q?{code:"too_big",maximum:v.length}:{code:"too_small",minimum:v.length},inclusive:!0,exact:!0,input:X.value,inst:$,continue:!v.abort})}}),d6=B("$ZodCheckStringFormat",($,v)=>{var D,X;if(G$.init($,v),$._zod.onattach.push((U)=>{let G=U._zod.bag;if(G.format=v.format,v.pattern)G.patterns??(G.patterns=new Set),G.patterns.add(v.pattern)}),v.pattern)(D=$._zod).check??(D.check=(U)=>{if(v.pattern.lastIndex=0,v.pattern.test(U.value))return;U.issues.push({origin:"string",code:"invalid_format",format:v.format,input:U.value,...v.pattern?{pattern:v.pattern.toString()}:{},inst:$,continue:!v.abort})});else(X=$._zod).check??(X.check=()=>{})}),OJ=B("$ZodCheckRegex",($,v)=>{d6.init($,v),$._zod.check=(D)=>{if(v.pattern.lastIndex=0,v.pattern.test(D.value))return;D.issues.push({origin:"string",code:"invalid_format",format:"regex",input:D.value,pattern:v.pattern.toString(),inst:$,continue:!v.abort})}}),HJ=B("$ZodCheckLowerCase",($,v)=>{v.pattern??(v.pattern=QJ),d6.init($,v)}),FJ=B("$ZodCheckUpperCase",($,v)=>{v.pattern??(v.pattern=WJ),d6.init($,v)}),jJ=B("$ZodCheckIncludes",($,v)=>{G$.init($,v);let D=v4(v.includes),X=new RegExp(typeof v.position==="number"?`^.{${v.position}}${D}`:D);v.pattern=X,$._zod.onattach.push((U)=>{let G=U._zod.bag;G.patterns??(G.patterns=new Set),G.patterns.add(X)}),$._zod.check=(U)=>{if(U.value.includes(v.includes,v.position))return;U.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:v.includes,input:U.value,inst:$,continue:!v.abort})}}),AJ=B("$ZodCheckStartsWith",($,v)=>{G$.init($,v);let D=new RegExp(`^${v4(v.prefix)}.*`);v.pattern??(v.pattern=D),$._zod.onattach.push((X)=>{let U=X._zod.bag;U.patterns??(U.patterns=new Set),U.patterns.add(D)}),$._zod.check=(X)=>{if(X.value.startsWith(v.prefix))return;X.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:v.prefix,input:X.value,inst:$,continue:!v.abort})}}),wJ=B("$ZodCheckEndsWith",($,v)=>{G$.init($,v);let D=new RegExp(`.*${v4(v.suffix)}$`);v.pattern??(v.pattern=D),$._zod.onattach.push((X)=>{let U=X._zod.bag;U.patterns??(U.patterns=new Set),U.patterns.add(D)}),$._zod.check=(X)=>{if(X.value.endsWith(v.suffix))return;X.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:v.suffix,input:X.value,inst:$,continue:!v.abort})}});function EY($,v,D){if($.issues.length)v.issues.push(...n$(D,$.issues))}var MJ=B("$ZodCheckProperty",($,v)=>{G$.init($,v),$._zod.check=(D)=>{let X=v.schema._zod.run({value:D.value[v.property],issues:[]},{});if(X instanceof Promise)return X.then((U)=>EY(U,D,v.property));EY(X,D,v.property);return}}),PJ=B("$ZodCheckMimeType",($,v)=>{G$.init($,v);let D=new Set(v.mime);$._zod.onattach.push((X)=>{X._zod.bag.mime=v.mime}),$._zod.check=(X)=>{if(D.has(X.value.type))return;X.issues.push({code:"invalid_value",values:v.mime,input:X.value.type,inst:$,continue:!v.abort})}}),bJ=B("$ZodCheckOverwrite",($,v)=>{G$.init($,v),$._zod.check=(D)=>{D.value=v.tx(D.value)}});class IU{constructor($=[]){if(this.content=[],this.indent=0,this)this.args=$}indented($){this.indent+=1,$(this),this.indent-=1}write($){if(typeof $==="function"){$(this,{execution:"sync"}),$(this,{execution:"async"});return}let D=$.split(`
|
|
28
|
+
npm install -g @aetherwealth/mcp@latest`};return{blocked:!1}}async function o0($){let v=`https://registry.npmjs.org/${encodeURIComponent($)}/latest`,D=new AbortController,X=setTimeout(()=>D.abort(),4000);try{let U=await fetch(v,{signal:D.signal});if(!U.ok)return null;let G=await U.json();return typeof G.version==="string"?G.version:null}catch{return null}finally{clearTimeout(X)}}var DY=5000;function XY($,v,D){return new Promise((X)=>{let U=setTimeout(()=>X(D),v),G=(J)=>{clearTimeout(U),X(J)};$.then(G,()=>G(D))})}async function a0($){let[v,D]=await Promise.all([XY($.fetchMinVersion(),DY,null),XY($.fetchLatestVersion(),DY,null)]);return HG({ownVersion:$.ownVersion,minVersion:v,latestVersion:D})}var GY="https://api.aetherwealth.ai",JY="http://localhost:9006",f4="https://app.aetherwealth.ai";var Y4=typeof __MCPB_BUILD__==="boolean"?__MCPB_BUILD__:!1;function XF($){let v=$.NODE_ENV;return v==="development"||v==="test"}function QY($){let v=$.AETHER_BASE_URL,D="";if(v&&v.trim().length>0)D=v.trim();else if(XF($))D=JY;else D=GY;let X;try{X=new URL(D)}catch{return{config:null,errors:[`AETHER_BASE_URL is not a valid URL: "${D}"`]}}if(X.protocol!=="https:"&&!j4(X.hostname))return{config:null,errors:[`AETHER_BASE_URL must use https (loopback hosts exempt): "${D}"`]};let U=D.replace(/\/$/,"");return{config:{baseUrl:U,trpcUrl:`${U}/trpc`,host:X.host},errors:[]}}var WY="@aetherwealth/mcp";function zY($={}){let v=$.maxPerWindow??120,D=$.now??Date.now,X=new Map;return{check(U){let G=U.startsWith("ip:")?v*4:v,J=D(),Q=X.get(U);if(!Q||J-Q.windowStart>=60000){if(X.size>=1e4){let W=X.keys().next().value;if(W!==void 0)X.delete(W)}return X.delete(U),X.set(U,{windowStart:J,count:1}),{allowed:!0}}if(Q.count>=G)return{allowed:!1,retryAfterSeconds:Math.max(1,Math.ceil((Q.windowStart+60000-J)/1000))};return Q.count+=1,{allowed:!0}}}}function YY($){let v=async()=>{throw Error("hosted mode: tool invoked without a per-request context (wiring bug)")};return{session:{getAccessToken:v,getUserId:v,login:v,logout:v},trpc:t4($,v)}}var GF=60000,JF=1000,QF=4000;function IY($){let v=$.fetchImpl??fetch,D=$.now??Date.now,X=$.ttlMs??GF,U=`${$.baseUrl.replace(/\/$/,"")}${d1}`,G=new Map,J=new Map,Q=async(W)=>{let z=await WF(U,W,v);if(!z.ok)return z;if(G.size>=JF){let Y=G.keys().next().value;if(Y!==void 0)G.delete(Y)}return G.set(W,{userId:z.userId,expiresAt:D()+X}),z};return{async verify(W){let z=G.get(W);if(z&&z.expiresAt>D())return{ok:!0,userId:z.userId};G.delete(W);let Y=J.get(W);if(Y)return Y;let I=Q(W);J.set(W,I);try{return await I}finally{J.delete(W)}},invalidate(W){G.delete(W)}}}async function WF($,v,D){let X=new AbortController,U=setTimeout(()=>X.abort(),QF),G;try{G=await D($,{method:"GET",headers:{authorization:`Bearer ${v}`,accept:"application/json"},signal:X.signal})}catch(Q){throw Error(`token verification could not reach userinfo at ${$}`,{cause:Q})}finally{clearTimeout(U)}if(G.status===401||G.status===403)return{ok:!1};if(!G.ok)throw Error(`token verification failed upstream (HTTP ${G.status})`);let J=(await F4(G)).sub;if(typeof J!=="string"||J.length===0)throw Error("userinfo response did not include a user id");return{ok:!0,userId:J}}import{timingSafeEqual as HH}from"node:crypto";import{createServer as LC}from"node:http";var l={};C4(l,{xor:()=>tI,xid:()=>FI,void:()=>cI,uuidv7:()=>VI,uuidv6:()=>II,uuidv4:()=>YI,uuid:()=>zI,util:()=>w,url:()=>KI,uppercase:()=>o6,unknown:()=>D$,union:()=>X$,undefined:()=>hI,ulid:()=>HI,uint64:()=>nI,uint32:()=>_I,tuple:()=>uW,trim:()=>U1,treeifyError:()=>RG,transform:()=>wD,toUpperCase:()=>X1,toLowerCase:()=>D1,toJSONSchema:()=>oU,templateLiteral:()=>QV,symbol:()=>lI,superRefine:()=>Wz,success:()=>DV,stringbool:()=>LV,stringFormat:()=>TI,string:()=>H,strictObject:()=>pI,startsWith:()=>e6,slugify:()=>G1,size:()=>w6,setErrorMap:()=>CA,set:()=>sI,safeParseAsync:()=>KW,safeParse:()=>VW,safeEncodeAsync:()=>FW,safeEncode:()=>OW,safeDecodeAsync:()=>jW,safeDecode:()=>HW,registry:()=>jU,regexes:()=>a$,regex:()=>p6,refine:()=>Qz,record:()=>s,readonly:()=>vz,property:()=>dU,promise:()=>WV,prettifyError:()=>gG,preprocess:()=>xv,prefault:()=>rW,positive:()=>lU,pipe:()=>DD,partialRecord:()=>oI,parseAsync:()=>IW,parse:()=>YW,overwrite:()=>I4,optional:()=>J$,object:()=>q,number:()=>t,nullish:()=>UV,nullable:()=>Pv,null:()=>Sv,normalize:()=>v1,nonpositive:()=>mU,nonoptional:()=>pW,nonnegative:()=>cU,never:()=>AD,negative:()=>hU,nativeEnum:()=>$V,nanoid:()=>NI,nan:()=>XV,multipleOf:()=>$6,minSize:()=>q4,minLength:()=>i4,mime:()=>$1,meta:()=>VV,maxSize:()=>v6,maxLength:()=>M6,map:()=>eI,mac:()=>wI,lte:()=>e$,lt:()=>P4,lowercase:()=>t6,looseRecord:()=>aI,looseObject:()=>w$,locales:()=>Fv,literal:()=>R,length:()=>P6,lazy:()=>Xz,ksuid:()=>jI,keyof:()=>rI,jwt:()=>EI,json:()=>BV,iso:()=>G6,ipv6:()=>MI,ipv4:()=>AI,invertCodec:()=>JV,intersection:()=>B1,int64:()=>yI,int32:()=>fI,int:()=>UD,instanceof:()=>KV,includes:()=>a6,httpUrl:()=>LI,hostname:()=>RI,hex:()=>gI,hash:()=>CI,guid:()=>WI,gte:()=>u$,gt:()=>b4,globalRegistry:()=>A$,getErrorMap:()=>uA,function:()=>zV,fromJSONSchema:()=>ZV,formatError:()=>Jv,float64:()=>xI,float32:()=>uI,flattenError:()=>Gv,file:()=>vV,exactOptional:()=>lW,enum:()=>M$,endsWith:()=>s6,encodeAsync:()=>NW,encode:()=>LW,emoji:()=>BI,email:()=>QI,e164:()=>kI,discriminatedUnion:()=>Rv,describe:()=>IV,decodeAsync:()=>ZW,decode:()=>BW,date:()=>dI,custom:()=>bD,cuid2:()=>OI,cuid:()=>ZI,core:()=>y4,config:()=>V$,coerce:()=>Yz,codec:()=>GV,clone:()=>g$,cidrv6:()=>bI,cidrv4:()=>PI,check:()=>YV,catch:()=>aW,boolean:()=>K$,bigint:()=>iI,base64url:()=>SI,base64:()=>qI,array:()=>c,any:()=>mI,_function:()=>zV,_default:()=>cW,_ZodString:()=>XD,ZodXor:()=>TW,ZodXID:()=>ID,ZodVoid:()=>kW,ZodUnknown:()=>qW,ZodUnion:()=>Tv,ZodUndefined:()=>MW,ZodUUID:()=>S4,ZodURL:()=>qv,ZodULID:()=>YD,ZodType:()=>y,ZodTuple:()=>CW,ZodTransform:()=>yW,ZodTemplateLiteral:()=>Uz,ZodSymbol:()=>wW,ZodSuccess:()=>tW,ZodStringFormat:()=>U$,ZodString:()=>Y1,ZodSet:()=>fW,ZodRecord:()=>W1,ZodRealError:()=>h$,ZodReadonly:()=>$z,ZodPromise:()=>Gz,ZodPreprocess:()=>sW,ZodPrefault:()=>dW,ZodPipe:()=>gv,ZodOptional:()=>MD,ZodObject:()=>Ev,ZodNumberFormat:()=>b6,ZodNumber:()=>V1,ZodNullable:()=>hW,ZodNull:()=>PW,ZodNonOptional:()=>PD,ZodNever:()=>SW,ZodNanoID:()=>QD,ZodNaN:()=>eW,ZodMap:()=>xW,ZodMAC:()=>AW,ZodLiteral:()=>_W,ZodLazy:()=>Dz,ZodKSUID:()=>VD,ZodJWT:()=>FD,ZodIssueCode:()=>gA,ZodIntersection:()=>gW,ZodISOTime:()=>$D,ZodISODuration:()=>vD,ZodISODateTime:()=>eU,ZodISODate:()=>sU,ZodIPv6:()=>LD,ZodIPv4:()=>KD,ZodGUID:()=>Mv,ZodFunction:()=>Jz,ZodFirstPartyTypeKind:()=>zz,ZodFile:()=>iW,ZodExactOptional:()=>nW,ZodError:()=>TA,ZodEnum:()=>z1,ZodEmoji:()=>JD,ZodEmail:()=>GD,ZodE164:()=>HD,ZodDiscriminatedUnion:()=>RW,ZodDefault:()=>mW,ZodDate:()=>kv,ZodCustomStringFormat:()=>I1,ZodCustom:()=>uv,ZodCodec:()=>Cv,ZodCatch:()=>oW,ZodCUID2:()=>zD,ZodCUID:()=>WD,ZodCIDRv6:()=>ND,ZodCIDRv4:()=>BD,ZodBoolean:()=>K1,ZodBigIntFormat:()=>jD,ZodBigInt:()=>L1,ZodBase64URL:()=>OD,ZodBase64:()=>ZD,ZodArray:()=>EW,ZodAny:()=>bW,TimePrecision:()=>iQ,NEVER:()=>FG,$output:()=>gQ,$input:()=>CQ,$brand:()=>jG});var y4={};C4(y4,{version:()=>qJ,util:()=>w,treeifyError:()=>RG,toJSONSchema:()=>oU,toDotPath:()=>OY,safeParseAsync:()=>zv,safeParse:()=>m6,safeEncodeAsync:()=>PY,safeEncode:()=>wY,safeDecodeAsync:()=>bY,safeDecode:()=>MY,registry:()=>jU,regexes:()=>a$,process:()=>e,prettifyError:()=>gG,parseAsync:()=>Wv,parse:()=>Qv,meta:()=>H9,locales:()=>Fv,isValidJWT:()=>pY,isValidBase64URL:()=>rY,isValidBase64:()=>tJ,initializeContext:()=>U6,globalRegistry:()=>A$,globalConfig:()=>O6,formatError:()=>Jv,flattenError:()=>Gv,finalize:()=>X6,extractDefs:()=>D6,encodeAsync:()=>jY,encode:()=>HY,describe:()=>O9,decodeAsync:()=>AY,decode:()=>FY,createToJSONSchemaMethod:()=>j9,createStandardJSONSchemaMethod:()=>Q1,config:()=>V$,clone:()=>g$,_xor:()=>QA,_xid:()=>RU,_void:()=>z9,_uuidv7:()=>bU,_uuidv6:()=>PU,_uuidv4:()=>MU,_uuid:()=>wU,_url:()=>Av,_uppercase:()=>o6,_unknown:()=>Q9,_union:()=>JA,_undefined:()=>X9,_ulid:()=>TU,_uint64:()=>U9,_uint32:()=>oQ,_tuple:()=>YA,_trim:()=>U1,_transform:()=>ZA,_toUpperCase:()=>X1,_toLowerCase:()=>D1,_templateLiteral:()=>bA,_symbol:()=>D9,_superRefine:()=>Z9,_success:()=>AA,_stringbool:()=>F9,_stringFormat:()=>J1,_string:()=>xQ,_startsWith:()=>e6,_slugify:()=>G1,_size:()=>w6,_set:()=>KA,_safeParseAsync:()=>c6,_safeParse:()=>h6,_safeEncodeAsync:()=>JU,_safeEncode:()=>XU,_safeDecodeAsync:()=>QU,_safeDecode:()=>GU,_regex:()=>p6,_refine:()=>N9,_record:()=>IA,_readonly:()=>PA,_property:()=>dU,_promise:()=>SA,_positive:()=>lU,_pipe:()=>MA,_parseAsync:()=>l6,_parse:()=>n6,_overwrite:()=>I4,_optional:()=>OA,_number:()=>mQ,_nullable:()=>HA,_null:()=>G9,_normalize:()=>v1,_nonpositive:()=>mU,_nonoptional:()=>jA,_nonnegative:()=>cU,_never:()=>W9,_negative:()=>hU,_nativeEnum:()=>BA,_nanoid:()=>SU,_nan:()=>V9,_multipleOf:()=>$6,_minSize:()=>q4,_minLength:()=>i4,_min:()=>u$,_mime:()=>$1,_maxSize:()=>v6,_maxLength:()=>M6,_max:()=>e$,_map:()=>VA,_mac:()=>_Q,_lte:()=>e$,_lt:()=>P4,_lowercase:()=>t6,_literal:()=>NA,_length:()=>P6,_lazy:()=>qA,_ksuid:()=>gU,_jwt:()=>nU,_isoTime:()=>lQ,_isoDuration:()=>hQ,_isoDateTime:()=>yQ,_isoDate:()=>nQ,_ipv6:()=>uU,_ipv4:()=>CU,_intersection:()=>zA,_int64:()=>v9,_int32:()=>tQ,_int:()=>dQ,_includes:()=>a6,_guid:()=>jv,_gte:()=>u$,_gt:()=>b4,_float64:()=>pQ,_float32:()=>rQ,_file:()=>L9,_enum:()=>LA,_endsWith:()=>s6,_encodeAsync:()=>UU,_encode:()=>$U,_emoji:()=>qU,_email:()=>AU,_e164:()=>yU,_discriminatedUnion:()=>WA,_default:()=>FA,_decodeAsync:()=>DU,_decode:()=>vU,_date:()=>Y9,_custom:()=>B9,_cuid2:()=>EU,_cuid:()=>kU,_coercedString:()=>fQ,_coercedNumber:()=>cQ,_coercedDate:()=>I9,_coercedBoolean:()=>eQ,_coercedBigint:()=>$9,_cidrv6:()=>fU,_cidrv4:()=>xU,_check:()=>DI,_catch:()=>wA,_boolean:()=>aQ,_bigint:()=>sQ,_base64url:()=>iU,_base64:()=>_U,_array:()=>K9,_any:()=>J9,TimePrecision:()=>iQ,NEVER:()=>FG,JSONSchemaGenerator:()=>GW,JSONSchema:()=>XI,Doc:()=>IU,$output:()=>gQ,$input:()=>CQ,$constructor:()=>B,$brand:()=>jG,$ZodXor:()=>K8,$ZodXID:()=>_J,$ZodVoid:()=>z8,$ZodUnknown:()=>Q8,$ZodUnion:()=>Lv,$ZodUndefined:()=>X8,$ZodUUID:()=>EJ,$ZodURL:()=>RJ,$ZodULID:()=>fJ,$ZodType:()=>_,$ZodTuple:()=>OU,$ZodTransform:()=>A8,$ZodTemplateLiteral:()=>g8,$ZodSymbol:()=>D8,$ZodSuccess:()=>S8,$ZodStringFormat:()=>v$,$ZodString:()=>A6,$ZodSet:()=>O8,$ZodRegistry:()=>uQ,$ZodRecord:()=>N8,$ZodRealError:()=>l$,$ZodReadonly:()=>R8,$ZodPromise:()=>u8,$ZodPreprocess:()=>T8,$ZodPrefault:()=>b8,$ZodPipe:()=>FU,$ZodOptional:()=>HU,$ZodObjectJIT:()=>V8,$ZodObject:()=>aY,$ZodNumberFormat:()=>v8,$ZodNumber:()=>NU,$ZodNullable:()=>M8,$ZodNull:()=>G8,$ZodNonOptional:()=>q8,$ZodNever:()=>W8,$ZodNanoID:()=>CJ,$ZodNaN:()=>E8,$ZodMap:()=>Z8,$ZodMAC:()=>dJ,$ZodLiteral:()=>F8,$ZodLazy:()=>x8,$ZodKSUID:()=>iJ,$ZodJWT:()=>sJ,$ZodIntersection:()=>B8,$ZodISOTime:()=>lJ,$ZodISODuration:()=>hJ,$ZodISODateTime:()=>yJ,$ZodISODate:()=>nJ,$ZodIPv6:()=>cJ,$ZodIPv4:()=>mJ,$ZodGUID:()=>kJ,$ZodFunction:()=>C8,$ZodFile:()=>j8,$ZodExactOptional:()=>w8,$ZodError:()=>Xv,$ZodEnum:()=>H8,$ZodEncodeError:()=>H6,$ZodEmoji:()=>gJ,$ZodEmail:()=>TJ,$ZodE164:()=>eJ,$ZodDiscriminatedUnion:()=>L8,$ZodDefault:()=>P8,$ZodDate:()=>Y8,$ZodCustomStringFormat:()=>$8,$ZodCustom:()=>f8,$ZodCodec:()=>Bv,$ZodCheckUpperCase:()=>FJ,$ZodCheckStringFormat:()=>d6,$ZodCheckStartsWith:()=>AJ,$ZodCheckSizeEquals:()=>LJ,$ZodCheckRegex:()=>OJ,$ZodCheckProperty:()=>MJ,$ZodCheckOverwrite:()=>bJ,$ZodCheckNumberFormat:()=>YJ,$ZodCheckMultipleOf:()=>zJ,$ZodCheckMinSize:()=>KJ,$ZodCheckMinLength:()=>NJ,$ZodCheckMimeType:()=>PJ,$ZodCheckMaxSize:()=>VJ,$ZodCheckMaxLength:()=>BJ,$ZodCheckLowerCase:()=>HJ,$ZodCheckLessThan:()=>zU,$ZodCheckLengthEquals:()=>ZJ,$ZodCheckIncludes:()=>jJ,$ZodCheckGreaterThan:()=>YU,$ZodCheckEndsWith:()=>wJ,$ZodCheckBigIntFormat:()=>IJ,$ZodCheck:()=>G$,$ZodCatch:()=>k8,$ZodCUID2:()=>xJ,$ZodCUID:()=>uJ,$ZodCIDRv6:()=>pJ,$ZodCIDRv4:()=>rJ,$ZodBoolean:()=>Kv,$ZodBigIntFormat:()=>U8,$ZodBigInt:()=>ZU,$ZodBase64URL:()=>aJ,$ZodBase64:()=>oJ,$ZodAsyncError:()=>M4,$ZodArray:()=>I8,$ZodAny:()=>J8});var VY,FG=Object.freeze({status:"aborted"});function B($,v,D){function X(Q,W){if(!Q._zod)Object.defineProperty(Q,"_zod",{value:{def:W,constr:J,traits:new Set},enumerable:!1});if(Q._zod.traits.has($))return;Q._zod.traits.add($),v(Q,W);let z=J.prototype,Y=Object.keys(z);for(let I=0;I<Y.length;I++){let V=Y[I];if(!(V in Q))Q[V]=z[V].bind(Q)}}let U=D?.Parent??Object;class G extends U{}Object.defineProperty(G,"name",{value:$});function J(Q){var W;let z=D?.Parent?new G:this;X(z,Q),(W=z._zod).deferred??(W.deferred=[]);for(let Y of z._zod.deferred)Y();return z}return Object.defineProperty(J,"init",{value:X}),Object.defineProperty(J,Symbol.hasInstance,{value:(Q)=>{if(D?.Parent&&Q instanceof D.Parent)return!0;return Q?._zod?.traits?.has($)}}),Object.defineProperty(J,"name",{value:$}),J}var jG=Symbol("zod_brand");class M4 extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class H6 extends Error{constructor($){super(`Encountered unidirectional transform during encode: ${$}`);this.name="ZodEncodeError"}}(VY=globalThis).__zod_globalConfig??(VY.__zod_globalConfig={});var O6=globalThis.__zod_globalConfig;function V$($){if($)Object.assign(O6,$);return O6}var w={};C4(w,{unwrapMessage:()=>e1,uint8ArrayToHex:()=>gF,uint8ArrayToBase64url:()=>TF,uint8ArrayToBase64:()=>BY,stringifyPrimitive:()=>j,slugify:()=>MG,shallowClone:()=>bG,safeExtend:()=>PF,required:()=>SF,randomString:()=>OF,propertyKeyTypes:()=>vv,promiseAllObject:()=>ZF,primitiveTypes:()=>qG,prefixIssues:()=>n$,pick:()=>AF,partial:()=>qF,parsedType:()=>A,optionalKeys:()=>SG,omit:()=>wF,objectClone:()=>LF,numKeys:()=>HF,nullish:()=>o4,normalizeParams:()=>M,mergeDefs:()=>_4,merge:()=>bF,jsonStringifyReplacer:()=>_6,joinValues:()=>O,issue:()=>y6,isPlainObject:()=>e4,isObject:()=>F6,hexToUint8Array:()=>RF,getSizableOrigin:()=>Uv,getParsedType:()=>FF,getLengthableOrigin:()=>Dv,getEnumValues:()=>s1,getElementAtPath:()=>NF,floatSafeRemainder:()=>wG,finalizeIssue:()=>C$,extend:()=>MF,explicitlyAborted:()=>TG,escapeRegex:()=>v4,esc:()=>e0,defineLazy:()=>m,createTransparentProxy:()=>jF,cloneDef:()=>BF,clone:()=>g$,cleanRegex:()=>$v,cleanEnum:()=>kF,captureStackTrace:()=>s0,cached:()=>i6,base64urlToUint8Array:()=>EF,base64ToUint8Array:()=>LY,assignProp:()=>a4,assertNotEqual:()=>YF,assertNever:()=>VF,assertIs:()=>IF,assertEqual:()=>zF,assert:()=>KF,allowsEval:()=>PG,aborted:()=>s4,NUMBER_FORMAT_RANGES:()=>kG,Class:()=>NY,BIGINT_FORMAT_RANGES:()=>EG});function zF($){return $}function YF($){return $}function IF($){}function VF($){throw Error("Unexpected value in exhaustive check")}function KF($){}function s1($){let v=Object.values($).filter((X)=>typeof X==="number");return Object.entries($).filter(([X,U])=>v.indexOf(+X)===-1).map(([X,U])=>U)}function O($,v="|"){return $.map((D)=>j(D)).join(v)}function _6($,v){if(typeof v==="bigint")return v.toString();return v}function i6($){return{get value(){{let D=$();return Object.defineProperty(this,"value",{value:D}),D}throw Error("cached value already set")}}}function o4($){return $===null||$===void 0}function $v($){let v=$.startsWith("^")?1:0,D=$.endsWith("$")?$.length-1:$.length;return $.slice(v,D)}function wG($,v){let D=$/v,X=Math.round(D),U=Number.EPSILON*Math.max(Math.abs(D),1);if(Math.abs(D-X)<U)return 0;return D-X}var KY=Symbol("evaluating");function m($,v,D){let X=void 0;Object.defineProperty($,v,{get(){if(X===KY)return;if(X===void 0)X=KY,X=D();return X},set(U){Object.defineProperty($,v,{value:U})},configurable:!0})}function LF($){return Object.create(Object.getPrototypeOf($),Object.getOwnPropertyDescriptors($))}function a4($,v,D){Object.defineProperty($,v,{value:D,writable:!0,enumerable:!0,configurable:!0})}function _4(...$){let v={};for(let D of $){let X=Object.getOwnPropertyDescriptors(D);Object.assign(v,X)}return Object.defineProperties({},v)}function BF($){return _4($._zod.def)}function NF($,v){if(!v)return $;return v.reduce((D,X)=>D?.[X],$)}function ZF($){let v=Object.keys($),D=v.map((X)=>$[X]);return Promise.all(D).then((X)=>{let U={};for(let G=0;G<v.length;G++)U[v[G]]=X[G];return U})}function OF($=10){let D="";for(let X=0;X<$;X++)D+="abcdefghijklmnopqrstuvwxyz"[Math.floor(Math.random()*26)];return D}function e0($){return JSON.stringify($)}function MG($){return $.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}var s0="captureStackTrace"in Error?Error.captureStackTrace:(...$)=>{};function F6($){return typeof $==="object"&&$!==null&&!Array.isArray($)}var PG=i6(()=>{if(O6.jitless)return!1;if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return new Function(""),!0}catch($){return!1}});function e4($){if(F6($)===!1)return!1;let v=$.constructor;if(v===void 0)return!0;if(typeof v!=="function")return!0;let D=v.prototype;if(F6(D)===!1)return!1;if(Object.prototype.hasOwnProperty.call(D,"isPrototypeOf")===!1)return!1;return!0}function bG($){if(e4($))return{...$};if(Array.isArray($))return[...$];if($ instanceof Map)return new Map($);if($ instanceof Set)return new Set($);return $}function HF($){let v=0;for(let D in $)if(Object.prototype.hasOwnProperty.call($,D))v++;return v}var FF=($)=>{let v=typeof $;switch(v){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN($)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":if(Array.isArray($))return"array";if($===null)return"null";if($.then&&typeof $.then==="function"&&$.catch&&typeof $.catch==="function")return"promise";if(typeof Map<"u"&&$ instanceof Map)return"map";if(typeof Set<"u"&&$ instanceof Set)return"set";if(typeof Date<"u"&&$ instanceof Date)return"date";if(typeof File<"u"&&$ instanceof File)return"file";return"object";default:throw Error(`Unknown data type: ${v}`)}},vv=new Set(["string","number","symbol"]),qG=new Set(["string","number","bigint","boolean","symbol","undefined"]);function v4($){return $.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function g$($,v,D){let X=new $._zod.constr(v??$._zod.def);if(!v||D?.parent)X._zod.parent=$;return X}function M($){let v=$;if(!v)return{};if(typeof v==="string")return{error:()=>v};if(v?.message!==void 0){if(v?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");v.error=v.message}if(delete v.message,typeof v.error==="string")return{...v,error:()=>v.error};return v}function jF($){let v;return new Proxy({},{get(D,X,U){return v??(v=$()),Reflect.get(v,X,U)},set(D,X,U,G){return v??(v=$()),Reflect.set(v,X,U,G)},has(D,X){return v??(v=$()),Reflect.has(v,X)},deleteProperty(D,X){return v??(v=$()),Reflect.deleteProperty(v,X)},ownKeys(D){return v??(v=$()),Reflect.ownKeys(v)},getOwnPropertyDescriptor(D,X){return v??(v=$()),Reflect.getOwnPropertyDescriptor(v,X)},defineProperty(D,X,U){return v??(v=$()),Reflect.defineProperty(v,X,U)}})}function j($){if(typeof $==="bigint")return $.toString()+"n";if(typeof $==="string")return`"${$}"`;return`${$}`}function SG($){return Object.keys($).filter((v)=>{return $[v]._zod.optin==="optional"&&$[v]._zod.optout==="optional"})}var kG={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]},EG={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function AF($,v){let D=$._zod.def,X=D.checks;if(X&&X.length>0)throw Error(".pick() cannot be used on object schemas containing refinements");let G=_4($._zod.def,{get shape(){let J={};for(let Q in v){if(!(Q in D.shape))throw Error(`Unrecognized key: "${Q}"`);if(!v[Q])continue;J[Q]=D.shape[Q]}return a4(this,"shape",J),J},checks:[]});return g$($,G)}function wF($,v){let D=$._zod.def,X=D.checks;if(X&&X.length>0)throw Error(".omit() cannot be used on object schemas containing refinements");let G=_4($._zod.def,{get shape(){let J={...$._zod.def.shape};for(let Q in v){if(!(Q in D.shape))throw Error(`Unrecognized key: "${Q}"`);if(!v[Q])continue;delete J[Q]}return a4(this,"shape",J),J},checks:[]});return g$($,G)}function MF($,v){if(!e4(v))throw Error("Invalid input to extend: expected a plain object");let D=$._zod.def.checks;if(D&&D.length>0){let G=$._zod.def.shape;for(let J in v)if(Object.getOwnPropertyDescriptor(G,J)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let U=_4($._zod.def,{get shape(){let G={...$._zod.def.shape,...v};return a4(this,"shape",G),G}});return g$($,U)}function PF($,v){if(!e4(v))throw Error("Invalid input to safeExtend: expected a plain object");let D=_4($._zod.def,{get shape(){let X={...$._zod.def.shape,...v};return a4(this,"shape",X),X}});return g$($,D)}function bF($,v){if($._zod.def.checks?.length)throw Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");let D=_4($._zod.def,{get shape(){let X={...$._zod.def.shape,...v._zod.def.shape};return a4(this,"shape",X),X},get catchall(){return v._zod.def.catchall},checks:v._zod.def.checks??[]});return g$($,D)}function qF($,v,D){let U=v._zod.def.checks;if(U&&U.length>0)throw Error(".partial() cannot be used on object schemas containing refinements");let J=_4(v._zod.def,{get shape(){let Q=v._zod.def.shape,W={...Q};if(D)for(let z in D){if(!(z in Q))throw Error(`Unrecognized key: "${z}"`);if(!D[z])continue;W[z]=$?new $({type:"optional",innerType:Q[z]}):Q[z]}else for(let z in Q)W[z]=$?new $({type:"optional",innerType:Q[z]}):Q[z];return a4(this,"shape",W),W},checks:[]});return g$(v,J)}function SF($,v,D){let X=_4(v._zod.def,{get shape(){let U=v._zod.def.shape,G={...U};if(D)for(let J in D){if(!(J in G))throw Error(`Unrecognized key: "${J}"`);if(!D[J])continue;G[J]=new $({type:"nonoptional",innerType:U[J]})}else for(let J in U)G[J]=new $({type:"nonoptional",innerType:U[J]});return a4(this,"shape",G),G}});return g$(v,X)}function s4($,v=0){if($.aborted===!0)return!0;for(let D=v;D<$.issues.length;D++)if($.issues[D]?.continue!==!0)return!0;return!1}function TG($,v=0){if($.aborted===!0)return!0;for(let D=v;D<$.issues.length;D++)if($.issues[D]?.continue===!1)return!0;return!1}function n$($,v){return v.map((D)=>{var X;return(X=D).path??(X.path=[]),D.path.unshift($),D})}function e1($){return typeof $==="string"?$:$?.message}function C$($,v,D){let X=$.message?$.message:e1($.inst?._zod.def?.error?.($))??e1(v?.error?.($))??e1(D.customError?.($))??e1(D.localeError?.($))??"Invalid input",{inst:U,continue:G,input:J,...Q}=$;if(Q.path??(Q.path=[]),Q.message=X,v?.reportInput)Q.input=J;return Q}function Uv($){if($ instanceof Set)return"set";if($ instanceof Map)return"map";if($ instanceof File)return"file";return"unknown"}function Dv($){if(Array.isArray($))return"array";if(typeof $==="string")return"string";return"unknown"}function A($){let v=typeof $;switch(v){case"number":return Number.isNaN($)?"nan":"number";case"object":{if($===null)return"null";if(Array.isArray($))return"array";let D=$;if(D&&Object.getPrototypeOf(D)!==Object.prototype&&"constructor"in D&&D.constructor)return D.constructor.name}}return v}function y6(...$){let[v,D,X]=$;if(typeof v==="string")return{message:v,code:"custom",input:D,inst:X};return{...v}}function kF($){return Object.entries($).filter(([v,D])=>{return Number.isNaN(Number.parseInt(v,10))}).map((v)=>v[1])}function LY($){let v=atob($),D=new Uint8Array(v.length);for(let X=0;X<v.length;X++)D[X]=v.charCodeAt(X);return D}function BY($){let v="";for(let D=0;D<$.length;D++)v+=String.fromCharCode($[D]);return btoa(v)}function EF($){let v=$.replace(/-/g,"+").replace(/_/g,"/"),D="=".repeat((4-v.length%4)%4);return LY(v+D)}function TF($){return BY($).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function RF($){let v=$.replace(/^0x/,"");if(v.length%2!==0)throw Error("Invalid hex string length");let D=new Uint8Array(v.length/2);for(let X=0;X<v.length;X+=2)D[X/2]=Number.parseInt(v.slice(X,X+2),16);return D}function gF($){return Array.from($).map((v)=>v.toString(16).padStart(2,"0")).join("")}class NY{constructor(...$){}}var ZY=($,v)=>{$.name="$ZodError",Object.defineProperty($,"_zod",{value:$._zod,enumerable:!1}),Object.defineProperty($,"issues",{value:v,enumerable:!1}),$.message=JSON.stringify(v,_6,2),Object.defineProperty($,"toString",{value:()=>$.message,enumerable:!1})},Xv=B("$ZodError",ZY),l$=B("$ZodError",ZY,{Parent:Error});function Gv($,v=(D)=>D.message){let D={},X=[];for(let U of $.issues)if(U.path.length>0)D[U.path[0]]=D[U.path[0]]||[],D[U.path[0]].push(v(U));else X.push(v(U));return{formErrors:X,fieldErrors:D}}function Jv($,v=(D)=>D.message){let D={_errors:[]},X=(U,G=[])=>{for(let J of U.issues)if(J.code==="invalid_union"&&J.errors.length)J.errors.map((Q)=>X({issues:Q},[...G,...J.path]));else if(J.code==="invalid_key")X({issues:J.issues},[...G,...J.path]);else if(J.code==="invalid_element")X({issues:J.issues},[...G,...J.path]);else{let Q=[...G,...J.path];if(Q.length===0)D._errors.push(v(J));else{let W=D,z=0;while(z<Q.length){let Y=Q[z];if(z!==Q.length-1)W[Y]=W[Y]||{_errors:[]};else W[Y]=W[Y]||{_errors:[]},W[Y]._errors.push(v(J));W=W[Y],z++}}}};return X($),D}function RG($,v=(D)=>D.message){let D={errors:[]},X=(U,G=[])=>{var J,Q;for(let W of U.issues)if(W.code==="invalid_union"&&W.errors.length)W.errors.map((z)=>X({issues:z},[...G,...W.path]));else if(W.code==="invalid_key")X({issues:W.issues},[...G,...W.path]);else if(W.code==="invalid_element")X({issues:W.issues},[...G,...W.path]);else{let z=[...G,...W.path];if(z.length===0){D.errors.push(v(W));continue}let Y=D,I=0;while(I<z.length){let V=z[I],K=I===z.length-1;if(typeof V==="string")Y.properties??(Y.properties={}),(J=Y.properties)[V]??(J[V]={errors:[]}),Y=Y.properties[V];else Y.items??(Y.items=[]),(Q=Y.items)[V]??(Q[V]={errors:[]}),Y=Y.items[V];if(K)Y.errors.push(v(W));I++}}};return X($),D}function OY($){let v=[],D=$.map((X)=>typeof X==="object"?X.key:X);for(let X of D)if(typeof X==="number")v.push(`[${X}]`);else if(typeof X==="symbol")v.push(`[${JSON.stringify(String(X))}]`);else if(/[^\w$]/.test(X))v.push(`[${JSON.stringify(X)}]`);else{if(v.length)v.push(".");v.push(X)}return v.join("")}function gG($){let v=[],D=[...$.issues].sort((X,U)=>(X.path??[]).length-(U.path??[]).length);for(let X of D)if(v.push(`✖ ${X.message}`),X.path?.length)v.push(` → at ${OY(X.path)}`);return v.join(`
|
|
29
|
+
`)}var n6=($)=>(v,D,X,U)=>{let G=X?{...X,async:!1}:{async:!1},J=v._zod.run({value:D,issues:[]},G);if(J instanceof Promise)throw new M4;if(J.issues.length){let Q=new(U?.Err??$)(J.issues.map((W)=>C$(W,G,V$())));throw s0(Q,U?.callee),Q}return J.value},Qv=n6(l$),l6=($)=>async(v,D,X,U)=>{let G=X?{...X,async:!0}:{async:!0},J=v._zod.run({value:D,issues:[]},G);if(J instanceof Promise)J=await J;if(J.issues.length){let Q=new(U?.Err??$)(J.issues.map((W)=>C$(W,G,V$())));throw s0(Q,U?.callee),Q}return J.value},Wv=l6(l$),h6=($)=>(v,D,X)=>{let U=X?{...X,async:!1}:{async:!1},G=v._zod.run({value:D,issues:[]},U);if(G instanceof Promise)throw new M4;return G.issues.length?{success:!1,error:new($??Xv)(G.issues.map((J)=>C$(J,U,V$())))}:{success:!0,data:G.value}},m6=h6(l$),c6=($)=>async(v,D,X)=>{let U=X?{...X,async:!0}:{async:!0},G=v._zod.run({value:D,issues:[]},U);if(G instanceof Promise)G=await G;return G.issues.length?{success:!1,error:new $(G.issues.map((J)=>C$(J,U,V$())))}:{success:!0,data:G.value}},zv=c6(l$),$U=($)=>(v,D,X)=>{let U=X?{...X,direction:"backward"}:{direction:"backward"};return n6($)(v,D,U)},HY=$U(l$),vU=($)=>(v,D,X)=>{return n6($)(v,D,X)},FY=vU(l$),UU=($)=>async(v,D,X)=>{let U=X?{...X,direction:"backward"}:{direction:"backward"};return l6($)(v,D,U)},jY=UU(l$),DU=($)=>async(v,D,X)=>{return l6($)(v,D,X)},AY=DU(l$),XU=($)=>(v,D,X)=>{let U=X?{...X,direction:"backward"}:{direction:"backward"};return h6($)(v,D,U)},wY=XU(l$),GU=($)=>(v,D,X)=>{return h6($)(v,D,X)},MY=GU(l$),JU=($)=>async(v,D,X)=>{let U=X?{...X,direction:"backward"}:{direction:"backward"};return c6($)(v,D,U)},PY=JU(l$),QU=($)=>async(v,D,X)=>{return c6($)(v,D,X)},bY=QU(l$);var a$={};C4(a$,{xid:()=>fG,uuid7:()=>_F,uuid6:()=>fF,uuid4:()=>xF,uuid:()=>j6,uppercase:()=>WJ,unicodeEmail:()=>qY,undefined:()=>JJ,ulid:()=>xG,time:()=>sG,string:()=>vJ,sha512_hex:()=>Gj,sha512_base64url:()=>Qj,sha512_base64:()=>Jj,sha384_hex:()=>Uj,sha384_base64url:()=>Xj,sha384_base64:()=>Dj,sha256_hex:()=>sF,sha256_base64url:()=>vj,sha256_base64:()=>$j,sha1_hex:()=>oF,sha1_base64url:()=>eF,sha1_base64:()=>aF,rfc5322Email:()=>yF,number:()=>Yv,null:()=>GJ,nanoid:()=>iG,md5_hex:()=>rF,md5_base64url:()=>tF,md5_base64:()=>pF,mac:()=>dG,lowercase:()=>QJ,ksuid:()=>_G,ipv6:()=>cG,ipv4:()=>mG,integer:()=>DJ,idnEmail:()=>nF,httpProtocol:()=>oG,html5Email:()=>iF,hostname:()=>mF,hex:()=>dF,guid:()=>nG,extendedDuration:()=>uF,emoji:()=>hG,email:()=>lG,e164:()=>aG,duration:()=>yG,domain:()=>cF,datetime:()=>$J,date:()=>eG,cuid2:()=>uG,cuid:()=>CG,cidrv6:()=>pG,cidrv4:()=>rG,browserEmail:()=>lF,boolean:()=>XJ,bigint:()=>UJ,base64url:()=>WU,base64:()=>tG});var CG=/^[cC][0-9a-z]{6,}$/,uG=/^[0-9a-z]+$/,xG=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,fG=/^[0-9a-vA-V]{20}$/,_G=/^[A-Za-z0-9]{27}$/,iG=/^[a-zA-Z0-9_-]{21}$/,yG=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,uF=/^[-+]?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)?)??$/,nG=/^([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})$/,j6=($)=>{if(!$)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}-${$}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`)},xF=j6(4),fF=j6(6),_F=j6(7),lG=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,iF=/^[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])?)*$/,yF=/^(([^<>()\[\]\\.,;:\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,}))$/,qY=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,nF=qY,lF=/^[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])?)*$/,hF="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function hG(){return new RegExp(hF,"u")}var mG=/^(?:(?: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])$/,cG=/^(([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}|:))$/,dG=($)=>{let v=v4($??":");return new RegExp(`^(?:[0-9A-F]{2}${v}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${v}){5}[0-9a-f]{2}$`)},rG=/^((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])$/,pG=/^(([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])$/,tG=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,WU=/^[A-Za-z0-9_-]*$/,mF=/^(?=.{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])?)*\.?$/,cF=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,oG=/^https?$/,aG=/^\+[1-9]\d{6,14}$/,SY="(?:(?:\\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])))",eG=new RegExp(`^${SY}$`);function kY($){return typeof $.precision==="number"?$.precision===-1?"(?:[01]\\d|2[0-3]):[0-5]\\d":$.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{${$.precision}}`:"(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?"}function sG($){return new RegExp(`^${kY($)}$`)}function $J($){let v=kY({precision:$.precision}),D=["Z"];if($.local)D.push("");if($.offset)D.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let X=`${v}(?:${D.join("|")})`;return new RegExp(`^${SY}T(?:${X})$`)}var vJ=($)=>{let v=$?`[\\s\\S]{${$?.minimum??0},${$?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${v}$`)},UJ=/^-?\d+n?$/,DJ=/^-?\d+$/,Yv=/^-?\d+(?:\.\d+)?$/,XJ=/^(?:true|false)$/i,GJ=/^null$/i;var JJ=/^undefined$/i;var QJ=/^[^A-Z]*$/,WJ=/^[^a-z]*$/,dF=/^[0-9a-fA-F]*$/;function Iv($,v){return new RegExp(`^[A-Za-z0-9+/]{${$}}${v}$`)}function Vv($){return new RegExp(`^[A-Za-z0-9_-]{${$}}$`)}var rF=/^[0-9a-fA-F]{32}$/,pF=Iv(22,"=="),tF=Vv(22),oF=/^[0-9a-fA-F]{40}$/,aF=Iv(27,"="),eF=Vv(27),sF=/^[0-9a-fA-F]{64}$/,$j=Iv(43,"="),vj=Vv(43),Uj=/^[0-9a-fA-F]{96}$/,Dj=Iv(64,""),Xj=Vv(64),Gj=/^[0-9a-fA-F]{128}$/,Jj=Iv(86,"=="),Qj=Vv(86);var G$=B("$ZodCheck",($,v)=>{var D;$._zod??($._zod={}),$._zod.def=v,(D=$._zod).onattach??(D.onattach=[])}),TY={number:"number",bigint:"bigint",object:"date"},zU=B("$ZodCheckLessThan",($,v)=>{G$.init($,v);let D=TY[typeof v.value];$._zod.onattach.push((X)=>{let U=X._zod.bag,G=(v.inclusive?U.maximum:U.exclusiveMaximum)??Number.POSITIVE_INFINITY;if(v.value<G)if(v.inclusive)U.maximum=v.value;else U.exclusiveMaximum=v.value}),$._zod.check=(X)=>{if(v.inclusive?X.value<=v.value:X.value<v.value)return;X.issues.push({origin:D,code:"too_big",maximum:typeof v.value==="object"?v.value.getTime():v.value,input:X.value,inclusive:v.inclusive,inst:$,continue:!v.abort})}}),YU=B("$ZodCheckGreaterThan",($,v)=>{G$.init($,v);let D=TY[typeof v.value];$._zod.onattach.push((X)=>{let U=X._zod.bag,G=(v.inclusive?U.minimum:U.exclusiveMinimum)??Number.NEGATIVE_INFINITY;if(v.value>G)if(v.inclusive)U.minimum=v.value;else U.exclusiveMinimum=v.value}),$._zod.check=(X)=>{if(v.inclusive?X.value>=v.value:X.value>v.value)return;X.issues.push({origin:D,code:"too_small",minimum:typeof v.value==="object"?v.value.getTime():v.value,input:X.value,inclusive:v.inclusive,inst:$,continue:!v.abort})}}),zJ=B("$ZodCheckMultipleOf",($,v)=>{G$.init($,v),$._zod.onattach.push((D)=>{var X;(X=D._zod.bag).multipleOf??(X.multipleOf=v.value)}),$._zod.check=(D)=>{if(typeof D.value!==typeof v.value)throw Error("Cannot mix number and bigint in multiple_of check.");if(typeof D.value==="bigint"?D.value%v.value===BigInt(0):wG(D.value,v.value)===0)return;D.issues.push({origin:typeof D.value,code:"not_multiple_of",divisor:v.value,input:D.value,inst:$,continue:!v.abort})}}),YJ=B("$ZodCheckNumberFormat",($,v)=>{G$.init($,v),v.format=v.format||"float64";let D=v.format?.includes("int"),X=D?"int":"number",[U,G]=kG[v.format];$._zod.onattach.push((J)=>{let Q=J._zod.bag;if(Q.format=v.format,Q.minimum=U,Q.maximum=G,D)Q.pattern=DJ}),$._zod.check=(J)=>{let Q=J.value;if(D){if(!Number.isInteger(Q)){J.issues.push({expected:X,format:v.format,code:"invalid_type",continue:!1,input:Q,inst:$});return}if(!Number.isSafeInteger(Q)){if(Q>0)J.issues.push({input:Q,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:$,origin:X,inclusive:!0,continue:!v.abort});else J.issues.push({input:Q,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:$,origin:X,inclusive:!0,continue:!v.abort});return}}if(Q<U)J.issues.push({origin:"number",input:Q,code:"too_small",minimum:U,inclusive:!0,inst:$,continue:!v.abort});if(Q>G)J.issues.push({origin:"number",input:Q,code:"too_big",maximum:G,inclusive:!0,inst:$,continue:!v.abort})}}),IJ=B("$ZodCheckBigIntFormat",($,v)=>{G$.init($,v);let[D,X]=EG[v.format];$._zod.onattach.push((U)=>{let G=U._zod.bag;G.format=v.format,G.minimum=D,G.maximum=X}),$._zod.check=(U)=>{let G=U.value;if(G<D)U.issues.push({origin:"bigint",input:G,code:"too_small",minimum:D,inclusive:!0,inst:$,continue:!v.abort});if(G>X)U.issues.push({origin:"bigint",input:G,code:"too_big",maximum:X,inclusive:!0,inst:$,continue:!v.abort})}}),VJ=B("$ZodCheckMaxSize",($,v)=>{var D;G$.init($,v),(D=$._zod.def).when??(D.when=(X)=>{let U=X.value;return!o4(U)&&U.size!==void 0}),$._zod.onattach.push((X)=>{let U=X._zod.bag.maximum??Number.POSITIVE_INFINITY;if(v.maximum<U)X._zod.bag.maximum=v.maximum}),$._zod.check=(X)=>{let U=X.value;if(U.size<=v.maximum)return;X.issues.push({origin:Uv(U),code:"too_big",maximum:v.maximum,inclusive:!0,input:U,inst:$,continue:!v.abort})}}),KJ=B("$ZodCheckMinSize",($,v)=>{var D;G$.init($,v),(D=$._zod.def).when??(D.when=(X)=>{let U=X.value;return!o4(U)&&U.size!==void 0}),$._zod.onattach.push((X)=>{let U=X._zod.bag.minimum??Number.NEGATIVE_INFINITY;if(v.minimum>U)X._zod.bag.minimum=v.minimum}),$._zod.check=(X)=>{let U=X.value;if(U.size>=v.minimum)return;X.issues.push({origin:Uv(U),code:"too_small",minimum:v.minimum,inclusive:!0,input:U,inst:$,continue:!v.abort})}}),LJ=B("$ZodCheckSizeEquals",($,v)=>{var D;G$.init($,v),(D=$._zod.def).when??(D.when=(X)=>{let U=X.value;return!o4(U)&&U.size!==void 0}),$._zod.onattach.push((X)=>{let U=X._zod.bag;U.minimum=v.size,U.maximum=v.size,U.size=v.size}),$._zod.check=(X)=>{let U=X.value,G=U.size;if(G===v.size)return;let J=G>v.size;X.issues.push({origin:Uv(U),...J?{code:"too_big",maximum:v.size}:{code:"too_small",minimum:v.size},inclusive:!0,exact:!0,input:X.value,inst:$,continue:!v.abort})}}),BJ=B("$ZodCheckMaxLength",($,v)=>{var D;G$.init($,v),(D=$._zod.def).when??(D.when=(X)=>{let U=X.value;return!o4(U)&&U.length!==void 0}),$._zod.onattach.push((X)=>{let U=X._zod.bag.maximum??Number.POSITIVE_INFINITY;if(v.maximum<U)X._zod.bag.maximum=v.maximum}),$._zod.check=(X)=>{let U=X.value;if(U.length<=v.maximum)return;let J=Dv(U);X.issues.push({origin:J,code:"too_big",maximum:v.maximum,inclusive:!0,input:U,inst:$,continue:!v.abort})}}),NJ=B("$ZodCheckMinLength",($,v)=>{var D;G$.init($,v),(D=$._zod.def).when??(D.when=(X)=>{let U=X.value;return!o4(U)&&U.length!==void 0}),$._zod.onattach.push((X)=>{let U=X._zod.bag.minimum??Number.NEGATIVE_INFINITY;if(v.minimum>U)X._zod.bag.minimum=v.minimum}),$._zod.check=(X)=>{let U=X.value;if(U.length>=v.minimum)return;let J=Dv(U);X.issues.push({origin:J,code:"too_small",minimum:v.minimum,inclusive:!0,input:U,inst:$,continue:!v.abort})}}),ZJ=B("$ZodCheckLengthEquals",($,v)=>{var D;G$.init($,v),(D=$._zod.def).when??(D.when=(X)=>{let U=X.value;return!o4(U)&&U.length!==void 0}),$._zod.onattach.push((X)=>{let U=X._zod.bag;U.minimum=v.length,U.maximum=v.length,U.length=v.length}),$._zod.check=(X)=>{let U=X.value,G=U.length;if(G===v.length)return;let J=Dv(U),Q=G>v.length;X.issues.push({origin:J,...Q?{code:"too_big",maximum:v.length}:{code:"too_small",minimum:v.length},inclusive:!0,exact:!0,input:X.value,inst:$,continue:!v.abort})}}),d6=B("$ZodCheckStringFormat",($,v)=>{var D,X;if(G$.init($,v),$._zod.onattach.push((U)=>{let G=U._zod.bag;if(G.format=v.format,v.pattern)G.patterns??(G.patterns=new Set),G.patterns.add(v.pattern)}),v.pattern)(D=$._zod).check??(D.check=(U)=>{if(v.pattern.lastIndex=0,v.pattern.test(U.value))return;U.issues.push({origin:"string",code:"invalid_format",format:v.format,input:U.value,...v.pattern?{pattern:v.pattern.toString()}:{},inst:$,continue:!v.abort})});else(X=$._zod).check??(X.check=()=>{})}),OJ=B("$ZodCheckRegex",($,v)=>{d6.init($,v),$._zod.check=(D)=>{if(v.pattern.lastIndex=0,v.pattern.test(D.value))return;D.issues.push({origin:"string",code:"invalid_format",format:"regex",input:D.value,pattern:v.pattern.toString(),inst:$,continue:!v.abort})}}),HJ=B("$ZodCheckLowerCase",($,v)=>{v.pattern??(v.pattern=QJ),d6.init($,v)}),FJ=B("$ZodCheckUpperCase",($,v)=>{v.pattern??(v.pattern=WJ),d6.init($,v)}),jJ=B("$ZodCheckIncludes",($,v)=>{G$.init($,v);let D=v4(v.includes),X=new RegExp(typeof v.position==="number"?`^.{${v.position}}${D}`:D);v.pattern=X,$._zod.onattach.push((U)=>{let G=U._zod.bag;G.patterns??(G.patterns=new Set),G.patterns.add(X)}),$._zod.check=(U)=>{if(U.value.includes(v.includes,v.position))return;U.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:v.includes,input:U.value,inst:$,continue:!v.abort})}}),AJ=B("$ZodCheckStartsWith",($,v)=>{G$.init($,v);let D=new RegExp(`^${v4(v.prefix)}.*`);v.pattern??(v.pattern=D),$._zod.onattach.push((X)=>{let U=X._zod.bag;U.patterns??(U.patterns=new Set),U.patterns.add(D)}),$._zod.check=(X)=>{if(X.value.startsWith(v.prefix))return;X.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:v.prefix,input:X.value,inst:$,continue:!v.abort})}}),wJ=B("$ZodCheckEndsWith",($,v)=>{G$.init($,v);let D=new RegExp(`.*${v4(v.suffix)}$`);v.pattern??(v.pattern=D),$._zod.onattach.push((X)=>{let U=X._zod.bag;U.patterns??(U.patterns=new Set),U.patterns.add(D)}),$._zod.check=(X)=>{if(X.value.endsWith(v.suffix))return;X.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:v.suffix,input:X.value,inst:$,continue:!v.abort})}});function EY($,v,D){if($.issues.length)v.issues.push(...n$(D,$.issues))}var MJ=B("$ZodCheckProperty",($,v)=>{G$.init($,v),$._zod.check=(D)=>{let X=v.schema._zod.run({value:D.value[v.property],issues:[]},{});if(X instanceof Promise)return X.then((U)=>EY(U,D,v.property));EY(X,D,v.property);return}}),PJ=B("$ZodCheckMimeType",($,v)=>{G$.init($,v);let D=new Set(v.mime);$._zod.onattach.push((X)=>{X._zod.bag.mime=v.mime}),$._zod.check=(X)=>{if(D.has(X.value.type))return;X.issues.push({code:"invalid_value",values:v.mime,input:X.value.type,inst:$,continue:!v.abort})}}),bJ=B("$ZodCheckOverwrite",($,v)=>{G$.init($,v),$._zod.check=(D)=>{D.value=v.tx(D.value)}});class IU{constructor($=[]){if(this.content=[],this.indent=0,this)this.args=$}indented($){this.indent+=1,$(this),this.indent-=1}write($){if(typeof $==="function"){$(this,{execution:"sync"}),$(this,{execution:"async"});return}let D=$.split(`
|
|
30
30
|
`).filter((G)=>G),X=Math.min(...D.map((G)=>G.length-G.trimStart().length)),U=D.map((G)=>G.slice(X)).map((G)=>" ".repeat(this.indent*2)+G);for(let G of U)this.content.push(G)}compile(){let $=Function,v=this?.args,X=[...(this?.content??[""]).map((U)=>` ${U}`)];return new $(...v,X.join(`
|
|
31
31
|
`))}}var qJ={major:4,minor:4,patch:3};var _=B("$ZodType",($,v)=>{var D;$??($={}),$._zod.def=v,$._zod.bag=$._zod.bag||{},$._zod.version=qJ;let X=[...$._zod.def.checks??[]];if($._zod.traits.has("$ZodCheck"))X.unshift($);for(let U of X)for(let G of U._zod.onattach)G($);if(X.length===0)(D=$._zod).deferred??(D.deferred=[]),$._zod.deferred?.push(()=>{$._zod.run=$._zod.parse});else{let U=(J,Q,W)=>{let z=s4(J),Y;for(let I of Q){if(I._zod.def.when){if(TG(J))continue;if(!I._zod.def.when(J))continue}else if(z)continue;let V=J.issues.length,K=I._zod.check(J);if(K instanceof Promise&&W?.async===!1)throw new M4;if(Y||K instanceof Promise)Y=(Y??Promise.resolve()).then(async()=>{if(await K,J.issues.length===V)return;if(!z)z=s4(J,V)});else{if(J.issues.length===V)continue;if(!z)z=s4(J,V)}}if(Y)return Y.then(()=>{return J});return J},G=(J,Q,W)=>{if(s4(J))return J.aborted=!0,J;let z=U(Q,X,W);if(z instanceof Promise){if(W.async===!1)throw new M4;return z.then((Y)=>$._zod.parse(Y,W))}return $._zod.parse(z,W)};$._zod.run=(J,Q)=>{if(Q.skipChecks)return $._zod.parse(J,Q);if(Q.direction==="backward"){let z=$._zod.parse({value:J.value,issues:[]},{...Q,skipChecks:!0});if(z instanceof Promise)return z.then((Y)=>{return G(Y,J,Q)});return G(z,J,Q)}let W=$._zod.parse(J,Q);if(W instanceof Promise){if(Q.async===!1)throw new M4;return W.then((z)=>U(z,X,Q))}return U(W,X,Q)}}m($,"~standard",()=>({validate:(U)=>{try{let G=m6($,U);return G.success?{value:G.data}:{issues:G.error?.issues}}catch(G){return zv($,U).then((J)=>J.success?{value:J.data}:{issues:J.error?.issues})}},vendor:"zod",version:1}))}),A6=B("$ZodString",($,v)=>{_.init($,v),$._zod.pattern=[...$?._zod.bag?.patterns??[]].pop()??vJ($._zod.bag),$._zod.parse=(D,X)=>{if(v.coerce)try{D.value=String(D.value)}catch(U){}if(typeof D.value==="string")return D;return D.issues.push({expected:"string",code:"invalid_type",input:D.value,inst:$}),D}}),v$=B("$ZodStringFormat",($,v)=>{d6.init($,v),A6.init($,v)}),kJ=B("$ZodGUID",($,v)=>{v.pattern??(v.pattern=nG),v$.init($,v)}),EJ=B("$ZodUUID",($,v)=>{if(v.version){let X={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[v.version];if(X===void 0)throw Error(`Invalid UUID version: "${v.version}"`);v.pattern??(v.pattern=j6(X))}else v.pattern??(v.pattern=j6());v$.init($,v)}),TJ=B("$ZodEmail",($,v)=>{v.pattern??(v.pattern=lG),v$.init($,v)}),RJ=B("$ZodURL",($,v)=>{v$.init($,v),$._zod.check=(D)=>{try{let X=D.value.trim();if(!v.normalize&&v.protocol?.source===oG.source){if(!/^https?:\/\//i.test(X)){D.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:D.value,inst:$,continue:!v.abort});return}}let U=new URL(X);if(v.hostname){if(v.hostname.lastIndex=0,!v.hostname.test(U.hostname))D.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:v.hostname.source,input:D.value,inst:$,continue:!v.abort})}if(v.protocol){if(v.protocol.lastIndex=0,!v.protocol.test(U.protocol.endsWith(":")?U.protocol.slice(0,-1):U.protocol))D.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:v.protocol.source,input:D.value,inst:$,continue:!v.abort})}if(v.normalize)D.value=U.href;else D.value=X;return}catch(X){D.issues.push({code:"invalid_format",format:"url",input:D.value,inst:$,continue:!v.abort})}}}),gJ=B("$ZodEmoji",($,v)=>{v.pattern??(v.pattern=hG()),v$.init($,v)}),CJ=B("$ZodNanoID",($,v)=>{v.pattern??(v.pattern=iG),v$.init($,v)}),uJ=B("$ZodCUID",($,v)=>{v.pattern??(v.pattern=CG),v$.init($,v)}),xJ=B("$ZodCUID2",($,v)=>{v.pattern??(v.pattern=uG),v$.init($,v)}),fJ=B("$ZodULID",($,v)=>{v.pattern??(v.pattern=xG),v$.init($,v)}),_J=B("$ZodXID",($,v)=>{v.pattern??(v.pattern=fG),v$.init($,v)}),iJ=B("$ZodKSUID",($,v)=>{v.pattern??(v.pattern=_G),v$.init($,v)}),yJ=B("$ZodISODateTime",($,v)=>{v.pattern??(v.pattern=$J(v)),v$.init($,v)}),nJ=B("$ZodISODate",($,v)=>{v.pattern??(v.pattern=eG),v$.init($,v)}),lJ=B("$ZodISOTime",($,v)=>{v.pattern??(v.pattern=sG(v)),v$.init($,v)}),hJ=B("$ZodISODuration",($,v)=>{v.pattern??(v.pattern=yG),v$.init($,v)}),mJ=B("$ZodIPv4",($,v)=>{v.pattern??(v.pattern=mG),v$.init($,v),$._zod.bag.format="ipv4"}),cJ=B("$ZodIPv6",($,v)=>{v.pattern??(v.pattern=cG),v$.init($,v),$._zod.bag.format="ipv6",$._zod.check=(D)=>{try{new URL(`http://[${D.value}]`)}catch{D.issues.push({code:"invalid_format",format:"ipv6",input:D.value,inst:$,continue:!v.abort})}}}),dJ=B("$ZodMAC",($,v)=>{v.pattern??(v.pattern=dG(v.delimiter)),v$.init($,v),$._zod.bag.format="mac"}),rJ=B("$ZodCIDRv4",($,v)=>{v.pattern??(v.pattern=rG),v$.init($,v)}),pJ=B("$ZodCIDRv6",($,v)=>{v.pattern??(v.pattern=pG),v$.init($,v),$._zod.check=(D)=>{let X=D.value.split("/");try{if(X.length!==2)throw Error();let[U,G]=X;if(!G)throw Error();let J=Number(G);if(`${J}`!==G)throw Error();if(J<0||J>128)throw Error();new URL(`http://[${U}]`)}catch{D.issues.push({code:"invalid_format",format:"cidrv6",input:D.value,inst:$,continue:!v.abort})}}});function tJ($){if($==="")return!0;if(/\s/.test($))return!1;if($.length%4!==0)return!1;try{return atob($),!0}catch{return!1}}var oJ=B("$ZodBase64",($,v)=>{v.pattern??(v.pattern=tG),v$.init($,v),$._zod.bag.contentEncoding="base64",$._zod.check=(D)=>{if(tJ(D.value))return;D.issues.push({code:"invalid_format",format:"base64",input:D.value,inst:$,continue:!v.abort})}});function rY($){if(!WU.test($))return!1;let v=$.replace(/[-_]/g,(X)=>X==="-"?"+":"/"),D=v.padEnd(Math.ceil(v.length/4)*4,"=");return tJ(D)}var aJ=B("$ZodBase64URL",($,v)=>{v.pattern??(v.pattern=WU),v$.init($,v),$._zod.bag.contentEncoding="base64url",$._zod.check=(D)=>{if(rY(D.value))return;D.issues.push({code:"invalid_format",format:"base64url",input:D.value,inst:$,continue:!v.abort})}}),eJ=B("$ZodE164",($,v)=>{v.pattern??(v.pattern=aG),v$.init($,v)});function pY($,v=null){try{let D=$.split(".");if(D.length!==3)return!1;let[X]=D;if(!X)return!1;let U=JSON.parse(atob(X));if("typ"in U&&U?.typ!=="JWT")return!1;if(!U.alg)return!1;if(v&&(!("alg"in U)||U.alg!==v))return!1;return!0}catch{return!1}}var sJ=B("$ZodJWT",($,v)=>{v$.init($,v),$._zod.check=(D)=>{if(pY(D.value,v.alg))return;D.issues.push({code:"invalid_format",format:"jwt",input:D.value,inst:$,continue:!v.abort})}}),$8=B("$ZodCustomStringFormat",($,v)=>{v$.init($,v),$._zod.check=(D)=>{if(v.fn(D.value))return;D.issues.push({code:"invalid_format",format:v.format,input:D.value,inst:$,continue:!v.abort})}}),NU=B("$ZodNumber",($,v)=>{_.init($,v),$._zod.pattern=$._zod.bag.pattern??Yv,$._zod.parse=(D,X)=>{if(v.coerce)try{D.value=Number(D.value)}catch(J){}let U=D.value;if(typeof U==="number"&&!Number.isNaN(U)&&Number.isFinite(U))return D;let G=typeof U==="number"?Number.isNaN(U)?"NaN":!Number.isFinite(U)?"Infinity":void 0:void 0;return D.issues.push({expected:"number",code:"invalid_type",input:U,inst:$,...G?{received:G}:{}}),D}}),v8=B("$ZodNumberFormat",($,v)=>{YJ.init($,v),NU.init($,v)}),Kv=B("$ZodBoolean",($,v)=>{_.init($,v),$._zod.pattern=XJ,$._zod.parse=(D,X)=>{if(v.coerce)try{D.value=Boolean(D.value)}catch(G){}let U=D.value;if(typeof U==="boolean")return D;return D.issues.push({expected:"boolean",code:"invalid_type",input:U,inst:$}),D}}),ZU=B("$ZodBigInt",($,v)=>{_.init($,v),$._zod.pattern=UJ,$._zod.parse=(D,X)=>{if(v.coerce)try{D.value=BigInt(D.value)}catch(U){}if(typeof D.value==="bigint")return D;return D.issues.push({expected:"bigint",code:"invalid_type",input:D.value,inst:$}),D}}),U8=B("$ZodBigIntFormat",($,v)=>{IJ.init($,v),ZU.init($,v)}),D8=B("$ZodSymbol",($,v)=>{_.init($,v),$._zod.parse=(D,X)=>{let U=D.value;if(typeof U==="symbol")return D;return D.issues.push({expected:"symbol",code:"invalid_type",input:U,inst:$}),D}}),X8=B("$ZodUndefined",($,v)=>{_.init($,v),$._zod.pattern=JJ,$._zod.values=new Set([void 0]),$._zod.parse=(D,X)=>{let U=D.value;if(typeof U>"u")return D;return D.issues.push({expected:"undefined",code:"invalid_type",input:U,inst:$}),D}}),G8=B("$ZodNull",($,v)=>{_.init($,v),$._zod.pattern=GJ,$._zod.values=new Set([null]),$._zod.parse=(D,X)=>{let U=D.value;if(U===null)return D;return D.issues.push({expected:"null",code:"invalid_type",input:U,inst:$}),D}}),J8=B("$ZodAny",($,v)=>{_.init($,v),$._zod.parse=(D)=>D}),Q8=B("$ZodUnknown",($,v)=>{_.init($,v),$._zod.parse=(D)=>D}),W8=B("$ZodNever",($,v)=>{_.init($,v),$._zod.parse=(D,X)=>{return D.issues.push({expected:"never",code:"invalid_type",input:D.value,inst:$}),D}}),z8=B("$ZodVoid",($,v)=>{_.init($,v),$._zod.parse=(D,X)=>{let U=D.value;if(typeof U>"u")return D;return D.issues.push({expected:"void",code:"invalid_type",input:U,inst:$}),D}}),Y8=B("$ZodDate",($,v)=>{_.init($,v),$._zod.parse=(D,X)=>{if(v.coerce)try{D.value=new Date(D.value)}catch(Q){}let U=D.value,G=U instanceof Date;if(G&&!Number.isNaN(U.getTime()))return D;return D.issues.push({expected:"date",code:"invalid_type",input:U,...G?{received:"Invalid Date"}:{},inst:$}),D}});function gY($,v,D){if($.issues.length)v.issues.push(...n$(D,$.issues));v.value[D]=$.value}var I8=B("$ZodArray",($,v)=>{_.init($,v),$._zod.parse=(D,X)=>{let U=D.value;if(!Array.isArray(U))return D.issues.push({expected:"array",code:"invalid_type",input:U,inst:$}),D;D.value=Array(U.length);let G=[];for(let J=0;J<U.length;J++){let Q=U[J],W=v.element._zod.run({value:Q,issues:[]},X);if(W instanceof Promise)G.push(W.then((z)=>gY(z,D,J)));else gY(W,D,J)}if(G.length)return Promise.all(G).then(()=>D);return D}});function BU($,v,D,X,U,G){let J=D in X;if($.issues.length){if(U&&G&&!J)return;v.issues.push(...n$(D,$.issues))}if(!J&&!U){if(!$.issues.length)v.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[D]});return}if($.value===void 0){if(J)v.value[D]=void 0}else v.value[D]=$.value}function tY($){let v=Object.keys($.shape);for(let X of v)if(!$.shape?.[X]?._zod?.traits?.has("$ZodType"))throw Error(`Invalid element at key "${X}": expected a Zod schema`);let D=SG($.shape);return{...$,keys:v,keySet:new Set(v),numKeys:v.length,optionalKeys:new Set(D)}}function oY($,v,D,X,U,G){let J=[],Q=U.keySet,W=U.catchall._zod,z=W.def.type,Y=W.optin==="optional",I=W.optout==="optional";for(let V in v){if(V==="__proto__")continue;if(Q.has(V))continue;if(z==="never"){J.push(V);continue}let K=W.run({value:v[V],issues:[]},X);if(K instanceof Promise)$.push(K.then((L)=>BU(L,D,V,v,Y,I)));else BU(K,D,V,v,Y,I)}if(J.length)D.issues.push({code:"unrecognized_keys",keys:J,input:v,inst:G});if(!$.length)return D;return Promise.all($).then(()=>{return D})}var aY=B("$ZodObject",($,v)=>{if(_.init($,v),!Object.getOwnPropertyDescriptor(v,"shape")?.get){let Q=v.shape;Object.defineProperty(v,"shape",{get:()=>{let W={...Q};return Object.defineProperty(v,"shape",{value:W}),W}})}let X=i6(()=>tY(v));m($._zod,"propValues",()=>{let Q=v.shape,W={};for(let z in Q){let Y=Q[z]._zod;if(Y.values){W[z]??(W[z]=new Set);for(let I of Y.values)W[z].add(I)}}return W});let U=F6,G=v.catchall,J;$._zod.parse=(Q,W)=>{J??(J=X.value);let z=Q.value;if(!U(z))return Q.issues.push({expected:"object",code:"invalid_type",input:z,inst:$}),Q;Q.value={};let Y=[],I=J.shape;for(let V of J.keys){let K=I[V],L=K._zod.optin==="optional",N=K._zod.optout==="optional",Z=K._zod.run({value:z[V],issues:[]},W);if(Z instanceof Promise)Y.push(Z.then((F)=>BU(F,Q,V,z,L,N)));else BU(Z,Q,V,z,L,N)}if(!G)return Y.length?Promise.all(Y).then(()=>Q):Q;return oY(Y,z,Q,W,X.value,$)}}),V8=B("$ZodObjectJIT",($,v)=>{aY.init($,v);let D=$._zod.parse,X=i6(()=>tY(v)),U=(V)=>{let K=new IU(["shape","payload","ctx"]),L=X.value,N=(g)=>{let u=e0(g);return`shape[${u}]._zod.run({ value: input[${u}], issues: [] }, ctx)`};K.write("const input = payload.value;");let Z=Object.create(null),F=0;for(let g of L.keys)Z[g]=`key_${F++}`;K.write("const newResult = {};");for(let g of L.keys){let u=Z[g],k=e0(g),N$=V[g],j$=N$?._zod?.optin==="optional",g4=N$?._zod?.optout==="optional";if(K.write(`const ${u} = ${N(g)};`),j$&&g4)K.write(`
|
|
32
32
|
if (${u}.issues.length) {
|
|
@@ -87,9 +87,9 @@ ${K}
|
|
|
87
87
|
newResult[${k}] = ${u}.value;
|
|
88
88
|
}
|
|
89
89
|
|
|
90
|
-
`)}K.write("payload.value = newResult;"),K.write("return payload;");let S=K.compile();return(g,u)=>S(V,g,u)},G,J=F6,Q=!O6.jitless,z=Q&&PG.value,Y=v.catchall,I;$._zod.parse=(V,K)=>{I??(I=X.value);let L=V.value;if(!J(L))return V.issues.push({expected:"object",code:"invalid_type",input:L,inst:$}),V;if(Q&&z&&K?.async===!1&&K.jitless!==!0){if(!G)G=U(v.shape);if(V=G(V,K),!Y)return V;return oY([],L,V,K,I,$)}return D(V,K)}});function CY($,v,D,X){for(let G of $)if(G.issues.length===0)return v.value=G.value,v;let U=$.filter((G)=>!s4(G));if(U.length===1)return v.value=U[0].value,U[0];return v.issues.push({code:"invalid_union",input:v.value,inst:D,errors:$.map((G)=>G.issues.map((J)=>u$(J,X,V$())))}),v}var Lv=B("$ZodUnion",($,v)=>{_.init($,v),m($._zod,"optin",()=>v.options.some((X)=>X._zod.optin==="optional")?"optional":void 0),m($._zod,"optout",()=>v.options.some((X)=>X._zod.optout==="optional")?"optional":void 0),m($._zod,"values",()=>{if(v.options.every((X)=>X._zod.values))return new Set(v.options.flatMap((X)=>Array.from(X._zod.values)));return}),m($._zod,"pattern",()=>{if(v.options.every((X)=>X._zod.pattern)){let X=v.options.map((U)=>U._zod.pattern);return new RegExp(`^(${X.map((U)=>$v(U.source)).join("|")})$`)}return});let D=v.options.length===1?v.options[0]._zod.run:null;$._zod.parse=(X,U)=>{if(D)return D(X,U);let G=!1,J=[];for(let Q of v.options){let W=Q._zod.run({value:X.value,issues:[]},U);if(W instanceof Promise)J.push(W),G=!0;else{if(W.issues.length===0)return W;J.push(W)}}if(!G)return CY(J,X,$,U);return Promise.all(J).then((Q)=>{return CY(Q,X,$,U)})}});function uY($,v,D,X){let U=$.filter((G)=>G.issues.length===0);if(U.length===1)return v.value=U[0].value,v;if(U.length===0)v.issues.push({code:"invalid_union",input:v.value,inst:D,errors:$.map((G)=>G.issues.map((J)=>u$(J,X,V$())))});else v.issues.push({code:"invalid_union",input:v.value,inst:D,errors:[],inclusive:!1});return v}var K8=B("$ZodXor",($,v)=>{Lv.init($,v),v.inclusive=!1;let D=v.options.length===1?v.options[0]._zod.run:null;$._zod.parse=(X,U)=>{if(D)return D(X,U);let G=!1,J=[];for(let Q of v.options){let W=Q._zod.run({value:X.value,issues:[]},U);if(W instanceof Promise)J.push(W),G=!0;else J.push(W)}if(!G)return uY(J,X,$,U);return Promise.all(J).then((Q)=>{return uY(Q,X,$,U)})}}),L8=B("$ZodDiscriminatedUnion",($,v)=>{v.inclusive=!1,Lv.init($,v);let D=$._zod.parse;m($._zod,"propValues",()=>{let U={};for(let G of v.options){let J=G._zod.propValues;if(!J||Object.keys(J).length===0)throw Error(`Invalid discriminated union option at index "${v.options.indexOf(G)}"`);for(let[Q,W]of Object.entries(J)){if(!U[Q])U[Q]=new Set;for(let z of W)U[Q].add(z)}}return U});let X=i6(()=>{let U=v.options,G=new Map;for(let J of U){let Q=J._zod.propValues?.[v.discriminator];if(!Q||Q.size===0)throw Error(`Invalid discriminated union option at index "${v.options.indexOf(J)}"`);for(let W of Q){if(G.has(W))throw Error(`Duplicate discriminator value "${String(W)}"`);G.set(W,J)}}return G});$._zod.parse=(U,G)=>{let J=U.value;if(!F6(J))return U.issues.push({code:"invalid_type",expected:"object",input:J,inst:$}),U;let Q=X.value.get(J?.[v.discriminator]);if(Q)return Q._zod.run(U,G);if(v.unionFallback||G.direction==="backward")return D(U,G);return U.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:v.discriminator,options:Array.from(X.value.keys()),input:J,path:[v.discriminator],inst:$}),U}}),B8=B("$ZodIntersection",($,v)=>{_.init($,v),$._zod.parse=(D,X)=>{let U=D.value,G=v.left._zod.run({value:U,issues:[]},X),J=v.right._zod.run({value:U,issues:[]},X);if(G instanceof Promise||J instanceof Promise)return Promise.all([G,J]).then(([W,z])=>{return xY(D,W,z)});return xY(D,G,J)}});function SJ($,v){if($===v)return{valid:!0,data:$};if($ instanceof Date&&v instanceof Date&&+$===+v)return{valid:!0,data:$};if(e4($)&&e4(v)){let D=Object.keys(v),X=Object.keys($).filter((G)=>D.indexOf(G)!==-1),U={...$,...v};for(let G of X){let J=SJ($[G],v[G]);if(!J.valid)return{valid:!1,mergeErrorPath:[G,...J.mergeErrorPath]};U[G]=J.data}return{valid:!0,data:U}}if(Array.isArray($)&&Array.isArray(v)){if($.length!==v.length)return{valid:!1,mergeErrorPath:[]};let D=[];for(let X=0;X<$.length;X++){let U=$[X],G=v[X],J=SJ(U,G);if(!J.valid)return{valid:!1,mergeErrorPath:[X,...J.mergeErrorPath]};D.push(J.data)}return{valid:!0,data:D}}return{valid:!1,mergeErrorPath:[]}}function xY($,v,D){let X=new Map,U;for(let Q of v.issues)if(Q.code==="unrecognized_keys"){U??(U=Q);for(let W of Q.keys){if(!X.has(W))X.set(W,{});X.get(W).l=!0}}else $.issues.push(Q);for(let Q of D.issues)if(Q.code==="unrecognized_keys")for(let W of Q.keys){if(!X.has(W))X.set(W,{});X.get(W).r=!0}else $.issues.push(Q);let G=[...X].filter(([,Q])=>Q.l&&Q.r).map(([Q])=>Q);if(G.length&&U)$.issues.push({...U,keys:G});if(s4($))return $;let J=SJ(v.value,D.value);if(!J.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(J.mergeErrorPath)}`);return $.value=J.data,$}var OU=B("$ZodTuple",($,v)=>{_.init($,v);let D=v.items;$._zod.parse=(X,U)=>{let G=X.value;if(!Array.isArray(G))return X.issues.push({input:G,inst:$,expected:"tuple",code:"invalid_type"}),X;X.value=[];let J=[],Q=fY(D,"optin"),W=fY(D,"optout");if(!v.rest){if(G.length<Q)return X.issues.push({code:"too_small",minimum:Q,inclusive:!0,input:G,inst:$,origin:"array"}),X;if(G.length>D.length)X.issues.push({code:"too_big",maximum:D.length,inclusive:!0,input:G,inst:$,origin:"array"})}let z=Array(D.length);for(let Y=0;Y<D.length;Y++){let I=D[Y]._zod.run({value:G[Y],issues:[]},U);if(I instanceof Promise)J.push(I.then((V)=>{z[Y]=V}));else z[Y]=I}if(v.rest){let Y=D.length-1,I=G.slice(D.length);for(let V of I){Y++;let K=v.rest._zod.run({value:V,issues:[]},U);if(K instanceof Promise)J.push(K.then((L)=>_Y(L,X,Y)));else _Y(K,X,Y)}}if(J.length)return Promise.all(J).then(()=>iY(z,X,D,G,W));return iY(z,X,D,G,W)}});function fY($,v){for(let D=$.length-1;D>=0;D--)if($[D]._zod[v]!=="optional")return D+1;return 0}function _Y($,v,D){if($.issues.length)v.issues.push(...n$(D,$.issues));v.value[D]=$.value}function iY($,v,D,X,U){for(let G=0;G<D.length;G++){let J=$[G],Q=G<X.length;if(J.issues.length){if(!Q&&G>=U){v.value.length=G;break}v.issues.push(...n$(G,J.issues))}v.value[G]=J.value}for(let G=v.value.length-1;G>=X.length;G--)if(D[G]._zod.optout==="optional"&&v.value[G]===void 0)v.value.length=G;else break;return v}var N8=B("$ZodRecord",($,v)=>{_.init($,v),$._zod.parse=(D,X)=>{let U=D.value;if(!e4(U))return D.issues.push({expected:"record",code:"invalid_type",input:U,inst:$}),D;let G=[],J=v.keyType._zod.values;if(J){D.value={};let Q=new Set;for(let z of J)if(typeof z==="string"||typeof z==="number"||typeof z==="symbol"){Q.add(typeof z==="number"?z.toString():z);let Y=v.keyType._zod.run({value:z,issues:[]},X);if(Y instanceof Promise)throw Error("Async schemas not supported in object keys currently");if(Y.issues.length){D.issues.push({code:"invalid_key",origin:"record",issues:Y.issues.map((K)=>u$(K,X,V$())),input:z,path:[z],inst:$});continue}let I=Y.value,V=v.valueType._zod.run({value:U[z],issues:[]},X);if(V instanceof Promise)G.push(V.then((K)=>{if(K.issues.length)D.issues.push(...n$(z,K.issues));D.value[I]=K.value}));else{if(V.issues.length)D.issues.push(...n$(z,V.issues));D.value[I]=V.value}}let W;for(let z in U)if(!Q.has(z))W=W??[],W.push(z);if(W&&W.length>0)D.issues.push({code:"unrecognized_keys",input:U,inst:$,keys:W})}else{D.value={};for(let Q of Reflect.ownKeys(U)){if(Q==="__proto__")continue;if(!Object.prototype.propertyIsEnumerable.call(U,Q))continue;let W=v.keyType._zod.run({value:Q,issues:[]},X);if(W instanceof Promise)throw Error("Async schemas not supported in object keys currently");if(typeof Q==="string"&&Yv.test(Q)&&W.issues.length){let I=v.keyType._zod.run({value:Number(Q),issues:[]},X);if(I instanceof Promise)throw Error("Async schemas not supported in object keys currently");if(I.issues.length===0)W=I}if(W.issues.length){if(v.mode==="loose")D.value[Q]=U[Q];else D.issues.push({code:"invalid_key",origin:"record",issues:W.issues.map((I)=>u$(I,X,V$())),input:Q,path:[Q],inst:$});continue}let Y=v.valueType._zod.run({value:U[Q],issues:[]},X);if(Y instanceof Promise)G.push(Y.then((I)=>{if(I.issues.length)D.issues.push(...n$(Q,I.issues));D.value[W.value]=I.value}));else{if(Y.issues.length)D.issues.push(...n$(Q,Y.issues));D.value[W.value]=Y.value}}}if(G.length)return Promise.all(G).then(()=>D);return D}}),Z8=B("$ZodMap",($,v)=>{_.init($,v),$._zod.parse=(D,X)=>{let U=D.value;if(!(U instanceof Map))return D.issues.push({expected:"map",code:"invalid_type",input:U,inst:$}),D;let G=[];D.value=new Map;for(let[J,Q]of U){let W=v.keyType._zod.run({value:J,issues:[]},X),z=v.valueType._zod.run({value:Q,issues:[]},X);if(W instanceof Promise||z instanceof Promise)G.push(Promise.all([W,z]).then(([Y,I])=>{yY(Y,I,D,J,U,$,X)}));else yY(W,z,D,J,U,$,X)}if(G.length)return Promise.all(G).then(()=>D);return D}});function yY($,v,D,X,U,G,J){if($.issues.length)if(vv.has(typeof X))D.issues.push(...n$(X,$.issues));else D.issues.push({code:"invalid_key",origin:"map",input:U,inst:G,issues:$.issues.map((Q)=>u$(Q,J,V$()))});if(v.issues.length)if(vv.has(typeof X))D.issues.push(...n$(X,v.issues));else D.issues.push({origin:"map",code:"invalid_element",input:U,inst:G,key:X,issues:v.issues.map((Q)=>u$(Q,J,V$()))});D.value.set($.value,v.value)}var O8=B("$ZodSet",($,v)=>{_.init($,v),$._zod.parse=(D,X)=>{let U=D.value;if(!(U instanceof Set))return D.issues.push({input:U,inst:$,expected:"set",code:"invalid_type"}),D;let G=[];D.value=new Set;for(let J of U){let Q=v.valueType._zod.run({value:J,issues:[]},X);if(Q instanceof Promise)G.push(Q.then((W)=>nY(W,D)));else nY(Q,D)}if(G.length)return Promise.all(G).then(()=>D);return D}});function nY($,v){if($.issues.length)v.issues.push(...$.issues);v.value.add($.value)}var H8=B("$ZodEnum",($,v)=>{_.init($,v);let D=s1(v.entries),X=new Set(D);$._zod.values=X,$._zod.pattern=new RegExp(`^(${D.filter((U)=>vv.has(typeof U)).map((U)=>typeof U==="string"?v4(U):U.toString()).join("|")})$`),$._zod.parse=(U,G)=>{let J=U.value;if(X.has(J))return U;return U.issues.push({code:"invalid_value",values:D,input:J,inst:$}),U}}),F8=B("$ZodLiteral",($,v)=>{if(_.init($,v),v.values.length===0)throw Error("Cannot create literal schema with no valid values");let D=new Set(v.values);$._zod.values=D,$._zod.pattern=new RegExp(`^(${v.values.map((X)=>typeof X==="string"?v4(X):X?v4(X.toString()):String(X)).join("|")})$`),$._zod.parse=(X,U)=>{let G=X.value;if(D.has(G))return X;return X.issues.push({code:"invalid_value",values:v.values,input:G,inst:$}),X}}),j8=B("$ZodFile",($,v)=>{_.init($,v),$._zod.parse=(D,X)=>{let U=D.value;if(U instanceof File)return D;return D.issues.push({expected:"file",code:"invalid_type",input:U,inst:$}),D}}),A8=B("$ZodTransform",($,v)=>{_.init($,v),$._zod.optin="optional",$._zod.parse=(D,X)=>{if(X.direction==="backward")throw new H6($.constructor.name);let U=v.transform(D.value,D);if(X.async)return(U instanceof Promise?U:Promise.resolve(U)).then((J)=>{return D.value=J,D.fallback=!0,D});if(U instanceof Promise)throw new M4;return D.value=U,D.fallback=!0,D}});function lY($,v){if(v===void 0&&($.issues.length||$.fallback))return{issues:[],value:void 0};return $}var HU=B("$ZodOptional",($,v)=>{_.init($,v),$._zod.optin="optional",$._zod.optout="optional",m($._zod,"values",()=>{return v.innerType._zod.values?new Set([...v.innerType._zod.values,void 0]):void 0}),m($._zod,"pattern",()=>{let D=v.innerType._zod.pattern;return D?new RegExp(`^(${$v(D.source)})?$`):void 0}),$._zod.parse=(D,X)=>{if(v.innerType._zod.optin==="optional"){let U=D.value,G=v.innerType._zod.run(D,X);if(G instanceof Promise)return G.then((J)=>lY(J,U));return lY(G,U)}if(D.value===void 0)return D;return v.innerType._zod.run(D,X)}}),w8=B("$ZodExactOptional",($,v)=>{HU.init($,v),m($._zod,"values",()=>v.innerType._zod.values),m($._zod,"pattern",()=>v.innerType._zod.pattern),$._zod.parse=(D,X)=>{return v.innerType._zod.run(D,X)}}),M8=B("$ZodNullable",($,v)=>{_.init($,v),m($._zod,"optin",()=>v.innerType._zod.optin),m($._zod,"optout",()=>v.innerType._zod.optout),m($._zod,"pattern",()=>{let D=v.innerType._zod.pattern;return D?new RegExp(`^(${$v(D.source)}|null)$`):void 0}),m($._zod,"values",()=>{return v.innerType._zod.values?new Set([...v.innerType._zod.values,null]):void 0}),$._zod.parse=(D,X)=>{if(D.value===null)return D;return v.innerType._zod.run(D,X)}}),P8=B("$ZodDefault",($,v)=>{_.init($,v),$._zod.optin="optional",m($._zod,"values",()=>v.innerType._zod.values),$._zod.parse=(D,X)=>{if(X.direction==="backward")return v.innerType._zod.run(D,X);if(D.value===void 0)return D.value=v.defaultValue,D;let U=v.innerType._zod.run(D,X);if(U instanceof Promise)return U.then((G)=>hY(G,v));return hY(U,v)}});function hY($,v){if($.value===void 0)$.value=v.defaultValue;return $}var b8=B("$ZodPrefault",($,v)=>{_.init($,v),$._zod.optin="optional",m($._zod,"values",()=>v.innerType._zod.values),$._zod.parse=(D,X)=>{if(X.direction==="backward")return v.innerType._zod.run(D,X);if(D.value===void 0)D.value=v.defaultValue;return v.innerType._zod.run(D,X)}}),q8=B("$ZodNonOptional",($,v)=>{_.init($,v),m($._zod,"values",()=>{let D=v.innerType._zod.values;return D?new Set([...D].filter((X)=>X!==void 0)):void 0}),$._zod.parse=(D,X)=>{let U=v.innerType._zod.run(D,X);if(U instanceof Promise)return U.then((G)=>mY(G,$));return mY(U,$)}});function mY($,v){if(!$.issues.length&&$.value===void 0)$.issues.push({code:"invalid_type",expected:"nonoptional",input:$.value,inst:v});return $}var S8=B("$ZodSuccess",($,v)=>{_.init($,v),$._zod.parse=(D,X)=>{if(X.direction==="backward")throw new H6("ZodSuccess");let U=v.innerType._zod.run(D,X);if(U instanceof Promise)return U.then((G)=>{return D.value=G.issues.length===0,D});return D.value=U.issues.length===0,D}}),k8=B("$ZodCatch",($,v)=>{_.init($,v),$._zod.optin="optional",m($._zod,"optout",()=>v.innerType._zod.optout),m($._zod,"values",()=>v.innerType._zod.values),$._zod.parse=(D,X)=>{if(X.direction==="backward")return v.innerType._zod.run(D,X);let U=v.innerType._zod.run(D,X);if(U instanceof Promise)return U.then((G)=>{if(D.value=G.value,G.issues.length)D.value=v.catchValue({...D,error:{issues:G.issues.map((J)=>u$(J,X,V$()))},input:D.value}),D.issues=[],D.fallback=!0;return D});if(D.value=U.value,U.issues.length)D.value=v.catchValue({...D,error:{issues:U.issues.map((G)=>u$(G,X,V$()))},input:D.value}),D.issues=[],D.fallback=!0;return D}}),E8=B("$ZodNaN",($,v)=>{_.init($,v),$._zod.parse=(D,X)=>{if(typeof D.value!=="number"||!Number.isNaN(D.value))return D.issues.push({input:D.value,inst:$,expected:"nan",code:"invalid_type"}),D;return D}}),FU=B("$ZodPipe",($,v)=>{_.init($,v),m($._zod,"values",()=>v.in._zod.values),m($._zod,"optin",()=>v.in._zod.optin),m($._zod,"optout",()=>v.out._zod.optout),m($._zod,"propValues",()=>v.in._zod.propValues),$._zod.parse=(D,X)=>{if(X.direction==="backward"){let G=v.out._zod.run(D,X);if(G instanceof Promise)return G.then((J)=>VU(J,v.in,X));return VU(G,v.in,X)}let U=v.in._zod.run(D,X);if(U instanceof Promise)return U.then((G)=>VU(G,v.out,X));return VU(U,v.out,X)}});function VU($,v,D){if($.issues.length)return $.aborted=!0,$;return v._zod.run({value:$.value,issues:$.issues,fallback:$.fallback},D)}var Bv=B("$ZodCodec",($,v)=>{_.init($,v),m($._zod,"values",()=>v.in._zod.values),m($._zod,"optin",()=>v.in._zod.optin),m($._zod,"optout",()=>v.out._zod.optout),m($._zod,"propValues",()=>v.in._zod.propValues),$._zod.parse=(D,X)=>{if((X.direction||"forward")==="forward"){let G=v.in._zod.run(D,X);if(G instanceof Promise)return G.then((J)=>KU(J,v,X));return KU(G,v,X)}else{let G=v.out._zod.run(D,X);if(G instanceof Promise)return G.then((J)=>KU(J,v,X));return KU(G,v,X)}}});function KU($,v,D){if($.issues.length)return $.aborted=!0,$;if((D.direction||"forward")==="forward"){let U=v.transform($.value,$);if(U instanceof Promise)return U.then((G)=>LU($,G,v.out,D));return LU($,U,v.out,D)}else{let U=v.reverseTransform($.value,$);if(U instanceof Promise)return U.then((G)=>LU($,G,v.in,D));return LU($,U,v.in,D)}}function LU($,v,D,X){if($.issues.length)return $.aborted=!0,$;return D._zod.run({value:v,issues:$.issues},X)}var T8=B("$ZodPreprocess",($,v)=>{FU.init($,v)}),R8=B("$ZodReadonly",($,v)=>{_.init($,v),m($._zod,"propValues",()=>v.innerType._zod.propValues),m($._zod,"values",()=>v.innerType._zod.values),m($._zod,"optin",()=>v.innerType?._zod?.optin),m($._zod,"optout",()=>v.innerType?._zod?.optout),$._zod.parse=(D,X)=>{if(X.direction==="backward")return v.innerType._zod.run(D,X);let U=v.innerType._zod.run(D,X);if(U instanceof Promise)return U.then(cY);return cY(U)}});function cY($){return $.value=Object.freeze($.value),$}var g8=B("$ZodTemplateLiteral",($,v)=>{_.init($,v);let D=[];for(let X of v.parts)if(typeof X==="object"&&X!==null){if(!X._zod.pattern)throw Error(`Invalid template literal part, no pattern found: ${[...X._zod.traits].shift()}`);let U=X._zod.pattern instanceof RegExp?X._zod.pattern.source:X._zod.pattern;if(!U)throw Error(`Invalid template literal part: ${X._zod.traits}`);let G=U.startsWith("^")?1:0,J=U.endsWith("$")?U.length-1:U.length;D.push(U.slice(G,J))}else if(X===null||qG.has(typeof X))D.push(v4(`${X}`));else throw Error(`Invalid template literal part: ${X}`);$._zod.pattern=new RegExp(`^${D.join("")}$`),$._zod.parse=(X,U)=>{if(typeof X.value!=="string")return X.issues.push({input:X.value,inst:$,expected:"string",code:"invalid_type"}),X;if($._zod.pattern.lastIndex=0,!$._zod.pattern.test(X.value))return X.issues.push({input:X.value,inst:$,code:"invalid_format",format:v.format??"template_literal",pattern:$._zod.pattern.source}),X;return X}}),C8=B("$ZodFunction",($,v)=>{return _.init($,v),$._def=v,$._zod.def=v,$.implement=(D)=>{if(typeof D!=="function")throw Error("implement() must be called with a function");return function(...X){let U=$._def.input?Qv($._def.input,X):X,G=Reflect.apply(D,this,U);if($._def.output)return Qv($._def.output,G);return G}},$.implementAsync=(D)=>{if(typeof D!=="function")throw Error("implementAsync() must be called with a function");return async function(...X){let U=$._def.input?await Wv($._def.input,X):X,G=await Reflect.apply(D,this,U);if($._def.output)return await Wv($._def.output,G);return G}},$._zod.parse=(D,X)=>{if(typeof D.value!=="function")return D.issues.push({code:"invalid_type",expected:"function",input:D.value,inst:$}),D;if($._def.output&&$._def.output._zod.def.type==="promise")D.value=$.implementAsync(D.value);else D.value=$.implement(D.value);return D},$.input=(...D)=>{let X=$.constructor;if(Array.isArray(D[0]))return new X({type:"function",input:new OU({type:"tuple",items:D[0],rest:D[1]}),output:$._def.output});return new X({type:"function",input:D[0],output:$._def.output})},$.output=(D)=>{return new $.constructor({type:"function",input:$._def.input,output:D})},$}),u8=B("$ZodPromise",($,v)=>{_.init($,v),$._zod.parse=(D,X)=>{return Promise.resolve(D.value).then((U)=>v.innerType._zod.run({value:U,issues:[]},X))}}),x8=B("$ZodLazy",($,v)=>{_.init($,v),m($._zod,"innerType",()=>{let D=v;if(!D._cachedInner)D._cachedInner=v.getter();return D._cachedInner}),m($._zod,"pattern",()=>$._zod.innerType?._zod?.pattern),m($._zod,"propValues",()=>$._zod.innerType?._zod?.propValues),m($._zod,"optin",()=>$._zod.innerType?._zod?.optin??void 0),m($._zod,"optout",()=>$._zod.innerType?._zod?.optout??void 0),$._zod.parse=(D,X)=>{return $._zod.innerType._zod.run(D,X)}}),f8=B("$ZodCustom",($,v)=>{G$.init($,v),_.init($,v),$._zod.parse=(D,X)=>{return D},$._zod.check=(D)=>{let X=D.value,U=v.fn(X);if(U instanceof Promise)return U.then((G)=>dY(G,D,X,$));dY(U,D,X,$);return}});function dY($,v,D,X){if(!$){let U={code:"custom",input:D,inst:X,path:[...X._zod.def.path??[]],continue:!X._zod.def.abort};if(X._zod.def.params)U.params=X._zod.def.params;v.issues.push(y6(U))}}var Fv={};C4(Fv,{zhTW:()=>TQ,zhCN:()=>EQ,yo:()=>RQ,vi:()=>kQ,uz:()=>SQ,ur:()=>qQ,uk:()=>Hv,ua:()=>bQ,tr:()=>PQ,th:()=>MQ,ta:()=>wQ,sv:()=>AQ,sl:()=>jQ,ru:()=>FQ,ro:()=>HQ,pt:()=>OQ,ps:()=>NQ,pl:()=>ZQ,ota:()=>BQ,no:()=>LQ,nl:()=>KQ,ms:()=>VQ,mk:()=>IQ,lt:()=>YQ,ko:()=>zQ,km:()=>Zv,kh:()=>WQ,ka:()=>QQ,ja:()=>JQ,it:()=>GQ,is:()=>XQ,id:()=>DQ,hy:()=>UQ,hu:()=>vQ,hr:()=>$Q,he:()=>s8,frCA:()=>e8,fr:()=>a8,fi:()=>o8,fa:()=>t8,es:()=>p8,eo:()=>r8,en:()=>Nv,el:()=>d8,de:()=>c8,da:()=>m8,cs:()=>h8,ca:()=>l8,bg:()=>n8,be:()=>y8,az:()=>i8,ar:()=>_8});var zj=()=>{let $={string:{unit:"حرف",verb:"أن يحوي"},file:{unit:"بايت",verb:"أن يحوي"},array:{unit:"عنصر",verb:"أن يحوي"},set:{unit:"عنصر",verb:"أن يحوي"}};function v(U){return $[U]??null}let D={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:"مدخل"},X={nan:"NaN"};return(U)=>{switch(U.code){case"invalid_type":{let G=X[U.expected]??U.expected,J=A(U.input),Q=X[J]??J;if(/^[A-Z]/.test(U.expected))return`مدخلات غير مقبولة: يفترض إدخال instanceof ${U.expected}، ولكن تم إدخال ${Q}`;return`مدخلات غير مقبولة: يفترض إدخال ${G}، ولكن تم إدخال ${Q}`}case"invalid_value":if(U.values.length===1)return`مدخلات غير مقبولة: يفترض إدخال ${j(U.values[0])}`;return`اختيار غير مقبول: يتوقع انتقاء أحد هذه الخيارات: ${O(U.values,"|")}`;case"too_big":{let G=U.inclusive?"<=":"<",J=v(U.origin);if(J)return` أكبر من اللازم: يفترض أن تكون ${U.origin??"القيمة"} ${G} ${U.maximum.toString()} ${J.unit??"عنصر"}`;return`أكبر من اللازم: يفترض أن تكون ${U.origin??"القيمة"} ${G} ${U.maximum.toString()}`}case"too_small":{let G=U.inclusive?">=":">",J=v(U.origin);if(J)return`أصغر من اللازم: يفترض لـ ${U.origin} أن يكون ${G} ${U.minimum.toString()} ${J.unit}`;return`أصغر من اللازم: يفترض لـ ${U.origin} أن يكون ${G} ${U.minimum.toString()}`}case"invalid_format":{let G=U;if(G.format==="starts_with")return`نَص غير مقبول: يجب أن يبدأ بـ "${U.prefix}"`;if(G.format==="ends_with")return`نَص غير مقبول: يجب أن ينتهي بـ "${G.suffix}"`;if(G.format==="includes")return`نَص غير مقبول: يجب أن يتضمَّن "${G.includes}"`;if(G.format==="regex")return`نَص غير مقبول: يجب أن يطابق النمط ${G.pattern}`;return`${D[G.format]??U.format} غير مقبول`}case"not_multiple_of":return`رقم غير مقبول: يجب أن يكون من مضاعفات ${U.divisor}`;case"unrecognized_keys":return`معرف${U.keys.length>1?"ات":""} غريب${U.keys.length>1?"ة":""}: ${O(U.keys,"، ")}`;case"invalid_key":return`معرف غير مقبول في ${U.origin}`;case"invalid_union":return"مدخل غير مقبول";case"invalid_element":return`مدخل غير مقبول في ${U.origin}`;default:return"مدخل غير مقبول"}}};function _8(){return{localeError:zj()}}var Yj=()=>{let $={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 v(U){return $[U]??null}let D={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"},X={nan:"NaN"};return(U)=>{switch(U.code){case"invalid_type":{let G=X[U.expected]??U.expected,J=A(U.input),Q=X[J]??J;if(/^[A-Z]/.test(U.expected))return`Yanlış dəyər: gözlənilən instanceof ${U.expected}, daxil olan ${Q}`;return`Yanlış dəyər: gözlənilən ${G}, daxil olan ${Q}`}case"invalid_value":if(U.values.length===1)return`Yanlış dəyər: gözlənilən ${j(U.values[0])}`;return`Yanlış seçim: aşağıdakılardan biri olmalıdır: ${O(U.values,"|")}`;case"too_big":{let G=U.inclusive?"<=":"<",J=v(U.origin);if(J)return`Çox böyük: gözlənilən ${U.origin??"dəyər"} ${G}${U.maximum.toString()} ${J.unit??"element"}`;return`Çox böyük: gözlənilən ${U.origin??"dəyər"} ${G}${U.maximum.toString()}`}case"too_small":{let G=U.inclusive?">=":">",J=v(U.origin);if(J)return`Çox kiçik: gözlənilən ${U.origin} ${G}${U.minimum.toString()} ${J.unit}`;return`Çox kiçik: gözlənilən ${U.origin} ${G}${U.minimum.toString()}`}case"invalid_format":{let G=U;if(G.format==="starts_with")return`Yanlış mətn: "${G.prefix}" ilə başlamalıdır`;if(G.format==="ends_with")return`Yanlış mətn: "${G.suffix}" ilə bitməlidir`;if(G.format==="includes")return`Yanlış mətn: "${G.includes}" daxil olmalıdır`;if(G.format==="regex")return`Yanlış mətn: ${G.pattern} şablonuna uyğun olmalıdır`;return`Yanlış ${D[G.format]??U.format}`}case"not_multiple_of":return`Yanlış ədəd: ${U.divisor} ilə bölünə bilən olmalıdır`;case"unrecognized_keys":return`Tanınmayan açar${U.keys.length>1?"lar":""}: ${O(U.keys,", ")}`;case"invalid_key":return`${U.origin} daxilində yanlış açar`;case"invalid_union":return"Yanlış dəyər";case"invalid_element":return`${U.origin} daxilində yanlış dəyər`;default:return"Yanlış dəyər"}}};function i8(){return{localeError:Yj()}}function eY($,v,D,X){let U=Math.abs($),G=U%10,J=U%100;if(J>=11&&J<=19)return X;if(G===1)return v;if(G>=2&&G<=4)return D;return X}var Ij=()=>{let $={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 v(U){return $[U]??null}let D={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:"увод"},X={nan:"NaN",number:"лік",array:"масіў"};return(U)=>{switch(U.code){case"invalid_type":{let G=X[U.expected]??U.expected,J=A(U.input),Q=X[J]??J;if(/^[A-Z]/.test(U.expected))return`Няправільны ўвод: чакаўся instanceof ${U.expected}, атрымана ${Q}`;return`Няправільны ўвод: чакаўся ${G}, атрымана ${Q}`}case"invalid_value":if(U.values.length===1)return`Няправільны ўвод: чакалася ${j(U.values[0])}`;return`Няправільны варыянт: чакаўся адзін з ${O(U.values,"|")}`;case"too_big":{let G=U.inclusive?"<=":"<",J=v(U.origin);if(J){let Q=Number(U.maximum),W=eY(Q,J.unit.one,J.unit.few,J.unit.many);return`Занадта вялікі: чакалася, што ${U.origin??"значэнне"} павінна ${J.verb} ${G}${U.maximum.toString()} ${W}`}return`Занадта вялікі: чакалася, што ${U.origin??"значэнне"} павінна быць ${G}${U.maximum.toString()}`}case"too_small":{let G=U.inclusive?">=":">",J=v(U.origin);if(J){let Q=Number(U.minimum),W=eY(Q,J.unit.one,J.unit.few,J.unit.many);return`Занадта малы: чакалася, што ${U.origin} павінна ${J.verb} ${G}${U.minimum.toString()} ${W}`}return`Занадта малы: чакалася, што ${U.origin} павінна быць ${G}${U.minimum.toString()}`}case"invalid_format":{let G=U;if(G.format==="starts_with")return`Няправільны радок: павінен пачынацца з "${G.prefix}"`;if(G.format==="ends_with")return`Няправільны радок: павінен заканчвацца на "${G.suffix}"`;if(G.format==="includes")return`Няправільны радок: павінен змяшчаць "${G.includes}"`;if(G.format==="regex")return`Няправільны радок: павінен адпавядаць шаблону ${G.pattern}`;return`Няправільны ${D[G.format]??U.format}`}case"not_multiple_of":return`Няправільны лік: павінен быць кратным ${U.divisor}`;case"unrecognized_keys":return`Нераспазнаны ${U.keys.length>1?"ключы":"ключ"}: ${O(U.keys,", ")}`;case"invalid_key":return`Няправільны ключ у ${U.origin}`;case"invalid_union":return"Няправільны ўвод";case"invalid_element":return`Няправільнае значэнне ў ${U.origin}`;default:return"Няправільны ўвод"}}};function y8(){return{localeError:Ij()}}var Vj=()=>{let $={string:{unit:"символа",verb:"да съдържа"},file:{unit:"байта",verb:"да съдържа"},array:{unit:"елемента",verb:"да съдържа"},set:{unit:"елемента",verb:"да съдържа"}};function v(U){return $[U]??null}let D={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:"вход"},X={nan:"NaN",number:"число",array:"масив"};return(U)=>{switch(U.code){case"invalid_type":{let G=X[U.expected]??U.expected,J=A(U.input),Q=X[J]??J;if(/^[A-Z]/.test(U.expected))return`Невалиден вход: очакван instanceof ${U.expected}, получен ${Q}`;return`Невалиден вход: очакван ${G}, получен ${Q}`}case"invalid_value":if(U.values.length===1)return`Невалиден вход: очакван ${j(U.values[0])}`;return`Невалидна опция: очаквано едно от ${O(U.values,"|")}`;case"too_big":{let G=U.inclusive?"<=":"<",J=v(U.origin);if(J)return`Твърде голямо: очаква се ${U.origin??"стойност"} да съдържа ${G}${U.maximum.toString()} ${J.unit??"елемента"}`;return`Твърде голямо: очаква се ${U.origin??"стойност"} да бъде ${G}${U.maximum.toString()}`}case"too_small":{let G=U.inclusive?">=":">",J=v(U.origin);if(J)return`Твърде малко: очаква се ${U.origin} да съдържа ${G}${U.minimum.toString()} ${J.unit}`;return`Твърде малко: очаква се ${U.origin} да бъде ${G}${U.minimum.toString()}`}case"invalid_format":{let G=U;if(G.format==="starts_with")return`Невалиден низ: трябва да започва с "${G.prefix}"`;if(G.format==="ends_with")return`Невалиден низ: трябва да завършва с "${G.suffix}"`;if(G.format==="includes")return`Невалиден низ: трябва да включва "${G.includes}"`;if(G.format==="regex")return`Невалиден низ: трябва да съвпада с ${G.pattern}`;let J="Невалиден";if(G.format==="emoji")J="Невалидно";if(G.format==="datetime")J="Невалидно";if(G.format==="date")J="Невалидна";if(G.format==="time")J="Невалидно";if(G.format==="duration")J="Невалидна";return`${J} ${D[G.format]??U.format}`}case"not_multiple_of":return`Невалидно число: трябва да бъде кратно на ${U.divisor}`;case"unrecognized_keys":return`Неразпознат${U.keys.length>1?"и":""} ключ${U.keys.length>1?"ове":""}: ${O(U.keys,", ")}`;case"invalid_key":return`Невалиден ключ в ${U.origin}`;case"invalid_union":return"Невалиден вход";case"invalid_element":return`Невалидна стойност в ${U.origin}`;default:return"Невалиден вход"}}};function n8(){return{localeError:Vj()}}var Kj=()=>{let $={string:{unit:"caràcters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"}};function v(U){return $[U]??null}let D={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"},X={nan:"NaN"};return(U)=>{switch(U.code){case"invalid_type":{let G=X[U.expected]??U.expected,J=A(U.input),Q=X[J]??J;if(/^[A-Z]/.test(U.expected))return`Tipus invàlid: s'esperava instanceof ${U.expected}, s'ha rebut ${Q}`;return`Tipus invàlid: s'esperava ${G}, s'ha rebut ${Q}`}case"invalid_value":if(U.values.length===1)return`Valor invàlid: s'esperava ${j(U.values[0])}`;return`Opció invàlida: s'esperava una de ${O(U.values," o ")}`;case"too_big":{let G=U.inclusive?"com a màxim":"menys de",J=v(U.origin);if(J)return`Massa gran: s'esperava que ${U.origin??"el valor"} contingués ${G} ${U.maximum.toString()} ${J.unit??"elements"}`;return`Massa gran: s'esperava que ${U.origin??"el valor"} fos ${G} ${U.maximum.toString()}`}case"too_small":{let G=U.inclusive?"com a mínim":"més de",J=v(U.origin);if(J)return`Massa petit: s'esperava que ${U.origin} contingués ${G} ${U.minimum.toString()} ${J.unit}`;return`Massa petit: s'esperava que ${U.origin} fos ${G} ${U.minimum.toString()}`}case"invalid_format":{let G=U;if(G.format==="starts_with")return`Format invàlid: ha de començar amb "${G.prefix}"`;if(G.format==="ends_with")return`Format invàlid: ha d'acabar amb "${G.suffix}"`;if(G.format==="includes")return`Format invàlid: ha d'incloure "${G.includes}"`;if(G.format==="regex")return`Format invàlid: ha de coincidir amb el patró ${G.pattern}`;return`Format invàlid per a ${D[G.format]??U.format}`}case"not_multiple_of":return`Número invàlid: ha de ser múltiple de ${U.divisor}`;case"unrecognized_keys":return`Clau${U.keys.length>1?"s":""} no reconeguda${U.keys.length>1?"s":""}: ${O(U.keys,", ")}`;case"invalid_key":return`Clau invàlida a ${U.origin}`;case"invalid_union":return"Entrada invàlida";case"invalid_element":return`Element invàlid a ${U.origin}`;default:return"Entrada invàlida"}}};function l8(){return{localeError:Kj()}}var Lj=()=>{let $={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 v(U){return $[U]??null}let D={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"},X={nan:"NaN",number:"číslo",string:"řetězec",function:"funkce",array:"pole"};return(U)=>{switch(U.code){case"invalid_type":{let G=X[U.expected]??U.expected,J=A(U.input),Q=X[J]??J;if(/^[A-Z]/.test(U.expected))return`Neplatný vstup: očekáváno instanceof ${U.expected}, obdrženo ${Q}`;return`Neplatný vstup: očekáváno ${G}, obdrženo ${Q}`}case"invalid_value":if(U.values.length===1)return`Neplatný vstup: očekáváno ${j(U.values[0])}`;return`Neplatná možnost: očekávána jedna z hodnot ${O(U.values,"|")}`;case"too_big":{let G=U.inclusive?"<=":"<",J=v(U.origin);if(J)return`Hodnota je příliš velká: ${U.origin??"hodnota"} musí mít ${G}${U.maximum.toString()} ${J.unit??"prvků"}`;return`Hodnota je příliš velká: ${U.origin??"hodnota"} musí být ${G}${U.maximum.toString()}`}case"too_small":{let G=U.inclusive?">=":">",J=v(U.origin);if(J)return`Hodnota je příliš malá: ${U.origin??"hodnota"} musí mít ${G}${U.minimum.toString()} ${J.unit??"prvků"}`;return`Hodnota je příliš malá: ${U.origin??"hodnota"} musí být ${G}${U.minimum.toString()}`}case"invalid_format":{let G=U;if(G.format==="starts_with")return`Neplatný řetězec: musí začínat na "${G.prefix}"`;if(G.format==="ends_with")return`Neplatný řetězec: musí končit na "${G.suffix}"`;if(G.format==="includes")return`Neplatný řetězec: musí obsahovat "${G.includes}"`;if(G.format==="regex")return`Neplatný řetězec: musí odpovídat vzoru ${G.pattern}`;return`Neplatný formát ${D[G.format]??U.format}`}case"not_multiple_of":return`Neplatné číslo: musí být násobkem ${U.divisor}`;case"unrecognized_keys":return`Neznámé klíče: ${O(U.keys,", ")}`;case"invalid_key":return`Neplatný klíč v ${U.origin}`;case"invalid_union":return"Neplatný vstup";case"invalid_element":return`Neplatná hodnota v ${U.origin}`;default:return"Neplatný vstup"}}};function h8(){return{localeError:Lj()}}var Bj=()=>{let $={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"}};function v(U){return $[U]??null}let D={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"},X={nan:"NaN",string:"streng",number:"tal",boolean:"boolean",array:"liste",object:"objekt",set:"sæt",file:"fil"};return(U)=>{switch(U.code){case"invalid_type":{let G=X[U.expected]??U.expected,J=A(U.input),Q=X[J]??J;if(/^[A-Z]/.test(U.expected))return`Ugyldigt input: forventede instanceof ${U.expected}, fik ${Q}`;return`Ugyldigt input: forventede ${G}, fik ${Q}`}case"invalid_value":if(U.values.length===1)return`Ugyldig værdi: forventede ${j(U.values[0])}`;return`Ugyldigt valg: forventede en af følgende ${O(U.values,"|")}`;case"too_big":{let G=U.inclusive?"<=":"<",J=v(U.origin),Q=X[U.origin]??U.origin;if(J)return`For stor: forventede ${Q??"value"} ${J.verb} ${G} ${U.maximum.toString()} ${J.unit??"elementer"}`;return`For stor: forventede ${Q??"value"} havde ${G} ${U.maximum.toString()}`}case"too_small":{let G=U.inclusive?">=":">",J=v(U.origin),Q=X[U.origin]??U.origin;if(J)return`For lille: forventede ${Q} ${J.verb} ${G} ${U.minimum.toString()} ${J.unit}`;return`For lille: forventede ${Q} havde ${G} ${U.minimum.toString()}`}case"invalid_format":{let G=U;if(G.format==="starts_with")return`Ugyldig streng: skal starte med "${G.prefix}"`;if(G.format==="ends_with")return`Ugyldig streng: skal ende med "${G.suffix}"`;if(G.format==="includes")return`Ugyldig streng: skal indeholde "${G.includes}"`;if(G.format==="regex")return`Ugyldig streng: skal matche mønsteret ${G.pattern}`;return`Ugyldig ${D[G.format]??U.format}`}case"not_multiple_of":return`Ugyldigt tal: skal være deleligt med ${U.divisor}`;case"unrecognized_keys":return`${U.keys.length>1?"Ukendte nøgler":"Ukendt nøgle"}: ${O(U.keys,", ")}`;case"invalid_key":return`Ugyldig nøgle i ${U.origin}`;case"invalid_union":return"Ugyldigt input: matcher ingen af de tilladte typer";case"invalid_element":return`Ugyldig værdi i ${U.origin}`;default:return"Ugyldigt input"}}};function m8(){return{localeError:Bj()}}var Nj=()=>{let $={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 v(U){return $[U]??null}let D={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"},X={nan:"NaN",number:"Zahl",array:"Array"};return(U)=>{switch(U.code){case"invalid_type":{let G=X[U.expected]??U.expected,J=A(U.input),Q=X[J]??J;if(/^[A-Z]/.test(U.expected))return`Ungültige Eingabe: erwartet instanceof ${U.expected}, erhalten ${Q}`;return`Ungültige Eingabe: erwartet ${G}, erhalten ${Q}`}case"invalid_value":if(U.values.length===1)return`Ungültige Eingabe: erwartet ${j(U.values[0])}`;return`Ungültige Option: erwartet eine von ${O(U.values,"|")}`;case"too_big":{let G=U.inclusive?"<=":"<",J=v(U.origin);if(J)return`Zu groß: erwartet, dass ${U.origin??"Wert"} ${G}${U.maximum.toString()} ${J.unit??"Elemente"} hat`;return`Zu groß: erwartet, dass ${U.origin??"Wert"} ${G}${U.maximum.toString()} ist`}case"too_small":{let G=U.inclusive?">=":">",J=v(U.origin);if(J)return`Zu klein: erwartet, dass ${U.origin} ${G}${U.minimum.toString()} ${J.unit} hat`;return`Zu klein: erwartet, dass ${U.origin} ${G}${U.minimum.toString()} ist`}case"invalid_format":{let G=U;if(G.format==="starts_with")return`Ungültiger String: muss mit "${G.prefix}" beginnen`;if(G.format==="ends_with")return`Ungültiger String: muss mit "${G.suffix}" enden`;if(G.format==="includes")return`Ungültiger String: muss "${G.includes}" enthalten`;if(G.format==="regex")return`Ungültiger String: muss dem Muster ${G.pattern} entsprechen`;return`Ungültig: ${D[G.format]??U.format}`}case"not_multiple_of":return`Ungültige Zahl: muss ein Vielfaches von ${U.divisor} sein`;case"unrecognized_keys":return`${U.keys.length>1?"Unbekannte Schlüssel":"Unbekannter Schlüssel"}: ${O(U.keys,", ")}`;case"invalid_key":return`Ungültiger Schlüssel in ${U.origin}`;case"invalid_union":return"Ungültige Eingabe";case"invalid_element":return`Ungültiger Wert in ${U.origin}`;default:return"Ungültige Eingabe"}}};function c8(){return{localeError:Nj()}}var Zj=()=>{let $={string:{unit:"χαρακτήρες",verb:"να έχει"},file:{unit:"bytes",verb:"να έχει"},array:{unit:"στοιχεία",verb:"να έχει"},set:{unit:"στοιχεία",verb:"να έχει"},map:{unit:"καταχωρήσεις",verb:"να έχει"}};function v(U){return $[U]??null}let D={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:"είσοδος"},X={nan:"NaN"};return(U)=>{switch(U.code){case"invalid_type":{let G=X[U.expected]??U.expected,J=A(U.input),Q=X[J]??J;if(typeof U.expected==="string"&&/^[A-Z]/.test(U.expected))return`Μη έγκυρη είσοδος: αναμενόταν instanceof ${U.expected}, λήφθηκε ${Q}`;return`Μη έγκυρη είσοδος: αναμενόταν ${G}, λήφθηκε ${Q}`}case"invalid_value":if(U.values.length===1)return`Μη έγκυρη είσοδος: αναμενόταν ${j(U.values[0])}`;return`Μη έγκυρη επιλογή: αναμενόταν ένα από ${O(U.values,"|")}`;case"too_big":{let G=U.inclusive?"<=":"<",J=v(U.origin);if(J)return`Πολύ μεγάλο: αναμενόταν ${U.origin??"τιμή"} να έχει ${G}${U.maximum.toString()} ${J.unit??"στοιχεία"}`;return`Πολύ μεγάλο: αναμενόταν ${U.origin??"τιμή"} να είναι ${G}${U.maximum.toString()}`}case"too_small":{let G=U.inclusive?">=":">",J=v(U.origin);if(J)return`Πολύ μικρό: αναμενόταν ${U.origin} να έχει ${G}${U.minimum.toString()} ${J.unit}`;return`Πολύ μικρό: αναμενόταν ${U.origin} να είναι ${G}${U.minimum.toString()}`}case"invalid_format":{let G=U;if(G.format==="starts_with")return`Μη έγκυρη συμβολοσειρά: πρέπει να ξεκινά με "${G.prefix}"`;if(G.format==="ends_with")return`Μη έγκυρη συμβολοσειρά: πρέπει να τελειώνει με "${G.suffix}"`;if(G.format==="includes")return`Μη έγκυρη συμβολοσειρά: πρέπει να περιέχει "${G.includes}"`;if(G.format==="regex")return`Μη έγκυρη συμβολοσειρά: πρέπει να ταιριάζει με το μοτίβο ${G.pattern}`;return`Μη έγκυρο: ${D[G.format]??U.format}`}case"not_multiple_of":return`Μη έγκυρος αριθμός: πρέπει να είναι πολλαπλάσιο του ${U.divisor}`;case"unrecognized_keys":return`Άγνωστ${U.keys.length>1?"α":"ο"} κλειδ${U.keys.length>1?"ιά":"ί"}: ${O(U.keys,", ")}`;case"invalid_key":return`Μη έγκυρο κλειδί στο ${U.origin}`;case"invalid_union":return"Μη έγκυρη είσοδος";case"invalid_element":return`Μη έγκυρη τιμή στο ${U.origin}`;default:return"Μη έγκυρη είσοδος"}}};function d8(){return{localeError:Zj()}}var Oj=()=>{let $={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 v(U){return $[U]??null}let D={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"},X={nan:"NaN"};return(U)=>{switch(U.code){case"invalid_type":{let G=X[U.expected]??U.expected,J=A(U.input),Q=X[J]??J;return`Invalid input: expected ${G}, received ${Q}`}case"invalid_value":if(U.values.length===1)return`Invalid input: expected ${j(U.values[0])}`;return`Invalid option: expected one of ${O(U.values,"|")}`;case"too_big":{let G=U.inclusive?"<=":"<",J=v(U.origin);if(J)return`Too big: expected ${U.origin??"value"} to have ${G}${U.maximum.toString()} ${J.unit??"elements"}`;return`Too big: expected ${U.origin??"value"} to be ${G}${U.maximum.toString()}`}case"too_small":{let G=U.inclusive?">=":">",J=v(U.origin);if(J)return`Too small: expected ${U.origin} to have ${G}${U.minimum.toString()} ${J.unit}`;return`Too small: expected ${U.origin} to be ${G}${U.minimum.toString()}`}case"invalid_format":{let G=U;if(G.format==="starts_with")return`Invalid string: must start with "${G.prefix}"`;if(G.format==="ends_with")return`Invalid string: must end with "${G.suffix}"`;if(G.format==="includes")return`Invalid string: must include "${G.includes}"`;if(G.format==="regex")return`Invalid string: must match pattern ${G.pattern}`;return`Invalid ${D[G.format]??U.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${U.divisor}`;case"unrecognized_keys":return`Unrecognized key${U.keys.length>1?"s":""}: ${O(U.keys,", ")}`;case"invalid_key":return`Invalid key in ${U.origin}`;case"invalid_union":if(U.options&&Array.isArray(U.options)&&U.options.length>0)return`Invalid discriminator value. Expected ${U.options.map((J)=>`'${J}'`).join(" | ")}`;return"Invalid input";case"invalid_element":return`Invalid value in ${U.origin}`;default:return"Invalid input"}}};function Nv(){return{localeError:Oj()}}var Hj=()=>{let $={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function v(U){return $[U]??null}let D={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"},X={nan:"NaN",number:"nombro",array:"tabelo",null:"senvalora"};return(U)=>{switch(U.code){case"invalid_type":{let G=X[U.expected]??U.expected,J=A(U.input),Q=X[J]??J;if(/^[A-Z]/.test(U.expected))return`Nevalida enigo: atendiĝis instanceof ${U.expected}, riceviĝis ${Q}`;return`Nevalida enigo: atendiĝis ${G}, riceviĝis ${Q}`}case"invalid_value":if(U.values.length===1)return`Nevalida enigo: atendiĝis ${j(U.values[0])}`;return`Nevalida opcio: atendiĝis unu el ${O(U.values,"|")}`;case"too_big":{let G=U.inclusive?"<=":"<",J=v(U.origin);if(J)return`Tro granda: atendiĝis ke ${U.origin??"valoro"} havu ${G}${U.maximum.toString()} ${J.unit??"elementojn"}`;return`Tro granda: atendiĝis ke ${U.origin??"valoro"} havu ${G}${U.maximum.toString()}`}case"too_small":{let G=U.inclusive?">=":">",J=v(U.origin);if(J)return`Tro malgranda: atendiĝis ke ${U.origin} havu ${G}${U.minimum.toString()} ${J.unit}`;return`Tro malgranda: atendiĝis ke ${U.origin} estu ${G}${U.minimum.toString()}`}case"invalid_format":{let G=U;if(G.format==="starts_with")return`Nevalida karaktraro: devas komenciĝi per "${G.prefix}"`;if(G.format==="ends_with")return`Nevalida karaktraro: devas finiĝi per "${G.suffix}"`;if(G.format==="includes")return`Nevalida karaktraro: devas inkluzivi "${G.includes}"`;if(G.format==="regex")return`Nevalida karaktraro: devas kongrui kun la modelo ${G.pattern}`;return`Nevalida ${D[G.format]??U.format}`}case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${U.divisor}`;case"unrecognized_keys":return`Nekonata${U.keys.length>1?"j":""} ŝlosilo${U.keys.length>1?"j":""}: ${O(U.keys,", ")}`;case"invalid_key":return`Nevalida ŝlosilo en ${U.origin}`;case"invalid_union":return"Nevalida enigo";case"invalid_element":return`Nevalida valoro en ${U.origin}`;default:return"Nevalida enigo"}}};function r8(){return{localeError:Hj()}}var Fj=()=>{let $={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}};function v(U){return $[U]??null}let D={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"},X={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(U)=>{switch(U.code){case"invalid_type":{let G=X[U.expected]??U.expected,J=A(U.input),Q=X[J]??J;if(/^[A-Z]/.test(U.expected))return`Entrada inválida: se esperaba instanceof ${U.expected}, recibido ${Q}`;return`Entrada inválida: se esperaba ${G}, recibido ${Q}`}case"invalid_value":if(U.values.length===1)return`Entrada inválida: se esperaba ${j(U.values[0])}`;return`Opción inválida: se esperaba una de ${O(U.values,"|")}`;case"too_big":{let G=U.inclusive?"<=":"<",J=v(U.origin),Q=X[U.origin]??U.origin;if(J)return`Demasiado grande: se esperaba que ${Q??"valor"} tuviera ${G}${U.maximum.toString()} ${J.unit??"elementos"}`;return`Demasiado grande: se esperaba que ${Q??"valor"} fuera ${G}${U.maximum.toString()}`}case"too_small":{let G=U.inclusive?">=":">",J=v(U.origin),Q=X[U.origin]??U.origin;if(J)return`Demasiado pequeño: se esperaba que ${Q} tuviera ${G}${U.minimum.toString()} ${J.unit}`;return`Demasiado pequeño: se esperaba que ${Q} fuera ${G}${U.minimum.toString()}`}case"invalid_format":{let G=U;if(G.format==="starts_with")return`Cadena inválida: debe comenzar con "${G.prefix}"`;if(G.format==="ends_with")return`Cadena inválida: debe terminar en "${G.suffix}"`;if(G.format==="includes")return`Cadena inválida: debe incluir "${G.includes}"`;if(G.format==="regex")return`Cadena inválida: debe coincidir con el patrón ${G.pattern}`;return`Inválido ${D[G.format]??U.format}`}case"not_multiple_of":return`Número inválido: debe ser múltiplo de ${U.divisor}`;case"unrecognized_keys":return`Llave${U.keys.length>1?"s":""} desconocida${U.keys.length>1?"s":""}: ${O(U.keys,", ")}`;case"invalid_key":return`Llave inválida en ${X[U.origin]??U.origin}`;case"invalid_union":return"Entrada inválida";case"invalid_element":return`Valor inválido en ${X[U.origin]??U.origin}`;default:return"Entrada inválida"}}};function p8(){return{localeError:Fj()}}var jj=()=>{let $={string:{unit:"کاراکتر",verb:"داشته باشد"},file:{unit:"بایت",verb:"داشته باشد"},array:{unit:"آیتم",verb:"داشته باشد"},set:{unit:"آیتم",verb:"داشته باشد"}};function v(U){return $[U]??null}let D={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:"ورودی"},X={nan:"NaN",number:"عدد",array:"آرایه"};return(U)=>{switch(U.code){case"invalid_type":{let G=X[U.expected]??U.expected,J=A(U.input),Q=X[J]??J;if(/^[A-Z]/.test(U.expected))return`ورودی نامعتبر: میبایست instanceof ${U.expected} میبود، ${Q} دریافت شد`;return`ورودی نامعتبر: میبایست ${G} میبود، ${Q} دریافت شد`}case"invalid_value":if(U.values.length===1)return`ورودی نامعتبر: میبایست ${j(U.values[0])} میبود`;return`گزینه نامعتبر: میبایست یکی از ${O(U.values,"|")} میبود`;case"too_big":{let G=U.inclusive?"<=":"<",J=v(U.origin);if(J)return`خیلی بزرگ: ${U.origin??"مقدار"} باید ${G}${U.maximum.toString()} ${J.unit??"عنصر"} باشد`;return`خیلی بزرگ: ${U.origin??"مقدار"} باید ${G}${U.maximum.toString()} باشد`}case"too_small":{let G=U.inclusive?">=":">",J=v(U.origin);if(J)return`خیلی کوچک: ${U.origin} باید ${G}${U.minimum.toString()} ${J.unit} باشد`;return`خیلی کوچک: ${U.origin} باید ${G}${U.minimum.toString()} باشد`}case"invalid_format":{let G=U;if(G.format==="starts_with")return`رشته نامعتبر: باید با "${G.prefix}" شروع شود`;if(G.format==="ends_with")return`رشته نامعتبر: باید با "${G.suffix}" تمام شود`;if(G.format==="includes")return`رشته نامعتبر: باید شامل "${G.includes}" باشد`;if(G.format==="regex")return`رشته نامعتبر: باید با الگوی ${G.pattern} مطابقت داشته باشد`;return`${D[G.format]??U.format} نامعتبر`}case"not_multiple_of":return`عدد نامعتبر: باید مضرب ${U.divisor} باشد`;case"unrecognized_keys":return`کلید${U.keys.length>1?"های":""} ناشناس: ${O(U.keys,", ")}`;case"invalid_key":return`کلید ناشناس در ${U.origin}`;case"invalid_union":return"ورودی نامعتبر";case"invalid_element":return`مقدار نامعتبر در ${U.origin}`;default:return"ورودی نامعتبر"}}};function t8(){return{localeError:jj()}}var Aj=()=>{let $={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 v(U){return $[U]??null}let D={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"},X={nan:"NaN"};return(U)=>{switch(U.code){case"invalid_type":{let G=X[U.expected]??U.expected,J=A(U.input),Q=X[J]??J;if(/^[A-Z]/.test(U.expected))return`Virheellinen tyyppi: odotettiin instanceof ${U.expected}, oli ${Q}`;return`Virheellinen tyyppi: odotettiin ${G}, oli ${Q}`}case"invalid_value":if(U.values.length===1)return`Virheellinen syöte: täytyy olla ${j(U.values[0])}`;return`Virheellinen valinta: täytyy olla yksi seuraavista: ${O(U.values,"|")}`;case"too_big":{let G=U.inclusive?"<=":"<",J=v(U.origin);if(J)return`Liian suuri: ${J.subject} täytyy olla ${G}${U.maximum.toString()} ${J.unit}`.trim();return`Liian suuri: arvon täytyy olla ${G}${U.maximum.toString()}`}case"too_small":{let G=U.inclusive?">=":">",J=v(U.origin);if(J)return`Liian pieni: ${J.subject} täytyy olla ${G}${U.minimum.toString()} ${J.unit}`.trim();return`Liian pieni: arvon täytyy olla ${G}${U.minimum.toString()}`}case"invalid_format":{let G=U;if(G.format==="starts_with")return`Virheellinen syöte: täytyy alkaa "${G.prefix}"`;if(G.format==="ends_with")return`Virheellinen syöte: täytyy loppua "${G.suffix}"`;if(G.format==="includes")return`Virheellinen syöte: täytyy sisältää "${G.includes}"`;if(G.format==="regex")return`Virheellinen syöte: täytyy vastata säännöllistä lauseketta ${G.pattern}`;return`Virheellinen ${D[G.format]??U.format}`}case"not_multiple_of":return`Virheellinen luku: täytyy olla luvun ${U.divisor} monikerta`;case"unrecognized_keys":return`${U.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${O(U.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 o8(){return{localeError:Aj()}}var wj=()=>{let $={string:{unit:"caractères",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"éléments",verb:"avoir"},set:{unit:"éléments",verb:"avoir"}};function v(U){return $[U]??null}let D={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"},X={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(U)=>{switch(U.code){case"invalid_type":{let G=X[U.expected]??U.expected,J=A(U.input),Q=X[J]??J;if(/^[A-Z]/.test(U.expected))return`Entrée invalide : instanceof ${U.expected} attendu, ${Q} reçu`;return`Entrée invalide : ${G} attendu, ${Q} reçu`}case"invalid_value":if(U.values.length===1)return`Entrée invalide : ${j(U.values[0])} attendu`;return`Option invalide : une valeur parmi ${O(U.values,"|")} attendue`;case"too_big":{let G=U.inclusive?"<=":"<",J=v(U.origin);if(J)return`Trop grand : ${X[U.origin]??"valeur"} doit ${J.verb} ${G}${U.maximum.toString()} ${J.unit??"élément(s)"}`;return`Trop grand : ${X[U.origin]??"valeur"} doit être ${G}${U.maximum.toString()}`}case"too_small":{let G=U.inclusive?">=":">",J=v(U.origin);if(J)return`Trop petit : ${X[U.origin]??"valeur"} doit ${J.verb} ${G}${U.minimum.toString()} ${J.unit}`;return`Trop petit : ${X[U.origin]??"valeur"} doit être ${G}${U.minimum.toString()}`}case"invalid_format":{let G=U;if(G.format==="starts_with")return`Chaîne invalide : doit commencer par "${G.prefix}"`;if(G.format==="ends_with")return`Chaîne invalide : doit se terminer par "${G.suffix}"`;if(G.format==="includes")return`Chaîne invalide : doit inclure "${G.includes}"`;if(G.format==="regex")return`Chaîne invalide : doit correspondre au modèle ${G.pattern}`;return`${D[G.format]??U.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit être un multiple de ${U.divisor}`;case"unrecognized_keys":return`Clé${U.keys.length>1?"s":""} non reconnue${U.keys.length>1?"s":""} : ${O(U.keys,", ")}`;case"invalid_key":return`Clé invalide dans ${U.origin}`;case"invalid_union":return"Entrée invalide";case"invalid_element":return`Valeur invalide dans ${U.origin}`;default:return"Entrée invalide"}}};function a8(){return{localeError:wj()}}var Mj=()=>{let $={string:{unit:"caractères",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"éléments",verb:"avoir"},set:{unit:"éléments",verb:"avoir"}};function v(U){return $[U]??null}let D={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"},X={nan:"NaN"};return(U)=>{switch(U.code){case"invalid_type":{let G=X[U.expected]??U.expected,J=A(U.input),Q=X[J]??J;if(/^[A-Z]/.test(U.expected))return`Entrée invalide : attendu instanceof ${U.expected}, reçu ${Q}`;return`Entrée invalide : attendu ${G}, reçu ${Q}`}case"invalid_value":if(U.values.length===1)return`Entrée invalide : attendu ${j(U.values[0])}`;return`Option invalide : attendu l'une des valeurs suivantes ${O(U.values,"|")}`;case"too_big":{let G=U.inclusive?"≤":"<",J=v(U.origin);if(J)return`Trop grand : attendu que ${U.origin??"la valeur"} ait ${G}${U.maximum.toString()} ${J.unit}`;return`Trop grand : attendu que ${U.origin??"la valeur"} soit ${G}${U.maximum.toString()}`}case"too_small":{let G=U.inclusive?"≥":">",J=v(U.origin);if(J)return`Trop petit : attendu que ${U.origin} ait ${G}${U.minimum.toString()} ${J.unit}`;return`Trop petit : attendu que ${U.origin} soit ${G}${U.minimum.toString()}`}case"invalid_format":{let G=U;if(G.format==="starts_with")return`Chaîne invalide : doit commencer par "${G.prefix}"`;if(G.format==="ends_with")return`Chaîne invalide : doit se terminer par "${G.suffix}"`;if(G.format==="includes")return`Chaîne invalide : doit inclure "${G.includes}"`;if(G.format==="regex")return`Chaîne invalide : doit correspondre au motif ${G.pattern}`;return`${D[G.format]??U.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit être un multiple de ${U.divisor}`;case"unrecognized_keys":return`Clé${U.keys.length>1?"s":""} non reconnue${U.keys.length>1?"s":""} : ${O(U.keys,", ")}`;case"invalid_key":return`Clé invalide dans ${U.origin}`;case"invalid_union":return"Entrée invalide";case"invalid_element":return`Valeur invalide dans ${U.origin}`;default:return"Entrée invalide"}}};function e8(){return{localeError:Mj()}}var Pj=()=>{let $={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"}},v={string:{unit:"תווים",shortLabel:"קצר",longLabel:"ארוך"},file:{unit:"בייטים",shortLabel:"קטן",longLabel:"גדול"},array:{unit:"פריטים",shortLabel:"קטן",longLabel:"גדול"},set:{unit:"פריטים",shortLabel:"קטן",longLabel:"גדול"},number:{unit:"",shortLabel:"קטן",longLabel:"גדול"}},D=(z)=>z?$[z]:void 0,X=(z)=>{let Y=D(z);if(Y)return Y.label;return z??$.unknown.label},U=(z)=>`ה${X(z)}`,G=(z)=>{return(D(z)?.gender??"m")==="f"?"צריכה להיות":"צריך להיות"},J=(z)=>{if(!z)return null;return v[z]??null},Q={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"}},W={nan:"NaN"};return(z)=>{switch(z.code){case"invalid_type":{let Y=z.expected,I=W[Y??""]??X(Y),V=A(z.input),K=W[V]??$[V]?.label??V;if(/^[A-Z]/.test(z.expected))return`קלט לא תקין: צריך להיות instanceof ${z.expected}, התקבל ${K}`;return`קלט לא תקין: צריך להיות ${I}, התקבל ${K}`}case"invalid_value":{if(z.values.length===1)return`ערך לא תקין: הערך חייב להיות ${j(z.values[0])}`;let Y=z.values.map((K)=>j(K));if(z.values.length===2)return`ערך לא תקין: האפשרויות המתאימות הן ${Y[0]} או ${Y[1]}`;let I=Y[Y.length-1];return`ערך לא תקין: האפשרויות המתאימות הן ${Y.slice(0,-1).join(", ")} או ${I}`}case"too_big":{let Y=J(z.origin),I=U(z.origin??"value");if(z.origin==="string")return`${Y?.longLabel??"ארוך"} מדי: ${I} צריכה להכיל ${z.maximum.toString()} ${Y?.unit??""} ${z.inclusive?"או פחות":"לכל היותר"}`.trim();if(z.origin==="number"){let L=z.inclusive?`קטן או שווה ל-${z.maximum}`:`קטן מ-${z.maximum}`;return`גדול מדי: ${I} צריך להיות ${L}`}if(z.origin==="array"||z.origin==="set"){let L=z.origin==="set"?"צריכה":"צריך",N=z.inclusive?`${z.maximum} ${Y?.unit??""} או פחות`:`פחות מ-${z.maximum} ${Y?.unit??""}`;return`גדול מדי: ${I} ${L} להכיל ${N}`.trim()}let V=z.inclusive?"<=":"<",K=G(z.origin??"value");if(Y?.unit)return`${Y.longLabel} מדי: ${I} ${K} ${V}${z.maximum.toString()} ${Y.unit}`;return`${Y?.longLabel??"גדול"} מדי: ${I} ${K} ${V}${z.maximum.toString()}`}case"too_small":{let Y=J(z.origin),I=U(z.origin??"value");if(z.origin==="string")return`${Y?.shortLabel??"קצר"} מדי: ${I} צריכה להכיל ${z.minimum.toString()} ${Y?.unit??""} ${z.inclusive?"או יותר":"לפחות"}`.trim();if(z.origin==="number"){let L=z.inclusive?`גדול או שווה ל-${z.minimum}`:`גדול מ-${z.minimum}`;return`קטן מדי: ${I} צריך להיות ${L}`}if(z.origin==="array"||z.origin==="set"){let L=z.origin==="set"?"צריכה":"צריך";if(z.minimum===1&&z.inclusive){let Z=z.origin==="set"?"לפחות פריט אחד":"לפחות פריט אחד";return`קטן מדי: ${I} ${L} להכיל ${Z}`}let N=z.inclusive?`${z.minimum} ${Y?.unit??""} או יותר`:`יותר מ-${z.minimum} ${Y?.unit??""}`;return`קטן מדי: ${I} ${L} להכיל ${N}`.trim()}let V=z.inclusive?">=":">",K=G(z.origin??"value");if(Y?.unit)return`${Y.shortLabel} מדי: ${I} ${K} ${V}${z.minimum.toString()} ${Y.unit}`;return`${Y?.shortLabel??"קטן"} מדי: ${I} ${K} ${V}${z.minimum.toString()}`}case"invalid_format":{let Y=z;if(Y.format==="starts_with")return`המחרוזת חייבת להתחיל ב "${Y.prefix}"`;if(Y.format==="ends_with")return`המחרוזת חייבת להסתיים ב "${Y.suffix}"`;if(Y.format==="includes")return`המחרוזת חייבת לכלול "${Y.includes}"`;if(Y.format==="regex")return`המחרוזת חייבת להתאים לתבנית ${Y.pattern}`;let I=Q[Y.format],V=I?.label??Y.format,L=(I?.gender??"m")==="f"?"תקינה":"תקין";return`${V} לא ${L}`}case"not_multiple_of":return`מספר לא תקין: חייב להיות מכפלה של ${z.divisor}`;case"unrecognized_keys":return`מפתח${z.keys.length>1?"ות":""} לא מזוה${z.keys.length>1?"ים":"ה"}: ${O(z.keys,", ")}`;case"invalid_key":return"שדה לא תקין באובייקט";case"invalid_union":return"קלט לא תקין";case"invalid_element":return`ערך לא תקין ב${U(z.origin??"array")}`;default:return"קלט לא תקין"}}};function s8(){return{localeError:Pj()}}var bj=()=>{let $={string:{unit:"znakova",verb:"imati"},file:{unit:"bajtova",verb:"imati"},array:{unit:"stavki",verb:"imati"},set:{unit:"stavki",verb:"imati"}};function v(U){return $[U]??null}let D={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"},X={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(U)=>{switch(U.code){case"invalid_type":{let G=X[U.expected]??U.expected,J=A(U.input),Q=X[J]??J;if(/^[A-Z]/.test(U.expected))return`Neispravan unos: očekuje se instanceof ${U.expected}, a primljeno je ${Q}`;return`Neispravan unos: očekuje se ${G}, a primljeno je ${Q}`}case"invalid_value":if(U.values.length===1)return`Neispravna vrijednost: očekivano ${j(U.values[0])}`;return`Neispravna opcija: očekivano jedno od ${O(U.values,"|")}`;case"too_big":{let G=U.inclusive?"<=":"<",J=v(U.origin),Q=X[U.origin]??U.origin;if(J)return`Preveliko: očekivano da ${Q??"vrijednost"} ima ${G}${U.maximum.toString()} ${J.unit??"elemenata"}`;return`Preveliko: očekivano da ${Q??"vrijednost"} bude ${G}${U.maximum.toString()}`}case"too_small":{let G=U.inclusive?">=":">",J=v(U.origin),Q=X[U.origin]??U.origin;if(J)return`Premalo: očekivano da ${Q} ima ${G}${U.minimum.toString()} ${J.unit}`;return`Premalo: očekivano da ${Q} bude ${G}${U.minimum.toString()}`}case"invalid_format":{let G=U;if(G.format==="starts_with")return`Neispravan tekst: mora započinjati s "${G.prefix}"`;if(G.format==="ends_with")return`Neispravan tekst: mora završavati s "${G.suffix}"`;if(G.format==="includes")return`Neispravan tekst: mora sadržavati "${G.includes}"`;if(G.format==="regex")return`Neispravan tekst: mora odgovarati uzorku ${G.pattern}`;return`Neispravna ${D[G.format]??U.format}`}case"not_multiple_of":return`Neispravan broj: mora biti višekratnik od ${U.divisor}`;case"unrecognized_keys":return`Neprepoznat${U.keys.length>1?"i ključevi":" ključ"}: ${O(U.keys,", ")}`;case"invalid_key":return`Neispravan ključ u ${X[U.origin]??U.origin}`;case"invalid_union":return"Neispravan unos";case"invalid_element":return`Neispravna vrijednost u ${X[U.origin]??U.origin}`;default:return"Neispravan unos"}}};function $Q(){return{localeError:bj()}}var qj=()=>{let $={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}};function v(U){return $[U]??null}let D={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"},X={nan:"NaN",number:"szám",array:"tömb"};return(U)=>{switch(U.code){case"invalid_type":{let G=X[U.expected]??U.expected,J=A(U.input),Q=X[J]??J;if(/^[A-Z]/.test(U.expected))return`Érvénytelen bemenet: a várt érték instanceof ${U.expected}, a kapott érték ${Q}`;return`Érvénytelen bemenet: a várt érték ${G}, a kapott érték ${Q}`}case"invalid_value":if(U.values.length===1)return`Érvénytelen bemenet: a várt érték ${j(U.values[0])}`;return`Érvénytelen opció: valamelyik érték várt ${O(U.values,"|")}`;case"too_big":{let G=U.inclusive?"<=":"<",J=v(U.origin);if(J)return`Túl nagy: ${U.origin??"érték"} mérete túl nagy ${G}${U.maximum.toString()} ${J.unit??"elem"}`;return`Túl nagy: a bemeneti érték ${U.origin??"érték"} túl nagy: ${G}${U.maximum.toString()}`}case"too_small":{let G=U.inclusive?">=":">",J=v(U.origin);if(J)return`Túl kicsi: a bemeneti érték ${U.origin} mérete túl kicsi ${G}${U.minimum.toString()} ${J.unit}`;return`Túl kicsi: a bemeneti érték ${U.origin} túl kicsi ${G}${U.minimum.toString()}`}case"invalid_format":{let G=U;if(G.format==="starts_with")return`Érvénytelen string: "${G.prefix}" értékkel kell kezdődnie`;if(G.format==="ends_with")return`Érvénytelen string: "${G.suffix}" értékkel kell végződnie`;if(G.format==="includes")return`Érvénytelen string: "${G.includes}" értéket kell tartalmaznia`;if(G.format==="regex")return`Érvénytelen string: ${G.pattern} mintának kell megfelelnie`;return`Érvénytelen ${D[G.format]??U.format}`}case"not_multiple_of":return`Érvénytelen szám: ${U.divisor} többszörösének kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${U.keys.length>1?"s":""}: ${O(U.keys,", ")}`;case"invalid_key":return`Érvénytelen kulcs ${U.origin}`;case"invalid_union":return"Érvénytelen bemenet";case"invalid_element":return`Érvénytelen érték: ${U.origin}`;default:return"Érvénytelen bemenet"}}};function vQ(){return{localeError:qj()}}function sY($,v,D){return Math.abs($)===1?v:D}function r6($){if(!$)return"";let v=["ա","ե","ը","ի","ո","ու","օ"],D=$[$.length-1];return $+(v.includes(D)?"ն":"ը")}var Sj=()=>{let $={string:{unit:{one:"նշան",many:"նշաններ"},verb:"ունենալ"},file:{unit:{one:"բայթ",many:"բայթեր"},verb:"ունենալ"},array:{unit:{one:"տարր",many:"տարրեր"},verb:"ունենալ"},set:{unit:{one:"տարր",many:"տարրեր"},verb:"ունենալ"}};function v(U){return $[U]??null}let D={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:"մուտք"},X={nan:"NaN",number:"թիվ",array:"զանգված"};return(U)=>{switch(U.code){case"invalid_type":{let G=X[U.expected]??U.expected,J=A(U.input),Q=X[J]??J;if(/^[A-Z]/.test(U.expected))return`Սխալ մուտքագրում․ սպասվում էր instanceof ${U.expected}, ստացվել է ${Q}`;return`Սխալ մուտքագրում․ սպասվում էր ${G}, ստացվել է ${Q}`}case"invalid_value":if(U.values.length===1)return`Սխալ մուտքագրում․ սպասվում էր ${j(U.values[1])}`;return`Սխալ տարբերակ․ սպասվում էր հետևյալներից մեկը՝ ${O(U.values,"|")}`;case"too_big":{let G=U.inclusive?"<=":"<",J=v(U.origin);if(J){let Q=Number(U.maximum),W=sY(Q,J.unit.one,J.unit.many);return`Չափազանց մեծ արժեք․ սպասվում է, որ ${r6(U.origin??"արժեք")} կունենա ${G}${U.maximum.toString()} ${W}`}return`Չափազանց մեծ արժեք․ սպասվում է, որ ${r6(U.origin??"արժեք")} լինի ${G}${U.maximum.toString()}`}case"too_small":{let G=U.inclusive?">=":">",J=v(U.origin);if(J){let Q=Number(U.minimum),W=sY(Q,J.unit.one,J.unit.many);return`Չափազանց փոքր արժեք․ սպասվում է, որ ${r6(U.origin)} կունենա ${G}${U.minimum.toString()} ${W}`}return`Չափազանց փոքր արժեք․ սպասվում է, որ ${r6(U.origin)} լինի ${G}${U.minimum.toString()}`}case"invalid_format":{let G=U;if(G.format==="starts_with")return`Սխալ տող․ պետք է սկսվի "${G.prefix}"-ով`;if(G.format==="ends_with")return`Սխալ տող․ պետք է ավարտվի "${G.suffix}"-ով`;if(G.format==="includes")return`Սխալ տող․ պետք է պարունակի "${G.includes}"`;if(G.format==="regex")return`Սխալ տող․ պետք է համապատասխանի ${G.pattern} ձևաչափին`;return`Սխալ ${D[G.format]??U.format}`}case"not_multiple_of":return`Սխալ թիվ․ պետք է բազմապատիկ լինի ${U.divisor}-ի`;case"unrecognized_keys":return`Չճանաչված բանալի${U.keys.length>1?"ներ":""}. ${O(U.keys,", ")}`;case"invalid_key":return`Սխալ բանալի ${r6(U.origin)}-ում`;case"invalid_union":return"Սխալ մուտքագրում";case"invalid_element":return`Սխալ արժեք ${r6(U.origin)}-ում`;default:return"Սխալ մուտքագրում"}}};function UQ(){return{localeError:Sj()}}var kj=()=>{let $={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}};function v(U){return $[U]??null}let D={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"},X={nan:"NaN"};return(U)=>{switch(U.code){case"invalid_type":{let G=X[U.expected]??U.expected,J=A(U.input),Q=X[J]??J;if(/^[A-Z]/.test(U.expected))return`Input tidak valid: diharapkan instanceof ${U.expected}, diterima ${Q}`;return`Input tidak valid: diharapkan ${G}, diterima ${Q}`}case"invalid_value":if(U.values.length===1)return`Input tidak valid: diharapkan ${j(U.values[0])}`;return`Pilihan tidak valid: diharapkan salah satu dari ${O(U.values,"|")}`;case"too_big":{let G=U.inclusive?"<=":"<",J=v(U.origin);if(J)return`Terlalu besar: diharapkan ${U.origin??"value"} memiliki ${G}${U.maximum.toString()} ${J.unit??"elemen"}`;return`Terlalu besar: diharapkan ${U.origin??"value"} menjadi ${G}${U.maximum.toString()}`}case"too_small":{let G=U.inclusive?">=":">",J=v(U.origin);if(J)return`Terlalu kecil: diharapkan ${U.origin} memiliki ${G}${U.minimum.toString()} ${J.unit}`;return`Terlalu kecil: diharapkan ${U.origin} menjadi ${G}${U.minimum.toString()}`}case"invalid_format":{let G=U;if(G.format==="starts_with")return`String tidak valid: harus dimulai dengan "${G.prefix}"`;if(G.format==="ends_with")return`String tidak valid: harus berakhir dengan "${G.suffix}"`;if(G.format==="includes")return`String tidak valid: harus menyertakan "${G.includes}"`;if(G.format==="regex")return`String tidak valid: harus sesuai pola ${G.pattern}`;return`${D[G.format]??U.format} tidak valid`}case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${U.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${U.keys.length>1?"s":""}: ${O(U.keys,", ")}`;case"invalid_key":return`Kunci tidak valid di ${U.origin}`;case"invalid_union":return"Input tidak valid";case"invalid_element":return`Nilai tidak valid di ${U.origin}`;default:return"Input tidak valid"}}};function DQ(){return{localeError:kj()}}var Ej=()=>{let $={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 v(U){return $[U]??null}let D={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"},X={nan:"NaN",number:"númer",array:"fylki"};return(U)=>{switch(U.code){case"invalid_type":{let G=X[U.expected]??U.expected,J=A(U.input),Q=X[J]??J;if(/^[A-Z]/.test(U.expected))return`Rangt gildi: Þú slóst inn ${Q} þar sem á að vera instanceof ${U.expected}`;return`Rangt gildi: Þú slóst inn ${Q} þar sem á að vera ${G}`}case"invalid_value":if(U.values.length===1)return`Rangt gildi: gert ráð fyrir ${j(U.values[0])}`;return`Ógilt val: má vera eitt af eftirfarandi ${O(U.values,"|")}`;case"too_big":{let G=U.inclusive?"<=":"<",J=v(U.origin);if(J)return`Of stórt: gert er ráð fyrir að ${U.origin??"gildi"} hafi ${G}${U.maximum.toString()} ${J.unit??"hluti"}`;return`Of stórt: gert er ráð fyrir að ${U.origin??"gildi"} sé ${G}${U.maximum.toString()}`}case"too_small":{let G=U.inclusive?">=":">",J=v(U.origin);if(J)return`Of lítið: gert er ráð fyrir að ${U.origin} hafi ${G}${U.minimum.toString()} ${J.unit}`;return`Of lítið: gert er ráð fyrir að ${U.origin} sé ${G}${U.minimum.toString()}`}case"invalid_format":{let G=U;if(G.format==="starts_with")return`Ógildur strengur: verður að byrja á "${G.prefix}"`;if(G.format==="ends_with")return`Ógildur strengur: verður að enda á "${G.suffix}"`;if(G.format==="includes")return`Ógildur strengur: verður að innihalda "${G.includes}"`;if(G.format==="regex")return`Ógildur strengur: verður að fylgja mynstri ${G.pattern}`;return`Rangt ${D[G.format]??U.format}`}case"not_multiple_of":return`Röng tala: verður að vera margfeldi af ${U.divisor}`;case"unrecognized_keys":return`Óþekkt ${U.keys.length>1?"ir lyklar":"ur lykill"}: ${O(U.keys,", ")}`;case"invalid_key":return`Rangur lykill í ${U.origin}`;case"invalid_union":return"Rangt gildi";case"invalid_element":return`Rangt gildi í ${U.origin}`;default:return"Rangt gildi"}}};function XQ(){return{localeError:Ej()}}var Tj=()=>{let $={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}};function v(U){return $[U]??null}let D={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"},X={nan:"NaN",number:"numero",array:"vettore"};return(U)=>{switch(U.code){case"invalid_type":{let G=X[U.expected]??U.expected,J=A(U.input),Q=X[J]??J;if(/^[A-Z]/.test(U.expected))return`Input non valido: atteso instanceof ${U.expected}, ricevuto ${Q}`;return`Input non valido: atteso ${G}, ricevuto ${Q}`}case"invalid_value":if(U.values.length===1)return`Input non valido: atteso ${j(U.values[0])}`;return`Opzione non valida: atteso uno tra ${O(U.values,"|")}`;case"too_big":{let G=U.inclusive?"<=":"<",J=v(U.origin);if(J)return`Troppo grande: ${U.origin??"valore"} deve avere ${G}${U.maximum.toString()} ${J.unit??"elementi"}`;return`Troppo grande: ${U.origin??"valore"} deve essere ${G}${U.maximum.toString()}`}case"too_small":{let G=U.inclusive?">=":">",J=v(U.origin);if(J)return`Troppo piccolo: ${U.origin} deve avere ${G}${U.minimum.toString()} ${J.unit}`;return`Troppo piccolo: ${U.origin} deve essere ${G}${U.minimum.toString()}`}case"invalid_format":{let G=U;if(G.format==="starts_with")return`Stringa non valida: deve iniziare con "${G.prefix}"`;if(G.format==="ends_with")return`Stringa non valida: deve terminare con "${G.suffix}"`;if(G.format==="includes")return`Stringa non valida: deve includere "${G.includes}"`;if(G.format==="regex")return`Stringa non valida: deve corrispondere al pattern ${G.pattern}`;return`Input non valido: ${D[G.format]??U.format}`}case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${U.divisor}`;case"unrecognized_keys":return`Chiav${U.keys.length>1?"i":"e"} non riconosciut${U.keys.length>1?"e":"a"}: ${O(U.keys,", ")}`;case"invalid_key":return`Chiave non valida in ${U.origin}`;case"invalid_union":return"Input non valido";case"invalid_element":return`Valore non valido in ${U.origin}`;default:return"Input non valido"}}};function GQ(){return{localeError:Tj()}}var Rj=()=>{let $={string:{unit:"文字",verb:"である"},file:{unit:"バイト",verb:"である"},array:{unit:"要素",verb:"である"},set:{unit:"要素",verb:"である"}};function v(U){return $[U]??null}let D={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:"入力値"},X={nan:"NaN",number:"数値",array:"配列"};return(U)=>{switch(U.code){case"invalid_type":{let G=X[U.expected]??U.expected,J=A(U.input),Q=X[J]??J;if(/^[A-Z]/.test(U.expected))return`無効な入力: instanceof ${U.expected}が期待されましたが、${Q}が入力されました`;return`無効な入力: ${G}が期待されましたが、${Q}が入力されました`}case"invalid_value":if(U.values.length===1)return`無効な入力: ${j(U.values[0])}が期待されました`;return`無効な選択: ${O(U.values,"、")}のいずれかである必要があります`;case"too_big":{let G=U.inclusive?"以下である":"より小さい",J=v(U.origin);if(J)return`大きすぎる値: ${U.origin??"値"}は${U.maximum.toString()}${J.unit??"要素"}${G}必要があります`;return`大きすぎる値: ${U.origin??"値"}は${U.maximum.toString()}${G}必要があります`}case"too_small":{let G=U.inclusive?"以上である":"より大きい",J=v(U.origin);if(J)return`小さすぎる値: ${U.origin}は${U.minimum.toString()}${J.unit}${G}必要があります`;return`小さすぎる値: ${U.origin}は${U.minimum.toString()}${G}必要があります`}case"invalid_format":{let G=U;if(G.format==="starts_with")return`無効な文字列: "${G.prefix}"で始まる必要があります`;if(G.format==="ends_with")return`無効な文字列: "${G.suffix}"で終わる必要があります`;if(G.format==="includes")return`無効な文字列: "${G.includes}"を含む必要があります`;if(G.format==="regex")return`無効な文字列: パターン${G.pattern}に一致する必要があります`;return`無効な${D[G.format]??U.format}`}case"not_multiple_of":return`無効な数値: ${U.divisor}の倍数である必要があります`;case"unrecognized_keys":return`認識されていないキー${U.keys.length>1?"群":""}: ${O(U.keys,"、")}`;case"invalid_key":return`${U.origin}内の無効なキー`;case"invalid_union":return"無効な入力";case"invalid_element":return`${U.origin}内の無効な値`;default:return"無効な入力"}}};function JQ(){return{localeError:Rj()}}var gj=()=>{let $={string:{unit:"სიმბოლო",verb:"უნდა შეიცავდეს"},file:{unit:"ბაიტი",verb:"უნდა შეიცავდეს"},array:{unit:"ელემენტი",verb:"უნდა შეიცავდეს"},set:{unit:"ელემენტი",verb:"უნდა შეიცავდეს"}};function v(U){return $[U]??null}let D={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:"შეყვანა"},X={nan:"NaN",number:"რიცხვი",string:"ველი",boolean:"ბულეანი",function:"ფუნქცია",array:"მასივი"};return(U)=>{switch(U.code){case"invalid_type":{let G=X[U.expected]??U.expected,J=A(U.input),Q=X[J]??J;if(/^[A-Z]/.test(U.expected))return`არასწორი შეყვანა: მოსალოდნელი instanceof ${U.expected}, მიღებული ${Q}`;return`არასწორი შეყვანა: მოსალოდნელი ${G}, მიღებული ${Q}`}case"invalid_value":if(U.values.length===1)return`არასწორი შეყვანა: მოსალოდნელი ${j(U.values[0])}`;return`არასწორი ვარიანტი: მოსალოდნელია ერთ-ერთი ${O(U.values,"|")}-დან`;case"too_big":{let G=U.inclusive?"<=":"<",J=v(U.origin);if(J)return`ზედმეტად დიდი: მოსალოდნელი ${U.origin??"მნიშვნელობა"} ${J.verb} ${G}${U.maximum.toString()} ${J.unit}`;return`ზედმეტად დიდი: მოსალოდნელი ${U.origin??"მნიშვნელობა"} იყოს ${G}${U.maximum.toString()}`}case"too_small":{let G=U.inclusive?">=":">",J=v(U.origin);if(J)return`ზედმეტად პატარა: მოსალოდნელი ${U.origin} ${J.verb} ${G}${U.minimum.toString()} ${J.unit}`;return`ზედმეტად პატარა: მოსალოდნელი ${U.origin} იყოს ${G}${U.minimum.toString()}`}case"invalid_format":{let G=U;if(G.format==="starts_with")return`არასწორი ველი: უნდა იწყებოდეს "${G.prefix}"-ით`;if(G.format==="ends_with")return`არასწორი ველი: უნდა მთავრდებოდეს "${G.suffix}"-ით`;if(G.format==="includes")return`არასწორი ველი: უნდა შეიცავდეს "${G.includes}"-ს`;if(G.format==="regex")return`არასწორი ველი: უნდა შეესაბამებოდეს შაბლონს ${G.pattern}`;return`არასწორი ${D[G.format]??U.format}`}case"not_multiple_of":return`არასწორი რიცხვი: უნდა იყოს ${U.divisor}-ის ჯერადი`;case"unrecognized_keys":return`უცნობი გასაღებ${U.keys.length>1?"ები":"ი"}: ${O(U.keys,", ")}`;case"invalid_key":return`არასწორი გასაღები ${U.origin}-ში`;case"invalid_union":return"არასწორი შეყვანა";case"invalid_element":return`არასწორი მნიშვნელობა ${U.origin}-ში`;default:return"არასწორი შეყვანა"}}};function QQ(){return{localeError:gj()}}var Cj=()=>{let $={string:{unit:"តួអក្សរ",verb:"គួរមាន"},file:{unit:"បៃ",verb:"គួរមាន"},array:{unit:"ធាតុ",verb:"គួរមាន"},set:{unit:"ធាតុ",verb:"គួរមាន"}};function v(U){return $[U]??null}let D={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:"ទិន្នន័យបញ្ចូល"},X={nan:"NaN",number:"លេខ",array:"អារេ (Array)",null:"គ្មានតម្លៃ (null)"};return(U)=>{switch(U.code){case"invalid_type":{let G=X[U.expected]??U.expected,J=A(U.input),Q=X[J]??J;if(/^[A-Z]/.test(U.expected))return`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ instanceof ${U.expected} ប៉ុន្តែទទួលបាន ${Q}`;return`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${G} ប៉ុន្តែទទួលបាន ${Q}`}case"invalid_value":if(U.values.length===1)return`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${j(U.values[0])}`;return`ជម្រើសមិនត្រឹមត្រូវ៖ ត្រូវជាមួយក្នុងចំណោម ${O(U.values,"|")}`;case"too_big":{let G=U.inclusive?"<=":"<",J=v(U.origin);if(J)return`ធំពេក៖ ត្រូវការ ${U.origin??"តម្លៃ"} ${G} ${U.maximum.toString()} ${J.unit??"ធាតុ"}`;return`ធំពេក៖ ត្រូវការ ${U.origin??"តម្លៃ"} ${G} ${U.maximum.toString()}`}case"too_small":{let G=U.inclusive?">=":">",J=v(U.origin);if(J)return`តូចពេក៖ ត្រូវការ ${U.origin} ${G} ${U.minimum.toString()} ${J.unit}`;return`តូចពេក៖ ត្រូវការ ${U.origin} ${G} ${U.minimum.toString()}`}case"invalid_format":{let G=U;if(G.format==="starts_with")return`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវចាប់ផ្តើមដោយ "${G.prefix}"`;if(G.format==="ends_with")return`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវបញ្ចប់ដោយ "${G.suffix}"`;if(G.format==="includes")return`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវមាន "${G.includes}"`;if(G.format==="regex")return`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវតែផ្គូផ្គងនឹងទម្រង់ដែលបានកំណត់ ${G.pattern}`;return`មិនត្រឹមត្រូវ៖ ${D[G.format]??U.format}`}case"not_multiple_of":return`លេខមិនត្រឹមត្រូវ៖ ត្រូវតែជាពហុគុណនៃ ${U.divisor}`;case"unrecognized_keys":return`រកឃើញសោមិនស្គាល់៖ ${O(U.keys,", ")}`;case"invalid_key":return`សោមិនត្រឹមត្រូវនៅក្នុង ${U.origin}`;case"invalid_union":return"ទិន្នន័យមិនត្រឹមត្រូវ";case"invalid_element":return`ទិន្នន័យមិនត្រឹមត្រូវនៅក្នុង ${U.origin}`;default:return"ទិន្នន័យមិនត្រឹមត្រូវ"}}};function Zv(){return{localeError:Cj()}}function WQ(){return Zv()}var uj=()=>{let $={string:{unit:"문자",verb:"to have"},file:{unit:"바이트",verb:"to have"},array:{unit:"개",verb:"to have"},set:{unit:"개",verb:"to have"}};function v(U){return $[U]??null}let D={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:"입력"},X={nan:"NaN"};return(U)=>{switch(U.code){case"invalid_type":{let G=X[U.expected]??U.expected,J=A(U.input),Q=X[J]??J;if(/^[A-Z]/.test(U.expected))return`잘못된 입력: 예상 타입은 instanceof ${U.expected}, 받은 타입은 ${Q}입니다`;return`잘못된 입력: 예상 타입은 ${G}, 받은 타입은 ${Q}입니다`}case"invalid_value":if(U.values.length===1)return`잘못된 입력: 값은 ${j(U.values[0])} 이어야 합니다`;return`잘못된 옵션: ${O(U.values,"또는 ")} 중 하나여야 합니다`;case"too_big":{let G=U.inclusive?"이하":"미만",J=G==="미만"?"이어야 합니다":"여야 합니다",Q=v(U.origin),W=Q?.unit??"요소";if(Q)return`${U.origin??"값"}이 너무 큽니다: ${U.maximum.toString()}${W} ${G}${J}`;return`${U.origin??"값"}이 너무 큽니다: ${U.maximum.toString()} ${G}${J}`}case"too_small":{let G=U.inclusive?"이상":"초과",J=G==="이상"?"이어야 합니다":"여야 합니다",Q=v(U.origin),W=Q?.unit??"요소";if(Q)return`${U.origin??"값"}이 너무 작습니다: ${U.minimum.toString()}${W} ${G}${J}`;return`${U.origin??"값"}이 너무 작습니다: ${U.minimum.toString()} ${G}${J}`}case"invalid_format":{let G=U;if(G.format==="starts_with")return`잘못된 문자열: "${G.prefix}"(으)로 시작해야 합니다`;if(G.format==="ends_with")return`잘못된 문자열: "${G.suffix}"(으)로 끝나야 합니다`;if(G.format==="includes")return`잘못된 문자열: "${G.includes}"을(를) 포함해야 합니다`;if(G.format==="regex")return`잘못된 문자열: 정규식 ${G.pattern} 패턴과 일치해야 합니다`;return`잘못된 ${D[G.format]??U.format}`}case"not_multiple_of":return`잘못된 숫자: ${U.divisor}의 배수여야 합니다`;case"unrecognized_keys":return`인식할 수 없는 키: ${O(U.keys,", ")}`;case"invalid_key":return`잘못된 키: ${U.origin}`;case"invalid_union":return"잘못된 입력";case"invalid_element":return`잘못된 값: ${U.origin}`;default:return"잘못된 입력"}}};function zQ(){return{localeError:uj()}}var Ov=($)=>{return $.charAt(0).toUpperCase()+$.slice(1)};function $I($){let v=Math.abs($),D=v%10,X=v%100;if(X>=11&&X<=19||D===0)return"many";if(D===1)return"one";return"few"}var xj=()=>{let $={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 v(U,G,J,Q){let W=$[U]??null;if(W===null)return W;return{unit:W.unit[G],verb:W.verb[Q][J?"inclusive":"notInclusive"]}}let D={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"},X={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(U)=>{switch(U.code){case"invalid_type":{let G=X[U.expected]??U.expected,J=A(U.input),Q=X[J]??J;if(/^[A-Z]/.test(U.expected))return`Gautas tipas ${Q}, o tikėtasi - instanceof ${U.expected}`;return`Gautas tipas ${Q}, o tikėtasi - ${G}`}case"invalid_value":if(U.values.length===1)return`Privalo būti ${j(U.values[0])}`;return`Privalo būti vienas iš ${O(U.values,"|")} pasirinkimų`;case"too_big":{let G=X[U.origin]??U.origin,J=v(U.origin,$I(Number(U.maximum)),U.inclusive??!1,"smaller");if(J?.verb)return`${Ov(G??U.origin??"reikšmė")} ${J.verb} ${U.maximum.toString()} ${J.unit??"elementų"}`;let Q=U.inclusive?"ne didesnis kaip":"mažesnis kaip";return`${Ov(G??U.origin??"reikšmė")} turi būti ${Q} ${U.maximum.toString()} ${J?.unit}`}case"too_small":{let G=X[U.origin]??U.origin,J=v(U.origin,$I(Number(U.minimum)),U.inclusive??!1,"bigger");if(J?.verb)return`${Ov(G??U.origin??"reikšmė")} ${J.verb} ${U.minimum.toString()} ${J.unit??"elementų"}`;let Q=U.inclusive?"ne mažesnis kaip":"didesnis kaip";return`${Ov(G??U.origin??"reikšmė")} turi būti ${Q} ${U.minimum.toString()} ${J?.unit}`}case"invalid_format":{let G=U;if(G.format==="starts_with")return`Eilutė privalo prasidėti "${G.prefix}"`;if(G.format==="ends_with")return`Eilutė privalo pasibaigti "${G.suffix}"`;if(G.format==="includes")return`Eilutė privalo įtraukti "${G.includes}"`;if(G.format==="regex")return`Eilutė privalo atitikti ${G.pattern}`;return`Neteisingas ${D[G.format]??U.format}`}case"not_multiple_of":return`Skaičius privalo būti ${U.divisor} kartotinis.`;case"unrecognized_keys":return`Neatpažint${U.keys.length>1?"i":"as"} rakt${U.keys.length>1?"ai":"as"}: ${O(U.keys,", ")}`;case"invalid_key":return"Rastas klaidingas raktas";case"invalid_union":return"Klaidinga įvestis";case"invalid_element":{let G=X[U.origin]??U.origin;return`${Ov(G??U.origin??"reikšmė")} turi klaidingą įvestį`}default:return"Klaidinga įvestis"}}};function YQ(){return{localeError:xj()}}var fj=()=>{let $={string:{unit:"знаци",verb:"да имаат"},file:{unit:"бајти",verb:"да имаат"},array:{unit:"ставки",verb:"да имаат"},set:{unit:"ставки",verb:"да имаат"}};function v(U){return $[U]??null}let D={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:"внес"},X={nan:"NaN",number:"број",array:"низа"};return(U)=>{switch(U.code){case"invalid_type":{let G=X[U.expected]??U.expected,J=A(U.input),Q=X[J]??J;if(/^[A-Z]/.test(U.expected))return`Грешен внес: се очекува instanceof ${U.expected}, примено ${Q}`;return`Грешен внес: се очекува ${G}, примено ${Q}`}case"invalid_value":if(U.values.length===1)return`Invalid input: expected ${j(U.values[0])}`;return`Грешана опција: се очекува една ${O(U.values,"|")}`;case"too_big":{let G=U.inclusive?"<=":"<",J=v(U.origin);if(J)return`Премногу голем: се очекува ${U.origin??"вредноста"} да има ${G}${U.maximum.toString()} ${J.unit??"елементи"}`;return`Премногу голем: се очекува ${U.origin??"вредноста"} да биде ${G}${U.maximum.toString()}`}case"too_small":{let G=U.inclusive?">=":">",J=v(U.origin);if(J)return`Премногу мал: се очекува ${U.origin} да има ${G}${U.minimum.toString()} ${J.unit}`;return`Премногу мал: се очекува ${U.origin} да биде ${G}${U.minimum.toString()}`}case"invalid_format":{let G=U;if(G.format==="starts_with")return`Неважечка низа: мора да започнува со "${G.prefix}"`;if(G.format==="ends_with")return`Неважечка низа: мора да завршува со "${G.suffix}"`;if(G.format==="includes")return`Неважечка низа: мора да вклучува "${G.includes}"`;if(G.format==="regex")return`Неважечка низа: мора да одгоара на патернот ${G.pattern}`;return`Invalid ${D[G.format]??U.format}`}case"not_multiple_of":return`Грешен број: мора да биде делив со ${U.divisor}`;case"unrecognized_keys":return`${U.keys.length>1?"Непрепознаени клучеви":"Непрепознаен клуч"}: ${O(U.keys,", ")}`;case"invalid_key":return`Грешен клуч во ${U.origin}`;case"invalid_union":return"Грешен внес";case"invalid_element":return`Грешна вредност во ${U.origin}`;default:return"Грешен внес"}}};function IQ(){return{localeError:fj()}}var _j=()=>{let $={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}};function v(U){return $[U]??null}let D={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"},X={nan:"NaN",number:"nombor"};return(U)=>{switch(U.code){case"invalid_type":{let G=X[U.expected]??U.expected,J=A(U.input),Q=X[J]??J;if(/^[A-Z]/.test(U.expected))return`Input tidak sah: dijangka instanceof ${U.expected}, diterima ${Q}`;return`Input tidak sah: dijangka ${G}, diterima ${Q}`}case"invalid_value":if(U.values.length===1)return`Input tidak sah: dijangka ${j(U.values[0])}`;return`Pilihan tidak sah: dijangka salah satu daripada ${O(U.values,"|")}`;case"too_big":{let G=U.inclusive?"<=":"<",J=v(U.origin);if(J)return`Terlalu besar: dijangka ${U.origin??"nilai"} ${J.verb} ${G}${U.maximum.toString()} ${J.unit??"elemen"}`;return`Terlalu besar: dijangka ${U.origin??"nilai"} adalah ${G}${U.maximum.toString()}`}case"too_small":{let G=U.inclusive?">=":">",J=v(U.origin);if(J)return`Terlalu kecil: dijangka ${U.origin} ${J.verb} ${G}${U.minimum.toString()} ${J.unit}`;return`Terlalu kecil: dijangka ${U.origin} adalah ${G}${U.minimum.toString()}`}case"invalid_format":{let G=U;if(G.format==="starts_with")return`String tidak sah: mesti bermula dengan "${G.prefix}"`;if(G.format==="ends_with")return`String tidak sah: mesti berakhir dengan "${G.suffix}"`;if(G.format==="includes")return`String tidak sah: mesti mengandungi "${G.includes}"`;if(G.format==="regex")return`String tidak sah: mesti sepadan dengan corak ${G.pattern}`;return`${D[G.format]??U.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${U.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${O(U.keys,", ")}`;case"invalid_key":return`Kunci tidak sah dalam ${U.origin}`;case"invalid_union":return"Input tidak sah";case"invalid_element":return`Nilai tidak sah dalam ${U.origin}`;default:return"Input tidak sah"}}};function VQ(){return{localeError:_j()}}var ij=()=>{let $={string:{unit:"tekens",verb:"heeft"},file:{unit:"bytes",verb:"heeft"},array:{unit:"elementen",verb:"heeft"},set:{unit:"elementen",verb:"heeft"}};function v(U){return $[U]??null}let D={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"},X={nan:"NaN",number:"getal"};return(U)=>{switch(U.code){case"invalid_type":{let G=X[U.expected]??U.expected,J=A(U.input),Q=X[J]??J;if(/^[A-Z]/.test(U.expected))return`Ongeldige invoer: verwacht instanceof ${U.expected}, ontving ${Q}`;return`Ongeldige invoer: verwacht ${G}, ontving ${Q}`}case"invalid_value":if(U.values.length===1)return`Ongeldige invoer: verwacht ${j(U.values[0])}`;return`Ongeldige optie: verwacht één van ${O(U.values,"|")}`;case"too_big":{let G=U.inclusive?"<=":"<",J=v(U.origin),Q=U.origin==="date"?"laat":U.origin==="string"?"lang":"groot";if(J)return`Te ${Q}: verwacht dat ${U.origin??"waarde"} ${G}${U.maximum.toString()} ${J.unit??"elementen"} ${J.verb}`;return`Te ${Q}: verwacht dat ${U.origin??"waarde"} ${G}${U.maximum.toString()} is`}case"too_small":{let G=U.inclusive?">=":">",J=v(U.origin),Q=U.origin==="date"?"vroeg":U.origin==="string"?"kort":"klein";if(J)return`Te ${Q}: verwacht dat ${U.origin} ${G}${U.minimum.toString()} ${J.unit} ${J.verb}`;return`Te ${Q}: verwacht dat ${U.origin} ${G}${U.minimum.toString()} is`}case"invalid_format":{let G=U;if(G.format==="starts_with")return`Ongeldige tekst: moet met "${G.prefix}" beginnen`;if(G.format==="ends_with")return`Ongeldige tekst: moet op "${G.suffix}" eindigen`;if(G.format==="includes")return`Ongeldige tekst: moet "${G.includes}" bevatten`;if(G.format==="regex")return`Ongeldige tekst: moet overeenkomen met patroon ${G.pattern}`;return`Ongeldig: ${D[G.format]??U.format}`}case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${U.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${U.keys.length>1?"s":""}: ${O(U.keys,", ")}`;case"invalid_key":return`Ongeldige key in ${U.origin}`;case"invalid_union":return"Ongeldige invoer";case"invalid_element":return`Ongeldige waarde in ${U.origin}`;default:return"Ongeldige invoer"}}};function KQ(){return{localeError:ij()}}var yj=()=>{let $={string:{unit:"tegn",verb:"å ha"},file:{unit:"bytes",verb:"å ha"},array:{unit:"elementer",verb:"å inneholde"},set:{unit:"elementer",verb:"å inneholde"}};function v(U){return $[U]??null}let D={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"},X={nan:"NaN",number:"tall",array:"liste"};return(U)=>{switch(U.code){case"invalid_type":{let G=X[U.expected]??U.expected,J=A(U.input),Q=X[J]??J;if(/^[A-Z]/.test(U.expected))return`Ugyldig input: forventet instanceof ${U.expected}, fikk ${Q}`;return`Ugyldig input: forventet ${G}, fikk ${Q}`}case"invalid_value":if(U.values.length===1)return`Ugyldig verdi: forventet ${j(U.values[0])}`;return`Ugyldig valg: forventet en av ${O(U.values,"|")}`;case"too_big":{let G=U.inclusive?"<=":"<",J=v(U.origin);if(J)return`For stor(t): forventet ${U.origin??"value"} til å ha ${G}${U.maximum.toString()} ${J.unit??"elementer"}`;return`For stor(t): forventet ${U.origin??"value"} til å ha ${G}${U.maximum.toString()}`}case"too_small":{let G=U.inclusive?">=":">",J=v(U.origin);if(J)return`For lite(n): forventet ${U.origin} til å ha ${G}${U.minimum.toString()} ${J.unit}`;return`For lite(n): forventet ${U.origin} til å ha ${G}${U.minimum.toString()}`}case"invalid_format":{let G=U;if(G.format==="starts_with")return`Ugyldig streng: må starte med "${G.prefix}"`;if(G.format==="ends_with")return`Ugyldig streng: må ende med "${G.suffix}"`;if(G.format==="includes")return`Ugyldig streng: må inneholde "${G.includes}"`;if(G.format==="regex")return`Ugyldig streng: må matche mønsteret ${G.pattern}`;return`Ugyldig ${D[G.format]??U.format}`}case"not_multiple_of":return`Ugyldig tall: må være et multiplum av ${U.divisor}`;case"unrecognized_keys":return`${U.keys.length>1?"Ukjente nøkler":"Ukjent nøkkel"}: ${O(U.keys,", ")}`;case"invalid_key":return`Ugyldig nøkkel i ${U.origin}`;case"invalid_union":return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${U.origin}`;default:return"Ugyldig input"}}};function LQ(){return{localeError:yj()}}var nj=()=>{let $={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 v(U){return $[U]??null}let D={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"},X={nan:"NaN",number:"numara",array:"saf",null:"gayb"};return(U)=>{switch(U.code){case"invalid_type":{let G=X[U.expected]??U.expected,J=A(U.input),Q=X[J]??J;if(/^[A-Z]/.test(U.expected))return`Fâsit giren: umulan instanceof ${U.expected}, alınan ${Q}`;return`Fâsit giren: umulan ${G}, alınan ${Q}`}case"invalid_value":if(U.values.length===1)return`Fâsit giren: umulan ${j(U.values[0])}`;return`Fâsit tercih: mûteberler ${O(U.values,"|")}`;case"too_big":{let G=U.inclusive?"<=":"<",J=v(U.origin);if(J)return`Fazla büyük: ${U.origin??"value"}, ${G}${U.maximum.toString()} ${J.unit??"elements"} sahip olmalıydı.`;return`Fazla büyük: ${U.origin??"value"}, ${G}${U.maximum.toString()} olmalıydı.`}case"too_small":{let G=U.inclusive?">=":">",J=v(U.origin);if(J)return`Fazla küçük: ${U.origin}, ${G}${U.minimum.toString()} ${J.unit} sahip olmalıydı.`;return`Fazla küçük: ${U.origin}, ${G}${U.minimum.toString()} olmalıydı.`}case"invalid_format":{let G=U;if(G.format==="starts_with")return`Fâsit metin: "${G.prefix}" ile başlamalı.`;if(G.format==="ends_with")return`Fâsit metin: "${G.suffix}" ile bitmeli.`;if(G.format==="includes")return`Fâsit metin: "${G.includes}" ihtivâ etmeli.`;if(G.format==="regex")return`Fâsit metin: ${G.pattern} nakşına uymalı.`;return`Fâsit ${D[G.format]??U.format}`}case"not_multiple_of":return`Fâsit sayı: ${U.divisor} katı olmalıydı.`;case"unrecognized_keys":return`Tanınmayan anahtar ${U.keys.length>1?"s":""}: ${O(U.keys,", ")}`;case"invalid_key":return`${U.origin} için tanınmayan anahtar var.`;case"invalid_union":return"Giren tanınamadı.";case"invalid_element":return`${U.origin} için tanınmayan kıymet var.`;default:return"Kıymet tanınamadı."}}};function BQ(){return{localeError:nj()}}var lj=()=>{let $={string:{unit:"توکي",verb:"ولري"},file:{unit:"بایټس",verb:"ولري"},array:{unit:"توکي",verb:"ولري"},set:{unit:"توکي",verb:"ولري"}};function v(U){return $[U]??null}let D={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:"ورودي"},X={nan:"NaN",number:"عدد",array:"ارې"};return(U)=>{switch(U.code){case"invalid_type":{let G=X[U.expected]??U.expected,J=A(U.input),Q=X[J]??J;if(/^[A-Z]/.test(U.expected))return`ناسم ورودي: باید instanceof ${U.expected} وای, مګر ${Q} ترلاسه شو`;return`ناسم ورودي: باید ${G} وای, مګر ${Q} ترلاسه شو`}case"invalid_value":if(U.values.length===1)return`ناسم ورودي: باید ${j(U.values[0])} وای`;return`ناسم انتخاب: باید یو له ${O(U.values,"|")} څخه وای`;case"too_big":{let G=U.inclusive?"<=":"<",J=v(U.origin);if(J)return`ډیر لوی: ${U.origin??"ارزښت"} باید ${G}${U.maximum.toString()} ${J.unit??"عنصرونه"} ولري`;return`ډیر لوی: ${U.origin??"ارزښت"} باید ${G}${U.maximum.toString()} وي`}case"too_small":{let G=U.inclusive?">=":">",J=v(U.origin);if(J)return`ډیر کوچنی: ${U.origin} باید ${G}${U.minimum.toString()} ${J.unit} ولري`;return`ډیر کوچنی: ${U.origin} باید ${G}${U.minimum.toString()} وي`}case"invalid_format":{let G=U;if(G.format==="starts_with")return`ناسم متن: باید د "${G.prefix}" سره پیل شي`;if(G.format==="ends_with")return`ناسم متن: باید د "${G.suffix}" سره پای ته ورسيږي`;if(G.format==="includes")return`ناسم متن: باید "${G.includes}" ولري`;if(G.format==="regex")return`ناسم متن: باید د ${G.pattern} سره مطابقت ولري`;return`${D[G.format]??U.format} ناسم دی`}case"not_multiple_of":return`ناسم عدد: باید د ${U.divisor} مضرب وي`;case"unrecognized_keys":return`ناسم ${U.keys.length>1?"کلیډونه":"کلیډ"}: ${O(U.keys,", ")}`;case"invalid_key":return`ناسم کلیډ په ${U.origin} کې`;case"invalid_union":return"ناسمه ورودي";case"invalid_element":return`ناسم عنصر په ${U.origin} کې`;default:return"ناسمه ورودي"}}};function NQ(){return{localeError:lj()}}var hj=()=>{let $={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 v(U){return $[U]??null}let D={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"},X={nan:"NaN",number:"liczba",array:"tablica"};return(U)=>{switch(U.code){case"invalid_type":{let G=X[U.expected]??U.expected,J=A(U.input),Q=X[J]??J;if(/^[A-Z]/.test(U.expected))return`Nieprawidłowe dane wejściowe: oczekiwano instanceof ${U.expected}, otrzymano ${Q}`;return`Nieprawidłowe dane wejściowe: oczekiwano ${G}, otrzymano ${Q}`}case"invalid_value":if(U.values.length===1)return`Nieprawidłowe dane wejściowe: oczekiwano ${j(U.values[0])}`;return`Nieprawidłowa opcja: oczekiwano jednej z wartości ${O(U.values,"|")}`;case"too_big":{let G=U.inclusive?"<=":"<",J=v(U.origin);if(J)return`Za duża wartość: oczekiwano, że ${U.origin??"wartość"} będzie mieć ${G}${U.maximum.toString()} ${J.unit??"elementów"}`;return`Zbyt duż(y/a/e): oczekiwano, że ${U.origin??"wartość"} będzie wynosić ${G}${U.maximum.toString()}`}case"too_small":{let G=U.inclusive?">=":">",J=v(U.origin);if(J)return`Za mała wartość: oczekiwano, że ${U.origin??"wartość"} będzie mieć ${G}${U.minimum.toString()} ${J.unit??"elementów"}`;return`Zbyt mał(y/a/e): oczekiwano, że ${U.origin??"wartość"} będzie wynosić ${G}${U.minimum.toString()}`}case"invalid_format":{let G=U;if(G.format==="starts_with")return`Nieprawidłowy ciąg znaków: musi zaczynać się od "${G.prefix}"`;if(G.format==="ends_with")return`Nieprawidłowy ciąg znaków: musi kończyć się na "${G.suffix}"`;if(G.format==="includes")return`Nieprawidłowy ciąg znaków: musi zawierać "${G.includes}"`;if(G.format==="regex")return`Nieprawidłowy ciąg znaków: musi odpowiadać wzorcowi ${G.pattern}`;return`Nieprawidłow(y/a/e) ${D[G.format]??U.format}`}case"not_multiple_of":return`Nieprawidłowa liczba: musi być wielokrotnością ${U.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${U.keys.length>1?"s":""}: ${O(U.keys,", ")}`;case"invalid_key":return`Nieprawidłowy klucz w ${U.origin}`;case"invalid_union":return"Nieprawidłowe dane wejściowe";case"invalid_element":return`Nieprawidłowa wartość w ${U.origin}`;default:return"Nieprawidłowe dane wejściowe"}}};function ZQ(){return{localeError:hj()}}var mj=()=>{let $={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function v(U){return $[U]??null}let D={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"},X={nan:"NaN",number:"número",null:"nulo"};return(U)=>{switch(U.code){case"invalid_type":{let G=X[U.expected]??U.expected,J=A(U.input),Q=X[J]??J;if(/^[A-Z]/.test(U.expected))return`Tipo inválido: esperado instanceof ${U.expected}, recebido ${Q}`;return`Tipo inválido: esperado ${G}, recebido ${Q}`}case"invalid_value":if(U.values.length===1)return`Entrada inválida: esperado ${j(U.values[0])}`;return`Opção inválida: esperada uma das ${O(U.values,"|")}`;case"too_big":{let G=U.inclusive?"<=":"<",J=v(U.origin);if(J)return`Muito grande: esperado que ${U.origin??"valor"} tivesse ${G}${U.maximum.toString()} ${J.unit??"elementos"}`;return`Muito grande: esperado que ${U.origin??"valor"} fosse ${G}${U.maximum.toString()}`}case"too_small":{let G=U.inclusive?">=":">",J=v(U.origin);if(J)return`Muito pequeno: esperado que ${U.origin} tivesse ${G}${U.minimum.toString()} ${J.unit}`;return`Muito pequeno: esperado que ${U.origin} fosse ${G}${U.minimum.toString()}`}case"invalid_format":{let G=U;if(G.format==="starts_with")return`Texto inválido: deve começar com "${G.prefix}"`;if(G.format==="ends_with")return`Texto inválido: deve terminar com "${G.suffix}"`;if(G.format==="includes")return`Texto inválido: deve incluir "${G.includes}"`;if(G.format==="regex")return`Texto inválido: deve corresponder ao padrão ${G.pattern}`;return`${D[G.format]??U.format} inválido`}case"not_multiple_of":return`Número inválido: deve ser múltiplo de ${U.divisor}`;case"unrecognized_keys":return`Chave${U.keys.length>1?"s":""} desconhecida${U.keys.length>1?"s":""}: ${O(U.keys,", ")}`;case"invalid_key":return`Chave inválida em ${U.origin}`;case"invalid_union":return"Entrada inválida";case"invalid_element":return`Valor inválido em ${U.origin}`;default:return"Campo inválido"}}};function OQ(){return{localeError:mj()}}var cj=()=>{let $={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 v(U){return $[U]??null}let D={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"},X={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(U)=>{switch(U.code){case"invalid_type":{let G=X[U.expected]??U.expected,J=A(U.input),Q=X[J]??J;return`Intrare invalidă: așteptat ${G}, primit ${Q}`}case"invalid_value":if(U.values.length===1)return`Intrare invalidă: așteptat ${j(U.values[0])}`;return`Opțiune invalidă: așteptat una dintre ${O(U.values,"|")}`;case"too_big":{let G=U.inclusive?"<=":"<",J=v(U.origin);if(J)return`Prea mare: așteptat ca ${U.origin??"valoarea"} ${J.verb} ${G}${U.maximum.toString()} ${J.unit??"elemente"}`;return`Prea mare: așteptat ca ${U.origin??"valoarea"} să fie ${G}${U.maximum.toString()}`}case"too_small":{let G=U.inclusive?">=":">",J=v(U.origin);if(J)return`Prea mic: așteptat ca ${U.origin} ${J.verb} ${G}${U.minimum.toString()} ${J.unit}`;return`Prea mic: așteptat ca ${U.origin} să fie ${G}${U.minimum.toString()}`}case"invalid_format":{let G=U;if(G.format==="starts_with")return`Șir invalid: trebuie să înceapă cu "${G.prefix}"`;if(G.format==="ends_with")return`Șir invalid: trebuie să se termine cu "${G.suffix}"`;if(G.format==="includes")return`Șir invalid: trebuie să includă "${G.includes}"`;if(G.format==="regex")return`Șir invalid: trebuie să se potrivească cu modelul ${G.pattern}`;return`Format invalid: ${D[G.format]??U.format}`}case"not_multiple_of":return`Număr invalid: trebuie să fie multiplu de ${U.divisor}`;case"unrecognized_keys":return`Chei nerecunoscute: ${O(U.keys,", ")}`;case"invalid_key":return`Cheie invalidă în ${U.origin}`;case"invalid_union":return"Intrare invalidă";case"invalid_element":return`Valoare invalidă în ${U.origin}`;default:return"Intrare invalidă"}}};function HQ(){return{localeError:cj()}}function vI($,v,D,X){let U=Math.abs($),G=U%10,J=U%100;if(J>=11&&J<=19)return X;if(G===1)return v;if(G>=2&&G<=4)return D;return X}var dj=()=>{let $={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 v(U){return $[U]??null}let D={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:"ввод"},X={nan:"NaN",number:"число",array:"массив"};return(U)=>{switch(U.code){case"invalid_type":{let G=X[U.expected]??U.expected,J=A(U.input),Q=X[J]??J;if(/^[A-Z]/.test(U.expected))return`Неверный ввод: ожидалось instanceof ${U.expected}, получено ${Q}`;return`Неверный ввод: ожидалось ${G}, получено ${Q}`}case"invalid_value":if(U.values.length===1)return`Неверный ввод: ожидалось ${j(U.values[0])}`;return`Неверный вариант: ожидалось одно из ${O(U.values,"|")}`;case"too_big":{let G=U.inclusive?"<=":"<",J=v(U.origin);if(J){let Q=Number(U.maximum),W=vI(Q,J.unit.one,J.unit.few,J.unit.many);return`Слишком большое значение: ожидалось, что ${U.origin??"значение"} будет иметь ${G}${U.maximum.toString()} ${W}`}return`Слишком большое значение: ожидалось, что ${U.origin??"значение"} будет ${G}${U.maximum.toString()}`}case"too_small":{let G=U.inclusive?">=":">",J=v(U.origin);if(J){let Q=Number(U.minimum),W=vI(Q,J.unit.one,J.unit.few,J.unit.many);return`Слишком маленькое значение: ожидалось, что ${U.origin} будет иметь ${G}${U.minimum.toString()} ${W}`}return`Слишком маленькое значение: ожидалось, что ${U.origin} будет ${G}${U.minimum.toString()}`}case"invalid_format":{let G=U;if(G.format==="starts_with")return`Неверная строка: должна начинаться с "${G.prefix}"`;if(G.format==="ends_with")return`Неверная строка: должна заканчиваться на "${G.suffix}"`;if(G.format==="includes")return`Неверная строка: должна содержать "${G.includes}"`;if(G.format==="regex")return`Неверная строка: должна соответствовать шаблону ${G.pattern}`;return`Неверный ${D[G.format]??U.format}`}case"not_multiple_of":return`Неверное число: должно быть кратным ${U.divisor}`;case"unrecognized_keys":return`Нераспознанн${U.keys.length>1?"ые":"ый"} ключ${U.keys.length>1?"и":""}: ${O(U.keys,", ")}`;case"invalid_key":return`Неверный ключ в ${U.origin}`;case"invalid_union":return"Неверные входные данные";case"invalid_element":return`Неверное значение в ${U.origin}`;default:return"Неверные входные данные"}}};function FQ(){return{localeError:dj()}}var rj=()=>{let $={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}};function v(U){return $[U]??null}let D={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"},X={nan:"NaN",number:"število",array:"tabela"};return(U)=>{switch(U.code){case"invalid_type":{let G=X[U.expected]??U.expected,J=A(U.input),Q=X[J]??J;if(/^[A-Z]/.test(U.expected))return`Neveljaven vnos: pričakovano instanceof ${U.expected}, prejeto ${Q}`;return`Neveljaven vnos: pričakovano ${G}, prejeto ${Q}`}case"invalid_value":if(U.values.length===1)return`Neveljaven vnos: pričakovano ${j(U.values[0])}`;return`Neveljavna možnost: pričakovano eno izmed ${O(U.values,"|")}`;case"too_big":{let G=U.inclusive?"<=":"<",J=v(U.origin);if(J)return`Preveliko: pričakovano, da bo ${U.origin??"vrednost"} imelo ${G}${U.maximum.toString()} ${J.unit??"elementov"}`;return`Preveliko: pričakovano, da bo ${U.origin??"vrednost"} ${G}${U.maximum.toString()}`}case"too_small":{let G=U.inclusive?">=":">",J=v(U.origin);if(J)return`Premajhno: pričakovano, da bo ${U.origin} imelo ${G}${U.minimum.toString()} ${J.unit}`;return`Premajhno: pričakovano, da bo ${U.origin} ${G}${U.minimum.toString()}`}case"invalid_format":{let G=U;if(G.format==="starts_with")return`Neveljaven niz: mora se začeti z "${G.prefix}"`;if(G.format==="ends_with")return`Neveljaven niz: mora se končati z "${G.suffix}"`;if(G.format==="includes")return`Neveljaven niz: mora vsebovati "${G.includes}"`;if(G.format==="regex")return`Neveljaven niz: mora ustrezati vzorcu ${G.pattern}`;return`Neveljaven ${D[G.format]??U.format}`}case"not_multiple_of":return`Neveljavno število: mora biti večkratnik ${U.divisor}`;case"unrecognized_keys":return`Neprepoznan${U.keys.length>1?"i ključi":" ključ"}: ${O(U.keys,", ")}`;case"invalid_key":return`Neveljaven ključ v ${U.origin}`;case"invalid_union":return"Neveljaven vnos";case"invalid_element":return`Neveljavna vrednost v ${U.origin}`;default:return"Neveljaven vnos"}}};function jQ(){return{localeError:rj()}}var pj=()=>{let $={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 v(U){return $[U]??null}let D={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"},X={nan:"NaN",number:"antal",array:"lista"};return(U)=>{switch(U.code){case"invalid_type":{let G=X[U.expected]??U.expected,J=A(U.input),Q=X[J]??J;if(/^[A-Z]/.test(U.expected))return`Ogiltig inmatning: förväntat instanceof ${U.expected}, fick ${Q}`;return`Ogiltig inmatning: förväntat ${G}, fick ${Q}`}case"invalid_value":if(U.values.length===1)return`Ogiltig inmatning: förväntat ${j(U.values[0])}`;return`Ogiltigt val: förväntade en av ${O(U.values,"|")}`;case"too_big":{let G=U.inclusive?"<=":"<",J=v(U.origin);if(J)return`För stor(t): förväntade ${U.origin??"värdet"} att ha ${G}${U.maximum.toString()} ${J.unit??"element"}`;return`För stor(t): förväntat ${U.origin??"värdet"} att ha ${G}${U.maximum.toString()}`}case"too_small":{let G=U.inclusive?">=":">",J=v(U.origin);if(J)return`För lite(t): förväntade ${U.origin??"värdet"} att ha ${G}${U.minimum.toString()} ${J.unit}`;return`För lite(t): förväntade ${U.origin??"värdet"} att ha ${G}${U.minimum.toString()}`}case"invalid_format":{let G=U;if(G.format==="starts_with")return`Ogiltig sträng: måste börja med "${G.prefix}"`;if(G.format==="ends_with")return`Ogiltig sträng: måste sluta med "${G.suffix}"`;if(G.format==="includes")return`Ogiltig sträng: måste innehålla "${G.includes}"`;if(G.format==="regex")return`Ogiltig sträng: måste matcha mönstret "${G.pattern}"`;return`Ogiltig(t) ${D[G.format]??U.format}`}case"not_multiple_of":return`Ogiltigt tal: måste vara en multipel av ${U.divisor}`;case"unrecognized_keys":return`${U.keys.length>1?"Okända nycklar":"Okänd nyckel"}: ${O(U.keys,", ")}`;case"invalid_key":return`Ogiltig nyckel i ${U.origin??"värdet"}`;case"invalid_union":return"Ogiltig input";case"invalid_element":return`Ogiltigt värde i ${U.origin??"värdet"}`;default:return"Ogiltig input"}}};function AQ(){return{localeError:pj()}}var tj=()=>{let $={string:{unit:"எழுத்துக்கள்",verb:"கொண்டிருக்க வேண்டும்"},file:{unit:"பைட்டுகள்",verb:"கொண்டிருக்க வேண்டும்"},array:{unit:"உறுப்புகள்",verb:"கொண்டிருக்க வேண்டும்"},set:{unit:"உறுப்புகள்",verb:"கொண்டிருக்க வேண்டும்"}};function v(U){return $[U]??null}let D={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"},X={nan:"NaN",number:"எண்",array:"அணி",null:"வெறுமை"};return(U)=>{switch(U.code){case"invalid_type":{let G=X[U.expected]??U.expected,J=A(U.input),Q=X[J]??J;if(/^[A-Z]/.test(U.expected))return`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது instanceof ${U.expected}, பெறப்பட்டது ${Q}`;return`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${G}, பெறப்பட்டது ${Q}`}case"invalid_value":if(U.values.length===1)return`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${j(U.values[0])}`;return`தவறான விருப்பம்: எதிர்பார்க்கப்பட்டது ${O(U.values,"|")} இல் ஒன்று`;case"too_big":{let G=U.inclusive?"<=":"<",J=v(U.origin);if(J)return`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${U.origin??"மதிப்பு"} ${G}${U.maximum.toString()} ${J.unit??"உறுப்புகள்"} ஆக இருக்க வேண்டும்`;return`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${U.origin??"மதிப்பு"} ${G}${U.maximum.toString()} ஆக இருக்க வேண்டும்`}case"too_small":{let G=U.inclusive?">=":">",J=v(U.origin);if(J)return`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${U.origin} ${G}${U.minimum.toString()} ${J.unit} ஆக இருக்க வேண்டும்`;return`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${U.origin} ${G}${U.minimum.toString()} ஆக இருக்க வேண்டும்`}case"invalid_format":{let G=U;if(G.format==="starts_with")return`தவறான சரம்: "${G.prefix}" இல் தொடங்க வேண்டும்`;if(G.format==="ends_with")return`தவறான சரம்: "${G.suffix}" இல் முடிவடைய வேண்டும்`;if(G.format==="includes")return`தவறான சரம்: "${G.includes}" ஐ உள்ளடக்க வேண்டும்`;if(G.format==="regex")return`தவறான சரம்: ${G.pattern} முறைபாட்டுடன் பொருந்த வேண்டும்`;return`தவறான ${D[G.format]??U.format}`}case"not_multiple_of":return`தவறான எண்: ${U.divisor} இன் பலமாக இருக்க வேண்டும்`;case"unrecognized_keys":return`அடையாளம் தெரியாத விசை${U.keys.length>1?"கள்":""}: ${O(U.keys,", ")}`;case"invalid_key":return`${U.origin} இல் தவறான விசை`;case"invalid_union":return"தவறான உள்ளீடு";case"invalid_element":return`${U.origin} இல் தவறான மதிப்பு`;default:return"தவறான உள்ளீடு"}}};function wQ(){return{localeError:tj()}}var oj=()=>{let $={string:{unit:"ตัวอักษร",verb:"ควรมี"},file:{unit:"ไบต์",verb:"ควรมี"},array:{unit:"รายการ",verb:"ควรมี"},set:{unit:"รายการ",verb:"ควรมี"}};function v(U){return $[U]??null}let D={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:"ข้อมูลที่ป้อน"},X={nan:"NaN",number:"ตัวเลข",array:"อาร์เรย์ (Array)",null:"ไม่มีค่า (null)"};return(U)=>{switch(U.code){case"invalid_type":{let G=X[U.expected]??U.expected,J=A(U.input),Q=X[J]??J;if(/^[A-Z]/.test(U.expected))return`ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น instanceof ${U.expected} แต่ได้รับ ${Q}`;return`ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น ${G} แต่ได้รับ ${Q}`}case"invalid_value":if(U.values.length===1)return`ค่าไม่ถูกต้อง: ควรเป็น ${j(U.values[0])}`;return`ตัวเลือกไม่ถูกต้อง: ควรเป็นหนึ่งใน ${O(U.values,"|")}`;case"too_big":{let G=U.inclusive?"ไม่เกิน":"น้อยกว่า",J=v(U.origin);if(J)return`เกินกำหนด: ${U.origin??"ค่า"} ควรมี${G} ${U.maximum.toString()} ${J.unit??"รายการ"}`;return`เกินกำหนด: ${U.origin??"ค่า"} ควรมี${G} ${U.maximum.toString()}`}case"too_small":{let G=U.inclusive?"อย่างน้อย":"มากกว่า",J=v(U.origin);if(J)return`น้อยกว่ากำหนด: ${U.origin} ควรมี${G} ${U.minimum.toString()} ${J.unit}`;return`น้อยกว่ากำหนด: ${U.origin} ควรมี${G} ${U.minimum.toString()}`}case"invalid_format":{let G=U;if(G.format==="starts_with")return`รูปแบบไม่ถูกต้อง: ข้อความต้องขึ้นต้นด้วย "${G.prefix}"`;if(G.format==="ends_with")return`รูปแบบไม่ถูกต้อง: ข้อความต้องลงท้ายด้วย "${G.suffix}"`;if(G.format==="includes")return`รูปแบบไม่ถูกต้อง: ข้อความต้องมี "${G.includes}" อยู่ในข้อความ`;if(G.format==="regex")return`รูปแบบไม่ถูกต้อง: ต้องตรงกับรูปแบบที่กำหนด ${G.pattern}`;return`รูปแบบไม่ถูกต้อง: ${D[G.format]??U.format}`}case"not_multiple_of":return`ตัวเลขไม่ถูกต้อง: ต้องเป็นจำนวนที่หารด้วย ${U.divisor} ได้ลงตัว`;case"unrecognized_keys":return`พบคีย์ที่ไม่รู้จัก: ${O(U.keys,", ")}`;case"invalid_key":return`คีย์ไม่ถูกต้องใน ${U.origin}`;case"invalid_union":return"ข้อมูลไม่ถูกต้อง: ไม่ตรงกับรูปแบบยูเนียนที่กำหนดไว้";case"invalid_element":return`ข้อมูลไม่ถูกต้องใน ${U.origin}`;default:return"ข้อมูลไม่ถูกต้อง"}}};function MQ(){return{localeError:oj()}}var aj=()=>{let $={string:{unit:"karakter",verb:"olmalı"},file:{unit:"bayt",verb:"olmalı"},array:{unit:"öğe",verb:"olmalı"},set:{unit:"öğe",verb:"olmalı"}};function v(U){return $[U]??null}let D={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"},X={nan:"NaN"};return(U)=>{switch(U.code){case"invalid_type":{let G=X[U.expected]??U.expected,J=A(U.input),Q=X[J]??J;if(/^[A-Z]/.test(U.expected))return`Geçersiz değer: beklenen instanceof ${U.expected}, alınan ${Q}`;return`Geçersiz değer: beklenen ${G}, alınan ${Q}`}case"invalid_value":if(U.values.length===1)return`Geçersiz değer: beklenen ${j(U.values[0])}`;return`Geçersiz seçenek: aşağıdakilerden biri olmalı: ${O(U.values,"|")}`;case"too_big":{let G=U.inclusive?"<=":"<",J=v(U.origin);if(J)return`Çok büyük: beklenen ${U.origin??"değer"} ${G}${U.maximum.toString()} ${J.unit??"öğe"}`;return`Çok büyük: beklenen ${U.origin??"değer"} ${G}${U.maximum.toString()}`}case"too_small":{let G=U.inclusive?">=":">",J=v(U.origin);if(J)return`Çok küçük: beklenen ${U.origin} ${G}${U.minimum.toString()} ${J.unit}`;return`Çok küçük: beklenen ${U.origin} ${G}${U.minimum.toString()}`}case"invalid_format":{let G=U;if(G.format==="starts_with")return`Geçersiz metin: "${G.prefix}" ile başlamalı`;if(G.format==="ends_with")return`Geçersiz metin: "${G.suffix}" ile bitmeli`;if(G.format==="includes")return`Geçersiz metin: "${G.includes}" içermeli`;if(G.format==="regex")return`Geçersiz metin: ${G.pattern} desenine uymalı`;return`Geçersiz ${D[G.format]??U.format}`}case"not_multiple_of":return`Geçersiz sayı: ${U.divisor} ile tam bölünebilmeli`;case"unrecognized_keys":return`Tanınmayan anahtar${U.keys.length>1?"lar":""}: ${O(U.keys,", ")}`;case"invalid_key":return`${U.origin} içinde geçersiz anahtar`;case"invalid_union":return"Geçersiz değer";case"invalid_element":return`${U.origin} içinde geçersiz değer`;default:return"Geçersiz değer"}}};function PQ(){return{localeError:aj()}}var ej=()=>{let $={string:{unit:"символів",verb:"матиме"},file:{unit:"байтів",verb:"матиме"},array:{unit:"елементів",verb:"матиме"},set:{unit:"елементів",verb:"матиме"}};function v(U){return $[U]??null}let D={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:"вхідні дані"},X={nan:"NaN",number:"число",array:"масив"};return(U)=>{switch(U.code){case"invalid_type":{let G=X[U.expected]??U.expected,J=A(U.input),Q=X[J]??J;if(/^[A-Z]/.test(U.expected))return`Неправильні вхідні дані: очікується instanceof ${U.expected}, отримано ${Q}`;return`Неправильні вхідні дані: очікується ${G}, отримано ${Q}`}case"invalid_value":if(U.values.length===1)return`Неправильні вхідні дані: очікується ${j(U.values[0])}`;return`Неправильна опція: очікується одне з ${O(U.values,"|")}`;case"too_big":{let G=U.inclusive?"<=":"<",J=v(U.origin);if(J)return`Занадто велике: очікується, що ${U.origin??"значення"} ${J.verb} ${G}${U.maximum.toString()} ${J.unit??"елементів"}`;return`Занадто велике: очікується, що ${U.origin??"значення"} буде ${G}${U.maximum.toString()}`}case"too_small":{let G=U.inclusive?">=":">",J=v(U.origin);if(J)return`Занадто мале: очікується, що ${U.origin} ${J.verb} ${G}${U.minimum.toString()} ${J.unit}`;return`Занадто мале: очікується, що ${U.origin} буде ${G}${U.minimum.toString()}`}case"invalid_format":{let G=U;if(G.format==="starts_with")return`Неправильний рядок: повинен починатися з "${G.prefix}"`;if(G.format==="ends_with")return`Неправильний рядок: повинен закінчуватися на "${G.suffix}"`;if(G.format==="includes")return`Неправильний рядок: повинен містити "${G.includes}"`;if(G.format==="regex")return`Неправильний рядок: повинен відповідати шаблону ${G.pattern}`;return`Неправильний ${D[G.format]??U.format}`}case"not_multiple_of":return`Неправильне число: повинно бути кратним ${U.divisor}`;case"unrecognized_keys":return`Нерозпізнаний ключ${U.keys.length>1?"і":""}: ${O(U.keys,", ")}`;case"invalid_key":return`Неправильний ключ у ${U.origin}`;case"invalid_union":return"Неправильні вхідні дані";case"invalid_element":return`Неправильне значення у ${U.origin}`;default:return"Неправильні вхідні дані"}}};function Hv(){return{localeError:ej()}}function bQ(){return Hv()}var sj=()=>{let $={string:{unit:"حروف",verb:"ہونا"},file:{unit:"بائٹس",verb:"ہونا"},array:{unit:"آئٹمز",verb:"ہونا"},set:{unit:"آئٹمز",verb:"ہونا"}};function v(U){return $[U]??null}let D={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:"ان پٹ"},X={nan:"NaN",number:"نمبر",array:"آرے",null:"نل"};return(U)=>{switch(U.code){case"invalid_type":{let G=X[U.expected]??U.expected,J=A(U.input),Q=X[J]??J;if(/^[A-Z]/.test(U.expected))return`غلط ان پٹ: instanceof ${U.expected} متوقع تھا، ${Q} موصول ہوا`;return`غلط ان پٹ: ${G} متوقع تھا، ${Q} موصول ہوا`}case"invalid_value":if(U.values.length===1)return`غلط ان پٹ: ${j(U.values[0])} متوقع تھا`;return`غلط آپشن: ${O(U.values,"|")} میں سے ایک متوقع تھا`;case"too_big":{let G=U.inclusive?"<=":"<",J=v(U.origin);if(J)return`بہت بڑا: ${U.origin??"ویلیو"} کے ${G}${U.maximum.toString()} ${J.unit??"عناصر"} ہونے متوقع تھے`;return`بہت بڑا: ${U.origin??"ویلیو"} کا ${G}${U.maximum.toString()} ہونا متوقع تھا`}case"too_small":{let G=U.inclusive?">=":">",J=v(U.origin);if(J)return`بہت چھوٹا: ${U.origin} کے ${G}${U.minimum.toString()} ${J.unit} ہونے متوقع تھے`;return`بہت چھوٹا: ${U.origin} کا ${G}${U.minimum.toString()} ہونا متوقع تھا`}case"invalid_format":{let G=U;if(G.format==="starts_with")return`غلط سٹرنگ: "${G.prefix}" سے شروع ہونا چاہیے`;if(G.format==="ends_with")return`غلط سٹرنگ: "${G.suffix}" پر ختم ہونا چاہیے`;if(G.format==="includes")return`غلط سٹرنگ: "${G.includes}" شامل ہونا چاہیے`;if(G.format==="regex")return`غلط سٹرنگ: پیٹرن ${G.pattern} سے میچ ہونا چاہیے`;return`غلط ${D[G.format]??U.format}`}case"not_multiple_of":return`غلط نمبر: ${U.divisor} کا مضاعف ہونا چاہیے`;case"unrecognized_keys":return`غیر تسلیم شدہ کی${U.keys.length>1?"ز":""}: ${O(U.keys,"، ")}`;case"invalid_key":return`${U.origin} میں غلط کی`;case"invalid_union":return"غلط ان پٹ";case"invalid_element":return`${U.origin} میں غلط ویلیو`;default:return"غلط ان پٹ"}}};function qQ(){return{localeError:sj()}}var $A=()=>{let $={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 v(U){return $[U]??null}let D={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"},X={nan:"NaN",number:"raqam",array:"massiv"};return(U)=>{switch(U.code){case"invalid_type":{let G=X[U.expected]??U.expected,J=A(U.input),Q=X[J]??J;if(/^[A-Z]/.test(U.expected))return`Noto‘g‘ri kirish: kutilgan instanceof ${U.expected}, qabul qilingan ${Q}`;return`Noto‘g‘ri kirish: kutilgan ${G}, qabul qilingan ${Q}`}case"invalid_value":if(U.values.length===1)return`Noto‘g‘ri kirish: kutilgan ${j(U.values[0])}`;return`Noto‘g‘ri variant: quyidagilardan biri kutilgan ${O(U.values,"|")}`;case"too_big":{let G=U.inclusive?"<=":"<",J=v(U.origin);if(J)return`Juda katta: kutilgan ${U.origin??"qiymat"} ${G}${U.maximum.toString()} ${J.unit} ${J.verb}`;return`Juda katta: kutilgan ${U.origin??"qiymat"} ${G}${U.maximum.toString()}`}case"too_small":{let G=U.inclusive?">=":">",J=v(U.origin);if(J)return`Juda kichik: kutilgan ${U.origin} ${G}${U.minimum.toString()} ${J.unit} ${J.verb}`;return`Juda kichik: kutilgan ${U.origin} ${G}${U.minimum.toString()}`}case"invalid_format":{let G=U;if(G.format==="starts_with")return`Noto‘g‘ri satr: "${G.prefix}" bilan boshlanishi kerak`;if(G.format==="ends_with")return`Noto‘g‘ri satr: "${G.suffix}" bilan tugashi kerak`;if(G.format==="includes")return`Noto‘g‘ri satr: "${G.includes}" ni o‘z ichiga olishi kerak`;if(G.format==="regex")return`Noto‘g‘ri satr: ${G.pattern} shabloniga mos kelishi kerak`;return`Noto‘g‘ri ${D[G.format]??U.format}`}case"not_multiple_of":return`Noto‘g‘ri raqam: ${U.divisor} ning karralisi bo‘lishi kerak`;case"unrecognized_keys":return`Noma’lum kalit${U.keys.length>1?"lar":""}: ${O(U.keys,", ")}`;case"invalid_key":return`${U.origin} dagi kalit noto‘g‘ri`;case"invalid_union":return"Noto‘g‘ri kirish";case"invalid_element":return`${U.origin} da noto‘g‘ri qiymat`;default:return"Noto‘g‘ri kirish"}}};function SQ(){return{localeError:$A()}}var vA=()=>{let $={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 v(U){return $[U]??null}let D={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"},X={nan:"NaN",number:"số",array:"mảng"};return(U)=>{switch(U.code){case"invalid_type":{let G=X[U.expected]??U.expected,J=A(U.input),Q=X[J]??J;if(/^[A-Z]/.test(U.expected))return`Đầu vào không hợp lệ: mong đợi instanceof ${U.expected}, nhận được ${Q}`;return`Đầu vào không hợp lệ: mong đợi ${G}, nhận được ${Q}`}case"invalid_value":if(U.values.length===1)return`Đầu vào không hợp lệ: mong đợi ${j(U.values[0])}`;return`Tùy chọn không hợp lệ: mong đợi một trong các giá trị ${O(U.values,"|")}`;case"too_big":{let G=U.inclusive?"<=":"<",J=v(U.origin);if(J)return`Quá lớn: mong đợi ${U.origin??"giá trị"} ${J.verb} ${G}${U.maximum.toString()} ${J.unit??"phần tử"}`;return`Quá lớn: mong đợi ${U.origin??"giá trị"} ${G}${U.maximum.toString()}`}case"too_small":{let G=U.inclusive?">=":">",J=v(U.origin);if(J)return`Quá nhỏ: mong đợi ${U.origin} ${J.verb} ${G}${U.minimum.toString()} ${J.unit}`;return`Quá nhỏ: mong đợi ${U.origin} ${G}${U.minimum.toString()}`}case"invalid_format":{let G=U;if(G.format==="starts_with")return`Chuỗi không hợp lệ: phải bắt đầu bằng "${G.prefix}"`;if(G.format==="ends_with")return`Chuỗi không hợp lệ: phải kết thúc bằng "${G.suffix}"`;if(G.format==="includes")return`Chuỗi không hợp lệ: phải bao gồm "${G.includes}"`;if(G.format==="regex")return`Chuỗi không hợp lệ: phải khớp với mẫu ${G.pattern}`;return`${D[G.format]??U.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 ${U.divisor}`;case"unrecognized_keys":return`Khóa không được nhận dạng: ${O(U.keys,", ")}`;case"invalid_key":return`Khóa không hợp lệ trong ${U.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 ${U.origin}`;default:return"Đầu vào không hợp lệ"}}};function kQ(){return{localeError:vA()}}var UA=()=>{let $={string:{unit:"字符",verb:"包含"},file:{unit:"字节",verb:"包含"},array:{unit:"项",verb:"包含"},set:{unit:"项",verb:"包含"}};function v(U){return $[U]??null}let D={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:"输入"},X={nan:"NaN",number:"数字",array:"数组",null:"空值(null)"};return(U)=>{switch(U.code){case"invalid_type":{let G=X[U.expected]??U.expected,J=A(U.input),Q=X[J]??J;if(/^[A-Z]/.test(U.expected))return`无效输入:期望 instanceof ${U.expected},实际接收 ${Q}`;return`无效输入:期望 ${G},实际接收 ${Q}`}case"invalid_value":if(U.values.length===1)return`无效输入:期望 ${j(U.values[0])}`;return`无效选项:期望以下之一 ${O(U.values,"|")}`;case"too_big":{let G=U.inclusive?"<=":"<",J=v(U.origin);if(J)return`数值过大:期望 ${U.origin??"值"} ${G}${U.maximum.toString()} ${J.unit??"个元素"}`;return`数值过大:期望 ${U.origin??"值"} ${G}${U.maximum.toString()}`}case"too_small":{let G=U.inclusive?">=":">",J=v(U.origin);if(J)return`数值过小:期望 ${U.origin} ${G}${U.minimum.toString()} ${J.unit}`;return`数值过小:期望 ${U.origin} ${G}${U.minimum.toString()}`}case"invalid_format":{let G=U;if(G.format==="starts_with")return`无效字符串:必须以 "${G.prefix}" 开头`;if(G.format==="ends_with")return`无效字符串:必须以 "${G.suffix}" 结尾`;if(G.format==="includes")return`无效字符串:必须包含 "${G.includes}"`;if(G.format==="regex")return`无效字符串:必须满足正则表达式 ${G.pattern}`;return`无效${D[G.format]??U.format}`}case"not_multiple_of":return`无效数字:必须是 ${U.divisor} 的倍数`;case"unrecognized_keys":return`出现未知的键(key): ${O(U.keys,", ")}`;case"invalid_key":return`${U.origin} 中的键(key)无效`;case"invalid_union":return"无效输入";case"invalid_element":return`${U.origin} 中包含无效值(value)`;default:return"无效输入"}}};function EQ(){return{localeError:UA()}}var DA=()=>{let $={string:{unit:"字元",verb:"擁有"},file:{unit:"位元組",verb:"擁有"},array:{unit:"項目",verb:"擁有"},set:{unit:"項目",verb:"擁有"}};function v(U){return $[U]??null}let D={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:"輸入"},X={nan:"NaN"};return(U)=>{switch(U.code){case"invalid_type":{let G=X[U.expected]??U.expected,J=A(U.input),Q=X[J]??J;if(/^[A-Z]/.test(U.expected))return`無效的輸入值:預期為 instanceof ${U.expected},但收到 ${Q}`;return`無效的輸入值:預期為 ${G},但收到 ${Q}`}case"invalid_value":if(U.values.length===1)return`無效的輸入值:預期為 ${j(U.values[0])}`;return`無效的選項:預期為以下其中之一 ${O(U.values,"|")}`;case"too_big":{let G=U.inclusive?"<=":"<",J=v(U.origin);if(J)return`數值過大:預期 ${U.origin??"值"} 應為 ${G}${U.maximum.toString()} ${J.unit??"個元素"}`;return`數值過大:預期 ${U.origin??"值"} 應為 ${G}${U.maximum.toString()}`}case"too_small":{let G=U.inclusive?">=":">",J=v(U.origin);if(J)return`數值過小:預期 ${U.origin} 應為 ${G}${U.minimum.toString()} ${J.unit}`;return`數值過小:預期 ${U.origin} 應為 ${G}${U.minimum.toString()}`}case"invalid_format":{let G=U;if(G.format==="starts_with")return`無效的字串:必須以 "${G.prefix}" 開頭`;if(G.format==="ends_with")return`無效的字串:必須以 "${G.suffix}" 結尾`;if(G.format==="includes")return`無效的字串:必須包含 "${G.includes}"`;if(G.format==="regex")return`無效的字串:必須符合格式 ${G.pattern}`;return`無效的 ${D[G.format]??U.format}`}case"not_multiple_of":return`無效的數字:必須為 ${U.divisor} 的倍數`;case"unrecognized_keys":return`無法識別的鍵值${U.keys.length>1?"們":""}:${O(U.keys,"、")}`;case"invalid_key":return`${U.origin} 中有無效的鍵值`;case"invalid_union":return"無效的輸入值";case"invalid_element":return`${U.origin} 中有無效的值`;default:return"無效的輸入值"}}};function TQ(){return{localeError:DA()}}var XA=()=>{let $={string:{unit:"àmi",verb:"ní"},file:{unit:"bytes",verb:"ní"},array:{unit:"nkan",verb:"ní"},set:{unit:"nkan",verb:"ní"}};function v(U){return $[U]??null}let D={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é"},X={nan:"NaN",number:"nọ́mbà",array:"akopọ"};return(U)=>{switch(U.code){case"invalid_type":{let G=X[U.expected]??U.expected,J=A(U.input),Q=X[J]??J;if(/^[A-Z]/.test(U.expected))return`Ìbáwọlé aṣìṣe: a ní láti fi instanceof ${U.expected}, àmọ̀ a rí ${Q}`;return`Ìbáwọlé aṣìṣe: a ní láti fi ${G}, àmọ̀ a rí ${Q}`}case"invalid_value":if(U.values.length===1)return`Ìbáwọlé aṣìṣe: a ní láti fi ${j(U.values[0])}`;return`Àṣàyàn aṣìṣe: yan ọ̀kan lára ${O(U.values,"|")}`;case"too_big":{let G=U.inclusive?"<=":"<",J=v(U.origin);if(J)return`Tó pọ̀ jù: a ní láti jẹ́ pé ${U.origin??"iye"} ${J.verb} ${G}${U.maximum} ${J.unit}`;return`Tó pọ̀ jù: a ní láti jẹ́ ${G}${U.maximum}`}case"too_small":{let G=U.inclusive?">=":">",J=v(U.origin);if(J)return`Kéré ju: a ní láti jẹ́ pé ${U.origin} ${J.verb} ${G}${U.minimum} ${J.unit}`;return`Kéré ju: a ní láti jẹ́ ${G}${U.minimum}`}case"invalid_format":{let G=U;if(G.format==="starts_with")return`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ bẹ̀rẹ̀ pẹ̀lú "${G.prefix}"`;if(G.format==="ends_with")return`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ parí pẹ̀lú "${G.suffix}"`;if(G.format==="includes")return`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ ní "${G.includes}"`;if(G.format==="regex")return`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ bá àpẹẹrẹ mu ${G.pattern}`;return`Aṣìṣe: ${D[G.format]??U.format}`}case"not_multiple_of":return`Nọ́mbà aṣìṣe: gbọ́dọ̀ jẹ́ èyà pípín ti ${U.divisor}`;case"unrecognized_keys":return`Bọtìnì àìmọ̀: ${O(U.keys,", ")}`;case"invalid_key":return`Bọtìnì aṣìṣe nínú ${U.origin}`;case"invalid_union":return"Ìbáwọlé aṣìṣe";case"invalid_element":return`Iye aṣìṣe nínú ${U.origin}`;default:return"Ìbáwọlé aṣìṣe"}}};function RQ(){return{localeError:XA()}}var UI,gQ=Symbol("ZodOutput"),CQ=Symbol("ZodInput");class uQ{constructor(){this._map=new WeakMap,this._idmap=new Map}add($,...v){let D=v[0];if(this._map.set($,D),D&&typeof D==="object"&&"id"in D)this._idmap.set(D.id,$);return this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove($){let v=this._map.get($);if(v&&typeof v==="object"&&"id"in v)this._idmap.delete(v.id);return this._map.delete($),this}get($){let v=$._zod.parent;if(v){let D={...this.get(v)??{}};delete D.id;let X={...D,...this._map.get($)};return Object.keys(X).length?X:void 0}return this._map.get($)}has($){return this._map.has($)}}function jU(){return new uQ}(UI=globalThis).__zod_globalRegistry??(UI.__zod_globalRegistry=jU());var A$=globalThis.__zod_globalRegistry;function xQ($,v){return new $({type:"string",...M(v)})}function fQ($,v){return new $({type:"string",coerce:!0,...M(v)})}function AU($,v){return new $({type:"string",format:"email",check:"string_format",abort:!1,...M(v)})}function jv($,v){return new $({type:"string",format:"guid",check:"string_format",abort:!1,...M(v)})}function wU($,v){return new $({type:"string",format:"uuid",check:"string_format",abort:!1,...M(v)})}function MU($,v){return new $({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...M(v)})}function PU($,v){return new $({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...M(v)})}function bU($,v){return new $({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...M(v)})}function Av($,v){return new $({type:"string",format:"url",check:"string_format",abort:!1,...M(v)})}function qU($,v){return new $({type:"string",format:"emoji",check:"string_format",abort:!1,...M(v)})}function SU($,v){return new $({type:"string",format:"nanoid",check:"string_format",abort:!1,...M(v)})}function kU($,v){return new $({type:"string",format:"cuid",check:"string_format",abort:!1,...M(v)})}function EU($,v){return new $({type:"string",format:"cuid2",check:"string_format",abort:!1,...M(v)})}function TU($,v){return new $({type:"string",format:"ulid",check:"string_format",abort:!1,...M(v)})}function RU($,v){return new $({type:"string",format:"xid",check:"string_format",abort:!1,...M(v)})}function gU($,v){return new $({type:"string",format:"ksuid",check:"string_format",abort:!1,...M(v)})}function CU($,v){return new $({type:"string",format:"ipv4",check:"string_format",abort:!1,...M(v)})}function uU($,v){return new $({type:"string",format:"ipv6",check:"string_format",abort:!1,...M(v)})}function _Q($,v){return new $({type:"string",format:"mac",check:"string_format",abort:!1,...M(v)})}function xU($,v){return new $({type:"string",format:"cidrv4",check:"string_format",abort:!1,...M(v)})}function fU($,v){return new $({type:"string",format:"cidrv6",check:"string_format",abort:!1,...M(v)})}function _U($,v){return new $({type:"string",format:"base64",check:"string_format",abort:!1,...M(v)})}function iU($,v){return new $({type:"string",format:"base64url",check:"string_format",abort:!1,...M(v)})}function yU($,v){return new $({type:"string",format:"e164",check:"string_format",abort:!1,...M(v)})}function nU($,v){return new $({type:"string",format:"jwt",check:"string_format",abort:!1,...M(v)})}var iQ={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function yQ($,v){return new $({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...M(v)})}function nQ($,v){return new $({type:"string",format:"date",check:"string_format",...M(v)})}function lQ($,v){return new $({type:"string",format:"time",check:"string_format",precision:null,...M(v)})}function hQ($,v){return new $({type:"string",format:"duration",check:"string_format",...M(v)})}function mQ($,v){return new $({type:"number",checks:[],...M(v)})}function cQ($,v){return new $({type:"number",coerce:!0,checks:[],...M(v)})}function dQ($,v){return new $({type:"number",check:"number_format",abort:!1,format:"safeint",...M(v)})}function rQ($,v){return new $({type:"number",check:"number_format",abort:!1,format:"float32",...M(v)})}function pQ($,v){return new $({type:"number",check:"number_format",abort:!1,format:"float64",...M(v)})}function tQ($,v){return new $({type:"number",check:"number_format",abort:!1,format:"int32",...M(v)})}function oQ($,v){return new $({type:"number",check:"number_format",abort:!1,format:"uint32",...M(v)})}function aQ($,v){return new $({type:"boolean",...M(v)})}function eQ($,v){return new $({type:"boolean",coerce:!0,...M(v)})}function sQ($,v){return new $({type:"bigint",...M(v)})}function $9($,v){return new $({type:"bigint",coerce:!0,...M(v)})}function v9($,v){return new $({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...M(v)})}function U9($,v){return new $({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...M(v)})}function D9($,v){return new $({type:"symbol",...M(v)})}function X9($,v){return new $({type:"undefined",...M(v)})}function G9($,v){return new $({type:"null",...M(v)})}function J9($){return new $({type:"any"})}function Q9($){return new $({type:"unknown"})}function W9($,v){return new $({type:"never",...M(v)})}function z9($,v){return new $({type:"void",...M(v)})}function Y9($,v){return new $({type:"date",...M(v)})}function I9($,v){return new $({type:"date",coerce:!0,...M(v)})}function V9($,v){return new $({type:"nan",...M(v)})}function P4($,v){return new zU({check:"less_than",...M(v),value:$,inclusive:!1})}function e$($,v){return new zU({check:"less_than",...M(v),value:$,inclusive:!0})}function b4($,v){return new YU({check:"greater_than",...M(v),value:$,inclusive:!1})}function x$($,v){return new YU({check:"greater_than",...M(v),value:$,inclusive:!0})}function lU($){return b4(0,$)}function hU($){return P4(0,$)}function mU($){return e$(0,$)}function cU($){return x$(0,$)}function $6($,v){return new zJ({check:"multiple_of",...M(v),value:$})}function v6($,v){return new VJ({check:"max_size",...M(v),maximum:$})}function q4($,v){return new KJ({check:"min_size",...M(v),minimum:$})}function w6($,v){return new LJ({check:"size_equals",...M(v),size:$})}function M6($,v){return new BJ({check:"max_length",...M(v),maximum:$})}function i4($,v){return new NJ({check:"min_length",...M(v),minimum:$})}function P6($,v){return new ZJ({check:"length_equals",...M(v),length:$})}function p6($,v){return new OJ({check:"string_format",format:"regex",...M(v),pattern:$})}function t6($){return new HJ({check:"string_format",format:"lowercase",...M($)})}function o6($){return new FJ({check:"string_format",format:"uppercase",...M($)})}function a6($,v){return new jJ({check:"string_format",format:"includes",...M(v),includes:$})}function e6($,v){return new AJ({check:"string_format",format:"starts_with",...M(v),prefix:$})}function s6($,v){return new wJ({check:"string_format",format:"ends_with",...M(v),suffix:$})}function dU($,v,D){return new MJ({check:"property",property:$,schema:v,...M(D)})}function $1($,v){return new PJ({check:"mime_type",mime:$,...M(v)})}function I4($){return new bJ({check:"overwrite",tx:$})}function v1($){return I4((v)=>v.normalize($))}function U1(){return I4(($)=>$.trim())}function D1(){return I4(($)=>$.toLowerCase())}function X1(){return I4(($)=>$.toUpperCase())}function G1(){return I4(($)=>MG($))}function K9($,v,D){return new $({type:"array",element:v,...M(D)})}function JA($,v,D){return new $({type:"union",options:v,...M(D)})}function QA($,v,D){return new $({type:"union",options:v,inclusive:!1,...M(D)})}function WA($,v,D,X){return new $({type:"union",options:D,discriminator:v,...M(X)})}function zA($,v,D){return new $({type:"intersection",left:v,right:D})}function YA($,v,D,X){let U=D instanceof _;return new $({type:"tuple",items:v,rest:U?D:null,...M(U?X:D)})}function IA($,v,D,X){return new $({type:"record",keyType:v,valueType:D,...M(X)})}function VA($,v,D,X){return new $({type:"map",keyType:v,valueType:D,...M(X)})}function KA($,v,D){return new $({type:"set",valueType:v,...M(D)})}function LA($,v,D){let X=Array.isArray(v)?Object.fromEntries(v.map((U)=>[U,U])):v;return new $({type:"enum",entries:X,...M(D)})}function BA($,v,D){return new $({type:"enum",entries:v,...M(D)})}function NA($,v,D){return new $({type:"literal",values:Array.isArray(v)?v:[v],...M(D)})}function L9($,v){return new $({type:"file",...M(v)})}function ZA($,v){return new $({type:"transform",transform:v})}function OA($,v){return new $({type:"optional",innerType:v})}function HA($,v){return new $({type:"nullable",innerType:v})}function FA($,v,D){return new $({type:"default",innerType:v,get defaultValue(){return typeof D==="function"?D():bG(D)}})}function jA($,v,D){return new $({type:"nonoptional",innerType:v,...M(D)})}function AA($,v){return new $({type:"success",innerType:v})}function wA($,v,D){return new $({type:"catch",innerType:v,catchValue:typeof D==="function"?D:()=>D})}function MA($,v,D){return new $({type:"pipe",in:v,out:D})}function PA($,v){return new $({type:"readonly",innerType:v})}function bA($,v,D){return new $({type:"template_literal",parts:v,...M(D)})}function qA($,v){return new $({type:"lazy",getter:v})}function SA($,v){return new $({type:"promise",innerType:v})}function B9($,v,D){let X=M(D);return X.abort??(X.abort=!0),new $({type:"custom",check:"custom",fn:v,...X})}function N9($,v,D){return new $({type:"custom",check:"custom",fn:v,...M(D)})}function Z9($,v){let D=DI((X)=>{return X.addIssue=(U)=>{if(typeof U==="string")X.issues.push(y6(U,X.value,D._zod.def));else{let G=U;if(G.fatal)G.continue=!1;G.code??(G.code="custom"),G.input??(G.input=X.value),G.inst??(G.inst=D),G.continue??(G.continue=!D._zod.def.abort),X.issues.push(y6(G))}},$(X.value,X)},v);return D}function DI($,v){let D=new G$({check:"custom",...M(v)});return D._zod.check=$,D}function O9($){let v=new G$({check:"describe"});return v._zod.onattach=[(D)=>{let X=A$.get(D)??{};A$.add(D,{...X,description:$})}],v._zod.check=()=>{},v}function H9($){let v=new G$({check:"meta"});return v._zod.onattach=[(D)=>{let X=A$.get(D)??{};A$.add(D,{...X,...$})}],v._zod.check=()=>{},v}function F9($,v){let D=M(v),X=D.truthy??["true","1","yes","on","y","enabled"],U=D.falsy??["false","0","no","off","n","disabled"];if(D.case!=="sensitive")X=X.map((K)=>typeof K==="string"?K.toLowerCase():K),U=U.map((K)=>typeof K==="string"?K.toLowerCase():K);let G=new Set(X),J=new Set(U),Q=$.Codec??Bv,W=$.Boolean??Kv,Y=new($.String??A6)({type:"string",error:D.error}),I=new W({type:"boolean",error:D.error}),V=new Q({type:"pipe",in:Y,out:I,transform:(K,L)=>{let N=K;if(D.case!=="sensitive")N=N.toLowerCase();if(G.has(N))return!0;else if(J.has(N))return!1;else return L.issues.push({code:"invalid_value",expected:"stringbool",values:[...G,...J],input:L.value,inst:V,continue:!1}),{}},reverseTransform:(K,L)=>{if(K===!0)return X[0]||"true";else return U[0]||"false"},error:D.error});return V}function J1($,v,D,X={}){let U=M(X),G={...M(X),check:"string_format",type:"string",format:v,fn:typeof D==="function"?D:(Q)=>D.test(Q),...U};if(D instanceof RegExp)G.pattern=D;return new $(G)}function U6($){let v=$?.target??"draft-2020-12";if(v==="draft-4")v="draft-04";if(v==="draft-7")v="draft-07";return{processors:$.processors??{},metadataRegistry:$?.metadata??A$,target:v,unrepresentable:$?.unrepresentable??"throw",override:$?.override??(()=>{}),io:$?.io??"output",counter:0,seen:new Map,cycles:$?.cycles??"ref",reused:$?.reused??"inline",external:$?.external??void 0}}function e($,v,D={path:[],schemaPath:[]}){var X;let U=$._zod.def,G=v.seen.get($);if(G){if(G.count++,D.schemaPath.includes($))G.cycle=D.path;return G.schema}let J={schema:{},count:1,cycle:void 0,path:D.path};v.seen.set($,J);let Q=$._zod.toJSONSchema?.();if(Q)J.schema=Q;else{let Y={...D,schemaPath:[...D.schemaPath,$],path:D.path};if($._zod.processJSONSchema)$._zod.processJSONSchema(v,J.schema,Y);else{let V=J.schema,K=v.processors[U.type];if(!K)throw Error(`[toJSONSchema]: Non-representable type encountered: ${U.type}`);K($,v,V,Y)}let I=$._zod.parent;if(I){if(!J.ref)J.ref=I;e(I,v,Y),v.seen.get(I).isParent=!0}}let W=v.metadataRegistry.get($);if(W)Object.assign(J.schema,W);if(v.io==="input"&&f$($))delete J.schema.examples,delete J.schema.default;if(v.io==="input"&&"_prefault"in J.schema)(X=J.schema).default??(X.default=J.schema._prefault);return delete J.schema._prefault,v.seen.get($).schema}function D6($,v){let D=$.seen.get(v);if(!D)throw Error("Unprocessed schema. This is a bug in Zod.");let X=new Map;for(let J of $.seen.entries()){let Q=$.metadataRegistry.get(J[0])?.id;if(Q){let W=X.get(Q);if(W&&W!==J[0])throw Error(`Duplicate schema id "${Q}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);X.set(Q,J[0])}}let U=(J)=>{let Q=$.target==="draft-2020-12"?"$defs":"definitions";if($.external){let I=$.external.registry.get(J[0])?.id,V=$.external.uri??((L)=>L);if(I)return{ref:V(I)};let K=J[1].defId??J[1].schema.id??`schema${$.counter++}`;return J[1].defId=K,{defId:K,ref:`${V("__shared")}#/${Q}/${K}`}}if(J[1]===D)return{ref:"#"};let z=`${"#"}/${Q}/`,Y=J[1].schema.id??`__schema${$.counter++}`;return{defId:Y,ref:z+Y}},G=(J)=>{if(J[1].schema.$ref)return;let Q=J[1],{ref:W,defId:z}=U(J);if(Q.def={...Q.schema},z)Q.defId=z;let Y=Q.schema;for(let I in Y)delete Y[I];Y.$ref=W};if($.cycles==="throw")for(let J of $.seen.entries()){let Q=J[1];if(Q.cycle)throw Error(`Cycle detected: #/${Q.cycle?.join("/")}/<root>
|
|
90
|
+
`)}K.write("payload.value = newResult;"),K.write("return payload;");let S=K.compile();return(g,u)=>S(V,g,u)},G,J=F6,Q=!O6.jitless,z=Q&&PG.value,Y=v.catchall,I;$._zod.parse=(V,K)=>{I??(I=X.value);let L=V.value;if(!J(L))return V.issues.push({expected:"object",code:"invalid_type",input:L,inst:$}),V;if(Q&&z&&K?.async===!1&&K.jitless!==!0){if(!G)G=U(v.shape);if(V=G(V,K),!Y)return V;return oY([],L,V,K,I,$)}return D(V,K)}});function CY($,v,D,X){for(let G of $)if(G.issues.length===0)return v.value=G.value,v;let U=$.filter((G)=>!s4(G));if(U.length===1)return v.value=U[0].value,U[0];return v.issues.push({code:"invalid_union",input:v.value,inst:D,errors:$.map((G)=>G.issues.map((J)=>C$(J,X,V$())))}),v}var Lv=B("$ZodUnion",($,v)=>{_.init($,v),m($._zod,"optin",()=>v.options.some((X)=>X._zod.optin==="optional")?"optional":void 0),m($._zod,"optout",()=>v.options.some((X)=>X._zod.optout==="optional")?"optional":void 0),m($._zod,"values",()=>{if(v.options.every((X)=>X._zod.values))return new Set(v.options.flatMap((X)=>Array.from(X._zod.values)));return}),m($._zod,"pattern",()=>{if(v.options.every((X)=>X._zod.pattern)){let X=v.options.map((U)=>U._zod.pattern);return new RegExp(`^(${X.map((U)=>$v(U.source)).join("|")})$`)}return});let D=v.options.length===1?v.options[0]._zod.run:null;$._zod.parse=(X,U)=>{if(D)return D(X,U);let G=!1,J=[];for(let Q of v.options){let W=Q._zod.run({value:X.value,issues:[]},U);if(W instanceof Promise)J.push(W),G=!0;else{if(W.issues.length===0)return W;J.push(W)}}if(!G)return CY(J,X,$,U);return Promise.all(J).then((Q)=>{return CY(Q,X,$,U)})}});function uY($,v,D,X){let U=$.filter((G)=>G.issues.length===0);if(U.length===1)return v.value=U[0].value,v;if(U.length===0)v.issues.push({code:"invalid_union",input:v.value,inst:D,errors:$.map((G)=>G.issues.map((J)=>C$(J,X,V$())))});else v.issues.push({code:"invalid_union",input:v.value,inst:D,errors:[],inclusive:!1});return v}var K8=B("$ZodXor",($,v)=>{Lv.init($,v),v.inclusive=!1;let D=v.options.length===1?v.options[0]._zod.run:null;$._zod.parse=(X,U)=>{if(D)return D(X,U);let G=!1,J=[];for(let Q of v.options){let W=Q._zod.run({value:X.value,issues:[]},U);if(W instanceof Promise)J.push(W),G=!0;else J.push(W)}if(!G)return uY(J,X,$,U);return Promise.all(J).then((Q)=>{return uY(Q,X,$,U)})}}),L8=B("$ZodDiscriminatedUnion",($,v)=>{v.inclusive=!1,Lv.init($,v);let D=$._zod.parse;m($._zod,"propValues",()=>{let U={};for(let G of v.options){let J=G._zod.propValues;if(!J||Object.keys(J).length===0)throw Error(`Invalid discriminated union option at index "${v.options.indexOf(G)}"`);for(let[Q,W]of Object.entries(J)){if(!U[Q])U[Q]=new Set;for(let z of W)U[Q].add(z)}}return U});let X=i6(()=>{let U=v.options,G=new Map;for(let J of U){let Q=J._zod.propValues?.[v.discriminator];if(!Q||Q.size===0)throw Error(`Invalid discriminated union option at index "${v.options.indexOf(J)}"`);for(let W of Q){if(G.has(W))throw Error(`Duplicate discriminator value "${String(W)}"`);G.set(W,J)}}return G});$._zod.parse=(U,G)=>{let J=U.value;if(!F6(J))return U.issues.push({code:"invalid_type",expected:"object",input:J,inst:$}),U;let Q=X.value.get(J?.[v.discriminator]);if(Q)return Q._zod.run(U,G);if(v.unionFallback||G.direction==="backward")return D(U,G);return U.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:v.discriminator,options:Array.from(X.value.keys()),input:J,path:[v.discriminator],inst:$}),U}}),B8=B("$ZodIntersection",($,v)=>{_.init($,v),$._zod.parse=(D,X)=>{let U=D.value,G=v.left._zod.run({value:U,issues:[]},X),J=v.right._zod.run({value:U,issues:[]},X);if(G instanceof Promise||J instanceof Promise)return Promise.all([G,J]).then(([W,z])=>{return xY(D,W,z)});return xY(D,G,J)}});function SJ($,v){if($===v)return{valid:!0,data:$};if($ instanceof Date&&v instanceof Date&&+$===+v)return{valid:!0,data:$};if(e4($)&&e4(v)){let D=Object.keys(v),X=Object.keys($).filter((G)=>D.indexOf(G)!==-1),U={...$,...v};for(let G of X){let J=SJ($[G],v[G]);if(!J.valid)return{valid:!1,mergeErrorPath:[G,...J.mergeErrorPath]};U[G]=J.data}return{valid:!0,data:U}}if(Array.isArray($)&&Array.isArray(v)){if($.length!==v.length)return{valid:!1,mergeErrorPath:[]};let D=[];for(let X=0;X<$.length;X++){let U=$[X],G=v[X],J=SJ(U,G);if(!J.valid)return{valid:!1,mergeErrorPath:[X,...J.mergeErrorPath]};D.push(J.data)}return{valid:!0,data:D}}return{valid:!1,mergeErrorPath:[]}}function xY($,v,D){let X=new Map,U;for(let Q of v.issues)if(Q.code==="unrecognized_keys"){U??(U=Q);for(let W of Q.keys){if(!X.has(W))X.set(W,{});X.get(W).l=!0}}else $.issues.push(Q);for(let Q of D.issues)if(Q.code==="unrecognized_keys")for(let W of Q.keys){if(!X.has(W))X.set(W,{});X.get(W).r=!0}else $.issues.push(Q);let G=[...X].filter(([,Q])=>Q.l&&Q.r).map(([Q])=>Q);if(G.length&&U)$.issues.push({...U,keys:G});if(s4($))return $;let J=SJ(v.value,D.value);if(!J.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(J.mergeErrorPath)}`);return $.value=J.data,$}var OU=B("$ZodTuple",($,v)=>{_.init($,v);let D=v.items;$._zod.parse=(X,U)=>{let G=X.value;if(!Array.isArray(G))return X.issues.push({input:G,inst:$,expected:"tuple",code:"invalid_type"}),X;X.value=[];let J=[],Q=fY(D,"optin"),W=fY(D,"optout");if(!v.rest){if(G.length<Q)return X.issues.push({code:"too_small",minimum:Q,inclusive:!0,input:G,inst:$,origin:"array"}),X;if(G.length>D.length)X.issues.push({code:"too_big",maximum:D.length,inclusive:!0,input:G,inst:$,origin:"array"})}let z=Array(D.length);for(let Y=0;Y<D.length;Y++){let I=D[Y]._zod.run({value:G[Y],issues:[]},U);if(I instanceof Promise)J.push(I.then((V)=>{z[Y]=V}));else z[Y]=I}if(v.rest){let Y=D.length-1,I=G.slice(D.length);for(let V of I){Y++;let K=v.rest._zod.run({value:V,issues:[]},U);if(K instanceof Promise)J.push(K.then((L)=>_Y(L,X,Y)));else _Y(K,X,Y)}}if(J.length)return Promise.all(J).then(()=>iY(z,X,D,G,W));return iY(z,X,D,G,W)}});function fY($,v){for(let D=$.length-1;D>=0;D--)if($[D]._zod[v]!=="optional")return D+1;return 0}function _Y($,v,D){if($.issues.length)v.issues.push(...n$(D,$.issues));v.value[D]=$.value}function iY($,v,D,X,U){for(let G=0;G<D.length;G++){let J=$[G],Q=G<X.length;if(J.issues.length){if(!Q&&G>=U){v.value.length=G;break}v.issues.push(...n$(G,J.issues))}v.value[G]=J.value}for(let G=v.value.length-1;G>=X.length;G--)if(D[G]._zod.optout==="optional"&&v.value[G]===void 0)v.value.length=G;else break;return v}var N8=B("$ZodRecord",($,v)=>{_.init($,v),$._zod.parse=(D,X)=>{let U=D.value;if(!e4(U))return D.issues.push({expected:"record",code:"invalid_type",input:U,inst:$}),D;let G=[],J=v.keyType._zod.values;if(J){D.value={};let Q=new Set;for(let z of J)if(typeof z==="string"||typeof z==="number"||typeof z==="symbol"){Q.add(typeof z==="number"?z.toString():z);let Y=v.keyType._zod.run({value:z,issues:[]},X);if(Y instanceof Promise)throw Error("Async schemas not supported in object keys currently");if(Y.issues.length){D.issues.push({code:"invalid_key",origin:"record",issues:Y.issues.map((K)=>C$(K,X,V$())),input:z,path:[z],inst:$});continue}let I=Y.value,V=v.valueType._zod.run({value:U[z],issues:[]},X);if(V instanceof Promise)G.push(V.then((K)=>{if(K.issues.length)D.issues.push(...n$(z,K.issues));D.value[I]=K.value}));else{if(V.issues.length)D.issues.push(...n$(z,V.issues));D.value[I]=V.value}}let W;for(let z in U)if(!Q.has(z))W=W??[],W.push(z);if(W&&W.length>0)D.issues.push({code:"unrecognized_keys",input:U,inst:$,keys:W})}else{D.value={};for(let Q of Reflect.ownKeys(U)){if(Q==="__proto__")continue;if(!Object.prototype.propertyIsEnumerable.call(U,Q))continue;let W=v.keyType._zod.run({value:Q,issues:[]},X);if(W instanceof Promise)throw Error("Async schemas not supported in object keys currently");if(typeof Q==="string"&&Yv.test(Q)&&W.issues.length){let I=v.keyType._zod.run({value:Number(Q),issues:[]},X);if(I instanceof Promise)throw Error("Async schemas not supported in object keys currently");if(I.issues.length===0)W=I}if(W.issues.length){if(v.mode==="loose")D.value[Q]=U[Q];else D.issues.push({code:"invalid_key",origin:"record",issues:W.issues.map((I)=>C$(I,X,V$())),input:Q,path:[Q],inst:$});continue}let Y=v.valueType._zod.run({value:U[Q],issues:[]},X);if(Y instanceof Promise)G.push(Y.then((I)=>{if(I.issues.length)D.issues.push(...n$(Q,I.issues));D.value[W.value]=I.value}));else{if(Y.issues.length)D.issues.push(...n$(Q,Y.issues));D.value[W.value]=Y.value}}}if(G.length)return Promise.all(G).then(()=>D);return D}}),Z8=B("$ZodMap",($,v)=>{_.init($,v),$._zod.parse=(D,X)=>{let U=D.value;if(!(U instanceof Map))return D.issues.push({expected:"map",code:"invalid_type",input:U,inst:$}),D;let G=[];D.value=new Map;for(let[J,Q]of U){let W=v.keyType._zod.run({value:J,issues:[]},X),z=v.valueType._zod.run({value:Q,issues:[]},X);if(W instanceof Promise||z instanceof Promise)G.push(Promise.all([W,z]).then(([Y,I])=>{yY(Y,I,D,J,U,$,X)}));else yY(W,z,D,J,U,$,X)}if(G.length)return Promise.all(G).then(()=>D);return D}});function yY($,v,D,X,U,G,J){if($.issues.length)if(vv.has(typeof X))D.issues.push(...n$(X,$.issues));else D.issues.push({code:"invalid_key",origin:"map",input:U,inst:G,issues:$.issues.map((Q)=>C$(Q,J,V$()))});if(v.issues.length)if(vv.has(typeof X))D.issues.push(...n$(X,v.issues));else D.issues.push({origin:"map",code:"invalid_element",input:U,inst:G,key:X,issues:v.issues.map((Q)=>C$(Q,J,V$()))});D.value.set($.value,v.value)}var O8=B("$ZodSet",($,v)=>{_.init($,v),$._zod.parse=(D,X)=>{let U=D.value;if(!(U instanceof Set))return D.issues.push({input:U,inst:$,expected:"set",code:"invalid_type"}),D;let G=[];D.value=new Set;for(let J of U){let Q=v.valueType._zod.run({value:J,issues:[]},X);if(Q instanceof Promise)G.push(Q.then((W)=>nY(W,D)));else nY(Q,D)}if(G.length)return Promise.all(G).then(()=>D);return D}});function nY($,v){if($.issues.length)v.issues.push(...$.issues);v.value.add($.value)}var H8=B("$ZodEnum",($,v)=>{_.init($,v);let D=s1(v.entries),X=new Set(D);$._zod.values=X,$._zod.pattern=new RegExp(`^(${D.filter((U)=>vv.has(typeof U)).map((U)=>typeof U==="string"?v4(U):U.toString()).join("|")})$`),$._zod.parse=(U,G)=>{let J=U.value;if(X.has(J))return U;return U.issues.push({code:"invalid_value",values:D,input:J,inst:$}),U}}),F8=B("$ZodLiteral",($,v)=>{if(_.init($,v),v.values.length===0)throw Error("Cannot create literal schema with no valid values");let D=new Set(v.values);$._zod.values=D,$._zod.pattern=new RegExp(`^(${v.values.map((X)=>typeof X==="string"?v4(X):X?v4(X.toString()):String(X)).join("|")})$`),$._zod.parse=(X,U)=>{let G=X.value;if(D.has(G))return X;return X.issues.push({code:"invalid_value",values:v.values,input:G,inst:$}),X}}),j8=B("$ZodFile",($,v)=>{_.init($,v),$._zod.parse=(D,X)=>{let U=D.value;if(U instanceof File)return D;return D.issues.push({expected:"file",code:"invalid_type",input:U,inst:$}),D}}),A8=B("$ZodTransform",($,v)=>{_.init($,v),$._zod.optin="optional",$._zod.parse=(D,X)=>{if(X.direction==="backward")throw new H6($.constructor.name);let U=v.transform(D.value,D);if(X.async)return(U instanceof Promise?U:Promise.resolve(U)).then((J)=>{return D.value=J,D.fallback=!0,D});if(U instanceof Promise)throw new M4;return D.value=U,D.fallback=!0,D}});function lY($,v){if(v===void 0&&($.issues.length||$.fallback))return{issues:[],value:void 0};return $}var HU=B("$ZodOptional",($,v)=>{_.init($,v),$._zod.optin="optional",$._zod.optout="optional",m($._zod,"values",()=>{return v.innerType._zod.values?new Set([...v.innerType._zod.values,void 0]):void 0}),m($._zod,"pattern",()=>{let D=v.innerType._zod.pattern;return D?new RegExp(`^(${$v(D.source)})?$`):void 0}),$._zod.parse=(D,X)=>{if(v.innerType._zod.optin==="optional"){let U=D.value,G=v.innerType._zod.run(D,X);if(G instanceof Promise)return G.then((J)=>lY(J,U));return lY(G,U)}if(D.value===void 0)return D;return v.innerType._zod.run(D,X)}}),w8=B("$ZodExactOptional",($,v)=>{HU.init($,v),m($._zod,"values",()=>v.innerType._zod.values),m($._zod,"pattern",()=>v.innerType._zod.pattern),$._zod.parse=(D,X)=>{return v.innerType._zod.run(D,X)}}),M8=B("$ZodNullable",($,v)=>{_.init($,v),m($._zod,"optin",()=>v.innerType._zod.optin),m($._zod,"optout",()=>v.innerType._zod.optout),m($._zod,"pattern",()=>{let D=v.innerType._zod.pattern;return D?new RegExp(`^(${$v(D.source)}|null)$`):void 0}),m($._zod,"values",()=>{return v.innerType._zod.values?new Set([...v.innerType._zod.values,null]):void 0}),$._zod.parse=(D,X)=>{if(D.value===null)return D;return v.innerType._zod.run(D,X)}}),P8=B("$ZodDefault",($,v)=>{_.init($,v),$._zod.optin="optional",m($._zod,"values",()=>v.innerType._zod.values),$._zod.parse=(D,X)=>{if(X.direction==="backward")return v.innerType._zod.run(D,X);if(D.value===void 0)return D.value=v.defaultValue,D;let U=v.innerType._zod.run(D,X);if(U instanceof Promise)return U.then((G)=>hY(G,v));return hY(U,v)}});function hY($,v){if($.value===void 0)$.value=v.defaultValue;return $}var b8=B("$ZodPrefault",($,v)=>{_.init($,v),$._zod.optin="optional",m($._zod,"values",()=>v.innerType._zod.values),$._zod.parse=(D,X)=>{if(X.direction==="backward")return v.innerType._zod.run(D,X);if(D.value===void 0)D.value=v.defaultValue;return v.innerType._zod.run(D,X)}}),q8=B("$ZodNonOptional",($,v)=>{_.init($,v),m($._zod,"values",()=>{let D=v.innerType._zod.values;return D?new Set([...D].filter((X)=>X!==void 0)):void 0}),$._zod.parse=(D,X)=>{let U=v.innerType._zod.run(D,X);if(U instanceof Promise)return U.then((G)=>mY(G,$));return mY(U,$)}});function mY($,v){if(!$.issues.length&&$.value===void 0)$.issues.push({code:"invalid_type",expected:"nonoptional",input:$.value,inst:v});return $}var S8=B("$ZodSuccess",($,v)=>{_.init($,v),$._zod.parse=(D,X)=>{if(X.direction==="backward")throw new H6("ZodSuccess");let U=v.innerType._zod.run(D,X);if(U instanceof Promise)return U.then((G)=>{return D.value=G.issues.length===0,D});return D.value=U.issues.length===0,D}}),k8=B("$ZodCatch",($,v)=>{_.init($,v),$._zod.optin="optional",m($._zod,"optout",()=>v.innerType._zod.optout),m($._zod,"values",()=>v.innerType._zod.values),$._zod.parse=(D,X)=>{if(X.direction==="backward")return v.innerType._zod.run(D,X);let U=v.innerType._zod.run(D,X);if(U instanceof Promise)return U.then((G)=>{if(D.value=G.value,G.issues.length)D.value=v.catchValue({...D,error:{issues:G.issues.map((J)=>C$(J,X,V$()))},input:D.value}),D.issues=[],D.fallback=!0;return D});if(D.value=U.value,U.issues.length)D.value=v.catchValue({...D,error:{issues:U.issues.map((G)=>C$(G,X,V$()))},input:D.value}),D.issues=[],D.fallback=!0;return D}}),E8=B("$ZodNaN",($,v)=>{_.init($,v),$._zod.parse=(D,X)=>{if(typeof D.value!=="number"||!Number.isNaN(D.value))return D.issues.push({input:D.value,inst:$,expected:"nan",code:"invalid_type"}),D;return D}}),FU=B("$ZodPipe",($,v)=>{_.init($,v),m($._zod,"values",()=>v.in._zod.values),m($._zod,"optin",()=>v.in._zod.optin),m($._zod,"optout",()=>v.out._zod.optout),m($._zod,"propValues",()=>v.in._zod.propValues),$._zod.parse=(D,X)=>{if(X.direction==="backward"){let G=v.out._zod.run(D,X);if(G instanceof Promise)return G.then((J)=>VU(J,v.in,X));return VU(G,v.in,X)}let U=v.in._zod.run(D,X);if(U instanceof Promise)return U.then((G)=>VU(G,v.out,X));return VU(U,v.out,X)}});function VU($,v,D){if($.issues.length)return $.aborted=!0,$;return v._zod.run({value:$.value,issues:$.issues,fallback:$.fallback},D)}var Bv=B("$ZodCodec",($,v)=>{_.init($,v),m($._zod,"values",()=>v.in._zod.values),m($._zod,"optin",()=>v.in._zod.optin),m($._zod,"optout",()=>v.out._zod.optout),m($._zod,"propValues",()=>v.in._zod.propValues),$._zod.parse=(D,X)=>{if((X.direction||"forward")==="forward"){let G=v.in._zod.run(D,X);if(G instanceof Promise)return G.then((J)=>KU(J,v,X));return KU(G,v,X)}else{let G=v.out._zod.run(D,X);if(G instanceof Promise)return G.then((J)=>KU(J,v,X));return KU(G,v,X)}}});function KU($,v,D){if($.issues.length)return $.aborted=!0,$;if((D.direction||"forward")==="forward"){let U=v.transform($.value,$);if(U instanceof Promise)return U.then((G)=>LU($,G,v.out,D));return LU($,U,v.out,D)}else{let U=v.reverseTransform($.value,$);if(U instanceof Promise)return U.then((G)=>LU($,G,v.in,D));return LU($,U,v.in,D)}}function LU($,v,D,X){if($.issues.length)return $.aborted=!0,$;return D._zod.run({value:v,issues:$.issues},X)}var T8=B("$ZodPreprocess",($,v)=>{FU.init($,v)}),R8=B("$ZodReadonly",($,v)=>{_.init($,v),m($._zod,"propValues",()=>v.innerType._zod.propValues),m($._zod,"values",()=>v.innerType._zod.values),m($._zod,"optin",()=>v.innerType?._zod?.optin),m($._zod,"optout",()=>v.innerType?._zod?.optout),$._zod.parse=(D,X)=>{if(X.direction==="backward")return v.innerType._zod.run(D,X);let U=v.innerType._zod.run(D,X);if(U instanceof Promise)return U.then(cY);return cY(U)}});function cY($){return $.value=Object.freeze($.value),$}var g8=B("$ZodTemplateLiteral",($,v)=>{_.init($,v);let D=[];for(let X of v.parts)if(typeof X==="object"&&X!==null){if(!X._zod.pattern)throw Error(`Invalid template literal part, no pattern found: ${[...X._zod.traits].shift()}`);let U=X._zod.pattern instanceof RegExp?X._zod.pattern.source:X._zod.pattern;if(!U)throw Error(`Invalid template literal part: ${X._zod.traits}`);let G=U.startsWith("^")?1:0,J=U.endsWith("$")?U.length-1:U.length;D.push(U.slice(G,J))}else if(X===null||qG.has(typeof X))D.push(v4(`${X}`));else throw Error(`Invalid template literal part: ${X}`);$._zod.pattern=new RegExp(`^${D.join("")}$`),$._zod.parse=(X,U)=>{if(typeof X.value!=="string")return X.issues.push({input:X.value,inst:$,expected:"string",code:"invalid_type"}),X;if($._zod.pattern.lastIndex=0,!$._zod.pattern.test(X.value))return X.issues.push({input:X.value,inst:$,code:"invalid_format",format:v.format??"template_literal",pattern:$._zod.pattern.source}),X;return X}}),C8=B("$ZodFunction",($,v)=>{return _.init($,v),$._def=v,$._zod.def=v,$.implement=(D)=>{if(typeof D!=="function")throw Error("implement() must be called with a function");return function(...X){let U=$._def.input?Qv($._def.input,X):X,G=Reflect.apply(D,this,U);if($._def.output)return Qv($._def.output,G);return G}},$.implementAsync=(D)=>{if(typeof D!=="function")throw Error("implementAsync() must be called with a function");return async function(...X){let U=$._def.input?await Wv($._def.input,X):X,G=await Reflect.apply(D,this,U);if($._def.output)return await Wv($._def.output,G);return G}},$._zod.parse=(D,X)=>{if(typeof D.value!=="function")return D.issues.push({code:"invalid_type",expected:"function",input:D.value,inst:$}),D;if($._def.output&&$._def.output._zod.def.type==="promise")D.value=$.implementAsync(D.value);else D.value=$.implement(D.value);return D},$.input=(...D)=>{let X=$.constructor;if(Array.isArray(D[0]))return new X({type:"function",input:new OU({type:"tuple",items:D[0],rest:D[1]}),output:$._def.output});return new X({type:"function",input:D[0],output:$._def.output})},$.output=(D)=>{return new $.constructor({type:"function",input:$._def.input,output:D})},$}),u8=B("$ZodPromise",($,v)=>{_.init($,v),$._zod.parse=(D,X)=>{return Promise.resolve(D.value).then((U)=>v.innerType._zod.run({value:U,issues:[]},X))}}),x8=B("$ZodLazy",($,v)=>{_.init($,v),m($._zod,"innerType",()=>{let D=v;if(!D._cachedInner)D._cachedInner=v.getter();return D._cachedInner}),m($._zod,"pattern",()=>$._zod.innerType?._zod?.pattern),m($._zod,"propValues",()=>$._zod.innerType?._zod?.propValues),m($._zod,"optin",()=>$._zod.innerType?._zod?.optin??void 0),m($._zod,"optout",()=>$._zod.innerType?._zod?.optout??void 0),$._zod.parse=(D,X)=>{return $._zod.innerType._zod.run(D,X)}}),f8=B("$ZodCustom",($,v)=>{G$.init($,v),_.init($,v),$._zod.parse=(D,X)=>{return D},$._zod.check=(D)=>{let X=D.value,U=v.fn(X);if(U instanceof Promise)return U.then((G)=>dY(G,D,X,$));dY(U,D,X,$);return}});function dY($,v,D,X){if(!$){let U={code:"custom",input:D,inst:X,path:[...X._zod.def.path??[]],continue:!X._zod.def.abort};if(X._zod.def.params)U.params=X._zod.def.params;v.issues.push(y6(U))}}var Fv={};C4(Fv,{zhTW:()=>TQ,zhCN:()=>EQ,yo:()=>RQ,vi:()=>kQ,uz:()=>SQ,ur:()=>qQ,uk:()=>Hv,ua:()=>bQ,tr:()=>PQ,th:()=>MQ,ta:()=>wQ,sv:()=>AQ,sl:()=>jQ,ru:()=>FQ,ro:()=>HQ,pt:()=>OQ,ps:()=>NQ,pl:()=>ZQ,ota:()=>BQ,no:()=>LQ,nl:()=>KQ,ms:()=>VQ,mk:()=>IQ,lt:()=>YQ,ko:()=>zQ,km:()=>Zv,kh:()=>WQ,ka:()=>QQ,ja:()=>JQ,it:()=>GQ,is:()=>XQ,id:()=>DQ,hy:()=>UQ,hu:()=>vQ,hr:()=>$Q,he:()=>s8,frCA:()=>e8,fr:()=>a8,fi:()=>o8,fa:()=>t8,es:()=>p8,eo:()=>r8,en:()=>Nv,el:()=>d8,de:()=>c8,da:()=>m8,cs:()=>h8,ca:()=>l8,bg:()=>n8,be:()=>y8,az:()=>i8,ar:()=>_8});var zj=()=>{let $={string:{unit:"حرف",verb:"أن يحوي"},file:{unit:"بايت",verb:"أن يحوي"},array:{unit:"عنصر",verb:"أن يحوي"},set:{unit:"عنصر",verb:"أن يحوي"}};function v(U){return $[U]??null}let D={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:"مدخل"},X={nan:"NaN"};return(U)=>{switch(U.code){case"invalid_type":{let G=X[U.expected]??U.expected,J=A(U.input),Q=X[J]??J;if(/^[A-Z]/.test(U.expected))return`مدخلات غير مقبولة: يفترض إدخال instanceof ${U.expected}، ولكن تم إدخال ${Q}`;return`مدخلات غير مقبولة: يفترض إدخال ${G}، ولكن تم إدخال ${Q}`}case"invalid_value":if(U.values.length===1)return`مدخلات غير مقبولة: يفترض إدخال ${j(U.values[0])}`;return`اختيار غير مقبول: يتوقع انتقاء أحد هذه الخيارات: ${O(U.values,"|")}`;case"too_big":{let G=U.inclusive?"<=":"<",J=v(U.origin);if(J)return` أكبر من اللازم: يفترض أن تكون ${U.origin??"القيمة"} ${G} ${U.maximum.toString()} ${J.unit??"عنصر"}`;return`أكبر من اللازم: يفترض أن تكون ${U.origin??"القيمة"} ${G} ${U.maximum.toString()}`}case"too_small":{let G=U.inclusive?">=":">",J=v(U.origin);if(J)return`أصغر من اللازم: يفترض لـ ${U.origin} أن يكون ${G} ${U.minimum.toString()} ${J.unit}`;return`أصغر من اللازم: يفترض لـ ${U.origin} أن يكون ${G} ${U.minimum.toString()}`}case"invalid_format":{let G=U;if(G.format==="starts_with")return`نَص غير مقبول: يجب أن يبدأ بـ "${U.prefix}"`;if(G.format==="ends_with")return`نَص غير مقبول: يجب أن ينتهي بـ "${G.suffix}"`;if(G.format==="includes")return`نَص غير مقبول: يجب أن يتضمَّن "${G.includes}"`;if(G.format==="regex")return`نَص غير مقبول: يجب أن يطابق النمط ${G.pattern}`;return`${D[G.format]??U.format} غير مقبول`}case"not_multiple_of":return`رقم غير مقبول: يجب أن يكون من مضاعفات ${U.divisor}`;case"unrecognized_keys":return`معرف${U.keys.length>1?"ات":""} غريب${U.keys.length>1?"ة":""}: ${O(U.keys,"، ")}`;case"invalid_key":return`معرف غير مقبول في ${U.origin}`;case"invalid_union":return"مدخل غير مقبول";case"invalid_element":return`مدخل غير مقبول في ${U.origin}`;default:return"مدخل غير مقبول"}}};function _8(){return{localeError:zj()}}var Yj=()=>{let $={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 v(U){return $[U]??null}let D={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"},X={nan:"NaN"};return(U)=>{switch(U.code){case"invalid_type":{let G=X[U.expected]??U.expected,J=A(U.input),Q=X[J]??J;if(/^[A-Z]/.test(U.expected))return`Yanlış dəyər: gözlənilən instanceof ${U.expected}, daxil olan ${Q}`;return`Yanlış dəyər: gözlənilən ${G}, daxil olan ${Q}`}case"invalid_value":if(U.values.length===1)return`Yanlış dəyər: gözlənilən ${j(U.values[0])}`;return`Yanlış seçim: aşağıdakılardan biri olmalıdır: ${O(U.values,"|")}`;case"too_big":{let G=U.inclusive?"<=":"<",J=v(U.origin);if(J)return`Çox böyük: gözlənilən ${U.origin??"dəyər"} ${G}${U.maximum.toString()} ${J.unit??"element"}`;return`Çox böyük: gözlənilən ${U.origin??"dəyər"} ${G}${U.maximum.toString()}`}case"too_small":{let G=U.inclusive?">=":">",J=v(U.origin);if(J)return`Çox kiçik: gözlənilən ${U.origin} ${G}${U.minimum.toString()} ${J.unit}`;return`Çox kiçik: gözlənilən ${U.origin} ${G}${U.minimum.toString()}`}case"invalid_format":{let G=U;if(G.format==="starts_with")return`Yanlış mətn: "${G.prefix}" ilə başlamalıdır`;if(G.format==="ends_with")return`Yanlış mətn: "${G.suffix}" ilə bitməlidir`;if(G.format==="includes")return`Yanlış mətn: "${G.includes}" daxil olmalıdır`;if(G.format==="regex")return`Yanlış mətn: ${G.pattern} şablonuna uyğun olmalıdır`;return`Yanlış ${D[G.format]??U.format}`}case"not_multiple_of":return`Yanlış ədəd: ${U.divisor} ilə bölünə bilən olmalıdır`;case"unrecognized_keys":return`Tanınmayan açar${U.keys.length>1?"lar":""}: ${O(U.keys,", ")}`;case"invalid_key":return`${U.origin} daxilində yanlış açar`;case"invalid_union":return"Yanlış dəyər";case"invalid_element":return`${U.origin} daxilində yanlış dəyər`;default:return"Yanlış dəyər"}}};function i8(){return{localeError:Yj()}}function eY($,v,D,X){let U=Math.abs($),G=U%10,J=U%100;if(J>=11&&J<=19)return X;if(G===1)return v;if(G>=2&&G<=4)return D;return X}var Ij=()=>{let $={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 v(U){return $[U]??null}let D={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:"увод"},X={nan:"NaN",number:"лік",array:"масіў"};return(U)=>{switch(U.code){case"invalid_type":{let G=X[U.expected]??U.expected,J=A(U.input),Q=X[J]??J;if(/^[A-Z]/.test(U.expected))return`Няправільны ўвод: чакаўся instanceof ${U.expected}, атрымана ${Q}`;return`Няправільны ўвод: чакаўся ${G}, атрымана ${Q}`}case"invalid_value":if(U.values.length===1)return`Няправільны ўвод: чакалася ${j(U.values[0])}`;return`Няправільны варыянт: чакаўся адзін з ${O(U.values,"|")}`;case"too_big":{let G=U.inclusive?"<=":"<",J=v(U.origin);if(J){let Q=Number(U.maximum),W=eY(Q,J.unit.one,J.unit.few,J.unit.many);return`Занадта вялікі: чакалася, што ${U.origin??"значэнне"} павінна ${J.verb} ${G}${U.maximum.toString()} ${W}`}return`Занадта вялікі: чакалася, што ${U.origin??"значэнне"} павінна быць ${G}${U.maximum.toString()}`}case"too_small":{let G=U.inclusive?">=":">",J=v(U.origin);if(J){let Q=Number(U.minimum),W=eY(Q,J.unit.one,J.unit.few,J.unit.many);return`Занадта малы: чакалася, што ${U.origin} павінна ${J.verb} ${G}${U.minimum.toString()} ${W}`}return`Занадта малы: чакалася, што ${U.origin} павінна быць ${G}${U.minimum.toString()}`}case"invalid_format":{let G=U;if(G.format==="starts_with")return`Няправільны радок: павінен пачынацца з "${G.prefix}"`;if(G.format==="ends_with")return`Няправільны радок: павінен заканчвацца на "${G.suffix}"`;if(G.format==="includes")return`Няправільны радок: павінен змяшчаць "${G.includes}"`;if(G.format==="regex")return`Няправільны радок: павінен адпавядаць шаблону ${G.pattern}`;return`Няправільны ${D[G.format]??U.format}`}case"not_multiple_of":return`Няправільны лік: павінен быць кратным ${U.divisor}`;case"unrecognized_keys":return`Нераспазнаны ${U.keys.length>1?"ключы":"ключ"}: ${O(U.keys,", ")}`;case"invalid_key":return`Няправільны ключ у ${U.origin}`;case"invalid_union":return"Няправільны ўвод";case"invalid_element":return`Няправільнае значэнне ў ${U.origin}`;default:return"Няправільны ўвод"}}};function y8(){return{localeError:Ij()}}var Vj=()=>{let $={string:{unit:"символа",verb:"да съдържа"},file:{unit:"байта",verb:"да съдържа"},array:{unit:"елемента",verb:"да съдържа"},set:{unit:"елемента",verb:"да съдържа"}};function v(U){return $[U]??null}let D={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:"вход"},X={nan:"NaN",number:"число",array:"масив"};return(U)=>{switch(U.code){case"invalid_type":{let G=X[U.expected]??U.expected,J=A(U.input),Q=X[J]??J;if(/^[A-Z]/.test(U.expected))return`Невалиден вход: очакван instanceof ${U.expected}, получен ${Q}`;return`Невалиден вход: очакван ${G}, получен ${Q}`}case"invalid_value":if(U.values.length===1)return`Невалиден вход: очакван ${j(U.values[0])}`;return`Невалидна опция: очаквано едно от ${O(U.values,"|")}`;case"too_big":{let G=U.inclusive?"<=":"<",J=v(U.origin);if(J)return`Твърде голямо: очаква се ${U.origin??"стойност"} да съдържа ${G}${U.maximum.toString()} ${J.unit??"елемента"}`;return`Твърде голямо: очаква се ${U.origin??"стойност"} да бъде ${G}${U.maximum.toString()}`}case"too_small":{let G=U.inclusive?">=":">",J=v(U.origin);if(J)return`Твърде малко: очаква се ${U.origin} да съдържа ${G}${U.minimum.toString()} ${J.unit}`;return`Твърде малко: очаква се ${U.origin} да бъде ${G}${U.minimum.toString()}`}case"invalid_format":{let G=U;if(G.format==="starts_with")return`Невалиден низ: трябва да започва с "${G.prefix}"`;if(G.format==="ends_with")return`Невалиден низ: трябва да завършва с "${G.suffix}"`;if(G.format==="includes")return`Невалиден низ: трябва да включва "${G.includes}"`;if(G.format==="regex")return`Невалиден низ: трябва да съвпада с ${G.pattern}`;let J="Невалиден";if(G.format==="emoji")J="Невалидно";if(G.format==="datetime")J="Невалидно";if(G.format==="date")J="Невалидна";if(G.format==="time")J="Невалидно";if(G.format==="duration")J="Невалидна";return`${J} ${D[G.format]??U.format}`}case"not_multiple_of":return`Невалидно число: трябва да бъде кратно на ${U.divisor}`;case"unrecognized_keys":return`Неразпознат${U.keys.length>1?"и":""} ключ${U.keys.length>1?"ове":""}: ${O(U.keys,", ")}`;case"invalid_key":return`Невалиден ключ в ${U.origin}`;case"invalid_union":return"Невалиден вход";case"invalid_element":return`Невалидна стойност в ${U.origin}`;default:return"Невалиден вход"}}};function n8(){return{localeError:Vj()}}var Kj=()=>{let $={string:{unit:"caràcters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"}};function v(U){return $[U]??null}let D={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"},X={nan:"NaN"};return(U)=>{switch(U.code){case"invalid_type":{let G=X[U.expected]??U.expected,J=A(U.input),Q=X[J]??J;if(/^[A-Z]/.test(U.expected))return`Tipus invàlid: s'esperava instanceof ${U.expected}, s'ha rebut ${Q}`;return`Tipus invàlid: s'esperava ${G}, s'ha rebut ${Q}`}case"invalid_value":if(U.values.length===1)return`Valor invàlid: s'esperava ${j(U.values[0])}`;return`Opció invàlida: s'esperava una de ${O(U.values," o ")}`;case"too_big":{let G=U.inclusive?"com a màxim":"menys de",J=v(U.origin);if(J)return`Massa gran: s'esperava que ${U.origin??"el valor"} contingués ${G} ${U.maximum.toString()} ${J.unit??"elements"}`;return`Massa gran: s'esperava que ${U.origin??"el valor"} fos ${G} ${U.maximum.toString()}`}case"too_small":{let G=U.inclusive?"com a mínim":"més de",J=v(U.origin);if(J)return`Massa petit: s'esperava que ${U.origin} contingués ${G} ${U.minimum.toString()} ${J.unit}`;return`Massa petit: s'esperava que ${U.origin} fos ${G} ${U.minimum.toString()}`}case"invalid_format":{let G=U;if(G.format==="starts_with")return`Format invàlid: ha de començar amb "${G.prefix}"`;if(G.format==="ends_with")return`Format invàlid: ha d'acabar amb "${G.suffix}"`;if(G.format==="includes")return`Format invàlid: ha d'incloure "${G.includes}"`;if(G.format==="regex")return`Format invàlid: ha de coincidir amb el patró ${G.pattern}`;return`Format invàlid per a ${D[G.format]??U.format}`}case"not_multiple_of":return`Número invàlid: ha de ser múltiple de ${U.divisor}`;case"unrecognized_keys":return`Clau${U.keys.length>1?"s":""} no reconeguda${U.keys.length>1?"s":""}: ${O(U.keys,", ")}`;case"invalid_key":return`Clau invàlida a ${U.origin}`;case"invalid_union":return"Entrada invàlida";case"invalid_element":return`Element invàlid a ${U.origin}`;default:return"Entrada invàlida"}}};function l8(){return{localeError:Kj()}}var Lj=()=>{let $={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 v(U){return $[U]??null}let D={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"},X={nan:"NaN",number:"číslo",string:"řetězec",function:"funkce",array:"pole"};return(U)=>{switch(U.code){case"invalid_type":{let G=X[U.expected]??U.expected,J=A(U.input),Q=X[J]??J;if(/^[A-Z]/.test(U.expected))return`Neplatný vstup: očekáváno instanceof ${U.expected}, obdrženo ${Q}`;return`Neplatný vstup: očekáváno ${G}, obdrženo ${Q}`}case"invalid_value":if(U.values.length===1)return`Neplatný vstup: očekáváno ${j(U.values[0])}`;return`Neplatná možnost: očekávána jedna z hodnot ${O(U.values,"|")}`;case"too_big":{let G=U.inclusive?"<=":"<",J=v(U.origin);if(J)return`Hodnota je příliš velká: ${U.origin??"hodnota"} musí mít ${G}${U.maximum.toString()} ${J.unit??"prvků"}`;return`Hodnota je příliš velká: ${U.origin??"hodnota"} musí být ${G}${U.maximum.toString()}`}case"too_small":{let G=U.inclusive?">=":">",J=v(U.origin);if(J)return`Hodnota je příliš malá: ${U.origin??"hodnota"} musí mít ${G}${U.minimum.toString()} ${J.unit??"prvků"}`;return`Hodnota je příliš malá: ${U.origin??"hodnota"} musí být ${G}${U.minimum.toString()}`}case"invalid_format":{let G=U;if(G.format==="starts_with")return`Neplatný řetězec: musí začínat na "${G.prefix}"`;if(G.format==="ends_with")return`Neplatný řetězec: musí končit na "${G.suffix}"`;if(G.format==="includes")return`Neplatný řetězec: musí obsahovat "${G.includes}"`;if(G.format==="regex")return`Neplatný řetězec: musí odpovídat vzoru ${G.pattern}`;return`Neplatný formát ${D[G.format]??U.format}`}case"not_multiple_of":return`Neplatné číslo: musí být násobkem ${U.divisor}`;case"unrecognized_keys":return`Neznámé klíče: ${O(U.keys,", ")}`;case"invalid_key":return`Neplatný klíč v ${U.origin}`;case"invalid_union":return"Neplatný vstup";case"invalid_element":return`Neplatná hodnota v ${U.origin}`;default:return"Neplatný vstup"}}};function h8(){return{localeError:Lj()}}var Bj=()=>{let $={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"}};function v(U){return $[U]??null}let D={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"},X={nan:"NaN",string:"streng",number:"tal",boolean:"boolean",array:"liste",object:"objekt",set:"sæt",file:"fil"};return(U)=>{switch(U.code){case"invalid_type":{let G=X[U.expected]??U.expected,J=A(U.input),Q=X[J]??J;if(/^[A-Z]/.test(U.expected))return`Ugyldigt input: forventede instanceof ${U.expected}, fik ${Q}`;return`Ugyldigt input: forventede ${G}, fik ${Q}`}case"invalid_value":if(U.values.length===1)return`Ugyldig værdi: forventede ${j(U.values[0])}`;return`Ugyldigt valg: forventede en af følgende ${O(U.values,"|")}`;case"too_big":{let G=U.inclusive?"<=":"<",J=v(U.origin),Q=X[U.origin]??U.origin;if(J)return`For stor: forventede ${Q??"value"} ${J.verb} ${G} ${U.maximum.toString()} ${J.unit??"elementer"}`;return`For stor: forventede ${Q??"value"} havde ${G} ${U.maximum.toString()}`}case"too_small":{let G=U.inclusive?">=":">",J=v(U.origin),Q=X[U.origin]??U.origin;if(J)return`For lille: forventede ${Q} ${J.verb} ${G} ${U.minimum.toString()} ${J.unit}`;return`For lille: forventede ${Q} havde ${G} ${U.minimum.toString()}`}case"invalid_format":{let G=U;if(G.format==="starts_with")return`Ugyldig streng: skal starte med "${G.prefix}"`;if(G.format==="ends_with")return`Ugyldig streng: skal ende med "${G.suffix}"`;if(G.format==="includes")return`Ugyldig streng: skal indeholde "${G.includes}"`;if(G.format==="regex")return`Ugyldig streng: skal matche mønsteret ${G.pattern}`;return`Ugyldig ${D[G.format]??U.format}`}case"not_multiple_of":return`Ugyldigt tal: skal være deleligt med ${U.divisor}`;case"unrecognized_keys":return`${U.keys.length>1?"Ukendte nøgler":"Ukendt nøgle"}: ${O(U.keys,", ")}`;case"invalid_key":return`Ugyldig nøgle i ${U.origin}`;case"invalid_union":return"Ugyldigt input: matcher ingen af de tilladte typer";case"invalid_element":return`Ugyldig værdi i ${U.origin}`;default:return"Ugyldigt input"}}};function m8(){return{localeError:Bj()}}var Nj=()=>{let $={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 v(U){return $[U]??null}let D={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"},X={nan:"NaN",number:"Zahl",array:"Array"};return(U)=>{switch(U.code){case"invalid_type":{let G=X[U.expected]??U.expected,J=A(U.input),Q=X[J]??J;if(/^[A-Z]/.test(U.expected))return`Ungültige Eingabe: erwartet instanceof ${U.expected}, erhalten ${Q}`;return`Ungültige Eingabe: erwartet ${G}, erhalten ${Q}`}case"invalid_value":if(U.values.length===1)return`Ungültige Eingabe: erwartet ${j(U.values[0])}`;return`Ungültige Option: erwartet eine von ${O(U.values,"|")}`;case"too_big":{let G=U.inclusive?"<=":"<",J=v(U.origin);if(J)return`Zu groß: erwartet, dass ${U.origin??"Wert"} ${G}${U.maximum.toString()} ${J.unit??"Elemente"} hat`;return`Zu groß: erwartet, dass ${U.origin??"Wert"} ${G}${U.maximum.toString()} ist`}case"too_small":{let G=U.inclusive?">=":">",J=v(U.origin);if(J)return`Zu klein: erwartet, dass ${U.origin} ${G}${U.minimum.toString()} ${J.unit} hat`;return`Zu klein: erwartet, dass ${U.origin} ${G}${U.minimum.toString()} ist`}case"invalid_format":{let G=U;if(G.format==="starts_with")return`Ungültiger String: muss mit "${G.prefix}" beginnen`;if(G.format==="ends_with")return`Ungültiger String: muss mit "${G.suffix}" enden`;if(G.format==="includes")return`Ungültiger String: muss "${G.includes}" enthalten`;if(G.format==="regex")return`Ungültiger String: muss dem Muster ${G.pattern} entsprechen`;return`Ungültig: ${D[G.format]??U.format}`}case"not_multiple_of":return`Ungültige Zahl: muss ein Vielfaches von ${U.divisor} sein`;case"unrecognized_keys":return`${U.keys.length>1?"Unbekannte Schlüssel":"Unbekannter Schlüssel"}: ${O(U.keys,", ")}`;case"invalid_key":return`Ungültiger Schlüssel in ${U.origin}`;case"invalid_union":return"Ungültige Eingabe";case"invalid_element":return`Ungültiger Wert in ${U.origin}`;default:return"Ungültige Eingabe"}}};function c8(){return{localeError:Nj()}}var Zj=()=>{let $={string:{unit:"χαρακτήρες",verb:"να έχει"},file:{unit:"bytes",verb:"να έχει"},array:{unit:"στοιχεία",verb:"να έχει"},set:{unit:"στοιχεία",verb:"να έχει"},map:{unit:"καταχωρήσεις",verb:"να έχει"}};function v(U){return $[U]??null}let D={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:"είσοδος"},X={nan:"NaN"};return(U)=>{switch(U.code){case"invalid_type":{let G=X[U.expected]??U.expected,J=A(U.input),Q=X[J]??J;if(typeof U.expected==="string"&&/^[A-Z]/.test(U.expected))return`Μη έγκυρη είσοδος: αναμενόταν instanceof ${U.expected}, λήφθηκε ${Q}`;return`Μη έγκυρη είσοδος: αναμενόταν ${G}, λήφθηκε ${Q}`}case"invalid_value":if(U.values.length===1)return`Μη έγκυρη είσοδος: αναμενόταν ${j(U.values[0])}`;return`Μη έγκυρη επιλογή: αναμενόταν ένα από ${O(U.values,"|")}`;case"too_big":{let G=U.inclusive?"<=":"<",J=v(U.origin);if(J)return`Πολύ μεγάλο: αναμενόταν ${U.origin??"τιμή"} να έχει ${G}${U.maximum.toString()} ${J.unit??"στοιχεία"}`;return`Πολύ μεγάλο: αναμενόταν ${U.origin??"τιμή"} να είναι ${G}${U.maximum.toString()}`}case"too_small":{let G=U.inclusive?">=":">",J=v(U.origin);if(J)return`Πολύ μικρό: αναμενόταν ${U.origin} να έχει ${G}${U.minimum.toString()} ${J.unit}`;return`Πολύ μικρό: αναμενόταν ${U.origin} να είναι ${G}${U.minimum.toString()}`}case"invalid_format":{let G=U;if(G.format==="starts_with")return`Μη έγκυρη συμβολοσειρά: πρέπει να ξεκινά με "${G.prefix}"`;if(G.format==="ends_with")return`Μη έγκυρη συμβολοσειρά: πρέπει να τελειώνει με "${G.suffix}"`;if(G.format==="includes")return`Μη έγκυρη συμβολοσειρά: πρέπει να περιέχει "${G.includes}"`;if(G.format==="regex")return`Μη έγκυρη συμβολοσειρά: πρέπει να ταιριάζει με το μοτίβο ${G.pattern}`;return`Μη έγκυρο: ${D[G.format]??U.format}`}case"not_multiple_of":return`Μη έγκυρος αριθμός: πρέπει να είναι πολλαπλάσιο του ${U.divisor}`;case"unrecognized_keys":return`Άγνωστ${U.keys.length>1?"α":"ο"} κλειδ${U.keys.length>1?"ιά":"ί"}: ${O(U.keys,", ")}`;case"invalid_key":return`Μη έγκυρο κλειδί στο ${U.origin}`;case"invalid_union":return"Μη έγκυρη είσοδος";case"invalid_element":return`Μη έγκυρη τιμή στο ${U.origin}`;default:return"Μη έγκυρη είσοδος"}}};function d8(){return{localeError:Zj()}}var Oj=()=>{let $={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 v(U){return $[U]??null}let D={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"},X={nan:"NaN"};return(U)=>{switch(U.code){case"invalid_type":{let G=X[U.expected]??U.expected,J=A(U.input),Q=X[J]??J;return`Invalid input: expected ${G}, received ${Q}`}case"invalid_value":if(U.values.length===1)return`Invalid input: expected ${j(U.values[0])}`;return`Invalid option: expected one of ${O(U.values,"|")}`;case"too_big":{let G=U.inclusive?"<=":"<",J=v(U.origin);if(J)return`Too big: expected ${U.origin??"value"} to have ${G}${U.maximum.toString()} ${J.unit??"elements"}`;return`Too big: expected ${U.origin??"value"} to be ${G}${U.maximum.toString()}`}case"too_small":{let G=U.inclusive?">=":">",J=v(U.origin);if(J)return`Too small: expected ${U.origin} to have ${G}${U.minimum.toString()} ${J.unit}`;return`Too small: expected ${U.origin} to be ${G}${U.minimum.toString()}`}case"invalid_format":{let G=U;if(G.format==="starts_with")return`Invalid string: must start with "${G.prefix}"`;if(G.format==="ends_with")return`Invalid string: must end with "${G.suffix}"`;if(G.format==="includes")return`Invalid string: must include "${G.includes}"`;if(G.format==="regex")return`Invalid string: must match pattern ${G.pattern}`;return`Invalid ${D[G.format]??U.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${U.divisor}`;case"unrecognized_keys":return`Unrecognized key${U.keys.length>1?"s":""}: ${O(U.keys,", ")}`;case"invalid_key":return`Invalid key in ${U.origin}`;case"invalid_union":if(U.options&&Array.isArray(U.options)&&U.options.length>0)return`Invalid discriminator value. Expected ${U.options.map((J)=>`'${J}'`).join(" | ")}`;return"Invalid input";case"invalid_element":return`Invalid value in ${U.origin}`;default:return"Invalid input"}}};function Nv(){return{localeError:Oj()}}var Hj=()=>{let $={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function v(U){return $[U]??null}let D={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"},X={nan:"NaN",number:"nombro",array:"tabelo",null:"senvalora"};return(U)=>{switch(U.code){case"invalid_type":{let G=X[U.expected]??U.expected,J=A(U.input),Q=X[J]??J;if(/^[A-Z]/.test(U.expected))return`Nevalida enigo: atendiĝis instanceof ${U.expected}, riceviĝis ${Q}`;return`Nevalida enigo: atendiĝis ${G}, riceviĝis ${Q}`}case"invalid_value":if(U.values.length===1)return`Nevalida enigo: atendiĝis ${j(U.values[0])}`;return`Nevalida opcio: atendiĝis unu el ${O(U.values,"|")}`;case"too_big":{let G=U.inclusive?"<=":"<",J=v(U.origin);if(J)return`Tro granda: atendiĝis ke ${U.origin??"valoro"} havu ${G}${U.maximum.toString()} ${J.unit??"elementojn"}`;return`Tro granda: atendiĝis ke ${U.origin??"valoro"} havu ${G}${U.maximum.toString()}`}case"too_small":{let G=U.inclusive?">=":">",J=v(U.origin);if(J)return`Tro malgranda: atendiĝis ke ${U.origin} havu ${G}${U.minimum.toString()} ${J.unit}`;return`Tro malgranda: atendiĝis ke ${U.origin} estu ${G}${U.minimum.toString()}`}case"invalid_format":{let G=U;if(G.format==="starts_with")return`Nevalida karaktraro: devas komenciĝi per "${G.prefix}"`;if(G.format==="ends_with")return`Nevalida karaktraro: devas finiĝi per "${G.suffix}"`;if(G.format==="includes")return`Nevalida karaktraro: devas inkluzivi "${G.includes}"`;if(G.format==="regex")return`Nevalida karaktraro: devas kongrui kun la modelo ${G.pattern}`;return`Nevalida ${D[G.format]??U.format}`}case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${U.divisor}`;case"unrecognized_keys":return`Nekonata${U.keys.length>1?"j":""} ŝlosilo${U.keys.length>1?"j":""}: ${O(U.keys,", ")}`;case"invalid_key":return`Nevalida ŝlosilo en ${U.origin}`;case"invalid_union":return"Nevalida enigo";case"invalid_element":return`Nevalida valoro en ${U.origin}`;default:return"Nevalida enigo"}}};function r8(){return{localeError:Hj()}}var Fj=()=>{let $={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}};function v(U){return $[U]??null}let D={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"},X={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(U)=>{switch(U.code){case"invalid_type":{let G=X[U.expected]??U.expected,J=A(U.input),Q=X[J]??J;if(/^[A-Z]/.test(U.expected))return`Entrada inválida: se esperaba instanceof ${U.expected}, recibido ${Q}`;return`Entrada inválida: se esperaba ${G}, recibido ${Q}`}case"invalid_value":if(U.values.length===1)return`Entrada inválida: se esperaba ${j(U.values[0])}`;return`Opción inválida: se esperaba una de ${O(U.values,"|")}`;case"too_big":{let G=U.inclusive?"<=":"<",J=v(U.origin),Q=X[U.origin]??U.origin;if(J)return`Demasiado grande: se esperaba que ${Q??"valor"} tuviera ${G}${U.maximum.toString()} ${J.unit??"elementos"}`;return`Demasiado grande: se esperaba que ${Q??"valor"} fuera ${G}${U.maximum.toString()}`}case"too_small":{let G=U.inclusive?">=":">",J=v(U.origin),Q=X[U.origin]??U.origin;if(J)return`Demasiado pequeño: se esperaba que ${Q} tuviera ${G}${U.minimum.toString()} ${J.unit}`;return`Demasiado pequeño: se esperaba que ${Q} fuera ${G}${U.minimum.toString()}`}case"invalid_format":{let G=U;if(G.format==="starts_with")return`Cadena inválida: debe comenzar con "${G.prefix}"`;if(G.format==="ends_with")return`Cadena inválida: debe terminar en "${G.suffix}"`;if(G.format==="includes")return`Cadena inválida: debe incluir "${G.includes}"`;if(G.format==="regex")return`Cadena inválida: debe coincidir con el patrón ${G.pattern}`;return`Inválido ${D[G.format]??U.format}`}case"not_multiple_of":return`Número inválido: debe ser múltiplo de ${U.divisor}`;case"unrecognized_keys":return`Llave${U.keys.length>1?"s":""} desconocida${U.keys.length>1?"s":""}: ${O(U.keys,", ")}`;case"invalid_key":return`Llave inválida en ${X[U.origin]??U.origin}`;case"invalid_union":return"Entrada inválida";case"invalid_element":return`Valor inválido en ${X[U.origin]??U.origin}`;default:return"Entrada inválida"}}};function p8(){return{localeError:Fj()}}var jj=()=>{let $={string:{unit:"کاراکتر",verb:"داشته باشد"},file:{unit:"بایت",verb:"داشته باشد"},array:{unit:"آیتم",verb:"داشته باشد"},set:{unit:"آیتم",verb:"داشته باشد"}};function v(U){return $[U]??null}let D={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:"ورودی"},X={nan:"NaN",number:"عدد",array:"آرایه"};return(U)=>{switch(U.code){case"invalid_type":{let G=X[U.expected]??U.expected,J=A(U.input),Q=X[J]??J;if(/^[A-Z]/.test(U.expected))return`ورودی نامعتبر: میبایست instanceof ${U.expected} میبود، ${Q} دریافت شد`;return`ورودی نامعتبر: میبایست ${G} میبود، ${Q} دریافت شد`}case"invalid_value":if(U.values.length===1)return`ورودی نامعتبر: میبایست ${j(U.values[0])} میبود`;return`گزینه نامعتبر: میبایست یکی از ${O(U.values,"|")} میبود`;case"too_big":{let G=U.inclusive?"<=":"<",J=v(U.origin);if(J)return`خیلی بزرگ: ${U.origin??"مقدار"} باید ${G}${U.maximum.toString()} ${J.unit??"عنصر"} باشد`;return`خیلی بزرگ: ${U.origin??"مقدار"} باید ${G}${U.maximum.toString()} باشد`}case"too_small":{let G=U.inclusive?">=":">",J=v(U.origin);if(J)return`خیلی کوچک: ${U.origin} باید ${G}${U.minimum.toString()} ${J.unit} باشد`;return`خیلی کوچک: ${U.origin} باید ${G}${U.minimum.toString()} باشد`}case"invalid_format":{let G=U;if(G.format==="starts_with")return`رشته نامعتبر: باید با "${G.prefix}" شروع شود`;if(G.format==="ends_with")return`رشته نامعتبر: باید با "${G.suffix}" تمام شود`;if(G.format==="includes")return`رشته نامعتبر: باید شامل "${G.includes}" باشد`;if(G.format==="regex")return`رشته نامعتبر: باید با الگوی ${G.pattern} مطابقت داشته باشد`;return`${D[G.format]??U.format} نامعتبر`}case"not_multiple_of":return`عدد نامعتبر: باید مضرب ${U.divisor} باشد`;case"unrecognized_keys":return`کلید${U.keys.length>1?"های":""} ناشناس: ${O(U.keys,", ")}`;case"invalid_key":return`کلید ناشناس در ${U.origin}`;case"invalid_union":return"ورودی نامعتبر";case"invalid_element":return`مقدار نامعتبر در ${U.origin}`;default:return"ورودی نامعتبر"}}};function t8(){return{localeError:jj()}}var Aj=()=>{let $={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 v(U){return $[U]??null}let D={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"},X={nan:"NaN"};return(U)=>{switch(U.code){case"invalid_type":{let G=X[U.expected]??U.expected,J=A(U.input),Q=X[J]??J;if(/^[A-Z]/.test(U.expected))return`Virheellinen tyyppi: odotettiin instanceof ${U.expected}, oli ${Q}`;return`Virheellinen tyyppi: odotettiin ${G}, oli ${Q}`}case"invalid_value":if(U.values.length===1)return`Virheellinen syöte: täytyy olla ${j(U.values[0])}`;return`Virheellinen valinta: täytyy olla yksi seuraavista: ${O(U.values,"|")}`;case"too_big":{let G=U.inclusive?"<=":"<",J=v(U.origin);if(J)return`Liian suuri: ${J.subject} täytyy olla ${G}${U.maximum.toString()} ${J.unit}`.trim();return`Liian suuri: arvon täytyy olla ${G}${U.maximum.toString()}`}case"too_small":{let G=U.inclusive?">=":">",J=v(U.origin);if(J)return`Liian pieni: ${J.subject} täytyy olla ${G}${U.minimum.toString()} ${J.unit}`.trim();return`Liian pieni: arvon täytyy olla ${G}${U.minimum.toString()}`}case"invalid_format":{let G=U;if(G.format==="starts_with")return`Virheellinen syöte: täytyy alkaa "${G.prefix}"`;if(G.format==="ends_with")return`Virheellinen syöte: täytyy loppua "${G.suffix}"`;if(G.format==="includes")return`Virheellinen syöte: täytyy sisältää "${G.includes}"`;if(G.format==="regex")return`Virheellinen syöte: täytyy vastata säännöllistä lauseketta ${G.pattern}`;return`Virheellinen ${D[G.format]??U.format}`}case"not_multiple_of":return`Virheellinen luku: täytyy olla luvun ${U.divisor} monikerta`;case"unrecognized_keys":return`${U.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${O(U.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 o8(){return{localeError:Aj()}}var wj=()=>{let $={string:{unit:"caractères",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"éléments",verb:"avoir"},set:{unit:"éléments",verb:"avoir"}};function v(U){return $[U]??null}let D={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"},X={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(U)=>{switch(U.code){case"invalid_type":{let G=X[U.expected]??U.expected,J=A(U.input),Q=X[J]??J;if(/^[A-Z]/.test(U.expected))return`Entrée invalide : instanceof ${U.expected} attendu, ${Q} reçu`;return`Entrée invalide : ${G} attendu, ${Q} reçu`}case"invalid_value":if(U.values.length===1)return`Entrée invalide : ${j(U.values[0])} attendu`;return`Option invalide : une valeur parmi ${O(U.values,"|")} attendue`;case"too_big":{let G=U.inclusive?"<=":"<",J=v(U.origin);if(J)return`Trop grand : ${X[U.origin]??"valeur"} doit ${J.verb} ${G}${U.maximum.toString()} ${J.unit??"élément(s)"}`;return`Trop grand : ${X[U.origin]??"valeur"} doit être ${G}${U.maximum.toString()}`}case"too_small":{let G=U.inclusive?">=":">",J=v(U.origin);if(J)return`Trop petit : ${X[U.origin]??"valeur"} doit ${J.verb} ${G}${U.minimum.toString()} ${J.unit}`;return`Trop petit : ${X[U.origin]??"valeur"} doit être ${G}${U.minimum.toString()}`}case"invalid_format":{let G=U;if(G.format==="starts_with")return`Chaîne invalide : doit commencer par "${G.prefix}"`;if(G.format==="ends_with")return`Chaîne invalide : doit se terminer par "${G.suffix}"`;if(G.format==="includes")return`Chaîne invalide : doit inclure "${G.includes}"`;if(G.format==="regex")return`Chaîne invalide : doit correspondre au modèle ${G.pattern}`;return`${D[G.format]??U.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit être un multiple de ${U.divisor}`;case"unrecognized_keys":return`Clé${U.keys.length>1?"s":""} non reconnue${U.keys.length>1?"s":""} : ${O(U.keys,", ")}`;case"invalid_key":return`Clé invalide dans ${U.origin}`;case"invalid_union":return"Entrée invalide";case"invalid_element":return`Valeur invalide dans ${U.origin}`;default:return"Entrée invalide"}}};function a8(){return{localeError:wj()}}var Mj=()=>{let $={string:{unit:"caractères",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"éléments",verb:"avoir"},set:{unit:"éléments",verb:"avoir"}};function v(U){return $[U]??null}let D={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"},X={nan:"NaN"};return(U)=>{switch(U.code){case"invalid_type":{let G=X[U.expected]??U.expected,J=A(U.input),Q=X[J]??J;if(/^[A-Z]/.test(U.expected))return`Entrée invalide : attendu instanceof ${U.expected}, reçu ${Q}`;return`Entrée invalide : attendu ${G}, reçu ${Q}`}case"invalid_value":if(U.values.length===1)return`Entrée invalide : attendu ${j(U.values[0])}`;return`Option invalide : attendu l'une des valeurs suivantes ${O(U.values,"|")}`;case"too_big":{let G=U.inclusive?"≤":"<",J=v(U.origin);if(J)return`Trop grand : attendu que ${U.origin??"la valeur"} ait ${G}${U.maximum.toString()} ${J.unit}`;return`Trop grand : attendu que ${U.origin??"la valeur"} soit ${G}${U.maximum.toString()}`}case"too_small":{let G=U.inclusive?"≥":">",J=v(U.origin);if(J)return`Trop petit : attendu que ${U.origin} ait ${G}${U.minimum.toString()} ${J.unit}`;return`Trop petit : attendu que ${U.origin} soit ${G}${U.minimum.toString()}`}case"invalid_format":{let G=U;if(G.format==="starts_with")return`Chaîne invalide : doit commencer par "${G.prefix}"`;if(G.format==="ends_with")return`Chaîne invalide : doit se terminer par "${G.suffix}"`;if(G.format==="includes")return`Chaîne invalide : doit inclure "${G.includes}"`;if(G.format==="regex")return`Chaîne invalide : doit correspondre au motif ${G.pattern}`;return`${D[G.format]??U.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit être un multiple de ${U.divisor}`;case"unrecognized_keys":return`Clé${U.keys.length>1?"s":""} non reconnue${U.keys.length>1?"s":""} : ${O(U.keys,", ")}`;case"invalid_key":return`Clé invalide dans ${U.origin}`;case"invalid_union":return"Entrée invalide";case"invalid_element":return`Valeur invalide dans ${U.origin}`;default:return"Entrée invalide"}}};function e8(){return{localeError:Mj()}}var Pj=()=>{let $={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"}},v={string:{unit:"תווים",shortLabel:"קצר",longLabel:"ארוך"},file:{unit:"בייטים",shortLabel:"קטן",longLabel:"גדול"},array:{unit:"פריטים",shortLabel:"קטן",longLabel:"גדול"},set:{unit:"פריטים",shortLabel:"קטן",longLabel:"גדול"},number:{unit:"",shortLabel:"קטן",longLabel:"גדול"}},D=(z)=>z?$[z]:void 0,X=(z)=>{let Y=D(z);if(Y)return Y.label;return z??$.unknown.label},U=(z)=>`ה${X(z)}`,G=(z)=>{return(D(z)?.gender??"m")==="f"?"צריכה להיות":"צריך להיות"},J=(z)=>{if(!z)return null;return v[z]??null},Q={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"}},W={nan:"NaN"};return(z)=>{switch(z.code){case"invalid_type":{let Y=z.expected,I=W[Y??""]??X(Y),V=A(z.input),K=W[V]??$[V]?.label??V;if(/^[A-Z]/.test(z.expected))return`קלט לא תקין: צריך להיות instanceof ${z.expected}, התקבל ${K}`;return`קלט לא תקין: צריך להיות ${I}, התקבל ${K}`}case"invalid_value":{if(z.values.length===1)return`ערך לא תקין: הערך חייב להיות ${j(z.values[0])}`;let Y=z.values.map((K)=>j(K));if(z.values.length===2)return`ערך לא תקין: האפשרויות המתאימות הן ${Y[0]} או ${Y[1]}`;let I=Y[Y.length-1];return`ערך לא תקין: האפשרויות המתאימות הן ${Y.slice(0,-1).join(", ")} או ${I}`}case"too_big":{let Y=J(z.origin),I=U(z.origin??"value");if(z.origin==="string")return`${Y?.longLabel??"ארוך"} מדי: ${I} צריכה להכיל ${z.maximum.toString()} ${Y?.unit??""} ${z.inclusive?"או פחות":"לכל היותר"}`.trim();if(z.origin==="number"){let L=z.inclusive?`קטן או שווה ל-${z.maximum}`:`קטן מ-${z.maximum}`;return`גדול מדי: ${I} צריך להיות ${L}`}if(z.origin==="array"||z.origin==="set"){let L=z.origin==="set"?"צריכה":"צריך",N=z.inclusive?`${z.maximum} ${Y?.unit??""} או פחות`:`פחות מ-${z.maximum} ${Y?.unit??""}`;return`גדול מדי: ${I} ${L} להכיל ${N}`.trim()}let V=z.inclusive?"<=":"<",K=G(z.origin??"value");if(Y?.unit)return`${Y.longLabel} מדי: ${I} ${K} ${V}${z.maximum.toString()} ${Y.unit}`;return`${Y?.longLabel??"גדול"} מדי: ${I} ${K} ${V}${z.maximum.toString()}`}case"too_small":{let Y=J(z.origin),I=U(z.origin??"value");if(z.origin==="string")return`${Y?.shortLabel??"קצר"} מדי: ${I} צריכה להכיל ${z.minimum.toString()} ${Y?.unit??""} ${z.inclusive?"או יותר":"לפחות"}`.trim();if(z.origin==="number"){let L=z.inclusive?`גדול או שווה ל-${z.minimum}`:`גדול מ-${z.minimum}`;return`קטן מדי: ${I} צריך להיות ${L}`}if(z.origin==="array"||z.origin==="set"){let L=z.origin==="set"?"צריכה":"צריך";if(z.minimum===1&&z.inclusive){let Z=z.origin==="set"?"לפחות פריט אחד":"לפחות פריט אחד";return`קטן מדי: ${I} ${L} להכיל ${Z}`}let N=z.inclusive?`${z.minimum} ${Y?.unit??""} או יותר`:`יותר מ-${z.minimum} ${Y?.unit??""}`;return`קטן מדי: ${I} ${L} להכיל ${N}`.trim()}let V=z.inclusive?">=":">",K=G(z.origin??"value");if(Y?.unit)return`${Y.shortLabel} מדי: ${I} ${K} ${V}${z.minimum.toString()} ${Y.unit}`;return`${Y?.shortLabel??"קטן"} מדי: ${I} ${K} ${V}${z.minimum.toString()}`}case"invalid_format":{let Y=z;if(Y.format==="starts_with")return`המחרוזת חייבת להתחיל ב "${Y.prefix}"`;if(Y.format==="ends_with")return`המחרוזת חייבת להסתיים ב "${Y.suffix}"`;if(Y.format==="includes")return`המחרוזת חייבת לכלול "${Y.includes}"`;if(Y.format==="regex")return`המחרוזת חייבת להתאים לתבנית ${Y.pattern}`;let I=Q[Y.format],V=I?.label??Y.format,L=(I?.gender??"m")==="f"?"תקינה":"תקין";return`${V} לא ${L}`}case"not_multiple_of":return`מספר לא תקין: חייב להיות מכפלה של ${z.divisor}`;case"unrecognized_keys":return`מפתח${z.keys.length>1?"ות":""} לא מזוה${z.keys.length>1?"ים":"ה"}: ${O(z.keys,", ")}`;case"invalid_key":return"שדה לא תקין באובייקט";case"invalid_union":return"קלט לא תקין";case"invalid_element":return`ערך לא תקין ב${U(z.origin??"array")}`;default:return"קלט לא תקין"}}};function s8(){return{localeError:Pj()}}var bj=()=>{let $={string:{unit:"znakova",verb:"imati"},file:{unit:"bajtova",verb:"imati"},array:{unit:"stavki",verb:"imati"},set:{unit:"stavki",verb:"imati"}};function v(U){return $[U]??null}let D={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"},X={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(U)=>{switch(U.code){case"invalid_type":{let G=X[U.expected]??U.expected,J=A(U.input),Q=X[J]??J;if(/^[A-Z]/.test(U.expected))return`Neispravan unos: očekuje se instanceof ${U.expected}, a primljeno je ${Q}`;return`Neispravan unos: očekuje se ${G}, a primljeno je ${Q}`}case"invalid_value":if(U.values.length===1)return`Neispravna vrijednost: očekivano ${j(U.values[0])}`;return`Neispravna opcija: očekivano jedno od ${O(U.values,"|")}`;case"too_big":{let G=U.inclusive?"<=":"<",J=v(U.origin),Q=X[U.origin]??U.origin;if(J)return`Preveliko: očekivano da ${Q??"vrijednost"} ima ${G}${U.maximum.toString()} ${J.unit??"elemenata"}`;return`Preveliko: očekivano da ${Q??"vrijednost"} bude ${G}${U.maximum.toString()}`}case"too_small":{let G=U.inclusive?">=":">",J=v(U.origin),Q=X[U.origin]??U.origin;if(J)return`Premalo: očekivano da ${Q} ima ${G}${U.minimum.toString()} ${J.unit}`;return`Premalo: očekivano da ${Q} bude ${G}${U.minimum.toString()}`}case"invalid_format":{let G=U;if(G.format==="starts_with")return`Neispravan tekst: mora započinjati s "${G.prefix}"`;if(G.format==="ends_with")return`Neispravan tekst: mora završavati s "${G.suffix}"`;if(G.format==="includes")return`Neispravan tekst: mora sadržavati "${G.includes}"`;if(G.format==="regex")return`Neispravan tekst: mora odgovarati uzorku ${G.pattern}`;return`Neispravna ${D[G.format]??U.format}`}case"not_multiple_of":return`Neispravan broj: mora biti višekratnik od ${U.divisor}`;case"unrecognized_keys":return`Neprepoznat${U.keys.length>1?"i ključevi":" ključ"}: ${O(U.keys,", ")}`;case"invalid_key":return`Neispravan ključ u ${X[U.origin]??U.origin}`;case"invalid_union":return"Neispravan unos";case"invalid_element":return`Neispravna vrijednost u ${X[U.origin]??U.origin}`;default:return"Neispravan unos"}}};function $Q(){return{localeError:bj()}}var qj=()=>{let $={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}};function v(U){return $[U]??null}let D={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"},X={nan:"NaN",number:"szám",array:"tömb"};return(U)=>{switch(U.code){case"invalid_type":{let G=X[U.expected]??U.expected,J=A(U.input),Q=X[J]??J;if(/^[A-Z]/.test(U.expected))return`Érvénytelen bemenet: a várt érték instanceof ${U.expected}, a kapott érték ${Q}`;return`Érvénytelen bemenet: a várt érték ${G}, a kapott érték ${Q}`}case"invalid_value":if(U.values.length===1)return`Érvénytelen bemenet: a várt érték ${j(U.values[0])}`;return`Érvénytelen opció: valamelyik érték várt ${O(U.values,"|")}`;case"too_big":{let G=U.inclusive?"<=":"<",J=v(U.origin);if(J)return`Túl nagy: ${U.origin??"érték"} mérete túl nagy ${G}${U.maximum.toString()} ${J.unit??"elem"}`;return`Túl nagy: a bemeneti érték ${U.origin??"érték"} túl nagy: ${G}${U.maximum.toString()}`}case"too_small":{let G=U.inclusive?">=":">",J=v(U.origin);if(J)return`Túl kicsi: a bemeneti érték ${U.origin} mérete túl kicsi ${G}${U.minimum.toString()} ${J.unit}`;return`Túl kicsi: a bemeneti érték ${U.origin} túl kicsi ${G}${U.minimum.toString()}`}case"invalid_format":{let G=U;if(G.format==="starts_with")return`Érvénytelen string: "${G.prefix}" értékkel kell kezdődnie`;if(G.format==="ends_with")return`Érvénytelen string: "${G.suffix}" értékkel kell végződnie`;if(G.format==="includes")return`Érvénytelen string: "${G.includes}" értéket kell tartalmaznia`;if(G.format==="regex")return`Érvénytelen string: ${G.pattern} mintának kell megfelelnie`;return`Érvénytelen ${D[G.format]??U.format}`}case"not_multiple_of":return`Érvénytelen szám: ${U.divisor} többszörösének kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${U.keys.length>1?"s":""}: ${O(U.keys,", ")}`;case"invalid_key":return`Érvénytelen kulcs ${U.origin}`;case"invalid_union":return"Érvénytelen bemenet";case"invalid_element":return`Érvénytelen érték: ${U.origin}`;default:return"Érvénytelen bemenet"}}};function vQ(){return{localeError:qj()}}function sY($,v,D){return Math.abs($)===1?v:D}function r6($){if(!$)return"";let v=["ա","ե","ը","ի","ո","ու","օ"],D=$[$.length-1];return $+(v.includes(D)?"ն":"ը")}var Sj=()=>{let $={string:{unit:{one:"նշան",many:"նշաններ"},verb:"ունենալ"},file:{unit:{one:"բայթ",many:"բայթեր"},verb:"ունենալ"},array:{unit:{one:"տարր",many:"տարրեր"},verb:"ունենալ"},set:{unit:{one:"տարր",many:"տարրեր"},verb:"ունենալ"}};function v(U){return $[U]??null}let D={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:"մուտք"},X={nan:"NaN",number:"թիվ",array:"զանգված"};return(U)=>{switch(U.code){case"invalid_type":{let G=X[U.expected]??U.expected,J=A(U.input),Q=X[J]??J;if(/^[A-Z]/.test(U.expected))return`Սխալ մուտքագրում․ սպասվում էր instanceof ${U.expected}, ստացվել է ${Q}`;return`Սխալ մուտքագրում․ սպասվում էր ${G}, ստացվել է ${Q}`}case"invalid_value":if(U.values.length===1)return`Սխալ մուտքագրում․ սպասվում էր ${j(U.values[1])}`;return`Սխալ տարբերակ․ սպասվում էր հետևյալներից մեկը՝ ${O(U.values,"|")}`;case"too_big":{let G=U.inclusive?"<=":"<",J=v(U.origin);if(J){let Q=Number(U.maximum),W=sY(Q,J.unit.one,J.unit.many);return`Չափազանց մեծ արժեք․ սպասվում է, որ ${r6(U.origin??"արժեք")} կունենա ${G}${U.maximum.toString()} ${W}`}return`Չափազանց մեծ արժեք․ սպասվում է, որ ${r6(U.origin??"արժեք")} լինի ${G}${U.maximum.toString()}`}case"too_small":{let G=U.inclusive?">=":">",J=v(U.origin);if(J){let Q=Number(U.minimum),W=sY(Q,J.unit.one,J.unit.many);return`Չափազանց փոքր արժեք․ սպասվում է, որ ${r6(U.origin)} կունենա ${G}${U.minimum.toString()} ${W}`}return`Չափազանց փոքր արժեք․ սպասվում է, որ ${r6(U.origin)} լինի ${G}${U.minimum.toString()}`}case"invalid_format":{let G=U;if(G.format==="starts_with")return`Սխալ տող․ պետք է սկսվի "${G.prefix}"-ով`;if(G.format==="ends_with")return`Սխալ տող․ պետք է ավարտվի "${G.suffix}"-ով`;if(G.format==="includes")return`Սխալ տող․ պետք է պարունակի "${G.includes}"`;if(G.format==="regex")return`Սխալ տող․ պետք է համապատասխանի ${G.pattern} ձևաչափին`;return`Սխալ ${D[G.format]??U.format}`}case"not_multiple_of":return`Սխալ թիվ․ պետք է բազմապատիկ լինի ${U.divisor}-ի`;case"unrecognized_keys":return`Չճանաչված բանալի${U.keys.length>1?"ներ":""}. ${O(U.keys,", ")}`;case"invalid_key":return`Սխալ բանալի ${r6(U.origin)}-ում`;case"invalid_union":return"Սխալ մուտքագրում";case"invalid_element":return`Սխալ արժեք ${r6(U.origin)}-ում`;default:return"Սխալ մուտքագրում"}}};function UQ(){return{localeError:Sj()}}var kj=()=>{let $={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}};function v(U){return $[U]??null}let D={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"},X={nan:"NaN"};return(U)=>{switch(U.code){case"invalid_type":{let G=X[U.expected]??U.expected,J=A(U.input),Q=X[J]??J;if(/^[A-Z]/.test(U.expected))return`Input tidak valid: diharapkan instanceof ${U.expected}, diterima ${Q}`;return`Input tidak valid: diharapkan ${G}, diterima ${Q}`}case"invalid_value":if(U.values.length===1)return`Input tidak valid: diharapkan ${j(U.values[0])}`;return`Pilihan tidak valid: diharapkan salah satu dari ${O(U.values,"|")}`;case"too_big":{let G=U.inclusive?"<=":"<",J=v(U.origin);if(J)return`Terlalu besar: diharapkan ${U.origin??"value"} memiliki ${G}${U.maximum.toString()} ${J.unit??"elemen"}`;return`Terlalu besar: diharapkan ${U.origin??"value"} menjadi ${G}${U.maximum.toString()}`}case"too_small":{let G=U.inclusive?">=":">",J=v(U.origin);if(J)return`Terlalu kecil: diharapkan ${U.origin} memiliki ${G}${U.minimum.toString()} ${J.unit}`;return`Terlalu kecil: diharapkan ${U.origin} menjadi ${G}${U.minimum.toString()}`}case"invalid_format":{let G=U;if(G.format==="starts_with")return`String tidak valid: harus dimulai dengan "${G.prefix}"`;if(G.format==="ends_with")return`String tidak valid: harus berakhir dengan "${G.suffix}"`;if(G.format==="includes")return`String tidak valid: harus menyertakan "${G.includes}"`;if(G.format==="regex")return`String tidak valid: harus sesuai pola ${G.pattern}`;return`${D[G.format]??U.format} tidak valid`}case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${U.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${U.keys.length>1?"s":""}: ${O(U.keys,", ")}`;case"invalid_key":return`Kunci tidak valid di ${U.origin}`;case"invalid_union":return"Input tidak valid";case"invalid_element":return`Nilai tidak valid di ${U.origin}`;default:return"Input tidak valid"}}};function DQ(){return{localeError:kj()}}var Ej=()=>{let $={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 v(U){return $[U]??null}let D={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"},X={nan:"NaN",number:"númer",array:"fylki"};return(U)=>{switch(U.code){case"invalid_type":{let G=X[U.expected]??U.expected,J=A(U.input),Q=X[J]??J;if(/^[A-Z]/.test(U.expected))return`Rangt gildi: Þú slóst inn ${Q} þar sem á að vera instanceof ${U.expected}`;return`Rangt gildi: Þú slóst inn ${Q} þar sem á að vera ${G}`}case"invalid_value":if(U.values.length===1)return`Rangt gildi: gert ráð fyrir ${j(U.values[0])}`;return`Ógilt val: má vera eitt af eftirfarandi ${O(U.values,"|")}`;case"too_big":{let G=U.inclusive?"<=":"<",J=v(U.origin);if(J)return`Of stórt: gert er ráð fyrir að ${U.origin??"gildi"} hafi ${G}${U.maximum.toString()} ${J.unit??"hluti"}`;return`Of stórt: gert er ráð fyrir að ${U.origin??"gildi"} sé ${G}${U.maximum.toString()}`}case"too_small":{let G=U.inclusive?">=":">",J=v(U.origin);if(J)return`Of lítið: gert er ráð fyrir að ${U.origin} hafi ${G}${U.minimum.toString()} ${J.unit}`;return`Of lítið: gert er ráð fyrir að ${U.origin} sé ${G}${U.minimum.toString()}`}case"invalid_format":{let G=U;if(G.format==="starts_with")return`Ógildur strengur: verður að byrja á "${G.prefix}"`;if(G.format==="ends_with")return`Ógildur strengur: verður að enda á "${G.suffix}"`;if(G.format==="includes")return`Ógildur strengur: verður að innihalda "${G.includes}"`;if(G.format==="regex")return`Ógildur strengur: verður að fylgja mynstri ${G.pattern}`;return`Rangt ${D[G.format]??U.format}`}case"not_multiple_of":return`Röng tala: verður að vera margfeldi af ${U.divisor}`;case"unrecognized_keys":return`Óþekkt ${U.keys.length>1?"ir lyklar":"ur lykill"}: ${O(U.keys,", ")}`;case"invalid_key":return`Rangur lykill í ${U.origin}`;case"invalid_union":return"Rangt gildi";case"invalid_element":return`Rangt gildi í ${U.origin}`;default:return"Rangt gildi"}}};function XQ(){return{localeError:Ej()}}var Tj=()=>{let $={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}};function v(U){return $[U]??null}let D={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"},X={nan:"NaN",number:"numero",array:"vettore"};return(U)=>{switch(U.code){case"invalid_type":{let G=X[U.expected]??U.expected,J=A(U.input),Q=X[J]??J;if(/^[A-Z]/.test(U.expected))return`Input non valido: atteso instanceof ${U.expected}, ricevuto ${Q}`;return`Input non valido: atteso ${G}, ricevuto ${Q}`}case"invalid_value":if(U.values.length===1)return`Input non valido: atteso ${j(U.values[0])}`;return`Opzione non valida: atteso uno tra ${O(U.values,"|")}`;case"too_big":{let G=U.inclusive?"<=":"<",J=v(U.origin);if(J)return`Troppo grande: ${U.origin??"valore"} deve avere ${G}${U.maximum.toString()} ${J.unit??"elementi"}`;return`Troppo grande: ${U.origin??"valore"} deve essere ${G}${U.maximum.toString()}`}case"too_small":{let G=U.inclusive?">=":">",J=v(U.origin);if(J)return`Troppo piccolo: ${U.origin} deve avere ${G}${U.minimum.toString()} ${J.unit}`;return`Troppo piccolo: ${U.origin} deve essere ${G}${U.minimum.toString()}`}case"invalid_format":{let G=U;if(G.format==="starts_with")return`Stringa non valida: deve iniziare con "${G.prefix}"`;if(G.format==="ends_with")return`Stringa non valida: deve terminare con "${G.suffix}"`;if(G.format==="includes")return`Stringa non valida: deve includere "${G.includes}"`;if(G.format==="regex")return`Stringa non valida: deve corrispondere al pattern ${G.pattern}`;return`Input non valido: ${D[G.format]??U.format}`}case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${U.divisor}`;case"unrecognized_keys":return`Chiav${U.keys.length>1?"i":"e"} non riconosciut${U.keys.length>1?"e":"a"}: ${O(U.keys,", ")}`;case"invalid_key":return`Chiave non valida in ${U.origin}`;case"invalid_union":return"Input non valido";case"invalid_element":return`Valore non valido in ${U.origin}`;default:return"Input non valido"}}};function GQ(){return{localeError:Tj()}}var Rj=()=>{let $={string:{unit:"文字",verb:"である"},file:{unit:"バイト",verb:"である"},array:{unit:"要素",verb:"である"},set:{unit:"要素",verb:"である"}};function v(U){return $[U]??null}let D={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:"入力値"},X={nan:"NaN",number:"数値",array:"配列"};return(U)=>{switch(U.code){case"invalid_type":{let G=X[U.expected]??U.expected,J=A(U.input),Q=X[J]??J;if(/^[A-Z]/.test(U.expected))return`無効な入力: instanceof ${U.expected}が期待されましたが、${Q}が入力されました`;return`無効な入力: ${G}が期待されましたが、${Q}が入力されました`}case"invalid_value":if(U.values.length===1)return`無効な入力: ${j(U.values[0])}が期待されました`;return`無効な選択: ${O(U.values,"、")}のいずれかである必要があります`;case"too_big":{let G=U.inclusive?"以下である":"より小さい",J=v(U.origin);if(J)return`大きすぎる値: ${U.origin??"値"}は${U.maximum.toString()}${J.unit??"要素"}${G}必要があります`;return`大きすぎる値: ${U.origin??"値"}は${U.maximum.toString()}${G}必要があります`}case"too_small":{let G=U.inclusive?"以上である":"より大きい",J=v(U.origin);if(J)return`小さすぎる値: ${U.origin}は${U.minimum.toString()}${J.unit}${G}必要があります`;return`小さすぎる値: ${U.origin}は${U.minimum.toString()}${G}必要があります`}case"invalid_format":{let G=U;if(G.format==="starts_with")return`無効な文字列: "${G.prefix}"で始まる必要があります`;if(G.format==="ends_with")return`無効な文字列: "${G.suffix}"で終わる必要があります`;if(G.format==="includes")return`無効な文字列: "${G.includes}"を含む必要があります`;if(G.format==="regex")return`無効な文字列: パターン${G.pattern}に一致する必要があります`;return`無効な${D[G.format]??U.format}`}case"not_multiple_of":return`無効な数値: ${U.divisor}の倍数である必要があります`;case"unrecognized_keys":return`認識されていないキー${U.keys.length>1?"群":""}: ${O(U.keys,"、")}`;case"invalid_key":return`${U.origin}内の無効なキー`;case"invalid_union":return"無効な入力";case"invalid_element":return`${U.origin}内の無効な値`;default:return"無効な入力"}}};function JQ(){return{localeError:Rj()}}var gj=()=>{let $={string:{unit:"სიმბოლო",verb:"უნდა შეიცავდეს"},file:{unit:"ბაიტი",verb:"უნდა შეიცავდეს"},array:{unit:"ელემენტი",verb:"უნდა შეიცავდეს"},set:{unit:"ელემენტი",verb:"უნდა შეიცავდეს"}};function v(U){return $[U]??null}let D={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:"შეყვანა"},X={nan:"NaN",number:"რიცხვი",string:"ველი",boolean:"ბულეანი",function:"ფუნქცია",array:"მასივი"};return(U)=>{switch(U.code){case"invalid_type":{let G=X[U.expected]??U.expected,J=A(U.input),Q=X[J]??J;if(/^[A-Z]/.test(U.expected))return`არასწორი შეყვანა: მოსალოდნელი instanceof ${U.expected}, მიღებული ${Q}`;return`არასწორი შეყვანა: მოსალოდნელი ${G}, მიღებული ${Q}`}case"invalid_value":if(U.values.length===1)return`არასწორი შეყვანა: მოსალოდნელი ${j(U.values[0])}`;return`არასწორი ვარიანტი: მოსალოდნელია ერთ-ერთი ${O(U.values,"|")}-დან`;case"too_big":{let G=U.inclusive?"<=":"<",J=v(U.origin);if(J)return`ზედმეტად დიდი: მოსალოდნელი ${U.origin??"მნიშვნელობა"} ${J.verb} ${G}${U.maximum.toString()} ${J.unit}`;return`ზედმეტად დიდი: მოსალოდნელი ${U.origin??"მნიშვნელობა"} იყოს ${G}${U.maximum.toString()}`}case"too_small":{let G=U.inclusive?">=":">",J=v(U.origin);if(J)return`ზედმეტად პატარა: მოსალოდნელი ${U.origin} ${J.verb} ${G}${U.minimum.toString()} ${J.unit}`;return`ზედმეტად პატარა: მოსალოდნელი ${U.origin} იყოს ${G}${U.minimum.toString()}`}case"invalid_format":{let G=U;if(G.format==="starts_with")return`არასწორი ველი: უნდა იწყებოდეს "${G.prefix}"-ით`;if(G.format==="ends_with")return`არასწორი ველი: უნდა მთავრდებოდეს "${G.suffix}"-ით`;if(G.format==="includes")return`არასწორი ველი: უნდა შეიცავდეს "${G.includes}"-ს`;if(G.format==="regex")return`არასწორი ველი: უნდა შეესაბამებოდეს შაბლონს ${G.pattern}`;return`არასწორი ${D[G.format]??U.format}`}case"not_multiple_of":return`არასწორი რიცხვი: უნდა იყოს ${U.divisor}-ის ჯერადი`;case"unrecognized_keys":return`უცნობი გასაღებ${U.keys.length>1?"ები":"ი"}: ${O(U.keys,", ")}`;case"invalid_key":return`არასწორი გასაღები ${U.origin}-ში`;case"invalid_union":return"არასწორი შეყვანა";case"invalid_element":return`არასწორი მნიშვნელობა ${U.origin}-ში`;default:return"არასწორი შეყვანა"}}};function QQ(){return{localeError:gj()}}var Cj=()=>{let $={string:{unit:"តួអក្សរ",verb:"គួរមាន"},file:{unit:"បៃ",verb:"គួរមាន"},array:{unit:"ធាតុ",verb:"គួរមាន"},set:{unit:"ធាតុ",verb:"គួរមាន"}};function v(U){return $[U]??null}let D={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:"ទិន្នន័យបញ្ចូល"},X={nan:"NaN",number:"លេខ",array:"អារេ (Array)",null:"គ្មានតម្លៃ (null)"};return(U)=>{switch(U.code){case"invalid_type":{let G=X[U.expected]??U.expected,J=A(U.input),Q=X[J]??J;if(/^[A-Z]/.test(U.expected))return`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ instanceof ${U.expected} ប៉ុន្តែទទួលបាន ${Q}`;return`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${G} ប៉ុន្តែទទួលបាន ${Q}`}case"invalid_value":if(U.values.length===1)return`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${j(U.values[0])}`;return`ជម្រើសមិនត្រឹមត្រូវ៖ ត្រូវជាមួយក្នុងចំណោម ${O(U.values,"|")}`;case"too_big":{let G=U.inclusive?"<=":"<",J=v(U.origin);if(J)return`ធំពេក៖ ត្រូវការ ${U.origin??"តម្លៃ"} ${G} ${U.maximum.toString()} ${J.unit??"ធាតុ"}`;return`ធំពេក៖ ត្រូវការ ${U.origin??"តម្លៃ"} ${G} ${U.maximum.toString()}`}case"too_small":{let G=U.inclusive?">=":">",J=v(U.origin);if(J)return`តូចពេក៖ ត្រូវការ ${U.origin} ${G} ${U.minimum.toString()} ${J.unit}`;return`តូចពេក៖ ត្រូវការ ${U.origin} ${G} ${U.minimum.toString()}`}case"invalid_format":{let G=U;if(G.format==="starts_with")return`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវចាប់ផ្តើមដោយ "${G.prefix}"`;if(G.format==="ends_with")return`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវបញ្ចប់ដោយ "${G.suffix}"`;if(G.format==="includes")return`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវមាន "${G.includes}"`;if(G.format==="regex")return`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវតែផ្គូផ្គងនឹងទម្រង់ដែលបានកំណត់ ${G.pattern}`;return`មិនត្រឹមត្រូវ៖ ${D[G.format]??U.format}`}case"not_multiple_of":return`លេខមិនត្រឹមត្រូវ៖ ត្រូវតែជាពហុគុណនៃ ${U.divisor}`;case"unrecognized_keys":return`រកឃើញសោមិនស្គាល់៖ ${O(U.keys,", ")}`;case"invalid_key":return`សោមិនត្រឹមត្រូវនៅក្នុង ${U.origin}`;case"invalid_union":return"ទិន្នន័យមិនត្រឹមត្រូវ";case"invalid_element":return`ទិន្នន័យមិនត្រឹមត្រូវនៅក្នុង ${U.origin}`;default:return"ទិន្នន័យមិនត្រឹមត្រូវ"}}};function Zv(){return{localeError:Cj()}}function WQ(){return Zv()}var uj=()=>{let $={string:{unit:"문자",verb:"to have"},file:{unit:"바이트",verb:"to have"},array:{unit:"개",verb:"to have"},set:{unit:"개",verb:"to have"}};function v(U){return $[U]??null}let D={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:"입력"},X={nan:"NaN"};return(U)=>{switch(U.code){case"invalid_type":{let G=X[U.expected]??U.expected,J=A(U.input),Q=X[J]??J;if(/^[A-Z]/.test(U.expected))return`잘못된 입력: 예상 타입은 instanceof ${U.expected}, 받은 타입은 ${Q}입니다`;return`잘못된 입력: 예상 타입은 ${G}, 받은 타입은 ${Q}입니다`}case"invalid_value":if(U.values.length===1)return`잘못된 입력: 값은 ${j(U.values[0])} 이어야 합니다`;return`잘못된 옵션: ${O(U.values,"또는 ")} 중 하나여야 합니다`;case"too_big":{let G=U.inclusive?"이하":"미만",J=G==="미만"?"이어야 합니다":"여야 합니다",Q=v(U.origin),W=Q?.unit??"요소";if(Q)return`${U.origin??"값"}이 너무 큽니다: ${U.maximum.toString()}${W} ${G}${J}`;return`${U.origin??"값"}이 너무 큽니다: ${U.maximum.toString()} ${G}${J}`}case"too_small":{let G=U.inclusive?"이상":"초과",J=G==="이상"?"이어야 합니다":"여야 합니다",Q=v(U.origin),W=Q?.unit??"요소";if(Q)return`${U.origin??"값"}이 너무 작습니다: ${U.minimum.toString()}${W} ${G}${J}`;return`${U.origin??"값"}이 너무 작습니다: ${U.minimum.toString()} ${G}${J}`}case"invalid_format":{let G=U;if(G.format==="starts_with")return`잘못된 문자열: "${G.prefix}"(으)로 시작해야 합니다`;if(G.format==="ends_with")return`잘못된 문자열: "${G.suffix}"(으)로 끝나야 합니다`;if(G.format==="includes")return`잘못된 문자열: "${G.includes}"을(를) 포함해야 합니다`;if(G.format==="regex")return`잘못된 문자열: 정규식 ${G.pattern} 패턴과 일치해야 합니다`;return`잘못된 ${D[G.format]??U.format}`}case"not_multiple_of":return`잘못된 숫자: ${U.divisor}의 배수여야 합니다`;case"unrecognized_keys":return`인식할 수 없는 키: ${O(U.keys,", ")}`;case"invalid_key":return`잘못된 키: ${U.origin}`;case"invalid_union":return"잘못된 입력";case"invalid_element":return`잘못된 값: ${U.origin}`;default:return"잘못된 입력"}}};function zQ(){return{localeError:uj()}}var Ov=($)=>{return $.charAt(0).toUpperCase()+$.slice(1)};function $I($){let v=Math.abs($),D=v%10,X=v%100;if(X>=11&&X<=19||D===0)return"many";if(D===1)return"one";return"few"}var xj=()=>{let $={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 v(U,G,J,Q){let W=$[U]??null;if(W===null)return W;return{unit:W.unit[G],verb:W.verb[Q][J?"inclusive":"notInclusive"]}}let D={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"},X={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(U)=>{switch(U.code){case"invalid_type":{let G=X[U.expected]??U.expected,J=A(U.input),Q=X[J]??J;if(/^[A-Z]/.test(U.expected))return`Gautas tipas ${Q}, o tikėtasi - instanceof ${U.expected}`;return`Gautas tipas ${Q}, o tikėtasi - ${G}`}case"invalid_value":if(U.values.length===1)return`Privalo būti ${j(U.values[0])}`;return`Privalo būti vienas iš ${O(U.values,"|")} pasirinkimų`;case"too_big":{let G=X[U.origin]??U.origin,J=v(U.origin,$I(Number(U.maximum)),U.inclusive??!1,"smaller");if(J?.verb)return`${Ov(G??U.origin??"reikšmė")} ${J.verb} ${U.maximum.toString()} ${J.unit??"elementų"}`;let Q=U.inclusive?"ne didesnis kaip":"mažesnis kaip";return`${Ov(G??U.origin??"reikšmė")} turi būti ${Q} ${U.maximum.toString()} ${J?.unit}`}case"too_small":{let G=X[U.origin]??U.origin,J=v(U.origin,$I(Number(U.minimum)),U.inclusive??!1,"bigger");if(J?.verb)return`${Ov(G??U.origin??"reikšmė")} ${J.verb} ${U.minimum.toString()} ${J.unit??"elementų"}`;let Q=U.inclusive?"ne mažesnis kaip":"didesnis kaip";return`${Ov(G??U.origin??"reikšmė")} turi būti ${Q} ${U.minimum.toString()} ${J?.unit}`}case"invalid_format":{let G=U;if(G.format==="starts_with")return`Eilutė privalo prasidėti "${G.prefix}"`;if(G.format==="ends_with")return`Eilutė privalo pasibaigti "${G.suffix}"`;if(G.format==="includes")return`Eilutė privalo įtraukti "${G.includes}"`;if(G.format==="regex")return`Eilutė privalo atitikti ${G.pattern}`;return`Neteisingas ${D[G.format]??U.format}`}case"not_multiple_of":return`Skaičius privalo būti ${U.divisor} kartotinis.`;case"unrecognized_keys":return`Neatpažint${U.keys.length>1?"i":"as"} rakt${U.keys.length>1?"ai":"as"}: ${O(U.keys,", ")}`;case"invalid_key":return"Rastas klaidingas raktas";case"invalid_union":return"Klaidinga įvestis";case"invalid_element":{let G=X[U.origin]??U.origin;return`${Ov(G??U.origin??"reikšmė")} turi klaidingą įvestį`}default:return"Klaidinga įvestis"}}};function YQ(){return{localeError:xj()}}var fj=()=>{let $={string:{unit:"знаци",verb:"да имаат"},file:{unit:"бајти",verb:"да имаат"},array:{unit:"ставки",verb:"да имаат"},set:{unit:"ставки",verb:"да имаат"}};function v(U){return $[U]??null}let D={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:"внес"},X={nan:"NaN",number:"број",array:"низа"};return(U)=>{switch(U.code){case"invalid_type":{let G=X[U.expected]??U.expected,J=A(U.input),Q=X[J]??J;if(/^[A-Z]/.test(U.expected))return`Грешен внес: се очекува instanceof ${U.expected}, примено ${Q}`;return`Грешен внес: се очекува ${G}, примено ${Q}`}case"invalid_value":if(U.values.length===1)return`Invalid input: expected ${j(U.values[0])}`;return`Грешана опција: се очекува една ${O(U.values,"|")}`;case"too_big":{let G=U.inclusive?"<=":"<",J=v(U.origin);if(J)return`Премногу голем: се очекува ${U.origin??"вредноста"} да има ${G}${U.maximum.toString()} ${J.unit??"елементи"}`;return`Премногу голем: се очекува ${U.origin??"вредноста"} да биде ${G}${U.maximum.toString()}`}case"too_small":{let G=U.inclusive?">=":">",J=v(U.origin);if(J)return`Премногу мал: се очекува ${U.origin} да има ${G}${U.minimum.toString()} ${J.unit}`;return`Премногу мал: се очекува ${U.origin} да биде ${G}${U.minimum.toString()}`}case"invalid_format":{let G=U;if(G.format==="starts_with")return`Неважечка низа: мора да започнува со "${G.prefix}"`;if(G.format==="ends_with")return`Неважечка низа: мора да завршува со "${G.suffix}"`;if(G.format==="includes")return`Неважечка низа: мора да вклучува "${G.includes}"`;if(G.format==="regex")return`Неважечка низа: мора да одгоара на патернот ${G.pattern}`;return`Invalid ${D[G.format]??U.format}`}case"not_multiple_of":return`Грешен број: мора да биде делив со ${U.divisor}`;case"unrecognized_keys":return`${U.keys.length>1?"Непрепознаени клучеви":"Непрепознаен клуч"}: ${O(U.keys,", ")}`;case"invalid_key":return`Грешен клуч во ${U.origin}`;case"invalid_union":return"Грешен внес";case"invalid_element":return`Грешна вредност во ${U.origin}`;default:return"Грешен внес"}}};function IQ(){return{localeError:fj()}}var _j=()=>{let $={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}};function v(U){return $[U]??null}let D={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"},X={nan:"NaN",number:"nombor"};return(U)=>{switch(U.code){case"invalid_type":{let G=X[U.expected]??U.expected,J=A(U.input),Q=X[J]??J;if(/^[A-Z]/.test(U.expected))return`Input tidak sah: dijangka instanceof ${U.expected}, diterima ${Q}`;return`Input tidak sah: dijangka ${G}, diterima ${Q}`}case"invalid_value":if(U.values.length===1)return`Input tidak sah: dijangka ${j(U.values[0])}`;return`Pilihan tidak sah: dijangka salah satu daripada ${O(U.values,"|")}`;case"too_big":{let G=U.inclusive?"<=":"<",J=v(U.origin);if(J)return`Terlalu besar: dijangka ${U.origin??"nilai"} ${J.verb} ${G}${U.maximum.toString()} ${J.unit??"elemen"}`;return`Terlalu besar: dijangka ${U.origin??"nilai"} adalah ${G}${U.maximum.toString()}`}case"too_small":{let G=U.inclusive?">=":">",J=v(U.origin);if(J)return`Terlalu kecil: dijangka ${U.origin} ${J.verb} ${G}${U.minimum.toString()} ${J.unit}`;return`Terlalu kecil: dijangka ${U.origin} adalah ${G}${U.minimum.toString()}`}case"invalid_format":{let G=U;if(G.format==="starts_with")return`String tidak sah: mesti bermula dengan "${G.prefix}"`;if(G.format==="ends_with")return`String tidak sah: mesti berakhir dengan "${G.suffix}"`;if(G.format==="includes")return`String tidak sah: mesti mengandungi "${G.includes}"`;if(G.format==="regex")return`String tidak sah: mesti sepadan dengan corak ${G.pattern}`;return`${D[G.format]??U.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${U.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${O(U.keys,", ")}`;case"invalid_key":return`Kunci tidak sah dalam ${U.origin}`;case"invalid_union":return"Input tidak sah";case"invalid_element":return`Nilai tidak sah dalam ${U.origin}`;default:return"Input tidak sah"}}};function VQ(){return{localeError:_j()}}var ij=()=>{let $={string:{unit:"tekens",verb:"heeft"},file:{unit:"bytes",verb:"heeft"},array:{unit:"elementen",verb:"heeft"},set:{unit:"elementen",verb:"heeft"}};function v(U){return $[U]??null}let D={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"},X={nan:"NaN",number:"getal"};return(U)=>{switch(U.code){case"invalid_type":{let G=X[U.expected]??U.expected,J=A(U.input),Q=X[J]??J;if(/^[A-Z]/.test(U.expected))return`Ongeldige invoer: verwacht instanceof ${U.expected}, ontving ${Q}`;return`Ongeldige invoer: verwacht ${G}, ontving ${Q}`}case"invalid_value":if(U.values.length===1)return`Ongeldige invoer: verwacht ${j(U.values[0])}`;return`Ongeldige optie: verwacht één van ${O(U.values,"|")}`;case"too_big":{let G=U.inclusive?"<=":"<",J=v(U.origin),Q=U.origin==="date"?"laat":U.origin==="string"?"lang":"groot";if(J)return`Te ${Q}: verwacht dat ${U.origin??"waarde"} ${G}${U.maximum.toString()} ${J.unit??"elementen"} ${J.verb}`;return`Te ${Q}: verwacht dat ${U.origin??"waarde"} ${G}${U.maximum.toString()} is`}case"too_small":{let G=U.inclusive?">=":">",J=v(U.origin),Q=U.origin==="date"?"vroeg":U.origin==="string"?"kort":"klein";if(J)return`Te ${Q}: verwacht dat ${U.origin} ${G}${U.minimum.toString()} ${J.unit} ${J.verb}`;return`Te ${Q}: verwacht dat ${U.origin} ${G}${U.minimum.toString()} is`}case"invalid_format":{let G=U;if(G.format==="starts_with")return`Ongeldige tekst: moet met "${G.prefix}" beginnen`;if(G.format==="ends_with")return`Ongeldige tekst: moet op "${G.suffix}" eindigen`;if(G.format==="includes")return`Ongeldige tekst: moet "${G.includes}" bevatten`;if(G.format==="regex")return`Ongeldige tekst: moet overeenkomen met patroon ${G.pattern}`;return`Ongeldig: ${D[G.format]??U.format}`}case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${U.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${U.keys.length>1?"s":""}: ${O(U.keys,", ")}`;case"invalid_key":return`Ongeldige key in ${U.origin}`;case"invalid_union":return"Ongeldige invoer";case"invalid_element":return`Ongeldige waarde in ${U.origin}`;default:return"Ongeldige invoer"}}};function KQ(){return{localeError:ij()}}var yj=()=>{let $={string:{unit:"tegn",verb:"å ha"},file:{unit:"bytes",verb:"å ha"},array:{unit:"elementer",verb:"å inneholde"},set:{unit:"elementer",verb:"å inneholde"}};function v(U){return $[U]??null}let D={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"},X={nan:"NaN",number:"tall",array:"liste"};return(U)=>{switch(U.code){case"invalid_type":{let G=X[U.expected]??U.expected,J=A(U.input),Q=X[J]??J;if(/^[A-Z]/.test(U.expected))return`Ugyldig input: forventet instanceof ${U.expected}, fikk ${Q}`;return`Ugyldig input: forventet ${G}, fikk ${Q}`}case"invalid_value":if(U.values.length===1)return`Ugyldig verdi: forventet ${j(U.values[0])}`;return`Ugyldig valg: forventet en av ${O(U.values,"|")}`;case"too_big":{let G=U.inclusive?"<=":"<",J=v(U.origin);if(J)return`For stor(t): forventet ${U.origin??"value"} til å ha ${G}${U.maximum.toString()} ${J.unit??"elementer"}`;return`For stor(t): forventet ${U.origin??"value"} til å ha ${G}${U.maximum.toString()}`}case"too_small":{let G=U.inclusive?">=":">",J=v(U.origin);if(J)return`For lite(n): forventet ${U.origin} til å ha ${G}${U.minimum.toString()} ${J.unit}`;return`For lite(n): forventet ${U.origin} til å ha ${G}${U.minimum.toString()}`}case"invalid_format":{let G=U;if(G.format==="starts_with")return`Ugyldig streng: må starte med "${G.prefix}"`;if(G.format==="ends_with")return`Ugyldig streng: må ende med "${G.suffix}"`;if(G.format==="includes")return`Ugyldig streng: må inneholde "${G.includes}"`;if(G.format==="regex")return`Ugyldig streng: må matche mønsteret ${G.pattern}`;return`Ugyldig ${D[G.format]??U.format}`}case"not_multiple_of":return`Ugyldig tall: må være et multiplum av ${U.divisor}`;case"unrecognized_keys":return`${U.keys.length>1?"Ukjente nøkler":"Ukjent nøkkel"}: ${O(U.keys,", ")}`;case"invalid_key":return`Ugyldig nøkkel i ${U.origin}`;case"invalid_union":return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${U.origin}`;default:return"Ugyldig input"}}};function LQ(){return{localeError:yj()}}var nj=()=>{let $={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 v(U){return $[U]??null}let D={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"},X={nan:"NaN",number:"numara",array:"saf",null:"gayb"};return(U)=>{switch(U.code){case"invalid_type":{let G=X[U.expected]??U.expected,J=A(U.input),Q=X[J]??J;if(/^[A-Z]/.test(U.expected))return`Fâsit giren: umulan instanceof ${U.expected}, alınan ${Q}`;return`Fâsit giren: umulan ${G}, alınan ${Q}`}case"invalid_value":if(U.values.length===1)return`Fâsit giren: umulan ${j(U.values[0])}`;return`Fâsit tercih: mûteberler ${O(U.values,"|")}`;case"too_big":{let G=U.inclusive?"<=":"<",J=v(U.origin);if(J)return`Fazla büyük: ${U.origin??"value"}, ${G}${U.maximum.toString()} ${J.unit??"elements"} sahip olmalıydı.`;return`Fazla büyük: ${U.origin??"value"}, ${G}${U.maximum.toString()} olmalıydı.`}case"too_small":{let G=U.inclusive?">=":">",J=v(U.origin);if(J)return`Fazla küçük: ${U.origin}, ${G}${U.minimum.toString()} ${J.unit} sahip olmalıydı.`;return`Fazla küçük: ${U.origin}, ${G}${U.minimum.toString()} olmalıydı.`}case"invalid_format":{let G=U;if(G.format==="starts_with")return`Fâsit metin: "${G.prefix}" ile başlamalı.`;if(G.format==="ends_with")return`Fâsit metin: "${G.suffix}" ile bitmeli.`;if(G.format==="includes")return`Fâsit metin: "${G.includes}" ihtivâ etmeli.`;if(G.format==="regex")return`Fâsit metin: ${G.pattern} nakşına uymalı.`;return`Fâsit ${D[G.format]??U.format}`}case"not_multiple_of":return`Fâsit sayı: ${U.divisor} katı olmalıydı.`;case"unrecognized_keys":return`Tanınmayan anahtar ${U.keys.length>1?"s":""}: ${O(U.keys,", ")}`;case"invalid_key":return`${U.origin} için tanınmayan anahtar var.`;case"invalid_union":return"Giren tanınamadı.";case"invalid_element":return`${U.origin} için tanınmayan kıymet var.`;default:return"Kıymet tanınamadı."}}};function BQ(){return{localeError:nj()}}var lj=()=>{let $={string:{unit:"توکي",verb:"ولري"},file:{unit:"بایټس",verb:"ولري"},array:{unit:"توکي",verb:"ولري"},set:{unit:"توکي",verb:"ولري"}};function v(U){return $[U]??null}let D={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:"ورودي"},X={nan:"NaN",number:"عدد",array:"ارې"};return(U)=>{switch(U.code){case"invalid_type":{let G=X[U.expected]??U.expected,J=A(U.input),Q=X[J]??J;if(/^[A-Z]/.test(U.expected))return`ناسم ورودي: باید instanceof ${U.expected} وای, مګر ${Q} ترلاسه شو`;return`ناسم ورودي: باید ${G} وای, مګر ${Q} ترلاسه شو`}case"invalid_value":if(U.values.length===1)return`ناسم ورودي: باید ${j(U.values[0])} وای`;return`ناسم انتخاب: باید یو له ${O(U.values,"|")} څخه وای`;case"too_big":{let G=U.inclusive?"<=":"<",J=v(U.origin);if(J)return`ډیر لوی: ${U.origin??"ارزښت"} باید ${G}${U.maximum.toString()} ${J.unit??"عنصرونه"} ولري`;return`ډیر لوی: ${U.origin??"ارزښت"} باید ${G}${U.maximum.toString()} وي`}case"too_small":{let G=U.inclusive?">=":">",J=v(U.origin);if(J)return`ډیر کوچنی: ${U.origin} باید ${G}${U.minimum.toString()} ${J.unit} ولري`;return`ډیر کوچنی: ${U.origin} باید ${G}${U.minimum.toString()} وي`}case"invalid_format":{let G=U;if(G.format==="starts_with")return`ناسم متن: باید د "${G.prefix}" سره پیل شي`;if(G.format==="ends_with")return`ناسم متن: باید د "${G.suffix}" سره پای ته ورسيږي`;if(G.format==="includes")return`ناسم متن: باید "${G.includes}" ولري`;if(G.format==="regex")return`ناسم متن: باید د ${G.pattern} سره مطابقت ولري`;return`${D[G.format]??U.format} ناسم دی`}case"not_multiple_of":return`ناسم عدد: باید د ${U.divisor} مضرب وي`;case"unrecognized_keys":return`ناسم ${U.keys.length>1?"کلیډونه":"کلیډ"}: ${O(U.keys,", ")}`;case"invalid_key":return`ناسم کلیډ په ${U.origin} کې`;case"invalid_union":return"ناسمه ورودي";case"invalid_element":return`ناسم عنصر په ${U.origin} کې`;default:return"ناسمه ورودي"}}};function NQ(){return{localeError:lj()}}var hj=()=>{let $={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 v(U){return $[U]??null}let D={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"},X={nan:"NaN",number:"liczba",array:"tablica"};return(U)=>{switch(U.code){case"invalid_type":{let G=X[U.expected]??U.expected,J=A(U.input),Q=X[J]??J;if(/^[A-Z]/.test(U.expected))return`Nieprawidłowe dane wejściowe: oczekiwano instanceof ${U.expected}, otrzymano ${Q}`;return`Nieprawidłowe dane wejściowe: oczekiwano ${G}, otrzymano ${Q}`}case"invalid_value":if(U.values.length===1)return`Nieprawidłowe dane wejściowe: oczekiwano ${j(U.values[0])}`;return`Nieprawidłowa opcja: oczekiwano jednej z wartości ${O(U.values,"|")}`;case"too_big":{let G=U.inclusive?"<=":"<",J=v(U.origin);if(J)return`Za duża wartość: oczekiwano, że ${U.origin??"wartość"} będzie mieć ${G}${U.maximum.toString()} ${J.unit??"elementów"}`;return`Zbyt duż(y/a/e): oczekiwano, że ${U.origin??"wartość"} będzie wynosić ${G}${U.maximum.toString()}`}case"too_small":{let G=U.inclusive?">=":">",J=v(U.origin);if(J)return`Za mała wartość: oczekiwano, że ${U.origin??"wartość"} będzie mieć ${G}${U.minimum.toString()} ${J.unit??"elementów"}`;return`Zbyt mał(y/a/e): oczekiwano, że ${U.origin??"wartość"} będzie wynosić ${G}${U.minimum.toString()}`}case"invalid_format":{let G=U;if(G.format==="starts_with")return`Nieprawidłowy ciąg znaków: musi zaczynać się od "${G.prefix}"`;if(G.format==="ends_with")return`Nieprawidłowy ciąg znaków: musi kończyć się na "${G.suffix}"`;if(G.format==="includes")return`Nieprawidłowy ciąg znaków: musi zawierać "${G.includes}"`;if(G.format==="regex")return`Nieprawidłowy ciąg znaków: musi odpowiadać wzorcowi ${G.pattern}`;return`Nieprawidłow(y/a/e) ${D[G.format]??U.format}`}case"not_multiple_of":return`Nieprawidłowa liczba: musi być wielokrotnością ${U.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${U.keys.length>1?"s":""}: ${O(U.keys,", ")}`;case"invalid_key":return`Nieprawidłowy klucz w ${U.origin}`;case"invalid_union":return"Nieprawidłowe dane wejściowe";case"invalid_element":return`Nieprawidłowa wartość w ${U.origin}`;default:return"Nieprawidłowe dane wejściowe"}}};function ZQ(){return{localeError:hj()}}var mj=()=>{let $={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function v(U){return $[U]??null}let D={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"},X={nan:"NaN",number:"número",null:"nulo"};return(U)=>{switch(U.code){case"invalid_type":{let G=X[U.expected]??U.expected,J=A(U.input),Q=X[J]??J;if(/^[A-Z]/.test(U.expected))return`Tipo inválido: esperado instanceof ${U.expected}, recebido ${Q}`;return`Tipo inválido: esperado ${G}, recebido ${Q}`}case"invalid_value":if(U.values.length===1)return`Entrada inválida: esperado ${j(U.values[0])}`;return`Opção inválida: esperada uma das ${O(U.values,"|")}`;case"too_big":{let G=U.inclusive?"<=":"<",J=v(U.origin);if(J)return`Muito grande: esperado que ${U.origin??"valor"} tivesse ${G}${U.maximum.toString()} ${J.unit??"elementos"}`;return`Muito grande: esperado que ${U.origin??"valor"} fosse ${G}${U.maximum.toString()}`}case"too_small":{let G=U.inclusive?">=":">",J=v(U.origin);if(J)return`Muito pequeno: esperado que ${U.origin} tivesse ${G}${U.minimum.toString()} ${J.unit}`;return`Muito pequeno: esperado que ${U.origin} fosse ${G}${U.minimum.toString()}`}case"invalid_format":{let G=U;if(G.format==="starts_with")return`Texto inválido: deve começar com "${G.prefix}"`;if(G.format==="ends_with")return`Texto inválido: deve terminar com "${G.suffix}"`;if(G.format==="includes")return`Texto inválido: deve incluir "${G.includes}"`;if(G.format==="regex")return`Texto inválido: deve corresponder ao padrão ${G.pattern}`;return`${D[G.format]??U.format} inválido`}case"not_multiple_of":return`Número inválido: deve ser múltiplo de ${U.divisor}`;case"unrecognized_keys":return`Chave${U.keys.length>1?"s":""} desconhecida${U.keys.length>1?"s":""}: ${O(U.keys,", ")}`;case"invalid_key":return`Chave inválida em ${U.origin}`;case"invalid_union":return"Entrada inválida";case"invalid_element":return`Valor inválido em ${U.origin}`;default:return"Campo inválido"}}};function OQ(){return{localeError:mj()}}var cj=()=>{let $={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 v(U){return $[U]??null}let D={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"},X={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(U)=>{switch(U.code){case"invalid_type":{let G=X[U.expected]??U.expected,J=A(U.input),Q=X[J]??J;return`Intrare invalidă: așteptat ${G}, primit ${Q}`}case"invalid_value":if(U.values.length===1)return`Intrare invalidă: așteptat ${j(U.values[0])}`;return`Opțiune invalidă: așteptat una dintre ${O(U.values,"|")}`;case"too_big":{let G=U.inclusive?"<=":"<",J=v(U.origin);if(J)return`Prea mare: așteptat ca ${U.origin??"valoarea"} ${J.verb} ${G}${U.maximum.toString()} ${J.unit??"elemente"}`;return`Prea mare: așteptat ca ${U.origin??"valoarea"} să fie ${G}${U.maximum.toString()}`}case"too_small":{let G=U.inclusive?">=":">",J=v(U.origin);if(J)return`Prea mic: așteptat ca ${U.origin} ${J.verb} ${G}${U.minimum.toString()} ${J.unit}`;return`Prea mic: așteptat ca ${U.origin} să fie ${G}${U.minimum.toString()}`}case"invalid_format":{let G=U;if(G.format==="starts_with")return`Șir invalid: trebuie să înceapă cu "${G.prefix}"`;if(G.format==="ends_with")return`Șir invalid: trebuie să se termine cu "${G.suffix}"`;if(G.format==="includes")return`Șir invalid: trebuie să includă "${G.includes}"`;if(G.format==="regex")return`Șir invalid: trebuie să se potrivească cu modelul ${G.pattern}`;return`Format invalid: ${D[G.format]??U.format}`}case"not_multiple_of":return`Număr invalid: trebuie să fie multiplu de ${U.divisor}`;case"unrecognized_keys":return`Chei nerecunoscute: ${O(U.keys,", ")}`;case"invalid_key":return`Cheie invalidă în ${U.origin}`;case"invalid_union":return"Intrare invalidă";case"invalid_element":return`Valoare invalidă în ${U.origin}`;default:return"Intrare invalidă"}}};function HQ(){return{localeError:cj()}}function vI($,v,D,X){let U=Math.abs($),G=U%10,J=U%100;if(J>=11&&J<=19)return X;if(G===1)return v;if(G>=2&&G<=4)return D;return X}var dj=()=>{let $={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 v(U){return $[U]??null}let D={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:"ввод"},X={nan:"NaN",number:"число",array:"массив"};return(U)=>{switch(U.code){case"invalid_type":{let G=X[U.expected]??U.expected,J=A(U.input),Q=X[J]??J;if(/^[A-Z]/.test(U.expected))return`Неверный ввод: ожидалось instanceof ${U.expected}, получено ${Q}`;return`Неверный ввод: ожидалось ${G}, получено ${Q}`}case"invalid_value":if(U.values.length===1)return`Неверный ввод: ожидалось ${j(U.values[0])}`;return`Неверный вариант: ожидалось одно из ${O(U.values,"|")}`;case"too_big":{let G=U.inclusive?"<=":"<",J=v(U.origin);if(J){let Q=Number(U.maximum),W=vI(Q,J.unit.one,J.unit.few,J.unit.many);return`Слишком большое значение: ожидалось, что ${U.origin??"значение"} будет иметь ${G}${U.maximum.toString()} ${W}`}return`Слишком большое значение: ожидалось, что ${U.origin??"значение"} будет ${G}${U.maximum.toString()}`}case"too_small":{let G=U.inclusive?">=":">",J=v(U.origin);if(J){let Q=Number(U.minimum),W=vI(Q,J.unit.one,J.unit.few,J.unit.many);return`Слишком маленькое значение: ожидалось, что ${U.origin} будет иметь ${G}${U.minimum.toString()} ${W}`}return`Слишком маленькое значение: ожидалось, что ${U.origin} будет ${G}${U.minimum.toString()}`}case"invalid_format":{let G=U;if(G.format==="starts_with")return`Неверная строка: должна начинаться с "${G.prefix}"`;if(G.format==="ends_with")return`Неверная строка: должна заканчиваться на "${G.suffix}"`;if(G.format==="includes")return`Неверная строка: должна содержать "${G.includes}"`;if(G.format==="regex")return`Неверная строка: должна соответствовать шаблону ${G.pattern}`;return`Неверный ${D[G.format]??U.format}`}case"not_multiple_of":return`Неверное число: должно быть кратным ${U.divisor}`;case"unrecognized_keys":return`Нераспознанн${U.keys.length>1?"ые":"ый"} ключ${U.keys.length>1?"и":""}: ${O(U.keys,", ")}`;case"invalid_key":return`Неверный ключ в ${U.origin}`;case"invalid_union":return"Неверные входные данные";case"invalid_element":return`Неверное значение в ${U.origin}`;default:return"Неверные входные данные"}}};function FQ(){return{localeError:dj()}}var rj=()=>{let $={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}};function v(U){return $[U]??null}let D={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"},X={nan:"NaN",number:"število",array:"tabela"};return(U)=>{switch(U.code){case"invalid_type":{let G=X[U.expected]??U.expected,J=A(U.input),Q=X[J]??J;if(/^[A-Z]/.test(U.expected))return`Neveljaven vnos: pričakovano instanceof ${U.expected}, prejeto ${Q}`;return`Neveljaven vnos: pričakovano ${G}, prejeto ${Q}`}case"invalid_value":if(U.values.length===1)return`Neveljaven vnos: pričakovano ${j(U.values[0])}`;return`Neveljavna možnost: pričakovano eno izmed ${O(U.values,"|")}`;case"too_big":{let G=U.inclusive?"<=":"<",J=v(U.origin);if(J)return`Preveliko: pričakovano, da bo ${U.origin??"vrednost"} imelo ${G}${U.maximum.toString()} ${J.unit??"elementov"}`;return`Preveliko: pričakovano, da bo ${U.origin??"vrednost"} ${G}${U.maximum.toString()}`}case"too_small":{let G=U.inclusive?">=":">",J=v(U.origin);if(J)return`Premajhno: pričakovano, da bo ${U.origin} imelo ${G}${U.minimum.toString()} ${J.unit}`;return`Premajhno: pričakovano, da bo ${U.origin} ${G}${U.minimum.toString()}`}case"invalid_format":{let G=U;if(G.format==="starts_with")return`Neveljaven niz: mora se začeti z "${G.prefix}"`;if(G.format==="ends_with")return`Neveljaven niz: mora se končati z "${G.suffix}"`;if(G.format==="includes")return`Neveljaven niz: mora vsebovati "${G.includes}"`;if(G.format==="regex")return`Neveljaven niz: mora ustrezati vzorcu ${G.pattern}`;return`Neveljaven ${D[G.format]??U.format}`}case"not_multiple_of":return`Neveljavno število: mora biti večkratnik ${U.divisor}`;case"unrecognized_keys":return`Neprepoznan${U.keys.length>1?"i ključi":" ključ"}: ${O(U.keys,", ")}`;case"invalid_key":return`Neveljaven ključ v ${U.origin}`;case"invalid_union":return"Neveljaven vnos";case"invalid_element":return`Neveljavna vrednost v ${U.origin}`;default:return"Neveljaven vnos"}}};function jQ(){return{localeError:rj()}}var pj=()=>{let $={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 v(U){return $[U]??null}let D={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"},X={nan:"NaN",number:"antal",array:"lista"};return(U)=>{switch(U.code){case"invalid_type":{let G=X[U.expected]??U.expected,J=A(U.input),Q=X[J]??J;if(/^[A-Z]/.test(U.expected))return`Ogiltig inmatning: förväntat instanceof ${U.expected}, fick ${Q}`;return`Ogiltig inmatning: förväntat ${G}, fick ${Q}`}case"invalid_value":if(U.values.length===1)return`Ogiltig inmatning: förväntat ${j(U.values[0])}`;return`Ogiltigt val: förväntade en av ${O(U.values,"|")}`;case"too_big":{let G=U.inclusive?"<=":"<",J=v(U.origin);if(J)return`För stor(t): förväntade ${U.origin??"värdet"} att ha ${G}${U.maximum.toString()} ${J.unit??"element"}`;return`För stor(t): förväntat ${U.origin??"värdet"} att ha ${G}${U.maximum.toString()}`}case"too_small":{let G=U.inclusive?">=":">",J=v(U.origin);if(J)return`För lite(t): förväntade ${U.origin??"värdet"} att ha ${G}${U.minimum.toString()} ${J.unit}`;return`För lite(t): förväntade ${U.origin??"värdet"} att ha ${G}${U.minimum.toString()}`}case"invalid_format":{let G=U;if(G.format==="starts_with")return`Ogiltig sträng: måste börja med "${G.prefix}"`;if(G.format==="ends_with")return`Ogiltig sträng: måste sluta med "${G.suffix}"`;if(G.format==="includes")return`Ogiltig sträng: måste innehålla "${G.includes}"`;if(G.format==="regex")return`Ogiltig sträng: måste matcha mönstret "${G.pattern}"`;return`Ogiltig(t) ${D[G.format]??U.format}`}case"not_multiple_of":return`Ogiltigt tal: måste vara en multipel av ${U.divisor}`;case"unrecognized_keys":return`${U.keys.length>1?"Okända nycklar":"Okänd nyckel"}: ${O(U.keys,", ")}`;case"invalid_key":return`Ogiltig nyckel i ${U.origin??"värdet"}`;case"invalid_union":return"Ogiltig input";case"invalid_element":return`Ogiltigt värde i ${U.origin??"värdet"}`;default:return"Ogiltig input"}}};function AQ(){return{localeError:pj()}}var tj=()=>{let $={string:{unit:"எழுத்துக்கள்",verb:"கொண்டிருக்க வேண்டும்"},file:{unit:"பைட்டுகள்",verb:"கொண்டிருக்க வேண்டும்"},array:{unit:"உறுப்புகள்",verb:"கொண்டிருக்க வேண்டும்"},set:{unit:"உறுப்புகள்",verb:"கொண்டிருக்க வேண்டும்"}};function v(U){return $[U]??null}let D={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"},X={nan:"NaN",number:"எண்",array:"அணி",null:"வெறுமை"};return(U)=>{switch(U.code){case"invalid_type":{let G=X[U.expected]??U.expected,J=A(U.input),Q=X[J]??J;if(/^[A-Z]/.test(U.expected))return`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது instanceof ${U.expected}, பெறப்பட்டது ${Q}`;return`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${G}, பெறப்பட்டது ${Q}`}case"invalid_value":if(U.values.length===1)return`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${j(U.values[0])}`;return`தவறான விருப்பம்: எதிர்பார்க்கப்பட்டது ${O(U.values,"|")} இல் ஒன்று`;case"too_big":{let G=U.inclusive?"<=":"<",J=v(U.origin);if(J)return`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${U.origin??"மதிப்பு"} ${G}${U.maximum.toString()} ${J.unit??"உறுப்புகள்"} ஆக இருக்க வேண்டும்`;return`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${U.origin??"மதிப்பு"} ${G}${U.maximum.toString()} ஆக இருக்க வேண்டும்`}case"too_small":{let G=U.inclusive?">=":">",J=v(U.origin);if(J)return`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${U.origin} ${G}${U.minimum.toString()} ${J.unit} ஆக இருக்க வேண்டும்`;return`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${U.origin} ${G}${U.minimum.toString()} ஆக இருக்க வேண்டும்`}case"invalid_format":{let G=U;if(G.format==="starts_with")return`தவறான சரம்: "${G.prefix}" இல் தொடங்க வேண்டும்`;if(G.format==="ends_with")return`தவறான சரம்: "${G.suffix}" இல் முடிவடைய வேண்டும்`;if(G.format==="includes")return`தவறான சரம்: "${G.includes}" ஐ உள்ளடக்க வேண்டும்`;if(G.format==="regex")return`தவறான சரம்: ${G.pattern} முறைபாட்டுடன் பொருந்த வேண்டும்`;return`தவறான ${D[G.format]??U.format}`}case"not_multiple_of":return`தவறான எண்: ${U.divisor} இன் பலமாக இருக்க வேண்டும்`;case"unrecognized_keys":return`அடையாளம் தெரியாத விசை${U.keys.length>1?"கள்":""}: ${O(U.keys,", ")}`;case"invalid_key":return`${U.origin} இல் தவறான விசை`;case"invalid_union":return"தவறான உள்ளீடு";case"invalid_element":return`${U.origin} இல் தவறான மதிப்பு`;default:return"தவறான உள்ளீடு"}}};function wQ(){return{localeError:tj()}}var oj=()=>{let $={string:{unit:"ตัวอักษร",verb:"ควรมี"},file:{unit:"ไบต์",verb:"ควรมี"},array:{unit:"รายการ",verb:"ควรมี"},set:{unit:"รายการ",verb:"ควรมี"}};function v(U){return $[U]??null}let D={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:"ข้อมูลที่ป้อน"},X={nan:"NaN",number:"ตัวเลข",array:"อาร์เรย์ (Array)",null:"ไม่มีค่า (null)"};return(U)=>{switch(U.code){case"invalid_type":{let G=X[U.expected]??U.expected,J=A(U.input),Q=X[J]??J;if(/^[A-Z]/.test(U.expected))return`ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น instanceof ${U.expected} แต่ได้รับ ${Q}`;return`ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น ${G} แต่ได้รับ ${Q}`}case"invalid_value":if(U.values.length===1)return`ค่าไม่ถูกต้อง: ควรเป็น ${j(U.values[0])}`;return`ตัวเลือกไม่ถูกต้อง: ควรเป็นหนึ่งใน ${O(U.values,"|")}`;case"too_big":{let G=U.inclusive?"ไม่เกิน":"น้อยกว่า",J=v(U.origin);if(J)return`เกินกำหนด: ${U.origin??"ค่า"} ควรมี${G} ${U.maximum.toString()} ${J.unit??"รายการ"}`;return`เกินกำหนด: ${U.origin??"ค่า"} ควรมี${G} ${U.maximum.toString()}`}case"too_small":{let G=U.inclusive?"อย่างน้อย":"มากกว่า",J=v(U.origin);if(J)return`น้อยกว่ากำหนด: ${U.origin} ควรมี${G} ${U.minimum.toString()} ${J.unit}`;return`น้อยกว่ากำหนด: ${U.origin} ควรมี${G} ${U.minimum.toString()}`}case"invalid_format":{let G=U;if(G.format==="starts_with")return`รูปแบบไม่ถูกต้อง: ข้อความต้องขึ้นต้นด้วย "${G.prefix}"`;if(G.format==="ends_with")return`รูปแบบไม่ถูกต้อง: ข้อความต้องลงท้ายด้วย "${G.suffix}"`;if(G.format==="includes")return`รูปแบบไม่ถูกต้อง: ข้อความต้องมี "${G.includes}" อยู่ในข้อความ`;if(G.format==="regex")return`รูปแบบไม่ถูกต้อง: ต้องตรงกับรูปแบบที่กำหนด ${G.pattern}`;return`รูปแบบไม่ถูกต้อง: ${D[G.format]??U.format}`}case"not_multiple_of":return`ตัวเลขไม่ถูกต้อง: ต้องเป็นจำนวนที่หารด้วย ${U.divisor} ได้ลงตัว`;case"unrecognized_keys":return`พบคีย์ที่ไม่รู้จัก: ${O(U.keys,", ")}`;case"invalid_key":return`คีย์ไม่ถูกต้องใน ${U.origin}`;case"invalid_union":return"ข้อมูลไม่ถูกต้อง: ไม่ตรงกับรูปแบบยูเนียนที่กำหนดไว้";case"invalid_element":return`ข้อมูลไม่ถูกต้องใน ${U.origin}`;default:return"ข้อมูลไม่ถูกต้อง"}}};function MQ(){return{localeError:oj()}}var aj=()=>{let $={string:{unit:"karakter",verb:"olmalı"},file:{unit:"bayt",verb:"olmalı"},array:{unit:"öğe",verb:"olmalı"},set:{unit:"öğe",verb:"olmalı"}};function v(U){return $[U]??null}let D={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"},X={nan:"NaN"};return(U)=>{switch(U.code){case"invalid_type":{let G=X[U.expected]??U.expected,J=A(U.input),Q=X[J]??J;if(/^[A-Z]/.test(U.expected))return`Geçersiz değer: beklenen instanceof ${U.expected}, alınan ${Q}`;return`Geçersiz değer: beklenen ${G}, alınan ${Q}`}case"invalid_value":if(U.values.length===1)return`Geçersiz değer: beklenen ${j(U.values[0])}`;return`Geçersiz seçenek: aşağıdakilerden biri olmalı: ${O(U.values,"|")}`;case"too_big":{let G=U.inclusive?"<=":"<",J=v(U.origin);if(J)return`Çok büyük: beklenen ${U.origin??"değer"} ${G}${U.maximum.toString()} ${J.unit??"öğe"}`;return`Çok büyük: beklenen ${U.origin??"değer"} ${G}${U.maximum.toString()}`}case"too_small":{let G=U.inclusive?">=":">",J=v(U.origin);if(J)return`Çok küçük: beklenen ${U.origin} ${G}${U.minimum.toString()} ${J.unit}`;return`Çok küçük: beklenen ${U.origin} ${G}${U.minimum.toString()}`}case"invalid_format":{let G=U;if(G.format==="starts_with")return`Geçersiz metin: "${G.prefix}" ile başlamalı`;if(G.format==="ends_with")return`Geçersiz metin: "${G.suffix}" ile bitmeli`;if(G.format==="includes")return`Geçersiz metin: "${G.includes}" içermeli`;if(G.format==="regex")return`Geçersiz metin: ${G.pattern} desenine uymalı`;return`Geçersiz ${D[G.format]??U.format}`}case"not_multiple_of":return`Geçersiz sayı: ${U.divisor} ile tam bölünebilmeli`;case"unrecognized_keys":return`Tanınmayan anahtar${U.keys.length>1?"lar":""}: ${O(U.keys,", ")}`;case"invalid_key":return`${U.origin} içinde geçersiz anahtar`;case"invalid_union":return"Geçersiz değer";case"invalid_element":return`${U.origin} içinde geçersiz değer`;default:return"Geçersiz değer"}}};function PQ(){return{localeError:aj()}}var ej=()=>{let $={string:{unit:"символів",verb:"матиме"},file:{unit:"байтів",verb:"матиме"},array:{unit:"елементів",verb:"матиме"},set:{unit:"елементів",verb:"матиме"}};function v(U){return $[U]??null}let D={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:"вхідні дані"},X={nan:"NaN",number:"число",array:"масив"};return(U)=>{switch(U.code){case"invalid_type":{let G=X[U.expected]??U.expected,J=A(U.input),Q=X[J]??J;if(/^[A-Z]/.test(U.expected))return`Неправильні вхідні дані: очікується instanceof ${U.expected}, отримано ${Q}`;return`Неправильні вхідні дані: очікується ${G}, отримано ${Q}`}case"invalid_value":if(U.values.length===1)return`Неправильні вхідні дані: очікується ${j(U.values[0])}`;return`Неправильна опція: очікується одне з ${O(U.values,"|")}`;case"too_big":{let G=U.inclusive?"<=":"<",J=v(U.origin);if(J)return`Занадто велике: очікується, що ${U.origin??"значення"} ${J.verb} ${G}${U.maximum.toString()} ${J.unit??"елементів"}`;return`Занадто велике: очікується, що ${U.origin??"значення"} буде ${G}${U.maximum.toString()}`}case"too_small":{let G=U.inclusive?">=":">",J=v(U.origin);if(J)return`Занадто мале: очікується, що ${U.origin} ${J.verb} ${G}${U.minimum.toString()} ${J.unit}`;return`Занадто мале: очікується, що ${U.origin} буде ${G}${U.minimum.toString()}`}case"invalid_format":{let G=U;if(G.format==="starts_with")return`Неправильний рядок: повинен починатися з "${G.prefix}"`;if(G.format==="ends_with")return`Неправильний рядок: повинен закінчуватися на "${G.suffix}"`;if(G.format==="includes")return`Неправильний рядок: повинен містити "${G.includes}"`;if(G.format==="regex")return`Неправильний рядок: повинен відповідати шаблону ${G.pattern}`;return`Неправильний ${D[G.format]??U.format}`}case"not_multiple_of":return`Неправильне число: повинно бути кратним ${U.divisor}`;case"unrecognized_keys":return`Нерозпізнаний ключ${U.keys.length>1?"і":""}: ${O(U.keys,", ")}`;case"invalid_key":return`Неправильний ключ у ${U.origin}`;case"invalid_union":return"Неправильні вхідні дані";case"invalid_element":return`Неправильне значення у ${U.origin}`;default:return"Неправильні вхідні дані"}}};function Hv(){return{localeError:ej()}}function bQ(){return Hv()}var sj=()=>{let $={string:{unit:"حروف",verb:"ہونا"},file:{unit:"بائٹس",verb:"ہونا"},array:{unit:"آئٹمز",verb:"ہونا"},set:{unit:"آئٹمز",verb:"ہونا"}};function v(U){return $[U]??null}let D={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:"ان پٹ"},X={nan:"NaN",number:"نمبر",array:"آرے",null:"نل"};return(U)=>{switch(U.code){case"invalid_type":{let G=X[U.expected]??U.expected,J=A(U.input),Q=X[J]??J;if(/^[A-Z]/.test(U.expected))return`غلط ان پٹ: instanceof ${U.expected} متوقع تھا، ${Q} موصول ہوا`;return`غلط ان پٹ: ${G} متوقع تھا، ${Q} موصول ہوا`}case"invalid_value":if(U.values.length===1)return`غلط ان پٹ: ${j(U.values[0])} متوقع تھا`;return`غلط آپشن: ${O(U.values,"|")} میں سے ایک متوقع تھا`;case"too_big":{let G=U.inclusive?"<=":"<",J=v(U.origin);if(J)return`بہت بڑا: ${U.origin??"ویلیو"} کے ${G}${U.maximum.toString()} ${J.unit??"عناصر"} ہونے متوقع تھے`;return`بہت بڑا: ${U.origin??"ویلیو"} کا ${G}${U.maximum.toString()} ہونا متوقع تھا`}case"too_small":{let G=U.inclusive?">=":">",J=v(U.origin);if(J)return`بہت چھوٹا: ${U.origin} کے ${G}${U.minimum.toString()} ${J.unit} ہونے متوقع تھے`;return`بہت چھوٹا: ${U.origin} کا ${G}${U.minimum.toString()} ہونا متوقع تھا`}case"invalid_format":{let G=U;if(G.format==="starts_with")return`غلط سٹرنگ: "${G.prefix}" سے شروع ہونا چاہیے`;if(G.format==="ends_with")return`غلط سٹرنگ: "${G.suffix}" پر ختم ہونا چاہیے`;if(G.format==="includes")return`غلط سٹرنگ: "${G.includes}" شامل ہونا چاہیے`;if(G.format==="regex")return`غلط سٹرنگ: پیٹرن ${G.pattern} سے میچ ہونا چاہیے`;return`غلط ${D[G.format]??U.format}`}case"not_multiple_of":return`غلط نمبر: ${U.divisor} کا مضاعف ہونا چاہیے`;case"unrecognized_keys":return`غیر تسلیم شدہ کی${U.keys.length>1?"ز":""}: ${O(U.keys,"، ")}`;case"invalid_key":return`${U.origin} میں غلط کی`;case"invalid_union":return"غلط ان پٹ";case"invalid_element":return`${U.origin} میں غلط ویلیو`;default:return"غلط ان پٹ"}}};function qQ(){return{localeError:sj()}}var $A=()=>{let $={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 v(U){return $[U]??null}let D={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"},X={nan:"NaN",number:"raqam",array:"massiv"};return(U)=>{switch(U.code){case"invalid_type":{let G=X[U.expected]??U.expected,J=A(U.input),Q=X[J]??J;if(/^[A-Z]/.test(U.expected))return`Noto‘g‘ri kirish: kutilgan instanceof ${U.expected}, qabul qilingan ${Q}`;return`Noto‘g‘ri kirish: kutilgan ${G}, qabul qilingan ${Q}`}case"invalid_value":if(U.values.length===1)return`Noto‘g‘ri kirish: kutilgan ${j(U.values[0])}`;return`Noto‘g‘ri variant: quyidagilardan biri kutilgan ${O(U.values,"|")}`;case"too_big":{let G=U.inclusive?"<=":"<",J=v(U.origin);if(J)return`Juda katta: kutilgan ${U.origin??"qiymat"} ${G}${U.maximum.toString()} ${J.unit} ${J.verb}`;return`Juda katta: kutilgan ${U.origin??"qiymat"} ${G}${U.maximum.toString()}`}case"too_small":{let G=U.inclusive?">=":">",J=v(U.origin);if(J)return`Juda kichik: kutilgan ${U.origin} ${G}${U.minimum.toString()} ${J.unit} ${J.verb}`;return`Juda kichik: kutilgan ${U.origin} ${G}${U.minimum.toString()}`}case"invalid_format":{let G=U;if(G.format==="starts_with")return`Noto‘g‘ri satr: "${G.prefix}" bilan boshlanishi kerak`;if(G.format==="ends_with")return`Noto‘g‘ri satr: "${G.suffix}" bilan tugashi kerak`;if(G.format==="includes")return`Noto‘g‘ri satr: "${G.includes}" ni o‘z ichiga olishi kerak`;if(G.format==="regex")return`Noto‘g‘ri satr: ${G.pattern} shabloniga mos kelishi kerak`;return`Noto‘g‘ri ${D[G.format]??U.format}`}case"not_multiple_of":return`Noto‘g‘ri raqam: ${U.divisor} ning karralisi bo‘lishi kerak`;case"unrecognized_keys":return`Noma’lum kalit${U.keys.length>1?"lar":""}: ${O(U.keys,", ")}`;case"invalid_key":return`${U.origin} dagi kalit noto‘g‘ri`;case"invalid_union":return"Noto‘g‘ri kirish";case"invalid_element":return`${U.origin} da noto‘g‘ri qiymat`;default:return"Noto‘g‘ri kirish"}}};function SQ(){return{localeError:$A()}}var vA=()=>{let $={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 v(U){return $[U]??null}let D={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"},X={nan:"NaN",number:"số",array:"mảng"};return(U)=>{switch(U.code){case"invalid_type":{let G=X[U.expected]??U.expected,J=A(U.input),Q=X[J]??J;if(/^[A-Z]/.test(U.expected))return`Đầu vào không hợp lệ: mong đợi instanceof ${U.expected}, nhận được ${Q}`;return`Đầu vào không hợp lệ: mong đợi ${G}, nhận được ${Q}`}case"invalid_value":if(U.values.length===1)return`Đầu vào không hợp lệ: mong đợi ${j(U.values[0])}`;return`Tùy chọn không hợp lệ: mong đợi một trong các giá trị ${O(U.values,"|")}`;case"too_big":{let G=U.inclusive?"<=":"<",J=v(U.origin);if(J)return`Quá lớn: mong đợi ${U.origin??"giá trị"} ${J.verb} ${G}${U.maximum.toString()} ${J.unit??"phần tử"}`;return`Quá lớn: mong đợi ${U.origin??"giá trị"} ${G}${U.maximum.toString()}`}case"too_small":{let G=U.inclusive?">=":">",J=v(U.origin);if(J)return`Quá nhỏ: mong đợi ${U.origin} ${J.verb} ${G}${U.minimum.toString()} ${J.unit}`;return`Quá nhỏ: mong đợi ${U.origin} ${G}${U.minimum.toString()}`}case"invalid_format":{let G=U;if(G.format==="starts_with")return`Chuỗi không hợp lệ: phải bắt đầu bằng "${G.prefix}"`;if(G.format==="ends_with")return`Chuỗi không hợp lệ: phải kết thúc bằng "${G.suffix}"`;if(G.format==="includes")return`Chuỗi không hợp lệ: phải bao gồm "${G.includes}"`;if(G.format==="regex")return`Chuỗi không hợp lệ: phải khớp với mẫu ${G.pattern}`;return`${D[G.format]??U.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 ${U.divisor}`;case"unrecognized_keys":return`Khóa không được nhận dạng: ${O(U.keys,", ")}`;case"invalid_key":return`Khóa không hợp lệ trong ${U.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 ${U.origin}`;default:return"Đầu vào không hợp lệ"}}};function kQ(){return{localeError:vA()}}var UA=()=>{let $={string:{unit:"字符",verb:"包含"},file:{unit:"字节",verb:"包含"},array:{unit:"项",verb:"包含"},set:{unit:"项",verb:"包含"}};function v(U){return $[U]??null}let D={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:"输入"},X={nan:"NaN",number:"数字",array:"数组",null:"空值(null)"};return(U)=>{switch(U.code){case"invalid_type":{let G=X[U.expected]??U.expected,J=A(U.input),Q=X[J]??J;if(/^[A-Z]/.test(U.expected))return`无效输入:期望 instanceof ${U.expected},实际接收 ${Q}`;return`无效输入:期望 ${G},实际接收 ${Q}`}case"invalid_value":if(U.values.length===1)return`无效输入:期望 ${j(U.values[0])}`;return`无效选项:期望以下之一 ${O(U.values,"|")}`;case"too_big":{let G=U.inclusive?"<=":"<",J=v(U.origin);if(J)return`数值过大:期望 ${U.origin??"值"} ${G}${U.maximum.toString()} ${J.unit??"个元素"}`;return`数值过大:期望 ${U.origin??"值"} ${G}${U.maximum.toString()}`}case"too_small":{let G=U.inclusive?">=":">",J=v(U.origin);if(J)return`数值过小:期望 ${U.origin} ${G}${U.minimum.toString()} ${J.unit}`;return`数值过小:期望 ${U.origin} ${G}${U.minimum.toString()}`}case"invalid_format":{let G=U;if(G.format==="starts_with")return`无效字符串:必须以 "${G.prefix}" 开头`;if(G.format==="ends_with")return`无效字符串:必须以 "${G.suffix}" 结尾`;if(G.format==="includes")return`无效字符串:必须包含 "${G.includes}"`;if(G.format==="regex")return`无效字符串:必须满足正则表达式 ${G.pattern}`;return`无效${D[G.format]??U.format}`}case"not_multiple_of":return`无效数字:必须是 ${U.divisor} 的倍数`;case"unrecognized_keys":return`出现未知的键(key): ${O(U.keys,", ")}`;case"invalid_key":return`${U.origin} 中的键(key)无效`;case"invalid_union":return"无效输入";case"invalid_element":return`${U.origin} 中包含无效值(value)`;default:return"无效输入"}}};function EQ(){return{localeError:UA()}}var DA=()=>{let $={string:{unit:"字元",verb:"擁有"},file:{unit:"位元組",verb:"擁有"},array:{unit:"項目",verb:"擁有"},set:{unit:"項目",verb:"擁有"}};function v(U){return $[U]??null}let D={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:"輸入"},X={nan:"NaN"};return(U)=>{switch(U.code){case"invalid_type":{let G=X[U.expected]??U.expected,J=A(U.input),Q=X[J]??J;if(/^[A-Z]/.test(U.expected))return`無效的輸入值:預期為 instanceof ${U.expected},但收到 ${Q}`;return`無效的輸入值:預期為 ${G},但收到 ${Q}`}case"invalid_value":if(U.values.length===1)return`無效的輸入值:預期為 ${j(U.values[0])}`;return`無效的選項:預期為以下其中之一 ${O(U.values,"|")}`;case"too_big":{let G=U.inclusive?"<=":"<",J=v(U.origin);if(J)return`數值過大:預期 ${U.origin??"值"} 應為 ${G}${U.maximum.toString()} ${J.unit??"個元素"}`;return`數值過大:預期 ${U.origin??"值"} 應為 ${G}${U.maximum.toString()}`}case"too_small":{let G=U.inclusive?">=":">",J=v(U.origin);if(J)return`數值過小:預期 ${U.origin} 應為 ${G}${U.minimum.toString()} ${J.unit}`;return`數值過小:預期 ${U.origin} 應為 ${G}${U.minimum.toString()}`}case"invalid_format":{let G=U;if(G.format==="starts_with")return`無效的字串:必須以 "${G.prefix}" 開頭`;if(G.format==="ends_with")return`無效的字串:必須以 "${G.suffix}" 結尾`;if(G.format==="includes")return`無效的字串:必須包含 "${G.includes}"`;if(G.format==="regex")return`無效的字串:必須符合格式 ${G.pattern}`;return`無效的 ${D[G.format]??U.format}`}case"not_multiple_of":return`無效的數字:必須為 ${U.divisor} 的倍數`;case"unrecognized_keys":return`無法識別的鍵值${U.keys.length>1?"們":""}:${O(U.keys,"、")}`;case"invalid_key":return`${U.origin} 中有無效的鍵值`;case"invalid_union":return"無效的輸入值";case"invalid_element":return`${U.origin} 中有無效的值`;default:return"無效的輸入值"}}};function TQ(){return{localeError:DA()}}var XA=()=>{let $={string:{unit:"àmi",verb:"ní"},file:{unit:"bytes",verb:"ní"},array:{unit:"nkan",verb:"ní"},set:{unit:"nkan",verb:"ní"}};function v(U){return $[U]??null}let D={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é"},X={nan:"NaN",number:"nọ́mbà",array:"akopọ"};return(U)=>{switch(U.code){case"invalid_type":{let G=X[U.expected]??U.expected,J=A(U.input),Q=X[J]??J;if(/^[A-Z]/.test(U.expected))return`Ìbáwọlé aṣìṣe: a ní láti fi instanceof ${U.expected}, àmọ̀ a rí ${Q}`;return`Ìbáwọlé aṣìṣe: a ní láti fi ${G}, àmọ̀ a rí ${Q}`}case"invalid_value":if(U.values.length===1)return`Ìbáwọlé aṣìṣe: a ní láti fi ${j(U.values[0])}`;return`Àṣàyàn aṣìṣe: yan ọ̀kan lára ${O(U.values,"|")}`;case"too_big":{let G=U.inclusive?"<=":"<",J=v(U.origin);if(J)return`Tó pọ̀ jù: a ní láti jẹ́ pé ${U.origin??"iye"} ${J.verb} ${G}${U.maximum} ${J.unit}`;return`Tó pọ̀ jù: a ní láti jẹ́ ${G}${U.maximum}`}case"too_small":{let G=U.inclusive?">=":">",J=v(U.origin);if(J)return`Kéré ju: a ní láti jẹ́ pé ${U.origin} ${J.verb} ${G}${U.minimum} ${J.unit}`;return`Kéré ju: a ní láti jẹ́ ${G}${U.minimum}`}case"invalid_format":{let G=U;if(G.format==="starts_with")return`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ bẹ̀rẹ̀ pẹ̀lú "${G.prefix}"`;if(G.format==="ends_with")return`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ parí pẹ̀lú "${G.suffix}"`;if(G.format==="includes")return`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ ní "${G.includes}"`;if(G.format==="regex")return`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ bá àpẹẹrẹ mu ${G.pattern}`;return`Aṣìṣe: ${D[G.format]??U.format}`}case"not_multiple_of":return`Nọ́mbà aṣìṣe: gbọ́dọ̀ jẹ́ èyà pípín ti ${U.divisor}`;case"unrecognized_keys":return`Bọtìnì àìmọ̀: ${O(U.keys,", ")}`;case"invalid_key":return`Bọtìnì aṣìṣe nínú ${U.origin}`;case"invalid_union":return"Ìbáwọlé aṣìṣe";case"invalid_element":return`Iye aṣìṣe nínú ${U.origin}`;default:return"Ìbáwọlé aṣìṣe"}}};function RQ(){return{localeError:XA()}}var UI,gQ=Symbol("ZodOutput"),CQ=Symbol("ZodInput");class uQ{constructor(){this._map=new WeakMap,this._idmap=new Map}add($,...v){let D=v[0];if(this._map.set($,D),D&&typeof D==="object"&&"id"in D)this._idmap.set(D.id,$);return this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove($){let v=this._map.get($);if(v&&typeof v==="object"&&"id"in v)this._idmap.delete(v.id);return this._map.delete($),this}get($){let v=$._zod.parent;if(v){let D={...this.get(v)??{}};delete D.id;let X={...D,...this._map.get($)};return Object.keys(X).length?X:void 0}return this._map.get($)}has($){return this._map.has($)}}function jU(){return new uQ}(UI=globalThis).__zod_globalRegistry??(UI.__zod_globalRegistry=jU());var A$=globalThis.__zod_globalRegistry;function xQ($,v){return new $({type:"string",...M(v)})}function fQ($,v){return new $({type:"string",coerce:!0,...M(v)})}function AU($,v){return new $({type:"string",format:"email",check:"string_format",abort:!1,...M(v)})}function jv($,v){return new $({type:"string",format:"guid",check:"string_format",abort:!1,...M(v)})}function wU($,v){return new $({type:"string",format:"uuid",check:"string_format",abort:!1,...M(v)})}function MU($,v){return new $({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...M(v)})}function PU($,v){return new $({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...M(v)})}function bU($,v){return new $({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...M(v)})}function Av($,v){return new $({type:"string",format:"url",check:"string_format",abort:!1,...M(v)})}function qU($,v){return new $({type:"string",format:"emoji",check:"string_format",abort:!1,...M(v)})}function SU($,v){return new $({type:"string",format:"nanoid",check:"string_format",abort:!1,...M(v)})}function kU($,v){return new $({type:"string",format:"cuid",check:"string_format",abort:!1,...M(v)})}function EU($,v){return new $({type:"string",format:"cuid2",check:"string_format",abort:!1,...M(v)})}function TU($,v){return new $({type:"string",format:"ulid",check:"string_format",abort:!1,...M(v)})}function RU($,v){return new $({type:"string",format:"xid",check:"string_format",abort:!1,...M(v)})}function gU($,v){return new $({type:"string",format:"ksuid",check:"string_format",abort:!1,...M(v)})}function CU($,v){return new $({type:"string",format:"ipv4",check:"string_format",abort:!1,...M(v)})}function uU($,v){return new $({type:"string",format:"ipv6",check:"string_format",abort:!1,...M(v)})}function _Q($,v){return new $({type:"string",format:"mac",check:"string_format",abort:!1,...M(v)})}function xU($,v){return new $({type:"string",format:"cidrv4",check:"string_format",abort:!1,...M(v)})}function fU($,v){return new $({type:"string",format:"cidrv6",check:"string_format",abort:!1,...M(v)})}function _U($,v){return new $({type:"string",format:"base64",check:"string_format",abort:!1,...M(v)})}function iU($,v){return new $({type:"string",format:"base64url",check:"string_format",abort:!1,...M(v)})}function yU($,v){return new $({type:"string",format:"e164",check:"string_format",abort:!1,...M(v)})}function nU($,v){return new $({type:"string",format:"jwt",check:"string_format",abort:!1,...M(v)})}var iQ={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function yQ($,v){return new $({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...M(v)})}function nQ($,v){return new $({type:"string",format:"date",check:"string_format",...M(v)})}function lQ($,v){return new $({type:"string",format:"time",check:"string_format",precision:null,...M(v)})}function hQ($,v){return new $({type:"string",format:"duration",check:"string_format",...M(v)})}function mQ($,v){return new $({type:"number",checks:[],...M(v)})}function cQ($,v){return new $({type:"number",coerce:!0,checks:[],...M(v)})}function dQ($,v){return new $({type:"number",check:"number_format",abort:!1,format:"safeint",...M(v)})}function rQ($,v){return new $({type:"number",check:"number_format",abort:!1,format:"float32",...M(v)})}function pQ($,v){return new $({type:"number",check:"number_format",abort:!1,format:"float64",...M(v)})}function tQ($,v){return new $({type:"number",check:"number_format",abort:!1,format:"int32",...M(v)})}function oQ($,v){return new $({type:"number",check:"number_format",abort:!1,format:"uint32",...M(v)})}function aQ($,v){return new $({type:"boolean",...M(v)})}function eQ($,v){return new $({type:"boolean",coerce:!0,...M(v)})}function sQ($,v){return new $({type:"bigint",...M(v)})}function $9($,v){return new $({type:"bigint",coerce:!0,...M(v)})}function v9($,v){return new $({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...M(v)})}function U9($,v){return new $({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...M(v)})}function D9($,v){return new $({type:"symbol",...M(v)})}function X9($,v){return new $({type:"undefined",...M(v)})}function G9($,v){return new $({type:"null",...M(v)})}function J9($){return new $({type:"any"})}function Q9($){return new $({type:"unknown"})}function W9($,v){return new $({type:"never",...M(v)})}function z9($,v){return new $({type:"void",...M(v)})}function Y9($,v){return new $({type:"date",...M(v)})}function I9($,v){return new $({type:"date",coerce:!0,...M(v)})}function V9($,v){return new $({type:"nan",...M(v)})}function P4($,v){return new zU({check:"less_than",...M(v),value:$,inclusive:!1})}function e$($,v){return new zU({check:"less_than",...M(v),value:$,inclusive:!0})}function b4($,v){return new YU({check:"greater_than",...M(v),value:$,inclusive:!1})}function u$($,v){return new YU({check:"greater_than",...M(v),value:$,inclusive:!0})}function lU($){return b4(0,$)}function hU($){return P4(0,$)}function mU($){return e$(0,$)}function cU($){return u$(0,$)}function $6($,v){return new zJ({check:"multiple_of",...M(v),value:$})}function v6($,v){return new VJ({check:"max_size",...M(v),maximum:$})}function q4($,v){return new KJ({check:"min_size",...M(v),minimum:$})}function w6($,v){return new LJ({check:"size_equals",...M(v),size:$})}function M6($,v){return new BJ({check:"max_length",...M(v),maximum:$})}function i4($,v){return new NJ({check:"min_length",...M(v),minimum:$})}function P6($,v){return new ZJ({check:"length_equals",...M(v),length:$})}function p6($,v){return new OJ({check:"string_format",format:"regex",...M(v),pattern:$})}function t6($){return new HJ({check:"string_format",format:"lowercase",...M($)})}function o6($){return new FJ({check:"string_format",format:"uppercase",...M($)})}function a6($,v){return new jJ({check:"string_format",format:"includes",...M(v),includes:$})}function e6($,v){return new AJ({check:"string_format",format:"starts_with",...M(v),prefix:$})}function s6($,v){return new wJ({check:"string_format",format:"ends_with",...M(v),suffix:$})}function dU($,v,D){return new MJ({check:"property",property:$,schema:v,...M(D)})}function $1($,v){return new PJ({check:"mime_type",mime:$,...M(v)})}function I4($){return new bJ({check:"overwrite",tx:$})}function v1($){return I4((v)=>v.normalize($))}function U1(){return I4(($)=>$.trim())}function D1(){return I4(($)=>$.toLowerCase())}function X1(){return I4(($)=>$.toUpperCase())}function G1(){return I4(($)=>MG($))}function K9($,v,D){return new $({type:"array",element:v,...M(D)})}function JA($,v,D){return new $({type:"union",options:v,...M(D)})}function QA($,v,D){return new $({type:"union",options:v,inclusive:!1,...M(D)})}function WA($,v,D,X){return new $({type:"union",options:D,discriminator:v,...M(X)})}function zA($,v,D){return new $({type:"intersection",left:v,right:D})}function YA($,v,D,X){let U=D instanceof _;return new $({type:"tuple",items:v,rest:U?D:null,...M(U?X:D)})}function IA($,v,D,X){return new $({type:"record",keyType:v,valueType:D,...M(X)})}function VA($,v,D,X){return new $({type:"map",keyType:v,valueType:D,...M(X)})}function KA($,v,D){return new $({type:"set",valueType:v,...M(D)})}function LA($,v,D){let X=Array.isArray(v)?Object.fromEntries(v.map((U)=>[U,U])):v;return new $({type:"enum",entries:X,...M(D)})}function BA($,v,D){return new $({type:"enum",entries:v,...M(D)})}function NA($,v,D){return new $({type:"literal",values:Array.isArray(v)?v:[v],...M(D)})}function L9($,v){return new $({type:"file",...M(v)})}function ZA($,v){return new $({type:"transform",transform:v})}function OA($,v){return new $({type:"optional",innerType:v})}function HA($,v){return new $({type:"nullable",innerType:v})}function FA($,v,D){return new $({type:"default",innerType:v,get defaultValue(){return typeof D==="function"?D():bG(D)}})}function jA($,v,D){return new $({type:"nonoptional",innerType:v,...M(D)})}function AA($,v){return new $({type:"success",innerType:v})}function wA($,v,D){return new $({type:"catch",innerType:v,catchValue:typeof D==="function"?D:()=>D})}function MA($,v,D){return new $({type:"pipe",in:v,out:D})}function PA($,v){return new $({type:"readonly",innerType:v})}function bA($,v,D){return new $({type:"template_literal",parts:v,...M(D)})}function qA($,v){return new $({type:"lazy",getter:v})}function SA($,v){return new $({type:"promise",innerType:v})}function B9($,v,D){let X=M(D);return X.abort??(X.abort=!0),new $({type:"custom",check:"custom",fn:v,...X})}function N9($,v,D){return new $({type:"custom",check:"custom",fn:v,...M(D)})}function Z9($,v){let D=DI((X)=>{return X.addIssue=(U)=>{if(typeof U==="string")X.issues.push(y6(U,X.value,D._zod.def));else{let G=U;if(G.fatal)G.continue=!1;G.code??(G.code="custom"),G.input??(G.input=X.value),G.inst??(G.inst=D),G.continue??(G.continue=!D._zod.def.abort),X.issues.push(y6(G))}},$(X.value,X)},v);return D}function DI($,v){let D=new G$({check:"custom",...M(v)});return D._zod.check=$,D}function O9($){let v=new G$({check:"describe"});return v._zod.onattach=[(D)=>{let X=A$.get(D)??{};A$.add(D,{...X,description:$})}],v._zod.check=()=>{},v}function H9($){let v=new G$({check:"meta"});return v._zod.onattach=[(D)=>{let X=A$.get(D)??{};A$.add(D,{...X,...$})}],v._zod.check=()=>{},v}function F9($,v){let D=M(v),X=D.truthy??["true","1","yes","on","y","enabled"],U=D.falsy??["false","0","no","off","n","disabled"];if(D.case!=="sensitive")X=X.map((K)=>typeof K==="string"?K.toLowerCase():K),U=U.map((K)=>typeof K==="string"?K.toLowerCase():K);let G=new Set(X),J=new Set(U),Q=$.Codec??Bv,W=$.Boolean??Kv,Y=new($.String??A6)({type:"string",error:D.error}),I=new W({type:"boolean",error:D.error}),V=new Q({type:"pipe",in:Y,out:I,transform:(K,L)=>{let N=K;if(D.case!=="sensitive")N=N.toLowerCase();if(G.has(N))return!0;else if(J.has(N))return!1;else return L.issues.push({code:"invalid_value",expected:"stringbool",values:[...G,...J],input:L.value,inst:V,continue:!1}),{}},reverseTransform:(K,L)=>{if(K===!0)return X[0]||"true";else return U[0]||"false"},error:D.error});return V}function J1($,v,D,X={}){let U=M(X),G={...M(X),check:"string_format",type:"string",format:v,fn:typeof D==="function"?D:(Q)=>D.test(Q),...U};if(D instanceof RegExp)G.pattern=D;return new $(G)}function U6($){let v=$?.target??"draft-2020-12";if(v==="draft-4")v="draft-04";if(v==="draft-7")v="draft-07";return{processors:$.processors??{},metadataRegistry:$?.metadata??A$,target:v,unrepresentable:$?.unrepresentable??"throw",override:$?.override??(()=>{}),io:$?.io??"output",counter:0,seen:new Map,cycles:$?.cycles??"ref",reused:$?.reused??"inline",external:$?.external??void 0}}function e($,v,D={path:[],schemaPath:[]}){var X;let U=$._zod.def,G=v.seen.get($);if(G){if(G.count++,D.schemaPath.includes($))G.cycle=D.path;return G.schema}let J={schema:{},count:1,cycle:void 0,path:D.path};v.seen.set($,J);let Q=$._zod.toJSONSchema?.();if(Q)J.schema=Q;else{let Y={...D,schemaPath:[...D.schemaPath,$],path:D.path};if($._zod.processJSONSchema)$._zod.processJSONSchema(v,J.schema,Y);else{let V=J.schema,K=v.processors[U.type];if(!K)throw Error(`[toJSONSchema]: Non-representable type encountered: ${U.type}`);K($,v,V,Y)}let I=$._zod.parent;if(I){if(!J.ref)J.ref=I;e(I,v,Y),v.seen.get(I).isParent=!0}}let W=v.metadataRegistry.get($);if(W)Object.assign(J.schema,W);if(v.io==="input"&&x$($))delete J.schema.examples,delete J.schema.default;if(v.io==="input"&&"_prefault"in J.schema)(X=J.schema).default??(X.default=J.schema._prefault);return delete J.schema._prefault,v.seen.get($).schema}function D6($,v){let D=$.seen.get(v);if(!D)throw Error("Unprocessed schema. This is a bug in Zod.");let X=new Map;for(let J of $.seen.entries()){let Q=$.metadataRegistry.get(J[0])?.id;if(Q){let W=X.get(Q);if(W&&W!==J[0])throw Error(`Duplicate schema id "${Q}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);X.set(Q,J[0])}}let U=(J)=>{let Q=$.target==="draft-2020-12"?"$defs":"definitions";if($.external){let I=$.external.registry.get(J[0])?.id,V=$.external.uri??((L)=>L);if(I)return{ref:V(I)};let K=J[1].defId??J[1].schema.id??`schema${$.counter++}`;return J[1].defId=K,{defId:K,ref:`${V("__shared")}#/${Q}/${K}`}}if(J[1]===D)return{ref:"#"};let z=`${"#"}/${Q}/`,Y=J[1].schema.id??`__schema${$.counter++}`;return{defId:Y,ref:z+Y}},G=(J)=>{if(J[1].schema.$ref)return;let Q=J[1],{ref:W,defId:z}=U(J);if(Q.def={...Q.schema},z)Q.defId=z;let Y=Q.schema;for(let I in Y)delete Y[I];Y.$ref=W};if($.cycles==="throw")for(let J of $.seen.entries()){let Q=J[1];if(Q.cycle)throw Error(`Cycle detected: #/${Q.cycle?.join("/")}/<root>
|
|
91
91
|
|
|
92
|
-
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let J of $.seen.entries()){let Q=J[1];if(v===J[0]){G(J);continue}if($.external){let z=$.external.registry.get(J[0])?.id;if(v!==J[0]&&z){G(J);continue}}if($.metadataRegistry.get(J[0])?.id){G(J);continue}if(Q.cycle){G(J);continue}if(Q.count>1){if($.reused==="ref"){G(J);continue}}}}function X6($,v){let D=$.seen.get(v);if(!D)throw Error("Unprocessed schema. This is a bug in Zod.");let X=(Q)=>{let W=$.seen.get(Q);if(W.ref===null)return;let z=W.def??W.schema,Y={...z},I=W.ref;if(W.ref=null,I){X(I);let K=$.seen.get(I),L=K.schema;if(L.$ref&&($.target==="draft-07"||$.target==="draft-04"||$.target==="openapi-3.0"))z.allOf=z.allOf??[],z.allOf.push(L);else Object.assign(z,L);if(Object.assign(z,Y),Q._zod.parent===I)for(let Z in z){if(Z==="$ref"||Z==="allOf")continue;if(!(Z in Y))delete z[Z]}if(L.$ref&&K.def)for(let Z in z){if(Z==="$ref"||Z==="allOf")continue;if(Z in K.def&&JSON.stringify(z[Z])===JSON.stringify(K.def[Z]))delete z[Z]}}let V=Q._zod.parent;if(V&&V!==I){X(V);let K=$.seen.get(V);if(K?.schema.$ref){if(z.$ref=K.schema.$ref,K.def)for(let L in z){if(L==="$ref"||L==="allOf")continue;if(L in K.def&&JSON.stringify(z[L])===JSON.stringify(K.def[L]))delete z[L]}}}$.override({zodSchema:Q,jsonSchema:z,path:W.path??[]})};for(let Q of[...$.seen.entries()].reverse())X(Q[0]);let U={};if($.target==="draft-2020-12")U.$schema="https://json-schema.org/draft/2020-12/schema";else if($.target==="draft-07")U.$schema="http://json-schema.org/draft-07/schema#";else if($.target==="draft-04")U.$schema="http://json-schema.org/draft-04/schema#";else if($.target==="openapi-3.0");if($.external?.uri){let Q=$.external.registry.get(v)?.id;if(!Q)throw Error("Schema is missing an `id` property");U.$id=$.external.uri(Q)}Object.assign(U,D.def??D.schema);let G=$.metadataRegistry.get(v)?.id;if(G!==void 0&&U.id===G)delete U.id;let J=$.external?.defs??{};for(let Q of $.seen.entries()){let W=Q[1];if(W.def&&W.defId){if(W.def.id===W.defId)delete W.def.id;J[W.defId]=W.def}}if($.external);else if(Object.keys(J).length>0)if($.target==="draft-2020-12")U.$defs=J;else U.definitions=J;try{let Q=JSON.parse(JSON.stringify(U));return Object.defineProperty(Q,"~standard",{value:{...v["~standard"],jsonSchema:{input:Q1(v,"input",$.processors),output:Q1(v,"output",$.processors)}},enumerable:!1,writable:!1}),Q}catch(Q){throw Error("Error converting schema to JSON.")}}function f$($,v){let D=v??{seen:new Set};if(D.seen.has($))return!1;D.seen.add($);let X=$._zod.def;if(X.type==="transform")return!0;if(X.type==="array")return f$(X.element,D);if(X.type==="set")return f$(X.valueType,D);if(X.type==="lazy")return f$(X.getter(),D);if(X.type==="promise"||X.type==="optional"||X.type==="nonoptional"||X.type==="nullable"||X.type==="readonly"||X.type==="default"||X.type==="prefault")return f$(X.innerType,D);if(X.type==="intersection")return f$(X.left,D)||f$(X.right,D);if(X.type==="record"||X.type==="map")return f$(X.keyType,D)||f$(X.valueType,D);if(X.type==="pipe"){if($._zod.traits.has("$ZodCodec"))return!0;return f$(X.in,D)||f$(X.out,D)}if(X.type==="object"){for(let U in X.shape)if(f$(X.shape[U],D))return!0;return!1}if(X.type==="union"){for(let U of X.options)if(f$(U,D))return!0;return!1}if(X.type==="tuple"){for(let U of X.items)if(f$(U,D))return!0;if(X.rest&&f$(X.rest,D))return!0;return!1}return!1}var j9=($,v={})=>(D)=>{let X=U6({...D,processors:v});return e($,X),D6(X,$),X6(X,$)},Q1=($,v,D={})=>(X)=>{let{libraryOptions:U,target:G}=X??{},J=U6({...U??{},target:G,io:v,processors:D});return e($,J),D6(J,$),X6(J,$)};var kA={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},A9=($,v,D,X)=>{let U=D;U.type="string";let{minimum:G,maximum:J,format:Q,patterns:W,contentEncoding:z}=$._zod.bag;if(typeof G==="number")U.minLength=G;if(typeof J==="number")U.maxLength=J;if(Q){if(U.format=kA[Q]??Q,U.format==="")delete U.format;if(Q==="time")delete U.format}if(z)U.contentEncoding=z;if(W&&W.size>0){let Y=[...W];if(Y.length===1)U.pattern=Y[0].source;else if(Y.length>1)U.allOf=[...Y.map((I)=>({...v.target==="draft-07"||v.target==="draft-04"||v.target==="openapi-3.0"?{type:"string"}:{},pattern:I.source}))]}},w9=($,v,D,X)=>{let U=D,{minimum:G,maximum:J,format:Q,multipleOf:W,exclusiveMaximum:z,exclusiveMinimum:Y}=$._zod.bag;if(typeof Q==="string"&&Q.includes("int"))U.type="integer";else U.type="number";let I=typeof Y==="number"&&Y>=(G??Number.NEGATIVE_INFINITY),V=typeof z==="number"&&z<=(J??Number.POSITIVE_INFINITY),K=v.target==="draft-04"||v.target==="openapi-3.0";if(I)if(K)U.minimum=Y,U.exclusiveMinimum=!0;else U.exclusiveMinimum=Y;else if(typeof G==="number")U.minimum=G;if(V)if(K)U.maximum=z,U.exclusiveMaximum=!0;else U.exclusiveMaximum=z;else if(typeof J==="number")U.maximum=J;if(typeof W==="number")U.multipleOf=W},M9=($,v,D,X)=>{D.type="boolean"},P9=($,v,D,X)=>{if(v.unrepresentable==="throw")throw Error("BigInt cannot be represented in JSON Schema")},b9=($,v,D,X)=>{if(v.unrepresentable==="throw")throw Error("Symbols cannot be represented in JSON Schema")},q9=($,v,D,X)=>{if(v.target==="openapi-3.0")D.type="string",D.nullable=!0,D.enum=[null];else D.type="null"},S9=($,v,D,X)=>{if(v.unrepresentable==="throw")throw Error("Undefined cannot be represented in JSON Schema")},k9=($,v,D,X)=>{if(v.unrepresentable==="throw")throw Error("Void cannot be represented in JSON Schema")},E9=($,v,D,X)=>{D.not={}},T9=($,v,D,X)=>{},R9=($,v,D,X)=>{},g9=($,v,D,X)=>{if(v.unrepresentable==="throw")throw Error("Date cannot be represented in JSON Schema")},C9=($,v,D,X)=>{let U=$._zod.def,G=s1(U.entries);if(G.every((J)=>typeof J==="number"))D.type="number";if(G.every((J)=>typeof J==="string"))D.type="string";D.enum=G},u9=($,v,D,X)=>{let U=$._zod.def,G=[];for(let J of U.values)if(J===void 0){if(v.unrepresentable==="throw")throw Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof J==="bigint")if(v.unrepresentable==="throw")throw Error("BigInt literals cannot be represented in JSON Schema");else G.push(Number(J));else G.push(J);if(G.length===0);else if(G.length===1){let J=G[0];if(D.type=J===null?"null":typeof J,v.target==="draft-04"||v.target==="openapi-3.0")D.enum=[J];else D.const=J}else{if(G.every((J)=>typeof J==="number"))D.type="number";if(G.every((J)=>typeof J==="string"))D.type="string";if(G.every((J)=>typeof J==="boolean"))D.type="boolean";if(G.every((J)=>J===null))D.type="null";D.enum=G}},x9=($,v,D,X)=>{if(v.unrepresentable==="throw")throw Error("NaN cannot be represented in JSON Schema")},f9=($,v,D,X)=>{let U=D,G=$._zod.pattern;if(!G)throw Error("Pattern not found in template literal");U.type="string",U.pattern=G.source},_9=($,v,D,X)=>{let U=D,G={type:"string",format:"binary",contentEncoding:"binary"},{minimum:J,maximum:Q,mime:W}=$._zod.bag;if(J!==void 0)G.minLength=J;if(Q!==void 0)G.maxLength=Q;if(W)if(W.length===1)G.contentMediaType=W[0],Object.assign(U,G);else Object.assign(U,G),U.anyOf=W.map((z)=>({contentMediaType:z}));else Object.assign(U,G)},i9=($,v,D,X)=>{D.type="boolean"},y9=($,v,D,X)=>{if(v.unrepresentable==="throw")throw Error("Custom types cannot be represented in JSON Schema")},n9=($,v,D,X)=>{if(v.unrepresentable==="throw")throw Error("Function types cannot be represented in JSON Schema")},l9=($,v,D,X)=>{if(v.unrepresentable==="throw")throw Error("Transforms cannot be represented in JSON Schema")},h9=($,v,D,X)=>{if(v.unrepresentable==="throw")throw Error("Map cannot be represented in JSON Schema")},m9=($,v,D,X)=>{if(v.unrepresentable==="throw")throw Error("Set cannot be represented in JSON Schema")},c9=($,v,D,X)=>{let U=D,G=$._zod.def,{minimum:J,maximum:Q}=$._zod.bag;if(typeof J==="number")U.minItems=J;if(typeof Q==="number")U.maxItems=Q;U.type="array",U.items=e(G.element,v,{...X,path:[...X.path,"items"]})},d9=($,v,D,X)=>{let U=D,G=$._zod.def;U.type="object",U.properties={};let J=G.shape;for(let z in J)U.properties[z]=e(J[z],v,{...X,path:[...X.path,"properties",z]});let Q=new Set(Object.keys(J)),W=new Set([...Q].filter((z)=>{let Y=G.shape[z]._zod;if(v.io==="input")return Y.optin===void 0;else return Y.optout===void 0}));if(W.size>0)U.required=Array.from(W);if(G.catchall?._zod.def.type==="never")U.additionalProperties=!1;else if(!G.catchall){if(v.io==="output")U.additionalProperties=!1}else if(G.catchall)U.additionalProperties=e(G.catchall,v,{...X,path:[...X.path,"additionalProperties"]})},pU=($,v,D,X)=>{let U=$._zod.def,G=U.inclusive===!1,J=U.options.map((Q,W)=>e(Q,v,{...X,path:[...X.path,G?"oneOf":"anyOf",W]}));if(G)D.oneOf=J;else D.anyOf=J},r9=($,v,D,X)=>{let U=$._zod.def,G=e(U.left,v,{...X,path:[...X.path,"allOf",0]}),J=e(U.right,v,{...X,path:[...X.path,"allOf",1]}),Q=(z)=>("allOf"in z)&&Object.keys(z).length===1,W=[...Q(G)?G.allOf:[G],...Q(J)?J.allOf:[J]];D.allOf=W},p9=($,v,D,X)=>{let U=D,G=$._zod.def;U.type="array";let J=v.target==="draft-2020-12"?"prefixItems":"items",Q=v.target==="draft-2020-12"?"items":v.target==="openapi-3.0"?"items":"additionalItems",W=G.items.map((V,K)=>e(V,v,{...X,path:[...X.path,J,K]})),z=G.rest?e(G.rest,v,{...X,path:[...X.path,Q,...v.target==="openapi-3.0"?[G.items.length]:[]]}):null;if(v.target==="draft-2020-12"){if(U.prefixItems=W,z)U.items=z}else if(v.target==="openapi-3.0"){if(U.items={anyOf:W},z)U.items.anyOf.push(z);if(U.minItems=W.length,!z)U.maxItems=W.length}else if(U.items=W,z)U.additionalItems=z;let{minimum:Y,maximum:I}=$._zod.bag;if(typeof Y==="number")U.minItems=Y;if(typeof I==="number")U.maxItems=I},t9=($,v,D,X)=>{let U=D,G=$._zod.def;U.type="object";let J=G.keyType,W=J._zod.bag?.patterns;if(G.mode==="loose"&&W&&W.size>0){let Y=e(G.valueType,v,{...X,path:[...X.path,"patternProperties","*"]});U.patternProperties={};for(let I of W)U.patternProperties[I.source]=Y}else{if(v.target==="draft-07"||v.target==="draft-2020-12")U.propertyNames=e(G.keyType,v,{...X,path:[...X.path,"propertyNames"]});U.additionalProperties=e(G.valueType,v,{...X,path:[...X.path,"additionalProperties"]})}let z=J._zod.values;if(z){let Y=[...z].filter((I)=>typeof I==="string"||typeof I==="number");if(Y.length>0)U.required=Y}},o9=($,v,D,X)=>{let U=$._zod.def,G=e(U.innerType,v,X),J=v.seen.get($);if(v.target==="openapi-3.0")J.ref=U.innerType,D.nullable=!0;else D.anyOf=[G,{type:"null"}]},a9=($,v,D,X)=>{let U=$._zod.def;e(U.innerType,v,X);let G=v.seen.get($);G.ref=U.innerType},e9=($,v,D,X)=>{let U=$._zod.def;e(U.innerType,v,X);let G=v.seen.get($);G.ref=U.innerType,D.default=JSON.parse(JSON.stringify(U.defaultValue))},s9=($,v,D,X)=>{let U=$._zod.def;e(U.innerType,v,X);let G=v.seen.get($);if(G.ref=U.innerType,v.io==="input")D._prefault=JSON.parse(JSON.stringify(U.defaultValue))},$W=($,v,D,X)=>{let U=$._zod.def;e(U.innerType,v,X);let G=v.seen.get($);G.ref=U.innerType;let J;try{J=U.catchValue(void 0)}catch{throw Error("Dynamic catch values are not supported in JSON Schema")}D.default=J},vW=($,v,D,X)=>{let U=$._zod.def,G=U.in._zod.traits.has("$ZodTransform"),J=v.io==="input"?G?U.out:U.in:U.out;e(J,v,X);let Q=v.seen.get($);Q.ref=J},UW=($,v,D,X)=>{let U=$._zod.def;e(U.innerType,v,X);let G=v.seen.get($);G.ref=U.innerType,D.readOnly=!0},DW=($,v,D,X)=>{let U=$._zod.def;e(U.innerType,v,X);let G=v.seen.get($);G.ref=U.innerType},tU=($,v,D,X)=>{let U=$._zod.def;e(U.innerType,v,X);let G=v.seen.get($);G.ref=U.innerType},XW=($,v,D,X)=>{let U=$._zod.innerType;e(U,v,X);let G=v.seen.get($);G.ref=U},rU={string:A9,number:w9,boolean:M9,bigint:P9,symbol:b9,null:q9,undefined:S9,void:k9,never:E9,any:T9,unknown:R9,date:g9,enum:C9,literal:u9,nan:x9,template_literal:f9,file:_9,success:i9,custom:y9,function:n9,transform:l9,map:h9,set:m9,array:c9,object:d9,union:pU,intersection:r9,tuple:p9,record:t9,nullable:o9,nonoptional:a9,default:e9,prefault:s9,catch:$W,pipe:vW,readonly:UW,promise:DW,optional:tU,lazy:XW};function oU($,v){if("_idmap"in $){let X=$,U=U6({...v,processors:rU}),G={};for(let W of X._idmap.entries()){let[z,Y]=W;e(Y,U)}let J={},Q={registry:X,uri:v?.uri,defs:G};U.external=Q;for(let W of X._idmap.entries()){let[z,Y]=W;D6(U,Y),J[z]=X6(U,Y)}if(Object.keys(G).length>0){let W=U.target==="draft-2020-12"?"$defs":"definitions";J.__shared={[W]:G}}return{schemas:J}}let D=U6({...v,processors:rU});return e($,D),D6(D,$),X6(D,$)}class GW{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($){this.ctx.counter=$}get seen(){return this.ctx.seen}constructor($){let v=$?.target??"draft-2020-12";if(v==="draft-4")v="draft-04";if(v==="draft-7")v="draft-07";this.ctx=U6({processors:rU,target:v,...$?.metadata&&{metadata:$.metadata},...$?.unrepresentable&&{unrepresentable:$.unrepresentable},...$?.override&&{override:$.override},...$?.io&&{io:$.io}})}process($,v={path:[],schemaPath:[]}){return e($,this.ctx,v)}emit($,v){if(v){if(v.cycles)this.ctx.cycles=v.cycles;if(v.reused)this.ctx.reused=v.reused;if(v.external)this.ctx.external=v.external}D6(this.ctx,$);let D=X6(this.ctx,$),{"~standard":X,...U}=D;return U}}var XI={};var wv={};C4(wv,{xor:()=>tI,xid:()=>FI,void:()=>cI,uuidv7:()=>VI,uuidv6:()=>II,uuidv4:()=>YI,uuid:()=>zI,url:()=>KI,unknown:()=>D$,union:()=>X$,undefined:()=>hI,ulid:()=>HI,uint64:()=>nI,uint32:()=>_I,tuple:()=>uW,transform:()=>wD,templateLiteral:()=>QV,symbol:()=>lI,superRefine:()=>Wz,success:()=>DV,stringbool:()=>LV,stringFormat:()=>TI,string:()=>H,strictObject:()=>pI,set:()=>sI,refine:()=>Qz,record:()=>s,readonly:()=>vz,promise:()=>WV,preprocess:()=>xv,prefault:()=>rW,pipe:()=>DD,partialRecord:()=>oI,optional:()=>J$,object:()=>q,number:()=>t,nullish:()=>UV,nullable:()=>Pv,null:()=>Sv,nonoptional:()=>pW,never:()=>AD,nativeEnum:()=>$V,nanoid:()=>NI,nan:()=>XV,meta:()=>VV,map:()=>eI,mac:()=>wI,looseRecord:()=>aI,looseObject:()=>w$,literal:()=>R,lazy:()=>Xz,ksuid:()=>jI,keyof:()=>rI,jwt:()=>EI,json:()=>BV,ipv6:()=>MI,ipv4:()=>AI,invertCodec:()=>JV,intersection:()=>B1,int64:()=>yI,int32:()=>fI,int:()=>UD,instanceof:()=>KV,httpUrl:()=>LI,hostname:()=>RI,hex:()=>gI,hash:()=>CI,guid:()=>WI,function:()=>zV,float64:()=>xI,float32:()=>uI,file:()=>vV,exactOptional:()=>lW,enum:()=>M$,emoji:()=>BI,email:()=>QI,e164:()=>kI,discriminatedUnion:()=>Rv,describe:()=>IV,date:()=>dI,custom:()=>bD,cuid2:()=>OI,cuid:()=>ZI,codec:()=>GV,cidrv6:()=>bI,cidrv4:()=>PI,check:()=>YV,catch:()=>aW,boolean:()=>K$,bigint:()=>iI,base64url:()=>SI,base64:()=>qI,array:()=>c,any:()=>mI,_function:()=>zV,_default:()=>cW,_ZodString:()=>XD,ZodXor:()=>TW,ZodXID:()=>ID,ZodVoid:()=>kW,ZodUnknown:()=>qW,ZodUnion:()=>Tv,ZodUndefined:()=>MW,ZodUUID:()=>S4,ZodURL:()=>qv,ZodULID:()=>YD,ZodType:()=>y,ZodTuple:()=>CW,ZodTransform:()=>yW,ZodTemplateLiteral:()=>Uz,ZodSymbol:()=>wW,ZodSuccess:()=>tW,ZodStringFormat:()=>U$,ZodString:()=>Y1,ZodSet:()=>fW,ZodRecord:()=>W1,ZodReadonly:()=>$z,ZodPromise:()=>Gz,ZodPreprocess:()=>sW,ZodPrefault:()=>dW,ZodPipe:()=>gv,ZodOptional:()=>MD,ZodObject:()=>Ev,ZodNumberFormat:()=>b6,ZodNumber:()=>V1,ZodNullable:()=>hW,ZodNull:()=>PW,ZodNonOptional:()=>PD,ZodNever:()=>SW,ZodNanoID:()=>QD,ZodNaN:()=>eW,ZodMap:()=>xW,ZodMAC:()=>AW,ZodLiteral:()=>_W,ZodLazy:()=>Dz,ZodKSUID:()=>VD,ZodJWT:()=>FD,ZodIntersection:()=>gW,ZodIPv6:()=>LD,ZodIPv4:()=>KD,ZodGUID:()=>Mv,ZodFunction:()=>Jz,ZodFile:()=>iW,ZodExactOptional:()=>nW,ZodEnum:()=>z1,ZodEmoji:()=>JD,ZodEmail:()=>GD,ZodE164:()=>HD,ZodDiscriminatedUnion:()=>RW,ZodDefault:()=>mW,ZodDate:()=>kv,ZodCustomStringFormat:()=>I1,ZodCustom:()=>uv,ZodCodec:()=>Cv,ZodCatch:()=>oW,ZodCUID2:()=>zD,ZodCUID:()=>WD,ZodCIDRv6:()=>ND,ZodCIDRv4:()=>BD,ZodBoolean:()=>K1,ZodBigIntFormat:()=>jD,ZodBigInt:()=>L1,ZodBase64URL:()=>OD,ZodBase64:()=>ZD,ZodArray:()=>EW,ZodAny:()=>bW});var aU={};C4(aU,{uppercase:()=>o6,trim:()=>U1,toUpperCase:()=>X1,toLowerCase:()=>D1,startsWith:()=>e6,slugify:()=>G1,size:()=>w6,regex:()=>p6,property:()=>dU,positive:()=>lU,overwrite:()=>I4,normalize:()=>v1,nonpositive:()=>mU,nonnegative:()=>cU,negative:()=>hU,multipleOf:()=>$6,minSize:()=>q4,minLength:()=>i4,mime:()=>$1,maxSize:()=>v6,maxLength:()=>M6,lte:()=>e$,lt:()=>P4,lowercase:()=>t6,length:()=>P6,includes:()=>a6,gte:()=>x$,gt:()=>b4,endsWith:()=>s6});var G6={};C4(G6,{time:()=>WW,duration:()=>zW,datetime:()=>JW,date:()=>QW,ZodISOTime:()=>$D,ZodISODuration:()=>vD,ZodISODateTime:()=>eU,ZodISODate:()=>sU});var eU=B("ZodISODateTime",($,v)=>{yJ.init($,v),U$.init($,v)});function JW($){return yQ(eU,$)}var sU=B("ZodISODate",($,v)=>{nJ.init($,v),U$.init($,v)});function QW($){return nQ(sU,$)}var $D=B("ZodISOTime",($,v)=>{lJ.init($,v),U$.init($,v)});function WW($){return lQ($D,$)}var vD=B("ZodISODuration",($,v)=>{hJ.init($,v),U$.init($,v)});function zW($){return hQ(vD,$)}var GI=($,v)=>{Xv.init($,v),$.name="ZodError",Object.defineProperties($,{format:{value:(D)=>Jv($,D)},flatten:{value:(D)=>Gv($,D)},addIssue:{value:(D)=>{$.issues.push(D),$.message=JSON.stringify($.issues,_6,2)}},addIssues:{value:(D)=>{$.issues.push(...D),$.message=JSON.stringify($.issues,_6,2)}},isEmpty:{get(){return $.issues.length===0}}})},TA=B("ZodError",GI),h$=B("ZodError",GI,{Parent:Error});var YW=n6(h$),IW=l6(h$),VW=h6(h$),KW=c6(h$),LW=$U(h$),BW=vU(h$),NW=UU(h$),ZW=DU(h$),OW=XU(h$),HW=GU(h$),FW=JU(h$),jW=QU(h$);var JI=new WeakMap;function bv($,v,D){let X=Object.getPrototypeOf($),U=JI.get(X);if(!U)U=new Set,JI.set(X,U);if(U.has(v))return;U.add(v);for(let G in D){let J=D[G];Object.defineProperty(X,G,{configurable:!0,enumerable:!1,get(){let Q=J.bind(this);return Object.defineProperty(this,G,{configurable:!0,writable:!0,enumerable:!0,value:Q}),Q},set(Q){Object.defineProperty(this,G,{configurable:!0,writable:!0,enumerable:!0,value:Q})}})}}var y=B("ZodType",($,v)=>{return _.init($,v),Object.assign($["~standard"],{jsonSchema:{input:Q1($,"input"),output:Q1($,"output")}}),$.toJSONSchema=j9($,{}),$.def=v,$.type=v.type,Object.defineProperty($,"_def",{value:v}),$.parse=(D,X)=>YW($,D,X,{callee:$.parse}),$.safeParse=(D,X)=>VW($,D,X),$.parseAsync=async(D,X)=>IW($,D,X,{callee:$.parseAsync}),$.safeParseAsync=async(D,X)=>KW($,D,X),$.spa=$.safeParseAsync,$.encode=(D,X)=>LW($,D,X),$.decode=(D,X)=>BW($,D,X),$.encodeAsync=async(D,X)=>NW($,D,X),$.decodeAsync=async(D,X)=>ZW($,D,X),$.safeEncode=(D,X)=>OW($,D,X),$.safeDecode=(D,X)=>HW($,D,X),$.safeEncodeAsync=async(D,X)=>FW($,D,X),$.safeDecodeAsync=async(D,X)=>jW($,D,X),bv($,"ZodType",{check(...D){let X=this.def;return this.clone(w.mergeDefs(X,{checks:[...X.checks??[],...D.map((U)=>typeof U==="function"?{_zod:{check:U,def:{check:"custom"},onattach:[]}}:U)]}),{parent:!0})},with(...D){return this.check(...D)},clone(D,X){return C$(this,D,X)},brand(){return this},register(D,X){return D.add(this,X),this},refine(D,X){return this.check(Qz(D,X))},superRefine(D,X){return this.check(Wz(D,X))},overwrite(D){return this.check(I4(D))},optional(){return J$(this)},exactOptional(){return lW(this)},nullable(){return Pv(this)},nullish(){return J$(Pv(this))},nonoptional(D){return pW(this,D)},array(){return c(this)},or(D){return X$([this,D])},and(D){return B1(this,D)},transform(D){return DD(this,wD(D))},default(D){return cW(this,D)},prefault(D){return rW(this,D)},catch(D){return aW(this,D)},pipe(D){return DD(this,D)},readonly(){return vz(this)},describe(D){let X=this.clone();return A$.add(X,{description:D}),X},meta(...D){if(D.length===0)return A$.get(this);let X=this.clone();return A$.add(X,D[0]),X},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(D){return D(this)}}),Object.defineProperty($,"description",{get(){return A$.get($)?.description},configurable:!0}),$}),XD=B("_ZodString",($,v)=>{A6.init($,v),y.init($,v),$._zod.processJSONSchema=(X,U,G)=>A9($,X,U,G);let D=$._zod.bag;$.format=D.format??null,$.minLength=D.minimum??null,$.maxLength=D.maximum??null,bv($,"_ZodString",{regex(...X){return this.check(p6(...X))},includes(...X){return this.check(a6(...X))},startsWith(...X){return this.check(e6(...X))},endsWith(...X){return this.check(s6(...X))},min(...X){return this.check(i4(...X))},max(...X){return this.check(M6(...X))},length(...X){return this.check(P6(...X))},nonempty(...X){return this.check(i4(1,...X))},lowercase(X){return this.check(t6(X))},uppercase(X){return this.check(o6(X))},trim(){return this.check(U1())},normalize(...X){return this.check(v1(...X))},toLowerCase(){return this.check(D1())},toUpperCase(){return this.check(X1())},slugify(){return this.check(G1())}})}),Y1=B("ZodString",($,v)=>{A6.init($,v),XD.init($,v),$.email=(D)=>$.check(AU(GD,D)),$.url=(D)=>$.check(Av(qv,D)),$.jwt=(D)=>$.check(nU(FD,D)),$.emoji=(D)=>$.check(qU(JD,D)),$.guid=(D)=>$.check(jv(Mv,D)),$.uuid=(D)=>$.check(wU(S4,D)),$.uuidv4=(D)=>$.check(MU(S4,D)),$.uuidv6=(D)=>$.check(PU(S4,D)),$.uuidv7=(D)=>$.check(bU(S4,D)),$.nanoid=(D)=>$.check(SU(QD,D)),$.guid=(D)=>$.check(jv(Mv,D)),$.cuid=(D)=>$.check(kU(WD,D)),$.cuid2=(D)=>$.check(EU(zD,D)),$.ulid=(D)=>$.check(TU(YD,D)),$.base64=(D)=>$.check(_U(ZD,D)),$.base64url=(D)=>$.check(iU(OD,D)),$.xid=(D)=>$.check(RU(ID,D)),$.ksuid=(D)=>$.check(gU(VD,D)),$.ipv4=(D)=>$.check(CU(KD,D)),$.ipv6=(D)=>$.check(uU(LD,D)),$.cidrv4=(D)=>$.check(xU(BD,D)),$.cidrv6=(D)=>$.check(fU(ND,D)),$.e164=(D)=>$.check(yU(HD,D)),$.datetime=(D)=>$.check(JW(D)),$.date=(D)=>$.check(QW(D)),$.time=(D)=>$.check(WW(D)),$.duration=(D)=>$.check(zW(D))});function H($){return xQ(Y1,$)}var U$=B("ZodStringFormat",($,v)=>{v$.init($,v),XD.init($,v)}),GD=B("ZodEmail",($,v)=>{TJ.init($,v),U$.init($,v)});function QI($){return AU(GD,$)}var Mv=B("ZodGUID",($,v)=>{kJ.init($,v),U$.init($,v)});function WI($){return jv(Mv,$)}var S4=B("ZodUUID",($,v)=>{EJ.init($,v),U$.init($,v)});function zI($){return wU(S4,$)}function YI($){return MU(S4,$)}function II($){return PU(S4,$)}function VI($){return bU(S4,$)}var qv=B("ZodURL",($,v)=>{RJ.init($,v),U$.init($,v)});function KI($){return Av(qv,$)}function LI($){return Av(qv,{protocol:a$.httpProtocol,hostname:a$.domain,...w.normalizeParams($)})}var JD=B("ZodEmoji",($,v)=>{gJ.init($,v),U$.init($,v)});function BI($){return qU(JD,$)}var QD=B("ZodNanoID",($,v)=>{CJ.init($,v),U$.init($,v)});function NI($){return SU(QD,$)}var WD=B("ZodCUID",($,v)=>{uJ.init($,v),U$.init($,v)});function ZI($){return kU(WD,$)}var zD=B("ZodCUID2",($,v)=>{xJ.init($,v),U$.init($,v)});function OI($){return EU(zD,$)}var YD=B("ZodULID",($,v)=>{fJ.init($,v),U$.init($,v)});function HI($){return TU(YD,$)}var ID=B("ZodXID",($,v)=>{_J.init($,v),U$.init($,v)});function FI($){return RU(ID,$)}var VD=B("ZodKSUID",($,v)=>{iJ.init($,v),U$.init($,v)});function jI($){return gU(VD,$)}var KD=B("ZodIPv4",($,v)=>{mJ.init($,v),U$.init($,v)});function AI($){return CU(KD,$)}var AW=B("ZodMAC",($,v)=>{dJ.init($,v),U$.init($,v)});function wI($){return _Q(AW,$)}var LD=B("ZodIPv6",($,v)=>{cJ.init($,v),U$.init($,v)});function MI($){return uU(LD,$)}var BD=B("ZodCIDRv4",($,v)=>{rJ.init($,v),U$.init($,v)});function PI($){return xU(BD,$)}var ND=B("ZodCIDRv6",($,v)=>{pJ.init($,v),U$.init($,v)});function bI($){return fU(ND,$)}var ZD=B("ZodBase64",($,v)=>{oJ.init($,v),U$.init($,v)});function qI($){return _U(ZD,$)}var OD=B("ZodBase64URL",($,v)=>{aJ.init($,v),U$.init($,v)});function SI($){return iU(OD,$)}var HD=B("ZodE164",($,v)=>{eJ.init($,v),U$.init($,v)});function kI($){return yU(HD,$)}var FD=B("ZodJWT",($,v)=>{sJ.init($,v),U$.init($,v)});function EI($){return nU(FD,$)}var I1=B("ZodCustomStringFormat",($,v)=>{$8.init($,v),U$.init($,v)});function TI($,v,D={}){return J1(I1,$,v,D)}function RI($){return J1(I1,"hostname",a$.hostname,$)}function gI($){return J1(I1,"hex",a$.hex,$)}function CI($,v){let D=v?.enc??"hex",X=`${$}_${D}`,U=a$[X];if(!U)throw Error(`Unrecognized hash format: ${X}`);return J1(I1,X,U,v)}var V1=B("ZodNumber",($,v)=>{NU.init($,v),y.init($,v),$._zod.processJSONSchema=(X,U,G)=>w9($,X,U,G),bv($,"ZodNumber",{gt(X,U){return this.check(b4(X,U))},gte(X,U){return this.check(x$(X,U))},min(X,U){return this.check(x$(X,U))},lt(X,U){return this.check(P4(X,U))},lte(X,U){return this.check(e$(X,U))},max(X,U){return this.check(e$(X,U))},int(X){return this.check(UD(X))},safe(X){return this.check(UD(X))},positive(X){return this.check(b4(0,X))},nonnegative(X){return this.check(x$(0,X))},negative(X){return this.check(P4(0,X))},nonpositive(X){return this.check(e$(0,X))},multipleOf(X,U){return this.check($6(X,U))},step(X,U){return this.check($6(X,U))},finite(){return this}});let D=$._zod.bag;$.minValue=Math.max(D.minimum??Number.NEGATIVE_INFINITY,D.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,$.maxValue=Math.min(D.maximum??Number.POSITIVE_INFINITY,D.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,$.isInt=(D.format??"").includes("int")||Number.isSafeInteger(D.multipleOf??0.5),$.isFinite=!0,$.format=D.format??null});function t($){return mQ(V1,$)}var b6=B("ZodNumberFormat",($,v)=>{v8.init($,v),V1.init($,v)});function UD($){return dQ(b6,$)}function uI($){return rQ(b6,$)}function xI($){return pQ(b6,$)}function fI($){return tQ(b6,$)}function _I($){return oQ(b6,$)}var K1=B("ZodBoolean",($,v)=>{Kv.init($,v),y.init($,v),$._zod.processJSONSchema=(D,X,U)=>M9($,D,X,U)});function K$($){return aQ(K1,$)}var L1=B("ZodBigInt",($,v)=>{ZU.init($,v),y.init($,v),$._zod.processJSONSchema=(X,U,G)=>P9($,X,U,G),$.gte=(X,U)=>$.check(x$(X,U)),$.min=(X,U)=>$.check(x$(X,U)),$.gt=(X,U)=>$.check(b4(X,U)),$.gte=(X,U)=>$.check(x$(X,U)),$.min=(X,U)=>$.check(x$(X,U)),$.lt=(X,U)=>$.check(P4(X,U)),$.lte=(X,U)=>$.check(e$(X,U)),$.max=(X,U)=>$.check(e$(X,U)),$.positive=(X)=>$.check(b4(BigInt(0),X)),$.negative=(X)=>$.check(P4(BigInt(0),X)),$.nonpositive=(X)=>$.check(e$(BigInt(0),X)),$.nonnegative=(X)=>$.check(x$(BigInt(0),X)),$.multipleOf=(X,U)=>$.check($6(X,U));let D=$._zod.bag;$.minValue=D.minimum??null,$.maxValue=D.maximum??null,$.format=D.format??null});function iI($){return sQ(L1,$)}var jD=B("ZodBigIntFormat",($,v)=>{U8.init($,v),L1.init($,v)});function yI($){return v9(jD,$)}function nI($){return U9(jD,$)}var wW=B("ZodSymbol",($,v)=>{D8.init($,v),y.init($,v),$._zod.processJSONSchema=(D,X,U)=>b9($,D,X,U)});function lI($){return D9(wW,$)}var MW=B("ZodUndefined",($,v)=>{X8.init($,v),y.init($,v),$._zod.processJSONSchema=(D,X,U)=>S9($,D,X,U)});function hI($){return X9(MW,$)}var PW=B("ZodNull",($,v)=>{G8.init($,v),y.init($,v),$._zod.processJSONSchema=(D,X,U)=>q9($,D,X,U)});function Sv($){return G9(PW,$)}var bW=B("ZodAny",($,v)=>{J8.init($,v),y.init($,v),$._zod.processJSONSchema=(D,X,U)=>T9($,D,X,U)});function mI(){return J9(bW)}var qW=B("ZodUnknown",($,v)=>{Q8.init($,v),y.init($,v),$._zod.processJSONSchema=(D,X,U)=>R9($,D,X,U)});function D$(){return Q9(qW)}var SW=B("ZodNever",($,v)=>{W8.init($,v),y.init($,v),$._zod.processJSONSchema=(D,X,U)=>E9($,D,X,U)});function AD($){return W9(SW,$)}var kW=B("ZodVoid",($,v)=>{z8.init($,v),y.init($,v),$._zod.processJSONSchema=(D,X,U)=>k9($,D,X,U)});function cI($){return z9(kW,$)}var kv=B("ZodDate",($,v)=>{Y8.init($,v),y.init($,v),$._zod.processJSONSchema=(X,U,G)=>g9($,X,U,G),$.min=(X,U)=>$.check(x$(X,U)),$.max=(X,U)=>$.check(e$(X,U));let D=$._zod.bag;$.minDate=D.minimum?new Date(D.minimum):null,$.maxDate=D.maximum?new Date(D.maximum):null});function dI($){return Y9(kv,$)}var EW=B("ZodArray",($,v)=>{I8.init($,v),y.init($,v),$._zod.processJSONSchema=(D,X,U)=>c9($,D,X,U),$.element=v.element,bv($,"ZodArray",{min(D,X){return this.check(i4(D,X))},nonempty(D){return this.check(i4(1,D))},max(D,X){return this.check(M6(D,X))},length(D,X){return this.check(P6(D,X))},unwrap(){return this.element}})});function c($,v){return K9(EW,$,v)}function rI($){let v=$._zod.def.shape;return M$(Object.keys(v))}var Ev=B("ZodObject",($,v)=>{V8.init($,v),y.init($,v),$._zod.processJSONSchema=(D,X,U)=>d9($,D,X,U),w.defineLazy($,"shape",()=>{return v.shape}),bv($,"ZodObject",{keyof(){return M$(Object.keys(this._zod.def.shape))},catchall(D){return this.clone({...this._zod.def,catchall:D})},passthrough(){return this.clone({...this._zod.def,catchall:D$()})},loose(){return this.clone({...this._zod.def,catchall:D$()})},strict(){return this.clone({...this._zod.def,catchall:AD()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(D){return w.extend(this,D)},safeExtend(D){return w.safeExtend(this,D)},merge(D){return w.merge(this,D)},pick(D){return w.pick(this,D)},omit(D){return w.omit(this,D)},partial(...D){return w.partial(MD,this,D[0])},required(...D){return w.required(PD,this,D[0])}})});function q($,v){let D={type:"object",shape:$??{},...w.normalizeParams(v)};return new Ev(D)}function pI($,v){return new Ev({type:"object",shape:$,catchall:AD(),...w.normalizeParams(v)})}function w$($,v){return new Ev({type:"object",shape:$,catchall:D$(),...w.normalizeParams(v)})}var Tv=B("ZodUnion",($,v)=>{Lv.init($,v),y.init($,v),$._zod.processJSONSchema=(D,X,U)=>pU($,D,X,U),$.options=v.options});function X$($,v){return new Tv({type:"union",options:$,...w.normalizeParams(v)})}var TW=B("ZodXor",($,v)=>{Tv.init($,v),K8.init($,v),$._zod.processJSONSchema=(D,X,U)=>pU($,D,X,U),$.options=v.options});function tI($,v){return new TW({type:"union",options:$,inclusive:!1,...w.normalizeParams(v)})}var RW=B("ZodDiscriminatedUnion",($,v)=>{Tv.init($,v),L8.init($,v)});function Rv($,v,D){return new RW({type:"union",options:v,discriminator:$,...w.normalizeParams(D)})}var gW=B("ZodIntersection",($,v)=>{B8.init($,v),y.init($,v),$._zod.processJSONSchema=(D,X,U)=>r9($,D,X,U)});function B1($,v){return new gW({type:"intersection",left:$,right:v})}var CW=B("ZodTuple",($,v)=>{OU.init($,v),y.init($,v),$._zod.processJSONSchema=(D,X,U)=>p9($,D,X,U),$.rest=(D)=>$.clone({...$._zod.def,rest:D})});function uW($,v,D){let X=v instanceof _,U=X?D:v;return new CW({type:"tuple",items:$,rest:X?v:null,...w.normalizeParams(U)})}var W1=B("ZodRecord",($,v)=>{N8.init($,v),y.init($,v),$._zod.processJSONSchema=(D,X,U)=>t9($,D,X,U),$.keyType=v.keyType,$.valueType=v.valueType});function s($,v,D){if(!v||!v._zod)return new W1({type:"record",keyType:H(),valueType:$,...w.normalizeParams(v)});return new W1({type:"record",keyType:$,valueType:v,...w.normalizeParams(D)})}function oI($,v,D){let X=C$($);return X._zod.values=void 0,new W1({type:"record",keyType:X,valueType:v,...w.normalizeParams(D)})}function aI($,v,D){return new W1({type:"record",keyType:$,valueType:v,mode:"loose",...w.normalizeParams(D)})}var xW=B("ZodMap",($,v)=>{Z8.init($,v),y.init($,v),$._zod.processJSONSchema=(D,X,U)=>h9($,D,X,U),$.keyType=v.keyType,$.valueType=v.valueType,$.min=(...D)=>$.check(q4(...D)),$.nonempty=(D)=>$.check(q4(1,D)),$.max=(...D)=>$.check(v6(...D)),$.size=(...D)=>$.check(w6(...D))});function eI($,v,D){return new xW({type:"map",keyType:$,valueType:v,...w.normalizeParams(D)})}var fW=B("ZodSet",($,v)=>{O8.init($,v),y.init($,v),$._zod.processJSONSchema=(D,X,U)=>m9($,D,X,U),$.min=(...D)=>$.check(q4(...D)),$.nonempty=(D)=>$.check(q4(1,D)),$.max=(...D)=>$.check(v6(...D)),$.size=(...D)=>$.check(w6(...D))});function sI($,v){return new fW({type:"set",valueType:$,...w.normalizeParams(v)})}var z1=B("ZodEnum",($,v)=>{H8.init($,v),y.init($,v),$._zod.processJSONSchema=(X,U,G)=>C9($,X,U,G),$.enum=v.entries,$.options=Object.values(v.entries);let D=new Set(Object.keys(v.entries));$.extract=(X,U)=>{let G={};for(let J of X)if(D.has(J))G[J]=v.entries[J];else throw Error(`Key ${J} not found in enum`);return new z1({...v,checks:[],...w.normalizeParams(U),entries:G})},$.exclude=(X,U)=>{let G={...v.entries};for(let J of X)if(D.has(J))delete G[J];else throw Error(`Key ${J} not found in enum`);return new z1({...v,checks:[],...w.normalizeParams(U),entries:G})}});function M$($,v){let D=Array.isArray($)?Object.fromEntries($.map((X)=>[X,X])):$;return new z1({type:"enum",entries:D,...w.normalizeParams(v)})}function $V($,v){return new z1({type:"enum",entries:$,...w.normalizeParams(v)})}var _W=B("ZodLiteral",($,v)=>{F8.init($,v),y.init($,v),$._zod.processJSONSchema=(D,X,U)=>u9($,D,X,U),$.values=new Set(v.values),Object.defineProperty($,"value",{get(){if(v.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return v.values[0]}})});function R($,v){return new _W({type:"literal",values:Array.isArray($)?$:[$],...w.normalizeParams(v)})}var iW=B("ZodFile",($,v)=>{j8.init($,v),y.init($,v),$._zod.processJSONSchema=(D,X,U)=>_9($,D,X,U),$.min=(D,X)=>$.check(q4(D,X)),$.max=(D,X)=>$.check(v6(D,X)),$.mime=(D,X)=>$.check($1(Array.isArray(D)?D:[D],X))});function vV($){return L9(iW,$)}var yW=B("ZodTransform",($,v)=>{A8.init($,v),y.init($,v),$._zod.processJSONSchema=(D,X,U)=>l9($,D,X,U),$._zod.parse=(D,X)=>{if(X.direction==="backward")throw new H6($.constructor.name);D.addIssue=(G)=>{if(typeof G==="string")D.issues.push(w.issue(G,D.value,v));else{let J=G;if(J.fatal)J.continue=!1;J.code??(J.code="custom"),J.input??(J.input=D.value),J.inst??(J.inst=$),D.issues.push(w.issue(J))}};let U=v.transform(D.value,D);if(U instanceof Promise)return U.then((G)=>{return D.value=G,D.fallback=!0,D});return D.value=U,D.fallback=!0,D}});function wD($){return new yW({type:"transform",transform:$})}var MD=B("ZodOptional",($,v)=>{HU.init($,v),y.init($,v),$._zod.processJSONSchema=(D,X,U)=>tU($,D,X,U),$.unwrap=()=>$._zod.def.innerType});function J$($){return new MD({type:"optional",innerType:$})}var nW=B("ZodExactOptional",($,v)=>{w8.init($,v),y.init($,v),$._zod.processJSONSchema=(D,X,U)=>tU($,D,X,U),$.unwrap=()=>$._zod.def.innerType});function lW($){return new nW({type:"optional",innerType:$})}var hW=B("ZodNullable",($,v)=>{M8.init($,v),y.init($,v),$._zod.processJSONSchema=(D,X,U)=>o9($,D,X,U),$.unwrap=()=>$._zod.def.innerType});function Pv($){return new hW({type:"nullable",innerType:$})}function UV($){return J$(Pv($))}var mW=B("ZodDefault",($,v)=>{P8.init($,v),y.init($,v),$._zod.processJSONSchema=(D,X,U)=>e9($,D,X,U),$.unwrap=()=>$._zod.def.innerType,$.removeDefault=$.unwrap});function cW($,v){return new mW({type:"default",innerType:$,get defaultValue(){return typeof v==="function"?v():w.shallowClone(v)}})}var dW=B("ZodPrefault",($,v)=>{b8.init($,v),y.init($,v),$._zod.processJSONSchema=(D,X,U)=>s9($,D,X,U),$.unwrap=()=>$._zod.def.innerType});function rW($,v){return new dW({type:"prefault",innerType:$,get defaultValue(){return typeof v==="function"?v():w.shallowClone(v)}})}var PD=B("ZodNonOptional",($,v)=>{q8.init($,v),y.init($,v),$._zod.processJSONSchema=(D,X,U)=>a9($,D,X,U),$.unwrap=()=>$._zod.def.innerType});function pW($,v){return new PD({type:"nonoptional",innerType:$,...w.normalizeParams(v)})}var tW=B("ZodSuccess",($,v)=>{S8.init($,v),y.init($,v),$._zod.processJSONSchema=(D,X,U)=>i9($,D,X,U),$.unwrap=()=>$._zod.def.innerType});function DV($){return new tW({type:"success",innerType:$})}var oW=B("ZodCatch",($,v)=>{k8.init($,v),y.init($,v),$._zod.processJSONSchema=(D,X,U)=>$W($,D,X,U),$.unwrap=()=>$._zod.def.innerType,$.removeCatch=$.unwrap});function aW($,v){return new oW({type:"catch",innerType:$,catchValue:typeof v==="function"?v:()=>v})}var eW=B("ZodNaN",($,v)=>{E8.init($,v),y.init($,v),$._zod.processJSONSchema=(D,X,U)=>x9($,D,X,U)});function XV($){return V9(eW,$)}var gv=B("ZodPipe",($,v)=>{FU.init($,v),y.init($,v),$._zod.processJSONSchema=(D,X,U)=>vW($,D,X,U),$.in=v.in,$.out=v.out});function DD($,v){return new gv({type:"pipe",in:$,out:v})}var Cv=B("ZodCodec",($,v)=>{gv.init($,v),Bv.init($,v)});function GV($,v,D){return new Cv({type:"pipe",in:$,out:v,transform:D.decode,reverseTransform:D.encode})}function JV($){let v=$._zod.def;return new Cv({type:"pipe",in:v.out,out:v.in,transform:v.reverseTransform,reverseTransform:v.transform})}var sW=B("ZodPreprocess",($,v)=>{gv.init($,v),T8.init($,v)}),$z=B("ZodReadonly",($,v)=>{R8.init($,v),y.init($,v),$._zod.processJSONSchema=(D,X,U)=>UW($,D,X,U),$.unwrap=()=>$._zod.def.innerType});function vz($){return new $z({type:"readonly",innerType:$})}var Uz=B("ZodTemplateLiteral",($,v)=>{g8.init($,v),y.init($,v),$._zod.processJSONSchema=(D,X,U)=>f9($,D,X,U)});function QV($,v){return new Uz({type:"template_literal",parts:$,...w.normalizeParams(v)})}var Dz=B("ZodLazy",($,v)=>{x8.init($,v),y.init($,v),$._zod.processJSONSchema=(D,X,U)=>XW($,D,X,U),$.unwrap=()=>$._zod.def.getter()});function Xz($){return new Dz({type:"lazy",getter:$})}var Gz=B("ZodPromise",($,v)=>{u8.init($,v),y.init($,v),$._zod.processJSONSchema=(D,X,U)=>DW($,D,X,U),$.unwrap=()=>$._zod.def.innerType});function WV($){return new Gz({type:"promise",innerType:$})}var Jz=B("ZodFunction",($,v)=>{C8.init($,v),y.init($,v),$._zod.processJSONSchema=(D,X,U)=>n9($,D,X,U)});function zV($){return new Jz({type:"function",input:Array.isArray($?.input)?uW($?.input):$?.input??c(D$()),output:$?.output??D$()})}var uv=B("ZodCustom",($,v)=>{f8.init($,v),y.init($,v),$._zod.processJSONSchema=(D,X,U)=>y9($,D,X,U)});function YV($){let v=new G$({check:"custom"});return v._zod.check=$,v}function bD($,v){return B9(uv,$??(()=>!0),v)}function Qz($,v={}){return N9(uv,$,v)}function Wz($,v){return Z9($,v)}var IV=O9,VV=H9;function KV($,v={}){let D=new uv({type:"custom",check:"custom",fn:(X)=>X instanceof $,abort:!0,...w.normalizeParams(v)});return D._zod.bag.Class=$,D._zod.check=(X)=>{if(!(X.value instanceof $))X.issues.push({code:"invalid_type",expected:$.name,input:X.value,inst:D,path:[...D._zod.def.path??[]]})},D}var LV=(...$)=>F9({Codec:Cv,Boolean:K1,String:Y1},...$);function BV($){let v=Xz(()=>{return X$([H($),t(),K$(),Sv(),c(v),s(H(),v)])});return v}function xv($,v){return new sW({type:"pipe",in:wD($),out:v})}var gA={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 CA($){V$({customError:$})}function uA(){return V$().customError}var zz;(function($){})(zz||(zz={}));var P={...wv,...aU,iso:G6},xA=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 fA($,v){let D=$.$schema;if(D==="https://json-schema.org/draft/2020-12/schema")return"draft-2020-12";if(D==="http://json-schema.org/draft-07/schema#")return"draft-7";if(D==="http://json-schema.org/draft-04/schema#")return"draft-4";return v??"draft-2020-12"}function _A($,v){if(!$.startsWith("#"))throw Error("External $ref is not supported, only local refs (#/...) are allowed");let D=$.slice(1).split("/").filter(Boolean);if(D.length===0)return v.rootSchema;let X=v.version==="draft-2020-12"?"$defs":"definitions";if(D[0]===X){let U=D[1];if(!U||!v.defs[U])throw Error(`Reference not found: ${$}`);return v.defs[U]}throw Error(`Reference not found: ${$}`)}function NV($,v){if($.not!==void 0){if(typeof $.not==="object"&&Object.keys($.not).length===0)return P.never();throw Error("not is not supported in Zod (except { not: {} } for never)")}if($.unevaluatedItems!==void 0)throw Error("unevaluatedItems is not supported");if($.unevaluatedProperties!==void 0)throw Error("unevaluatedProperties is not supported");if($.if!==void 0||$.then!==void 0||$.else!==void 0)throw Error("Conditional schemas (if/then/else) are not supported");if($.dependentSchemas!==void 0||$.dependentRequired!==void 0)throw Error("dependentSchemas and dependentRequired are not supported");if($.$ref){let U=$.$ref;if(v.refs.has(U))return v.refs.get(U);if(v.processing.has(U))return P.lazy(()=>{if(!v.refs.has(U))throw Error(`Circular reference not resolved: ${U}`);return v.refs.get(U)});v.processing.add(U);let G=_A(U,v),J=E$(G,v);return v.refs.set(U,J),v.processing.delete(U),J}if($.enum!==void 0){let U=$.enum;if(v.version==="openapi-3.0"&&$.nullable===!0&&U.length===1&&U[0]===null)return P.null();if(U.length===0)return P.never();if(U.length===1)return P.literal(U[0]);if(U.every((J)=>typeof J==="string"))return P.enum(U);let G=U.map((J)=>P.literal(J));if(G.length<2)return G[0];return P.union([G[0],G[1],...G.slice(2)])}if($.const!==void 0)return P.literal($.const);let D=$.type;if(Array.isArray(D)){let U=D.map((G)=>{let J={...$,type:G};return NV(J,v)});if(U.length===0)return P.never();if(U.length===1)return U[0];return P.union(U)}if(!D)return P.any();let X;switch(D){case"string":{let U=P.string();if($.format){let G=$.format;if(G==="email")U=U.check(P.email());else if(G==="uri"||G==="uri-reference")U=U.check(P.url());else if(G==="uuid"||G==="guid")U=U.check(P.uuid());else if(G==="date-time")U=U.check(P.iso.datetime());else if(G==="date")U=U.check(P.iso.date());else if(G==="time")U=U.check(P.iso.time());else if(G==="duration")U=U.check(P.iso.duration());else if(G==="ipv4")U=U.check(P.ipv4());else if(G==="ipv6")U=U.check(P.ipv6());else if(G==="mac")U=U.check(P.mac());else if(G==="cidr")U=U.check(P.cidrv4());else if(G==="cidr-v6")U=U.check(P.cidrv6());else if(G==="base64")U=U.check(P.base64());else if(G==="base64url")U=U.check(P.base64url());else if(G==="e164")U=U.check(P.e164());else if(G==="jwt")U=U.check(P.jwt());else if(G==="emoji")U=U.check(P.emoji());else if(G==="nanoid")U=U.check(P.nanoid());else if(G==="cuid")U=U.check(P.cuid());else if(G==="cuid2")U=U.check(P.cuid2());else if(G==="ulid")U=U.check(P.ulid());else if(G==="xid")U=U.check(P.xid());else if(G==="ksuid")U=U.check(P.ksuid())}if(typeof $.minLength==="number")U=U.min($.minLength);if(typeof $.maxLength==="number")U=U.max($.maxLength);if($.pattern)U=U.regex(new RegExp($.pattern));X=U;break}case"number":case"integer":{let U=D==="integer"?P.number().int():P.number();if(typeof $.minimum==="number")U=U.min($.minimum);if(typeof $.maximum==="number")U=U.max($.maximum);if(typeof $.exclusiveMinimum==="number")U=U.gt($.exclusiveMinimum);else if($.exclusiveMinimum===!0&&typeof $.minimum==="number")U=U.gt($.minimum);if(typeof $.exclusiveMaximum==="number")U=U.lt($.exclusiveMaximum);else if($.exclusiveMaximum===!0&&typeof $.maximum==="number")U=U.lt($.maximum);if(typeof $.multipleOf==="number")U=U.multipleOf($.multipleOf);X=U;break}case"boolean":{X=P.boolean();break}case"null":{X=P.null();break}case"object":{let U={},G=$.properties||{},J=new Set($.required||[]);for(let[W,z]of Object.entries(G)){let Y=E$(z,v);U[W]=J.has(W)?Y:Y.optional()}if($.propertyNames){let W=E$($.propertyNames,v),z=$.additionalProperties&&typeof $.additionalProperties==="object"?E$($.additionalProperties,v):P.any();if(Object.keys(U).length===0){X=P.record(W,z);break}let Y=P.object(U).passthrough(),I=P.looseRecord(W,z);X=P.intersection(Y,I);break}if($.patternProperties){let W=$.patternProperties,z=Object.keys(W),Y=[];for(let V of z){let K=E$(W[V],v),L=P.string().regex(new RegExp(V));Y.push(P.looseRecord(L,K))}let I=[];if(Object.keys(U).length>0)I.push(P.object(U).passthrough());if(I.push(...Y),I.length===0)X=P.object({}).passthrough();else if(I.length===1)X=I[0];else{let V=P.intersection(I[0],I[1]);for(let K=2;K<I.length;K++)V=P.intersection(V,I[K]);X=V}break}let Q=P.object(U);if($.additionalProperties===!1)X=Q.strict();else if(typeof $.additionalProperties==="object")X=Q.catchall(E$($.additionalProperties,v));else X=Q.passthrough();break}case"array":{let{prefixItems:U,items:G}=$;if(U&&Array.isArray(U)){let J=U.map((W)=>E$(W,v)),Q=G&&typeof G==="object"&&!Array.isArray(G)?E$(G,v):void 0;if(Q)X=P.tuple(J).rest(Q);else X=P.tuple(J);if(typeof $.minItems==="number")X=X.check(P.minLength($.minItems));if(typeof $.maxItems==="number")X=X.check(P.maxLength($.maxItems))}else if(Array.isArray(G)){let J=G.map((W)=>E$(W,v)),Q=$.additionalItems&&typeof $.additionalItems==="object"?E$($.additionalItems,v):void 0;if(Q)X=P.tuple(J).rest(Q);else X=P.tuple(J);if(typeof $.minItems==="number")X=X.check(P.minLength($.minItems));if(typeof $.maxItems==="number")X=X.check(P.maxLength($.maxItems))}else if(G!==void 0){let J=E$(G,v),Q=P.array(J);if(typeof $.minItems==="number")Q=Q.min($.minItems);if(typeof $.maxItems==="number")Q=Q.max($.maxItems);X=Q}else X=P.array(P.any());break}default:throw Error(`Unsupported type: ${D}`)}return X}function E$($,v){if(typeof $==="boolean")return $?P.any():P.never();let D=NV($,v),X=$.type||$.enum!==void 0||$.const!==void 0;if($.anyOf&&Array.isArray($.anyOf)){let Q=$.anyOf.map((z)=>E$(z,v)),W=P.union(Q);D=X?P.intersection(D,W):W}if($.oneOf&&Array.isArray($.oneOf)){let Q=$.oneOf.map((z)=>E$(z,v)),W=P.xor(Q);D=X?P.intersection(D,W):W}if($.allOf&&Array.isArray($.allOf))if($.allOf.length===0)D=X?D:P.any();else{let Q=X?D:E$($.allOf[0],v),W=X?0:1;for(let z=W;z<$.allOf.length;z++)Q=P.intersection(Q,E$($.allOf[z],v));D=Q}if($.nullable===!0&&v.version==="openapi-3.0")D=P.nullable(D);if($.readOnly===!0)D=P.readonly(D);if($.default!==void 0)D=D.default($.default);let U={},G=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(let Q of G)if(Q in $)U[Q]=$[Q];let J=["contentEncoding","contentMediaType","contentSchema"];for(let Q of J)if(Q in $)U[Q]=$[Q];for(let Q of Object.keys($))if(!xA.has(Q))U[Q]=$[Q];if(Object.keys(U).length>0)v.registry.add(D,U);if($.description)D=D.describe($.description);return D}function ZV($,v){if(typeof $==="boolean")return $?P.any():P.never();let D;try{D=JSON.parse(JSON.stringify($))}catch{throw Error("fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas")}let X=fA(D,v?.defaultTarget),U=D.$defs||D.definitions||{},G={version:X,defs:U,refs:new Map,processing:new Set,rootSchema:D,registry:v?.registry??A$};return E$(D,G)}var Yz={};C4(Yz,{string:()=>iA,number:()=>yA,date:()=>hA,boolean:()=>nA,bigint:()=>lA});function iA($){return fQ(Y1,$)}function yA($){return cQ(V1,$)}function nA($){return eQ(K1,$)}function lA($){return $9(L1,$)}function hA($){return I9(kv,$)}V$(Nv());var Iz="2025-11-25",OV="2025-03-26",Z1=[Iz,"2025-06-18","2025-03-26","2024-11-05","2024-10-07"],J6="io.modelcontextprotocol/related-task",SD="2.0",Z$=bD(($)=>$!==null&&(typeof $==="object"||typeof $==="function")),HV=X$([H(),t().int()]),FV=H(),an=w$({ttl:t().optional(),pollInterval:t().optional()}),mA=q({ttl:t().optional()}),cA=q({taskId:H()}),Vz=w$({progressToken:HV.optional(),[J6]:cA.optional()}),s$=q({_meta:Vz.optional()}),fv=s$.extend({task:mA.optional()}),jV=($)=>fv.safeParse($).success,P$=q({method:H(),params:s$.loose().optional()}),U4=q({_meta:Vz.optional()}),D4=q({method:H(),params:U4.loose().optional()}),b$=w$({_meta:Vz.optional()}),kD=X$([H(),t().int()]),AV=q({jsonrpc:R(SD),id:kD,...P$.shape}).strict(),Q6=($)=>AV.safeParse($).success,wV=q({jsonrpc:R(SD),...D4.shape}).strict(),MV=($)=>wV.safeParse($).success,Kz=q({jsonrpc:R(SD),id:kD,result:b$}).strict(),n4=($)=>Kz.safeParse($).success;var f;(function($){$[$.ConnectionClosed=-32000]="ConnectionClosed",$[$.RequestTimeout=-32001]="RequestTimeout",$[$.ParseError=-32700]="ParseError",$[$.InvalidRequest=-32600]="InvalidRequest",$[$.MethodNotFound=-32601]="MethodNotFound",$[$.InvalidParams=-32602]="InvalidParams",$[$.InternalError=-32603]="InternalError",$[$.UrlElicitationRequired=-32042]="UrlElicitationRequired"})(f||(f={}));var Lz=q({jsonrpc:R(SD),id:kD.optional(),error:q({code:t().int(),message:H(),data:D$().optional()})}).strict();var O1=($)=>Lz.safeParse($).success;var _v=X$([AV,wV,Kz,Lz]),en=X$([Kz,Lz]),ED=b$.strict(),dA=U4.extend({requestId:kD.optional(),reason:H().optional()}),TD=D4.extend({method:R("notifications/cancelled"),params:dA}),rA=q({src:H(),mimeType:H().optional(),sizes:c(H()).optional(),theme:M$(["light","dark"]).optional()}),iv=q({icons:c(rA).optional()}),N1=q({name:H(),title:H().optional()}),PV=N1.extend({...N1.shape,...iv.shape,version:H(),websiteUrl:H().optional(),description:H().optional()}),pA=B1(q({applyDefaults:K$().optional()}),s(H(),D$())),tA=xv(($)=>{if($&&typeof $==="object"&&!Array.isArray($)){if(Object.keys($).length===0)return{form:{}}}return $},B1(q({form:pA.optional(),url:Z$.optional()}),s(H(),D$()).optional())),oA=w$({list:Z$.optional(),cancel:Z$.optional(),requests:w$({sampling:w$({createMessage:Z$.optional()}).optional(),elicitation:w$({create:Z$.optional()}).optional()}).optional()}),aA=w$({list:Z$.optional(),cancel:Z$.optional(),requests:w$({tools:w$({call:Z$.optional()}).optional()}).optional()}),eA=q({experimental:s(H(),Z$).optional(),sampling:q({context:Z$.optional(),tools:Z$.optional()}).optional(),elicitation:tA.optional(),roots:q({listChanged:K$().optional()}).optional(),tasks:oA.optional(),extensions:s(H(),Z$).optional()}),sA=s$.extend({protocolVersion:H(),capabilities:eA,clientInfo:PV}),RD=P$.extend({method:R("initialize"),params:sA}),Bz=($)=>RD.safeParse($).success,$w=q({experimental:s(H(),Z$).optional(),logging:Z$.optional(),completions:Z$.optional(),prompts:q({listChanged:K$().optional()}).optional(),resources:q({subscribe:K$().optional(),listChanged:K$().optional()}).optional(),tools:q({listChanged:K$().optional()}).optional(),tasks:aA.optional(),extensions:s(H(),Z$).optional()}),vw=b$.extend({protocolVersion:H(),capabilities:$w,serverInfo:PV,instructions:H().optional()}),Nz=D4.extend({method:R("notifications/initialized"),params:U4.optional()});var gD=P$.extend({method:R("ping"),params:s$.optional()}),Uw=q({progress:t(),total:J$(t()),message:J$(H())}),Dw=q({...U4.shape,...Uw.shape,progressToken:HV}),CD=D4.extend({method:R("notifications/progress"),params:Dw}),Xw=s$.extend({cursor:FV.optional()}),yv=P$.extend({params:Xw.optional()}),nv=b$.extend({nextCursor:FV.optional()}),Gw=M$(["working","input_required","completed","failed","cancelled"]),lv=q({taskId:H(),status:Gw,ttl:X$([t(),Sv()]),createdAt:H(),lastUpdatedAt:H(),pollInterval:J$(t()),statusMessage:J$(H())}),H1=b$.extend({task:lv}),Jw=U4.merge(lv),hv=D4.extend({method:R("notifications/tasks/status"),params:Jw}),uD=P$.extend({method:R("tasks/get"),params:s$.extend({taskId:H()})}),xD=b$.merge(lv),fD=P$.extend({method:R("tasks/result"),params:s$.extend({taskId:H()})}),sn=b$.loose(),_D=yv.extend({method:R("tasks/list")}),iD=nv.extend({tasks:c(lv)}),yD=P$.extend({method:R("tasks/cancel"),params:s$.extend({taskId:H()})}),bV=b$.merge(lv),qV=q({uri:H(),mimeType:J$(H()),_meta:s(H(),D$()).optional()}),SV=qV.extend({text:H()}),Zz=H().refine(($)=>{try{return atob($),!0}catch{return!1}},{message:"Invalid Base64 string"}),kV=qV.extend({blob:Zz}),mv=M$(["user","assistant"]),F1=q({audience:c(mv).optional(),priority:t().min(0).max(1).optional(),lastModified:G6.datetime({offset:!0}).optional()}),EV=q({...N1.shape,...iv.shape,uri:H(),description:J$(H()),mimeType:J$(H()),size:J$(t()),annotations:F1.optional(),_meta:J$(w$({}))}),Qw=q({...N1.shape,...iv.shape,uriTemplate:H(),description:J$(H()),mimeType:J$(H()),annotations:F1.optional(),_meta:J$(w$({}))}),cv=yv.extend({method:R("resources/list")}),Ww=nv.extend({resources:c(EV)}),zw=yv.extend({method:R("resources/templates/list")}),Yw=nv.extend({resourceTemplates:c(Qw)}),Oz=s$.extend({uri:H()}),Iw=Oz,dv=P$.extend({method:R("resources/read"),params:Iw}),Vw=b$.extend({contents:c(X$([SV,kV]))}),Kw=D4.extend({method:R("notifications/resources/list_changed"),params:U4.optional()}),Lw=Oz,Bw=P$.extend({method:R("resources/subscribe"),params:Lw}),Nw=Oz,Zw=P$.extend({method:R("resources/unsubscribe"),params:Nw}),Ow=U4.extend({uri:H()}),Hw=D4.extend({method:R("notifications/resources/updated"),params:Ow}),Fw=q({name:H(),description:J$(H()),required:J$(K$())}),jw=q({...N1.shape,...iv.shape,description:J$(H()),arguments:J$(c(Fw)),_meta:J$(w$({}))}),rv=yv.extend({method:R("prompts/list")}),Aw=nv.extend({prompts:c(jw)}),ww=s$.extend({name:H(),arguments:s(H(),H()).optional()}),pv=P$.extend({method:R("prompts/get"),params:ww}),Hz=q({type:R("text"),text:H(),annotations:F1.optional(),_meta:s(H(),D$()).optional()}),Fz=q({type:R("image"),data:Zz,mimeType:H(),annotations:F1.optional(),_meta:s(H(),D$()).optional()}),jz=q({type:R("audio"),data:Zz,mimeType:H(),annotations:F1.optional(),_meta:s(H(),D$()).optional()}),Mw=q({type:R("tool_use"),name:H(),id:H(),input:s(H(),D$()),_meta:s(H(),D$()).optional()}),Pw=q({type:R("resource"),resource:X$([SV,kV]),annotations:F1.optional(),_meta:s(H(),D$()).optional()}),bw=EV.extend({type:R("resource_link")}),Az=X$([Hz,Fz,jz,bw,Pw]),qw=q({role:mv,content:Az}),Sw=b$.extend({description:H().optional(),messages:c(qw)}),kw=D4.extend({method:R("notifications/prompts/list_changed"),params:U4.optional()}),Ew=q({title:H().optional(),readOnlyHint:K$().optional(),destructiveHint:K$().optional(),idempotentHint:K$().optional(),openWorldHint:K$().optional()}),Tw=q({taskSupport:M$(["required","optional","forbidden"]).optional()}),TV=q({...N1.shape,...iv.shape,description:H().optional(),inputSchema:q({type:R("object"),properties:s(H(),Z$).optional(),required:c(H()).optional()}).catchall(D$()),outputSchema:q({type:R("object"),properties:s(H(),Z$).optional(),required:c(H()).optional()}).catchall(D$()).optional(),annotations:Ew.optional(),execution:Tw.optional(),_meta:s(H(),D$()).optional()}),tv=yv.extend({method:R("tools/list")}),Rw=nv.extend({tools:c(TV)}),nD=b$.extend({content:c(Az).default([]),structuredContent:s(H(),D$()).optional(),isError:K$().optional()}),$l=nD.or(b$.extend({toolResult:D$()})),gw=fv.extend({name:H(),arguments:s(H(),D$()).optional()}),q6=P$.extend({method:R("tools/call"),params:gw}),Cw=D4.extend({method:R("notifications/tools/list_changed"),params:U4.optional()}),vl=q({autoRefresh:K$().default(!0),debounceMs:t().int().nonnegative().default(300)}),ov=M$(["debug","info","notice","warning","error","critical","alert","emergency"]),uw=s$.extend({level:ov}),wz=P$.extend({method:R("logging/setLevel"),params:uw}),xw=U4.extend({level:ov,logger:H().optional(),data:D$()}),fw=D4.extend({method:R("notifications/message"),params:xw}),_w=q({name:H().optional()}),iw=q({hints:c(_w).optional(),costPriority:t().min(0).max(1).optional(),speedPriority:t().min(0).max(1).optional(),intelligencePriority:t().min(0).max(1).optional()}),yw=q({mode:M$(["auto","required","none"]).optional()}),nw=q({type:R("tool_result"),toolUseId:H().describe("The unique identifier for the corresponding tool call."),content:c(Az).default([]),structuredContent:q({}).loose().optional(),isError:K$().optional(),_meta:s(H(),D$()).optional()}),lw=Rv("type",[Hz,Fz,jz]),qD=Rv("type",[Hz,Fz,jz,Mw,nw]),hw=q({role:mv,content:X$([qD,c(qD)]),_meta:s(H(),D$()).optional()}),mw=fv.extend({messages:c(hw),modelPreferences:iw.optional(),systemPrompt:H().optional(),includeContext:M$(["none","thisServer","allServers"]).optional(),temperature:t().optional(),maxTokens:t().int(),stopSequences:c(H()).optional(),metadata:Z$.optional(),tools:c(TV).optional(),toolChoice:yw.optional()}),cw=P$.extend({method:R("sampling/createMessage"),params:mw}),av=b$.extend({model:H(),stopReason:J$(M$(["endTurn","stopSequence","maxTokens"]).or(H())),role:mv,content:lw}),Mz=b$.extend({model:H(),stopReason:J$(M$(["endTurn","stopSequence","maxTokens","toolUse"]).or(H())),role:mv,content:X$([qD,c(qD)])}),dw=q({type:R("boolean"),title:H().optional(),description:H().optional(),default:K$().optional()}),rw=q({type:R("string"),title:H().optional(),description:H().optional(),minLength:t().optional(),maxLength:t().optional(),format:M$(["email","uri","date","date-time"]).optional(),default:H().optional()}),pw=q({type:M$(["number","integer"]),title:H().optional(),description:H().optional(),minimum:t().optional(),maximum:t().optional(),default:t().optional()}),tw=q({type:R("string"),title:H().optional(),description:H().optional(),enum:c(H()),default:H().optional()}),ow=q({type:R("string"),title:H().optional(),description:H().optional(),oneOf:c(q({const:H(),title:H()})),default:H().optional()}),aw=q({type:R("string"),title:H().optional(),description:H().optional(),enum:c(H()),enumNames:c(H()).optional(),default:H().optional()}),ew=X$([tw,ow]),sw=q({type:R("array"),title:H().optional(),description:H().optional(),minItems:t().optional(),maxItems:t().optional(),items:q({type:R("string"),enum:c(H())}),default:c(H()).optional()}),$M=q({type:R("array"),title:H().optional(),description:H().optional(),minItems:t().optional(),maxItems:t().optional(),items:q({anyOf:c(q({const:H(),title:H()}))}),default:c(H()).optional()}),vM=X$([sw,$M]),UM=X$([aw,ew,vM]),DM=X$([UM,dw,rw,pw]),XM=fv.extend({mode:R("form").optional(),message:H(),requestedSchema:q({type:R("object"),properties:s(H(),DM),required:c(H()).optional()})}),GM=fv.extend({mode:R("url"),message:H(),elicitationId:H(),url:H().url()}),JM=X$([XM,GM]),QM=P$.extend({method:R("elicitation/create"),params:JM}),WM=U4.extend({elicitationId:H()}),zM=D4.extend({method:R("notifications/elicitation/complete"),params:WM}),j1=b$.extend({action:M$(["accept","decline","cancel"]),content:xv(($)=>$===null?void 0:$,s(H(),X$([H(),t(),K$(),c(H())])).optional())}),YM=q({type:R("ref/resource"),uri:H()});var IM=q({type:R("ref/prompt"),name:H()}),VM=s$.extend({ref:X$([IM,YM]),argument:q({name:H(),value:H()}),context:q({arguments:s(H(),H()).optional()}).optional()}),KM=P$.extend({method:R("completion/complete"),params:VM});var LM=b$.extend({completion:w$({values:c(H()).max(100),total:J$(t().int()),hasMore:J$(K$())})}),BM=q({uri:H().startsWith("file://"),name:H().optional(),_meta:s(H(),D$()).optional()}),NM=P$.extend({method:R("roots/list"),params:s$.optional()}),Pz=b$.extend({roots:c(BM)}),ZM=D4.extend({method:R("notifications/roots/list_changed"),params:U4.optional()}),Ul=X$([gD,RD,KM,wz,pv,rv,cv,zw,dv,Bw,Zw,q6,tv,uD,fD,_D,yD]),Dl=X$([TD,CD,Nz,ZM,hv]),Xl=X$([ED,av,Mz,j1,Pz,xD,iD,H1]),Gl=X$([gD,cw,QM,NM,uD,fD,_D,yD]),Jl=X$([TD,CD,fw,Hw,Kw,Cw,kw,hv,zM]),Ql=X$([ED,vw,LM,Sw,Aw,Ww,Yw,Vw,nD,Rw,xD,iD,H1]);class x extends Error{constructor($,v,D){super(`MCP error ${$}: ${v}`);this.code=$,this.data=D,this.name="McpError"}static fromError($,v,D){if($===f.UrlElicitationRequired&&D){let X=D;if(X.elicitations)return new RV(X.elicitations,v)}return new x($,v,D)}}class RV extends x{constructor($,v=`URL elicitation${$.length>1?"s":""} required`){super(f.UrlElicitationRequired,v,{elicitations:$})}get elicitations(){return this.data?.elicitations??[]}}class bz{constructor($={}){this._started=!1,this._hasHandledRequest=!1,this._streamMapping=new Map,this._requestToStreamMapping=new Map,this._requestResponseMap=new Map,this._initialized=!1,this._enableJsonResponse=!1,this._standaloneSseStreamId="_GET_stream",this.sessionIdGenerator=$.sessionIdGenerator,this._enableJsonResponse=$.enableJsonResponse??!1,this._eventStore=$.eventStore,this._onsessioninitialized=$.onsessioninitialized,this._onsessionclosed=$.onsessionclosed,this._allowedHosts=$.allowedHosts,this._allowedOrigins=$.allowedOrigins,this._enableDnsRebindingProtection=$.enableDnsRebindingProtection??!1,this._retryInterval=$.retryInterval}async start(){if(this._started)throw Error("Transport already started");this._started=!0}createJsonErrorResponse($,v,D,X){let U={code:v,message:D};if(X?.data!==void 0)U.data=X.data;return new Response(JSON.stringify({jsonrpc:"2.0",error:U,id:null}),{status:$,headers:{"Content-Type":"application/json",...X?.headers}})}validateRequestHeaders($){if(!this._enableDnsRebindingProtection)return;if(this._allowedHosts&&this._allowedHosts.length>0){let v=$.headers.get("host");if(!v||!this._allowedHosts.includes(v)){let D=`Invalid Host header: ${v}`;return this.onerror?.(Error(D)),this.createJsonErrorResponse(403,-32000,D)}}if(this._allowedOrigins&&this._allowedOrigins.length>0){let v=$.headers.get("origin");if(v&&!this._allowedOrigins.includes(v)){let D=`Invalid Origin header: ${v}`;return this.onerror?.(Error(D)),this.createJsonErrorResponse(403,-32000,D)}}return}async handleRequest($,v){if(!this.sessionIdGenerator&&this._hasHandledRequest)throw Error("Stateless transport cannot be reused across requests. Create a new transport per request.");this._hasHandledRequest=!0;let D=this.validateRequestHeaders($);if(D)return D;switch($.method){case"POST":return this.handlePostRequest($,v);case"GET":return this.handleGetRequest($);case"DELETE":return this.handleDeleteRequest($);default:return this.handleUnsupportedRequest()}}async writePrimingEvent($,v,D,X){if(!this._eventStore)return;if(X<"2025-11-25")return;let U=await this._eventStore.storeEvent(D,{}),G=`id: ${U}
|
|
92
|
+
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let J of $.seen.entries()){let Q=J[1];if(v===J[0]){G(J);continue}if($.external){let z=$.external.registry.get(J[0])?.id;if(v!==J[0]&&z){G(J);continue}}if($.metadataRegistry.get(J[0])?.id){G(J);continue}if(Q.cycle){G(J);continue}if(Q.count>1){if($.reused==="ref"){G(J);continue}}}}function X6($,v){let D=$.seen.get(v);if(!D)throw Error("Unprocessed schema. This is a bug in Zod.");let X=(Q)=>{let W=$.seen.get(Q);if(W.ref===null)return;let z=W.def??W.schema,Y={...z},I=W.ref;if(W.ref=null,I){X(I);let K=$.seen.get(I),L=K.schema;if(L.$ref&&($.target==="draft-07"||$.target==="draft-04"||$.target==="openapi-3.0"))z.allOf=z.allOf??[],z.allOf.push(L);else Object.assign(z,L);if(Object.assign(z,Y),Q._zod.parent===I)for(let Z in z){if(Z==="$ref"||Z==="allOf")continue;if(!(Z in Y))delete z[Z]}if(L.$ref&&K.def)for(let Z in z){if(Z==="$ref"||Z==="allOf")continue;if(Z in K.def&&JSON.stringify(z[Z])===JSON.stringify(K.def[Z]))delete z[Z]}}let V=Q._zod.parent;if(V&&V!==I){X(V);let K=$.seen.get(V);if(K?.schema.$ref){if(z.$ref=K.schema.$ref,K.def)for(let L in z){if(L==="$ref"||L==="allOf")continue;if(L in K.def&&JSON.stringify(z[L])===JSON.stringify(K.def[L]))delete z[L]}}}$.override({zodSchema:Q,jsonSchema:z,path:W.path??[]})};for(let Q of[...$.seen.entries()].reverse())X(Q[0]);let U={};if($.target==="draft-2020-12")U.$schema="https://json-schema.org/draft/2020-12/schema";else if($.target==="draft-07")U.$schema="http://json-schema.org/draft-07/schema#";else if($.target==="draft-04")U.$schema="http://json-schema.org/draft-04/schema#";else if($.target==="openapi-3.0");if($.external?.uri){let Q=$.external.registry.get(v)?.id;if(!Q)throw Error("Schema is missing an `id` property");U.$id=$.external.uri(Q)}Object.assign(U,D.def??D.schema);let G=$.metadataRegistry.get(v)?.id;if(G!==void 0&&U.id===G)delete U.id;let J=$.external?.defs??{};for(let Q of $.seen.entries()){let W=Q[1];if(W.def&&W.defId){if(W.def.id===W.defId)delete W.def.id;J[W.defId]=W.def}}if($.external);else if(Object.keys(J).length>0)if($.target==="draft-2020-12")U.$defs=J;else U.definitions=J;try{let Q=JSON.parse(JSON.stringify(U));return Object.defineProperty(Q,"~standard",{value:{...v["~standard"],jsonSchema:{input:Q1(v,"input",$.processors),output:Q1(v,"output",$.processors)}},enumerable:!1,writable:!1}),Q}catch(Q){throw Error("Error converting schema to JSON.")}}function x$($,v){let D=v??{seen:new Set};if(D.seen.has($))return!1;D.seen.add($);let X=$._zod.def;if(X.type==="transform")return!0;if(X.type==="array")return x$(X.element,D);if(X.type==="set")return x$(X.valueType,D);if(X.type==="lazy")return x$(X.getter(),D);if(X.type==="promise"||X.type==="optional"||X.type==="nonoptional"||X.type==="nullable"||X.type==="readonly"||X.type==="default"||X.type==="prefault")return x$(X.innerType,D);if(X.type==="intersection")return x$(X.left,D)||x$(X.right,D);if(X.type==="record"||X.type==="map")return x$(X.keyType,D)||x$(X.valueType,D);if(X.type==="pipe"){if($._zod.traits.has("$ZodCodec"))return!0;return x$(X.in,D)||x$(X.out,D)}if(X.type==="object"){for(let U in X.shape)if(x$(X.shape[U],D))return!0;return!1}if(X.type==="union"){for(let U of X.options)if(x$(U,D))return!0;return!1}if(X.type==="tuple"){for(let U of X.items)if(x$(U,D))return!0;if(X.rest&&x$(X.rest,D))return!0;return!1}return!1}var j9=($,v={})=>(D)=>{let X=U6({...D,processors:v});return e($,X),D6(X,$),X6(X,$)},Q1=($,v,D={})=>(X)=>{let{libraryOptions:U,target:G}=X??{},J=U6({...U??{},target:G,io:v,processors:D});return e($,J),D6(J,$),X6(J,$)};var kA={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},A9=($,v,D,X)=>{let U=D;U.type="string";let{minimum:G,maximum:J,format:Q,patterns:W,contentEncoding:z}=$._zod.bag;if(typeof G==="number")U.minLength=G;if(typeof J==="number")U.maxLength=J;if(Q){if(U.format=kA[Q]??Q,U.format==="")delete U.format;if(Q==="time")delete U.format}if(z)U.contentEncoding=z;if(W&&W.size>0){let Y=[...W];if(Y.length===1)U.pattern=Y[0].source;else if(Y.length>1)U.allOf=[...Y.map((I)=>({...v.target==="draft-07"||v.target==="draft-04"||v.target==="openapi-3.0"?{type:"string"}:{},pattern:I.source}))]}},w9=($,v,D,X)=>{let U=D,{minimum:G,maximum:J,format:Q,multipleOf:W,exclusiveMaximum:z,exclusiveMinimum:Y}=$._zod.bag;if(typeof Q==="string"&&Q.includes("int"))U.type="integer";else U.type="number";let I=typeof Y==="number"&&Y>=(G??Number.NEGATIVE_INFINITY),V=typeof z==="number"&&z<=(J??Number.POSITIVE_INFINITY),K=v.target==="draft-04"||v.target==="openapi-3.0";if(I)if(K)U.minimum=Y,U.exclusiveMinimum=!0;else U.exclusiveMinimum=Y;else if(typeof G==="number")U.minimum=G;if(V)if(K)U.maximum=z,U.exclusiveMaximum=!0;else U.exclusiveMaximum=z;else if(typeof J==="number")U.maximum=J;if(typeof W==="number")U.multipleOf=W},M9=($,v,D,X)=>{D.type="boolean"},P9=($,v,D,X)=>{if(v.unrepresentable==="throw")throw Error("BigInt cannot be represented in JSON Schema")},b9=($,v,D,X)=>{if(v.unrepresentable==="throw")throw Error("Symbols cannot be represented in JSON Schema")},q9=($,v,D,X)=>{if(v.target==="openapi-3.0")D.type="string",D.nullable=!0,D.enum=[null];else D.type="null"},S9=($,v,D,X)=>{if(v.unrepresentable==="throw")throw Error("Undefined cannot be represented in JSON Schema")},k9=($,v,D,X)=>{if(v.unrepresentable==="throw")throw Error("Void cannot be represented in JSON Schema")},E9=($,v,D,X)=>{D.not={}},T9=($,v,D,X)=>{},R9=($,v,D,X)=>{},g9=($,v,D,X)=>{if(v.unrepresentable==="throw")throw Error("Date cannot be represented in JSON Schema")},C9=($,v,D,X)=>{let U=$._zod.def,G=s1(U.entries);if(G.every((J)=>typeof J==="number"))D.type="number";if(G.every((J)=>typeof J==="string"))D.type="string";D.enum=G},u9=($,v,D,X)=>{let U=$._zod.def,G=[];for(let J of U.values)if(J===void 0){if(v.unrepresentable==="throw")throw Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof J==="bigint")if(v.unrepresentable==="throw")throw Error("BigInt literals cannot be represented in JSON Schema");else G.push(Number(J));else G.push(J);if(G.length===0);else if(G.length===1){let J=G[0];if(D.type=J===null?"null":typeof J,v.target==="draft-04"||v.target==="openapi-3.0")D.enum=[J];else D.const=J}else{if(G.every((J)=>typeof J==="number"))D.type="number";if(G.every((J)=>typeof J==="string"))D.type="string";if(G.every((J)=>typeof J==="boolean"))D.type="boolean";if(G.every((J)=>J===null))D.type="null";D.enum=G}},x9=($,v,D,X)=>{if(v.unrepresentable==="throw")throw Error("NaN cannot be represented in JSON Schema")},f9=($,v,D,X)=>{let U=D,G=$._zod.pattern;if(!G)throw Error("Pattern not found in template literal");U.type="string",U.pattern=G.source},_9=($,v,D,X)=>{let U=D,G={type:"string",format:"binary",contentEncoding:"binary"},{minimum:J,maximum:Q,mime:W}=$._zod.bag;if(J!==void 0)G.minLength=J;if(Q!==void 0)G.maxLength=Q;if(W)if(W.length===1)G.contentMediaType=W[0],Object.assign(U,G);else Object.assign(U,G),U.anyOf=W.map((z)=>({contentMediaType:z}));else Object.assign(U,G)},i9=($,v,D,X)=>{D.type="boolean"},y9=($,v,D,X)=>{if(v.unrepresentable==="throw")throw Error("Custom types cannot be represented in JSON Schema")},n9=($,v,D,X)=>{if(v.unrepresentable==="throw")throw Error("Function types cannot be represented in JSON Schema")},l9=($,v,D,X)=>{if(v.unrepresentable==="throw")throw Error("Transforms cannot be represented in JSON Schema")},h9=($,v,D,X)=>{if(v.unrepresentable==="throw")throw Error("Map cannot be represented in JSON Schema")},m9=($,v,D,X)=>{if(v.unrepresentable==="throw")throw Error("Set cannot be represented in JSON Schema")},c9=($,v,D,X)=>{let U=D,G=$._zod.def,{minimum:J,maximum:Q}=$._zod.bag;if(typeof J==="number")U.minItems=J;if(typeof Q==="number")U.maxItems=Q;U.type="array",U.items=e(G.element,v,{...X,path:[...X.path,"items"]})},d9=($,v,D,X)=>{let U=D,G=$._zod.def;U.type="object",U.properties={};let J=G.shape;for(let z in J)U.properties[z]=e(J[z],v,{...X,path:[...X.path,"properties",z]});let Q=new Set(Object.keys(J)),W=new Set([...Q].filter((z)=>{let Y=G.shape[z]._zod;if(v.io==="input")return Y.optin===void 0;else return Y.optout===void 0}));if(W.size>0)U.required=Array.from(W);if(G.catchall?._zod.def.type==="never")U.additionalProperties=!1;else if(!G.catchall){if(v.io==="output")U.additionalProperties=!1}else if(G.catchall)U.additionalProperties=e(G.catchall,v,{...X,path:[...X.path,"additionalProperties"]})},pU=($,v,D,X)=>{let U=$._zod.def,G=U.inclusive===!1,J=U.options.map((Q,W)=>e(Q,v,{...X,path:[...X.path,G?"oneOf":"anyOf",W]}));if(G)D.oneOf=J;else D.anyOf=J},r9=($,v,D,X)=>{let U=$._zod.def,G=e(U.left,v,{...X,path:[...X.path,"allOf",0]}),J=e(U.right,v,{...X,path:[...X.path,"allOf",1]}),Q=(z)=>("allOf"in z)&&Object.keys(z).length===1,W=[...Q(G)?G.allOf:[G],...Q(J)?J.allOf:[J]];D.allOf=W},p9=($,v,D,X)=>{let U=D,G=$._zod.def;U.type="array";let J=v.target==="draft-2020-12"?"prefixItems":"items",Q=v.target==="draft-2020-12"?"items":v.target==="openapi-3.0"?"items":"additionalItems",W=G.items.map((V,K)=>e(V,v,{...X,path:[...X.path,J,K]})),z=G.rest?e(G.rest,v,{...X,path:[...X.path,Q,...v.target==="openapi-3.0"?[G.items.length]:[]]}):null;if(v.target==="draft-2020-12"){if(U.prefixItems=W,z)U.items=z}else if(v.target==="openapi-3.0"){if(U.items={anyOf:W},z)U.items.anyOf.push(z);if(U.minItems=W.length,!z)U.maxItems=W.length}else if(U.items=W,z)U.additionalItems=z;let{minimum:Y,maximum:I}=$._zod.bag;if(typeof Y==="number")U.minItems=Y;if(typeof I==="number")U.maxItems=I},t9=($,v,D,X)=>{let U=D,G=$._zod.def;U.type="object";let J=G.keyType,W=J._zod.bag?.patterns;if(G.mode==="loose"&&W&&W.size>0){let Y=e(G.valueType,v,{...X,path:[...X.path,"patternProperties","*"]});U.patternProperties={};for(let I of W)U.patternProperties[I.source]=Y}else{if(v.target==="draft-07"||v.target==="draft-2020-12")U.propertyNames=e(G.keyType,v,{...X,path:[...X.path,"propertyNames"]});U.additionalProperties=e(G.valueType,v,{...X,path:[...X.path,"additionalProperties"]})}let z=J._zod.values;if(z){let Y=[...z].filter((I)=>typeof I==="string"||typeof I==="number");if(Y.length>0)U.required=Y}},o9=($,v,D,X)=>{let U=$._zod.def,G=e(U.innerType,v,X),J=v.seen.get($);if(v.target==="openapi-3.0")J.ref=U.innerType,D.nullable=!0;else D.anyOf=[G,{type:"null"}]},a9=($,v,D,X)=>{let U=$._zod.def;e(U.innerType,v,X);let G=v.seen.get($);G.ref=U.innerType},e9=($,v,D,X)=>{let U=$._zod.def;e(U.innerType,v,X);let G=v.seen.get($);G.ref=U.innerType,D.default=JSON.parse(JSON.stringify(U.defaultValue))},s9=($,v,D,X)=>{let U=$._zod.def;e(U.innerType,v,X);let G=v.seen.get($);if(G.ref=U.innerType,v.io==="input")D._prefault=JSON.parse(JSON.stringify(U.defaultValue))},$W=($,v,D,X)=>{let U=$._zod.def;e(U.innerType,v,X);let G=v.seen.get($);G.ref=U.innerType;let J;try{J=U.catchValue(void 0)}catch{throw Error("Dynamic catch values are not supported in JSON Schema")}D.default=J},vW=($,v,D,X)=>{let U=$._zod.def,G=U.in._zod.traits.has("$ZodTransform"),J=v.io==="input"?G?U.out:U.in:U.out;e(J,v,X);let Q=v.seen.get($);Q.ref=J},UW=($,v,D,X)=>{let U=$._zod.def;e(U.innerType,v,X);let G=v.seen.get($);G.ref=U.innerType,D.readOnly=!0},DW=($,v,D,X)=>{let U=$._zod.def;e(U.innerType,v,X);let G=v.seen.get($);G.ref=U.innerType},tU=($,v,D,X)=>{let U=$._zod.def;e(U.innerType,v,X);let G=v.seen.get($);G.ref=U.innerType},XW=($,v,D,X)=>{let U=$._zod.innerType;e(U,v,X);let G=v.seen.get($);G.ref=U},rU={string:A9,number:w9,boolean:M9,bigint:P9,symbol:b9,null:q9,undefined:S9,void:k9,never:E9,any:T9,unknown:R9,date:g9,enum:C9,literal:u9,nan:x9,template_literal:f9,file:_9,success:i9,custom:y9,function:n9,transform:l9,map:h9,set:m9,array:c9,object:d9,union:pU,intersection:r9,tuple:p9,record:t9,nullable:o9,nonoptional:a9,default:e9,prefault:s9,catch:$W,pipe:vW,readonly:UW,promise:DW,optional:tU,lazy:XW};function oU($,v){if("_idmap"in $){let X=$,U=U6({...v,processors:rU}),G={};for(let W of X._idmap.entries()){let[z,Y]=W;e(Y,U)}let J={},Q={registry:X,uri:v?.uri,defs:G};U.external=Q;for(let W of X._idmap.entries()){let[z,Y]=W;D6(U,Y),J[z]=X6(U,Y)}if(Object.keys(G).length>0){let W=U.target==="draft-2020-12"?"$defs":"definitions";J.__shared={[W]:G}}return{schemas:J}}let D=U6({...v,processors:rU});return e($,D),D6(D,$),X6(D,$)}class GW{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($){this.ctx.counter=$}get seen(){return this.ctx.seen}constructor($){let v=$?.target??"draft-2020-12";if(v==="draft-4")v="draft-04";if(v==="draft-7")v="draft-07";this.ctx=U6({processors:rU,target:v,...$?.metadata&&{metadata:$.metadata},...$?.unrepresentable&&{unrepresentable:$.unrepresentable},...$?.override&&{override:$.override},...$?.io&&{io:$.io}})}process($,v={path:[],schemaPath:[]}){return e($,this.ctx,v)}emit($,v){if(v){if(v.cycles)this.ctx.cycles=v.cycles;if(v.reused)this.ctx.reused=v.reused;if(v.external)this.ctx.external=v.external}D6(this.ctx,$);let D=X6(this.ctx,$),{"~standard":X,...U}=D;return U}}var XI={};var wv={};C4(wv,{xor:()=>tI,xid:()=>FI,void:()=>cI,uuidv7:()=>VI,uuidv6:()=>II,uuidv4:()=>YI,uuid:()=>zI,url:()=>KI,unknown:()=>D$,union:()=>X$,undefined:()=>hI,ulid:()=>HI,uint64:()=>nI,uint32:()=>_I,tuple:()=>uW,transform:()=>wD,templateLiteral:()=>QV,symbol:()=>lI,superRefine:()=>Wz,success:()=>DV,stringbool:()=>LV,stringFormat:()=>TI,string:()=>H,strictObject:()=>pI,set:()=>sI,refine:()=>Qz,record:()=>s,readonly:()=>vz,promise:()=>WV,preprocess:()=>xv,prefault:()=>rW,pipe:()=>DD,partialRecord:()=>oI,optional:()=>J$,object:()=>q,number:()=>t,nullish:()=>UV,nullable:()=>Pv,null:()=>Sv,nonoptional:()=>pW,never:()=>AD,nativeEnum:()=>$V,nanoid:()=>NI,nan:()=>XV,meta:()=>VV,map:()=>eI,mac:()=>wI,looseRecord:()=>aI,looseObject:()=>w$,literal:()=>R,lazy:()=>Xz,ksuid:()=>jI,keyof:()=>rI,jwt:()=>EI,json:()=>BV,ipv6:()=>MI,ipv4:()=>AI,invertCodec:()=>JV,intersection:()=>B1,int64:()=>yI,int32:()=>fI,int:()=>UD,instanceof:()=>KV,httpUrl:()=>LI,hostname:()=>RI,hex:()=>gI,hash:()=>CI,guid:()=>WI,function:()=>zV,float64:()=>xI,float32:()=>uI,file:()=>vV,exactOptional:()=>lW,enum:()=>M$,emoji:()=>BI,email:()=>QI,e164:()=>kI,discriminatedUnion:()=>Rv,describe:()=>IV,date:()=>dI,custom:()=>bD,cuid2:()=>OI,cuid:()=>ZI,codec:()=>GV,cidrv6:()=>bI,cidrv4:()=>PI,check:()=>YV,catch:()=>aW,boolean:()=>K$,bigint:()=>iI,base64url:()=>SI,base64:()=>qI,array:()=>c,any:()=>mI,_function:()=>zV,_default:()=>cW,_ZodString:()=>XD,ZodXor:()=>TW,ZodXID:()=>ID,ZodVoid:()=>kW,ZodUnknown:()=>qW,ZodUnion:()=>Tv,ZodUndefined:()=>MW,ZodUUID:()=>S4,ZodURL:()=>qv,ZodULID:()=>YD,ZodType:()=>y,ZodTuple:()=>CW,ZodTransform:()=>yW,ZodTemplateLiteral:()=>Uz,ZodSymbol:()=>wW,ZodSuccess:()=>tW,ZodStringFormat:()=>U$,ZodString:()=>Y1,ZodSet:()=>fW,ZodRecord:()=>W1,ZodReadonly:()=>$z,ZodPromise:()=>Gz,ZodPreprocess:()=>sW,ZodPrefault:()=>dW,ZodPipe:()=>gv,ZodOptional:()=>MD,ZodObject:()=>Ev,ZodNumberFormat:()=>b6,ZodNumber:()=>V1,ZodNullable:()=>hW,ZodNull:()=>PW,ZodNonOptional:()=>PD,ZodNever:()=>SW,ZodNanoID:()=>QD,ZodNaN:()=>eW,ZodMap:()=>xW,ZodMAC:()=>AW,ZodLiteral:()=>_W,ZodLazy:()=>Dz,ZodKSUID:()=>VD,ZodJWT:()=>FD,ZodIntersection:()=>gW,ZodIPv6:()=>LD,ZodIPv4:()=>KD,ZodGUID:()=>Mv,ZodFunction:()=>Jz,ZodFile:()=>iW,ZodExactOptional:()=>nW,ZodEnum:()=>z1,ZodEmoji:()=>JD,ZodEmail:()=>GD,ZodE164:()=>HD,ZodDiscriminatedUnion:()=>RW,ZodDefault:()=>mW,ZodDate:()=>kv,ZodCustomStringFormat:()=>I1,ZodCustom:()=>uv,ZodCodec:()=>Cv,ZodCatch:()=>oW,ZodCUID2:()=>zD,ZodCUID:()=>WD,ZodCIDRv6:()=>ND,ZodCIDRv4:()=>BD,ZodBoolean:()=>K1,ZodBigIntFormat:()=>jD,ZodBigInt:()=>L1,ZodBase64URL:()=>OD,ZodBase64:()=>ZD,ZodArray:()=>EW,ZodAny:()=>bW});var aU={};C4(aU,{uppercase:()=>o6,trim:()=>U1,toUpperCase:()=>X1,toLowerCase:()=>D1,startsWith:()=>e6,slugify:()=>G1,size:()=>w6,regex:()=>p6,property:()=>dU,positive:()=>lU,overwrite:()=>I4,normalize:()=>v1,nonpositive:()=>mU,nonnegative:()=>cU,negative:()=>hU,multipleOf:()=>$6,minSize:()=>q4,minLength:()=>i4,mime:()=>$1,maxSize:()=>v6,maxLength:()=>M6,lte:()=>e$,lt:()=>P4,lowercase:()=>t6,length:()=>P6,includes:()=>a6,gte:()=>u$,gt:()=>b4,endsWith:()=>s6});var G6={};C4(G6,{time:()=>WW,duration:()=>zW,datetime:()=>JW,date:()=>QW,ZodISOTime:()=>$D,ZodISODuration:()=>vD,ZodISODateTime:()=>eU,ZodISODate:()=>sU});var eU=B("ZodISODateTime",($,v)=>{yJ.init($,v),U$.init($,v)});function JW($){return yQ(eU,$)}var sU=B("ZodISODate",($,v)=>{nJ.init($,v),U$.init($,v)});function QW($){return nQ(sU,$)}var $D=B("ZodISOTime",($,v)=>{lJ.init($,v),U$.init($,v)});function WW($){return lQ($D,$)}var vD=B("ZodISODuration",($,v)=>{hJ.init($,v),U$.init($,v)});function zW($){return hQ(vD,$)}var GI=($,v)=>{Xv.init($,v),$.name="ZodError",Object.defineProperties($,{format:{value:(D)=>Jv($,D)},flatten:{value:(D)=>Gv($,D)},addIssue:{value:(D)=>{$.issues.push(D),$.message=JSON.stringify($.issues,_6,2)}},addIssues:{value:(D)=>{$.issues.push(...D),$.message=JSON.stringify($.issues,_6,2)}},isEmpty:{get(){return $.issues.length===0}}})},TA=B("ZodError",GI),h$=B("ZodError",GI,{Parent:Error});var YW=n6(h$),IW=l6(h$),VW=h6(h$),KW=c6(h$),LW=$U(h$),BW=vU(h$),NW=UU(h$),ZW=DU(h$),OW=XU(h$),HW=GU(h$),FW=JU(h$),jW=QU(h$);var JI=new WeakMap;function bv($,v,D){let X=Object.getPrototypeOf($),U=JI.get(X);if(!U)U=new Set,JI.set(X,U);if(U.has(v))return;U.add(v);for(let G in D){let J=D[G];Object.defineProperty(X,G,{configurable:!0,enumerable:!1,get(){let Q=J.bind(this);return Object.defineProperty(this,G,{configurable:!0,writable:!0,enumerable:!0,value:Q}),Q},set(Q){Object.defineProperty(this,G,{configurable:!0,writable:!0,enumerable:!0,value:Q})}})}}var y=B("ZodType",($,v)=>{return _.init($,v),Object.assign($["~standard"],{jsonSchema:{input:Q1($,"input"),output:Q1($,"output")}}),$.toJSONSchema=j9($,{}),$.def=v,$.type=v.type,Object.defineProperty($,"_def",{value:v}),$.parse=(D,X)=>YW($,D,X,{callee:$.parse}),$.safeParse=(D,X)=>VW($,D,X),$.parseAsync=async(D,X)=>IW($,D,X,{callee:$.parseAsync}),$.safeParseAsync=async(D,X)=>KW($,D,X),$.spa=$.safeParseAsync,$.encode=(D,X)=>LW($,D,X),$.decode=(D,X)=>BW($,D,X),$.encodeAsync=async(D,X)=>NW($,D,X),$.decodeAsync=async(D,X)=>ZW($,D,X),$.safeEncode=(D,X)=>OW($,D,X),$.safeDecode=(D,X)=>HW($,D,X),$.safeEncodeAsync=async(D,X)=>FW($,D,X),$.safeDecodeAsync=async(D,X)=>jW($,D,X),bv($,"ZodType",{check(...D){let X=this.def;return this.clone(w.mergeDefs(X,{checks:[...X.checks??[],...D.map((U)=>typeof U==="function"?{_zod:{check:U,def:{check:"custom"},onattach:[]}}:U)]}),{parent:!0})},with(...D){return this.check(...D)},clone(D,X){return g$(this,D,X)},brand(){return this},register(D,X){return D.add(this,X),this},refine(D,X){return this.check(Qz(D,X))},superRefine(D,X){return this.check(Wz(D,X))},overwrite(D){return this.check(I4(D))},optional(){return J$(this)},exactOptional(){return lW(this)},nullable(){return Pv(this)},nullish(){return J$(Pv(this))},nonoptional(D){return pW(this,D)},array(){return c(this)},or(D){return X$([this,D])},and(D){return B1(this,D)},transform(D){return DD(this,wD(D))},default(D){return cW(this,D)},prefault(D){return rW(this,D)},catch(D){return aW(this,D)},pipe(D){return DD(this,D)},readonly(){return vz(this)},describe(D){let X=this.clone();return A$.add(X,{description:D}),X},meta(...D){if(D.length===0)return A$.get(this);let X=this.clone();return A$.add(X,D[0]),X},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(D){return D(this)}}),Object.defineProperty($,"description",{get(){return A$.get($)?.description},configurable:!0}),$}),XD=B("_ZodString",($,v)=>{A6.init($,v),y.init($,v),$._zod.processJSONSchema=(X,U,G)=>A9($,X,U,G);let D=$._zod.bag;$.format=D.format??null,$.minLength=D.minimum??null,$.maxLength=D.maximum??null,bv($,"_ZodString",{regex(...X){return this.check(p6(...X))},includes(...X){return this.check(a6(...X))},startsWith(...X){return this.check(e6(...X))},endsWith(...X){return this.check(s6(...X))},min(...X){return this.check(i4(...X))},max(...X){return this.check(M6(...X))},length(...X){return this.check(P6(...X))},nonempty(...X){return this.check(i4(1,...X))},lowercase(X){return this.check(t6(X))},uppercase(X){return this.check(o6(X))},trim(){return this.check(U1())},normalize(...X){return this.check(v1(...X))},toLowerCase(){return this.check(D1())},toUpperCase(){return this.check(X1())},slugify(){return this.check(G1())}})}),Y1=B("ZodString",($,v)=>{A6.init($,v),XD.init($,v),$.email=(D)=>$.check(AU(GD,D)),$.url=(D)=>$.check(Av(qv,D)),$.jwt=(D)=>$.check(nU(FD,D)),$.emoji=(D)=>$.check(qU(JD,D)),$.guid=(D)=>$.check(jv(Mv,D)),$.uuid=(D)=>$.check(wU(S4,D)),$.uuidv4=(D)=>$.check(MU(S4,D)),$.uuidv6=(D)=>$.check(PU(S4,D)),$.uuidv7=(D)=>$.check(bU(S4,D)),$.nanoid=(D)=>$.check(SU(QD,D)),$.guid=(D)=>$.check(jv(Mv,D)),$.cuid=(D)=>$.check(kU(WD,D)),$.cuid2=(D)=>$.check(EU(zD,D)),$.ulid=(D)=>$.check(TU(YD,D)),$.base64=(D)=>$.check(_U(ZD,D)),$.base64url=(D)=>$.check(iU(OD,D)),$.xid=(D)=>$.check(RU(ID,D)),$.ksuid=(D)=>$.check(gU(VD,D)),$.ipv4=(D)=>$.check(CU(KD,D)),$.ipv6=(D)=>$.check(uU(LD,D)),$.cidrv4=(D)=>$.check(xU(BD,D)),$.cidrv6=(D)=>$.check(fU(ND,D)),$.e164=(D)=>$.check(yU(HD,D)),$.datetime=(D)=>$.check(JW(D)),$.date=(D)=>$.check(QW(D)),$.time=(D)=>$.check(WW(D)),$.duration=(D)=>$.check(zW(D))});function H($){return xQ(Y1,$)}var U$=B("ZodStringFormat",($,v)=>{v$.init($,v),XD.init($,v)}),GD=B("ZodEmail",($,v)=>{TJ.init($,v),U$.init($,v)});function QI($){return AU(GD,$)}var Mv=B("ZodGUID",($,v)=>{kJ.init($,v),U$.init($,v)});function WI($){return jv(Mv,$)}var S4=B("ZodUUID",($,v)=>{EJ.init($,v),U$.init($,v)});function zI($){return wU(S4,$)}function YI($){return MU(S4,$)}function II($){return PU(S4,$)}function VI($){return bU(S4,$)}var qv=B("ZodURL",($,v)=>{RJ.init($,v),U$.init($,v)});function KI($){return Av(qv,$)}function LI($){return Av(qv,{protocol:a$.httpProtocol,hostname:a$.domain,...w.normalizeParams($)})}var JD=B("ZodEmoji",($,v)=>{gJ.init($,v),U$.init($,v)});function BI($){return qU(JD,$)}var QD=B("ZodNanoID",($,v)=>{CJ.init($,v),U$.init($,v)});function NI($){return SU(QD,$)}var WD=B("ZodCUID",($,v)=>{uJ.init($,v),U$.init($,v)});function ZI($){return kU(WD,$)}var zD=B("ZodCUID2",($,v)=>{xJ.init($,v),U$.init($,v)});function OI($){return EU(zD,$)}var YD=B("ZodULID",($,v)=>{fJ.init($,v),U$.init($,v)});function HI($){return TU(YD,$)}var ID=B("ZodXID",($,v)=>{_J.init($,v),U$.init($,v)});function FI($){return RU(ID,$)}var VD=B("ZodKSUID",($,v)=>{iJ.init($,v),U$.init($,v)});function jI($){return gU(VD,$)}var KD=B("ZodIPv4",($,v)=>{mJ.init($,v),U$.init($,v)});function AI($){return CU(KD,$)}var AW=B("ZodMAC",($,v)=>{dJ.init($,v),U$.init($,v)});function wI($){return _Q(AW,$)}var LD=B("ZodIPv6",($,v)=>{cJ.init($,v),U$.init($,v)});function MI($){return uU(LD,$)}var BD=B("ZodCIDRv4",($,v)=>{rJ.init($,v),U$.init($,v)});function PI($){return xU(BD,$)}var ND=B("ZodCIDRv6",($,v)=>{pJ.init($,v),U$.init($,v)});function bI($){return fU(ND,$)}var ZD=B("ZodBase64",($,v)=>{oJ.init($,v),U$.init($,v)});function qI($){return _U(ZD,$)}var OD=B("ZodBase64URL",($,v)=>{aJ.init($,v),U$.init($,v)});function SI($){return iU(OD,$)}var HD=B("ZodE164",($,v)=>{eJ.init($,v),U$.init($,v)});function kI($){return yU(HD,$)}var FD=B("ZodJWT",($,v)=>{sJ.init($,v),U$.init($,v)});function EI($){return nU(FD,$)}var I1=B("ZodCustomStringFormat",($,v)=>{$8.init($,v),U$.init($,v)});function TI($,v,D={}){return J1(I1,$,v,D)}function RI($){return J1(I1,"hostname",a$.hostname,$)}function gI($){return J1(I1,"hex",a$.hex,$)}function CI($,v){let D=v?.enc??"hex",X=`${$}_${D}`,U=a$[X];if(!U)throw Error(`Unrecognized hash format: ${X}`);return J1(I1,X,U,v)}var V1=B("ZodNumber",($,v)=>{NU.init($,v),y.init($,v),$._zod.processJSONSchema=(X,U,G)=>w9($,X,U,G),bv($,"ZodNumber",{gt(X,U){return this.check(b4(X,U))},gte(X,U){return this.check(u$(X,U))},min(X,U){return this.check(u$(X,U))},lt(X,U){return this.check(P4(X,U))},lte(X,U){return this.check(e$(X,U))},max(X,U){return this.check(e$(X,U))},int(X){return this.check(UD(X))},safe(X){return this.check(UD(X))},positive(X){return this.check(b4(0,X))},nonnegative(X){return this.check(u$(0,X))},negative(X){return this.check(P4(0,X))},nonpositive(X){return this.check(e$(0,X))},multipleOf(X,U){return this.check($6(X,U))},step(X,U){return this.check($6(X,U))},finite(){return this}});let D=$._zod.bag;$.minValue=Math.max(D.minimum??Number.NEGATIVE_INFINITY,D.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,$.maxValue=Math.min(D.maximum??Number.POSITIVE_INFINITY,D.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,$.isInt=(D.format??"").includes("int")||Number.isSafeInteger(D.multipleOf??0.5),$.isFinite=!0,$.format=D.format??null});function t($){return mQ(V1,$)}var b6=B("ZodNumberFormat",($,v)=>{v8.init($,v),V1.init($,v)});function UD($){return dQ(b6,$)}function uI($){return rQ(b6,$)}function xI($){return pQ(b6,$)}function fI($){return tQ(b6,$)}function _I($){return oQ(b6,$)}var K1=B("ZodBoolean",($,v)=>{Kv.init($,v),y.init($,v),$._zod.processJSONSchema=(D,X,U)=>M9($,D,X,U)});function K$($){return aQ(K1,$)}var L1=B("ZodBigInt",($,v)=>{ZU.init($,v),y.init($,v),$._zod.processJSONSchema=(X,U,G)=>P9($,X,U,G),$.gte=(X,U)=>$.check(u$(X,U)),$.min=(X,U)=>$.check(u$(X,U)),$.gt=(X,U)=>$.check(b4(X,U)),$.gte=(X,U)=>$.check(u$(X,U)),$.min=(X,U)=>$.check(u$(X,U)),$.lt=(X,U)=>$.check(P4(X,U)),$.lte=(X,U)=>$.check(e$(X,U)),$.max=(X,U)=>$.check(e$(X,U)),$.positive=(X)=>$.check(b4(BigInt(0),X)),$.negative=(X)=>$.check(P4(BigInt(0),X)),$.nonpositive=(X)=>$.check(e$(BigInt(0),X)),$.nonnegative=(X)=>$.check(u$(BigInt(0),X)),$.multipleOf=(X,U)=>$.check($6(X,U));let D=$._zod.bag;$.minValue=D.minimum??null,$.maxValue=D.maximum??null,$.format=D.format??null});function iI($){return sQ(L1,$)}var jD=B("ZodBigIntFormat",($,v)=>{U8.init($,v),L1.init($,v)});function yI($){return v9(jD,$)}function nI($){return U9(jD,$)}var wW=B("ZodSymbol",($,v)=>{D8.init($,v),y.init($,v),$._zod.processJSONSchema=(D,X,U)=>b9($,D,X,U)});function lI($){return D9(wW,$)}var MW=B("ZodUndefined",($,v)=>{X8.init($,v),y.init($,v),$._zod.processJSONSchema=(D,X,U)=>S9($,D,X,U)});function hI($){return X9(MW,$)}var PW=B("ZodNull",($,v)=>{G8.init($,v),y.init($,v),$._zod.processJSONSchema=(D,X,U)=>q9($,D,X,U)});function Sv($){return G9(PW,$)}var bW=B("ZodAny",($,v)=>{J8.init($,v),y.init($,v),$._zod.processJSONSchema=(D,X,U)=>T9($,D,X,U)});function mI(){return J9(bW)}var qW=B("ZodUnknown",($,v)=>{Q8.init($,v),y.init($,v),$._zod.processJSONSchema=(D,X,U)=>R9($,D,X,U)});function D$(){return Q9(qW)}var SW=B("ZodNever",($,v)=>{W8.init($,v),y.init($,v),$._zod.processJSONSchema=(D,X,U)=>E9($,D,X,U)});function AD($){return W9(SW,$)}var kW=B("ZodVoid",($,v)=>{z8.init($,v),y.init($,v),$._zod.processJSONSchema=(D,X,U)=>k9($,D,X,U)});function cI($){return z9(kW,$)}var kv=B("ZodDate",($,v)=>{Y8.init($,v),y.init($,v),$._zod.processJSONSchema=(X,U,G)=>g9($,X,U,G),$.min=(X,U)=>$.check(u$(X,U)),$.max=(X,U)=>$.check(e$(X,U));let D=$._zod.bag;$.minDate=D.minimum?new Date(D.minimum):null,$.maxDate=D.maximum?new Date(D.maximum):null});function dI($){return Y9(kv,$)}var EW=B("ZodArray",($,v)=>{I8.init($,v),y.init($,v),$._zod.processJSONSchema=(D,X,U)=>c9($,D,X,U),$.element=v.element,bv($,"ZodArray",{min(D,X){return this.check(i4(D,X))},nonempty(D){return this.check(i4(1,D))},max(D,X){return this.check(M6(D,X))},length(D,X){return this.check(P6(D,X))},unwrap(){return this.element}})});function c($,v){return K9(EW,$,v)}function rI($){let v=$._zod.def.shape;return M$(Object.keys(v))}var Ev=B("ZodObject",($,v)=>{V8.init($,v),y.init($,v),$._zod.processJSONSchema=(D,X,U)=>d9($,D,X,U),w.defineLazy($,"shape",()=>{return v.shape}),bv($,"ZodObject",{keyof(){return M$(Object.keys(this._zod.def.shape))},catchall(D){return this.clone({...this._zod.def,catchall:D})},passthrough(){return this.clone({...this._zod.def,catchall:D$()})},loose(){return this.clone({...this._zod.def,catchall:D$()})},strict(){return this.clone({...this._zod.def,catchall:AD()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(D){return w.extend(this,D)},safeExtend(D){return w.safeExtend(this,D)},merge(D){return w.merge(this,D)},pick(D){return w.pick(this,D)},omit(D){return w.omit(this,D)},partial(...D){return w.partial(MD,this,D[0])},required(...D){return w.required(PD,this,D[0])}})});function q($,v){let D={type:"object",shape:$??{},...w.normalizeParams(v)};return new Ev(D)}function pI($,v){return new Ev({type:"object",shape:$,catchall:AD(),...w.normalizeParams(v)})}function w$($,v){return new Ev({type:"object",shape:$,catchall:D$(),...w.normalizeParams(v)})}var Tv=B("ZodUnion",($,v)=>{Lv.init($,v),y.init($,v),$._zod.processJSONSchema=(D,X,U)=>pU($,D,X,U),$.options=v.options});function X$($,v){return new Tv({type:"union",options:$,...w.normalizeParams(v)})}var TW=B("ZodXor",($,v)=>{Tv.init($,v),K8.init($,v),$._zod.processJSONSchema=(D,X,U)=>pU($,D,X,U),$.options=v.options});function tI($,v){return new TW({type:"union",options:$,inclusive:!1,...w.normalizeParams(v)})}var RW=B("ZodDiscriminatedUnion",($,v)=>{Tv.init($,v),L8.init($,v)});function Rv($,v,D){return new RW({type:"union",options:v,discriminator:$,...w.normalizeParams(D)})}var gW=B("ZodIntersection",($,v)=>{B8.init($,v),y.init($,v),$._zod.processJSONSchema=(D,X,U)=>r9($,D,X,U)});function B1($,v){return new gW({type:"intersection",left:$,right:v})}var CW=B("ZodTuple",($,v)=>{OU.init($,v),y.init($,v),$._zod.processJSONSchema=(D,X,U)=>p9($,D,X,U),$.rest=(D)=>$.clone({...$._zod.def,rest:D})});function uW($,v,D){let X=v instanceof _,U=X?D:v;return new CW({type:"tuple",items:$,rest:X?v:null,...w.normalizeParams(U)})}var W1=B("ZodRecord",($,v)=>{N8.init($,v),y.init($,v),$._zod.processJSONSchema=(D,X,U)=>t9($,D,X,U),$.keyType=v.keyType,$.valueType=v.valueType});function s($,v,D){if(!v||!v._zod)return new W1({type:"record",keyType:H(),valueType:$,...w.normalizeParams(v)});return new W1({type:"record",keyType:$,valueType:v,...w.normalizeParams(D)})}function oI($,v,D){let X=g$($);return X._zod.values=void 0,new W1({type:"record",keyType:X,valueType:v,...w.normalizeParams(D)})}function aI($,v,D){return new W1({type:"record",keyType:$,valueType:v,mode:"loose",...w.normalizeParams(D)})}var xW=B("ZodMap",($,v)=>{Z8.init($,v),y.init($,v),$._zod.processJSONSchema=(D,X,U)=>h9($,D,X,U),$.keyType=v.keyType,$.valueType=v.valueType,$.min=(...D)=>$.check(q4(...D)),$.nonempty=(D)=>$.check(q4(1,D)),$.max=(...D)=>$.check(v6(...D)),$.size=(...D)=>$.check(w6(...D))});function eI($,v,D){return new xW({type:"map",keyType:$,valueType:v,...w.normalizeParams(D)})}var fW=B("ZodSet",($,v)=>{O8.init($,v),y.init($,v),$._zod.processJSONSchema=(D,X,U)=>m9($,D,X,U),$.min=(...D)=>$.check(q4(...D)),$.nonempty=(D)=>$.check(q4(1,D)),$.max=(...D)=>$.check(v6(...D)),$.size=(...D)=>$.check(w6(...D))});function sI($,v){return new fW({type:"set",valueType:$,...w.normalizeParams(v)})}var z1=B("ZodEnum",($,v)=>{H8.init($,v),y.init($,v),$._zod.processJSONSchema=(X,U,G)=>C9($,X,U,G),$.enum=v.entries,$.options=Object.values(v.entries);let D=new Set(Object.keys(v.entries));$.extract=(X,U)=>{let G={};for(let J of X)if(D.has(J))G[J]=v.entries[J];else throw Error(`Key ${J} not found in enum`);return new z1({...v,checks:[],...w.normalizeParams(U),entries:G})},$.exclude=(X,U)=>{let G={...v.entries};for(let J of X)if(D.has(J))delete G[J];else throw Error(`Key ${J} not found in enum`);return new z1({...v,checks:[],...w.normalizeParams(U),entries:G})}});function M$($,v){let D=Array.isArray($)?Object.fromEntries($.map((X)=>[X,X])):$;return new z1({type:"enum",entries:D,...w.normalizeParams(v)})}function $V($,v){return new z1({type:"enum",entries:$,...w.normalizeParams(v)})}var _W=B("ZodLiteral",($,v)=>{F8.init($,v),y.init($,v),$._zod.processJSONSchema=(D,X,U)=>u9($,D,X,U),$.values=new Set(v.values),Object.defineProperty($,"value",{get(){if(v.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return v.values[0]}})});function R($,v){return new _W({type:"literal",values:Array.isArray($)?$:[$],...w.normalizeParams(v)})}var iW=B("ZodFile",($,v)=>{j8.init($,v),y.init($,v),$._zod.processJSONSchema=(D,X,U)=>_9($,D,X,U),$.min=(D,X)=>$.check(q4(D,X)),$.max=(D,X)=>$.check(v6(D,X)),$.mime=(D,X)=>$.check($1(Array.isArray(D)?D:[D],X))});function vV($){return L9(iW,$)}var yW=B("ZodTransform",($,v)=>{A8.init($,v),y.init($,v),$._zod.processJSONSchema=(D,X,U)=>l9($,D,X,U),$._zod.parse=(D,X)=>{if(X.direction==="backward")throw new H6($.constructor.name);D.addIssue=(G)=>{if(typeof G==="string")D.issues.push(w.issue(G,D.value,v));else{let J=G;if(J.fatal)J.continue=!1;J.code??(J.code="custom"),J.input??(J.input=D.value),J.inst??(J.inst=$),D.issues.push(w.issue(J))}};let U=v.transform(D.value,D);if(U instanceof Promise)return U.then((G)=>{return D.value=G,D.fallback=!0,D});return D.value=U,D.fallback=!0,D}});function wD($){return new yW({type:"transform",transform:$})}var MD=B("ZodOptional",($,v)=>{HU.init($,v),y.init($,v),$._zod.processJSONSchema=(D,X,U)=>tU($,D,X,U),$.unwrap=()=>$._zod.def.innerType});function J$($){return new MD({type:"optional",innerType:$})}var nW=B("ZodExactOptional",($,v)=>{w8.init($,v),y.init($,v),$._zod.processJSONSchema=(D,X,U)=>tU($,D,X,U),$.unwrap=()=>$._zod.def.innerType});function lW($){return new nW({type:"optional",innerType:$})}var hW=B("ZodNullable",($,v)=>{M8.init($,v),y.init($,v),$._zod.processJSONSchema=(D,X,U)=>o9($,D,X,U),$.unwrap=()=>$._zod.def.innerType});function Pv($){return new hW({type:"nullable",innerType:$})}function UV($){return J$(Pv($))}var mW=B("ZodDefault",($,v)=>{P8.init($,v),y.init($,v),$._zod.processJSONSchema=(D,X,U)=>e9($,D,X,U),$.unwrap=()=>$._zod.def.innerType,$.removeDefault=$.unwrap});function cW($,v){return new mW({type:"default",innerType:$,get defaultValue(){return typeof v==="function"?v():w.shallowClone(v)}})}var dW=B("ZodPrefault",($,v)=>{b8.init($,v),y.init($,v),$._zod.processJSONSchema=(D,X,U)=>s9($,D,X,U),$.unwrap=()=>$._zod.def.innerType});function rW($,v){return new dW({type:"prefault",innerType:$,get defaultValue(){return typeof v==="function"?v():w.shallowClone(v)}})}var PD=B("ZodNonOptional",($,v)=>{q8.init($,v),y.init($,v),$._zod.processJSONSchema=(D,X,U)=>a9($,D,X,U),$.unwrap=()=>$._zod.def.innerType});function pW($,v){return new PD({type:"nonoptional",innerType:$,...w.normalizeParams(v)})}var tW=B("ZodSuccess",($,v)=>{S8.init($,v),y.init($,v),$._zod.processJSONSchema=(D,X,U)=>i9($,D,X,U),$.unwrap=()=>$._zod.def.innerType});function DV($){return new tW({type:"success",innerType:$})}var oW=B("ZodCatch",($,v)=>{k8.init($,v),y.init($,v),$._zod.processJSONSchema=(D,X,U)=>$W($,D,X,U),$.unwrap=()=>$._zod.def.innerType,$.removeCatch=$.unwrap});function aW($,v){return new oW({type:"catch",innerType:$,catchValue:typeof v==="function"?v:()=>v})}var eW=B("ZodNaN",($,v)=>{E8.init($,v),y.init($,v),$._zod.processJSONSchema=(D,X,U)=>x9($,D,X,U)});function XV($){return V9(eW,$)}var gv=B("ZodPipe",($,v)=>{FU.init($,v),y.init($,v),$._zod.processJSONSchema=(D,X,U)=>vW($,D,X,U),$.in=v.in,$.out=v.out});function DD($,v){return new gv({type:"pipe",in:$,out:v})}var Cv=B("ZodCodec",($,v)=>{gv.init($,v),Bv.init($,v)});function GV($,v,D){return new Cv({type:"pipe",in:$,out:v,transform:D.decode,reverseTransform:D.encode})}function JV($){let v=$._zod.def;return new Cv({type:"pipe",in:v.out,out:v.in,transform:v.reverseTransform,reverseTransform:v.transform})}var sW=B("ZodPreprocess",($,v)=>{gv.init($,v),T8.init($,v)}),$z=B("ZodReadonly",($,v)=>{R8.init($,v),y.init($,v),$._zod.processJSONSchema=(D,X,U)=>UW($,D,X,U),$.unwrap=()=>$._zod.def.innerType});function vz($){return new $z({type:"readonly",innerType:$})}var Uz=B("ZodTemplateLiteral",($,v)=>{g8.init($,v),y.init($,v),$._zod.processJSONSchema=(D,X,U)=>f9($,D,X,U)});function QV($,v){return new Uz({type:"template_literal",parts:$,...w.normalizeParams(v)})}var Dz=B("ZodLazy",($,v)=>{x8.init($,v),y.init($,v),$._zod.processJSONSchema=(D,X,U)=>XW($,D,X,U),$.unwrap=()=>$._zod.def.getter()});function Xz($){return new Dz({type:"lazy",getter:$})}var Gz=B("ZodPromise",($,v)=>{u8.init($,v),y.init($,v),$._zod.processJSONSchema=(D,X,U)=>DW($,D,X,U),$.unwrap=()=>$._zod.def.innerType});function WV($){return new Gz({type:"promise",innerType:$})}var Jz=B("ZodFunction",($,v)=>{C8.init($,v),y.init($,v),$._zod.processJSONSchema=(D,X,U)=>n9($,D,X,U)});function zV($){return new Jz({type:"function",input:Array.isArray($?.input)?uW($?.input):$?.input??c(D$()),output:$?.output??D$()})}var uv=B("ZodCustom",($,v)=>{f8.init($,v),y.init($,v),$._zod.processJSONSchema=(D,X,U)=>y9($,D,X,U)});function YV($){let v=new G$({check:"custom"});return v._zod.check=$,v}function bD($,v){return B9(uv,$??(()=>!0),v)}function Qz($,v={}){return N9(uv,$,v)}function Wz($,v){return Z9($,v)}var IV=O9,VV=H9;function KV($,v={}){let D=new uv({type:"custom",check:"custom",fn:(X)=>X instanceof $,abort:!0,...w.normalizeParams(v)});return D._zod.bag.Class=$,D._zod.check=(X)=>{if(!(X.value instanceof $))X.issues.push({code:"invalid_type",expected:$.name,input:X.value,inst:D,path:[...D._zod.def.path??[]]})},D}var LV=(...$)=>F9({Codec:Cv,Boolean:K1,String:Y1},...$);function BV($){let v=Xz(()=>{return X$([H($),t(),K$(),Sv(),c(v),s(H(),v)])});return v}function xv($,v){return new sW({type:"pipe",in:wD($),out:v})}var gA={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 CA($){V$({customError:$})}function uA(){return V$().customError}var zz;(function($){})(zz||(zz={}));var P={...wv,...aU,iso:G6},xA=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 fA($,v){let D=$.$schema;if(D==="https://json-schema.org/draft/2020-12/schema")return"draft-2020-12";if(D==="http://json-schema.org/draft-07/schema#")return"draft-7";if(D==="http://json-schema.org/draft-04/schema#")return"draft-4";return v??"draft-2020-12"}function _A($,v){if(!$.startsWith("#"))throw Error("External $ref is not supported, only local refs (#/...) are allowed");let D=$.slice(1).split("/").filter(Boolean);if(D.length===0)return v.rootSchema;let X=v.version==="draft-2020-12"?"$defs":"definitions";if(D[0]===X){let U=D[1];if(!U||!v.defs[U])throw Error(`Reference not found: ${$}`);return v.defs[U]}throw Error(`Reference not found: ${$}`)}function NV($,v){if($.not!==void 0){if(typeof $.not==="object"&&Object.keys($.not).length===0)return P.never();throw Error("not is not supported in Zod (except { not: {} } for never)")}if($.unevaluatedItems!==void 0)throw Error("unevaluatedItems is not supported");if($.unevaluatedProperties!==void 0)throw Error("unevaluatedProperties is not supported");if($.if!==void 0||$.then!==void 0||$.else!==void 0)throw Error("Conditional schemas (if/then/else) are not supported");if($.dependentSchemas!==void 0||$.dependentRequired!==void 0)throw Error("dependentSchemas and dependentRequired are not supported");if($.$ref){let U=$.$ref;if(v.refs.has(U))return v.refs.get(U);if(v.processing.has(U))return P.lazy(()=>{if(!v.refs.has(U))throw Error(`Circular reference not resolved: ${U}`);return v.refs.get(U)});v.processing.add(U);let G=_A(U,v),J=E$(G,v);return v.refs.set(U,J),v.processing.delete(U),J}if($.enum!==void 0){let U=$.enum;if(v.version==="openapi-3.0"&&$.nullable===!0&&U.length===1&&U[0]===null)return P.null();if(U.length===0)return P.never();if(U.length===1)return P.literal(U[0]);if(U.every((J)=>typeof J==="string"))return P.enum(U);let G=U.map((J)=>P.literal(J));if(G.length<2)return G[0];return P.union([G[0],G[1],...G.slice(2)])}if($.const!==void 0)return P.literal($.const);let D=$.type;if(Array.isArray(D)){let U=D.map((G)=>{let J={...$,type:G};return NV(J,v)});if(U.length===0)return P.never();if(U.length===1)return U[0];return P.union(U)}if(!D)return P.any();let X;switch(D){case"string":{let U=P.string();if($.format){let G=$.format;if(G==="email")U=U.check(P.email());else if(G==="uri"||G==="uri-reference")U=U.check(P.url());else if(G==="uuid"||G==="guid")U=U.check(P.uuid());else if(G==="date-time")U=U.check(P.iso.datetime());else if(G==="date")U=U.check(P.iso.date());else if(G==="time")U=U.check(P.iso.time());else if(G==="duration")U=U.check(P.iso.duration());else if(G==="ipv4")U=U.check(P.ipv4());else if(G==="ipv6")U=U.check(P.ipv6());else if(G==="mac")U=U.check(P.mac());else if(G==="cidr")U=U.check(P.cidrv4());else if(G==="cidr-v6")U=U.check(P.cidrv6());else if(G==="base64")U=U.check(P.base64());else if(G==="base64url")U=U.check(P.base64url());else if(G==="e164")U=U.check(P.e164());else if(G==="jwt")U=U.check(P.jwt());else if(G==="emoji")U=U.check(P.emoji());else if(G==="nanoid")U=U.check(P.nanoid());else if(G==="cuid")U=U.check(P.cuid());else if(G==="cuid2")U=U.check(P.cuid2());else if(G==="ulid")U=U.check(P.ulid());else if(G==="xid")U=U.check(P.xid());else if(G==="ksuid")U=U.check(P.ksuid())}if(typeof $.minLength==="number")U=U.min($.minLength);if(typeof $.maxLength==="number")U=U.max($.maxLength);if($.pattern)U=U.regex(new RegExp($.pattern));X=U;break}case"number":case"integer":{let U=D==="integer"?P.number().int():P.number();if(typeof $.minimum==="number")U=U.min($.minimum);if(typeof $.maximum==="number")U=U.max($.maximum);if(typeof $.exclusiveMinimum==="number")U=U.gt($.exclusiveMinimum);else if($.exclusiveMinimum===!0&&typeof $.minimum==="number")U=U.gt($.minimum);if(typeof $.exclusiveMaximum==="number")U=U.lt($.exclusiveMaximum);else if($.exclusiveMaximum===!0&&typeof $.maximum==="number")U=U.lt($.maximum);if(typeof $.multipleOf==="number")U=U.multipleOf($.multipleOf);X=U;break}case"boolean":{X=P.boolean();break}case"null":{X=P.null();break}case"object":{let U={},G=$.properties||{},J=new Set($.required||[]);for(let[W,z]of Object.entries(G)){let Y=E$(z,v);U[W]=J.has(W)?Y:Y.optional()}if($.propertyNames){let W=E$($.propertyNames,v),z=$.additionalProperties&&typeof $.additionalProperties==="object"?E$($.additionalProperties,v):P.any();if(Object.keys(U).length===0){X=P.record(W,z);break}let Y=P.object(U).passthrough(),I=P.looseRecord(W,z);X=P.intersection(Y,I);break}if($.patternProperties){let W=$.patternProperties,z=Object.keys(W),Y=[];for(let V of z){let K=E$(W[V],v),L=P.string().regex(new RegExp(V));Y.push(P.looseRecord(L,K))}let I=[];if(Object.keys(U).length>0)I.push(P.object(U).passthrough());if(I.push(...Y),I.length===0)X=P.object({}).passthrough();else if(I.length===1)X=I[0];else{let V=P.intersection(I[0],I[1]);for(let K=2;K<I.length;K++)V=P.intersection(V,I[K]);X=V}break}let Q=P.object(U);if($.additionalProperties===!1)X=Q.strict();else if(typeof $.additionalProperties==="object")X=Q.catchall(E$($.additionalProperties,v));else X=Q.passthrough();break}case"array":{let{prefixItems:U,items:G}=$;if(U&&Array.isArray(U)){let J=U.map((W)=>E$(W,v)),Q=G&&typeof G==="object"&&!Array.isArray(G)?E$(G,v):void 0;if(Q)X=P.tuple(J).rest(Q);else X=P.tuple(J);if(typeof $.minItems==="number")X=X.check(P.minLength($.minItems));if(typeof $.maxItems==="number")X=X.check(P.maxLength($.maxItems))}else if(Array.isArray(G)){let J=G.map((W)=>E$(W,v)),Q=$.additionalItems&&typeof $.additionalItems==="object"?E$($.additionalItems,v):void 0;if(Q)X=P.tuple(J).rest(Q);else X=P.tuple(J);if(typeof $.minItems==="number")X=X.check(P.minLength($.minItems));if(typeof $.maxItems==="number")X=X.check(P.maxLength($.maxItems))}else if(G!==void 0){let J=E$(G,v),Q=P.array(J);if(typeof $.minItems==="number")Q=Q.min($.minItems);if(typeof $.maxItems==="number")Q=Q.max($.maxItems);X=Q}else X=P.array(P.any());break}default:throw Error(`Unsupported type: ${D}`)}return X}function E$($,v){if(typeof $==="boolean")return $?P.any():P.never();let D=NV($,v),X=$.type||$.enum!==void 0||$.const!==void 0;if($.anyOf&&Array.isArray($.anyOf)){let Q=$.anyOf.map((z)=>E$(z,v)),W=P.union(Q);D=X?P.intersection(D,W):W}if($.oneOf&&Array.isArray($.oneOf)){let Q=$.oneOf.map((z)=>E$(z,v)),W=P.xor(Q);D=X?P.intersection(D,W):W}if($.allOf&&Array.isArray($.allOf))if($.allOf.length===0)D=X?D:P.any();else{let Q=X?D:E$($.allOf[0],v),W=X?0:1;for(let z=W;z<$.allOf.length;z++)Q=P.intersection(Q,E$($.allOf[z],v));D=Q}if($.nullable===!0&&v.version==="openapi-3.0")D=P.nullable(D);if($.readOnly===!0)D=P.readonly(D);if($.default!==void 0)D=D.default($.default);let U={},G=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(let Q of G)if(Q in $)U[Q]=$[Q];let J=["contentEncoding","contentMediaType","contentSchema"];for(let Q of J)if(Q in $)U[Q]=$[Q];for(let Q of Object.keys($))if(!xA.has(Q))U[Q]=$[Q];if(Object.keys(U).length>0)v.registry.add(D,U);if($.description)D=D.describe($.description);return D}function ZV($,v){if(typeof $==="boolean")return $?P.any():P.never();let D;try{D=JSON.parse(JSON.stringify($))}catch{throw Error("fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas")}let X=fA(D,v?.defaultTarget),U=D.$defs||D.definitions||{},G={version:X,defs:U,refs:new Map,processing:new Set,rootSchema:D,registry:v?.registry??A$};return E$(D,G)}var Yz={};C4(Yz,{string:()=>iA,number:()=>yA,date:()=>hA,boolean:()=>nA,bigint:()=>lA});function iA($){return fQ(Y1,$)}function yA($){return cQ(V1,$)}function nA($){return eQ(K1,$)}function lA($){return $9(L1,$)}function hA($){return I9(kv,$)}V$(Nv());var Iz="2025-11-25",OV="2025-03-26",Z1=[Iz,"2025-06-18","2025-03-26","2024-11-05","2024-10-07"],J6="io.modelcontextprotocol/related-task",SD="2.0",Z$=bD(($)=>$!==null&&(typeof $==="object"||typeof $==="function")),HV=X$([H(),t().int()]),FV=H(),an=w$({ttl:t().optional(),pollInterval:t().optional()}),mA=q({ttl:t().optional()}),cA=q({taskId:H()}),Vz=w$({progressToken:HV.optional(),[J6]:cA.optional()}),s$=q({_meta:Vz.optional()}),fv=s$.extend({task:mA.optional()}),jV=($)=>fv.safeParse($).success,P$=q({method:H(),params:s$.loose().optional()}),U4=q({_meta:Vz.optional()}),D4=q({method:H(),params:U4.loose().optional()}),b$=w$({_meta:Vz.optional()}),kD=X$([H(),t().int()]),AV=q({jsonrpc:R(SD),id:kD,...P$.shape}).strict(),Q6=($)=>AV.safeParse($).success,wV=q({jsonrpc:R(SD),...D4.shape}).strict(),MV=($)=>wV.safeParse($).success,Kz=q({jsonrpc:R(SD),id:kD,result:b$}).strict(),n4=($)=>Kz.safeParse($).success;var f;(function($){$[$.ConnectionClosed=-32000]="ConnectionClosed",$[$.RequestTimeout=-32001]="RequestTimeout",$[$.ParseError=-32700]="ParseError",$[$.InvalidRequest=-32600]="InvalidRequest",$[$.MethodNotFound=-32601]="MethodNotFound",$[$.InvalidParams=-32602]="InvalidParams",$[$.InternalError=-32603]="InternalError",$[$.UrlElicitationRequired=-32042]="UrlElicitationRequired"})(f||(f={}));var Lz=q({jsonrpc:R(SD),id:kD.optional(),error:q({code:t().int(),message:H(),data:D$().optional()})}).strict();var O1=($)=>Lz.safeParse($).success;var _v=X$([AV,wV,Kz,Lz]),en=X$([Kz,Lz]),ED=b$.strict(),dA=U4.extend({requestId:kD.optional(),reason:H().optional()}),TD=D4.extend({method:R("notifications/cancelled"),params:dA}),rA=q({src:H(),mimeType:H().optional(),sizes:c(H()).optional(),theme:M$(["light","dark"]).optional()}),iv=q({icons:c(rA).optional()}),N1=q({name:H(),title:H().optional()}),PV=N1.extend({...N1.shape,...iv.shape,version:H(),websiteUrl:H().optional(),description:H().optional()}),pA=B1(q({applyDefaults:K$().optional()}),s(H(),D$())),tA=xv(($)=>{if($&&typeof $==="object"&&!Array.isArray($)){if(Object.keys($).length===0)return{form:{}}}return $},B1(q({form:pA.optional(),url:Z$.optional()}),s(H(),D$()).optional())),oA=w$({list:Z$.optional(),cancel:Z$.optional(),requests:w$({sampling:w$({createMessage:Z$.optional()}).optional(),elicitation:w$({create:Z$.optional()}).optional()}).optional()}),aA=w$({list:Z$.optional(),cancel:Z$.optional(),requests:w$({tools:w$({call:Z$.optional()}).optional()}).optional()}),eA=q({experimental:s(H(),Z$).optional(),sampling:q({context:Z$.optional(),tools:Z$.optional()}).optional(),elicitation:tA.optional(),roots:q({listChanged:K$().optional()}).optional(),tasks:oA.optional(),extensions:s(H(),Z$).optional()}),sA=s$.extend({protocolVersion:H(),capabilities:eA,clientInfo:PV}),RD=P$.extend({method:R("initialize"),params:sA}),Bz=($)=>RD.safeParse($).success,$w=q({experimental:s(H(),Z$).optional(),logging:Z$.optional(),completions:Z$.optional(),prompts:q({listChanged:K$().optional()}).optional(),resources:q({subscribe:K$().optional(),listChanged:K$().optional()}).optional(),tools:q({listChanged:K$().optional()}).optional(),tasks:aA.optional(),extensions:s(H(),Z$).optional()}),vw=b$.extend({protocolVersion:H(),capabilities:$w,serverInfo:PV,instructions:H().optional()}),Nz=D4.extend({method:R("notifications/initialized"),params:U4.optional()});var gD=P$.extend({method:R("ping"),params:s$.optional()}),Uw=q({progress:t(),total:J$(t()),message:J$(H())}),Dw=q({...U4.shape,...Uw.shape,progressToken:HV}),CD=D4.extend({method:R("notifications/progress"),params:Dw}),Xw=s$.extend({cursor:FV.optional()}),yv=P$.extend({params:Xw.optional()}),nv=b$.extend({nextCursor:FV.optional()}),Gw=M$(["working","input_required","completed","failed","cancelled"]),lv=q({taskId:H(),status:Gw,ttl:X$([t(),Sv()]),createdAt:H(),lastUpdatedAt:H(),pollInterval:J$(t()),statusMessage:J$(H())}),H1=b$.extend({task:lv}),Jw=U4.merge(lv),hv=D4.extend({method:R("notifications/tasks/status"),params:Jw}),uD=P$.extend({method:R("tasks/get"),params:s$.extend({taskId:H()})}),xD=b$.merge(lv),fD=P$.extend({method:R("tasks/result"),params:s$.extend({taskId:H()})}),sn=b$.loose(),_D=yv.extend({method:R("tasks/list")}),iD=nv.extend({tasks:c(lv)}),yD=P$.extend({method:R("tasks/cancel"),params:s$.extend({taskId:H()})}),bV=b$.merge(lv),qV=q({uri:H(),mimeType:J$(H()),_meta:s(H(),D$()).optional()}),SV=qV.extend({text:H()}),Zz=H().refine(($)=>{try{return atob($),!0}catch{return!1}},{message:"Invalid Base64 string"}),kV=qV.extend({blob:Zz}),mv=M$(["user","assistant"]),F1=q({audience:c(mv).optional(),priority:t().min(0).max(1).optional(),lastModified:G6.datetime({offset:!0}).optional()}),EV=q({...N1.shape,...iv.shape,uri:H(),description:J$(H()),mimeType:J$(H()),size:J$(t()),annotations:F1.optional(),_meta:J$(w$({}))}),Qw=q({...N1.shape,...iv.shape,uriTemplate:H(),description:J$(H()),mimeType:J$(H()),annotations:F1.optional(),_meta:J$(w$({}))}),cv=yv.extend({method:R("resources/list")}),Ww=nv.extend({resources:c(EV)}),zw=yv.extend({method:R("resources/templates/list")}),Yw=nv.extend({resourceTemplates:c(Qw)}),Oz=s$.extend({uri:H()}),Iw=Oz,dv=P$.extend({method:R("resources/read"),params:Iw}),Vw=b$.extend({contents:c(X$([SV,kV]))}),Kw=D4.extend({method:R("notifications/resources/list_changed"),params:U4.optional()}),Lw=Oz,Bw=P$.extend({method:R("resources/subscribe"),params:Lw}),Nw=Oz,Zw=P$.extend({method:R("resources/unsubscribe"),params:Nw}),Ow=U4.extend({uri:H()}),Hw=D4.extend({method:R("notifications/resources/updated"),params:Ow}),Fw=q({name:H(),description:J$(H()),required:J$(K$())}),jw=q({...N1.shape,...iv.shape,description:J$(H()),arguments:J$(c(Fw)),_meta:J$(w$({}))}),rv=yv.extend({method:R("prompts/list")}),Aw=nv.extend({prompts:c(jw)}),ww=s$.extend({name:H(),arguments:s(H(),H()).optional()}),pv=P$.extend({method:R("prompts/get"),params:ww}),Hz=q({type:R("text"),text:H(),annotations:F1.optional(),_meta:s(H(),D$()).optional()}),Fz=q({type:R("image"),data:Zz,mimeType:H(),annotations:F1.optional(),_meta:s(H(),D$()).optional()}),jz=q({type:R("audio"),data:Zz,mimeType:H(),annotations:F1.optional(),_meta:s(H(),D$()).optional()}),Mw=q({type:R("tool_use"),name:H(),id:H(),input:s(H(),D$()),_meta:s(H(),D$()).optional()}),Pw=q({type:R("resource"),resource:X$([SV,kV]),annotations:F1.optional(),_meta:s(H(),D$()).optional()}),bw=EV.extend({type:R("resource_link")}),Az=X$([Hz,Fz,jz,bw,Pw]),qw=q({role:mv,content:Az}),Sw=b$.extend({description:H().optional(),messages:c(qw)}),kw=D4.extend({method:R("notifications/prompts/list_changed"),params:U4.optional()}),Ew=q({title:H().optional(),readOnlyHint:K$().optional(),destructiveHint:K$().optional(),idempotentHint:K$().optional(),openWorldHint:K$().optional()}),Tw=q({taskSupport:M$(["required","optional","forbidden"]).optional()}),TV=q({...N1.shape,...iv.shape,description:H().optional(),inputSchema:q({type:R("object"),properties:s(H(),Z$).optional(),required:c(H()).optional()}).catchall(D$()),outputSchema:q({type:R("object"),properties:s(H(),Z$).optional(),required:c(H()).optional()}).catchall(D$()).optional(),annotations:Ew.optional(),execution:Tw.optional(),_meta:s(H(),D$()).optional()}),tv=yv.extend({method:R("tools/list")}),Rw=nv.extend({tools:c(TV)}),nD=b$.extend({content:c(Az).default([]),structuredContent:s(H(),D$()).optional(),isError:K$().optional()}),$l=nD.or(b$.extend({toolResult:D$()})),gw=fv.extend({name:H(),arguments:s(H(),D$()).optional()}),q6=P$.extend({method:R("tools/call"),params:gw}),Cw=D4.extend({method:R("notifications/tools/list_changed"),params:U4.optional()}),vl=q({autoRefresh:K$().default(!0),debounceMs:t().int().nonnegative().default(300)}),ov=M$(["debug","info","notice","warning","error","critical","alert","emergency"]),uw=s$.extend({level:ov}),wz=P$.extend({method:R("logging/setLevel"),params:uw}),xw=U4.extend({level:ov,logger:H().optional(),data:D$()}),fw=D4.extend({method:R("notifications/message"),params:xw}),_w=q({name:H().optional()}),iw=q({hints:c(_w).optional(),costPriority:t().min(0).max(1).optional(),speedPriority:t().min(0).max(1).optional(),intelligencePriority:t().min(0).max(1).optional()}),yw=q({mode:M$(["auto","required","none"]).optional()}),nw=q({type:R("tool_result"),toolUseId:H().describe("The unique identifier for the corresponding tool call."),content:c(Az).default([]),structuredContent:q({}).loose().optional(),isError:K$().optional(),_meta:s(H(),D$()).optional()}),lw=Rv("type",[Hz,Fz,jz]),qD=Rv("type",[Hz,Fz,jz,Mw,nw]),hw=q({role:mv,content:X$([qD,c(qD)]),_meta:s(H(),D$()).optional()}),mw=fv.extend({messages:c(hw),modelPreferences:iw.optional(),systemPrompt:H().optional(),includeContext:M$(["none","thisServer","allServers"]).optional(),temperature:t().optional(),maxTokens:t().int(),stopSequences:c(H()).optional(),metadata:Z$.optional(),tools:c(TV).optional(),toolChoice:yw.optional()}),cw=P$.extend({method:R("sampling/createMessage"),params:mw}),av=b$.extend({model:H(),stopReason:J$(M$(["endTurn","stopSequence","maxTokens"]).or(H())),role:mv,content:lw}),Mz=b$.extend({model:H(),stopReason:J$(M$(["endTurn","stopSequence","maxTokens","toolUse"]).or(H())),role:mv,content:X$([qD,c(qD)])}),dw=q({type:R("boolean"),title:H().optional(),description:H().optional(),default:K$().optional()}),rw=q({type:R("string"),title:H().optional(),description:H().optional(),minLength:t().optional(),maxLength:t().optional(),format:M$(["email","uri","date","date-time"]).optional(),default:H().optional()}),pw=q({type:M$(["number","integer"]),title:H().optional(),description:H().optional(),minimum:t().optional(),maximum:t().optional(),default:t().optional()}),tw=q({type:R("string"),title:H().optional(),description:H().optional(),enum:c(H()),default:H().optional()}),ow=q({type:R("string"),title:H().optional(),description:H().optional(),oneOf:c(q({const:H(),title:H()})),default:H().optional()}),aw=q({type:R("string"),title:H().optional(),description:H().optional(),enum:c(H()),enumNames:c(H()).optional(),default:H().optional()}),ew=X$([tw,ow]),sw=q({type:R("array"),title:H().optional(),description:H().optional(),minItems:t().optional(),maxItems:t().optional(),items:q({type:R("string"),enum:c(H())}),default:c(H()).optional()}),$M=q({type:R("array"),title:H().optional(),description:H().optional(),minItems:t().optional(),maxItems:t().optional(),items:q({anyOf:c(q({const:H(),title:H()}))}),default:c(H()).optional()}),vM=X$([sw,$M]),UM=X$([aw,ew,vM]),DM=X$([UM,dw,rw,pw]),XM=fv.extend({mode:R("form").optional(),message:H(),requestedSchema:q({type:R("object"),properties:s(H(),DM),required:c(H()).optional()})}),GM=fv.extend({mode:R("url"),message:H(),elicitationId:H(),url:H().url()}),JM=X$([XM,GM]),QM=P$.extend({method:R("elicitation/create"),params:JM}),WM=U4.extend({elicitationId:H()}),zM=D4.extend({method:R("notifications/elicitation/complete"),params:WM}),j1=b$.extend({action:M$(["accept","decline","cancel"]),content:xv(($)=>$===null?void 0:$,s(H(),X$([H(),t(),K$(),c(H())])).optional())}),YM=q({type:R("ref/resource"),uri:H()});var IM=q({type:R("ref/prompt"),name:H()}),VM=s$.extend({ref:X$([IM,YM]),argument:q({name:H(),value:H()}),context:q({arguments:s(H(),H()).optional()}).optional()}),KM=P$.extend({method:R("completion/complete"),params:VM});var LM=b$.extend({completion:w$({values:c(H()).max(100),total:J$(t().int()),hasMore:J$(K$())})}),BM=q({uri:H().startsWith("file://"),name:H().optional(),_meta:s(H(),D$()).optional()}),NM=P$.extend({method:R("roots/list"),params:s$.optional()}),Pz=b$.extend({roots:c(BM)}),ZM=D4.extend({method:R("notifications/roots/list_changed"),params:U4.optional()}),Ul=X$([gD,RD,KM,wz,pv,rv,cv,zw,dv,Bw,Zw,q6,tv,uD,fD,_D,yD]),Dl=X$([TD,CD,Nz,ZM,hv]),Xl=X$([ED,av,Mz,j1,Pz,xD,iD,H1]),Gl=X$([gD,cw,QM,NM,uD,fD,_D,yD]),Jl=X$([TD,CD,fw,Hw,Kw,Cw,kw,hv,zM]),Ql=X$([ED,vw,LM,Sw,Aw,Ww,Yw,Vw,nD,Rw,xD,iD,H1]);class x extends Error{constructor($,v,D){super(`MCP error ${$}: ${v}`);this.code=$,this.data=D,this.name="McpError"}static fromError($,v,D){if($===f.UrlElicitationRequired&&D){let X=D;if(X.elicitations)return new RV(X.elicitations,v)}return new x($,v,D)}}class RV extends x{constructor($,v=`URL elicitation${$.length>1?"s":""} required`){super(f.UrlElicitationRequired,v,{elicitations:$})}get elicitations(){return this.data?.elicitations??[]}}class bz{constructor($={}){this._started=!1,this._hasHandledRequest=!1,this._streamMapping=new Map,this._requestToStreamMapping=new Map,this._requestResponseMap=new Map,this._initialized=!1,this._enableJsonResponse=!1,this._standaloneSseStreamId="_GET_stream",this.sessionIdGenerator=$.sessionIdGenerator,this._enableJsonResponse=$.enableJsonResponse??!1,this._eventStore=$.eventStore,this._onsessioninitialized=$.onsessioninitialized,this._onsessionclosed=$.onsessionclosed,this._allowedHosts=$.allowedHosts,this._allowedOrigins=$.allowedOrigins,this._enableDnsRebindingProtection=$.enableDnsRebindingProtection??!1,this._retryInterval=$.retryInterval}async start(){if(this._started)throw Error("Transport already started");this._started=!0}createJsonErrorResponse($,v,D,X){let U={code:v,message:D};if(X?.data!==void 0)U.data=X.data;return new Response(JSON.stringify({jsonrpc:"2.0",error:U,id:null}),{status:$,headers:{"Content-Type":"application/json",...X?.headers}})}validateRequestHeaders($){if(!this._enableDnsRebindingProtection)return;if(this._allowedHosts&&this._allowedHosts.length>0){let v=$.headers.get("host");if(!v||!this._allowedHosts.includes(v)){let D=`Invalid Host header: ${v}`;return this.onerror?.(Error(D)),this.createJsonErrorResponse(403,-32000,D)}}if(this._allowedOrigins&&this._allowedOrigins.length>0){let v=$.headers.get("origin");if(v&&!this._allowedOrigins.includes(v)){let D=`Invalid Origin header: ${v}`;return this.onerror?.(Error(D)),this.createJsonErrorResponse(403,-32000,D)}}return}async handleRequest($,v){if(!this.sessionIdGenerator&&this._hasHandledRequest)throw Error("Stateless transport cannot be reused across requests. Create a new transport per request.");this._hasHandledRequest=!0;let D=this.validateRequestHeaders($);if(D)return D;switch($.method){case"POST":return this.handlePostRequest($,v);case"GET":return this.handleGetRequest($);case"DELETE":return this.handleDeleteRequest($);default:return this.handleUnsupportedRequest()}}async writePrimingEvent($,v,D,X){if(!this._eventStore)return;if(X<"2025-11-25")return;let U=await this._eventStore.storeEvent(D,{}),G=`id: ${U}
|
|
93
93
|
data:
|
|
94
94
|
|
|
95
95
|
`;if(this._retryInterval!==void 0)G=`id: ${U}
|
|
@@ -103,9 +103,9 @@ data:
|
|
|
103
103
|
`,$.enqueue(v.encode(U)),!0}catch(U){return this.onerror?.(U),!1}}handleUnsupportedRequest(){return this.onerror?.(Error("Method not allowed.")),new Response(JSON.stringify({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($,v){try{let D=$.headers.get("accept");if(!D?.includes("application/json")||!D.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");let X=$.headers.get("content-type");if(!X||!X.includes("application/json"))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 U={headers:Object.fromEntries($.headers.entries()),url:new URL($.url)},G;if(v?.parsedBody!==void 0)G=v.parsedBody;else try{G=await $.json()}catch{return this.onerror?.(Error("Parse error: Invalid JSON")),this.createJsonErrorResponse(400,-32700,"Parse error: Invalid JSON")}let J;try{if(Array.isArray(G))J=G.map((Z)=>_v.parse(Z));else J=[_v.parse(G)]}catch{return this.onerror?.(Error("Parse error: Invalid JSON-RPC message")),this.createJsonErrorResponse(400,-32700,"Parse error: Invalid JSON-RPC message")}let Q=J.some(Bz);if(Q){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(J.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(!Q){let Z=this.validateSession($);if(Z)return Z;let F=this.validateProtocolVersion($);if(F)return F}if(!J.some(Q6)){for(let Z of J)this.onmessage?.(Z,{authInfo:v?.authInfo,requestInfo:U});return new Response(null,{status:202})}let z=crypto.randomUUID(),Y=J.find((Z)=>Bz(Z)),I=Y?Y.params.protocolVersion:$.headers.get("mcp-protocol-version")??OV;if(this._enableJsonResponse)return new Promise((Z)=>{this._streamMapping.set(z,{resolveJson:Z,cleanup:()=>{this._streamMapping.delete(z)}});for(let F of J)if(Q6(F))this._requestToStreamMapping.set(F.id,z);for(let F of J)this.onmessage?.(F,{authInfo:v?.authInfo,requestInfo:U})});let V=new TextEncoder,K,L=new ReadableStream({start:(Z)=>{K=Z},cancel:()=>{this._streamMapping.delete(z)}}),N={"Content-Type":"text/event-stream","Cache-Control":"no-cache",Connection:"keep-alive"};if(this.sessionId!==void 0)N["mcp-session-id"]=this.sessionId;for(let Z of J)if(Q6(Z))this._streamMapping.set(z,{controller:K,encoder:V,cleanup:()=>{this._streamMapping.delete(z);try{K.close()}catch{}}}),this._requestToStreamMapping.set(Z.id,z);await this.writePrimingEvent(K,V,z,I);for(let Z of J){let F,S;if(Q6(Z)&&this._eventStore&&I>="2025-11-25")F=()=>{this.closeSSEStream(Z.id)},S=()=>{this.closeStandaloneSSEStream()};this.onmessage?.(Z,{authInfo:v?.authInfo,requestInfo:U,closeSSEStream:F,closeStandaloneSSEStream:S})}return new Response(L,{status:200,headers:N})}catch(D){return this.onerror?.(D),this.createJsonErrorResponse(400,-32700,"Parse error",{data:String(D)})}}async handleDeleteRequest($){let v=this.validateSession($);if(v)return v;let D=this.validateProtocolVersion($);if(D)return D;return await Promise.resolve(this._onsessionclosed?.(this.sessionId)),await this.close(),new Response(null,{status:200})}validateSession($){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 v=$.headers.get("mcp-session-id");if(!v)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(v!==this.sessionId)return this.onerror?.(Error("Session not found")),this.createJsonErrorResponse(404,-32001,"Session not found");return}validateProtocolVersion($){let v=$.headers.get("mcp-protocol-version");if(v!==null&&!Z1.includes(v))return this.onerror?.(Error(`Bad Request: Unsupported protocol version: ${v} (supported versions: ${Z1.join(", ")})`)),this.createJsonErrorResponse(400,-32000,`Bad Request: Unsupported protocol version: ${v} (supported versions: ${Z1.join(", ")})`);return}async close(){this._streamMapping.forEach(({cleanup:$})=>{$()}),this._streamMapping.clear(),this._requestResponseMap.clear(),this.onclose?.()}closeSSEStream($){let v=this._requestToStreamMapping.get($);if(!v)return;let D=this._streamMapping.get(v);if(D)D.cleanup()}closeStandaloneSSEStream(){let $=this._streamMapping.get(this._standaloneSseStreamId);if($)$.cleanup()}async send($,v){let D=v?.relatedRequestId;if(n4($)||O1($))D=$.id;if(D===void 0){if(n4($)||O1($))throw Error("Cannot send a response on a standalone SSE stream unless resuming a previous client request");let G;if(this._eventStore)G=await this._eventStore.storeEvent(this._standaloneSseStreamId,$);let J=this._streamMapping.get(this._standaloneSseStreamId);if(J===void 0)return;if(J.controller&&J.encoder)this.writeSSEEvent(J.controller,J.encoder,$,G);return}let X=this._requestToStreamMapping.get(D);if(!X)throw Error(`No connection established for request ID: ${String(D)}`);let U=this._streamMapping.get(X);if(!this._enableJsonResponse&&U?.controller&&U?.encoder){let G;if(this._eventStore)G=await this._eventStore.storeEvent(X,$);this.writeSSEEvent(U.controller,U.encoder,$,G)}if(n4($)||O1($)){this._requestResponseMap.set(D,$);let G=Array.from(this._requestToStreamMapping.entries()).filter(([Q,W])=>W===X).map(([Q])=>Q);if(G.every((Q)=>this._requestResponseMap.has(Q))){if(!U)throw Error(`No connection established for request ID: ${String(D)}`);if(this._enableJsonResponse&&U.resolveJson){let Q={"Content-Type":"application/json"};if(this.sessionId!==void 0)Q["mcp-session-id"]=this.sessionId;let W=G.map((z)=>this._requestResponseMap.get(z));if(W.length===1)U.resolveJson(new Response(JSON.stringify(W[0]),{status:200,headers:Q}));else U.resolveJson(new Response(JSON.stringify(W),{status:200,headers:Q}))}else U.cleanup();for(let Q of G)this._requestResponseMap.delete(Q),this._requestToStreamMapping.delete(Q)}}}}var qz="/.well-known/oauth-protected-resource",OM={"access-control-allow-origin":"*","access-control-allow-methods":"GET, POST, DELETE, OPTIONS","access-control-allow-headers":"authorization, content-type, accept, mcp-protocol-version, mcp-session-id, last-event-id","access-control-expose-headers":"mcp-session-id, www-authenticate, retry-after","access-control-max-age":"86400"};function gV($,v,D,X){if($.method==="OPTIONS")return new Response(null,{status:204});if($.method==="GET"&&X.has(v.pathname)){let U=v.pathname.slice(37);return A1(200,{resource:`${D.publicOrigin}${U}`,authorization_servers:[D.authorizationServerIssuer],bearer_methods_supported:["header"]})}return null}function Sz($,v,D=""){let X=[...v?[`error="${v}"`]:[],`resource_metadata="${$.publicOrigin}/.well-known/oauth-protected-resource${D}"`];return new Response(JSON.stringify({error:v??"unauthorized"}),{status:401,headers:{"www-authenticate":`Bearer ${X.join(", ")}`,"content-type":"application/json"}})}function CV($){let v=$.headers.get("authorization");if(!v?.startsWith("Bearer "))return null;let D=v.slice(7).trim();return D.length>0?D:null}function A1($,v){return new Response(JSON.stringify(v),{status:$,headers:{"content-type":"application/json"}})}function uV($){let v=new Headers($.headers);for(let[D,X]of Object.entries(OM))v.set(D,X);return new Response($.body,{status:$.status,statusText:$.statusText,headers:v})}function xV($,v){let D=$.headers.get("cf-connecting-ip")??$.headers.get("x-forwarded-for")??"unknown";return v?[`ip:${D}`,`tok:${v}`]:[`ip:${D}`]}class fV{token;userId;constructor($,v){this.token=$;this.userId=v}async getAccessToken(){return this.token}async getUserId(){return this.userId}async login(){throw Error("In hosted mode, sign-in is handled by your MCP client, not a tool.")}async logout(){throw Error("In hosted mode, sign-out is handled by your MCP client, not a tool.")}}function _V($){let v=async(D,X)=>{let U=await fetch(D,X);if(U.status===401)$.onUnauthorized?.();return U};return{session:new fV($.token,$.userId),trpc:t4($.trpcUrl,async()=>$.token,{fetch:v})}}function w1($){return!!$._zod}function W6($,v){if(w1($))return m6($,v);return $.safeParse(v)}function lD($){if(!$)return;let v;if(w1($))v=$._zod?.def?.shape;else v=$.shape;if(!v)return;if(typeof v==="function")try{return v()}catch{return}return v}function iV($){if(w1($)){let G=$._zod?.def;if(G){if(G.value!==void 0)return G.value;if(Array.isArray(G.values)&&G.values.length>0)return G.values[0]}}let D=$._def;if(D){if(D.value!==void 0)return D.value;if(Array.isArray(D.values)&&D.values.length>0)return D.values[0]}let X=$.value;if(X!==void 0)return X;return}function z6($){return $==="completed"||$==="failed"||$==="cancelled"}var HM=Symbol("Let zodToJsonSchema decide on which parser to use");var al=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function kz($){let D=lD($)?.method;if(!D)throw Error("Schema is missing a method literal");let X=iV(D);if(typeof X!=="string")throw Error("Schema method literal must be a string");return X}function Ez($,v){let D=W6($,v);if(!D.success)throw D.error;return D.data}var PM=60000;class Tz{constructor($){if(this._options=$,this._requestMessageId=0,this._requestHandlers=new Map,this._requestHandlerAbortControllers=new Map,this._notificationHandlers=new Map,this._responseHandlers=new Map,this._progressHandlers=new Map,this._timeoutInfo=new Map,this._pendingDebouncedNotifications=new Set,this._taskProgressTokens=new Map,this._requestResolvers=new Map,this.setNotificationHandler(TD,(v)=>{this._oncancel(v)}),this.setNotificationHandler(CD,(v)=>{this._onprogress(v)}),this.setRequestHandler(gD,(v)=>({})),this._taskStore=$?.taskStore,this._taskMessageQueue=$?.taskMessageQueue,this._taskStore)this.setRequestHandler(uD,async(v,D)=>{let X=await this._taskStore.getTask(v.params.taskId,D.sessionId);if(!X)throw new x(f.InvalidParams,"Failed to retrieve task: Task not found");return{...X}}),this.setRequestHandler(fD,async(v,D)=>{let X=async()=>{let U=v.params.taskId;if(this._taskMessageQueue){let J;while(J=await this._taskMessageQueue.dequeue(U,D.sessionId)){if(J.type==="response"||J.type==="error"){let Q=J.message,W=Q.id,z=this._requestResolvers.get(W);if(z)if(this._requestResolvers.delete(W),J.type==="response")z(Q);else{let Y=Q,I=new x(Y.error.code,Y.error.message,Y.error.data);z(I)}else{let Y=J.type==="response"?"Response":"Error";this._onerror(Error(`${Y} handler missing for request ${W}`))}continue}await this._transport?.send(J.message,{relatedRequestId:D.requestId})}}let G=await this._taskStore.getTask(U,D.sessionId);if(!G)throw new x(f.InvalidParams,`Task not found: ${U}`);if(!z6(G.status))return await this._waitForTaskUpdate(U,D.signal),await X();if(z6(G.status)){let J=await this._taskStore.getTaskResult(U,D.sessionId);return this._clearTaskQueue(U),{...J,_meta:{...J._meta,[J6]:{taskId:U}}}}return await X()};return await X()}),this.setRequestHandler(_D,async(v,D)=>{try{let{tasks:X,nextCursor:U}=await this._taskStore.listTasks(v.params?.cursor,D.sessionId);return{tasks:X,nextCursor:U,_meta:{}}}catch(X){throw new x(f.InvalidParams,`Failed to list tasks: ${X instanceof Error?X.message:String(X)}`)}}),this.setRequestHandler(yD,async(v,D)=>{try{let X=await this._taskStore.getTask(v.params.taskId,D.sessionId);if(!X)throw new x(f.InvalidParams,`Task not found: ${v.params.taskId}`);if(z6(X.status))throw new x(f.InvalidParams,`Cannot cancel task in terminal status: ${X.status}`);await this._taskStore.updateTaskStatus(v.params.taskId,"cancelled","Client cancelled task execution.",D.sessionId),this._clearTaskQueue(v.params.taskId);let U=await this._taskStore.getTask(v.params.taskId,D.sessionId);if(!U)throw new x(f.InvalidParams,`Task not found after cancellation: ${v.params.taskId}`);return{_meta:{},...U}}catch(X){if(X instanceof x)throw X;throw new x(f.InvalidRequest,`Failed to cancel task: ${X instanceof Error?X.message:String(X)}`)}})}async _oncancel($){if(!$.params.requestId)return;this._requestHandlerAbortControllers.get($.params.requestId)?.abort($.params.reason)}_setupTimeout($,v,D,X,U=!1){this._timeoutInfo.set($,{timeoutId:setTimeout(X,v),startTime:Date.now(),timeout:v,maxTotalTimeout:D,resetTimeoutOnProgress:U,onTimeout:X})}_resetTimeout($){let v=this._timeoutInfo.get($);if(!v)return!1;let D=Date.now()-v.startTime;if(v.maxTotalTimeout&&D>=v.maxTotalTimeout)throw this._timeoutInfo.delete($),x.fromError(f.RequestTimeout,"Maximum total timeout exceeded",{maxTotalTimeout:v.maxTotalTimeout,totalElapsed:D});return clearTimeout(v.timeoutId),v.timeoutId=setTimeout(v.onTimeout,v.timeout),!0}_cleanupTimeout($){let v=this._timeoutInfo.get($);if(v)clearTimeout(v.timeoutId),this._timeoutInfo.delete($)}async connect($){if(this._transport)throw Error("Already connected to a transport. Call close() before connecting to a new transport, or use a separate Protocol instance per connection.");this._transport=$;let v=this.transport?.onclose;this._transport.onclose=()=>{v?.(),this._onclose()};let D=this.transport?.onerror;this._transport.onerror=(U)=>{D?.(U),this._onerror(U)};let X=this._transport?.onmessage;this._transport.onmessage=(U,G)=>{if(X?.(U,G),n4(U)||O1(U))this._onresponse(U);else if(Q6(U))this._onrequest(U,G);else if(MV(U))this._onnotification(U);else this._onerror(Error(`Unknown message type: ${JSON.stringify(U)}`))},await this._transport.start()}_onclose(){let $=this._responseHandlers;this._responseHandlers=new Map,this._progressHandlers.clear(),this._taskProgressTokens.clear(),this._pendingDebouncedNotifications.clear();for(let D of this._timeoutInfo.values())clearTimeout(D.timeoutId);this._timeoutInfo.clear();for(let D of this._requestHandlerAbortControllers.values())D.abort();this._requestHandlerAbortControllers.clear();let v=x.fromError(f.ConnectionClosed,"Connection closed");this._transport=void 0,this.onclose?.();for(let D of $.values())D(v)}_onerror($){this.onerror?.($)}_onnotification($){let v=this._notificationHandlers.get($.method)??this.fallbackNotificationHandler;if(v===void 0)return;Promise.resolve().then(()=>v($)).catch((D)=>this._onerror(Error(`Uncaught error in notification handler: ${D}`)))}_onrequest($,v){let D=this._requestHandlers.get($.method)??this.fallbackRequestHandler,X=this._transport,U=$.params?._meta?.[J6]?.taskId;if(D===void 0){let z={jsonrpc:"2.0",id:$.id,error:{code:f.MethodNotFound,message:"Method not found"}};if(U&&this._taskMessageQueue)this._enqueueTaskMessage(U,{type:"error",message:z,timestamp:Date.now()},X?.sessionId).catch((Y)=>this._onerror(Error(`Failed to enqueue error response: ${Y}`)));else X?.send(z).catch((Y)=>this._onerror(Error(`Failed to send an error response: ${Y}`)));return}let G=new AbortController;this._requestHandlerAbortControllers.set($.id,G);let J=jV($.params)?$.params.task:void 0,Q=this._taskStore?this.requestTaskStore($,X?.sessionId):void 0,W={signal:G.signal,sessionId:X?.sessionId,_meta:$.params?._meta,sendNotification:async(z)=>{if(G.signal.aborted)return;let Y={relatedRequestId:$.id};if(U)Y.relatedTask={taskId:U};await this.notification(z,Y)},sendRequest:async(z,Y,I)=>{if(G.signal.aborted)throw new x(f.ConnectionClosed,"Request was cancelled");let V={...I,relatedRequestId:$.id};if(U&&!V.relatedTask)V.relatedTask={taskId:U};let K=V.relatedTask?.taskId??U;if(K&&Q)await Q.updateTaskStatus(K,"input_required");return await this.request(z,Y,V)},authInfo:v?.authInfo,requestId:$.id,requestInfo:v?.requestInfo,taskId:U,taskStore:Q,taskRequestedTtl:J?.ttl,closeSSEStream:v?.closeSSEStream,closeStandaloneSSEStream:v?.closeStandaloneSSEStream};Promise.resolve().then(()=>{if(J)this.assertTaskHandlerCapability($.method)}).then(()=>D($,W)).then(async(z)=>{if(G.signal.aborted)return;let Y={result:z,jsonrpc:"2.0",id:$.id};if(U&&this._taskMessageQueue)await this._enqueueTaskMessage(U,{type:"response",message:Y,timestamp:Date.now()},X?.sessionId);else await X?.send(Y)},async(z)=>{if(G.signal.aborted)return;let Y={jsonrpc:"2.0",id:$.id,error:{code:Number.isSafeInteger(z.code)?z.code:f.InternalError,message:z.message??"Internal error",...z.data!==void 0&&{data:z.data}}};if(U&&this._taskMessageQueue)await this._enqueueTaskMessage(U,{type:"error",message:Y,timestamp:Date.now()},X?.sessionId);else await X?.send(Y)}).catch((z)=>this._onerror(Error(`Failed to send response: ${z}`))).finally(()=>{if(this._requestHandlerAbortControllers.get($.id)===G)this._requestHandlerAbortControllers.delete($.id)})}_onprogress($){let{progressToken:v,...D}=$.params,X=Number(v),U=this._progressHandlers.get(X);if(!U){this._onerror(Error(`Received a progress notification for an unknown token: ${JSON.stringify($)}`));return}let G=this._responseHandlers.get(X),J=this._timeoutInfo.get(X);if(J&&G&&J.resetTimeoutOnProgress)try{this._resetTimeout(X)}catch(Q){this._responseHandlers.delete(X),this._progressHandlers.delete(X),this._cleanupTimeout(X),G(Q);return}U(D)}_onresponse($){let v=Number($.id),D=this._requestResolvers.get(v);if(D){if(this._requestResolvers.delete(v),n4($))D($);else{let G=new x($.error.code,$.error.message,$.error.data);D(G)}return}let X=this._responseHandlers.get(v);if(X===void 0){this._onerror(Error(`Received a response for an unknown message ID: ${JSON.stringify($)}`));return}this._responseHandlers.delete(v),this._cleanupTimeout(v);let U=!1;if(n4($)&&$.result&&typeof $.result==="object"){let G=$.result;if(G.task&&typeof G.task==="object"){let J=G.task;if(typeof J.taskId==="string")U=!0,this._taskProgressTokens.set(J.taskId,v)}}if(!U)this._progressHandlers.delete(v);if(n4($))X($);else{let G=x.fromError($.error.code,$.error.message,$.error.data);X(G)}}get transport(){return this._transport}async close(){await this._transport?.close()}async*requestStream($,v,D){let{task:X}=D??{};if(!X){try{yield{type:"result",result:await this.request($,v,D)}}catch(G){yield{type:"error",error:G instanceof x?G:new x(f.InternalError,String(G))}}return}let U;try{let G=await this.request($,H1,D);if(G.task)U=G.task.taskId,yield{type:"taskCreated",task:G.task};else throw new x(f.InternalError,"Task creation did not return a task");while(!0){let J=await this.getTask({taskId:U},D);if(yield{type:"taskStatus",task:J},z6(J.status)){if(J.status==="completed")yield{type:"result",result:await this.getTaskResult({taskId:U},v,D)};else if(J.status==="failed")yield{type:"error",error:new x(f.InternalError,`Task ${U} failed`)};else if(J.status==="cancelled")yield{type:"error",error:new x(f.InternalError,`Task ${U} was cancelled`)};return}if(J.status==="input_required"){yield{type:"result",result:await this.getTaskResult({taskId:U},v,D)};return}let Q=J.pollInterval??this._options?.defaultTaskPollInterval??1000;await new Promise((W)=>setTimeout(W,Q)),D?.signal?.throwIfAborted()}}catch(G){yield{type:"error",error:G instanceof x?G:new x(f.InternalError,String(G))}}}request($,v,D){let{relatedRequestId:X,resumptionToken:U,onresumptiontoken:G,task:J,relatedTask:Q}=D??{};return new Promise((W,z)=>{let Y=(F)=>{z(F)};if(!this._transport){Y(Error("Not connected"));return}if(this._options?.enforceStrictCapabilities===!0)try{if(this.assertCapabilityForMethod($.method),J)this.assertTaskCapability($.method)}catch(F){Y(F);return}D?.signal?.throwIfAborted();let I=this._requestMessageId++,V={...$,jsonrpc:"2.0",id:I};if(D?.onprogress)this._progressHandlers.set(I,D.onprogress),V.params={...$.params,_meta:{...$.params?._meta||{},progressToken:I}};if(J)V.params={...V.params,task:J};if(Q)V.params={...V.params,_meta:{...V.params?._meta||{},[J6]:Q}};let K=(F)=>{this._responseHandlers.delete(I),this._progressHandlers.delete(I),this._cleanupTimeout(I),this._transport?.send({jsonrpc:"2.0",method:"notifications/cancelled",params:{requestId:I,reason:String(F)}},{relatedRequestId:X,resumptionToken:U,onresumptiontoken:G}).catch((g)=>this._onerror(Error(`Failed to send cancellation: ${g}`)));let S=F instanceof x?F:new x(f.RequestTimeout,String(F));z(S)};this._responseHandlers.set(I,(F)=>{if(D?.signal?.aborted)return;if(F instanceof Error)return z(F);try{let S=W6(v,F.result);if(!S.success)z(S.error);else W(S.data)}catch(S){z(S)}}),D?.signal?.addEventListener("abort",()=>{K(D?.signal?.reason)});let L=D?.timeout??PM,N=()=>K(x.fromError(f.RequestTimeout,"Request timed out",{timeout:L}));this._setupTimeout(I,L,D?.maxTotalTimeout,N,D?.resetTimeoutOnProgress??!1);let Z=Q?.taskId;if(Z){let F=(S)=>{let g=this._responseHandlers.get(I);if(g)g(S);else this._onerror(Error(`Response handler missing for side-channeled request ${I}`))};this._requestResolvers.set(I,F),this._enqueueTaskMessage(Z,{type:"request",message:V,timestamp:Date.now()}).catch((S)=>{this._cleanupTimeout(I),z(S)})}else this._transport.send(V,{relatedRequestId:X,resumptionToken:U,onresumptiontoken:G}).catch((F)=>{this._cleanupTimeout(I),z(F)})})}async getTask($,v){return this.request({method:"tasks/get",params:$},xD,v)}async getTaskResult($,v,D){return this.request({method:"tasks/result",params:$},v,D)}async listTasks($,v){return this.request({method:"tasks/list",params:$},iD,v)}async cancelTask($,v){return this.request({method:"tasks/cancel",params:$},bV,v)}async notification($,v){if(!this._transport)throw Error("Not connected");this.assertNotificationCapability($.method);let D=v?.relatedTask?.taskId;if(D){let J={...$,jsonrpc:"2.0",params:{...$.params,_meta:{...$.params?._meta||{},[J6]:v.relatedTask}}};await this._enqueueTaskMessage(D,{type:"notification",message:J,timestamp:Date.now()});return}if((this._options?.debouncedNotificationMethods??[]).includes($.method)&&!$.params&&!v?.relatedRequestId&&!v?.relatedTask){if(this._pendingDebouncedNotifications.has($.method))return;this._pendingDebouncedNotifications.add($.method),Promise.resolve().then(()=>{if(this._pendingDebouncedNotifications.delete($.method),!this._transport)return;let J={...$,jsonrpc:"2.0"};if(v?.relatedTask)J={...J,params:{...J.params,_meta:{...J.params?._meta||{},[J6]:v.relatedTask}}};this._transport?.send(J,v).catch((Q)=>this._onerror(Q))});return}let G={...$,jsonrpc:"2.0"};if(v?.relatedTask)G={...G,params:{...G.params,_meta:{...G.params?._meta||{},[J6]:v.relatedTask}}};await this._transport.send(G,v)}setRequestHandler($,v){let D=kz($);this.assertRequestHandlerCapability(D),this._requestHandlers.set(D,(X,U)=>{let G=Ez($,X);return Promise.resolve(v(G,U))})}removeRequestHandler($){this._requestHandlers.delete($)}assertCanSetRequestHandler($){if(this._requestHandlers.has($))throw Error(`A request handler for ${$} already exists, which would be overridden`)}setNotificationHandler($,v){let D=kz($);this._notificationHandlers.set(D,(X)=>{let U=Ez($,X);return Promise.resolve(v(U))})}removeNotificationHandler($){this._notificationHandlers.delete($)}_cleanupTaskProgressHandler($){let v=this._taskProgressTokens.get($);if(v!==void 0)this._progressHandlers.delete(v),this._taskProgressTokens.delete($)}async _enqueueTaskMessage($,v,D){if(!this._taskStore||!this._taskMessageQueue)throw Error("Cannot enqueue task message: taskStore and taskMessageQueue are not configured");let X=this._options?.maxTaskQueueSize;await this._taskMessageQueue.enqueue($,v,D,X)}async _clearTaskQueue($,v){if(this._taskMessageQueue){let D=await this._taskMessageQueue.dequeueAll($,v);for(let X of D)if(X.type==="request"&&Q6(X.message)){let U=X.message.id,G=this._requestResolvers.get(U);if(G)G(new x(f.InternalError,"Task cancelled or completed")),this._requestResolvers.delete(U);else this._onerror(Error(`Resolver missing for request ${U} during task ${$} cleanup`))}}}async _waitForTaskUpdate($,v){let D=this._options?.defaultTaskPollInterval??1000;try{let X=await this._taskStore?.getTask($);if(X?.pollInterval)D=X.pollInterval}catch{}return new Promise((X,U)=>{if(v.aborted){U(new x(f.InvalidRequest,"Request cancelled"));return}let G=setTimeout(X,D);v.addEventListener("abort",()=>{clearTimeout(G),U(new x(f.InvalidRequest,"Request cancelled"))},{once:!0})})}requestTaskStore($,v){let D=this._taskStore;if(!D)throw Error("No task store configured");return{createTask:async(X)=>{if(!$)throw Error("No request provided");return await D.createTask(X,$.id,{method:$.method,params:$.params},v)},getTask:async(X)=>{let U=await D.getTask(X,v);if(!U)throw new x(f.InvalidParams,"Failed to retrieve task: Task not found");return U},storeTaskResult:async(X,U,G)=>{await D.storeTaskResult(X,U,G,v);let J=await D.getTask(X,v);if(J){let Q=hv.parse({method:"notifications/tasks/status",params:J});if(await this.notification(Q),z6(J.status))this._cleanupTaskProgressHandler(X)}},getTaskResult:(X)=>{return D.getTaskResult(X,v)},updateTaskStatus:async(X,U,G)=>{let J=await D.getTask(X,v);if(!J)throw new x(f.InvalidParams,`Task "${X}" not found - it may have been cleaned up`);if(z6(J.status))throw new x(f.InvalidParams,`Cannot update task "${X}" from terminal status "${J.status}" to "${U}". Terminal states (completed, failed, cancelled) cannot transition to other states.`);await D.updateTaskStatus(X,U,G,v);let Q=await D.getTask(X,v);if(Q){let W=hv.parse({method:"notifications/tasks/status",params:Q});if(await this.notification(W),z6(Q.status))this._cleanupTaskProgressHandler(X)}},listTasks:(X)=>{return D.listTasks(X,v)}}}}function yV($){return $!==null&&typeof $==="object"&&!Array.isArray($)}function nV($,v){let D={...$};for(let X in v){let U=X,G=v[U];if(G===void 0)continue;let J=D[U];if(yV(J)&&yV(G))D[U]={...J,...G};else D[U]=G}return D}var wZ=w7(b5(),1),MZ=w7(AZ(),1);function r2(){let $=new wZ.default({strict:!1,validateFormats:!0,validateSchema:!1,allErrors:!0});return MZ.default($),$}class x5{constructor($){this._ajv=$??r2()}getValidator($){let v="$id"in $&&typeof $.$id==="string"?this._ajv.getSchema($.$id)??this._ajv.compile($):this._ajv.compile($);return(D)=>{if(v(D))return{valid:!0,data:D,errorMessage:void 0};else return{valid:!1,data:void 0,errorMessage:this._ajv.errorsText(v.errors)}}}}class f5{constructor($){this._server=$}requestStream($,v,D){return this._server.requestStream($,v,D)}createMessageStream($,v){let D=this._server.getClientCapabilities();if(($.tools||$.toolChoice)&&!D?.sampling?.tools)throw Error("Client does not support sampling tools capability.");if($.messages.length>0){let X=$.messages[$.messages.length-1],U=Array.isArray(X.content)?X.content:[X.content],G=U.some((z)=>z.type==="tool_result"),J=$.messages.length>1?$.messages[$.messages.length-2]:void 0,Q=J?Array.isArray(J.content)?J.content:[J.content]:[],W=Q.some((z)=>z.type==="tool_use");if(G){if(U.some((z)=>z.type!=="tool_result"))throw Error("The last message must contain only tool_result content if any is present");if(!W)throw Error("tool_result blocks are not matching any tool_use from the previous message")}if(W){let z=new Set(Q.filter((I)=>I.type==="tool_use").map((I)=>I.id)),Y=new Set(U.filter((I)=>I.type==="tool_result").map((I)=>I.toolUseId));if(z.size!==Y.size||![...z].every((I)=>Y.has(I)))throw Error("ids of tool_result blocks and tool_use blocks from previous message do not match")}}return this.requestStream({method:"sampling/createMessage",params:$},av,v)}elicitInputStream($,v){let D=this._server.getClientCapabilities(),X=$.mode??"form";switch(X){case"url":{if(!D?.elicitation?.url)throw Error("Client does not support url elicitation.");break}case"form":{if(!D?.elicitation?.form)throw Error("Client does not support form elicitation.");break}}let U=X==="form"&&$.mode===void 0?{...$,mode:"form"}:$;return this.requestStream({method:"elicitation/create",params:U},j1,v)}async getTask($,v){return this._server.getTask({taskId:$},v)}async getTaskResult($,v,D){return this._server.getTaskResult({taskId:$},v,D)}async listTasks($,v){return this._server.listTasks($?{cursor:$}:void 0,v)}async cancelTask($,v){return this._server.cancelTask({taskId:$},v)}}function PZ($,v,D){if(!$)throw Error(`${D} does not support task creation (required for ${v})`);switch(v){case"tools/call":if(!$.tools?.call)throw Error(`${D} does not support task creation for tools/call (required for ${v})`);break;default:break}}function bZ($,v,D){if(!$)throw Error(`${D} does not support task creation (required for ${v})`);switch(v){case"sampling/createMessage":if(!$.sampling?.createMessage)throw Error(`${D} does not support task creation for sampling/createMessage (required for ${v})`);break;case"elicitation/create":if(!$.elicitation?.create)throw Error(`${D} does not support task creation for elicitation/create (required for ${v})`);break;default:break}}class A0 extends Tz{constructor($,v){super(v);if(this._serverInfo=$,this._loggingLevels=new Map,this.LOG_LEVEL_SEVERITY=new Map(ov.options.map((D,X)=>[D,X])),this.isMessageIgnored=(D,X)=>{let U=this._loggingLevels.get(X);return U?this.LOG_LEVEL_SEVERITY.get(D)<this.LOG_LEVEL_SEVERITY.get(U):!1},this._capabilities=v?.capabilities??{},this._instructions=v?.instructions,this._jsonSchemaValidator=v?.jsonSchemaValidator??new x5,this.setRequestHandler(RD,(D)=>this._oninitialize(D)),this.setNotificationHandler(Nz,()=>this.oninitialized?.()),this._capabilities.logging)this.setRequestHandler(wz,async(D,X)=>{let U=X.sessionId||X.requestInfo?.headers["mcp-session-id"]||void 0,{level:G}=D.params,J=ov.safeParse(G);if(J.success)this._loggingLevels.set(U,J.data);return{}})}get experimental(){if(!this._experimental)this._experimental={tasks:new f5(this)};return this._experimental}registerCapabilities($){if(this.transport)throw Error("Cannot register capabilities after connecting to transport");this._capabilities=nV(this._capabilities,$)}setRequestHandler($,v){let X=lD($)?.method;if(!X)throw Error("Schema is missing a method literal");let U;if(w1(X)){let J=X;U=J._zod?.def?.value??J.value}else{let J=X;U=J._def?.value??J.value}if(typeof U!=="string")throw Error("Schema method literal must be a string");if(U==="tools/call"){let J=async(Q,W)=>{let z=W6(q6,Q);if(!z.success){let K=z.error instanceof Error?z.error.message:String(z.error);throw new x(f.InvalidParams,`Invalid tools/call request: ${K}`)}let{params:Y}=z.data,I=await Promise.resolve(v(Q,W));if(Y.task){let K=W6(H1,I);if(!K.success){let L=K.error instanceof Error?K.error.message:String(K.error);throw new x(f.InvalidParams,`Invalid task creation result: ${L}`)}return K.data}let V=W6(nD,I);if(!V.success){let K=V.error instanceof Error?V.error.message:String(V.error);throw new x(f.InvalidParams,`Invalid tools/call result: ${K}`)}return V.data};return super.setRequestHandler($,J)}return super.setRequestHandler($,v)}assertCapabilityForMethod($){switch($){case"sampling/createMessage":if(!this._clientCapabilities?.sampling)throw Error(`Client does not support sampling (required for ${$})`);break;case"elicitation/create":if(!this._clientCapabilities?.elicitation)throw Error(`Client does not support elicitation (required for ${$})`);break;case"roots/list":if(!this._clientCapabilities?.roots)throw Error(`Client does not support listing roots (required for ${$})`);break;case"ping":break}}assertNotificationCapability($){switch($){case"notifications/message":if(!this._capabilities.logging)throw Error(`Server does not support logging (required for ${$})`);break;case"notifications/resources/updated":case"notifications/resources/list_changed":if(!this._capabilities.resources)throw Error(`Server does not support notifying about resources (required for ${$})`);break;case"notifications/tools/list_changed":if(!this._capabilities.tools)throw Error(`Server does not support notifying of tool list changes (required for ${$})`);break;case"notifications/prompts/list_changed":if(!this._capabilities.prompts)throw Error(`Server does not support notifying of prompt list changes (required for ${$})`);break;case"notifications/elicitation/complete":if(!this._clientCapabilities?.elicitation?.url)throw Error(`Client does not support URL elicitation (required for ${$})`);break;case"notifications/cancelled":break;case"notifications/progress":break}}assertRequestHandlerCapability($){if(!this._capabilities)return;switch($){case"completion/complete":if(!this._capabilities.completions)throw Error(`Server does not support completions (required for ${$})`);break;case"logging/setLevel":if(!this._capabilities.logging)throw Error(`Server does not support logging (required for ${$})`);break;case"prompts/get":case"prompts/list":if(!this._capabilities.prompts)throw Error(`Server does not support prompts (required for ${$})`);break;case"resources/list":case"resources/templates/list":case"resources/read":if(!this._capabilities.resources)throw Error(`Server does not support resources (required for ${$})`);break;case"tools/call":case"tools/list":if(!this._capabilities.tools)throw Error(`Server does not support tools (required for ${$})`);break;case"tasks/get":case"tasks/list":case"tasks/result":case"tasks/cancel":if(!this._capabilities.tasks)throw Error(`Server does not support tasks capability (required for ${$})`);break;case"ping":case"initialize":break}}assertTaskCapability($){bZ(this._clientCapabilities?.tasks?.requests,$,"Client")}assertTaskHandlerCapability($){if(!this._capabilities)return;PZ(this._capabilities.tasks?.requests,$,"Server")}async _oninitialize($){let v=$.params.protocolVersion;return this._clientCapabilities=$.params.capabilities,this._clientVersion=$.params.clientInfo,{protocolVersion:Z1.includes(v)?v:Iz,capabilities:this.getCapabilities(),serverInfo:this._serverInfo,...this._instructions&&{instructions:this._instructions}}}getClientCapabilities(){return this._clientCapabilities}getClientVersion(){return this._clientVersion}getCapabilities(){return this._capabilities}async ping(){return this.request({method:"ping"},ED)}async createMessage($,v){if($.tools||$.toolChoice){if(!this._clientCapabilities?.sampling?.tools)throw Error("Client does not support sampling tools capability.")}if($.messages.length>0){let D=$.messages[$.messages.length-1],X=Array.isArray(D.content)?D.content:[D.content],U=X.some((W)=>W.type==="tool_result"),G=$.messages.length>1?$.messages[$.messages.length-2]:void 0,J=G?Array.isArray(G.content)?G.content:[G.content]:[],Q=J.some((W)=>W.type==="tool_use");if(U){if(X.some((W)=>W.type!=="tool_result"))throw Error("The last message must contain only tool_result content if any is present");if(!Q)throw Error("tool_result blocks are not matching any tool_use from the previous message")}if(Q){let W=new Set(J.filter((Y)=>Y.type==="tool_use").map((Y)=>Y.id)),z=new Set(X.filter((Y)=>Y.type==="tool_result").map((Y)=>Y.toolUseId));if(W.size!==z.size||![...W].every((Y)=>z.has(Y)))throw Error("ids of tool_result blocks and tool_use blocks from previous message do not match")}}if($.tools)return this.request({method:"sampling/createMessage",params:$},Mz,v);return this.request({method:"sampling/createMessage",params:$},av,v)}async elicitInput($,v){switch($.mode??"form"){case"url":{if(!this._clientCapabilities?.elicitation?.url)throw Error("Client does not support url elicitation.");let X=$;return this.request({method:"elicitation/create",params:X},j1,v)}case"form":{if(!this._clientCapabilities?.elicitation?.form)throw Error("Client does not support form elicitation.");let X=$.mode==="form"?$:{...$,mode:"form"},U=await this.request({method:"elicitation/create",params:X},j1,v);if(U.action==="accept"&&U.content&&X.requestedSchema)try{let J=this._jsonSchemaValidator.getValidator(X.requestedSchema)(U.content);if(!J.valid)throw new x(f.InvalidParams,`Elicitation response content does not match requested schema: ${J.errorMessage}`)}catch(G){if(G instanceof x)throw G;throw new x(f.InternalError,`Error validating elicitation response: ${G instanceof Error?G.message:String(G)}`)}return U}}}createElicitationCompletionNotifier($,v){if(!this._clientCapabilities?.elicitation?.url)throw Error("Client does not support URL elicitation (required for notifications/elicitation/complete)");return()=>this.notification({method:"notifications/elicitation/complete",params:{elicitationId:$}},v)}async listRoots($,v){return this.request({method:"roots/list",params:$},Pz,v)}async sendLoggingMessage($,v){if(this._capabilities.logging){if(!this.isMessageIgnored($.level,v))return this.notification({method:"notifications/message",params:$})}}async sendResourceUpdated($){return this.notification({method:"notifications/resources/updated",params:$})}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"})}}var _5=[{name:"Trading journal",what:"Log, tag, and review trades across every account and market.",mcp:["list_trades","get_trade","create_trade","update_trade","close_trade","delete_trade","delete_trades","import_trades","trade_stats","list_accounts","create_account"],dashboardOnly:["the visual journal with tag and emotion analytics","per-trade chart markers and replay"]},{name:"Alerts",what:"Price, trendline, and indicator alerts that watch the market for you.",mcp:["list_alerts","create_price_alert","create_trendline_alert","create_indicator_alert","list_indicator_alerts","update_indicator_alert","delete_indicator_alert","update_alert","delete_alert"],dashboardOnly:["drawing an alert directly on the chart","the alert inbox and history"]},{name:"Market data & indicators",what:"OHLC candles, technical indicators, and instrument config across markets.",mcp:["get_candles","get_indicators","get_market_config"],dashboardOnly:["the live, interactive multi-market chart"]},{name:"Macro & economic calendar",what:"Scheduled economic events and macro time series.",mcp:["list_economic_calendar","get_macro_series","get_macro_indicator"],dashboardOnly:["the filterable calendar view with per-event alerts"]},{name:"FX macro context",what:"Per-currency and per-pair macro context — recent releases and surprises, model predictions, cross-market risk sentiment, and the source documents (news, press releases) behind them.",mcp:["get_fx_pair_context","get_fx_currency_context","get_fx_predictions","get_fx_risk_sentiment","get_fx_documents","get_fx_sync_state"],dashboardOnly:[]},{name:"Charts",what:Y4?"Use the Aether Wealth dashboard for interactive charts.":"Render a chart image for a pair and timeframe.",mcp:Y4?[]:["render_chart"],dashboardOnly:["the full charting workspace with drawing tools and saved layouts"]},{name:"Pine Studio",what:"Author and backtest TradingView-style strategies on live data.",mcp:[],dashboardOnly:["the Pine editor, backtests, and turning a script into an alert"]},{name:"Aether Intelligence",what:"The in-app assistant that already sees the chart and the journal.",mcp:[],dashboardOnly:["the in-app chat that can mark up the chart as it answers"]}];function qZ(){let $=["AETHER WEALTH — capability map for assistants","","Aether Wealth is a multi-market trading workspace: charts, a trading journal,","alerts, an economic calendar, and an in-app AI assistant. You reach it two ways:","this MCP server (the tools below) and the web dashboard at",`${f4}. Call get_context first to snapshot the user's live state`,"(accounts, open trades, recent stats, active alerts) before you advise. When a",'task requires something marked "dashboard only", suggest the user open the',"dashboard rather than attempting it over MCP.",""];for(let v of _5)$.push(`## ${v.name}`),$.push(v.what),$.push(v.mcp.length>0?` MCP tools: ${v.mcp.join(", ")}`:" MCP tools: none yet"),$.push(` Dashboard only: ${v.dashboardOnly.join("; ")}`),$.push("");return $.join(`
|
|
104
104
|
`).trimEnd()}var PX=["Aether Wealth spans a trading journal, alerts, market data and indicators, a","macro calendar, charts, Pine Studio, and the Aether Intelligence assistant. Many","of these are callable over MCP; some are dashboard-only."].join(" ");function i5($={}){let v=$.hosted??!1,D=v?["Authentication is handled by the MCP connection itself — there are no sign-in tools to call. If calls fail with an authorization error, the user must re-authorize this connection in their MCP client settings."]:["Auth tools:"," • login — sign in. Opens the browser; the user authenticates and approves access. Call this first if a data tool reports the user is not signed in."," • logout — sign out on this device."],X=v?" 3. If it fails with an authorization error, tell the user to re-authorize the Aether Wealth connection in their MCP client, then retry.":' 3. If it reports "not signed in", call login, wait for the user to finish in the browser, then retry.';return[{name:"getting_started",description:"Brief the LLM on what the Aether Wealth MCP exposes and the sign-in-first flow.",handler:()=>[{role:"user",content:{type:"text",text:["You are connected to the Aether Wealth MCP — programmatic access to the user's trading journal, alerts, market data, indicators, and charts over an authenticated connection.","",...D,"","Context:"," • get_context — snapshot accounts, open trades, recent stats, and active alerts in one call. Call it first to ground your suggestions.","","Domains (partial — see the aetherwealth://capabilities resource for the full set):"," • Journal: list_trades, get_trade, list_accounts, create_account, create_trade, update_trade, close_trade, delete_trade, delete_trades, import_trades, trade_stats"," • Alerts: list_alerts, create_price_alert, create_trendline_alert, create_indicator_alert, list_indicator_alerts, update_indicator_alert, delete_indicator_alert, update_alert, delete_alert"," • Market data + indicators: get_candles, get_market_config, get_indicators"," • Macro: list_economic_calendar, get_macro_series, get_macro_indicator"," • FX macro context: get_fx_pair_context, get_fx_currency_context, get_fx_predictions, get_fx_risk_sentiment, get_fx_documents, get_fx_sync_state",...Y4?[]:[" • Charts: render_chart"]," • Broker execution: propose_trade, close_position, and modify_position create intents. Email/app modes need a user-provided code; auto mode needs no per-trade code. For push intents, do not ask for a code — use trade_intent_status to check the app approval outcome. disconnect_broker is the instant kill switch and requires no confirmation.","","Deletion rule:"," • delete_trade and delete_trades are permanent and only work on demo accounts. Live-account trade deletes are blocked by the backend.","","Recommended flow:"," 1. Call get_context to load live state."," 2. Try the data tool the user asked for (e.g. list_trades).",X].join(`
|
|
105
105
|
`)}}]},{name:"dashboard_context",description:"Brief the LLM on the full Aether Wealth surface, grounding in live state, and when to suggest the dashboard.",handler:()=>[{role:"user",content:{type:"text",text:["You are connected to Aether Wealth, a multi-market trading workspace.",PX,"","Before you advise, call get_context to load the user's live state (accounts, open trades, recent stats, active alerts) so your suggestions fit what they are actually doing. The aetherwealth://capabilities resource, if your client attaches it, is the full surface map — which actions are MCP-callable vs dashboard-only.","","When the user needs something that is dashboard-only (the full charting workspace and saved layouts, the Pine editor, the full journal UI, the Aether Intelligence assistant),",`tell them to open the dashboard at ${f4} rather than attempting it over MCP.`].join(`
|
|
106
|
-
`)}}]}]}function y5(){return[{uri:"aetherwealth://capabilities",name:"Aether Wealth capabilities",description:"What Aether Wealth can do across all surfaces, and which actions are MCP-callable vs dashboard-only. Attach for product context.",mimeType:"text/markdown",handler:async()=>({text:qZ()})}]}function p2($){return{...$.broker===void 0?{}:{broker:$.broker},...$.accountType===void 0?{}:{accountType:$.accountType},...$.initialBalance===void 0?{}:{initialBalance:$.initialBalance},...$.currency===void 0?{}:{currency:$.currency},...$.notes===void 0?{}:{notes:$.notes},...$.defaultRiskAmount===void 0?{}:{defaultRiskAmount:$.defaultRiskAmount}}}function t2($){return{name:$.name,...p2($)}}function SZ($){return $.trading.accounts.list.query()}function kZ($,v){return $.trading.accounts.create.mutate(t2(v))}function n5($){return{triggerType:$.triggerType??"close",isPersistent:$.isPersistent??!1,notifyEmail:$.notifyEmail??!0,notifyPush:$.notifyPush??!0,...$.message===void 0?{}:{message:$.message},...$.expiresAt===void 0?{}:{expiresAt:$.expiresAt}}}function EZ($){return{...$.includeArchived===void 0?{}:{includeArchived:$.includeArchived},...$.pair===void 0?{}:{pair:$.pair}}}function o2($){return{id:$.id,...$.price===void 0?{}:{price:$.price},...$.price1===void 0?{}:{price1:$.price1},...$.price2===void 0?{}:{price2:$.price2},...$.time1===void 0?{}:{time1:$.time1},...$.time2===void 0?{}:{time2:$.time2},...$.condition===void 0?{}:{condition:$.condition},...$.triggerType===void 0?{}:{triggerType:$.triggerType},...$.timeframe===void 0?{}:{timeframe:$.timeframe},...$.isActive===void 0?{}:{isActive:$.isActive},...$.isArchived===void 0?{}:{isArchived:$.isArchived},...$.isPersistent===void 0?{}:{isPersistent:$.isPersistent},...$.notifyEmail===void 0?{}:{notifyEmail:$.notifyEmail},...$.notifyPush===void 0?{}:{notifyPush:$.notifyPush},...$.message===void 0?{}:{message:$.message},...$.expiresAt===void 0?{}:{expiresAt:$.expiresAt}}}function a2($){return{id:$.id,...$.condition===void 0?{}:{condition:$.condition},...$.dedupMode===void 0?{}:{dedupMode:$.dedupMode},...$.triggerType===void 0?{}:{triggerType:$.triggerType},...$.isActive===void 0?{}:{isActive:$.isActive},...$.isArchived===void 0?{}:{isArchived:$.isArchived},...$.isPersistent===void 0?{}:{isPersistent:$.isPersistent},...$.notifyEmail===void 0?{}:{notifyEmail:$.notifyEmail},...$.notifyPush===void 0?{}:{notifyPush:$.notifyPush},...$.message===void 0?{}:{message:$.message},...$.expiresAt===void 0?{}:{expiresAt:$.expiresAt}}}function TZ($,v){return $.alerts.list.query(EZ(v))}function RZ($,v){let D={pair:v.pair,timeframe:v.timeframe,price:v.price,condition:v.condition,...n5(v)};return $.alerts.createPrice.mutate(D)}function gZ($,v){let D={pair:v.pair,timeframe:v.timeframe,price1:v.price1,time1:v.time1,price2:v.price2,time2:v.time2,condition:v.condition,...n5(v)};return $.alerts.createTrendline.mutate(D)}function CZ($,v){return $.alerts.update.mutate(o2(v))}function uZ($,v){return $.alerts.delete.mutate({id:v.id})}function xZ($,v){let D=EZ(v);return $.alerts.indicator.list.query(D)}function fZ($,v){let D={pair:v.pair,timeframe:v.timeframe,indicatorType:v.indicatorType,indicatorParams:v.indicatorParams,outputSeries:v.outputSeries,condition:v.condition,dedupMode:v.dedupMode??"edge",...n5(v)};return $.alerts.indicator.create.mutate(D)}function _Z($,v){return $.alerts.indicator.update.mutate(a2(v))}function iZ($,v){return $.alerts.indicator.delete.mutate({id:v.id})}function e2($){if($.provider==="mt5_executor")return{accountId:$.accountId,provider:$.provider,baseUrl:$.baseUrl,providerAccountRef:$.providerAccountRef,providerToken:$.providerToken,...$.approvalMode===void 0?{}:{approvalMode:$.approvalMode}};return{accountId:$.accountId,region:$.region,providerAccountRef:$.providerAccountRef,providerToken:$.providerToken,...$.provider===void 0?{}:{provider:$.provider},...$.approvalMode===void 0?{}:{approvalMode:$.approvalMode}}}function bX($){return{accountId:$.accountId}}function s2($){return{accountId:$.accountId,symbol:$.symbol}}function $R($){return{accountId:$.accountId,approvalMode:$.approvalMode,...$.totpCode===void 0?{}:{totpCode:$.totpCode}}}function vR($){return{accountId:$.accountId,symbol:$.symbol,direction:$.direction,stopLoss:$.stopLoss,...$.orderType===void 0?{}:{orderType:$.orderType},...$.entryPrice===void 0?{}:{entryPrice:$.entryPrice},...$.takeProfit===void 0?{}:{takeProfit:$.takeProfit},...$.riskPercent===void 0?{}:{riskPercent:$.riskPercent},...$.riskAmount===void 0?{}:{riskAmount:$.riskAmount}}}function UR($){return{intentId:$.intentId,...$.code===void 0?{}:{code:$.code}}}function DR($){return{intentId:$.intentId}}function XR($){return{intentId:$.intentId}}function GR($){return{accountId:$.accountId,positionId:$.positionId,...$.volume===void 0?{}:{volume:$.volume}}}function JR($){return{accountId:$.accountId,positionId:$.positionId,...$.stopLoss===void 0?{}:{stopLoss:$.stopLoss},...$.takeProfit===void 0?{}:{takeProfit:$.takeProfit}}}function yZ($,v){return $.execution.connect.mutate(e2(v))}function nZ($,v){return $.execution.status.query(bX(v))}function lZ($,v){return $.execution.disconnect.mutate(bX(v))}function hZ($,v){return $.execution.setApprovalMode.mutate($R(v))}function mZ($,v){return $.execution.account.query(bX(v))}function cZ($,v){return $.execution.positions.query(bX(v))}function dZ($,v){return $.execution.quote.query(s2(v))}function rZ($,v){return $.execution.propose.mutate(vR(v))}function pZ($,v){return $.execution.execute.mutate(UR(v))}function tZ($,v){return $.execution.cancel.mutate(DR(v))}function oZ($,v){return $.execution.intentStatus.query(XR(v))}function aZ($,v){return $.execution.closePosition.mutate(GR(v))}function eZ($,v){return $.execution.modifyPosition.mutate(JR(v))}function QR($){return{pair:$.pair,interval:$.interval,indicators:$.indicators.map((v)=>({name:v.name,...v.params===void 0?{}:{params:v.params}})),...$.outputsize===void 0?{}:{outputsize:$.outputsize}}}function sZ($,v){return $.technicalIndicators.get.query(QR(v))}var $O=["3m","6m","12m","24m","all"];function WR($){return{...$.currency===void 0?{}:{currency:$.currency},...$.from===void 0?{}:{from:$.from},...$.to===void 0?{}:{to:$.to},...$.indicator===void 0?{}:{indicator:$.indicator},...$.impactMin===void 0?{}:{impactMin:$.impactMin},...$.view===void 0?{}:{view:$.view}}}function zR($){return{currency:$.currency,indicator:$.indicator,...$.from===void 0?{}:{from:$.from},...$.to===void 0?{}:{to:$.to},...$.limit===void 0?{}:{limit:$.limit}}}function YR($){return{currency:$.currency,indicator:$.indicator,...$.range===void 0?{}:{range:$.range}}}function IR($){return{pair:$.pair,timeframe:$.timeframe,...$.limit===void 0?{}:{limit:$.limit},...$.offset===void 0?{}:{offset:$.offset},...$.cursor===void 0?{}:{cursor:$.cursor}}}function VR($){return{...IR($),...$.sourceId===void 0?{}:{sourceId:$.sourceId}}}function qX($,v){return $.marketData.mcpCandles.query(VR(v))}function vO($,v){return $.marketData.listCalendar.query(WR(v))}function UO($,v){return $.marketData.listIndicatorSeries.query(zR(v))}function DO($,v){return $.macroIndicator.list.query(YR(v))}function XO($){return $.marketData.getConfig.query()}function KR($){return{...$.accountId===void 0?{}:{accountId:$.accountId},...$.pair===void 0?{}:{pair:$.pair},...$.from===void 0?{}:{from:$.from},...$.to===void 0?{}:{to:$.to}}}function GO($,v){return $.trading.analytics.stats.query(KR(v))}function LR($){return{...$.accountId===void 0?{}:{accountId:$.accountId},...$.status===void 0||$.status==="ALL"?{}:{status:$.status},...$.pair===void 0?{}:{pair:$.pair},...$.from===void 0?{}:{from:$.from},...$.to===void 0?{}:{to:$.to},...$.page===void 0?{}:{page:$.page},...$.limit===void 0?{}:{limit:$.limit}}}function JO($){return{...$.stopLoss===void 0?{}:{stopLoss:$.stopLoss},...$.takeProfit===void 0?{}:{takeProfit:$.takeProfit},...$.lotSize===void 0?{}:{lotSize:$.lotSize},...$.notes===void 0?{}:{notes:$.notes},...$.timeframe===void 0?{}:{timeframe:$.timeframe},...$.riskPercent===void 0?{}:{riskPercent:$.riskPercent},...$.tags===void 0?{}:{tags:$.tags}}}function BR($){return{accountId:$.accountId,pair:$.pair,direction:$.direction,entryPrice:$.entryPrice,entryTime:$.entryTime,...JO($)}}function NR($){return{id:$.id,...$.pair===void 0?{}:{pair:$.pair},...$.direction===void 0?{}:{direction:$.direction},...$.entryPrice===void 0?{}:{entryPrice:$.entryPrice},...$.entryTime===void 0?{}:{entryTime:$.entryTime},...JO($)}}function ZR($){return{id:$.id,exitPrice:$.exitPrice,exitTime:$.exitTime,...$.fees===void 0?{}:{fees:$.fees},...$.swap===void 0?{}:{swap:$.swap},...$.notes===void 0?{}:{notes:$.notes}}}function OR($){return{accountId:$.accountId,status:$.status}}function HR($){return{pair:$.pair,direction:$.direction,entryPrice:$.entryPrice,lotSize:$.lotSize,entryTime:$.entryTime,...$.exitPrice===void 0?{}:{exitPrice:$.exitPrice},...$.stopLoss===void 0?{}:{stopLoss:$.stopLoss},...$.takeProfit===void 0?{}:{takeProfit:$.takeProfit},...$.exitTime===void 0?{}:{exitTime:$.exitTime},...$.notes===void 0?{}:{notes:$.notes},...$.timeframe===void 0?{}:{timeframe:$.timeframe},...$.emotionalTag===void 0?{}:{emotionalTag:$.emotionalTag},...$.fees===void 0?{}:{fees:$.fees},...$.swap===void 0?{}:{swap:$.swap},...$.reportedPnl===void 0?{}:{reportedPnl:$.reportedPnl},...$.tags===void 0?{}:{tags:$.tags}}}function FR($){return{accountId:$.accountId,trades:$.trades.map(HR)}}function QO($,v){return $.trading.trades.list.query(LR(v))}function WO($,v){return $.trading.trades.get.query({id:v.id})}function zO($,v){return $.trading.trades.create.mutate(BR(v))}function YO($,v){return $.trading.trades.update.mutate(NR(v))}function IO($,v){return $.trading.trades.close.mutate(ZR(v))}function VO($,v){return $.trading.trades.delete.mutate({id:v.id})}function KO($,v){return $.trading.trades.deleteMany.mutate(OR(v))}function LO($,v){return $.trading.trades.importMany.mutate(FR(v))}function E($){return $}var l5='Not signed in to Aether Wealth. Call the "login" tool to authenticate, then retry.';async function T($){if(!await $.session.getAccessToken())throw Error(l5)}var BO={type:"integer",minimum:1,maximum:200,description:"Max rows to return"},NO={type:"integer",minimum:1,description:"Page number (1-indexed)"};function SX($,v){if(v===null||v===void 0){if($.required&&$.required.length>0)return{ok:!1,reason:`missing required: ${$.required.join(", ")}`};return{ok:!0,args:{}}}if(typeof v!=="object"||Array.isArray(v))return{ok:!1,reason:"args must be an object"};let D=v,X=jR($,D)??AR($,D);return X?{ok:!1,reason:X}:{ok:!0,args:D}}function jR($,v){for(let D of $.required??[])if(!(D in v)||v[D]===void 0||v[D]===null)return`missing required: ${D}`;return null}function AR($,v){if($.additionalProperties!==!1)return null;for(let D of Object.keys(v))if(!(D in $.properties))return`unknown property: ${D}`;return null}var h5={type:"string",enum:["above","below","crosses"]},w0={triggerType:{type:"string",enum:["close","wick"],description:"default: close"},isPersistent:{type:"boolean",description:"Re-arm after firing. default: false"},notifyEmail:{type:"boolean",description:"default: true"},notifyPush:{type:"boolean",description:"default: true"},message:{type:"string"},expiresAt:{type:"string",description:"ISO 8601 datetime"}},kX=[E({name:"list_alerts",description:"List your price + trendline alerts. Optionally include archived or filter by pair. Requires sign-in.",inputSchema:{type:"object",properties:{includeArchived:{type:"boolean"},pair:{type:"string"}},additionalProperties:!1},handler:async($,v)=>{return await T(v),TZ(v.trpc,$)}}),E({name:"create_price_alert",description:"Create a price-level alert (fires when price is above/below/crosses a level). Requires sign-in.",inputSchema:{type:"object",properties:{pair:{type:"string",description:"e.g. EURUSD, BTCUSD"},timeframe:{type:"string",description:"e.g. 1h, 4h, 1d"},price:{type:"number"},condition:h5,...w0},required:["pair","timeframe","price","condition"],additionalProperties:!1},handler:async($,v)=>{return await T(v),RZ(v.trpc,$)}}),E({name:"create_trendline_alert",description:"Create a trendline alert (fires when price crosses a line defined by two points). Requires sign-in.",inputSchema:{type:"object",properties:{pair:{type:"string"},timeframe:{type:"string"},price1:{type:"number"},time1:{type:"string",description:"ISO 8601 datetime of point 1"},price2:{type:"number"},time2:{type:"string",description:"ISO 8601 datetime of point 2"},condition:h5,...w0},required:["pair","timeframe","price1","time1","price2","time2","condition"],additionalProperties:!1},handler:async($,v)=>{return await T(v),gZ(v.trpc,$)}}),E({name:"update_alert",description:"Update a price/trendline alert (e.g. change level, archive, mute). Requires sign-in.",inputSchema:{type:"object",properties:{id:{type:"string"},price:{type:"number"},price1:{type:"number"},price2:{type:"number"},time1:{type:"string"},time2:{type:"string"},condition:h5,timeframe:{type:"string"},isActive:{type:"boolean"},isArchived:{type:"boolean"},...w0},required:["id"],additionalProperties:!1},handler:async($,v)=>{return await T(v),CZ(v.trpc,$)}}),E({name:"delete_alert",description:"Delete a price/trendline alert by id. Requires sign-in.",inputSchema:{type:"object",properties:{id:{type:"string"}},required:["id"],additionalProperties:!1},handler:async($,v)=>{return await T(v),uZ(v.trpc,$)}}),E({name:"list_indicator_alerts",description:"List your indicator-based alerts. Optionally include archived or filter by pair. Requires sign-in.",inputSchema:{type:"object",properties:{includeArchived:{type:"boolean"},pair:{type:"string"}},additionalProperties:!1},handler:async($,v)=>{return await T(v),xZ(v.trpc,$)}}),E({name:"create_indicator_alert",description:"Create an indicator alert (fires on an indicator output condition, e.g. RSI crosses 70). `condition` is { op, threshold } or { op, other }. Requires sign-in.",inputSchema:{type:"object",properties:{pair:{type:"string"},timeframe:{type:"string"},indicatorType:{type:"string",description:"e.g. rsi, ema, macd"},indicatorParams:{type:"object",description:"Indicator settings, e.g. { length: 14 }"},outputSeries:{type:"string",description:"Which output series to watch"},condition:{type:"object",description:"{ op: gt|gte|lt|lte|eq|crosses_above|crosses_below, threshold } or { op: *_series, other }"},dedupMode:{type:"string",enum:["edge","continuous"],description:"default: edge"},...w0},required:["pair","timeframe","indicatorType","indicatorParams","outputSeries","condition"],additionalProperties:!1},handler:async($,v)=>{return await T(v),fZ(v.trpc,$)}}),E({name:"update_indicator_alert",description:"Update an indicator alert (condition, dedup, archive, mute). Requires sign-in.",inputSchema:{type:"object",properties:{id:{type:"string"},condition:{type:"object"},dedupMode:{type:"string",enum:["edge","continuous"]},isActive:{type:"boolean"},isArchived:{type:"boolean"},...w0},required:["id"],additionalProperties:!1},handler:async($,v)=>{return await T(v),_Z(v.trpc,$)}}),E({name:"delete_indicator_alert",description:"Delete an indicator alert by id. Requires sign-in.",inputSchema:{type:"object",properties:{id:{type:"string"}},required:["id"],additionalProperties:!1},handler:async($,v)=>{return await T(v),iZ(v.trpc,$)}})];var EX=[E({name:"login",description:"Sign in to Aether Wealth. Opens your browser to authenticate; once you approve, the MCP stores a per-user token and the data tools become available.",inputSchema:{type:"object",properties:{},additionalProperties:!1},handler:async($,v)=>{return await v.session.login(),{status:"signed_in",message:"Signed in to Aether Wealth."}}}),E({name:"logout",description:"Sign out of Aether Wealth on this device. Clears the stored access token.",inputSchema:{type:"object",properties:{},additionalProperties:!1},handler:async($,v)=>{return await v.session.logout(),{status:"signed_out",message:"Signed out on this device."}}})];var B$=($,v,D,X)=>{return{id:$,displayName:`${$.slice(0,3)}/${$.slice(3)}`,kind:"forex",exchange:"FX",region:"GLOBAL",category:D,pipSize:X?.pipSize??0.0001,priceDecimals:X?.priceDecimals??5,contractSize:1e5,providers:{twelvedata:v}}},wR=[B$("AUDUSD","AUD/USD","Forex Majors"),B$("EURUSD","EUR/USD","Forex Majors"),B$("GBPUSD","GBP/USD","Forex Majors"),B$("USDCAD","USD/CAD","Forex Majors"),B$("USDCHF","USD/CHF","Forex Majors"),B$("USDJPY","USD/JPY","Forex Majors",{pipSize:0.01,priceDecimals:3}),B$("AUDCAD","AUD/CAD","Forex Minors"),B$("AUDCHF","AUD/CHF","Forex Minors"),B$("AUDJPY","AUD/JPY","Forex Minors",{pipSize:0.01,priceDecimals:3}),B$("AUDNZD","AUD/NZD","Forex Minors"),B$("EURAUD","EUR/AUD","Forex Minors"),B$("EURCAD","EUR/CAD","Forex Minors"),B$("EURCHF","EUR/CHF","Forex Minors"),B$("EURGBP","EUR/GBP","Forex Minors"),B$("EURJPY","EUR/JPY","Forex Minors",{pipSize:0.01,priceDecimals:3}),B$("EURNZD","EUR/NZD","Forex Minors"),B$("GBPAUD","GBP/AUD","Forex Minors"),B$("GBPCAD","GBP/CAD","Forex Minors"),B$("GBPCHF","GBP/CHF","Forex Minors"),B$("GBPJPY","GBP/JPY","Forex Minors",{pipSize:0.01,priceDecimals:3}),B$("GBPNZD","GBP/NZD","Forex Minors")],MR=[{id:"XAUUSD",displayName:"Gold",kind:"metal",exchange:"OTC",region:"GLOBAL",category:"Metals",pipSize:0.01,priceDecimals:2,contractSize:100,providers:{twelvedata:"XAU/USD",mt5:"XAUUSD"}},{id:"XAGUSD",displayName:"Silver",kind:"metal",exchange:"OTC",region:"GLOBAL",category:"Metals",pipSize:0.001,priceDecimals:3,contractSize:5000,providers:{twelvedata:"XAG/USD"}}];function R$($,v,D=!1){return{id:$,displayName:`${$.slice(0,-3)}/USD`,kind:"crypto",exchange:"CRYPTO",region:"GLOBAL",category:"Crypto",pipSize:D?0.0001:0.01,priceDecimals:D?5:2,contractSize:1,providers:{twelvedata:v}}}var PR=[R$("BTCUSD","BTC/USD"),R$("ETHUSD","ETH/USD"),R$("SOLUSD","SOL/USD"),R$("BNBUSD","BNB/USD"),R$("AVAXUSD","AVAX/USD"),R$("LINKUSD","LINK/USD"),R$("LTCUSD","LTC/USD"),R$("BCHUSD","BCH/USD"),R$("ATOMUSD","ATOM/USD"),R$("TONUSD","TON/USD"),R$("DOTUSD","DOT/USD"),R$("XRPUSD","XRP/USD",!0),R$("ADAUSD","ADA/USD",!0),R$("DOGEUSD","DOGE/USD",!0),R$("TRXUSD","TRX/USD",!0),R$("POLUSD","POL/USD",!0)],bR=[{id:"NAS100",displayName:"Nasdaq 100",kind:"index",exchange:"NASDAQ",region:"US",category:"Indices",pipSize:0.01,priceDecimals:2,contractSize:20,providers:{twelvedata:"QQQ"}}],qR=[{id:"USOIL",displayName:"WTI Crude",kind:"commodity",exchange:"NYMEX",region:"US",category:"Commodities",pipSize:0.01,priceDecimals:2,contractSize:1000,providers:{twelvedata:"WTI/USD"}}];function T4($,v,D){return{id:$,displayName:D,kind:"stock",exchange:"NSE",region:"IN",category:"Indian Stocks",pipSize:0.05,priceDecimals:2,contractSize:1,providers:{twelvedata:v}}}var SR=[{id:"NIFTYBEES",displayName:"NIFTY 50 ETF",kind:"index",exchange:"BSE",region:"IN",category:"Indian Indices",pipSize:0.01,priceDecimals:2,contractSize:1,providers:{twelvedata:"NIFTYBEES:BSE"}},{id:"BANKBEES",displayName:"BANK NIFTY ETF",kind:"index",exchange:"BSE",region:"IN",category:"Indian Indices",pipSize:0.01,priceDecimals:2,contractSize:1,providers:{twelvedata:"BANKBEES:BSE"}},T4("RELIANCE","RELIANCE:NSE","Reliance Industries"),T4("TCS","TCS:NSE","Tata Consultancy Services"),T4("HDFCBANK","HDFCBANK:NSE","HDFC Bank"),T4("INFY","INFY:NSE","Infosys"),T4("ICICIBANK","ICICIBANK:NSE","ICICI Bank"),T4("BHARTIARTL","BHARTIARTL:NSE","Bharti Airtel"),T4("LT","LT:NSE","Larsen & Toubro"),T4("SBIN","SBIN:NSE","State Bank of India"),T4("AXISBANK","AXISBANK:NSE","Axis Bank"),T4("KOTAKBANK","KOTAKBANK:NSE","Kotak Mahindra Bank")],TX=Object.freeze([...wR,...MR,...PR,...bR,...qR,...SR]);class M0{byKey;instruments;providerNames;constructor($){this.instruments=Object.freeze([...$]);let v=new Map,D=new Set;for(let X of $){if(m5(v,X.id,X,"id"),X.displayName!==X.id)m5(v,X.displayName,X,"displayName");for(let[U,G]of Object.entries(X.providers))if(D.add(U),m5(v,ZO(U,G),X,"provider"),!v.has(G))v.set(G,X)}this.byKey=v,this.providerNames=D}resolve($){let v=this.byKey.get($);if(v)return v;let D=$.toUpperCase();if(D!==$){let U=this.byKey.get(D);if(U)return U}let X=$.toLowerCase();if(X!==$)return this.byKey.get(X)??null;return null}require($){let v=this.resolve($);if(!v)throw Error(`Unknown instrument: ${JSON.stringify($)}. Add it to INSTRUMENTS env var or check the key you passed in.`);return v}resolveByProvider($,v){return this.byKey.get(ZO($,v))??null}list(){return this.instruments}byKind($){return this.instruments.filter((v)=>v.kind===$)}byExchange($){return this.instruments.filter((v)=>v.exchange===$)}byRegion($){return this.instruments.filter((v)=>v.region===$)}byCategory($){return this.instruments.filter((v)=>v.category===$)}groupByCategory(){let $=new Map;for(let v of this.instruments){let D=$.get(v.category);if(D)D.push(v);else $.set(v.category,[v])}return Array.from($.entries()).map(([v,D])=>({category:v,instruments:D}))}has($){return this.byKey.has($)}stats(){return{instrumentCount:this.instruments.length,providerCount:this.providerNames.size,providers:Array.from(this.providerNames).sort()}}}function ZO($,v){return`${$}:${v}`}function m5($,v,D,X){if(X==="provider"){if($.has(v))throw Error(`Duplicate provider symbol ${JSON.stringify(v)} declared by multiple instruments in INSTRUMENTS`)}else if($.has(v))throw Error(`Duplicate instrument ${X} ${JSON.stringify(v)} in INSTRUMENTS (already mapped to ${$.get(v)?.id}, now also to ${D.id})`);$.set(v,D)}var ER=["forex","metal","crypto","index","commodity","stock","bond"],TR=l.object({kind:l.enum(ER),displayName:l.string().min(1).optional(),exchange:l.string().min(1).optional(),region:l.string().min(1).optional(),category:l.string().min(1).optional(),pipSize:l.number().positive().optional(),priceDecimals:l.number().int().min(0).max(12).optional(),contractSize:l.number().positive().optional(),providers:l.record(l.string().min(1),l.string().min(1))}),up=l.record(l.string().min(1),TR).refine(($)=>Object.keys($).length>0,{message:"INSTRUMENTS must contain at least one entry"});var RR=Object.freeze({AUDUSD:{quote:"https://logo.twelvedata.com/forex/usd.png",base:"https://logo.twelvedata.com/forex/aud.png"},EURUSD:{base:"https://logo.twelvedata.com/forex/eur.png",quote:"https://logo.twelvedata.com/forex/usd.png"},GBPUSD:{quote:"https://logo.twelvedata.com/forex/usd.png",base:"https://logo.twelvedata.com/forex/gbp.png"},USDCAD:{base:"https://logo.twelvedata.com/forex/usd.png",quote:"https://logo.twelvedata.com/forex/cad.png"},USDCHF:{base:"https://logo.twelvedata.com/forex/usd.png",quote:"https://logo.twelvedata.com/forex/chf.png"},USDJPY:{base:"https://logo.twelvedata.com/forex/usd.png",quote:"https://logo.twelvedata.com/forex/jpy.png"},AUDCAD:{base:"https://logo.twelvedata.com/forex/aud.png",quote:"https://logo.twelvedata.com/forex/cad.png"},AUDCHF:{base:"https://logo.twelvedata.com/forex/aud.png",quote:"https://logo.twelvedata.com/forex/chf.png"},AUDJPY:{base:"https://logo.twelvedata.com/forex/aud.png",quote:"https://logo.twelvedata.com/forex/jpy.png"},AUDNZD:{base:"https://logo.twelvedata.com/forex/aud.png",quote:"https://logo.twelvedata.com/forex/nzd.png"},EURAUD:{base:"https://logo.twelvedata.com/forex/eur.png",quote:"https://logo.twelvedata.com/forex/aud.png"},EURCAD:{base:"https://logo.twelvedata.com/forex/eur.png",quote:"https://logo.twelvedata.com/forex/cad.png"},EURCHF:{base:"https://logo.twelvedata.com/forex/eur.png",quote:"https://logo.twelvedata.com/forex/chf.png"},EURGBP:{quote:"https://logo.twelvedata.com/forex/gbp.png",base:"https://logo.twelvedata.com/forex/eur.png"},EURJPY:{base:"https://logo.twelvedata.com/forex/eur.png",quote:"https://logo.twelvedata.com/forex/jpy.png"},EURNZD:{base:"https://logo.twelvedata.com/forex/eur.png",quote:"https://logo.twelvedata.com/forex/nzd.png"},GBPAUD:{base:"https://logo.twelvedata.com/forex/gbp.png",quote:"https://logo.twelvedata.com/forex/aud.png"},GBPCAD:{base:"https://logo.twelvedata.com/forex/gbp.png",quote:"https://logo.twelvedata.com/forex/cad.png"},GBPCHF:{quote:"https://logo.twelvedata.com/forex/chf.png",base:"https://logo.twelvedata.com/forex/gbp.png"},GBPJPY:{base:"https://logo.twelvedata.com/forex/gbp.png",quote:"https://logo.twelvedata.com/forex/jpy.png"},GBPNZD:{base:"https://logo.twelvedata.com/forex/gbp.png",quote:"https://logo.twelvedata.com/forex/nzd.png"},BTCUSD:{base:"https://logo.twelvedata.com/crypto/btc.png",quote:"https://logo.twelvedata.com/crypto/usd.png"},ETHUSD:{quote:"https://logo.twelvedata.com/crypto/usd.png",base:"https://logo.twelvedata.com/crypto/eth.png"},SOLUSD:{quote:"https://logo.twelvedata.com/crypto/usd.png",base:"https://logo.twelvedata.com/crypto/sol.png"},BNBUSD:{quote:"https://logo.twelvedata.com/crypto/usd.png",base:"https://logo.twelvedata.com/crypto/bnb.png"},AVAXUSD:{url:"https://assets.coingecko.com/coins/images/12559/large/Avalanche_Circle_RedWhite_Trans.png"},LINKUSD:{base:"https://logo.twelvedata.com/crypto/link.png",quote:"https://logo.twelvedata.com/crypto/usd.png"},LTCUSD:{base:"https://logo.twelvedata.com/crypto/ltc.png",quote:"https://logo.twelvedata.com/crypto/usd.png"},BCHUSD:{base:"https://logo.twelvedata.com/crypto/bch.png",quote:"https://logo.twelvedata.com/crypto/usd.png"},ATOMUSD:{quote:"https://logo.twelvedata.com/crypto/usd.png",base:"https://logo.twelvedata.com/crypto/atom.png"},TONUSD:{url:"https://assets.coingecko.com/coins/images/17980/large/ton_symbol.png"},DOTUSD:{quote:"https://logo.twelvedata.com/crypto/usd.png",base:"https://logo.twelvedata.com/crypto/dot.png"},XRPUSD:{base:"https://logo.twelvedata.com/crypto/xrp.png",quote:"https://logo.twelvedata.com/crypto/usd.png"},ADAUSD:{quote:"https://logo.twelvedata.com/crypto/usd.png",base:"https://logo.twelvedata.com/crypto/ada.png"},DOGEUSD:{base:"https://logo.twelvedata.com/crypto/doge.png",quote:"https://logo.twelvedata.com/crypto/usd.png"},TRXUSD:{base:"https://logo.twelvedata.com/crypto/trx.png",quote:"https://logo.twelvedata.com/crypto/usd.png"},POLUSD:{url:"https://assets.coingecko.com/coins/images/4713/large/polygon.png"},RELIANCE:{url:"https://api.twelvedata.com/logo/ril.com"},TCS:{url:"https://api.twelvedata.com/logo/tcs.com"},HDFCBANK:{url:"https://api.twelvedata.com/logo/hdfcbank.com"},INFY:{url:"https://api.twelvedata.com/logo/infosys.com"},ICICIBANK:{url:"https://api.twelvedata.com/logo/icicibank.com"},BHARTIARTL:{url:"https://api.twelvedata.com/logo/airtel.in"},LT:{url:"https://api.twelvedata.com/logo/larsentoubro.com"},SBIN:{url:"https://api.twelvedata.com/logo/sbi.co.in"},AXISBANK:{url:"https://api.twelvedata.com/logo/axisbank.com"},KOTAKBANK:{url:"https://api.twelvedata.com/logo/kotak.com"}});function c5($,v){return Number(v.toFixed($.priceDecimals))}var g$="-apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', Roboto, sans-serif",d5=11,r5=15,p5=11,t5=13,OO=12,RX=17,HO=26,FO=0.85,jO=20,AO=8,wO=64,MO=26,f1=18,gX=16,PO=20,bO=300,o5=120,qO=1280,SO=720,kO=2,EO=!0,TO=320,RO=2560,gO=240,CO=1440,uO=1,xO=3,CX={dark:{background:"#0F0F0F",text:"#D9D9D9",mutedText:"#8A8D96",grid:"rgba(242, 242, 242, 0.06)",axisBorder:"#2B2B43",upCandle:"#10b981",downCandle:"#ef4444",markerText:"#F2F2F2",headerText:"#E8E8EA",badgeBg:"rgba(255, 255, 255, 0.08)",badgeText:"#A6AAB4",watermarkText:"#D9D9D9",tagText:"#FFFFFF",entryTag:"#363C4E"},light:{background:"#FFFFFF",text:"#191919",mutedText:"#6A6E78",grid:"rgba(0, 0, 0, 0.06)",axisBorder:"#E0E3EB",upCandle:"#10b981",downCandle:"#ef4444",markerText:"#191919",headerText:"#131722",badgeBg:"rgba(0, 0, 0, 0.06)",badgeText:"#5F6470",watermarkText:"#191919",tagText:"#FFFFFF",entryTag:"#68707F"}},a5=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function fO($,v){if(!Number.isFinite(v))return"0.00000";if(!$)return v.toFixed(5);return c5($,v).toFixed($.priceDecimals)}function _O($,v,D){let X=new Date(v*1000);if(xR($)){if(D===void 0||yR(D,v))return _R(X);return fR(X)}return iR(X)}function xR($){let v=$.trim();if(v.length===0)return!0;if(/^\d*[DWM]$/.test(v))return!1;if(/(d|w|mo|month)/i.test(v))return!1;return!0}function P0($,v,D){let U=`${$>0?"+":""}${$.toFixed(D)}`;if(v===null||!Number.isFinite(v))return U;let G=v>0?"+":"";return`${U} (${G}${v.toFixed(2)}%)`}function fR($){return`${uX($.getUTCHours())}:${uX($.getUTCMinutes())}`}function _R($){return`${uX($.getUTCDate())} ${a5[$.getUTCMonth()]}`}function iR($){return`${uX($.getUTCDate())} ${a5[$.getUTCMonth()]} '${String($.getUTCFullYear()).slice(-2)}`}function yR($,v){let D=new Date($*1000),X=new Date(v*1000);return D.getUTCFullYear()!==X.getUTCFullYear()||D.getUTCMonth()!==X.getUTCMonth()||D.getUTCDate()!==X.getUTCDate()}function uX($){return String($).padStart(2,"0")}var iO="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAACXBIWXMAAAsTAAALEwEAmpwYAAARw0lEQVR4nN1bd1hU17af/BUHYShKmRmGmYGhg7ShM/Q+9F6GIkgNvfeOgDQVkFjBhsZo1Ch2Rb1G7MZoLDHN3HuTl7ybe/Ni/rj3vu+7v/edM8NQBAUdMHnn+9Y3cObM2Wv99m+tvfbae1Mor77ekVOkW1EV6E1UBfoYlUZ/LKfA+E2OxsDvShQYv1FpjEekjgr0RjlFuuU8bHvp9c4yGiNKjkZ/8taNe00hOotKY0YQtlAWcr1LY+nIKdCvv20DZMcO+vi7iurceRm/TJ7uRKUxfnzrSsueDX9brsh0f6nxyxWZbnI0+r/ftrKLJ/R/LZPXcJmd9orqXCqN8dOioK9An6kI5BWZb40J79I0eTPtf2cxfV5eiQm6pi54uibg8kxAU9GSArH8rQBBvzotMC6jMaIXq9fllTRhaLgKkWG+yMuIRm1BIlpr0pEQFwkW24h8ZrmiWJaUCYoa4ZO9vwhD3QQAiiosKChrQpOlA29XO8QEuqIg2R+bWzOwb1MVUpLioaLGlTJlyQCgMR6R1lNpGvxFb0wChqo6B86OthCF+SIl0g31WQE4uq0cw4N14Ns4StiwpC5hQaEq0JuXwvjJ/zWgw+PBy8UGEf72WBPuhIG6GFw8tBYZaUmS52YGzUlxcrCDvq6+rHRrIAAYWyoGEMLVNYMwMBwVZWWoKstHXroIWXEeaM31wrXDDehqzYOKmvacbPB0toY+T0c2esnTz1PkFOhfLAXdiMgfn5CCgf5+7Nm1E/tGduPQhx/g+LEjODAyhLbKTDRkumP8gzyMbK4Gi2O06C5BpdEfU+QUGM8X23illRzk5hehr28DWpoa0dHehg29Pdi6ZRNG9uzE6PGjuHL5Ao7s24yukmCc2CTC0IYicHVNXgBhuSx1U2A8pywF9dOz3kNrSzPKSorR1FCPzo529G/cgG1bNmPv7l04dHA/To4exe3r1zF+cRTrKyMxUOaD3uYM8PRNJSAsjo6Uxe79sIg4VFVVIicnG+Xlpaivq8Ha1mb0dHdicFM/dg3vwMED+0lXOHtqFLdvXseDu+PY2pKEqmQ7NFUkgcUxXDT9KItpPN/GBQUF+UhKTkRWdiYKiwpQUVmOxvo6dLStxcb1PSQL9u3dgyMfHcK5Mydx9U8X8PDze/jy8S205YciQWiJ0vcioUbn/rEA0GDqYXVKKmJjY5GYmIj09HTk5OSgqKgI1VVVaG5qRE9XJwYH+jE8tAMfHTyAM6dHMX7lEu7eHMdXX36Bp/fHkRRsDz9nM8THCMmEava5xe8QAB+/INL48PAIxMfHIzk5mQQhLy8PZWWlqKurQTvJgl4JC3bj+PGj+OTyGD69dQOf37uLv/33Dzh2aARUeXWYmZsj0N/5j8EAQ2M+oqOj4evri5CQEPJvAoSUlBRkZ2ejqKgQ1dWVaG5uRDcRCwb6sZNkwYe4dPE87ty+js8ffIrHD+/jHz//hPSMbPK97q52sLIw+30CQJXQkhjvvX384e3tDS8vLwQGBiI8PBwxMTFISkpCRkYG8vPzUEnEgsZ6rFsnHhF2bNuKgwc+wOmTx3H1k0u4d/cWHn7+Gf783Td4+sUj6BtZke/39XAEnSmJBzJwBYqse9/U3BY+Pj5wdnYmAfD39ydZEBUVhYSEBKSnpSMvPw/lFWWor69FW7vYDba8P0gOiUePHMLYhTO4dXOcBODJowd4/uvfMbh5K/l+JosHB77l74sBVElPqKhx4OruAUeBAAJnZ3h4eJBuEBQUhMjISCQkiINhbm4uSkvFcaBtbSt6e7rIIXF4x3Yc2L8Pp06MYvyTK/js0zt49Og+vv7qCf7r+7/AycVHDLKRCTgc3Rl60F8rQFJk2ftGplZwcnaGja0tHJ0c4ebmBj8/PwQECBEcHIzw8DDEx8UhIz0dBfn5KC0pRk1NFTkk9m1cj+3btmBkz24cPnQQ586cxvVrV/Hg/qd4/Og+fv3lZ2zbvoNsR2kFC4b6RjLJCimyMn6lujYcHBxhbWcDG1sbODk5keLg6Ah/YQA5BG4aHMDxY0dx+eIYbt+8gRvXxnHu7GmM7N2N9zcNYFN/H4a2b8O+kb34+MhHuDR2HnduXSfzgmfffknGA3MrJ7EraPKgrsGRts9k66OpLBZ62uy3A4CRkTns7e1hbWMDO3s7WPP5EAqFaG1twcULp/H44V08uH8HDz67i/uf3cXDR/fx7NnXeP78F/zvv/+JH3/4HufPniEBGB7ajg8P7MeJ0WO4cvmi2BUeimNBbV0j2R5NmQUlFU1pINRk6yE11BJs5sS8gb50AKxQ48LewRGODvawt+HDy8MDjbXVOHVsBKeO70RnezXWpIhId3BxdYGzswDu7m4IDAxAdnYmurvW4cqfLuOXf/wd3337DZkVEsmRODs8jWtXP8G9u7fx/V+/w6VLY1MqR/Q3TooosgDA1MQS3p5u8HRzRFZqInZu7sTWjbVITQyDvZ01LCwsYWHFh429Hdw8PeBLxoUAkiFe3l7w9HRHYKAQFRXlJBA//PUvOHvmFDltPnb0CC6cP0vGAyIWPPv2Kewc3KSzxAkAZn4uGQCqGlwE+LkjOswPDaVp6GsvRGKcENbWVrCzIwKhB7y8PCEMCEB4RAR8/YSwsnGEtq4pGCx9MLUMwNY2hL6hGVaZWUDo74udw0N49s3XOH3yBPaP7MHJ0eO4fPECbty4hp9+/DMys7LEzFPnkAa/CQsobwoAEfjKs2Owvn41St+LhrOTAxydnMUJUFgYIiIikZaWhsioGBivsoHiiomS+HSZMGKlOhf6BqZY19GGL58+wdHDH5EJ0tnTJ3H50hieffMUfRt7yGe1uEZQZ/Beq+dlAoAm2wANxYnYsjYJSTF+cHZxRWhoKFJSkpCamoKMjHRUVlbAxy8YCsqsV75vam+qaXDQ29uD+/fukgnSsaOHce7MKTJFPjF6iHxGg8mDm4fX0gOwXFKcyFwdgeGuNESH+iMwMASZ6WtQXFyI4uIiVFSUobNrHRwEnrP29MvfLw5ydKYO2fvE6LB71zBGj32MG9ev4fLFk1CXTI+9fXykMWFJAFguMd7MzAw7egqQGBsKUXwcykuL0VBfS1Z8WluasG/vXghcfclniWWwhfYQsaBCfDo5e+HK5UvYvXOYLJxcGruAK2MnwNM1Jr/X0TNGYlIi2DqmS8cAFTVttNXnovC9ZORkp6G5sR5trS3o7lxHzvGJoStpdfo0Q15XCOC6uroxeuwomSqfOnECF899DAPDyVIZEWjDwqNmZ9grgKcsTCHxy0qLs9BcU4SinEx0tjWjp6sLgwN9GOjbgLEL59DXt0lK5TeJ0BOu4OcfRgKwZfMgjhz+CKMf7yN7fuI5HV0TpKamwlEgjgcTQJBsJdp/iQ6UhSojEsWht6MOpbmZ6O1oRt+GXmx+fxCbBzfh8KEPcfv2TZiY2U37zZsKMVTuHN4pLpzs24uDH+wCgzm5NqCsyoarqxtWr04FU2uyfqhB54AxMXWeIzOkzM948aetnQAbu5pQXpSP7rY6bOzpJosZhGLbt27F0yeP0NLSIRPqT3MDGgOta9uweXAAQ0PbsWtoEMtnGMTi6JMVqIDA8Gn3LcxNwX5h5rgAAKgS+iirctFQW4j6mgqsba5FT+da9PZ0o79vA/o3rifH66++fAq+3WSWJhPjJe1XVNRgfU83OVdoaqx84XtibiAQuJA5h6GJtfR7VTU2gn1dXx+A5RJDIqMi0Lm2BlVVZWhrqUd7aws62teiq7MDvd3duHl9HAc+OPDaKemrACgoLEZbayuGtg0iQRQtYdl0kM0srMm6Q3hEzLT7Xq6OMDYymT8Ay2es13N5xmhuKENZaTGqq8pQX1uOutoqNNTVorGhDut7u3H3zi0UFpVL6S/rJa28vEI01Nfj/Q3t4FvZzsoytrYROeESiUSw5Auk9y0tLeHsZDd/APT1DaGrayD9PzEhGtWVJcjLyUVJUSFKiwkpQmlpMUqKC7Ghtxu3blyDrzBMqhixL0BWxtNZBigvr0BNdSWaaormZAnBCBtbe7L+KEpIlgJkaWmF4AD3+QNAnUJfXX1TlJfkIC01FZkZacjOykBWZgayszKRlZVB3hvo30gWMy2moK6qzobyCtYbucOEAbYOrigoKERLYyX8/bxn7f0JYXEMyBIcUXozs3Qg79nb2sLHQzB/AOSmSEiQEFnpaxAXH4vkpASsTkokKUYUOOPjRUhMEJE5+/DQVugZWEh/p7xCE1wO742qtxPARccmIDcnF2XFWdLJ1Iv7DiQ7Ulaw4OrqjnhRPDkBI+4F+7rAhm+1cADUGNqIjwtDaGgIQsPCEBUVidiYaISGEvfCEBQUTH7X0NiATf09JFum9o7VKhOwtF5vLX/iHabmdkhLz0RNRSH41hLff8VvjYwtEBkRjpTkZOjorkJKrBAr1dgLB8Dc3Aox0WHiAoZQiKDgYLLEHRAYQE53iYIGQbeSkjJ0r2uBkan5NOUZDA7C/QRQkOQE8y1iTvxenamL2PgklBVkI8hfXBGej7C5hggJCkR0VDRyMuPh4yF2hQUDIBC4QCBwhrm5NRlcPDw8wbe2h6GJOZl+anEMYGxigcTE1ejuaIaNjY3UgAljPQV85CSHQI42mRjNXOqeLUao0nkIDY9CYUE2fL08FuQyKqpseHp6IS05Dk0lcVBeqblwAJRXakFP31Q61hILk3RNHrnfb6bSXt7+qK0pQ4CvJAma8a68ZCFaiqPA5hi8NChO3NfRNSNjTGpqIqwsxaAuBABCZx9fTxStCYIt3xIK0n2JCwFAlUMaPLOBabs1JH/rGVoiI30NkkUh0w2UZmma6CiLxJYWEYJ9BeDzLcHVNpS6BhHYiHzfxMwaoSEhSE2Oh4+nJ+isuVPYWV1H8qmixkZssAAGPB609UyhxTVYOAAr1LlQZ+hMq9TMHXm14Ovnj8yUGOjyZt/BtUKNjY7qeAw2xkDoYgVvdwGiQv3g4+WOAH8fRIQFITDADzY2tmBoTra7EAAIoTO4ELpagcsWT4IMjMyhzTNeOACKKiworWTPWxEdPRPERocjwMtpTnoSZbHmqmQ0VcRBSTKcqahqQYOhDRpR41+gsUQsmaqbuYkhIn35MNabZI7JKkuy6DonAFQFxq+zf0lf8JZYjo4RhJ4C6OnNTTlCEkWBOLSnGqIY/xcCIk2ys3SqkURFiXA3BSUiuE7Xi2h3lZE+RAF8JAQ6gK2lPbkhW4lJrkEwWHpz6M74H4qst8kSBjjbWWGl2uSG6KmgTgRVI2NT7NlajWtnNqKiKBm6eqbzpjxhtIGeHoI8rJEV44QCkTO8Hc2xQlXc5gSoDBYP9vaOc2aNVGK7LFWBfkFWxk8EIVV1LVhbmEJxji0tUxUKEnrj+th2/PPnq7h1aSvaGrKQtjoaaaJQJEf7IiLYA36+roiL9MKaBG9U5gShozgQ7fmeaMz0RLSPJQymUH6qaLH1ydT4pRslqcQBIxkyYKLH1TTYMDY0gqLEt2fr3UkgmOSCyNkjG/Cf387iP7/sxvP7bfj6QiXuHC7B5T25ODaQgP3tYegr80NRrANi/CywylAXNGnhZXqQJuoDRKXoFayqoxCnq2QLwPRcgsvVlYIwO52ZL6SxhVnROLItH1f2rMH5wViMNAegM8cF5QkOSAnkI9LbCj6OZlipJplxSowkYoSyKguqGpw55wzTRIlpRm6XJ4/CyRoAScOEPyqteHWEf3GrvCYMDM0Q5O+OjMQAlGcEoWi1Jynp0QLECK3hZG0CcxMTMugyNLXJxRRlSRx4lfFUGuOh9MAEcbRsMRjwOut2hFvMdW6AGB00mDpgsXnQ4miDweRAjc4RM2zGkPiqdqny9NCZR2bGF8sV3qQ8RoAxMd6/0qj5Aq7AuPLCWcJ3FdU5i3VoavFk4QwTH5pi6cxxZlDDhTha9vYNWzTA/rVMni546dnBZfJ0x//HByfdXmr81DOExNGyt620zESBcYVwccoCr3eIo2VEuvjH7XXGQ6q8RhjlTS85GsOCOGBEpI4kIEtwyuQ1evk5eXxenn5ejsaol1NkmM/HuP8DM+9LH586V+cAAAAASUVORK5CYII=";function yO($){return $.replaceAll("&","&").replaceAll("<","<").replaceAll(">",">").replaceAll('"',""").replaceAll("'","'")}function I$($){return`<line${i1($)} />`}function F$($){return`<rect${i1($)} />`}function p$($,v){return`<text${i1(v)}>${yO($)}</text>`}function nO($){return`<image${i1($)} />`}function lO($,v){let D=$.map((X)=>`${e5(X.x)},${e5(X.y)}`).join(" ");return`<polygon${i1({...v,points:D})} />`}function o($,v={}){if($.length===0)return"";return`<g${i1(v)}>${$}</g>`}function hO($,v,D){return[`<svg xmlns="http://www.w3.org/2000/svg" width="${$}" height="${v}" viewBox="0 0 ${$} ${v}" fill="none">`,D,"</svg>"].join("")}function _1($,v=11){return Math.max(10,Math.round($.length*v*0.58))}function i1($){let v=Object.entries($).filter(([,D])=>D!==void 0&&D!==!1).map(([D,X])=>{if(X===!0)return`${D}="true"`;if(typeof X==="number")return`${D}="${e5(X)}"`;if(typeof X==="string")return`${D}="${yO(X)}"`;return""}).filter((D)=>D.length>0).join(" ");return v.length>0?` ${v}`:""}function e5($){let v=Math.round($*100)/100;return Number.isInteger(v)?String(v):v.toFixed(2)}var xX=16,nR=9,lR=12,hR=8,mR=8;function mO($,v){let D=[],X=$.plotLeft,U=$.instrument?.displayName??$.pair;D.push(p$(U,{x:X,y:xX,fill:v.headerText,"font-size":r5,"font-weight":700,"letter-spacing":0.2,"font-family":g$})),X+=_1(U,r5)+nR;let G=$.timeframe,J=_1(G,p5)+mR*2,Q=xX-RX+4;D.push(F$({x:X,y:Q,width:J,height:RX,rx:4,fill:v.badgeBg})),D.push(p$(G,{x:X+J/2,y:Q+RX/2+0.5,fill:v.badgeText,"font-size":p5,"font-weight":600,"text-anchor":"middle","dominant-baseline":"middle","font-family":g$})),X+=J+lR;let W=$.visibleCandles,z=W[W.length-1].close,Y=W[0].open,I=z-Y,V=Y===0?null:I/Y*100,K=I>=0?v.upCandle:v.downCandle,L=$.formatPrice(z);D.push(p$(L,{x:X,y:xX,fill:K,"font-size":t5,"font-weight":600,"font-family":g$})),X+=_1(L,t5)+hR;let N=$.instrument?.priceDecimals??5;return D.push(p$(P0(I,V,N),{x:X,y:xX,fill:K,"font-size":OO,"font-weight":500,"font-family":g$})),o(D.join(""))}function cO($,v){if(!v)return"";let D=HO;return nO({href:iO,x:$.plotRight-D-8,y:$.plotBottom-D-8,width:D,height:D,opacity:FO})}var cR=["price","priceHigh","priceLow","price1","price2","entry","stop","target"];function rO($,v){let D=$.candles.slice(-$.bars),X=AO,U=jO,G=Math.max(X+1,$.width-wO),J=Math.max(U+1,$.height-MO),Q=G-X,W=J-U,z=Q/Math.max(1,D.length),Y=Math.min(...D.map((a)=>a.low)),I=Math.max(...D.map((a)=>a.high)),V=I-Y,K=V>0?V*0.06:Math.max(Math.abs(I)*0.006,0.000001),L=Y-K,N=I+K,Z=Math.max(N-L,0.000001),F=V>0?Math.max(Z,V/0.6):Z,S=oR($.shapes),g=S.length>0?Math.min(...S):Number.POSITIVE_INFINITY,u=S.length>0?Math.max(...S):Number.NEGATIVE_INFINITY,k=Number.isFinite(g)&&g<L?L-g:0,N$=Number.isFinite(u)&&u>N?u-N:0,j$=Math.max(0,F-Z),g4=k+N$,Q4=L,y$=N;if(g4<=j$)Q4-=k,y$+=N$;else if(k>0&&N$===0)Q4-=Math.min(k,j$);else if(N$>0&&k===0)y$+=Math.min(N$,j$);else if(g4>0){let a=j$/g4;Q4-=k*a,y$+=N$*a}let h1=Math.max(y$-Q4,0.000001),m1=$g(D),c1=D.length-1;function q0(a){return U+(y$-a)/h1*W}function kH(a){if(!Number.isFinite(a))return{y:J,clamped:!0,edge:"bottom"};if(a>y$)return{y:U,clamped:!0,edge:"top"};if(a<Q4)return{y:J,clamped:!0,edge:"bottom"};return{y:q0(a),clamped:!1,edge:null}}function eX(a){return X+(a+0.5)*z}function O7(a){return tR(D,c1,m1,a)}function H7(a){return eX(O7(a))}function F7(a){return c1-a}function EH(a,j7,gH){let A7=eR(a,j7);if(A7!==void 0)return H7(A7);let CH=sR(a,j7)??gH;return eX(F7(CH))}function TH(a=6){return dR(Q4,y$,a)}function RH(a=7){return pR(D.length,a)}return{pair:$.pair,timeframe:$.timeframe,theme:$.theme,width:$.width,height:$.height,plotLeft:X,plotTop:U,plotRight:G,plotBottom:J,plotWidth:Q,plotHeight:W,slot:z,visibleCandles:D,instrument:v,priceRange:{min:Q4,max:y$,candleMin:Y,candleMax:I},averageSpacing:m1,formatPrice(a){return fO(v,a)},priceToY:q0,projectPrice:kH,indexToX:eX,timeToIndex:O7,timeToX:H7,barsBackToIndex:F7,resolveEndpointX:EH,nicePriceTicks:TH,niceTimeTickIndices:RH}}var dO=3;function dR($,v,D=6){let X=vg($,v,D),U=Math.ceil($/X)*X,G=Math.floor(v/X)*X,J=Ug(X),Q=[];if(G>=U){let W=Math.round((G-U)/X);for(let z=0;z<=W;z+=1)Q.push(Number((U+z*X).toFixed(J+2)))}if(Q.length<dO)return rR($,v,dO+2);return Q}function rR($,v,D){if(v<=$||D<2)return[$];let X=[];for(let U=0;U<D;U+=1)X.push($+(v-$)*U/(D-1));return X}function pR($,v=7){if($<=0)return[];if($<=v)return Array.from({length:$},(U,G)=>G);let D=new Set,X=($-1)/Math.max(1,v-1);for(let U=0;U<v;U+=1)D.add(Math.round(U*X));return D.add(0),D.add($-1),Array.from(D).sort((U,G)=>U-G)}function tR($,v,D,X){if($.length===1){let J=$[0].time;return(X-J)/D}let U=$[0],G=$[v];if(X<=U.time)return(X-U.time)/D;if(X>=G.time)return v+(X-G.time)/D;return aR($,v,X)}function oR($){let v=[];for(let D of $){if(D.affectsScale===!1)continue;for(let X of cR){let U=D[X];if(typeof U==="number"&&Number.isFinite(U))v.push(U)}}return v}function aR($,v,D){let X=0,U=v;while(X<=U){let Y=Math.floor((X+U)/2),I=$[Y];if(I.time===D)return Y;if(I.time<D)X=Y+1;else U=Y-1}let G=Math.min(v,X),J=Math.max(0,G-1),Q=$[J],z=$[G].time-Q.time;if(z<=0)return J;return J+(D-Q.time)/z}function eR($,v){if(v==="start")return $.time1??$.entryTime;return $.time2}function sR($,v){if(v==="start")return $.barsBack1;return $.barsBack2}function $g($){if($.length<2)return 1;let v=0,D=0;for(let X=1;X<$.length;X+=1){let U=$[X].time-$[X-1].time;if(U>0)v+=U,D+=1}if(D===0)return 1;return v/D}function vg($,v,D){let U=Math.max(v-$,0.000001)/Math.max(1,D-1),G=Math.floor(Math.log10(U)),J=[G-1,G,G+1],Q=[1,2,2.5,5,10],W=U,z=Number.POSITIVE_INFINITY;for(let Y of J){let I=10**Y;for(let V of Q){let K=V*I,L=Math.ceil($/K),N=Math.floor(v/K),Z=N>=L?N-L+1:1,F=Math.abs(Z-D);if(F<z)z=F,W=K}}return W}function Ug($){let v=0,D=$;while(v<10&&Math.abs(Math.round(D)-D)>0.00000001)D*=10,v+=1;return v}function Z6($){return CX[$]}function pO($,v){let D=Z6($.theme),X=Dg($.nicePriceTicks(),$.formatPrice),U=$.niceTimeTickIndices(),G=[],J=[],Q=$.visibleCandles[$.visibleCandles.length-1],W=$.priceToY(Q.close),z=Q.close>=Q.open?D.upCandle:D.downCandle,Y=$.formatPrice(Q.close);for(let N of X){let Z=$.priceToY(N);G.push(I$({x1:$.plotLeft,y1:Math.round(Z)+0.5,x2:$.plotRight,y2:Math.round(Z)+0.5,stroke:D.grid,"stroke-width":1}));let F=$.formatPrice(N);if(F!==Y)J.push(p$(F,{x:$.width-6,y:Z,fill:D.text,"font-size":d5,"font-family":g$,"text-anchor":"end","dominant-baseline":"middle"}))}for(let N of U){let Z=$.visibleCandles[N];if(!Z)continue;let F=$.indexToX(N),g=(N>0?$.visibleCandles[N-1]:void 0)?.time;G.push(I$({x1:Math.round(F)+0.5,y1:$.plotTop,x2:Math.round(F)+0.5,y2:$.plotBottom,stroke:D.grid,"stroke-width":1})),J.push(p$(_O($.timeframe,Z.time,g),{x:F,y:$.height-8,fill:D.text,"font-size":d5,"font-family":g$,"text-anchor":"middle"}))}J.push(I$({x1:Math.round($.plotRight)+0.5,y1:$.plotTop,x2:Math.round($.plotRight)+0.5,y2:$.plotBottom,stroke:D.axisBorder,"stroke-width":1})),J.push(I$({x1:$.plotLeft,y1:Math.round($.plotBottom)+0.5,x2:$.width,y2:Math.round($.plotBottom)+0.5,stroke:D.axisBorder,"stroke-width":1}));let I=I$({x1:$.plotLeft,y1:Math.round(W)+0.5,x2:$.plotRight,y2:Math.round(W)+0.5,stroke:z,"stroke-width":1,"stroke-dasharray":"4 4"}),V={y:W,label:$.formatPrice(Q.close),fill:z,height:f1},K=mO($,D),L=cO($,v);return{gridSvg:o(G.join(""),{"shape-rendering":"crispEdges"}),axesSvg:J.join(""),lastPriceSvg:I,lastPriceTag:V,headerSvg:K,watermarkSvg:L}}function Dg($,v){let D=new Set,X=[];for(let U of $){let G=v(U);if(!D.has(G))D.add(G),X.push(U)}return X}function tO($){let v=Math.max(1,Math.round($.slot*0.7)),D=[];for(let X=0;X<$.visibleCandles.length;X+=1){let U=$.visibleCandles[X];if(!U)continue;let G=U.close>=U.open?"#10b981":"#ef4444",J=$.indexToX(X),Q=Math.round(J)+0.5,W=$.priceToY(U.high),z=$.priceToY(U.low),Y=$.priceToY(U.open),I=$.priceToY(U.close),V=Math.min(Y,I),K=Math.max(Y,I),L=Math.max(1,Math.round(K-V)),N=Math.round(J-v/2),Z=Math.round(V);D.push(I$({x1:Q,y1:Math.round(W)+0.5,x2:Q,y2:Math.round(z)+0.5,stroke:G,"stroke-width":1})),D.push(F$({x:N,y:Z,width:v,height:L,fill:G}))}return o(D.join(""),{"shape-rendering":"crispEdges"})}function oO($,v){if(v.length===0)return"";let D=Z6($.theme);return Xg(v,$.plotTop+2,$.plotBottom-2).map((U)=>o([F$({x:$.plotRight+1,y:Math.round(U.y-U.height/2),width:$.width-$.plotRight-1,height:U.height,fill:U.fill}),p$(U.label,{x:$.width-6,y:U.y,fill:D.tagText,"font-size":U.height>=f1?11:10,"font-family":g$,"font-weight":600,"text-anchor":"end","dominant-baseline":"middle"})].join(""),{"shape-rendering":"crispEdges"})).join("")}function Xg($,v,D){let X=$.map((J)=>({...J})).sort((J,Q)=>J.y-Q.y);if(X.length===0)return X;for(let J=1;J<X.length;J+=1){let Q=X[J-1],W=X[J],z=Q.y+(Q.height+W.height)/2;if(W.y<z)W.y=z}let U=X[X.length-1];if(U.y>D){U.y=D;for(let J=X.length-2;J>=0;J-=1){let Q=X[J+1],W=X[J],z=Q.y-(Q.height+W.height)/2;if(W.y>z)W.y=z}}let G=X[0];if(G.y<v)G.y=v;return X}function s5($){let v=Qg($.candles);if(v.length===0)throw Error("Cannot render chart: candles is empty");return{pair:$.pair,timeframe:$.timeframe,candles:v,shapes:$.shapes??[],theme:$.theme??"dark",width:aO($.width,qO,TO,RO),height:aO($.height,SO,gO,CO),bars:Gg($.bars??o5),scale:Jg($.scale),watermark:$.watermark??EO,...$.fontFiles?{fontFiles:$.fontFiles}:{}}}function Gg($){if(!Number.isFinite($))return o5;return $7(Math.round($),PO,bO)}function Jg($){if($===void 0||!Number.isFinite($)||$<=0)return kO;return $7($,uO,xO)}function aO($,v,D,X){if($===void 0||!Number.isFinite($)||$<=0)return v;return $7(Math.round($),D,X)}function $7($,v,D){return Math.min(D,Math.max(v,$))}function Qg($){return $.filter((v)=>Number.isFinite(v.time)&&Number.isFinite(v.open)&&Number.isFinite(v.high)&&Number.isFinite(v.low)&&Number.isFinite(v.close)).sort((v,D)=>v.time-D.time)}import{createRequire as Wg}from"node:module";var zg=Wg(import.meta.url);function eO($,v,D,X){let{Resvg:U}=Yg();return new U($,{fitTo:{mode:"width",value:Math.round(v*D)},font:{loadSystemFonts:!0,defaultFontFamily:"Inter",...X?{fontFiles:X}:{}},background:"rgba(0,0,0,0)"}).render().asPng()}function Yg(){try{return zg("@resvg/resvg-js")}catch($){let v=$ instanceof Error?$.message:String($);throw Error(`chart-render: @resvg/resvg-js could not be loaded for PNG rasterization (${v})`)}}var Ig={horizontal_line:"horizontal_line",line:"horizontal_line",hline:"horizontal_line",horizontal:"horizontal_line",horz_line:"horizontal_line",horizontal_ray:"horizontal_ray",hray:"horizontal_ray",horz_ray:"horizontal_ray",horizontalray:"horizontal_ray",h_ray:"horizontal_ray",vertical_line:"vertical_line",vertical:"vertical_line",vline:"vertical_line",vert_line:"vertical_line",vertline:"vertical_line",verticalline:"vertical_line",cross_line:"cross_line",crossline:"cross_line",cross:"cross_line",zone:"zone",horizontal_range:"zone",range:"zone",supply_demand_zone:"zone",rectangle:"rectangle",rect:"rectangle",box:"rectangle",trendline:"trendline",trend:"trendline",trend_line:"trendline",ray:"ray",trend_ray:"ray",right_ray:"right_ray",ray_right:"right_ray",rightray:"right_ray","right-ray":"right_ray",left_ray:"left_ray",ray_left:"left_ray",leftray:"left_ray","left-ray":"left_ray",extended_line:"extended_line",extendedline:"extended_line",extended:"extended_line",extend_line:"extended_line",info_line:"info_line",infoline:"info_line",info:"info_line",trend_angle:"trend_angle",trendangle:"trend_angle",angle:"trend_angle",position:"position",trade:"position",long:"position",short:"position",long_position:"position",short_position:"position"},Vg={horizontal_line:{required:[{field:"price",message:"price is required for horizontal_line"}],describe:($)=>`Drew horizontal line at ${$.price}${$.label?` (${$.label})`:""}`},horizontal_ray:{required:[{field:"price",message:"price is required for horizontal_ray"}],describe:($)=>`Drew horizontal ray at ${$.price}${$.label?` (${$.label})`:""}`},vertical_line:{required:[],describe:($)=>{let v=$.time1??$.time2;return`Drew vertical line${v?` at ${v}`:""}${$.label?` (${$.label})`:""}`}},cross_line:{required:[{field:"price",message:"price is required for cross_line"}],describe:($)=>`Drew cross line at ${$.price}${$.label?` (${$.label})`:""}`},zone:{required:[{field:"priceHigh",message:"priceHigh is required for zone"},{field:"priceLow",message:"priceLow is required for zone"}],describe:($)=>`Drew zone from ${$.priceLow} to ${$.priceHigh}${$.label?` (${$.label})`:""}`},rectangle:{required:[{field:"priceHigh",message:"priceHigh is required for rectangle"},{field:"priceLow",message:"priceLow is required for rectangle"}],describe:($)=>`Drew rectangle from ${$.priceLow} to ${$.priceHigh}${$.label?` (${$.label})`:""}`},trendline:{required:[{field:"price1",message:"price1 is required for trendline"},{field:"price2",message:"price2 is required for trendline"}],describe:($)=>`Drew trendline from ${$.price1} to ${$.price2}${$.label?` (${$.label})`:""}`},ray:{required:[{field:"price1",message:"price1 is required for ray"},{field:"price2",message:"price2 is required for ray"}],describe:($)=>`Drew ray from ${$.price1} to ${$.price2}${$.label?` (${$.label})`:""}`},right_ray:{required:[{field:"price1",message:"price1 is required for right_ray"},{field:"price2",message:"price2 is required for right_ray"}],describe:($)=>`Drew right ray from ${$.price1} to ${$.price2}${$.label?` (${$.label})`:""}`},left_ray:{required:[{field:"price1",message:"price1 is required for left_ray"},{field:"price2",message:"price2 is required for left_ray"}],describe:($)=>`Drew left ray from ${$.price1} to ${$.price2}${$.label?` (${$.label})`:""}`},extended_line:{required:[{field:"price1",message:"price1 is required for extended_line"},{field:"price2",message:"price2 is required for extended_line"}],describe:($)=>`Drew extended line from ${$.price1} to ${$.price2}${$.label?` (${$.label})`:""}`},info_line:{required:[{field:"price1",message:"price1 is required for info_line"},{field:"price2",message:"price2 is required for info_line"}],describe:($)=>`Drew info line from ${$.price1} to ${$.price2}${$.label?` (${$.label})`:""}`},trend_angle:{required:[{field:"price1",message:"price1 is required for trend_angle"},{field:"price2",message:"price2 is required for trend_angle"}],describe:($)=>`Drew trend angle from ${$.price1} to ${$.price2}${$.label?` (${$.label})`:""}`},position:{required:[{field:"direction",message:'direction ("long" or "short") is required for position'},{field:"entry",message:"entry is required for position"},{field:"stop",message:"stop is required for position"},{field:"target",message:"target is required for position"}],describe:($)=>`Drew ${$.direction} position — entry ${$.entry}, stop ${$.stop}, target ${$.target}${$.label?` (${$.label})`:""}`}};var Kg=["horizontal_line","horizontal_ray","vertical_line","cross_line","zone","rectangle","trendline","trend_line","ray","right_ray","left_ray","extended_line","info_line","trend_angle","position"];function b0($){if(typeof $!=="string")return null;let v=$.trim().toLowerCase();return Ig[v]??null}function vH($){return`Unknown shape type: "${String($)}". Supported types: ${Kg.join(", ")}`}function v7($){if(typeof $==="number"&&Number.isFinite($))return $;if(typeof $==="string"){let v=$.trim();if(v.length===0)return;let D=Number(v);if(Number.isFinite(D))return D}return}function Lg($){if(typeof $!=="string")return;let v=$.trim().toLowerCase();if(v==="long"||v==="buy")return"long";if(v==="short"||v==="sell")return"short";return}function t$($,v){for(let D of v){let X=v7($[D]);if(X!==void 0)return X}return}function R4($,v,D){let X=$[v];if(!X||typeof X!=="object"||Array.isArray(X))return;return t$(X,D)}function Bg($){if(typeof $.type!=="string")return null;let v=$.type.trim().toLowerCase();return v.length>0?v:null}function O4($,v,D){if($[v]!==void 0||D===void 0)return;$[v]=D}function U7($,v,D){O4($,v,D===void 0?void 0:Math.trunc(D))}function Ng($,v){if($.direction)return;if(v==="long"||v==="short"){$.direction=v;return}if(v==="long_position"||v==="short_position"){$.direction=v==="long_position"?"long":"short";return}$.direction=Lg($.side)}function Zg($){return t$($,["level","y","value","priceLevel","linePrice"])??R4($,"point1",["price","y","value"])??R4($,"from",["price","y","value"])}function sO($,v){if(v==="start")return t$($,["startPrice","fromPrice","priceA","p1"])??R4($,"point1",["price","y","value"])??R4($,"from",["price","y","value"]);return t$($,["endPrice","toPrice","priceB","p2"])??R4($,"point2",["price","y","value"])??R4($,"to",["price","y","value"])}function $H($,v){if(v==="start")return t$($,["time","startTime","fromTime","timestamp","t1"])??R4($,"point1",["time","t","timestamp"])??R4($,"from",["time","t","timestamp"]);return t$($,["endTime","toTime","t2"])??R4($,"point2",["time","t","timestamp"])??R4($,"to",["time","t","timestamp"])}function Og($){O4($,"price",Zg($)),O4($,"priceHigh",t$($,["high","upper","top","max","priceTop","priceUpper"])),O4($,"priceLow",t$($,["low","lower","bottom","min","priceBottom","priceLower"])),O4($,"price1",sO($,"start")),O4($,"price2",sO($,"end"))}function Hg($){U7($,"time1",$H($,"start")),U7($,"time2",$H($,"end")),O4($,"barsBack1",t$($,["barsBack","barBack","lookback","bars"])),O4($,"barsBack2",t$($,["barsBackEnd","barBackEnd","lookbackEnd"]))}function Fg($){O4($,"entry",t$($,["entryPrice","open","openPrice"])),O4($,"stop",t$($,["stopLoss","sl","stopPrice"])),O4($,"target",t$($,["takeProfit","tp","targetPrice","tpPrice"])),U7($,"entryTime",t$($,["entryTimestamp"]))}function jg($){let v=v7($.priceHigh),D=v7($.priceLow);if(v!==void 0&&D!==void 0&&v<D)$.priceHigh=D,$.priceLow=v}function UH($){if(typeof $!=="object"||$===null||Array.isArray($))return $;let v={...$},D=Bg(v),X=b0(D);if(X)v.type=X;return Ng(v,D),Og(v),Hg(v),Fg(v),jg(v),v}function DH($){return Vg[$].required}var Ag=l.object({type:l.string().describe('Shape type: "horizontal_line", "horizontal_ray", "vertical_line", "cross_line", "zone", "rectangle", "trendline", "ray", "right_ray", "left_ray", "extended_line", "info_line", "trend_angle", or "position"'),price:l.coerce.number().optional().describe("Price level (required for horizontal_line, horizontal_ray, cross_line)"),priceHigh:l.coerce.number().optional().describe("Upper price boundary (required for zone/rectangle)"),priceLow:l.coerce.number().optional().describe("Lower price boundary (required for zone/rectangle)"),price1:l.coerce.number().optional().describe("First point price (required for trendline/ray/right_ray/left_ray/extended_line/info_line/trend_angle)"),price2:l.coerce.number().optional().describe("Second point price (required for trendline/ray/right_ray/left_ray/extended_line/info_line/trend_angle)"),time1:l.number().int().optional().describe("Absolute time (epoch seconds) of the first endpoint for trendline/rays or anchor for vertical_line. PREFERRED over barsBack1."),time2:l.number().int().optional().describe("Absolute time (epoch seconds) of the second endpoint (trendline/rays) or right edge of a zone. PREFERRED over barsBack2."),barsBack1:l.number().optional().describe("FALLBACK only — bars back from the current bar for first endpoint/anchor (trendline, rays, vertical_line). Use time1 when possible."),barsBack2:l.number().optional().describe("FALLBACK only — bars back from the current bar for second endpoint / zone right edge. Use time2 when possible."),direction:l.enum(["long","short"]).optional().describe('Position direction (required for position): "long" or "short"'),entry:l.coerce.number().optional().describe("Entry price (required for position)"),stop:l.coerce.number().optional().describe("Stop-loss price (required for position)"),target:l.coerce.number().optional().describe("Take-profit price (required for position)"),entryTime:l.number().int().optional().describe("Absolute time (epoch seconds) for the position entry anchor. Defaults to the current bar."),label:l.string().optional().describe('Label text, e.g. "Support", "Resistance", "Demand Zone", "Long EURCHF"'),color:l.string().optional().describe('Color hex, e.g. "#22c55e" green, "#ef4444" red, "#3b82f6" blue'),affectsScale:l.boolean().optional().describe("Whether this shape expands the rendered price range (default true). Set false for distant context levels that should stay labelled but not compress the setup.")}).superRefine(($,v)=>{let D=b0($.type);if(!D){v.addIssue({code:"custom",message:vH($.type),path:["type"]});return}for(let X of DH(D))if($[X.field]===void 0)v.addIssue({code:"custom",message:X.message,path:[X.field]})}),XH=l.preprocess(UH,Ag),et=l.object({shapes:l.array(XH).min(1)});function GH($){let v=[],D=[];for(let[X,U]of $.entries()){let G=XH.safeParse(U);if(G.success)v.push(G.data);else D.push({index:X,reason:G.error.issues[0]?.message??"invalid shape"})}return{valid:v,invalid:D}}function $4($,v,D){let X={type:$.type,ok:!0,...D?{reason:D}:{},...$.label?{label:$.label}:{}};return{underlaySvg:v.underlaySvg??"",lineSvg:v.lineSvg??"",positionSvg:v.positionSvg??"",chromeSvg:v.chromeSvg??"",gutterTags:v.gutterTags??[],report:X}}function O$($,v){let D={type:$.type,ok:!1,reason:v,...$.label?{label:$.label}:{}};return{underlaySvg:"",lineSvg:"",positionSvg:"",chromeSvg:"",gutterTags:[],report:D}}function k$($){return typeof $==="number"&&Number.isFinite($)?$:void 0}function o$($,v){return $.color&&$.color.trim().length>0?$.color:v}function z$($,v,D,X){let U=$.projectPrice(D);if(!U.clamped||U.edge===null)return"";let G=Z6($.theme),J=Y$(v,$.plotLeft+10,$.plotRight-10),Q=U.edge==="top"?$.plotTop+4:$.plotBottom-4,W=U.edge==="top"?[{x:J,y:Q},{x:J-5,y:Q+7},{x:J+5,y:Q+7}]:[{x:J,y:Q},{x:J-5,y:Q-7},{x:J+5,y:Q-7}],z=U.edge==="top"?Q+16:Q-10;return o([lO(W,{fill:X}),p$($.formatPrice(D),{x:J,y:z,fill:G.markerText,"font-size":10,"font-family":g$,"text-anchor":"middle"})].join(""))}function D7($,v,D,X,U){let G=_1(D,10)+10;return o([F$({x:$,y:v-10,width:G,height:16,fill:X,"fill-opacity":0.85}),p$(D,{x:$+5,y:v+1,fill:U,"font-size":10,"font-family":g$})].join(""),{"shape-rendering":"crispEdges"})}function H4($,v,D,X,U="start"){return p$(D,{x:$,y:v,fill:X,"font-size":10,"font-family":g$,"text-anchor":U})}function Y$($,v,D){return Math.min(D,Math.max(v,$))}var QH="price out of visible range (clamped)";function X7($,v){if(v.type==="zone")return wg($,v);if(v.type==="rectangle")return Mg($,v);return O$(v,`Unsupported area shape: ${v.type}`)}function wg($,v){let D=WH($,v,"zone");if(D.kind==="error")return D.fragments;let X=o$(v,"#3b82f6"),U=Y$(D.top+12,$.plotTop+12,$.plotBottom-6),G=(D.left+D.right)/2;return $4(v,{underlaySvg:o(F$({x:D.left,y:D.top,width:D.right-D.left,height:D.bottom-D.top,fill:X,"fill-opacity":0.12}),{"shape-rendering":"crispEdges"}),lineSvg:o([I$({x1:D.left,y1:Math.round(D.top)+0.5,x2:D.right,y2:Math.round(D.top)+0.5,stroke:X,"stroke-width":1}),I$({x1:D.left,y1:Math.round(D.bottom)+0.5,x2:D.right,y2:Math.round(D.bottom)+0.5,stroke:X,"stroke-width":1}),v.label?H4(D.left+4,U,v.label,X):"",z$($,G,D.highPrice,X),z$($,G,D.lowPrice,X)].join(""),{"shape-rendering":"crispEdges"})},D.clamped?QH:void 0)}function Mg($,v){let D=WH($,v,"rectangle");if(D.kind==="error")return D.fragments;let X=o$(v,"#f59e0b"),U=Y$(D.top+12,$.plotTop+12,$.plotBottom-6),G=(D.left+D.right)/2;return $4(v,{underlaySvg:o(F$({x:D.left,y:D.top,width:D.right-D.left,height:D.bottom-D.top,fill:X,"fill-opacity":0.12}),{"shape-rendering":"crispEdges"}),lineSvg:o([F$({x:D.left,y:D.top,width:D.right-D.left,height:D.bottom-D.top,fill:"none",stroke:X,"stroke-width":1}),v.label?H4(D.left+4,U,v.label,X):"",z$($,G,D.highPrice,X),z$($,G,D.lowPrice,X)].join(""),{"shape-rendering":"crispEdges"})},D.clamped?QH:void 0)}function WH($,v,D){let X=k$(v.priceHigh),U=k$(v.priceLow);if(X===void 0)return{kind:"error",fragments:O$(v,`priceHigh is required for ${D}`)};if(U===void 0)return{kind:"error",fragments:O$(v,`priceLow is required for ${D}`)};let G=$.projectPrice(X),J=$.projectPrice(U),Q=D==="zone"&&!JH(v)?$.plotLeft:Y$($.resolveEndpointX(v,"start",24),$.plotLeft,$.plotRight),W=D==="zone"&&!JH(v)?$.plotRight:Y$($.resolveEndpointX(v,"end",4),$.plotLeft,$.plotRight),z=Math.min(G.y,J.y),Y=Math.max(G.y,J.y);return{kind:"ok",left:Math.min(Q,W),right:Math.max(Q,W),top:z,bottom:Y,highPrice:X,lowPrice:U,clamped:G.clamped||J.clamped}}function JH($){return $.time1!==void 0||$.time2!==void 0||$.barsBack1!==void 0||$.barsBack2!==void 0}function fX($,v,D){if(Math.abs(D.x-v.x)<0.000001)return v.y;let X=(D.y-v.y)/(D.x-v.x);return v.y+($-v.x)*X}function zH($,v,D){if(Math.abs(v.x-$.x)<0.000001)return{start:{x:$.x,y:$.y},end:{x:$.x,y:v.y}};return{start:{x:$.x,y:$.y},end:{x:D,y:fX(D,$,v)}}}function YH($,v,D){if(Math.abs(v.x-$.x)<0.000001)return{start:{x:$.x,y:$.y},end:{x:$.x,y:v.y}};return{start:{x:$.x,y:$.y},end:{x:D,y:fX(D,$,v)}}}function IH($,v,D,X,U,G){if(Math.abs(v.x-$.x)<0.000001)return{start:{x:$.x,y:U},end:{x:$.x,y:G}};return{start:{x:D,y:fX(D,$,v)},end:{x:X,y:fX(X,$,v)}}}function G7($,v){return{x:($.x+v.x)/2,y:($.y+v.y)/2}}var y1="price out of visible range (clamped)";function J4($,v){switch(v.type){case"horizontal_line":return Pg($,v);case"horizontal_ray":return bg($,v);case"vertical_line":return qg($,v);case"cross_line":return Sg($,v);case"trendline":return kg($,v);case"ray":case"right_ray":return Eg($,v);case"left_ray":return Tg($,v);case"extended_line":return Rg($,v);case"info_line":return gg($,v);case"trend_angle":return Cg($,v);default:return O$(v,`Unsupported line shape: ${v.type}`)}}function Pg($,v){let D=k$(v.price);if(D===void 0)return O$(v,"price is required for horizontal_line");let X=o$(v,"#3b82f6"),U=$.projectPrice(D),G=[I$({x1:$.plotLeft,y1:Math.round(U.y)+0.5,x2:$.plotRight,y2:Math.round(U.y)+0.5,stroke:X,"stroke-width":1}),v.label?H4($.plotLeft+4,Y$(U.y-4,$.plotTop+10,$.plotBottom-4),v.label,X):"",z$($,$.plotRight-12,D,X)].join("");return $4(v,{lineSvg:o(G,{"shape-rendering":"crispEdges"}),gutterTags:[{y:U.y,label:$.formatPrice(D),fill:X,height:f1}]},U.clamped?y1:void 0)}function bg($,v){let D=k$(v.price);if(D===void 0)return O$(v,"price is required for horizontal_ray");let X=o$(v,"#3b82f6"),U=$.projectPrice(D),G=$.resolveEndpointX(v,"start",0),J=Y$(G+4,$.plotLeft+4,$.plotRight-60);return $4(v,{lineSvg:o([I$({x1:Y$(G,$.plotLeft,$.plotRight),y1:Math.round(U.y)+0.5,x2:$.plotRight,y2:Math.round(U.y)+0.5,stroke:X,"stroke-width":1}),v.label?H4(J,Y$(U.y-4,$.plotTop+10,$.plotBottom-4),v.label,X):"",z$($,G,D,X)].join(""),{"shape-rendering":"crispEdges"})},U.clamped?y1:void 0)}function qg($,v){let D=o$(v,"#f59e0b"),X=$.resolveEndpointX(v,"start",0),U=Y$(X,$.plotLeft,$.plotRight);return $4(v,{lineSvg:o([I$({x1:Math.round(U)+0.5,y1:$.plotTop,x2:Math.round(U)+0.5,y2:$.plotBottom,stroke:D,"stroke-width":1,"stroke-dasharray":"4 4"}),v.label?H4(U+4,$.plotTop+12,v.label,D):""].join(""),{"shape-rendering":"crispEdges"})})}function Sg($,v){let D=k$(v.price);if(D===void 0)return O$(v,"price is required for cross_line");let X=o$(v,"#38bdf8"),U=$.projectPrice(D),G=Y$($.resolveEndpointX(v,"start",0),$.plotLeft,$.plotRight);return $4(v,{lineSvg:o([I$({x1:$.plotLeft,y1:Math.round(U.y)+0.5,x2:$.plotRight,y2:Math.round(U.y)+0.5,stroke:X,"stroke-width":1,"stroke-dasharray":"4 4"}),I$({x1:Math.round(G)+0.5,y1:$.plotTop,x2:Math.round(G)+0.5,y2:$.plotBottom,stroke:X,"stroke-width":1,"stroke-dasharray":"4 4"}),v.label?H4(G+4,Y$(U.y-4,$.plotTop+10,$.plotBottom-4),v.label,X):"",z$($,G,D,X)].join(""),{"shape-rendering":"crispEdges"})},U.clamped?y1:void 0)}function kg($,v){let D=n1($,v,"trendline");if(D.kind==="error")return D.fragments;return ug($,v,D.first,D.second,"#f59e0b","4 4")}function Eg($,v){let D=n1($,v,v.type);if(D.kind==="error")return D.fragments;let X=o$(v,"#f59e0b"),U=zH(D.first,D.second,$.plotRight);return _X($,v,U.start,U.end,X,"4 4",[z$($,D.first.x,D.price1,X),z$($,D.second.x,D.price2,X)])}function Tg($,v){let D=n1($,v,"left_ray");if(D.kind==="error")return D.fragments;let X=o$(v,"#f59e0b"),U=YH(D.first,D.second,$.plotLeft);return _X($,v,U.start,U.end,X,"4 4",[z$($,D.first.x,D.price1,X),z$($,D.second.x,D.price2,X)])}function Rg($,v){let D=n1($,v,"extended_line");if(D.kind==="error")return D.fragments;let X=o$(v,"#f59e0b"),U=IH(D.first,D.second,$.plotLeft,$.plotRight,$.plotTop,$.plotBottom);return _X($,v,U.start,U.end,X,"4 4",[z$($,D.first.x,D.price1,X),z$($,D.second.x,D.price2,X)])}function gg($,v){let D=n1($,v,"info_line");if(D.kind==="error")return D.fragments;let X=o$(v,"#22c55e"),U=D.price2-D.price1,G=D.price1===0?null:U/D.price1*100,J=$.instrument?.priceDecimals??5,Q=v.label?`${v.label} · ${P0(U,G,J)}`:P0(U,G,J),W=G7(D.first,D.second);return $4(v,{lineSvg:o([I$({x1:D.first.x,y1:D.first.y,x2:D.second.x,y2:D.second.y,stroke:X,"stroke-width":1}),D7(Y$(W.x-30,$.plotLeft+2,$.plotRight-120),Y$(W.y-6,$.plotTop+12,$.plotBottom-12),Q,X,"#FFFFFF"),z$($,D.first.x,D.price1,X),z$($,D.second.x,D.price2,X)].join(""),{"shape-rendering":"crispEdges"})},D.clamped?y1:void 0)}function Cg($,v){let D=n1($,v,"trend_angle");if(D.kind==="error")return D.fragments;let X=o$(v,"#a855f7"),U=Math.atan2(D.first.y-D.second.y,D.second.x-D.first.x)*180/Math.PI,G=v.label?`${v.label} · ${U.toFixed(1)}°`:`${U.toFixed(1)}°`,J=G7(D.first,D.second);return $4(v,{lineSvg:o([I$({x1:D.first.x,y1:D.first.y,x2:D.second.x,y2:D.second.y,stroke:X,"stroke-width":1}),D7(Y$(J.x-26,$.plotLeft+2,$.plotRight-100),Y$(J.y-6,$.plotTop+12,$.plotBottom-12),G,X,"#FFFFFF"),z$($,D.first.x,D.price1,X),z$($,D.second.x,D.price2,X)].join(""),{"shape-rendering":"crispEdges"})},D.clamped?y1:void 0)}function ug($,v,D,X,U,G){let J=o$(v,U);return _X($,v,D,X,J,G,[z$($,D.x,k$(v.price1)??0,J),z$($,X.x,k$(v.price2)??0,J)])}function _X($,v,D,X,U,G,J){let Q=Y$(X.x+4,$.plotLeft+4,$.plotRight-70),W=Y$(X.y-4,$.plotTop+12,$.plotBottom-4),z=k$(v.price1),Y=k$(v.price2),I=z!==void 0&&$.projectPrice(z).clamped||Y!==void 0&&$.projectPrice(Y).clamped;return $4(v,{lineSvg:o([I$({x1:D.x,y1:D.y,x2:X.x,y2:X.y,stroke:U,"stroke-width":1,...G?{"stroke-dasharray":G}:{}}),v.label?H4(Q,W,v.label,U):"",...J].join(""),{"shape-rendering":"crispEdges"})},I?y1:void 0)}function n1($,v,D){let X=k$(v.price1),U=k$(v.price2);if(X===void 0)return{kind:"error",fragments:O$(v,`price1 is required for ${D}`)};if(U===void 0)return{kind:"error",fragments:O$(v,`price2 is required for ${D}`)};let G=$.projectPrice(X),J=$.projectPrice(U),Q={x:Y$($.resolveEndpointX(v,"start",50),$.plotLeft,$.plotRight),y:G.y},W={x:Y$($.resolveEndpointX(v,"end",0),$.plotLeft,$.plotRight),y:J.y};return{kind:"ok",first:Q,second:W,price1:X,price2:U,clamped:G.clamped||J.clamped}}var xg="price out of visible range (clamped)";function VH($,v){if(v.direction!=="long"&&v.direction!=="short")return O$(v,'direction ("long" or "short") is required for position');let D=k$(v.entry),X=k$(v.stop),U=k$(v.target);if(D===void 0)return O$(v,"entry is required for position");if(X===void 0)return O$(v,"stop is required for position");if(U===void 0)return O$(v,"target is required for position");let G=Z6($.theme),J=Y$($.resolveEndpointX(v,"start",0),$.plotLeft,$.plotRight),Q=$.projectPrice(D),W=$.projectPrice(X),z=$.projectPrice(U),Y=Math.min(Q.y,z.y),I=Math.max(Q.y,z.y),V=Math.min(Q.y,W.y),K=Math.max(Q.y,W.y),L=Y$(Math.min(Y,V)+12,$.plotTop+12,$.plotBottom-8),N=Q.clamped||W.clamped||z.clamped;return $4(v,{positionSvg:o([F$({x:J,y:Y,width:$.plotRight-J,height:I-Y,fill:"#10b981","fill-opacity":0.12}),F$({x:J,y:V,width:$.plotRight-J,height:K-V,fill:"#ef4444","fill-opacity":0.12}),I$({x1:J,y1:Math.round(Q.y)+0.5,x2:$.plotRight,y2:Math.round(Q.y)+0.5,stroke:G.entryTag,"stroke-width":1}),I$({x1:J,y1:Math.round(W.y)+0.5,x2:$.plotRight,y2:Math.round(W.y)+0.5,stroke:"#ef4444","stroke-width":1}),I$({x1:J,y1:Math.round(z.y)+0.5,x2:$.plotRight,y2:Math.round(z.y)+0.5,stroke:"#10b981","stroke-width":1}),v.label?H4(J+4,L,v.label,G.text):"",z$($,J,D,G.entryTag),z$($,J,X,"#ef4444"),z$($,J,U,"#10b981")].join(""),{"shape-rendering":"crispEdges"}),gutterTags:[{y:Q.y,label:`Entry ${$.formatPrice(D)}`,fill:G.entryTag,height:gX},{y:W.y,label:`SL ${$.formatPrice(X)}`,fill:"#ef4444",height:gX},{y:z.y,label:`TP ${$.formatPrice(U)}`,fill:"#10b981",height:gX}]},N?xg:void 0)}var fg={horizontal_line:J4,horizontal_ray:J4,vertical_line:J4,cross_line:J4,zone:X7,rectangle:X7,trendline:J4,ray:J4,right_ray:J4,left_ray:J4,extended_line:J4,info_line:J4,trend_angle:J4,position:VH};function KH($,v){let D=[],X=[],U=[],G=[],J=[],Q=[],W=0,z=0;for(let Y of v){let I=_g($,Y);if(D.push(I.underlaySvg),X.push(I.lineSvg),U.push(I.positionSvg),G.push(I.chromeSvg),J.push(...I.gutterTags),Q.push(I.report),I.report.ok)W+=1;else z+=1}return{underlaySvg:D.join(""),lineSvg:X.join(""),positionSvg:U.join(""),chromeSvg:G.join(""),gutterTags:J,reports:Q,drawn:W,skipped:z}}function _g($,v){let D=b0(v.type);if(!D)return O$(v,`Unknown shape type: ${String(v.type)}`);let X=fg[D];if(!X)return O$(v,`Unsupported shape type: ${D}`);let U=D===v.type?v:{...v,type:D};return X($,U)}var J7;function LH($){let v=s5($),D=ig(v.pair),X=rO(v,D),U=CX[v.theme],G=KH(X,v.shapes),J=pO(X,v.watermark),Q=`plot-clip-${lg(X)}`,W=`<defs><clipPath id="${Q}">${F$({x:X.plotLeft,y:X.plotTop,width:X.plotWidth,height:X.plotHeight})}</clipPath></defs>`,z={"clip-path":`url(#${Q})`},Y=o(J.gridSvg,z),I=o(G.underlaySvg,z),V=o(tO(X),z),K=o(G.lineSvg,z),L=o(G.positionSvg,z),N=oO(X,[...G.gutterTags,J.lastPriceTag]);return{svg:hO(X.width,X.height,[F$({x:0,y:0,width:X.width,height:X.height,fill:U.background}),W,Y,I,V,K,L,J.axesSvg,G.chromeSvg,J.lastPriceSvg,N,J.headerSvg,J.watermarkSvg,ng()].join("")),width:X.width,height:X.height,drawn:G.drawn,skipped:G.skipped,shapes:G.reports,priceRange:{min:X.priceRange.min,max:X.priceRange.max}}}function Q7($){let v=LH($),D=s5($);return{...v,png:eO(v.svg,v.width,D.scale,D.fontFiles)}}function ig($){return yg().resolve($)}function yg(){if(J7===void 0)J7=new M0([...TX]);return J7}function ng(){return`<style>text{font-family:${g$};white-space:pre}</style>`}function lg($){let v=$.visibleCandles,D=v[0]?.time??0,X=v[v.length-1]?.time??0,U=`${$.pair}|${$.timeframe}|${$.width}x${$.height}|${v.length}|${D}|${X}`,G=2166136261;for(let J=0;J<U.length;J+=1)G^=U.charCodeAt(J),G=Math.imul(G,16777619);return(G>>>0).toString(36)}var BH=120,W7=20,z7=200,hg=4800;function mg($,v,D){return Math.max(v,Math.min(D,$))}var cg="Render an annotated candlestick chart image (PNG) for a pair + timeframe and optional market-data sourceId. Fetches recent candles and draws optional shapes (support/resistance lines, zones, trendlines, a long/short position) using the same vocabulary as draw_chart_shape. Returns the chart as an image plus a text summary. PREFER absolute time anchors (time1/time2/entryTime, epoch seconds from get_candles) over barsBack*.",dg="Optional annotations. Each item is {type, ...}: horizontal_line/horizontal_ray/cross_line need `price`; zone/rectangle need `priceHigh`+`priceLow`; trendline/ray/right_ray/left_ray/extended_line/info_line/trend_angle need `price1`+`price2` (prefer `time1`+`time2` epoch seconds); position needs `direction` (long/short)+`entry`+`stop`+`target`. Optional `label`, `color` (hex), and `affectsScale` (false keeps a distant contextual level labelled without compressing the active setup).",iX=[E({name:"render_chart",description:cg,inputSchema:{type:"object",properties:{pair:{type:"string",description:"Canonical instrument id, e.g. EURUSD (case-insensitive)"},timeframe:{type:"string",description:"e.g. 1m, 5m, 15m, 30m, 1h, 4h, 1d (or an integer multiple)"},sourceId:{type:"string",pattern:"^[a-z][a-z0-9-]{0,62}$",description:"Market-data source from get_market_config, e.g. mt5-primary. Omit for Twelve Data."},shapes:{type:"array",description:dg,items:{type:"object"}},bars:{type:"integer",minimum:W7,maximum:z7,description:`Most-recent candles to show (${W7}-${z7}, default ${BH})`},offset:{type:"integer",minimum:0,maximum:hg,description:"Candle page offset: 0 is the latest page; larger offsets walk backward through history. Pair with bars to frame a historical setup."},theme:{type:"string",enum:["dark","light"],description:"Color theme (default dark)"},width:{type:"integer",minimum:320,maximum:2560,description:"Image width in px (320-2560, default 1280)"},height:{type:"integer",minimum:240,maximum:1440,description:"Image height in px (240-1440, default 720)"}},required:["pair","timeframe"],additionalProperties:!1},handler:async($,v)=>{await T(v);let D=mg($.bars??BH,W7,z7),{candles:X}=await qX(v.trpc,{pair:$.pair,timeframe:$.timeframe,limit:D,...$.offset===void 0?{}:{offset:$.offset},...$.sourceId?{sourceId:$.sourceId}:{}});if(X.length===0)throw Error(`No candles available for ${$.pair} ${$.timeframe}. Check the pair/timeframe with get_market_config.`);let{valid:U,invalid:G}=GH($.shapes??[]),J=Q7({pair:$.pair,timeframe:$.timeframe,candles:X,shapes:U,bars:D,...$.theme?{theme:$.theme}:{},...$.width?{width:$.width}:{},...$.height?{height:$.height}:{}}),Q=J.shapes.filter((I)=>!I.ok),W=[...G.map((I)=>`shape ${I.index}: ${I.reason}`),...Q.map((I)=>`${I.type}: ${I.reason??"undrawable"}`)],z=W.length>0?` (${W.length} skipped)
|
|
106
|
+
`)}}]}]}function y5(){return[{uri:"aetherwealth://capabilities",name:"Aether Wealth capabilities",description:"What Aether Wealth can do across all surfaces, and which actions are MCP-callable vs dashboard-only. Attach for product context.",mimeType:"text/markdown",handler:async()=>({text:qZ()})}]}function p2($){return{...$.broker===void 0?{}:{broker:$.broker},...$.accountType===void 0?{}:{accountType:$.accountType},...$.initialBalance===void 0?{}:{initialBalance:$.initialBalance},...$.currency===void 0?{}:{currency:$.currency},...$.notes===void 0?{}:{notes:$.notes},...$.defaultRiskAmount===void 0?{}:{defaultRiskAmount:$.defaultRiskAmount}}}function t2($){return{name:$.name,...p2($)}}function SZ($){return $.trading.accounts.list.query()}function kZ($,v){return $.trading.accounts.create.mutate(t2(v))}function n5($){return{triggerType:$.triggerType??"close",isPersistent:$.isPersistent??!1,notifyEmail:$.notifyEmail??!0,notifyPush:$.notifyPush??!0,...$.message===void 0?{}:{message:$.message},...$.expiresAt===void 0?{}:{expiresAt:$.expiresAt}}}function EZ($){return{...$.includeArchived===void 0?{}:{includeArchived:$.includeArchived},...$.pair===void 0?{}:{pair:$.pair}}}function o2($){return{id:$.id,...$.price===void 0?{}:{price:$.price},...$.price1===void 0?{}:{price1:$.price1},...$.price2===void 0?{}:{price2:$.price2},...$.time1===void 0?{}:{time1:$.time1},...$.time2===void 0?{}:{time2:$.time2},...$.condition===void 0?{}:{condition:$.condition},...$.triggerType===void 0?{}:{triggerType:$.triggerType},...$.timeframe===void 0?{}:{timeframe:$.timeframe},...$.isActive===void 0?{}:{isActive:$.isActive},...$.isArchived===void 0?{}:{isArchived:$.isArchived},...$.isPersistent===void 0?{}:{isPersistent:$.isPersistent},...$.notifyEmail===void 0?{}:{notifyEmail:$.notifyEmail},...$.notifyPush===void 0?{}:{notifyPush:$.notifyPush},...$.message===void 0?{}:{message:$.message},...$.expiresAt===void 0?{}:{expiresAt:$.expiresAt}}}function a2($){return{id:$.id,...$.condition===void 0?{}:{condition:$.condition},...$.dedupMode===void 0?{}:{dedupMode:$.dedupMode},...$.triggerType===void 0?{}:{triggerType:$.triggerType},...$.isActive===void 0?{}:{isActive:$.isActive},...$.isArchived===void 0?{}:{isArchived:$.isArchived},...$.isPersistent===void 0?{}:{isPersistent:$.isPersistent},...$.notifyEmail===void 0?{}:{notifyEmail:$.notifyEmail},...$.notifyPush===void 0?{}:{notifyPush:$.notifyPush},...$.message===void 0?{}:{message:$.message},...$.expiresAt===void 0?{}:{expiresAt:$.expiresAt}}}function TZ($,v){return $.alerts.list.query(EZ(v))}function RZ($,v){let D={pair:v.pair,timeframe:v.timeframe,price:v.price,condition:v.condition,...n5(v)};return $.alerts.createPrice.mutate(D)}function gZ($,v){let D={pair:v.pair,timeframe:v.timeframe,price1:v.price1,time1:v.time1,price2:v.price2,time2:v.time2,condition:v.condition,...n5(v)};return $.alerts.createTrendline.mutate(D)}function CZ($,v){return $.alerts.update.mutate(o2(v))}function uZ($,v){return $.alerts.delete.mutate({id:v.id})}function xZ($,v){let D=EZ(v);return $.alerts.indicator.list.query(D)}function fZ($,v){let D={pair:v.pair,timeframe:v.timeframe,indicatorType:v.indicatorType,indicatorParams:v.indicatorParams,outputSeries:v.outputSeries,condition:v.condition,dedupMode:v.dedupMode??"edge",...n5(v)};return $.alerts.indicator.create.mutate(D)}function _Z($,v){return $.alerts.indicator.update.mutate(a2(v))}function iZ($,v){return $.alerts.indicator.delete.mutate({id:v.id})}function e2($){if($.provider==="mt5_executor")return{accountId:$.accountId,provider:$.provider,baseUrl:$.baseUrl,providerAccountRef:$.providerAccountRef,providerToken:$.providerToken,...$.approvalMode===void 0?{}:{approvalMode:$.approvalMode}};return{accountId:$.accountId,region:$.region,providerAccountRef:$.providerAccountRef,providerToken:$.providerToken,...$.provider===void 0?{}:{provider:$.provider},...$.approvalMode===void 0?{}:{approvalMode:$.approvalMode}}}function bX($){return{accountId:$.accountId}}function s2($){return{accountId:$.accountId,symbol:$.symbol}}function $R($){return{accountId:$.accountId,approvalMode:$.approvalMode,...$.totpCode===void 0?{}:{totpCode:$.totpCode}}}function vR($){return{accountId:$.accountId,symbol:$.symbol,direction:$.direction,stopLoss:$.stopLoss,...$.orderType===void 0?{}:{orderType:$.orderType},...$.entryPrice===void 0?{}:{entryPrice:$.entryPrice},...$.takeProfit===void 0?{}:{takeProfit:$.takeProfit},...$.riskPercent===void 0?{}:{riskPercent:$.riskPercent},...$.riskAmount===void 0?{}:{riskAmount:$.riskAmount}}}function UR($){return{intentId:$.intentId,...$.code===void 0?{}:{code:$.code}}}function DR($){return{intentId:$.intentId}}function XR($){return{intentId:$.intentId}}function GR($){return{accountId:$.accountId,positionId:$.positionId,...$.volume===void 0?{}:{volume:$.volume}}}function JR($){return{accountId:$.accountId,positionId:$.positionId,...$.stopLoss===void 0?{}:{stopLoss:$.stopLoss},...$.takeProfit===void 0?{}:{takeProfit:$.takeProfit}}}function yZ($,v){return $.execution.connect.mutate(e2(v))}function nZ($,v){return $.execution.status.query(bX(v))}function lZ($,v){return $.execution.disconnect.mutate(bX(v))}function hZ($,v){return $.execution.setApprovalMode.mutate($R(v))}function mZ($,v){return $.execution.account.query(bX(v))}function cZ($,v){return $.execution.positions.query(bX(v))}function dZ($,v){return $.execution.quote.query(s2(v))}function rZ($,v){return $.execution.propose.mutate(vR(v))}function pZ($,v){return $.execution.execute.mutate(UR(v))}function tZ($,v){return $.execution.cancel.mutate(DR(v))}function oZ($,v){return $.execution.intentStatus.query(XR(v))}function aZ($,v){return $.execution.closePosition.mutate(GR(v))}function eZ($,v){return $.execution.modifyPosition.mutate(JR(v))}function QR($){return{pair:$.pair,interval:$.interval,indicators:$.indicators.map((v)=>({name:v.name,...v.params===void 0?{}:{params:v.params}})),...$.outputsize===void 0?{}:{outputsize:$.outputsize}}}function sZ($,v){return $.technicalIndicators.get.query(QR(v))}var $O=["3m","6m","12m","24m","all"];function WR($){return{...$.currency===void 0?{}:{currency:$.currency},...$.from===void 0?{}:{from:$.from},...$.to===void 0?{}:{to:$.to},...$.indicator===void 0?{}:{indicator:$.indicator},...$.impactMin===void 0?{}:{impactMin:$.impactMin},...$.view===void 0?{}:{view:$.view}}}function zR($){return{currency:$.currency,indicator:$.indicator,...$.from===void 0?{}:{from:$.from},...$.to===void 0?{}:{to:$.to},...$.limit===void 0?{}:{limit:$.limit}}}function YR($){return{currency:$.currency,indicator:$.indicator,...$.range===void 0?{}:{range:$.range}}}function IR($){return{pair:$.pair,timeframe:$.timeframe,...$.limit===void 0?{}:{limit:$.limit},...$.offset===void 0?{}:{offset:$.offset},...$.cursor===void 0?{}:{cursor:$.cursor}}}function VR($){return{...IR($),...$.sourceId===void 0?{}:{sourceId:$.sourceId}}}function qX($,v){return $.marketData.mcpCandles.query(VR(v))}function vO($,v){return $.marketData.listCalendar.query(WR(v))}function UO($,v){return $.marketData.listIndicatorSeries.query(zR(v))}function DO($,v){return $.macroIndicator.list.query(YR(v))}function XO($){return $.marketData.getConfig.query()}function KR($){return{...$.accountId===void 0?{}:{accountId:$.accountId},...$.pair===void 0?{}:{pair:$.pair},...$.from===void 0?{}:{from:$.from},...$.to===void 0?{}:{to:$.to}}}function GO($,v){return $.trading.analytics.stats.query(KR(v))}function LR($){return{...$.accountId===void 0?{}:{accountId:$.accountId},...$.status===void 0||$.status==="ALL"?{}:{status:$.status},...$.pair===void 0?{}:{pair:$.pair},...$.from===void 0?{}:{from:$.from},...$.to===void 0?{}:{to:$.to},...$.page===void 0?{}:{page:$.page},...$.limit===void 0?{}:{limit:$.limit}}}function JO($){return{...$.stopLoss===void 0?{}:{stopLoss:$.stopLoss},...$.takeProfit===void 0?{}:{takeProfit:$.takeProfit},...$.lotSize===void 0?{}:{lotSize:$.lotSize},...$.notes===void 0?{}:{notes:$.notes},...$.timeframe===void 0?{}:{timeframe:$.timeframe},...$.riskPercent===void 0?{}:{riskPercent:$.riskPercent},...$.tags===void 0?{}:{tags:$.tags}}}function BR($){return{accountId:$.accountId,pair:$.pair,direction:$.direction,entryPrice:$.entryPrice,entryTime:$.entryTime,...JO($)}}function NR($){return{id:$.id,...$.pair===void 0?{}:{pair:$.pair},...$.direction===void 0?{}:{direction:$.direction},...$.entryPrice===void 0?{}:{entryPrice:$.entryPrice},...$.entryTime===void 0?{}:{entryTime:$.entryTime},...JO($)}}function ZR($){return{id:$.id,exitPrice:$.exitPrice,exitTime:$.exitTime,...$.fees===void 0?{}:{fees:$.fees},...$.swap===void 0?{}:{swap:$.swap},...$.notes===void 0?{}:{notes:$.notes}}}function OR($){return{accountId:$.accountId,status:$.status}}function HR($){return{pair:$.pair,direction:$.direction,entryPrice:$.entryPrice,lotSize:$.lotSize,entryTime:$.entryTime,...$.exitPrice===void 0?{}:{exitPrice:$.exitPrice},...$.stopLoss===void 0?{}:{stopLoss:$.stopLoss},...$.takeProfit===void 0?{}:{takeProfit:$.takeProfit},...$.exitTime===void 0?{}:{exitTime:$.exitTime},...$.notes===void 0?{}:{notes:$.notes},...$.timeframe===void 0?{}:{timeframe:$.timeframe},...$.emotionalTag===void 0?{}:{emotionalTag:$.emotionalTag},...$.fees===void 0?{}:{fees:$.fees},...$.swap===void 0?{}:{swap:$.swap},...$.reportedPnl===void 0?{}:{reportedPnl:$.reportedPnl},...$.tags===void 0?{}:{tags:$.tags}}}function FR($){return{accountId:$.accountId,trades:$.trades.map(HR)}}function QO($,v){return $.trading.trades.list.query(LR(v))}function WO($,v){return $.trading.trades.get.query({id:v.id})}function zO($,v){return $.trading.trades.create.mutate(BR(v))}function YO($,v){return $.trading.trades.update.mutate(NR(v))}function IO($,v){return $.trading.trades.close.mutate(ZR(v))}function VO($,v){return $.trading.trades.delete.mutate({id:v.id})}function KO($,v){return $.trading.trades.deleteMany.mutate(OR(v))}function LO($,v){return $.trading.trades.importMany.mutate(FR(v))}function E($){return $}var l5='Not signed in to Aether Wealth. Call the "login" tool to authenticate, then retry.';async function T($){if(!await $.session.getAccessToken())throw Error(l5)}var BO={type:"integer",minimum:1,maximum:200,description:"Max rows to return"},NO={type:"integer",minimum:1,description:"Page number (1-indexed)"};function SX($,v){if(v===null||v===void 0){if($.required&&$.required.length>0)return{ok:!1,reason:`missing required: ${$.required.join(", ")}`};return{ok:!0,args:{}}}if(typeof v!=="object"||Array.isArray(v))return{ok:!1,reason:"args must be an object"};let D=v,X=jR($,D)??AR($,D);return X?{ok:!1,reason:X}:{ok:!0,args:D}}function jR($,v){for(let D of $.required??[])if(!(D in v)||v[D]===void 0||v[D]===null)return`missing required: ${D}`;return null}function AR($,v){if($.additionalProperties!==!1)return null;for(let D of Object.keys(v))if(!(D in $.properties))return`unknown property: ${D}`;return null}var h5={type:"string",enum:["above","below","crosses"]},w0={triggerType:{type:"string",enum:["close","wick"],description:"default: close"},isPersistent:{type:"boolean",description:"Re-arm after firing. default: false"},notifyEmail:{type:"boolean",description:"default: true"},notifyPush:{type:"boolean",description:"default: true"},message:{type:"string"},expiresAt:{type:"string",description:"ISO 8601 datetime"}},kX=[E({name:"list_alerts",description:"List your price + trendline alerts. Optionally include archived or filter by pair. Requires sign-in.",inputSchema:{type:"object",properties:{includeArchived:{type:"boolean"},pair:{type:"string"}},additionalProperties:!1},handler:async($,v)=>{return await T(v),TZ(v.trpc,$)}}),E({name:"create_price_alert",description:"Create a price-level alert (fires when price is above/below/crosses a level). Requires sign-in.",inputSchema:{type:"object",properties:{pair:{type:"string",description:"e.g. EURUSD, BTCUSD"},timeframe:{type:"string",description:"e.g. 1h, 4h, 1d"},price:{type:"number"},condition:h5,...w0},required:["pair","timeframe","price","condition"],additionalProperties:!1},handler:async($,v)=>{return await T(v),RZ(v.trpc,$)}}),E({name:"create_trendline_alert",description:"Create a trendline alert (fires when price crosses a line defined by two points). Requires sign-in.",inputSchema:{type:"object",properties:{pair:{type:"string"},timeframe:{type:"string"},price1:{type:"number"},time1:{type:"string",description:"ISO 8601 datetime of point 1"},price2:{type:"number"},time2:{type:"string",description:"ISO 8601 datetime of point 2"},condition:h5,...w0},required:["pair","timeframe","price1","time1","price2","time2","condition"],additionalProperties:!1},handler:async($,v)=>{return await T(v),gZ(v.trpc,$)}}),E({name:"update_alert",description:"Update a price/trendline alert (e.g. change level, archive, mute). Requires sign-in.",inputSchema:{type:"object",properties:{id:{type:"string"},price:{type:"number"},price1:{type:"number"},price2:{type:"number"},time1:{type:"string"},time2:{type:"string"},condition:h5,timeframe:{type:"string"},isActive:{type:"boolean"},isArchived:{type:"boolean"},...w0},required:["id"],additionalProperties:!1},handler:async($,v)=>{return await T(v),CZ(v.trpc,$)}}),E({name:"delete_alert",description:"Delete a price/trendline alert by id. Requires sign-in.",inputSchema:{type:"object",properties:{id:{type:"string"}},required:["id"],additionalProperties:!1},handler:async($,v)=>{return await T(v),uZ(v.trpc,$)}}),E({name:"list_indicator_alerts",description:"List your indicator-based alerts. Optionally include archived or filter by pair. Requires sign-in.",inputSchema:{type:"object",properties:{includeArchived:{type:"boolean"},pair:{type:"string"}},additionalProperties:!1},handler:async($,v)=>{return await T(v),xZ(v.trpc,$)}}),E({name:"create_indicator_alert",description:"Create an indicator alert (fires on an indicator output condition, e.g. RSI crosses 70). `condition` is { op, threshold } or { op, other }. Requires sign-in.",inputSchema:{type:"object",properties:{pair:{type:"string"},timeframe:{type:"string"},indicatorType:{type:"string",description:"e.g. rsi, ema, macd"},indicatorParams:{type:"object",description:"Indicator settings, e.g. { length: 14 }"},outputSeries:{type:"string",description:"Which output series to watch"},condition:{type:"object",description:"{ op: gt|gte|lt|lte|eq|crosses_above|crosses_below, threshold } or { op: *_series, other }"},dedupMode:{type:"string",enum:["edge","continuous"],description:"default: edge"},...w0},required:["pair","timeframe","indicatorType","indicatorParams","outputSeries","condition"],additionalProperties:!1},handler:async($,v)=>{return await T(v),fZ(v.trpc,$)}}),E({name:"update_indicator_alert",description:"Update an indicator alert (condition, dedup, archive, mute). Requires sign-in.",inputSchema:{type:"object",properties:{id:{type:"string"},condition:{type:"object"},dedupMode:{type:"string",enum:["edge","continuous"]},isActive:{type:"boolean"},isArchived:{type:"boolean"},...w0},required:["id"],additionalProperties:!1},handler:async($,v)=>{return await T(v),_Z(v.trpc,$)}}),E({name:"delete_indicator_alert",description:"Delete an indicator alert by id. Requires sign-in.",inputSchema:{type:"object",properties:{id:{type:"string"}},required:["id"],additionalProperties:!1},handler:async($,v)=>{return await T(v),iZ(v.trpc,$)}})];var EX=[E({name:"login",description:"Sign in to Aether Wealth. Opens your browser to authenticate; once you approve, the MCP stores a per-user token and the data tools become available.",inputSchema:{type:"object",properties:{},additionalProperties:!1},handler:async($,v)=>{return await v.session.login(),{status:"signed_in",message:"Signed in to Aether Wealth."}}}),E({name:"logout",description:"Sign out of Aether Wealth on this device. Clears the stored access token.",inputSchema:{type:"object",properties:{},additionalProperties:!1},handler:async($,v)=>{return await v.session.logout(),{status:"signed_out",message:"Signed out on this device."}}})];var B$=($,v,D,X)=>{return{id:$,displayName:`${$.slice(0,3)}/${$.slice(3)}`,kind:"forex",exchange:"FX",region:"GLOBAL",category:D,pipSize:X?.pipSize??0.0001,priceDecimals:X?.priceDecimals??5,contractSize:1e5,providers:{twelvedata:v}}},wR=[B$("AUDUSD","AUD/USD","Forex Majors"),B$("EURUSD","EUR/USD","Forex Majors"),B$("GBPUSD","GBP/USD","Forex Majors"),B$("USDCAD","USD/CAD","Forex Majors"),B$("USDCHF","USD/CHF","Forex Majors"),B$("USDJPY","USD/JPY","Forex Majors",{pipSize:0.01,priceDecimals:3}),B$("AUDCAD","AUD/CAD","Forex Minors"),B$("AUDCHF","AUD/CHF","Forex Minors"),B$("AUDJPY","AUD/JPY","Forex Minors",{pipSize:0.01,priceDecimals:3}),B$("AUDNZD","AUD/NZD","Forex Minors"),B$("EURAUD","EUR/AUD","Forex Minors"),B$("EURCAD","EUR/CAD","Forex Minors"),B$("EURCHF","EUR/CHF","Forex Minors"),B$("EURGBP","EUR/GBP","Forex Minors"),B$("EURJPY","EUR/JPY","Forex Minors",{pipSize:0.01,priceDecimals:3}),B$("EURNZD","EUR/NZD","Forex Minors"),B$("GBPAUD","GBP/AUD","Forex Minors"),B$("GBPCAD","GBP/CAD","Forex Minors"),B$("GBPCHF","GBP/CHF","Forex Minors"),B$("GBPJPY","GBP/JPY","Forex Minors",{pipSize:0.01,priceDecimals:3}),B$("GBPNZD","GBP/NZD","Forex Minors")],MR=[{id:"XAUUSD",displayName:"Gold",kind:"metal",exchange:"OTC",region:"GLOBAL",category:"Metals",pipSize:0.01,priceDecimals:2,contractSize:100,providers:{twelvedata:"XAU/USD",mt5:"XAUUSD"}},{id:"XAGUSD",displayName:"Silver",kind:"metal",exchange:"OTC",region:"GLOBAL",category:"Metals",pipSize:0.001,priceDecimals:3,contractSize:5000,providers:{twelvedata:"XAG/USD"}}];function i$($,v,D=!1){return{id:$,displayName:`${$.slice(0,-3)}/USD`,kind:"crypto",exchange:"CRYPTO",region:"GLOBAL",category:"Crypto",pipSize:D?0.0001:0.01,priceDecimals:D?5:2,contractSize:1,providers:{twelvedata:v}}}var PR=[i$("BTCUSD","BTC/USD"),i$("ETHUSD","ETH/USD"),i$("SOLUSD","SOL/USD"),i$("BNBUSD","BNB/USD"),i$("AVAXUSD","AVAX/USD"),i$("LINKUSD","LINK/USD"),i$("LTCUSD","LTC/USD"),i$("BCHUSD","BCH/USD"),i$("ATOMUSD","ATOM/USD"),i$("DOTUSD","DOT/USD"),i$("XRPUSD","XRP/USD",!0),i$("ADAUSD","ADA/USD",!0),i$("DOGEUSD","DOGE/USD",!0),i$("TRXUSD","TRX/USD",!0),i$("POLUSD","POL/USD",!0)],bR=[{id:"NAS100",displayName:"Nasdaq 100",kind:"index",exchange:"NASDAQ",region:"US",category:"Indices",pipSize:0.01,priceDecimals:2,contractSize:20,providers:{twelvedata:"QQQ"}}],qR=[{id:"USOIL",displayName:"WTI Crude",kind:"commodity",exchange:"NYMEX",region:"US",category:"Commodities",pipSize:0.01,priceDecimals:2,contractSize:1000,providers:{twelvedata:"WTI/USD"}}];function T4($,v,D){return{id:$,displayName:D,kind:"stock",exchange:"NSE",region:"IN",category:"Indian Stocks",pipSize:0.05,priceDecimals:2,contractSize:1,providers:{twelvedata:v}}}var SR=[{id:"NIFTYBEES",displayName:"NIFTY 50 ETF",kind:"index",exchange:"BSE",region:"IN",category:"Indian Indices",pipSize:0.01,priceDecimals:2,contractSize:1,providers:{twelvedata:"NIFTYBEES:BSE"}},{id:"BANKBEES",displayName:"BANK NIFTY ETF",kind:"index",exchange:"BSE",region:"IN",category:"Indian Indices",pipSize:0.01,priceDecimals:2,contractSize:1,providers:{twelvedata:"BANKBEES:BSE"}},T4("RELIANCE","RELIANCE:NSE","Reliance Industries"),T4("TCS","TCS:NSE","Tata Consultancy Services"),T4("HDFCBANK","HDFCBANK:NSE","HDFC Bank"),T4("INFY","INFY:NSE","Infosys"),T4("ICICIBANK","ICICIBANK:NSE","ICICI Bank"),T4("BHARTIARTL","BHARTIARTL:NSE","Bharti Airtel"),T4("LT","LT:NSE","Larsen & Toubro"),T4("SBIN","SBIN:NSE","State Bank of India"),T4("AXISBANK","AXISBANK:NSE","Axis Bank"),T4("KOTAKBANK","KOTAKBANK:NSE","Kotak Mahindra Bank")],TX=Object.freeze([...wR,...MR,...PR,...bR,...qR,...SR]);class M0{byKey;instruments;providerNames;constructor($){this.instruments=Object.freeze([...$]);let v=new Map,D=new Set;for(let X of $){if(m5(v,X.id,X,"id"),X.displayName!==X.id)m5(v,X.displayName,X,"displayName");for(let[U,G]of Object.entries(X.providers))if(D.add(U),m5(v,ZO(U,G),X,"provider"),!v.has(G))v.set(G,X)}this.byKey=v,this.providerNames=D}resolve($){let v=this.byKey.get($);if(v)return v;let D=$.toUpperCase();if(D!==$){let U=this.byKey.get(D);if(U)return U}let X=$.toLowerCase();if(X!==$)return this.byKey.get(X)??null;return null}require($){let v=this.resolve($);if(!v)throw Error(`Unknown instrument: ${JSON.stringify($)}. Add it to INSTRUMENTS env var or check the key you passed in.`);return v}resolveByProvider($,v){return this.byKey.get(ZO($,v))??null}list(){return this.instruments}byKind($){return this.instruments.filter((v)=>v.kind===$)}byExchange($){return this.instruments.filter((v)=>v.exchange===$)}byRegion($){return this.instruments.filter((v)=>v.region===$)}byCategory($){return this.instruments.filter((v)=>v.category===$)}groupByCategory(){let $=new Map;for(let v of this.instruments){let D=$.get(v.category);if(D)D.push(v);else $.set(v.category,[v])}return Array.from($.entries()).map(([v,D])=>({category:v,instruments:D}))}has($){return this.byKey.has($)}stats(){return{instrumentCount:this.instruments.length,providerCount:this.providerNames.size,providers:Array.from(this.providerNames).sort()}}}function ZO($,v){return`${$}:${v}`}function m5($,v,D,X){if(X==="provider"){if($.has(v))throw Error(`Duplicate provider symbol ${JSON.stringify(v)} declared by multiple instruments in INSTRUMENTS`)}else if($.has(v))throw Error(`Duplicate instrument ${X} ${JSON.stringify(v)} in INSTRUMENTS (already mapped to ${$.get(v)?.id}, now also to ${D.id})`);$.set(v,D)}var ER=["forex","metal","crypto","index","commodity","stock","bond"],TR=l.object({kind:l.enum(ER),displayName:l.string().min(1).optional(),exchange:l.string().min(1).optional(),region:l.string().min(1).optional(),category:l.string().min(1).optional(),pipSize:l.number().positive().optional(),priceDecimals:l.number().int().min(0).max(12).optional(),contractSize:l.number().positive().optional(),providers:l.record(l.string().min(1),l.string().min(1))}),up=l.record(l.string().min(1),TR).refine(($)=>Object.keys($).length>0,{message:"INSTRUMENTS must contain at least one entry"});var RR=Object.freeze({AUDUSD:{quote:"https://logo.twelvedata.com/forex/usd.png",base:"https://logo.twelvedata.com/forex/aud.png"},EURUSD:{base:"https://logo.twelvedata.com/forex/eur.png",quote:"https://logo.twelvedata.com/forex/usd.png"},GBPUSD:{quote:"https://logo.twelvedata.com/forex/usd.png",base:"https://logo.twelvedata.com/forex/gbp.png"},USDCAD:{base:"https://logo.twelvedata.com/forex/usd.png",quote:"https://logo.twelvedata.com/forex/cad.png"},USDCHF:{base:"https://logo.twelvedata.com/forex/usd.png",quote:"https://logo.twelvedata.com/forex/chf.png"},USDJPY:{base:"https://logo.twelvedata.com/forex/usd.png",quote:"https://logo.twelvedata.com/forex/jpy.png"},AUDCAD:{base:"https://logo.twelvedata.com/forex/aud.png",quote:"https://logo.twelvedata.com/forex/cad.png"},AUDCHF:{base:"https://logo.twelvedata.com/forex/aud.png",quote:"https://logo.twelvedata.com/forex/chf.png"},AUDJPY:{base:"https://logo.twelvedata.com/forex/aud.png",quote:"https://logo.twelvedata.com/forex/jpy.png"},AUDNZD:{base:"https://logo.twelvedata.com/forex/aud.png",quote:"https://logo.twelvedata.com/forex/nzd.png"},EURAUD:{base:"https://logo.twelvedata.com/forex/eur.png",quote:"https://logo.twelvedata.com/forex/aud.png"},EURCAD:{base:"https://logo.twelvedata.com/forex/eur.png",quote:"https://logo.twelvedata.com/forex/cad.png"},EURCHF:{base:"https://logo.twelvedata.com/forex/eur.png",quote:"https://logo.twelvedata.com/forex/chf.png"},EURGBP:{quote:"https://logo.twelvedata.com/forex/gbp.png",base:"https://logo.twelvedata.com/forex/eur.png"},EURJPY:{base:"https://logo.twelvedata.com/forex/eur.png",quote:"https://logo.twelvedata.com/forex/jpy.png"},EURNZD:{base:"https://logo.twelvedata.com/forex/eur.png",quote:"https://logo.twelvedata.com/forex/nzd.png"},GBPAUD:{base:"https://logo.twelvedata.com/forex/gbp.png",quote:"https://logo.twelvedata.com/forex/aud.png"},GBPCAD:{base:"https://logo.twelvedata.com/forex/gbp.png",quote:"https://logo.twelvedata.com/forex/cad.png"},GBPCHF:{quote:"https://logo.twelvedata.com/forex/chf.png",base:"https://logo.twelvedata.com/forex/gbp.png"},GBPJPY:{base:"https://logo.twelvedata.com/forex/gbp.png",quote:"https://logo.twelvedata.com/forex/jpy.png"},GBPNZD:{base:"https://logo.twelvedata.com/forex/gbp.png",quote:"https://logo.twelvedata.com/forex/nzd.png"},BTCUSD:{base:"https://logo.twelvedata.com/crypto/btc.png",quote:"https://logo.twelvedata.com/crypto/usd.png"},ETHUSD:{quote:"https://logo.twelvedata.com/crypto/usd.png",base:"https://logo.twelvedata.com/crypto/eth.png"},SOLUSD:{quote:"https://logo.twelvedata.com/crypto/usd.png",base:"https://logo.twelvedata.com/crypto/sol.png"},BNBUSD:{quote:"https://logo.twelvedata.com/crypto/usd.png",base:"https://logo.twelvedata.com/crypto/bnb.png"},AVAXUSD:{url:"https://assets.coingecko.com/coins/images/12559/large/Avalanche_Circle_RedWhite_Trans.png"},LINKUSD:{base:"https://logo.twelvedata.com/crypto/link.png",quote:"https://logo.twelvedata.com/crypto/usd.png"},LTCUSD:{base:"https://logo.twelvedata.com/crypto/ltc.png",quote:"https://logo.twelvedata.com/crypto/usd.png"},BCHUSD:{base:"https://logo.twelvedata.com/crypto/bch.png",quote:"https://logo.twelvedata.com/crypto/usd.png"},ATOMUSD:{quote:"https://logo.twelvedata.com/crypto/usd.png",base:"https://logo.twelvedata.com/crypto/atom.png"},TONUSD:{url:"https://assets.coingecko.com/coins/images/17980/large/ton_symbol.png"},DOTUSD:{quote:"https://logo.twelvedata.com/crypto/usd.png",base:"https://logo.twelvedata.com/crypto/dot.png"},XRPUSD:{base:"https://logo.twelvedata.com/crypto/xrp.png",quote:"https://logo.twelvedata.com/crypto/usd.png"},ADAUSD:{quote:"https://logo.twelvedata.com/crypto/usd.png",base:"https://logo.twelvedata.com/crypto/ada.png"},DOGEUSD:{base:"https://logo.twelvedata.com/crypto/doge.png",quote:"https://logo.twelvedata.com/crypto/usd.png"},TRXUSD:{base:"https://logo.twelvedata.com/crypto/trx.png",quote:"https://logo.twelvedata.com/crypto/usd.png"},POLUSD:{url:"https://assets.coingecko.com/coins/images/4713/large/polygon.png"},RELIANCE:{url:"https://api.twelvedata.com/logo/ril.com"},TCS:{url:"https://api.twelvedata.com/logo/tcs.com"},HDFCBANK:{url:"https://api.twelvedata.com/logo/hdfcbank.com"},INFY:{url:"https://api.twelvedata.com/logo/infosys.com"},ICICIBANK:{url:"https://api.twelvedata.com/logo/icicibank.com"},BHARTIARTL:{url:"https://api.twelvedata.com/logo/airtel.in"},LT:{url:"https://api.twelvedata.com/logo/larsentoubro.com"},SBIN:{url:"https://api.twelvedata.com/logo/sbi.co.in"},AXISBANK:{url:"https://api.twelvedata.com/logo/axisbank.com"},KOTAKBANK:{url:"https://api.twelvedata.com/logo/kotak.com"}});function c5($,v){return Number(v.toFixed($.priceDecimals))}var R$="-apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', Roboto, sans-serif",d5=11,r5=15,p5=11,t5=13,OO=12,RX=17,HO=26,FO=0.85,jO=20,AO=8,wO=64,MO=26,f1=18,gX=16,PO=20,bO=300,o5=120,qO=1280,SO=720,kO=2,EO=!0,TO=320,RO=2560,gO=240,CO=1440,uO=1,xO=3,CX={dark:{background:"#0F0F0F",text:"#D9D9D9",mutedText:"#8A8D96",grid:"rgba(242, 242, 242, 0.06)",axisBorder:"#2B2B43",upCandle:"#10b981",downCandle:"#ef4444",markerText:"#F2F2F2",headerText:"#E8E8EA",badgeBg:"rgba(255, 255, 255, 0.08)",badgeText:"#A6AAB4",watermarkText:"#D9D9D9",tagText:"#FFFFFF",entryTag:"#363C4E"},light:{background:"#FFFFFF",text:"#191919",mutedText:"#6A6E78",grid:"rgba(0, 0, 0, 0.06)",axisBorder:"#E0E3EB",upCandle:"#10b981",downCandle:"#ef4444",markerText:"#191919",headerText:"#131722",badgeBg:"rgba(0, 0, 0, 0.06)",badgeText:"#5F6470",watermarkText:"#191919",tagText:"#FFFFFF",entryTag:"#68707F"}},a5=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function fO($,v){if(!Number.isFinite(v))return"0.00000";if(!$)return v.toFixed(5);return c5($,v).toFixed($.priceDecimals)}function _O($,v,D){let X=new Date(v*1000);if(xR($)){if(D===void 0||yR(D,v))return _R(X);return fR(X)}return iR(X)}function xR($){let v=$.trim();if(v.length===0)return!0;if(/^\d*[DWM]$/.test(v))return!1;if(/(d|w|mo|month)/i.test(v))return!1;return!0}function P0($,v,D){let U=`${$>0?"+":""}${$.toFixed(D)}`;if(v===null||!Number.isFinite(v))return U;let G=v>0?"+":"";return`${U} (${G}${v.toFixed(2)}%)`}function fR($){return`${uX($.getUTCHours())}:${uX($.getUTCMinutes())}`}function _R($){return`${uX($.getUTCDate())} ${a5[$.getUTCMonth()]}`}function iR($){return`${uX($.getUTCDate())} ${a5[$.getUTCMonth()]} '${String($.getUTCFullYear()).slice(-2)}`}function yR($,v){let D=new Date($*1000),X=new Date(v*1000);return D.getUTCFullYear()!==X.getUTCFullYear()||D.getUTCMonth()!==X.getUTCMonth()||D.getUTCDate()!==X.getUTCDate()}function uX($){return String($).padStart(2,"0")}var iO="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAACXBIWXMAAAsTAAALEwEAmpwYAAARw0lEQVR4nN1bd1hU17af/BUHYShKmRmGmYGhg7ShM/Q+9F6GIkgNvfeOgDQVkFjBhsZo1Ch2Rb1G7MZoLDHN3HuTl7ybe/Ni/rj3vu+7v/edM8NQBAUdMHnn+9Y3cObM2Wv99m+tvfbae1Mor77ekVOkW1EV6E1UBfoYlUZ/LKfA+E2OxsDvShQYv1FpjEekjgr0RjlFuuU8bHvp9c4yGiNKjkZ/8taNe00hOotKY0YQtlAWcr1LY+nIKdCvv20DZMcO+vi7iurceRm/TJ7uRKUxfnzrSsueDX9brsh0f6nxyxWZbnI0+r/ftrKLJ/R/LZPXcJmd9orqXCqN8dOioK9An6kI5BWZb40J79I0eTPtf2cxfV5eiQm6pi54uibg8kxAU9GSArH8rQBBvzotMC6jMaIXq9fllTRhaLgKkWG+yMuIRm1BIlpr0pEQFwkW24h8ZrmiWJaUCYoa4ZO9vwhD3QQAiiosKChrQpOlA29XO8QEuqIg2R+bWzOwb1MVUpLioaLGlTJlyQCgMR6R1lNpGvxFb0wChqo6B86OthCF+SIl0g31WQE4uq0cw4N14Ns4StiwpC5hQaEq0JuXwvjJ/zWgw+PBy8UGEf72WBPuhIG6GFw8tBYZaUmS52YGzUlxcrCDvq6+rHRrIAAYWyoGEMLVNYMwMBwVZWWoKstHXroIWXEeaM31wrXDDehqzYOKmvacbPB0toY+T0c2esnTz1PkFOhfLAXdiMgfn5CCgf5+7Nm1E/tGduPQhx/g+LEjODAyhLbKTDRkumP8gzyMbK4Gi2O06C5BpdEfU+QUGM8X23illRzk5hehr28DWpoa0dHehg29Pdi6ZRNG9uzE6PGjuHL5Ao7s24yukmCc2CTC0IYicHVNXgBhuSx1U2A8pywF9dOz3kNrSzPKSorR1FCPzo529G/cgG1bNmPv7l04dHA/To4exe3r1zF+cRTrKyMxUOaD3uYM8PRNJSAsjo6Uxe79sIg4VFVVIicnG+Xlpaivq8Ha1mb0dHdicFM/dg3vwMED+0lXOHtqFLdvXseDu+PY2pKEqmQ7NFUkgcUxXDT9KItpPN/GBQUF+UhKTkRWdiYKiwpQUVmOxvo6dLStxcb1PSQL9u3dgyMfHcK5Mydx9U8X8PDze/jy8S205YciQWiJ0vcioUbn/rEA0GDqYXVKKmJjY5GYmIj09HTk5OSgqKgI1VVVaG5qRE9XJwYH+jE8tAMfHTyAM6dHMX7lEu7eHMdXX36Bp/fHkRRsDz9nM8THCMmEava5xe8QAB+/INL48PAIxMfHIzk5mQQhLy8PZWWlqKurQTvJgl4JC3bj+PGj+OTyGD69dQOf37uLv/33Dzh2aARUeXWYmZsj0N/5j8EAQ2M+oqOj4evri5CQEPJvAoSUlBRkZ2ejqKgQ1dWVaG5uRDcRCwb6sZNkwYe4dPE87ty+js8ffIrHD+/jHz//hPSMbPK97q52sLIw+30CQJXQkhjvvX384e3tDS8vLwQGBiI8PBwxMTFISkpCRkYG8vPzUEnEgsZ6rFsnHhF2bNuKgwc+wOmTx3H1k0u4d/cWHn7+Gf783Td4+sUj6BtZke/39XAEnSmJBzJwBYqse9/U3BY+Pj5wdnYmAfD39ydZEBUVhYSEBKSnpSMvPw/lFWWor69FW7vYDba8P0gOiUePHMLYhTO4dXOcBODJowd4/uvfMbh5K/l+JosHB77l74sBVElPqKhx4OruAUeBAAJnZ3h4eJBuEBQUhMjISCQkiINhbm4uSkvFcaBtbSt6e7rIIXF4x3Yc2L8Pp06MYvyTK/js0zt49Og+vv7qCf7r+7/AycVHDLKRCTgc3Rl60F8rQFJk2ftGplZwcnaGja0tHJ0c4ebmBj8/PwQECBEcHIzw8DDEx8UhIz0dBfn5KC0pRk1NFTkk9m1cj+3btmBkz24cPnQQ586cxvVrV/Hg/qd4/Og+fv3lZ2zbvoNsR2kFC4b6RjLJCimyMn6lujYcHBxhbWcDG1sbODk5keLg6Ah/YQA5BG4aHMDxY0dx+eIYbt+8gRvXxnHu7GmM7N2N9zcNYFN/H4a2b8O+kb34+MhHuDR2HnduXSfzgmfffknGA3MrJ7EraPKgrsGRts9k66OpLBZ62uy3A4CRkTns7e1hbWMDO3s7WPP5EAqFaG1twcULp/H44V08uH8HDz67i/uf3cXDR/fx7NnXeP78F/zvv/+JH3/4HufPniEBGB7ajg8P7MeJ0WO4cvmi2BUeimNBbV0j2R5NmQUlFU1pINRk6yE11BJs5sS8gb50AKxQ48LewRGODvawt+HDy8MDjbXVOHVsBKeO70RnezXWpIhId3BxdYGzswDu7m4IDAxAdnYmurvW4cqfLuOXf/wd3337DZkVEsmRODs8jWtXP8G9u7fx/V+/w6VLY1MqR/Q3TooosgDA1MQS3p5u8HRzRFZqInZu7sTWjbVITQyDvZ01LCwsYWHFh429Hdw8PeBLxoUAkiFe3l7w9HRHYKAQFRXlJBA//PUvOHvmFDltPnb0CC6cP0vGAyIWPPv2Kewc3KSzxAkAZn4uGQCqGlwE+LkjOswPDaVp6GsvRGKcENbWVrCzIwKhB7y8PCEMCEB4RAR8/YSwsnGEtq4pGCx9MLUMwNY2hL6hGVaZWUDo74udw0N49s3XOH3yBPaP7MHJ0eO4fPECbty4hp9+/DMys7LEzFPnkAa/CQsobwoAEfjKs2Owvn41St+LhrOTAxydnMUJUFgYIiIikZaWhsioGBivsoHiiomS+HSZMGKlOhf6BqZY19GGL58+wdHDH5EJ0tnTJ3H50hieffMUfRt7yGe1uEZQZ/Beq+dlAoAm2wANxYnYsjYJSTF+cHZxRWhoKFJSkpCamoKMjHRUVlbAxy8YCsqsV75vam+qaXDQ29uD+/fukgnSsaOHce7MKTJFPjF6iHxGg8mDm4fX0gOwXFKcyFwdgeGuNESH+iMwMASZ6WtQXFyI4uIiVFSUobNrHRwEnrP29MvfLw5ydKYO2fvE6LB71zBGj32MG9ev4fLFk1CXTI+9fXykMWFJAFguMd7MzAw7egqQGBsKUXwcykuL0VBfS1Z8WluasG/vXghcfclniWWwhfYQsaBCfDo5e+HK5UvYvXOYLJxcGruAK2MnwNM1Jr/X0TNGYlIi2DqmS8cAFTVttNXnovC9ZORkp6G5sR5trS3o7lxHzvGJoStpdfo0Q15XCOC6uroxeuwomSqfOnECF899DAPDyVIZEWjDwqNmZ9grgKcsTCHxy0qLs9BcU4SinEx0tjWjp6sLgwN9GOjbgLEL59DXt0lK5TeJ0BOu4OcfRgKwZfMgjhz+CKMf7yN7fuI5HV0TpKamwlEgjgcTQJBsJdp/iQ6UhSojEsWht6MOpbmZ6O1oRt+GXmx+fxCbBzfh8KEPcfv2TZiY2U37zZsKMVTuHN4pLpzs24uDH+wCgzm5NqCsyoarqxtWr04FU2uyfqhB54AxMXWeIzOkzM948aetnQAbu5pQXpSP7rY6bOzpJosZhGLbt27F0yeP0NLSIRPqT3MDGgOta9uweXAAQ0PbsWtoEMtnGMTi6JMVqIDA8Gn3LcxNwX5h5rgAAKgS+iirctFQW4j6mgqsba5FT+da9PZ0o79vA/o3rifH66++fAq+3WSWJhPjJe1XVNRgfU83OVdoaqx84XtibiAQuJA5h6GJtfR7VTU2gn1dXx+A5RJDIqMi0Lm2BlVVZWhrqUd7aws62teiq7MDvd3duHl9HAc+OPDaKemrACgoLEZbayuGtg0iQRQtYdl0kM0srMm6Q3hEzLT7Xq6OMDYymT8Ay2es13N5xmhuKENZaTGqq8pQX1uOutoqNNTVorGhDut7u3H3zi0UFpVL6S/rJa28vEI01Nfj/Q3t4FvZzsoytrYROeESiUSw5Auk9y0tLeHsZDd/APT1DaGrayD9PzEhGtWVJcjLyUVJUSFKiwkpQmlpMUqKC7Ghtxu3blyDrzBMqhixL0BWxtNZBigvr0BNdSWaaormZAnBCBtbe7L+KEpIlgJkaWmF4AD3+QNAnUJfXX1TlJfkIC01FZkZacjOykBWZgayszKRlZVB3hvo30gWMy2moK6qzobyCtYbucOEAbYOrigoKERLYyX8/bxn7f0JYXEMyBIcUXozs3Qg79nb2sLHQzB/AOSmSEiQEFnpaxAXH4vkpASsTkokKUYUOOPjRUhMEJE5+/DQVugZWEh/p7xCE1wO742qtxPARccmIDcnF2XFWdLJ1Iv7DiQ7Ulaw4OrqjnhRPDkBI+4F+7rAhm+1cADUGNqIjwtDaGgIQsPCEBUVidiYaISGEvfCEBQUTH7X0NiATf09JFum9o7VKhOwtF5vLX/iHabmdkhLz0RNRSH41hLff8VvjYwtEBkRjpTkZOjorkJKrBAr1dgLB8Dc3Aox0WHiAoZQiKDgYLLEHRAYQE53iYIGQbeSkjJ0r2uBkan5NOUZDA7C/QRQkOQE8y1iTvxenamL2PgklBVkI8hfXBGej7C5hggJCkR0VDRyMuPh4yF2hQUDIBC4QCBwhrm5NRlcPDw8wbe2h6GJOZl+anEMYGxigcTE1ejuaIaNjY3UgAljPQV85CSHQI42mRjNXOqeLUao0nkIDY9CYUE2fL08FuQyKqpseHp6IS05Dk0lcVBeqblwAJRXakFP31Q61hILk3RNHrnfb6bSXt7+qK0pQ4CvJAma8a68ZCFaiqPA5hi8NChO3NfRNSNjTGpqIqwsxaAuBABCZx9fTxStCYIt3xIK0n2JCwFAlUMaPLOBabs1JH/rGVoiI30NkkUh0w2UZmma6CiLxJYWEYJ9BeDzLcHVNpS6BhHYiHzfxMwaoSEhSE2Oh4+nJ+isuVPYWV1H8qmixkZssAAGPB609UyhxTVYOAAr1LlQZ+hMq9TMHXm14Ovnj8yUGOjyZt/BtUKNjY7qeAw2xkDoYgVvdwGiQv3g4+WOAH8fRIQFITDADzY2tmBoTra7EAAIoTO4ELpagcsWT4IMjMyhzTNeOACKKiworWTPWxEdPRPERocjwMtpTnoSZbHmqmQ0VcRBSTKcqahqQYOhDRpR41+gsUQsmaqbuYkhIn35MNabZI7JKkuy6DonAFQFxq+zf0lf8JZYjo4RhJ4C6OnNTTlCEkWBOLSnGqIY/xcCIk2ys3SqkURFiXA3BSUiuE7Xi2h3lZE+RAF8JAQ6gK2lPbkhW4lJrkEwWHpz6M74H4qst8kSBjjbWWGl2uSG6KmgTgRVI2NT7NlajWtnNqKiKBm6eqbzpjxhtIGeHoI8rJEV44QCkTO8Hc2xQlXc5gSoDBYP9vaOc2aNVGK7LFWBfkFWxk8EIVV1LVhbmEJxji0tUxUKEnrj+th2/PPnq7h1aSvaGrKQtjoaaaJQJEf7IiLYA36+roiL9MKaBG9U5gShozgQ7fmeaMz0RLSPJQymUH6qaLH1ydT4pRslqcQBIxkyYKLH1TTYMDY0gqLEt2fr3UkgmOSCyNkjG/Cf387iP7/sxvP7bfj6QiXuHC7B5T25ODaQgP3tYegr80NRrANi/CywylAXNGnhZXqQJuoDRKXoFayqoxCnq2QLwPRcgsvVlYIwO52ZL6SxhVnROLItH1f2rMH5wViMNAegM8cF5QkOSAnkI9LbCj6OZlipJplxSowkYoSyKguqGpw55wzTRIlpRm6XJ4/CyRoAScOEPyqteHWEf3GrvCYMDM0Q5O+OjMQAlGcEoWi1Jynp0QLECK3hZG0CcxMTMugyNLXJxRRlSRx4lfFUGuOh9MAEcbRsMRjwOut2hFvMdW6AGB00mDpgsXnQ4miDweRAjc4RM2zGkPiqdqny9NCZR2bGF8sV3qQ8RoAxMd6/0qj5Aq7AuPLCWcJ3FdU5i3VoavFk4QwTH5pi6cxxZlDDhTha9vYNWzTA/rVMni546dnBZfJ0x//HByfdXmr81DOExNGyt620zESBcYVwccoCr3eIo2VEuvjH7XXGQ6q8RhjlTS85GsOCOGBEpI4kIEtwyuQ1evk5eXxenn5ejsaol1NkmM/HuP8DM+9LH586V+cAAAAASUVORK5CYII=";function yO($){return $.replaceAll("&","&").replaceAll("<","<").replaceAll(">",">").replaceAll('"',""").replaceAll("'","'")}function I$($){return`<line${i1($)} />`}function F$($){return`<rect${i1($)} />`}function p$($,v){return`<text${i1(v)}>${yO($)}</text>`}function nO($){return`<image${i1($)} />`}function lO($,v){let D=$.map((X)=>`${e5(X.x)},${e5(X.y)}`).join(" ");return`<polygon${i1({...v,points:D})} />`}function o($,v={}){if($.length===0)return"";return`<g${i1(v)}>${$}</g>`}function hO($,v,D){return[`<svg xmlns="http://www.w3.org/2000/svg" width="${$}" height="${v}" viewBox="0 0 ${$} ${v}" fill="none">`,D,"</svg>"].join("")}function _1($,v=11){return Math.max(10,Math.round($.length*v*0.58))}function i1($){let v=Object.entries($).filter(([,D])=>D!==void 0&&D!==!1).map(([D,X])=>{if(X===!0)return`${D}="true"`;if(typeof X==="number")return`${D}="${e5(X)}"`;if(typeof X==="string")return`${D}="${yO(X)}"`;return""}).filter((D)=>D.length>0).join(" ");return v.length>0?` ${v}`:""}function e5($){let v=Math.round($*100)/100;return Number.isInteger(v)?String(v):v.toFixed(2)}var xX=16,nR=9,lR=12,hR=8,mR=8;function mO($,v){let D=[],X=$.plotLeft,U=$.instrument?.displayName??$.pair;D.push(p$(U,{x:X,y:xX,fill:v.headerText,"font-size":r5,"font-weight":700,"letter-spacing":0.2,"font-family":R$})),X+=_1(U,r5)+nR;let G=$.timeframe,J=_1(G,p5)+mR*2,Q=xX-RX+4;D.push(F$({x:X,y:Q,width:J,height:RX,rx:4,fill:v.badgeBg})),D.push(p$(G,{x:X+J/2,y:Q+RX/2+0.5,fill:v.badgeText,"font-size":p5,"font-weight":600,"text-anchor":"middle","dominant-baseline":"middle","font-family":R$})),X+=J+lR;let W=$.visibleCandles,z=W[W.length-1].close,Y=W[0].open,I=z-Y,V=Y===0?null:I/Y*100,K=I>=0?v.upCandle:v.downCandle,L=$.formatPrice(z);D.push(p$(L,{x:X,y:xX,fill:K,"font-size":t5,"font-weight":600,"font-family":R$})),X+=_1(L,t5)+hR;let N=$.instrument?.priceDecimals??5;return D.push(p$(P0(I,V,N),{x:X,y:xX,fill:K,"font-size":OO,"font-weight":500,"font-family":R$})),o(D.join(""))}function cO($,v){if(!v)return"";let D=HO;return nO({href:iO,x:$.plotRight-D-8,y:$.plotBottom-D-8,width:D,height:D,opacity:FO})}var cR=["price","priceHigh","priceLow","price1","price2","entry","stop","target"];function rO($,v){let D=$.candles.slice(-$.bars),X=AO,U=jO,G=Math.max(X+1,$.width-wO),J=Math.max(U+1,$.height-MO),Q=G-X,W=J-U,z=Q/Math.max(1,D.length),Y=Math.min(...D.map((a)=>a.low)),I=Math.max(...D.map((a)=>a.high)),V=I-Y,K=V>0?V*0.06:Math.max(Math.abs(I)*0.006,0.000001),L=Y-K,N=I+K,Z=Math.max(N-L,0.000001),F=V>0?Math.max(Z,V/0.6):Z,S=oR($.shapes),g=S.length>0?Math.min(...S):Number.POSITIVE_INFINITY,u=S.length>0?Math.max(...S):Number.NEGATIVE_INFINITY,k=Number.isFinite(g)&&g<L?L-g:0,N$=Number.isFinite(u)&&u>N?u-N:0,j$=Math.max(0,F-Z),g4=k+N$,Q4=L,y$=N;if(g4<=j$)Q4-=k,y$+=N$;else if(k>0&&N$===0)Q4-=Math.min(k,j$);else if(N$>0&&k===0)y$+=Math.min(N$,j$);else if(g4>0){let a=j$/g4;Q4-=k*a,y$+=N$*a}let h1=Math.max(y$-Q4,0.000001),m1=$g(D),c1=D.length-1;function q0(a){return U+(y$-a)/h1*W}function kH(a){if(!Number.isFinite(a))return{y:J,clamped:!0,edge:"bottom"};if(a>y$)return{y:U,clamped:!0,edge:"top"};if(a<Q4)return{y:J,clamped:!0,edge:"bottom"};return{y:q0(a),clamped:!1,edge:null}}function eX(a){return X+(a+0.5)*z}function O7(a){return tR(D,c1,m1,a)}function H7(a){return eX(O7(a))}function F7(a){return c1-a}function EH(a,j7,gH){let A7=eR(a,j7);if(A7!==void 0)return H7(A7);let CH=sR(a,j7)??gH;return eX(F7(CH))}function TH(a=6){return dR(Q4,y$,a)}function RH(a=7){return pR(D.length,a)}return{pair:$.pair,timeframe:$.timeframe,theme:$.theme,width:$.width,height:$.height,plotLeft:X,plotTop:U,plotRight:G,plotBottom:J,plotWidth:Q,plotHeight:W,slot:z,visibleCandles:D,instrument:v,priceRange:{min:Q4,max:y$,candleMin:Y,candleMax:I},averageSpacing:m1,formatPrice(a){return fO(v,a)},priceToY:q0,projectPrice:kH,indexToX:eX,timeToIndex:O7,timeToX:H7,barsBackToIndex:F7,resolveEndpointX:EH,nicePriceTicks:TH,niceTimeTickIndices:RH}}var dO=3;function dR($,v,D=6){let X=vg($,v,D),U=Math.ceil($/X)*X,G=Math.floor(v/X)*X,J=Ug(X),Q=[];if(G>=U){let W=Math.round((G-U)/X);for(let z=0;z<=W;z+=1)Q.push(Number((U+z*X).toFixed(J+2)))}if(Q.length<dO)return rR($,v,dO+2);return Q}function rR($,v,D){if(v<=$||D<2)return[$];let X=[];for(let U=0;U<D;U+=1)X.push($+(v-$)*U/(D-1));return X}function pR($,v=7){if($<=0)return[];if($<=v)return Array.from({length:$},(U,G)=>G);let D=new Set,X=($-1)/Math.max(1,v-1);for(let U=0;U<v;U+=1)D.add(Math.round(U*X));return D.add(0),D.add($-1),Array.from(D).sort((U,G)=>U-G)}function tR($,v,D,X){if($.length===1){let J=$[0].time;return(X-J)/D}let U=$[0],G=$[v];if(X<=U.time)return(X-U.time)/D;if(X>=G.time)return v+(X-G.time)/D;return aR($,v,X)}function oR($){let v=[];for(let D of $){if(D.affectsScale===!1)continue;for(let X of cR){let U=D[X];if(typeof U==="number"&&Number.isFinite(U))v.push(U)}}return v}function aR($,v,D){let X=0,U=v;while(X<=U){let Y=Math.floor((X+U)/2),I=$[Y];if(I.time===D)return Y;if(I.time<D)X=Y+1;else U=Y-1}let G=Math.min(v,X),J=Math.max(0,G-1),Q=$[J],z=$[G].time-Q.time;if(z<=0)return J;return J+(D-Q.time)/z}function eR($,v){if(v==="start")return $.time1??$.entryTime;return $.time2}function sR($,v){if(v==="start")return $.barsBack1;return $.barsBack2}function $g($){if($.length<2)return 1;let v=0,D=0;for(let X=1;X<$.length;X+=1){let U=$[X].time-$[X-1].time;if(U>0)v+=U,D+=1}if(D===0)return 1;return v/D}function vg($,v,D){let U=Math.max(v-$,0.000001)/Math.max(1,D-1),G=Math.floor(Math.log10(U)),J=[G-1,G,G+1],Q=[1,2,2.5,5,10],W=U,z=Number.POSITIVE_INFINITY;for(let Y of J){let I=10**Y;for(let V of Q){let K=V*I,L=Math.ceil($/K),N=Math.floor(v/K),Z=N>=L?N-L+1:1,F=Math.abs(Z-D);if(F<z)z=F,W=K}}return W}function Ug($){let v=0,D=$;while(v<10&&Math.abs(Math.round(D)-D)>0.00000001)D*=10,v+=1;return v}function Z6($){return CX[$]}function pO($,v){let D=Z6($.theme),X=Dg($.nicePriceTicks(),$.formatPrice),U=$.niceTimeTickIndices(),G=[],J=[],Q=$.visibleCandles[$.visibleCandles.length-1],W=$.priceToY(Q.close),z=Q.close>=Q.open?D.upCandle:D.downCandle,Y=$.formatPrice(Q.close);for(let N of X){let Z=$.priceToY(N);G.push(I$({x1:$.plotLeft,y1:Math.round(Z)+0.5,x2:$.plotRight,y2:Math.round(Z)+0.5,stroke:D.grid,"stroke-width":1}));let F=$.formatPrice(N);if(F!==Y)J.push(p$(F,{x:$.width-6,y:Z,fill:D.text,"font-size":d5,"font-family":R$,"text-anchor":"end","dominant-baseline":"middle"}))}for(let N of U){let Z=$.visibleCandles[N];if(!Z)continue;let F=$.indexToX(N),g=(N>0?$.visibleCandles[N-1]:void 0)?.time;G.push(I$({x1:Math.round(F)+0.5,y1:$.plotTop,x2:Math.round(F)+0.5,y2:$.plotBottom,stroke:D.grid,"stroke-width":1})),J.push(p$(_O($.timeframe,Z.time,g),{x:F,y:$.height-8,fill:D.text,"font-size":d5,"font-family":R$,"text-anchor":"middle"}))}J.push(I$({x1:Math.round($.plotRight)+0.5,y1:$.plotTop,x2:Math.round($.plotRight)+0.5,y2:$.plotBottom,stroke:D.axisBorder,"stroke-width":1})),J.push(I$({x1:$.plotLeft,y1:Math.round($.plotBottom)+0.5,x2:$.width,y2:Math.round($.plotBottom)+0.5,stroke:D.axisBorder,"stroke-width":1}));let I=I$({x1:$.plotLeft,y1:Math.round(W)+0.5,x2:$.plotRight,y2:Math.round(W)+0.5,stroke:z,"stroke-width":1,"stroke-dasharray":"4 4"}),V={y:W,label:$.formatPrice(Q.close),fill:z,height:f1},K=mO($,D),L=cO($,v);return{gridSvg:o(G.join(""),{"shape-rendering":"crispEdges"}),axesSvg:J.join(""),lastPriceSvg:I,lastPriceTag:V,headerSvg:K,watermarkSvg:L}}function Dg($,v){let D=new Set,X=[];for(let U of $){let G=v(U);if(!D.has(G))D.add(G),X.push(U)}return X}function tO($){let v=Math.max(1,Math.round($.slot*0.7)),D=[];for(let X=0;X<$.visibleCandles.length;X+=1){let U=$.visibleCandles[X];if(!U)continue;let G=U.close>=U.open?"#10b981":"#ef4444",J=$.indexToX(X),Q=Math.round(J)+0.5,W=$.priceToY(U.high),z=$.priceToY(U.low),Y=$.priceToY(U.open),I=$.priceToY(U.close),V=Math.min(Y,I),K=Math.max(Y,I),L=Math.max(1,Math.round(K-V)),N=Math.round(J-v/2),Z=Math.round(V);D.push(I$({x1:Q,y1:Math.round(W)+0.5,x2:Q,y2:Math.round(z)+0.5,stroke:G,"stroke-width":1})),D.push(F$({x:N,y:Z,width:v,height:L,fill:G}))}return o(D.join(""),{"shape-rendering":"crispEdges"})}function oO($,v){if(v.length===0)return"";let D=Z6($.theme);return Xg(v,$.plotTop+2,$.plotBottom-2).map((U)=>o([F$({x:$.plotRight+1,y:Math.round(U.y-U.height/2),width:$.width-$.plotRight-1,height:U.height,fill:U.fill}),p$(U.label,{x:$.width-6,y:U.y,fill:D.tagText,"font-size":U.height>=f1?11:10,"font-family":R$,"font-weight":600,"text-anchor":"end","dominant-baseline":"middle"})].join(""),{"shape-rendering":"crispEdges"})).join("")}function Xg($,v,D){let X=$.map((J)=>({...J})).sort((J,Q)=>J.y-Q.y);if(X.length===0)return X;for(let J=1;J<X.length;J+=1){let Q=X[J-1],W=X[J],z=Q.y+(Q.height+W.height)/2;if(W.y<z)W.y=z}let U=X[X.length-1];if(U.y>D){U.y=D;for(let J=X.length-2;J>=0;J-=1){let Q=X[J+1],W=X[J],z=Q.y-(Q.height+W.height)/2;if(W.y>z)W.y=z}}let G=X[0];if(G.y<v)G.y=v;return X}function s5($){let v=Qg($.candles);if(v.length===0)throw Error("Cannot render chart: candles is empty");return{pair:$.pair,timeframe:$.timeframe,candles:v,shapes:$.shapes??[],theme:$.theme??"dark",width:aO($.width,qO,TO,RO),height:aO($.height,SO,gO,CO),bars:Gg($.bars??o5),scale:Jg($.scale),watermark:$.watermark??EO,...$.fontFiles?{fontFiles:$.fontFiles}:{}}}function Gg($){if(!Number.isFinite($))return o5;return $7(Math.round($),PO,bO)}function Jg($){if($===void 0||!Number.isFinite($)||$<=0)return kO;return $7($,uO,xO)}function aO($,v,D,X){if($===void 0||!Number.isFinite($)||$<=0)return v;return $7(Math.round($),D,X)}function $7($,v,D){return Math.min(D,Math.max(v,$))}function Qg($){return $.filter((v)=>Number.isFinite(v.time)&&Number.isFinite(v.open)&&Number.isFinite(v.high)&&Number.isFinite(v.low)&&Number.isFinite(v.close)).sort((v,D)=>v.time-D.time)}import{createRequire as Wg}from"node:module";var zg=Wg(import.meta.url);function eO($,v,D,X){let{Resvg:U}=Yg();return new U($,{fitTo:{mode:"width",value:Math.round(v*D)},font:{loadSystemFonts:!0,defaultFontFamily:"Inter",...X?{fontFiles:X}:{}},background:"rgba(0,0,0,0)"}).render().asPng()}function Yg(){try{return zg("@resvg/resvg-js")}catch($){let v=$ instanceof Error?$.message:String($);throw Error(`chart-render: @resvg/resvg-js could not be loaded for PNG rasterization (${v})`)}}var Ig={horizontal_line:"horizontal_line",line:"horizontal_line",hline:"horizontal_line",horizontal:"horizontal_line",horz_line:"horizontal_line",horizontal_ray:"horizontal_ray",hray:"horizontal_ray",horz_ray:"horizontal_ray",horizontalray:"horizontal_ray",h_ray:"horizontal_ray",vertical_line:"vertical_line",vertical:"vertical_line",vline:"vertical_line",vert_line:"vertical_line",vertline:"vertical_line",verticalline:"vertical_line",cross_line:"cross_line",crossline:"cross_line",cross:"cross_line",zone:"zone",horizontal_range:"zone",range:"zone",supply_demand_zone:"zone",rectangle:"rectangle",rect:"rectangle",box:"rectangle",trendline:"trendline",trend:"trendline",trend_line:"trendline",ray:"ray",trend_ray:"ray",right_ray:"right_ray",ray_right:"right_ray",rightray:"right_ray","right-ray":"right_ray",left_ray:"left_ray",ray_left:"left_ray",leftray:"left_ray","left-ray":"left_ray",extended_line:"extended_line",extendedline:"extended_line",extended:"extended_line",extend_line:"extended_line",info_line:"info_line",infoline:"info_line",info:"info_line",trend_angle:"trend_angle",trendangle:"trend_angle",angle:"trend_angle",position:"position",trade:"position",long:"position",short:"position",long_position:"position",short_position:"position"},Vg={horizontal_line:{required:[{field:"price",message:"price is required for horizontal_line"}],describe:($)=>`Drew horizontal line at ${$.price}${$.label?` (${$.label})`:""}`},horizontal_ray:{required:[{field:"price",message:"price is required for horizontal_ray"}],describe:($)=>`Drew horizontal ray at ${$.price}${$.label?` (${$.label})`:""}`},vertical_line:{required:[],describe:($)=>{let v=$.time1??$.time2;return`Drew vertical line${v?` at ${v}`:""}${$.label?` (${$.label})`:""}`}},cross_line:{required:[{field:"price",message:"price is required for cross_line"}],describe:($)=>`Drew cross line at ${$.price}${$.label?` (${$.label})`:""}`},zone:{required:[{field:"priceHigh",message:"priceHigh is required for zone"},{field:"priceLow",message:"priceLow is required for zone"}],describe:($)=>`Drew zone from ${$.priceLow} to ${$.priceHigh}${$.label?` (${$.label})`:""}`},rectangle:{required:[{field:"priceHigh",message:"priceHigh is required for rectangle"},{field:"priceLow",message:"priceLow is required for rectangle"}],describe:($)=>`Drew rectangle from ${$.priceLow} to ${$.priceHigh}${$.label?` (${$.label})`:""}`},trendline:{required:[{field:"price1",message:"price1 is required for trendline"},{field:"price2",message:"price2 is required for trendline"}],describe:($)=>`Drew trendline from ${$.price1} to ${$.price2}${$.label?` (${$.label})`:""}`},ray:{required:[{field:"price1",message:"price1 is required for ray"},{field:"price2",message:"price2 is required for ray"}],describe:($)=>`Drew ray from ${$.price1} to ${$.price2}${$.label?` (${$.label})`:""}`},right_ray:{required:[{field:"price1",message:"price1 is required for right_ray"},{field:"price2",message:"price2 is required for right_ray"}],describe:($)=>`Drew right ray from ${$.price1} to ${$.price2}${$.label?` (${$.label})`:""}`},left_ray:{required:[{field:"price1",message:"price1 is required for left_ray"},{field:"price2",message:"price2 is required for left_ray"}],describe:($)=>`Drew left ray from ${$.price1} to ${$.price2}${$.label?` (${$.label})`:""}`},extended_line:{required:[{field:"price1",message:"price1 is required for extended_line"},{field:"price2",message:"price2 is required for extended_line"}],describe:($)=>`Drew extended line from ${$.price1} to ${$.price2}${$.label?` (${$.label})`:""}`},info_line:{required:[{field:"price1",message:"price1 is required for info_line"},{field:"price2",message:"price2 is required for info_line"}],describe:($)=>`Drew info line from ${$.price1} to ${$.price2}${$.label?` (${$.label})`:""}`},trend_angle:{required:[{field:"price1",message:"price1 is required for trend_angle"},{field:"price2",message:"price2 is required for trend_angle"}],describe:($)=>`Drew trend angle from ${$.price1} to ${$.price2}${$.label?` (${$.label})`:""}`},position:{required:[{field:"direction",message:'direction ("long" or "short") is required for position'},{field:"entry",message:"entry is required for position"},{field:"stop",message:"stop is required for position"},{field:"target",message:"target is required for position"}],describe:($)=>`Drew ${$.direction} position — entry ${$.entry}, stop ${$.stop}, target ${$.target}${$.label?` (${$.label})`:""}`}};var Kg=["horizontal_line","horizontal_ray","vertical_line","cross_line","zone","rectangle","trendline","trend_line","ray","right_ray","left_ray","extended_line","info_line","trend_angle","position"];function b0($){if(typeof $!=="string")return null;let v=$.trim().toLowerCase();return Ig[v]??null}function vH($){return`Unknown shape type: "${String($)}". Supported types: ${Kg.join(", ")}`}function v7($){if(typeof $==="number"&&Number.isFinite($))return $;if(typeof $==="string"){let v=$.trim();if(v.length===0)return;let D=Number(v);if(Number.isFinite(D))return D}return}function Lg($){if(typeof $!=="string")return;let v=$.trim().toLowerCase();if(v==="long"||v==="buy")return"long";if(v==="short"||v==="sell")return"short";return}function t$($,v){for(let D of v){let X=v7($[D]);if(X!==void 0)return X}return}function R4($,v,D){let X=$[v];if(!X||typeof X!=="object"||Array.isArray(X))return;return t$(X,D)}function Bg($){if(typeof $.type!=="string")return null;let v=$.type.trim().toLowerCase();return v.length>0?v:null}function O4($,v,D){if($[v]!==void 0||D===void 0)return;$[v]=D}function U7($,v,D){O4($,v,D===void 0?void 0:Math.trunc(D))}function Ng($,v){if($.direction)return;if(v==="long"||v==="short"){$.direction=v;return}if(v==="long_position"||v==="short_position"){$.direction=v==="long_position"?"long":"short";return}$.direction=Lg($.side)}function Zg($){return t$($,["level","y","value","priceLevel","linePrice"])??R4($,"point1",["price","y","value"])??R4($,"from",["price","y","value"])}function sO($,v){if(v==="start")return t$($,["startPrice","fromPrice","priceA","p1"])??R4($,"point1",["price","y","value"])??R4($,"from",["price","y","value"]);return t$($,["endPrice","toPrice","priceB","p2"])??R4($,"point2",["price","y","value"])??R4($,"to",["price","y","value"])}function $H($,v){if(v==="start")return t$($,["time","startTime","fromTime","timestamp","t1"])??R4($,"point1",["time","t","timestamp"])??R4($,"from",["time","t","timestamp"]);return t$($,["endTime","toTime","t2"])??R4($,"point2",["time","t","timestamp"])??R4($,"to",["time","t","timestamp"])}function Og($){O4($,"price",Zg($)),O4($,"priceHigh",t$($,["high","upper","top","max","priceTop","priceUpper"])),O4($,"priceLow",t$($,["low","lower","bottom","min","priceBottom","priceLower"])),O4($,"price1",sO($,"start")),O4($,"price2",sO($,"end"))}function Hg($){U7($,"time1",$H($,"start")),U7($,"time2",$H($,"end")),O4($,"barsBack1",t$($,["barsBack","barBack","lookback","bars"])),O4($,"barsBack2",t$($,["barsBackEnd","barBackEnd","lookbackEnd"]))}function Fg($){O4($,"entry",t$($,["entryPrice","open","openPrice"])),O4($,"stop",t$($,["stopLoss","sl","stopPrice"])),O4($,"target",t$($,["takeProfit","tp","targetPrice","tpPrice"])),U7($,"entryTime",t$($,["entryTimestamp"]))}function jg($){let v=v7($.priceHigh),D=v7($.priceLow);if(v!==void 0&&D!==void 0&&v<D)$.priceHigh=D,$.priceLow=v}function UH($){if(typeof $!=="object"||$===null||Array.isArray($))return $;let v={...$},D=Bg(v),X=b0(D);if(X)v.type=X;return Ng(v,D),Og(v),Hg(v),Fg(v),jg(v),v}function DH($){return Vg[$].required}var Ag=l.object({type:l.string().describe('Shape type: "horizontal_line", "horizontal_ray", "vertical_line", "cross_line", "zone", "rectangle", "trendline", "ray", "right_ray", "left_ray", "extended_line", "info_line", "trend_angle", or "position"'),price:l.coerce.number().optional().describe("Price level (required for horizontal_line, horizontal_ray, cross_line)"),priceHigh:l.coerce.number().optional().describe("Upper price boundary (required for zone/rectangle)"),priceLow:l.coerce.number().optional().describe("Lower price boundary (required for zone/rectangle)"),price1:l.coerce.number().optional().describe("First point price (required for trendline/ray/right_ray/left_ray/extended_line/info_line/trend_angle)"),price2:l.coerce.number().optional().describe("Second point price (required for trendline/ray/right_ray/left_ray/extended_line/info_line/trend_angle)"),time1:l.number().int().optional().describe("Absolute time (epoch seconds) of the first endpoint for trendline/rays or anchor for vertical_line. PREFERRED over barsBack1."),time2:l.number().int().optional().describe("Absolute time (epoch seconds) of the second endpoint (trendline/rays) or right edge of a zone. PREFERRED over barsBack2."),barsBack1:l.number().optional().describe("FALLBACK only — bars back from the current bar for first endpoint/anchor (trendline, rays, vertical_line). Use time1 when possible."),barsBack2:l.number().optional().describe("FALLBACK only — bars back from the current bar for second endpoint / zone right edge. Use time2 when possible."),direction:l.enum(["long","short"]).optional().describe('Position direction (required for position): "long" or "short"'),entry:l.coerce.number().optional().describe("Entry price (required for position)"),stop:l.coerce.number().optional().describe("Stop-loss price (required for position)"),target:l.coerce.number().optional().describe("Take-profit price (required for position)"),entryTime:l.number().int().optional().describe("Absolute time (epoch seconds) for the position entry anchor. Defaults to the current bar."),label:l.string().optional().describe('Label text, e.g. "Support", "Resistance", "Demand Zone", "Long EURCHF"'),color:l.string().optional().describe('Color hex, e.g. "#22c55e" green, "#ef4444" red, "#3b82f6" blue'),affectsScale:l.boolean().optional().describe("Whether this shape expands the rendered price range (default true). Set false for distant context levels that should stay labelled but not compress the setup.")}).superRefine(($,v)=>{let D=b0($.type);if(!D){v.addIssue({code:"custom",message:vH($.type),path:["type"]});return}for(let X of DH(D))if($[X.field]===void 0)v.addIssue({code:"custom",message:X.message,path:[X.field]})}),XH=l.preprocess(UH,Ag),et=l.object({shapes:l.array(XH).min(1)});function GH($){let v=[],D=[];for(let[X,U]of $.entries()){let G=XH.safeParse(U);if(G.success)v.push(G.data);else D.push({index:X,reason:G.error.issues[0]?.message??"invalid shape"})}return{valid:v,invalid:D}}function $4($,v,D){let X={type:$.type,ok:!0,...D?{reason:D}:{},...$.label?{label:$.label}:{}};return{underlaySvg:v.underlaySvg??"",lineSvg:v.lineSvg??"",positionSvg:v.positionSvg??"",chromeSvg:v.chromeSvg??"",gutterTags:v.gutterTags??[],report:X}}function O$($,v){let D={type:$.type,ok:!1,reason:v,...$.label?{label:$.label}:{}};return{underlaySvg:"",lineSvg:"",positionSvg:"",chromeSvg:"",gutterTags:[],report:D}}function k$($){return typeof $==="number"&&Number.isFinite($)?$:void 0}function o$($,v){return $.color&&$.color.trim().length>0?$.color:v}function z$($,v,D,X){let U=$.projectPrice(D);if(!U.clamped||U.edge===null)return"";let G=Z6($.theme),J=Y$(v,$.plotLeft+10,$.plotRight-10),Q=U.edge==="top"?$.plotTop+4:$.plotBottom-4,W=U.edge==="top"?[{x:J,y:Q},{x:J-5,y:Q+7},{x:J+5,y:Q+7}]:[{x:J,y:Q},{x:J-5,y:Q-7},{x:J+5,y:Q-7}],z=U.edge==="top"?Q+16:Q-10;return o([lO(W,{fill:X}),p$($.formatPrice(D),{x:J,y:z,fill:G.markerText,"font-size":10,"font-family":R$,"text-anchor":"middle"})].join(""))}function D7($,v,D,X,U){let G=_1(D,10)+10;return o([F$({x:$,y:v-10,width:G,height:16,fill:X,"fill-opacity":0.85}),p$(D,{x:$+5,y:v+1,fill:U,"font-size":10,"font-family":R$})].join(""),{"shape-rendering":"crispEdges"})}function H4($,v,D,X,U="start"){return p$(D,{x:$,y:v,fill:X,"font-size":10,"font-family":R$,"text-anchor":U})}function Y$($,v,D){return Math.min(D,Math.max(v,$))}var QH="price out of visible range (clamped)";function X7($,v){if(v.type==="zone")return wg($,v);if(v.type==="rectangle")return Mg($,v);return O$(v,`Unsupported area shape: ${v.type}`)}function wg($,v){let D=WH($,v,"zone");if(D.kind==="error")return D.fragments;let X=o$(v,"#3b82f6"),U=Y$(D.top+12,$.plotTop+12,$.plotBottom-6),G=(D.left+D.right)/2;return $4(v,{underlaySvg:o(F$({x:D.left,y:D.top,width:D.right-D.left,height:D.bottom-D.top,fill:X,"fill-opacity":0.12}),{"shape-rendering":"crispEdges"}),lineSvg:o([I$({x1:D.left,y1:Math.round(D.top)+0.5,x2:D.right,y2:Math.round(D.top)+0.5,stroke:X,"stroke-width":1}),I$({x1:D.left,y1:Math.round(D.bottom)+0.5,x2:D.right,y2:Math.round(D.bottom)+0.5,stroke:X,"stroke-width":1}),v.label?H4(D.left+4,U,v.label,X):"",z$($,G,D.highPrice,X),z$($,G,D.lowPrice,X)].join(""),{"shape-rendering":"crispEdges"})},D.clamped?QH:void 0)}function Mg($,v){let D=WH($,v,"rectangle");if(D.kind==="error")return D.fragments;let X=o$(v,"#f59e0b"),U=Y$(D.top+12,$.plotTop+12,$.plotBottom-6),G=(D.left+D.right)/2;return $4(v,{underlaySvg:o(F$({x:D.left,y:D.top,width:D.right-D.left,height:D.bottom-D.top,fill:X,"fill-opacity":0.12}),{"shape-rendering":"crispEdges"}),lineSvg:o([F$({x:D.left,y:D.top,width:D.right-D.left,height:D.bottom-D.top,fill:"none",stroke:X,"stroke-width":1}),v.label?H4(D.left+4,U,v.label,X):"",z$($,G,D.highPrice,X),z$($,G,D.lowPrice,X)].join(""),{"shape-rendering":"crispEdges"})},D.clamped?QH:void 0)}function WH($,v,D){let X=k$(v.priceHigh),U=k$(v.priceLow);if(X===void 0)return{kind:"error",fragments:O$(v,`priceHigh is required for ${D}`)};if(U===void 0)return{kind:"error",fragments:O$(v,`priceLow is required for ${D}`)};let G=$.projectPrice(X),J=$.projectPrice(U),Q=D==="zone"&&!JH(v)?$.plotLeft:Y$($.resolveEndpointX(v,"start",24),$.plotLeft,$.plotRight),W=D==="zone"&&!JH(v)?$.plotRight:Y$($.resolveEndpointX(v,"end",4),$.plotLeft,$.plotRight),z=Math.min(G.y,J.y),Y=Math.max(G.y,J.y);return{kind:"ok",left:Math.min(Q,W),right:Math.max(Q,W),top:z,bottom:Y,highPrice:X,lowPrice:U,clamped:G.clamped||J.clamped}}function JH($){return $.time1!==void 0||$.time2!==void 0||$.barsBack1!==void 0||$.barsBack2!==void 0}function fX($,v,D){if(Math.abs(D.x-v.x)<0.000001)return v.y;let X=(D.y-v.y)/(D.x-v.x);return v.y+($-v.x)*X}function zH($,v,D){if(Math.abs(v.x-$.x)<0.000001)return{start:{x:$.x,y:$.y},end:{x:$.x,y:v.y}};return{start:{x:$.x,y:$.y},end:{x:D,y:fX(D,$,v)}}}function YH($,v,D){if(Math.abs(v.x-$.x)<0.000001)return{start:{x:$.x,y:$.y},end:{x:$.x,y:v.y}};return{start:{x:$.x,y:$.y},end:{x:D,y:fX(D,$,v)}}}function IH($,v,D,X,U,G){if(Math.abs(v.x-$.x)<0.000001)return{start:{x:$.x,y:U},end:{x:$.x,y:G}};return{start:{x:D,y:fX(D,$,v)},end:{x:X,y:fX(X,$,v)}}}function G7($,v){return{x:($.x+v.x)/2,y:($.y+v.y)/2}}var y1="price out of visible range (clamped)";function J4($,v){switch(v.type){case"horizontal_line":return Pg($,v);case"horizontal_ray":return bg($,v);case"vertical_line":return qg($,v);case"cross_line":return Sg($,v);case"trendline":return kg($,v);case"ray":case"right_ray":return Eg($,v);case"left_ray":return Tg($,v);case"extended_line":return Rg($,v);case"info_line":return gg($,v);case"trend_angle":return Cg($,v);default:return O$(v,`Unsupported line shape: ${v.type}`)}}function Pg($,v){let D=k$(v.price);if(D===void 0)return O$(v,"price is required for horizontal_line");let X=o$(v,"#3b82f6"),U=$.projectPrice(D),G=[I$({x1:$.plotLeft,y1:Math.round(U.y)+0.5,x2:$.plotRight,y2:Math.round(U.y)+0.5,stroke:X,"stroke-width":1}),v.label?H4($.plotLeft+4,Y$(U.y-4,$.plotTop+10,$.plotBottom-4),v.label,X):"",z$($,$.plotRight-12,D,X)].join("");return $4(v,{lineSvg:o(G,{"shape-rendering":"crispEdges"}),gutterTags:[{y:U.y,label:$.formatPrice(D),fill:X,height:f1}]},U.clamped?y1:void 0)}function bg($,v){let D=k$(v.price);if(D===void 0)return O$(v,"price is required for horizontal_ray");let X=o$(v,"#3b82f6"),U=$.projectPrice(D),G=$.resolveEndpointX(v,"start",0),J=Y$(G+4,$.plotLeft+4,$.plotRight-60);return $4(v,{lineSvg:o([I$({x1:Y$(G,$.plotLeft,$.plotRight),y1:Math.round(U.y)+0.5,x2:$.plotRight,y2:Math.round(U.y)+0.5,stroke:X,"stroke-width":1}),v.label?H4(J,Y$(U.y-4,$.plotTop+10,$.plotBottom-4),v.label,X):"",z$($,G,D,X)].join(""),{"shape-rendering":"crispEdges"})},U.clamped?y1:void 0)}function qg($,v){let D=o$(v,"#f59e0b"),X=$.resolveEndpointX(v,"start",0),U=Y$(X,$.plotLeft,$.plotRight);return $4(v,{lineSvg:o([I$({x1:Math.round(U)+0.5,y1:$.plotTop,x2:Math.round(U)+0.5,y2:$.plotBottom,stroke:D,"stroke-width":1,"stroke-dasharray":"4 4"}),v.label?H4(U+4,$.plotTop+12,v.label,D):""].join(""),{"shape-rendering":"crispEdges"})})}function Sg($,v){let D=k$(v.price);if(D===void 0)return O$(v,"price is required for cross_line");let X=o$(v,"#38bdf8"),U=$.projectPrice(D),G=Y$($.resolveEndpointX(v,"start",0),$.plotLeft,$.plotRight);return $4(v,{lineSvg:o([I$({x1:$.plotLeft,y1:Math.round(U.y)+0.5,x2:$.plotRight,y2:Math.round(U.y)+0.5,stroke:X,"stroke-width":1,"stroke-dasharray":"4 4"}),I$({x1:Math.round(G)+0.5,y1:$.plotTop,x2:Math.round(G)+0.5,y2:$.plotBottom,stroke:X,"stroke-width":1,"stroke-dasharray":"4 4"}),v.label?H4(G+4,Y$(U.y-4,$.plotTop+10,$.plotBottom-4),v.label,X):"",z$($,G,D,X)].join(""),{"shape-rendering":"crispEdges"})},U.clamped?y1:void 0)}function kg($,v){let D=n1($,v,"trendline");if(D.kind==="error")return D.fragments;return ug($,v,D.first,D.second,"#f59e0b","4 4")}function Eg($,v){let D=n1($,v,v.type);if(D.kind==="error")return D.fragments;let X=o$(v,"#f59e0b"),U=zH(D.first,D.second,$.plotRight);return _X($,v,U.start,U.end,X,"4 4",[z$($,D.first.x,D.price1,X),z$($,D.second.x,D.price2,X)])}function Tg($,v){let D=n1($,v,"left_ray");if(D.kind==="error")return D.fragments;let X=o$(v,"#f59e0b"),U=YH(D.first,D.second,$.plotLeft);return _X($,v,U.start,U.end,X,"4 4",[z$($,D.first.x,D.price1,X),z$($,D.second.x,D.price2,X)])}function Rg($,v){let D=n1($,v,"extended_line");if(D.kind==="error")return D.fragments;let X=o$(v,"#f59e0b"),U=IH(D.first,D.second,$.plotLeft,$.plotRight,$.plotTop,$.plotBottom);return _X($,v,U.start,U.end,X,"4 4",[z$($,D.first.x,D.price1,X),z$($,D.second.x,D.price2,X)])}function gg($,v){let D=n1($,v,"info_line");if(D.kind==="error")return D.fragments;let X=o$(v,"#22c55e"),U=D.price2-D.price1,G=D.price1===0?null:U/D.price1*100,J=$.instrument?.priceDecimals??5,Q=v.label?`${v.label} · ${P0(U,G,J)}`:P0(U,G,J),W=G7(D.first,D.second);return $4(v,{lineSvg:o([I$({x1:D.first.x,y1:D.first.y,x2:D.second.x,y2:D.second.y,stroke:X,"stroke-width":1}),D7(Y$(W.x-30,$.plotLeft+2,$.plotRight-120),Y$(W.y-6,$.plotTop+12,$.plotBottom-12),Q,X,"#FFFFFF"),z$($,D.first.x,D.price1,X),z$($,D.second.x,D.price2,X)].join(""),{"shape-rendering":"crispEdges"})},D.clamped?y1:void 0)}function Cg($,v){let D=n1($,v,"trend_angle");if(D.kind==="error")return D.fragments;let X=o$(v,"#a855f7"),U=Math.atan2(D.first.y-D.second.y,D.second.x-D.first.x)*180/Math.PI,G=v.label?`${v.label} · ${U.toFixed(1)}°`:`${U.toFixed(1)}°`,J=G7(D.first,D.second);return $4(v,{lineSvg:o([I$({x1:D.first.x,y1:D.first.y,x2:D.second.x,y2:D.second.y,stroke:X,"stroke-width":1}),D7(Y$(J.x-26,$.plotLeft+2,$.plotRight-100),Y$(J.y-6,$.plotTop+12,$.plotBottom-12),G,X,"#FFFFFF"),z$($,D.first.x,D.price1,X),z$($,D.second.x,D.price2,X)].join(""),{"shape-rendering":"crispEdges"})},D.clamped?y1:void 0)}function ug($,v,D,X,U,G){let J=o$(v,U);return _X($,v,D,X,J,G,[z$($,D.x,k$(v.price1)??0,J),z$($,X.x,k$(v.price2)??0,J)])}function _X($,v,D,X,U,G,J){let Q=Y$(X.x+4,$.plotLeft+4,$.plotRight-70),W=Y$(X.y-4,$.plotTop+12,$.plotBottom-4),z=k$(v.price1),Y=k$(v.price2),I=z!==void 0&&$.projectPrice(z).clamped||Y!==void 0&&$.projectPrice(Y).clamped;return $4(v,{lineSvg:o([I$({x1:D.x,y1:D.y,x2:X.x,y2:X.y,stroke:U,"stroke-width":1,...G?{"stroke-dasharray":G}:{}}),v.label?H4(Q,W,v.label,U):"",...J].join(""),{"shape-rendering":"crispEdges"})},I?y1:void 0)}function n1($,v,D){let X=k$(v.price1),U=k$(v.price2);if(X===void 0)return{kind:"error",fragments:O$(v,`price1 is required for ${D}`)};if(U===void 0)return{kind:"error",fragments:O$(v,`price2 is required for ${D}`)};let G=$.projectPrice(X),J=$.projectPrice(U),Q={x:Y$($.resolveEndpointX(v,"start",50),$.plotLeft,$.plotRight),y:G.y},W={x:Y$($.resolveEndpointX(v,"end",0),$.plotLeft,$.plotRight),y:J.y};return{kind:"ok",first:Q,second:W,price1:X,price2:U,clamped:G.clamped||J.clamped}}var xg="price out of visible range (clamped)";function VH($,v){if(v.direction!=="long"&&v.direction!=="short")return O$(v,'direction ("long" or "short") is required for position');let D=k$(v.entry),X=k$(v.stop),U=k$(v.target);if(D===void 0)return O$(v,"entry is required for position");if(X===void 0)return O$(v,"stop is required for position");if(U===void 0)return O$(v,"target is required for position");let G=Z6($.theme),J=Y$($.resolveEndpointX(v,"start",0),$.plotLeft,$.plotRight),Q=$.projectPrice(D),W=$.projectPrice(X),z=$.projectPrice(U),Y=Math.min(Q.y,z.y),I=Math.max(Q.y,z.y),V=Math.min(Q.y,W.y),K=Math.max(Q.y,W.y),L=Y$(Math.min(Y,V)+12,$.plotTop+12,$.plotBottom-8),N=Q.clamped||W.clamped||z.clamped;return $4(v,{positionSvg:o([F$({x:J,y:Y,width:$.plotRight-J,height:I-Y,fill:"#10b981","fill-opacity":0.12}),F$({x:J,y:V,width:$.plotRight-J,height:K-V,fill:"#ef4444","fill-opacity":0.12}),I$({x1:J,y1:Math.round(Q.y)+0.5,x2:$.plotRight,y2:Math.round(Q.y)+0.5,stroke:G.entryTag,"stroke-width":1}),I$({x1:J,y1:Math.round(W.y)+0.5,x2:$.plotRight,y2:Math.round(W.y)+0.5,stroke:"#ef4444","stroke-width":1}),I$({x1:J,y1:Math.round(z.y)+0.5,x2:$.plotRight,y2:Math.round(z.y)+0.5,stroke:"#10b981","stroke-width":1}),v.label?H4(J+4,L,v.label,G.text):"",z$($,J,D,G.entryTag),z$($,J,X,"#ef4444"),z$($,J,U,"#10b981")].join(""),{"shape-rendering":"crispEdges"}),gutterTags:[{y:Q.y,label:`Entry ${$.formatPrice(D)}`,fill:G.entryTag,height:gX},{y:W.y,label:`SL ${$.formatPrice(X)}`,fill:"#ef4444",height:gX},{y:z.y,label:`TP ${$.formatPrice(U)}`,fill:"#10b981",height:gX}]},N?xg:void 0)}var fg={horizontal_line:J4,horizontal_ray:J4,vertical_line:J4,cross_line:J4,zone:X7,rectangle:X7,trendline:J4,ray:J4,right_ray:J4,left_ray:J4,extended_line:J4,info_line:J4,trend_angle:J4,position:VH};function KH($,v){let D=[],X=[],U=[],G=[],J=[],Q=[],W=0,z=0;for(let Y of v){let I=_g($,Y);if(D.push(I.underlaySvg),X.push(I.lineSvg),U.push(I.positionSvg),G.push(I.chromeSvg),J.push(...I.gutterTags),Q.push(I.report),I.report.ok)W+=1;else z+=1}return{underlaySvg:D.join(""),lineSvg:X.join(""),positionSvg:U.join(""),chromeSvg:G.join(""),gutterTags:J,reports:Q,drawn:W,skipped:z}}function _g($,v){let D=b0(v.type);if(!D)return O$(v,`Unknown shape type: ${String(v.type)}`);let X=fg[D];if(!X)return O$(v,`Unsupported shape type: ${D}`);let U=D===v.type?v:{...v,type:D};return X($,U)}var J7;function LH($){let v=s5($),D=ig(v.pair),X=rO(v,D),U=CX[v.theme],G=KH(X,v.shapes),J=pO(X,v.watermark),Q=`plot-clip-${lg(X)}`,W=`<defs><clipPath id="${Q}">${F$({x:X.plotLeft,y:X.plotTop,width:X.plotWidth,height:X.plotHeight})}</clipPath></defs>`,z={"clip-path":`url(#${Q})`},Y=o(J.gridSvg,z),I=o(G.underlaySvg,z),V=o(tO(X),z),K=o(G.lineSvg,z),L=o(G.positionSvg,z),N=oO(X,[...G.gutterTags,J.lastPriceTag]);return{svg:hO(X.width,X.height,[F$({x:0,y:0,width:X.width,height:X.height,fill:U.background}),W,Y,I,V,K,L,J.axesSvg,G.chromeSvg,J.lastPriceSvg,N,J.headerSvg,J.watermarkSvg,ng()].join("")),width:X.width,height:X.height,drawn:G.drawn,skipped:G.skipped,shapes:G.reports,priceRange:{min:X.priceRange.min,max:X.priceRange.max}}}function Q7($){let v=LH($),D=s5($);return{...v,png:eO(v.svg,v.width,D.scale,D.fontFiles)}}function ig($){return yg().resolve($)}function yg(){if(J7===void 0)J7=new M0([...TX]);return J7}function ng(){return`<style>text{font-family:${R$};white-space:pre}</style>`}function lg($){let v=$.visibleCandles,D=v[0]?.time??0,X=v[v.length-1]?.time??0,U=`${$.pair}|${$.timeframe}|${$.width}x${$.height}|${v.length}|${D}|${X}`,G=2166136261;for(let J=0;J<U.length;J+=1)G^=U.charCodeAt(J),G=Math.imul(G,16777619);return(G>>>0).toString(36)}var BH=120,W7=20,z7=200,hg=4800;function mg($,v,D){return Math.max(v,Math.min(D,$))}var cg="Render an annotated candlestick chart image (PNG) for a pair + timeframe and optional market-data sourceId. Fetches recent candles and draws optional shapes (support/resistance lines, zones, trendlines, a long/short position) using the same vocabulary as draw_chart_shape. Returns the chart as an image plus a text summary. PREFER absolute time anchors (time1/time2/entryTime, epoch seconds from get_candles) over barsBack*.",dg="Optional annotations. Each item is {type, ...}: horizontal_line/horizontal_ray/cross_line need `price`; zone/rectangle need `priceHigh`+`priceLow`; trendline/ray/right_ray/left_ray/extended_line/info_line/trend_angle need `price1`+`price2` (prefer `time1`+`time2` epoch seconds); position needs `direction` (long/short)+`entry`+`stop`+`target`. Optional `label`, `color` (hex), and `affectsScale` (false keeps a distant contextual level labelled without compressing the active setup).",iX=[E({name:"render_chart",description:cg,inputSchema:{type:"object",properties:{pair:{type:"string",description:"Canonical instrument id, e.g. EURUSD (case-insensitive)"},timeframe:{type:"string",description:"e.g. 1m, 5m, 15m, 30m, 1h, 4h, 1d (or an integer multiple)"},sourceId:{type:"string",pattern:"^[a-z][a-z0-9-]{0,62}$",description:"Market-data source from get_market_config, e.g. mt5-primary. Omit for Twelve Data."},shapes:{type:"array",description:dg,items:{type:"object"}},bars:{type:"integer",minimum:W7,maximum:z7,description:`Most-recent candles to show (${W7}-${z7}, default ${BH})`},offset:{type:"integer",minimum:0,maximum:hg,description:"Candle page offset: 0 is the latest page; larger offsets walk backward through history. Pair with bars to frame a historical setup."},theme:{type:"string",enum:["dark","light"],description:"Color theme (default dark)"},width:{type:"integer",minimum:320,maximum:2560,description:"Image width in px (320-2560, default 1280)"},height:{type:"integer",minimum:240,maximum:1440,description:"Image height in px (240-1440, default 720)"}},required:["pair","timeframe"],additionalProperties:!1},handler:async($,v)=>{await T(v);let D=mg($.bars??BH,W7,z7),{candles:X}=await qX(v.trpc,{pair:$.pair,timeframe:$.timeframe,limit:D,...$.offset===void 0?{}:{offset:$.offset},...$.sourceId?{sourceId:$.sourceId}:{}});if(X.length===0)throw Error(`No candles available for ${$.pair} ${$.timeframe}. Check the pair/timeframe with get_market_config.`);let{valid:U,invalid:G}=GH($.shapes??[]),J=Q7({pair:$.pair,timeframe:$.timeframe,candles:X,shapes:U,bars:D,...$.theme?{theme:$.theme}:{},...$.width?{width:$.width}:{},...$.height?{height:$.height}:{}}),Q=J.shapes.filter((I)=>!I.ok),W=[...G.map((I)=>`shape ${I.index}: ${I.reason}`),...Q.map((I)=>`${I.type}: ${I.reason??"undrawable"}`)],z=W.length>0?` (${W.length} skipped)
|
|
107
107
|
Skipped: ${W.join("; ")}`:"",Y=`Rendered ${$.pair} ${$.timeframe} — ${X.length} candles, drew ${J.drawn} shape${J.drawn===1?"":"s"}. Price range ${J.priceRange.min}–${J.priceRange.max}.${z}`;return{content:[{type:"image",data:Buffer.from(J.png).toString("base64"),mimeType:"image/png"},{type:"text",text:Y}]}}})];async function yX($){try{return{ok:!0,value:await $}}catch(v){return{ok:!1,error:v instanceof Error?v.message:String(v)}}}function rg($){return/unauthor|forbidden|401|403|sign[ -]?in|token|credential/i.test($)}var pg="The Aether Wealth backend is unreachable right now. Try again shortly.",tg=_5.flatMap(($)=>$.dashboardOnly.map((v)=>`${$.name}: ${v}`)),nX=[E({name:"get_context",description:"Snapshot the user's live Aether Wealth state in one call — accounts, open trades, recent performance stats, and active alerts — plus the map of dashboard-only actions. Call this first to ground suggestions in what the user is actually doing. Requires sign-in.",inputSchema:{type:"object",properties:{},additionalProperties:!1},handler:async($,v)=>{await T(v);let D=await Promise.all([yX(v.trpc.trading.accounts.list.query()),yX(v.trpc.trading.trades.list.query({status:"OPEN",limit:200})),yX(v.trpc.trading.analytics.stats.query({})),yX(v.trpc.alerts.list.query({}))]);if(D.every((W)=>!W.ok)){let W=D.every((z)=>!z.ok&&rg(z.error));throw Error(W?l5:pg)}let[X,U,G,J]=D,Q=(W)=>W.ok?W.value:{error:W.error};return{accounts:Q(X),openTrades:Q(U),stats:Q(G),alerts:Q(J),dashboard:{url:f4,dashboardOnly:tg,note:`These actions are not available over MCP. When the user needs one, suggest they open the dashboard at ${f4}.`}}}})];function og(){return{url:process.env.AETHER_APP_PUSH_URL?.trim()||"http://127.0.0.1:9003",secret:process.env.AI_LIVE_PUSH_SECRET?.trim()||void 0}}async function u6($,v,D){let{url:X,secret:U}=og(),G=`${X.replace(/\/$/,"")}/api/ai/live/push`,J;try{J=await fetch(G,{method:"POST",headers:{"content-type":"application/json",...U?{"x-live-push-secret":U}:{}},body:JSON.stringify({userId:$,tool:v,args:D})})}catch(z){throw Error(`Could not reach the Aether Wealth app at ${G}. Is the dashboard running?`,{cause:z})}if(!J.ok)throw Error(`Live-chart push rejected (HTTP ${J.status}).`);let Q=await J.json().catch(()=>({})),W=typeof Q.delivered==="number"?Q.delivered:0;return{ok:!0,tool:v,delivered:W,message:W>0?`Dispatched to ${W} open chart tab(s).`:"Dispatched, but no open Aether Wealth chart tab is listening — open the dashboard in your browser, then retry."}}function Y7($){let v=NH($),D=eg(v?.approvalMethod);return{content:[{type:"text",text:[`Pending broker intent created with approval method: ${v?.approvalMethod??"unknown"}.`,D,"Use trade_intent_status to check whether it was approved, executed, expired, cancelled, or failed.","",JSON.stringify($,null,2)].join(`
|
|
108
|
-
`)}]}}function ag($){return NH($)?.approvalMethod==="push"}function eg($){if($==="email_otp")return"Ask the user for the emailed confirmation code, then call execute_trade with this intentId and code. Never guess or fabricate the code.";if($==="app_otp")return"Ask the user for the current authenticator app code, then call execute_trade with this intentId and code. Never guess or fabricate the code.";if($==="push")return"Do NOT ask the user for a code. This action executes only when the user taps Approve in the Aether Wealth app.";if($==="auto")return"No code is required. Call execute_trade with this intentId to execute the action.";return"Inspect the returned proposal before taking the next step."}function NH($){if(typeof $!=="object"||$===null)return null;let v=$.proposal;if(typeof v!=="object"||v===null)return null;return v}var lX=[E({name:"get_broker_account",description:"Get the LIVE broker account balance, equity, currency, and connection status for a connected trading account (distinct from list_accounts which lists journal accounts). Requires sign-in.",inputSchema:{type:"object",properties:{accountId:{type:"string"}},required:["accountId"],additionalProperties:!1},handler:async($,v)=>{return await T(v),mZ(v.trpc,$)}}),E({name:"list_broker_positions",description:"List open broker positions with P&L. Requires sign-in.",inputSchema:{type:"object",properties:{accountId:{type:"string"}},required:["accountId"],additionalProperties:!1},handler:async($,v)=>{return await T(v),cZ(v.trpc,$)}}),E({name:"get_broker_quote",description:"Get the current broker-native bid and ask for a symbol through the connected execution account. For an MT5 executor connection, this reads the live tick from its VPS and rejects stale ticks. Requires sign-in.",inputSchema:{type:"object",properties:{accountId:{type:"string"},symbol:{type:"string",minLength:1,maxLength:10}},required:["accountId","symbol"],additionalProperties:!1},handler:async($,v)=>{return await T(v),dZ(v.trpc,$)}}),E({name:"connect_broker",description:"Attach a live execution provider to a journal account. For MetaApi, provide its account id and region. For `mt5_executor`, provide the expected MT5 login as `providerAccountRef` and its `baseUrl` under `*.aetherwealth.ai`. `providerToken` is sensitive — never expose or log it.",inputSchema:{type:"object",properties:{accountId:{type:"string"},provider:{type:"string",enum:["metaapi","mt5_executor"],description:"Defaults to 'metaapi' when omitted."},region:{type:"string",enum:["new-york","london"]},baseUrl:{type:"string",description:"Required for `mt5_executor`; the executor's HTTPS origin under `*.aetherwealth.ai`."},providerAccountRef:{type:"string",description:"The MetaApi account id, or the expected numeric MT5 login for `mt5_executor`."},providerToken:{type:"string",description:"The provider token. For `mt5_executor`, use its service bearer token. Sensitive — never expose or log it."},approvalMode:{type:"string",enum:["app_otp","email_otp"],description:"Confirmation mode. 'auto' is not selectable here; 'push' is also set later via set_broker_approval_mode because it requires an active app push subscription."}},required:["accountId","providerAccountRef","providerToken"],additionalProperties:!1},handler:async($,v)=>{return await T(v),yZ(v.trpc,$)}}),E({name:"broker_connection_status",description:"Get the current live broker connection status. Requires sign-in.",inputSchema:{type:"object",properties:{accountId:{type:"string"}},required:["accountId"],additionalProperties:!1},handler:async($,v)=>{return await T(v),nZ(v.trpc,$)}}),E({name:"disconnect_broker",description:"Disarm broker trading for a connected account instantly. Cancels pending intents, keeps executed history, and does not require confirmation because it is the kill switch. Reconnect later with connect_broker. Requires sign-in.",inputSchema:{type:"object",properties:{accountId:{type:"string"}},required:["accountId"],additionalProperties:!1},handler:async($,v)=>{return await T(v),lZ(v.trpc,$)}}),E({name:"set_broker_approval_mode",description:"Change how broker trades are confirmed for a connection between `app_otp` (authenticator), `email_otp`, and `push` (tap-to-approve in the Aether Wealth app; requires an active push subscription). The agent cannot enable `auto` here.",inputSchema:{type:"object",properties:{accountId:{type:"string"},approvalMode:{type:"string",enum:["app_otp","email_otp","push"]}},required:["accountId","approvalMode"],additionalProperties:!1},handler:async($,v)=>{return await T(v),hZ(v.trpc,$)}}),E({name:"propose_trade",description:"Size and PROPOSE a broker trade (does not place it). Provide exactly one of riskPercent or riskAmount; entryPrice is required for limit/stop. Returns the intent id and confirmation method. Push-mode intents are sent to the user's device and must not be executed by the agent. Requires sign-in.",inputSchema:{type:"object",properties:{accountId:{type:"string"},symbol:{type:"string"},direction:{type:"string",enum:["BUY","SELL"]},orderType:{type:"string",enum:["market","limit","stop"]},entryPrice:{type:"number"},stopLoss:{type:"number"},takeProfit:{type:"number"},riskPercent:{type:"number"},riskAmount:{type:"number"}},required:["accountId","symbol","direction","stopLoss"],additionalProperties:!1},handler:async($,v)=>{await T(v);let D=await rZ(v.trpc,$);return ag(D)?Y7(D):D}}),E({name:"execute_trade",description:"Place a previously proposed trade. Email/app modes require the user-provided code; auto mode requires no per-trade code. Push intents cannot be executed by the agent. NEVER guess or fabricate a code.",inputSchema:{type:"object",properties:{intentId:{type:"string"},code:{type:"string"}},required:["intentId"],additionalProperties:!1},handler:async($,v)=>{return await T(v),pZ(v.trpc,$)}}),E({name:"trade_intent_status",description:"Check whether a proposed trade was approved, executed, expired, cancelled, or failed. Especially useful for push-mode intents, which the user approves on their device.",inputSchema:{type:"object",properties:{intentId:{type:"string"}},required:["intentId"],additionalProperties:!1},handler:async($,v)=>{return await T(v),oZ(v.trpc,$)}}),E({name:"cancel_trade_intent",description:"Cancel a previously proposed broker trade. Requires sign-in.",inputSchema:{type:"object",properties:{intentId:{type:"string"}},required:["intentId"],additionalProperties:!1},handler:async($,v)=>{return await T(v),tZ(v.trpc,$)}}),E({name:"close_position",description:"Propose closing an open broker position fully, or partially by passing `volume`. This does not close immediately; it returns a pending confirmation intent. For email_otp/app_otp ask the user for the code and call execute_trade. For push, do not ask for a code — the user taps Approve in the app.",inputSchema:{type:"object",properties:{accountId:{type:"string"},positionId:{type:"string"},volume:{type:"number"}},required:["accountId","positionId"],additionalProperties:!1},handler:async($,v)=>{return await T(v),Y7(await aZ(v.trpc,$))}}),E({name:"modify_position",description:"Propose adjusting stop-loss / take-profit on an open position. Stop-loss changes that INCREASE risk are rejected (use the app). Pass null to clear a level. This returns a pending confirmation intent; for email_otp/app_otp ask for the code and call execute_trade, while push is approved in the app.",inputSchema:{type:"object",properties:{accountId:{type:"string"},positionId:{type:"string"},stopLoss:{type:["number","null"]},takeProfit:{type:["number","null"]}},required:["accountId","positionId"],additionalProperties:!1},handler:async($,v)=>{return await T(v),Y7(await eZ(v.trpc,$))}})],hX=[E({name:"draw_trade_on_chart",description:"Draw a proposed/open trade (entry, stop, target) on the user's OPEN Aether Wealth chart as a position shape. Switch to the intended pair/timeframe first with chart_select_pair.",inputSchema:{type:"object",properties:{direction:{type:"string",enum:["long","short"]},entry:{type:"number"},stopLoss:{type:"number"},takeProfit:{type:"number"},label:{type:"string"}},required:["direction","entry","stopLoss"],additionalProperties:!1},handler:async($,v)=>{await T(v);let D=await v.session.getUserId();return u6(D,"draw_chart_shape",{shapes:[{type:"position",direction:$.direction,entry:$.entry,stop:$.stopLoss,...$.takeProfit===void 0?{}:{target:$.takeProfit},...$.label===void 0?{}:{label:$.label}}]})}})];var sg=["news","press_release"];function $C($){return{pair:$.pair,...$.limit===void 0?{}:{limit:$.limit}}}function vC($){return{currency:$.currency,...$.limit===void 0?{}:{limit:$.limit}}}function UC($){return{currency:$.currency,...$.indicator===void 0?{}:{indicator:$.indicator},...$.limit===void 0?{}:{limit:$.limit}}}function DC($){return{...$.limit===void 0?{}:{limit:$.limit}}}function XC($){return{currency:$.currency,...$.documentType===void 0?{}:{documentType:$.documentType},...$.limit===void 0?{}:{limit:$.limit}}}var mX={type:"integer",minimum:1,maximum:250,description:"Max rows to return (1-250, default 120)."},cX=[E({name:"get_fx_pair_context",description:"Macro context for a currency PAIR (e.g. EURUSD) — the per-currency macro state for both legs (recent releases, surprises, derived trend). Use for a pair-level macro read; for one currency use get_fx_currency_context. Distinct from get_macro_series (raw calendar history) and get_macro_indicator (one curated series).",inputSchema:{type:"object",properties:{pair:{type:"string",description:"6-letter currency pair, e.g. EURUSD (case-insensitive)"},limit:mX},required:["pair"],additionalProperties:!1},handler:async($,v)=>{return await T(v),v.trpc.fxMacroData.pairContext.query($C($))}}),E({name:"get_fx_currency_context",description:"Macro context for a single CURRENCY (e.g. USD) — recent economic releases, surprises, and the derived macro state for that currency.",inputSchema:{type:"object",properties:{currency:{type:"string",description:"ISO currency code, e.g. USD (case-insensitive)"},limit:mX},required:["currency"],additionalProperties:!1},handler:async($,v)=>{return await T(v),v.trpc.fxMacroData.currencyContext.query(vC($))}}),E({name:"get_fx_predictions",description:"Model forecasts / predictions for a currency's upcoming macro releases. Optionally filter to one indicator by release slug (e.g. cpi).",inputSchema:{type:"object",properties:{currency:{type:"string",description:"ISO currency code, e.g. USD (case-insensitive)"},indicator:{type:"string",description:"Optional release slug filter, e.g. cpi"},limit:mX},required:["currency"],additionalProperties:!1},handler:async($,v)=>{return await T(v),v.trpc.fxMacroData.predictions.query(UC($))}}),E({name:"get_fx_risk_sentiment",description:"Cross-market risk-on / risk-off sentiment series (not currency-scoped). Use to gauge broad market risk appetite.",inputSchema:{type:"object",properties:{limit:mX},additionalProperties:!1},handler:async($,v)=>{return await T(v),v.trpc.fxMacroData.riskSentiment.query(DC($))}}),E({name:"get_fx_documents",description:"Source documents behind the FX macro data for a currency — news items and press releases. Filter by documentType.",inputSchema:{type:"object",properties:{currency:{type:"string",description:"ISO currency code, e.g. USD (case-insensitive)"},documentType:{type:"string",enum:[...sg],description:"Optional filter: news or press_release"},limit:{type:"integer",minimum:1,maximum:100,description:"Max rows to return (1-100, default 50)."}},required:["currency"],additionalProperties:!1},handler:async($,v)=>{return await T(v),v.trpc.fxMacroData.documents.query(XC($))}}),E({name:"get_fx_sync_state",description:"Ingestion/sync status of the FX macro datasets (per dataset family: status, freshness, last success, next refresh). Diagnostic — check data freshness before relying on the other get_fx_* tools.",inputSchema:{type:"object",properties:{},additionalProperties:!1},handler:async($,v)=>{return await T(v),v.trpc.fxMacroData.syncState.query()}})];var GC="momentum: rsi, macd, stoch, stochf, stochrsi, cci, cmo, mom, roc, rocr, willr, mfi, ultosc, ppo, apo, bop, aroon, aroonosc; trend: adx, adxr, dx, plus_di, minus_di, plus_dm, minus_dm, sar, supertrend; moving averages: sma, ema, wma, dema, tema, trima, kama, t3ma, mama, vwap, midpoint, midprice; bands: bbands, keltner, percent_b; volatility: atr, natr, trange; volume: obv, ad, adosc; stats: linearreg, linearregslope, linearregangle, linearregintercept, stddev, var, tsf",dX=[E({name:"get_indicators",description:"Compute Twelve Data technical indicators for a pair + timeframe (requires sign-in). "+`Pass up to 8 indicators by name; params are optional and default sensibly. Names — ${GC}. Bad names/params return an error listing valid options. At most 2 distinct pairs per user at a time.`,inputSchema:{type:"object",properties:{pair:{type:"string",description:"Canonical id, e.g. EURUSD, XAUUSD, BTCUSD (case-insensitive)"},interval:{type:"string",description:"One of 1m, 5m, 15m, 30m, 45m, 1h, 2h, 4h, 1d"},indicators:{type:"array",minItems:1,maxItems:8,description:"Up to 8 indicators to compute on the pair",items:{type:"object",properties:{name:{type:"string",description:"Indicator name, e.g. rsi, macd, ema, bbands, atr, adx"},params:{type:"object",description:'Optional params, e.g. {"time_period": 14} or MACD {"fast_period":12,"slow_period":26}. Defaults applied when omitted.'}},required:["name"],additionalProperties:!1}},outputsize:{type:"integer",minimum:1,maximum:500,description:"Bars to return per indicator (default 30)"}},required:["pair","interval","indicators"],additionalProperties:!1},handler:async($,v)=>{return await T(v),sZ(v.trpc,$)}})];var JC=["horizontal_line","horizontal_ray","vertical_line","cross_line","zone","rectangle","trendline","ray","right_ray","left_ray","extended_line","info_line","trend_angle","position"],rX=[E({name:"chart_select_pair",description:"Switch the user's open Aether Wealth chart to a trading pair. Use the canonical id (case-insensitive), e.g. XAUUSD for gold, EURUSD, BTCUSD. Drives the live browser chart, not backend state.",inputSchema:{type:"object",properties:{pair:{type:"string",description:"Canonical pair id, e.g. XAUUSD (gold), EURUSD, BTCUSD"}},required:["pair"],additionalProperties:!1},handler:async($,v)=>{await T(v);let D=await v.session.getUserId();return u6(D,"select_pair",{pair:$.pair})}}),E({name:"chart_change_timeframe",description:"Change the timeframe/resolution of the user's open Aether Wealth chart, e.g. 1m, 5m, 15m, 30m, 1h, 4h, 1d.",inputSchema:{type:"object",properties:{timeframe:{type:"string",description:"e.g. 1m, 5m, 15m, 30m, 1h, 4h, 1d"}},required:["timeframe"],additionalProperties:!1},handler:async($,v)=>{await T(v);let D=await v.session.getUserId();return u6(D,"change_timeframe",{timeframe:$.timeframe})}}),E({name:"chart_draw_shapes",description:"Draw one or more shapes on the user's OPEN Aether Wealth chart. For key levels use multiple `horizontal_line` shapes, each with `price` and a short `label`. For a fair-value-gap / supply-demand zone use a `zone` with `priceHigh` + `priceLow`. For a trade idea use a `position` with `direction` + `entry`/`stop`/`target`. Prices are in the instrument's price units; `time1`/`time2`/`entryTime` are optional epoch seconds. Switch to the intended pair + timeframe first.",inputSchema:{type:"object",properties:{shapes:{type:"array",description:"Shapes to draw in one batch.",items:{type:"object",properties:{type:{type:"string",enum:[...JC]},label:{type:"string"},color:{type:"string",description:"hex, e.g. #22c55e"},price:{type:"number"},priceHigh:{type:"number"},priceLow:{type:"number"},price1:{type:"number"},price2:{type:"number"},time1:{type:"number",description:"epoch seconds"},time2:{type:"number",description:"epoch seconds"},direction:{type:"string",enum:["long","short"]},entry:{type:"number"},stop:{type:"number"},target:{type:"number"},entryTime:{type:"number",description:"epoch seconds"}},required:["type"],additionalProperties:!1}}},required:["shapes"],additionalProperties:!1},handler:async($,v)=>{await T(v);let D=await v.session.getUserId();return u6(D,"draw_chart_shape",{shapes:$.shapes})}}),E({name:"chart_remove_drawings",description:"Remove AI-drawn shapes from the user's open Aether Wealth chart. `target` defaults to 'all' (clear everything the assistant drew); also accepts 'last', 'focused', or a specific shape id.",inputSchema:{type:"object",properties:{target:{type:"string",description:"'all' (default), 'last', 'focused', or a shape id"}},additionalProperties:!1},handler:async($,v)=>{await T(v);let D=await v.session.getUserId();return u6(D,"remove_chart_drawings",{target:$.target??"all"})}})];var pX=[E({name:"get_candles",description:"Get OHLC candles for a pair + timeframe and optional sourceId. Omit sourceId for Twelve Data. Non-default sources return only native timeframes advertised by get_market_config; they are never re-aggregated. Returns up to 200 bars plus nextCursor. Pass nextCursor back as cursor until it is null. The legacy offset remains available for shallow pagination; do not combine offset and cursor.",inputSchema:{type:"object",properties:{pair:{type:"string",description:"e.g. EURUSD, BTCUSD (canonical id; case-insensitive)"},timeframe:{type:"string",description:"A base (1m, 5m, 15m, 30m, 1h, 4h, 1d) or an integer multiple of one (e.g. 2h, 3h, 12h, 90m). No fractional (2.5h) or sub-minute values."},sourceId:{type:"string",pattern:"^[a-z][a-z0-9-]{0,62}$",description:"Market-data source from get_market_config, e.g. mt5-primary. Omit for Twelve Data."},limit:{type:"integer",minimum:1,maximum:200,description:"Maximum candles to return (1-200). Omit for the newest 200."},offset:{type:"integer",minimum:0,maximum:4800,description:"Legacy shallow pagination: number of recent candles to skip (0–4800). Use cursor instead for complete history; do not combine offset and cursor."},cursor:{type:"string",minLength:1,maxLength:2048,description:"Opaque nextCursor returned by the previous get_candles page. Omit on the first page; continue until nextCursor is null. Do not combine with offset."}},required:["pair","timeframe"],additionalProperties:!1},handler:async($,v)=>{return await T(v),qX(v.trpc,$)}}),E({name:"list_economic_calendar",description:'List economic calendar events. Filter by currency, date range, release, or minimum impact (1-5). Currency and indicator/release are validated against the catalog: unknown values return an error listing valid options, so an empty result always means "no events" rather than "bad input".',inputSchema:{type:"object",properties:{currency:{type:"array",items:{type:"string"},description:'ISO currency codes, e.g. ["USD","EUR"]'},from:{type:"string",description:"ISO 8601 date or datetime"},to:{type:"string",description:"ISO 8601 date or datetime"},indicator:{type:"string",description:"release slug, e.g. cpi"},impactMin:{type:"integer",minimum:1,maximum:5},view:{type:"string",enum:["minimal","rich"]}},additionalProperties:!1},handler:async($,v)=>{return await T(v),vO(v.trpc,$)}}),E({name:"get_macro_series",description:"Get a macro indicator time series (e.g. USD cpi). Currency and indicator are validated against the catalog: unknown values return an error listing valid options (case-insensitive).",inputSchema:{type:"object",properties:{currency:{type:"string",description:"ISO currency code, e.g. USD"},indicator:{type:"string",description:"release slug, e.g. cpi"},from:{type:"string",description:"ISO 8601 date or datetime"},to:{type:"string",description:"ISO 8601 date or datetime"},limit:{type:"integer",minimum:1,maximum:1000}},required:["currency","indicator"],additionalProperties:!1},handler:async($,v)=>{return await T(v),UO(v.trpc,$)}}),E({name:"get_macro_indicator",description:"Get a curated macro indicator series from FXMacroData (live + cached) with unit/frequency metadata and the central-bank target where available — use get_macro_series for raw historical calendar values. Range defaults to 12m; returns a null result when the macro data provider is not configured.",inputSchema:{type:"object",properties:{currency:{type:"string",description:"ISO currency code, e.g. USD"},indicator:{type:"string",description:"indicator slug in lowercase snake_case, e.g. cpi"},range:{type:"string",enum:[...$O],description:"Lookback window (default 12m)"}},required:["currency","indicator"],additionalProperties:!1},handler:async($,v)=>{return await T(v),DO(v.trpc,$)}}),E({name:"get_market_config",description:"Get supported instruments, timeframes, and per-source candle/live capabilities. Use marketDataSources before selecting a non-default sourceId.",inputSchema:{type:"object",properties:{},additionalProperties:!1},handler:async($,v)=>{return await T(v),XO(v.trpc)}})];var ZH={stopLoss:{type:"number"},takeProfit:{type:"number"},lotSize:{type:"number"},notes:{type:"string"},timeframe:{type:"string",description:"e.g. 1h, 4h, 1d"},riskPercent:{type:"number"},tags:{type:"array",items:{type:"string"}}},QC={pair:{type:"string",description:"e.g. EURUSD, BTCUSD"},direction:{type:"string",enum:["LONG","SHORT"]},entryPrice:{type:"number"},exitPrice:{type:"number"},stopLoss:{type:"number"},takeProfit:{type:"number"},lotSize:{type:"number"},entryTime:{type:"string",description:"ISO 8601 datetime"},exitTime:{type:"string",description:"ISO 8601 datetime"},notes:{type:"string"},timeframe:{type:"string",description:"e.g. 1h, 4h, 1d"},emotionalTag:{type:"string"},fees:{type:"number"},swap:{type:"number"},reportedPnl:{type:"number",description:"Broker-reported P&L to store instead of recalculated P&L"},tags:{type:"array",items:{type:"string"}}},tX=[E({name:"list_trades",description:"List the authenticated user's trades. Filter by account, status, pair, or date range (ISO 8601). Requires sign-in.",inputSchema:{type:"object",properties:{accountId:{type:"string"},status:{type:"string",enum:["OPEN","CLOSED","CANCELLED","ALL"]},pair:{type:"string",description:"e.g. EURUSD, BTCUSD"},from:{type:"string",description:"ISO 8601 datetime (inclusive lower bound)"},to:{type:"string",description:"ISO 8601 datetime (inclusive upper bound)"},page:NO,limit:BO},additionalProperties:!1},handler:async($,v)=>{return await T(v),QO(v.trpc,$)}}),E({name:"get_trade",description:"Get a single trade by id. Requires sign-in.",inputSchema:{type:"object",properties:{id:{type:"string"}},required:["id"],additionalProperties:!1},handler:async($,v)=>{return await T(v),WO(v.trpc,$)}}),E({name:"list_accounts",description:"List the user's trading accounts (use an account's id when creating a trade). Requires sign-in.",inputSchema:{type:"object",properties:{},additionalProperties:!1},handler:async($,v)=>{return await T(v),SZ(v.trpc)}}),E({name:"create_account",description:'Create a trading account in the journal. Use accountType "demo" for paper/demo accounts and "live" for live accounts. Requires sign-in.',inputSchema:{type:"object",properties:{name:{type:"string"},broker:{type:"string"},accountType:{type:"string",description:"default: personal"},initialBalance:{type:"number",description:"default: 0"},currency:{type:"string",description:"3-letter code, default: USD"},notes:{type:"string"},defaultRiskAmount:{type:"number"}},required:["name"],additionalProperties:!1},handler:async($,v)=>{return await T(v),kZ(v.trpc,$)}}),E({name:"trade_stats",description:"Trading performance statistics (win rate, PnL, etc.). Filter by account, pair, or date range. Requires sign-in.",inputSchema:{type:"object",properties:{accountId:{type:"string"},pair:{type:"string"},from:{type:"string",description:"ISO 8601 datetime"},to:{type:"string",description:"ISO 8601 datetime"}},additionalProperties:!1},handler:async($,v)=>{return await T(v),GO(v.trpc,$)}}),E({name:"create_trade",description:"Record a new trade. Requires sign-in. Use list_accounts to find the accountId.",inputSchema:{type:"object",properties:{accountId:{type:"string",description:"Trading account id (see list_accounts)"},pair:{type:"string",description:"e.g. EURUSD, BTCUSD"},direction:{type:"string",enum:["LONG","SHORT"]},entryPrice:{type:"number"},entryTime:{type:"string",description:"ISO 8601 datetime"},...ZH},required:["accountId","pair","direction","entryPrice","entryTime"],additionalProperties:!1},handler:async($,v)=>{return await T(v),zO(v.trpc,$)}}),E({name:"update_trade",description:"Update fields on an existing trade. Requires sign-in.",inputSchema:{type:"object",properties:{id:{type:"string"},pair:{type:"string"},direction:{type:"string",enum:["LONG","SHORT"]},entryPrice:{type:"number"},entryTime:{type:"string",description:"ISO 8601 datetime"},...ZH},required:["id"],additionalProperties:!1},handler:async($,v)=>{return await T(v),YO(v.trpc,$)}}),E({name:"close_trade",description:"Close an open trade with an exit price + time. Requires sign-in.",inputSchema:{type:"object",properties:{id:{type:"string"},exitPrice:{type:"number"},exitTime:{type:"string",description:"ISO 8601 datetime"},fees:{type:"number"},swap:{type:"number"},notes:{type:"string"}},required:["id","exitPrice","exitTime"],additionalProperties:!1},handler:async($,v)=>{return await T(v),IO(v.trpc,$)}}),E({name:"delete_trade",description:"Permanently delete a single trade by id. Only trades on demo accounts can be deleted. Requires sign-in.",inputSchema:{type:"object",properties:{id:{type:"string"}},required:["id"],additionalProperties:!1},handler:async($,v)=>{return await T(v),VO(v.trpc,$)}}),E({name:"delete_trades",description:"Permanently delete trades on a specific demo account. Requires explicit status (OPEN, CLOSED, CANCELLED, or ALL). This cannot be undone. Requires sign-in.",inputSchema:{type:"object",properties:{accountId:{type:"string",description:"Trading account id to delete from"},status:{type:"string",enum:["OPEN","CLOSED","CANCELLED","ALL"]}},required:["accountId","status"],additionalProperties:!1},handler:async($,v)=>{return await T(v),KO(v.trpc,$)}}),E({name:"import_trades",description:"Import up to 500 trades into one account. Rows with both exitPrice and exitTime are imported as closed trades. Requires sign-in.",inputSchema:{type:"object",properties:{accountId:{type:"string",description:"Trading account id to import into"},trades:{type:"array",minItems:1,maxItems:500,items:{type:"object",properties:QC,required:["pair","direction","entryPrice","lotSize","entryTime"],additionalProperties:!1}}},required:["accountId","trades"],additionalProperties:!1},handler:async($,v)=>{return await T(v),LO(v.trpc,$)}})];function I7($={}){let v=$.includeAuthTools??!0,D=$.includeLiveChartTools??!1,X=$.includeRenderChartTools??!Y4;return[...v?EX:[],...nX,...tX,...lX,...kX,...pX,...cX,...dX,...X?iX:[],...D?[...rX,...hX]:[]]}var WC="aether-wealth-mcp",zC="0.2.13";function OH($,v){let D=new A0({name:WC,version:zC},{capabilities:{tools:{listChanged:!1},resources:{listChanged:!1,subscribe:!1},prompts:{listChanged:!1}}});return YC(D,$,v??$.toolContext),D}function YC($,v,D){let X=!1,U=(J)=>{let Q=v.clientGate?.nudge;if(Q&&!X)return X=!0,`${Q}
|
|
108
|
+
`)}]}}function ag($){return NH($)?.approvalMethod==="push"}function eg($){if($==="email_otp")return"Ask the user for the emailed confirmation code, then call execute_trade with this intentId and code. Never guess or fabricate the code.";if($==="app_otp")return"Ask the user for the current authenticator app code, then call execute_trade with this intentId and code. Never guess or fabricate the code.";if($==="push")return"Do NOT ask the user for a code. This action executes only when the user taps Approve in the Aether Wealth app.";if($==="auto")return"No code is required. Call execute_trade with this intentId to execute the action.";return"Inspect the returned proposal before taking the next step."}function NH($){if(typeof $!=="object"||$===null)return null;let v=$.proposal;if(typeof v!=="object"||v===null)return null;return v}var lX=[E({name:"get_broker_account",description:"Get the LIVE broker account balance, equity, currency, and connection status for a connected trading account (distinct from list_accounts which lists journal accounts). Requires sign-in.",inputSchema:{type:"object",properties:{accountId:{type:"string"}},required:["accountId"],additionalProperties:!1},handler:async($,v)=>{return await T(v),mZ(v.trpc,$)}}),E({name:"list_broker_positions",description:"List open broker positions with P&L. Requires sign-in.",inputSchema:{type:"object",properties:{accountId:{type:"string"}},required:["accountId"],additionalProperties:!1},handler:async($,v)=>{return await T(v),cZ(v.trpc,$)}}),E({name:"get_broker_quote",description:"Get the current broker-native bid and ask for a symbol through the connected execution account. For an MT5 executor connection, this reads the live tick from its VPS and rejects stale ticks. Requires sign-in.",inputSchema:{type:"object",properties:{accountId:{type:"string"},symbol:{type:"string",minLength:1,maxLength:10}},required:["accountId","symbol"],additionalProperties:!1},handler:async($,v)=>{return await T(v),dZ(v.trpc,$)}}),E({name:"connect_broker",description:"Attach a live execution provider to a journal account. For MetaApi, provide its account id and region. For `mt5_executor`, provide the expected MT5 login as `providerAccountRef` and its `baseUrl` under `*.aetherwealth.ai`. `providerToken` is sensitive — never expose or log it.",inputSchema:{type:"object",properties:{accountId:{type:"string"},provider:{type:"string",enum:["metaapi","mt5_executor"],description:"Defaults to 'metaapi' when omitted."},region:{type:"string",enum:["new-york","london"]},baseUrl:{type:"string",description:"Required for `mt5_executor`; the executor's HTTPS origin under `*.aetherwealth.ai`."},providerAccountRef:{type:"string",description:"The MetaApi account id, or the expected numeric MT5 login for `mt5_executor`."},providerToken:{type:"string",description:"The provider token. For `mt5_executor`, use its service bearer token. Sensitive — never expose or log it."},approvalMode:{type:"string",enum:["app_otp","email_otp"],description:"Confirmation mode. 'auto' is not selectable here; 'push' is also set later via set_broker_approval_mode because it requires an active app push subscription."}},required:["accountId","providerAccountRef","providerToken"],additionalProperties:!1},handler:async($,v)=>{return await T(v),yZ(v.trpc,$)}}),E({name:"broker_connection_status",description:"Get the current live broker connection status. Requires sign-in.",inputSchema:{type:"object",properties:{accountId:{type:"string"}},required:["accountId"],additionalProperties:!1},handler:async($,v)=>{return await T(v),nZ(v.trpc,$)}}),E({name:"disconnect_broker",description:"Disarm broker trading for a connected account instantly. Cancels pending intents, keeps executed history, and does not require confirmation because it is the kill switch. Reconnect later with connect_broker. Requires sign-in.",inputSchema:{type:"object",properties:{accountId:{type:"string"}},required:["accountId"],additionalProperties:!1},handler:async($,v)=>{return await T(v),lZ(v.trpc,$)}}),E({name:"set_broker_approval_mode",description:"Change how broker trades are confirmed for a connection between `app_otp` (authenticator), `email_otp`, and `push` (tap-to-approve in the Aether Wealth app; requires an active push subscription). The agent cannot enable `auto` here.",inputSchema:{type:"object",properties:{accountId:{type:"string"},approvalMode:{type:"string",enum:["app_otp","email_otp","push"]}},required:["accountId","approvalMode"],additionalProperties:!1},handler:async($,v)=>{return await T(v),hZ(v.trpc,$)}}),E({name:"propose_trade",description:"Size and PROPOSE a broker trade (does not place it). Provide exactly one of riskPercent or riskAmount; entryPrice is required for limit/stop. Returns the intent id and confirmation method. Push-mode intents are sent to the user's device and must not be executed by the agent. Requires sign-in.",inputSchema:{type:"object",properties:{accountId:{type:"string"},symbol:{type:"string"},direction:{type:"string",enum:["BUY","SELL"]},orderType:{type:"string",enum:["market","limit","stop"]},entryPrice:{type:"number"},stopLoss:{type:"number"},takeProfit:{type:"number"},riskPercent:{type:"number"},riskAmount:{type:"number"}},required:["accountId","symbol","direction","stopLoss"],additionalProperties:!1},handler:async($,v)=>{await T(v);let D=await rZ(v.trpc,$);return ag(D)?Y7(D):D}}),E({name:"execute_trade",description:"Place a previously proposed trade. Email/app modes require the user-provided code; auto mode requires no per-trade code. Push intents cannot be executed by the agent. NEVER guess or fabricate a code.",inputSchema:{type:"object",properties:{intentId:{type:"string"},code:{type:"string"}},required:["intentId"],additionalProperties:!1},handler:async($,v)=>{return await T(v),pZ(v.trpc,$)}}),E({name:"trade_intent_status",description:"Check whether a proposed trade was approved, executed, expired, cancelled, or failed. Especially useful for push-mode intents, which the user approves on their device.",inputSchema:{type:"object",properties:{intentId:{type:"string"}},required:["intentId"],additionalProperties:!1},handler:async($,v)=>{return await T(v),oZ(v.trpc,$)}}),E({name:"cancel_trade_intent",description:"Cancel a previously proposed broker trade. Requires sign-in.",inputSchema:{type:"object",properties:{intentId:{type:"string"}},required:["intentId"],additionalProperties:!1},handler:async($,v)=>{return await T(v),tZ(v.trpc,$)}}),E({name:"close_position",description:"Propose closing an open broker position fully, or partially by passing `volume`. This does not close immediately; it returns a pending confirmation intent. For email_otp/app_otp ask the user for the code and call execute_trade. For push, do not ask for a code — the user taps Approve in the app.",inputSchema:{type:"object",properties:{accountId:{type:"string"},positionId:{type:"string"},volume:{type:"number"}},required:["accountId","positionId"],additionalProperties:!1},handler:async($,v)=>{return await T(v),Y7(await aZ(v.trpc,$))}}),E({name:"modify_position",description:"Propose adjusting stop-loss / take-profit on an open position. Stop-loss changes that INCREASE risk are rejected (use the app). Pass null to clear a level. This returns a pending confirmation intent; for email_otp/app_otp ask for the code and call execute_trade, while push is approved in the app.",inputSchema:{type:"object",properties:{accountId:{type:"string"},positionId:{type:"string"},stopLoss:{type:["number","null"]},takeProfit:{type:["number","null"]}},required:["accountId","positionId"],additionalProperties:!1},handler:async($,v)=>{return await T(v),Y7(await eZ(v.trpc,$))}})],hX=[E({name:"draw_trade_on_chart",description:"Draw a proposed/open trade (entry, stop, target) on the user's OPEN Aether Wealth chart as a position shape. Switch to the intended pair/timeframe first with chart_select_pair.",inputSchema:{type:"object",properties:{direction:{type:"string",enum:["long","short"]},entry:{type:"number"},stopLoss:{type:"number"},takeProfit:{type:"number"},label:{type:"string"}},required:["direction","entry","stopLoss"],additionalProperties:!1},handler:async($,v)=>{await T(v);let D=await v.session.getUserId();return u6(D,"draw_chart_shape",{shapes:[{type:"position",direction:$.direction,entry:$.entry,stop:$.stopLoss,...$.takeProfit===void 0?{}:{target:$.takeProfit},...$.label===void 0?{}:{label:$.label}}]})}})];var sg=["news","press_release"];function $C($){return{pair:$.pair,...$.limit===void 0?{}:{limit:$.limit}}}function vC($){return{currency:$.currency,...$.limit===void 0?{}:{limit:$.limit}}}function UC($){return{currency:$.currency,...$.indicator===void 0?{}:{indicator:$.indicator},...$.limit===void 0?{}:{limit:$.limit}}}function DC($){return{...$.limit===void 0?{}:{limit:$.limit}}}function XC($){return{currency:$.currency,...$.documentType===void 0?{}:{documentType:$.documentType},...$.limit===void 0?{}:{limit:$.limit}}}var mX={type:"integer",minimum:1,maximum:250,description:"Max rows to return (1-250, default 120)."},cX=[E({name:"get_fx_pair_context",description:"Macro context for a currency PAIR (e.g. EURUSD) — the per-currency macro state for both legs (recent releases, surprises, derived trend). Use for a pair-level macro read; for one currency use get_fx_currency_context. Distinct from get_macro_series (raw calendar history) and get_macro_indicator (one curated series).",inputSchema:{type:"object",properties:{pair:{type:"string",description:"6-letter currency pair, e.g. EURUSD (case-insensitive)"},limit:mX},required:["pair"],additionalProperties:!1},handler:async($,v)=>{return await T(v),v.trpc.fxMacroData.pairContext.query($C($))}}),E({name:"get_fx_currency_context",description:"Macro context for a single CURRENCY (e.g. USD) — recent economic releases, surprises, and the derived macro state for that currency.",inputSchema:{type:"object",properties:{currency:{type:"string",description:"ISO currency code, e.g. USD (case-insensitive)"},limit:mX},required:["currency"],additionalProperties:!1},handler:async($,v)=>{return await T(v),v.trpc.fxMacroData.currencyContext.query(vC($))}}),E({name:"get_fx_predictions",description:"Model forecasts / predictions for a currency's upcoming macro releases. Optionally filter to one indicator by release slug (e.g. cpi).",inputSchema:{type:"object",properties:{currency:{type:"string",description:"ISO currency code, e.g. USD (case-insensitive)"},indicator:{type:"string",description:"Optional release slug filter, e.g. cpi"},limit:mX},required:["currency"],additionalProperties:!1},handler:async($,v)=>{return await T(v),v.trpc.fxMacroData.predictions.query(UC($))}}),E({name:"get_fx_risk_sentiment",description:"Cross-market risk-on / risk-off sentiment series (not currency-scoped). Use to gauge broad market risk appetite.",inputSchema:{type:"object",properties:{limit:mX},additionalProperties:!1},handler:async($,v)=>{return await T(v),v.trpc.fxMacroData.riskSentiment.query(DC($))}}),E({name:"get_fx_documents",description:"Source documents behind the FX macro data for a currency — news items and press releases. Filter by documentType.",inputSchema:{type:"object",properties:{currency:{type:"string",description:"ISO currency code, e.g. USD (case-insensitive)"},documentType:{type:"string",enum:[...sg],description:"Optional filter: news or press_release"},limit:{type:"integer",minimum:1,maximum:100,description:"Max rows to return (1-100, default 50)."}},required:["currency"],additionalProperties:!1},handler:async($,v)=>{return await T(v),v.trpc.fxMacroData.documents.query(XC($))}}),E({name:"get_fx_sync_state",description:"Ingestion/sync status of the FX macro datasets (per dataset family: status, freshness, last success, next refresh). Diagnostic — check data freshness before relying on the other get_fx_* tools.",inputSchema:{type:"object",properties:{},additionalProperties:!1},handler:async($,v)=>{return await T(v),v.trpc.fxMacroData.syncState.query()}})];var GC="momentum: rsi, macd, stoch, stochf, stochrsi, cci, cmo, mom, roc, rocr, willr, mfi, ultosc, ppo, apo, bop, aroon, aroonosc; trend: adx, adxr, dx, plus_di, minus_di, plus_dm, minus_dm, sar, supertrend; moving averages: sma, ema, wma, dema, tema, trima, kama, t3ma, mama, vwap, midpoint, midprice; bands: bbands, keltner, percent_b; volatility: atr, natr, trange; volume: obv, ad, adosc; stats: linearreg, linearregslope, linearregangle, linearregintercept, stddev, var, tsf",dX=[E({name:"get_indicators",description:"Compute Twelve Data technical indicators for a pair + timeframe (requires sign-in). "+`Pass up to 8 indicators by name; params are optional and default sensibly. Names — ${GC}. Bad names/params return an error listing valid options. At most 2 distinct pairs per user at a time.`,inputSchema:{type:"object",properties:{pair:{type:"string",description:"Canonical id, e.g. EURUSD, XAUUSD, BTCUSD (case-insensitive)"},interval:{type:"string",description:"One of 1m, 5m, 15m, 30m, 45m, 1h, 2h, 4h, 1d"},indicators:{type:"array",minItems:1,maxItems:8,description:"Up to 8 indicators to compute on the pair",items:{type:"object",properties:{name:{type:"string",description:"Indicator name, e.g. rsi, macd, ema, bbands, atr, adx"},params:{type:"object",description:'Optional params, e.g. {"time_period": 14} or MACD {"fast_period":12,"slow_period":26}. Defaults applied when omitted.'}},required:["name"],additionalProperties:!1}},outputsize:{type:"integer",minimum:1,maximum:500,description:"Bars to return per indicator (default 30)"}},required:["pair","interval","indicators"],additionalProperties:!1},handler:async($,v)=>{return await T(v),sZ(v.trpc,$)}})];var JC=["horizontal_line","horizontal_ray","vertical_line","cross_line","zone","rectangle","trendline","ray","right_ray","left_ray","extended_line","info_line","trend_angle","position"],rX=[E({name:"chart_select_pair",description:"Switch the user's open Aether Wealth chart to a trading pair. Use the canonical id (case-insensitive), e.g. XAUUSD for gold, EURUSD, BTCUSD. Drives the live browser chart, not backend state.",inputSchema:{type:"object",properties:{pair:{type:"string",description:"Canonical pair id, e.g. XAUUSD (gold), EURUSD, BTCUSD"}},required:["pair"],additionalProperties:!1},handler:async($,v)=>{await T(v);let D=await v.session.getUserId();return u6(D,"select_pair",{pair:$.pair})}}),E({name:"chart_change_timeframe",description:"Change the timeframe/resolution of the user's open Aether Wealth chart, e.g. 1m, 5m, 15m, 30m, 1h, 4h, 1d.",inputSchema:{type:"object",properties:{timeframe:{type:"string",description:"e.g. 1m, 5m, 15m, 30m, 1h, 4h, 1d"}},required:["timeframe"],additionalProperties:!1},handler:async($,v)=>{await T(v);let D=await v.session.getUserId();return u6(D,"change_timeframe",{timeframe:$.timeframe})}}),E({name:"chart_draw_shapes",description:"Draw one or more shapes on the user's OPEN Aether Wealth chart. For key levels use multiple `horizontal_line` shapes, each with `price` and a short `label`. For a fair-value-gap / supply-demand zone use a `zone` with `priceHigh` + `priceLow`. For a trade idea use a `position` with `direction` + `entry`/`stop`/`target`. Prices are in the instrument's price units; `time1`/`time2`/`entryTime` are optional epoch seconds. Switch to the intended pair + timeframe first.",inputSchema:{type:"object",properties:{shapes:{type:"array",description:"Shapes to draw in one batch.",items:{type:"object",properties:{type:{type:"string",enum:[...JC]},label:{type:"string"},color:{type:"string",description:"hex, e.g. #22c55e"},price:{type:"number"},priceHigh:{type:"number"},priceLow:{type:"number"},price1:{type:"number"},price2:{type:"number"},time1:{type:"number",description:"epoch seconds"},time2:{type:"number",description:"epoch seconds"},direction:{type:"string",enum:["long","short"]},entry:{type:"number"},stop:{type:"number"},target:{type:"number"},entryTime:{type:"number",description:"epoch seconds"}},required:["type"],additionalProperties:!1}}},required:["shapes"],additionalProperties:!1},handler:async($,v)=>{await T(v);let D=await v.session.getUserId();return u6(D,"draw_chart_shape",{shapes:$.shapes})}}),E({name:"chart_remove_drawings",description:"Remove AI-drawn shapes from the user's open Aether Wealth chart. `target` defaults to 'all' (clear everything the assistant drew); also accepts 'last', 'focused', or a specific shape id.",inputSchema:{type:"object",properties:{target:{type:"string",description:"'all' (default), 'last', 'focused', or a shape id"}},additionalProperties:!1},handler:async($,v)=>{await T(v);let D=await v.session.getUserId();return u6(D,"remove_chart_drawings",{target:$.target??"all"})}})];var pX=[E({name:"get_candles",description:"Get OHLC candles for a pair + timeframe and optional sourceId. Omit sourceId for Twelve Data. Non-default sources return only native timeframes advertised by get_market_config; they are never re-aggregated. Returns up to 200 bars plus nextCursor. Pass nextCursor back as cursor until it is null. The legacy offset remains available for shallow pagination; do not combine offset and cursor.",inputSchema:{type:"object",properties:{pair:{type:"string",description:"e.g. EURUSD, BTCUSD (canonical id; case-insensitive)"},timeframe:{type:"string",description:"A base (1m, 5m, 15m, 30m, 1h, 4h, 1d) or an integer multiple of one (e.g. 2h, 3h, 12h, 90m). No fractional (2.5h) or sub-minute values."},sourceId:{type:"string",pattern:"^[a-z][a-z0-9-]{0,62}$",description:"Market-data source from get_market_config, e.g. mt5-primary. Omit for Twelve Data."},limit:{type:"integer",minimum:1,maximum:200,description:"Maximum candles to return (1-200). Omit for the newest 200."},offset:{type:"integer",minimum:0,maximum:4800,description:"Legacy shallow pagination: number of recent candles to skip (0–4800). Use cursor instead for complete history; do not combine offset and cursor."},cursor:{type:"string",minLength:1,maxLength:2048,description:"Opaque nextCursor returned by the previous get_candles page. Omit on the first page; continue until nextCursor is null. Do not combine with offset."}},required:["pair","timeframe"],additionalProperties:!1},handler:async($,v)=>{return await T(v),qX(v.trpc,$)}}),E({name:"list_economic_calendar",description:'List economic calendar events. Filter by currency, date range, release, or minimum impact (1-5). Currency and indicator/release are validated against the catalog: unknown values return an error listing valid options, so an empty result always means "no events" rather than "bad input".',inputSchema:{type:"object",properties:{currency:{type:"array",items:{type:"string"},description:'ISO currency codes, e.g. ["USD","EUR"]'},from:{type:"string",description:"ISO 8601 date or datetime"},to:{type:"string",description:"ISO 8601 date or datetime"},indicator:{type:"string",description:"release slug, e.g. cpi"},impactMin:{type:"integer",minimum:1,maximum:5},view:{type:"string",enum:["minimal","rich"]}},additionalProperties:!1},handler:async($,v)=>{return await T(v),vO(v.trpc,$)}}),E({name:"get_macro_series",description:"Get a macro indicator time series (e.g. USD cpi). Currency and indicator are validated against the catalog: unknown values return an error listing valid options (case-insensitive).",inputSchema:{type:"object",properties:{currency:{type:"string",description:"ISO currency code, e.g. USD"},indicator:{type:"string",description:"release slug, e.g. cpi"},from:{type:"string",description:"ISO 8601 date or datetime"},to:{type:"string",description:"ISO 8601 date or datetime"},limit:{type:"integer",minimum:1,maximum:1000}},required:["currency","indicator"],additionalProperties:!1},handler:async($,v)=>{return await T(v),UO(v.trpc,$)}}),E({name:"get_macro_indicator",description:"Get a curated macro indicator series from FXMacroData (live + cached) with unit/frequency metadata and the central-bank target where available — use get_macro_series for raw historical calendar values. Range defaults to 12m; returns a null result when the macro data provider is not configured.",inputSchema:{type:"object",properties:{currency:{type:"string",description:"ISO currency code, e.g. USD"},indicator:{type:"string",description:"indicator slug in lowercase snake_case, e.g. cpi"},range:{type:"string",enum:[...$O],description:"Lookback window (default 12m)"}},required:["currency","indicator"],additionalProperties:!1},handler:async($,v)=>{return await T(v),DO(v.trpc,$)}}),E({name:"get_market_config",description:"Get supported instruments, timeframes, and per-source candle/live capabilities. Use marketDataSources before selecting a non-default sourceId.",inputSchema:{type:"object",properties:{},additionalProperties:!1},handler:async($,v)=>{return await T(v),XO(v.trpc)}})];var ZH={stopLoss:{type:"number"},takeProfit:{type:"number"},lotSize:{type:"number"},notes:{type:"string"},timeframe:{type:"string",description:"e.g. 1h, 4h, 1d"},riskPercent:{type:"number"},tags:{type:"array",items:{type:"string"}}},QC={pair:{type:"string",description:"e.g. EURUSD, BTCUSD"},direction:{type:"string",enum:["LONG","SHORT"]},entryPrice:{type:"number"},exitPrice:{type:"number"},stopLoss:{type:"number"},takeProfit:{type:"number"},lotSize:{type:"number"},entryTime:{type:"string",description:"ISO 8601 datetime"},exitTime:{type:"string",description:"ISO 8601 datetime"},notes:{type:"string"},timeframe:{type:"string",description:"e.g. 1h, 4h, 1d"},emotionalTag:{type:"string"},fees:{type:"number"},swap:{type:"number"},reportedPnl:{type:"number",description:"Broker-reported P&L to store instead of recalculated P&L"},tags:{type:"array",items:{type:"string"}}},tX=[E({name:"list_trades",description:"List the authenticated user's trades. Filter by account, status, pair, or date range (ISO 8601). Requires sign-in.",inputSchema:{type:"object",properties:{accountId:{type:"string"},status:{type:"string",enum:["OPEN","CLOSED","CANCELLED","ALL"]},pair:{type:"string",description:"e.g. EURUSD, BTCUSD"},from:{type:"string",description:"ISO 8601 datetime (inclusive lower bound)"},to:{type:"string",description:"ISO 8601 datetime (inclusive upper bound)"},page:NO,limit:BO},additionalProperties:!1},handler:async($,v)=>{return await T(v),QO(v.trpc,$)}}),E({name:"get_trade",description:"Get a single trade by id. Requires sign-in.",inputSchema:{type:"object",properties:{id:{type:"string"}},required:["id"],additionalProperties:!1},handler:async($,v)=>{return await T(v),WO(v.trpc,$)}}),E({name:"list_accounts",description:"List the user's trading accounts (use an account's id when creating a trade). Requires sign-in.",inputSchema:{type:"object",properties:{},additionalProperties:!1},handler:async($,v)=>{return await T(v),SZ(v.trpc)}}),E({name:"create_account",description:'Create a trading account in the journal. Use accountType "demo" for paper/demo accounts and "live" for live accounts. Requires sign-in.',inputSchema:{type:"object",properties:{name:{type:"string"},broker:{type:"string"},accountType:{type:"string",description:"default: personal"},initialBalance:{type:"number",description:"default: 0"},currency:{type:"string",description:"3-letter code, default: USD"},notes:{type:"string"},defaultRiskAmount:{type:"number"}},required:["name"],additionalProperties:!1},handler:async($,v)=>{return await T(v),kZ(v.trpc,$)}}),E({name:"trade_stats",description:"Trading performance statistics (win rate, PnL, etc.). Filter by account, pair, or date range. Requires sign-in.",inputSchema:{type:"object",properties:{accountId:{type:"string"},pair:{type:"string"},from:{type:"string",description:"ISO 8601 datetime"},to:{type:"string",description:"ISO 8601 datetime"}},additionalProperties:!1},handler:async($,v)=>{return await T(v),GO(v.trpc,$)}}),E({name:"create_trade",description:"Record a new trade. Requires sign-in. Use list_accounts to find the accountId.",inputSchema:{type:"object",properties:{accountId:{type:"string",description:"Trading account id (see list_accounts)"},pair:{type:"string",description:"e.g. EURUSD, BTCUSD"},direction:{type:"string",enum:["LONG","SHORT"]},entryPrice:{type:"number"},entryTime:{type:"string",description:"ISO 8601 datetime"},...ZH},required:["accountId","pair","direction","entryPrice","entryTime"],additionalProperties:!1},handler:async($,v)=>{return await T(v),zO(v.trpc,$)}}),E({name:"update_trade",description:"Update fields on an existing trade. Requires sign-in.",inputSchema:{type:"object",properties:{id:{type:"string"},pair:{type:"string"},direction:{type:"string",enum:["LONG","SHORT"]},entryPrice:{type:"number"},entryTime:{type:"string",description:"ISO 8601 datetime"},...ZH},required:["id"],additionalProperties:!1},handler:async($,v)=>{return await T(v),YO(v.trpc,$)}}),E({name:"close_trade",description:"Close an open trade with an exit price + time. Requires sign-in.",inputSchema:{type:"object",properties:{id:{type:"string"},exitPrice:{type:"number"},exitTime:{type:"string",description:"ISO 8601 datetime"},fees:{type:"number"},swap:{type:"number"},notes:{type:"string"}},required:["id","exitPrice","exitTime"],additionalProperties:!1},handler:async($,v)=>{return await T(v),IO(v.trpc,$)}}),E({name:"delete_trade",description:"Permanently delete a single trade by id. Only trades on demo accounts can be deleted. Requires sign-in.",inputSchema:{type:"object",properties:{id:{type:"string"}},required:["id"],additionalProperties:!1},handler:async($,v)=>{return await T(v),VO(v.trpc,$)}}),E({name:"delete_trades",description:"Permanently delete trades on a specific demo account. Requires explicit status (OPEN, CLOSED, CANCELLED, or ALL). This cannot be undone. Requires sign-in.",inputSchema:{type:"object",properties:{accountId:{type:"string",description:"Trading account id to delete from"},status:{type:"string",enum:["OPEN","CLOSED","CANCELLED","ALL"]}},required:["accountId","status"],additionalProperties:!1},handler:async($,v)=>{return await T(v),KO(v.trpc,$)}}),E({name:"import_trades",description:"Import up to 500 trades into one account. Rows with both exitPrice and exitTime are imported as closed trades. Requires sign-in.",inputSchema:{type:"object",properties:{accountId:{type:"string",description:"Trading account id to import into"},trades:{type:"array",minItems:1,maxItems:500,items:{type:"object",properties:QC,required:["pair","direction","entryPrice","lotSize","entryTime"],additionalProperties:!1}}},required:["accountId","trades"],additionalProperties:!1},handler:async($,v)=>{return await T(v),LO(v.trpc,$)}})];function I7($={}){let v=$.includeAuthTools??!0,D=$.includeLiveChartTools??!1,X=$.includeRenderChartTools??!Y4;return[...v?EX:[],...nX,...tX,...lX,...kX,...pX,...cX,...dX,...X?iX:[],...D?[...rX,...hX]:[]]}var WC="aether-wealth-mcp",zC="0.2.14";function OH($,v){let D=new A0({name:WC,version:zC},{capabilities:{tools:{listChanged:!1},resources:{listChanged:!1,subscribe:!1},prompts:{listChanged:!1}}});return YC(D,$,v??$.toolContext),D}function YC($,v,D){let X=!1,U=(J)=>{let Q=v.clientGate?.nudge;if(Q&&!X)return X=!0,`${Q}
|
|
109
109
|
|
|
110
110
|
${J}`;return J},G=(J)=>{let Q=v.clientGate?.nudge;if(!Q||X)return J;X=!0;let W=J.find((z)=>z.type==="text");if(W)return J.map((z)=>z===W?{type:"text",text:`${Q}
|
|
111
111
|
|
|
@@ -114,7 +114,7 @@ ${W.text}`}:z);return[{type:"text",text:Q},...J]};$.setRequestHandler(tv,async()
|
|
|
114
114
|
`),A1(500,{error:"internal error"})}finally{await G.close().catch(FH),await U.close().catch(FH)}}function ZC($){let{servedPaths:v,bundle:D,log:X,oauth:U,bearerToken:G}=$,J=new Set([qz,...[...v].filter((W)=>W!==V7).map((W)=>`${qz}${W}`)]),Q=async(W)=>{let z=new URL(W.url),Y=OC(W,z,v,U,J);if(Y)return Y;if(U)return HC(W,U,D,X);if(G&&!SC(W,G))return new Response("unauthorized",{status:401});return jH(W,D,void 0,X)};return U?async(W)=>uV(await Q(W)):Q}function OC($,v,D,X,U){if(v.pathname===NC&&$.method==="GET")return A1(200,{ok:!0});if(X){let G=gV($,v,X,U);if(G)return G}if(!D.has(v.pathname))return new Response("not found",{status:404});if($.method==="GET"&&!X)return A1(200,{ok:!0,transport:"streamable-http"});return null}async function HC($,v,D,X){let U=CV($),G=new URL($.url).pathname,J=G===V7?"":G;for(let z of xV($,U)){let Y=v.rateLimiter.check(z);if(!Y.allowed)return new Response(JSON.stringify({error:"rate_limited"}),{status:429,headers:{"content-type":"application/json","retry-after":String(Y.retryAfterSeconds)}})}if(!U)return Sz(v,void 0,J);let Q;try{Q=await v.tokenVerifier.verify(U)}catch(z){return X(`[http] token verification unavailable: ${L7(z)}
|
|
115
115
|
`),A1(502,{error:"token verification unavailable"})}if(!Q.ok)return Sz(v,"invalid_token",J);let W=_V({token:U,userId:Q.userId,trpcUrl:v.trpcUrl,onUnauthorized:()=>v.tokenVerifier.invalidate(U)});return jH($,D,W,X)}function FC($,v,D){let U=globalThis.Bun.serve({port:v.port,hostname:D,fetch:$});return{port:U.port??v.port,close:async()=>{await U.stop()}}}async function jC($,v,D){let X=LC((J,Q)=>{AC(J,Q,$).catch(()=>{})});return await new Promise((J,Q)=>{X.once("error",Q),X.listen(v.port,D,()=>{X.off("error",Q),J()})}),{port:X.address()?.port??v.port,close:()=>new Promise((J,Q)=>{X.close((W)=>{if(W)Q(W);else J()})})}}async function AC($,v,D){try{let X=await wC($),U=await D(X);await qC(U,v)}catch(X){if(!v.headersSent){v.statusCode=500,v.setHeader("content-type","application/json"),v.end(JSON.stringify({error:L7(X)}));return}v.end()}}async function wC($){let v=MC($),D=PC($),X=$.method??"GET",U={method:X,headers:D},G=await bC($,X);if(G)U.body=G,U.duplex="half";return new Request(v,U)}function MC($){let v=$.socket,D=$.headers["x-forwarded-proto"]??(v?.encrypted?"https":"http"),X=$.headers.host??"localhost";return new URL($.url??"/",`${D}://${X}`).toString()}function PC($){let v=new Headers;for(let[D,X]of Object.entries($.headers)){if(X===void 0)continue;if(Array.isArray(X))for(let U of X)v.append(D,U);else v.append(D,X)}return v}async function bC($,v){if(v==="GET"||v==="HEAD")return;let D=[];for await(let X of $)D.push(Buffer.isBuffer(X)?X:Buffer.from(X));return D.length>0?Buffer.concat(D):void 0}async function qC($,v){if(v.statusCode=$.status,$.headers.forEach((X,U)=>{v.setHeader(U,X)}),!$.body){v.end();return}let D=$.body.getReader();try{while(!0){let{value:X,done:U}=await D.read();if(U)break;if(X)v.write(Buffer.from(X))}}finally{D.releaseLock(),v.end()}}function SC($,v){let D=$.headers.get("authorization");if(!D)return!1;if(!D.startsWith("Bearer "))return!1;let X=D.slice(7),U=Buffer.from(X,"utf8"),G=Buffer.from(v,"utf8");if(U.length!==G.length){let J=Buffer.alloc(G.length);return U.copy(J,0,0,Math.min(U.length,G.length)),HH(J,G),!1}return HH(U,G)}function L7($){if($ instanceof Error)return $.message;return String($)}function FH(){return}var kC="aether-wealth-mcp",EC=[33417,33418,33419],TC="/callback",RC=["trades:read","trades:write","accounts:read","alerts:read","alerts:write"],gC="aether-wealth-mcp",CC="AETHER_MCP_CREDENTIALS_FILE",l1={clientId:kC,redirectPorts:EC,redirectPath:TC,scopes:RC,keychainService:gC,credentialsFilePath:k0("aether-wealth-mcp"),forceFileEnvVar:CC};function AH($={}){let v=$.hosted??!1,D=v?["Authentication is handled by the MCP connection itself — there are no sign-in tools to call. If calls fail with an authorization error, the user must re-authorize this connection in their MCP client settings."]:["Auth tools:"," • login — sign in. Opens the browser; the user authenticates and approves access. Call this first if a data tool reports the user is not signed in."," • logout — sign out on this device."],X=v?" 3. If it fails with an authorization error, tell the user to re-authorize the Aether Wealth connection in their MCP client, then retry.":' 3. If it reports "not signed in", call login, wait for the user to finish in the browser, then retry.';return[{name:"getting_started",description:"Brief the LLM on what the Aether Wealth MCP exposes and the sign-in-first flow.",handler:()=>[{role:"user",content:{type:"text",text:["You are connected to the Aether Wealth MCP — programmatic access to the user's trading journal, alerts, market data, indicators, and charts over an authenticated connection.","",...D,"","Context:"," • get_context — snapshot accounts, open trades, recent stats, and active alerts in one call. Call it first to ground your suggestions.","","Domains (partial — see the aetherwealth://capabilities resource for the full set):"," • Journal: list_trades, get_trade, list_accounts, create_account, create_trade, update_trade, close_trade, delete_trade, delete_trades, import_trades, trade_stats"," • Alerts: list_alerts, create_price_alert, create_trendline_alert, create_indicator_alert, list_indicator_alerts, update_indicator_alert, delete_indicator_alert, update_alert, delete_alert"," • Market data + indicators: get_candles, get_market_config, get_indicators"," • Macro: list_economic_calendar, get_macro_series, get_macro_indicator"," • FX macro context: get_fx_pair_context, get_fx_currency_context, get_fx_predictions, get_fx_risk_sentiment, get_fx_documents, get_fx_sync_state",...Y4?[]:[" • Charts: render_chart"]," • Broker execution: propose_trade, close_position, and modify_position create intents. Email/app modes need a user-provided code; auto mode needs no per-trade code. For push intents, do not ask for a code — use trade_intent_status to check the app approval outcome. disconnect_broker is the instant kill switch and requires no confirmation.","","Deletion rule:"," • delete_trade and delete_trades are permanent and only work on demo accounts. Live-account trade deletes are blocked by the backend.","","Recommended flow:"," 1. Call get_context to load live state."," 2. Try the data tool the user asked for (e.g. list_trades).",X].join(`
|
|
116
116
|
`)}}]},{name:"dashboard_context",description:"Brief the LLM on the full Aether Wealth surface, grounding in live state, and when to suggest the dashboard.",handler:()=>[{role:"user",content:{type:"text",text:["You are connected to Aether Wealth, a multi-market trading workspace.",PX,"","Before you advise, call get_context to load the user's live state (accounts, open trades, recent stats, active alerts) so your suggestions fit what they are actually doing. The aetherwealth://capabilities resource, if your client attaches it, is the full surface map — which actions are MCP-callable vs dashboard-only.","","When the user needs something that is dashboard-only (the full charting workspace and saved layouts, the Pine editor, the full journal UI, the Aether Intelligence assistant),",`tell them to open the dashboard at ${f4} rather than attempting it over MCP.`].join(`
|
|
117
|
-
`)}}]}]}var wH="aether-wealth-mcp",B7="0.2.
|
|
117
|
+
`)}}]}]}var wH="aether-wealth-mcp",B7="0.2.14";function uC($){return{toolContext:$.toolContext,tools:new Map(($.tools??I7()).map((v)=>[v.name,v])),resources:new Map(($.resources??y5()).map((v)=>[v.uri,v])),prompts:new Map(($.prompts??i5()).map((v)=>[v.name,v])),...$.clientGate?{clientGate:$.clientGate}:{},log:$.log??((v)=>{process.stderr.write(v)})}}function xC($,v){let D=new A0({name:wH,version:B7},{capabilities:{tools:{listChanged:!1},resources:{listChanged:!1,subscribe:!1},prompts:{listChanged:!1}}});return fC(D,$,v??$.toolContext),D}class oX{server;bundle;constructor($){this.bundle=uC($),this.server=xC(this.bundle),this.server.oninitialized=()=>{this.bundle.log(`${wH} initialized
|
|
118
118
|
`)}}async connect($){await this.server.connect($)}async close(){await this.server.close()}isInitialized(){return this.server.getClientVersion()!==void 0}getRegistryBundle(){return this.bundle}}function fC($,v,D){let X=!1,U=(J)=>{let Q=v.clientGate?.nudge;if(Q&&!X)return X=!0,`${Q}
|
|
119
119
|
|
|
120
120
|
${J}`;return J},G=(J)=>{let Q=v.clientGate?.nudge;if(!Q||X)return J;X=!0;let W=J.find((z)=>z.type==="text");if(W)return J.map((z)=>z===W?{type:"text",text:`${Q}
|