@reformer/builder 1.0.0 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/README.md +70 -8
  2. package/bin/reformer-builder.d.mts +36 -0
  3. package/bin/reformer-builder.mjs +112 -15
  4. package/dist/assets/App-_6Sb2gZF.js +892 -0
  5. package/dist/assets/BootError-CbjkO8JX.js +1 -0
  6. package/dist/assets/CodeEditor-DTO6OzhB.js +2 -0
  7. package/dist/assets/RawJsonEditor-DUJPoZi0.js +1 -0
  8. package/dist/assets/boot-BQd8o_5d.js +1 -0
  9. package/dist/assets/contract-GGklenj-.js +9 -0
  10. package/dist/assets/{freemarker2-Dc63E2SW.js → freemarker2-IA3H3wuC.js} +2 -2
  11. package/dist/assets/handlebars-CQSli8ll.js +1 -0
  12. package/dist/assets/html-CghVKP1R.js +1 -0
  13. package/dist/assets/index-BCoy6hGR.css +1 -0
  14. package/dist/assets/index-CnoiW_cj.js +10 -0
  15. package/dist/assets/javascript-DSEPacy5.js +1 -0
  16. package/dist/assets/{jsonMode-CemXzEMj.js → jsonMode-W1y09uqP.js} +3 -3
  17. package/dist/assets/liquid-1e577kxN.js +1 -0
  18. package/dist/assets/load-BhxezP-1.js +3 -0
  19. package/dist/assets/mdx-CFjtYju5.js +1 -0
  20. package/dist/assets/{monaco-setup-wGOKhcUo.js → monaco-setup-_iXPlnAT.js} +34 -34
  21. package/dist/assets/python-3-b5o-51.js +1 -0
  22. package/dist/assets/razor-D3TF8v-Q.js +1 -0
  23. package/dist/assets/typescript-BNaAyYgu.js +1 -0
  24. package/dist/assets/validate-B5O3mi2k.js +8 -0
  25. package/dist/assets/xml-DIHK-3EW.js +1 -0
  26. package/dist/assets/yaml-DS08VUGY.js +1 -0
  27. package/dist/index.html +2 -2
  28. package/package.json +5 -2
  29. package/runtime-config.schema.json +77 -0
  30. package/dist/assets/CodeEditor-C27y3JNW.js +0 -2
  31. package/dist/assets/RawJsonEditor-BS5r3i2P.js +0 -1
  32. package/dist/assets/handlebars-CN4ggFMI.js +0 -1
  33. package/dist/assets/html-BJ_0FZ4N.js +0 -1
  34. package/dist/assets/index-BVjlK0OP.js +0 -817
  35. package/dist/assets/index-DYDLCcUp.css +0 -1
  36. package/dist/assets/javascript-ChLWbrPC.js +0 -1
  37. package/dist/assets/liquid-DT0mZNaG.js +0 -1
  38. package/dist/assets/mdx-D1JAVlmB.js +0 -1
  39. package/dist/assets/python-D3Fng_k0.js +0 -1
  40. package/dist/assets/razor-BXCxNJBR.js +0 -1
  41. package/dist/assets/typescript-BtZpkOs3.js +0 -1
  42. package/dist/assets/xml-CeLodlPg.js +0 -1
  43. package/dist/assets/yaml-DSrp7EaV.js +0 -1
@@ -0,0 +1,9 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/validate-B5O3mi2k.js","assets/index-CnoiW_cj.js","assets/index-BCoy6hGR.css"])))=>i.map(i=>d[i]);
2
+ import{g as gi,W as vi,r as V,j as K,_ as bi}from"./index-CnoiW_cj.js";var dt={exports:{}},br={},we={},Oe={},_r={},Sr={},$r={},en;function Zt(){return en||(en=1,(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.regexpCode=t.getEsmExportName=t.getProperty=t.safeStringify=t.stringify=t.strConcat=t.addCodeArg=t.str=t._=t.nil=t._Code=t.Name=t.IDENTIFIER=t._CodeOrName=void 0;class e{}t._CodeOrName=e,t.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class r extends e{constructor(s){if(super(),!t.IDENTIFIER.test(s))throw new Error("CodeGen: name must be a valid identifier");this.str=s}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}t.Name=r;class n extends e{constructor(s){super(),this._items=typeof s=="string"?[s]:s}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const s=this._items[0];return s===""||s==='""'}get str(){var s;return(s=this._str)!==null&&s!==void 0?s:this._str=this._items.reduce((p,S)=>`${p}${S}`,"")}get names(){var s;return(s=this._names)!==null&&s!==void 0?s:this._names=this._items.reduce((p,S)=>(S instanceof r&&(p[S.str]=(p[S.str]||0)+1),p),{})}}t._Code=n,t.nil=new n("");function i(f,...s){const p=[f[0]];let S=0;for(;S<s.length;)l(p,s[S]),p.push(f[++S]);return new n(p)}t._=i;const o=new n("+");function a(f,...s){const p=[_(f[0])];let S=0;for(;S<s.length;)p.push(o),l(p,s[S]),p.push(o,_(f[++S]));return u(p),new n(p)}t.str=a;function l(f,s){s instanceof n?f.push(...s._items):s instanceof r?f.push(s):f.push($(s))}t.addCodeArg=l;function u(f){let s=1;for(;s<f.length-1;){if(f[s]===o){const p=b(f[s-1],f[s+1]);if(p!==void 0){f.splice(s-1,3,p);continue}f[s++]="+"}s++}}function b(f,s){if(s==='""')return f;if(f==='""')return s;if(typeof f=="string")return s instanceof r||f[f.length-1]!=='"'?void 0:typeof s!="string"?`${f.slice(0,-1)}${s}"`:s[0]==='"'?f.slice(0,-1)+s.slice(1):void 0;if(typeof s=="string"&&s[0]==='"'&&!(f instanceof r))return`"${f}${s.slice(1)}`}function y(f,s){return s.emptyStr()?f:f.emptyStr()?s:a`${f}${s}`}t.strConcat=y;function $(f){return typeof f=="number"||typeof f=="boolean"||f===null?f:_(Array.isArray(f)?f.join(","):f)}function v(f){return new n(_(f))}t.stringify=v;function _(f){return JSON.stringify(f).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}t.safeStringify=_;function g(f){return typeof f=="string"&&t.IDENTIFIER.test(f)?new n(`.${f}`):i`[${f}]`}t.getProperty=g;function w(f){if(typeof f=="string"&&t.IDENTIFIER.test(f))return new n(`${f}`);throw new Error(`CodeGen: invalid export name: ${f}, use explicit $id name mapping`)}t.getEsmExportName=w;function d(f){return new n(f.toString())}t.regexpCode=d})($r)),$r}var wr={},tn;function rn(){return tn||(tn=1,(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.ValueScope=t.ValueScopeName=t.Scope=t.varKinds=t.UsedValueState=void 0;const e=Zt();class r extends Error{constructor(b){super(`CodeGen: "code" for ${b} not defined`),this.value=b.value}}var n;(function(u){u[u.Started=0]="Started",u[u.Completed=1]="Completed"})(n||(t.UsedValueState=n={})),t.varKinds={const:new e.Name("const"),let:new e.Name("let"),var:new e.Name("var")};class i{constructor({prefixes:b,parent:y}={}){this._names={},this._prefixes=b,this._parent=y}toName(b){return b instanceof e.Name?b:this.name(b)}name(b){return new e.Name(this._newName(b))}_newName(b){const y=this._names[b]||this._nameGroup(b);return`${b}${y.index++}`}_nameGroup(b){var y,$;if(!(($=(y=this._parent)===null||y===void 0?void 0:y._prefixes)===null||$===void 0)&&$.has(b)||this._prefixes&&!this._prefixes.has(b))throw new Error(`CodeGen: prefix "${b}" is not allowed in this scope`);return this._names[b]={prefix:b,index:0}}}t.Scope=i;class o extends e.Name{constructor(b,y){super(y),this.prefix=b}setValue(b,{property:y,itemIndex:$}){this.value=b,this.scopePath=(0,e._)`.${new e.Name(y)}[${$}]`}}t.ValueScopeName=o;const a=(0,e._)`\n`;class l extends i{constructor(b){super(b),this._values={},this._scope=b.scope,this.opts={...b,_n:b.lines?a:e.nil}}get(){return this._scope}name(b){return new o(b,this._newName(b))}value(b,y){var $;if(y.ref===void 0)throw new Error("CodeGen: ref must be passed in value");const v=this.toName(b),{prefix:_}=v,g=($=y.key)!==null&&$!==void 0?$:y.ref;let w=this._values[_];if(w){const s=w.get(g);if(s)return s}else w=this._values[_]=new Map;w.set(g,v);const d=this._scope[_]||(this._scope[_]=[]),f=d.length;return d[f]=y.ref,v.setValue(y,{property:_,itemIndex:f}),v}getValue(b,y){const $=this._values[b];if($)return $.get(y)}scopeRefs(b,y=this._values){return this._reduceValues(y,$=>{if($.scopePath===void 0)throw new Error(`CodeGen: name "${$}" has no value`);return(0,e._)`${b}${$.scopePath}`})}scopeCode(b=this._values,y,$){return this._reduceValues(b,v=>{if(v.value===void 0)throw new Error(`CodeGen: name "${v}" has no value`);return v.value.code},y,$)}_reduceValues(b,y,$={},v){let _=e.nil;for(const g in b){const w=b[g];if(!w)continue;const d=$[g]=$[g]||new Map;w.forEach(f=>{if(d.has(f))return;d.set(f,n.Started);let s=y(f);if(s){const p=this.opts.es5?t.varKinds.var:t.varKinds.const;_=(0,e._)`${_}${p} ${f} = ${s};${this.opts._n}`}else if(s=v?.(f))_=(0,e._)`${_}${s}${this.opts._n}`;else throw new r(f);d.set(f,n.Completed)})}return _}}t.ValueScope=l})(wr)),wr}var nn;function W(){return nn||(nn=1,(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.or=t.and=t.not=t.CodeGen=t.operators=t.varKinds=t.ValueScopeName=t.ValueScope=t.Scope=t.Name=t.regexpCode=t.stringify=t.getProperty=t.nil=t.strConcat=t.str=t._=void 0;const e=Zt(),r=rn();var n=Zt();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return n._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return n.str}}),Object.defineProperty(t,"strConcat",{enumerable:!0,get:function(){return n.strConcat}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return n.nil}}),Object.defineProperty(t,"getProperty",{enumerable:!0,get:function(){return n.getProperty}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return n.stringify}}),Object.defineProperty(t,"regexpCode",{enumerable:!0,get:function(){return n.regexpCode}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return n.Name}});var i=rn();Object.defineProperty(t,"Scope",{enumerable:!0,get:function(){return i.Scope}}),Object.defineProperty(t,"ValueScope",{enumerable:!0,get:function(){return i.ValueScope}}),Object.defineProperty(t,"ValueScopeName",{enumerable:!0,get:function(){return i.ValueScopeName}}),Object.defineProperty(t,"varKinds",{enumerable:!0,get:function(){return i.varKinds}}),t.operators={GT:new e._Code(">"),GTE:new e._Code(">="),LT:new e._Code("<"),LTE:new e._Code("<="),EQ:new e._Code("==="),NEQ:new e._Code("!=="),NOT:new e._Code("!"),OR:new e._Code("||"),AND:new e._Code("&&"),ADD:new e._Code("+")};class o{optimizeNodes(){return this}optimizeNames(m,k){return this}}class a extends o{constructor(m,k,T){super(),this.varKind=m,this.name=k,this.rhs=T}render({es5:m,_n:k}){const T=m?r.varKinds.var:this.varKind,D=this.rhs===void 0?"":` = ${this.rhs}`;return`${T} ${this.name}${D};`+k}optimizeNames(m,k){if(m[this.name.str])return this.rhs&&(this.rhs=Y(this.rhs,m,k)),this}get names(){return this.rhs instanceof e._CodeOrName?this.rhs.names:{}}}class l extends o{constructor(m,k,T){super(),this.lhs=m,this.rhs=k,this.sideEffects=T}render({_n:m}){return`${this.lhs} = ${this.rhs};`+m}optimizeNames(m,k){if(!(this.lhs instanceof e.Name&&!m[this.lhs.str]&&!this.sideEffects))return this.rhs=Y(this.rhs,m,k),this}get names(){const m=this.lhs instanceof e.Name?{}:{...this.lhs.names};return z(m,this.rhs)}}class u extends l{constructor(m,k,T,D){super(m,T,D),this.op=k}render({_n:m}){return`${this.lhs} ${this.op}= ${this.rhs};`+m}}class b extends o{constructor(m){super(),this.label=m,this.names={}}render({_n:m}){return`${this.label}:`+m}}class y extends o{constructor(m){super(),this.label=m,this.names={}}render({_n:m}){return`break${this.label?` ${this.label}`:""};`+m}}class $ extends o{constructor(m){super(),this.error=m}render({_n:m}){return`throw ${this.error};`+m}get names(){return this.error.names}}class v extends o{constructor(m){super(),this.code=m}render({_n:m}){return`${this.code};`+m}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(m,k){return this.code=Y(this.code,m,k),this}get names(){return this.code instanceof e._CodeOrName?this.code.names:{}}}class _ extends o{constructor(m=[]){super(),this.nodes=m}render(m){return this.nodes.reduce((k,T)=>k+T.render(m),"")}optimizeNodes(){const{nodes:m}=this;let k=m.length;for(;k--;){const T=m[k].optimizeNodes();Array.isArray(T)?m.splice(k,1,...T):T?m[k]=T:m.splice(k,1)}return m.length>0?this:void 0}optimizeNames(m,k){const{nodes:T}=this;let D=T.length;for(;D--;){const L=T[D];L.optimizeNames(m,k)||(ie(m,L.names),T.splice(D,1))}return T.length>0?this:void 0}get names(){return this.nodes.reduce((m,k)=>U(m,k.names),{})}}class g extends _{render(m){return"{"+m._n+super.render(m)+"}"+m._n}}class w extends _{}class d extends g{}d.kind="else";class f extends g{constructor(m,k){super(k),this.condition=m}render(m){let k=`if(${this.condition})`+super.render(m);return this.else&&(k+="else "+this.else.render(m)),k}optimizeNodes(){super.optimizeNodes();const m=this.condition;if(m===!0)return this.nodes;let k=this.else;if(k){const T=k.optimizeNodes();k=this.else=Array.isArray(T)?new d(T):T}if(k)return m===!1?k instanceof f?k:k.nodes:this.nodes.length?this:new f(Se(m),k instanceof f?[k]:k.nodes);if(!(m===!1||!this.nodes.length))return this}optimizeNames(m,k){var T;if(this.else=(T=this.else)===null||T===void 0?void 0:T.optimizeNames(m,k),!!(super.optimizeNames(m,k)||this.else))return this.condition=Y(this.condition,m,k),this}get names(){const m=super.names;return z(m,this.condition),this.else&&U(m,this.else.names),m}}f.kind="if";class s extends g{}s.kind="for";class p extends s{constructor(m){super(),this.iteration=m}render(m){return`for(${this.iteration})`+super.render(m)}optimizeNames(m,k){if(super.optimizeNames(m,k))return this.iteration=Y(this.iteration,m,k),this}get names(){return U(super.names,this.iteration.names)}}class S extends s{constructor(m,k,T,D){super(),this.varKind=m,this.name=k,this.from=T,this.to=D}render(m){const k=m.es5?r.varKinds.var:this.varKind,{name:T,from:D,to:L}=this;return`for(${k} ${T}=${D}; ${T}<${L}; ${T}++)`+super.render(m)}get names(){const m=z(super.names,this.from);return z(m,this.to)}}class c extends s{constructor(m,k,T,D){super(),this.loop=m,this.varKind=k,this.name=T,this.iterable=D}render(m){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(m)}optimizeNames(m,k){if(super.optimizeNames(m,k))return this.iterable=Y(this.iterable,m,k),this}get names(){return U(super.names,this.iterable.names)}}class h extends g{constructor(m,k,T){super(),this.name=m,this.args=k,this.async=T}render(m){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(m)}}h.kind="func";class P extends _{render(m){return"return "+super.render(m)}}P.kind="return";class j extends g{render(m){let k="try"+super.render(m);return this.catch&&(k+=this.catch.render(m)),this.finally&&(k+=this.finally.render(m)),k}optimizeNodes(){var m,k;return super.optimizeNodes(),(m=this.catch)===null||m===void 0||m.optimizeNodes(),(k=this.finally)===null||k===void 0||k.optimizeNodes(),this}optimizeNames(m,k){var T,D;return super.optimizeNames(m,k),(T=this.catch)===null||T===void 0||T.optimizeNames(m,k),(D=this.finally)===null||D===void 0||D.optimizeNames(m,k),this}get names(){const m=super.names;return this.catch&&U(m,this.catch.names),this.finally&&U(m,this.finally.names),m}}class A extends g{constructor(m){super(),this.error=m}render(m){return`catch(${this.error})`+super.render(m)}}A.kind="catch";class F extends g{render(m){return"finally"+super.render(m)}}F.kind="finally";class q{constructor(m,k={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...k,_n:k.lines?`
3
+ `:""},this._extScope=m,this._scope=new r.Scope({parent:m}),this._nodes=[new w]}toString(){return this._root.render(this.opts)}name(m){return this._scope.name(m)}scopeName(m){return this._extScope.name(m)}scopeValue(m,k){const T=this._extScope.value(m,k);return(this._values[T.prefix]||(this._values[T.prefix]=new Set)).add(T),T}getScopeValue(m,k){return this._extScope.getValue(m,k)}scopeRefs(m){return this._extScope.scopeRefs(m,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(m,k,T,D){const L=this._scope.toName(k);return T!==void 0&&D&&(this._constants[L.str]=T),this._leafNode(new a(m,L,T)),L}const(m,k,T){return this._def(r.varKinds.const,m,k,T)}let(m,k,T){return this._def(r.varKinds.let,m,k,T)}var(m,k,T){return this._def(r.varKinds.var,m,k,T)}assign(m,k,T){return this._leafNode(new l(m,k,T))}add(m,k){return this._leafNode(new u(m,t.operators.ADD,k))}code(m){return typeof m=="function"?m():m!==e.nil&&this._leafNode(new v(m)),this}object(...m){const k=["{"];for(const[T,D]of m)k.length>1&&k.push(","),k.push(T),(T!==D||this.opts.es5)&&(k.push(":"),(0,e.addCodeArg)(k,D));return k.push("}"),new e._Code(k)}if(m,k,T){if(this._blockNode(new f(m)),k&&T)this.code(k).else().code(T).endIf();else if(k)this.code(k).endIf();else if(T)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(m){return this._elseNode(new f(m))}else(){return this._elseNode(new d)}endIf(){return this._endBlockNode(f,d)}_for(m,k){return this._blockNode(m),k&&this.code(k).endFor(),this}for(m,k){return this._for(new p(m),k)}forRange(m,k,T,D,L=this.opts.es5?r.varKinds.var:r.varKinds.let){const X=this._scope.toName(m);return this._for(new S(L,X,k,T),()=>D(X))}forOf(m,k,T,D=r.varKinds.const){const L=this._scope.toName(m);if(this.opts.es5){const X=k instanceof e.Name?k:this.var("_arr",k);return this.forRange("_i",0,(0,e._)`${X}.length`,Z=>{this.var(L,(0,e._)`${X}[${Z}]`),T(L)})}return this._for(new c("of",D,L,k),()=>T(L))}forIn(m,k,T,D=this.opts.es5?r.varKinds.var:r.varKinds.const){if(this.opts.ownProperties)return this.forOf(m,(0,e._)`Object.keys(${k})`,T);const L=this._scope.toName(m);return this._for(new c("in",D,L,k),()=>T(L))}endFor(){return this._endBlockNode(s)}label(m){return this._leafNode(new b(m))}break(m){return this._leafNode(new y(m))}return(m){const k=new P;if(this._blockNode(k),this.code(m),k.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(P)}try(m,k,T){if(!k&&!T)throw new Error('CodeGen: "try" without "catch" and "finally"');const D=new j;if(this._blockNode(D),this.code(m),k){const L=this.name("e");this._currNode=D.catch=new A(L),k(L)}return T&&(this._currNode=D.finally=new F,this.code(T)),this._endBlockNode(A,F)}throw(m){return this._leafNode(new $(m))}block(m,k){return this._blockStarts.push(this._nodes.length),m&&this.code(m).endBlock(k),this}endBlock(m){const k=this._blockStarts.pop();if(k===void 0)throw new Error("CodeGen: not in self-balancing block");const T=this._nodes.length-k;if(T<0||m!==void 0&&T!==m)throw new Error(`CodeGen: wrong number of nodes: ${T} vs ${m} expected`);return this._nodes.length=k,this}func(m,k=e.nil,T,D){return this._blockNode(new h(m,k,T)),D&&this.code(D).endFunc(),this}endFunc(){return this._endBlockNode(h)}optimize(m=1){for(;m-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(m){return this._currNode.nodes.push(m),this}_blockNode(m){this._currNode.nodes.push(m),this._nodes.push(m)}_endBlockNode(m,k){const T=this._currNode;if(T instanceof m||k&&T instanceof k)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${k?`${m.kind}/${k.kind}`:m.kind}"`)}_elseNode(m){const k=this._currNode;if(!(k instanceof f))throw new Error('CodeGen: "else" without "if"');return this._currNode=k.else=m,this}get _root(){return this._nodes[0]}get _currNode(){const m=this._nodes;return m[m.length-1]}set _currNode(m){const k=this._nodes;k[k.length-1]=m}}t.CodeGen=q;function U(N,m){for(const k in m)N[k]=(N[k]||0)+(m[k]||0);return N}function z(N,m){return m instanceof e._CodeOrName?U(N,m.names):N}function Y(N,m,k){if(N instanceof e.Name)return T(N);if(!D(N))return N;return new e._Code(N._items.reduce((L,X)=>(X instanceof e.Name&&(X=T(X)),X instanceof e._Code?L.push(...X._items):L.push(X),L),[]));function T(L){const X=k[L.str];return X===void 0||m[L.str]!==1?L:(delete m[L.str],X)}function D(L){return L instanceof e._Code&&L._items.some(X=>X instanceof e.Name&&m[X.str]===1&&k[X.str]!==void 0)}}function ie(N,m){for(const k in m)N[k]=(N[k]||0)-(m[k]||0)}function Se(N){return typeof N=="boolean"||typeof N=="number"||N===null?!N:(0,e._)`!${R(N)}`}t.not=Se;const $e=E(t.operators.AND);function ne(...N){return N.reduce($e)}t.and=ne;const Ee=E(t.operators.OR);function I(...N){return N.reduce(Ee)}t.or=I;function E(N){return(m,k)=>m===e.nil?k:k===e.nil?m:(0,e._)`${R(m)} ${N} ${R(k)}`}function R(N){return N instanceof e.Name?N:(0,e._)`(${N})`}})(Sr)),Sr}var G={},on;function Q(){if(on)return G;on=1,Object.defineProperty(G,"__esModule",{value:!0}),G.checkStrictMode=G.getErrorPath=G.Type=G.useFunc=G.setEvaluated=G.evaluatedPropsToName=G.mergeEvaluated=G.eachItem=G.unescapeJsonPointer=G.escapeJsonPointer=G.escapeFragment=G.unescapeFragment=G.schemaRefOrVal=G.schemaHasRulesButRef=G.schemaHasRules=G.checkUnknownRules=G.alwaysValidSchema=G.toHash=void 0;const t=W(),e=Zt();function r(c){const h={};for(const P of c)h[P]=!0;return h}G.toHash=r;function n(c,h){return typeof h=="boolean"?h:Object.keys(h).length===0?!0:(i(c,h),!o(h,c.self.RULES.all))}G.alwaysValidSchema=n;function i(c,h=c.schema){const{opts:P,self:j}=c;if(!P.strictSchema||typeof h=="boolean")return;const A=j.RULES.keywords;for(const F in h)A[F]||S(c,`unknown keyword: "${F}"`)}G.checkUnknownRules=i;function o(c,h){if(typeof c=="boolean")return!c;for(const P in c)if(h[P])return!0;return!1}G.schemaHasRules=o;function a(c,h){if(typeof c=="boolean")return!c;for(const P in c)if(P!=="$ref"&&h.all[P])return!0;return!1}G.schemaHasRulesButRef=a;function l({topSchemaRef:c,schemaPath:h},P,j,A){if(!A){if(typeof P=="number"||typeof P=="boolean")return P;if(typeof P=="string")return(0,t._)`${P}`}return(0,t._)`${c}${h}${(0,t.getProperty)(j)}`}G.schemaRefOrVal=l;function u(c){return $(decodeURIComponent(c))}G.unescapeFragment=u;function b(c){return encodeURIComponent(y(c))}G.escapeFragment=b;function y(c){return typeof c=="number"?`${c}`:c.replace(/~/g,"~0").replace(/\//g,"~1")}G.escapeJsonPointer=y;function $(c){return c.replace(/~1/g,"/").replace(/~0/g,"~")}G.unescapeJsonPointer=$;function v(c,h){if(Array.isArray(c))for(const P of c)h(P);else h(c)}G.eachItem=v;function _({mergeNames:c,mergeToName:h,mergeValues:P,resultToName:j}){return(A,F,q,U)=>{const z=q===void 0?F:q instanceof t.Name?(F instanceof t.Name?c(A,F,q):h(A,F,q),q):F instanceof t.Name?(h(A,q,F),F):P(F,q);return U===t.Name&&!(z instanceof t.Name)?j(A,z):z}}G.mergeEvaluated={props:_({mergeNames:(c,h,P)=>c.if((0,t._)`${P} !== true && ${h} !== undefined`,()=>{c.if((0,t._)`${h} === true`,()=>c.assign(P,!0),()=>c.assign(P,(0,t._)`${P} || {}`).code((0,t._)`Object.assign(${P}, ${h})`))}),mergeToName:(c,h,P)=>c.if((0,t._)`${P} !== true`,()=>{h===!0?c.assign(P,!0):(c.assign(P,(0,t._)`${P} || {}`),w(c,P,h))}),mergeValues:(c,h)=>c===!0?!0:{...c,...h},resultToName:g}),items:_({mergeNames:(c,h,P)=>c.if((0,t._)`${P} !== true && ${h} !== undefined`,()=>c.assign(P,(0,t._)`${h} === true ? true : ${P} > ${h} ? ${P} : ${h}`)),mergeToName:(c,h,P)=>c.if((0,t._)`${P} !== true`,()=>c.assign(P,h===!0?!0:(0,t._)`${P} > ${h} ? ${P} : ${h}`)),mergeValues:(c,h)=>c===!0?!0:Math.max(c,h),resultToName:(c,h)=>c.var("items",h)})};function g(c,h){if(h===!0)return c.var("props",!0);const P=c.var("props",(0,t._)`{}`);return h!==void 0&&w(c,P,h),P}G.evaluatedPropsToName=g;function w(c,h,P){Object.keys(P).forEach(j=>c.assign((0,t._)`${h}${(0,t.getProperty)(j)}`,!0))}G.setEvaluated=w;const d={};function f(c,h){return c.scopeValue("func",{ref:h,code:d[h.code]||(d[h.code]=new e._Code(h.code))})}G.useFunc=f;var s;(function(c){c[c.Num=0]="Num",c[c.Str=1]="Str"})(s||(G.Type=s={}));function p(c,h,P){if(c instanceof t.Name){const j=h===s.Num;return P?j?(0,t._)`"[" + ${c} + "]"`:(0,t._)`"['" + ${c} + "']"`:j?(0,t._)`"/" + ${c}`:(0,t._)`"/" + ${c}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return P?(0,t.getProperty)(c).toString():"/"+y(c)}G.getErrorPath=p;function S(c,h,P=c.opts.strictSchema){if(P){if(h=`strict mode: ${h}`,P===!0)throw new Error(h);c.self.logger.warn(h)}}return G.checkStrictMode=S,G}var ut={},sn;function Te(){if(sn)return ut;sn=1,Object.defineProperty(ut,"__esModule",{value:!0});const t=W(),e={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")};return ut.default=e,ut}var an;function sr(){return an||(an=1,(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.extendErrors=t.resetErrorsCount=t.reportExtraError=t.reportError=t.keyword$DataError=t.keywordError=void 0;const e=W(),r=Q(),n=Te();t.keywordError={message:({keyword:d})=>(0,e.str)`must pass "${d}" keyword validation`},t.keyword$DataError={message:({keyword:d,schemaType:f})=>f?(0,e.str)`"${d}" keyword must be ${f} ($data)`:(0,e.str)`"${d}" keyword is invalid ($data)`};function i(d,f=t.keywordError,s,p){const{it:S}=d,{gen:c,compositeRule:h,allErrors:P}=S,j=$(d,f,s);p??(h||P)?u(c,j):b(S,(0,e._)`[${j}]`)}t.reportError=i;function o(d,f=t.keywordError,s){const{it:p}=d,{gen:S,compositeRule:c,allErrors:h}=p,P=$(d,f,s);u(S,P),c||h||b(p,n.default.vErrors)}t.reportExtraError=o;function a(d,f){d.assign(n.default.errors,f),d.if((0,e._)`${n.default.vErrors} !== null`,()=>d.if(f,()=>d.assign((0,e._)`${n.default.vErrors}.length`,f),()=>d.assign(n.default.vErrors,null)))}t.resetErrorsCount=a;function l({gen:d,keyword:f,schemaValue:s,data:p,errsCount:S,it:c}){if(S===void 0)throw new Error("ajv implementation error");const h=d.name("err");d.forRange("i",S,n.default.errors,P=>{d.const(h,(0,e._)`${n.default.vErrors}[${P}]`),d.if((0,e._)`${h}.instancePath === undefined`,()=>d.assign((0,e._)`${h}.instancePath`,(0,e.strConcat)(n.default.instancePath,c.errorPath))),d.assign((0,e._)`${h}.schemaPath`,(0,e.str)`${c.errSchemaPath}/${f}`),c.opts.verbose&&(d.assign((0,e._)`${h}.schema`,s),d.assign((0,e._)`${h}.data`,p))})}t.extendErrors=l;function u(d,f){const s=d.const("err",f);d.if((0,e._)`${n.default.vErrors} === null`,()=>d.assign(n.default.vErrors,(0,e._)`[${s}]`),(0,e._)`${n.default.vErrors}.push(${s})`),d.code((0,e._)`${n.default.errors}++`)}function b(d,f){const{gen:s,validateName:p,schemaEnv:S}=d;S.$async?s.throw((0,e._)`new ${d.ValidationError}(${f})`):(s.assign((0,e._)`${p}.errors`,f),s.return(!1))}const y={keyword:new e.Name("keyword"),schemaPath:new e.Name("schemaPath"),params:new e.Name("params"),propertyName:new e.Name("propertyName"),message:new e.Name("message"),schema:new e.Name("schema"),parentSchema:new e.Name("parentSchema")};function $(d,f,s){const{createErrors:p}=d.it;return p===!1?(0,e._)`{}`:v(d,f,s)}function v(d,f,s={}){const{gen:p,it:S}=d,c=[_(S,s),g(d,s)];return w(d,f,c),p.object(...c)}function _({errorPath:d},{instancePath:f}){const s=f?(0,e.str)`${d}${(0,r.getErrorPath)(f,r.Type.Str)}`:d;return[n.default.instancePath,(0,e.strConcat)(n.default.instancePath,s)]}function g({keyword:d,it:{errSchemaPath:f}},{schemaPath:s,parentSchema:p}){let S=p?f:(0,e.str)`${f}/${d}`;return s&&(S=(0,e.str)`${S}${(0,r.getErrorPath)(s,r.Type.Str)}`),[y.schemaPath,S]}function w(d,{params:f,message:s},p){const{keyword:S,data:c,schemaValue:h,it:P}=d,{opts:j,propertyName:A,topSchemaRef:F,schemaPath:q}=P;p.push([y.keyword,S],[y.params,typeof f=="function"?f(d):f||(0,e._)`{}`]),j.messages&&p.push([y.message,typeof s=="function"?s(d):s]),j.verbose&&p.push([y.schema,h],[y.parentSchema,(0,e._)`${F}${q}`],[n.default.data,c]),A&&p.push([y.propertyName,A])}})(_r)),_r}var ln;function _i(){if(ln)return Oe;ln=1,Object.defineProperty(Oe,"__esModule",{value:!0}),Oe.boolOrEmptySchema=Oe.topBoolOrEmptySchema=void 0;const t=sr(),e=W(),r=Te(),n={message:"boolean schema is false"};function i(l){const{gen:u,schema:b,validateName:y}=l;b===!1?a(l,!1):typeof b=="object"&&b.$async===!0?u.return(r.default.data):(u.assign((0,e._)`${y}.errors`,null),u.return(!0))}Oe.topBoolOrEmptySchema=i;function o(l,u){const{gen:b,schema:y}=l;y===!1?(b.var(u,!1),a(l)):b.var(u,!0)}Oe.boolOrEmptySchema=o;function a(l,u){const{gen:b,data:y}=l,$={gen:b,keyword:"false schema",data:y,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:l};(0,t.reportError)($,n,void 0,u)}return Oe}var ce={},Re={},cn;function jo(){if(cn)return Re;cn=1,Object.defineProperty(Re,"__esModule",{value:!0}),Re.getRules=Re.isJSONType=void 0;const t=["string","number","integer","boolean","null","object","array"],e=new Set(t);function r(i){return typeof i=="string"&&e.has(i)}Re.isJSONType=r;function n(){const i={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...i,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},i.number,i.string,i.array,i.object],post:{rules:[]},all:{},keywords:{}}}return Re.getRules=n,Re}var Pe={},dn;function To(){if(dn)return Pe;dn=1,Object.defineProperty(Pe,"__esModule",{value:!0}),Pe.shouldUseRule=Pe.shouldUseGroup=Pe.schemaHasRulesForType=void 0;function t({schema:n,self:i},o){const a=i.RULES.types[o];return a&&a!==!0&&e(n,a)}Pe.schemaHasRulesForType=t;function e(n,i){return i.rules.some(o=>r(n,o))}Pe.shouldUseGroup=e;function r(n,i){var o;return n[i.keyword]!==void 0||((o=i.definition.implements)===null||o===void 0?void 0:o.some(a=>n[a]!==void 0))}return Pe.shouldUseRule=r,Pe}var un;function Yt(){if(un)return ce;un=1,Object.defineProperty(ce,"__esModule",{value:!0}),ce.reportTypeError=ce.checkDataTypes=ce.checkDataType=ce.coerceAndCheckDataType=ce.getJSONTypes=ce.getSchemaTypes=ce.DataType=void 0;const t=jo(),e=To(),r=sr(),n=W(),i=Q();var o;(function(s){s[s.Correct=0]="Correct",s[s.Wrong=1]="Wrong"})(o||(ce.DataType=o={}));function a(s){const p=l(s.type);if(p.includes("null")){if(s.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!p.length&&s.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');s.nullable===!0&&p.push("null")}return p}ce.getSchemaTypes=a;function l(s){const p=Array.isArray(s)?s:s?[s]:[];if(p.every(t.isJSONType))return p;throw new Error("type must be JSONType or JSONType[]: "+p.join(","))}ce.getJSONTypes=l;function u(s,p){const{gen:S,data:c,opts:h}=s,P=y(p,h.coerceTypes),j=p.length>0&&!(P.length===0&&p.length===1&&(0,e.schemaHasRulesForType)(s,p[0]));if(j){const A=g(p,c,h.strictNumbers,o.Wrong);S.if(A,()=>{P.length?$(s,p,P):d(s)})}return j}ce.coerceAndCheckDataType=u;const b=new Set(["string","number","integer","boolean","null"]);function y(s,p){return p?s.filter(S=>b.has(S)||p==="array"&&S==="array"):[]}function $(s,p,S){const{gen:c,data:h,opts:P}=s,j=c.let("dataType",(0,n._)`typeof ${h}`),A=c.let("coerced",(0,n._)`undefined`);P.coerceTypes==="array"&&c.if((0,n._)`${j} == 'object' && Array.isArray(${h}) && ${h}.length == 1`,()=>c.assign(h,(0,n._)`${h}[0]`).assign(j,(0,n._)`typeof ${h}`).if(g(p,h,P.strictNumbers),()=>c.assign(A,h))),c.if((0,n._)`${A} !== undefined`);for(const q of S)(b.has(q)||q==="array"&&P.coerceTypes==="array")&&F(q);c.else(),d(s),c.endIf(),c.if((0,n._)`${A} !== undefined`,()=>{c.assign(h,A),v(s,A)});function F(q){switch(q){case"string":c.elseIf((0,n._)`${j} == "number" || ${j} == "boolean"`).assign(A,(0,n._)`"" + ${h}`).elseIf((0,n._)`${h} === null`).assign(A,(0,n._)`""`);return;case"number":c.elseIf((0,n._)`${j} == "boolean" || ${h} === null
4
+ || (${j} == "string" && ${h} && ${h} == +${h})`).assign(A,(0,n._)`+${h}`);return;case"integer":c.elseIf((0,n._)`${j} === "boolean" || ${h} === null
5
+ || (${j} === "string" && ${h} && ${h} == +${h} && !(${h} % 1))`).assign(A,(0,n._)`+${h}`);return;case"boolean":c.elseIf((0,n._)`${h} === "false" || ${h} === 0 || ${h} === null`).assign(A,!1).elseIf((0,n._)`${h} === "true" || ${h} === 1`).assign(A,!0);return;case"null":c.elseIf((0,n._)`${h} === "" || ${h} === 0 || ${h} === false`),c.assign(A,null);return;case"array":c.elseIf((0,n._)`${j} === "string" || ${j} === "number"
6
+ || ${j} === "boolean" || ${h} === null`).assign(A,(0,n._)`[${h}]`)}}}function v({gen:s,parentData:p,parentDataProperty:S},c){s.if((0,n._)`${p} !== undefined`,()=>s.assign((0,n._)`${p}[${S}]`,c))}function _(s,p,S,c=o.Correct){const h=c===o.Correct?n.operators.EQ:n.operators.NEQ;let P;switch(s){case"null":return(0,n._)`${p} ${h} null`;case"array":P=(0,n._)`Array.isArray(${p})`;break;case"object":P=(0,n._)`${p} && typeof ${p} == "object" && !Array.isArray(${p})`;break;case"integer":P=j((0,n._)`!(${p} % 1) && !isNaN(${p})`);break;case"number":P=j();break;default:return(0,n._)`typeof ${p} ${h} ${s}`}return c===o.Correct?P:(0,n.not)(P);function j(A=n.nil){return(0,n.and)((0,n._)`typeof ${p} == "number"`,A,S?(0,n._)`isFinite(${p})`:n.nil)}}ce.checkDataType=_;function g(s,p,S,c){if(s.length===1)return _(s[0],p,S,c);let h;const P=(0,i.toHash)(s);if(P.array&&P.object){const j=(0,n._)`typeof ${p} != "object"`;h=P.null?j:(0,n._)`!${p} || ${j}`,delete P.null,delete P.array,delete P.object}else h=n.nil;P.number&&delete P.integer;for(const j in P)h=(0,n.and)(h,_(j,p,S,c));return h}ce.checkDataTypes=g;const w={message:({schema:s})=>`must be ${s}`,params:({schema:s,schemaValue:p})=>typeof s=="string"?(0,n._)`{type: ${s}}`:(0,n._)`{type: ${p}}`};function d(s){const p=f(s);(0,r.reportError)(p,w)}ce.reportTypeError=d;function f(s){const{gen:p,data:S,schema:c}=s,h=(0,i.schemaRefOrVal)(s,c,"type");return{gen:p,keyword:"type",data:S,schema:c.type,schemaCode:h,schemaValue:h,parentSchema:c,params:{},it:s}}return ce}var et={},pn;function Si(){if(pn)return et;pn=1,Object.defineProperty(et,"__esModule",{value:!0}),et.assignDefaults=void 0;const t=W(),e=Q();function r(i,o){const{properties:a,items:l}=i.schema;if(o==="object"&&a)for(const u in a)n(i,u,a[u].default);else o==="array"&&Array.isArray(l)&&l.forEach((u,b)=>n(i,b,u.default))}et.assignDefaults=r;function n(i,o,a){const{gen:l,compositeRule:u,data:b,opts:y}=i;if(a===void 0)return;const $=(0,t._)`${b}${(0,t.getProperty)(o)}`;if(u){(0,e.checkStrictMode)(i,`default is ignored for: ${$}`);return}let v=(0,t._)`${$} === undefined`;y.useDefaults==="empty"&&(v=(0,t._)`${v} || ${$} === null || ${$} === ""`),l.if(v,(0,t._)`${$} = ${(0,t.stringify)(a)}`)}return et}var be={},re={},fn;function _e(){if(fn)return re;fn=1,Object.defineProperty(re,"__esModule",{value:!0}),re.validateUnion=re.validateArray=re.usePattern=re.callValidateCode=re.schemaProperties=re.allSchemaProperties=re.noPropertyInData=re.propertyInData=re.isOwnProperty=re.hasPropFunc=re.reportMissingProp=re.checkMissingProp=re.checkReportMissingProp=void 0;const t=W(),e=Q(),r=Te(),n=Q();function i(s,p){const{gen:S,data:c,it:h}=s;S.if(y(S,c,p,h.opts.ownProperties),()=>{s.setParams({missingProperty:(0,t._)`${p}`},!0),s.error()})}re.checkReportMissingProp=i;function o({gen:s,data:p,it:{opts:S}},c,h){return(0,t.or)(...c.map(P=>(0,t.and)(y(s,p,P,S.ownProperties),(0,t._)`${h} = ${P}`)))}re.checkMissingProp=o;function a(s,p){s.setParams({missingProperty:p},!0),s.error()}re.reportMissingProp=a;function l(s){return s.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,t._)`Object.prototype.hasOwnProperty`})}re.hasPropFunc=l;function u(s,p,S){return(0,t._)`${l(s)}.call(${p}, ${S})`}re.isOwnProperty=u;function b(s,p,S,c){const h=(0,t._)`${p}${(0,t.getProperty)(S)} !== undefined`;return c?(0,t._)`${h} && ${u(s,p,S)}`:h}re.propertyInData=b;function y(s,p,S,c){const h=(0,t._)`${p}${(0,t.getProperty)(S)} === undefined`;return c?(0,t.or)(h,(0,t.not)(u(s,p,S))):h}re.noPropertyInData=y;function $(s){return s?Object.keys(s).filter(p=>p!=="__proto__"):[]}re.allSchemaProperties=$;function v(s,p){return $(p).filter(S=>!(0,e.alwaysValidSchema)(s,p[S]))}re.schemaProperties=v;function _({schemaCode:s,data:p,it:{gen:S,topSchemaRef:c,schemaPath:h,errorPath:P},it:j},A,F,q){const U=q?(0,t._)`${s}, ${p}, ${c}${h}`:p,z=[[r.default.instancePath,(0,t.strConcat)(r.default.instancePath,P)],[r.default.parentData,j.parentData],[r.default.parentDataProperty,j.parentDataProperty],[r.default.rootData,r.default.rootData]];j.opts.dynamicRef&&z.push([r.default.dynamicAnchors,r.default.dynamicAnchors]);const Y=(0,t._)`${U}, ${S.object(...z)}`;return F!==t.nil?(0,t._)`${A}.call(${F}, ${Y})`:(0,t._)`${A}(${Y})`}re.callValidateCode=_;const g=(0,t._)`new RegExp`;function w({gen:s,it:{opts:p}},S){const c=p.unicodeRegExp?"u":"",{regExp:h}=p.code,P=h(S,c);return s.scopeValue("pattern",{key:P.toString(),ref:P,code:(0,t._)`${h.code==="new RegExp"?g:(0,n.useFunc)(s,h)}(${S}, ${c})`})}re.usePattern=w;function d(s){const{gen:p,data:S,keyword:c,it:h}=s,P=p.name("valid");if(h.allErrors){const A=p.let("valid",!0);return j(()=>p.assign(A,!1)),A}return p.var(P,!0),j(()=>p.break()),P;function j(A){const F=p.const("len",(0,t._)`${S}.length`);p.forRange("i",0,F,q=>{s.subschema({keyword:c,dataProp:q,dataPropType:e.Type.Num},P),p.if((0,t.not)(P),A)})}}re.validateArray=d;function f(s){const{gen:p,schema:S,keyword:c,it:h}=s;if(!Array.isArray(S))throw new Error("ajv implementation error");if(S.some(F=>(0,e.alwaysValidSchema)(h,F))&&!h.opts.unevaluated)return;const j=p.let("valid",!1),A=p.name("_valid");p.block(()=>S.forEach((F,q)=>{const U=s.subschema({keyword:c,schemaProp:q,compositeRule:!0},A);p.assign(j,(0,t._)`${j} || ${A}`),s.mergeValidEvaluated(U,A)||p.if((0,t.not)(j))})),s.result(j,()=>s.reset(),()=>s.error(!0))}return re.validateUnion=f,re}var hn;function $i(){if(hn)return be;hn=1,Object.defineProperty(be,"__esModule",{value:!0}),be.validateKeywordUsage=be.validSchemaType=be.funcKeywordCode=be.macroKeywordCode=void 0;const t=W(),e=Te(),r=_e(),n=sr();function i(v,_){const{gen:g,keyword:w,schema:d,parentSchema:f,it:s}=v,p=_.macro.call(s.self,d,f,s),S=b(g,w,p);s.opts.validateSchema!==!1&&s.self.validateSchema(p,!0);const c=g.name("valid");v.subschema({schema:p,schemaPath:t.nil,errSchemaPath:`${s.errSchemaPath}/${w}`,topSchemaRef:S,compositeRule:!0},c),v.pass(c,()=>v.error(!0))}be.macroKeywordCode=i;function o(v,_){var g;const{gen:w,keyword:d,schema:f,parentSchema:s,$data:p,it:S}=v;u(S,_);const c=!p&&_.compile?_.compile.call(S.self,f,s,S):_.validate,h=b(w,d,c),P=w.let("valid");v.block$data(P,j),v.ok((g=_.valid)!==null&&g!==void 0?g:P);function j(){if(_.errors===!1)q(),_.modifying&&a(v),U(()=>v.error());else{const z=_.async?A():F();_.modifying&&a(v),U(()=>l(v,z))}}function A(){const z=w.let("ruleErrs",null);return w.try(()=>q((0,t._)`await `),Y=>w.assign(P,!1).if((0,t._)`${Y} instanceof ${S.ValidationError}`,()=>w.assign(z,(0,t._)`${Y}.errors`),()=>w.throw(Y))),z}function F(){const z=(0,t._)`${h}.errors`;return w.assign(z,null),q(t.nil),z}function q(z=_.async?(0,t._)`await `:t.nil){const Y=S.opts.passContext?e.default.this:e.default.self,ie=!("compile"in _&&!p||_.schema===!1);w.assign(P,(0,t._)`${z}${(0,r.callValidateCode)(v,h,Y,ie)}`,_.modifying)}function U(z){var Y;w.if((0,t.not)((Y=_.valid)!==null&&Y!==void 0?Y:P),z)}}be.funcKeywordCode=o;function a(v){const{gen:_,data:g,it:w}=v;_.if(w.parentData,()=>_.assign(g,(0,t._)`${w.parentData}[${w.parentDataProperty}]`))}function l(v,_){const{gen:g}=v;g.if((0,t._)`Array.isArray(${_})`,()=>{g.assign(e.default.vErrors,(0,t._)`${e.default.vErrors} === null ? ${_} : ${e.default.vErrors}.concat(${_})`).assign(e.default.errors,(0,t._)`${e.default.vErrors}.length`),(0,n.extendErrors)(v)},()=>v.error())}function u({schemaEnv:v},_){if(_.async&&!v.$async)throw new Error("async keyword in sync schema")}function b(v,_,g){if(g===void 0)throw new Error(`keyword "${_}" failed to compile`);return v.scopeValue("keyword",typeof g=="function"?{ref:g}:{ref:g,code:(0,t.stringify)(g)})}function y(v,_,g=!1){return!_.length||_.some(w=>w==="array"?Array.isArray(v):w==="object"?v&&typeof v=="object"&&!Array.isArray(v):typeof v==w||g&&typeof v>"u")}be.validSchemaType=y;function $({schema:v,opts:_,self:g,errSchemaPath:w},d,f){if(Array.isArray(d.keyword)?!d.keyword.includes(f):d.keyword!==f)throw new Error("ajv implementation error");const s=d.dependencies;if(s?.some(p=>!Object.prototype.hasOwnProperty.call(v,p)))throw new Error(`parent schema must have dependencies of ${f}: ${s.join(",")}`);if(d.validateSchema&&!d.validateSchema(v[f])){const S=`keyword "${f}" value is invalid at path "${w}": `+g.errorsText(d.validateSchema.errors);if(_.validateSchema==="log")g.logger.error(S);else throw new Error(S)}}return be.validateKeywordUsage=$,be}var ke={},mn;function wi(){if(mn)return ke;mn=1,Object.defineProperty(ke,"__esModule",{value:!0}),ke.extendSubschemaMode=ke.extendSubschemaData=ke.getSubschema=void 0;const t=W(),e=Q();function r(o,{keyword:a,schemaProp:l,schema:u,schemaPath:b,errSchemaPath:y,topSchemaRef:$}){if(a!==void 0&&u!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(a!==void 0){const v=o.schema[a];return l===void 0?{schema:v,schemaPath:(0,t._)`${o.schemaPath}${(0,t.getProperty)(a)}`,errSchemaPath:`${o.errSchemaPath}/${a}`}:{schema:v[l],schemaPath:(0,t._)`${o.schemaPath}${(0,t.getProperty)(a)}${(0,t.getProperty)(l)}`,errSchemaPath:`${o.errSchemaPath}/${a}/${(0,e.escapeFragment)(l)}`}}if(u!==void 0){if(b===void 0||y===void 0||$===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:u,schemaPath:b,topSchemaRef:$,errSchemaPath:y}}throw new Error('either "keyword" or "schema" must be passed')}ke.getSubschema=r;function n(o,a,{dataProp:l,dataPropType:u,data:b,dataTypes:y,propertyName:$}){if(b!==void 0&&l!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:v}=a;if(l!==void 0){const{errorPath:g,dataPathArr:w,opts:d}=a,f=v.let("data",(0,t._)`${a.data}${(0,t.getProperty)(l)}`,!0);_(f),o.errorPath=(0,t.str)`${g}${(0,e.getErrorPath)(l,u,d.jsPropertySyntax)}`,o.parentDataProperty=(0,t._)`${l}`,o.dataPathArr=[...w,o.parentDataProperty]}if(b!==void 0){const g=b instanceof t.Name?b:v.let("data",b,!0);_(g),$!==void 0&&(o.propertyName=$)}y&&(o.dataTypes=y);function _(g){o.data=g,o.dataLevel=a.dataLevel+1,o.dataTypes=[],a.definedProperties=new Set,o.parentData=a.data,o.dataNames=[...a.dataNames,g]}}ke.extendSubschemaData=n;function i(o,{jtdDiscriminator:a,jtdMetadata:l,compositeRule:u,createErrors:b,allErrors:y}){u!==void 0&&(o.compositeRule=u),b!==void 0&&(o.createErrors=b),y!==void 0&&(o.allErrors=y),o.jtdDiscriminator=a,o.jtdMetadata=l}return ke.extendSubschemaMode=i,ke}var ue={},Pr,yn;function Oo(){return yn||(yn=1,Pr=function t(e,r){if(e===r)return!0;if(e&&r&&typeof e=="object"&&typeof r=="object"){if(e.constructor!==r.constructor)return!1;var n,i,o;if(Array.isArray(e)){if(n=e.length,n!=r.length)return!1;for(i=n;i--!==0;)if(!t(e[i],r[i]))return!1;return!0}if(e.constructor===RegExp)return e.source===r.source&&e.flags===r.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===r.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===r.toString();if(o=Object.keys(e),n=o.length,n!==Object.keys(r).length)return!1;for(i=n;i--!==0;)if(!Object.prototype.hasOwnProperty.call(r,o[i]))return!1;for(i=n;i--!==0;){var a=o[i];if(!t(e[a],r[a]))return!1}return!0}return e!==e&&r!==r}),Pr}var kr={exports:{}},gn;function Pi(){if(gn)return kr.exports;gn=1;var t=kr.exports=function(n,i,o){typeof i=="function"&&(o=i,i={}),o=i.cb||o;var a=typeof o=="function"?o:o.pre||function(){},l=o.post||function(){};e(i,a,l,n,"",n)};t.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},t.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},t.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},t.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 e(n,i,o,a,l,u,b,y,$,v){if(a&&typeof a=="object"&&!Array.isArray(a)){i(a,l,u,b,y,$,v);for(var _ in a){var g=a[_];if(Array.isArray(g)){if(_ in t.arrayKeywords)for(var w=0;w<g.length;w++)e(n,i,o,g[w],l+"/"+_+"/"+w,u,l,_,a,w)}else if(_ in t.propsKeywords){if(g&&typeof g=="object")for(var d in g)e(n,i,o,g[d],l+"/"+_+"/"+r(d),u,l,_,a,d)}else(_ in t.keywords||n.allKeys&&!(_ in t.skipKeywords))&&e(n,i,o,g,l+"/"+_,u,l,_,a)}o(a,l,u,b,y,$,v)}}function r(n){return n.replace(/~/g,"~0").replace(/\//g,"~1")}return kr.exports}var vn;function ar(){if(vn)return ue;vn=1,Object.defineProperty(ue,"__esModule",{value:!0}),ue.getSchemaRefs=ue.resolveUrl=ue.normalizeId=ue._getFullPath=ue.getFullPath=ue.inlineRef=void 0;const t=Q(),e=Oo(),r=Pi(),n=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function i(w,d=!0){return typeof w=="boolean"?!0:d===!0?!a(w):d?l(w)<=d:!1}ue.inlineRef=i;const o=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function a(w){for(const d in w){if(o.has(d))return!0;const f=w[d];if(Array.isArray(f)&&f.some(a)||typeof f=="object"&&a(f))return!0}return!1}function l(w){let d=0;for(const f in w){if(f==="$ref")return 1/0;if(d++,!n.has(f)&&(typeof w[f]=="object"&&(0,t.eachItem)(w[f],s=>d+=l(s)),d===1/0))return 1/0}return d}function u(w,d="",f){f!==!1&&(d=$(d));const s=w.parse(d);return b(w,s)}ue.getFullPath=u;function b(w,d){return w.serialize(d).split("#")[0]+"#"}ue._getFullPath=b;const y=/#\/?$/;function $(w){return w?w.replace(y,""):""}ue.normalizeId=$;function v(w,d,f){return f=$(f),w.resolve(d,f)}ue.resolveUrl=v;const _=/^[a-z_][-a-z0-9._]*$/i;function g(w,d){if(typeof w=="boolean")return{};const{schemaId:f,uriResolver:s}=this.opts,p=$(w[f]||d),S={"":p},c=u(s,p,!1),h={},P=new Set;return r(w,{allKeys:!0},(F,q,U,z)=>{if(z===void 0)return;const Y=c+q;let ie=S[z];typeof F[f]=="string"&&(ie=Se.call(this,F[f])),$e.call(this,F.$anchor),$e.call(this,F.$dynamicAnchor),S[q]=ie;function Se(ne){const Ee=this.opts.uriResolver.resolve;if(ne=$(ie?Ee(ie,ne):ne),P.has(ne))throw A(ne);P.add(ne);let I=this.refs[ne];return typeof I=="string"&&(I=this.refs[I]),typeof I=="object"?j(F,I.schema,ne):ne!==$(Y)&&(ne[0]==="#"?(j(F,h[ne],ne),h[ne]=F):this.refs[ne]=Y),ne}function $e(ne){if(typeof ne=="string"){if(!_.test(ne))throw new Error(`invalid anchor "${ne}"`);Se.call(this,`#${ne}`)}}}),h;function j(F,q,U){if(q!==void 0&&!e(F,q))throw A(U)}function A(F){return new Error(`reference "${F}" resolves to more than one schema`)}}return ue.getSchemaRefs=g,ue}var bn;function lr(){if(bn)return we;bn=1,Object.defineProperty(we,"__esModule",{value:!0}),we.getData=we.KeywordCxt=we.validateFunctionCode=void 0;const t=_i(),e=Yt(),r=To(),n=Yt(),i=Si(),o=$i(),a=wi(),l=W(),u=Te(),b=ar(),y=Q(),$=sr();function v(x){if(c(x)&&(P(x),S(x))){d(x);return}_(x,()=>(0,t.topBoolOrEmptySchema)(x))}we.validateFunctionCode=v;function _({gen:x,validateName:C,schema:O,schemaEnv:M,opts:B},H){B.code.es5?x.func(C,(0,l._)`${u.default.data}, ${u.default.valCxt}`,M.$async,()=>{x.code((0,l._)`"use strict"; ${s(O,B)}`),w(x,B),x.code(H)}):x.func(C,(0,l._)`${u.default.data}, ${g(B)}`,M.$async,()=>x.code(s(O,B)).code(H))}function g(x){return(0,l._)`{${u.default.instancePath}="", ${u.default.parentData}, ${u.default.parentDataProperty}, ${u.default.rootData}=${u.default.data}${x.dynamicRef?(0,l._)`, ${u.default.dynamicAnchors}={}`:l.nil}}={}`}function w(x,C){x.if(u.default.valCxt,()=>{x.var(u.default.instancePath,(0,l._)`${u.default.valCxt}.${u.default.instancePath}`),x.var(u.default.parentData,(0,l._)`${u.default.valCxt}.${u.default.parentData}`),x.var(u.default.parentDataProperty,(0,l._)`${u.default.valCxt}.${u.default.parentDataProperty}`),x.var(u.default.rootData,(0,l._)`${u.default.valCxt}.${u.default.rootData}`),C.dynamicRef&&x.var(u.default.dynamicAnchors,(0,l._)`${u.default.valCxt}.${u.default.dynamicAnchors}`)},()=>{x.var(u.default.instancePath,(0,l._)`""`),x.var(u.default.parentData,(0,l._)`undefined`),x.var(u.default.parentDataProperty,(0,l._)`undefined`),x.var(u.default.rootData,u.default.data),C.dynamicRef&&x.var(u.default.dynamicAnchors,(0,l._)`{}`)})}function d(x){const{schema:C,opts:O,gen:M}=x;_(x,()=>{O.$comment&&C.$comment&&z(x),F(x),M.let(u.default.vErrors,null),M.let(u.default.errors,0),O.unevaluated&&f(x),j(x),Y(x)})}function f(x){const{gen:C,validateName:O}=x;x.evaluated=C.const("evaluated",(0,l._)`${O}.evaluated`),C.if((0,l._)`${x.evaluated}.dynamicProps`,()=>C.assign((0,l._)`${x.evaluated}.props`,(0,l._)`undefined`)),C.if((0,l._)`${x.evaluated}.dynamicItems`,()=>C.assign((0,l._)`${x.evaluated}.items`,(0,l._)`undefined`))}function s(x,C){const O=typeof x=="object"&&x[C.schemaId];return O&&(C.code.source||C.code.process)?(0,l._)`/*# sourceURL=${O} */`:l.nil}function p(x,C){if(c(x)&&(P(x),S(x))){h(x,C);return}(0,t.boolOrEmptySchema)(x,C)}function S({schema:x,self:C}){if(typeof x=="boolean")return!x;for(const O in x)if(C.RULES.all[O])return!0;return!1}function c(x){return typeof x.schema!="boolean"}function h(x,C){const{schema:O,gen:M,opts:B}=x;B.$comment&&O.$comment&&z(x),q(x),U(x);const H=M.const("_errs",u.default.errors);j(x,H),M.var(C,(0,l._)`${H} === ${u.default.errors}`)}function P(x){(0,y.checkUnknownRules)(x),A(x)}function j(x,C){if(x.opts.jtd)return Se(x,[],!1,C);const O=(0,e.getSchemaTypes)(x.schema),M=(0,e.coerceAndCheckDataType)(x,O);Se(x,O,!M,C)}function A(x){const{schema:C,errSchemaPath:O,opts:M,self:B}=x;C.$ref&&M.ignoreKeywordsWithRef&&(0,y.schemaHasRulesButRef)(C,B.RULES)&&B.logger.warn(`$ref: keywords ignored in schema at path "${O}"`)}function F(x){const{schema:C,opts:O}=x;C.default!==void 0&&O.useDefaults&&O.strictSchema&&(0,y.checkStrictMode)(x,"default is ignored in the schema root")}function q(x){const C=x.schema[x.opts.schemaId];C&&(x.baseId=(0,b.resolveUrl)(x.opts.uriResolver,x.baseId,C))}function U(x){if(x.schema.$async&&!x.schemaEnv.$async)throw new Error("async schema in sync schema")}function z({gen:x,schemaEnv:C,schema:O,errSchemaPath:M,opts:B}){const H=O.$comment;if(B.$comment===!0)x.code((0,l._)`${u.default.self}.logger.log(${H})`);else if(typeof B.$comment=="function"){const ae=(0,l.str)`${M}/$comment`,ve=x.scopeValue("root",{ref:C.root});x.code((0,l._)`${u.default.self}.opts.$comment(${H}, ${ae}, ${ve}.schema)`)}}function Y(x){const{gen:C,schemaEnv:O,validateName:M,ValidationError:B,opts:H}=x;O.$async?C.if((0,l._)`${u.default.errors} === 0`,()=>C.return(u.default.data),()=>C.throw((0,l._)`new ${B}(${u.default.vErrors})`)):(C.assign((0,l._)`${M}.errors`,u.default.vErrors),H.unevaluated&&ie(x),C.return((0,l._)`${u.default.errors} === 0`))}function ie({gen:x,evaluated:C,props:O,items:M}){O instanceof l.Name&&x.assign((0,l._)`${C}.props`,O),M instanceof l.Name&&x.assign((0,l._)`${C}.items`,M)}function Se(x,C,O,M){const{gen:B,schema:H,data:ae,allErrors:ve,opts:fe,self:he}=x,{RULES:le}=he;if(H.$ref&&(fe.ignoreKeywordsWithRef||!(0,y.schemaHasRulesButRef)(H,le))){B.block(()=>D(x,"$ref",le.all.$ref.definition));return}fe.jtd||ne(x,C),B.block(()=>{for(const ge of le.rules)Be(ge);Be(le.post)});function Be(ge){(0,r.shouldUseGroup)(H,ge)&&(ge.type?(B.if((0,n.checkDataType)(ge.type,ae,fe.strictNumbers)),$e(x,ge),C.length===1&&C[0]===ge.type&&O&&(B.else(),(0,n.reportTypeError)(x)),B.endIf()):$e(x,ge),ve||B.if((0,l._)`${u.default.errors} === ${M||0}`))}}function $e(x,C){const{gen:O,schema:M,opts:{useDefaults:B}}=x;B&&(0,i.assignDefaults)(x,C.type),O.block(()=>{for(const H of C.rules)(0,r.shouldUseRule)(M,H)&&D(x,H.keyword,H.definition,C.type)})}function ne(x,C){x.schemaEnv.meta||!x.opts.strictTypes||(Ee(x,C),x.opts.allowUnionTypes||I(x,C),E(x,x.dataTypes))}function Ee(x,C){if(C.length){if(!x.dataTypes.length){x.dataTypes=C;return}C.forEach(O=>{N(x.dataTypes,O)||k(x,`type "${O}" not allowed by context "${x.dataTypes.join(",")}"`)}),m(x,C)}}function I(x,C){C.length>1&&!(C.length===2&&C.includes("null"))&&k(x,"use allowUnionTypes to allow union type keyword")}function E(x,C){const O=x.self.RULES.all;for(const M in O){const B=O[M];if(typeof B=="object"&&(0,r.shouldUseRule)(x.schema,B)){const{type:H}=B.definition;H.length&&!H.some(ae=>R(C,ae))&&k(x,`missing type "${H.join(",")}" for keyword "${M}"`)}}}function R(x,C){return x.includes(C)||C==="number"&&x.includes("integer")}function N(x,C){return x.includes(C)||C==="integer"&&x.includes("number")}function m(x,C){const O=[];for(const M of x.dataTypes)N(C,M)?O.push(M):C.includes("integer")&&M==="number"&&O.push("integer");x.dataTypes=O}function k(x,C){const O=x.schemaEnv.baseId+x.errSchemaPath;C+=` at "${O}" (strictTypes)`,(0,y.checkStrictMode)(x,C,x.opts.strictTypes)}class T{constructor(C,O,M){if((0,o.validateKeywordUsage)(C,O,M),this.gen=C.gen,this.allErrors=C.allErrors,this.keyword=M,this.data=C.data,this.schema=C.schema[M],this.$data=O.$data&&C.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,y.schemaRefOrVal)(C,this.schema,M,this.$data),this.schemaType=O.schemaType,this.parentSchema=C.schema,this.params={},this.it=C,this.def=O,this.$data)this.schemaCode=C.gen.const("vSchema",Z(this.$data,C));else if(this.schemaCode=this.schemaValue,!(0,o.validSchemaType)(this.schema,O.schemaType,O.allowUndefined))throw new Error(`${M} value must be ${JSON.stringify(O.schemaType)}`);("code"in O?O.trackErrors:O.errors!==!1)&&(this.errsCount=C.gen.const("_errs",u.default.errors))}result(C,O,M){this.failResult((0,l.not)(C),O,M)}failResult(C,O,M){this.gen.if(C),M?M():this.error(),O?(this.gen.else(),O(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(C,O){this.failResult((0,l.not)(C),void 0,O)}fail(C){if(C===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(C),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(C){if(!this.$data)return this.fail(C);const{schemaCode:O}=this;this.fail((0,l._)`${O} !== undefined && (${(0,l.or)(this.invalid$data(),C)})`)}error(C,O,M){if(O){this.setParams(O),this._error(C,M),this.setParams({});return}this._error(C,M)}_error(C,O){(C?$.reportExtraError:$.reportError)(this,this.def.error,O)}$dataError(){(0,$.reportError)(this,this.def.$dataError||$.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,$.resetErrorsCount)(this.gen,this.errsCount)}ok(C){this.allErrors||this.gen.if(C)}setParams(C,O){O?Object.assign(this.params,C):this.params=C}block$data(C,O,M=l.nil){this.gen.block(()=>{this.check$data(C,M),O()})}check$data(C=l.nil,O=l.nil){if(!this.$data)return;const{gen:M,schemaCode:B,schemaType:H,def:ae}=this;M.if((0,l.or)((0,l._)`${B} === undefined`,O)),C!==l.nil&&M.assign(C,!0),(H.length||ae.validateSchema)&&(M.elseIf(this.invalid$data()),this.$dataError(),C!==l.nil&&M.assign(C,!1)),M.else()}invalid$data(){const{gen:C,schemaCode:O,schemaType:M,def:B,it:H}=this;return(0,l.or)(ae(),ve());function ae(){if(M.length){if(!(O instanceof l.Name))throw new Error("ajv implementation error");const fe=Array.isArray(M)?M:[M];return(0,l._)`${(0,n.checkDataTypes)(fe,O,H.opts.strictNumbers,n.DataType.Wrong)}`}return l.nil}function ve(){if(B.validateSchema){const fe=C.scopeValue("validate$data",{ref:B.validateSchema});return(0,l._)`!${fe}(${O})`}return l.nil}}subschema(C,O){const M=(0,a.getSubschema)(this.it,C);(0,a.extendSubschemaData)(M,this.it,C),(0,a.extendSubschemaMode)(M,C);const B={...this.it,...M,items:void 0,props:void 0};return p(B,O),B}mergeEvaluated(C,O){const{it:M,gen:B}=this;M.opts.unevaluated&&(M.props!==!0&&C.props!==void 0&&(M.props=y.mergeEvaluated.props(B,C.props,M.props,O)),M.items!==!0&&C.items!==void 0&&(M.items=y.mergeEvaluated.items(B,C.items,M.items,O)))}mergeValidEvaluated(C,O){const{it:M,gen:B}=this;if(M.opts.unevaluated&&(M.props!==!0||M.items!==!0))return B.if(O,()=>this.mergeEvaluated(C,l.Name)),!0}}we.KeywordCxt=T;function D(x,C,O,M){const B=new T(x,O,C);"code"in O?O.code(B,M):B.$data&&O.validate?(0,o.funcKeywordCode)(B,O):"macro"in O?(0,o.macroKeywordCode)(B,O):(O.compile||O.validate)&&(0,o.funcKeywordCode)(B,O)}const L=/^\/(?:[^~]|~0|~1)*$/,X=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function Z(x,{dataLevel:C,dataNames:O,dataPathArr:M}){let B,H;if(x==="")return u.default.rootData;if(x[0]==="/"){if(!L.test(x))throw new Error(`Invalid JSON-pointer: ${x}`);B=x,H=u.default.rootData}else{const he=X.exec(x);if(!he)throw new Error(`Invalid JSON-pointer: ${x}`);const le=+he[1];if(B=he[2],B==="#"){if(le>=C)throw new Error(fe("property/index",le));return M[C-le]}if(le>C)throw new Error(fe("data",le));if(H=O[C-le],!B)return H}let ae=H;const ve=B.split("/");for(const he of ve)he&&(H=(0,l._)`${H}${(0,l.getProperty)((0,y.unescapeJsonPointer)(he))}`,ae=(0,l._)`${ae} && ${H}`);return ae;function fe(he,le){return`Cannot access ${he} ${le} levels up, current level is ${C}`}}return we.getData=Z,we}var pt={},_n;function Br(){if(_n)return pt;_n=1,Object.defineProperty(pt,"__esModule",{value:!0});class t extends Error{constructor(r){super("validation failed"),this.errors=r,this.ajv=this.validation=!0}}return pt.default=t,pt}var ft={},Sn;function cr(){if(Sn)return ft;Sn=1,Object.defineProperty(ft,"__esModule",{value:!0});const t=ar();class e extends Error{constructor(n,i,o,a){super(a||`can't resolve reference ${o} from id ${i}`),this.missingRef=(0,t.resolveUrl)(n,i,o),this.missingSchema=(0,t.normalizeId)((0,t.getFullPath)(n,this.missingRef))}}return ft.default=e,ft}var ye={},$n;function Lr(){if($n)return ye;$n=1,Object.defineProperty(ye,"__esModule",{value:!0}),ye.resolveSchema=ye.getCompilingSchema=ye.resolveRef=ye.compileSchema=ye.SchemaEnv=void 0;const t=W(),e=Br(),r=Te(),n=ar(),i=Q(),o=lr();class a{constructor(f){var s;this.refs={},this.dynamicAnchors={};let p;typeof f.schema=="object"&&(p=f.schema),this.schema=f.schema,this.schemaId=f.schemaId,this.root=f.root||this,this.baseId=(s=f.baseId)!==null&&s!==void 0?s:(0,n.normalizeId)(p?.[f.schemaId||"$id"]),this.schemaPath=f.schemaPath,this.localRefs=f.localRefs,this.meta=f.meta,this.$async=p?.$async,this.refs={}}}ye.SchemaEnv=a;function l(d){const f=y.call(this,d);if(f)return f;const s=(0,n.getFullPath)(this.opts.uriResolver,d.root.baseId),{es5:p,lines:S}=this.opts.code,{ownProperties:c}=this.opts,h=new t.CodeGen(this.scope,{es5:p,lines:S,ownProperties:c});let P;d.$async&&(P=h.scopeValue("Error",{ref:e.default,code:(0,t._)`require("ajv/dist/runtime/validation_error").default`}));const j=h.scopeName("validate");d.validateName=j;const A={gen:h,allErrors:this.opts.allErrors,data:r.default.data,parentData:r.default.parentData,parentDataProperty:r.default.parentDataProperty,dataNames:[r.default.data],dataPathArr:[t.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:h.scopeValue("schema",this.opts.code.source===!0?{ref:d.schema,code:(0,t.stringify)(d.schema)}:{ref:d.schema}),validateName:j,ValidationError:P,schema:d.schema,schemaEnv:d,rootId:s,baseId:d.baseId||s,schemaPath:t.nil,errSchemaPath:d.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,t._)`""`,opts:this.opts,self:this};let F;try{this._compilations.add(d),(0,o.validateFunctionCode)(A),h.optimize(this.opts.code.optimize);const q=h.toString();F=`${h.scopeRefs(r.default.scope)}return ${q}`,this.opts.code.process&&(F=this.opts.code.process(F,d));const z=new Function(`${r.default.self}`,`${r.default.scope}`,F)(this,this.scope.get());if(this.scope.value(j,{ref:z}),z.errors=null,z.schema=d.schema,z.schemaEnv=d,d.$async&&(z.$async=!0),this.opts.code.source===!0&&(z.source={validateName:j,validateCode:q,scopeValues:h._values}),this.opts.unevaluated){const{props:Y,items:ie}=A;z.evaluated={props:Y instanceof t.Name?void 0:Y,items:ie instanceof t.Name?void 0:ie,dynamicProps:Y instanceof t.Name,dynamicItems:ie instanceof t.Name},z.source&&(z.source.evaluated=(0,t.stringify)(z.evaluated))}return d.validate=z,d}catch(q){throw delete d.validate,delete d.validateName,F&&this.logger.error("Error compiling schema, function code:",F),q}finally{this._compilations.delete(d)}}ye.compileSchema=l;function u(d,f,s){var p;s=(0,n.resolveUrl)(this.opts.uriResolver,f,s);const S=d.refs[s];if(S)return S;let c=v.call(this,d,s);if(c===void 0){const h=(p=d.localRefs)===null||p===void 0?void 0:p[s],{schemaId:P}=this.opts;h&&(c=new a({schema:h,schemaId:P,root:d,baseId:f}))}if(c!==void 0)return d.refs[s]=b.call(this,c)}ye.resolveRef=u;function b(d){return(0,n.inlineRef)(d.schema,this.opts.inlineRefs)?d.schema:d.validate?d:l.call(this,d)}function y(d){for(const f of this._compilations)if($(f,d))return f}ye.getCompilingSchema=y;function $(d,f){return d.schema===f.schema&&d.root===f.root&&d.baseId===f.baseId}function v(d,f){let s;for(;typeof(s=this.refs[f])=="string";)f=s;return s||this.schemas[f]||_.call(this,d,f)}function _(d,f){const s=this.opts.uriResolver.parse(f),p=(0,n._getFullPath)(this.opts.uriResolver,s);let S=(0,n.getFullPath)(this.opts.uriResolver,d.baseId,void 0);if(Object.keys(d.schema).length>0&&p===S)return w.call(this,s,d);const c=(0,n.normalizeId)(p),h=this.refs[c]||this.schemas[c];if(typeof h=="string"){const P=_.call(this,d,h);return typeof P?.schema!="object"?void 0:w.call(this,s,P)}if(typeof h?.schema=="object"){if(h.validate||l.call(this,h),c===(0,n.normalizeId)(f)){const{schema:P}=h,{schemaId:j}=this.opts,A=P[j];return A&&(S=(0,n.resolveUrl)(this.opts.uriResolver,S,A)),new a({schema:P,schemaId:j,root:d,baseId:S})}return w.call(this,s,h)}}ye.resolveSchema=_;const g=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function w(d,{baseId:f,schema:s,root:p}){var S;if(((S=d.fragment)===null||S===void 0?void 0:S[0])!=="/")return;for(const P of d.fragment.slice(1).split("/")){if(typeof s=="boolean")return;const j=s[(0,i.unescapeFragment)(P)];if(j===void 0)return;s=j;const A=typeof s=="object"&&s[this.opts.schemaId];!g.has(P)&&A&&(f=(0,n.resolveUrl)(this.opts.uriResolver,f,A))}let c;if(typeof s!="boolean"&&s.$ref&&!(0,i.schemaHasRulesButRef)(s,this.RULES)){const P=(0,n.resolveUrl)(this.opts.uriResolver,f,s.$ref);c=_.call(this,p,P)}const{schemaId:h}=this.opts;if(c=c||new a({schema:s,schemaId:h,root:p,baseId:f}),c.schema!==c.root.schema)return c}return ye}const ki="https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",xi="Meta-schema for $data reference (JSON AnySchema extension proposal)",Ei="object",Ci=["$data"],Ni={$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},ji=!1,Ti={$id:ki,description:xi,type:Ei,required:Ci,properties:Ni,additionalProperties:ji};var ht={},tt={exports:{}},xr,wn;function Ro(){if(wn)return xr;wn=1;const t=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),e=RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u);function r(v){let _="",g=0,w=0;for(w=0;w<v.length;w++)if(g=v[w].charCodeAt(0),g!==48){if(!(g>=48&&g<=57||g>=65&&g<=70||g>=97&&g<=102))return"";_+=v[w];break}for(w+=1;w<v.length;w++){if(g=v[w].charCodeAt(0),!(g>=48&&g<=57||g>=65&&g<=70||g>=97&&g<=102))return"";_+=v[w]}return _}const n=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function i(v){return v.length=0,!0}function o(v,_,g){if(v.length){const w=r(v);if(w!=="")_.push(w);else return g.error=!0,!1;v.length=0}return!0}function a(v){let _=0;const g={error:!1,address:"",zone:""},w=[],d=[];let f=!1,s=!1,p=o;for(let S=0;S<v.length;S++){const c=v[S];if(!(c==="["||c==="]"))if(c===":"){if(f===!0&&(s=!0),!p(d,w,g))break;if(++_>7){g.error=!0;break}S>0&&v[S-1]===":"&&(f=!0),w.push(":");continue}else if(c==="%"){if(!p(d,w,g))break;p=i}else{d.push(c);continue}}return d.length&&(p===i?g.zone=d.join(""):s?w.push(d.join("")):w.push(r(d))),g.address=w.join(""),g}function l(v){if(u(v,":")<2)return{host:v,isIPV6:!1};const _=a(v);if(_.error)return{host:v,isIPV6:!1};{let g=_.address,w=_.address;return _.zone&&(g+="%"+_.zone,w+="%25"+_.zone),{host:g,isIPV6:!0,escapedHost:w}}}function u(v,_){let g=0;for(let w=0;w<v.length;w++)v[w]===_&&g++;return g}function b(v){let _=v;const g=[];let w=-1,d=0;for(;d=_.length;){if(d===1){if(_===".")break;if(_==="/"){g.push("/");break}else{g.push(_);break}}else if(d===2){if(_[0]==="."){if(_[1]===".")break;if(_[1]==="/"){_=_.slice(2);continue}}else if(_[0]==="/"&&(_[1]==="."||_[1]==="/")){g.push("/");break}}else if(d===3&&_==="/.."){g.length!==0&&g.pop(),g.push("/");break}if(_[0]==="."){if(_[1]==="."){if(_[2]==="/"){_=_.slice(3);continue}}else if(_[1]==="/"){_=_.slice(2);continue}}else if(_[0]==="/"&&_[1]==="."){if(_[2]==="/"){_=_.slice(2);continue}else if(_[2]==="."&&_[3]==="/"){_=_.slice(3),g.length!==0&&g.pop();continue}}if((w=_.indexOf("/",1))===-1){g.push(_);break}else g.push(_.slice(0,w)),_=_.slice(w)}return g.join("")}function y(v,_){const g=_!==!0?escape:unescape;return v.scheme!==void 0&&(v.scheme=g(v.scheme)),v.userinfo!==void 0&&(v.userinfo=g(v.userinfo)),v.host!==void 0&&(v.host=g(v.host)),v.path!==void 0&&(v.path=g(v.path)),v.query!==void 0&&(v.query=g(v.query)),v.fragment!==void 0&&(v.fragment=g(v.fragment)),v}function $(v){const _=[];if(v.userinfo!==void 0&&(_.push(v.userinfo),_.push("@")),v.host!==void 0){let g=unescape(v.host);if(!e(g)){const w=l(g);w.isIPV6===!0?g=`[${w.escapedHost}]`:g=v.host}_.push(g)}return(typeof v.port=="number"||typeof v.port=="string")&&(_.push(":"),_.push(String(v.port))),_.length?_.join(""):void 0}return xr={nonSimpleDomain:n,recomposeAuthority:$,normalizeComponentEncoding:y,removeDotSegments:b,isIPv4:e,isUUID:t,normalizeIPv6:l,stringArrayToHexStripped:r},xr}var Er,Pn;function Oi(){if(Pn)return Er;Pn=1;const{isUUID:t}=Ro(),e=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,r=["http","https","ws","wss","urn","urn:uuid"];function n(c){return r.indexOf(c)!==-1}function i(c){return c.secure===!0?!0:c.secure===!1?!1:c.scheme?c.scheme.length===3&&(c.scheme[0]==="w"||c.scheme[0]==="W")&&(c.scheme[1]==="s"||c.scheme[1]==="S")&&(c.scheme[2]==="s"||c.scheme[2]==="S"):!1}function o(c){return c.host||(c.error=c.error||"HTTP URIs must have a host."),c}function a(c){const h=String(c.scheme).toLowerCase()==="https";return(c.port===(h?443:80)||c.port==="")&&(c.port=void 0),c.path||(c.path="/"),c}function l(c){return c.secure=i(c),c.resourceName=(c.path||"/")+(c.query?"?"+c.query:""),c.path=void 0,c.query=void 0,c}function u(c){if((c.port===(i(c)?443:80)||c.port==="")&&(c.port=void 0),typeof c.secure=="boolean"&&(c.scheme=c.secure?"wss":"ws",c.secure=void 0),c.resourceName){const[h,P]=c.resourceName.split("?");c.path=h&&h!=="/"?h:void 0,c.query=P,c.resourceName=void 0}return c.fragment=void 0,c}function b(c,h){if(!c.path)return c.error="URN can not be parsed",c;const P=c.path.match(e);if(P){const j=h.scheme||c.scheme||"urn";c.nid=P[1].toLowerCase(),c.nss=P[2];const A=`${j}:${h.nid||c.nid}`,F=S(A);c.path=void 0,F&&(c=F.parse(c,h))}else c.error=c.error||"URN can not be parsed.";return c}function y(c,h){if(c.nid===void 0)throw new Error("URN without nid cannot be serialized");const P=h.scheme||c.scheme||"urn",j=c.nid.toLowerCase(),A=`${P}:${h.nid||j}`,F=S(A);F&&(c=F.serialize(c,h));const q=c,U=c.nss;return q.path=`${j||h.nid}:${U}`,h.skipEscape=!0,q}function $(c,h){const P=c;return P.uuid=P.nss,P.nss=void 0,!h.tolerant&&(!P.uuid||!t(P.uuid))&&(P.error=P.error||"UUID is not valid."),P}function v(c){const h=c;return h.nss=(c.uuid||"").toLowerCase(),h}const _={scheme:"http",domainHost:!0,parse:o,serialize:a},g={scheme:"https",domainHost:_.domainHost,parse:o,serialize:a},w={scheme:"ws",domainHost:!0,parse:l,serialize:u},d={scheme:"wss",domainHost:w.domainHost,parse:w.parse,serialize:w.serialize},p={http:_,https:g,ws:w,wss:d,urn:{scheme:"urn",parse:b,serialize:y,skipNormalize:!0},"urn:uuid":{scheme:"urn:uuid",parse:$,serialize:v,skipNormalize:!0}};Object.setPrototypeOf(p,null);function S(c){return c&&(p[c]||p[c.toLowerCase()])||void 0}return Er={wsIsSecure:i,SCHEMES:p,isValidSchemeName:n,getSchemeHandler:S},Er}var kn;function Ri(){if(kn)return tt.exports;kn=1;const{normalizeIPv6:t,removeDotSegments:e,recomposeAuthority:r,normalizeComponentEncoding:n,isIPv4:i,nonSimpleDomain:o}=Ro(),{SCHEMES:a,getSchemeHandler:l}=Oi();function u(d,f){return typeof d=="string"?d=v(g(d,f),f):typeof d=="object"&&(d=g(v(d,f),f)),d}function b(d,f,s){const p=s?Object.assign({scheme:"null"},s):{scheme:"null"},S=y(g(d,p),g(f,p),p,!0);return p.skipEscape=!0,v(S,p)}function y(d,f,s,p){const S={};return p||(d=g(v(d,s),s),f=g(v(f,s),s)),s=s||{},!s.tolerant&&f.scheme?(S.scheme=f.scheme,S.userinfo=f.userinfo,S.host=f.host,S.port=f.port,S.path=e(f.path||""),S.query=f.query):(f.userinfo!==void 0||f.host!==void 0||f.port!==void 0?(S.userinfo=f.userinfo,S.host=f.host,S.port=f.port,S.path=e(f.path||""),S.query=f.query):(f.path?(f.path[0]==="/"?S.path=e(f.path):((d.userinfo!==void 0||d.host!==void 0||d.port!==void 0)&&!d.path?S.path="/"+f.path:d.path?S.path=d.path.slice(0,d.path.lastIndexOf("/")+1)+f.path:S.path=f.path,S.path=e(S.path)),S.query=f.query):(S.path=d.path,f.query!==void 0?S.query=f.query:S.query=d.query),S.userinfo=d.userinfo,S.host=d.host,S.port=d.port),S.scheme=d.scheme),S.fragment=f.fragment,S}function $(d,f,s){return typeof d=="string"?(d=unescape(d),d=v(n(g(d,s),!0),{...s,skipEscape:!0})):typeof d=="object"&&(d=v(n(d,!0),{...s,skipEscape:!0})),typeof f=="string"?(f=unescape(f),f=v(n(g(f,s),!0),{...s,skipEscape:!0})):typeof f=="object"&&(f=v(n(f,!0),{...s,skipEscape:!0})),d.toLowerCase()===f.toLowerCase()}function v(d,f){const s={host:d.host,scheme:d.scheme,userinfo:d.userinfo,port:d.port,path:d.path,query:d.query,nid:d.nid,nss:d.nss,uuid:d.uuid,fragment:d.fragment,reference:d.reference,resourceName:d.resourceName,secure:d.secure,error:""},p=Object.assign({},f),S=[],c=l(p.scheme||s.scheme);c&&c.serialize&&c.serialize(s,p),s.path!==void 0&&(p.skipEscape?s.path=unescape(s.path):(s.path=escape(s.path),s.scheme!==void 0&&(s.path=s.path.split("%3A").join(":")))),p.reference!=="suffix"&&s.scheme&&S.push(s.scheme,":");const h=r(s);if(h!==void 0&&(p.reference!=="suffix"&&S.push("//"),S.push(h),s.path&&s.path[0]!=="/"&&S.push("/")),s.path!==void 0){let P=s.path;!p.absolutePath&&(!c||!c.absolutePath)&&(P=e(P)),h===void 0&&P[0]==="/"&&P[1]==="/"&&(P="/%2F"+P.slice(2)),S.push(P)}return s.query!==void 0&&S.push("?",s.query),s.fragment!==void 0&&S.push("#",s.fragment),S.join("")}const _=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function g(d,f){const s=Object.assign({},f),p={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0};let S=!1;s.reference==="suffix"&&(s.scheme?d=s.scheme+":"+d:d="//"+d);const c=d.match(_);if(c){if(p.scheme=c[1],p.userinfo=c[3],p.host=c[4],p.port=parseInt(c[5],10),p.path=c[6]||"",p.query=c[7],p.fragment=c[8],isNaN(p.port)&&(p.port=c[5]),p.host)if(i(p.host)===!1){const j=t(p.host);p.host=j.host.toLowerCase(),S=j.isIPV6}else S=!0;p.scheme===void 0&&p.userinfo===void 0&&p.host===void 0&&p.port===void 0&&p.query===void 0&&!p.path?p.reference="same-document":p.scheme===void 0?p.reference="relative":p.fragment===void 0?p.reference="absolute":p.reference="uri",s.reference&&s.reference!=="suffix"&&s.reference!==p.reference&&(p.error=p.error||"URI is not a "+s.reference+" reference.");const h=l(s.scheme||p.scheme);if(!s.unicodeSupport&&(!h||!h.unicodeSupport)&&p.host&&(s.domainHost||h&&h.domainHost)&&S===!1&&o(p.host))try{p.host=URL.domainToASCII(p.host.toLowerCase())}catch(P){p.error=p.error||"Host's domain name can not be converted to ASCII: "+P}(!h||h&&!h.skipNormalize)&&(d.indexOf("%")!==-1&&(p.scheme!==void 0&&(p.scheme=unescape(p.scheme)),p.host!==void 0&&(p.host=unescape(p.host))),p.path&&(p.path=escape(unescape(p.path))),p.fragment&&(p.fragment=encodeURI(decodeURIComponent(p.fragment)))),h&&h.parse&&h.parse(p,s)}else p.error=p.error||"URI can not be parsed.";return p}const w={SCHEMES:a,normalize:u,resolve:b,resolveComponent:y,equal:$,serialize:v,parse:g};return tt.exports=w,tt.exports.default=w,tt.exports.fastUri=w,tt.exports}var xn;function Ai(){if(xn)return ht;xn=1,Object.defineProperty(ht,"__esModule",{value:!0});const t=Ri();return t.code='require("ajv/dist/runtime/uri").default',ht.default=t,ht}var En;function Ii(){return En||(En=1,(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;var e=lr();Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return e.KeywordCxt}});var r=W();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return r.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return r.CodeGen}});const n=Br(),i=cr(),o=jo(),a=Lr(),l=W(),u=ar(),b=Yt(),y=Q(),$=Ti,v=Ai(),_=(I,E)=>new RegExp(I,E);_.code="new RegExp";const g=["removeAdditional","useDefaults","coerceTypes"],w=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),d={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."},f={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},s=200;function p(I){var E,R,N,m,k,T,D,L,X,Z,x,C,O,M,B,H,ae,ve,fe,he,le,Be,ge,yr,gr;const Xe=I.strict,vr=(E=I.code)===null||E===void 0?void 0:E.optimize,Qr=vr===!0||vr===void 0?1:vr||0,Xr=(N=(R=I.code)===null||R===void 0?void 0:R.regExp)!==null&&N!==void 0?N:_,yi=(m=I.uriResolver)!==null&&m!==void 0?m:v.default;return{strictSchema:(T=(k=I.strictSchema)!==null&&k!==void 0?k:Xe)!==null&&T!==void 0?T:!0,strictNumbers:(L=(D=I.strictNumbers)!==null&&D!==void 0?D:Xe)!==null&&L!==void 0?L:!0,strictTypes:(Z=(X=I.strictTypes)!==null&&X!==void 0?X:Xe)!==null&&Z!==void 0?Z:"log",strictTuples:(C=(x=I.strictTuples)!==null&&x!==void 0?x:Xe)!==null&&C!==void 0?C:"log",strictRequired:(M=(O=I.strictRequired)!==null&&O!==void 0?O:Xe)!==null&&M!==void 0?M:!1,code:I.code?{...I.code,optimize:Qr,regExp:Xr}:{optimize:Qr,regExp:Xr},loopRequired:(B=I.loopRequired)!==null&&B!==void 0?B:s,loopEnum:(H=I.loopEnum)!==null&&H!==void 0?H:s,meta:(ae=I.meta)!==null&&ae!==void 0?ae:!0,messages:(ve=I.messages)!==null&&ve!==void 0?ve:!0,inlineRefs:(fe=I.inlineRefs)!==null&&fe!==void 0?fe:!0,schemaId:(he=I.schemaId)!==null&&he!==void 0?he:"$id",addUsedSchema:(le=I.addUsedSchema)!==null&&le!==void 0?le:!0,validateSchema:(Be=I.validateSchema)!==null&&Be!==void 0?Be:!0,validateFormats:(ge=I.validateFormats)!==null&&ge!==void 0?ge:!0,unicodeRegExp:(yr=I.unicodeRegExp)!==null&&yr!==void 0?yr:!0,int32range:(gr=I.int32range)!==null&&gr!==void 0?gr:!0,uriResolver:yi}}class S{constructor(E={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,E=this.opts={...E,...p(E)};const{es5:R,lines:N}=this.opts.code;this.scope=new l.ValueScope({scope:{},prefixes:w,es5:R,lines:N}),this.logger=U(E.logger);const m=E.validateFormats;E.validateFormats=!1,this.RULES=(0,o.getRules)(),c.call(this,d,E,"NOT SUPPORTED"),c.call(this,f,E,"DEPRECATED","warn"),this._metaOpts=F.call(this),E.formats&&j.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),E.keywords&&A.call(this,E.keywords),typeof E.meta=="object"&&this.addMetaSchema(E.meta),P.call(this),E.validateFormats=m}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:E,meta:R,schemaId:N}=this.opts;let m=$;N==="id"&&(m={...$},m.id=m.$id,delete m.$id),R&&E&&this.addMetaSchema(m,m[N],!1)}defaultMeta(){const{meta:E,schemaId:R}=this.opts;return this.opts.defaultMeta=typeof E=="object"?E[R]||E:void 0}validate(E,R){let N;if(typeof E=="string"){if(N=this.getSchema(E),!N)throw new Error(`no schema with key or ref "${E}"`)}else N=this.compile(E);const m=N(R);return"$async"in N||(this.errors=N.errors),m}compile(E,R){const N=this._addSchema(E,R);return N.validate||this._compileSchemaEnv(N)}compileAsync(E,R){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema:N}=this.opts;return m.call(this,E,R);async function m(Z,x){await k.call(this,Z.$schema);const C=this._addSchema(Z,x);return C.validate||T.call(this,C)}async function k(Z){Z&&!this.getSchema(Z)&&await m.call(this,{$ref:Z},!0)}async function T(Z){try{return this._compileSchemaEnv(Z)}catch(x){if(!(x instanceof i.default))throw x;return D.call(this,x),await L.call(this,x.missingSchema),T.call(this,Z)}}function D({missingSchema:Z,missingRef:x}){if(this.refs[Z])throw new Error(`AnySchema ${Z} is loaded but ${x} cannot be resolved`)}async function L(Z){const x=await X.call(this,Z);this.refs[Z]||await k.call(this,x.$schema),this.refs[Z]||this.addSchema(x,Z,R)}async function X(Z){const x=this._loading[Z];if(x)return x;try{return await(this._loading[Z]=N(Z))}finally{delete this._loading[Z]}}}addSchema(E,R,N,m=this.opts.validateSchema){if(Array.isArray(E)){for(const T of E)this.addSchema(T,void 0,N,m);return this}let k;if(typeof E=="object"){const{schemaId:T}=this.opts;if(k=E[T],k!==void 0&&typeof k!="string")throw new Error(`schema ${T} must be string`)}return R=(0,u.normalizeId)(R||k),this._checkUnique(R),this.schemas[R]=this._addSchema(E,N,R,m,!0),this}addMetaSchema(E,R,N=this.opts.validateSchema){return this.addSchema(E,R,!0,N),this}validateSchema(E,R){if(typeof E=="boolean")return!0;let N;if(N=E.$schema,N!==void 0&&typeof N!="string")throw new Error("$schema must be a string");if(N=N||this.opts.defaultMeta||this.defaultMeta(),!N)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const m=this.validate(N,E);if(!m&&R){const k="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(k);else throw new Error(k)}return m}getSchema(E){let R;for(;typeof(R=h.call(this,E))=="string";)E=R;if(R===void 0){const{schemaId:N}=this.opts,m=new a.SchemaEnv({schema:{},schemaId:N});if(R=a.resolveSchema.call(this,m,E),!R)return;this.refs[E]=R}return R.validate||this._compileSchemaEnv(R)}removeSchema(E){if(E instanceof RegExp)return this._removeAllSchemas(this.schemas,E),this._removeAllSchemas(this.refs,E),this;switch(typeof E){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const R=h.call(this,E);return typeof R=="object"&&this._cache.delete(R.schema),delete this.schemas[E],delete this.refs[E],this}case"object":{const R=E;this._cache.delete(R);let N=E[this.opts.schemaId];return N&&(N=(0,u.normalizeId)(N),delete this.schemas[N],delete this.refs[N]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(E){for(const R of E)this.addKeyword(R);return this}addKeyword(E,R){let N;if(typeof E=="string")N=E,typeof R=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),R.keyword=N);else if(typeof E=="object"&&R===void 0){if(R=E,N=R.keyword,Array.isArray(N)&&!N.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(Y.call(this,N,R),!R)return(0,y.eachItem)(N,k=>ie.call(this,k)),this;$e.call(this,R);const m={...R,type:(0,b.getJSONTypes)(R.type),schemaType:(0,b.getJSONTypes)(R.schemaType)};return(0,y.eachItem)(N,m.type.length===0?k=>ie.call(this,k,m):k=>m.type.forEach(T=>ie.call(this,k,m,T))),this}getKeyword(E){const R=this.RULES.all[E];return typeof R=="object"?R.definition:!!R}removeKeyword(E){const{RULES:R}=this;delete R.keywords[E],delete R.all[E];for(const N of R.rules){const m=N.rules.findIndex(k=>k.keyword===E);m>=0&&N.rules.splice(m,1)}return this}addFormat(E,R){return typeof R=="string"&&(R=new RegExp(R)),this.formats[E]=R,this}errorsText(E=this.errors,{separator:R=", ",dataVar:N="data"}={}){return!E||E.length===0?"No errors":E.map(m=>`${N}${m.instancePath} ${m.message}`).reduce((m,k)=>m+R+k)}$dataMetaSchema(E,R){const N=this.RULES.all;E=JSON.parse(JSON.stringify(E));for(const m of R){const k=m.split("/").slice(1);let T=E;for(const D of k)T=T[D];for(const D in N){const L=N[D];if(typeof L!="object")continue;const{$data:X}=L.definition,Z=T[D];X&&Z&&(T[D]=Ee(Z))}}return E}_removeAllSchemas(E,R){for(const N in E){const m=E[N];(!R||R.test(N))&&(typeof m=="string"?delete E[N]:m&&!m.meta&&(this._cache.delete(m.schema),delete E[N]))}}_addSchema(E,R,N,m=this.opts.validateSchema,k=this.opts.addUsedSchema){let T;const{schemaId:D}=this.opts;if(typeof E=="object")T=E[D];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof E!="boolean")throw new Error("schema must be object or boolean")}let L=this._cache.get(E);if(L!==void 0)return L;N=(0,u.normalizeId)(T||N);const X=u.getSchemaRefs.call(this,E,N);return L=new a.SchemaEnv({schema:E,schemaId:D,meta:R,baseId:N,localRefs:X}),this._cache.set(L.schema,L),k&&!N.startsWith("#")&&(N&&this._checkUnique(N),this.refs[N]=L),m&&this.validateSchema(E,!0),L}_checkUnique(E){if(this.schemas[E]||this.refs[E])throw new Error(`schema with key or id "${E}" already exists`)}_compileSchemaEnv(E){if(E.meta?this._compileMetaSchema(E):a.compileSchema.call(this,E),!E.validate)throw new Error("ajv implementation error");return E.validate}_compileMetaSchema(E){const R=this.opts;this.opts=this._metaOpts;try{a.compileSchema.call(this,E)}finally{this.opts=R}}}S.ValidationError=n.default,S.MissingRefError=i.default,t.default=S;function c(I,E,R,N="error"){for(const m in I){const k=m;k in E&&this.logger[N](`${R}: option ${m}. ${I[k]}`)}}function h(I){return I=(0,u.normalizeId)(I),this.schemas[I]||this.refs[I]}function P(){const I=this.opts.schemas;if(I)if(Array.isArray(I))this.addSchema(I);else for(const E in I)this.addSchema(I[E],E)}function j(){for(const I in this.opts.formats){const E=this.opts.formats[I];E&&this.addFormat(I,E)}}function A(I){if(Array.isArray(I)){this.addVocabulary(I);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const E in I){const R=I[E];R.keyword||(R.keyword=E),this.addKeyword(R)}}function F(){const I={...this.opts};for(const E of g)delete I[E];return I}const q={log(){},warn(){},error(){}};function U(I){if(I===!1)return q;if(I===void 0)return console;if(I.log&&I.warn&&I.error)return I;throw new Error("logger must implement log, warn and error methods")}const z=/^[a-z_$][a-z0-9_$:-]*$/i;function Y(I,E){const{RULES:R}=this;if((0,y.eachItem)(I,N=>{if(R.keywords[N])throw new Error(`Keyword ${N} is already defined`);if(!z.test(N))throw new Error(`Keyword ${N} has invalid name`)}),!!E&&E.$data&&!("code"in E||"validate"in E))throw new Error('$data keyword must have "code" or "validate" function')}function ie(I,E,R){var N;const m=E?.post;if(R&&m)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:k}=this;let T=m?k.post:k.rules.find(({type:L})=>L===R);if(T||(T={type:R,rules:[]},k.rules.push(T)),k.keywords[I]=!0,!E)return;const D={keyword:I,definition:{...E,type:(0,b.getJSONTypes)(E.type),schemaType:(0,b.getJSONTypes)(E.schemaType)}};E.before?Se.call(this,T,D,E.before):T.rules.push(D),k.all[I]=D,(N=E.implements)===null||N===void 0||N.forEach(L=>this.addKeyword(L))}function Se(I,E,R){const N=I.rules.findIndex(m=>m.keyword===R);N>=0?I.rules.splice(N,0,E):(I.rules.push(E),this.logger.warn(`rule ${R} is not defined`))}function $e(I){let{metaSchema:E}=I;E!==void 0&&(I.$data&&this.opts.$data&&(E=Ee(E)),I.validateSchema=this.compile(E,!0))}const ne={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function Ee(I){return{anyOf:[I,ne]}}})(br)),br}var mt={},yt={},gt={},Cn;function Mi(){if(Cn)return gt;Cn=1,Object.defineProperty(gt,"__esModule",{value:!0});const t={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};return gt.default=t,gt}var Ce={},Nn;function Fi(){if(Nn)return Ce;Nn=1,Object.defineProperty(Ce,"__esModule",{value:!0}),Ce.callRef=Ce.getValidate=void 0;const t=cr(),e=_e(),r=W(),n=Te(),i=Lr(),o=Q(),a={keyword:"$ref",schemaType:"string",code(b){const{gen:y,schema:$,it:v}=b,{baseId:_,schemaEnv:g,validateName:w,opts:d,self:f}=v,{root:s}=g;if(($==="#"||$==="#/")&&_===s.baseId)return S();const p=i.resolveRef.call(f,s,_,$);if(p===void 0)throw new t.default(v.opts.uriResolver,_,$);if(p instanceof i.SchemaEnv)return c(p);return h(p);function S(){if(g===s)return u(b,w,g,g.$async);const P=y.scopeValue("root",{ref:s});return u(b,(0,r._)`${P}.validate`,s,s.$async)}function c(P){const j=l(b,P);u(b,j,P,P.$async)}function h(P){const j=y.scopeValue("schema",d.code.source===!0?{ref:P,code:(0,r.stringify)(P)}:{ref:P}),A=y.name("valid"),F=b.subschema({schema:P,dataTypes:[],schemaPath:r.nil,topSchemaRef:j,errSchemaPath:$},A);b.mergeEvaluated(F),b.ok(A)}}};function l(b,y){const{gen:$}=b;return y.validate?$.scopeValue("validate",{ref:y.validate}):(0,r._)`${$.scopeValue("wrapper",{ref:y})}.validate`}Ce.getValidate=l;function u(b,y,$,v){const{gen:_,it:g}=b,{allErrors:w,schemaEnv:d,opts:f}=g,s=f.passContext?n.default.this:r.nil;v?p():S();function p(){if(!d.$async)throw new Error("async schema referenced by sync schema");const P=_.let("valid");_.try(()=>{_.code((0,r._)`await ${(0,e.callValidateCode)(b,y,s)}`),h(y),w||_.assign(P,!0)},j=>{_.if((0,r._)`!(${j} instanceof ${g.ValidationError})`,()=>_.throw(j)),c(j),w||_.assign(P,!1)}),b.ok(P)}function S(){b.result((0,e.callValidateCode)(b,y,s),()=>h(y),()=>c(y))}function c(P){const j=(0,r._)`${P}.errors`;_.assign(n.default.vErrors,(0,r._)`${n.default.vErrors} === null ? ${j} : ${n.default.vErrors}.concat(${j})`),_.assign(n.default.errors,(0,r._)`${n.default.vErrors}.length`)}function h(P){var j;if(!g.opts.unevaluated)return;const A=(j=$?.validate)===null||j===void 0?void 0:j.evaluated;if(g.props!==!0)if(A&&!A.dynamicProps)A.props!==void 0&&(g.props=o.mergeEvaluated.props(_,A.props,g.props));else{const F=_.var("props",(0,r._)`${P}.evaluated.props`);g.props=o.mergeEvaluated.props(_,F,g.props,r.Name)}if(g.items!==!0)if(A&&!A.dynamicItems)A.items!==void 0&&(g.items=o.mergeEvaluated.items(_,A.items,g.items));else{const F=_.var("items",(0,r._)`${P}.evaluated.items`);g.items=o.mergeEvaluated.items(_,F,g.items,r.Name)}}}return Ce.callRef=u,Ce.default=a,Ce}var jn;function qi(){if(jn)return yt;jn=1,Object.defineProperty(yt,"__esModule",{value:!0});const t=Mi(),e=Fi(),r=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",t.default,e.default];return yt.default=r,yt}var vt={},bt={},Tn;function Di(){if(Tn)return bt;Tn=1,Object.defineProperty(bt,"__esModule",{value:!0});const t=W(),e=t.operators,r={maximum:{okStr:"<=",ok:e.LTE,fail:e.GT},minimum:{okStr:">=",ok:e.GTE,fail:e.LT},exclusiveMaximum:{okStr:"<",ok:e.LT,fail:e.GTE},exclusiveMinimum:{okStr:">",ok:e.GT,fail:e.LTE}},n={message:({keyword:o,schemaCode:a})=>(0,t.str)`must be ${r[o].okStr} ${a}`,params:({keyword:o,schemaCode:a})=>(0,t._)`{comparison: ${r[o].okStr}, limit: ${a}}`},i={keyword:Object.keys(r),type:"number",schemaType:"number",$data:!0,error:n,code(o){const{keyword:a,data:l,schemaCode:u}=o;o.fail$data((0,t._)`${l} ${r[a].fail} ${u} || isNaN(${l})`)}};return bt.default=i,bt}var _t={},On;function Vi(){if(On)return _t;On=1,Object.defineProperty(_t,"__esModule",{value:!0});const t=W(),r={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:n})=>(0,t.str)`must be multiple of ${n}`,params:({schemaCode:n})=>(0,t._)`{multipleOf: ${n}}`},code(n){const{gen:i,data:o,schemaCode:a,it:l}=n,u=l.opts.multipleOfPrecision,b=i.let("res"),y=u?(0,t._)`Math.abs(Math.round(${b}) - ${b}) > 1e-${u}`:(0,t._)`${b} !== parseInt(${b})`;n.fail$data((0,t._)`(${a} === 0 || (${b} = ${o}/${a}, ${y}))`)}};return _t.default=r,_t}var St={},$t={},Rn;function Bi(){if(Rn)return $t;Rn=1,Object.defineProperty($t,"__esModule",{value:!0});function t(e){const r=e.length;let n=0,i=0,o;for(;i<r;)n++,o=e.charCodeAt(i++),o>=55296&&o<=56319&&i<r&&(o=e.charCodeAt(i),(o&64512)===56320&&i++);return n}return $t.default=t,t.code='require("ajv/dist/runtime/ucs2length").default',$t}var An;function Li(){if(An)return St;An=1,Object.defineProperty(St,"__esModule",{value:!0});const t=W(),e=Q(),r=Bi(),i={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:o,schemaCode:a}){const l=o==="maxLength"?"more":"fewer";return(0,t.str)`must NOT have ${l} than ${a} characters`},params:({schemaCode:o})=>(0,t._)`{limit: ${o}}`},code(o){const{keyword:a,data:l,schemaCode:u,it:b}=o,y=a==="maxLength"?t.operators.GT:t.operators.LT,$=b.opts.unicode===!1?(0,t._)`${l}.length`:(0,t._)`${(0,e.useFunc)(o.gen,r.default)}(${l})`;o.fail$data((0,t._)`${$} ${y} ${u}`)}};return St.default=i,St}var wt={},In;function zi(){if(In)return wt;In=1,Object.defineProperty(wt,"__esModule",{value:!0});const t=_e(),e=W(),n={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:i})=>(0,e.str)`must match pattern "${i}"`,params:({schemaCode:i})=>(0,e._)`{pattern: ${i}}`},code(i){const{data:o,$data:a,schema:l,schemaCode:u,it:b}=i,y=b.opts.unicodeRegExp?"u":"",$=a?(0,e._)`(new RegExp(${u}, ${y}))`:(0,t.usePattern)(i,l);i.fail$data((0,e._)`!${$}.test(${o})`)}};return wt.default=n,wt}var Pt={},Mn;function Ui(){if(Mn)return Pt;Mn=1,Object.defineProperty(Pt,"__esModule",{value:!0});const t=W(),r={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:n,schemaCode:i}){const o=n==="maxProperties"?"more":"fewer";return(0,t.str)`must NOT have ${o} than ${i} properties`},params:({schemaCode:n})=>(0,t._)`{limit: ${n}}`},code(n){const{keyword:i,data:o,schemaCode:a}=n,l=i==="maxProperties"?t.operators.GT:t.operators.LT;n.fail$data((0,t._)`Object.keys(${o}).length ${l} ${a}`)}};return Pt.default=r,Pt}var kt={},Fn;function Ki(){if(Fn)return kt;Fn=1,Object.defineProperty(kt,"__esModule",{value:!0});const t=_e(),e=W(),r=Q(),i={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:o}})=>(0,e.str)`must have required property '${o}'`,params:({params:{missingProperty:o}})=>(0,e._)`{missingProperty: ${o}}`},code(o){const{gen:a,schema:l,schemaCode:u,data:b,$data:y,it:$}=o,{opts:v}=$;if(!y&&l.length===0)return;const _=l.length>=v.loopRequired;if($.allErrors?g():w(),v.strictRequired){const s=o.parentSchema.properties,{definedProperties:p}=o.it;for(const S of l)if(s?.[S]===void 0&&!p.has(S)){const c=$.schemaEnv.baseId+$.errSchemaPath,h=`required property "${S}" is not defined at "${c}" (strictRequired)`;(0,r.checkStrictMode)($,h,$.opts.strictRequired)}}function g(){if(_||y)o.block$data(e.nil,d);else for(const s of l)(0,t.checkReportMissingProp)(o,s)}function w(){const s=a.let("missing");if(_||y){const p=a.let("valid",!0);o.block$data(p,()=>f(s,p)),o.ok(p)}else a.if((0,t.checkMissingProp)(o,l,s)),(0,t.reportMissingProp)(o,s),a.else()}function d(){a.forOf("prop",u,s=>{o.setParams({missingProperty:s}),a.if((0,t.noPropertyInData)(a,b,s,v.ownProperties),()=>o.error())})}function f(s,p){o.setParams({missingProperty:s}),a.forOf(s,u,()=>{a.assign(p,(0,t.propertyInData)(a,b,s,v.ownProperties)),a.if((0,e.not)(p),()=>{o.error(),a.break()})},e.nil)}}};return kt.default=i,kt}var xt={},qn;function Gi(){if(qn)return xt;qn=1,Object.defineProperty(xt,"__esModule",{value:!0});const t=W(),r={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:n,schemaCode:i}){const o=n==="maxItems"?"more":"fewer";return(0,t.str)`must NOT have ${o} than ${i} items`},params:({schemaCode:n})=>(0,t._)`{limit: ${n}}`},code(n){const{keyword:i,data:o,schemaCode:a}=n,l=i==="maxItems"?t.operators.GT:t.operators.LT;n.fail$data((0,t._)`${o}.length ${l} ${a}`)}};return xt.default=r,xt}var Et={},Ct={},Dn;function zr(){if(Dn)return Ct;Dn=1,Object.defineProperty(Ct,"__esModule",{value:!0});const t=Oo();return t.code='require("ajv/dist/runtime/equal").default',Ct.default=t,Ct}var Vn;function Hi(){if(Vn)return Et;Vn=1,Object.defineProperty(Et,"__esModule",{value:!0});const t=Yt(),e=W(),r=Q(),n=zr(),o={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:a,j:l}})=>(0,e.str)`must NOT have duplicate items (items ## ${l} and ${a} are identical)`,params:({params:{i:a,j:l}})=>(0,e._)`{i: ${a}, j: ${l}}`},code(a){const{gen:l,data:u,$data:b,schema:y,parentSchema:$,schemaCode:v,it:_}=a;if(!b&&!y)return;const g=l.let("valid"),w=$.items?(0,t.getSchemaTypes)($.items):[];a.block$data(g,d,(0,e._)`${v} === false`),a.ok(g);function d(){const S=l.let("i",(0,e._)`${u}.length`),c=l.let("j");a.setParams({i:S,j:c}),l.assign(g,!0),l.if((0,e._)`${S} > 1`,()=>(f()?s:p)(S,c))}function f(){return w.length>0&&!w.some(S=>S==="object"||S==="array")}function s(S,c){const h=l.name("item"),P=(0,t.checkDataTypes)(w,h,_.opts.strictNumbers,t.DataType.Wrong),j=l.const("indices",(0,e._)`{}`);l.for((0,e._)`;${S}--;`,()=>{l.let(h,(0,e._)`${u}[${S}]`),l.if(P,(0,e._)`continue`),w.length>1&&l.if((0,e._)`typeof ${h} == "string"`,(0,e._)`${h} += "_"`),l.if((0,e._)`typeof ${j}[${h}] == "number"`,()=>{l.assign(c,(0,e._)`${j}[${h}]`),a.error(),l.assign(g,!1).break()}).code((0,e._)`${j}[${h}] = ${S}`)})}function p(S,c){const h=(0,r.useFunc)(l,n.default),P=l.name("outer");l.label(P).for((0,e._)`;${S}--;`,()=>l.for((0,e._)`${c} = ${S}; ${c}--;`,()=>l.if((0,e._)`${h}(${u}[${S}], ${u}[${c}])`,()=>{a.error(),l.assign(g,!1).break(P)})))}}};return Et.default=o,Et}var Nt={},Bn;function Wi(){if(Bn)return Nt;Bn=1,Object.defineProperty(Nt,"__esModule",{value:!0});const t=W(),e=Q(),r=zr(),i={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:o})=>(0,t._)`{allowedValue: ${o}}`},code(o){const{gen:a,data:l,$data:u,schemaCode:b,schema:y}=o;u||y&&typeof y=="object"?o.fail$data((0,t._)`!${(0,e.useFunc)(a,r.default)}(${l}, ${b})`):o.fail((0,t._)`${y} !== ${l}`)}};return Nt.default=i,Nt}var jt={},Ln;function Ji(){if(Ln)return jt;Ln=1,Object.defineProperty(jt,"__esModule",{value:!0});const t=W(),e=Q(),r=zr(),i={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:o})=>(0,t._)`{allowedValues: ${o}}`},code(o){const{gen:a,data:l,$data:u,schema:b,schemaCode:y,it:$}=o;if(!u&&b.length===0)throw new Error("enum must have non-empty array");const v=b.length>=$.opts.loopEnum;let _;const g=()=>_??(_=(0,e.useFunc)(a,r.default));let w;if(v||u)w=a.let("valid"),o.block$data(w,d);else{if(!Array.isArray(b))throw new Error("ajv implementation error");const s=a.const("vSchema",y);w=(0,t.or)(...b.map((p,S)=>f(s,S)))}o.pass(w);function d(){a.assign(w,!1),a.forOf("v",y,s=>a.if((0,t._)`${g()}(${l}, ${s})`,()=>a.assign(w,!0).break()))}function f(s,p){const S=b[p];return typeof S=="object"&&S!==null?(0,t._)`${g()}(${l}, ${s}[${p}])`:(0,t._)`${l} === ${S}`}}};return jt.default=i,jt}var zn;function Zi(){if(zn)return vt;zn=1,Object.defineProperty(vt,"__esModule",{value:!0});const t=Di(),e=Vi(),r=Li(),n=zi(),i=Ui(),o=Ki(),a=Gi(),l=Hi(),u=Wi(),b=Ji(),y=[t.default,e.default,r.default,n.default,i.default,o.default,a.default,l.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},u.default,b.default];return vt.default=y,vt}var Tt={},Le={},Un;function Ao(){if(Un)return Le;Un=1,Object.defineProperty(Le,"__esModule",{value:!0}),Le.validateAdditionalItems=void 0;const t=W(),e=Q(),n={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:o}})=>(0,t.str)`must NOT have more than ${o} items`,params:({params:{len:o}})=>(0,t._)`{limit: ${o}}`},code(o){const{parentSchema:a,it:l}=o,{items:u}=a;if(!Array.isArray(u)){(0,e.checkStrictMode)(l,'"additionalItems" is ignored when "items" is not an array of schemas');return}i(o,u)}};function i(o,a){const{gen:l,schema:u,data:b,keyword:y,it:$}=o;$.items=!0;const v=l.const("len",(0,t._)`${b}.length`);if(u===!1)o.setParams({len:a.length}),o.pass((0,t._)`${v} <= ${a.length}`);else if(typeof u=="object"&&!(0,e.alwaysValidSchema)($,u)){const g=l.var("valid",(0,t._)`${v} <= ${a.length}`);l.if((0,t.not)(g),()=>_(g)),o.ok(g)}function _(g){l.forRange("i",a.length,v,w=>{o.subschema({keyword:y,dataProp:w,dataPropType:e.Type.Num},g),$.allErrors||l.if((0,t.not)(g),()=>l.break())})}}return Le.validateAdditionalItems=i,Le.default=n,Le}var Ot={},ze={},Kn;function Io(){if(Kn)return ze;Kn=1,Object.defineProperty(ze,"__esModule",{value:!0}),ze.validateTuple=void 0;const t=W(),e=Q(),r=_e(),n={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(o){const{schema:a,it:l}=o;if(Array.isArray(a))return i(o,"additionalItems",a);l.items=!0,!(0,e.alwaysValidSchema)(l,a)&&o.ok((0,r.validateArray)(o))}};function i(o,a,l=o.schema){const{gen:u,parentSchema:b,data:y,keyword:$,it:v}=o;w(b),v.opts.unevaluated&&l.length&&v.items!==!0&&(v.items=e.mergeEvaluated.items(u,l.length,v.items));const _=u.name("valid"),g=u.const("len",(0,t._)`${y}.length`);l.forEach((d,f)=>{(0,e.alwaysValidSchema)(v,d)||(u.if((0,t._)`${g} > ${f}`,()=>o.subschema({keyword:$,schemaProp:f,dataProp:f},_)),o.ok(_))});function w(d){const{opts:f,errSchemaPath:s}=v,p=l.length,S=p===d.minItems&&(p===d.maxItems||d[a]===!1);if(f.strictTuples&&!S){const c=`"${$}" is ${p}-tuple, but minItems or maxItems/${a} are not specified or different at path "${s}"`;(0,e.checkStrictMode)(v,c,f.strictTuples)}}}return ze.validateTuple=i,ze.default=n,ze}var Gn;function Yi(){if(Gn)return Ot;Gn=1,Object.defineProperty(Ot,"__esModule",{value:!0});const t=Io(),e={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:r=>(0,t.validateTuple)(r,"items")};return Ot.default=e,Ot}var Rt={},Hn;function Qi(){if(Hn)return Rt;Hn=1,Object.defineProperty(Rt,"__esModule",{value:!0});const t=W(),e=Q(),r=_e(),n=Ao(),o={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:a}})=>(0,t.str)`must NOT have more than ${a} items`,params:({params:{len:a}})=>(0,t._)`{limit: ${a}}`},code(a){const{schema:l,parentSchema:u,it:b}=a,{prefixItems:y}=u;b.items=!0,!(0,e.alwaysValidSchema)(b,l)&&(y?(0,n.validateAdditionalItems)(a,y):a.ok((0,r.validateArray)(a)))}};return Rt.default=o,Rt}var At={},Wn;function Xi(){if(Wn)return At;Wn=1,Object.defineProperty(At,"__esModule",{value:!0});const t=W(),e=Q(),n={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:i,max:o}})=>o===void 0?(0,t.str)`must contain at least ${i} valid item(s)`:(0,t.str)`must contain at least ${i} and no more than ${o} valid item(s)`,params:({params:{min:i,max:o}})=>o===void 0?(0,t._)`{minContains: ${i}}`:(0,t._)`{minContains: ${i}, maxContains: ${o}}`},code(i){const{gen:o,schema:a,parentSchema:l,data:u,it:b}=i;let y,$;const{minContains:v,maxContains:_}=l;b.opts.next?(y=v===void 0?1:v,$=_):y=1;const g=o.const("len",(0,t._)`${u}.length`);if(i.setParams({min:y,max:$}),$===void 0&&y===0){(0,e.checkStrictMode)(b,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if($!==void 0&&y>$){(0,e.checkStrictMode)(b,'"minContains" > "maxContains" is always invalid'),i.fail();return}if((0,e.alwaysValidSchema)(b,a)){let p=(0,t._)`${g} >= ${y}`;$!==void 0&&(p=(0,t._)`${p} && ${g} <= ${$}`),i.pass(p);return}b.items=!0;const w=o.name("valid");$===void 0&&y===1?f(w,()=>o.if(w,()=>o.break())):y===0?(o.let(w,!0),$!==void 0&&o.if((0,t._)`${u}.length > 0`,d)):(o.let(w,!1),d()),i.result(w,()=>i.reset());function d(){const p=o.name("_valid"),S=o.let("count",0);f(p,()=>o.if(p,()=>s(S)))}function f(p,S){o.forRange("i",0,g,c=>{i.subschema({keyword:"contains",dataProp:c,dataPropType:e.Type.Num,compositeRule:!0},p),S()})}function s(p){o.code((0,t._)`${p}++`),$===void 0?o.if((0,t._)`${p} >= ${y}`,()=>o.assign(w,!0).break()):(o.if((0,t._)`${p} > ${$}`,()=>o.assign(w,!1).break()),y===1?o.assign(w,!0):o.if((0,t._)`${p} >= ${y}`,()=>o.assign(w,!0)))}}};return At.default=n,At}var Cr={},Jn;function es(){return Jn||(Jn=1,(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.validateSchemaDeps=t.validatePropertyDeps=t.error=void 0;const e=W(),r=Q(),n=_e();t.error={message:({params:{property:u,depsCount:b,deps:y}})=>{const $=b===1?"property":"properties";return(0,e.str)`must have ${$} ${y} when property ${u} is present`},params:({params:{property:u,depsCount:b,deps:y,missingProperty:$}})=>(0,e._)`{property: ${u},
7
+ missingProperty: ${$},
8
+ depsCount: ${b},
9
+ deps: ${y}}`};const i={keyword:"dependencies",type:"object",schemaType:"object",error:t.error,code(u){const[b,y]=o(u);a(u,b),l(u,y)}};function o({schema:u}){const b={},y={};for(const $ in u){if($==="__proto__")continue;const v=Array.isArray(u[$])?b:y;v[$]=u[$]}return[b,y]}function a(u,b=u.schema){const{gen:y,data:$,it:v}=u;if(Object.keys(b).length===0)return;const _=y.let("missing");for(const g in b){const w=b[g];if(w.length===0)continue;const d=(0,n.propertyInData)(y,$,g,v.opts.ownProperties);u.setParams({property:g,depsCount:w.length,deps:w.join(", ")}),v.allErrors?y.if(d,()=>{for(const f of w)(0,n.checkReportMissingProp)(u,f)}):(y.if((0,e._)`${d} && (${(0,n.checkMissingProp)(u,w,_)})`),(0,n.reportMissingProp)(u,_),y.else())}}t.validatePropertyDeps=a;function l(u,b=u.schema){const{gen:y,data:$,keyword:v,it:_}=u,g=y.name("valid");for(const w in b)(0,r.alwaysValidSchema)(_,b[w])||(y.if((0,n.propertyInData)(y,$,w,_.opts.ownProperties),()=>{const d=u.subschema({keyword:v,schemaProp:w},g);u.mergeValidEvaluated(d,g)},()=>y.var(g,!0)),u.ok(g))}t.validateSchemaDeps=l,t.default=i})(Cr)),Cr}var It={},Zn;function ts(){if(Zn)return It;Zn=1,Object.defineProperty(It,"__esModule",{value:!0});const t=W(),e=Q(),n={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:i})=>(0,t._)`{propertyName: ${i.propertyName}}`},code(i){const{gen:o,schema:a,data:l,it:u}=i;if((0,e.alwaysValidSchema)(u,a))return;const b=o.name("valid");o.forIn("key",l,y=>{i.setParams({propertyName:y}),i.subschema({keyword:"propertyNames",data:y,dataTypes:["string"],propertyName:y,compositeRule:!0},b),o.if((0,t.not)(b),()=>{i.error(!0),u.allErrors||o.break()})}),i.ok(b)}};return It.default=n,It}var Mt={},Yn;function Mo(){if(Yn)return Mt;Yn=1,Object.defineProperty(Mt,"__esModule",{value:!0});const t=_e(),e=W(),r=Te(),n=Q(),o={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:a})=>(0,e._)`{additionalProperty: ${a.additionalProperty}}`},code(a){const{gen:l,schema:u,parentSchema:b,data:y,errsCount:$,it:v}=a;if(!$)throw new Error("ajv implementation error");const{allErrors:_,opts:g}=v;if(v.props=!0,g.removeAdditional!=="all"&&(0,n.alwaysValidSchema)(v,u))return;const w=(0,t.allSchemaProperties)(b.properties),d=(0,t.allSchemaProperties)(b.patternProperties);f(),a.ok((0,e._)`${$} === ${r.default.errors}`);function f(){l.forIn("key",y,h=>{!w.length&&!d.length?S(h):l.if(s(h),()=>S(h))})}function s(h){let P;if(w.length>8){const j=(0,n.schemaRefOrVal)(v,b.properties,"properties");P=(0,t.isOwnProperty)(l,j,h)}else w.length?P=(0,e.or)(...w.map(j=>(0,e._)`${h} === ${j}`)):P=e.nil;return d.length&&(P=(0,e.or)(P,...d.map(j=>(0,e._)`${(0,t.usePattern)(a,j)}.test(${h})`))),(0,e.not)(P)}function p(h){l.code((0,e._)`delete ${y}[${h}]`)}function S(h){if(g.removeAdditional==="all"||g.removeAdditional&&u===!1){p(h);return}if(u===!1){a.setParams({additionalProperty:h}),a.error(),_||l.break();return}if(typeof u=="object"&&!(0,n.alwaysValidSchema)(v,u)){const P=l.name("valid");g.removeAdditional==="failing"?(c(h,P,!1),l.if((0,e.not)(P),()=>{a.reset(),p(h)})):(c(h,P),_||l.if((0,e.not)(P),()=>l.break()))}}function c(h,P,j){const A={keyword:"additionalProperties",dataProp:h,dataPropType:n.Type.Str};j===!1&&Object.assign(A,{compositeRule:!0,createErrors:!1,allErrors:!1}),a.subschema(A,P)}}};return Mt.default=o,Mt}var Ft={},Qn;function rs(){if(Qn)return Ft;Qn=1,Object.defineProperty(Ft,"__esModule",{value:!0});const t=lr(),e=_e(),r=Q(),n=Mo(),i={keyword:"properties",type:"object",schemaType:"object",code(o){const{gen:a,schema:l,parentSchema:u,data:b,it:y}=o;y.opts.removeAdditional==="all"&&u.additionalProperties===void 0&&n.default.code(new t.KeywordCxt(y,n.default,"additionalProperties"));const $=(0,e.allSchemaProperties)(l);for(const d of $)y.definedProperties.add(d);y.opts.unevaluated&&$.length&&y.props!==!0&&(y.props=r.mergeEvaluated.props(a,(0,r.toHash)($),y.props));const v=$.filter(d=>!(0,r.alwaysValidSchema)(y,l[d]));if(v.length===0)return;const _=a.name("valid");for(const d of v)g(d)?w(d):(a.if((0,e.propertyInData)(a,b,d,y.opts.ownProperties)),w(d),y.allErrors||a.else().var(_,!0),a.endIf()),o.it.definedProperties.add(d),o.ok(_);function g(d){return y.opts.useDefaults&&!y.compositeRule&&l[d].default!==void 0}function w(d){o.subschema({keyword:"properties",schemaProp:d,dataProp:d},_)}}};return Ft.default=i,Ft}var qt={},Xn;function ns(){if(Xn)return qt;Xn=1,Object.defineProperty(qt,"__esModule",{value:!0});const t=_e(),e=W(),r=Q(),n=Q(),i={keyword:"patternProperties",type:"object",schemaType:"object",code(o){const{gen:a,schema:l,data:u,parentSchema:b,it:y}=o,{opts:$}=y,v=(0,t.allSchemaProperties)(l),_=v.filter(S=>(0,r.alwaysValidSchema)(y,l[S]));if(v.length===0||_.length===v.length&&(!y.opts.unevaluated||y.props===!0))return;const g=$.strictSchema&&!$.allowMatchingProperties&&b.properties,w=a.name("valid");y.props!==!0&&!(y.props instanceof e.Name)&&(y.props=(0,n.evaluatedPropsToName)(a,y.props));const{props:d}=y;f();function f(){for(const S of v)g&&s(S),y.allErrors?p(S):(a.var(w,!0),p(S),a.if(w))}function s(S){for(const c in g)new RegExp(S).test(c)&&(0,r.checkStrictMode)(y,`property ${c} matches pattern ${S} (use allowMatchingProperties)`)}function p(S){a.forIn("key",u,c=>{a.if((0,e._)`${(0,t.usePattern)(o,S)}.test(${c})`,()=>{const h=_.includes(S);h||o.subschema({keyword:"patternProperties",schemaProp:S,dataProp:c,dataPropType:n.Type.Str},w),y.opts.unevaluated&&d!==!0?a.assign((0,e._)`${d}[${c}]`,!0):!h&&!y.allErrors&&a.if((0,e.not)(w),()=>a.break())})})}}};return qt.default=i,qt}var Dt={},eo;function os(){if(eo)return Dt;eo=1,Object.defineProperty(Dt,"__esModule",{value:!0});const t=Q(),e={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(r){const{gen:n,schema:i,it:o}=r;if((0,t.alwaysValidSchema)(o,i)){r.fail();return}const a=n.name("valid");r.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},a),r.failResult(a,()=>r.reset(),()=>r.error())},error:{message:"must NOT be valid"}};return Dt.default=e,Dt}var Vt={},to;function is(){if(to)return Vt;to=1,Object.defineProperty(Vt,"__esModule",{value:!0});const e={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:_e().validateUnion,error:{message:"must match a schema in anyOf"}};return Vt.default=e,Vt}var Bt={},ro;function ss(){if(ro)return Bt;ro=1,Object.defineProperty(Bt,"__esModule",{value:!0});const t=W(),e=Q(),n={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:i})=>(0,t._)`{passingSchemas: ${i.passing}}`},code(i){const{gen:o,schema:a,parentSchema:l,it:u}=i;if(!Array.isArray(a))throw new Error("ajv implementation error");if(u.opts.discriminator&&l.discriminator)return;const b=a,y=o.let("valid",!1),$=o.let("passing",null),v=o.name("_valid");i.setParams({passing:$}),o.block(_),i.result(y,()=>i.reset(),()=>i.error(!0));function _(){b.forEach((g,w)=>{let d;(0,e.alwaysValidSchema)(u,g)?o.var(v,!0):d=i.subschema({keyword:"oneOf",schemaProp:w,compositeRule:!0},v),w>0&&o.if((0,t._)`${v} && ${y}`).assign(y,!1).assign($,(0,t._)`[${$}, ${w}]`).else(),o.if(v,()=>{o.assign(y,!0),o.assign($,w),d&&i.mergeEvaluated(d,t.Name)})})}}};return Bt.default=n,Bt}var Lt={},no;function as(){if(no)return Lt;no=1,Object.defineProperty(Lt,"__esModule",{value:!0});const t=Q(),e={keyword:"allOf",schemaType:"array",code(r){const{gen:n,schema:i,it:o}=r;if(!Array.isArray(i))throw new Error("ajv implementation error");const a=n.name("valid");i.forEach((l,u)=>{if((0,t.alwaysValidSchema)(o,l))return;const b=r.subschema({keyword:"allOf",schemaProp:u},a);r.ok(a),r.mergeEvaluated(b)})}};return Lt.default=e,Lt}var zt={},oo;function ls(){if(oo)return zt;oo=1,Object.defineProperty(zt,"__esModule",{value:!0});const t=W(),e=Q(),n={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:o})=>(0,t.str)`must match "${o.ifClause}" schema`,params:({params:o})=>(0,t._)`{failingKeyword: ${o.ifClause}}`},code(o){const{gen:a,parentSchema:l,it:u}=o;l.then===void 0&&l.else===void 0&&(0,e.checkStrictMode)(u,'"if" without "then" and "else" is ignored');const b=i(u,"then"),y=i(u,"else");if(!b&&!y)return;const $=a.let("valid",!0),v=a.name("_valid");if(_(),o.reset(),b&&y){const w=a.let("ifClause");o.setParams({ifClause:w}),a.if(v,g("then",w),g("else",w))}else b?a.if(v,g("then")):a.if((0,t.not)(v),g("else"));o.pass($,()=>o.error(!0));function _(){const w=o.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},v);o.mergeEvaluated(w)}function g(w,d){return()=>{const f=o.subschema({keyword:w},v);a.assign($,v),o.mergeValidEvaluated(f,$),d?a.assign(d,(0,t._)`${w}`):o.setParams({ifClause:w})}}}};function i(o,a){const l=o.schema[a];return l!==void 0&&!(0,e.alwaysValidSchema)(o,l)}return zt.default=n,zt}var Ut={},io;function cs(){if(io)return Ut;io=1,Object.defineProperty(Ut,"__esModule",{value:!0});const t=Q(),e={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:r,parentSchema:n,it:i}){n.if===void 0&&(0,t.checkStrictMode)(i,`"${r}" without "if" is ignored`)}};return Ut.default=e,Ut}var so;function ds(){if(so)return Tt;so=1,Object.defineProperty(Tt,"__esModule",{value:!0});const t=Ao(),e=Yi(),r=Io(),n=Qi(),i=Xi(),o=es(),a=ts(),l=Mo(),u=rs(),b=ns(),y=os(),$=is(),v=ss(),_=as(),g=ls(),w=cs();function d(f=!1){const s=[y.default,$.default,v.default,_.default,g.default,w.default,a.default,l.default,o.default,u.default,b.default];return f?s.push(e.default,n.default):s.push(t.default,r.default),s.push(i.default),s}return Tt.default=d,Tt}var Kt={},Gt={},ao;function us(){if(ao)return Gt;ao=1,Object.defineProperty(Gt,"__esModule",{value:!0});const t=W(),r={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:n})=>(0,t.str)`must match format "${n}"`,params:({schemaCode:n})=>(0,t._)`{format: ${n}}`},code(n,i){const{gen:o,data:a,$data:l,schema:u,schemaCode:b,it:y}=n,{opts:$,errSchemaPath:v,schemaEnv:_,self:g}=y;if(!$.validateFormats)return;l?w():d();function w(){const f=o.scopeValue("formats",{ref:g.formats,code:$.code.formats}),s=o.const("fDef",(0,t._)`${f}[${b}]`),p=o.let("fType"),S=o.let("format");o.if((0,t._)`typeof ${s} == "object" && !(${s} instanceof RegExp)`,()=>o.assign(p,(0,t._)`${s}.type || "string"`).assign(S,(0,t._)`${s}.validate`),()=>o.assign(p,(0,t._)`"string"`).assign(S,s)),n.fail$data((0,t.or)(c(),h()));function c(){return $.strictSchema===!1?t.nil:(0,t._)`${b} && !${S}`}function h(){const P=_.$async?(0,t._)`(${s}.async ? await ${S}(${a}) : ${S}(${a}))`:(0,t._)`${S}(${a})`,j=(0,t._)`(typeof ${S} == "function" ? ${P} : ${S}.test(${a}))`;return(0,t._)`${S} && ${S} !== true && ${p} === ${i} && !${j}`}}function d(){const f=g.formats[u];if(!f){c();return}if(f===!0)return;const[s,p,S]=h(f);s===i&&n.pass(P());function c(){if($.strictSchema===!1){g.logger.warn(j());return}throw new Error(j());function j(){return`unknown format "${u}" ignored in schema at path "${v}"`}}function h(j){const A=j instanceof RegExp?(0,t.regexpCode)(j):$.code.formats?(0,t._)`${$.code.formats}${(0,t.getProperty)(u)}`:void 0,F=o.scopeValue("formats",{key:u,ref:j,code:A});return typeof j=="object"&&!(j instanceof RegExp)?[j.type||"string",j.validate,(0,t._)`${F}.validate`]:["string",j,F]}function P(){if(typeof f=="object"&&!(f instanceof RegExp)&&f.async){if(!_.$async)throw new Error("async format in sync schema");return(0,t._)`await ${S}(${a})`}return typeof p=="function"?(0,t._)`${S}(${a})`:(0,t._)`${S}.test(${a})`}}}};return Gt.default=r,Gt}var lo;function ps(){if(lo)return Kt;lo=1,Object.defineProperty(Kt,"__esModule",{value:!0});const e=[us().default];return Kt.default=e,Kt}var Ae={},co;function fs(){return co||(co=1,Object.defineProperty(Ae,"__esModule",{value:!0}),Ae.contentVocabulary=Ae.metadataVocabulary=void 0,Ae.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],Ae.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]),Ae}var uo;function hs(){if(uo)return mt;uo=1,Object.defineProperty(mt,"__esModule",{value:!0});const t=qi(),e=Zi(),r=ds(),n=ps(),i=fs(),o=[t.default,e.default,(0,r.default)(),n.default,i.metadataVocabulary,i.contentVocabulary];return mt.default=o,mt}var Ht={},rt={},po;function ms(){if(po)return rt;po=1,Object.defineProperty(rt,"__esModule",{value:!0}),rt.DiscrError=void 0;var t;return(function(e){e.Tag="tag",e.Mapping="mapping"})(t||(rt.DiscrError=t={})),rt}var fo;function ys(){if(fo)return Ht;fo=1,Object.defineProperty(Ht,"__esModule",{value:!0});const t=W(),e=ms(),r=Lr(),n=cr(),i=Q(),a={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:l,tagName:u}})=>l===e.DiscrError.Tag?`tag "${u}" must be string`:`value of tag "${u}" must be in oneOf`,params:({params:{discrError:l,tag:u,tagName:b}})=>(0,t._)`{error: ${l}, tag: ${b}, tagValue: ${u}}`},code(l){const{gen:u,data:b,schema:y,parentSchema:$,it:v}=l,{oneOf:_}=$;if(!v.opts.discriminator)throw new Error("discriminator: requires discriminator option");const g=y.propertyName;if(typeof g!="string")throw new Error("discriminator: requires propertyName");if(y.mapping)throw new Error("discriminator: mapping is not supported");if(!_)throw new Error("discriminator: requires oneOf keyword");const w=u.let("valid",!1),d=u.const("tag",(0,t._)`${b}${(0,t.getProperty)(g)}`);u.if((0,t._)`typeof ${d} == "string"`,()=>f(),()=>l.error(!1,{discrError:e.DiscrError.Tag,tag:d,tagName:g})),l.ok(w);function f(){const S=p();u.if(!1);for(const c in S)u.elseIf((0,t._)`${d} === ${c}`),u.assign(w,s(S[c]));u.else(),l.error(!1,{discrError:e.DiscrError.Mapping,tag:d,tagName:g}),u.endIf()}function s(S){const c=u.name("valid"),h=l.subschema({keyword:"oneOf",schemaProp:S},c);return l.mergeEvaluated(h,t.Name),c}function p(){var S;const c={},h=j($);let P=!0;for(let q=0;q<_.length;q++){let U=_[q];if(U?.$ref&&!(0,i.schemaHasRulesButRef)(U,v.self.RULES)){const Y=U.$ref;if(U=r.resolveRef.call(v.self,v.schemaEnv.root,v.baseId,Y),U instanceof r.SchemaEnv&&(U=U.schema),U===void 0)throw new n.default(v.opts.uriResolver,v.baseId,Y)}const z=(S=U?.properties)===null||S===void 0?void 0:S[g];if(typeof z!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${g}"`);P=P&&(h||j(U)),A(z,q)}if(!P)throw new Error(`discriminator: "${g}" must be required`);return c;function j({required:q}){return Array.isArray(q)&&q.includes(g)}function A(q,U){if(q.const)F(q.const,U);else if(q.enum)for(const z of q.enum)F(z,U);else throw new Error(`discriminator: "properties/${g}" must have "const" or "enum"`)}function F(q,U){if(typeof q!="string"||q in c)throw new Error(`discriminator: "${g}" values must be unique strings`);c[q]=U}}}};return Ht.default=a,Ht}const gs="http://json-schema.org/draft-07/schema#",vs="http://json-schema.org/draft-07/schema#",bs="Core schema meta-schema",_s={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:[]}},Ss=["object","boolean"],$s={$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:"#"}},ws={$schema:gs,$id:vs,title:bs,definitions:_s,type:Ss,properties:$s,default:!0};var ho;function Ps(){return ho||(ho=1,(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.MissingRefError=e.ValidationError=e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=e.Ajv=void 0;const r=Ii(),n=hs(),i=ys(),o=ws,a=["/properties"],l="http://json-schema.org/draft-07/schema";class u extends r.default{_addVocabularies(){super._addVocabularies(),n.default.forEach(g=>this.addVocabulary(g)),this.opts.discriminator&&this.addKeyword(i.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const g=this.opts.$data?this.$dataMetaSchema(o,a):o;this.addMetaSchema(g,l,!1),this.refs["http://json-schema.org/schema"]=l}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(l)?l:void 0)}}e.Ajv=u,t.exports=e=u,t.exports.Ajv=u,Object.defineProperty(e,"__esModule",{value:!0}),e.default=u;var b=lr();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return b.KeywordCxt}});var y=W();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return y._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return y.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return y.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return y.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return y.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return y.CodeGen}});var $=Br();Object.defineProperty(e,"ValidationError",{enumerable:!0,get:function(){return $.default}});var v=cr();Object.defineProperty(e,"MissingRefError",{enumerable:!0,get:function(){return v.default}})})(dt,dt.exports)),dt.exports}var ks=Ps();const xs=gi(ks),Es={};let Fo=Es,qo=null;function Do(){return Fo}function Hl(t){Fo=t}function Cs(){return qo}function Wl(t){qo=t}function Ue(t,e){return{type:"string",...e?{description:e}:{},"x-doc":{group:t,type:"string"}}}function Nr(t,e){return{type:"number",...e?{description:e}:{},"x-doc":{group:t,type:"number"}}}function Ns(t,e){return{type:"boolean",description:e,"x-doc":{group:t,type:"boolean"}}}function jr(t,e,r){return{type:"string",enum:[...e],...r?{description:r}:{},"x-doc":{group:t,type:"string"}}}const js={type:"string",description:"CSS-класс (Tailwind: flex, grid, gap-*).","x-doc":{group:"Control",type:"string",kind:"readonly"}},Ts={type:"string",description:"Текстовое содержимое.","x-doc":{group:"Control",type:"string"}},Rr=[{tag:"div",content:"container",defaultClass:"flex gap-4"},{tag:"section",content:"container",defaultClass:"space-y-4"},{tag:"article",content:"container",defaultClass:"space-y-4"},{tag:"aside",content:"container",defaultClass:"space-y-4"},{tag:"header",content:"container",defaultClass:"space-y-4"},{tag:"footer",content:"container",defaultClass:"space-y-4"},{tag:"nav",content:"container",defaultClass:"flex gap-4"},{tag:"main",content:"container",defaultClass:"space-y-4"},{tag:"fieldset",content:"container",defaultClass:"space-y-4"},{tag:"h1",content:"text",defaultText:"Заголовок"},{tag:"h2",content:"text",defaultText:"Заголовок"},{tag:"h3",content:"text",defaultText:"Заголовок"},{tag:"h4",content:"text",defaultText:"Заголовок"},{tag:"h5",content:"text",defaultText:"Заголовок"},{tag:"h6",content:"text",defaultText:"Заголовок"},{tag:"p",content:"text",defaultText:"Текст"},{tag:"span",content:"text",defaultText:"Текст"},{tag:"strong",content:"text",defaultText:"Текст"},{tag:"em",content:"text",defaultText:"Текст"},{tag:"small",content:"text",defaultText:"Текст"},{tag:"blockquote",content:"text",defaultText:"Цитата",props:{cite:Ue("Options","URL источника цитаты.")}},{tag:"code",content:"text",defaultText:"code"},{tag:"pre",content:"text",defaultText:"Текст"},{tag:"a",content:"text",defaultText:"Ссылка",props:{href:Ue("Control","URL ссылки."),target:jr("Options",["_self","_blank","_parent","_top"],"Где открыть ссылку."),rel:Ue("Options","Отношение (напр. noopener noreferrer).")}},{tag:"label",content:"text",defaultText:"Подпись",props:{htmlFor:Ue("Options","ID связанного поля (атрибут for).")}},{tag:"br",content:"void"},{tag:"ul",content:"container",defaultClass:"list-disc space-y-1 pl-5"},{tag:"ol",content:"container",defaultClass:"list-decimal space-y-1 pl-5",props:{start:Nr("Options","Начальный номер списка."),reversed:Ns("Behavior","Обратный порядок нумерации."),type:jr("Options",["1","a","A","i","I"],"Стиль маркера нумерации.")}},{tag:"li",content:"container"},{tag:"hr",content:"void"},{tag:"img",content:"void",props:{src:Ue("Control","URL изображения."),alt:Ue("Control","Альтернативный текст (доступность)."),width:Nr("Options","Ширина, px."),height:Nr("Options","Высота, px."),loading:jr("Behavior",["lazy","eager"],"Стратегия загрузки.")}}],Os=new Map(Rr.map(t=>[t.tag,t]));function Rs(t){return Os.get(t)}function As(t){const e={className:js};return t.content==="text"&&(e.text=Ts),t.props&&Object.assign(e,t.props),{type:"object",properties:e}}const Is={type:"object",properties:{title:{type:"string","x-doc":{group:"Control",type:"string"}},addButtonLabel:{type:"string","x-doc":{group:"Control",type:"string"}},emptyMessage:{type:"string","x-doc":{group:"Control",type:"string"}},itemLabel:{type:"string",description:"Подпись элемента: строка или $dataSource/$fn.","x-doc":{group:"Options",type:"string"}},reorderable:{type:"boolean","x-doc":{group:"Behavior",type:"boolean"}},minItems:{type:"number","x-doc":{group:"Behavior",type:"number"}},maxItems:{type:"number","x-doc":{group:"Behavior",type:"number"}}}},Ms={type:"object",properties:{className:{type:"string","x-doc":{group:"Control",type:"string"}}}},Fs={type:"object",properties:{title:{type:"string","x-doc":{group:"Control",type:"string"}},icon:{type:"string",description:"Иконка шага: эмодзи или строка.","x-doc":{group:"Control",type:"string"}}}};function qs(t){const e=t?.htmlTags&&t.htmlTags.length?Rr.filter(l=>t.htmlTags.includes(l.tag)):Rr,r=t?.html===!1?[]:e.map(l=>({name:`$html(${l.tag})`,role:"container",category:"HTML",propsSchema:As(l)})),n={name:"FormArray",role:"array",category:"Массив",propsSchema:Is},i={name:"Wizard",role:"container",category:"Мастер",propsSchema:Ms},o={name:"Step",role:"container",category:"Мастер",propsSchema:Fs},a=[...r];return t?.formArray!==!1&&a.push(n),t?.wizard!==!1&&a.push(i,o),a}var Ds=Symbol.for("preact-signals");function dr(){if(xe>1)xe--;else{var t,e=!1;for((function(){var i=Xt;for(Xt=void 0;i!==void 0;)i.S.v===i.v&&(i.S.i=i.i),i=i.o})();it!==void 0;){var r=it;for(it=void 0,Qt++;r!==void 0;){var n=r.u;if(r.u=void 0,r.f&=-3,!(8&r.f)&&Lo(r))try{r.c()}catch(i){e||(t=i,e=!0)}r=n}}if(Qt=0,xe--,e)throw t}}function Vs(t){if(xe>0)return t();Ar=++Bs,xe++;try{return t()}finally{dr()}}var ee=void 0;function Vo(t){var e=ee;ee=void 0;try{return t()}finally{ee=e}}var it=void 0,xe=0,Qt=0,Bs=0,Ar=0,Xt=void 0,er=0;function Bo(t){if(ee!==void 0){var e=t.n;if(e===void 0||e.t!==ee)return e={i:0,S:t,p:ee.s,n:void 0,t:ee,e:void 0,x:void 0,r:e},ee.s!==void 0&&(ee.s.n=e),ee.s=e,t.n=e,32&ee.f&&t.S(e),e;if(e.i===-1)return e.i=0,e.n!==void 0&&(e.n.p=e.p,e.p!==void 0&&(e.p.n=e.n),e.p=ee.s,e.n=void 0,ee.s.n=e,ee.s=e),e}}function oe(t,e){this.v=t,this.i=0,this.n=void 0,this.t=void 0,this.l=0,this.W=e?.watched,this.Z=e?.unwatched,this.name=e?.name}oe.prototype.brand=Ds;oe.prototype.h=function(){return!0};oe.prototype.S=function(t){var e=this,r=this.t;r!==t&&t.e===void 0&&(t.x=r,this.t=t,r!==void 0?r.e=t:Vo(function(){var n;(n=e.W)==null||n.call(e)}))};oe.prototype.U=function(t){var e=this;if(this.t!==void 0){var r=t.e,n=t.x;r!==void 0&&(r.x=n,t.e=void 0),n!==void 0&&(n.e=r,t.x=void 0),t===this.t&&(this.t=n,n===void 0&&Vo(function(){var i;(i=e.Z)==null||i.call(e)}))}};oe.prototype.subscribe=function(t){var e=this;return pe(function(){var r=e.value,n=ee;ee=void 0;try{t(r)}finally{ee=n}},{name:"sub"})};oe.prototype.valueOf=function(){return this.value};oe.prototype.toString=function(){return this.value+""};oe.prototype.toJSON=function(){return this.value};oe.prototype.peek=function(){var t=ee;ee=void 0;try{return this.value}finally{ee=t}};Object.defineProperty(oe.prototype,"value",{get:function(){var t=Bo(this);return t!==void 0&&(t.i=this.i),this.v},set:function(t){if(t!==this.v){if(Qt>100)throw new Error("Cycle detected");(function(r){xe!==0&&Qt===0&&r.l!==Ar&&(r.l=Ar,Xt={S:r,v:r.v,i:r.i,o:Xt})})(this),this.v=t,this.i++,er++,xe++;try{for(var e=this.t;e!==void 0;e=e.x)e.t.N()}finally{dr()}}}});function se(t,e){return new oe(t,e)}function Lo(t){for(var e=t.s;e!==void 0;e=e.n)if(e.S.i!==e.i||!e.S.h()||e.S.i!==e.i)return!0;return!1}function zo(t){for(var e=t.s;e!==void 0;e=e.n){var r=e.S.n;if(r!==void 0&&(e.r=r),e.S.n=e,e.i=-1,e.n===void 0){t.s=e;break}}}function Uo(t){for(var e=t.s,r=void 0;e!==void 0;){var n=e.p;e.i===-1?(e.S.U(e),n!==void 0&&(n.n=e.n),e.n!==void 0&&(e.n.p=n)):r=e,e.S.n=e.r,e.r!==void 0&&(e.r=void 0),e=n}t.s=r}function Ve(t,e){oe.call(this,void 0),this.x=t,this.s=void 0,this.g=er-1,this.f=4,this.W=e?.watched,this.Z=e?.unwatched,this.name=e?.name}Ve.prototype=new oe;Ve.prototype.h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===er))return!0;if(this.g=er,this.f|=1,this.i>0&&!Lo(this))return this.f&=-2,!0;var t=ee;try{zo(this),ee=this;var e=this.x();(16&this.f||this.v!==e||this.i===0)&&(this.v=e,this.f&=-17,this.i++)}catch(r){this.v=r,this.f|=16,this.i++}return ee=t,Uo(this),this.f&=-2,!0};Ve.prototype.S=function(t){if(this.t===void 0){this.f|=36;for(var e=this.s;e!==void 0;e=e.n)e.S.S(e)}oe.prototype.S.call(this,t)};Ve.prototype.U=function(t){if(this.t!==void 0&&(oe.prototype.U.call(this,t),this.t===void 0)){this.f&=-33;for(var e=this.s;e!==void 0;e=e.n)e.S.U(e)}};Ve.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var t=this.t;t!==void 0;t=t.x)t.t.N()}};Object.defineProperty(Ve.prototype,"value",{get:function(){if(1&this.f)throw new Error("Cycle detected");var t=Bo(this);if(this.h(),t!==void 0&&(t.i=this.i),16&this.f)throw this.v;return this.v}});function J(t,e){return new Ve(t,e)}function Ko(t){var e=t.m;if(t.m=void 0,typeof e=="function"){xe++;var r=ee;ee=void 0;try{e()}catch(n){throw t.f&=-2,t.f|=8,Ur(t),n}finally{ee=r,dr()}}}function Ur(t){for(var e=t.s;e!==void 0;e=e.n)e.S.U(e);t.x=void 0,t.s=void 0,Ko(t)}function Ls(t){if(ee!==this)throw new Error("Out-of-order effect");Uo(this),ee=t,this.f&=-2,8&this.f&&Ur(this),dr()}function Je(t,e){this.x=t,this.m=void 0,this.s=void 0,this.u=void 0,this.f=32,this.name=e?.name}Je.prototype.c=function(){var t=this.S();try{if(8&this.f||this.x===void 0)return;var e=this.x();typeof e=="function"&&(this.m=e)}finally{t()}};Je.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,Ko(this),zo(this),xe++;var t=ee;return ee=this,Ls.bind(this,t)};Je.prototype.N=function(){2&this.f||(this.f|=2,this.u=it,it=this)};Je.prototype.d=function(){this.f|=8,1&this.f||Ur(this)};Je.prototype.dispose=function(){this.d()};function pe(t,e){var r=new Je(t,e);try{r.c()}catch(i){throw r.d(),i}var n=r.d.bind(r);return n[Symbol.dispose]=n,n}const zs=new WeakMap;function Ir(t){return zs.has(t)}let Kr=class{subscriptions=new Map;add(e,r){return this.subscriptions.has(e)&&this.subscriptions.get(e)?.(),this.subscriptions.set(e,r),()=>this.remove(e)}remove(e){const r=this.subscriptions.get(e);return r?(r(),this.subscriptions.delete(e),!0):!1}clear(){this.subscriptions.forEach(e=>{e()}),this.subscriptions.clear()}size(){return this.subscriptions.size}has(e){return this.subscriptions.has(e)}getKeys(){return Array.from(this.subscriptions.keys())}dispose(){this.clear()}};const tr=t=>!(t===null||typeof t!="object"||Array.isArray(t)||t instanceof Date||typeof Blob<"u"&&t instanceof Blob||typeof File<"u"&&t instanceof File),Ne=(t,e)=>t===""?String(e):`${t}.${e}`,Mr=t=>/^\d+$/.test(t),je=t=>{if(Array.isArray(t))return t.map(je);if(tr(t)){const e={};for(const r of Object.keys(t))e[r]=je(t[r]);return e}return t},rr=(t,e)=>{if(t===e)return!0;if(Array.isArray(t)&&Array.isArray(e))return t.length!==e.length?!1:t.every((r,n)=>rr(r,e[n]));if(tr(t)&&tr(e)){const r=Object.keys(t),n=Object.keys(e);return r.length!==n.length?!1:r.every(i=>rr(t[i],e[i]))}return!1};let Us=class{constructor(e,r){this.path=r;const n=se(e);n.__path=r,this.signal=n,this.initial=je(e)}kind="leaf";signal;initial;rebase(e){this.path=e,this.signal.__path=e}read(){return this.signal.value}peek(){return this.signal.peek()}set(e){this.signal.value=e}resetToInitial(){this.signal.value=je(this.initial)}captureInitial(){this.initial=je(this.signal.peek())}dirty(){return!rr(this.signal.peek(),this.initial)}},Go=class{constructor(e,r){this.path=r;for(const n of Object.keys(e))this.children.set(n,nt(e[n],Ne(r,n)))}kind="group";children=new Map;rebase(e){this.path=e;for(const[r,n]of this.children)n.rebase(Ne(e,r))}peek(){const e={};for(const[r,n]of this.children)e[r]=n.peek();return e}set(e){if(e==null||typeof e!="object")return;const r=e;for(const[n,i]of this.children)n in r&&(i.kind==="leaf"&&Ir(i.signal)||i.set(r[n]))}resetToInitial(){for(const e of this.children.values())e.resetToInitial()}captureInitial(){for(const e of this.children.values())e.captureInitial()}dirty(){for(const e of this.children.values())if(e.dirty())return!0;return!1}},Ks=class{constructor(e,r){this.path=r,this.items=se(e.map((n,i)=>nt(n,Ne(r,i)))),this.initial=je(e)}kind="array";items;initial;rebase(e){this.path=e,this.items.peek().forEach((r,n)=>r.rebase(Ne(e,n)))}reindex(){this.items.peek().forEach((e,r)=>e.rebase(Ne(this.path,r)))}push(e){const r=this.items.peek();this.items.value=[...r,nt(e,Ne(this.path,r.length))]}insertAt(e,r){const n=[...this.items.peek()];n.splice(e,0,nt(r,Ne(this.path,e))),this.items.value=n,this.reindex()}removeAt(e){const r=[...this.items.peek()];r.splice(e,1),this.items.value=r,this.reindex()}move(e,r){const n=[...this.items.peek()],[i]=n.splice(e,1);i&&n.splice(r,0,i),this.items.value=n,this.reindex()}swap(e,r){const n=[...this.items.peek()];e<0||r<0||e>=n.length||r>=n.length||e===r||([n[e],n[r]]=[n[r],n[e]],this.items.value=n,this.reindex())}clear(){this.items.value=[]}peek(){return this.items.peek().map(e=>e.peek())}set(e){const r=Array.isArray(e)?e:[];this.items.value=r.map((n,i)=>nt(n,Ne(this.path,i)))}resetToInitial(){this.set(je(this.initial))}captureInitial(){this.initial=je(this.peek())}dirty(){return!rr(this.peek(),this.initial)}};function nt(t,e){return Array.isArray(t)?new Ks(t,e):tr(t)?new Go(t,e):new Us(t,e)}function Ke(t){if(t)return t.kind==="group"?Ho(t):t.kind==="array"?Gs(t):t.read()}function Gs(t){const e={get length(){return t.items.value.length},push:r=>t.push(r),insertAt:(r,n)=>t.insertAt(r,n),removeAt:r=>t.removeAt(r),move:(r,n)=>t.move(r,n),swap:(r,n)=>t.swap(r,n),clear:()=>t.clear(),at:r=>Ke(t.items.value[r]),map:r=>t.items.value.map((n,i)=>r(Ke(n),i)),forEach:r=>t.items.value.forEach((n,i)=>r(Ke(n),i)),toArray:()=>t.peek(),[Symbol.iterator]:function*(){const r=t.items.value;for(let n=0;n<r.length;n++)yield Ke(r[n])}};return new Proxy(e,{get:(r,n,i)=>n==="__path"?t.path:typeof n=="string"&&Mr(n)?Ke(t.items.value[Number(n)]):Reflect.get(r,n,i),has:(r,n)=>typeof n=="string"&&Mr(n)?Number(n)<t.items.value.length:Reflect.has(r,n)})}function Fr(t){if(t.kind==="leaf")return t.signal;if(t.kind==="group")return new Proxy({},{get:(r,n)=>{if(n==="__path")return t.path;if(typeof n!="string")return;const i=t.children.get(n);return i?Fr(i):void 0},has:(r,n)=>typeof n=="string"&&t.children.has(n),ownKeys:()=>[...t.children.keys()],getOwnPropertyDescriptor:(r,n)=>typeof n=="string"&&t.children.has(n)?{enumerable:!0,configurable:!0}:void 0});const e=t;return new Proxy({get length(){return e.items.value.length}},{get:(r,n,i)=>{if(n==="__path")return e.path;if(typeof n=="string"&&Mr(n)){const o=e.items.value[Number(n)];return o?Fr(o):void 0}return Reflect.get(r,n,i)}})}function Hs(t,e){if(!e)return;let r=t;for(const n of e.split(".")){if(!r)return;if(r.kind==="group")r=r.children.get(n);else if(r.kind==="array")r=r.items.peek()[Number(n)];else return}return r&&r.kind==="leaf"?r.signal:void 0}const mo=new Set(["$","get","set","patch","isDirty","reset","captureInitial","signalAt"]),yo=new WeakMap;function Ho(t){const e=yo.get(t);if(e)return e;const r={$:Fr(t),get:()=>t.peek(),set:i=>t.set(i),patch:i=>t.set(i),isDirty:()=>t.dirty(),reset:()=>t.resetToInitial(),captureInitial:()=>t.captureInitial(),signalAt:i=>Hs(t,i)},n=new Proxy({},{get:(i,o)=>{if(o==="__path")return t.path;if(typeof o!="string")return;const a=t.children.get(o);if(a)return Ke(a);if(mo.has(o))return r[o]},set:(i,o,a)=>{if(typeof o!="string")return!1;const l=t.children.get(o);return l?(l.set(a),!0):!1},has:(i,o)=>typeof o=="string"&&(t.children.has(o)||mo.has(o)),ownKeys:()=>[...t.children.keys()],getOwnPropertyDescriptor:(i,o)=>typeof o=="string"&&t.children.has(o)?{enumerable:!0,configurable:!0}:void 0});return yo.set(t,n),n}function Xl(t){const e=new Go(t,"");return Ho(e)}const Wo=new WeakMap;function Ws(t,e){Wo.set(t,e)}function Js(t){return Wo.get(t)}let ur=class{_touched=se(!1);_dirty=se(!1);_status=se("valid");touched=J(()=>this._touched.value);untouched=J(()=>!this._touched.value);dirty=J(()=>this._dirty.value);pristine=J(()=>!this._dirty.value);status=J(()=>this._status.value);disabled=J(()=>this._status.value==="disabled");enabled=J(()=>this._status.value!=="disabled");getErrors(e){const r=this.errors.value;return e?r.filter(n=>{if(e.code!==void 0&&!(Array.isArray(e.code)?e.code:[e.code]).includes(n.code)||e.message!==void 0&&!n.message.toLowerCase().includes(e.message.toLowerCase()))return!1;if(e.params!==void 0){if(!n.params)return!1;for(const[i,o]of Object.entries(e.params))if(n.params[i]!==o)return!1}return!(e.predicate!==void 0&&!e.predicate(n))}):r}markAsTouched(){this._touched.value=!0,this.onMarkAsTouched()}markAsUntouched(){this._touched.value=!1,this.onMarkAsUntouched()}markAsDirty(){this._dirty.value=!0,this.onMarkAsDirty()}markAsPristine(){this._dirty.value=!1,this.onMarkAsPristine()}touchAll(){this.markAsTouched()}disable(){this._status.value="disabled",this.onDisable()}enable(){this._status.value="valid",this.onEnable()}onMarkAsTouched(){}onMarkAsUntouched(){}onMarkAsDirty(){}onMarkAsPristine(){}onDisable(){}onEnable(){}};const Me={Watch:"watch",ComputeFrom:"computeFrom",LinkFields:"linkFields",WatchField:"watchField",WatchItems:"watchItems",WatchLength:"watchLength"};let Zs=0;function Fe(t){return`${t}-${++Zs}`}var Ie=(t=>(t.THROW="throw",t.LOG="log",t.CONVERT="convert",t))(Ie||{});let Ge=class{static handle(e,r,n="throw"){const i=this.extractMessage(e);switch(n){case"throw":throw e;case"log":return;case"convert":return{code:"validator_error",message:i,params:{field:r}}}}static extractMessage(e){return e instanceof Error?e.message:typeof e=="string"?e:typeof e=="object"&&e!==null&&"message"in e?String(e.message):String(e)}static createValidationError(e,r,n){return{code:e,message:r,params:n?{field:n}:void 0}}static isValidationError(e){return typeof e=="object"&&e!==null&&"code"in e&&"message"in e&&typeof e.code=="string"&&typeof e.message=="string"}},Ys=class{_status;status;valid;invalid;pending;disabled;constructor(e="valid"){this._status=se(e),this.status=J(()=>this._status.value),this.valid=J(()=>this._status.value==="valid"),this.invalid=J(()=>this._status.value==="invalid"),this.pending=J(()=>this._status.value==="pending"),this.disabled=J(()=>this._status.value==="disabled")}startValidation(){this._status.value!=="disabled"&&(this._status.value="pending")}completeValidation(e){this._status.value!=="disabled"&&(this._status.value=e?"invalid":"valid")}setErrors(e){this._status.value!=="disabled"&&(this._status.value=e?"invalid":"valid")}disable(){this._status.value="disabled"}enable(e=!1){this._status.value=e?"invalid":"valid"}dispatch(e){switch(e.type){case"START_VALIDATION":this.startValidation();break;case"VALIDATION_SUCCESS":this.completeValidation(!1);break;case"VALIDATION_FAILURE":this.completeValidation(!0);break;case"DISABLE":this.disable();break;case"ENABLE":this.enable(e.hasErrors);break;case"SET_ERRORS":this.setErrors(e.hasErrors);break}}getStatus(){return this._status.value}canValidate(){return this._status.value!=="disabled"}},Qs=class extends ur{_value;_errors;_componentProps;statusMachine;value;valid;invalid;pending;status;disabled;errors;componentProps;shouldShowError;validators;asyncValidators;updateOn;initialValue;currentAbortController;debounceMs;validateDebounceTimer;pendingValidation;disposers=new Kr;component;constructor(e){super(),this.validators=e.validators||[],this.asyncValidators=e.asyncValidators||[],this.updateOn=e.updateOn||"blur",this.debounceMs=e.debounce||0,this.component=e.component,this._value=e.valueSignal??se(e.value),this.initialValue=this._value.peek(),this._errors=se([]),this._componentProps=se(e.componentProps||{}),this.statusMachine=new Ys(e.disabled?"disabled":"valid"),this.value=J(()=>this._value.value),this.valid=J(()=>this.statusMachine.valid.value),this.invalid=J(()=>this.statusMachine.invalid.value),this.pending=J(()=>this.statusMachine.pending.value),this.status=J(()=>this.statusMachine.status.value),this.disabled=J(()=>this.statusMachine.disabled.value),this.errors=J(()=>this._errors.value),this.componentProps=J(()=>this._componentProps.value),this.shouldShowError=J(()=>this.statusMachine.invalid.value&&(this._touched.value||this._dirty.value))}getValue(){return this._value.peek()}setValue(e,r){if(this._value.value=e,this._dirty.value=!0,r?.emitEvent===!1)return;const n=this.validators.length>0||this.asyncValidators.length>0,i=this._errors.value.length>0;if(this.updateOn==="change"){this.validate();return}i&&n&&this.validate()}patchValue(e){this.setValue(e)}reset(e){this._value.value=e!==void 0?e:this.initialValue,this._errors.value=[],this._touched.value=!1,this._dirty.value=!1,this.statusMachine.setErrors(!1)}resetToInitial(){this.reset(this.initialValue)}cancelPendingValidation(){this.pendingValidation&&(this.pendingValidation.abortController.abort(),this.pendingValidation.resolve(!1),this.pendingValidation=void 0),this.validateDebounceTimer&&(clearTimeout(this.validateDebounceTimer),this.validateDebounceTimer=void 0),this.currentAbortController&&(this.currentAbortController.abort(),this.currentAbortController=void 0)}async validate(e){const r=e?.debounce??this.debounceMs;if(this.cancelPendingValidation(),r<=0||this.asyncValidators.length===0)return this.validateImmediate();const n=new AbortController;return new Promise(i=>{this.pendingValidation={resolve:i,abortController:n},this.validateDebounceTimer=setTimeout(async()=>{if(this.validateDebounceTimer=void 0,n.signal.aborted){i(!1);return}this.pendingValidation=void 0;const o=await this.validateImmediate(n);i(o)},r),n.signal.addEventListener("abort",()=>{this.validateDebounceTimer&&(clearTimeout(this.validateDebounceTimer),this.validateDebounceTimer=void 0),i(!1)},{once:!0})})}async validateImmediate(e){const r=e??new AbortController;e||this.currentAbortController?.abort(),this.currentAbortController=r;const{signal:n}=r,i=[];for(const o of this.validators){const a=o(this._value.value);a&&i.push(a)}if(n.aborted)return!1;if(i.length>0){this._errors.value=i;const o=i.some(a=>a.severity!=="warning");if(this.statusMachine.setErrors(o),o)return!1}if(this.asyncValidators.length>0){if(n.aborted)return!1;this.statusMachine.startValidation();try{const o=await Promise.all(this.asyncValidators.map(async l=>{if(n.aborted)throw new DOMException("Validation aborted","AbortError");try{const u=await l(this._value.value,{signal:n});if(n.aborted)throw new DOMException("Validation aborted","AbortError");return u}catch(u){if(u instanceof DOMException&&u.name==="AbortError")throw u;return Ge.handle(u,"FieldNode AsyncValidator",Ie.CONVERT)}}));if(n.aborted)return!1;const a=o.filter(l=>l!==null);if(a.length>0){this._errors.value=a;const l=a.some(u=>u.severity!=="warning");if(this.statusMachine.completeValidation(l),l)return!1}}catch(o){if(o instanceof DOMException&&o.name==="AbortError")return!1;throw o}}return n.aborted?!1:((this.validators.length>0||this.asyncValidators.length>0)&&(this._errors.value=[],this.statusMachine.completeValidation(!1)),!this._errors.value.some(o=>o.severity!=="warning"))}setErrors(e){this._errors.value=e;const r=e.some(n=>n.severity!=="warning");this.statusMachine.setErrors(r)}clearErrors(){this._errors.value=[],this.statusMachine.setErrors(!1)}onMarkAsTouched(){this.updateOn==="blur"&&this.validate()}onDisable(){this.statusMachine.disable(),this._errors.value=[]}onEnable(){this.statusMachine.enable(this._errors.value.length>0),this.validate()}updateComponentProps(e){this._componentProps.value={...this._componentProps.value,...e}}setUpdateOn(e){this.updateOn=e}getUpdateOn(){return this.updateOn}watch(e){const r=new AbortController,n=pe(()=>{const o=this.value.value;e(o,r.signal)}),i=Fe(Me.Watch);return this.disposers.add(i,()=>{r.abort(),n()})}computeFrom(e,r){const n=pe(()=>{const o=e.map(l=>l.value),a=r(...o);this.setValue(a,{emitEvent:!1})}),i=Fe(Me.ComputeFrom);return this.disposers.add(i,n)}dispose(){try{this.disposers.dispose()}finally{this.cancelPendingValidation()}}};function Gr(t){const{getChildren:e,ownErrors:r,disabled:n}=t,i=J(()=>r.value.length>0?!1:e().every($=>$.disabled.value||$.valid.value)),o=J(()=>!i.value),a=J(()=>e().some($=>$.pending.value)),l=J(()=>e().some($=>$.touched.value)),u=J(()=>e().some($=>$.dirty.value)),b=J(()=>{const $=[...r.value];for(const v of e())$.push(...v.errors.value);return $}),y=J(()=>n?.value?"disabled":a.value?"pending":o.value?"invalid":"valid");return{valid:i,invalid:o,pending:a,touched:l,dirty:u,errors:b,status:y}}function go(t){return typeof t=="object"&&t!==null&&"getProxy"in t&&typeof t.getProxy=="function"}const vo="$";function Xs(t,e){let r;const n=()=>{if(!r){const i={};e.forEach((o,a)=>{i[a]=o&&go(o)?o.getProxy():o}),r=i}return r};return new Proxy(t,{get:(i,o)=>{if(o===vo)return n();if(o in i)return i[o];if(typeof o=="string"&&e.has(o)){const a=e.get(o);return a&&go(a)?a.getProxy():a}},set:(i,o,a)=>typeof o=="string"&&e.has(o)?!1:(i[o]=a,!0),has:(i,o)=>o===vo||typeof o=="string"&&e.has(o)?!0:o in i,ownKeys:i=>{const o=Reflect.ownKeys(i),a=Array.from(e.keys());return[...new Set([...o,...a])]},getOwnPropertyDescriptor:(i,o)=>typeof o=="string"&&e.has(o)?{enumerable:!0,configurable:!0}:Reflect.getOwnPropertyDescriptor(i,o)})}let ea=class{constructor(e){this.form=e}_submitting=se(!1);submitting=J(()=>this._submitting.value);async submit(e,r){const{skipValidation:n=!1,skipTouch:i=!1}=r||{};if(i||this.form.markAsTouched(),!n&&!await this.form.validate())return null;this._submitting.value=!0;try{return await e(this.form.getValue())}finally{this._submitting.value=!1}}async submitWithResult(e,r){const{skipValidation:n=!1,skipTouch:i=!1}=r||{};if(i||this.form.markAsTouched(),!n&&!await this.form.validate())return{success:!1,data:null};this._submitting.value=!0;try{return{success:!0,data:await e(this.form.getValue())}}catch(o){return{success:!1,data:null,error:o instanceof Error?o:new Error(String(o))}}finally{this._submitting.value=!1}}isSubmitting(){return this._submitting.value}};function ta(t){const e=[];for(const r of t.split(".")){const n=/^([^[\]]+)(?:\[(\d+)\])?$/.exec(r);if(!n)return[];e.push(n[2]!==void 0?{key:n[1],index:Number(n[2])}:{key:n[1]})}return e}let We=class Jo extends ur{id=crypto.randomUUID();_fields=new Map;disposers=new Kr;_proxyInstance;_behaviorCleanup;nodeFactory=new ra;formSubmitter;_disabled=se(!1);_formErrors=se([]);_fieldSignals=new WeakMap;value;valid;invalid;touched;dirty;pending;errors;status;submitting;constructor(e){super(),this.formSubmitter=new ea(this);const r=e.form,n=r!=null&&typeof r=="object"&&("valueSignal"in r||"value"in r),i="form"in e&&!n?e.form:e;for(const[a,l]of Object.entries(i)){const u=this.createNode(l);this._fields.set(a,u)}this.value=J(()=>{const a={};return this._fields.forEach((l,u)=>{a[u]=l.value.value}),a});const o=Gr({getChildren:()=>Array.from(this._fields.values()),ownErrors:this._formErrors,disabled:this._disabled});this.valid=o.valid,this.invalid=o.invalid,this.pending=o.pending,this.touched=o.touched,this.dirty=o.dirty,this.errors=o.errors,this.status=o.status,this.submitting=this.formSubmitter.submitting}buildProxy(){return Xs(this,this._fields)}getValue(){const e={};return this._fields.forEach((r,n)=>{e[n]=r.getValue()}),e}setValue(e,r){for(const[n,i]of Object.entries(e)){const o=this._fields.get(n);if(o){const a=this._fieldSignals.get(o)??o.value;if(Ir(a))continue;o.setValue(i,r)}}}patchValue(e){Vs(()=>{for(const[r,n]of Object.entries(e)){const i=this._fields.get(r);if(i&&n!==void 0){const o=this._fieldSignals.get(i)??i.value;if(Ir(o))continue;i.setValue(n,{emitEvent:!1})}}})}reset(e){this._formErrors.value=[],this._fields.forEach((r,n)=>{const i=e?.[n];r.reset(i)})}resetToInitial(){this._formErrors.value=[],this._fields.forEach(e=>{"resetToInitial"in e&&typeof e.resetToInitial=="function"?e.resetToInitial():e.reset()})}async validate(){return this.clearErrors(),await Promise.all(Array.from(this._fields.values()).map(e=>e.validate())),Array.from(this._fields.values()).every(e=>e.valid.value||e.disabled.value)}setErrors(e){this._formErrors.value=e}clearErrors(){this._formErrors.value=[],this._fields.forEach(e=>e.clearErrors())}getField(e){return this._fields.get(e)}get fields(){return this._fields}getProxy(){return this._proxyInstance||(this._proxyInstance=this.buildProxy()),this._proxyInstance}getAllFields(){return this._fields.values()}onMarkAsTouched(){this._fields.forEach(e=>e.markAsTouched())}onMarkAsUntouched(){this._fields.forEach(e=>e.markAsUntouched())}onMarkAsDirty(){this._fields.forEach(e=>e.markAsDirty())}onMarkAsPristine(){this._fields.forEach(e=>e.markAsPristine())}async submit(e,r){return this.formSubmitter.submit(e,r)}async submitWithResult(e,r){return this.formSubmitter.submitWithResult(e,r)}getFieldByPath(e){if(e.startsWith(".")||e.endsWith("."))return;const r=ta(e);if(r.length===0)return;let n=this;for(const i of r){if(!(n instanceof Jo)||(n=n.getField(i.key),!n))return;if(i.index!==void 0)if("at"in n&&"length"in n&&typeof n.at=="function"){const o=n.at(i.index);if(!o)return;n=o}else return}return n}createNode(e){return this.nodeFactory.createNode(e)}linkFields(e,r,n){const i=this._fields.get(e),o=this._fields.get(r);if(!i||!o){const u=i?r:e;throw new Error(`GroupNode.linkFields: field "${String(u)}" not found`)}const a=pe(()=>{const u=i.value.value,b=n?n(u):u;o.setValue(b,{emitEvent:!1})}),l=Fe(Me.LinkFields);return this.disposers.add(l,a)}watchField(e,r){const n=this.getFieldByPath(e);if(!n)throw new Error(`GroupNode.watchField: field "${e}" not found`);const i=pe(()=>{r(n.value.value)}),o=Fe(Me.WatchField);return this.disposers.add(o,i)}watchFieldByPath(e,r){const n=this.getFieldByPath(e);if(!n)throw new Error(`GroupNode.watchFieldByPath: field "${e}" not found`);const i=pe(()=>{r(n.value.value)}),o=Fe(Me.WatchField);return this.disposers.add(o,i)}onDisable(){this._disabled.value=!0,this._fields.forEach(e=>e.disable())}onEnable(){this._disabled.value=!1,this._fields.forEach(e=>e.enable())}attachBehaviorCleanup(e){this._behaviorCleanup=e}registerFieldSignal(e,r){this._fieldSignals.set(e,r)}dispose(){this._behaviorCleanup?.(),this._behaviorCleanup=void 0,this.disposers.dispose(),this._fields.forEach(e=>{"dispose"in e&&typeof e.dispose=="function"&&e.dispose()})}},bo=class extends ur{items;itemSchema;initialItems;disposers=new Kr;_arrayErrors=se([]);validationSchemaFn;behaviorSchemaFn;value;valid;invalid;touched;dirty;pending;errors;status;length;constructor(e,r=[]){super(),this.itemSchema=e,this.initialItems=r,this.items=se([]);for(const i of r)this.push(i);this.length=J(()=>this.items.value.length),this.value=J(()=>this.items.value.map(i=>i.value.value));const n=Gr({getChildren:()=>this.items.value,ownErrors:this._arrayErrors});this.valid=n.valid,this.invalid=n.invalid,this.pending=n.pending,this.touched=n.touched,this.dirty=n.dirty,this.errors=n.errors,this.status=n.status}push(e){const r=this.createItem(e);this.items.value=[...this.items.value,r]}removeAt(e){if(e<0||e>=this.items.value.length){Ge.handle(new Error(`ArrayNode.removeAt: index ${e} out of bounds (length: ${this.items.value.length})`),"ArrayNode.removeAt",Ie.LOG);return}const r=this.items.value[e];this.items.value=this.items.value.filter((n,i)=>i!==e),r&&"dispose"in r&&typeof r.dispose=="function"&&r.dispose()}insert(e,r){if(e<0||e>this.items.value.length){Ge.handle(new Error(`ArrayNode.insert: index ${e} out of bounds (length: ${this.items.value.length})`),"ArrayNode.insert",Ie.LOG);return}const n=this.createItem(r),i=[...this.items.value];i.splice(e,0,n),this.items.value=i}move(e,r){const n=this.items.value.length;if(e<0||e>=n||r<0||r>=n){Ge.handle(new Error(`ArrayNode.move: index out of bounds (from=${e}, to=${r}, length=${n})`),"ArrayNode.move",Ie.LOG);return}if(e===r)return;const i=[...this.items.value],[o]=i.splice(e,1);i.splice(r,0,o),this.items.value=i}swap(e,r){const n=this.items.value.length;if(e<0||e>=n||r<0||r>=n){Ge.handle(new Error(`ArrayNode.swap: index out of bounds (a=${e}, b=${r}, length=${n})`),"ArrayNode.swap",Ie.LOG);return}if(e===r)return;const i=[...this.items.value];[i[e],i[r]]=[i[r],i[e]],this.items.value=i}clear(){const e=[...this.items.value];this.items.value=[],e.forEach(r=>{"dispose"in r&&typeof r.dispose=="function"&&r.dispose()})}at(e){const r=this.items.value[e];if(r)return r.getProxy()}getValue(){return this.items.value.map(e=>e.getValue())}setValue(e,r){this.clear(),e.forEach(n=>this.push(n)),r?.emitEvent!==!1&&this.validate().catch(n=>{Ge.handle(n,"ArrayNode.setValue",Ie.LOG)})}patchValue(e){e.forEach((r,n)=>{this.items.value[n]&&r!==void 0&&this.items.value[n].patchValue(r)})}reset(e){this._arrayErrors.value=[],this.clear(),e&&e.forEach(r=>this.push(r))}resetToInitial(){this._arrayErrors.value=[],this.clear(),this.initialItems.forEach(e=>this.push(e))}async validate(){return(await Promise.all(this.items.value.map(e=>e.validate()))).every(Boolean)&&this._arrayErrors.value.length===0}setErrors(e){this._arrayErrors.value=e}clearErrors(){this._arrayErrors.value=[],this.items.value.forEach(e=>e.clearErrors())}onMarkAsTouched(){this.items.value.forEach(e=>e.markAsTouched())}onMarkAsUntouched(){this.items.value.forEach(e=>e.markAsUntouched())}onMarkAsDirty(){this.items.value.forEach(e=>e.markAsDirty())}onMarkAsPristine(){this.items.value.forEach(e=>e.markAsPristine())}forEach(e){this.items.value.forEach((r,n)=>{const i=r.getProxy();e(i,n)})}map(e){return this.items.value.map((r,n)=>{const i=r.getProxy();return e(i,n)})}createItem(e){if(this.isGroupSchema(this.itemSchema)){const r=new We(this.itemSchema);return e&&r.patchValue(e),this.validationSchemaFn&&"applyValidationSchema"in r&&r.applyValidationSchema(this.validationSchemaFn),this.behaviorSchemaFn&&"applyBehaviorSchema"in r&&r.applyBehaviorSchema(this.behaviorSchemaFn),r}throw new Error("ArrayNode поддерживает только GroupNode элементы. Для массива примитивов используйте обычное поле с типом массива.")}isGroupSchema(e){return typeof e=="object"&&e!==null&&!("component"in e)&&!Array.isArray(e)}applyValidationSchema(e){this.validationSchemaFn=e,this.items.value.forEach(r=>{"applyValidationSchema"in r&&typeof r.applyValidationSchema=="function"&&r.applyValidationSchema(e)})}applyBehaviorSchema(e){this.behaviorSchemaFn=e,this.items.value.forEach(r=>{"applyBehaviorSchema"in r&&typeof r.applyBehaviorSchema=="function"&&r.applyBehaviorSchema(e)})}watchItems(e,r){const n=pe(()=>{const o=this.items.value.map(a=>{if(a instanceof We)return a.getFieldByPath(e)?.value.value});r(o)}),i=Fe(Me.WatchItems);return this.disposers.add(i,n)}watchLength(e){const r=pe(()=>{const i=this.length.value;e(i)}),n=Fe(Me.WatchLength);return this.disposers.add(n,r)}dispose(){this.disposers.dispose(),this.items.value.forEach(e=>{"dispose"in e&&typeof e.dispose=="function"&&e.dispose()})}onDisable(){this.items.value.forEach(e=>{e.disable()})}onEnable(){this.items.value.forEach(e=>{e.enable()})}},ra=class{createNode(e){if(Array.isArray(e)&&e.length>=1)return this.createArrayNodeFromArray(e);if(this.isFieldConfig(e))return new Qs(e);if(this.isArrayConfig(e))return new bo(e.schema,e.initialItems);if(this.isGroupConfig(e))return new We(e);throw new Error(`NodeFactory: Unknown node config. Expected FieldConfig, GroupConfig, or ArrayConfig, but got: ${JSON.stringify(e)}`)}createArrayNodeFromArray(e){const[r,...n]=e,i=[];this.isGroupConfig(r)&&i.push(this.extractValues(r));for(const o of n)this.isGroupConfig(o)?i.push(this.extractValues(o)):i.push(o);return new bo(r,i)}extractValues(e){if(this.isFieldConfig(e))return e.value;if(Array.isArray(e))return e.map(r=>this.extractValues(r));if(this.isGroupConfig(e)){const r={};for(const[n,i]of Object.entries(e))r[n]=this.extractValues(i);return r}return e}isFieldConfig(e){return e==null||typeof e!="object"?!1:"valueSignal"in e?!0:"value"in e?"component"in e||"componentProps"in e||"validators"in e||"asyncValidators"in e||"updateOn"in e||"debounce"in e:!1}isArrayConfig(e){return e!=null&&typeof e=="object"&&"schema"in e&&!("value"in e)}isGroupConfig(e){return e!=null&&typeof e=="object"&&!this.isFieldConfig(e)&&!this.isArrayConfig(e)}},na=class extends ur{constructor(e,r){super(),this.control=e,this.buildItem=r,this.initial=e.toArray(),this.disposeSync=pe(()=>{const i=e.length,o=[],a=[];for(let b=0;b<i;b++){const y=e.at(b);if(!y)continue;let $=this.cache.get(y);$||($=r(y),this.cache.set(y,$)),o.push(y),a.push($)}const l=new Set(o),u=[];for(const b of this.mountedModels){if(l.has(b))continue;const y=this.cache.get(b);this.cache.delete(b),y&&u.push(y)}this.mountedModels=o,this.itemNodes.value=a,u.forEach(b=>this.disposeItemNode(b))}),this.length=J(()=>this.itemNodes.value.length),this.value=J(()=>this.itemNodes.value.map(i=>i.value.value));const n=Gr({getChildren:()=>this.itemNodes.value,ownErrors:this._arrayErrors});this.valid=n.valid,this.invalid=n.invalid,this.pending=n.pending,this.touched=n.touched,this.dirty=n.dirty,this.errors=n.errors,this.status=n.status}itemNodes=se([]);cache=new WeakMap;mountedModels=[];initial;_arrayErrors=se([]);disposeSync;get items(){return this.itemNodes}value;valid;invalid;pending;touched;dirty;errors;status;length;at(e){return this.itemNodes.value[e]}map(e){return this.itemNodes.value.map((r,n)=>e(r,n))}forEach(e){this.itemNodes.value.forEach((r,n)=>e(r,n))}push(e){this.control.push(e??{})}insert(e,r){this.control.insertAt(e,r??{})}removeAt(e){this.control.removeAt(e)}move(e,r){this.control.move(e,r)}swap(e,r){this.control.swap(e,r)}clear(){this.control.clear()}getValue(){return this.control.toArray()}setValue(e){this.control.clear(),(e??[]).forEach(r=>this.control.push(r))}patchValue(e){this.setValue(e)}reset(e){this._arrayErrors.value=[],this.setValue(e??this.initial)}resetToInitial(){this.reset(this.initial)}async validate(){return(await Promise.all(this.itemNodes.value.map(e=>e.validate()))).every(Boolean)&&this._arrayErrors.value.length===0}setErrors(e){this._arrayErrors.value=e}clearErrors(){this._arrayErrors.value=[],this.itemNodes.value.forEach(e=>e.clearErrors?.())}onMarkAsTouched(){this.itemNodes.value.forEach(e=>e.markAsTouched?.())}onMarkAsUntouched(){this.itemNodes.value.forEach(e=>e.markAsUntouched?.())}onMarkAsDirty(){this.itemNodes.value.forEach(e=>e.markAsDirty?.())}onMarkAsPristine(){this.itemNodes.value.forEach(e=>e.markAsPristine?.())}onDisable(){this.itemNodes.value.forEach(e=>e.disable?.())}onEnable(){this.itemNodes.value.forEach(e=>e.enable?.())}disposeItemNode(e){e.dispose?.()}dispose(){this.disposeSync(),this.itemNodes.value.forEach(e=>this.disposeItemNode(e)),this.mountedModels=[]}};const Zo=t=>t!==null&&typeof t=="object"&&!Array.isArray(t)&&!(t instanceof Date)&&!(typeof Blob<"u"&&t instanceof Blob)&&!(typeof File<"u"&&t instanceof File);function qr(t,e,r){if(t==null||typeof t!="object"||t instanceof oe)return;if(Array.isArray(t)){for(const o of t)qr(o,e,r);return}const n=t,i=n.array;if(i&&typeof i.__path=="string"&&typeof n.item=="function"){r.set(i.__path,n.item);return}n.value instanceof oe&&e.set(n.value,{component:n.component,componentProps:n.componentProps,validators:n.validators,asyncValidators:n.asyncValidators,updateOn:n.updateOn,disabled:n.disabled,debounce:n.debounce});for(const[o,a]of Object.entries(n))o!=="value"&&qr(a,e,r)}function Yo(t,e,r,n){const i={};for(const[o,a]of Object.entries(e)){const l=r===""?o:`${r}.${o}`;if(Array.isArray(a))continue;if(Zo(a)){i[o]=Yo(t,a,l,n);continue}const u=t.signalAt(l);if(!u)throw new Error(`createForm({ model }): не найден сигнал для пути "${l}"`);const b=n.get(u)??{},{validators:y,asyncValidators:$,...v}=b;i[o]={...v,valueSignal:u}}return i}function Qo(t,e,r){for(const[n,i]of Object.entries(t)){const o=e===""?n:`${e}.${n}`;Array.isArray(i)||(Zo(i)?Qo(i,o,r):r.push(o))}}function Xo(t){const{model:e,schema:r,behavior:n}=t,i=new Map,o=new Map;r!==void 0&&qr(r,i,o);const a=Yo(e,e.get(),"",i),l=new We(a),u=e.get();for(const[$,v]of Object.entries(u)){if(!Array.isArray(v))continue;const _=o.get($);if(!_)continue;const g=e[$],w=f=>Xo({model:f,schema:_(f)}),d=new na(g,w);l.fields.set($,d)}const b=l.getProxy(),y=[];Qo(e.get(),"",y);for(const $ of y){const v=e.signalAt($),_=l.getFieldByPath($);if(v&&_){Ws(v,_);const g=$.lastIndexOf("."),w=g===-1?l:l.getFieldByPath($.slice(0,g));w instanceof We&&w.registerFieldSignal(_,v)}}return n&&l.attachBehaviorCleanup(n.__run(e,b)),b}const oa=t=>t!=null&&typeof t=="object"&&"model"in t&&typeof t.model?.signalAt=="function";function lc(t){return oa(t)?Xo(t):new We(t).getProxy()}var _o={exports:{}},Tr={},So;function ia(){if(So)return Tr;So=1;var t=vi;function e($,v){return $===v&&($!==0||1/$===1/v)||$!==$&&v!==v}var r=typeof Object.is=="function"?Object.is:e,n=t.useState,i=t.useEffect,o=t.useLayoutEffect,a=t.useDebugValue;function l($,v){var _=v(),g=n({inst:{value:_,getSnapshot:v}}),w=g[0].inst,d=g[1];return o(function(){w.value=_,w.getSnapshot=v,u(w)&&d({inst:w})},[$,_,v]),i(function(){return u(w)&&d({inst:w}),$(function(){u(w)&&d({inst:w})})},[$]),a(_),_}function u($){var v=$.getSnapshot;$=$.value;try{var _=v();return!r($,_)}catch{return!0}}function b($,v){return v()}var y=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?b:l;return Tr.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:y,Tr}var $o;function sa(){return $o||($o=1,_o.exports=ia()),_o.exports}var aa=sa();function la(t,e){if(t===e)return!0;if(t.length!==e.length)return!1;for(let r=0;r<t.length;r++)if(t[r]!==e[r])return!1;return!0}function Hr(t,e,r,n){const i=V.useRef(null),o=V.useRef(t);o.current=t;const a=V.useRef(e);a.current=e;const l=V.useRef(r);if(l.current=r,i.current===null){const y={};for(const $ in t)y[$]=t[$].value;i.current={...y,__snapshot:null}}const u=V.useCallback(y=>{let $=!0;return pe(()=>{const v=o.current;for(const _ in v)v[_].value;if($){$=!1;return}y()})},[n]),b=V.useCallback(()=>{const y=i.current,$=o.current,v={};for(const g in $)v[g]=$[g].value;let _=!1;for(const g of a.current){const{key:w,useShallowArrayEqual:d}=g,f=v[w],s=y[w];if(d){if(!la(s,f)){_=!0;break}}else if(s!==f){_=!0;break}}if(!_&&y.__snapshot)return y.__snapshot;for(const g in $)y[g]=v[g];return y.__snapshot=l.current(v),y.__snapshot},[n]);return aa.useSyncExternalStore(u,b,b)}function ca(t){const e={value:t.value,disabled:t.disabled,errors:t.errors,pending:t.pending,valid:t.valid,invalid:t.invalid,touched:t.touched,dirty:t.dirty,shouldShowError:t.shouldShowError,componentProps:t.componentProps},r=[{key:"value"},{key:"disabled"},{key:"errors",useShallowArrayEqual:!0},{key:"pending"},{key:"valid"},{key:"invalid"},{key:"touched"},{key:"dirty"},{key:"shouldShowError"},{key:"componentProps"}],n=V.useCallback(i=>({value:i.value,pending:i.pending,disabled:i.disabled,errors:i.errors,valid:i.valid,invalid:i.invalid,touched:i.touched,dirty:i.dirty,shouldShowError:i.shouldShowError,componentProps:i.componentProps}),[]);return Hr(e,r,n,t)}function da(t){const e={value:t.value,length:t.length,errors:t.errors,pending:t.pending,valid:t.valid,invalid:t.invalid,touched:t.touched,dirty:t.dirty,disabled:t.disabled},r=[{key:"value"},{key:"length"},{key:"errors",useShallowArrayEqual:!0},{key:"pending"},{key:"valid"},{key:"invalid"},{key:"touched"},{key:"dirty"},{key:"disabled"}],n=V.useCallback(i=>({value:i.value,length:i.length,pending:i.pending,errors:i.errors,valid:i.valid,invalid:i.invalid,touched:i.touched,dirty:i.dirty,disabled:i.disabled}),[]);return Hr(e,r,n,t)}function ua(){const t=V.useCallback(()=>({value:[],length:0,pending:!1,errors:[],valid:!0,invalid:!1,touched:!1,dirty:!1,disabled:!1}),[]);return Hr({},[],t)}function cc(t){const e=t&&"length"in t&&"map"in t;return t?e?da(t):ca(t):ua()}function pa(t){return t.value instanceof oe}function fa(t){const e=t;return e.array!=null&&typeof e.array=="object"&&typeof e.item=="function"}function ha(t){const e=t.component;return typeof e=="function"?!0:typeof e=="string"?e.length>0:e!==null&&typeof e=="object"&&e.$$typeof!==void 0}const ma=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),ei=V.createContext(null);function ya({value:t,children:e}){return K.jsx(ei.Provider,{value:t,children:e})}function ga(){const t=V.useContext(ei);if(!t)throw new Error("useRenderContext must be used within RenderContextProvider (FormRenderer)");return t}const ti=Symbol("RenderSchemaProxy"),pr=V.createContext(null);function wo(t){return typeof t=="function"&&ti in t}function va(t){const e=new Map,r=new Map,n=new Map,i=new Map,o=[],a=new Map,l=new Map,u=se(0),b=new Map,y=g=>{let w=b.get(g);return w||(w=se(0),b.set(g,w)),w},$=g=>{u.value++,y(g).value++},v={hiddenOverrides:e,propsOverrides:r,refRegistry:n,conditionRegistry:i,effectRegistry:o,callbackRegistry:a,lifecycleRegistry:l,version:u,versionFor:y},_=t;return Object.assign(_,{[ti]:!0,__overrideMaps:v}),_.node=g=>({setHidden(w){return e.set(g,w),$(g),this},resetHidden(){return e.delete(g),$(g),this},patchProps(w){return r.set(g,{...r.get(g)??{},...w}),$(g),this},resetProps(){return r.delete(g),$(g),this},getRef(){return n.has(g)||n.set(g,V.createRef()),n.get(g)},__selector:g,__overrideMaps:v}),_}function ba(t){const e=V.useContext(pr);return V.useSyncExternalStore(V.useCallback(r=>e&&t?e.versionFor(t).subscribe(r):()=>{},[e,t]),()=>t&&e?e.hiddenOverrides.get(t)??null:null,()=>t&&e?e.hiddenOverrides.get(t)??null:null)}function _a(t){const e=V.useContext(pr);return V.useSyncExternalStore(V.useCallback(r=>e&&t?e.versionFor(t).subscribe(r):()=>{},[e,t]),()=>t&&e?e.propsOverrides.get(t)??null:null,()=>t&&e?e.propsOverrides.get(t)??null:null)}function Sa(t){const e=V.useCallback(()=>t?.()??!1,[t]),r=V.useCallback(n=>t?J(t).subscribe(n):()=>{},[t]);return V.useSyncExternalStore(r,e,e)}function $a({effectRegistry:t}){return V.useEffect(()=>{const e=t.map(r=>pe(()=>{const n=r();return typeof n=="function"?n:void 0}));return()=>e.forEach(r=>r())},[]),null}function wa(t){V.useEffect(()=>{if(!t)return;const e=t.onMount?.();return()=>{typeof e=="function"&&e(),t.onUnmount?.()}},[t])}const Po=t=>t;function Pa(t,e,r,n,i){const o=t.strip?.length?Object.fromEntries(Object.entries(i).filter(([a])=>!t.strip.includes(a))):i;return{...o,[t.valueProp??"value"]:(t.toValue??Po)(e),[t.changeProp??"onChange"]:a=>r((t.fromEmit??Po)(a,o)),...t.bindBlur?t.bindBlur(n):{onBlur:n}}}function ka(t){const e=V.useRef({value:t.value.value,disabled:t.disabled.value}),r=V.useCallback(i=>{let o=!0;return pe(()=>{if(t.value.value,t.disabled.value,o){o=!1;return}i()})},[t]),n=V.useCallback(()=>{const i=t.value.value,o=t.disabled.value,a=e.current;if(a.value===i&&a.disabled===o)return a;const l={value:i,disabled:o};return e.current=l,l},[t]);return V.useSyncExternalStore(r,n,n)}const xa=V.memo(function({node:t,fieldNode:e,fieldWrapper:r,nodeRef:n,resolveFieldAdapter:i}){const{value:o,disabled:a}=ka(e),l=V.useCallback(S=>e.setValue(S),[e]),u=V.useCallback(()=>e.markAsTouched(),[e]),b=t.component;if(!b)return typeof console<"u"&&console.warn("[RenderSchema] Model field has no component — nothing to render."),null;const{className:y,wrapper:$="div",fieldWrapper:v,testId:_,...g}=t.componentProps??{},w=t.value.__path,d=typeof _=="string"?_:w?w.replace(/\./g,"-"):void 0,f=i?.(b);let s;if(f){const S=Pa(f,o,l,u,g);d&&S["data-testid"]===void 0&&(S["data-testid"]=`input-${d}`),s=K.jsx(b,{disabled:a,...S,...n!==void 0?{ref:n}:{}})}else{const S={value:o,disabled:a,...g};d&&S["data-testid"]===void 0&&(S["data-testid"]=`input-${d}`),s=K.jsx(b,{control:e,...S,...n!==void 0?{ref:n}:{},onChange:l,onBlur:u})}const p=v??r;return p?K.jsx(p,{control:e,className:y,testId:d,children:s}):K.jsx($,{className:y,children:s})});function ri(t){const e=V.useRef(0),r=V.useCallback(n=>pe(()=>{t.length,e.current+=1,n()}),[t]);return V.useSyncExternalStore(r,()=>e.current,()=>e.current)}const ko=new WeakMap;let xo=0;function ni(t){if(t==null||typeof t!="object")return xo++;let e=ko.get(t);return e===void 0&&(e=xo++,ko.set(t,e)),e}const Ea=t=>typeof t=="function"?t():t;function dc(t,e,r){ri(t);const n=t.length,i=V.useRef(null);(!i.current||i.current.itemFn!==e)&&(i.current={itemFn:e,map:new WeakMap});const o=a=>{if(a==null||typeof a!="object")return e(a);const l=i.current.map;let u=l.get(a);return u===void 0&&(u=e(a),l.set(a,u)),u};return Array.from({length:n},(a,l)=>{const u=t.at(l),b=ni(u);return{key:b,index:l,model:u,element:K.jsx(fr,{node:o(u),fieldWrapper:r},b)}})}const Ca=V.memo(function({node:t,fieldWrapper:e}){const r=t.array;ri(r);const n=r.length,i=V.useRef(null);(!i.current||i.current.itemFn!==t.item)&&(i.current={itemFn:t.item,map:new WeakMap});const o=h=>{if(h==null||typeof h!="object")return t.item(h);const P=i.current.map;let j=P.get(h);return j===void 0&&(j=t.item(h),P.set(h,j)),j},a=t.componentProps??{},{title:l,addButtonLabel:u="+ Добавить",removeButtonLabel:b="Удалить",emptyMessage:y,itemLabel:$,reorderable:v=!1,className:_="space-y-3 mt-2",cardClassName:g="mb-4 p-4 bg-white rounded border"}=a,w=(h,P)=>typeof $=="function"?$(h,P):`${$??l??"Элемент"} #${P+1}`,d=a.moveUpLabel??"Переместить вверх",f=a.moveDownLabel??"Переместить вниз",s=a.addButtonClassName??"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors bg-primary text-primary-foreground shadow hover:bg-primary/90 h-9 px-4 py-2",p=a.removeButtonClassName??"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors bg-destructive text-destructive-foreground shadow hover:bg-destructive/90 h-9 px-4 py-2",S=a.moveButtonClassName??"inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground disabled:pointer-events-none disabled:opacity-40 h-9 w-9",c=h=>K.jsx("button",{type:"button","data-testid":"array-add",className:h,onClick:()=>r.push(Ea(t.initialValue)),children:u});return K.jsxs("section",{className:_,children:[l?K.jsxs("div",{className:"flex justify-between items-center mb-4",children:[K.jsx("h3",{className:"text-lg font-semibold",children:l}),c(s)]}):null,Array.from({length:n},(h,P)=>{const j=r.at(P),A=o(j),F=n>1;return K.jsxs("div",{className:g,"data-testid":`array-item-${P}`,children:[l||$?K.jsxs("div",{className:"flex justify-between items-center mb-3",children:[K.jsx("h4",{className:"font-medium",children:w(j,P)}),K.jsxs("div",{className:"flex items-center gap-2",children:[v?K.jsxs("div",{className:"flex items-center gap-1",children:[K.jsx("button",{type:"button","aria-label":d,"data-testid":`array-item-${P}-move-up`,className:S,disabled:P===0,onClick:()=>r.move(P,P-1),children:"↑"}),K.jsx("button",{type:"button","aria-label":f,"data-testid":`array-item-${P}-move-down`,className:S,disabled:P===n-1,onClick:()=>r.move(P,P+1),children:"↓"})]}):null,F?K.jsx("button",{type:"button","data-testid":`array-item-${P}-remove`,className:p,onClick:()=>r.removeAt(P),children:b}):null]})]}):null,K.jsx(fr,{node:A,fieldWrapper:e})]},ni(j))}),n===0&&y?K.jsx("div",{className:"p-4 bg-gray-100 border border-gray-300 rounded text-center text-gray-600",children:y}):null,l?null:K.jsx("div",{children:c("text-sm text-blue-600 hover:text-blue-700 hover:underline")})]})}),Na=V.memo(function({node:t,fieldWrapper:e}){const r=t.component;return K.jsx(r,{array:t.array,item:t.item,initialValue:t.initialValue,fieldWrapper:e,...t.componentProps??{}})});function ja(t){return Array.isArray(t)?t:[t]}function Ta(t){const e=[];for(const r of t)r instanceof oe&&e.push(r);return e}function Oa(t){let e="";for(const r of t){const n=r instanceof oe?r.value:r;n!=null&&(e+=String(n))}return e}function oi(t){const e=V.useRef({signals:t,key:0}),r=e.current;return(r.signals.length!==t.length||t.some((n,i)=>n!==r.signals[i]))&&(e.current={signals:t,key:r.key+1}),e.current.key}function Ra(t){const e=[];if(t)for(const u of Object.keys(t))t[u]instanceof oe&&e.push(u);const r=e.map(u=>t[u]),n=oi(r),i=V.useRef(r);i.current=r;const o=V.useRef(0),a=V.useCallback(u=>{if(i.current.length===0)return()=>{};let b=!0;return pe(()=>{for(const y of i.current)y.value;if(b){b=!1;return}o.current+=1,u()})},[n]);if(V.useSyncExternalStore(a,()=>o.current,()=>o.current),!t||e.length===0)return t;const l={...t};for(const u of e)l[u]=t[u].value;return l}const Aa=V.memo(function({text:t}){const e=ja(t),r=Ta(e),n=oi(r),i=V.useRef(e);i.current=e;const o=V.useRef(r);o.current=r;const a=V.useCallback(u=>{if(o.current.length===0)return()=>{};let b=!0;return pe(()=>{for(const y of o.current)y.value;if(b){b=!1;return}u()})},[n]),l=V.useCallback(()=>Oa(i.current),[]);return V.useSyncExternalStore(a,l,l)});function fr({node:t,form:e,fieldWrapper:r}){const{settings:n}=ga(),i=r??n?.fieldWrapper,{selector:o}=t,a=ba(o),l=_a(o),u=V.useContext(pr),b=o&&u?.refRegistry.has(o)?u.refRegistry.get(o):void 0,y=o?u?.conditionRegistry.get(o):void 0,$=Sa(y),v=a??$,_=o?u?.lifecycleRegistry.get(o):void 0;wa(_);const g=Ra(t.componentProps);if(v)return null;if(pa(t)){const w=Js(t.value);if(!w){if(typeof console<"u"){const s=t.value.__path;console.warn(`[RenderSchema] No form node for signal${s?` "${s}"`:""} — render value-leaf after createForm.`)}return null}const d=o??t.value.__path,f=d&&u?.refRegistry.has(d)?u.refRegistry.get(d):void 0;return K.jsx(xa,{node:t,fieldNode:w,fieldWrapper:i,nodeRef:f,resolveFieldAdapter:n?.resolveFieldAdapter})}if(fa(t))return t.component?K.jsx(Na,{node:t,fieldWrapper:i}):K.jsx(Ca,{node:t,fieldWrapper:i});if(ha(t)){const{selector:w,component:d,children:f}=t,s=g||{},p=l!=null?{...s,...l}:s,S=w?u?.callbackRegistry.get(w):void 0,c=S?Object.fromEntries(S):{},h=S?{...p,...c}:p,P=typeof d=="string",j=!P&&w!==void 0?{selector:w}:{},A=d;if(!P&&d.__selfManagedChildren===!0){const F=d,q=h.form===void 0&&e!==void 0?{form:e}:{};return K.jsx(F,{...w!==void 0?{selector:w}:{},...h,...q,...b!==void 0?{ref:b}:{},...f!==void 0?{children:f}:{}})}return P&&ma.has(d)?K.jsx(A,{...h,...b!==void 0?{ref:b}:{}}):K.jsxs(A,{...j,...h,...b!==void 0?{ref:b}:{},children:[t.text!==void 0?K.jsx(Aa,{text:t.text}):null,f?.map((F,q)=>K.jsx(fr,{node:F,form:e},q))]})}return null}function Ia({render:t,settings:e}){const r=t(),n=K.jsxs(ya,{value:{settings:e},children:[wo(t)&&t.__overrideMaps.effectRegistry.length>0&&K.jsx($a,{effectRegistry:t.__overrideMaps.effectRegistry}),K.jsx(fr,{node:r})]});return wo(t)?K.jsx(pr.Provider,{value:t.__overrideMaps,children:n}):n}const Ma=/^\$(model|component|html|dataSource|fn|locale)\((.+)\)$/;function de(t){if(typeof t!="string")return null;const e=Ma.exec(t);return e?{op:e[1],arg:e[2]}:null}const De=t=>de(t)?.op==="model",Wr=t=>de(t)?.op==="component",hr=t=>de(t)?.op==="html",Fa=t=>de(t)?.op==="dataSource",qa=t=>de(t)?.op==="fn",Da=t=>de(t)?.op==="locale",ii=new Set(["div","section","article","aside","header","footer","nav","main","figure","figcaption","details","summary","fieldset","legend","p","span","h1","h2","h3","h4","h5","h6","strong","b","em","i","u","s","small","mark","sub","sup","code","pre","kbd","samp","var","blockquote","cite","q","abbr","time","address","label","br","hr","a","ul","ol","li","dl","dt","dd","table","caption","colgroup","col","thead","tbody","tfoot","tr","th","td","img","picture","source","video","audio","track","progress","meter"]);function Va(t){return ii.has(t.toLowerCase())}const Ba=new Set(["href","src","srcSet","srcset","poster","action","formAction","formaction","data","xlinkHref","cite","ping"]);function La(t){const e=Array.from(t).filter(r=>r.charCodeAt(0)>32).join("").toLowerCase();return e.startsWith("javascript:")||e.startsWith("vbscript:")?!0:e.startsWith("data:")?!e.startsWith("data:image/"):!1}function za(t,e){if(!t)return t;let r=null;const n={};for(const i of Object.keys(t)){const o=t[i],a=i.length>2&&i.startsWith("on")&&i[2]===i[2].toUpperCase(),l=Ba.has(i)&&typeof o=="string"&&La(o);if(i==="dangerouslySetInnerHTML"||a||l){(r??=[]).push(i);continue}n[i]=o}return r?(typeof console<"u"&&console.warn(`[JsonRenderer] $html(${e}): отброшены небезопасные props — ${r.join(", ")}. HTML-узлы предназначены для презентационной разметки: исполняемые обработчики, сырой innerHTML и javascript:/data:-URL в них не пропускаются.`),n):t}const Ua="http://json-schema.org/draft-07/schema#",Ka="https://reformer.dev/schemas/form-schema.schema.json",Ga="ReFormer JSON form schema (M1, string-operator DSL)",Ha="Base meta-schema: validates node structure + operator string syntax ($model/$component/$dataSource). Component-name enum is tightened per-app via buildFormSchemaMetaSchema; $dataSource names and $model paths are checked outside this schema.",Wa="object",Ja=["root"],Za=!1,Ya={$schema:{type:"string"},version:{type:"string"},root:{$ref:"#/definitions/node"}},Qa={modelOp:{type:"string",pattern:"^\\$model\\(.+\\)$",description:'Model binding: "$model(path)" — path resolved at runtime (not validated here).'},componentOp:{type:"string",pattern:"^\\$component\\(.+\\)$",description:'Registry component: "$component(Name)". Name is tightened to a registry enum by buildFormSchemaMetaSchema.'},htmlOp:{type:"string",pattern:"^\\$html\\([a-zA-Z][a-zA-Z0-9]*\\)$",description:'Native HTML tag: "$html(div)". The tag is checked against the presentational whitelist (isAllowedHtmlTag) by validateFormSchema and by the converter; buildFormSchemaMetaSchema tightens it to an enum for IDE completion.'},textContent:{description:'Text content of a node: a literal, an operator string ("$model(path)" for reactive model values, "$locale(key)" for localized strings), or an array of parts joined without a separator.',$comment:`Types are listed as separate anyOf branches rather than a union "type": ["string","number"] — ajv's strict mode rejects union type keywords unless allowUnionTypes is on, and validateFormSchema compiles this schema without it.`,anyOf:[{type:"string"},{type:"number"},{type:"array",items:{anyOf:[{type:"string"},{type:"number"}]}}]},operatorOp:{type:"string",pattern:"^\\$(model|component|html|dataSource|fn|locale)\\(.+\\)$",description:'Any DSL operator string ("$model/$component/$dataSource/$fn/$locale(...)") used as an escape hatch on a componentProps value (e.g. "options": "$dataSource(LOAN_TYPES)"). The component-props validator wraps every prop in anyOf:[honest type, operatorOp] via allowOperatorStrings, so an operator string is accepted wherever a literal value is.'},node:{$comment:"Discriminated by which operator key is present (array→value→component), mirroring the isArrayNode/isFieldNode/isContainerNode runtime guards. Using oneOf here made ajv (allErrors) report failures against all three branches for any single mistake, burying the real cause; if/then/else surfaces only the relevant branch's errors.",if:{type:"object",required:["array"]},then:{$ref:"#/definitions/arrayNode"},else:{if:{type:"object",required:["value"]},then:{$ref:"#/definitions/fieldNode"},else:{$ref:"#/definitions/containerNode"}}},fieldNode:{type:"object",required:["value"],additionalProperties:!1,properties:{selector:{type:"string"},value:{$ref:"#/definitions/modelOp"},component:{$ref:"#/definitions/componentOp"},componentProps:{type:"object"},wrapper:{$ref:"#/definitions/node"}}},arrayNode:{type:"object",required:["array","item"],additionalProperties:!1,properties:{selector:{type:"string"},array:{$ref:"#/definitions/modelOp"},component:{$ref:"#/definitions/componentOp"},item:{type:"object",required:["$template"],additionalProperties:!1,properties:{$template:{$ref:"#/definitions/node"}}},initialValue:{type:"object"},componentProps:{type:"object"}}},containerNode:{type:"object",required:["component"],additionalProperties:!1,properties:{selector:{type:"string"},component:{anyOf:[{$ref:"#/definitions/componentOp"},{$ref:"#/definitions/htmlOp"}]},componentProps:{type:"object"},text:{$ref:"#/definitions/textContent"},children:{type:"array",items:{$ref:"#/definitions/node"}}}}},Jr={$schema:Ua,$id:Ka,title:Ga,description:Ha,type:Wa,required:Ja,additionalProperties:Za,properties:Ya,definitions:Qa},uc=Jr;function pc(t){return t.names().filter(e=>t.get(e)?.type==="component")}function fc(t){return t.names().filter(e=>t.get(e)?.type==="dataSource")}function hc(t){return t.names().filter(e=>t.get(e)?.type==="fn")}function mc(t){return t.getLocale?.()?.keys}function Xa(){return Jr.definitions.operatorOp}function el(t){return Dr(t)}function Dr(t){if(Array.isArray(t))return t.map(Dr);if(t!==null&&typeof t=="object"){const e={};for(const[r,n]of Object.entries(t))r.startsWith("x-")||(e[r]=Dr(n));return e}return t}function tl(t){return Jt(t)}function Jt(t){if(Array.isArray(t))return t.map(Jt);if(t===null||typeof t!="object")return t;const e=t,r={...e};if(e.properties!==null&&typeof e.properties=="object"&&!Array.isArray(e.properties)){const n={};for(const[i,o]of Object.entries(e.properties))n[i]={anyOf:[Jt(o),{$ref:"#/definitions/operatorOp"}]};r.properties=n}return e.items!==void 0&&(r.items=Jt(e.items)),r}function rl(t){const e=el(t),r=tl(e),n=r.definitions??{};return{...r,definitions:{...n,operatorOp:Xa()}}}function yc(t){const e=JSON.parse(JSON.stringify(Jr)),r=t?.componentNames;if(r&&r.length>0){const o=e.definitions.componentOp;delete o.pattern,o.enum=r.map(a=>`$component(${a})`)}const n=e.definitions.htmlOp;delete n.pattern,n.enum=[...ii].map(o=>`$html(${o})`);const i=t?.propSchemas;if(i&&Object.keys(i).length>0){const o=Object.entries(i).map(([a,l])=>({if:{required:["component"],properties:{component:{const:`$component(${a})`}}},then:{properties:{componentProps:rl(l)}}}));for(const a of["fieldNode","containerNode"]){const l=e.definitions[a];l.allOf=[...l.allOf??[],...o]}}return e}const nl="$fieldWrapper",si="$localeService";class He{own=new Map;parent=null;get(e){return this.own.get(e)??this.parent?.get(e)}getDataSource(e){const r=this.get(e);if(!(!r||r.type!=="dataSource"))return r.component}getLocale(){const e=this.get(si);if(!(!e||e.type!=="locale"))return e.component}has(e){return this.own.has(e)||(this.parent?.has(e)??!1)}names(){const e=this.parent?.names()??[],r=Array.from(this.own.keys());return[...new Set([...e,...r])]}_set(e,r){this.own.has(e)&&console.warn(`[ComponentRegistry] Overwriting entry: ${e}`),this.own.set(e,r)}static withParent(e,r){const n=new He,i=o=>{if(o instanceof He)o.own.forEach((a,l)=>n.own.set(l,a));else for(const a of o.names()){const l=o.get(a);l&&n.own.set(a,l)}};return e instanceof He?n.parent=e:i(e),i(r),n}}function gc(t){const e=new He;return t({component(r,n,i){e._set(r,{component:n,type:"component",description:i})},dataSource(r,n,i){e._set(r,{component:n,type:"dataSource",description:i})},fn(r,n,i){if(typeof n!="function")throw new Error(`reg.fn("${r}") expects a function, got ${typeof n}. Use reg.dataSource(...) for non-function values.`);e._set(r,{component:n,type:"fn",description:i})},locale(r,n){const i=typeof r=="function"?{resolve:r}:r;e._set(si,{component:i,type:"locale",description:n})}}),e}const Vr=V.createContext({});function vc({settings:t,children:e}){const r=V.useContext(Vr),n=V.useMemo(()=>r.registry&&t.registry?He.withParent(r.registry,t.registry):t.registry??r.registry,[r.registry,t.registry]),i=V.useMemo(()=>{const o=n?.get(nl)?.component;return{...r,...t,registry:n,fieldWrapper:t.fieldWrapper??o??r.fieldWrapper}},[r,t,n]);return K.jsx(Vr.Provider,{value:i,children:e})}function ol(){return V.useContext(Vr)}function ct(t){const e=t;return De(e.array)&&typeof e.item=="object"&&e.item!==null&&"$template"in e.item}function mr(t){return De(t.value)}function Ze(t){const e=t.component;return(Wr(e)||hr(e))&&!mr(t)&&!ct(t)}function il(t){const e=de(t)?.arg;if(!e)throw new Error(`Invalid $html operator: "${t}"`);if(!Va(e))throw new Error(`HTML tag "${e}" is not allowed in $html(...). Presentational tags only — script/style/iframe/form-controls are excluded by design.`);return e.toLowerCase()}function ot(t,e){if(!t)return;if(hr(t))return il(t);const r=de(t)?.arg;if(!r)throw new Error(`Invalid $component operator: "${t}"`);const n=e.get(r);if(!n)throw new Error(`Component "${r}" not found in registry. Available: ${e.names().join(", ")}`);if(n.type!=="component")throw new Error(`Entry "${r}" is a '${n.type}' and cannot be used as $component(...)`);return n.component}function sl(t,e){const r=e.get(t);if(!r)throw new Error(`Data source "${t}" not found in registry. Available: ${e.names().join(", ")}`);if(r.type!=="dataSource")throw new Error(`Entry "${t}" is a '${r.type}' and cannot be used as $dataSource(...)`);return r.component}function al(t,e){const r=e.get(t);if(!r)throw new Error(`Function "${t}" not found in registry. Available: ${e.names().join(", ")}`);if(r.type!=="fn")throw new Error(`Entry "${t}" is a '${r.type}' and cannot be used as $fn(...)`);return r.component}function Eo(t,e,r){return e.getLocale?.()?.resolve(t,r)??t}function ll(t){return t!==null&&typeof t=="object"&&typeof t.$locale=="string"}function cl(t,e){if(!t)return t;let r=!1;const n={};for(const i of Object.keys(t)){const o=t[i];if(De(o)){const a=e.signalAt(de(o).arg);n[i]=a?.peek?.(),r=!0}else n[i]=o}return r?n:t}function dl(t,e){if(!(!e||typeof console>"u"))for(const r of Object.keys(e))De(e[r])&&console.warn(`[JsonRenderer] $locale("${t}"): параметр "${r}" (=${String(e[r])}) взят снимком значения на момент рендера и не обновляется при изменении модели. Для реактивного значения используй I18n: { component: "$component(I18n)", componentProps: { id: "${t}", values: { ${r}: "${String(e[r])}" } } }.`)}function ul(t,e){return e.split(".").reduce((r,n)=>r==null?r:r[n],t)}function pl(t){if(t===null||typeof t!="object")return!1;const e=t;return De(e.value)||De(e.array)||Wr(e.component)||hr(e.component)}function fl(t){return t==null?t:JSON.parse(JSON.stringify(t))}function at(t,e,r){if(Fa(t))return sl(de(t).arg,r);if(Wr(t))return ot(t,r);if(qa(t))return al(de(t).arg,r);if(Da(t))return Eo(de(t).arg,r);if(De(t))return e.signalAt(de(t).arg);if(ll(t))return dl(t.$locale,t.params),Eo(t.$locale,r,cl(t.params,e));if(pl(t))return lt(t,e,r);if(Array.isArray(t))return t.map(n=>at(n,e,r));if(t!==null&&typeof t=="object"){const n=t,i={};for(const o of Object.keys(n))i[o]=at(n[o],e,r);return i}return t}function Or(t,e,r){if(!t)return;const n={};for(const i of Object.keys(t))n[i]=at(t[i],e,r);return n}function hl(t,e,r){if(t!==void 0)return Array.isArray(t)?t.map(n=>at(n,e,r)):at(t,e,r)}function lt(t,e,r){if(ct(t)){const n=ul(e,de(t.array).arg),i=t.item.$template,o=t.initialValue,a=t.component?ot(t.component,r):void 0;return{...t.selector?{selector:t.selector}:{},array:n,...a?{component:a}:{},initialValue:()=>o?fl(o):{},item:l=>lt(i,l,r),componentProps:Or(t.componentProps,e,r)}}if(mr(t)){const n=de(t.value).arg,i=e.signalAt(n);!i&&typeof console<"u"&&console.warn(`[JsonRenderer/M1] No model signal for "${n}".`);const o=Or(t.componentProps,e,r),a=t.wrapper?ot(t.wrapper.component,r):void 0;return{...t.selector?{selector:t.selector}:{},value:i,component:ot(t.component,r),componentProps:a?{...o??{},fieldWrapper:a}:o}}if(Ze(t)){const n=hr(t.component),i=ot(t.component,r),o=Or(t.componentProps,e,r);return{...t.selector?{selector:t.selector}:{},component:i,componentProps:n?za(o,i):o,...t.text!==void 0?{text:hl(t.text,e,r)}:{},children:t.children?.map(a=>lt(a,e,r))}}throw new Error(`Invalid JSON node (M1): ${JSON.stringify(t)}`)}function bc(t,e,r){return lt(t.root,r,e)}function ml(t,e,r){return()=>lt(t.root,r,e)}function yl({errors:t}){return K.jsxs("div",{role:"alert","data-testid":"schema-error-panel",style:{border:"1px solid #f5a9a9",background:"#fff5f5",color:"#9b1c1c",borderRadius:8,padding:"16px 20px",font:"14px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace"},children:[K.jsxs("strong",{style:{display:"block",marginBottom:8,fontSize:15},children:["Невалидная JSON-схема формы (",t.length,")"]}),K.jsx("ul",{style:{margin:0,paddingLeft:20},children:t.map((e,r)=>K.jsx("li",{style:{marginBottom:4},children:e},r))})]})}function _c({schema:t,model:e,renderBehavior:r,onSchemaReady:n,validateSchema:i=!1}){const{registry:o,...a}=ol(),[l,u]=V.useState(i?void 0:null);V.useEffect(()=>{if(!i){u(null);return}let y=!1;return u(void 0),bi(async()=>{const{validateFormSchema:$}=await import("./validate-B5O3mi2k.js");return{validateFormSchema:$}},__vite__mapDeps([0,1,2])).then(({validateFormSchema:$})=>{if(y)return;const{valid:v,errors:_}=$(t,{registry:o});u(v?null:_)}).catch($=>{y||u([`Schema validator failed to load: ${String($)}`])}),()=>{y=!0}},[i,t,o]);const b=V.useMemo(()=>{if(!e)throw new Error("JsonFormRenderer: `model` prop is required (M1). Pass the FormModel to <JsonFormRenderer model={...} />.");if(l!==null)return null;if(!o)throw new Error("JsonFormRenderer: settings.registry is required. Pass a ComponentRegistry via JsonRendererProvider.");const y=ml(t,o,e),$=va(y);return r&&r($),$},[t,o,r,e,l]);return V.useMemo(()=>{b&&n&&n(b)},[b]),l&&l.length>0?K.jsx(yl,{errors:l}):b?K.jsx(Ia,{render:b,settings:a}):null}const gl={resolve:t=>t};V.createContext(gl);var vl=Symbol.for("preact-signals");function Zr(){if(qe>1)qe--;else{var t,e=!1;for((function(){var i=or;for(or=void 0;i!==void 0;)i.S.v===i.v&&(i.S.i=i.i),i=i.o})();st!==void 0;){var r=st;for(st=void 0,nr++;r!==void 0;){var n=r.u;if(r.u=void 0,r.f&=-3,!(8&r.f)&&ci(r))try{r.c()}catch(i){e||(t=i,e=!0)}r=n}}if(nr=0,qe--,e)throw t}}var te=void 0;function ai(t){var e=te;te=void 0;try{return t()}finally{te=e}}var st=void 0,qe=0,nr=0,Co=0,or=void 0,ir=0;function li(t){if(te!==void 0){var e=t.n;if(e===void 0||e.t!==te)return e={i:0,S:t,p:te.s,n:void 0,t:te,e:void 0,x:void 0,r:e},te.s!==void 0&&(te.s.n=e),te.s=e,t.n=e,32&te.f&&t.S(e),e;if(e.i===-1)return e.i=0,e.n!==void 0&&(e.n.p=e.p,e.p!==void 0&&(e.p.n=e.n),e.p=te.s,e.n=void 0,te.s.n=e,te.s=e),e}}function me(t,e){this.v=t,this.i=0,this.n=void 0,this.t=void 0,this.l=0,this.W=e?.watched,this.Z=e?.unwatched,this.name=e?.name}me.prototype.brand=vl;me.prototype.h=function(){return!0};me.prototype.S=function(t){var e=this,r=this.t;r!==t&&t.e===void 0&&(t.x=r,this.t=t,r!==void 0?r.e=t:ai(function(){var n;(n=e.W)==null||n.call(e)}))};me.prototype.U=function(t){var e=this;if(this.t!==void 0){var r=t.e,n=t.x;r!==void 0&&(r.x=n,t.e=void 0),n!==void 0&&(n.e=r,t.x=void 0),t===this.t&&(this.t=n,n===void 0&&ai(function(){var i;(i=e.Z)==null||i.call(e)}))}};me.prototype.subscribe=function(t){var e=this;return _l(function(){var r=e.value,n=te;te=void 0;try{t(r)}finally{te=n}},{name:"sub"})};me.prototype.valueOf=function(){return this.value};me.prototype.toString=function(){return this.value+""};me.prototype.toJSON=function(){return this.value};me.prototype.peek=function(){var t=te;te=void 0;try{return this.value}finally{te=t}};Object.defineProperty(me.prototype,"value",{get:function(){var t=li(this);return t!==void 0&&(t.i=this.i),this.v},set:function(t){if(t!==this.v){if(nr>100)throw new Error("Cycle detected");(function(r){qe!==0&&nr===0&&r.l!==Co&&(r.l=Co,or={S:r,v:r.v,i:r.i,o:or})})(this),this.v=t,this.i++,ir++,qe++;try{for(var e=this.t;e!==void 0;e=e.x)e.t.N()}finally{Zr()}}}});function ci(t){for(var e=t.s;e!==void 0;e=e.n)if(e.S.i!==e.i||!e.S.h()||e.S.i!==e.i)return!0;return!1}function di(t){for(var e=t.s;e!==void 0;e=e.n){var r=e.S.n;if(r!==void 0&&(e.r=r),e.S.n=e,e.i=-1,e.n===void 0){t.s=e;break}}}function ui(t){for(var e=t.s,r=void 0;e!==void 0;){var n=e.p;e.i===-1?(e.S.U(e),n!==void 0&&(n.n=e.n),e.n!==void 0&&(e.n.p=n)):r=e,e.S.n=e.r,e.r!==void 0&&(e.r=void 0),e=n}t.s=r}function Ye(t,e){me.call(this,void 0),this.x=t,this.s=void 0,this.g=ir-1,this.f=4,this.W=e?.watched,this.Z=e?.unwatched,this.name=e?.name}Ye.prototype=new me;Ye.prototype.h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===ir))return!0;if(this.g=ir,this.f|=1,this.i>0&&!ci(this))return this.f&=-2,!0;var t=te;try{di(this),te=this;var e=this.x();(16&this.f||this.v!==e||this.i===0)&&(this.v=e,this.f&=-17,this.i++)}catch(r){this.v=r,this.f|=16,this.i++}return te=t,ui(this),this.f&=-2,!0};Ye.prototype.S=function(t){if(this.t===void 0){this.f|=36;for(var e=this.s;e!==void 0;e=e.n)e.S.S(e)}me.prototype.S.call(this,t)};Ye.prototype.U=function(t){if(this.t!==void 0&&(me.prototype.U.call(this,t),this.t===void 0)){this.f&=-33;for(var e=this.s;e!==void 0;e=e.n)e.S.U(e)}};Ye.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var t=this.t;t!==void 0;t=t.x)t.t.N()}};Object.defineProperty(Ye.prototype,"value",{get:function(){if(1&this.f)throw new Error("Cycle detected");var t=li(this);if(this.h(),t!==void 0&&(t.i=this.i),16&this.f)throw this.v;return this.v}});function pi(t){var e=t.m;if(t.m=void 0,typeof e=="function"){qe++;var r=te;te=void 0;try{e()}catch(n){throw t.f&=-2,t.f|=8,Yr(t),n}finally{te=r,Zr()}}}function Yr(t){for(var e=t.s;e!==void 0;e=e.n)e.S.U(e);t.x=void 0,t.s=void 0,pi(t)}function bl(t){if(te!==this)throw new Error("Out-of-order effect");ui(this),te=t,this.f&=-2,8&this.f&&Yr(this),Zr()}function Qe(t,e){this.x=t,this.m=void 0,this.s=void 0,this.u=void 0,this.f=32,this.name=e?.name}Qe.prototype.c=function(){var t=this.S();try{if(8&this.f||this.x===void 0)return;var e=this.x();typeof e=="function"&&(this.m=e)}finally{t()}};Qe.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,pi(this),di(this),qe++;var t=te;return te=this,bl.bind(this,t)};Qe.prototype.N=function(){2&this.f||(this.f|=2,this.u=st,st=this)};Qe.prototype.d=function(){this.f|=8,1&this.f||Yr(this)};Qe.prototype.dispose=function(){this.d()};function _l(t,e){var r=new Qe(t,e);try{r.c()}catch(i){throw r.d(),i}var n=r.d.bind(r);return n[Symbol.dispose]=n,n}function Sc(t){return ct(t)?"array":mr(t)?"field":"container"}function No(t){if(t==null||typeof t!="object"||Array.isArray(t))return!1;const e=t;return"value"in e||"array"in e||"component"in e}const Sl=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),fi=new Set(["Icon","Separator","Spinner","Skeleton","Progress"]);function $l(t){const e=de(t);return e?e.op==="component"?fi.has(e.arg):e.op==="html"?Sl.has(e.arg):!1:!1}function hi(t){return $l(t.component)}function $c(t,e){const r=[];if(hi(t))return r;if(ct(t)){const n=t;return r.push({kind:"template",path:[...e,"item","$template"],single:!0,nodes:[n.item.$template]}),r}if(mr(t))return t.wrapper&&r.push({kind:"wrapper",path:[...e,"wrapper"],single:!0,nodes:[t.wrapper]}),r;if(Ze(t)){const n=t,i=n.componentProps?.steps;Array.isArray(i)&&i.some(No)&&r.push({kind:"steps",path:[...e,"componentProps","steps"],single:!1,nodes:i.filter(No)}),Array.isArray(n.children)&&r.push({kind:"children",path:[...e,"children"],single:!1,nodes:n.children})}return r}function wc(t){return hi(t)?!1:!!(ct(t)||Ze(t))}function Pc(t){if(!Ze(t))return"vertical";const e=t.componentProps?.className;if(typeof e!="string")return"vertical";const r=e.split(/\s+/).filter(Boolean);if(r.includes("grid")){const n=r.find(i=>/^grid-cols-\d+$/.test(i));if(n&&Number(n.slice(10))>=2)return"horizontal"}return r.includes("flex")&&!r.includes("flex-col")?"horizontal":"vertical"}function kc(t){return Ze(t)&&t.component==="$html(div)"}function xc(t){if(!Ze(t))return!1;const e=t;if(e.component!=="$html(div)")return!1;const r=e.componentProps?.className;return typeof r=="string"&&r.split(/\s+/).includes("flex")}function wl(t){return{value:"$model(newField)",component:`$component(${t})`,componentProps:{label:t}}}function Pl(t){return{component:`$component(${t})`,componentProps:{className:"space-y-4"},children:[]}}function kl(t){return{component:`$component(${t})`,componentProps:{}}}function xl(t){const e=t.slice(6,-1),r=`$html(${e})`,n=Rs(e);if(!n||n.content==="container"){const i=n?.defaultClass?{className:n.defaultClass}:{};return{component:r,componentProps:i,children:[]}}return n.content==="void"?{component:r,componentProps:{}}:{component:r,text:n.defaultText??"Текст"}}function El(){return{array:"$model(items)",item:{$template:{component:"$component(Box)",componentProps:{className:"space-y-3"},children:[]}},componentProps:{addButtonLabel:"+ Добавить элемент"}}}function mi(t="Шаг"){return{component:"$component(Step)",componentProps:{title:t},children:[]}}function Cl(){return{component:"$component(Wizard)",componentProps:{steps:[mi("Шаг 1")]}}}function Nl(t,e){return e==="array"?El():t.startsWith("$html(")?xl(t):e==="field"?wl(t):t==="Wizard"?Cl():t==="Step"?mi():fi.has(t)?kl(t):Pl(t)}const jl="http://json-schema.org/draft-07/schema#",Tl="https://reformer.dev/schemas/component-catalog.schema.json",Ol="ReFormer component catalog",Rl="Контракт каталога компонентов (спека §5). Владелец — reformer-builder; клиенты (напр. @reformer/ui-kit) генерируют валидный catalog-JSON со списком своих компонентов. Билдер грузит его в палитру/инспектор.",Al="object",Il=["version","components"],Ml=!1,Fl={$schema:{type:"string",description:"Ссылка на этот контракт (для валидации/подсказок в IDE). Не нормативна — билдер валидирует каталог программно."},version:{type:"string",minLength:1},components:{type:"array",items:{type:"object",required:["name","role","propsSchema"],additionalProperties:!1,properties:{name:{type:"string",minLength:1,description:"Имя компонента для оператора $component(name)."},role:{enum:["field","container","array"],description:"field — form-control (несёт value); container — держит children; array — повторяющийся блок."},category:{type:"string",description:"Необязательная группировка палитры. Категория — забота билдера; клиент может не поставлять."},propsSchema:{type:"object",description:"JSON Schema редактируемых пропсов компонента (валидируется её структура, не содержимое)."},variantGroup:{type:"string",description:"Имя группы вариантов. Компоненты с одним variantGroup — варианты одного компонента (селектор variant в инспекторе). Дефолт группы — член, чей name === variantGroup."},variant:{type:"string",description:"Человекочитаемая метка варианта в группе (напр. «Пароль»)."}}}}},ql={$schema:jl,$id:Tl,title:Ol,description:Rl,type:Al,required:Il,additionalProperties:Ml,properties:Fl},Dl="1.0",Vl=JSON.parse(`[{"name":"Accordion","role":"container","propsSchema":{"type":"object","additionalProperties":false,"x-registryName":"Accordion","properties":{"className":{"type":"string","description":"CSS-класс контейнера аккордеона (Tailwind).","x-doc":{"group":"Control","type":"string","kind":"readonly"}},"type":{"type":"string","enum":["single","multiple"],"description":"Режим раскрытия: одна секция за раз (single) или несколько (multiple).","x-doc":{"group":"Behavior","type":"'single' | 'multiple'","kind":"enum"}},"collapsible":{"type":"boolean","description":"В режиме single разрешить закрыть открытую секцию (не оставлять всегда одну открытой).","x-doc":{"group":"Behavior","type":"boolean","kind":"boolean"}},"defaultValue":{"type":"string","description":"Значение(-я) секции, открытой по умолчанию (uncontrolled).","x-doc":{"group":"Behavior","type":"string | string[]"}},"disabled":{"type":"boolean","description":"Заблокировать взаимодействие со всеми секциями.","x-doc":{"group":"Behavior","type":"boolean","kind":"boolean"}},"orientation":{"type":"string","enum":["vertical","horizontal"],"default":"vertical","description":"Ориентация раскладки секций.","x-doc":{"group":"Behavior","type":"'vertical' | 'horizontal'","kind":"enum"}}}}},{"name":"Alert","role":"container","propsSchema":{"type":"object","additionalProperties":false,"x-registryName":"Alert","properties":{"className":{"type":"string","description":"CSS-класс контейнера алерта (Tailwind).","x-doc":{"group":"Control","type":"string","kind":"readonly"}},"variant":{"type":"string","enum":["default","destructive"],"default":"default","description":"Визуальный тон алерта.","x-doc":{"group":"Behavior","type":"'default' | 'destructive'","kind":"enum"}}}}},{"name":"AlertDialog","role":"container","propsSchema":{"type":"object","additionalProperties":true,"x-registryName":"AlertDialog","properties":{"defaultOpen":{"type":"boolean","default":false,"description":"Открыт ли диалог изначально (неуправляемый режим).","x-doc":{"group":"State","type":"boolean"}}}}},{"name":"AspectRatio","role":"container","propsSchema":{"type":"object","additionalProperties":true,"x-registryName":"AspectRatio","properties":{"ratio":{"type":"number","default":1,"description":"Соотношение сторон (ширина / высота), напр. 16/9 ≈ 1.78.","x-doc":{"group":"Behavior","type":"number"}},"className":{"type":"string","description":"Доп. CSS-класс (Tailwind).","x-doc":{"group":"Control","type":"string","kind":"readonly"}}}}},{"name":"Attachment","role":"container","propsSchema":{"type":"object","additionalProperties":true,"x-registryName":"Attachment","properties":{"state":{"type":"string","enum":["idle","uploading","processing","error","done"],"default":"done","description":"Состояние загрузки/обработки файла — влияет на стили рамки и анимацию.","x-doc":{"group":"Behavior","type":"'idle' | 'uploading' | 'processing' | 'error' | 'done'","kind":"enum"}},"size":{"type":"string","enum":["default","sm","xs"],"default":"default","description":"Размер чипа (отступы и типографика).","x-doc":{"group":"Behavior","type":"'default' | 'sm' | 'xs'","kind":"enum"}},"orientation":{"type":"string","enum":["horizontal","vertical"],"default":"horizontal","description":"Ориентация: горизонтальный чип или вертикальная карточка.","x-doc":{"group":"Behavior","type":"'horizontal' | 'vertical'","kind":"enum"}},"className":{"type":"string","description":"Доп. CSS-класс (Tailwind).","x-doc":{"group":"Control","type":"string","kind":"readonly"}}}}},{"name":"Avatar","role":"container","propsSchema":{"type":"object","additionalProperties":false,"x-registryName":"Avatar","properties":{"className":{"type":"string","description":"CSS-класс аватара (Tailwind).","x-doc":{"group":"Control","type":"string","kind":"readonly"}},"size":{"type":"string","enum":["default","sm","lg"],"default":"default","description":"Размер аватара: sm (24px), default (32px), lg (40px).","x-doc":{"group":"Behavior","type":"'default' | 'sm' | 'lg'","kind":"enum"}}}}},{"name":"Badge","role":"container","propsSchema":{"type":"object","additionalProperties":false,"x-registryName":"Badge","properties":{"className":{"type":"string","description":"CSS-класс бейджа (Tailwind).","x-doc":{"group":"Control","type":"string","kind":"readonly"}},"variant":{"type":"string","enum":["default","secondary","destructive","outline","ghost","link"],"default":"default","description":"Визуальный вариант бейджа.","x-doc":{"group":"Behavior","type":"'default' | 'secondary' | 'destructive' | 'outline' | 'ghost' | 'link'","kind":"enum"}}}}},{"name":"Box","role":"container","propsSchema":{"type":"object","additionalProperties":false,"x-registryName":"Box","properties":{"className":{"type":"string","description":"CSS-класс layout-контейнера (atomic CSS / Tailwind: flex, grid, gap-*).","x-doc":{"group":"Control","type":"string","kind":"readonly"}}}}},{"name":"Breadcrumb","role":"container","propsSchema":{"type":"object","additionalProperties":true,"x-registryName":"Breadcrumb","properties":{"className":{"type":"string","description":"Доп. CSS-класс (Tailwind).","x-doc":{"group":"Control","type":"string","kind":"readonly"}}}}},{"name":"Bubble","role":"container","propsSchema":{"type":"object","additionalProperties":true,"x-registryName":"Bubble","properties":{"variant":{"type":"string","enum":["default","secondary","muted","tinted","outline","ghost","destructive"],"default":"default","description":"Вариант оформления пузыря.","x-doc":{"group":"Behavior","type":"'default' | 'secondary' | 'muted' | 'tinted' | 'outline' | 'ghost' | 'destructive'","kind":"enum"}},"align":{"type":"string","enum":["start","end"],"default":"start","description":"Сторона выравнивания пузыря (start — слева, end — справа).","x-doc":{"group":"Behavior","type":"'start' | 'end'","kind":"enum"}},"className":{"type":"string","description":"Доп. CSS-класс (Tailwind).","x-doc":{"group":"Control","type":"string","kind":"readonly"}}}}},{"name":"Button","role":"container","propsSchema":{"type":"object","additionalProperties":false,"x-registryName":"Button","properties":{"className":{"type":"string","description":"Доп. CSS-класс кнопки (Tailwind).","x-doc":{"group":"Control","type":"string","kind":"readonly"}},"variant":{"type":"string","enum":["default","destructive","outline","secondary","ghost","link"],"default":"default","description":"Визуальный вариант кнопки (cva).","x-doc":{"group":"Behavior","type":"'default' | 'destructive' | 'outline' | 'secondary' | 'ghost' | 'link'","kind":"enum"}},"size":{"type":"string","enum":["default","xs","sm","lg","icon","icon-xs","icon-sm","icon-lg"],"default":"default","description":"Размер кнопки (cva); icon-* — квадратные для иконок без текста.","x-doc":{"group":"Behavior","type":"'default' | 'xs' | 'sm' | 'lg' | 'icon' | 'icon-xs' | 'icon-sm' | 'icon-lg'","kind":"enum"}},"type":{"type":"string","enum":["button","submit","reset"],"description":"HTML-тип кнопки: button | submit | reset.","x-doc":{"group":"Behavior","type":"'button' | 'submit' | 'reset'","kind":"enum"}},"disabled":{"type":"boolean","description":"Заблокировать кнопку.","x-doc":{"group":"Behavior","type":"boolean","kind":"boolean"}}}}},{"name":"ButtonGroup","role":"container","propsSchema":{"type":"object","additionalProperties":false,"x-registryName":"ButtonGroup","properties":{"className":{"type":"string","description":"CSS-класс группы кнопок (Tailwind).","x-doc":{"group":"Control","type":"string","kind":"readonly"}},"orientation":{"type":"string","enum":["horizontal","vertical"],"default":"horizontal","description":"Ориентация группы: горизонтальная (по умолчанию) или вертикальная (cva).","x-doc":{"group":"Behavior","type":"'horizontal' | 'vertical'","kind":"enum"}}}}},{"name":"Calendar","role":"field","propsSchema":{"type":"object","properties":{"label":{"type":"string","description":"Подпись поля (рендерит FormField.Label).","x-doc":{"group":"Textfield","type":"string"}},"required":{"type":"boolean","default":false,"description":"Маркер «*» у метки + aria-required.","x-doc":{"group":"State","type":"boolean"}},"description":{"type":"string","description":"Пояснение под полем (shadcn FieldDescription).","x-doc":{"group":"Textfield","type":"string"}},"testId":{"type":"string","description":"data-testid для e2e (meta-проп; в DOM примитива не течёт).","x-doc":{"group":"Behavior","type":"string","kind":"readonly"}},"mode":{"type":"string","enum":["single"],"default":"single","description":"Режим выбора. Field-версия — только single (одна дата, value: Date | null).","x-doc":{"group":"Behavior","type":"'single'","kind":"enum"}},"captionLayout":{"type":"string","enum":["label","dropdown","dropdown-months","dropdown-years"],"default":"label","description":"Шапка месяца: статичная подпись или дропдауны выбора месяца/года.","x-doc":{"group":"Behavior","type":"'label' | 'dropdown' | 'dropdown-months' | 'dropdown-years'","kind":"enum"}},"showOutsideDays":{"type":"boolean","default":true,"description":"Показывать дни соседних месяцев в первой и последней неделе.","x-doc":{"group":"Behavior","type":"boolean"}},"className":{"type":"string","description":"Доп. CSS-класс корневого элемента.","x-doc":{"group":"Control","type":"string","kind":"readonly"}}},"additionalProperties":false,"x-runtimeProps":{"value":{"group":"Control","type":"Date | null","description":"Выбранная дата. null — ничего не выбрано."},"onChange":{"group":"Control","type":"(value: Date | null) => void","description":"Выбор даты. Повторный клик по выбранной дате сбрасывает значение в null."},"onBlur":{"group":"Control","type":"() => void","kind":"readonly","description":"Отметка touched. Форма подставляет control.markAsTouched."},"disabled":{"group":"State","type":"boolean","kind":"boolean","default":false,"description":"Блокировка поля. Задаётся через control.disable()/enable(), НЕ через componentProps: FormFieldControl.tsx:104-115 ставит disabled ПОСЛЕ спреда componentProps, поэтому componentProps.disabled мёртв."}}}},{"name":"Card","role":"container","propsSchema":{"type":"object","additionalProperties":false,"x-registryName":"Card","properties":{"className":{"type":"string","description":"CSS-класс карточки-контейнера (Tailwind).","x-doc":{"group":"Control","type":"string","kind":"readonly"}}}}},{"name":"Carousel","role":"container","propsSchema":{"type":"object","additionalProperties":true,"x-registryName":"Carousel","properties":{"orientation":{"type":"string","enum":["horizontal","vertical"],"default":"horizontal","description":"Ориентация прокрутки карусели.","x-doc":{"group":"Behavior","type":"'horizontal' | 'vertical'","kind":"enum"}},"className":{"type":"string","description":"Доп. CSS-класс (Tailwind).","x-doc":{"group":"Control","type":"string","kind":"readonly"}}}}},{"name":"Chart","role":"container","propsSchema":{"type":"object","additionalProperties":true,"x-registryName":"Chart","properties":{"className":{"type":"string","description":"Доп. CSS-класс (Tailwind) — обычно задаёт высоту/ширину графика.","x-doc":{"group":"Control","type":"string","kind":"readonly"}}}}},{"name":"Checkbox","role":"field","propsSchema":{"type":"object","properties":{"label":{"type":"string","description":"Подпись справа от чекбокса (inline-раскладка). Рендерит сам контрол.","x-doc":{"group":"Textfield","type":"string"}},"required":{"type":"boolean","default":false,"description":"Маркер «*» у метки + aria-required.","x-doc":{"group":"State","type":"boolean"}},"description":{"type":"string","description":"Пояснение под полем (shadcn FieldDescription).","x-doc":{"group":"Textfield","type":"string"}},"testId":{"type":"string","description":"data-testid для e2e (meta-проп; в DOM примитива не течёт).","x-doc":{"group":"Behavior","type":"string","kind":"readonly"}},"className":{"type":"string","description":"Доп. CSS-класс контрола (CheckboxPrimitive.Root).","x-doc":{"group":"Control","type":"string","kind":"readonly"}}},"additionalProperties":false,"x-runtimeProps":{"value":{"group":"Control","type":"boolean","description":"Состояние чекбокса. undefined/null трактуется как false."},"onChange":{"group":"Control","type":"(value: boolean) => void","description":"Изменение. indeterminate приводится к false."},"onBlur":{"group":"Control","type":"() => void","kind":"readonly","description":"Отметка touched. Форма подставляет control.markAsTouched."},"disabled":{"group":"State","type":"boolean","kind":"boolean","default":false,"description":"Блокировка поля. Задаётся через control.disable()/enable(), НЕ через componentProps: FormFieldControl.tsx:104-115 ставит disabled ПОСЛЕ спреда componentProps, поэтому componentProps.disabled мёртв."}}}},{"name":"Collapsible","role":"container","propsSchema":{"type":"object","additionalProperties":false,"x-registryName":"Collapsible","properties":{"className":{"type":"string","description":"CSS-класс контейнера collapsible (Tailwind).","x-doc":{"group":"Control","type":"string","kind":"readonly"}},"defaultOpen":{"type":"boolean","description":"Раскрыт ли collapsible по умолчанию (uncontrolled).","x-doc":{"group":"Behavior","type":"boolean","kind":"boolean"}},"disabled":{"type":"boolean","description":"Заблокировать раскрытие/сворачивание.","x-doc":{"group":"Behavior","type":"boolean","kind":"boolean"}}}}},{"name":"Combobox","role":"field","propsSchema":{"type":"object","properties":{"label":{"type":"string","description":"Подпись поля (рендерит FormField.Label).","x-doc":{"group":"Textfield","type":"string"}},"required":{"type":"boolean","default":false,"description":"Маркер «*» у метки + aria-required.","x-doc":{"group":"State","type":"boolean"}},"description":{"type":"string","description":"Пояснение под полем (shadcn FieldDescription).","x-doc":{"group":"Textfield","type":"string"}},"testId":{"type":"string","description":"data-testid для e2e (meta-проп; в DOM примитива не течёт).","x-doc":{"group":"Behavior","type":"string","kind":"readonly"}},"className":{"type":"string","description":"Доп. CSS-класс триггера.","x-doc":{"group":"Control","type":"string","kind":"readonly"}},"options":{"type":"array","items":{"type":"object","required":["value","label"],"additionalProperties":false,"properties":{"value":{"type":"string"},"label":{"type":"string"}}},"description":"Список опций { value, label }. Поиск идёт по label.","x-doc":{"group":"Options","type":"Array<{ value; label }>","kind":"readonly"}},"placeholder":{"type":"string","default":"Select an option...","description":"Подсказка в триггере, пока ничего не выбрано.","x-doc":{"group":"Textfield","type":"string"}},"searchPlaceholder":{"type":"string","default":"Search...","description":"Подсказка в поле поиска.","x-doc":{"group":"Textfield","type":"string"}},"emptyText":{"type":"string","default":"No options found.","description":"Текст пустого состояния (ничего не найдено).","x-doc":{"group":"Textfield","type":"string"}},"clearable":{"type":"boolean","default":false,"description":"Показывать крестик очистки (сброс в null); повторный выбор опции тоже сбрасывает.","x-doc":{"group":"Behavior","type":"boolean"}},"creatable":{"type":"boolean","default":false,"description":"Разрешить ввести своё значение: при отсутствии совпадения — пункт «Создать «…»» (эмитит введённое как value).","x-doc":{"group":"Behavior","type":"boolean"}}},"additionalProperties":false,"x-runtimeProps":{"value":{"group":"Control","type":"string | null","description":"Выбранное значение (option.value). null — ничего не выбрано."},"onChange":{"group":"Control","type":"(value: string | null) => void","description":"Выбор; при очистке приходит null."},"onBlur":{"group":"Control","type":"() => void","kind":"readonly","description":"Отметка touched. Форма подставляет control.markAsTouched."},"disabled":{"group":"State","type":"boolean","kind":"boolean","default":false,"description":"Блокировка поля. Задаётся через control.disable()/enable(), НЕ через componentProps: FormFieldControl.tsx:104-115 ставит disabled ПОСЛЕ спреда componentProps, поэтому componentProps.disabled мёртв."}}}},{"name":"Command","role":"container","propsSchema":{"type":"object","additionalProperties":true,"x-registryName":"Command","properties":{"shouldFilter":{"type":"boolean","default":true,"description":"Авто-фильтрация и сортировка по поисковому запросу.","x-doc":{"group":"Behavior","type":"boolean"}},"loop":{"type":"boolean","default":false,"description":"Зацикливать навигацию стрелками (с конца — в начало).","x-doc":{"group":"Behavior","type":"boolean"}},"disablePointerSelection":{"type":"boolean","default":false,"description":"Отключить выбор пункта наведением мыши.","x-doc":{"group":"Behavior","type":"boolean"}},"vimBindings":{"type":"boolean","default":true,"description":"Vim-хоткеи навигации (ctrl+n/j/p/k).","x-doc":{"group":"Behavior","type":"boolean"}},"className":{"type":"string","description":"Доп. CSS-класс (Tailwind).","x-doc":{"group":"Control","type":"string","kind":"readonly"}}}}},{"name":"ContextMenu","role":"container","propsSchema":{"type":"object","additionalProperties":true,"x-registryName":"ContextMenu","properties":{"dir":{"type":"string","enum":["ltr","rtl"],"default":"ltr","description":"Направление чтения — влияет на раскладку и навигацию с клавиатуры.","x-doc":{"group":"Behavior","type":"'ltr' | 'rtl'","kind":"enum"}},"modal":{"type":"boolean","default":true,"description":"Модальный режим — блокирует взаимодействие с фоном при открытом меню.","x-doc":{"group":"Behavior","type":"boolean"}}}}},{"name":"DatePicker","role":"field","propsSchema":{"type":"object","properties":{"label":{"type":"string","description":"Подпись поля (рендерит FormField.Label).","x-doc":{"group":"Textfield","type":"string"}},"required":{"type":"boolean","default":false,"description":"Маркер «*» у метки + aria-required.","x-doc":{"group":"State","type":"boolean"}},"description":{"type":"string","description":"Пояснение под полем (shadcn FieldDescription).","x-doc":{"group":"Textfield","type":"string"}},"testId":{"type":"string","description":"data-testid для e2e (meta-проп; в DOM примитива не течёт).","x-doc":{"group":"Behavior","type":"string","kind":"readonly"}},"placeholder":{"type":"string","default":"Выберите дату","description":"Текст кнопки-триггера, когда дата не выбрана.","x-doc":{"group":"Textfield","type":"string"}},"dateFormat":{"type":"string","default":"PPP","description":"Формат отображения выбранной даты — токены date-fns (напр. dd.MM.yyyy).","x-doc":{"group":"Behavior","type":"string"}},"className":{"type":"string","description":"Доп. CSS-класс кнопки-триггера.","x-doc":{"group":"Control","type":"string","kind":"readonly"}}},"additionalProperties":false,"x-runtimeProps":{"value":{"group":"Control","type":"Date | null","description":"Выбранная дата. null — ничего не выбрано."},"onChange":{"group":"Control","type":"(value: Date | null) => void","description":"Выбор даты в календаре. Повторный клик по выбранной дате сбрасывает в null."},"onBlur":{"group":"Control","type":"() => void","kind":"readonly","description":"Отметка touched. Форма подставляет control.markAsTouched."},"disabled":{"group":"State","type":"boolean","kind":"boolean","default":false,"description":"Блокировка поля. Задаётся через control.disable()/enable(), НЕ через componentProps: FormFieldControl.tsx:104-115 ставит disabled ПОСЛЕ спреда componentProps, поэтому componentProps.disabled мёртв."}}}},{"name":"Dialog","role":"container","propsSchema":{"type":"object","additionalProperties":true,"x-registryName":"Dialog","properties":{"defaultOpen":{"type":"boolean","default":false,"description":"Открыт ли диалог изначально (неуправляемый режим).","x-doc":{"group":"State","type":"boolean"}},"modal":{"type":"boolean","default":true,"description":"Модальный режим — блокирует взаимодействие с фоном.","x-doc":{"group":"Behavior","type":"boolean"}}}}},{"name":"Drawer","role":"container","propsSchema":{"type":"object","additionalProperties":true,"x-registryName":"Drawer","properties":{"direction":{"type":"string","enum":["top","bottom","left","right"],"default":"bottom","description":"Сторона появления шторки.","x-doc":{"group":"Behavior","type":"'top' | 'bottom' | 'left' | 'right'","kind":"enum"}},"defaultOpen":{"type":"boolean","default":false,"description":"Открыта ли шторка изначально (неуправляемый режим).","x-doc":{"group":"State","type":"boolean"}},"modal":{"type":"boolean","default":true,"description":"Модальный режим — блокирует взаимодействие с фоном.","x-doc":{"group":"Behavior","type":"boolean"}},"dismissible":{"type":"boolean","default":true,"description":"Можно ли закрыть свайпом/кликом по фону.","x-doc":{"group":"Behavior","type":"boolean"}},"handleOnly":{"type":"boolean","default":false,"description":"Тянуть только за «ручку», а не за весь контент.","x-doc":{"group":"Behavior","type":"boolean"}}}}},{"name":"DropdownMenu","role":"container","propsSchema":{"type":"object","additionalProperties":true,"x-registryName":"DropdownMenu","properties":{"defaultOpen":{"type":"boolean","default":false,"description":"Открыто ли меню изначально (неуправляемый режим).","x-doc":{"group":"State","type":"boolean"}},"modal":{"type":"boolean","default":true,"description":"Модальный режим — блокирует взаимодействие с фоном, пока меню открыто.","x-doc":{"group":"Behavior","type":"boolean"}},"dir":{"type":"string","enum":["ltr","rtl"],"description":"Направление чтения — влияет на раскладку и навигацию клавиатурой.","x-doc":{"group":"Behavior","type":"'ltr' | 'rtl'","kind":"enum"}}}}},{"name":"Empty","role":"container","propsSchema":{"type":"object","additionalProperties":true,"x-registryName":"Empty","properties":{"className":{"type":"string","description":"Доп. CSS-класс (Tailwind).","x-doc":{"group":"Control","type":"string","kind":"readonly"}}}}},{"name":"FileUpload","role":"field","propsSchema":{"type":"object","properties":{"label":{"type":"string","description":"Подпись поля (рендерит FormField.Label).","x-doc":{"group":"Textfield","type":"string"}},"required":{"type":"boolean","default":false,"description":"Маркер «*» у метки + aria-required.","x-doc":{"group":"State","type":"boolean"}},"description":{"type":"string","description":"Пояснение под полем (shadcn FieldDescription).","x-doc":{"group":"Textfield","type":"string"}},"testId":{"type":"string","description":"data-testid для e2e (meta-проп; в DOM примитива не течёт).","x-doc":{"group":"Behavior","type":"string","kind":"readonly"}},"variant":{"type":"string","enum":["button","dropzone","input"],"default":"button","description":"Представление: кнопка-триггер, зона drag-and-drop или компактный инпут с кнопкой-иконкой.","x-doc":{"group":"Control","type":"'button' | 'dropzone' | 'input'"}},"placeholder":{"type":"string","description":"Видимый текст кнопки (button), зоны (dropzone) или пустого инпута (input). Подпись поля — отдельная конвенция label (рендерит FormField).","x-doc":{"group":"Textfield","type":"string"}},"invalid":{"type":"boolean","default":false,"description":"Явно пометить поле невалидным (подсветка рамки у dropzone/input). Под FormField не нужен: aria-invalid приходит от обёртки при ошибке валидации; button показывает ошибку текстом (FormField.Error).","x-doc":{"group":"State","type":"boolean"}},"hint":{"type":"string","description":"Подсказка с ограничениями («PDF, до 5 МБ, максимум 3 файла»).","x-doc":{"group":"Textfield","type":"string"}},"accept":{"type":"string","description":"Допустимые типы в синтаксисе нативного accept: \\".pdf\\", \\"image/png\\", \\"image/*\\", список через запятую. Применяется и к drag-and-drop.","x-doc":{"group":"Behavior","type":"string"}},"multiple":{"type":"boolean","default":false,"description":"Несколько файлов. При false новая селекция заменяет текущую.","x-doc":{"group":"Behavior","type":"boolean"}},"maxFiles":{"type":"number","minimum":1,"description":"Максимум файлов в списке (действует при multiple).","x-doc":{"group":"Behavior","type":"number"}},"maxFileSize":{"type":"number","minimum":0,"description":"Максимальный размер одного файла, байты.","x-doc":{"group":"Behavior","type":"number"}},"minFileSize":{"type":"number","minimum":0,"description":"Минимальный размер одного файла, байты (1 — отсев пустых).","x-doc":{"group":"Behavior","type":"number"}},"maxTotalFileSize":{"type":"number","minimum":0,"description":"Максимальный суммарный размер всех файлов, байты.","x-doc":{"group":"Behavior","type":"number"}},"preventDuplicates":{"type":"boolean","default":true,"description":"Отклонять дубликаты (совпадение имени и размера).","x-doc":{"group":"Behavior","type":"boolean"}},"allowDrop":{"type":"boolean","default":true,"description":"Принимать drag-and-drop на зоне.","x-doc":{"group":"Behavior","type":"boolean"}},"allowPaste":{"type":"boolean","default":false,"description":"Принимать файлы из буфера обмена (paste на сфокусированной зоне).","x-doc":{"group":"Behavior","type":"boolean"}},"capture":{"type":"string","enum":["user","environment"],"description":"Источник камеры для мобильного пикера (фронтальная/тыловая).","x-doc":{"group":"Behavior","type":"'user' | 'environment'"}},"autoUpload":{"type":"boolean","default":true,"description":"Автозагрузка принятых файлов (действует при заданном uploader).","x-doc":{"group":"Behavior","type":"boolean"}},"className":{"type":"string","description":"Доп. CSS-класс контейнера.","x-doc":{"group":"Control","type":"string","kind":"readonly"}}},"additionalProperties":false,"x-runtimeProps":{"value":{"group":"Control","type":"File[] | RemoteFileRef[] | null","description":"Выбранные файлы. Без uploader — File[]; с uploader — сериализуемые дескрипторы загруженных. null — пусто."},"onChange":{"group":"Control","type":"(value: File[] | RemoteFileRef[] | null) => void","description":"Изменение списка; пустой список приходит как null."},"onBlur":{"group":"Control","type":"() => void","kind":"readonly","description":"Отметка touched. Форма подставляет control.markAsTouched."},"disabled":{"group":"State","type":"boolean","kind":"boolean","default":false,"description":"Блокировка поля. Задаётся через control.disable()/enable(), НЕ через componentProps: FormFieldControl.tsx:104-115 ставит disabled ПОСЛЕ спреда componentProps, поэтому componentProps.disabled мёртв."},"uploader":{"group":"Behavior","type":"(file: File, ctx: { onProgress; signal }) => Promise<RemoteFileRef>","description":"Загрузчик immediate-режима. В JSON-форме недостижим: требует функцию — передаётся через реестр."},"onReject":{"group":"Behavior","type":"(rejections: FileRejection[]) => void","description":"Файлы, отклонённые отбором (в значение поля не попадают)."}}},"variantGroup":"FileUpload","variant":"Файлы"},{"name":"FileUploadAvatar","role":"field","propsSchema":{"type":"object","properties":{"label":{"type":"string","default":"Загрузить изображение","description":"Доступное имя зоны (aria-label).","x-doc":{"group":"Textfield","type":"string"}},"required":{"type":"boolean","default":false,"description":"Маркер «*» у метки + aria-required.","x-doc":{"group":"State","type":"boolean"}},"description":{"type":"string","description":"Пояснение под полем (shadcn FieldDescription).","x-doc":{"group":"Textfield","type":"string"}},"testId":{"type":"string","description":"data-testid для e2e (meta-проп; в DOM примитива не течёт).","x-doc":{"group":"Behavior","type":"string","kind":"readonly"}},"shape":{"type":"string","enum":["circle","square"],"default":"circle","description":"Форма превью.","x-doc":{"group":"Control","type":"'circle' | 'square'"}},"accept":{"type":"string","default":"image/*","description":"Допустимые типы в синтаксисе нативного accept.","x-doc":{"group":"Behavior","type":"string"}},"maxFileSize":{"type":"number","minimum":0,"description":"Максимальный размер файла, байты.","x-doc":{"group":"Behavior","type":"number"}},"capture":{"type":"string","enum":["user","environment"],"description":"Источник камеры для мобильного пикера.","x-doc":{"group":"Behavior","type":"'user' | 'environment'"}},"invalid":{"type":"boolean","default":false,"description":"Явно пометить поле невалидным (подсветка рамки зоны). Под FormField не нужен: aria-invalid приходит от обёртки при ошибке валидации.","x-doc":{"group":"State","type":"boolean"}},"className":{"type":"string","description":"Доп. CSS-класс контейнера.","x-doc":{"group":"Control","type":"string","kind":"readonly"}}},"additionalProperties":false,"x-runtimeProps":{"value":{"group":"Control","type":"File | RemoteFileRef | null","description":"Выбранное изображение (single). null — пусто."},"onChange":{"group":"Control","type":"(value: File | RemoteFileRef | null) => void","description":"Выбор/замена/удаление изображения."},"onBlur":{"group":"Control","type":"() => void","kind":"readonly","description":"Отметка touched. Форма подставляет control.markAsTouched."},"disabled":{"group":"State","type":"boolean","kind":"boolean","default":false,"description":"Блокировка поля. Задаётся через control.disable()/enable(), НЕ через componentProps: FormFieldControl.tsx:104-115 ставит disabled ПОСЛЕ спреда componentProps, поэтому componentProps.disabled мёртв."},"uploader":{"group":"Behavior","type":"(file: File, ctx: { onProgress; signal }) => Promise<RemoteFileRef>","description":"Загрузчик immediate-режима. В JSON-форме недостижим: требует функцию — передаётся через реестр."},"onReject":{"group":"Behavior","type":"(rejections: FileRejection[]) => void","description":"Файлы, отклонённые отбором."}}},"variantGroup":"FileUpload","variant":"Аватар"},{"name":"HoverCard","role":"container","propsSchema":{"type":"object","additionalProperties":true,"x-registryName":"HoverCard","properties":{"defaultOpen":{"type":"boolean","default":false,"description":"Открыта ли карточка изначально (неуправляемый режим).","x-doc":{"group":"State","type":"boolean"}},"openDelay":{"type":"number","default":700,"description":"Задержка (мс) перед открытием при наведении.","x-doc":{"group":"Behavior","type":"number"}},"closeDelay":{"type":"number","default":300,"description":"Задержка (мс) перед закрытием при уходе курсора.","x-doc":{"group":"Behavior","type":"number"}}}}},{"name":"Icon","role":"container","propsSchema":{"type":"object","additionalProperties":false,"x-registryName":"Icon","properties":{"iconName":{"type":"string","default":"Circle","description":"Имя иконки lucide (PascalCase, напр. Home, ArrowRight).","x-doc":{"group":"Control","type":"string"}},"size":{"type":"number","default":24,"minimum":8,"description":"Размер в пикселях.","x-doc":{"group":"Control","type":"number"}},"color":{"type":"string","description":"Цвет обводки (любой CSS-цвет; по умолчанию currentColor).","x-doc":{"group":"Control","type":"string"}},"strokeWidth":{"type":"number","default":2,"minimum":0.5,"description":"Толщина линий.","x-doc":{"group":"Behavior","type":"number"}},"className":{"type":"string","description":"Доп. CSS-класс.","x-doc":{"group":"Control","type":"string","kind":"readonly"}}}}},{"name":"Input","role":"field","propsSchema":{"type":"object","properties":{"label":{"type":"string","description":"Подпись поля (рендерит FormField.Label).","x-doc":{"group":"Textfield","type":"string"}},"required":{"type":"boolean","default":false,"description":"Маркер «*» у метки + aria-required.","x-doc":{"group":"State","type":"boolean"}},"description":{"type":"string","description":"Пояснение под полем (shadcn FieldDescription).","x-doc":{"group":"Textfield","type":"string"}},"testId":{"type":"string","description":"data-testid для e2e (meta-проп; в DOM примитива не течёт).","x-doc":{"group":"Behavior","type":"string","kind":"readonly"}},"type":{"type":"string","enum":["text","email","tel","url","password","number","date"],"default":"text","description":"HTML-тип input. number включает числовой буфер, остальные — строковые.","x-doc":{"group":"Textfield","type":"'text' | 'email' | 'number' | 'date' | …","kind":"enum"}},"placeholder":{"type":"string","description":"Подсказка внутри поля.","x-doc":{"group":"Textfield","type":"string"}},"min":{"type":"number","description":"Минимум (type=number). При min>=0 отрицательные значения зажимаются к 0.","x-doc":{"group":"Behavior","type":"number"}},"max":{"type":"number","description":"Максимум (type=number).","x-doc":{"group":"Behavior","type":"number"}},"step":{"type":"number","description":"Шаг (type=number).","x-doc":{"group":"Behavior","type":"number"}},"className":{"type":"string","description":"Доп. CSS-класс.","x-doc":{"group":"Control","type":"string","kind":"readonly"}}},"additionalProperties":false,"x-runtimeProps":{"value":{"group":"Control","type":"string | number | null","description":"Значение поля. Для type=number — number|null, иначе string|null."},"onChange":{"group":"Control","type":"(value: string | number | null) => void","description":"Изменение. Пустой ввод → null. Для number частичный ввод («-», «1.») не эмитится."},"onBlur":{"group":"Control","type":"() => void","kind":"readonly","description":"Отметка touched. Форма подставляет control.markAsTouched."},"disabled":{"group":"State","type":"boolean","kind":"boolean","default":false,"description":"Блокировка поля. Задаётся через control.disable()/enable(), НЕ через componentProps: FormFieldControl.tsx:104-115 ставит disabled ПОСЛЕ спреда componentProps, поэтому componentProps.disabled мёртв."}}},"variantGroup":"Input","variant":"Текст"},{"name":"InputGroup","role":"container","propsSchema":{"type":"object","additionalProperties":false,"x-registryName":"InputGroup","properties":{"className":{"type":"string","description":"CSS-класс контейнера-группы (Tailwind).","x-doc":{"group":"Control","type":"string","kind":"readonly"}}}}},{"name":"InputMask","role":"field","propsSchema":{"type":"object","properties":{"label":{"type":"string","description":"Подпись поля (рендерит FormField.Label).","x-doc":{"group":"Textfield","type":"string"}},"required":{"type":"boolean","default":false,"description":"Маркер «*» у метки + aria-required.","x-doc":{"group":"State","type":"boolean"}},"description":{"type":"string","description":"Пояснение под полем (shadcn FieldDescription).","x-doc":{"group":"Textfield","type":"string"}},"testId":{"type":"string","description":"data-testid для e2e (meta-проп; в DOM примитива не течёт).","x-doc":{"group":"Behavior","type":"string","kind":"readonly"}},"mask":{"type":"string","description":"Шаблон маски-подсказки: '9' — цифра, прочие символы — литералы (уходят в placeholder). Напр. '+7 (999) 999-99-99'. Автовставки литералов нет — компонент только помечает формат.","x-doc":{"group":"Textfield","type":"string"}},"placeholder":{"type":"string","description":"Подсказка внутри поля. По умолчанию равна mask.","x-doc":{"group":"Textfield","type":"string"}},"className":{"type":"string","description":"Доп. CSS-класс.","x-doc":{"group":"Control","type":"string","kind":"readonly"}}},"additionalProperties":false,"x-runtimeProps":{"value":{"group":"Control","type":"string | null","description":"Значение поля. null/undefined → пустое поле."},"onChange":{"group":"Control","type":"(value: string | null) => void","description":"Изменение. Пустой ввод → null."},"onBlur":{"group":"Control","type":"() => void","kind":"readonly","description":"Отметка touched. Форма подставляет control.markAsTouched."},"disabled":{"group":"State","type":"boolean","kind":"boolean","default":false,"description":"Блокировка поля. Задаётся через control.disable()/enable(), НЕ через componentProps: FormFieldControl.tsx:104-115 ставит disabled ПОСЛЕ спреда componentProps, поэтому componentProps.disabled мёртв."}}},"variantGroup":"Input","variant":"Маска"},{"name":"InputOTP","role":"field","propsSchema":{"type":"object","properties":{"label":{"type":"string","description":"Подпись поля (рендерит FormField.Label).","x-doc":{"group":"Textfield","type":"string"}},"required":{"type":"boolean","default":false,"description":"Маркер «*» у метки + aria-required.","x-doc":{"group":"State","type":"boolean"}},"description":{"type":"string","description":"Пояснение под полем (shadcn FieldDescription).","x-doc":{"group":"Textfield","type":"string"}},"testId":{"type":"string","description":"data-testid для e2e (meta-проп; в DOM примитива не течёт).","x-doc":{"group":"Behavior","type":"string","kind":"readonly"}},"maxLength":{"type":"number","default":6,"minimum":1,"description":"Число слотов (длина кода). Дефолтная раскладка разворачивает одну группу из maxLength слотов.","x-doc":{"group":"Behavior","type":"number"}},"className":{"type":"string","description":"Доп. CSS-класс скрытого input.","x-doc":{"group":"Control","type":"string","kind":"readonly"}}},"additionalProperties":false,"x-runtimeProps":{"value":{"group":"Control","type":"string | null","description":"Набранный код. null — пусто."},"onChange":{"group":"Control","type":"(value: string | null) => void","description":"Изменение кода. Пустой ввод → null."},"onBlur":{"group":"Control","type":"() => void","kind":"readonly","description":"Отметка touched. Форма подставляет control.markAsTouched."},"disabled":{"group":"State","type":"boolean","kind":"boolean","default":false,"description":"Блокировка поля. Задаётся через control.disable()/enable(), НЕ через componentProps: FormFieldControl.tsx:104-115 ставит disabled ПОСЛЕ спреда componentProps, поэтому componentProps.disabled мёртв."}}},"variantGroup":"Input","variant":"OTP"},{"name":"InputPassword","role":"field","propsSchema":{"type":"object","properties":{"label":{"type":"string","description":"Подпись поля (рендерит FormField.Label).","x-doc":{"group":"Textfield","type":"string"}},"required":{"type":"boolean","default":false,"description":"Маркер «*» у метки + aria-required.","x-doc":{"group":"State","type":"boolean"}},"description":{"type":"string","description":"Пояснение под полем (shadcn FieldDescription).","x-doc":{"group":"Textfield","type":"string"}},"testId":{"type":"string","description":"data-testid для e2e (meta-проп; в DOM примитива не течёт).","x-doc":{"group":"Behavior","type":"string","kind":"readonly"}},"placeholder":{"type":"string","default":"Password","description":"Подсказка внутри поля.","x-doc":{"group":"Textfield","type":"string"}},"showToggle":{"type":"boolean","default":true,"description":"Показывать иконку переключения видимости (eye/eye-off). Появляется при непустом value.","x-doc":{"group":"Behavior","type":"boolean"}},"className":{"type":"string","description":"Доп. CSS-класс.","x-doc":{"group":"Control","type":"string","kind":"readonly"}}},"additionalProperties":false,"x-runtimeProps":{"value":{"group":"Control","type":"string | null","description":"Значение пароля. null/пусто — пустое поле."},"onChange":{"group":"Control","type":"(value: string | null) => void","description":"Изменение. Пустой ввод приводится к null."},"onBlur":{"group":"Control","type":"() => void","kind":"readonly","description":"Отметка touched. Форма подставляет control.markAsTouched."},"disabled":{"group":"State","type":"boolean","kind":"boolean","default":false,"description":"Блокировка поля. Задаётся через control.disable()/enable(), НЕ через componentProps: FormFieldControl.tsx:104-115 ставит disabled ПОСЛЕ спреда componentProps, поэтому componentProps.disabled мёртв."}}},"variantGroup":"Input","variant":"Пароль"},{"name":"Item","role":"container","propsSchema":{"type":"object","additionalProperties":true,"x-registryName":"Item","properties":{"variant":{"type":"string","enum":["default","outline","muted"],"default":"default","description":"Визуальный стиль: прозрачный, с рамкой или приглушённый фон.","x-doc":{"group":"Behavior","type":"'default' | 'outline' | 'muted'","kind":"enum"}},"size":{"type":"string","enum":["default","sm"],"default":"default","description":"Размер отступов и зазоров внутри строки.","x-doc":{"group":"Behavior","type":"'default' | 'sm'","kind":"enum"}},"className":{"type":"string","description":"Доп. CSS-класс (Tailwind).","x-doc":{"group":"Control","type":"string","kind":"readonly"}}}}},{"name":"Kbd","role":"container","propsSchema":{"type":"object","additionalProperties":true,"x-registryName":"Kbd","properties":{"className":{"type":"string","description":"Доп. CSS-класс (Tailwind).","x-doc":{"group":"Control","type":"string","kind":"readonly"}}}}},{"name":"Label","role":"container","propsSchema":{"type":"object","additionalProperties":false,"x-registryName":"Label","properties":{"className":{"type":"string","description":"CSS-класс подписи (Tailwind).","x-doc":{"group":"Control","type":"string","kind":"readonly"}},"htmlFor":{"type":"string","description":"id связанного контрола (атрибут \`for\` тега \`<label>\`).","x-doc":{"group":"Behavior","type":"string"}}}}},{"name":"Marker","role":"container","propsSchema":{"type":"object","additionalProperties":true,"x-registryName":"Marker","properties":{"variant":{"type":"string","enum":["default","separator","border"],"default":"default","description":"Вариант оформления маркера.","x-doc":{"group":"Behavior","type":"'default' | 'separator' | 'border'","kind":"enum"}},"className":{"type":"string","description":"Доп. CSS-класс (Tailwind).","x-doc":{"group":"Control","type":"string","kind":"readonly"}}}}},{"name":"Menubar","role":"container","propsSchema":{"type":"object","additionalProperties":true,"x-registryName":"Menubar","properties":{"dir":{"type":"string","enum":["ltr","rtl"],"default":"ltr","description":"Направление чтения (влияет на навигацию стрелками).","x-doc":{"group":"Behavior","type":"'ltr' | 'rtl'","kind":"enum"}},"loop":{"type":"boolean","default":false,"description":"Зациклить перемещение фокуса стрелками по краям.","x-doc":{"group":"Behavior","type":"boolean"}},"className":{"type":"string","description":"Доп. CSS-класс (Tailwind).","x-doc":{"group":"Control","type":"string","kind":"readonly"}}}}},{"name":"Message","role":"container","propsSchema":{"type":"object","additionalProperties":true,"x-registryName":"Message","properties":{"align":{"type":"string","enum":["start","end"],"default":"start","description":"Сторона выравнивания сообщения (end — своё сообщение справа).","x-doc":{"group":"Behavior","type":"'start' | 'end'","kind":"enum"}},"className":{"type":"string","description":"Доп. CSS-класс (Tailwind).","x-doc":{"group":"Control","type":"string","kind":"readonly"}}}}},{"name":"MessageScroller","role":"container","propsSchema":{"type":"object","additionalProperties":true,"x-registryName":"MessageScroller","properties":{"className":{"type":"string","description":"Доп. CSS-класс (Tailwind).","x-doc":{"group":"Control","type":"string","kind":"readonly"}}}}},{"name":"NativeSelect","role":"field","propsSchema":{"type":"object","properties":{"label":{"type":"string","description":"Подпись поля (рендерит FormField.Label).","x-doc":{"group":"Textfield","type":"string"}},"required":{"type":"boolean","default":false,"description":"Маркер «*» у метки + aria-required.","x-doc":{"group":"State","type":"boolean"}},"description":{"type":"string","description":"Пояснение под полем (shadcn FieldDescription).","x-doc":{"group":"Textfield","type":"string"}},"testId":{"type":"string","description":"data-testid для e2e (meta-проп; в DOM примитива не течёт).","x-doc":{"group":"Behavior","type":"string","kind":"readonly"}},"options":{"type":"array","items":{"type":"object","required":["value","label"],"additionalProperties":false,"properties":{"value":{"type":["string","number"]},"label":{"type":"string"},"group":{"type":"string"}}},"description":"Опции списка. Одинаковый group объединяется в <optgroup>.","x-doc":{"group":"Options","type":"Array<{ value; label; group? }>","kind":"readonly"}},"placeholder":{"type":"string","description":"Подсказка-опция (value=\\"\\") в начале списка.","x-doc":{"group":"Textfield","type":"string"}},"className":{"type":"string","description":"Доп. CSS-класс select.","x-doc":{"group":"Control","type":"string","kind":"readonly"}}},"additionalProperties":false,"x-runtimeProps":{"value":{"group":"Control","type":"string | null","description":"Выбранное значение (option.value как строка). Пустой выбор → null."},"onChange":{"group":"Control","type":"(value: string | null) => void","description":"Изменение. Пустой выбор (value=\\"\\") → null."},"onBlur":{"group":"Control","type":"() => void","kind":"readonly","description":"Отметка touched. Форма подставляет control.markAsTouched."},"disabled":{"group":"State","type":"boolean","kind":"boolean","default":false,"description":"Блокировка поля. Задаётся через control.disable()/enable(), НЕ через componentProps: FormFieldControl.tsx:104-115 ставит disabled ПОСЛЕ спреда componentProps, поэтому componentProps.disabled мёртв."}}}},{"name":"NavigationMenu","role":"container","propsSchema":{"type":"object","additionalProperties":true,"x-registryName":"NavigationMenu","properties":{"orientation":{"type":"string","enum":["horizontal","vertical"],"default":"horizontal","description":"Ориентация меню.","x-doc":{"group":"Behavior","type":"'horizontal' | 'vertical'","kind":"enum"}},"dir":{"type":"string","enum":["ltr","rtl"],"description":"Направление письма (слева-направо / справа-налево).","x-doc":{"group":"Behavior","type":"'ltr' | 'rtl'","kind":"enum"}},"viewport":{"type":"boolean","default":true,"description":"Рендерить общий Viewport-оверлей для контента (иначе контент под каждым пунктом).","x-doc":{"group":"Behavior","type":"boolean"}},"delayDuration":{"type":"number","default":200,"description":"Задержка (мс) перед открытием меню при наведении.","x-doc":{"group":"Behavior","type":"number"}},"skipDelayDuration":{"type":"number","default":300,"description":"Окно (мс), в течение которого переход между пунктами открывает меню без задержки.","x-doc":{"group":"Behavior","type":"number"}},"className":{"type":"string","description":"Доп. CSS-класс (Tailwind).","x-doc":{"group":"Control","type":"string","kind":"readonly"}}}}},{"name":"Pagination","role":"container","propsSchema":{"type":"object","additionalProperties":true,"x-registryName":"Pagination","properties":{"className":{"type":"string","description":"Доп. CSS-класс (Tailwind).","x-doc":{"group":"Control","type":"string","kind":"readonly"}}}}},{"name":"Popover","role":"container","propsSchema":{"type":"object","additionalProperties":true,"x-registryName":"Popover","properties":{"defaultOpen":{"type":"boolean","default":false,"description":"Открыт ли поповер изначально (неуправляемый режим).","x-doc":{"group":"State","type":"boolean"}},"modal":{"type":"boolean","default":false,"description":"Модальный режим — блокирует взаимодействие с фоном и ловит фокус.","x-doc":{"group":"Behavior","type":"boolean"}}}}},{"name":"Progress","role":"container","propsSchema":{"type":"object","additionalProperties":false,"x-registryName":"Progress","properties":{"className":{"type":"string","description":"CSS-класс дорожки прогресса (Tailwind).","x-doc":{"group":"Control","type":"string","kind":"readonly"}},"value":{"type":"number","minimum":0,"maximum":100,"description":"Текущее значение прогресса в процентах (0–100).","x-doc":{"group":"State","type":"number","kind":"number"}},"max":{"type":"number","minimum":1,"default":100,"description":"Максимальное значение шкалы (по умолчанию 100).","x-doc":{"group":"State","type":"number","kind":"number"}}}}},{"name":"RadioGroup","role":"field","propsSchema":{"type":"object","properties":{"label":{"type":"string","description":"Подпись поля (рендерит FormField.Label).","x-doc":{"group":"Textfield","type":"string"}},"required":{"type":"boolean","default":false,"description":"Маркер «*» у метки + aria-required.","x-doc":{"group":"State","type":"boolean"}},"description":{"type":"string","description":"Пояснение под полем (shadcn FieldDescription).","x-doc":{"group":"Textfield","type":"string"}},"testId":{"type":"string","description":"data-testid для e2e (meta-проп; в DOM примитива не течёт).","x-doc":{"group":"Behavior","type":"string","kind":"readonly"}},"options":{"type":"array","items":{"type":"object","required":["value","label"],"additionalProperties":false,"properties":{"value":{"type":"string"},"label":{"type":"string"}}},"description":"Варианты выбора. Каждый рендерится как radio + подпись справа.","x-doc":{"group":"Options","type":"Array<{ value; label }>","kind":"readonly"}},"className":{"type":"string","description":"Доп. CSS-класс контейнера группы (по умолчанию grid gap-3).","x-doc":{"group":"Control","type":"string","kind":"readonly"}}},"additionalProperties":false,"x-runtimeProps":{"value":{"group":"Control","type":"string | null","description":"Выбранное значение (option.value). null — ничего не выбрано."},"onChange":{"group":"Control","type":"(value: string | null) => void","description":"Выбор варианта; пустой выбор → null."},"onBlur":{"group":"Control","type":"() => void","kind":"readonly","description":"Отметка touched. Форма подставляет control.markAsTouched."},"disabled":{"group":"State","type":"boolean","kind":"boolean","default":false,"description":"Блокировка поля. Задаётся через control.disable()/enable(), НЕ через componentProps: FormFieldControl.tsx:104-115 ставит disabled ПОСЛЕ спреда componentProps, поэтому componentProps.disabled мёртв."}}}},{"name":"Resizable","role":"container","propsSchema":{"type":"object","additionalProperties":true,"x-registryName":"Resizable","properties":{"direction":{"type":"string","enum":["horizontal","vertical"],"default":"horizontal","description":"Направление разделения панелей.","x-doc":{"group":"Behavior","type":"'horizontal' | 'vertical'","kind":"enum"}},"className":{"type":"string","description":"Доп. CSS-класс (Tailwind).","x-doc":{"group":"Control","type":"string","kind":"readonly"}}}}},{"name":"ScrollArea","role":"container","propsSchema":{"type":"object","additionalProperties":true,"x-registryName":"ScrollArea","properties":{"type":{"type":"string","enum":["auto","always","scroll","hover"],"default":"hover","description":"Когда показывать скроллбары.","x-doc":{"group":"Behavior","type":"'auto' | 'always' | 'scroll' | 'hover'","kind":"enum"}},"scrollHideDelay":{"type":"number","default":600,"description":"Задержка скрытия скроллбаров (мс) — для type=hover/scroll.","x-doc":{"group":"Behavior","type":"number"}},"className":{"type":"string","description":"Доп. CSS-класс (Tailwind).","x-doc":{"group":"Control","type":"string","kind":"readonly"}}}}},{"name":"Section","role":"container","propsSchema":{"type":"object","additionalProperties":false,"x-registryName":"Section","properties":{"title":{"type":"string","description":"Заголовок секции. Не задан — заголовок не рендерится (только обёртка).","x-doc":{"group":"Textfield","type":"string"}},"titleAs":{"type":"string","enum":["h1","h2","h3","h4","h5","h6"],"default":"h3","description":"HTML-элемент заголовка (уровень h1-h6).","x-doc":{"group":"Behavior","type":"'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6'","kind":"enum"}},"titleClassName":{"type":"string","description":"Доп. CSS-класс заголовка.","x-doc":{"group":"Control","type":"string","kind":"readonly"}},"className":{"type":"string","description":"Доп. CSS-класс контейнера \`<section>\` (напр. \`grid grid-cols-2 gap-4\`).","x-doc":{"group":"Control","type":"string","kind":"readonly"}}}}},{"name":"Select","role":"field","propsSchema":{"type":"object","properties":{"label":{"type":"string","description":"Подпись поля (рендерит FormField.Label).","x-doc":{"group":"Textfield","type":"string"}},"required":{"type":"boolean","default":false,"description":"Маркер «*» у метки + aria-required.","x-doc":{"group":"State","type":"boolean"}},"description":{"type":"string","description":"Пояснение под полем (shadcn FieldDescription).","x-doc":{"group":"Textfield","type":"string"}},"testId":{"type":"string","description":"data-testid для e2e (meta-проп; в DOM примитива не течёт).","x-doc":{"group":"Behavior","type":"string","kind":"readonly"}},"className":{"type":"string","description":"Доп. CSS-класс триггера.","x-doc":{"group":"Control","type":"string","kind":"readonly"}},"options":{"type":"array","items":{"type":"object","required":["value","label"],"additionalProperties":false,"properties":{"value":{"type":["string","number"]},"label":{"type":"string"},"group":{"type":"string"}}},"description":"Inline-опции. Одинаковый group объединяется в секцию SelectLabel.","x-doc":{"group":"Options","type":"Array<{ value; label; group? }>","kind":"readonly"}},"placeholder":{"type":"string","default":"Select an option...","description":"Подсказка в триггере.","x-doc":{"group":"Textfield","type":"string"}},"clearable":{"type":"boolean","default":false,"description":"Показывать крестик очистки (сброс в null).","x-doc":{"group":"Behavior","type":"boolean"}}},"additionalProperties":false,"x-runtimeProps":{"value":{"group":"Control","type":"string | null","description":"Выбранное значение (option.value). null — ничего не выбрано."},"onChange":{"group":"Control","type":"(value: string | null) => void","description":"Выбор; при очистке приходит null."},"onBlur":{"group":"Control","type":"() => void","kind":"readonly","description":"Отметка touched. Форма подставляет control.markAsTouched."},"disabled":{"group":"State","type":"boolean","kind":"boolean","default":false,"description":"Блокировка поля. Задаётся через control.disable()/enable(), НЕ через componentProps: FormFieldControl.tsx:104-115 ставит disabled ПОСЛЕ спреда componentProps, поэтому componentProps.disabled мёртв."},"resource":{"group":"Options","type":"ResourceConfig<unknown>","description":"Асинхронный источник опций (static / preload / partial). В JSON-форме недостижим: требует функцию load."}}}},{"name":"Separator","role":"container","propsSchema":{"type":"object","additionalProperties":false,"x-registryName":"Separator","properties":{"className":{"type":"string","description":"CSS-класс разделителя (Tailwind).","x-doc":{"group":"Control","type":"string","kind":"readonly"}},"orientation":{"type":"string","enum":["horizontal","vertical"],"default":"horizontal","description":"Ориентация разделителя: горизонтальный (по умолчанию) или вертикальный.","x-doc":{"group":"Behavior","type":"'horizontal' | 'vertical'","kind":"enum"}},"decorative":{"type":"boolean","default":true,"description":"Декоративный ли разделитель. true (по умолчанию) — скрыт от AT; false — семантический separator.","x-doc":{"group":"Behavior","type":"boolean","kind":"boolean"}}}}},{"name":"Sheet","role":"container","propsSchema":{"type":"object","additionalProperties":true,"x-registryName":"Sheet","properties":{"defaultOpen":{"type":"boolean","default":false,"description":"Открыта ли панель изначально (неуправляемый режим).","x-doc":{"group":"State","type":"boolean"}},"modal":{"type":"boolean","default":true,"description":"Модальный режим — блокирует взаимодействие с фоном.","x-doc":{"group":"Behavior","type":"boolean"}}}}},{"name":"Sidebar","role":"container","propsSchema":{"type":"object","additionalProperties":true,"x-registryName":"Sidebar","properties":{"side":{"type":"string","enum":["left","right"],"default":"left","description":"Сторона размещения.","x-doc":{"group":"Behavior","type":"'left' | 'right'","kind":"enum"}},"variant":{"type":"string","enum":["sidebar","floating","inset"],"default":"sidebar","description":"Вариант оформления.","x-doc":{"group":"Behavior","type":"'sidebar' | 'floating' | 'inset'","kind":"enum"}},"collapsible":{"type":"string","enum":["offcanvas","icon","none"],"default":"offcanvas","description":"Режим сворачивания.","x-doc":{"group":"Behavior","type":"'offcanvas' | 'icon' | 'none'","kind":"enum"}},"className":{"type":"string","description":"Доп. CSS-класс (Tailwind).","x-doc":{"group":"Control","type":"string","kind":"readonly"}}}}},{"name":"Skeleton","role":"container","propsSchema":{"type":"object","additionalProperties":true,"x-registryName":"Skeleton","properties":{"className":{"type":"string","description":"Доп. CSS-класс (Tailwind) — задаёт размеры плейсхолдера (h-*/w-*).","x-doc":{"group":"Control","type":"string","kind":"readonly"}}}}},{"name":"Slider","role":"field","propsSchema":{"type":"object","properties":{"label":{"type":"string","description":"Подпись поля (рендерит FormField.Label).","x-doc":{"group":"Textfield","type":"string"}},"required":{"type":"boolean","default":false,"description":"Маркер «*» у метки + aria-required.","x-doc":{"group":"State","type":"boolean"}},"description":{"type":"string","description":"Пояснение под полем (shadcn FieldDescription).","x-doc":{"group":"Textfield","type":"string"}},"testId":{"type":"string","description":"data-testid для e2e (meta-проп; в DOM примитива не течёт).","x-doc":{"group":"Behavior","type":"string","kind":"readonly"}},"min":{"type":"number","default":0,"description":"Минимум диапазона (Radix min).","x-doc":{"group":"Behavior","type":"number"}},"max":{"type":"number","default":100,"description":"Максимум диапазона (Radix max).","x-doc":{"group":"Behavior","type":"number"}},"step":{"type":"number","default":1,"description":"Шаг изменения значения (Radix step).","x-doc":{"group":"Behavior","type":"number"}},"className":{"type":"string","description":"Доп. CSS-класс слайдера (SliderPrimitive.Root).","x-doc":{"group":"Control","type":"string","kind":"readonly"}}},"additionalProperties":false,"x-runtimeProps":{"value":{"group":"Control","type":"number | null","description":"Значение слайдера (одно-thumb). null трактуется как min. Резолвится формой."},"onChange":{"group":"Control","type":"(value: number | null) => void","description":"Изменение; эмитит первое число массива Radix (onValueChange → arr[0])."},"onBlur":{"group":"Control","type":"() => void","kind":"readonly","description":"Отметка touched. Форма подставляет control.markAsTouched."},"disabled":{"group":"State","type":"boolean","kind":"boolean","default":false,"description":"Блокировка поля. Задаётся через control.disable()/enable(), НЕ через componentProps: FormFieldControl.tsx:104-115 ставит disabled ПОСЛЕ спреда componentProps, поэтому componentProps.disabled мёртв."}}}},{"name":"Spinner","role":"container","propsSchema":{"type":"object","additionalProperties":true,"x-registryName":"Spinner","properties":{"className":{"type":"string","description":"Доп. CSS-класс (Tailwind); размер задаётся через size-* (по умолчанию size-4).","x-doc":{"group":"Control","type":"string","kind":"readonly"}}}}},{"name":"Switch","role":"field","propsSchema":{"type":"object","properties":{"label":{"type":"string","description":"Подпись справа от переключателя (inline-раскладка; FormField верхнюю метку не рисует).","x-doc":{"group":"Textfield","type":"string"}},"required":{"type":"boolean","default":false,"description":"Маркер «*» у метки + aria-required.","x-doc":{"group":"State","type":"boolean"}},"description":{"type":"string","description":"Пояснение под полем (shadcn FieldDescription).","x-doc":{"group":"Textfield","type":"string"}},"testId":{"type":"string","description":"data-testid для e2e (meta-проп; в DOM примитива не течёт).","x-doc":{"group":"Behavior","type":"string","kind":"readonly"}},"className":{"type":"string","description":"Доп. CSS-класс переключателя.","x-doc":{"group":"Control","type":"string","kind":"readonly"}}},"additionalProperties":false,"x-runtimeProps":{"value":{"group":"Control","type":"boolean","description":"Состояние переключателя (true — включён). Резолвится формой."},"onChange":{"group":"Control","type":"(value: boolean) => void","description":"Переключение; эмитит boolean (Radix onCheckedChange, indeterminate → false)."},"onBlur":{"group":"Control","type":"() => void","kind":"readonly","description":"Отметка touched. Форма подставляет control.markAsTouched."},"disabled":{"group":"State","type":"boolean","kind":"boolean","default":false,"description":"Блокировка поля. Задаётся через control.disable()/enable(), НЕ через componentProps: FormFieldControl.tsx:104-115 ставит disabled ПОСЛЕ спреда componentProps, поэтому componentProps.disabled мёртв."}}}},{"name":"Table","role":"container","propsSchema":{"type":"object","additionalProperties":false,"x-registryName":"Table","properties":{"className":{"type":"string","description":"CSS-класс таблицы (Tailwind).","x-doc":{"group":"Control","type":"string","kind":"readonly"}}}}},{"name":"Tabs","role":"container","propsSchema":{"type":"object","additionalProperties":false,"x-registryName":"Tabs","properties":{"className":{"type":"string","description":"CSS-класс контейнера табов (Tailwind).","x-doc":{"group":"Control","type":"string","kind":"readonly"}},"defaultValue":{"type":"string","description":"Значение вкладки, активной по умолчанию (uncontrolled).","x-doc":{"group":"Behavior","type":"string"}},"orientation":{"type":"string","enum":["horizontal","vertical"],"default":"horizontal","description":"Ориентация раскладки табов.","x-doc":{"group":"Behavior","type":"'horizontal' | 'vertical'","kind":"enum"}},"activationMode":{"type":"string","enum":["automatic","manual"],"default":"automatic","description":"Активировать вкладку при фокусе (automatic) или только по клику/Enter (manual).","x-doc":{"group":"Behavior","type":"'automatic' | 'manual'","kind":"enum"}}}}},{"name":"Textarea","role":"field","propsSchema":{"type":"object","properties":{"label":{"type":"string","description":"Подпись поля (рендерит FormField.Label).","x-doc":{"group":"Textfield","type":"string"}},"required":{"type":"boolean","default":false,"description":"Маркер «*» у метки + aria-required.","x-doc":{"group":"State","type":"boolean"}},"description":{"type":"string","description":"Пояснение под полем (shadcn FieldDescription).","x-doc":{"group":"Textfield","type":"string"}},"testId":{"type":"string","description":"data-testid для e2e (meta-проп; в DOM примитива не течёт).","x-doc":{"group":"Behavior","type":"string","kind":"readonly"}},"placeholder":{"type":"string","description":"Подсказка внутри поля.","x-doc":{"group":"Textfield","type":"string"}},"rows":{"type":"number","description":"Число видимых строк (HTML-атрибут rows).","x-doc":{"group":"Behavior","type":"number"}},"className":{"type":"string","description":"Доп. CSS-класс.","x-doc":{"group":"Control","type":"string","kind":"readonly"}}},"additionalProperties":false,"x-runtimeProps":{"value":{"group":"Control","type":"string | null","description":"Значение поля. Пустой ввод → null."},"onChange":{"group":"Control","type":"(value: string | null) => void","description":"Изменение. Пустой ввод → null."},"onBlur":{"group":"Control","type":"() => void","kind":"readonly","description":"Отметка touched. Форма подставляет control.markAsTouched."},"disabled":{"group":"State","type":"boolean","kind":"boolean","default":false,"description":"Блокировка поля. Задаётся через control.disable()/enable(), НЕ через componentProps: FormFieldControl.tsx:104-115 ставит disabled ПОСЛЕ спреда componentProps, поэтому componentProps.disabled мёртв."}}}},{"name":"Toggle","role":"field","propsSchema":{"type":"object","properties":{"label":{"type":"string","description":"Подпись поля (рендерит FormField.Label).","x-doc":{"group":"Textfield","type":"string"}},"required":{"type":"boolean","default":false,"description":"Маркер «*» у метки + aria-required.","x-doc":{"group":"State","type":"boolean"}},"description":{"type":"string","description":"Пояснение под полем (shadcn FieldDescription).","x-doc":{"group":"Textfield","type":"string"}},"testId":{"type":"string","description":"data-testid для e2e (meta-проп; в DOM примитива не течёт).","x-doc":{"group":"Behavior","type":"string","kind":"readonly"}},"variant":{"type":"string","enum":["default","outline"],"default":"default","description":"Стиль cva: default (заливка при нажатии) | outline (граница).","x-doc":{"group":"Control","type":"'default' | 'outline'","kind":"enum"}},"size":{"type":"string","enum":["default","sm","lg"],"default":"default","description":"Размер cva: default | sm | lg.","x-doc":{"group":"Control","type":"'default' | 'sm' | 'lg'","kind":"enum"}},"className":{"type":"string","description":"Доп. CSS-класс контрола (TogglePrimitive.Root).","x-doc":{"group":"Control","type":"string","kind":"readonly"}}},"additionalProperties":false,"x-runtimeProps":{"value":{"group":"Control","type":"boolean","description":"Состояние (true — нажат/pressed). undefined/null трактуется как false. Резолвится формой."},"onChange":{"group":"Control","type":"(value: boolean) => void","description":"Переключение; эмитит boolean (Radix onPressedChange)."},"onBlur":{"group":"Control","type":"() => void","kind":"readonly","description":"Отметка touched. Форма подставляет control.markAsTouched."},"disabled":{"group":"State","type":"boolean","kind":"boolean","default":false,"description":"Блокировка поля. Задаётся через control.disable()/enable(), НЕ через componentProps: FormFieldControl.tsx:104-115 ставит disabled ПОСЛЕ спреда componentProps, поэтому componentProps.disabled мёртв."}}}},{"name":"ToggleGroup","role":"field","propsSchema":{"type":"object","properties":{"label":{"type":"string","description":"Подпись поля (рендерит FormField.Label).","x-doc":{"group":"Textfield","type":"string"}},"required":{"type":"boolean","default":false,"description":"Маркер «*» у метки + aria-required.","x-doc":{"group":"State","type":"boolean"}},"description":{"type":"string","description":"Пояснение под полем (shadcn FieldDescription).","x-doc":{"group":"Textfield","type":"string"}},"testId":{"type":"string","description":"data-testid для e2e (meta-проп; в DOM примитива не течёт).","x-doc":{"group":"Behavior","type":"string","kind":"readonly"}},"options":{"type":"array","items":{"type":"object","required":["value","label"],"additionalProperties":false,"properties":{"value":{"type":"string"},"label":{"type":"string"}}},"description":"Варианты выбора. Каждый рендерится как кнопка-переключатель.","x-doc":{"group":"Options","type":"Array<{ value; label }>","kind":"readonly"}},"variant":{"type":"string","enum":["default","outline"],"default":"default","description":"Визуальный стиль кнопок: плоские (default) или с рамкой (outline).","x-doc":{"group":"Control","type":"'default' | 'outline'"}},"className":{"type":"string","description":"Доп. CSS-класс контейнера группы.","x-doc":{"group":"Control","type":"string","kind":"readonly"}}},"additionalProperties":false,"x-runtimeProps":{"value":{"group":"Control","type":"string | null","description":"Выбранное значение (option.value). null — ничего не выбрано."},"onChange":{"group":"Control","type":"(value: string | null) => void","description":"Выбор варианта; пустой выбор → null."},"onBlur":{"group":"Control","type":"() => void","kind":"readonly","description":"Отметка touched. Форма подставляет control.markAsTouched."},"disabled":{"group":"State","type":"boolean","kind":"boolean","default":false,"description":"Блокировка поля. Задаётся через control.disable()/enable(), НЕ через componentProps: FormFieldControl.tsx:104-115 ставит disabled ПОСЛЕ спреда componentProps, поэтому componentProps.disabled мёртв."}}}},{"name":"Tooltip","role":"container","propsSchema":{"type":"object","additionalProperties":true,"x-registryName":"Tooltip","properties":{"defaultOpen":{"type":"boolean","default":false,"description":"Показан ли тултип изначально (неуправляемый режим).","x-doc":{"group":"State","type":"boolean"}},"delayDuration":{"type":"number","default":700,"description":"Задержка перед показом (мс).","x-doc":{"group":"Behavior","type":"number"}},"disableHoverableContent":{"type":"boolean","default":false,"description":"Скрывать тултип при уходе курсора с триггера (нельзя навести на сам тултип).","x-doc":{"group":"Behavior","type":"boolean"}}}}},{"name":"TypographyBlockquote","role":"container","propsSchema":{"type":"object","additionalProperties":false,"x-registryName":"TypographyBlockquote","properties":{"className":{"type":"string","description":"Доп. CSS-класс для «Цитата» (элемент <blockquote>, Tailwind).","x-doc":{"group":"Control","type":"string","kind":"readonly"}}}}},{"name":"TypographyH1","role":"container","propsSchema":{"type":"object","additionalProperties":false,"x-registryName":"TypographyH1","properties":{"className":{"type":"string","description":"Доп. CSS-класс для «Заголовок 1» (элемент <h1>, Tailwind).","x-doc":{"group":"Control","type":"string","kind":"readonly"}}}}},{"name":"TypographyH2","role":"container","propsSchema":{"type":"object","additionalProperties":false,"x-registryName":"TypographyH2","properties":{"className":{"type":"string","description":"Доп. CSS-класс для «Заголовок 2» (элемент <h2>, Tailwind).","x-doc":{"group":"Control","type":"string","kind":"readonly"}}}}},{"name":"TypographyH3","role":"container","propsSchema":{"type":"object","additionalProperties":false,"x-registryName":"TypographyH3","properties":{"className":{"type":"string","description":"Доп. CSS-класс для «Заголовок 3» (элемент <h3>, Tailwind).","x-doc":{"group":"Control","type":"string","kind":"readonly"}}}}},{"name":"TypographyH4","role":"container","propsSchema":{"type":"object","additionalProperties":false,"x-registryName":"TypographyH4","properties":{"className":{"type":"string","description":"Доп. CSS-класс для «Заголовок 4» (элемент <h4>, Tailwind).","x-doc":{"group":"Control","type":"string","kind":"readonly"}}}}},{"name":"TypographyInlineCode","role":"container","propsSchema":{"type":"object","additionalProperties":false,"x-registryName":"TypographyInlineCode","properties":{"className":{"type":"string","description":"Доп. CSS-класс для «Инлайн-код» (элемент <code>, Tailwind).","x-doc":{"group":"Control","type":"string","kind":"readonly"}}}}},{"name":"TypographyLarge","role":"container","propsSchema":{"type":"object","additionalProperties":false,"x-registryName":"TypographyLarge","properties":{"className":{"type":"string","description":"Доп. CSS-класс для «Крупный текст» (элемент <div>, Tailwind).","x-doc":{"group":"Control","type":"string","kind":"readonly"}}}}},{"name":"TypographyLead","role":"container","propsSchema":{"type":"object","additionalProperties":false,"x-registryName":"TypographyLead","properties":{"className":{"type":"string","description":"Доп. CSS-класс для «Лид-абзац» (элемент <p>, Tailwind).","x-doc":{"group":"Control","type":"string","kind":"readonly"}}}}},{"name":"TypographyList","role":"container","propsSchema":{"type":"object","additionalProperties":false,"x-registryName":"TypographyList","properties":{"className":{"type":"string","description":"Доп. CSS-класс для «Список» (элемент <ul>, Tailwind).","x-doc":{"group":"Control","type":"string","kind":"readonly"}}}}},{"name":"TypographyMuted","role":"container","propsSchema":{"type":"object","additionalProperties":false,"x-registryName":"TypographyMuted","properties":{"className":{"type":"string","description":"Доп. CSS-класс для «Приглушённый текст» (элемент <p>, Tailwind).","x-doc":{"group":"Control","type":"string","kind":"readonly"}}}}},{"name":"TypographyP","role":"container","propsSchema":{"type":"object","additionalProperties":false,"x-registryName":"TypographyP","properties":{"className":{"type":"string","description":"Доп. CSS-класс для «Абзац» (элемент <p>, Tailwind).","x-doc":{"group":"Control","type":"string","kind":"readonly"}}}}},{"name":"TypographySmall","role":"container","propsSchema":{"type":"object","additionalProperties":false,"x-registryName":"TypographySmall","properties":{"className":{"type":"string","description":"Доп. CSS-класс для «Мелкий текст» (элемент <small>, Tailwind).","x-doc":{"group":"Control","type":"string","kind":"readonly"}}}}}]`),Bl={version:Dl,components:Vl},Ll=ql,zl={Input:"Поля ввода",InputPassword:"Поля ввода",InputMask:"Поля ввода",InputOTP:"Поля ввода",Textarea:"Поля ввода",DatePicker:"Поля ввода",Calendar:"Поля ввода",FileUpload:"Поля ввода",FileUploadAvatar:"Поля ввода",Select:"Выбор и переключатели",NativeSelect:"Выбор и переключатели",Combobox:"Выбор и переключатели",RadioGroup:"Выбор и переключатели",Checkbox:"Выбор и переключатели",Switch:"Выбор и переключатели",Slider:"Выбор и переключатели",Toggle:"Выбор и переключатели",ToggleGroup:"Выбор и переключатели",Box:"Контейнеры",Section:"Контейнеры",Card:"Контейнеры",Accordion:"Контейнеры",Tabs:"Контейнеры",Collapsible:"Контейнеры",InputGroup:"Контейнеры",ButtonGroup:"Контейнеры",AspectRatio:"Контейнеры",ScrollArea:"Контейнеры",Resizable:"Контейнеры",Sidebar:"Контейнеры",Button:"Действия",Icon:"Отображение",Label:"Отображение",Badge:"Отображение",Typography:"Отображение",Avatar:"Отображение",Progress:"Отображение",Skeleton:"Отображение",Spinner:"Отображение",Table:"Отображение",Chart:"Отображение",Empty:"Отображение",Kbd:"Отображение",Marker:"Отображение",Alert:"Отображение",Separator:"Отображение",Carousel:"Отображение",Dialog:"Оверлеи",AlertDialog:"Оверлеи",Sheet:"Оверлеи",Drawer:"Оверлеи",Popover:"Оверлеи",HoverCard:"Оверлеи",Tooltip:"Оверлеи",Command:"Оверлеи",DropdownMenu:"Навигация",ContextMenu:"Навигация",Menubar:"Навигация",NavigationMenu:"Навигация",Breadcrumb:"Навигация",Pagination:"Навигация",Bubble:"Чат",Message:"Чат",MessageScroller:"Чат",Attachment:"Чат",Item:"Чат"};function Ul(t,e){const r=Do().palette?.categoryByName?.[t];return r||(t.startsWith("Typography")?"Типографика":zl[t]??(e==="container"?"Контейнеры":"Прочее"))}function Kl(t,e){let r=t;if(e?.include&&e.include.length){const n=new Set(e.include);r=r.filter(i=>n.has(i.name))}if(e?.exclude&&e.exclude.length){const n=new Set(e.exclude);r=r.filter(i=>!n.has(i.name))}return r}function Ec(){const t=Do().components,e=Cs()??Bl,r=[...e.components,...qs(t?.synthetic)];return{version:e.version,components:Kl(r,t)}}function Cc(t){return t.components.map(e=>({name:e.name,role:e.role,category:e.category??Ul(e.name,e.role),propsSchema:e.propsSchema,...e.variantGroup?{variantGroup:e.variantGroup}:{},...e.variant?{variant:e.variant}:{},makeNode:()=>Nl(e.name,e.role)}))}let Wt=null;function Nc(t){Wt||(Wt=new xs({allErrors:!0,strict:!1}).compile(Ll));const e=Wt(t),r=(Wt.errors??[]).map(n=>`${n.instancePath||"/"} ${n.message??""}`.trim());return{valid:!!e,errors:r}}export{xs as A,gc as D,pc as E,uc as F,ct as H,mr as I,fr as L,rl as P,fc as R,Xl as S,vc as T,mc as U,bc as V,dc as W,_c as _,Wl as a,Ea as b,$c as c,Ze as d,kc as e,wc as f,Do as g,hi as h,No as i,Cc as j,cc as k,Ec as l,nl as m,xc as n,Pc as o,de as p,Sc as q,hc as r,Hl as s,Va as t,De as u,Nc as v,lc as w,yc as z};