wapi-client 0.8.2 → 0.8.4

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.
@@ -1,11 +1,11 @@
1
- var WAPI=(()=>{var Rm=Object.create;var kr=Object.defineProperty,Mm=Object.defineProperties,Wm=Object.getOwnPropertyDescriptor,Am=Object.getOwnPropertyDescriptors,Nm=Object.getOwnPropertyNames,pu=Object.getOwnPropertySymbols,Um=Object.getPrototypeOf,fu=Object.prototype.hasOwnProperty,qm=Object.prototype.propertyIsEnumerable;var du=(r,e,t)=>e in r?kr(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,P=(r,e)=>{for(var t in e||(e={}))fu.call(e,t)&&du(r,t,e[t]);if(pu)for(var t of pu(e))qm.call(e,t)&&du(r,t,e[t]);return r},Z=(r,e)=>Mm(r,Am(e));var G=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports),Bm=(r,e)=>{for(var t in e)kr(r,t,{get:e[t],enumerable:!0})},uu=(r,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of Nm(e))!fu.call(r,a)&&a!==t&&kr(r,a,{get:()=>e[a],enumerable:!(n=Wm(e,a))||n.enumerable});return r};var Lm=(r,e,t)=>(t=r!=null?Rm(Um(r)):{},uu(e||!r||!r.__esModule?kr(t,"default",{value:r,enumerable:!0}):t,r)),Vm=r=>uu(kr({},"__esModule",{value:!0}),r);var _e=(r,e,t)=>new Promise((n,a)=>{var s=d=>{try{o(t.next(d))}catch(g){a(g)}},i=d=>{try{o(t.throw(d))}catch(g){a(g)}},o=d=>d.done?n(d.value):Promise.resolve(d.value).then(s,i);o((t=t.apply(r,e)).next())});var Wr=G(ee=>{"use strict";Object.defineProperty(ee,"__esModule",{value:!0});ee.regexpCode=ee.getEsmExportName=ee.getProperty=ee.safeStringify=ee.stringify=ee.strConcat=ee.addCodeArg=ee.str=ee._=ee.nil=ee._Code=ee.Name=ee.IDENTIFIER=ee._CodeOrName=void 0;var Rr=class{};ee._CodeOrName=Rr;ee.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var Pt=class extends Rr{constructor(e){if(super(),!ee.IDENTIFIER.test(e))throw new Error("CodeGen: name must be a valid identifier");this.str=e}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};ee.Name=Pt;var Be=class extends Rr{constructor(e){super(),this._items=typeof e=="string"?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let e=this._items[0];return e===""||e==='""'}get str(){var e;return(e=this._str)!==null&&e!==void 0?e:this._str=this._items.reduce((t,n)=>`${t}${n}`,"")}get names(){var e;return(e=this._names)!==null&&e!==void 0?e:this._names=this._items.reduce((t,n)=>(n instanceof Pt&&(t[n.str]=(t[n.str]||0)+1),t),{})}};ee._Code=Be;ee.nil=new Be("");function xu(r,...e){let t=[r[0]],n=0;for(;n<e.length;)Mo(t,e[n]),t.push(r[++n]);return new Be(t)}ee._=xu;var Ro=new Be("+");function $u(r,...e){let t=[Mr(r[0])],n=0;for(;n<e.length;)t.push(Ro),Mo(t,e[n]),t.push(Ro,Mr(r[++n]));return nh(t),new Be(t)}ee.str=$u;function Mo(r,e){e instanceof Be?r.push(...e._items):e instanceof Pt?r.push(e):r.push(ih(e))}ee.addCodeArg=Mo;function nh(r){let e=1;for(;e<r.length-1;){if(r[e]===Ro){let t=ah(r[e-1],r[e+1]);if(t!==void 0){r.splice(e-1,3,t);continue}r[e++]="+"}e++}}function ah(r,e){if(e==='""')return r;if(r==='""')return e;if(typeof r=="string")return e instanceof Pt||r[r.length-1]!=='"'?void 0:typeof e!="string"?`${r.slice(0,-1)}${e}"`:e[0]==='"'?r.slice(0,-1)+e.slice(1):void 0;if(typeof e=="string"&&e[0]==='"'&&!(r instanceof Pt))return`"${r}${e.slice(1)}`}function sh(r,e){return e.emptyStr()?r:r.emptyStr()?e:$u`${r}${e}`}ee.strConcat=sh;function ih(r){return typeof r=="number"||typeof r=="boolean"||r===null?r:Mr(Array.isArray(r)?r.join(","):r)}function oh(r){return new Be(Mr(r))}ee.stringify=oh;function Mr(r){return JSON.stringify(r).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}ee.safeStringify=Mr;function ph(r){return typeof r=="string"&&ee.IDENTIFIER.test(r)?new Be(`.${r}`):xu`[${r}]`}ee.getProperty=ph;function dh(r){if(typeof r=="string"&&ee.IDENTIFIER.test(r))return new Be(`${r}`);throw new Error(`CodeGen: invalid export name: ${r}, use explicit $id name mapping`)}ee.getEsmExportName=dh;function fh(r){return new Be(r.toString())}ee.regexpCode=fh});var No=G(Ce=>{"use strict";Object.defineProperty(Ce,"__esModule",{value:!0});Ce.ValueScope=Ce.ValueScopeName=Ce.Scope=Ce.varKinds=Ce.UsedValueState=void 0;var Se=Wr(),Wo=class extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}},qi;(function(r){r[r.Started=0]="Started",r[r.Completed=1]="Completed"})(qi||(Ce.UsedValueState=qi={}));Ce.varKinds={const:new Se.Name("const"),let:new Se.Name("let"),var:new Se.Name("var")};var Bi=class{constructor({prefixes:e,parent:t}={}){this._names={},this._prefixes=e,this._parent=t}toName(e){return e instanceof Se.Name?e:this.name(e)}name(e){return new Se.Name(this._newName(e))}_newName(e){let t=this._names[e]||this._nameGroup(e);return`${e}${t.index++}`}_nameGroup(e){var t,n;if(!((n=(t=this._parent)===null||t===void 0?void 0:t._prefixes)===null||n===void 0)&&n.has(e)||this._prefixes&&!this._prefixes.has(e))throw new Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}};Ce.Scope=Bi;var Li=class extends Se.Name{constructor(e,t){super(t),this.prefix=e}setValue(e,{property:t,itemIndex:n}){this.value=e,this.scopePath=(0,Se._)`.${new Se.Name(t)}[${n}]`}};Ce.ValueScopeName=Li;var uh=(0,Se._)`\n`,Ao=class extends Bi{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts=Z(P({},e),{_n:e.lines?uh:Se.nil})}get(){return this._scope}name(e){return new Li(e,this._newName(e))}value(e,t){var n;if(t.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let a=this.toName(e),{prefix:s}=a,i=(n=t.key)!==null&&n!==void 0?n:t.ref,o=this._values[s];if(o){let h=o.get(i);if(h)return h}else o=this._values[s]=new Map;o.set(i,a);let d=this._scope[s]||(this._scope[s]=[]),g=d.length;return d[g]=t.ref,a.setValue(t,{property:s,itemIndex:g}),a}getValue(e,t){let n=this._values[e];if(n)return n.get(t)}scopeRefs(e,t=this._values){return this._reduceValues(t,n=>{if(n.scopePath===void 0)throw new Error(`CodeGen: name "${n}" has no value`);return(0,Se._)`${e}${n.scopePath}`})}scopeCode(e=this._values,t,n){return this._reduceValues(e,a=>{if(a.value===void 0)throw new Error(`CodeGen: name "${a}" has no value`);return a.value.code},t,n)}_reduceValues(e,t,n={},a){let s=Se.nil;for(let i in e){let o=e[i];if(!o)continue;let d=n[i]=n[i]||new Map;o.forEach(g=>{if(d.has(g))return;d.set(g,qi.Started);let h=t(g);if(h){let T=this.opts.es5?Ce.varKinds.var:Ce.varKinds.const;s=(0,Se._)`${s}${T} ${g} = ${h};${this.opts._n}`}else if(h=a==null?void 0:a(g))s=(0,Se._)`${s}${h}${this.opts._n}`;else throw new Wo(g);d.set(g,qi.Completed)})}return s}};Ce.ValueScope=Ao});var V=G(B=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0});B.or=B.and=B.not=B.CodeGen=B.operators=B.varKinds=B.ValueScopeName=B.ValueScope=B.Scope=B.Name=B.regexpCode=B.stringify=B.getProperty=B.nil=B.strConcat=B.str=B._=void 0;var Q=Wr(),Ke=No(),yt=Wr();Object.defineProperty(B,"_",{enumerable:!0,get:function(){return yt._}});Object.defineProperty(B,"str",{enumerable:!0,get:function(){return yt.str}});Object.defineProperty(B,"strConcat",{enumerable:!0,get:function(){return yt.strConcat}});Object.defineProperty(B,"nil",{enumerable:!0,get:function(){return yt.nil}});Object.defineProperty(B,"getProperty",{enumerable:!0,get:function(){return yt.getProperty}});Object.defineProperty(B,"stringify",{enumerable:!0,get:function(){return yt.stringify}});Object.defineProperty(B,"regexpCode",{enumerable:!0,get:function(){return yt.regexpCode}});Object.defineProperty(B,"Name",{enumerable:!0,get:function(){return yt.Name}});var Ki=No();Object.defineProperty(B,"Scope",{enumerable:!0,get:function(){return Ki.Scope}});Object.defineProperty(B,"ValueScope",{enumerable:!0,get:function(){return Ki.ValueScope}});Object.defineProperty(B,"ValueScopeName",{enumerable:!0,get:function(){return Ki.ValueScopeName}});Object.defineProperty(B,"varKinds",{enumerable:!0,get:function(){return Ki.varKinds}});B.operators={GT:new Q._Code(">"),GTE:new Q._Code(">="),LT:new Q._Code("<"),LTE:new Q._Code("<="),EQ:new Q._Code("==="),NEQ:new Q._Code("!=="),NOT:new Q._Code("!"),OR:new Q._Code("||"),AND:new Q._Code("&&"),ADD:new Q._Code("+")};var ht=class{optimizeNodes(){return this}optimizeNames(e,t){return this}},Uo=class extends ht{constructor(e,t,n){super(),this.varKind=e,this.name=t,this.rhs=n}render({es5:e,_n:t}){let n=e?Ke.varKinds.var:this.varKind,a=this.rhs===void 0?"":` = ${this.rhs}`;return`${n} ${this.name}${a};`+t}optimizeNames(e,t){if(e[this.name.str])return this.rhs&&(this.rhs=nr(this.rhs,e,t)),this}get names(){return this.rhs instanceof Q._CodeOrName?this.rhs.names:{}}},Vi=class extends ht{constructor(e,t,n){super(),this.lhs=e,this.rhs=t,this.sideEffects=n}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,t){if(!(this.lhs instanceof Q.Name&&!e[this.lhs.str]&&!this.sideEffects))return this.rhs=nr(this.rhs,e,t),this}get names(){let e=this.lhs instanceof Q.Name?{}:P({},this.lhs.names);return zi(e,this.rhs)}},qo=class extends Vi{constructor(e,t,n,a){super(e,n,a),this.op=t}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}},Bo=class extends ht{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}},Lo=class extends ht{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}},Vo=class extends ht{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}},Ho=class extends ht{constructor(e){super(),this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,t){return this.code=nr(this.code,e,t),this}get names(){return this.code instanceof Q._CodeOrName?this.code.names:{}}},Ar=class extends ht{constructor(e=[]){super(),this.nodes=e}render(e){return this.nodes.reduce((t,n)=>t+n.render(e),"")}optimizeNodes(){let{nodes:e}=this,t=e.length;for(;t--;){let n=e[t].optimizeNodes();Array.isArray(n)?e.splice(t,1,...n):n?e[t]=n:e.splice(t,1)}return e.length>0?this:void 0}optimizeNames(e,t){let{nodes:n}=this,a=n.length;for(;a--;){let s=n[a];s.optimizeNames(e,t)||(lh(e,s.names),n.splice(a,1))}return n.length>0?this:void 0}get names(){return this.nodes.reduce((e,t)=>Et(e,t.names),{})}},_t=class extends Ar{render(e){return"{"+e._n+super.render(e)+"}"+e._n}},zo=class extends Ar{},rr=class extends _t{};rr.kind="else";var Gt=class r extends _t{constructor(e,t){super(t),this.condition=e}render(e){let t=`if(${this.condition})`+super.render(e);return this.else&&(t+="else "+this.else.render(e)),t}optimizeNodes(){super.optimizeNodes();let e=this.condition;if(e===!0)return this.nodes;let t=this.else;if(t){let n=t.optimizeNodes();t=this.else=Array.isArray(n)?new rr(n):n}if(t)return e===!1?t instanceof r?t:t.nodes:this.nodes.length?this:new r(Ou(e),t instanceof r?[t]:t.nodes);if(!(e===!1||!this.nodes.length))return this}optimizeNames(e,t){var n;if(this.else=(n=this.else)===null||n===void 0?void 0:n.optimizeNames(e,t),!!(super.optimizeNames(e,t)||this.else))return this.condition=nr(this.condition,e,t),this}get names(){let e=super.names;return zi(e,this.condition),this.else&&Et(e,this.else.names),e}};Gt.kind="if";var Dt=class extends _t{};Dt.kind="for";var Ko=class extends Dt{constructor(e){super(),this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iteration=nr(this.iteration,e,t),this}get names(){return Et(super.names,this.iteration.names)}},Qo=class extends Dt{constructor(e,t,n,a){super(),this.varKind=e,this.name=t,this.from=n,this.to=a}render(e){let t=e.es5?Ke.varKinds.var:this.varKind,{name:n,from:a,to:s}=this;return`for(${t} ${n}=${a}; ${n}<${s}; ${n}++)`+super.render(e)}get names(){let e=zi(super.names,this.from);return zi(e,this.to)}},Hi=class extends Dt{constructor(e,t,n,a){super(),this.loop=e,this.varKind=t,this.name=n,this.iterable=a}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iterable=nr(this.iterable,e,t),this}get names(){return Et(super.names,this.iterable.names)}},Nr=class extends _t{constructor(e,t,n){super(),this.name=e,this.args=t,this.async=n}render(e){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(e)}};Nr.kind="func";var Ur=class extends Ar{render(e){return"return "+super.render(e)}};Ur.kind="return";var Jo=class extends _t{render(e){let t="try"+super.render(e);return this.catch&&(t+=this.catch.render(e)),this.finally&&(t+=this.finally.render(e)),t}optimizeNodes(){var e,t;return super.optimizeNodes(),(e=this.catch)===null||e===void 0||e.optimizeNodes(),(t=this.finally)===null||t===void 0||t.optimizeNodes(),this}optimizeNames(e,t){var n,a;return super.optimizeNames(e,t),(n=this.catch)===null||n===void 0||n.optimizeNames(e,t),(a=this.finally)===null||a===void 0||a.optimizeNames(e,t),this}get names(){let e=super.names;return this.catch&&Et(e,this.catch.names),this.finally&&Et(e,this.finally.names),e}},qr=class extends _t{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}};qr.kind="catch";var Br=class extends _t{render(e){return"finally"+super.render(e)}};Br.kind="finally";var Xo=class{constructor(e,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts=Z(P({},t),{_n:t.lines?`
2
- `:""}),this._extScope=e,this._scope=new Ke.Scope({parent:e}),this._nodes=[new zo]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,t){let n=this._extScope.value(e,t);return(this._values[n.prefix]||(this._values[n.prefix]=new Set)).add(n),n}getScopeValue(e,t){return this._extScope.getValue(e,t)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,t,n,a){let s=this._scope.toName(t);return n!==void 0&&a&&(this._constants[s.str]=n),this._leafNode(new Uo(e,s,n)),s}const(e,t,n){return this._def(Ke.varKinds.const,e,t,n)}let(e,t,n){return this._def(Ke.varKinds.let,e,t,n)}var(e,t,n){return this._def(Ke.varKinds.var,e,t,n)}assign(e,t,n){return this._leafNode(new Vi(e,t,n))}add(e,t){return this._leafNode(new qo(e,B.operators.ADD,t))}code(e){return typeof e=="function"?e():e!==Q.nil&&this._leafNode(new Ho(e)),this}object(...e){let t=["{"];for(let[n,a]of e)t.length>1&&t.push(","),t.push(n),(n!==a||this.opts.es5)&&(t.push(":"),(0,Q.addCodeArg)(t,a));return t.push("}"),new Q._Code(t)}if(e,t,n){if(this._blockNode(new Gt(e)),t&&n)this.code(t).else().code(n).endIf();else if(t)this.code(t).endIf();else if(n)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new Gt(e))}else(){return this._elseNode(new rr)}endIf(){return this._endBlockNode(Gt,rr)}_for(e,t){return this._blockNode(e),t&&this.code(t).endFor(),this}for(e,t){return this._for(new Ko(e),t)}forRange(e,t,n,a,s=this.opts.es5?Ke.varKinds.var:Ke.varKinds.let){let i=this._scope.toName(e);return this._for(new Qo(s,i,t,n),()=>a(i))}forOf(e,t,n,a=Ke.varKinds.const){let s=this._scope.toName(e);if(this.opts.es5){let i=t instanceof Q.Name?t:this.var("_arr",t);return this.forRange("_i",0,(0,Q._)`${i}.length`,o=>{this.var(s,(0,Q._)`${i}[${o}]`),n(s)})}return this._for(new Hi("of",a,s,t),()=>n(s))}forIn(e,t,n,a=this.opts.es5?Ke.varKinds.var:Ke.varKinds.const){if(this.opts.ownProperties)return this.forOf(e,(0,Q._)`Object.keys(${t})`,n);let s=this._scope.toName(e);return this._for(new Hi("in",a,s,t),()=>n(s))}endFor(){return this._endBlockNode(Dt)}label(e){return this._leafNode(new Bo(e))}break(e){return this._leafNode(new Lo(e))}return(e){let t=new Ur;if(this._blockNode(t),this.code(e),t.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(Ur)}try(e,t,n){if(!t&&!n)throw new Error('CodeGen: "try" without "catch" and "finally"');let a=new Jo;if(this._blockNode(a),this.code(e),t){let s=this.name("e");this._currNode=a.catch=new qr(s),t(s)}return n&&(this._currNode=a.finally=new Br,this.code(n)),this._endBlockNode(qr,Br)}throw(e){return this._leafNode(new Vo(e))}block(e,t){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(t),this}endBlock(e){let t=this._blockStarts.pop();if(t===void 0)throw new Error("CodeGen: not in self-balancing block");let n=this._nodes.length-t;if(n<0||e!==void 0&&n!==e)throw new Error(`CodeGen: wrong number of nodes: ${n} vs ${e} expected`);return this._nodes.length=t,this}func(e,t=Q.nil,n,a){return this._blockNode(new Nr(e,t,n)),a&&this.code(a).endFunc(),this}endFunc(){return this._endBlockNode(Nr)}optimize(e=1){for(;e-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,t){let n=this._currNode;if(n instanceof e||t&&n instanceof t)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${t?`${e.kind}/${t.kind}`:e.kind}"`)}_elseNode(e){let t=this._currNode;if(!(t instanceof Gt))throw new Error('CodeGen: "else" without "if"');return this._currNode=t.else=e,this}get _root(){return this._nodes[0]}get _currNode(){let e=this._nodes;return e[e.length-1]}set _currNode(e){let t=this._nodes;t[t.length-1]=e}};B.CodeGen=Xo;function Et(r,e){for(let t in e)r[t]=(r[t]||0)+(e[t]||0);return r}function zi(r,e){return e instanceof Q._CodeOrName?Et(r,e.names):r}function nr(r,e,t){if(r instanceof Q.Name)return n(r);if(!a(r))return r;return new Q._Code(r._items.reduce((s,i)=>(i instanceof Q.Name&&(i=n(i)),i instanceof Q._Code?s.push(...i._items):s.push(i),s),[]));function n(s){let i=t[s.str];return i===void 0||e[s.str]!==1?s:(delete e[s.str],i)}function a(s){return s instanceof Q._Code&&s._items.some(i=>i instanceof Q.Name&&e[i.str]===1&&t[i.str]!==void 0)}}function lh(r,e){for(let t in e)r[t]=(r[t]||0)-(e[t]||0)}function Ou(r){return typeof r=="boolean"||typeof r=="number"||r===null?!r:(0,Q._)`!${Yo(r)}`}B.not=Ou;var ch=wu(B.operators.AND);function mh(...r){return r.reduce(ch)}B.and=mh;var hh=wu(B.operators.OR);function _h(...r){return r.reduce(hh)}B.or=_h;function wu(r){return(e,t)=>e===Q.nil?t:t===Q.nil?e:(0,Q._)`${Yo(e)} ${r} ${Yo(t)}`}function Yo(r){return r instanceof Q.Name?r:(0,Q._)`(${r})`}});var te=G(H=>{"use strict";Object.defineProperty(H,"__esModule",{value:!0});H.checkStrictMode=H.getErrorPath=H.Type=H.useFunc=H.setEvaluated=H.evaluatedPropsToName=H.mergeEvaluated=H.eachItem=H.unescapeJsonPointer=H.escapeJsonPointer=H.escapeFragment=H.unescapeFragment=H.schemaRefOrVal=H.schemaHasRulesButRef=H.schemaHasRules=H.checkUnknownRules=H.alwaysValidSchema=H.toHash=void 0;var fe=V(),gh=Wr();function Th(r){let e={};for(let t of r)e[t]=!0;return e}H.toHash=Th;function yh(r,e){return typeof e=="boolean"?e:Object.keys(e).length===0?!0:(vu(r,e),!ku(e,r.self.RULES.all))}H.alwaysValidSchema=yh;function vu(r,e=r.schema){let{opts:t,self:n}=r;if(!t.strictSchema||typeof e=="boolean")return;let a=n.RULES.keywords;for(let s in e)a[s]||Pu(r,`unknown keyword: "${s}"`)}H.checkUnknownRules=vu;function ku(r,e){if(typeof r=="boolean")return!r;for(let t in r)if(e[t])return!0;return!1}H.schemaHasRules=ku;function bh(r,e){if(typeof r=="boolean")return!r;for(let t in r)if(t!=="$ref"&&e.all[t])return!0;return!1}H.schemaHasRulesButRef=bh;function Fh({topSchemaRef:r,schemaPath:e},t,n,a){if(!a){if(typeof t=="number"||typeof t=="boolean")return t;if(typeof t=="string")return(0,fe._)`${t}`}return(0,fe._)`${r}${e}${(0,fe.getProperty)(n)}`}H.schemaRefOrVal=Fh;function xh(r){return Su(decodeURIComponent(r))}H.unescapeFragment=xh;function $h(r){return encodeURIComponent(ep(r))}H.escapeFragment=$h;function ep(r){return typeof r=="number"?`${r}`:r.replace(/~/g,"~0").replace(/\//g,"~1")}H.escapeJsonPointer=ep;function Su(r){return r.replace(/~1/g,"/").replace(/~0/g,"~")}H.unescapeJsonPointer=Su;function Oh(r,e){if(Array.isArray(r))for(let t of r)e(t);else e(r)}H.eachItem=Oh;function Iu({mergeNames:r,mergeToName:e,mergeValues:t,resultToName:n}){return(a,s,i,o)=>{let d=i===void 0?s:i instanceof fe.Name?(s instanceof fe.Name?r(a,s,i):e(a,s,i),i):s instanceof fe.Name?(e(a,i,s),s):t(s,i);return o===fe.Name&&!(d instanceof fe.Name)?n(a,d):d}}H.mergeEvaluated={props:Iu({mergeNames:(r,e,t)=>r.if((0,fe._)`${t} !== true && ${e} !== undefined`,()=>{r.if((0,fe._)`${e} === true`,()=>r.assign(t,!0),()=>r.assign(t,(0,fe._)`${t} || {}`).code((0,fe._)`Object.assign(${t}, ${e})`))}),mergeToName:(r,e,t)=>r.if((0,fe._)`${t} !== true`,()=>{e===!0?r.assign(t,!0):(r.assign(t,(0,fe._)`${t} || {}`),tp(r,t,e))}),mergeValues:(r,e)=>r===!0?!0:P(P({},r),e),resultToName:Cu}),items:Iu({mergeNames:(r,e,t)=>r.if((0,fe._)`${t} !== true && ${e} !== undefined`,()=>r.assign(t,(0,fe._)`${e} === true ? true : ${t} > ${e} ? ${t} : ${e}`)),mergeToName:(r,e,t)=>r.if((0,fe._)`${t} !== true`,()=>r.assign(t,e===!0?!0:(0,fe._)`${t} > ${e} ? ${t} : ${e}`)),mergeValues:(r,e)=>r===!0?!0:Math.max(r,e),resultToName:(r,e)=>r.var("items",e)})};function Cu(r,e){if(e===!0)return r.var("props",!0);let t=r.var("props",(0,fe._)`{}`);return e!==void 0&&tp(r,t,e),t}H.evaluatedPropsToName=Cu;function tp(r,e,t){Object.keys(t).forEach(n=>r.assign((0,fe._)`${e}${(0,fe.getProperty)(n)}`,!0))}H.setEvaluated=tp;var ju={};function wh(r,e){return r.scopeValue("func",{ref:e,code:ju[e.code]||(ju[e.code]=new gh._Code(e.code))})}H.useFunc=wh;var Zo;(function(r){r[r.Num=0]="Num",r[r.Str=1]="Str"})(Zo||(H.Type=Zo={}));function Ih(r,e,t){if(r instanceof fe.Name){let n=e===Zo.Num;return t?n?(0,fe._)`"[" + ${r} + "]"`:(0,fe._)`"['" + ${r} + "']"`:n?(0,fe._)`"/" + ${r}`:(0,fe._)`"/" + ${r}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return t?(0,fe.getProperty)(r).toString():"/"+ep(r)}H.getErrorPath=Ih;function Pu(r,e,t=r.opts.strictSchema){if(t){if(e=`strict mode: ${e}`,t===!0)throw new Error(e);r.self.logger.warn(e)}}H.checkStrictMode=Pu});var gt=G(rp=>{"use strict";Object.defineProperty(rp,"__esModule",{value:!0});var Oe=V(),jh={data:new Oe.Name("data"),valCxt:new Oe.Name("valCxt"),instancePath:new Oe.Name("instancePath"),parentData:new Oe.Name("parentData"),parentDataProperty:new Oe.Name("parentDataProperty"),rootData:new Oe.Name("rootData"),dynamicAnchors:new Oe.Name("dynamicAnchors"),vErrors:new Oe.Name("vErrors"),errors:new Oe.Name("errors"),this:new Oe.Name("this"),self:new Oe.Name("self"),scope:new Oe.Name("scope"),json:new Oe.Name("json"),jsonPos:new Oe.Name("jsonPos"),jsonLen:new Oe.Name("jsonLen"),jsonPart:new Oe.Name("jsonPart")};rp.default=jh});var Lr=G(we=>{"use strict";Object.defineProperty(we,"__esModule",{value:!0});we.extendErrors=we.resetErrorsCount=we.reportExtraError=we.reportError=we.keyword$DataError=we.keywordError=void 0;var X=V(),Qi=te(),ve=gt();we.keywordError={message:({keyword:r})=>(0,X.str)`must pass "${r}" keyword validation`};we.keyword$DataError={message:({keyword:r,schemaType:e})=>e?(0,X.str)`"${r}" keyword must be ${e} ($data)`:(0,X.str)`"${r}" keyword is invalid ($data)`};function vh(r,e=we.keywordError,t,n){let{it:a}=r,{gen:s,compositeRule:i,allErrors:o}=a,d=Eu(r,e,t);(n!=null?n:i||o)?Gu(s,d):Du(a,(0,X._)`[${d}]`)}we.reportError=vh;function kh(r,e=we.keywordError,t){let{it:n}=r,{gen:a,compositeRule:s,allErrors:i}=n,o=Eu(r,e,t);Gu(a,o),s||i||Du(n,ve.default.vErrors)}we.reportExtraError=kh;function Sh(r,e){r.assign(ve.default.errors,e),r.if((0,X._)`${ve.default.vErrors} !== null`,()=>r.if(e,()=>r.assign((0,X._)`${ve.default.vErrors}.length`,e),()=>r.assign(ve.default.vErrors,null)))}we.resetErrorsCount=Sh;function Ch({gen:r,keyword:e,schemaValue:t,data:n,errsCount:a,it:s}){if(a===void 0)throw new Error("ajv implementation error");let i=r.name("err");r.forRange("i",a,ve.default.errors,o=>{r.const(i,(0,X._)`${ve.default.vErrors}[${o}]`),r.if((0,X._)`${i}.instancePath === undefined`,()=>r.assign((0,X._)`${i}.instancePath`,(0,X.strConcat)(ve.default.instancePath,s.errorPath))),r.assign((0,X._)`${i}.schemaPath`,(0,X.str)`${s.errSchemaPath}/${e}`),s.opts.verbose&&(r.assign((0,X._)`${i}.schema`,t),r.assign((0,X._)`${i}.data`,n))})}we.extendErrors=Ch;function Gu(r,e){let t=r.const("err",e);r.if((0,X._)`${ve.default.vErrors} === null`,()=>r.assign(ve.default.vErrors,(0,X._)`[${t}]`),(0,X._)`${ve.default.vErrors}.push(${t})`),r.code((0,X._)`${ve.default.errors}++`)}function Du(r,e){let{gen:t,validateName:n,schemaEnv:a}=r;a.$async?t.throw((0,X._)`new ${r.ValidationError}(${e})`):(t.assign((0,X._)`${n}.errors`,e),t.return(!1))}var Rt={keyword:new X.Name("keyword"),schemaPath:new X.Name("schemaPath"),params:new X.Name("params"),propertyName:new X.Name("propertyName"),message:new X.Name("message"),schema:new X.Name("schema"),parentSchema:new X.Name("parentSchema")};function Eu(r,e,t){let{createErrors:n}=r.it;return n===!1?(0,X._)`{}`:Ph(r,e,t)}function Ph(r,e,t={}){let{gen:n,it:a}=r,s=[Gh(a,t),Dh(r,t)];return Eh(r,e,s),n.object(...s)}function Gh({errorPath:r},{instancePath:e}){let t=e?(0,X.str)`${r}${(0,Qi.getErrorPath)(e,Qi.Type.Str)}`:r;return[ve.default.instancePath,(0,X.strConcat)(ve.default.instancePath,t)]}function Dh({keyword:r,it:{errSchemaPath:e}},{schemaPath:t,parentSchema:n}){let a=n?e:(0,X.str)`${e}/${r}`;return t&&(a=(0,X.str)`${a}${(0,Qi.getErrorPath)(t,Qi.Type.Str)}`),[Rt.schemaPath,a]}function Eh(r,{params:e,message:t},n){let{keyword:a,data:s,schemaValue:i,it:o}=r,{opts:d,propertyName:g,topSchemaRef:h,schemaPath:T}=o;n.push([Rt.keyword,a],[Rt.params,typeof e=="function"?e(r):e||(0,X._)`{}`]),d.messages&&n.push([Rt.message,typeof t=="function"?t(r):t]),d.verbose&&n.push([Rt.schema,i],[Rt.parentSchema,(0,X._)`${h}${T}`],[ve.default.data,s]),g&&n.push([Rt.propertyName,g])}});var Mu=G(ar=>{"use strict";Object.defineProperty(ar,"__esModule",{value:!0});ar.boolOrEmptySchema=ar.topBoolOrEmptySchema=void 0;var Rh=Lr(),Mh=V(),Wh=gt(),Ah={message:"boolean schema is false"};function Nh(r){let{gen:e,schema:t,validateName:n}=r;t===!1?Ru(r,!1):typeof t=="object"&&t.$async===!0?e.return(Wh.default.data):(e.assign((0,Mh._)`${n}.errors`,null),e.return(!0))}ar.topBoolOrEmptySchema=Nh;function Uh(r,e){let{gen:t,schema:n}=r;n===!1?(t.var(e,!1),Ru(r)):t.var(e,!0)}ar.boolOrEmptySchema=Uh;function Ru(r,e){let{gen:t,data:n}=r,a={gen:t,keyword:"false schema",data:n,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:r};(0,Rh.reportError)(a,Ah,void 0,e)}});var np=G(sr=>{"use strict";Object.defineProperty(sr,"__esModule",{value:!0});sr.getRules=sr.isJSONType=void 0;var qh=["string","number","integer","boolean","null","object","array"],Bh=new Set(qh);function Lh(r){return typeof r=="string"&&Bh.has(r)}sr.isJSONType=Lh;function Vh(){let r={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:Z(P({},r),{integer:!0,boolean:!0,null:!0}),rules:[{rules:[]},r.number,r.string,r.array,r.object],post:{rules:[]},all:{},keywords:{}}}sr.getRules=Vh});var ap=G(bt=>{"use strict";Object.defineProperty(bt,"__esModule",{value:!0});bt.shouldUseRule=bt.shouldUseGroup=bt.schemaHasRulesForType=void 0;function Hh({schema:r,self:e},t){let n=e.RULES.types[t];return n&&n!==!0&&Wu(r,n)}bt.schemaHasRulesForType=Hh;function Wu(r,e){return e.rules.some(t=>Au(r,t))}bt.shouldUseGroup=Wu;function Au(r,e){var t;return r[e.keyword]!==void 0||((t=e.definition.implements)===null||t===void 0?void 0:t.some(n=>r[n]!==void 0))}bt.shouldUseRule=Au});var Vr=G(Ie=>{"use strict";Object.defineProperty(Ie,"__esModule",{value:!0});Ie.reportTypeError=Ie.checkDataTypes=Ie.checkDataType=Ie.coerceAndCheckDataType=Ie.getJSONTypes=Ie.getSchemaTypes=Ie.DataType=void 0;var zh=np(),Kh=ap(),Qh=Lr(),N=V(),Nu=te(),ir;(function(r){r[r.Correct=0]="Correct",r[r.Wrong=1]="Wrong"})(ir||(Ie.DataType=ir={}));function Jh(r){let e=Uu(r.type);if(e.includes("null")){if(r.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!e.length&&r.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');r.nullable===!0&&e.push("null")}return e}Ie.getSchemaTypes=Jh;function Uu(r){let e=Array.isArray(r)?r:r?[r]:[];if(e.every(zh.isJSONType))return e;throw new Error("type must be JSONType or JSONType[]: "+e.join(","))}Ie.getJSONTypes=Uu;function Xh(r,e){let{gen:t,data:n,opts:a}=r,s=Yh(e,a.coerceTypes),i=e.length>0&&!(s.length===0&&e.length===1&&(0,Kh.schemaHasRulesForType)(r,e[0]));if(i){let o=ip(e,n,a.strictNumbers,ir.Wrong);t.if(o,()=>{s.length?Zh(r,e,s):op(r)})}return i}Ie.coerceAndCheckDataType=Xh;var qu=new Set(["string","number","integer","boolean","null"]);function Yh(r,e){return e?r.filter(t=>qu.has(t)||e==="array"&&t==="array"):[]}function Zh(r,e,t){let{gen:n,data:a,opts:s}=r,i=n.let("dataType",(0,N._)`typeof ${a}`),o=n.let("coerced",(0,N._)`undefined`);s.coerceTypes==="array"&&n.if((0,N._)`${i} == 'object' && Array.isArray(${a}) && ${a}.length == 1`,()=>n.assign(a,(0,N._)`${a}[0]`).assign(i,(0,N._)`typeof ${a}`).if(ip(e,a,s.strictNumbers),()=>n.assign(o,a))),n.if((0,N._)`${o} !== undefined`);for(let g of t)(qu.has(g)||g==="array"&&s.coerceTypes==="array")&&d(g);n.else(),op(r),n.endIf(),n.if((0,N._)`${o} !== undefined`,()=>{n.assign(a,o),e_(r,o)});function d(g){switch(g){case"string":n.elseIf((0,N._)`${i} == "number" || ${i} == "boolean"`).assign(o,(0,N._)`"" + ${a}`).elseIf((0,N._)`${a} === null`).assign(o,(0,N._)`""`);return;case"number":n.elseIf((0,N._)`${i} == "boolean" || ${a} === null
1
+ var WAPI=(()=>{var Mm=Object.create;var kr=Object.defineProperty,Rm=Object.defineProperties,Wm=Object.getOwnPropertyDescriptor,Am=Object.getOwnPropertyDescriptors,Nm=Object.getOwnPropertyNames,pu=Object.getOwnPropertySymbols,Um=Object.getPrototypeOf,fu=Object.prototype.hasOwnProperty,qm=Object.prototype.propertyIsEnumerable;var du=(r,e,t)=>e in r?kr(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,P=(r,e)=>{for(var t in e||(e={}))fu.call(e,t)&&du(r,t,e[t]);if(pu)for(var t of pu(e))qm.call(e,t)&&du(r,t,e[t]);return r},Z=(r,e)=>Rm(r,Am(e));var G=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports),Bm=(r,e)=>{for(var t in e)kr(r,t,{get:e[t],enumerable:!0})},uu=(r,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of Nm(e))!fu.call(r,a)&&a!==t&&kr(r,a,{get:()=>e[a],enumerable:!(n=Wm(e,a))||n.enumerable});return r};var Lm=(r,e,t)=>(t=r!=null?Mm(Um(r)):{},uu(e||!r||!r.__esModule?kr(t,"default",{value:r,enumerable:!0}):t,r)),Vm=r=>uu(kr({},"__esModule",{value:!0}),r);var _e=(r,e,t)=>new Promise((n,a)=>{var s=d=>{try{o(t.next(d))}catch(g){a(g)}},i=d=>{try{o(t.throw(d))}catch(g){a(g)}},o=d=>d.done?n(d.value):Promise.resolve(d.value).then(s,i);o((t=t.apply(r,e)).next())});var Wr=G(ee=>{"use strict";Object.defineProperty(ee,"__esModule",{value:!0});ee.regexpCode=ee.getEsmExportName=ee.getProperty=ee.safeStringify=ee.stringify=ee.strConcat=ee.addCodeArg=ee.str=ee._=ee.nil=ee._Code=ee.Name=ee.IDENTIFIER=ee._CodeOrName=void 0;var Mr=class{};ee._CodeOrName=Mr;ee.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var Pt=class extends Mr{constructor(e){if(super(),!ee.IDENTIFIER.test(e))throw new Error("CodeGen: name must be a valid identifier");this.str=e}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};ee.Name=Pt;var Be=class extends Mr{constructor(e){super(),this._items=typeof e=="string"?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let e=this._items[0];return e===""||e==='""'}get str(){var e;return(e=this._str)!==null&&e!==void 0?e:this._str=this._items.reduce((t,n)=>`${t}${n}`,"")}get names(){var e;return(e=this._names)!==null&&e!==void 0?e:this._names=this._items.reduce((t,n)=>(n instanceof Pt&&(t[n.str]=(t[n.str]||0)+1),t),{})}};ee._Code=Be;ee.nil=new Be("");function xu(r,...e){let t=[r[0]],n=0;for(;n<e.length;)Ro(t,e[n]),t.push(r[++n]);return new Be(t)}ee._=xu;var Mo=new Be("+");function $u(r,...e){let t=[Rr(r[0])],n=0;for(;n<e.length;)t.push(Mo),Ro(t,e[n]),t.push(Mo,Rr(r[++n]));return nh(t),new Be(t)}ee.str=$u;function Ro(r,e){e instanceof Be?r.push(...e._items):e instanceof Pt?r.push(e):r.push(ih(e))}ee.addCodeArg=Ro;function nh(r){let e=1;for(;e<r.length-1;){if(r[e]===Mo){let t=ah(r[e-1],r[e+1]);if(t!==void 0){r.splice(e-1,3,t);continue}r[e++]="+"}e++}}function ah(r,e){if(e==='""')return r;if(r==='""')return e;if(typeof r=="string")return e instanceof Pt||r[r.length-1]!=='"'?void 0:typeof e!="string"?`${r.slice(0,-1)}${e}"`:e[0]==='"'?r.slice(0,-1)+e.slice(1):void 0;if(typeof e=="string"&&e[0]==='"'&&!(r instanceof Pt))return`"${r}${e.slice(1)}`}function sh(r,e){return e.emptyStr()?r:r.emptyStr()?e:$u`${r}${e}`}ee.strConcat=sh;function ih(r){return typeof r=="number"||typeof r=="boolean"||r===null?r:Rr(Array.isArray(r)?r.join(","):r)}function oh(r){return new Be(Rr(r))}ee.stringify=oh;function Rr(r){return JSON.stringify(r).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}ee.safeStringify=Rr;function ph(r){return typeof r=="string"&&ee.IDENTIFIER.test(r)?new Be(`.${r}`):xu`[${r}]`}ee.getProperty=ph;function dh(r){if(typeof r=="string"&&ee.IDENTIFIER.test(r))return new Be(`${r}`);throw new Error(`CodeGen: invalid export name: ${r}, use explicit $id name mapping`)}ee.getEsmExportName=dh;function fh(r){return new Be(r.toString())}ee.regexpCode=fh});var No=G(Ce=>{"use strict";Object.defineProperty(Ce,"__esModule",{value:!0});Ce.ValueScope=Ce.ValueScopeName=Ce.Scope=Ce.varKinds=Ce.UsedValueState=void 0;var Se=Wr(),Wo=class extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}},qi;(function(r){r[r.Started=0]="Started",r[r.Completed=1]="Completed"})(qi||(Ce.UsedValueState=qi={}));Ce.varKinds={const:new Se.Name("const"),let:new Se.Name("let"),var:new Se.Name("var")};var Bi=class{constructor({prefixes:e,parent:t}={}){this._names={},this._prefixes=e,this._parent=t}toName(e){return e instanceof Se.Name?e:this.name(e)}name(e){return new Se.Name(this._newName(e))}_newName(e){let t=this._names[e]||this._nameGroup(e);return`${e}${t.index++}`}_nameGroup(e){var t,n;if(!((n=(t=this._parent)===null||t===void 0?void 0:t._prefixes)===null||n===void 0)&&n.has(e)||this._prefixes&&!this._prefixes.has(e))throw new Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}};Ce.Scope=Bi;var Li=class extends Se.Name{constructor(e,t){super(t),this.prefix=e}setValue(e,{property:t,itemIndex:n}){this.value=e,this.scopePath=(0,Se._)`.${new Se.Name(t)}[${n}]`}};Ce.ValueScopeName=Li;var uh=(0,Se._)`\n`,Ao=class extends Bi{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts=Z(P({},e),{_n:e.lines?uh:Se.nil})}get(){return this._scope}name(e){return new Li(e,this._newName(e))}value(e,t){var n;if(t.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let a=this.toName(e),{prefix:s}=a,i=(n=t.key)!==null&&n!==void 0?n:t.ref,o=this._values[s];if(o){let h=o.get(i);if(h)return h}else o=this._values[s]=new Map;o.set(i,a);let d=this._scope[s]||(this._scope[s]=[]),g=d.length;return d[g]=t.ref,a.setValue(t,{property:s,itemIndex:g}),a}getValue(e,t){let n=this._values[e];if(n)return n.get(t)}scopeRefs(e,t=this._values){return this._reduceValues(t,n=>{if(n.scopePath===void 0)throw new Error(`CodeGen: name "${n}" has no value`);return(0,Se._)`${e}${n.scopePath}`})}scopeCode(e=this._values,t,n){return this._reduceValues(e,a=>{if(a.value===void 0)throw new Error(`CodeGen: name "${a}" has no value`);return a.value.code},t,n)}_reduceValues(e,t,n={},a){let s=Se.nil;for(let i in e){let o=e[i];if(!o)continue;let d=n[i]=n[i]||new Map;o.forEach(g=>{if(d.has(g))return;d.set(g,qi.Started);let h=t(g);if(h){let T=this.opts.es5?Ce.varKinds.var:Ce.varKinds.const;s=(0,Se._)`${s}${T} ${g} = ${h};${this.opts._n}`}else if(h=a==null?void 0:a(g))s=(0,Se._)`${s}${h}${this.opts._n}`;else throw new Wo(g);d.set(g,qi.Completed)})}return s}};Ce.ValueScope=Ao});var V=G(B=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0});B.or=B.and=B.not=B.CodeGen=B.operators=B.varKinds=B.ValueScopeName=B.ValueScope=B.Scope=B.Name=B.regexpCode=B.stringify=B.getProperty=B.nil=B.strConcat=B.str=B._=void 0;var Q=Wr(),Ke=No(),yt=Wr();Object.defineProperty(B,"_",{enumerable:!0,get:function(){return yt._}});Object.defineProperty(B,"str",{enumerable:!0,get:function(){return yt.str}});Object.defineProperty(B,"strConcat",{enumerable:!0,get:function(){return yt.strConcat}});Object.defineProperty(B,"nil",{enumerable:!0,get:function(){return yt.nil}});Object.defineProperty(B,"getProperty",{enumerable:!0,get:function(){return yt.getProperty}});Object.defineProperty(B,"stringify",{enumerable:!0,get:function(){return yt.stringify}});Object.defineProperty(B,"regexpCode",{enumerable:!0,get:function(){return yt.regexpCode}});Object.defineProperty(B,"Name",{enumerable:!0,get:function(){return yt.Name}});var Ki=No();Object.defineProperty(B,"Scope",{enumerable:!0,get:function(){return Ki.Scope}});Object.defineProperty(B,"ValueScope",{enumerable:!0,get:function(){return Ki.ValueScope}});Object.defineProperty(B,"ValueScopeName",{enumerable:!0,get:function(){return Ki.ValueScopeName}});Object.defineProperty(B,"varKinds",{enumerable:!0,get:function(){return Ki.varKinds}});B.operators={GT:new Q._Code(">"),GTE:new Q._Code(">="),LT:new Q._Code("<"),LTE:new Q._Code("<="),EQ:new Q._Code("==="),NEQ:new Q._Code("!=="),NOT:new Q._Code("!"),OR:new Q._Code("||"),AND:new Q._Code("&&"),ADD:new Q._Code("+")};var ht=class{optimizeNodes(){return this}optimizeNames(e,t){return this}},Uo=class extends ht{constructor(e,t,n){super(),this.varKind=e,this.name=t,this.rhs=n}render({es5:e,_n:t}){let n=e?Ke.varKinds.var:this.varKind,a=this.rhs===void 0?"":` = ${this.rhs}`;return`${n} ${this.name}${a};`+t}optimizeNames(e,t){if(e[this.name.str])return this.rhs&&(this.rhs=nr(this.rhs,e,t)),this}get names(){return this.rhs instanceof Q._CodeOrName?this.rhs.names:{}}},Vi=class extends ht{constructor(e,t,n){super(),this.lhs=e,this.rhs=t,this.sideEffects=n}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,t){if(!(this.lhs instanceof Q.Name&&!e[this.lhs.str]&&!this.sideEffects))return this.rhs=nr(this.rhs,e,t),this}get names(){let e=this.lhs instanceof Q.Name?{}:P({},this.lhs.names);return zi(e,this.rhs)}},qo=class extends Vi{constructor(e,t,n,a){super(e,n,a),this.op=t}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}},Bo=class extends ht{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}},Lo=class extends ht{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}},Vo=class extends ht{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}},Ho=class extends ht{constructor(e){super(),this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,t){return this.code=nr(this.code,e,t),this}get names(){return this.code instanceof Q._CodeOrName?this.code.names:{}}},Ar=class extends ht{constructor(e=[]){super(),this.nodes=e}render(e){return this.nodes.reduce((t,n)=>t+n.render(e),"")}optimizeNodes(){let{nodes:e}=this,t=e.length;for(;t--;){let n=e[t].optimizeNodes();Array.isArray(n)?e.splice(t,1,...n):n?e[t]=n:e.splice(t,1)}return e.length>0?this:void 0}optimizeNames(e,t){let{nodes:n}=this,a=n.length;for(;a--;){let s=n[a];s.optimizeNames(e,t)||(lh(e,s.names),n.splice(a,1))}return n.length>0?this:void 0}get names(){return this.nodes.reduce((e,t)=>Et(e,t.names),{})}},_t=class extends Ar{render(e){return"{"+e._n+super.render(e)+"}"+e._n}},zo=class extends Ar{},rr=class extends _t{};rr.kind="else";var Gt=class r extends _t{constructor(e,t){super(t),this.condition=e}render(e){let t=`if(${this.condition})`+super.render(e);return this.else&&(t+="else "+this.else.render(e)),t}optimizeNodes(){super.optimizeNodes();let e=this.condition;if(e===!0)return this.nodes;let t=this.else;if(t){let n=t.optimizeNodes();t=this.else=Array.isArray(n)?new rr(n):n}if(t)return e===!1?t instanceof r?t:t.nodes:this.nodes.length?this:new r(Ou(e),t instanceof r?[t]:t.nodes);if(!(e===!1||!this.nodes.length))return this}optimizeNames(e,t){var n;if(this.else=(n=this.else)===null||n===void 0?void 0:n.optimizeNames(e,t),!!(super.optimizeNames(e,t)||this.else))return this.condition=nr(this.condition,e,t),this}get names(){let e=super.names;return zi(e,this.condition),this.else&&Et(e,this.else.names),e}};Gt.kind="if";var Dt=class extends _t{};Dt.kind="for";var Ko=class extends Dt{constructor(e){super(),this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iteration=nr(this.iteration,e,t),this}get names(){return Et(super.names,this.iteration.names)}},Qo=class extends Dt{constructor(e,t,n,a){super(),this.varKind=e,this.name=t,this.from=n,this.to=a}render(e){let t=e.es5?Ke.varKinds.var:this.varKind,{name:n,from:a,to:s}=this;return`for(${t} ${n}=${a}; ${n}<${s}; ${n}++)`+super.render(e)}get names(){let e=zi(super.names,this.from);return zi(e,this.to)}},Hi=class extends Dt{constructor(e,t,n,a){super(),this.loop=e,this.varKind=t,this.name=n,this.iterable=a}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iterable=nr(this.iterable,e,t),this}get names(){return Et(super.names,this.iterable.names)}},Nr=class extends _t{constructor(e,t,n){super(),this.name=e,this.args=t,this.async=n}render(e){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(e)}};Nr.kind="func";var Ur=class extends Ar{render(e){return"return "+super.render(e)}};Ur.kind="return";var Jo=class extends _t{render(e){let t="try"+super.render(e);return this.catch&&(t+=this.catch.render(e)),this.finally&&(t+=this.finally.render(e)),t}optimizeNodes(){var e,t;return super.optimizeNodes(),(e=this.catch)===null||e===void 0||e.optimizeNodes(),(t=this.finally)===null||t===void 0||t.optimizeNodes(),this}optimizeNames(e,t){var n,a;return super.optimizeNames(e,t),(n=this.catch)===null||n===void 0||n.optimizeNames(e,t),(a=this.finally)===null||a===void 0||a.optimizeNames(e,t),this}get names(){let e=super.names;return this.catch&&Et(e,this.catch.names),this.finally&&Et(e,this.finally.names),e}},qr=class extends _t{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}};qr.kind="catch";var Br=class extends _t{render(e){return"finally"+super.render(e)}};Br.kind="finally";var Xo=class{constructor(e,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts=Z(P({},t),{_n:t.lines?`
2
+ `:""}),this._extScope=e,this._scope=new Ke.Scope({parent:e}),this._nodes=[new zo]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,t){let n=this._extScope.value(e,t);return(this._values[n.prefix]||(this._values[n.prefix]=new Set)).add(n),n}getScopeValue(e,t){return this._extScope.getValue(e,t)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,t,n,a){let s=this._scope.toName(t);return n!==void 0&&a&&(this._constants[s.str]=n),this._leafNode(new Uo(e,s,n)),s}const(e,t,n){return this._def(Ke.varKinds.const,e,t,n)}let(e,t,n){return this._def(Ke.varKinds.let,e,t,n)}var(e,t,n){return this._def(Ke.varKinds.var,e,t,n)}assign(e,t,n){return this._leafNode(new Vi(e,t,n))}add(e,t){return this._leafNode(new qo(e,B.operators.ADD,t))}code(e){return typeof e=="function"?e():e!==Q.nil&&this._leafNode(new Ho(e)),this}object(...e){let t=["{"];for(let[n,a]of e)t.length>1&&t.push(","),t.push(n),(n!==a||this.opts.es5)&&(t.push(":"),(0,Q.addCodeArg)(t,a));return t.push("}"),new Q._Code(t)}if(e,t,n){if(this._blockNode(new Gt(e)),t&&n)this.code(t).else().code(n).endIf();else if(t)this.code(t).endIf();else if(n)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new Gt(e))}else(){return this._elseNode(new rr)}endIf(){return this._endBlockNode(Gt,rr)}_for(e,t){return this._blockNode(e),t&&this.code(t).endFor(),this}for(e,t){return this._for(new Ko(e),t)}forRange(e,t,n,a,s=this.opts.es5?Ke.varKinds.var:Ke.varKinds.let){let i=this._scope.toName(e);return this._for(new Qo(s,i,t,n),()=>a(i))}forOf(e,t,n,a=Ke.varKinds.const){let s=this._scope.toName(e);if(this.opts.es5){let i=t instanceof Q.Name?t:this.var("_arr",t);return this.forRange("_i",0,(0,Q._)`${i}.length`,o=>{this.var(s,(0,Q._)`${i}[${o}]`),n(s)})}return this._for(new Hi("of",a,s,t),()=>n(s))}forIn(e,t,n,a=this.opts.es5?Ke.varKinds.var:Ke.varKinds.const){if(this.opts.ownProperties)return this.forOf(e,(0,Q._)`Object.keys(${t})`,n);let s=this._scope.toName(e);return this._for(new Hi("in",a,s,t),()=>n(s))}endFor(){return this._endBlockNode(Dt)}label(e){return this._leafNode(new Bo(e))}break(e){return this._leafNode(new Lo(e))}return(e){let t=new Ur;if(this._blockNode(t),this.code(e),t.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(Ur)}try(e,t,n){if(!t&&!n)throw new Error('CodeGen: "try" without "catch" and "finally"');let a=new Jo;if(this._blockNode(a),this.code(e),t){let s=this.name("e");this._currNode=a.catch=new qr(s),t(s)}return n&&(this._currNode=a.finally=new Br,this.code(n)),this._endBlockNode(qr,Br)}throw(e){return this._leafNode(new Vo(e))}block(e,t){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(t),this}endBlock(e){let t=this._blockStarts.pop();if(t===void 0)throw new Error("CodeGen: not in self-balancing block");let n=this._nodes.length-t;if(n<0||e!==void 0&&n!==e)throw new Error(`CodeGen: wrong number of nodes: ${n} vs ${e} expected`);return this._nodes.length=t,this}func(e,t=Q.nil,n,a){return this._blockNode(new Nr(e,t,n)),a&&this.code(a).endFunc(),this}endFunc(){return this._endBlockNode(Nr)}optimize(e=1){for(;e-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,t){let n=this._currNode;if(n instanceof e||t&&n instanceof t)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${t?`${e.kind}/${t.kind}`:e.kind}"`)}_elseNode(e){let t=this._currNode;if(!(t instanceof Gt))throw new Error('CodeGen: "else" without "if"');return this._currNode=t.else=e,this}get _root(){return this._nodes[0]}get _currNode(){let e=this._nodes;return e[e.length-1]}set _currNode(e){let t=this._nodes;t[t.length-1]=e}};B.CodeGen=Xo;function Et(r,e){for(let t in e)r[t]=(r[t]||0)+(e[t]||0);return r}function zi(r,e){return e instanceof Q._CodeOrName?Et(r,e.names):r}function nr(r,e,t){if(r instanceof Q.Name)return n(r);if(!a(r))return r;return new Q._Code(r._items.reduce((s,i)=>(i instanceof Q.Name&&(i=n(i)),i instanceof Q._Code?s.push(...i._items):s.push(i),s),[]));function n(s){let i=t[s.str];return i===void 0||e[s.str]!==1?s:(delete e[s.str],i)}function a(s){return s instanceof Q._Code&&s._items.some(i=>i instanceof Q.Name&&e[i.str]===1&&t[i.str]!==void 0)}}function lh(r,e){for(let t in e)r[t]=(r[t]||0)-(e[t]||0)}function Ou(r){return typeof r=="boolean"||typeof r=="number"||r===null?!r:(0,Q._)`!${Yo(r)}`}B.not=Ou;var ch=wu(B.operators.AND);function mh(...r){return r.reduce(ch)}B.and=mh;var hh=wu(B.operators.OR);function _h(...r){return r.reduce(hh)}B.or=_h;function wu(r){return(e,t)=>e===Q.nil?t:t===Q.nil?e:(0,Q._)`${Yo(e)} ${r} ${Yo(t)}`}function Yo(r){return r instanceof Q.Name?r:(0,Q._)`(${r})`}});var te=G(H=>{"use strict";Object.defineProperty(H,"__esModule",{value:!0});H.checkStrictMode=H.getErrorPath=H.Type=H.useFunc=H.setEvaluated=H.evaluatedPropsToName=H.mergeEvaluated=H.eachItem=H.unescapeJsonPointer=H.escapeJsonPointer=H.escapeFragment=H.unescapeFragment=H.schemaRefOrVal=H.schemaHasRulesButRef=H.schemaHasRules=H.checkUnknownRules=H.alwaysValidSchema=H.toHash=void 0;var fe=V(),gh=Wr();function Th(r){let e={};for(let t of r)e[t]=!0;return e}H.toHash=Th;function yh(r,e){return typeof e=="boolean"?e:Object.keys(e).length===0?!0:(vu(r,e),!ku(e,r.self.RULES.all))}H.alwaysValidSchema=yh;function vu(r,e=r.schema){let{opts:t,self:n}=r;if(!t.strictSchema||typeof e=="boolean")return;let a=n.RULES.keywords;for(let s in e)a[s]||Pu(r,`unknown keyword: "${s}"`)}H.checkUnknownRules=vu;function ku(r,e){if(typeof r=="boolean")return!r;for(let t in r)if(e[t])return!0;return!1}H.schemaHasRules=ku;function bh(r,e){if(typeof r=="boolean")return!r;for(let t in r)if(t!=="$ref"&&e.all[t])return!0;return!1}H.schemaHasRulesButRef=bh;function Fh({topSchemaRef:r,schemaPath:e},t,n,a){if(!a){if(typeof t=="number"||typeof t=="boolean")return t;if(typeof t=="string")return(0,fe._)`${t}`}return(0,fe._)`${r}${e}${(0,fe.getProperty)(n)}`}H.schemaRefOrVal=Fh;function xh(r){return Su(decodeURIComponent(r))}H.unescapeFragment=xh;function $h(r){return encodeURIComponent(ep(r))}H.escapeFragment=$h;function ep(r){return typeof r=="number"?`${r}`:r.replace(/~/g,"~0").replace(/\//g,"~1")}H.escapeJsonPointer=ep;function Su(r){return r.replace(/~1/g,"/").replace(/~0/g,"~")}H.unescapeJsonPointer=Su;function Oh(r,e){if(Array.isArray(r))for(let t of r)e(t);else e(r)}H.eachItem=Oh;function Iu({mergeNames:r,mergeToName:e,mergeValues:t,resultToName:n}){return(a,s,i,o)=>{let d=i===void 0?s:i instanceof fe.Name?(s instanceof fe.Name?r(a,s,i):e(a,s,i),i):s instanceof fe.Name?(e(a,i,s),s):t(s,i);return o===fe.Name&&!(d instanceof fe.Name)?n(a,d):d}}H.mergeEvaluated={props:Iu({mergeNames:(r,e,t)=>r.if((0,fe._)`${t} !== true && ${e} !== undefined`,()=>{r.if((0,fe._)`${e} === true`,()=>r.assign(t,!0),()=>r.assign(t,(0,fe._)`${t} || {}`).code((0,fe._)`Object.assign(${t}, ${e})`))}),mergeToName:(r,e,t)=>r.if((0,fe._)`${t} !== true`,()=>{e===!0?r.assign(t,!0):(r.assign(t,(0,fe._)`${t} || {}`),tp(r,t,e))}),mergeValues:(r,e)=>r===!0?!0:P(P({},r),e),resultToName:Cu}),items:Iu({mergeNames:(r,e,t)=>r.if((0,fe._)`${t} !== true && ${e} !== undefined`,()=>r.assign(t,(0,fe._)`${e} === true ? true : ${t} > ${e} ? ${t} : ${e}`)),mergeToName:(r,e,t)=>r.if((0,fe._)`${t} !== true`,()=>r.assign(t,e===!0?!0:(0,fe._)`${t} > ${e} ? ${t} : ${e}`)),mergeValues:(r,e)=>r===!0?!0:Math.max(r,e),resultToName:(r,e)=>r.var("items",e)})};function Cu(r,e){if(e===!0)return r.var("props",!0);let t=r.var("props",(0,fe._)`{}`);return e!==void 0&&tp(r,t,e),t}H.evaluatedPropsToName=Cu;function tp(r,e,t){Object.keys(t).forEach(n=>r.assign((0,fe._)`${e}${(0,fe.getProperty)(n)}`,!0))}H.setEvaluated=tp;var ju={};function wh(r,e){return r.scopeValue("func",{ref:e,code:ju[e.code]||(ju[e.code]=new gh._Code(e.code))})}H.useFunc=wh;var Zo;(function(r){r[r.Num=0]="Num",r[r.Str=1]="Str"})(Zo||(H.Type=Zo={}));function Ih(r,e,t){if(r instanceof fe.Name){let n=e===Zo.Num;return t?n?(0,fe._)`"[" + ${r} + "]"`:(0,fe._)`"['" + ${r} + "']"`:n?(0,fe._)`"/" + ${r}`:(0,fe._)`"/" + ${r}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return t?(0,fe.getProperty)(r).toString():"/"+ep(r)}H.getErrorPath=Ih;function Pu(r,e,t=r.opts.strictSchema){if(t){if(e=`strict mode: ${e}`,t===!0)throw new Error(e);r.self.logger.warn(e)}}H.checkStrictMode=Pu});var gt=G(rp=>{"use strict";Object.defineProperty(rp,"__esModule",{value:!0});var Oe=V(),jh={data:new Oe.Name("data"),valCxt:new Oe.Name("valCxt"),instancePath:new Oe.Name("instancePath"),parentData:new Oe.Name("parentData"),parentDataProperty:new Oe.Name("parentDataProperty"),rootData:new Oe.Name("rootData"),dynamicAnchors:new Oe.Name("dynamicAnchors"),vErrors:new Oe.Name("vErrors"),errors:new Oe.Name("errors"),this:new Oe.Name("this"),self:new Oe.Name("self"),scope:new Oe.Name("scope"),json:new Oe.Name("json"),jsonPos:new Oe.Name("jsonPos"),jsonLen:new Oe.Name("jsonLen"),jsonPart:new Oe.Name("jsonPart")};rp.default=jh});var Lr=G(we=>{"use strict";Object.defineProperty(we,"__esModule",{value:!0});we.extendErrors=we.resetErrorsCount=we.reportExtraError=we.reportError=we.keyword$DataError=we.keywordError=void 0;var X=V(),Qi=te(),ve=gt();we.keywordError={message:({keyword:r})=>(0,X.str)`must pass "${r}" keyword validation`};we.keyword$DataError={message:({keyword:r,schemaType:e})=>e?(0,X.str)`"${r}" keyword must be ${e} ($data)`:(0,X.str)`"${r}" keyword is invalid ($data)`};function vh(r,e=we.keywordError,t,n){let{it:a}=r,{gen:s,compositeRule:i,allErrors:o}=a,d=Eu(r,e,t);(n!=null?n:i||o)?Gu(s,d):Du(a,(0,X._)`[${d}]`)}we.reportError=vh;function kh(r,e=we.keywordError,t){let{it:n}=r,{gen:a,compositeRule:s,allErrors:i}=n,o=Eu(r,e,t);Gu(a,o),s||i||Du(n,ve.default.vErrors)}we.reportExtraError=kh;function Sh(r,e){r.assign(ve.default.errors,e),r.if((0,X._)`${ve.default.vErrors} !== null`,()=>r.if(e,()=>r.assign((0,X._)`${ve.default.vErrors}.length`,e),()=>r.assign(ve.default.vErrors,null)))}we.resetErrorsCount=Sh;function Ch({gen:r,keyword:e,schemaValue:t,data:n,errsCount:a,it:s}){if(a===void 0)throw new Error("ajv implementation error");let i=r.name("err");r.forRange("i",a,ve.default.errors,o=>{r.const(i,(0,X._)`${ve.default.vErrors}[${o}]`),r.if((0,X._)`${i}.instancePath === undefined`,()=>r.assign((0,X._)`${i}.instancePath`,(0,X.strConcat)(ve.default.instancePath,s.errorPath))),r.assign((0,X._)`${i}.schemaPath`,(0,X.str)`${s.errSchemaPath}/${e}`),s.opts.verbose&&(r.assign((0,X._)`${i}.schema`,t),r.assign((0,X._)`${i}.data`,n))})}we.extendErrors=Ch;function Gu(r,e){let t=r.const("err",e);r.if((0,X._)`${ve.default.vErrors} === null`,()=>r.assign(ve.default.vErrors,(0,X._)`[${t}]`),(0,X._)`${ve.default.vErrors}.push(${t})`),r.code((0,X._)`${ve.default.errors}++`)}function Du(r,e){let{gen:t,validateName:n,schemaEnv:a}=r;a.$async?t.throw((0,X._)`new ${r.ValidationError}(${e})`):(t.assign((0,X._)`${n}.errors`,e),t.return(!1))}var Mt={keyword:new X.Name("keyword"),schemaPath:new X.Name("schemaPath"),params:new X.Name("params"),propertyName:new X.Name("propertyName"),message:new X.Name("message"),schema:new X.Name("schema"),parentSchema:new X.Name("parentSchema")};function Eu(r,e,t){let{createErrors:n}=r.it;return n===!1?(0,X._)`{}`:Ph(r,e,t)}function Ph(r,e,t={}){let{gen:n,it:a}=r,s=[Gh(a,t),Dh(r,t)];return Eh(r,e,s),n.object(...s)}function Gh({errorPath:r},{instancePath:e}){let t=e?(0,X.str)`${r}${(0,Qi.getErrorPath)(e,Qi.Type.Str)}`:r;return[ve.default.instancePath,(0,X.strConcat)(ve.default.instancePath,t)]}function Dh({keyword:r,it:{errSchemaPath:e}},{schemaPath:t,parentSchema:n}){let a=n?e:(0,X.str)`${e}/${r}`;return t&&(a=(0,X.str)`${a}${(0,Qi.getErrorPath)(t,Qi.Type.Str)}`),[Mt.schemaPath,a]}function Eh(r,{params:e,message:t},n){let{keyword:a,data:s,schemaValue:i,it:o}=r,{opts:d,propertyName:g,topSchemaRef:h,schemaPath:T}=o;n.push([Mt.keyword,a],[Mt.params,typeof e=="function"?e(r):e||(0,X._)`{}`]),d.messages&&n.push([Mt.message,typeof t=="function"?t(r):t]),d.verbose&&n.push([Mt.schema,i],[Mt.parentSchema,(0,X._)`${h}${T}`],[ve.default.data,s]),g&&n.push([Mt.propertyName,g])}});var Ru=G(ar=>{"use strict";Object.defineProperty(ar,"__esModule",{value:!0});ar.boolOrEmptySchema=ar.topBoolOrEmptySchema=void 0;var Mh=Lr(),Rh=V(),Wh=gt(),Ah={message:"boolean schema is false"};function Nh(r){let{gen:e,schema:t,validateName:n}=r;t===!1?Mu(r,!1):typeof t=="object"&&t.$async===!0?e.return(Wh.default.data):(e.assign((0,Rh._)`${n}.errors`,null),e.return(!0))}ar.topBoolOrEmptySchema=Nh;function Uh(r,e){let{gen:t,schema:n}=r;n===!1?(t.var(e,!1),Mu(r)):t.var(e,!0)}ar.boolOrEmptySchema=Uh;function Mu(r,e){let{gen:t,data:n}=r,a={gen:t,keyword:"false schema",data:n,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:r};(0,Mh.reportError)(a,Ah,void 0,e)}});var np=G(sr=>{"use strict";Object.defineProperty(sr,"__esModule",{value:!0});sr.getRules=sr.isJSONType=void 0;var qh=["string","number","integer","boolean","null","object","array"],Bh=new Set(qh);function Lh(r){return typeof r=="string"&&Bh.has(r)}sr.isJSONType=Lh;function Vh(){let r={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:Z(P({},r),{integer:!0,boolean:!0,null:!0}),rules:[{rules:[]},r.number,r.string,r.array,r.object],post:{rules:[]},all:{},keywords:{}}}sr.getRules=Vh});var ap=G(bt=>{"use strict";Object.defineProperty(bt,"__esModule",{value:!0});bt.shouldUseRule=bt.shouldUseGroup=bt.schemaHasRulesForType=void 0;function Hh({schema:r,self:e},t){let n=e.RULES.types[t];return n&&n!==!0&&Wu(r,n)}bt.schemaHasRulesForType=Hh;function Wu(r,e){return e.rules.some(t=>Au(r,t))}bt.shouldUseGroup=Wu;function Au(r,e){var t;return r[e.keyword]!==void 0||((t=e.definition.implements)===null||t===void 0?void 0:t.some(n=>r[n]!==void 0))}bt.shouldUseRule=Au});var Vr=G(Ie=>{"use strict";Object.defineProperty(Ie,"__esModule",{value:!0});Ie.reportTypeError=Ie.checkDataTypes=Ie.checkDataType=Ie.coerceAndCheckDataType=Ie.getJSONTypes=Ie.getSchemaTypes=Ie.DataType=void 0;var zh=np(),Kh=ap(),Qh=Lr(),N=V(),Nu=te(),ir;(function(r){r[r.Correct=0]="Correct",r[r.Wrong=1]="Wrong"})(ir||(Ie.DataType=ir={}));function Jh(r){let e=Uu(r.type);if(e.includes("null")){if(r.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!e.length&&r.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');r.nullable===!0&&e.push("null")}return e}Ie.getSchemaTypes=Jh;function Uu(r){let e=Array.isArray(r)?r:r?[r]:[];if(e.every(zh.isJSONType))return e;throw new Error("type must be JSONType or JSONType[]: "+e.join(","))}Ie.getJSONTypes=Uu;function Xh(r,e){let{gen:t,data:n,opts:a}=r,s=Yh(e,a.coerceTypes),i=e.length>0&&!(s.length===0&&e.length===1&&(0,Kh.schemaHasRulesForType)(r,e[0]));if(i){let o=ip(e,n,a.strictNumbers,ir.Wrong);t.if(o,()=>{s.length?Zh(r,e,s):op(r)})}return i}Ie.coerceAndCheckDataType=Xh;var qu=new Set(["string","number","integer","boolean","null"]);function Yh(r,e){return e?r.filter(t=>qu.has(t)||e==="array"&&t==="array"):[]}function Zh(r,e,t){let{gen:n,data:a,opts:s}=r,i=n.let("dataType",(0,N._)`typeof ${a}`),o=n.let("coerced",(0,N._)`undefined`);s.coerceTypes==="array"&&n.if((0,N._)`${i} == 'object' && Array.isArray(${a}) && ${a}.length == 1`,()=>n.assign(a,(0,N._)`${a}[0]`).assign(i,(0,N._)`typeof ${a}`).if(ip(e,a,s.strictNumbers),()=>n.assign(o,a))),n.if((0,N._)`${o} !== undefined`);for(let g of t)(qu.has(g)||g==="array"&&s.coerceTypes==="array")&&d(g);n.else(),op(r),n.endIf(),n.if((0,N._)`${o} !== undefined`,()=>{n.assign(a,o),e_(r,o)});function d(g){switch(g){case"string":n.elseIf((0,N._)`${i} == "number" || ${i} == "boolean"`).assign(o,(0,N._)`"" + ${a}`).elseIf((0,N._)`${a} === null`).assign(o,(0,N._)`""`);return;case"number":n.elseIf((0,N._)`${i} == "boolean" || ${a} === null
3
3
  || (${i} == "string" && ${a} && ${a} == +${a})`).assign(o,(0,N._)`+${a}`);return;case"integer":n.elseIf((0,N._)`${i} === "boolean" || ${a} === null
4
4
  || (${i} === "string" && ${a} && ${a} == +${a} && !(${a} % 1))`).assign(o,(0,N._)`+${a}`);return;case"boolean":n.elseIf((0,N._)`${a} === "false" || ${a} === 0 || ${a} === null`).assign(o,!1).elseIf((0,N._)`${a} === "true" || ${a} === 1`).assign(o,!0);return;case"null":n.elseIf((0,N._)`${a} === "" || ${a} === 0 || ${a} === false`),n.assign(o,null);return;case"array":n.elseIf((0,N._)`${i} === "string" || ${i} === "number"
5
- || ${i} === "boolean" || ${a} === null`).assign(o,(0,N._)`[${a}]`)}}}function e_({gen:r,parentData:e,parentDataProperty:t},n){r.if((0,N._)`${e} !== undefined`,()=>r.assign((0,N._)`${e}[${t}]`,n))}function sp(r,e,t,n=ir.Correct){let a=n===ir.Correct?N.operators.EQ:N.operators.NEQ,s;switch(r){case"null":return(0,N._)`${e} ${a} null`;case"array":s=(0,N._)`Array.isArray(${e})`;break;case"object":s=(0,N._)`${e} && typeof ${e} == "object" && !Array.isArray(${e})`;break;case"integer":s=i((0,N._)`!(${e} % 1) && !isNaN(${e})`);break;case"number":s=i();break;default:return(0,N._)`typeof ${e} ${a} ${r}`}return n===ir.Correct?s:(0,N.not)(s);function i(o=N.nil){return(0,N.and)((0,N._)`typeof ${e} == "number"`,o,t?(0,N._)`isFinite(${e})`:N.nil)}}Ie.checkDataType=sp;function ip(r,e,t,n){if(r.length===1)return sp(r[0],e,t,n);let a,s=(0,Nu.toHash)(r);if(s.array&&s.object){let i=(0,N._)`typeof ${e} != "object"`;a=s.null?i:(0,N._)`!${e} || ${i}`,delete s.null,delete s.array,delete s.object}else a=N.nil;s.number&&delete s.integer;for(let i in s)a=(0,N.and)(a,sp(i,e,t,n));return a}Ie.checkDataTypes=ip;var t_={message:({schema:r})=>`must be ${r}`,params:({schema:r,schemaValue:e})=>typeof r=="string"?(0,N._)`{type: ${r}}`:(0,N._)`{type: ${e}}`};function op(r){let e=r_(r);(0,Qh.reportError)(e,t_)}Ie.reportTypeError=op;function r_(r){let{gen:e,data:t,schema:n}=r,a=(0,Nu.schemaRefOrVal)(r,n,"type");return{gen:e,keyword:"type",data:t,schema:n.type,schemaCode:a,schemaValue:a,parentSchema:n,params:{},it:r}}});var Lu=G(Ji=>{"use strict";Object.defineProperty(Ji,"__esModule",{value:!0});Ji.assignDefaults=void 0;var or=V(),n_=te();function a_(r,e){let{properties:t,items:n}=r.schema;if(e==="object"&&t)for(let a in t)Bu(r,a,t[a].default);else e==="array"&&Array.isArray(n)&&n.forEach((a,s)=>Bu(r,s,a.default))}Ji.assignDefaults=a_;function Bu(r,e,t){let{gen:n,compositeRule:a,data:s,opts:i}=r;if(t===void 0)return;let o=(0,or._)`${s}${(0,or.getProperty)(e)}`;if(a){(0,n_.checkStrictMode)(r,`default is ignored for: ${o}`);return}let d=(0,or._)`${o} === undefined`;i.useDefaults==="empty"&&(d=(0,or._)`${d} || ${o} === null || ${o} === ""`),n.if(d,(0,or._)`${o} = ${(0,or.stringify)(t)}`)}});var Le=G(pe=>{"use strict";Object.defineProperty(pe,"__esModule",{value:!0});pe.validateUnion=pe.validateArray=pe.usePattern=pe.callValidateCode=pe.schemaProperties=pe.allSchemaProperties=pe.noPropertyInData=pe.propertyInData=pe.isOwnProperty=pe.hasPropFunc=pe.reportMissingProp=pe.checkMissingProp=pe.checkReportMissingProp=void 0;var ue=V(),pp=te(),Ft=gt(),s_=te();function i_(r,e){let{gen:t,data:n,it:a}=r;t.if(fp(t,n,e,a.opts.ownProperties),()=>{r.setParams({missingProperty:(0,ue._)`${e}`},!0),r.error()})}pe.checkReportMissingProp=i_;function o_({gen:r,data:e,it:{opts:t}},n,a){return(0,ue.or)(...n.map(s=>(0,ue.and)(fp(r,e,s,t.ownProperties),(0,ue._)`${a} = ${s}`)))}pe.checkMissingProp=o_;function p_(r,e){r.setParams({missingProperty:e},!0),r.error()}pe.reportMissingProp=p_;function Vu(r){return r.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,ue._)`Object.prototype.hasOwnProperty`})}pe.hasPropFunc=Vu;function dp(r,e,t){return(0,ue._)`${Vu(r)}.call(${e}, ${t})`}pe.isOwnProperty=dp;function d_(r,e,t,n){let a=(0,ue._)`${e}${(0,ue.getProperty)(t)} !== undefined`;return n?(0,ue._)`${a} && ${dp(r,e,t)}`:a}pe.propertyInData=d_;function fp(r,e,t,n){let a=(0,ue._)`${e}${(0,ue.getProperty)(t)} === undefined`;return n?(0,ue.or)(a,(0,ue.not)(dp(r,e,t))):a}pe.noPropertyInData=fp;function Hu(r){return r?Object.keys(r).filter(e=>e!=="__proto__"):[]}pe.allSchemaProperties=Hu;function f_(r,e){return Hu(e).filter(t=>!(0,pp.alwaysValidSchema)(r,e[t]))}pe.schemaProperties=f_;function u_({schemaCode:r,data:e,it:{gen:t,topSchemaRef:n,schemaPath:a,errorPath:s},it:i},o,d,g){let h=g?(0,ue._)`${r}, ${e}, ${n}${a}`:e,T=[[Ft.default.instancePath,(0,ue.strConcat)(Ft.default.instancePath,s)],[Ft.default.parentData,i.parentData],[Ft.default.parentDataProperty,i.parentDataProperty],[Ft.default.rootData,Ft.default.rootData]];i.opts.dynamicRef&&T.push([Ft.default.dynamicAnchors,Ft.default.dynamicAnchors]);let O=(0,ue._)`${h}, ${t.object(...T)}`;return d!==ue.nil?(0,ue._)`${o}.call(${d}, ${O})`:(0,ue._)`${o}(${O})`}pe.callValidateCode=u_;var l_=(0,ue._)`new RegExp`;function c_({gen:r,it:{opts:e}},t){let n=e.unicodeRegExp?"u":"",{regExp:a}=e.code,s=a(t,n);return r.scopeValue("pattern",{key:s.toString(),ref:s,code:(0,ue._)`${a.code==="new RegExp"?l_:(0,s_.useFunc)(r,a)}(${t}, ${n})`})}pe.usePattern=c_;function m_(r){let{gen:e,data:t,keyword:n,it:a}=r,s=e.name("valid");if(a.allErrors){let o=e.let("valid",!0);return i(()=>e.assign(o,!1)),o}return e.var(s,!0),i(()=>e.break()),s;function i(o){let d=e.const("len",(0,ue._)`${t}.length`);e.forRange("i",0,d,g=>{r.subschema({keyword:n,dataProp:g,dataPropType:pp.Type.Num},s),e.if((0,ue.not)(s),o)})}}pe.validateArray=m_;function h_(r){let{gen:e,schema:t,keyword:n,it:a}=r;if(!Array.isArray(t))throw new Error("ajv implementation error");if(t.some(d=>(0,pp.alwaysValidSchema)(a,d))&&!a.opts.unevaluated)return;let i=e.let("valid",!1),o=e.name("_valid");e.block(()=>t.forEach((d,g)=>{let h=r.subschema({keyword:n,schemaProp:g,compositeRule:!0},o);e.assign(i,(0,ue._)`${i} || ${o}`),r.mergeValidEvaluated(h,o)||e.if((0,ue.not)(i))})),r.result(i,()=>r.reset(),()=>r.error(!0))}pe.validateUnion=h_});var Qu=G(it=>{"use strict";Object.defineProperty(it,"__esModule",{value:!0});it.validateKeywordUsage=it.validSchemaType=it.funcKeywordCode=it.macroKeywordCode=void 0;var ke=V(),Mt=gt(),__=Le(),g_=Lr();function T_(r,e){let{gen:t,keyword:n,schema:a,parentSchema:s,it:i}=r,o=e.macro.call(i.self,a,s,i),d=Ku(t,n,o);i.opts.validateSchema!==!1&&i.self.validateSchema(o,!0);let g=t.name("valid");r.subschema({schema:o,schemaPath:ke.nil,errSchemaPath:`${i.errSchemaPath}/${n}`,topSchemaRef:d,compositeRule:!0},g),r.pass(g,()=>r.error(!0))}it.macroKeywordCode=T_;function y_(r,e){var t;let{gen:n,keyword:a,schema:s,parentSchema:i,$data:o,it:d}=r;F_(d,e);let g=!o&&e.compile?e.compile.call(d.self,s,i,d):e.validate,h=Ku(n,a,g),T=n.let("valid");r.block$data(T,O),r.ok((t=e.valid)!==null&&t!==void 0?t:T);function O(){if(e.errors===!1)$(),e.modifying&&zu(r),I(()=>r.error());else{let j=e.async?w():b();e.modifying&&zu(r),I(()=>b_(r,j))}}function w(){let j=n.let("ruleErrs",null);return n.try(()=>$((0,ke._)`await `),z=>n.assign(T,!1).if((0,ke._)`${z} instanceof ${d.ValidationError}`,()=>n.assign(j,(0,ke._)`${z}.errors`),()=>n.throw(z))),j}function b(){let j=(0,ke._)`${h}.errors`;return n.assign(j,null),$(ke.nil),j}function $(j=e.async?(0,ke._)`await `:ke.nil){let z=d.opts.passContext?Mt.default.this:Mt.default.self,q=!("compile"in e&&!o||e.schema===!1);n.assign(T,(0,ke._)`${j}${(0,__.callValidateCode)(r,h,z,q)}`,e.modifying)}function I(j){var z;n.if((0,ke.not)((z=e.valid)!==null&&z!==void 0?z:T),j)}}it.funcKeywordCode=y_;function zu(r){let{gen:e,data:t,it:n}=r;e.if(n.parentData,()=>e.assign(t,(0,ke._)`${n.parentData}[${n.parentDataProperty}]`))}function b_(r,e){let{gen:t}=r;t.if((0,ke._)`Array.isArray(${e})`,()=>{t.assign(Mt.default.vErrors,(0,ke._)`${Mt.default.vErrors} === null ? ${e} : ${Mt.default.vErrors}.concat(${e})`).assign(Mt.default.errors,(0,ke._)`${Mt.default.vErrors}.length`),(0,g_.extendErrors)(r)},()=>r.error())}function F_({schemaEnv:r},e){if(e.async&&!r.$async)throw new Error("async keyword in sync schema")}function Ku(r,e,t){if(t===void 0)throw new Error(`keyword "${e}" failed to compile`);return r.scopeValue("keyword",typeof t=="function"?{ref:t}:{ref:t,code:(0,ke.stringify)(t)})}function x_(r,e,t=!1){return!e.length||e.some(n=>n==="array"?Array.isArray(r):n==="object"?r&&typeof r=="object"&&!Array.isArray(r):typeof r==n||t&&typeof r=="undefined")}it.validSchemaType=x_;function $_({schema:r,opts:e,self:t,errSchemaPath:n},a,s){if(Array.isArray(a.keyword)?!a.keyword.includes(s):a.keyword!==s)throw new Error("ajv implementation error");let i=a.dependencies;if(i!=null&&i.some(o=>!Object.prototype.hasOwnProperty.call(r,o)))throw new Error(`parent schema must have dependencies of ${s}: ${i.join(",")}`);if(a.validateSchema&&!a.validateSchema(r[s])){let d=`keyword "${s}" value is invalid at path "${n}": `+t.errorsText(a.validateSchema.errors);if(e.validateSchema==="log")t.logger.error(d);else throw new Error(d)}}it.validateKeywordUsage=$_});var Xu=G(xt=>{"use strict";Object.defineProperty(xt,"__esModule",{value:!0});xt.extendSubschemaMode=xt.extendSubschemaData=xt.getSubschema=void 0;var ot=V(),Ju=te();function O_(r,{keyword:e,schemaProp:t,schema:n,schemaPath:a,errSchemaPath:s,topSchemaRef:i}){if(e!==void 0&&n!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(e!==void 0){let o=r.schema[e];return t===void 0?{schema:o,schemaPath:(0,ot._)`${r.schemaPath}${(0,ot.getProperty)(e)}`,errSchemaPath:`${r.errSchemaPath}/${e}`}:{schema:o[t],schemaPath:(0,ot._)`${r.schemaPath}${(0,ot.getProperty)(e)}${(0,ot.getProperty)(t)}`,errSchemaPath:`${r.errSchemaPath}/${e}/${(0,Ju.escapeFragment)(t)}`}}if(n!==void 0){if(a===void 0||s===void 0||i===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:n,schemaPath:a,topSchemaRef:i,errSchemaPath:s}}throw new Error('either "keyword" or "schema" must be passed')}xt.getSubschema=O_;function w_(r,e,{dataProp:t,dataPropType:n,data:a,dataTypes:s,propertyName:i}){if(a!==void 0&&t!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');let{gen:o}=e;if(t!==void 0){let{errorPath:g,dataPathArr:h,opts:T}=e,O=o.let("data",(0,ot._)`${e.data}${(0,ot.getProperty)(t)}`,!0);d(O),r.errorPath=(0,ot.str)`${g}${(0,Ju.getErrorPath)(t,n,T.jsPropertySyntax)}`,r.parentDataProperty=(0,ot._)`${t}`,r.dataPathArr=[...h,r.parentDataProperty]}if(a!==void 0){let g=a instanceof ot.Name?a:o.let("data",a,!0);d(g),i!==void 0&&(r.propertyName=i)}s&&(r.dataTypes=s);function d(g){r.data=g,r.dataLevel=e.dataLevel+1,r.dataTypes=[],e.definedProperties=new Set,r.parentData=e.data,r.dataNames=[...e.dataNames,g]}}xt.extendSubschemaData=w_;function I_(r,{jtdDiscriminator:e,jtdMetadata:t,compositeRule:n,createErrors:a,allErrors:s}){n!==void 0&&(r.compositeRule=n),a!==void 0&&(r.createErrors=a),s!==void 0&&(r.allErrors=s),r.jtdDiscriminator=e,r.jtdMetadata=t}xt.extendSubschemaMode=I_});var up=G((gI,Yu)=>{"use strict";Yu.exports=function r(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var n,a,s;if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(a=n;a--!==0;)if(!r(e[a],t[a]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();if(s=Object.keys(e),n=s.length,n!==Object.keys(t).length)return!1;for(a=n;a--!==0;)if(!Object.prototype.hasOwnProperty.call(t,s[a]))return!1;for(a=n;a--!==0;){var i=s[a];if(!r(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}});var el=G((TI,Zu)=>{"use strict";var $t=Zu.exports=function(r,e,t){typeof e=="function"&&(t=e,e={}),t=e.cb||t;var n=typeof t=="function"?t:t.pre||function(){},a=t.post||function(){};Xi(e,n,a,r,"",r)};$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 Xi(r,e,t,n,a,s,i,o,d,g){if(n&&typeof n=="object"&&!Array.isArray(n)){e(n,a,s,i,o,d,g);for(var h in n){var T=n[h];if(Array.isArray(T)){if(h in $t.arrayKeywords)for(var O=0;O<T.length;O++)Xi(r,e,t,T[O],a+"/"+h+"/"+O,s,a,h,n,O)}else if(h in $t.propsKeywords){if(T&&typeof T=="object")for(var w in T)Xi(r,e,t,T[w],a+"/"+h+"/"+j_(w),s,a,h,n,w)}else(h in $t.keywords||r.allKeys&&!(h in $t.skipKeywords))&&Xi(r,e,t,T,a+"/"+h,s,a,h,n)}t(n,a,s,i,o,d,g)}}function j_(r){return r.replace(/~/g,"~0").replace(/\//g,"~1")}});var Hr=G(Pe=>{"use strict";Object.defineProperty(Pe,"__esModule",{value:!0});Pe.getSchemaRefs=Pe.resolveUrl=Pe.normalizeId=Pe._getFullPath=Pe.getFullPath=Pe.inlineRef=void 0;var v_=te(),k_=up(),S_=el(),C_=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function P_(r,e=!0){return typeof r=="boolean"?!0:e===!0?!lp(r):e?tl(r)<=e:!1}Pe.inlineRef=P_;var G_=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function lp(r){for(let e in r){if(G_.has(e))return!0;let t=r[e];if(Array.isArray(t)&&t.some(lp)||typeof t=="object"&&lp(t))return!0}return!1}function tl(r){let e=0;for(let t in r){if(t==="$ref")return 1/0;if(e++,!C_.has(t)&&(typeof r[t]=="object"&&(0,v_.eachItem)(r[t],n=>e+=tl(n)),e===1/0))return 1/0}return e}function rl(r,e="",t){t!==!1&&(e=pr(e));let n=r.parse(e);return nl(r,n)}Pe.getFullPath=rl;function nl(r,e){return r.serialize(e).split("#")[0]+"#"}Pe._getFullPath=nl;var D_=/#\/?$/;function pr(r){return r?r.replace(D_,""):""}Pe.normalizeId=pr;function E_(r,e,t){return t=pr(t),r.resolve(e,t)}Pe.resolveUrl=E_;var R_=/^[a-z_][-a-z0-9._]*$/i;function M_(r,e){if(typeof r=="boolean")return{};let{schemaId:t,uriResolver:n}=this.opts,a=pr(r[t]||e),s={"":a},i=rl(n,a,!1),o={},d=new Set;return S_(r,{allKeys:!0},(T,O,w,b)=>{if(b===void 0)return;let $=i+O,I=s[b];typeof T[t]=="string"&&(I=j.call(this,T[t])),z.call(this,T.$anchor),z.call(this,T.$dynamicAnchor),s[O]=I;function j(q){let ae=this.opts.uriResolver.resolve;if(q=pr(I?ae(I,q):q),d.has(q))throw h(q);d.add(q);let W=this.refs[q];return typeof W=="string"&&(W=this.refs[W]),typeof W=="object"?g(T,W.schema,q):q!==pr($)&&(q[0]==="#"?(g(T,o[q],q),o[q]=T):this.refs[q]=$),q}function z(q){if(typeof q=="string"){if(!R_.test(q))throw new Error(`invalid anchor "${q}"`);j.call(this,`#${q}`)}}}),o;function g(T,O,w){if(O!==void 0&&!k_(T,O))throw h(w)}function h(T){return new Error(`reference "${T}" resolves to more than one schema`)}}Pe.getSchemaRefs=M_});var Qr=G(Ot=>{"use strict";Object.defineProperty(Ot,"__esModule",{value:!0});Ot.getData=Ot.KeywordCxt=Ot.validateFunctionCode=void 0;var pl=Mu(),al=Vr(),mp=ap(),Yi=Vr(),W_=Lu(),Kr=Qu(),cp=Xu(),D=V(),M=gt(),A_=Hr(),Tt=te(),zr=Lr();function N_(r){if(ul(r)&&(ll(r),fl(r))){B_(r);return}dl(r,()=>(0,pl.topBoolOrEmptySchema)(r))}Ot.validateFunctionCode=N_;function dl({gen:r,validateName:e,schema:t,schemaEnv:n,opts:a},s){a.code.es5?r.func(e,(0,D._)`${M.default.data}, ${M.default.valCxt}`,n.$async,()=>{r.code((0,D._)`"use strict"; ${sl(t,a)}`),q_(r,a),r.code(s)}):r.func(e,(0,D._)`${M.default.data}, ${U_(a)}`,n.$async,()=>r.code(sl(t,a)).code(s))}function U_(r){return(0,D._)`{${M.default.instancePath}="", ${M.default.parentData}, ${M.default.parentDataProperty}, ${M.default.rootData}=${M.default.data}${r.dynamicRef?(0,D._)`, ${M.default.dynamicAnchors}={}`:D.nil}}={}`}function q_(r,e){r.if(M.default.valCxt,()=>{r.var(M.default.instancePath,(0,D._)`${M.default.valCxt}.${M.default.instancePath}`),r.var(M.default.parentData,(0,D._)`${M.default.valCxt}.${M.default.parentData}`),r.var(M.default.parentDataProperty,(0,D._)`${M.default.valCxt}.${M.default.parentDataProperty}`),r.var(M.default.rootData,(0,D._)`${M.default.valCxt}.${M.default.rootData}`),e.dynamicRef&&r.var(M.default.dynamicAnchors,(0,D._)`${M.default.valCxt}.${M.default.dynamicAnchors}`)},()=>{r.var(M.default.instancePath,(0,D._)`""`),r.var(M.default.parentData,(0,D._)`undefined`),r.var(M.default.parentDataProperty,(0,D._)`undefined`),r.var(M.default.rootData,M.default.data),e.dynamicRef&&r.var(M.default.dynamicAnchors,(0,D._)`{}`)})}function B_(r){let{schema:e,opts:t,gen:n}=r;dl(r,()=>{t.$comment&&e.$comment&&ml(r),K_(r),n.let(M.default.vErrors,null),n.let(M.default.errors,0),t.unevaluated&&L_(r),cl(r),X_(r)})}function L_(r){let{gen:e,validateName:t}=r;r.evaluated=e.const("evaluated",(0,D._)`${t}.evaluated`),e.if((0,D._)`${r.evaluated}.dynamicProps`,()=>e.assign((0,D._)`${r.evaluated}.props`,(0,D._)`undefined`)),e.if((0,D._)`${r.evaluated}.dynamicItems`,()=>e.assign((0,D._)`${r.evaluated}.items`,(0,D._)`undefined`))}function sl(r,e){let t=typeof r=="object"&&r[e.schemaId];return t&&(e.code.source||e.code.process)?(0,D._)`/*# sourceURL=${t} */`:D.nil}function V_(r,e){if(ul(r)&&(ll(r),fl(r))){H_(r,e);return}(0,pl.boolOrEmptySchema)(r,e)}function fl({schema:r,self:e}){if(typeof r=="boolean")return!r;for(let t in r)if(e.RULES.all[t])return!0;return!1}function ul(r){return typeof r.schema!="boolean"}function H_(r,e){let{schema:t,gen:n,opts:a}=r;a.$comment&&t.$comment&&ml(r),Q_(r),J_(r);let s=n.const("_errs",M.default.errors);cl(r,s),n.var(e,(0,D._)`${s} === ${M.default.errors}`)}function ll(r){(0,Tt.checkUnknownRules)(r),z_(r)}function cl(r,e){if(r.opts.jtd)return il(r,[],!1,e);let t=(0,al.getSchemaTypes)(r.schema),n=(0,al.coerceAndCheckDataType)(r,t);il(r,t,!n,e)}function z_(r){let{schema:e,errSchemaPath:t,opts:n,self:a}=r;e.$ref&&n.ignoreKeywordsWithRef&&(0,Tt.schemaHasRulesButRef)(e,a.RULES)&&a.logger.warn(`$ref: keywords ignored in schema at path "${t}"`)}function K_(r){let{schema:e,opts:t}=r;e.default!==void 0&&t.useDefaults&&t.strictSchema&&(0,Tt.checkStrictMode)(r,"default is ignored in the schema root")}function Q_(r){let e=r.schema[r.opts.schemaId];e&&(r.baseId=(0,A_.resolveUrl)(r.opts.uriResolver,r.baseId,e))}function J_(r){if(r.schema.$async&&!r.schemaEnv.$async)throw new Error("async schema in sync schema")}function ml({gen:r,schemaEnv:e,schema:t,errSchemaPath:n,opts:a}){let s=t.$comment;if(a.$comment===!0)r.code((0,D._)`${M.default.self}.logger.log(${s})`);else if(typeof a.$comment=="function"){let i=(0,D.str)`${n}/$comment`,o=r.scopeValue("root",{ref:e.root});r.code((0,D._)`${M.default.self}.opts.$comment(${s}, ${i}, ${o}.schema)`)}}function X_(r){let{gen:e,schemaEnv:t,validateName:n,ValidationError:a,opts:s}=r;t.$async?e.if((0,D._)`${M.default.errors} === 0`,()=>e.return(M.default.data),()=>e.throw((0,D._)`new ${a}(${M.default.vErrors})`)):(e.assign((0,D._)`${n}.errors`,M.default.vErrors),s.unevaluated&&Y_(r),e.return((0,D._)`${M.default.errors} === 0`))}function Y_({gen:r,evaluated:e,props:t,items:n}){t instanceof D.Name&&r.assign((0,D._)`${e}.props`,t),n instanceof D.Name&&r.assign((0,D._)`${e}.items`,n)}function il(r,e,t,n){let{gen:a,schema:s,data:i,allErrors:o,opts:d,self:g}=r,{RULES:h}=g;if(s.$ref&&(d.ignoreKeywordsWithRef||!(0,Tt.schemaHasRulesButRef)(s,h))){a.block(()=>_l(r,"$ref",h.all.$ref.definition));return}d.jtd||Z_(r,e),a.block(()=>{for(let O of h.rules)T(O);T(h.post)});function T(O){(0,mp.shouldUseGroup)(s,O)&&(O.type?(a.if((0,Yi.checkDataType)(O.type,i,d.strictNumbers)),ol(r,O),e.length===1&&e[0]===O.type&&t&&(a.else(),(0,Yi.reportTypeError)(r)),a.endIf()):ol(r,O),o||a.if((0,D._)`${M.default.errors} === ${n||0}`))}}function ol(r,e){let{gen:t,schema:n,opts:{useDefaults:a}}=r;a&&(0,W_.assignDefaults)(r,e.type),t.block(()=>{for(let s of e.rules)(0,mp.shouldUseRule)(n,s)&&_l(r,s.keyword,s.definition,e.type)})}function Z_(r,e){r.schemaEnv.meta||!r.opts.strictTypes||(eg(r,e),r.opts.allowUnionTypes||tg(r,e),rg(r,r.dataTypes))}function eg(r,e){if(e.length){if(!r.dataTypes.length){r.dataTypes=e;return}e.forEach(t=>{hl(r.dataTypes,t)||hp(r,`type "${t}" not allowed by context "${r.dataTypes.join(",")}"`)}),ag(r,e)}}function tg(r,e){e.length>1&&!(e.length===2&&e.includes("null"))&&hp(r,"use allowUnionTypes to allow union type keyword")}function rg(r,e){let t=r.self.RULES.all;for(let n in t){let a=t[n];if(typeof a=="object"&&(0,mp.shouldUseRule)(r.schema,a)){let{type:s}=a.definition;s.length&&!s.some(i=>ng(e,i))&&hp(r,`missing type "${s.join(",")}" for keyword "${n}"`)}}}function ng(r,e){return r.includes(e)||e==="number"&&r.includes("integer")}function hl(r,e){return r.includes(e)||e==="integer"&&r.includes("number")}function ag(r,e){let t=[];for(let n of r.dataTypes)hl(e,n)?t.push(n):e.includes("integer")&&n==="number"&&t.push("integer");r.dataTypes=t}function hp(r,e){let t=r.schemaEnv.baseId+r.errSchemaPath;e+=` at "${t}" (strictTypes)`,(0,Tt.checkStrictMode)(r,e,r.opts.strictTypes)}var Zi=class{constructor(e,t,n){if((0,Kr.validateKeywordUsage)(e,t,n),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=n,this.data=e.data,this.schema=e.schema[n],this.$data=t.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,Tt.schemaRefOrVal)(e,this.schema,n,this.$data),this.schemaType=t.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=t,this.$data)this.schemaCode=e.gen.const("vSchema",gl(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,Kr.validSchemaType)(this.schema,t.schemaType,t.allowUndefined))throw new Error(`${n} value must be ${JSON.stringify(t.schemaType)}`);("code"in t?t.trackErrors:t.errors!==!1)&&(this.errsCount=e.gen.const("_errs",M.default.errors))}result(e,t,n){this.failResult((0,D.not)(e),t,n)}failResult(e,t,n){this.gen.if(e),n?n():this.error(),t?(this.gen.else(),t(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(e,t){this.failResult((0,D.not)(e),void 0,t)}fail(e){if(e===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(e),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);let{schemaCode:t}=this;this.fail((0,D._)`${t} !== undefined && (${(0,D.or)(this.invalid$data(),e)})`)}error(e,t,n){if(t){this.setParams(t),this._error(e,n),this.setParams({});return}this._error(e,n)}_error(e,t){(e?zr.reportExtraError:zr.reportError)(this,this.def.error,t)}$dataError(){(0,zr.reportError)(this,this.def.$dataError||zr.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,zr.resetErrorsCount)(this.gen,this.errsCount)}ok(e){this.allErrors||this.gen.if(e)}setParams(e,t){t?Object.assign(this.params,e):this.params=e}block$data(e,t,n=D.nil){this.gen.block(()=>{this.check$data(e,n),t()})}check$data(e=D.nil,t=D.nil){if(!this.$data)return;let{gen:n,schemaCode:a,schemaType:s,def:i}=this;n.if((0,D.or)((0,D._)`${a} === undefined`,t)),e!==D.nil&&n.assign(e,!0),(s.length||i.validateSchema)&&(n.elseIf(this.invalid$data()),this.$dataError(),e!==D.nil&&n.assign(e,!1)),n.else()}invalid$data(){let{gen:e,schemaCode:t,schemaType:n,def:a,it:s}=this;return(0,D.or)(i(),o());function i(){if(n.length){if(!(t instanceof D.Name))throw new Error("ajv implementation error");let d=Array.isArray(n)?n:[n];return(0,D._)`${(0,Yi.checkDataTypes)(d,t,s.opts.strictNumbers,Yi.DataType.Wrong)}`}return D.nil}function o(){if(a.validateSchema){let d=e.scopeValue("validate$data",{ref:a.validateSchema});return(0,D._)`!${d}(${t})`}return D.nil}}subschema(e,t){let n=(0,cp.getSubschema)(this.it,e);(0,cp.extendSubschemaData)(n,this.it,e),(0,cp.extendSubschemaMode)(n,e);let a=Z(P(P({},this.it),n),{items:void 0,props:void 0});return V_(a,t),a}mergeEvaluated(e,t){let{it:n,gen:a}=this;n.opts.unevaluated&&(n.props!==!0&&e.props!==void 0&&(n.props=Tt.mergeEvaluated.props(a,e.props,n.props,t)),n.items!==!0&&e.items!==void 0&&(n.items=Tt.mergeEvaluated.items(a,e.items,n.items,t)))}mergeValidEvaluated(e,t){let{it:n,gen:a}=this;if(n.opts.unevaluated&&(n.props!==!0||n.items!==!0))return a.if(t,()=>this.mergeEvaluated(e,D.Name)),!0}};Ot.KeywordCxt=Zi;function _l(r,e,t,n){let a=new Zi(r,t,e);"code"in t?t.code(a,n):a.$data&&t.validate?(0,Kr.funcKeywordCode)(a,t):"macro"in t?(0,Kr.macroKeywordCode)(a,t):(t.compile||t.validate)&&(0,Kr.funcKeywordCode)(a,t)}var sg=/^\/(?:[^~]|~0|~1)*$/,ig=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function gl(r,{dataLevel:e,dataNames:t,dataPathArr:n}){let a,s;if(r==="")return M.default.rootData;if(r[0]==="/"){if(!sg.test(r))throw new Error(`Invalid JSON-pointer: ${r}`);a=r,s=M.default.rootData}else{let g=ig.exec(r);if(!g)throw new Error(`Invalid JSON-pointer: ${r}`);let h=+g[1];if(a=g[2],a==="#"){if(h>=e)throw new Error(d("property/index",h));return n[e-h]}if(h>e)throw new Error(d("data",h));if(s=t[e-h],!a)return s}let i=s,o=a.split("/");for(let g of o)g&&(s=(0,D._)`${s}${(0,D.getProperty)((0,Tt.unescapeJsonPointer)(g))}`,i=(0,D._)`${i} && ${s}`);return i;function d(g,h){return`Cannot access ${g} ${h} levels up, current level is ${e}`}}Ot.getData=gl});var eo=G(gp=>{"use strict";Object.defineProperty(gp,"__esModule",{value:!0});var _p=class extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}};gp.default=_p});var Jr=G(bp=>{"use strict";Object.defineProperty(bp,"__esModule",{value:!0});var Tp=Hr(),yp=class extends Error{constructor(e,t,n,a){super(a||`can't resolve reference ${n} from id ${t}`),this.missingRef=(0,Tp.resolveUrl)(e,t,n),this.missingSchema=(0,Tp.normalizeId)((0,Tp.getFullPath)(e,this.missingRef))}};bp.default=yp});var ro=G(Ve=>{"use strict";Object.defineProperty(Ve,"__esModule",{value:!0});Ve.resolveSchema=Ve.getCompilingSchema=Ve.resolveRef=Ve.compileSchema=Ve.SchemaEnv=void 0;var Qe=V(),og=eo(),Wt=gt(),Je=Hr(),Tl=te(),pg=Qr(),dr=class{constructor(e){var t;this.refs={},this.dynamicAnchors={};let n;typeof e.schema=="object"&&(n=e.schema),this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=(t=e.baseId)!==null&&t!==void 0?t:(0,Je.normalizeId)(n==null?void 0:n[e.schemaId||"$id"]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=n==null?void 0:n.$async,this.refs={}}};Ve.SchemaEnv=dr;function xp(r){let e=yl.call(this,r);if(e)return e;let t=(0,Je.getFullPath)(this.opts.uriResolver,r.root.baseId),{es5:n,lines:a}=this.opts.code,{ownProperties:s}=this.opts,i=new Qe.CodeGen(this.scope,{es5:n,lines:a,ownProperties:s}),o;r.$async&&(o=i.scopeValue("Error",{ref:og.default,code:(0,Qe._)`require("ajv/dist/runtime/validation_error").default`}));let d=i.scopeName("validate");r.validateName=d;let g={gen:i,allErrors:this.opts.allErrors,data:Wt.default.data,parentData:Wt.default.parentData,parentDataProperty:Wt.default.parentDataProperty,dataNames:[Wt.default.data],dataPathArr:[Qe.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:i.scopeValue("schema",this.opts.code.source===!0?{ref:r.schema,code:(0,Qe.stringify)(r.schema)}:{ref:r.schema}),validateName:d,ValidationError:o,schema:r.schema,schemaEnv:r,rootId:t,baseId:r.baseId||t,schemaPath:Qe.nil,errSchemaPath:r.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,Qe._)`""`,opts:this.opts,self:this},h;try{this._compilations.add(r),(0,pg.validateFunctionCode)(g),i.optimize(this.opts.code.optimize);let T=i.toString();h=`${i.scopeRefs(Wt.default.scope)}return ${T}`,this.opts.code.process&&(h=this.opts.code.process(h,r));let w=new Function(`${Wt.default.self}`,`${Wt.default.scope}`,h)(this,this.scope.get());if(this.scope.value(d,{ref:w}),w.errors=null,w.schema=r.schema,w.schemaEnv=r,r.$async&&(w.$async=!0),this.opts.code.source===!0&&(w.source={validateName:d,validateCode:T,scopeValues:i._values}),this.opts.unevaluated){let{props:b,items:$}=g;w.evaluated={props:b instanceof Qe.Name?void 0:b,items:$ instanceof Qe.Name?void 0:$,dynamicProps:b instanceof Qe.Name,dynamicItems:$ instanceof Qe.Name},w.source&&(w.source.evaluated=(0,Qe.stringify)(w.evaluated))}return r.validate=w,r}catch(T){throw delete r.validate,delete r.validateName,h&&this.logger.error("Error compiling schema, function code:",h),T}finally{this._compilations.delete(r)}}Ve.compileSchema=xp;function dg(r,e,t){var n;t=(0,Je.resolveUrl)(this.opts.uriResolver,e,t);let a=r.refs[t];if(a)return a;let s=lg.call(this,r,t);if(s===void 0){let i=(n=r.localRefs)===null||n===void 0?void 0:n[t],{schemaId:o}=this.opts;i&&(s=new dr({schema:i,schemaId:o,root:r,baseId:e}))}if(s!==void 0)return r.refs[t]=fg.call(this,s)}Ve.resolveRef=dg;function fg(r){return(0,Je.inlineRef)(r.schema,this.opts.inlineRefs)?r.schema:r.validate?r:xp.call(this,r)}function yl(r){for(let e of this._compilations)if(ug(e,r))return e}Ve.getCompilingSchema=yl;function ug(r,e){return r.schema===e.schema&&r.root===e.root&&r.baseId===e.baseId}function lg(r,e){let t;for(;typeof(t=this.refs[e])=="string";)e=t;return t||this.schemas[e]||to.call(this,r,e)}function to(r,e){let t=this.opts.uriResolver.parse(e),n=(0,Je._getFullPath)(this.opts.uriResolver,t),a=(0,Je.getFullPath)(this.opts.uriResolver,r.baseId,void 0);if(Object.keys(r.schema).length>0&&n===a)return Fp.call(this,t,r);let s=(0,Je.normalizeId)(n),i=this.refs[s]||this.schemas[s];if(typeof i=="string"){let o=to.call(this,r,i);return typeof(o==null?void 0:o.schema)!="object"?void 0:Fp.call(this,t,o)}if(typeof(i==null?void 0:i.schema)=="object"){if(i.validate||xp.call(this,i),s===(0,Je.normalizeId)(e)){let{schema:o}=i,{schemaId:d}=this.opts,g=o[d];return g&&(a=(0,Je.resolveUrl)(this.opts.uriResolver,a,g)),new dr({schema:o,schemaId:d,root:r,baseId:a})}return Fp.call(this,t,i)}}Ve.resolveSchema=to;var cg=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function Fp(r,{baseId:e,schema:t,root:n}){var a;if(((a=r.fragment)===null||a===void 0?void 0:a[0])!=="/")return;for(let o of r.fragment.slice(1).split("/")){if(typeof t=="boolean")return;let d=t[(0,Tl.unescapeFragment)(o)];if(d===void 0)return;t=d;let g=typeof t=="object"&&t[this.opts.schemaId];!cg.has(o)&&g&&(e=(0,Je.resolveUrl)(this.opts.uriResolver,e,g))}let s;if(typeof t!="boolean"&&t.$ref&&!(0,Tl.schemaHasRulesButRef)(t,this.RULES)){let o=(0,Je.resolveUrl)(this.opts.uriResolver,e,t.$ref);s=to.call(this,n,o)}let{schemaId:i}=this.opts;if(s=s||new dr({schema:t,schemaId:i,root:n,baseId:e}),s.schema!==s.root.schema)return s}});var bl=G((wI,mg)=>{mg.exports={$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON AnySchema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1}});var xl=G((no,Fl)=>{(function(r,e){typeof no=="object"&&typeof Fl!="undefined"?e(no):typeof define=="function"&&define.amd?define(["exports"],e):e(r.URI=r.URI||{})})(no,function(r){"use strict";function e(){for(var f=arguments.length,p=Array(f),_=0;_<f;_++)p[_]=arguments[_];if(p.length>1){p[0]=p[0].slice(0,-1);for(var F=p.length-1,x=1;x<F;++x)p[x]=p[x].slice(1,-1);return p[F]=p[F].slice(1),p.join("")}else return p[0]}function t(f){return"(?:"+f+")"}function n(f){return f===void 0?"undefined":f===null?"null":Object.prototype.toString.call(f).split(" ").pop().split("]").shift().toLowerCase()}function a(f){return f.toUpperCase()}function s(f){return f!=null?f instanceof Array?f:typeof f.length!="number"||f.split||f.setInterval||f.call?[f]:Array.prototype.slice.call(f):[]}function i(f,p){var _=f;if(p)for(var F in p)_[F]=p[F];return _}function o(f){var p="[A-Za-z]",_="[\\x0D]",F="[0-9]",x="[\\x22]",S=e(F,"[A-Fa-f]"),A="[\\x0A]",Y="[\\x20]",ne=t(t("%[EFef]"+S+"%"+S+S+"%"+S+S)+"|"+t("%[89A-Fa-f]"+S+"%"+S+S)+"|"+t("%"+S+S)),Te="[\\:\\/\\?\\#\\[\\]\\@]",J="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",me=e(Te,J),ye=f?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]",ce=f?"[\\uE000-\\uF8FF]":"[]",re=e(p,F,"[\\-\\.\\_\\~]",ye),he=t(p+e(p,F,"[\\+\\-\\.]")+"*"),se=t(t(ne+"|"+e(re,J,"[\\:]"))+"*"),vt=t(t("25[0-5]")+"|"+t("2[0-4]"+F)+"|"+t("1"+F+F)+"|"+t("[1-9]"+F)+"|"+F),Ee=t(t("25[0-5]")+"|"+t("2[0-4]"+F)+"|"+t("1"+F+F)+"|"+t("0?[1-9]"+F)+"|0?0?"+F),Ne=t(Ee+"\\."+Ee+"\\."+Ee+"\\."+Ee),de=t(S+"{1,4}"),Re=t(t(de+"\\:"+de)+"|"+Ne),Ue=t(t(de+"\\:")+"{6}"+Re),rt=t("\\:\\:"+t(de+"\\:")+"{5}"+Re),kt=t(t(de)+"?\\:\\:"+t(de+"\\:")+"{4}"+Re),ut=t(t(t(de+"\\:")+"{0,1}"+de)+"?\\:\\:"+t(de+"\\:")+"{3}"+Re),Or=t(t(t(de+"\\:")+"{0,2}"+de)+"?\\:\\:"+t(de+"\\:")+"{2}"+Re),Ei=t(t(t(de+"\\:")+"{0,3}"+de)+"?\\:\\:"+de+"\\:"+Re),Ri=t(t(t(de+"\\:")+"{0,4}"+de)+"?\\:\\:"+Re),Qt=t(t(t(de+"\\:")+"{0,5}"+de)+"?\\:\\:"+de),Jt=t(t(t(de+"\\:")+"{0,6}"+de)+"?\\:\\:"),lt=t([Ue,rt,kt,ut,Or,Ei,Ri,Qt,Jt].join("|")),Xt=t(t(re+"|"+ne)+"+"),jo=t(lt+"\\%25"+Xt),St=t(lt+t("\\%25|\\%(?!"+S+"{2})")+Xt),km=t("[vV]"+S+"+\\."+e(re,J,"[\\:]")+"+"),Sm=t("\\["+t(St+"|"+lt+"|"+km)+"\\]"),au=t(t(ne+"|"+e(re,J))+"*"),wr=t(Sm+"|"+Ne+"(?!"+au+")|"+au),Ir=t(F+"*"),su=t(t(se+"@")+"?"+wr+t("\\:"+Ir)+"?"),jr=t(ne+"|"+e(re,J,"[\\:\\@]")),Cm=t(jr+"*"),iu=t(jr+"+"),Pm=t(t(ne+"|"+e(re,J,"[\\@]"))+"+"),ct=t(t("\\/"+Cm)+"*"),Yt=t("\\/"+t(iu+ct)+"?"),vo=t(Pm+ct),Mi=t(iu+ct),Zt="(?!"+jr+")",gw=t(ct+"|"+Yt+"|"+vo+"|"+Mi+"|"+Zt),er=t(t(jr+"|"+e("[\\/\\?]",ce))+"*"),vr=t(t(jr+"|[\\/\\?]")+"*"),ou=t(t("\\/\\/"+su+ct)+"|"+Yt+"|"+Mi+"|"+Zt),Gm=t(he+"\\:"+ou+t("\\?"+er)+"?"+t("\\#"+vr)+"?"),Dm=t(t("\\/\\/"+su+ct)+"|"+Yt+"|"+vo+"|"+Zt),Em=t(Dm+t("\\?"+er)+"?"+t("\\#"+vr)+"?"),Tw=t(Gm+"|"+Em),yw=t(he+"\\:"+ou+t("\\?"+er)+"?"),bw="^("+he+")\\:"+t(t("\\/\\/("+t("("+se+")@")+"?("+wr+")"+t("\\:("+Ir+")")+"?)")+"?("+ct+"|"+Yt+"|"+Mi+"|"+Zt+")")+t("\\?("+er+")")+"?"+t("\\#("+vr+")")+"?$",Fw="^(){0}"+t(t("\\/\\/("+t("("+se+")@")+"?("+wr+")"+t("\\:("+Ir+")")+"?)")+"?("+ct+"|"+Yt+"|"+vo+"|"+Zt+")")+t("\\?("+er+")")+"?"+t("\\#("+vr+")")+"?$",xw="^("+he+")\\:"+t(t("\\/\\/("+t("("+se+")@")+"?("+wr+")"+t("\\:("+Ir+")")+"?)")+"?("+ct+"|"+Yt+"|"+Mi+"|"+Zt+")")+t("\\?("+er+")")+"?$",$w="^"+t("\\#("+vr+")")+"?$",Ow="^"+t("("+se+")@")+"?("+wr+")"+t("\\:("+Ir+")")+"?$";return{NOT_SCHEME:new RegExp(e("[^]",p,F,"[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(e("[^\\%\\:]",re,J),"g"),NOT_HOST:new RegExp(e("[^\\%\\[\\]\\:]",re,J),"g"),NOT_PATH:new RegExp(e("[^\\%\\/\\:\\@]",re,J),"g"),NOT_PATH_NOSCHEME:new RegExp(e("[^\\%\\/\\@]",re,J),"g"),NOT_QUERY:new RegExp(e("[^\\%]",re,J,"[\\:\\@\\/\\?]",ce),"g"),NOT_FRAGMENT:new RegExp(e("[^\\%]",re,J,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(e("[^]",re,J),"g"),UNRESERVED:new RegExp(re,"g"),OTHER_CHARS:new RegExp(e("[^\\%]",re,me),"g"),PCT_ENCODED:new RegExp(ne,"g"),IPV4ADDRESS:new RegExp("^("+Ne+")$"),IPV6ADDRESS:new RegExp("^\\[?("+lt+")"+t(t("\\%25|\\%(?!"+S+"{2})")+"("+Xt+")")+"?\\]?$")}}var d=o(!1),g=o(!0),h=function(){function f(p,_){var F=[],x=!0,S=!1,A=void 0;try{for(var Y=p[Symbol.iterator](),ne;!(x=(ne=Y.next()).done)&&(F.push(ne.value),!(_&&F.length===_));x=!0);}catch(Te){S=!0,A=Te}finally{try{!x&&Y.return&&Y.return()}finally{if(S)throw A}}return F}return function(p,_){if(Array.isArray(p))return p;if(Symbol.iterator in Object(p))return f(p,_);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),T=function(f){if(Array.isArray(f)){for(var p=0,_=Array(f.length);p<f.length;p++)_[p]=f[p];return _}else return Array.from(f)},O=2147483647,w=36,b=1,$=26,I=38,j=700,z=72,q=128,ae="-",W=/^xn--/,We=/[^\0-\x7E]/,ze=/[\x2E\u3002\uFF0E\uFF61]/g,Fr={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},It=w-b,$e=Math.floor,jt=String.fromCharCode;function Ye(f){throw new RangeError(Fr[f])}function Gi(f,p){for(var _=[],F=f.length;F--;)_[F]=p(f[F]);return _}function Di(f,p){var _=f.split("@"),F="";_.length>1&&(F=_[0]+"@",f=_[1]),f=f.replace(ze,".");var x=f.split("."),S=Gi(x,p).join(".");return F+S}function qf(f){for(var p=[],_=0,F=f.length;_<F;){var x=f.charCodeAt(_++);if(x>=55296&&x<=56319&&_<F){var S=f.charCodeAt(_++);(S&64512)==56320?p.push(((x&1023)<<10)+(S&1023)+65536):(p.push(x),_--)}else p.push(x)}return p}var im=function(p){return String.fromCodePoint.apply(String,T(p))},om=function(p){return p-48<10?p-22:p-65<26?p-65:p-97<26?p-97:w},Bf=function(p,_){return p+22+75*(p<26)-((_!=0)<<5)},L=function(p,_,F){var x=0;for(p=F?$e(p/j):p>>1,p+=$e(p/_);p>It*$>>1;x+=w)p=$e(p/It);return $e(x+(It+1)*p/(p+I))},Lf=function(p){var _=[],F=p.length,x=0,S=q,A=z,Y=p.lastIndexOf(ae);Y<0&&(Y=0);for(var ne=0;ne<Y;++ne)p.charCodeAt(ne)>=128&&Ye("not-basic"),_.push(p.charCodeAt(ne));for(var Te=Y>0?Y+1:0;Te<F;){for(var J=x,me=1,ye=w;;ye+=w){Te>=F&&Ye("invalid-input");var ce=om(p.charCodeAt(Te++));(ce>=w||ce>$e((O-x)/me))&&Ye("overflow"),x+=ce*me;var re=ye<=A?b:ye>=A+$?$:ye-A;if(ce<re)break;var he=w-re;me>$e(O/he)&&Ye("overflow"),me*=he}var se=_.length+1;A=L(x-J,se,J==0),$e(x/se)>O-S&&Ye("overflow"),S+=$e(x/se),x%=se,_.splice(x++,0,S)}return String.fromCodePoint.apply(String,_)},Vf=function(p){var _=[];p=qf(p);var F=p.length,x=q,S=0,A=z,Y=!0,ne=!1,Te=void 0;try{for(var J=p[Symbol.iterator](),me;!(Y=(me=J.next()).done);Y=!0){var ye=me.value;ye<128&&_.push(jt(ye))}}catch(St){ne=!0,Te=St}finally{try{!Y&&J.return&&J.return()}finally{if(ne)throw Te}}var ce=_.length,re=ce;for(ce&&_.push(ae);re<F;){var he=O,se=!0,vt=!1,Ee=void 0;try{for(var Ne=p[Symbol.iterator](),de;!(se=(de=Ne.next()).done);se=!0){var Re=de.value;Re>=x&&Re<he&&(he=Re)}}catch(St){vt=!0,Ee=St}finally{try{!se&&Ne.return&&Ne.return()}finally{if(vt)throw Ee}}var Ue=re+1;he-x>$e((O-S)/Ue)&&Ye("overflow"),S+=(he-x)*Ue,x=he;var rt=!0,kt=!1,ut=void 0;try{for(var Or=p[Symbol.iterator](),Ei;!(rt=(Ei=Or.next()).done);rt=!0){var Ri=Ei.value;if(Ri<x&&++S>O&&Ye("overflow"),Ri==x){for(var Qt=S,Jt=w;;Jt+=w){var lt=Jt<=A?b:Jt>=A+$?$:Jt-A;if(Qt<lt)break;var Xt=Qt-lt,jo=w-lt;_.push(jt(Bf(lt+Xt%jo,0))),Qt=$e(Xt/jo)}_.push(jt(Bf(Qt,0))),A=L(S,Ue,re==ce),S=0,++re}}}catch(St){kt=!0,ut=St}finally{try{!rt&&Or.return&&Or.return()}finally{if(kt)throw ut}}++S,++x}return _.join("")},pm=function(p){return Di(p,function(_){return W.test(_)?Lf(_.slice(4).toLowerCase()):_})},dm=function(p){return Di(p,function(_){return We.test(_)?"xn--"+Vf(_):_})},Vt={version:"2.1.0",ucs2:{decode:qf,encode:im},decode:Lf,encode:Vf,toASCII:dm,toUnicode:pm},Ae={};function Ze(f){var p=f.charCodeAt(0),_=void 0;return p<16?_="%0"+p.toString(16).toUpperCase():p<128?_="%"+p.toString(16).toUpperCase():p<2048?_="%"+(p>>6|192).toString(16).toUpperCase()+"%"+(p&63|128).toString(16).toUpperCase():_="%"+(p>>12|224).toString(16).toUpperCase()+"%"+(p>>6&63|128).toString(16).toUpperCase()+"%"+(p&63|128).toString(16).toUpperCase(),_}function Ht(f){for(var p="",_=0,F=f.length;_<F;){var x=parseInt(f.substr(_+1,2),16);if(x<128)p+=String.fromCharCode(x),_+=3;else if(x>=194&&x<224){if(F-_>=6){var S=parseInt(f.substr(_+4,2),16);p+=String.fromCharCode((x&31)<<6|S&63)}else p+=f.substr(_,6);_+=6}else if(x>=224){if(F-_>=9){var A=parseInt(f.substr(_+4,2),16),Y=parseInt(f.substr(_+7,2),16);p+=String.fromCharCode((x&15)<<12|(A&63)<<6|Y&63)}else p+=f.substr(_,9);_+=9}else p+=f.substr(_,3),_+=3}return p}function $o(f,p){function _(F){var x=Ht(F);return x.match(p.UNRESERVED)?x:F}return f.scheme&&(f.scheme=String(f.scheme).replace(p.PCT_ENCODED,_).toLowerCase().replace(p.NOT_SCHEME,"")),f.userinfo!==void 0&&(f.userinfo=String(f.userinfo).replace(p.PCT_ENCODED,_).replace(p.NOT_USERINFO,Ze).replace(p.PCT_ENCODED,a)),f.host!==void 0&&(f.host=String(f.host).replace(p.PCT_ENCODED,_).toLowerCase().replace(p.NOT_HOST,Ze).replace(p.PCT_ENCODED,a)),f.path!==void 0&&(f.path=String(f.path).replace(p.PCT_ENCODED,_).replace(f.scheme?p.NOT_PATH:p.NOT_PATH_NOSCHEME,Ze).replace(p.PCT_ENCODED,a)),f.query!==void 0&&(f.query=String(f.query).replace(p.PCT_ENCODED,_).replace(p.NOT_QUERY,Ze).replace(p.PCT_ENCODED,a)),f.fragment!==void 0&&(f.fragment=String(f.fragment).replace(p.PCT_ENCODED,_).replace(p.NOT_FRAGMENT,Ze).replace(p.PCT_ENCODED,a)),f}function Oo(f){return f.replace(/^0*(.*)/,"$1")||"0"}function wo(f,p){var _=f.match(p.IPV4ADDRESS)||[],F=h(_,2),x=F[1];return x?x.split(".").map(Oo).join("."):f}function Hf(f,p){var _=f.match(p.IPV6ADDRESS)||[],F=h(_,3),x=F[1],S=F[2];if(x){for(var A=x.toLowerCase().split("::").reverse(),Y=h(A,2),ne=Y[0],Te=Y[1],J=Te?Te.split(":").map(Oo):[],me=ne.split(":").map(Oo),ye=p.IPV4ADDRESS.test(me[me.length-1]),ce=ye?7:8,re=me.length-ce,he=Array(ce),se=0;se<ce;++se)he[se]=J[se]||me[re+se]||"";ye&&(he[ce-1]=wo(he[ce-1],p));var vt=he.reduce(function(Ue,rt,kt){if(!rt||rt==="0"){var ut=Ue[Ue.length-1];ut&&ut.index+ut.length===kt?ut.length++:Ue.push({index:kt,length:1})}return Ue},[]),Ee=vt.sort(function(Ue,rt){return rt.length-Ue.length})[0],Ne=void 0;if(Ee&&Ee.length>1){var de=he.slice(0,Ee.index),Re=he.slice(Ee.index+Ee.length);Ne=de.join(":")+"::"+Re.join(":")}else Ne=he.join(":");return S&&(Ne+="%"+S),Ne}else return f}var fm=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,E="".match(/(){0}/)[1]===void 0;function dt(f){var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},_={},F=p.iri!==!1?g:d;p.reference==="suffix"&&(f=(p.scheme?p.scheme+":":"")+"//"+f);var x=f.match(fm);if(x){E?(_.scheme=x[1],_.userinfo=x[3],_.host=x[4],_.port=parseInt(x[5],10),_.path=x[6]||"",_.query=x[7],_.fragment=x[8],isNaN(_.port)&&(_.port=x[5])):(_.scheme=x[1]||void 0,_.userinfo=f.indexOf("@")!==-1?x[3]:void 0,_.host=f.indexOf("//")!==-1?x[4]:void 0,_.port=parseInt(x[5],10),_.path=x[6]||"",_.query=f.indexOf("?")!==-1?x[7]:void 0,_.fragment=f.indexOf("#")!==-1?x[8]:void 0,isNaN(_.port)&&(_.port=f.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?x[4]:void 0)),_.host&&(_.host=Hf(wo(_.host,F),F)),_.scheme===void 0&&_.userinfo===void 0&&_.host===void 0&&_.port===void 0&&!_.path&&_.query===void 0?_.reference="same-document":_.scheme===void 0?_.reference="relative":_.fragment===void 0?_.reference="absolute":_.reference="uri",p.reference&&p.reference!=="suffix"&&p.reference!==_.reference&&(_.error=_.error||"URI is not a "+p.reference+" reference.");var S=Ae[(p.scheme||_.scheme||"").toLowerCase()];if(!p.unicodeSupport&&(!S||!S.unicodeSupport)){if(_.host&&(p.domainHost||S&&S.domainHost))try{_.host=Vt.toASCII(_.host.replace(F.PCT_ENCODED,Ht).toLowerCase())}catch(A){_.error=_.error||"Host's domain name can not be converted to ASCII via punycode: "+A}$o(_,d)}else $o(_,F);S&&S.parse&&S.parse(_,p)}else _.error=_.error||"URI can not be parsed.";return _}function um(f,p){var _=p.iri!==!1?g:d,F=[];return f.userinfo!==void 0&&(F.push(f.userinfo),F.push("@")),f.host!==void 0&&F.push(Hf(wo(String(f.host),_),_).replace(_.IPV6ADDRESS,function(x,S,A){return"["+S+(A?"%25"+A:"")+"]"})),(typeof f.port=="number"||typeof f.port=="string")&&(F.push(":"),F.push(String(f.port))),F.length?F.join(""):void 0}var zf=/^\.\.?\//,Kf=/^\/\.(\/|$)/,Qf=/^\/\.\.(\/|$)/,lm=/^\/?(?:.|\n)*?(?=\/|$)/;function zt(f){for(var p=[];f.length;)if(f.match(zf))f=f.replace(zf,"");else if(f.match(Kf))f=f.replace(Kf,"/");else if(f.match(Qf))f=f.replace(Qf,"/"),p.pop();else if(f==="."||f==="..")f="";else{var _=f.match(lm);if(_){var F=_[0];f=f.slice(F.length),p.push(F)}else throw new Error("Unexpected dot segment condition")}return p.join("")}function et(f){var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},_=p.iri?g:d,F=[],x=Ae[(p.scheme||f.scheme||"").toLowerCase()];if(x&&x.serialize&&x.serialize(f,p),f.host&&!_.IPV6ADDRESS.test(f.host)){if(p.domainHost||x&&x.domainHost)try{f.host=p.iri?Vt.toUnicode(f.host):Vt.toASCII(f.host.replace(_.PCT_ENCODED,Ht).toLowerCase())}catch(Y){f.error=f.error||"Host's domain name can not be converted to "+(p.iri?"Unicode":"ASCII")+" via punycode: "+Y}}$o(f,_),p.reference!=="suffix"&&f.scheme&&(F.push(f.scheme),F.push(":"));var S=um(f,p);if(S!==void 0&&(p.reference!=="suffix"&&F.push("//"),F.push(S),f.path&&f.path.charAt(0)!=="/"&&F.push("/")),f.path!==void 0){var A=f.path;!p.absolutePath&&(!x||!x.absolutePath)&&(A=zt(A)),S===void 0&&(A=A.replace(/^\/\//,"/%2F")),F.push(A)}return f.query!==void 0&&(F.push("?"),F.push(f.query)),f.fragment!==void 0&&(F.push("#"),F.push(f.fragment)),F.join("")}function Jf(f,p){var _=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},F=arguments[3],x={};return F||(f=dt(et(f,_),_),p=dt(et(p,_),_)),_=_||{},!_.tolerant&&p.scheme?(x.scheme=p.scheme,x.userinfo=p.userinfo,x.host=p.host,x.port=p.port,x.path=zt(p.path||""),x.query=p.query):(p.userinfo!==void 0||p.host!==void 0||p.port!==void 0?(x.userinfo=p.userinfo,x.host=p.host,x.port=p.port,x.path=zt(p.path||""),x.query=p.query):(p.path?(p.path.charAt(0)==="/"?x.path=zt(p.path):((f.userinfo!==void 0||f.host!==void 0||f.port!==void 0)&&!f.path?x.path="/"+p.path:f.path?x.path=f.path.slice(0,f.path.lastIndexOf("/")+1)+p.path:x.path=p.path,x.path=zt(x.path)),x.query=p.query):(x.path=f.path,p.query!==void 0?x.query=p.query:x.query=f.query),x.userinfo=f.userinfo,x.host=f.host,x.port=f.port),x.scheme=f.scheme),x.fragment=p.fragment,x}function cm(f,p,_){var F=i({scheme:"null"},_);return et(Jf(dt(f,F),dt(p,F),F,!0),F)}function mm(f,p){return typeof f=="string"?f=et(dt(f,p),p):n(f)==="object"&&(f=dt(et(f,p),p)),f}function hm(f,p,_){return typeof f=="string"?f=et(dt(f,_),_):n(f)==="object"&&(f=et(f,_)),typeof p=="string"?p=et(dt(p,_),_):n(p)==="object"&&(p=et(p,_)),f===p}function _m(f,p){return f&&f.toString().replace(!p||!p.iri?d.ESCAPE:g.ESCAPE,Ze)}function ft(f,p){return f&&f.toString().replace(!p||!p.iri?d.PCT_ENCODED:g.PCT_ENCODED,Ht)}var xr={scheme:"http",domainHost:!0,parse:function(p,_){return p.host||(p.error=p.error||"HTTP URIs must have a host."),p},serialize:function(p,_){var F=String(p.scheme).toLowerCase()==="https";return(p.port===(F?443:80)||p.port==="")&&(p.port=void 0),p.path||(p.path="/"),p}},Xf={scheme:"https",domainHost:xr.domainHost,parse:xr.parse,serialize:xr.serialize};function Yf(f){return typeof f.secure=="boolean"?f.secure:String(f.scheme).toLowerCase()==="wss"}var $r={scheme:"ws",domainHost:!0,parse:function(p,_){var F=p;return F.secure=Yf(F),F.resourceName=(F.path||"/")+(F.query?"?"+F.query:""),F.path=void 0,F.query=void 0,F},serialize:function(p,_){if((p.port===(Yf(p)?443:80)||p.port==="")&&(p.port=void 0),typeof p.secure=="boolean"&&(p.scheme=p.secure?"wss":"ws",p.secure=void 0),p.resourceName){var F=p.resourceName.split("?"),x=h(F,2),S=x[0],A=x[1];p.path=S&&S!=="/"?S:void 0,p.query=A,p.resourceName=void 0}return p.fragment=void 0,p}},k={scheme:"wss",domainHost:$r.domainHost,parse:$r.parse,serialize:$r.serialize},gm={},Tm=!0,Zf="[A-Za-z0-9\\-\\.\\_\\~"+(Tm?"\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF":"")+"]",tt="[0-9A-Fa-f]",ym=t(t("%[EFef]"+tt+"%"+tt+tt+"%"+tt+tt)+"|"+t("%[89A-Fa-f]"+tt+"%"+tt+tt)+"|"+t("%"+tt+tt)),bm="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]",Fm="[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",xm=e(Fm,'[\\"\\\\]'),$m="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]",Om=new RegExp(Zf,"g"),Kt=new RegExp(ym,"g"),wm=new RegExp(e("[^]",bm,"[\\.]",'[\\"]',xm),"g"),eu=new RegExp(e("[^]",Zf,$m),"g"),Im=eu;function Io(f){var p=Ht(f);return p.match(Om)?p:f}var tu={scheme:"mailto",parse:function(p,_){var F=p,x=F.to=F.path?F.path.split(","):[];if(F.path=void 0,F.query){for(var S=!1,A={},Y=F.query.split("&"),ne=0,Te=Y.length;ne<Te;++ne){var J=Y[ne].split("=");switch(J[0]){case"to":for(var me=J[1].split(","),ye=0,ce=me.length;ye<ce;++ye)x.push(me[ye]);break;case"subject":F.subject=ft(J[1],_);break;case"body":F.body=ft(J[1],_);break;default:S=!0,A[ft(J[0],_)]=ft(J[1],_);break}}S&&(F.headers=A)}F.query=void 0;for(var re=0,he=x.length;re<he;++re){var se=x[re].split("@");if(se[0]=ft(se[0]),_.unicodeSupport)se[1]=ft(se[1],_).toLowerCase();else try{se[1]=Vt.toASCII(ft(se[1],_).toLowerCase())}catch(vt){F.error=F.error||"Email address's domain name can not be converted to ASCII via punycode: "+vt}x[re]=se.join("@")}return F},serialize:function(p,_){var F=p,x=s(p.to);if(x){for(var S=0,A=x.length;S<A;++S){var Y=String(x[S]),ne=Y.lastIndexOf("@"),Te=Y.slice(0,ne).replace(Kt,Io).replace(Kt,a).replace(wm,Ze),J=Y.slice(ne+1);try{J=_.iri?Vt.toUnicode(J):Vt.toASCII(ft(J,_).toLowerCase())}catch(re){F.error=F.error||"Email address's domain name can not be converted to "+(_.iri?"Unicode":"ASCII")+" via punycode: "+re}x[S]=Te+"@"+J}F.path=x.join(",")}var me=p.headers=p.headers||{};p.subject&&(me.subject=p.subject),p.body&&(me.body=p.body);var ye=[];for(var ce in me)me[ce]!==gm[ce]&&ye.push(ce.replace(Kt,Io).replace(Kt,a).replace(eu,Ze)+"="+me[ce].replace(Kt,Io).replace(Kt,a).replace(Im,Ze));return ye.length&&(F.query=ye.join("&")),F}},jm=/^([^\:]+)\:(.*)/,ru={scheme:"urn",parse:function(p,_){var F=p.path&&p.path.match(jm),x=p;if(F){var S=_.scheme||x.scheme||"urn",A=F[1].toLowerCase(),Y=F[2],ne=S+":"+(_.nid||A),Te=Ae[ne];x.nid=A,x.nss=Y,x.path=void 0,Te&&(x=Te.parse(x,_))}else x.error=x.error||"URN can not be parsed.";return x},serialize:function(p,_){var F=_.scheme||p.scheme||"urn",x=p.nid,S=F+":"+(_.nid||x),A=Ae[S];A&&(p=A.serialize(p,_));var Y=p,ne=p.nss;return Y.path=(x||_.nid)+":"+ne,Y}},vm=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,nu={scheme:"urn:uuid",parse:function(p,_){var F=p;return F.uuid=F.nss,F.nss=void 0,!_.tolerant&&(!F.uuid||!F.uuid.match(vm))&&(F.error=F.error||"UUID is not valid."),F},serialize:function(p,_){var F=p;return F.nss=(p.uuid||"").toLowerCase(),F}};Ae[xr.scheme]=xr,Ae[Xf.scheme]=Xf,Ae[$r.scheme]=$r,Ae[k.scheme]=k,Ae[tu.scheme]=tu,Ae[ru.scheme]=ru,Ae[nu.scheme]=nu,r.SCHEMES=Ae,r.pctEncChar=Ze,r.pctDecChars=Ht,r.parse=dt,r.removeDotSegments=zt,r.serialize=et,r.resolveComponents=Jf,r.resolve=cm,r.normalize=mm,r.equal=hm,r.escapeComponent=_m,r.unescapeComponent=ft,Object.defineProperty(r,"__esModule",{value:!0})})});var Ol=G($p=>{"use strict";Object.defineProperty($p,"__esModule",{value:!0});var $l=xl();$l.code='require("ajv/dist/runtime/uri").default';$p.default=$l});var Pl=G(Fe=>{"use strict";Object.defineProperty(Fe,"__esModule",{value:!0});Fe.CodeGen=Fe.Name=Fe.nil=Fe.stringify=Fe.str=Fe._=Fe.KeywordCxt=void 0;var hg=Qr();Object.defineProperty(Fe,"KeywordCxt",{enumerable:!0,get:function(){return hg.KeywordCxt}});var fr=V();Object.defineProperty(Fe,"_",{enumerable:!0,get:function(){return fr._}});Object.defineProperty(Fe,"str",{enumerable:!0,get:function(){return fr.str}});Object.defineProperty(Fe,"stringify",{enumerable:!0,get:function(){return fr.stringify}});Object.defineProperty(Fe,"nil",{enumerable:!0,get:function(){return fr.nil}});Object.defineProperty(Fe,"Name",{enumerable:!0,get:function(){return fr.Name}});Object.defineProperty(Fe,"CodeGen",{enumerable:!0,get:function(){return fr.CodeGen}});var _g=eo(),kl=Jr(),gg=np(),Xr=ro(),Tg=V(),Yr=Hr(),ao=Vr(),wp=te(),wl=bl(),yg=Ol(),Sl=(r,e)=>new RegExp(r,e);Sl.code="new RegExp";var bg=["removeAdditional","useDefaults","coerceTypes"],Fg=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),xg={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."},$g={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},Il=200;function Og(r){var e,t,n,a,s,i,o,d,g,h,T,O,w,b,$,I,j,z,q,ae,W,We,ze,Fr,It;let $e=r.strict,jt=(e=r.code)===null||e===void 0?void 0:e.optimize,Ye=jt===!0||jt===void 0?1:jt||0,Gi=(n=(t=r.code)===null||t===void 0?void 0:t.regExp)!==null&&n!==void 0?n:Sl,Di=(a=r.uriResolver)!==null&&a!==void 0?a:yg.default;return{strictSchema:(i=(s=r.strictSchema)!==null&&s!==void 0?s:$e)!==null&&i!==void 0?i:!0,strictNumbers:(d=(o=r.strictNumbers)!==null&&o!==void 0?o:$e)!==null&&d!==void 0?d:!0,strictTypes:(h=(g=r.strictTypes)!==null&&g!==void 0?g:$e)!==null&&h!==void 0?h:"log",strictTuples:(O=(T=r.strictTuples)!==null&&T!==void 0?T:$e)!==null&&O!==void 0?O:"log",strictRequired:(b=(w=r.strictRequired)!==null&&w!==void 0?w:$e)!==null&&b!==void 0?b:!1,code:r.code?Z(P({},r.code),{optimize:Ye,regExp:Gi}):{optimize:Ye,regExp:Gi},loopRequired:($=r.loopRequired)!==null&&$!==void 0?$:Il,loopEnum:(I=r.loopEnum)!==null&&I!==void 0?I:Il,meta:(j=r.meta)!==null&&j!==void 0?j:!0,messages:(z=r.messages)!==null&&z!==void 0?z:!0,inlineRefs:(q=r.inlineRefs)!==null&&q!==void 0?q:!0,schemaId:(ae=r.schemaId)!==null&&ae!==void 0?ae:"$id",addUsedSchema:(W=r.addUsedSchema)!==null&&W!==void 0?W:!0,validateSchema:(We=r.validateSchema)!==null&&We!==void 0?We:!0,validateFormats:(ze=r.validateFormats)!==null&&ze!==void 0?ze:!0,unicodeRegExp:(Fr=r.unicodeRegExp)!==null&&Fr!==void 0?Fr:!0,int32range:(It=r.int32range)!==null&&It!==void 0?It:!0,uriResolver:Di}}var Zr=class{constructor(e={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts=P(P({},e),Og(e));let{es5:t,lines:n}=this.opts.code;this.scope=new Tg.ValueScope({scope:{},prefixes:Fg,es5:t,lines:n}),this.logger=Sg(e.logger);let a=e.validateFormats;e.validateFormats=!1,this.RULES=(0,gg.getRules)(),jl.call(this,xg,e,"NOT SUPPORTED"),jl.call(this,$g,e,"DEPRECATED","warn"),this._metaOpts=vg.call(this),e.formats&&Ig.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&jg.call(this,e.keywords),typeof e.meta=="object"&&this.addMetaSchema(e.meta),wg.call(this),e.validateFormats=a}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:e,meta:t,schemaId:n}=this.opts,a=wl;n==="id"&&(a=P({},wl),a.id=a.$id,delete a.$id),t&&e&&this.addMetaSchema(a,a[n],!1)}defaultMeta(){let{meta:e,schemaId:t}=this.opts;return this.opts.defaultMeta=typeof e=="object"?e[t]||e:void 0}validate(e,t){let n;if(typeof e=="string"){if(n=this.getSchema(e),!n)throw new Error(`no schema with key or ref "${e}"`)}else n=this.compile(e);let a=n(t);return"$async"in n||(this.errors=n.errors),a}compile(e,t){let n=this._addSchema(e,t);return n.validate||this._compileSchemaEnv(n)}compileAsync(e,t){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");let{loadSchema:n}=this.opts;return a.call(this,e,t);function a(h,T){return _e(this,null,function*(){yield s.call(this,h.$schema);let O=this._addSchema(h,T);return O.validate||i.call(this,O)})}function s(h){return _e(this,null,function*(){h&&!this.getSchema(h)&&(yield a.call(this,{$ref:h},!0))})}function i(h){return _e(this,null,function*(){try{return this._compileSchemaEnv(h)}catch(T){if(!(T instanceof kl.default))throw T;return o.call(this,T),yield d.call(this,T.missingSchema),i.call(this,h)}})}function o({missingSchema:h,missingRef:T}){if(this.refs[h])throw new Error(`AnySchema ${h} is loaded but ${T} cannot be resolved`)}function d(h){return _e(this,null,function*(){let T=yield g.call(this,h);this.refs[h]||(yield s.call(this,T.$schema)),this.refs[h]||this.addSchema(T,h,t)})}function g(h){return _e(this,null,function*(){let T=this._loading[h];if(T)return T;try{return yield this._loading[h]=n(h)}finally{delete this._loading[h]}})}}addSchema(e,t,n,a=this.opts.validateSchema){if(Array.isArray(e)){for(let i of e)this.addSchema(i,void 0,n,a);return this}let s;if(typeof e=="object"){let{schemaId:i}=this.opts;if(s=e[i],s!==void 0&&typeof s!="string")throw new Error(`schema ${i} must be string`)}return t=(0,Yr.normalizeId)(t||s),this._checkUnique(t),this.schemas[t]=this._addSchema(e,n,t,a,!0),this}addMetaSchema(e,t,n=this.opts.validateSchema){return this.addSchema(e,t,!0,n),this}validateSchema(e,t){if(typeof e=="boolean")return!0;let n;if(n=e.$schema,n!==void 0&&typeof n!="string")throw 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;let a=this.validate(n,e);if(!a&&t){let s="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(s);else throw new Error(s)}return a}getSchema(e){let t;for(;typeof(t=vl.call(this,e))=="string";)e=t;if(t===void 0){let{schemaId:n}=this.opts,a=new Xr.SchemaEnv({schema:{},schemaId:n});if(t=Xr.resolveSchema.call(this,a,e),!t)return;this.refs[e]=t}return t.validate||this._compileSchemaEnv(t)}removeSchema(e){if(e instanceof RegExp)return this._removeAllSchemas(this.schemas,e),this._removeAllSchemas(this.refs,e),this;switch(typeof e){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{let t=vl.call(this,e);return typeof t=="object"&&this._cache.delete(t.schema),delete this.schemas[e],delete this.refs[e],this}case"object":{let t=e;this._cache.delete(t);let n=e[this.opts.schemaId];return n&&(n=(0,Yr.normalizeId)(n),delete this.schemas[n],delete this.refs[n]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(e){for(let t of e)this.addKeyword(t);return this}addKeyword(e,t){let n;if(typeof e=="string")n=e,typeof t=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),t.keyword=n);else if(typeof e=="object"&&t===void 0){if(t=e,n=t.keyword,Array.isArray(n)&&!n.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(Pg.call(this,n,t),!t)return(0,wp.eachItem)(n,s=>Op.call(this,s)),this;Dg.call(this,t);let a=Z(P({},t),{type:(0,ao.getJSONTypes)(t.type),schemaType:(0,ao.getJSONTypes)(t.schemaType)});return(0,wp.eachItem)(n,a.type.length===0?s=>Op.call(this,s,a):s=>a.type.forEach(i=>Op.call(this,s,a,i))),this}getKeyword(e){let t=this.RULES.all[e];return typeof t=="object"?t.definition:!!t}removeKeyword(e){let{RULES:t}=this;delete t.keywords[e],delete t.all[e];for(let n of t.rules){let a=n.rules.findIndex(s=>s.keyword===e);a>=0&&n.rules.splice(a,1)}return this}addFormat(e,t){return typeof t=="string"&&(t=new RegExp(t)),this.formats[e]=t,this}errorsText(e=this.errors,{separator:t=", ",dataVar:n="data"}={}){return!e||e.length===0?"No errors":e.map(a=>`${n}${a.instancePath} ${a.message}`).reduce((a,s)=>a+t+s)}$dataMetaSchema(e,t){let n=this.RULES.all;e=JSON.parse(JSON.stringify(e));for(let a of t){let s=a.split("/").slice(1),i=e;for(let o of s)i=i[o];for(let o in n){let d=n[o];if(typeof d!="object")continue;let{$data:g}=d.definition,h=i[o];g&&h&&(i[o]=Cl(h))}}return e}_removeAllSchemas(e,t){for(let n in e){let a=e[n];(!t||t.test(n))&&(typeof a=="string"?delete e[n]:a&&!a.meta&&(this._cache.delete(a.schema),delete e[n]))}}_addSchema(e,t,n,a=this.opts.validateSchema,s=this.opts.addUsedSchema){let i,{schemaId:o}=this.opts;if(typeof e=="object")i=e[o];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 d=this._cache.get(e);if(d!==void 0)return d;n=(0,Yr.normalizeId)(i||n);let g=Yr.getSchemaRefs.call(this,e,n);return d=new Xr.SchemaEnv({schema:e,schemaId:o,meta:t,baseId:n,localRefs:g}),this._cache.set(d.schema,d),s&&!n.startsWith("#")&&(n&&this._checkUnique(n),this.refs[n]=d),a&&this.validateSchema(e,!0),d}_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):Xr.compileSchema.call(this,e),!e.validate)throw new Error("ajv implementation error");return e.validate}_compileMetaSchema(e){let t=this.opts;this.opts=this._metaOpts;try{Xr.compileSchema.call(this,e)}finally{this.opts=t}}};Zr.ValidationError=_g.default;Zr.MissingRefError=kl.default;Fe.default=Zr;function jl(r,e,t,n="error"){for(let a in r){let s=a;s in e&&this.logger[n](`${t}: option ${a}. ${r[s]}`)}}function vl(r){return r=(0,Yr.normalizeId)(r),this.schemas[r]||this.refs[r]}function wg(){let r=this.opts.schemas;if(r)if(Array.isArray(r))this.addSchema(r);else for(let e in r)this.addSchema(r[e],e)}function Ig(){for(let r in this.opts.formats){let e=this.opts.formats[r];e&&this.addFormat(r,e)}}function jg(r){if(Array.isArray(r)){this.addVocabulary(r);return}this.logger.warn("keywords option as map is deprecated, pass array");for(let e in r){let t=r[e];t.keyword||(t.keyword=e),this.addKeyword(t)}}function vg(){let r=P({},this.opts);for(let e of bg)delete r[e];return r}var kg={log(){},warn(){},error(){}};function Sg(r){if(r===!1)return kg;if(r===void 0)return console;if(r.log&&r.warn&&r.error)return r;throw new Error("logger must implement log, warn and error methods")}var Cg=/^[a-z_$][a-z0-9_$:-]*$/i;function Pg(r,e){let{RULES:t}=this;if((0,wp.eachItem)(r,n=>{if(t.keywords[n])throw new Error(`Keyword ${n} is already defined`);if(!Cg.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 Op(r,e,t){var n;let a=e==null?void 0:e.post;if(t&&a)throw new Error('keyword with "post" flag cannot have "type"');let{RULES:s}=this,i=a?s.post:s.rules.find(({type:d})=>d===t);if(i||(i={type:t,rules:[]},s.rules.push(i)),s.keywords[r]=!0,!e)return;let o={keyword:r,definition:Z(P({},e),{type:(0,ao.getJSONTypes)(e.type),schemaType:(0,ao.getJSONTypes)(e.schemaType)})};e.before?Gg.call(this,i,o,e.before):i.rules.push(o),s.all[r]=o,(n=e.implements)===null||n===void 0||n.forEach(d=>this.addKeyword(d))}function Gg(r,e,t){let n=r.rules.findIndex(a=>a.keyword===t);n>=0?r.rules.splice(n,0,e):(r.rules.push(e),this.logger.warn(`rule ${t} is not defined`))}function Dg(r){let{metaSchema:e}=r;e!==void 0&&(r.$data&&this.opts.$data&&(e=Cl(e)),r.validateSchema=this.compile(e,!0))}var Eg={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function Cl(r){return{anyOf:[r,Eg]}}});var Gl=G(Ip=>{"use strict";Object.defineProperty(Ip,"__esModule",{value:!0});var Rg={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};Ip.default=Rg});var Ml=G(At=>{"use strict";Object.defineProperty(At,"__esModule",{value:!0});At.callRef=At.getValidate=void 0;var Mg=Jr(),Dl=Le(),Ge=V(),ur=gt(),El=ro(),so=te(),Wg={keyword:"$ref",schemaType:"string",code(r){let{gen:e,schema:t,it:n}=r,{baseId:a,schemaEnv:s,validateName:i,opts:o,self:d}=n,{root:g}=s;if((t==="#"||t==="#/")&&a===g.baseId)return T();let h=El.resolveRef.call(d,g,a,t);if(h===void 0)throw new Mg.default(n.opts.uriResolver,a,t);if(h instanceof El.SchemaEnv)return O(h);return w(h);function T(){if(s===g)return io(r,i,s,s.$async);let b=e.scopeValue("root",{ref:g});return io(r,(0,Ge._)`${b}.validate`,g,g.$async)}function O(b){let $=Rl(r,b);io(r,$,b,b.$async)}function w(b){let $=e.scopeValue("schema",o.code.source===!0?{ref:b,code:(0,Ge.stringify)(b)}:{ref:b}),I=e.name("valid"),j=r.subschema({schema:b,dataTypes:[],schemaPath:Ge.nil,topSchemaRef:$,errSchemaPath:t},I);r.mergeEvaluated(j),r.ok(I)}}};function Rl(r,e){let{gen:t}=r;return e.validate?t.scopeValue("validate",{ref:e.validate}):(0,Ge._)`${t.scopeValue("wrapper",{ref:e})}.validate`}At.getValidate=Rl;function io(r,e,t,n){let{gen:a,it:s}=r,{allErrors:i,schemaEnv:o,opts:d}=s,g=d.passContext?ur.default.this:Ge.nil;n?h():T();function h(){if(!o.$async)throw new Error("async schema referenced by sync schema");let b=a.let("valid");a.try(()=>{a.code((0,Ge._)`await ${(0,Dl.callValidateCode)(r,e,g)}`),w(e),i||a.assign(b,!0)},$=>{a.if((0,Ge._)`!(${$} instanceof ${s.ValidationError})`,()=>a.throw($)),O($),i||a.assign(b,!1)}),r.ok(b)}function T(){r.result((0,Dl.callValidateCode)(r,e,g),()=>w(e),()=>O(e))}function O(b){let $=(0,Ge._)`${b}.errors`;a.assign(ur.default.vErrors,(0,Ge._)`${ur.default.vErrors} === null ? ${$} : ${ur.default.vErrors}.concat(${$})`),a.assign(ur.default.errors,(0,Ge._)`${ur.default.vErrors}.length`)}function w(b){var $;if(!s.opts.unevaluated)return;let I=($=t==null?void 0:t.validate)===null||$===void 0?void 0:$.evaluated;if(s.props!==!0)if(I&&!I.dynamicProps)I.props!==void 0&&(s.props=so.mergeEvaluated.props(a,I.props,s.props));else{let j=a.var("props",(0,Ge._)`${b}.evaluated.props`);s.props=so.mergeEvaluated.props(a,j,s.props,Ge.Name)}if(s.items!==!0)if(I&&!I.dynamicItems)I.items!==void 0&&(s.items=so.mergeEvaluated.items(a,I.items,s.items));else{let j=a.var("items",(0,Ge._)`${b}.evaluated.items`);s.items=so.mergeEvaluated.items(a,j,s.items,Ge.Name)}}}At.callRef=io;At.default=Wg});var Wl=G(jp=>{"use strict";Object.defineProperty(jp,"__esModule",{value:!0});var Ag=Gl(),Ng=Ml(),Ug=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",Ag.default,Ng.default];jp.default=Ug});var Al=G(vp=>{"use strict";Object.defineProperty(vp,"__esModule",{value:!0});var oo=V(),wt=oo.operators,po={maximum:{okStr:"<=",ok:wt.LTE,fail:wt.GT},minimum:{okStr:">=",ok:wt.GTE,fail:wt.LT},exclusiveMaximum:{okStr:"<",ok:wt.LT,fail:wt.GTE},exclusiveMinimum:{okStr:">",ok:wt.GT,fail:wt.LTE}},qg={message:({keyword:r,schemaCode:e})=>(0,oo.str)`must be ${po[r].okStr} ${e}`,params:({keyword:r,schemaCode:e})=>(0,oo._)`{comparison: ${po[r].okStr}, limit: ${e}}`},Bg={keyword:Object.keys(po),type:"number",schemaType:"number",$data:!0,error:qg,code(r){let{keyword:e,data:t,schemaCode:n}=r;r.fail$data((0,oo._)`${t} ${po[e].fail} ${n} || isNaN(${t})`)}};vp.default=Bg});var Nl=G(kp=>{"use strict";Object.defineProperty(kp,"__esModule",{value:!0});var en=V(),Lg={message:({schemaCode:r})=>(0,en.str)`must be multiple of ${r}`,params:({schemaCode:r})=>(0,en._)`{multipleOf: ${r}}`},Vg={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:Lg,code(r){let{gen:e,data:t,schemaCode:n,it:a}=r,s=a.opts.multipleOfPrecision,i=e.let("res"),o=s?(0,en._)`Math.abs(Math.round(${i}) - ${i}) > 1e-${s}`:(0,en._)`${i} !== parseInt(${i})`;r.fail$data((0,en._)`(${n} === 0 || (${i} = ${t}/${n}, ${o}))`)}};kp.default=Vg});var ql=G(Sp=>{"use strict";Object.defineProperty(Sp,"__esModule",{value:!0});function Ul(r){let e=r.length,t=0,n=0,a;for(;n<e;)t++,a=r.charCodeAt(n++),a>=55296&&a<=56319&&n<e&&(a=r.charCodeAt(n),(a&64512)===56320&&n++);return t}Sp.default=Ul;Ul.code='require("ajv/dist/runtime/ucs2length").default'});var Bl=G(Cp=>{"use strict";Object.defineProperty(Cp,"__esModule",{value:!0});var Nt=V(),Hg=te(),zg=ql(),Kg={message({keyword:r,schemaCode:e}){let t=r==="maxLength"?"more":"fewer";return(0,Nt.str)`must NOT have ${t} than ${e} characters`},params:({schemaCode:r})=>(0,Nt._)`{limit: ${r}}`},Qg={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:Kg,code(r){let{keyword:e,data:t,schemaCode:n,it:a}=r,s=e==="maxLength"?Nt.operators.GT:Nt.operators.LT,i=a.opts.unicode===!1?(0,Nt._)`${t}.length`:(0,Nt._)`${(0,Hg.useFunc)(r.gen,zg.default)}(${t})`;r.fail$data((0,Nt._)`${i} ${s} ${n}`)}};Cp.default=Qg});var Ll=G(Pp=>{"use strict";Object.defineProperty(Pp,"__esModule",{value:!0});var Jg=Le(),fo=V(),Xg={message:({schemaCode:r})=>(0,fo.str)`must match pattern "${r}"`,params:({schemaCode:r})=>(0,fo._)`{pattern: ${r}}`},Yg={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:Xg,code(r){let{data:e,$data:t,schema:n,schemaCode:a,it:s}=r,i=s.opts.unicodeRegExp?"u":"",o=t?(0,fo._)`(new RegExp(${a}, ${i}))`:(0,Jg.usePattern)(r,n);r.fail$data((0,fo._)`!${o}.test(${e})`)}};Pp.default=Yg});var Vl=G(Gp=>{"use strict";Object.defineProperty(Gp,"__esModule",{value:!0});var tn=V(),Zg={message({keyword:r,schemaCode:e}){let t=r==="maxProperties"?"more":"fewer";return(0,tn.str)`must NOT have ${t} than ${e} properties`},params:({schemaCode:r})=>(0,tn._)`{limit: ${r}}`},eT={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:Zg,code(r){let{keyword:e,data:t,schemaCode:n}=r,a=e==="maxProperties"?tn.operators.GT:tn.operators.LT;r.fail$data((0,tn._)`Object.keys(${t}).length ${a} ${n}`)}};Gp.default=eT});var Hl=G(Dp=>{"use strict";Object.defineProperty(Dp,"__esModule",{value:!0});var rn=Le(),nn=V(),tT=te(),rT={message:({params:{missingProperty:r}})=>(0,nn.str)`must have required property '${r}'`,params:({params:{missingProperty:r}})=>(0,nn._)`{missingProperty: ${r}}`},nT={keyword:"required",type:"object",schemaType:"array",$data:!0,error:rT,code(r){let{gen:e,schema:t,schemaCode:n,data:a,$data:s,it:i}=r,{opts:o}=i;if(!s&&t.length===0)return;let d=t.length>=o.loopRequired;if(i.allErrors?g():h(),o.strictRequired){let w=r.parentSchema.properties,{definedProperties:b}=r.it;for(let $ of t)if((w==null?void 0:w[$])===void 0&&!b.has($)){let I=i.schemaEnv.baseId+i.errSchemaPath,j=`required property "${$}" is not defined at "${I}" (strictRequired)`;(0,tT.checkStrictMode)(i,j,i.opts.strictRequired)}}function g(){if(d||s)r.block$data(nn.nil,T);else for(let w of t)(0,rn.checkReportMissingProp)(r,w)}function h(){let w=e.let("missing");if(d||s){let b=e.let("valid",!0);r.block$data(b,()=>O(w,b)),r.ok(b)}else e.if((0,rn.checkMissingProp)(r,t,w)),(0,rn.reportMissingProp)(r,w),e.else()}function T(){e.forOf("prop",n,w=>{r.setParams({missingProperty:w}),e.if((0,rn.noPropertyInData)(e,a,w,o.ownProperties),()=>r.error())})}function O(w,b){r.setParams({missingProperty:w}),e.forOf(w,n,()=>{e.assign(b,(0,rn.propertyInData)(e,a,w,o.ownProperties)),e.if((0,nn.not)(b),()=>{r.error(),e.break()})},nn.nil)}}};Dp.default=nT});var zl=G(Ep=>{"use strict";Object.defineProperty(Ep,"__esModule",{value:!0});var an=V(),aT={message({keyword:r,schemaCode:e}){let t=r==="maxItems"?"more":"fewer";return(0,an.str)`must NOT have ${t} than ${e} items`},params:({schemaCode:r})=>(0,an._)`{limit: ${r}}`},sT={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:aT,code(r){let{keyword:e,data:t,schemaCode:n}=r,a=e==="maxItems"?an.operators.GT:an.operators.LT;r.fail$data((0,an._)`${t}.length ${a} ${n}`)}};Ep.default=sT});var uo=G(Rp=>{"use strict";Object.defineProperty(Rp,"__esModule",{value:!0});var Kl=up();Kl.code='require("ajv/dist/runtime/equal").default';Rp.default=Kl});var Ql=G(Wp=>{"use strict";Object.defineProperty(Wp,"__esModule",{value:!0});var Mp=Vr(),xe=V(),iT=te(),oT=uo(),pT={message:({params:{i:r,j:e}})=>(0,xe.str)`must NOT have duplicate items (items ## ${e} and ${r} are identical)`,params:({params:{i:r,j:e}})=>(0,xe._)`{i: ${r}, j: ${e}}`},dT={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:pT,code(r){let{gen:e,data:t,$data:n,schema:a,parentSchema:s,schemaCode:i,it:o}=r;if(!n&&!a)return;let d=e.let("valid"),g=s.items?(0,Mp.getSchemaTypes)(s.items):[];r.block$data(d,h,(0,xe._)`${i} === false`),r.ok(d);function h(){let b=e.let("i",(0,xe._)`${t}.length`),$=e.let("j");r.setParams({i:b,j:$}),e.assign(d,!0),e.if((0,xe._)`${b} > 1`,()=>(T()?O:w)(b,$))}function T(){return g.length>0&&!g.some(b=>b==="object"||b==="array")}function O(b,$){let I=e.name("item"),j=(0,Mp.checkDataTypes)(g,I,o.opts.strictNumbers,Mp.DataType.Wrong),z=e.const("indices",(0,xe._)`{}`);e.for((0,xe._)`;${b}--;`,()=>{e.let(I,(0,xe._)`${t}[${b}]`),e.if(j,(0,xe._)`continue`),g.length>1&&e.if((0,xe._)`typeof ${I} == "string"`,(0,xe._)`${I} += "_"`),e.if((0,xe._)`typeof ${z}[${I}] == "number"`,()=>{e.assign($,(0,xe._)`${z}[${I}]`),r.error(),e.assign(d,!1).break()}).code((0,xe._)`${z}[${I}] = ${b}`)})}function w(b,$){let I=(0,iT.useFunc)(e,oT.default),j=e.name("outer");e.label(j).for((0,xe._)`;${b}--;`,()=>e.for((0,xe._)`${$} = ${b}; ${$}--;`,()=>e.if((0,xe._)`${I}(${t}[${b}], ${t}[${$}])`,()=>{r.error(),e.assign(d,!1).break(j)})))}}};Wp.default=dT});var Jl=G(Np=>{"use strict";Object.defineProperty(Np,"__esModule",{value:!0});var Ap=V(),fT=te(),uT=uo(),lT={message:"must be equal to constant",params:({schemaCode:r})=>(0,Ap._)`{allowedValue: ${r}}`},cT={keyword:"const",$data:!0,error:lT,code(r){let{gen:e,data:t,$data:n,schemaCode:a,schema:s}=r;n||s&&typeof s=="object"?r.fail$data((0,Ap._)`!${(0,fT.useFunc)(e,uT.default)}(${t}, ${a})`):r.fail((0,Ap._)`${s} !== ${t}`)}};Np.default=cT});var Xl=G(Up=>{"use strict";Object.defineProperty(Up,"__esModule",{value:!0});var sn=V(),mT=te(),hT=uo(),_T={message:"must be equal to one of the allowed values",params:({schemaCode:r})=>(0,sn._)`{allowedValues: ${r}}`},gT={keyword:"enum",schemaType:"array",$data:!0,error:_T,code(r){let{gen:e,data:t,$data:n,schema:a,schemaCode:s,it:i}=r;if(!n&&a.length===0)throw new Error("enum must have non-empty array");let o=a.length>=i.opts.loopEnum,d,g=()=>d!=null?d:d=(0,mT.useFunc)(e,hT.default),h;if(o||n)h=e.let("valid"),r.block$data(h,T);else{if(!Array.isArray(a))throw new Error("ajv implementation error");let w=e.const("vSchema",s);h=(0,sn.or)(...a.map((b,$)=>O(w,$)))}r.pass(h);function T(){e.assign(h,!1),e.forOf("v",s,w=>e.if((0,sn._)`${g()}(${t}, ${w})`,()=>e.assign(h,!0).break()))}function O(w,b){let $=a[b];return typeof $=="object"&&$!==null?(0,sn._)`${g()}(${t}, ${w}[${b}])`:(0,sn._)`${t} === ${$}`}}};Up.default=gT});var Yl=G(qp=>{"use strict";Object.defineProperty(qp,"__esModule",{value:!0});var TT=Al(),yT=Nl(),bT=Bl(),FT=Ll(),xT=Vl(),$T=Hl(),OT=zl(),wT=Ql(),IT=Jl(),jT=Xl(),vT=[TT.default,yT.default,bT.default,FT.default,xT.default,$T.default,OT.default,wT.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},IT.default,jT.default];qp.default=vT});var Lp=G(on=>{"use strict";Object.defineProperty(on,"__esModule",{value:!0});on.validateAdditionalItems=void 0;var Ut=V(),Bp=te(),kT={message:({params:{len:r}})=>(0,Ut.str)`must NOT have more than ${r} items`,params:({params:{len:r}})=>(0,Ut._)`{limit: ${r}}`},ST={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:kT,code(r){let{parentSchema:e,it:t}=r,{items:n}=e;if(!Array.isArray(n)){(0,Bp.checkStrictMode)(t,'"additionalItems" is ignored when "items" is not an array of schemas');return}Zl(r,n)}};function Zl(r,e){let{gen:t,schema:n,data:a,keyword:s,it:i}=r;i.items=!0;let o=t.const("len",(0,Ut._)`${a}.length`);if(n===!1)r.setParams({len:e.length}),r.pass((0,Ut._)`${o} <= ${e.length}`);else if(typeof n=="object"&&!(0,Bp.alwaysValidSchema)(i,n)){let g=t.var("valid",(0,Ut._)`${o} <= ${e.length}`);t.if((0,Ut.not)(g),()=>d(g)),r.ok(g)}function d(g){t.forRange("i",e.length,o,h=>{r.subschema({keyword:s,dataProp:h,dataPropType:Bp.Type.Num},g),i.allErrors||t.if((0,Ut.not)(g),()=>t.break())})}}on.validateAdditionalItems=Zl;on.default=ST});var Vp=G(pn=>{"use strict";Object.defineProperty(pn,"__esModule",{value:!0});pn.validateTuple=void 0;var ec=V(),lo=te(),CT=Le(),PT={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(r){let{schema:e,it:t}=r;if(Array.isArray(e))return tc(r,"additionalItems",e);t.items=!0,!(0,lo.alwaysValidSchema)(t,e)&&r.ok((0,CT.validateArray)(r))}};function tc(r,e,t=r.schema){let{gen:n,parentSchema:a,data:s,keyword:i,it:o}=r;h(a),o.opts.unevaluated&&t.length&&o.items!==!0&&(o.items=lo.mergeEvaluated.items(n,t.length,o.items));let d=n.name("valid"),g=n.const("len",(0,ec._)`${s}.length`);t.forEach((T,O)=>{(0,lo.alwaysValidSchema)(o,T)||(n.if((0,ec._)`${g} > ${O}`,()=>r.subschema({keyword:i,schemaProp:O,dataProp:O},d)),r.ok(d))});function h(T){let{opts:O,errSchemaPath:w}=o,b=t.length,$=b===T.minItems&&(b===T.maxItems||T[e]===!1);if(O.strictTuples&&!$){let I=`"${i}" is ${b}-tuple, but minItems or maxItems/${e} are not specified or different at path "${w}"`;(0,lo.checkStrictMode)(o,I,O.strictTuples)}}}pn.validateTuple=tc;pn.default=PT});var rc=G(Hp=>{"use strict";Object.defineProperty(Hp,"__esModule",{value:!0});var GT=Vp(),DT={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:r=>(0,GT.validateTuple)(r,"items")};Hp.default=DT});var ac=G(zp=>{"use strict";Object.defineProperty(zp,"__esModule",{value:!0});var nc=V(),ET=te(),RT=Le(),MT=Lp(),WT={message:({params:{len:r}})=>(0,nc.str)`must NOT have more than ${r} items`,params:({params:{len:r}})=>(0,nc._)`{limit: ${r}}`},AT={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:WT,code(r){let{schema:e,parentSchema:t,it:n}=r,{prefixItems:a}=t;n.items=!0,!(0,ET.alwaysValidSchema)(n,e)&&(a?(0,MT.validateAdditionalItems)(r,a):r.ok((0,RT.validateArray)(r)))}};zp.default=AT});var sc=G(Kp=>{"use strict";Object.defineProperty(Kp,"__esModule",{value:!0});var He=V(),co=te(),NT={message:({params:{min:r,max:e}})=>e===void 0?(0,He.str)`must contain at least ${r} valid item(s)`:(0,He.str)`must contain at least ${r} and no more than ${e} valid item(s)`,params:({params:{min:r,max:e}})=>e===void 0?(0,He._)`{minContains: ${r}}`:(0,He._)`{minContains: ${r}, maxContains: ${e}}`},UT={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:NT,code(r){let{gen:e,schema:t,parentSchema:n,data:a,it:s}=r,i,o,{minContains:d,maxContains:g}=n;s.opts.next?(i=d===void 0?1:d,o=g):i=1;let h=e.const("len",(0,He._)`${a}.length`);if(r.setParams({min:i,max:o}),o===void 0&&i===0){(0,co.checkStrictMode)(s,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(o!==void 0&&i>o){(0,co.checkStrictMode)(s,'"minContains" > "maxContains" is always invalid'),r.fail();return}if((0,co.alwaysValidSchema)(s,t)){let $=(0,He._)`${h} >= ${i}`;o!==void 0&&($=(0,He._)`${$} && ${h} <= ${o}`),r.pass($);return}s.items=!0;let T=e.name("valid");o===void 0&&i===1?w(T,()=>e.if(T,()=>e.break())):i===0?(e.let(T,!0),o!==void 0&&e.if((0,He._)`${a}.length > 0`,O)):(e.let(T,!1),O()),r.result(T,()=>r.reset());function O(){let $=e.name("_valid"),I=e.let("count",0);w($,()=>e.if($,()=>b(I)))}function w($,I){e.forRange("i",0,h,j=>{r.subschema({keyword:"contains",dataProp:j,dataPropType:co.Type.Num,compositeRule:!0},$),I()})}function b($){e.code((0,He._)`${$}++`),o===void 0?e.if((0,He._)`${$} >= ${i}`,()=>e.assign(T,!0).break()):(e.if((0,He._)`${$} > ${o}`,()=>e.assign(T,!1).break()),i===1?e.assign(T,!0):e.if((0,He._)`${$} >= ${i}`,()=>e.assign(T,!0)))}}};Kp.default=UT});var pc=G(pt=>{"use strict";Object.defineProperty(pt,"__esModule",{value:!0});pt.validateSchemaDeps=pt.validatePropertyDeps=pt.error=void 0;var Qp=V(),qT=te(),dn=Le();pt.error={message:({params:{property:r,depsCount:e,deps:t}})=>{let n=e===1?"property":"properties";return(0,Qp.str)`must have ${n} ${t} when property ${r} is present`},params:({params:{property:r,depsCount:e,deps:t,missingProperty:n}})=>(0,Qp._)`{property: ${r},
5
+ || ${i} === "boolean" || ${a} === null`).assign(o,(0,N._)`[${a}]`)}}}function e_({gen:r,parentData:e,parentDataProperty:t},n){r.if((0,N._)`${e} !== undefined`,()=>r.assign((0,N._)`${e}[${t}]`,n))}function sp(r,e,t,n=ir.Correct){let a=n===ir.Correct?N.operators.EQ:N.operators.NEQ,s;switch(r){case"null":return(0,N._)`${e} ${a} null`;case"array":s=(0,N._)`Array.isArray(${e})`;break;case"object":s=(0,N._)`${e} && typeof ${e} == "object" && !Array.isArray(${e})`;break;case"integer":s=i((0,N._)`!(${e} % 1) && !isNaN(${e})`);break;case"number":s=i();break;default:return(0,N._)`typeof ${e} ${a} ${r}`}return n===ir.Correct?s:(0,N.not)(s);function i(o=N.nil){return(0,N.and)((0,N._)`typeof ${e} == "number"`,o,t?(0,N._)`isFinite(${e})`:N.nil)}}Ie.checkDataType=sp;function ip(r,e,t,n){if(r.length===1)return sp(r[0],e,t,n);let a,s=(0,Nu.toHash)(r);if(s.array&&s.object){let i=(0,N._)`typeof ${e} != "object"`;a=s.null?i:(0,N._)`!${e} || ${i}`,delete s.null,delete s.array,delete s.object}else a=N.nil;s.number&&delete s.integer;for(let i in s)a=(0,N.and)(a,sp(i,e,t,n));return a}Ie.checkDataTypes=ip;var t_={message:({schema:r})=>`must be ${r}`,params:({schema:r,schemaValue:e})=>typeof r=="string"?(0,N._)`{type: ${r}}`:(0,N._)`{type: ${e}}`};function op(r){let e=r_(r);(0,Qh.reportError)(e,t_)}Ie.reportTypeError=op;function r_(r){let{gen:e,data:t,schema:n}=r,a=(0,Nu.schemaRefOrVal)(r,n,"type");return{gen:e,keyword:"type",data:t,schema:n.type,schemaCode:a,schemaValue:a,parentSchema:n,params:{},it:r}}});var Lu=G(Ji=>{"use strict";Object.defineProperty(Ji,"__esModule",{value:!0});Ji.assignDefaults=void 0;var or=V(),n_=te();function a_(r,e){let{properties:t,items:n}=r.schema;if(e==="object"&&t)for(let a in t)Bu(r,a,t[a].default);else e==="array"&&Array.isArray(n)&&n.forEach((a,s)=>Bu(r,s,a.default))}Ji.assignDefaults=a_;function Bu(r,e,t){let{gen:n,compositeRule:a,data:s,opts:i}=r;if(t===void 0)return;let o=(0,or._)`${s}${(0,or.getProperty)(e)}`;if(a){(0,n_.checkStrictMode)(r,`default is ignored for: ${o}`);return}let d=(0,or._)`${o} === undefined`;i.useDefaults==="empty"&&(d=(0,or._)`${d} || ${o} === null || ${o} === ""`),n.if(d,(0,or._)`${o} = ${(0,or.stringify)(t)}`)}});var Le=G(pe=>{"use strict";Object.defineProperty(pe,"__esModule",{value:!0});pe.validateUnion=pe.validateArray=pe.usePattern=pe.callValidateCode=pe.schemaProperties=pe.allSchemaProperties=pe.noPropertyInData=pe.propertyInData=pe.isOwnProperty=pe.hasPropFunc=pe.reportMissingProp=pe.checkMissingProp=pe.checkReportMissingProp=void 0;var ue=V(),pp=te(),Ft=gt(),s_=te();function i_(r,e){let{gen:t,data:n,it:a}=r;t.if(fp(t,n,e,a.opts.ownProperties),()=>{r.setParams({missingProperty:(0,ue._)`${e}`},!0),r.error()})}pe.checkReportMissingProp=i_;function o_({gen:r,data:e,it:{opts:t}},n,a){return(0,ue.or)(...n.map(s=>(0,ue.and)(fp(r,e,s,t.ownProperties),(0,ue._)`${a} = ${s}`)))}pe.checkMissingProp=o_;function p_(r,e){r.setParams({missingProperty:e},!0),r.error()}pe.reportMissingProp=p_;function Vu(r){return r.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,ue._)`Object.prototype.hasOwnProperty`})}pe.hasPropFunc=Vu;function dp(r,e,t){return(0,ue._)`${Vu(r)}.call(${e}, ${t})`}pe.isOwnProperty=dp;function d_(r,e,t,n){let a=(0,ue._)`${e}${(0,ue.getProperty)(t)} !== undefined`;return n?(0,ue._)`${a} && ${dp(r,e,t)}`:a}pe.propertyInData=d_;function fp(r,e,t,n){let a=(0,ue._)`${e}${(0,ue.getProperty)(t)} === undefined`;return n?(0,ue.or)(a,(0,ue.not)(dp(r,e,t))):a}pe.noPropertyInData=fp;function Hu(r){return r?Object.keys(r).filter(e=>e!=="__proto__"):[]}pe.allSchemaProperties=Hu;function f_(r,e){return Hu(e).filter(t=>!(0,pp.alwaysValidSchema)(r,e[t]))}pe.schemaProperties=f_;function u_({schemaCode:r,data:e,it:{gen:t,topSchemaRef:n,schemaPath:a,errorPath:s},it:i},o,d,g){let h=g?(0,ue._)`${r}, ${e}, ${n}${a}`:e,T=[[Ft.default.instancePath,(0,ue.strConcat)(Ft.default.instancePath,s)],[Ft.default.parentData,i.parentData],[Ft.default.parentDataProperty,i.parentDataProperty],[Ft.default.rootData,Ft.default.rootData]];i.opts.dynamicRef&&T.push([Ft.default.dynamicAnchors,Ft.default.dynamicAnchors]);let O=(0,ue._)`${h}, ${t.object(...T)}`;return d!==ue.nil?(0,ue._)`${o}.call(${d}, ${O})`:(0,ue._)`${o}(${O})`}pe.callValidateCode=u_;var l_=(0,ue._)`new RegExp`;function c_({gen:r,it:{opts:e}},t){let n=e.unicodeRegExp?"u":"",{regExp:a}=e.code,s=a(t,n);return r.scopeValue("pattern",{key:s.toString(),ref:s,code:(0,ue._)`${a.code==="new RegExp"?l_:(0,s_.useFunc)(r,a)}(${t}, ${n})`})}pe.usePattern=c_;function m_(r){let{gen:e,data:t,keyword:n,it:a}=r,s=e.name("valid");if(a.allErrors){let o=e.let("valid",!0);return i(()=>e.assign(o,!1)),o}return e.var(s,!0),i(()=>e.break()),s;function i(o){let d=e.const("len",(0,ue._)`${t}.length`);e.forRange("i",0,d,g=>{r.subschema({keyword:n,dataProp:g,dataPropType:pp.Type.Num},s),e.if((0,ue.not)(s),o)})}}pe.validateArray=m_;function h_(r){let{gen:e,schema:t,keyword:n,it:a}=r;if(!Array.isArray(t))throw new Error("ajv implementation error");if(t.some(d=>(0,pp.alwaysValidSchema)(a,d))&&!a.opts.unevaluated)return;let i=e.let("valid",!1),o=e.name("_valid");e.block(()=>t.forEach((d,g)=>{let h=r.subschema({keyword:n,schemaProp:g,compositeRule:!0},o);e.assign(i,(0,ue._)`${i} || ${o}`),r.mergeValidEvaluated(h,o)||e.if((0,ue.not)(i))})),r.result(i,()=>r.reset(),()=>r.error(!0))}pe.validateUnion=h_});var Qu=G(it=>{"use strict";Object.defineProperty(it,"__esModule",{value:!0});it.validateKeywordUsage=it.validSchemaType=it.funcKeywordCode=it.macroKeywordCode=void 0;var ke=V(),Rt=gt(),__=Le(),g_=Lr();function T_(r,e){let{gen:t,keyword:n,schema:a,parentSchema:s,it:i}=r,o=e.macro.call(i.self,a,s,i),d=Ku(t,n,o);i.opts.validateSchema!==!1&&i.self.validateSchema(o,!0);let g=t.name("valid");r.subschema({schema:o,schemaPath:ke.nil,errSchemaPath:`${i.errSchemaPath}/${n}`,topSchemaRef:d,compositeRule:!0},g),r.pass(g,()=>r.error(!0))}it.macroKeywordCode=T_;function y_(r,e){var t;let{gen:n,keyword:a,schema:s,parentSchema:i,$data:o,it:d}=r;F_(d,e);let g=!o&&e.compile?e.compile.call(d.self,s,i,d):e.validate,h=Ku(n,a,g),T=n.let("valid");r.block$data(T,O),r.ok((t=e.valid)!==null&&t!==void 0?t:T);function O(){if(e.errors===!1)$(),e.modifying&&zu(r),I(()=>r.error());else{let j=e.async?w():b();e.modifying&&zu(r),I(()=>b_(r,j))}}function w(){let j=n.let("ruleErrs",null);return n.try(()=>$((0,ke._)`await `),z=>n.assign(T,!1).if((0,ke._)`${z} instanceof ${d.ValidationError}`,()=>n.assign(j,(0,ke._)`${z}.errors`),()=>n.throw(z))),j}function b(){let j=(0,ke._)`${h}.errors`;return n.assign(j,null),$(ke.nil),j}function $(j=e.async?(0,ke._)`await `:ke.nil){let z=d.opts.passContext?Rt.default.this:Rt.default.self,q=!("compile"in e&&!o||e.schema===!1);n.assign(T,(0,ke._)`${j}${(0,__.callValidateCode)(r,h,z,q)}`,e.modifying)}function I(j){var z;n.if((0,ke.not)((z=e.valid)!==null&&z!==void 0?z:T),j)}}it.funcKeywordCode=y_;function zu(r){let{gen:e,data:t,it:n}=r;e.if(n.parentData,()=>e.assign(t,(0,ke._)`${n.parentData}[${n.parentDataProperty}]`))}function b_(r,e){let{gen:t}=r;t.if((0,ke._)`Array.isArray(${e})`,()=>{t.assign(Rt.default.vErrors,(0,ke._)`${Rt.default.vErrors} === null ? ${e} : ${Rt.default.vErrors}.concat(${e})`).assign(Rt.default.errors,(0,ke._)`${Rt.default.vErrors}.length`),(0,g_.extendErrors)(r)},()=>r.error())}function F_({schemaEnv:r},e){if(e.async&&!r.$async)throw new Error("async keyword in sync schema")}function Ku(r,e,t){if(t===void 0)throw new Error(`keyword "${e}" failed to compile`);return r.scopeValue("keyword",typeof t=="function"?{ref:t}:{ref:t,code:(0,ke.stringify)(t)})}function x_(r,e,t=!1){return!e.length||e.some(n=>n==="array"?Array.isArray(r):n==="object"?r&&typeof r=="object"&&!Array.isArray(r):typeof r==n||t&&typeof r=="undefined")}it.validSchemaType=x_;function $_({schema:r,opts:e,self:t,errSchemaPath:n},a,s){if(Array.isArray(a.keyword)?!a.keyword.includes(s):a.keyword!==s)throw new Error("ajv implementation error");let i=a.dependencies;if(i!=null&&i.some(o=>!Object.prototype.hasOwnProperty.call(r,o)))throw new Error(`parent schema must have dependencies of ${s}: ${i.join(",")}`);if(a.validateSchema&&!a.validateSchema(r[s])){let d=`keyword "${s}" value is invalid at path "${n}": `+t.errorsText(a.validateSchema.errors);if(e.validateSchema==="log")t.logger.error(d);else throw new Error(d)}}it.validateKeywordUsage=$_});var Xu=G(xt=>{"use strict";Object.defineProperty(xt,"__esModule",{value:!0});xt.extendSubschemaMode=xt.extendSubschemaData=xt.getSubschema=void 0;var ot=V(),Ju=te();function O_(r,{keyword:e,schemaProp:t,schema:n,schemaPath:a,errSchemaPath:s,topSchemaRef:i}){if(e!==void 0&&n!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(e!==void 0){let o=r.schema[e];return t===void 0?{schema:o,schemaPath:(0,ot._)`${r.schemaPath}${(0,ot.getProperty)(e)}`,errSchemaPath:`${r.errSchemaPath}/${e}`}:{schema:o[t],schemaPath:(0,ot._)`${r.schemaPath}${(0,ot.getProperty)(e)}${(0,ot.getProperty)(t)}`,errSchemaPath:`${r.errSchemaPath}/${e}/${(0,Ju.escapeFragment)(t)}`}}if(n!==void 0){if(a===void 0||s===void 0||i===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:n,schemaPath:a,topSchemaRef:i,errSchemaPath:s}}throw new Error('either "keyword" or "schema" must be passed')}xt.getSubschema=O_;function w_(r,e,{dataProp:t,dataPropType:n,data:a,dataTypes:s,propertyName:i}){if(a!==void 0&&t!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');let{gen:o}=e;if(t!==void 0){let{errorPath:g,dataPathArr:h,opts:T}=e,O=o.let("data",(0,ot._)`${e.data}${(0,ot.getProperty)(t)}`,!0);d(O),r.errorPath=(0,ot.str)`${g}${(0,Ju.getErrorPath)(t,n,T.jsPropertySyntax)}`,r.parentDataProperty=(0,ot._)`${t}`,r.dataPathArr=[...h,r.parentDataProperty]}if(a!==void 0){let g=a instanceof ot.Name?a:o.let("data",a,!0);d(g),i!==void 0&&(r.propertyName=i)}s&&(r.dataTypes=s);function d(g){r.data=g,r.dataLevel=e.dataLevel+1,r.dataTypes=[],e.definedProperties=new Set,r.parentData=e.data,r.dataNames=[...e.dataNames,g]}}xt.extendSubschemaData=w_;function I_(r,{jtdDiscriminator:e,jtdMetadata:t,compositeRule:n,createErrors:a,allErrors:s}){n!==void 0&&(r.compositeRule=n),a!==void 0&&(r.createErrors=a),s!==void 0&&(r.allErrors=s),r.jtdDiscriminator=e,r.jtdMetadata=t}xt.extendSubschemaMode=I_});var up=G((TI,Yu)=>{"use strict";Yu.exports=function r(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var n,a,s;if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(a=n;a--!==0;)if(!r(e[a],t[a]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();if(s=Object.keys(e),n=s.length,n!==Object.keys(t).length)return!1;for(a=n;a--!==0;)if(!Object.prototype.hasOwnProperty.call(t,s[a]))return!1;for(a=n;a--!==0;){var i=s[a];if(!r(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}});var el=G((yI,Zu)=>{"use strict";var $t=Zu.exports=function(r,e,t){typeof e=="function"&&(t=e,e={}),t=e.cb||t;var n=typeof t=="function"?t:t.pre||function(){},a=t.post||function(){};Xi(e,n,a,r,"",r)};$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 Xi(r,e,t,n,a,s,i,o,d,g){if(n&&typeof n=="object"&&!Array.isArray(n)){e(n,a,s,i,o,d,g);for(var h in n){var T=n[h];if(Array.isArray(T)){if(h in $t.arrayKeywords)for(var O=0;O<T.length;O++)Xi(r,e,t,T[O],a+"/"+h+"/"+O,s,a,h,n,O)}else if(h in $t.propsKeywords){if(T&&typeof T=="object")for(var w in T)Xi(r,e,t,T[w],a+"/"+h+"/"+j_(w),s,a,h,n,w)}else(h in $t.keywords||r.allKeys&&!(h in $t.skipKeywords))&&Xi(r,e,t,T,a+"/"+h,s,a,h,n)}t(n,a,s,i,o,d,g)}}function j_(r){return r.replace(/~/g,"~0").replace(/\//g,"~1")}});var Hr=G(Pe=>{"use strict";Object.defineProperty(Pe,"__esModule",{value:!0});Pe.getSchemaRefs=Pe.resolveUrl=Pe.normalizeId=Pe._getFullPath=Pe.getFullPath=Pe.inlineRef=void 0;var v_=te(),k_=up(),S_=el(),C_=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function P_(r,e=!0){return typeof r=="boolean"?!0:e===!0?!lp(r):e?tl(r)<=e:!1}Pe.inlineRef=P_;var G_=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function lp(r){for(let e in r){if(G_.has(e))return!0;let t=r[e];if(Array.isArray(t)&&t.some(lp)||typeof t=="object"&&lp(t))return!0}return!1}function tl(r){let e=0;for(let t in r){if(t==="$ref")return 1/0;if(e++,!C_.has(t)&&(typeof r[t]=="object"&&(0,v_.eachItem)(r[t],n=>e+=tl(n)),e===1/0))return 1/0}return e}function rl(r,e="",t){t!==!1&&(e=pr(e));let n=r.parse(e);return nl(r,n)}Pe.getFullPath=rl;function nl(r,e){return r.serialize(e).split("#")[0]+"#"}Pe._getFullPath=nl;var D_=/#\/?$/;function pr(r){return r?r.replace(D_,""):""}Pe.normalizeId=pr;function E_(r,e,t){return t=pr(t),r.resolve(e,t)}Pe.resolveUrl=E_;var M_=/^[a-z_][-a-z0-9._]*$/i;function R_(r,e){if(typeof r=="boolean")return{};let{schemaId:t,uriResolver:n}=this.opts,a=pr(r[t]||e),s={"":a},i=rl(n,a,!1),o={},d=new Set;return S_(r,{allKeys:!0},(T,O,w,b)=>{if(b===void 0)return;let $=i+O,I=s[b];typeof T[t]=="string"&&(I=j.call(this,T[t])),z.call(this,T.$anchor),z.call(this,T.$dynamicAnchor),s[O]=I;function j(q){let ae=this.opts.uriResolver.resolve;if(q=pr(I?ae(I,q):q),d.has(q))throw h(q);d.add(q);let W=this.refs[q];return typeof W=="string"&&(W=this.refs[W]),typeof W=="object"?g(T,W.schema,q):q!==pr($)&&(q[0]==="#"?(g(T,o[q],q),o[q]=T):this.refs[q]=$),q}function z(q){if(typeof q=="string"){if(!M_.test(q))throw new Error(`invalid anchor "${q}"`);j.call(this,`#${q}`)}}}),o;function g(T,O,w){if(O!==void 0&&!k_(T,O))throw h(w)}function h(T){return new Error(`reference "${T}" resolves to more than one schema`)}}Pe.getSchemaRefs=R_});var Qr=G(Ot=>{"use strict";Object.defineProperty(Ot,"__esModule",{value:!0});Ot.getData=Ot.KeywordCxt=Ot.validateFunctionCode=void 0;var pl=Ru(),al=Vr(),mp=ap(),Yi=Vr(),W_=Lu(),Kr=Qu(),cp=Xu(),D=V(),R=gt(),A_=Hr(),Tt=te(),zr=Lr();function N_(r){if(ul(r)&&(ll(r),fl(r))){B_(r);return}dl(r,()=>(0,pl.topBoolOrEmptySchema)(r))}Ot.validateFunctionCode=N_;function dl({gen:r,validateName:e,schema:t,schemaEnv:n,opts:a},s){a.code.es5?r.func(e,(0,D._)`${R.default.data}, ${R.default.valCxt}`,n.$async,()=>{r.code((0,D._)`"use strict"; ${sl(t,a)}`),q_(r,a),r.code(s)}):r.func(e,(0,D._)`${R.default.data}, ${U_(a)}`,n.$async,()=>r.code(sl(t,a)).code(s))}function U_(r){return(0,D._)`{${R.default.instancePath}="", ${R.default.parentData}, ${R.default.parentDataProperty}, ${R.default.rootData}=${R.default.data}${r.dynamicRef?(0,D._)`, ${R.default.dynamicAnchors}={}`:D.nil}}={}`}function q_(r,e){r.if(R.default.valCxt,()=>{r.var(R.default.instancePath,(0,D._)`${R.default.valCxt}.${R.default.instancePath}`),r.var(R.default.parentData,(0,D._)`${R.default.valCxt}.${R.default.parentData}`),r.var(R.default.parentDataProperty,(0,D._)`${R.default.valCxt}.${R.default.parentDataProperty}`),r.var(R.default.rootData,(0,D._)`${R.default.valCxt}.${R.default.rootData}`),e.dynamicRef&&r.var(R.default.dynamicAnchors,(0,D._)`${R.default.valCxt}.${R.default.dynamicAnchors}`)},()=>{r.var(R.default.instancePath,(0,D._)`""`),r.var(R.default.parentData,(0,D._)`undefined`),r.var(R.default.parentDataProperty,(0,D._)`undefined`),r.var(R.default.rootData,R.default.data),e.dynamicRef&&r.var(R.default.dynamicAnchors,(0,D._)`{}`)})}function B_(r){let{schema:e,opts:t,gen:n}=r;dl(r,()=>{t.$comment&&e.$comment&&ml(r),K_(r),n.let(R.default.vErrors,null),n.let(R.default.errors,0),t.unevaluated&&L_(r),cl(r),X_(r)})}function L_(r){let{gen:e,validateName:t}=r;r.evaluated=e.const("evaluated",(0,D._)`${t}.evaluated`),e.if((0,D._)`${r.evaluated}.dynamicProps`,()=>e.assign((0,D._)`${r.evaluated}.props`,(0,D._)`undefined`)),e.if((0,D._)`${r.evaluated}.dynamicItems`,()=>e.assign((0,D._)`${r.evaluated}.items`,(0,D._)`undefined`))}function sl(r,e){let t=typeof r=="object"&&r[e.schemaId];return t&&(e.code.source||e.code.process)?(0,D._)`/*# sourceURL=${t} */`:D.nil}function V_(r,e){if(ul(r)&&(ll(r),fl(r))){H_(r,e);return}(0,pl.boolOrEmptySchema)(r,e)}function fl({schema:r,self:e}){if(typeof r=="boolean")return!r;for(let t in r)if(e.RULES.all[t])return!0;return!1}function ul(r){return typeof r.schema!="boolean"}function H_(r,e){let{schema:t,gen:n,opts:a}=r;a.$comment&&t.$comment&&ml(r),Q_(r),J_(r);let s=n.const("_errs",R.default.errors);cl(r,s),n.var(e,(0,D._)`${s} === ${R.default.errors}`)}function ll(r){(0,Tt.checkUnknownRules)(r),z_(r)}function cl(r,e){if(r.opts.jtd)return il(r,[],!1,e);let t=(0,al.getSchemaTypes)(r.schema),n=(0,al.coerceAndCheckDataType)(r,t);il(r,t,!n,e)}function z_(r){let{schema:e,errSchemaPath:t,opts:n,self:a}=r;e.$ref&&n.ignoreKeywordsWithRef&&(0,Tt.schemaHasRulesButRef)(e,a.RULES)&&a.logger.warn(`$ref: keywords ignored in schema at path "${t}"`)}function K_(r){let{schema:e,opts:t}=r;e.default!==void 0&&t.useDefaults&&t.strictSchema&&(0,Tt.checkStrictMode)(r,"default is ignored in the schema root")}function Q_(r){let e=r.schema[r.opts.schemaId];e&&(r.baseId=(0,A_.resolveUrl)(r.opts.uriResolver,r.baseId,e))}function J_(r){if(r.schema.$async&&!r.schemaEnv.$async)throw new Error("async schema in sync schema")}function ml({gen:r,schemaEnv:e,schema:t,errSchemaPath:n,opts:a}){let s=t.$comment;if(a.$comment===!0)r.code((0,D._)`${R.default.self}.logger.log(${s})`);else if(typeof a.$comment=="function"){let i=(0,D.str)`${n}/$comment`,o=r.scopeValue("root",{ref:e.root});r.code((0,D._)`${R.default.self}.opts.$comment(${s}, ${i}, ${o}.schema)`)}}function X_(r){let{gen:e,schemaEnv:t,validateName:n,ValidationError:a,opts:s}=r;t.$async?e.if((0,D._)`${R.default.errors} === 0`,()=>e.return(R.default.data),()=>e.throw((0,D._)`new ${a}(${R.default.vErrors})`)):(e.assign((0,D._)`${n}.errors`,R.default.vErrors),s.unevaluated&&Y_(r),e.return((0,D._)`${R.default.errors} === 0`))}function Y_({gen:r,evaluated:e,props:t,items:n}){t instanceof D.Name&&r.assign((0,D._)`${e}.props`,t),n instanceof D.Name&&r.assign((0,D._)`${e}.items`,n)}function il(r,e,t,n){let{gen:a,schema:s,data:i,allErrors:o,opts:d,self:g}=r,{RULES:h}=g;if(s.$ref&&(d.ignoreKeywordsWithRef||!(0,Tt.schemaHasRulesButRef)(s,h))){a.block(()=>_l(r,"$ref",h.all.$ref.definition));return}d.jtd||Z_(r,e),a.block(()=>{for(let O of h.rules)T(O);T(h.post)});function T(O){(0,mp.shouldUseGroup)(s,O)&&(O.type?(a.if((0,Yi.checkDataType)(O.type,i,d.strictNumbers)),ol(r,O),e.length===1&&e[0]===O.type&&t&&(a.else(),(0,Yi.reportTypeError)(r)),a.endIf()):ol(r,O),o||a.if((0,D._)`${R.default.errors} === ${n||0}`))}}function ol(r,e){let{gen:t,schema:n,opts:{useDefaults:a}}=r;a&&(0,W_.assignDefaults)(r,e.type),t.block(()=>{for(let s of e.rules)(0,mp.shouldUseRule)(n,s)&&_l(r,s.keyword,s.definition,e.type)})}function Z_(r,e){r.schemaEnv.meta||!r.opts.strictTypes||(eg(r,e),r.opts.allowUnionTypes||tg(r,e),rg(r,r.dataTypes))}function eg(r,e){if(e.length){if(!r.dataTypes.length){r.dataTypes=e;return}e.forEach(t=>{hl(r.dataTypes,t)||hp(r,`type "${t}" not allowed by context "${r.dataTypes.join(",")}"`)}),ag(r,e)}}function tg(r,e){e.length>1&&!(e.length===2&&e.includes("null"))&&hp(r,"use allowUnionTypes to allow union type keyword")}function rg(r,e){let t=r.self.RULES.all;for(let n in t){let a=t[n];if(typeof a=="object"&&(0,mp.shouldUseRule)(r.schema,a)){let{type:s}=a.definition;s.length&&!s.some(i=>ng(e,i))&&hp(r,`missing type "${s.join(",")}" for keyword "${n}"`)}}}function ng(r,e){return r.includes(e)||e==="number"&&r.includes("integer")}function hl(r,e){return r.includes(e)||e==="integer"&&r.includes("number")}function ag(r,e){let t=[];for(let n of r.dataTypes)hl(e,n)?t.push(n):e.includes("integer")&&n==="number"&&t.push("integer");r.dataTypes=t}function hp(r,e){let t=r.schemaEnv.baseId+r.errSchemaPath;e+=` at "${t}" (strictTypes)`,(0,Tt.checkStrictMode)(r,e,r.opts.strictTypes)}var Zi=class{constructor(e,t,n){if((0,Kr.validateKeywordUsage)(e,t,n),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=n,this.data=e.data,this.schema=e.schema[n],this.$data=t.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,Tt.schemaRefOrVal)(e,this.schema,n,this.$data),this.schemaType=t.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=t,this.$data)this.schemaCode=e.gen.const("vSchema",gl(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,Kr.validSchemaType)(this.schema,t.schemaType,t.allowUndefined))throw new Error(`${n} value must be ${JSON.stringify(t.schemaType)}`);("code"in t?t.trackErrors:t.errors!==!1)&&(this.errsCount=e.gen.const("_errs",R.default.errors))}result(e,t,n){this.failResult((0,D.not)(e),t,n)}failResult(e,t,n){this.gen.if(e),n?n():this.error(),t?(this.gen.else(),t(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(e,t){this.failResult((0,D.not)(e),void 0,t)}fail(e){if(e===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(e),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);let{schemaCode:t}=this;this.fail((0,D._)`${t} !== undefined && (${(0,D.or)(this.invalid$data(),e)})`)}error(e,t,n){if(t){this.setParams(t),this._error(e,n),this.setParams({});return}this._error(e,n)}_error(e,t){(e?zr.reportExtraError:zr.reportError)(this,this.def.error,t)}$dataError(){(0,zr.reportError)(this,this.def.$dataError||zr.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,zr.resetErrorsCount)(this.gen,this.errsCount)}ok(e){this.allErrors||this.gen.if(e)}setParams(e,t){t?Object.assign(this.params,e):this.params=e}block$data(e,t,n=D.nil){this.gen.block(()=>{this.check$data(e,n),t()})}check$data(e=D.nil,t=D.nil){if(!this.$data)return;let{gen:n,schemaCode:a,schemaType:s,def:i}=this;n.if((0,D.or)((0,D._)`${a} === undefined`,t)),e!==D.nil&&n.assign(e,!0),(s.length||i.validateSchema)&&(n.elseIf(this.invalid$data()),this.$dataError(),e!==D.nil&&n.assign(e,!1)),n.else()}invalid$data(){let{gen:e,schemaCode:t,schemaType:n,def:a,it:s}=this;return(0,D.or)(i(),o());function i(){if(n.length){if(!(t instanceof D.Name))throw new Error("ajv implementation error");let d=Array.isArray(n)?n:[n];return(0,D._)`${(0,Yi.checkDataTypes)(d,t,s.opts.strictNumbers,Yi.DataType.Wrong)}`}return D.nil}function o(){if(a.validateSchema){let d=e.scopeValue("validate$data",{ref:a.validateSchema});return(0,D._)`!${d}(${t})`}return D.nil}}subschema(e,t){let n=(0,cp.getSubschema)(this.it,e);(0,cp.extendSubschemaData)(n,this.it,e),(0,cp.extendSubschemaMode)(n,e);let a=Z(P(P({},this.it),n),{items:void 0,props:void 0});return V_(a,t),a}mergeEvaluated(e,t){let{it:n,gen:a}=this;n.opts.unevaluated&&(n.props!==!0&&e.props!==void 0&&(n.props=Tt.mergeEvaluated.props(a,e.props,n.props,t)),n.items!==!0&&e.items!==void 0&&(n.items=Tt.mergeEvaluated.items(a,e.items,n.items,t)))}mergeValidEvaluated(e,t){let{it:n,gen:a}=this;if(n.opts.unevaluated&&(n.props!==!0||n.items!==!0))return a.if(t,()=>this.mergeEvaluated(e,D.Name)),!0}};Ot.KeywordCxt=Zi;function _l(r,e,t,n){let a=new Zi(r,t,e);"code"in t?t.code(a,n):a.$data&&t.validate?(0,Kr.funcKeywordCode)(a,t):"macro"in t?(0,Kr.macroKeywordCode)(a,t):(t.compile||t.validate)&&(0,Kr.funcKeywordCode)(a,t)}var sg=/^\/(?:[^~]|~0|~1)*$/,ig=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function gl(r,{dataLevel:e,dataNames:t,dataPathArr:n}){let a,s;if(r==="")return R.default.rootData;if(r[0]==="/"){if(!sg.test(r))throw new Error(`Invalid JSON-pointer: ${r}`);a=r,s=R.default.rootData}else{let g=ig.exec(r);if(!g)throw new Error(`Invalid JSON-pointer: ${r}`);let h=+g[1];if(a=g[2],a==="#"){if(h>=e)throw new Error(d("property/index",h));return n[e-h]}if(h>e)throw new Error(d("data",h));if(s=t[e-h],!a)return s}let i=s,o=a.split("/");for(let g of o)g&&(s=(0,D._)`${s}${(0,D.getProperty)((0,Tt.unescapeJsonPointer)(g))}`,i=(0,D._)`${i} && ${s}`);return i;function d(g,h){return`Cannot access ${g} ${h} levels up, current level is ${e}`}}Ot.getData=gl});var eo=G(gp=>{"use strict";Object.defineProperty(gp,"__esModule",{value:!0});var _p=class extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}};gp.default=_p});var Jr=G(bp=>{"use strict";Object.defineProperty(bp,"__esModule",{value:!0});var Tp=Hr(),yp=class extends Error{constructor(e,t,n,a){super(a||`can't resolve reference ${n} from id ${t}`),this.missingRef=(0,Tp.resolveUrl)(e,t,n),this.missingSchema=(0,Tp.normalizeId)((0,Tp.getFullPath)(e,this.missingRef))}};bp.default=yp});var ro=G(Ve=>{"use strict";Object.defineProperty(Ve,"__esModule",{value:!0});Ve.resolveSchema=Ve.getCompilingSchema=Ve.resolveRef=Ve.compileSchema=Ve.SchemaEnv=void 0;var Qe=V(),og=eo(),Wt=gt(),Je=Hr(),Tl=te(),pg=Qr(),dr=class{constructor(e){var t;this.refs={},this.dynamicAnchors={};let n;typeof e.schema=="object"&&(n=e.schema),this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=(t=e.baseId)!==null&&t!==void 0?t:(0,Je.normalizeId)(n==null?void 0:n[e.schemaId||"$id"]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=n==null?void 0:n.$async,this.refs={}}};Ve.SchemaEnv=dr;function xp(r){let e=yl.call(this,r);if(e)return e;let t=(0,Je.getFullPath)(this.opts.uriResolver,r.root.baseId),{es5:n,lines:a}=this.opts.code,{ownProperties:s}=this.opts,i=new Qe.CodeGen(this.scope,{es5:n,lines:a,ownProperties:s}),o;r.$async&&(o=i.scopeValue("Error",{ref:og.default,code:(0,Qe._)`require("ajv/dist/runtime/validation_error").default`}));let d=i.scopeName("validate");r.validateName=d;let g={gen:i,allErrors:this.opts.allErrors,data:Wt.default.data,parentData:Wt.default.parentData,parentDataProperty:Wt.default.parentDataProperty,dataNames:[Wt.default.data],dataPathArr:[Qe.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:i.scopeValue("schema",this.opts.code.source===!0?{ref:r.schema,code:(0,Qe.stringify)(r.schema)}:{ref:r.schema}),validateName:d,ValidationError:o,schema:r.schema,schemaEnv:r,rootId:t,baseId:r.baseId||t,schemaPath:Qe.nil,errSchemaPath:r.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,Qe._)`""`,opts:this.opts,self:this},h;try{this._compilations.add(r),(0,pg.validateFunctionCode)(g),i.optimize(this.opts.code.optimize);let T=i.toString();h=`${i.scopeRefs(Wt.default.scope)}return ${T}`,this.opts.code.process&&(h=this.opts.code.process(h,r));let w=new Function(`${Wt.default.self}`,`${Wt.default.scope}`,h)(this,this.scope.get());if(this.scope.value(d,{ref:w}),w.errors=null,w.schema=r.schema,w.schemaEnv=r,r.$async&&(w.$async=!0),this.opts.code.source===!0&&(w.source={validateName:d,validateCode:T,scopeValues:i._values}),this.opts.unevaluated){let{props:b,items:$}=g;w.evaluated={props:b instanceof Qe.Name?void 0:b,items:$ instanceof Qe.Name?void 0:$,dynamicProps:b instanceof Qe.Name,dynamicItems:$ instanceof Qe.Name},w.source&&(w.source.evaluated=(0,Qe.stringify)(w.evaluated))}return r.validate=w,r}catch(T){throw delete r.validate,delete r.validateName,h&&this.logger.error("Error compiling schema, function code:",h),T}finally{this._compilations.delete(r)}}Ve.compileSchema=xp;function dg(r,e,t){var n;t=(0,Je.resolveUrl)(this.opts.uriResolver,e,t);let a=r.refs[t];if(a)return a;let s=lg.call(this,r,t);if(s===void 0){let i=(n=r.localRefs)===null||n===void 0?void 0:n[t],{schemaId:o}=this.opts;i&&(s=new dr({schema:i,schemaId:o,root:r,baseId:e}))}if(s!==void 0)return r.refs[t]=fg.call(this,s)}Ve.resolveRef=dg;function fg(r){return(0,Je.inlineRef)(r.schema,this.opts.inlineRefs)?r.schema:r.validate?r:xp.call(this,r)}function yl(r){for(let e of this._compilations)if(ug(e,r))return e}Ve.getCompilingSchema=yl;function ug(r,e){return r.schema===e.schema&&r.root===e.root&&r.baseId===e.baseId}function lg(r,e){let t;for(;typeof(t=this.refs[e])=="string";)e=t;return t||this.schemas[e]||to.call(this,r,e)}function to(r,e){let t=this.opts.uriResolver.parse(e),n=(0,Je._getFullPath)(this.opts.uriResolver,t),a=(0,Je.getFullPath)(this.opts.uriResolver,r.baseId,void 0);if(Object.keys(r.schema).length>0&&n===a)return Fp.call(this,t,r);let s=(0,Je.normalizeId)(n),i=this.refs[s]||this.schemas[s];if(typeof i=="string"){let o=to.call(this,r,i);return typeof(o==null?void 0:o.schema)!="object"?void 0:Fp.call(this,t,o)}if(typeof(i==null?void 0:i.schema)=="object"){if(i.validate||xp.call(this,i),s===(0,Je.normalizeId)(e)){let{schema:o}=i,{schemaId:d}=this.opts,g=o[d];return g&&(a=(0,Je.resolveUrl)(this.opts.uriResolver,a,g)),new dr({schema:o,schemaId:d,root:r,baseId:a})}return Fp.call(this,t,i)}}Ve.resolveSchema=to;var cg=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function Fp(r,{baseId:e,schema:t,root:n}){var a;if(((a=r.fragment)===null||a===void 0?void 0:a[0])!=="/")return;for(let o of r.fragment.slice(1).split("/")){if(typeof t=="boolean")return;let d=t[(0,Tl.unescapeFragment)(o)];if(d===void 0)return;t=d;let g=typeof t=="object"&&t[this.opts.schemaId];!cg.has(o)&&g&&(e=(0,Je.resolveUrl)(this.opts.uriResolver,e,g))}let s;if(typeof t!="boolean"&&t.$ref&&!(0,Tl.schemaHasRulesButRef)(t,this.RULES)){let o=(0,Je.resolveUrl)(this.opts.uriResolver,e,t.$ref);s=to.call(this,n,o)}let{schemaId:i}=this.opts;if(s=s||new dr({schema:t,schemaId:i,root:n,baseId:e}),s.schema!==s.root.schema)return s}});var bl=G((II,mg)=>{mg.exports={$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON AnySchema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1}});var xl=G((no,Fl)=>{(function(r,e){typeof no=="object"&&typeof Fl!="undefined"?e(no):typeof define=="function"&&define.amd?define(["exports"],e):e(r.URI=r.URI||{})})(no,function(r){"use strict";function e(){for(var f=arguments.length,p=Array(f),_=0;_<f;_++)p[_]=arguments[_];if(p.length>1){p[0]=p[0].slice(0,-1);for(var F=p.length-1,x=1;x<F;++x)p[x]=p[x].slice(1,-1);return p[F]=p[F].slice(1),p.join("")}else return p[0]}function t(f){return"(?:"+f+")"}function n(f){return f===void 0?"undefined":f===null?"null":Object.prototype.toString.call(f).split(" ").pop().split("]").shift().toLowerCase()}function a(f){return f.toUpperCase()}function s(f){return f!=null?f instanceof Array?f:typeof f.length!="number"||f.split||f.setInterval||f.call?[f]:Array.prototype.slice.call(f):[]}function i(f,p){var _=f;if(p)for(var F in p)_[F]=p[F];return _}function o(f){var p="[A-Za-z]",_="[\\x0D]",F="[0-9]",x="[\\x22]",S=e(F,"[A-Fa-f]"),A="[\\x0A]",Y="[\\x20]",ne=t(t("%[EFef]"+S+"%"+S+S+"%"+S+S)+"|"+t("%[89A-Fa-f]"+S+"%"+S+S)+"|"+t("%"+S+S)),Te="[\\:\\/\\?\\#\\[\\]\\@]",J="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",me=e(Te,J),ye=f?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]",ce=f?"[\\uE000-\\uF8FF]":"[]",re=e(p,F,"[\\-\\.\\_\\~]",ye),he=t(p+e(p,F,"[\\+\\-\\.]")+"*"),se=t(t(ne+"|"+e(re,J,"[\\:]"))+"*"),vt=t(t("25[0-5]")+"|"+t("2[0-4]"+F)+"|"+t("1"+F+F)+"|"+t("[1-9]"+F)+"|"+F),Ee=t(t("25[0-5]")+"|"+t("2[0-4]"+F)+"|"+t("1"+F+F)+"|"+t("0?[1-9]"+F)+"|0?0?"+F),Ne=t(Ee+"\\."+Ee+"\\."+Ee+"\\."+Ee),de=t(S+"{1,4}"),Me=t(t(de+"\\:"+de)+"|"+Ne),Ue=t(t(de+"\\:")+"{6}"+Me),rt=t("\\:\\:"+t(de+"\\:")+"{5}"+Me),kt=t(t(de)+"?\\:\\:"+t(de+"\\:")+"{4}"+Me),ut=t(t(t(de+"\\:")+"{0,1}"+de)+"?\\:\\:"+t(de+"\\:")+"{3}"+Me),Or=t(t(t(de+"\\:")+"{0,2}"+de)+"?\\:\\:"+t(de+"\\:")+"{2}"+Me),Ei=t(t(t(de+"\\:")+"{0,3}"+de)+"?\\:\\:"+de+"\\:"+Me),Mi=t(t(t(de+"\\:")+"{0,4}"+de)+"?\\:\\:"+Me),Qt=t(t(t(de+"\\:")+"{0,5}"+de)+"?\\:\\:"+de),Jt=t(t(t(de+"\\:")+"{0,6}"+de)+"?\\:\\:"),lt=t([Ue,rt,kt,ut,Or,Ei,Mi,Qt,Jt].join("|")),Xt=t(t(re+"|"+ne)+"+"),jo=t(lt+"\\%25"+Xt),St=t(lt+t("\\%25|\\%(?!"+S+"{2})")+Xt),km=t("[vV]"+S+"+\\."+e(re,J,"[\\:]")+"+"),Sm=t("\\["+t(St+"|"+lt+"|"+km)+"\\]"),au=t(t(ne+"|"+e(re,J))+"*"),wr=t(Sm+"|"+Ne+"(?!"+au+")|"+au),Ir=t(F+"*"),su=t(t(se+"@")+"?"+wr+t("\\:"+Ir)+"?"),jr=t(ne+"|"+e(re,J,"[\\:\\@]")),Cm=t(jr+"*"),iu=t(jr+"+"),Pm=t(t(ne+"|"+e(re,J,"[\\@]"))+"+"),ct=t(t("\\/"+Cm)+"*"),Yt=t("\\/"+t(iu+ct)+"?"),vo=t(Pm+ct),Ri=t(iu+ct),Zt="(?!"+jr+")",Tw=t(ct+"|"+Yt+"|"+vo+"|"+Ri+"|"+Zt),er=t(t(jr+"|"+e("[\\/\\?]",ce))+"*"),vr=t(t(jr+"|[\\/\\?]")+"*"),ou=t(t("\\/\\/"+su+ct)+"|"+Yt+"|"+Ri+"|"+Zt),Gm=t(he+"\\:"+ou+t("\\?"+er)+"?"+t("\\#"+vr)+"?"),Dm=t(t("\\/\\/"+su+ct)+"|"+Yt+"|"+vo+"|"+Zt),Em=t(Dm+t("\\?"+er)+"?"+t("\\#"+vr)+"?"),yw=t(Gm+"|"+Em),bw=t(he+"\\:"+ou+t("\\?"+er)+"?"),Fw="^("+he+")\\:"+t(t("\\/\\/("+t("("+se+")@")+"?("+wr+")"+t("\\:("+Ir+")")+"?)")+"?("+ct+"|"+Yt+"|"+Ri+"|"+Zt+")")+t("\\?("+er+")")+"?"+t("\\#("+vr+")")+"?$",xw="^(){0}"+t(t("\\/\\/("+t("("+se+")@")+"?("+wr+")"+t("\\:("+Ir+")")+"?)")+"?("+ct+"|"+Yt+"|"+vo+"|"+Zt+")")+t("\\?("+er+")")+"?"+t("\\#("+vr+")")+"?$",$w="^("+he+")\\:"+t(t("\\/\\/("+t("("+se+")@")+"?("+wr+")"+t("\\:("+Ir+")")+"?)")+"?("+ct+"|"+Yt+"|"+Ri+"|"+Zt+")")+t("\\?("+er+")")+"?$",Ow="^"+t("\\#("+vr+")")+"?$",ww="^"+t("("+se+")@")+"?("+wr+")"+t("\\:("+Ir+")")+"?$";return{NOT_SCHEME:new RegExp(e("[^]",p,F,"[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(e("[^\\%\\:]",re,J),"g"),NOT_HOST:new RegExp(e("[^\\%\\[\\]\\:]",re,J),"g"),NOT_PATH:new RegExp(e("[^\\%\\/\\:\\@]",re,J),"g"),NOT_PATH_NOSCHEME:new RegExp(e("[^\\%\\/\\@]",re,J),"g"),NOT_QUERY:new RegExp(e("[^\\%]",re,J,"[\\:\\@\\/\\?]",ce),"g"),NOT_FRAGMENT:new RegExp(e("[^\\%]",re,J,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(e("[^]",re,J),"g"),UNRESERVED:new RegExp(re,"g"),OTHER_CHARS:new RegExp(e("[^\\%]",re,me),"g"),PCT_ENCODED:new RegExp(ne,"g"),IPV4ADDRESS:new RegExp("^("+Ne+")$"),IPV6ADDRESS:new RegExp("^\\[?("+lt+")"+t(t("\\%25|\\%(?!"+S+"{2})")+"("+Xt+")")+"?\\]?$")}}var d=o(!1),g=o(!0),h=function(){function f(p,_){var F=[],x=!0,S=!1,A=void 0;try{for(var Y=p[Symbol.iterator](),ne;!(x=(ne=Y.next()).done)&&(F.push(ne.value),!(_&&F.length===_));x=!0);}catch(Te){S=!0,A=Te}finally{try{!x&&Y.return&&Y.return()}finally{if(S)throw A}}return F}return function(p,_){if(Array.isArray(p))return p;if(Symbol.iterator in Object(p))return f(p,_);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),T=function(f){if(Array.isArray(f)){for(var p=0,_=Array(f.length);p<f.length;p++)_[p]=f[p];return _}else return Array.from(f)},O=2147483647,w=36,b=1,$=26,I=38,j=700,z=72,q=128,ae="-",W=/^xn--/,We=/[^\0-\x7E]/,ze=/[\x2E\u3002\uFF0E\uFF61]/g,Fr={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},It=w-b,$e=Math.floor,jt=String.fromCharCode;function Ye(f){throw new RangeError(Fr[f])}function Gi(f,p){for(var _=[],F=f.length;F--;)_[F]=p(f[F]);return _}function Di(f,p){var _=f.split("@"),F="";_.length>1&&(F=_[0]+"@",f=_[1]),f=f.replace(ze,".");var x=f.split("."),S=Gi(x,p).join(".");return F+S}function qf(f){for(var p=[],_=0,F=f.length;_<F;){var x=f.charCodeAt(_++);if(x>=55296&&x<=56319&&_<F){var S=f.charCodeAt(_++);(S&64512)==56320?p.push(((x&1023)<<10)+(S&1023)+65536):(p.push(x),_--)}else p.push(x)}return p}var im=function(p){return String.fromCodePoint.apply(String,T(p))},om=function(p){return p-48<10?p-22:p-65<26?p-65:p-97<26?p-97:w},Bf=function(p,_){return p+22+75*(p<26)-((_!=0)<<5)},L=function(p,_,F){var x=0;for(p=F?$e(p/j):p>>1,p+=$e(p/_);p>It*$>>1;x+=w)p=$e(p/It);return $e(x+(It+1)*p/(p+I))},Lf=function(p){var _=[],F=p.length,x=0,S=q,A=z,Y=p.lastIndexOf(ae);Y<0&&(Y=0);for(var ne=0;ne<Y;++ne)p.charCodeAt(ne)>=128&&Ye("not-basic"),_.push(p.charCodeAt(ne));for(var Te=Y>0?Y+1:0;Te<F;){for(var J=x,me=1,ye=w;;ye+=w){Te>=F&&Ye("invalid-input");var ce=om(p.charCodeAt(Te++));(ce>=w||ce>$e((O-x)/me))&&Ye("overflow"),x+=ce*me;var re=ye<=A?b:ye>=A+$?$:ye-A;if(ce<re)break;var he=w-re;me>$e(O/he)&&Ye("overflow"),me*=he}var se=_.length+1;A=L(x-J,se,J==0),$e(x/se)>O-S&&Ye("overflow"),S+=$e(x/se),x%=se,_.splice(x++,0,S)}return String.fromCodePoint.apply(String,_)},Vf=function(p){var _=[];p=qf(p);var F=p.length,x=q,S=0,A=z,Y=!0,ne=!1,Te=void 0;try{for(var J=p[Symbol.iterator](),me;!(Y=(me=J.next()).done);Y=!0){var ye=me.value;ye<128&&_.push(jt(ye))}}catch(St){ne=!0,Te=St}finally{try{!Y&&J.return&&J.return()}finally{if(ne)throw Te}}var ce=_.length,re=ce;for(ce&&_.push(ae);re<F;){var he=O,se=!0,vt=!1,Ee=void 0;try{for(var Ne=p[Symbol.iterator](),de;!(se=(de=Ne.next()).done);se=!0){var Me=de.value;Me>=x&&Me<he&&(he=Me)}}catch(St){vt=!0,Ee=St}finally{try{!se&&Ne.return&&Ne.return()}finally{if(vt)throw Ee}}var Ue=re+1;he-x>$e((O-S)/Ue)&&Ye("overflow"),S+=(he-x)*Ue,x=he;var rt=!0,kt=!1,ut=void 0;try{for(var Or=p[Symbol.iterator](),Ei;!(rt=(Ei=Or.next()).done);rt=!0){var Mi=Ei.value;if(Mi<x&&++S>O&&Ye("overflow"),Mi==x){for(var Qt=S,Jt=w;;Jt+=w){var lt=Jt<=A?b:Jt>=A+$?$:Jt-A;if(Qt<lt)break;var Xt=Qt-lt,jo=w-lt;_.push(jt(Bf(lt+Xt%jo,0))),Qt=$e(Xt/jo)}_.push(jt(Bf(Qt,0))),A=L(S,Ue,re==ce),S=0,++re}}}catch(St){kt=!0,ut=St}finally{try{!rt&&Or.return&&Or.return()}finally{if(kt)throw ut}}++S,++x}return _.join("")},pm=function(p){return Di(p,function(_){return W.test(_)?Lf(_.slice(4).toLowerCase()):_})},dm=function(p){return Di(p,function(_){return We.test(_)?"xn--"+Vf(_):_})},Vt={version:"2.1.0",ucs2:{decode:qf,encode:im},decode:Lf,encode:Vf,toASCII:dm,toUnicode:pm},Ae={};function Ze(f){var p=f.charCodeAt(0),_=void 0;return p<16?_="%0"+p.toString(16).toUpperCase():p<128?_="%"+p.toString(16).toUpperCase():p<2048?_="%"+(p>>6|192).toString(16).toUpperCase()+"%"+(p&63|128).toString(16).toUpperCase():_="%"+(p>>12|224).toString(16).toUpperCase()+"%"+(p>>6&63|128).toString(16).toUpperCase()+"%"+(p&63|128).toString(16).toUpperCase(),_}function Ht(f){for(var p="",_=0,F=f.length;_<F;){var x=parseInt(f.substr(_+1,2),16);if(x<128)p+=String.fromCharCode(x),_+=3;else if(x>=194&&x<224){if(F-_>=6){var S=parseInt(f.substr(_+4,2),16);p+=String.fromCharCode((x&31)<<6|S&63)}else p+=f.substr(_,6);_+=6}else if(x>=224){if(F-_>=9){var A=parseInt(f.substr(_+4,2),16),Y=parseInt(f.substr(_+7,2),16);p+=String.fromCharCode((x&15)<<12|(A&63)<<6|Y&63)}else p+=f.substr(_,9);_+=9}else p+=f.substr(_,3),_+=3}return p}function $o(f,p){function _(F){var x=Ht(F);return x.match(p.UNRESERVED)?x:F}return f.scheme&&(f.scheme=String(f.scheme).replace(p.PCT_ENCODED,_).toLowerCase().replace(p.NOT_SCHEME,"")),f.userinfo!==void 0&&(f.userinfo=String(f.userinfo).replace(p.PCT_ENCODED,_).replace(p.NOT_USERINFO,Ze).replace(p.PCT_ENCODED,a)),f.host!==void 0&&(f.host=String(f.host).replace(p.PCT_ENCODED,_).toLowerCase().replace(p.NOT_HOST,Ze).replace(p.PCT_ENCODED,a)),f.path!==void 0&&(f.path=String(f.path).replace(p.PCT_ENCODED,_).replace(f.scheme?p.NOT_PATH:p.NOT_PATH_NOSCHEME,Ze).replace(p.PCT_ENCODED,a)),f.query!==void 0&&(f.query=String(f.query).replace(p.PCT_ENCODED,_).replace(p.NOT_QUERY,Ze).replace(p.PCT_ENCODED,a)),f.fragment!==void 0&&(f.fragment=String(f.fragment).replace(p.PCT_ENCODED,_).replace(p.NOT_FRAGMENT,Ze).replace(p.PCT_ENCODED,a)),f}function Oo(f){return f.replace(/^0*(.*)/,"$1")||"0"}function wo(f,p){var _=f.match(p.IPV4ADDRESS)||[],F=h(_,2),x=F[1];return x?x.split(".").map(Oo).join("."):f}function Hf(f,p){var _=f.match(p.IPV6ADDRESS)||[],F=h(_,3),x=F[1],S=F[2];if(x){for(var A=x.toLowerCase().split("::").reverse(),Y=h(A,2),ne=Y[0],Te=Y[1],J=Te?Te.split(":").map(Oo):[],me=ne.split(":").map(Oo),ye=p.IPV4ADDRESS.test(me[me.length-1]),ce=ye?7:8,re=me.length-ce,he=Array(ce),se=0;se<ce;++se)he[se]=J[se]||me[re+se]||"";ye&&(he[ce-1]=wo(he[ce-1],p));var vt=he.reduce(function(Ue,rt,kt){if(!rt||rt==="0"){var ut=Ue[Ue.length-1];ut&&ut.index+ut.length===kt?ut.length++:Ue.push({index:kt,length:1})}return Ue},[]),Ee=vt.sort(function(Ue,rt){return rt.length-Ue.length})[0],Ne=void 0;if(Ee&&Ee.length>1){var de=he.slice(0,Ee.index),Me=he.slice(Ee.index+Ee.length);Ne=de.join(":")+"::"+Me.join(":")}else Ne=he.join(":");return S&&(Ne+="%"+S),Ne}else return f}var fm=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,E="".match(/(){0}/)[1]===void 0;function dt(f){var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},_={},F=p.iri!==!1?g:d;p.reference==="suffix"&&(f=(p.scheme?p.scheme+":":"")+"//"+f);var x=f.match(fm);if(x){E?(_.scheme=x[1],_.userinfo=x[3],_.host=x[4],_.port=parseInt(x[5],10),_.path=x[6]||"",_.query=x[7],_.fragment=x[8],isNaN(_.port)&&(_.port=x[5])):(_.scheme=x[1]||void 0,_.userinfo=f.indexOf("@")!==-1?x[3]:void 0,_.host=f.indexOf("//")!==-1?x[4]:void 0,_.port=parseInt(x[5],10),_.path=x[6]||"",_.query=f.indexOf("?")!==-1?x[7]:void 0,_.fragment=f.indexOf("#")!==-1?x[8]:void 0,isNaN(_.port)&&(_.port=f.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?x[4]:void 0)),_.host&&(_.host=Hf(wo(_.host,F),F)),_.scheme===void 0&&_.userinfo===void 0&&_.host===void 0&&_.port===void 0&&!_.path&&_.query===void 0?_.reference="same-document":_.scheme===void 0?_.reference="relative":_.fragment===void 0?_.reference="absolute":_.reference="uri",p.reference&&p.reference!=="suffix"&&p.reference!==_.reference&&(_.error=_.error||"URI is not a "+p.reference+" reference.");var S=Ae[(p.scheme||_.scheme||"").toLowerCase()];if(!p.unicodeSupport&&(!S||!S.unicodeSupport)){if(_.host&&(p.domainHost||S&&S.domainHost))try{_.host=Vt.toASCII(_.host.replace(F.PCT_ENCODED,Ht).toLowerCase())}catch(A){_.error=_.error||"Host's domain name can not be converted to ASCII via punycode: "+A}$o(_,d)}else $o(_,F);S&&S.parse&&S.parse(_,p)}else _.error=_.error||"URI can not be parsed.";return _}function um(f,p){var _=p.iri!==!1?g:d,F=[];return f.userinfo!==void 0&&(F.push(f.userinfo),F.push("@")),f.host!==void 0&&F.push(Hf(wo(String(f.host),_),_).replace(_.IPV6ADDRESS,function(x,S,A){return"["+S+(A?"%25"+A:"")+"]"})),(typeof f.port=="number"||typeof f.port=="string")&&(F.push(":"),F.push(String(f.port))),F.length?F.join(""):void 0}var zf=/^\.\.?\//,Kf=/^\/\.(\/|$)/,Qf=/^\/\.\.(\/|$)/,lm=/^\/?(?:.|\n)*?(?=\/|$)/;function zt(f){for(var p=[];f.length;)if(f.match(zf))f=f.replace(zf,"");else if(f.match(Kf))f=f.replace(Kf,"/");else if(f.match(Qf))f=f.replace(Qf,"/"),p.pop();else if(f==="."||f==="..")f="";else{var _=f.match(lm);if(_){var F=_[0];f=f.slice(F.length),p.push(F)}else throw new Error("Unexpected dot segment condition")}return p.join("")}function et(f){var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},_=p.iri?g:d,F=[],x=Ae[(p.scheme||f.scheme||"").toLowerCase()];if(x&&x.serialize&&x.serialize(f,p),f.host&&!_.IPV6ADDRESS.test(f.host)){if(p.domainHost||x&&x.domainHost)try{f.host=p.iri?Vt.toUnicode(f.host):Vt.toASCII(f.host.replace(_.PCT_ENCODED,Ht).toLowerCase())}catch(Y){f.error=f.error||"Host's domain name can not be converted to "+(p.iri?"Unicode":"ASCII")+" via punycode: "+Y}}$o(f,_),p.reference!=="suffix"&&f.scheme&&(F.push(f.scheme),F.push(":"));var S=um(f,p);if(S!==void 0&&(p.reference!=="suffix"&&F.push("//"),F.push(S),f.path&&f.path.charAt(0)!=="/"&&F.push("/")),f.path!==void 0){var A=f.path;!p.absolutePath&&(!x||!x.absolutePath)&&(A=zt(A)),S===void 0&&(A=A.replace(/^\/\//,"/%2F")),F.push(A)}return f.query!==void 0&&(F.push("?"),F.push(f.query)),f.fragment!==void 0&&(F.push("#"),F.push(f.fragment)),F.join("")}function Jf(f,p){var _=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},F=arguments[3],x={};return F||(f=dt(et(f,_),_),p=dt(et(p,_),_)),_=_||{},!_.tolerant&&p.scheme?(x.scheme=p.scheme,x.userinfo=p.userinfo,x.host=p.host,x.port=p.port,x.path=zt(p.path||""),x.query=p.query):(p.userinfo!==void 0||p.host!==void 0||p.port!==void 0?(x.userinfo=p.userinfo,x.host=p.host,x.port=p.port,x.path=zt(p.path||""),x.query=p.query):(p.path?(p.path.charAt(0)==="/"?x.path=zt(p.path):((f.userinfo!==void 0||f.host!==void 0||f.port!==void 0)&&!f.path?x.path="/"+p.path:f.path?x.path=f.path.slice(0,f.path.lastIndexOf("/")+1)+p.path:x.path=p.path,x.path=zt(x.path)),x.query=p.query):(x.path=f.path,p.query!==void 0?x.query=p.query:x.query=f.query),x.userinfo=f.userinfo,x.host=f.host,x.port=f.port),x.scheme=f.scheme),x.fragment=p.fragment,x}function cm(f,p,_){var F=i({scheme:"null"},_);return et(Jf(dt(f,F),dt(p,F),F,!0),F)}function mm(f,p){return typeof f=="string"?f=et(dt(f,p),p):n(f)==="object"&&(f=dt(et(f,p),p)),f}function hm(f,p,_){return typeof f=="string"?f=et(dt(f,_),_):n(f)==="object"&&(f=et(f,_)),typeof p=="string"?p=et(dt(p,_),_):n(p)==="object"&&(p=et(p,_)),f===p}function _m(f,p){return f&&f.toString().replace(!p||!p.iri?d.ESCAPE:g.ESCAPE,Ze)}function ft(f,p){return f&&f.toString().replace(!p||!p.iri?d.PCT_ENCODED:g.PCT_ENCODED,Ht)}var xr={scheme:"http",domainHost:!0,parse:function(p,_){return p.host||(p.error=p.error||"HTTP URIs must have a host."),p},serialize:function(p,_){var F=String(p.scheme).toLowerCase()==="https";return(p.port===(F?443:80)||p.port==="")&&(p.port=void 0),p.path||(p.path="/"),p}},Xf={scheme:"https",domainHost:xr.domainHost,parse:xr.parse,serialize:xr.serialize};function Yf(f){return typeof f.secure=="boolean"?f.secure:String(f.scheme).toLowerCase()==="wss"}var $r={scheme:"ws",domainHost:!0,parse:function(p,_){var F=p;return F.secure=Yf(F),F.resourceName=(F.path||"/")+(F.query?"?"+F.query:""),F.path=void 0,F.query=void 0,F},serialize:function(p,_){if((p.port===(Yf(p)?443:80)||p.port==="")&&(p.port=void 0),typeof p.secure=="boolean"&&(p.scheme=p.secure?"wss":"ws",p.secure=void 0),p.resourceName){var F=p.resourceName.split("?"),x=h(F,2),S=x[0],A=x[1];p.path=S&&S!=="/"?S:void 0,p.query=A,p.resourceName=void 0}return p.fragment=void 0,p}},k={scheme:"wss",domainHost:$r.domainHost,parse:$r.parse,serialize:$r.serialize},gm={},Tm=!0,Zf="[A-Za-z0-9\\-\\.\\_\\~"+(Tm?"\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF":"")+"]",tt="[0-9A-Fa-f]",ym=t(t("%[EFef]"+tt+"%"+tt+tt+"%"+tt+tt)+"|"+t("%[89A-Fa-f]"+tt+"%"+tt+tt)+"|"+t("%"+tt+tt)),bm="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]",Fm="[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",xm=e(Fm,'[\\"\\\\]'),$m="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]",Om=new RegExp(Zf,"g"),Kt=new RegExp(ym,"g"),wm=new RegExp(e("[^]",bm,"[\\.]",'[\\"]',xm),"g"),eu=new RegExp(e("[^]",Zf,$m),"g"),Im=eu;function Io(f){var p=Ht(f);return p.match(Om)?p:f}var tu={scheme:"mailto",parse:function(p,_){var F=p,x=F.to=F.path?F.path.split(","):[];if(F.path=void 0,F.query){for(var S=!1,A={},Y=F.query.split("&"),ne=0,Te=Y.length;ne<Te;++ne){var J=Y[ne].split("=");switch(J[0]){case"to":for(var me=J[1].split(","),ye=0,ce=me.length;ye<ce;++ye)x.push(me[ye]);break;case"subject":F.subject=ft(J[1],_);break;case"body":F.body=ft(J[1],_);break;default:S=!0,A[ft(J[0],_)]=ft(J[1],_);break}}S&&(F.headers=A)}F.query=void 0;for(var re=0,he=x.length;re<he;++re){var se=x[re].split("@");if(se[0]=ft(se[0]),_.unicodeSupport)se[1]=ft(se[1],_).toLowerCase();else try{se[1]=Vt.toASCII(ft(se[1],_).toLowerCase())}catch(vt){F.error=F.error||"Email address's domain name can not be converted to ASCII via punycode: "+vt}x[re]=se.join("@")}return F},serialize:function(p,_){var F=p,x=s(p.to);if(x){for(var S=0,A=x.length;S<A;++S){var Y=String(x[S]),ne=Y.lastIndexOf("@"),Te=Y.slice(0,ne).replace(Kt,Io).replace(Kt,a).replace(wm,Ze),J=Y.slice(ne+1);try{J=_.iri?Vt.toUnicode(J):Vt.toASCII(ft(J,_).toLowerCase())}catch(re){F.error=F.error||"Email address's domain name can not be converted to "+(_.iri?"Unicode":"ASCII")+" via punycode: "+re}x[S]=Te+"@"+J}F.path=x.join(",")}var me=p.headers=p.headers||{};p.subject&&(me.subject=p.subject),p.body&&(me.body=p.body);var ye=[];for(var ce in me)me[ce]!==gm[ce]&&ye.push(ce.replace(Kt,Io).replace(Kt,a).replace(eu,Ze)+"="+me[ce].replace(Kt,Io).replace(Kt,a).replace(Im,Ze));return ye.length&&(F.query=ye.join("&")),F}},jm=/^([^\:]+)\:(.*)/,ru={scheme:"urn",parse:function(p,_){var F=p.path&&p.path.match(jm),x=p;if(F){var S=_.scheme||x.scheme||"urn",A=F[1].toLowerCase(),Y=F[2],ne=S+":"+(_.nid||A),Te=Ae[ne];x.nid=A,x.nss=Y,x.path=void 0,Te&&(x=Te.parse(x,_))}else x.error=x.error||"URN can not be parsed.";return x},serialize:function(p,_){var F=_.scheme||p.scheme||"urn",x=p.nid,S=F+":"+(_.nid||x),A=Ae[S];A&&(p=A.serialize(p,_));var Y=p,ne=p.nss;return Y.path=(x||_.nid)+":"+ne,Y}},vm=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,nu={scheme:"urn:uuid",parse:function(p,_){var F=p;return F.uuid=F.nss,F.nss=void 0,!_.tolerant&&(!F.uuid||!F.uuid.match(vm))&&(F.error=F.error||"UUID is not valid."),F},serialize:function(p,_){var F=p;return F.nss=(p.uuid||"").toLowerCase(),F}};Ae[xr.scheme]=xr,Ae[Xf.scheme]=Xf,Ae[$r.scheme]=$r,Ae[k.scheme]=k,Ae[tu.scheme]=tu,Ae[ru.scheme]=ru,Ae[nu.scheme]=nu,r.SCHEMES=Ae,r.pctEncChar=Ze,r.pctDecChars=Ht,r.parse=dt,r.removeDotSegments=zt,r.serialize=et,r.resolveComponents=Jf,r.resolve=cm,r.normalize=mm,r.equal=hm,r.escapeComponent=_m,r.unescapeComponent=ft,Object.defineProperty(r,"__esModule",{value:!0})})});var Ol=G($p=>{"use strict";Object.defineProperty($p,"__esModule",{value:!0});var $l=xl();$l.code='require("ajv/dist/runtime/uri").default';$p.default=$l});var Pl=G(Fe=>{"use strict";Object.defineProperty(Fe,"__esModule",{value:!0});Fe.CodeGen=Fe.Name=Fe.nil=Fe.stringify=Fe.str=Fe._=Fe.KeywordCxt=void 0;var hg=Qr();Object.defineProperty(Fe,"KeywordCxt",{enumerable:!0,get:function(){return hg.KeywordCxt}});var fr=V();Object.defineProperty(Fe,"_",{enumerable:!0,get:function(){return fr._}});Object.defineProperty(Fe,"str",{enumerable:!0,get:function(){return fr.str}});Object.defineProperty(Fe,"stringify",{enumerable:!0,get:function(){return fr.stringify}});Object.defineProperty(Fe,"nil",{enumerable:!0,get:function(){return fr.nil}});Object.defineProperty(Fe,"Name",{enumerable:!0,get:function(){return fr.Name}});Object.defineProperty(Fe,"CodeGen",{enumerable:!0,get:function(){return fr.CodeGen}});var _g=eo(),kl=Jr(),gg=np(),Xr=ro(),Tg=V(),Yr=Hr(),ao=Vr(),wp=te(),wl=bl(),yg=Ol(),Sl=(r,e)=>new RegExp(r,e);Sl.code="new RegExp";var bg=["removeAdditional","useDefaults","coerceTypes"],Fg=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),xg={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."},$g={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},Il=200;function Og(r){var e,t,n,a,s,i,o,d,g,h,T,O,w,b,$,I,j,z,q,ae,W,We,ze,Fr,It;let $e=r.strict,jt=(e=r.code)===null||e===void 0?void 0:e.optimize,Ye=jt===!0||jt===void 0?1:jt||0,Gi=(n=(t=r.code)===null||t===void 0?void 0:t.regExp)!==null&&n!==void 0?n:Sl,Di=(a=r.uriResolver)!==null&&a!==void 0?a:yg.default;return{strictSchema:(i=(s=r.strictSchema)!==null&&s!==void 0?s:$e)!==null&&i!==void 0?i:!0,strictNumbers:(d=(o=r.strictNumbers)!==null&&o!==void 0?o:$e)!==null&&d!==void 0?d:!0,strictTypes:(h=(g=r.strictTypes)!==null&&g!==void 0?g:$e)!==null&&h!==void 0?h:"log",strictTuples:(O=(T=r.strictTuples)!==null&&T!==void 0?T:$e)!==null&&O!==void 0?O:"log",strictRequired:(b=(w=r.strictRequired)!==null&&w!==void 0?w:$e)!==null&&b!==void 0?b:!1,code:r.code?Z(P({},r.code),{optimize:Ye,regExp:Gi}):{optimize:Ye,regExp:Gi},loopRequired:($=r.loopRequired)!==null&&$!==void 0?$:Il,loopEnum:(I=r.loopEnum)!==null&&I!==void 0?I:Il,meta:(j=r.meta)!==null&&j!==void 0?j:!0,messages:(z=r.messages)!==null&&z!==void 0?z:!0,inlineRefs:(q=r.inlineRefs)!==null&&q!==void 0?q:!0,schemaId:(ae=r.schemaId)!==null&&ae!==void 0?ae:"$id",addUsedSchema:(W=r.addUsedSchema)!==null&&W!==void 0?W:!0,validateSchema:(We=r.validateSchema)!==null&&We!==void 0?We:!0,validateFormats:(ze=r.validateFormats)!==null&&ze!==void 0?ze:!0,unicodeRegExp:(Fr=r.unicodeRegExp)!==null&&Fr!==void 0?Fr:!0,int32range:(It=r.int32range)!==null&&It!==void 0?It:!0,uriResolver:Di}}var Zr=class{constructor(e={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts=P(P({},e),Og(e));let{es5:t,lines:n}=this.opts.code;this.scope=new Tg.ValueScope({scope:{},prefixes:Fg,es5:t,lines:n}),this.logger=Sg(e.logger);let a=e.validateFormats;e.validateFormats=!1,this.RULES=(0,gg.getRules)(),jl.call(this,xg,e,"NOT SUPPORTED"),jl.call(this,$g,e,"DEPRECATED","warn"),this._metaOpts=vg.call(this),e.formats&&Ig.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&jg.call(this,e.keywords),typeof e.meta=="object"&&this.addMetaSchema(e.meta),wg.call(this),e.validateFormats=a}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:e,meta:t,schemaId:n}=this.opts,a=wl;n==="id"&&(a=P({},wl),a.id=a.$id,delete a.$id),t&&e&&this.addMetaSchema(a,a[n],!1)}defaultMeta(){let{meta:e,schemaId:t}=this.opts;return this.opts.defaultMeta=typeof e=="object"?e[t]||e:void 0}validate(e,t){let n;if(typeof e=="string"){if(n=this.getSchema(e),!n)throw new Error(`no schema with key or ref "${e}"`)}else n=this.compile(e);let a=n(t);return"$async"in n||(this.errors=n.errors),a}compile(e,t){let n=this._addSchema(e,t);return n.validate||this._compileSchemaEnv(n)}compileAsync(e,t){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");let{loadSchema:n}=this.opts;return a.call(this,e,t);function a(h,T){return _e(this,null,function*(){yield s.call(this,h.$schema);let O=this._addSchema(h,T);return O.validate||i.call(this,O)})}function s(h){return _e(this,null,function*(){h&&!this.getSchema(h)&&(yield a.call(this,{$ref:h},!0))})}function i(h){return _e(this,null,function*(){try{return this._compileSchemaEnv(h)}catch(T){if(!(T instanceof kl.default))throw T;return o.call(this,T),yield d.call(this,T.missingSchema),i.call(this,h)}})}function o({missingSchema:h,missingRef:T}){if(this.refs[h])throw new Error(`AnySchema ${h} is loaded but ${T} cannot be resolved`)}function d(h){return _e(this,null,function*(){let T=yield g.call(this,h);this.refs[h]||(yield s.call(this,T.$schema)),this.refs[h]||this.addSchema(T,h,t)})}function g(h){return _e(this,null,function*(){let T=this._loading[h];if(T)return T;try{return yield this._loading[h]=n(h)}finally{delete this._loading[h]}})}}addSchema(e,t,n,a=this.opts.validateSchema){if(Array.isArray(e)){for(let i of e)this.addSchema(i,void 0,n,a);return this}let s;if(typeof e=="object"){let{schemaId:i}=this.opts;if(s=e[i],s!==void 0&&typeof s!="string")throw new Error(`schema ${i} must be string`)}return t=(0,Yr.normalizeId)(t||s),this._checkUnique(t),this.schemas[t]=this._addSchema(e,n,t,a,!0),this}addMetaSchema(e,t,n=this.opts.validateSchema){return this.addSchema(e,t,!0,n),this}validateSchema(e,t){if(typeof e=="boolean")return!0;let n;if(n=e.$schema,n!==void 0&&typeof n!="string")throw 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;let a=this.validate(n,e);if(!a&&t){let s="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(s);else throw new Error(s)}return a}getSchema(e){let t;for(;typeof(t=vl.call(this,e))=="string";)e=t;if(t===void 0){let{schemaId:n}=this.opts,a=new Xr.SchemaEnv({schema:{},schemaId:n});if(t=Xr.resolveSchema.call(this,a,e),!t)return;this.refs[e]=t}return t.validate||this._compileSchemaEnv(t)}removeSchema(e){if(e instanceof RegExp)return this._removeAllSchemas(this.schemas,e),this._removeAllSchemas(this.refs,e),this;switch(typeof e){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{let t=vl.call(this,e);return typeof t=="object"&&this._cache.delete(t.schema),delete this.schemas[e],delete this.refs[e],this}case"object":{let t=e;this._cache.delete(t);let n=e[this.opts.schemaId];return n&&(n=(0,Yr.normalizeId)(n),delete this.schemas[n],delete this.refs[n]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(e){for(let t of e)this.addKeyword(t);return this}addKeyword(e,t){let n;if(typeof e=="string")n=e,typeof t=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),t.keyword=n);else if(typeof e=="object"&&t===void 0){if(t=e,n=t.keyword,Array.isArray(n)&&!n.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(Pg.call(this,n,t),!t)return(0,wp.eachItem)(n,s=>Op.call(this,s)),this;Dg.call(this,t);let a=Z(P({},t),{type:(0,ao.getJSONTypes)(t.type),schemaType:(0,ao.getJSONTypes)(t.schemaType)});return(0,wp.eachItem)(n,a.type.length===0?s=>Op.call(this,s,a):s=>a.type.forEach(i=>Op.call(this,s,a,i))),this}getKeyword(e){let t=this.RULES.all[e];return typeof t=="object"?t.definition:!!t}removeKeyword(e){let{RULES:t}=this;delete t.keywords[e],delete t.all[e];for(let n of t.rules){let a=n.rules.findIndex(s=>s.keyword===e);a>=0&&n.rules.splice(a,1)}return this}addFormat(e,t){return typeof t=="string"&&(t=new RegExp(t)),this.formats[e]=t,this}errorsText(e=this.errors,{separator:t=", ",dataVar:n="data"}={}){return!e||e.length===0?"No errors":e.map(a=>`${n}${a.instancePath} ${a.message}`).reduce((a,s)=>a+t+s)}$dataMetaSchema(e,t){let n=this.RULES.all;e=JSON.parse(JSON.stringify(e));for(let a of t){let s=a.split("/").slice(1),i=e;for(let o of s)i=i[o];for(let o in n){let d=n[o];if(typeof d!="object")continue;let{$data:g}=d.definition,h=i[o];g&&h&&(i[o]=Cl(h))}}return e}_removeAllSchemas(e,t){for(let n in e){let a=e[n];(!t||t.test(n))&&(typeof a=="string"?delete e[n]:a&&!a.meta&&(this._cache.delete(a.schema),delete e[n]))}}_addSchema(e,t,n,a=this.opts.validateSchema,s=this.opts.addUsedSchema){let i,{schemaId:o}=this.opts;if(typeof e=="object")i=e[o];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 d=this._cache.get(e);if(d!==void 0)return d;n=(0,Yr.normalizeId)(i||n);let g=Yr.getSchemaRefs.call(this,e,n);return d=new Xr.SchemaEnv({schema:e,schemaId:o,meta:t,baseId:n,localRefs:g}),this._cache.set(d.schema,d),s&&!n.startsWith("#")&&(n&&this._checkUnique(n),this.refs[n]=d),a&&this.validateSchema(e,!0),d}_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):Xr.compileSchema.call(this,e),!e.validate)throw new Error("ajv implementation error");return e.validate}_compileMetaSchema(e){let t=this.opts;this.opts=this._metaOpts;try{Xr.compileSchema.call(this,e)}finally{this.opts=t}}};Zr.ValidationError=_g.default;Zr.MissingRefError=kl.default;Fe.default=Zr;function jl(r,e,t,n="error"){for(let a in r){let s=a;s in e&&this.logger[n](`${t}: option ${a}. ${r[s]}`)}}function vl(r){return r=(0,Yr.normalizeId)(r),this.schemas[r]||this.refs[r]}function wg(){let r=this.opts.schemas;if(r)if(Array.isArray(r))this.addSchema(r);else for(let e in r)this.addSchema(r[e],e)}function Ig(){for(let r in this.opts.formats){let e=this.opts.formats[r];e&&this.addFormat(r,e)}}function jg(r){if(Array.isArray(r)){this.addVocabulary(r);return}this.logger.warn("keywords option as map is deprecated, pass array");for(let e in r){let t=r[e];t.keyword||(t.keyword=e),this.addKeyword(t)}}function vg(){let r=P({},this.opts);for(let e of bg)delete r[e];return r}var kg={log(){},warn(){},error(){}};function Sg(r){if(r===!1)return kg;if(r===void 0)return console;if(r.log&&r.warn&&r.error)return r;throw new Error("logger must implement log, warn and error methods")}var Cg=/^[a-z_$][a-z0-9_$:-]*$/i;function Pg(r,e){let{RULES:t}=this;if((0,wp.eachItem)(r,n=>{if(t.keywords[n])throw new Error(`Keyword ${n} is already defined`);if(!Cg.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 Op(r,e,t){var n;let a=e==null?void 0:e.post;if(t&&a)throw new Error('keyword with "post" flag cannot have "type"');let{RULES:s}=this,i=a?s.post:s.rules.find(({type:d})=>d===t);if(i||(i={type:t,rules:[]},s.rules.push(i)),s.keywords[r]=!0,!e)return;let o={keyword:r,definition:Z(P({},e),{type:(0,ao.getJSONTypes)(e.type),schemaType:(0,ao.getJSONTypes)(e.schemaType)})};e.before?Gg.call(this,i,o,e.before):i.rules.push(o),s.all[r]=o,(n=e.implements)===null||n===void 0||n.forEach(d=>this.addKeyword(d))}function Gg(r,e,t){let n=r.rules.findIndex(a=>a.keyword===t);n>=0?r.rules.splice(n,0,e):(r.rules.push(e),this.logger.warn(`rule ${t} is not defined`))}function Dg(r){let{metaSchema:e}=r;e!==void 0&&(r.$data&&this.opts.$data&&(e=Cl(e)),r.validateSchema=this.compile(e,!0))}var Eg={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function Cl(r){return{anyOf:[r,Eg]}}});var Gl=G(Ip=>{"use strict";Object.defineProperty(Ip,"__esModule",{value:!0});var Mg={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};Ip.default=Mg});var Rl=G(At=>{"use strict";Object.defineProperty(At,"__esModule",{value:!0});At.callRef=At.getValidate=void 0;var Rg=Jr(),Dl=Le(),Ge=V(),ur=gt(),El=ro(),so=te(),Wg={keyword:"$ref",schemaType:"string",code(r){let{gen:e,schema:t,it:n}=r,{baseId:a,schemaEnv:s,validateName:i,opts:o,self:d}=n,{root:g}=s;if((t==="#"||t==="#/")&&a===g.baseId)return T();let h=El.resolveRef.call(d,g,a,t);if(h===void 0)throw new Rg.default(n.opts.uriResolver,a,t);if(h instanceof El.SchemaEnv)return O(h);return w(h);function T(){if(s===g)return io(r,i,s,s.$async);let b=e.scopeValue("root",{ref:g});return io(r,(0,Ge._)`${b}.validate`,g,g.$async)}function O(b){let $=Ml(r,b);io(r,$,b,b.$async)}function w(b){let $=e.scopeValue("schema",o.code.source===!0?{ref:b,code:(0,Ge.stringify)(b)}:{ref:b}),I=e.name("valid"),j=r.subschema({schema:b,dataTypes:[],schemaPath:Ge.nil,topSchemaRef:$,errSchemaPath:t},I);r.mergeEvaluated(j),r.ok(I)}}};function Ml(r,e){let{gen:t}=r;return e.validate?t.scopeValue("validate",{ref:e.validate}):(0,Ge._)`${t.scopeValue("wrapper",{ref:e})}.validate`}At.getValidate=Ml;function io(r,e,t,n){let{gen:a,it:s}=r,{allErrors:i,schemaEnv:o,opts:d}=s,g=d.passContext?ur.default.this:Ge.nil;n?h():T();function h(){if(!o.$async)throw new Error("async schema referenced by sync schema");let b=a.let("valid");a.try(()=>{a.code((0,Ge._)`await ${(0,Dl.callValidateCode)(r,e,g)}`),w(e),i||a.assign(b,!0)},$=>{a.if((0,Ge._)`!(${$} instanceof ${s.ValidationError})`,()=>a.throw($)),O($),i||a.assign(b,!1)}),r.ok(b)}function T(){r.result((0,Dl.callValidateCode)(r,e,g),()=>w(e),()=>O(e))}function O(b){let $=(0,Ge._)`${b}.errors`;a.assign(ur.default.vErrors,(0,Ge._)`${ur.default.vErrors} === null ? ${$} : ${ur.default.vErrors}.concat(${$})`),a.assign(ur.default.errors,(0,Ge._)`${ur.default.vErrors}.length`)}function w(b){var $;if(!s.opts.unevaluated)return;let I=($=t==null?void 0:t.validate)===null||$===void 0?void 0:$.evaluated;if(s.props!==!0)if(I&&!I.dynamicProps)I.props!==void 0&&(s.props=so.mergeEvaluated.props(a,I.props,s.props));else{let j=a.var("props",(0,Ge._)`${b}.evaluated.props`);s.props=so.mergeEvaluated.props(a,j,s.props,Ge.Name)}if(s.items!==!0)if(I&&!I.dynamicItems)I.items!==void 0&&(s.items=so.mergeEvaluated.items(a,I.items,s.items));else{let j=a.var("items",(0,Ge._)`${b}.evaluated.items`);s.items=so.mergeEvaluated.items(a,j,s.items,Ge.Name)}}}At.callRef=io;At.default=Wg});var Wl=G(jp=>{"use strict";Object.defineProperty(jp,"__esModule",{value:!0});var Ag=Gl(),Ng=Rl(),Ug=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",Ag.default,Ng.default];jp.default=Ug});var Al=G(vp=>{"use strict";Object.defineProperty(vp,"__esModule",{value:!0});var oo=V(),wt=oo.operators,po={maximum:{okStr:"<=",ok:wt.LTE,fail:wt.GT},minimum:{okStr:">=",ok:wt.GTE,fail:wt.LT},exclusiveMaximum:{okStr:"<",ok:wt.LT,fail:wt.GTE},exclusiveMinimum:{okStr:">",ok:wt.GT,fail:wt.LTE}},qg={message:({keyword:r,schemaCode:e})=>(0,oo.str)`must be ${po[r].okStr} ${e}`,params:({keyword:r,schemaCode:e})=>(0,oo._)`{comparison: ${po[r].okStr}, limit: ${e}}`},Bg={keyword:Object.keys(po),type:"number",schemaType:"number",$data:!0,error:qg,code(r){let{keyword:e,data:t,schemaCode:n}=r;r.fail$data((0,oo._)`${t} ${po[e].fail} ${n} || isNaN(${t})`)}};vp.default=Bg});var Nl=G(kp=>{"use strict";Object.defineProperty(kp,"__esModule",{value:!0});var en=V(),Lg={message:({schemaCode:r})=>(0,en.str)`must be multiple of ${r}`,params:({schemaCode:r})=>(0,en._)`{multipleOf: ${r}}`},Vg={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:Lg,code(r){let{gen:e,data:t,schemaCode:n,it:a}=r,s=a.opts.multipleOfPrecision,i=e.let("res"),o=s?(0,en._)`Math.abs(Math.round(${i}) - ${i}) > 1e-${s}`:(0,en._)`${i} !== parseInt(${i})`;r.fail$data((0,en._)`(${n} === 0 || (${i} = ${t}/${n}, ${o}))`)}};kp.default=Vg});var ql=G(Sp=>{"use strict";Object.defineProperty(Sp,"__esModule",{value:!0});function Ul(r){let e=r.length,t=0,n=0,a;for(;n<e;)t++,a=r.charCodeAt(n++),a>=55296&&a<=56319&&n<e&&(a=r.charCodeAt(n),(a&64512)===56320&&n++);return t}Sp.default=Ul;Ul.code='require("ajv/dist/runtime/ucs2length").default'});var Bl=G(Cp=>{"use strict";Object.defineProperty(Cp,"__esModule",{value:!0});var Nt=V(),Hg=te(),zg=ql(),Kg={message({keyword:r,schemaCode:e}){let t=r==="maxLength"?"more":"fewer";return(0,Nt.str)`must NOT have ${t} than ${e} characters`},params:({schemaCode:r})=>(0,Nt._)`{limit: ${r}}`},Qg={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:Kg,code(r){let{keyword:e,data:t,schemaCode:n,it:a}=r,s=e==="maxLength"?Nt.operators.GT:Nt.operators.LT,i=a.opts.unicode===!1?(0,Nt._)`${t}.length`:(0,Nt._)`${(0,Hg.useFunc)(r.gen,zg.default)}(${t})`;r.fail$data((0,Nt._)`${i} ${s} ${n}`)}};Cp.default=Qg});var Ll=G(Pp=>{"use strict";Object.defineProperty(Pp,"__esModule",{value:!0});var Jg=Le(),fo=V(),Xg={message:({schemaCode:r})=>(0,fo.str)`must match pattern "${r}"`,params:({schemaCode:r})=>(0,fo._)`{pattern: ${r}}`},Yg={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:Xg,code(r){let{data:e,$data:t,schema:n,schemaCode:a,it:s}=r,i=s.opts.unicodeRegExp?"u":"",o=t?(0,fo._)`(new RegExp(${a}, ${i}))`:(0,Jg.usePattern)(r,n);r.fail$data((0,fo._)`!${o}.test(${e})`)}};Pp.default=Yg});var Vl=G(Gp=>{"use strict";Object.defineProperty(Gp,"__esModule",{value:!0});var tn=V(),Zg={message({keyword:r,schemaCode:e}){let t=r==="maxProperties"?"more":"fewer";return(0,tn.str)`must NOT have ${t} than ${e} properties`},params:({schemaCode:r})=>(0,tn._)`{limit: ${r}}`},eT={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:Zg,code(r){let{keyword:e,data:t,schemaCode:n}=r,a=e==="maxProperties"?tn.operators.GT:tn.operators.LT;r.fail$data((0,tn._)`Object.keys(${t}).length ${a} ${n}`)}};Gp.default=eT});var Hl=G(Dp=>{"use strict";Object.defineProperty(Dp,"__esModule",{value:!0});var rn=Le(),nn=V(),tT=te(),rT={message:({params:{missingProperty:r}})=>(0,nn.str)`must have required property '${r}'`,params:({params:{missingProperty:r}})=>(0,nn._)`{missingProperty: ${r}}`},nT={keyword:"required",type:"object",schemaType:"array",$data:!0,error:rT,code(r){let{gen:e,schema:t,schemaCode:n,data:a,$data:s,it:i}=r,{opts:o}=i;if(!s&&t.length===0)return;let d=t.length>=o.loopRequired;if(i.allErrors?g():h(),o.strictRequired){let w=r.parentSchema.properties,{definedProperties:b}=r.it;for(let $ of t)if((w==null?void 0:w[$])===void 0&&!b.has($)){let I=i.schemaEnv.baseId+i.errSchemaPath,j=`required property "${$}" is not defined at "${I}" (strictRequired)`;(0,tT.checkStrictMode)(i,j,i.opts.strictRequired)}}function g(){if(d||s)r.block$data(nn.nil,T);else for(let w of t)(0,rn.checkReportMissingProp)(r,w)}function h(){let w=e.let("missing");if(d||s){let b=e.let("valid",!0);r.block$data(b,()=>O(w,b)),r.ok(b)}else e.if((0,rn.checkMissingProp)(r,t,w)),(0,rn.reportMissingProp)(r,w),e.else()}function T(){e.forOf("prop",n,w=>{r.setParams({missingProperty:w}),e.if((0,rn.noPropertyInData)(e,a,w,o.ownProperties),()=>r.error())})}function O(w,b){r.setParams({missingProperty:w}),e.forOf(w,n,()=>{e.assign(b,(0,rn.propertyInData)(e,a,w,o.ownProperties)),e.if((0,nn.not)(b),()=>{r.error(),e.break()})},nn.nil)}}};Dp.default=nT});var zl=G(Ep=>{"use strict";Object.defineProperty(Ep,"__esModule",{value:!0});var an=V(),aT={message({keyword:r,schemaCode:e}){let t=r==="maxItems"?"more":"fewer";return(0,an.str)`must NOT have ${t} than ${e} items`},params:({schemaCode:r})=>(0,an._)`{limit: ${r}}`},sT={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:aT,code(r){let{keyword:e,data:t,schemaCode:n}=r,a=e==="maxItems"?an.operators.GT:an.operators.LT;r.fail$data((0,an._)`${t}.length ${a} ${n}`)}};Ep.default=sT});var uo=G(Mp=>{"use strict";Object.defineProperty(Mp,"__esModule",{value:!0});var Kl=up();Kl.code='require("ajv/dist/runtime/equal").default';Mp.default=Kl});var Ql=G(Wp=>{"use strict";Object.defineProperty(Wp,"__esModule",{value:!0});var Rp=Vr(),xe=V(),iT=te(),oT=uo(),pT={message:({params:{i:r,j:e}})=>(0,xe.str)`must NOT have duplicate items (items ## ${e} and ${r} are identical)`,params:({params:{i:r,j:e}})=>(0,xe._)`{i: ${r}, j: ${e}}`},dT={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:pT,code(r){let{gen:e,data:t,$data:n,schema:a,parentSchema:s,schemaCode:i,it:o}=r;if(!n&&!a)return;let d=e.let("valid"),g=s.items?(0,Rp.getSchemaTypes)(s.items):[];r.block$data(d,h,(0,xe._)`${i} === false`),r.ok(d);function h(){let b=e.let("i",(0,xe._)`${t}.length`),$=e.let("j");r.setParams({i:b,j:$}),e.assign(d,!0),e.if((0,xe._)`${b} > 1`,()=>(T()?O:w)(b,$))}function T(){return g.length>0&&!g.some(b=>b==="object"||b==="array")}function O(b,$){let I=e.name("item"),j=(0,Rp.checkDataTypes)(g,I,o.opts.strictNumbers,Rp.DataType.Wrong),z=e.const("indices",(0,xe._)`{}`);e.for((0,xe._)`;${b}--;`,()=>{e.let(I,(0,xe._)`${t}[${b}]`),e.if(j,(0,xe._)`continue`),g.length>1&&e.if((0,xe._)`typeof ${I} == "string"`,(0,xe._)`${I} += "_"`),e.if((0,xe._)`typeof ${z}[${I}] == "number"`,()=>{e.assign($,(0,xe._)`${z}[${I}]`),r.error(),e.assign(d,!1).break()}).code((0,xe._)`${z}[${I}] = ${b}`)})}function w(b,$){let I=(0,iT.useFunc)(e,oT.default),j=e.name("outer");e.label(j).for((0,xe._)`;${b}--;`,()=>e.for((0,xe._)`${$} = ${b}; ${$}--;`,()=>e.if((0,xe._)`${I}(${t}[${b}], ${t}[${$}])`,()=>{r.error(),e.assign(d,!1).break(j)})))}}};Wp.default=dT});var Jl=G(Np=>{"use strict";Object.defineProperty(Np,"__esModule",{value:!0});var Ap=V(),fT=te(),uT=uo(),lT={message:"must be equal to constant",params:({schemaCode:r})=>(0,Ap._)`{allowedValue: ${r}}`},cT={keyword:"const",$data:!0,error:lT,code(r){let{gen:e,data:t,$data:n,schemaCode:a,schema:s}=r;n||s&&typeof s=="object"?r.fail$data((0,Ap._)`!${(0,fT.useFunc)(e,uT.default)}(${t}, ${a})`):r.fail((0,Ap._)`${s} !== ${t}`)}};Np.default=cT});var Xl=G(Up=>{"use strict";Object.defineProperty(Up,"__esModule",{value:!0});var sn=V(),mT=te(),hT=uo(),_T={message:"must be equal to one of the allowed values",params:({schemaCode:r})=>(0,sn._)`{allowedValues: ${r}}`},gT={keyword:"enum",schemaType:"array",$data:!0,error:_T,code(r){let{gen:e,data:t,$data:n,schema:a,schemaCode:s,it:i}=r;if(!n&&a.length===0)throw new Error("enum must have non-empty array");let o=a.length>=i.opts.loopEnum,d,g=()=>d!=null?d:d=(0,mT.useFunc)(e,hT.default),h;if(o||n)h=e.let("valid"),r.block$data(h,T);else{if(!Array.isArray(a))throw new Error("ajv implementation error");let w=e.const("vSchema",s);h=(0,sn.or)(...a.map((b,$)=>O(w,$)))}r.pass(h);function T(){e.assign(h,!1),e.forOf("v",s,w=>e.if((0,sn._)`${g()}(${t}, ${w})`,()=>e.assign(h,!0).break()))}function O(w,b){let $=a[b];return typeof $=="object"&&$!==null?(0,sn._)`${g()}(${t}, ${w}[${b}])`:(0,sn._)`${t} === ${$}`}}};Up.default=gT});var Yl=G(qp=>{"use strict";Object.defineProperty(qp,"__esModule",{value:!0});var TT=Al(),yT=Nl(),bT=Bl(),FT=Ll(),xT=Vl(),$T=Hl(),OT=zl(),wT=Ql(),IT=Jl(),jT=Xl(),vT=[TT.default,yT.default,bT.default,FT.default,xT.default,$T.default,OT.default,wT.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},IT.default,jT.default];qp.default=vT});var Lp=G(on=>{"use strict";Object.defineProperty(on,"__esModule",{value:!0});on.validateAdditionalItems=void 0;var Ut=V(),Bp=te(),kT={message:({params:{len:r}})=>(0,Ut.str)`must NOT have more than ${r} items`,params:({params:{len:r}})=>(0,Ut._)`{limit: ${r}}`},ST={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:kT,code(r){let{parentSchema:e,it:t}=r,{items:n}=e;if(!Array.isArray(n)){(0,Bp.checkStrictMode)(t,'"additionalItems" is ignored when "items" is not an array of schemas');return}Zl(r,n)}};function Zl(r,e){let{gen:t,schema:n,data:a,keyword:s,it:i}=r;i.items=!0;let o=t.const("len",(0,Ut._)`${a}.length`);if(n===!1)r.setParams({len:e.length}),r.pass((0,Ut._)`${o} <= ${e.length}`);else if(typeof n=="object"&&!(0,Bp.alwaysValidSchema)(i,n)){let g=t.var("valid",(0,Ut._)`${o} <= ${e.length}`);t.if((0,Ut.not)(g),()=>d(g)),r.ok(g)}function d(g){t.forRange("i",e.length,o,h=>{r.subschema({keyword:s,dataProp:h,dataPropType:Bp.Type.Num},g),i.allErrors||t.if((0,Ut.not)(g),()=>t.break())})}}on.validateAdditionalItems=Zl;on.default=ST});var Vp=G(pn=>{"use strict";Object.defineProperty(pn,"__esModule",{value:!0});pn.validateTuple=void 0;var ec=V(),lo=te(),CT=Le(),PT={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(r){let{schema:e,it:t}=r;if(Array.isArray(e))return tc(r,"additionalItems",e);t.items=!0,!(0,lo.alwaysValidSchema)(t,e)&&r.ok((0,CT.validateArray)(r))}};function tc(r,e,t=r.schema){let{gen:n,parentSchema:a,data:s,keyword:i,it:o}=r;h(a),o.opts.unevaluated&&t.length&&o.items!==!0&&(o.items=lo.mergeEvaluated.items(n,t.length,o.items));let d=n.name("valid"),g=n.const("len",(0,ec._)`${s}.length`);t.forEach((T,O)=>{(0,lo.alwaysValidSchema)(o,T)||(n.if((0,ec._)`${g} > ${O}`,()=>r.subschema({keyword:i,schemaProp:O,dataProp:O},d)),r.ok(d))});function h(T){let{opts:O,errSchemaPath:w}=o,b=t.length,$=b===T.minItems&&(b===T.maxItems||T[e]===!1);if(O.strictTuples&&!$){let I=`"${i}" is ${b}-tuple, but minItems or maxItems/${e} are not specified or different at path "${w}"`;(0,lo.checkStrictMode)(o,I,O.strictTuples)}}}pn.validateTuple=tc;pn.default=PT});var rc=G(Hp=>{"use strict";Object.defineProperty(Hp,"__esModule",{value:!0});var GT=Vp(),DT={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:r=>(0,GT.validateTuple)(r,"items")};Hp.default=DT});var ac=G(zp=>{"use strict";Object.defineProperty(zp,"__esModule",{value:!0});var nc=V(),ET=te(),MT=Le(),RT=Lp(),WT={message:({params:{len:r}})=>(0,nc.str)`must NOT have more than ${r} items`,params:({params:{len:r}})=>(0,nc._)`{limit: ${r}}`},AT={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:WT,code(r){let{schema:e,parentSchema:t,it:n}=r,{prefixItems:a}=t;n.items=!0,!(0,ET.alwaysValidSchema)(n,e)&&(a?(0,RT.validateAdditionalItems)(r,a):r.ok((0,MT.validateArray)(r)))}};zp.default=AT});var sc=G(Kp=>{"use strict";Object.defineProperty(Kp,"__esModule",{value:!0});var He=V(),co=te(),NT={message:({params:{min:r,max:e}})=>e===void 0?(0,He.str)`must contain at least ${r} valid item(s)`:(0,He.str)`must contain at least ${r} and no more than ${e} valid item(s)`,params:({params:{min:r,max:e}})=>e===void 0?(0,He._)`{minContains: ${r}}`:(0,He._)`{minContains: ${r}, maxContains: ${e}}`},UT={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:NT,code(r){let{gen:e,schema:t,parentSchema:n,data:a,it:s}=r,i,o,{minContains:d,maxContains:g}=n;s.opts.next?(i=d===void 0?1:d,o=g):i=1;let h=e.const("len",(0,He._)`${a}.length`);if(r.setParams({min:i,max:o}),o===void 0&&i===0){(0,co.checkStrictMode)(s,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(o!==void 0&&i>o){(0,co.checkStrictMode)(s,'"minContains" > "maxContains" is always invalid'),r.fail();return}if((0,co.alwaysValidSchema)(s,t)){let $=(0,He._)`${h} >= ${i}`;o!==void 0&&($=(0,He._)`${$} && ${h} <= ${o}`),r.pass($);return}s.items=!0;let T=e.name("valid");o===void 0&&i===1?w(T,()=>e.if(T,()=>e.break())):i===0?(e.let(T,!0),o!==void 0&&e.if((0,He._)`${a}.length > 0`,O)):(e.let(T,!1),O()),r.result(T,()=>r.reset());function O(){let $=e.name("_valid"),I=e.let("count",0);w($,()=>e.if($,()=>b(I)))}function w($,I){e.forRange("i",0,h,j=>{r.subschema({keyword:"contains",dataProp:j,dataPropType:co.Type.Num,compositeRule:!0},$),I()})}function b($){e.code((0,He._)`${$}++`),o===void 0?e.if((0,He._)`${$} >= ${i}`,()=>e.assign(T,!0).break()):(e.if((0,He._)`${$} > ${o}`,()=>e.assign(T,!1).break()),i===1?e.assign(T,!0):e.if((0,He._)`${$} >= ${i}`,()=>e.assign(T,!0)))}}};Kp.default=UT});var pc=G(pt=>{"use strict";Object.defineProperty(pt,"__esModule",{value:!0});pt.validateSchemaDeps=pt.validatePropertyDeps=pt.error=void 0;var Qp=V(),qT=te(),dn=Le();pt.error={message:({params:{property:r,depsCount:e,deps:t}})=>{let n=e===1?"property":"properties";return(0,Qp.str)`must have ${n} ${t} when property ${r} is present`},params:({params:{property:r,depsCount:e,deps:t,missingProperty:n}})=>(0,Qp._)`{property: ${r},
6
6
  missingProperty: ${n},
7
7
  depsCount: ${e},
8
- deps: ${t}}`};var BT={keyword:"dependencies",type:"object",schemaType:"object",error:pt.error,code(r){let[e,t]=LT(r);ic(r,e),oc(r,t)}};function LT({schema:r}){let e={},t={};for(let n in r){if(n==="__proto__")continue;let a=Array.isArray(r[n])?e:t;a[n]=r[n]}return[e,t]}function ic(r,e=r.schema){let{gen:t,data:n,it:a}=r;if(Object.keys(e).length===0)return;let s=t.let("missing");for(let i in e){let o=e[i];if(o.length===0)continue;let d=(0,dn.propertyInData)(t,n,i,a.opts.ownProperties);r.setParams({property:i,depsCount:o.length,deps:o.join(", ")}),a.allErrors?t.if(d,()=>{for(let g of o)(0,dn.checkReportMissingProp)(r,g)}):(t.if((0,Qp._)`${d} && (${(0,dn.checkMissingProp)(r,o,s)})`),(0,dn.reportMissingProp)(r,s),t.else())}}pt.validatePropertyDeps=ic;function oc(r,e=r.schema){let{gen:t,data:n,keyword:a,it:s}=r,i=t.name("valid");for(let o in e)(0,qT.alwaysValidSchema)(s,e[o])||(t.if((0,dn.propertyInData)(t,n,o,s.opts.ownProperties),()=>{let d=r.subschema({keyword:a,schemaProp:o},i);r.mergeValidEvaluated(d,i)},()=>t.var(i,!0)),r.ok(i))}pt.validateSchemaDeps=oc;pt.default=BT});var fc=G(Jp=>{"use strict";Object.defineProperty(Jp,"__esModule",{value:!0});var dc=V(),VT=te(),HT={message:"property name must be valid",params:({params:r})=>(0,dc._)`{propertyName: ${r.propertyName}}`},zT={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:HT,code(r){let{gen:e,schema:t,data:n,it:a}=r;if((0,VT.alwaysValidSchema)(a,t))return;let s=e.name("valid");e.forIn("key",n,i=>{r.setParams({propertyName:i}),r.subschema({keyword:"propertyNames",data:i,dataTypes:["string"],propertyName:i,compositeRule:!0},s),e.if((0,dc.not)(s),()=>{r.error(!0),a.allErrors||e.break()})}),r.ok(s)}};Jp.default=zT});var Yp=G(Xp=>{"use strict";Object.defineProperty(Xp,"__esModule",{value:!0});var mo=Le(),Xe=V(),KT=gt(),ho=te(),QT={message:"must NOT have additional properties",params:({params:r})=>(0,Xe._)`{additionalProperty: ${r.additionalProperty}}`},JT={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:QT,code(r){let{gen:e,schema:t,parentSchema:n,data:a,errsCount:s,it:i}=r;if(!s)throw new Error("ajv implementation error");let{allErrors:o,opts:d}=i;if(i.props=!0,d.removeAdditional!=="all"&&(0,ho.alwaysValidSchema)(i,t))return;let g=(0,mo.allSchemaProperties)(n.properties),h=(0,mo.allSchemaProperties)(n.patternProperties);T(),r.ok((0,Xe._)`${s} === ${KT.default.errors}`);function T(){e.forIn("key",a,I=>{!g.length&&!h.length?b(I):e.if(O(I),()=>b(I))})}function O(I){let j;if(g.length>8){let z=(0,ho.schemaRefOrVal)(i,n.properties,"properties");j=(0,mo.isOwnProperty)(e,z,I)}else g.length?j=(0,Xe.or)(...g.map(z=>(0,Xe._)`${I} === ${z}`)):j=Xe.nil;return h.length&&(j=(0,Xe.or)(j,...h.map(z=>(0,Xe._)`${(0,mo.usePattern)(r,z)}.test(${I})`))),(0,Xe.not)(j)}function w(I){e.code((0,Xe._)`delete ${a}[${I}]`)}function b(I){if(d.removeAdditional==="all"||d.removeAdditional&&t===!1){w(I);return}if(t===!1){r.setParams({additionalProperty:I}),r.error(),o||e.break();return}if(typeof t=="object"&&!(0,ho.alwaysValidSchema)(i,t)){let j=e.name("valid");d.removeAdditional==="failing"?($(I,j,!1),e.if((0,Xe.not)(j),()=>{r.reset(),w(I)})):($(I,j),o||e.if((0,Xe.not)(j),()=>e.break()))}}function $(I,j,z){let q={keyword:"additionalProperties",dataProp:I,dataPropType:ho.Type.Str};z===!1&&Object.assign(q,{compositeRule:!0,createErrors:!1,allErrors:!1}),r.subschema(q,j)}}};Xp.default=JT});var cc=G(ed=>{"use strict";Object.defineProperty(ed,"__esModule",{value:!0});var XT=Qr(),uc=Le(),Zp=te(),lc=Yp(),YT={keyword:"properties",type:"object",schemaType:"object",code(r){let{gen:e,schema:t,parentSchema:n,data:a,it:s}=r;s.opts.removeAdditional==="all"&&n.additionalProperties===void 0&&lc.default.code(new XT.KeywordCxt(s,lc.default,"additionalProperties"));let i=(0,uc.allSchemaProperties)(t);for(let T of i)s.definedProperties.add(T);s.opts.unevaluated&&i.length&&s.props!==!0&&(s.props=Zp.mergeEvaluated.props(e,(0,Zp.toHash)(i),s.props));let o=i.filter(T=>!(0,Zp.alwaysValidSchema)(s,t[T]));if(o.length===0)return;let d=e.name("valid");for(let T of o)g(T)?h(T):(e.if((0,uc.propertyInData)(e,a,T,s.opts.ownProperties)),h(T),s.allErrors||e.else().var(d,!0),e.endIf()),r.it.definedProperties.add(T),r.ok(d);function g(T){return s.opts.useDefaults&&!s.compositeRule&&t[T].default!==void 0}function h(T){r.subschema({keyword:"properties",schemaProp:T,dataProp:T},d)}}};ed.default=YT});var gc=G(td=>{"use strict";Object.defineProperty(td,"__esModule",{value:!0});var mc=Le(),_o=V(),hc=te(),_c=te(),ZT={keyword:"patternProperties",type:"object",schemaType:"object",code(r){let{gen:e,schema:t,data:n,parentSchema:a,it:s}=r,{opts:i}=s,o=(0,mc.allSchemaProperties)(t),d=o.filter($=>(0,hc.alwaysValidSchema)(s,t[$]));if(o.length===0||d.length===o.length&&(!s.opts.unevaluated||s.props===!0))return;let g=i.strictSchema&&!i.allowMatchingProperties&&a.properties,h=e.name("valid");s.props!==!0&&!(s.props instanceof _o.Name)&&(s.props=(0,_c.evaluatedPropsToName)(e,s.props));let{props:T}=s;O();function O(){for(let $ of o)g&&w($),s.allErrors?b($):(e.var(h,!0),b($),e.if(h))}function w($){for(let I in g)new RegExp($).test(I)&&(0,hc.checkStrictMode)(s,`property ${I} matches pattern ${$} (use allowMatchingProperties)`)}function b($){e.forIn("key",n,I=>{e.if((0,_o._)`${(0,mc.usePattern)(r,$)}.test(${I})`,()=>{let j=d.includes($);j||r.subschema({keyword:"patternProperties",schemaProp:$,dataProp:I,dataPropType:_c.Type.Str},h),s.opts.unevaluated&&T!==!0?e.assign((0,_o._)`${T}[${I}]`,!0):!j&&!s.allErrors&&e.if((0,_o.not)(h),()=>e.break())})})}}};td.default=ZT});var Tc=G(rd=>{"use strict";Object.defineProperty(rd,"__esModule",{value:!0});var ey=te(),ty={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(r){let{gen:e,schema:t,it:n}=r;if((0,ey.alwaysValidSchema)(n,t)){r.fail();return}let a=e.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"}};rd.default=ty});var yc=G(nd=>{"use strict";Object.defineProperty(nd,"__esModule",{value:!0});var ry=Le(),ny={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:ry.validateUnion,error:{message:"must match a schema in anyOf"}};nd.default=ny});var bc=G(ad=>{"use strict";Object.defineProperty(ad,"__esModule",{value:!0});var go=V(),ay=te(),sy={message:"must match exactly one schema in oneOf",params:({params:r})=>(0,go._)`{passingSchemas: ${r.passing}}`},iy={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:sy,code(r){let{gen:e,schema:t,parentSchema:n,it:a}=r;if(!Array.isArray(t))throw new Error("ajv implementation error");if(a.opts.discriminator&&n.discriminator)return;let s=t,i=e.let("valid",!1),o=e.let("passing",null),d=e.name("_valid");r.setParams({passing:o}),e.block(g),r.result(i,()=>r.reset(),()=>r.error(!0));function g(){s.forEach((h,T)=>{let O;(0,ay.alwaysValidSchema)(a,h)?e.var(d,!0):O=r.subschema({keyword:"oneOf",schemaProp:T,compositeRule:!0},d),T>0&&e.if((0,go._)`${d} && ${i}`).assign(i,!1).assign(o,(0,go._)`[${o}, ${T}]`).else(),e.if(d,()=>{e.assign(i,!0),e.assign(o,T),O&&r.mergeEvaluated(O,go.Name)})})}}};ad.default=iy});var Fc=G(sd=>{"use strict";Object.defineProperty(sd,"__esModule",{value:!0});var oy=te(),py={keyword:"allOf",schemaType:"array",code(r){let{gen:e,schema:t,it:n}=r;if(!Array.isArray(t))throw new Error("ajv implementation error");let a=e.name("valid");t.forEach((s,i)=>{if((0,oy.alwaysValidSchema)(n,s))return;let o=r.subschema({keyword:"allOf",schemaProp:i},a);r.ok(a),r.mergeEvaluated(o)})}};sd.default=py});var Oc=G(id=>{"use strict";Object.defineProperty(id,"__esModule",{value:!0});var To=V(),$c=te(),dy={message:({params:r})=>(0,To.str)`must match "${r.ifClause}" schema`,params:({params:r})=>(0,To._)`{failingKeyword: ${r.ifClause}}`},fy={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:dy,code(r){let{gen:e,parentSchema:t,it:n}=r;t.then===void 0&&t.else===void 0&&(0,$c.checkStrictMode)(n,'"if" without "then" and "else" is ignored');let a=xc(n,"then"),s=xc(n,"else");if(!a&&!s)return;let i=e.let("valid",!0),o=e.name("_valid");if(d(),r.reset(),a&&s){let h=e.let("ifClause");r.setParams({ifClause:h}),e.if(o,g("then",h),g("else",h))}else a?e.if(o,g("then")):e.if((0,To.not)(o),g("else"));r.pass(i,()=>r.error(!0));function d(){let h=r.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},o);r.mergeEvaluated(h)}function g(h,T){return()=>{let O=r.subschema({keyword:h},o);e.assign(i,o),r.mergeValidEvaluated(O,i),T?e.assign(T,(0,To._)`${h}`):r.setParams({ifClause:h})}}}};function xc(r,e){let t=r.schema[e];return t!==void 0&&!(0,$c.alwaysValidSchema)(r,t)}id.default=fy});var wc=G(od=>{"use strict";Object.defineProperty(od,"__esModule",{value:!0});var uy=te(),ly={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:r,parentSchema:e,it:t}){e.if===void 0&&(0,uy.checkStrictMode)(t,`"${r}" without "if" is ignored`)}};od.default=ly});var Ic=G(pd=>{"use strict";Object.defineProperty(pd,"__esModule",{value:!0});var cy=Lp(),my=rc(),hy=Vp(),_y=ac(),gy=sc(),Ty=pc(),yy=fc(),by=Yp(),Fy=cc(),xy=gc(),$y=Tc(),Oy=yc(),wy=bc(),Iy=Fc(),jy=Oc(),vy=wc();function ky(r=!1){let e=[$y.default,Oy.default,wy.default,Iy.default,jy.default,vy.default,yy.default,by.default,Ty.default,Fy.default,xy.default];return r?e.push(my.default,_y.default):e.push(cy.default,hy.default),e.push(gy.default),e}pd.default=ky});var jc=G(dd=>{"use strict";Object.defineProperty(dd,"__esModule",{value:!0});var ge=V(),Sy={message:({schemaCode:r})=>(0,ge.str)`must match format "${r}"`,params:({schemaCode:r})=>(0,ge._)`{format: ${r}}`},Cy={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:Sy,code(r,e){let{gen:t,data:n,$data:a,schema:s,schemaCode:i,it:o}=r,{opts:d,errSchemaPath:g,schemaEnv:h,self:T}=o;if(!d.validateFormats)return;a?O():w();function O(){let b=t.scopeValue("formats",{ref:T.formats,code:d.code.formats}),$=t.const("fDef",(0,ge._)`${b}[${i}]`),I=t.let("fType"),j=t.let("format");t.if((0,ge._)`typeof ${$} == "object" && !(${$} instanceof RegExp)`,()=>t.assign(I,(0,ge._)`${$}.type || "string"`).assign(j,(0,ge._)`${$}.validate`),()=>t.assign(I,(0,ge._)`"string"`).assign(j,$)),r.fail$data((0,ge.or)(z(),q()));function z(){return d.strictSchema===!1?ge.nil:(0,ge._)`${i} && !${j}`}function q(){let ae=h.$async?(0,ge._)`(${$}.async ? await ${j}(${n}) : ${j}(${n}))`:(0,ge._)`${j}(${n})`,W=(0,ge._)`(typeof ${j} == "function" ? ${ae} : ${j}.test(${n}))`;return(0,ge._)`${j} && ${j} !== true && ${I} === ${e} && !${W}`}}function w(){let b=T.formats[s];if(!b){z();return}if(b===!0)return;let[$,I,j]=q(b);$===e&&r.pass(ae());function z(){if(d.strictSchema===!1){T.logger.warn(W());return}throw new Error(W());function W(){return`unknown format "${s}" ignored in schema at path "${g}"`}}function q(W){let We=W instanceof RegExp?(0,ge.regexpCode)(W):d.code.formats?(0,ge._)`${d.code.formats}${(0,ge.getProperty)(s)}`:void 0,ze=t.scopeValue("formats",{key:s,ref:W,code:We});return typeof W=="object"&&!(W instanceof RegExp)?[W.type||"string",W.validate,(0,ge._)`${ze}.validate`]:["string",W,ze]}function ae(){if(typeof b=="object"&&!(b instanceof RegExp)&&b.async){if(!h.$async)throw new Error("async format in sync schema");return(0,ge._)`await ${j}(${n})`}return typeof I=="function"?(0,ge._)`${j}(${n})`:(0,ge._)`${j}.test(${n})`}}}};dd.default=Cy});var vc=G(fd=>{"use strict";Object.defineProperty(fd,"__esModule",{value:!0});var Py=jc(),Gy=[Py.default];fd.default=Gy});var kc=G(lr=>{"use strict";Object.defineProperty(lr,"__esModule",{value:!0});lr.contentVocabulary=lr.metadataVocabulary=void 0;lr.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];lr.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});var Cc=G(ud=>{"use strict";Object.defineProperty(ud,"__esModule",{value:!0});var Dy=Wl(),Ey=Yl(),Ry=Ic(),My=vc(),Sc=kc(),Wy=[Dy.default,Ey.default,(0,Ry.default)(),My.default,Sc.metadataVocabulary,Sc.contentVocabulary];ud.default=Wy});var Gc=G(yo=>{"use strict";Object.defineProperty(yo,"__esModule",{value:!0});yo.DiscrError=void 0;var Pc;(function(r){r.Tag="tag",r.Mapping="mapping"})(Pc||(yo.DiscrError=Pc={}))});var Ec=G(cd=>{"use strict";Object.defineProperty(cd,"__esModule",{value:!0});var cr=V(),ld=Gc(),Dc=ro(),Ay=Jr(),Ny=te(),Uy={message:({params:{discrError:r,tagName:e}})=>r===ld.DiscrError.Tag?`tag "${e}" must be string`:`value of tag "${e}" must be in oneOf`,params:({params:{discrError:r,tag:e,tagName:t}})=>(0,cr._)`{error: ${r}, tag: ${t}, tagValue: ${e}}`},qy={keyword:"discriminator",type:"object",schemaType:"object",error:Uy,code(r){let{gen:e,data:t,schema:n,parentSchema:a,it:s}=r,{oneOf:i}=a;if(!s.opts.discriminator)throw new Error("discriminator: requires discriminator option");let o=n.propertyName;if(typeof o!="string")throw new Error("discriminator: requires propertyName");if(n.mapping)throw new Error("discriminator: mapping is not supported");if(!i)throw new Error("discriminator: requires oneOf keyword");let d=e.let("valid",!1),g=e.const("tag",(0,cr._)`${t}${(0,cr.getProperty)(o)}`);e.if((0,cr._)`typeof ${g} == "string"`,()=>h(),()=>r.error(!1,{discrError:ld.DiscrError.Tag,tag:g,tagName:o})),r.ok(d);function h(){let w=O();e.if(!1);for(let b in w)e.elseIf((0,cr._)`${g} === ${b}`),e.assign(d,T(w[b]));e.else(),r.error(!1,{discrError:ld.DiscrError.Mapping,tag:g,tagName:o}),e.endIf()}function T(w){let b=e.name("valid"),$=r.subschema({keyword:"oneOf",schemaProp:w},b);return r.mergeEvaluated($,cr.Name),b}function O(){var w;let b={},$=j(a),I=!0;for(let ae=0;ae<i.length;ae++){let W=i[ae];if(W!=null&&W.$ref&&!(0,Ny.schemaHasRulesButRef)(W,s.self.RULES)){let ze=W.$ref;if(W=Dc.resolveRef.call(s.self,s.schemaEnv.root,s.baseId,ze),W instanceof Dc.SchemaEnv&&(W=W.schema),W===void 0)throw new Ay.default(s.opts.uriResolver,s.baseId,ze)}let We=(w=W==null?void 0:W.properties)===null||w===void 0?void 0:w[o];if(typeof We!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${o}"`);I=I&&($||j(W)),z(We,ae)}if(!I)throw new Error(`discriminator: "${o}" must be required`);return b;function j({required:ae}){return Array.isArray(ae)&&ae.includes(o)}function z(ae,W){if(ae.const)q(ae.const,W);else if(ae.enum)for(let We of ae.enum)q(We,W);else throw new Error(`discriminator: "properties/${o}" must have "const" or "enum"`)}function q(ae,W){if(typeof ae!="string"||ae in b)throw new Error(`discriminator: "${o}" values must be unique strings`);b[ae]=W}}}};cd.default=qy});var Rc=G((mj,By)=>{By.exports={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0}});var Wc=G((le,md)=>{"use strict";Object.defineProperty(le,"__esModule",{value:!0});le.MissingRefError=le.ValidationError=le.CodeGen=le.Name=le.nil=le.stringify=le.str=le._=le.KeywordCxt=le.Ajv=void 0;var Ly=Pl(),Vy=Cc(),Hy=Ec(),Mc=Rc(),zy=["/properties"],bo="http://json-schema.org/draft-07/schema",mr=class extends Ly.default{_addVocabularies(){super._addVocabularies(),Vy.default.forEach(e=>this.addVocabulary(e)),this.opts.discriminator&&this.addKeyword(Hy.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let e=this.opts.$data?this.$dataMetaSchema(Mc,zy):Mc;this.addMetaSchema(e,bo,!1),this.refs["http://json-schema.org/schema"]=bo}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(bo)?bo:void 0)}};le.Ajv=mr;md.exports=le=mr;md.exports.Ajv=mr;Object.defineProperty(le,"__esModule",{value:!0});le.default=mr;var Ky=Qr();Object.defineProperty(le,"KeywordCxt",{enumerable:!0,get:function(){return Ky.KeywordCxt}});var hr=V();Object.defineProperty(le,"_",{enumerable:!0,get:function(){return hr._}});Object.defineProperty(le,"str",{enumerable:!0,get:function(){return hr.str}});Object.defineProperty(le,"stringify",{enumerable:!0,get:function(){return hr.stringify}});Object.defineProperty(le,"nil",{enumerable:!0,get:function(){return hr.nil}});Object.defineProperty(le,"Name",{enumerable:!0,get:function(){return hr.Name}});Object.defineProperty(le,"CodeGen",{enumerable:!0,get:function(){return hr.CodeGen}});var Qy=eo();Object.defineProperty(le,"ValidationError",{enumerable:!0,get:function(){return Qy.default}});var Jy=Jr();Object.defineProperty(le,"MissingRefError",{enumerable:!0,get:function(){return Jy.default}})});var _w={};Bm(_w,{APIFunctions:()=>Cd,APIValidators:()=>Sd,AggregateTransferManyTxInputSchema:()=>Na,AggregateTransferManyTxOutputSchema:()=>Ua,AggregateTransfersFnInputSchema:()=>On,AggregateTransfersFnOutputSchema:()=>wn,AuthenticationCheckTxInputSchema:()=>qa,AuthenticationCheckTxOutputSchema:()=>Ba,Client:()=>br,ClientFunctions:()=>R,ClientFunctionsEnum:()=>em,ClientQueryBuilderFunctionsEnum:()=>tm,ClientValidators:()=>uw,ConstsSchema:()=>qt,CreateAccessTokenFnInputSchema:()=>In,CreateAccessTokenFnOutputSchema:()=>jn,CreateAccessTokenTxInputSchema:()=>La,CreateAccessTokenTxOutputSchema:()=>Va,CreateContractFnInputSchema:()=>vn,CreateContractFnOutputSchema:()=>kn,CreateContractTxInputSchema:()=>Ha,CreateContractTxOutputSchema:()=>za,CreateDepositFnInputSchema:()=>Sn,CreateDepositFnOutputSchema:()=>Cn,CreateDepositTxInputSchema:()=>Ka,CreateDepositTxOutputSchema:()=>Qa,CreateDistributionTxInputSchema:()=>Ja,CreateDistributionTxOutputSchema:()=>Xa,CreateExchangeFnInputSchema:()=>Pn,CreateExchangeFnOutputSchema:()=>Gn,CreateTokenFnInputSchema:()=>Dn,CreateTokenFnOutputSchema:()=>En,CreateTokenTxInputSchema:()=>Ya,CreateTokenTxOutputSchema:()=>Za,CreateTransferFnInputSchema:()=>Rn,CreateTransferFnOutputSchema:()=>Mn,CreateTransferGroupFnInputSchema:()=>Wn,CreateTransferGroupFnOutputSchema:()=>An,CreateTransferGroupTxInputSchema:()=>rs,CreateTransferGroupTxOutputSchema:()=>ns,CreateTransferManyTxInputSchema:()=>as,CreateTransferManyTxOutputSchema:()=>ss,CreateTransferTxInputSchema:()=>es,CreateTransferTxOutputSchema:()=>ts,CreateTransfersFnInputSchema:()=>Nn,CreateTransfersFnOutputSchema:()=>Un,CreateWalletFnInputSchema:()=>qn,CreateWalletFnOutputSchema:()=>Bn,CreateWalletTxInputSchema:()=>is,CreateWalletTxOutputSchema:()=>os,CreateWithdrawalFnInputSchema:()=>Ln,CreateWithdrawalFnOutputSchema:()=>Vn,CreateWithdrawalTxInputSchema:()=>ps,CreateWithdrawalTxOutputSchema:()=>ds,DbFilterFunctionBasicEnum:()=>Vd,DbFilterFunctionInEnum:()=>Hd,DbFilterFunctionMetadataBasicEnum:()=>Ld,DbFilterFunctionMetadataInEnum:()=>zd,DbFilterFunctionMetadataNullEnum:()=>Kd,DbFilterFunctionNullEnum:()=>Qd,DbFilterOperatorEnum:()=>Jd,DbFilterOperatorExtendedEnum:()=>Yd,DbFilterOperatorStringEnum:()=>Xd,DbModelNameEnum:()=>ff,ErrorMessage:()=>qe,Errors:()=>Gr,ExportDatabaseTxInputSchema:()=>fs,ExportDatabaseTxOutputSchema:()=>us,FindBalanceManyTxInputSchema:()=>ls,FindBalanceManyTxOutputSchema:()=>cs,FindBalancesFnInputSchema:()=>Hn,FindBalancesFnOutputSchema:()=>zn,FindTokenManyTxInputSchema:()=>ms,FindTokenManyTxOutputSchema:()=>hs,FindTokensFnInputSchema:()=>Kn,FindTokensFnOutputSchema:()=>Qn,FindTransferGroupManyTxInputSchema:()=>_s,FindTransferGroupManyTxOutputSchema:()=>gs,FindTransferGroupsFnInputSchema:()=>Jn,FindTransferGroupsFnOutputSchema:()=>Xn,FindTransferManyTxInputSchema:()=>Ts,FindTransferManyTxOutputSchema:()=>ys,FindTransfersFnInputSchema:()=>Yn,FindTransfersFnOutputSchema:()=>Zn,FindWalletManyTxInputSchema:()=>bs,FindWalletManyTxOutputSchema:()=>Fs,FindWalletsFnInputSchema:()=>ea,FindWalletsFnOutputSchema:()=>ta,FinishTransactionTxInputSchema:()=>xs,FinishTransactionTxOutputSchema:()=>$s,FnConstsSchema:()=>ra,GetBalanceFnInputSchema:()=>na,GetBalanceFnOutputSchema:()=>aa,GetBalanceHistoryFnInputSchema:()=>sa,GetBalanceHistoryFnOutputSchema:()=>ia,GetBalanceHistoryTxInputSchema:()=>Is,GetBalanceHistoryTxOutputSchema:()=>js,GetBalanceTxInputSchema:()=>Os,GetBalanceTxOutputSchema:()=>ws,GetDatabaseExportProgressTxInputSchema:()=>vs,GetDatabaseExportProgressTxOutputSchema:()=>ks,GetDatabaseImportProgressTxInputSchema:()=>Ss,GetDatabaseImportProgressTxOutputSchema:()=>Cs,GetFlagsFnInputSchema:()=>oa,GetFlagsFnOutputSchema:()=>pa,GetFlagsTxInputSchema:()=>Ps,GetFlagsTxOutputSchema:()=>Gs,GetStatisticsFnInputSchema:()=>da,GetStatisticsFnOutputSchema:()=>fa,GetStatisticsTxInputSchema:()=>Ds,GetStatisticsTxOutputSchema:()=>Es,GetTokenFnInputSchema:()=>ua,GetTokenFnOutputSchema:()=>la,GetTokenManyTxInputSchema:()=>Ws,GetTokenManyTxOutputSchema:()=>As,GetTokenTxInputSchema:()=>Rs,GetTokenTxOutputSchema:()=>Ms,GetTransferFnInputSchema:()=>ca,GetTransferFnOutputSchema:()=>ma,GetTransferGroupFnInputSchema:()=>ha,GetTransferGroupFnOutputSchema:()=>_a,GetTransferGroupTxInputSchema:()=>qs,GetTransferGroupTxOutputSchema:()=>Bs,GetTransferTxInputSchema:()=>Ns,GetTransferTxOutputSchema:()=>Us,GetWalletFnInputSchema:()=>ga,GetWalletFnOutputSchema:()=>Ta,GetWalletManyTxInputSchema:()=>Hs,GetWalletManyTxOutputSchema:()=>zs,GetWalletTxInputSchema:()=>Ls,GetWalletTxOutputSchema:()=>Vs,ITxAggregatorSimpleEnum:()=>Id,ITxDistributorLeftoverRuleEnum:()=>jd,ITxMetadataActionEnum:()=>vd,ITxMetadataActionForReverseEnum:()=>kd,ITxPeriodSimpleEnum:()=>Ci,ImportActionsTxInputSchema:()=>Lt,ImportActionsTxOutputSchema:()=>Ks,ImportDataFnInputSchema:()=>Bt,ImportDataFnOutputSchema:()=>ya,ImportDatabaseTxInputSchema:()=>Qs,ImportDatabaseTxOutputSchema:()=>Js,ListDatabaseExportsTxInputSchema:()=>Xs,ListDatabaseExportsTxOutputSchema:()=>Ys,QueryBuilder:()=>De,QueryLogsTxInputSchema:()=>ti,QueryLogsTxOutputSchema:()=>ri,QueryTxInputSchema:()=>Zs,QueryTxOutputSchema:()=>ei,ResetDatabaseTxInputSchema:()=>ni,ResetDatabaseTxOutputSchema:()=>ai,ReverseTransferFnInputSchema:()=>ba,ReverseTransferFnOutputSchema:()=>Fa,ReverseTransferGroupFnInputSchema:()=>xa,ReverseTransferGroupFnOutputSchema:()=>$a,ReverseTransferGroupManyTxInputSchema:()=>di,ReverseTransferGroupManyTxOutputSchema:()=>fi,ReverseTransferGroupTxInputSchema:()=>oi,ReverseTransferGroupTxOutputSchema:()=>pi,ReverseTransferManyTxInputSchema:()=>ui,ReverseTransferManyTxOutputSchema:()=>li,ReverseTransferTxInputSchema:()=>si,ReverseTransferTxOutputSchema:()=>ii,ReverseTransfersFnInputSchema:()=>Oa,ReverseTransfersFnOutputSchema:()=>wa,SetFlagsFnInputSchema:()=>Ia,SetFlagsFnOutputSchema:()=>ja,SetFlagsTxInputSchema:()=>ci,SetFlagsTxOutputSchema:()=>mi,StartTransactionTxInputSchema:()=>hi,StartTransactionTxOutputSchema:()=>_i,StreamPromise:()=>mt,TokenStatusEnum:()=>ef,TokenTableInputSchema:()=>fn,TokenTableSchema:()=>un,TokenTypeEnum:()=>Zd,TransferGroupStatusEnum:()=>tf,TransferGroupTableInputSchema:()=>mn,TransferGroupTableSchema:()=>hn,TransferGroupTypeEnum:()=>af,TransferLogTableInputSchema:()=>_n,TransferLogTableSchema:()=>gn,TransferStatusEnum:()=>rf,TransferStatusInputEnum:()=>nf,TransferTableInputSchema:()=>ln,TransferTableSchema:()=>cn,TransferTypeEnum:()=>sf,TxConstsSchema:()=>gi,UpdateTokenFnInputSchema:()=>va,UpdateTokenFnOutputSchema:()=>ka,UpdateTokenTxInputSchema:()=>Ti,UpdateTokenTxOutputSchema:()=>yi,UpdateTransferFnInputSchema:()=>Sa,UpdateTransferFnOutputSchema:()=>Ca,UpdateTransferGroupFnInputSchema:()=>Pa,UpdateTransferGroupFnOutputSchema:()=>Ga,UpdateTransferGroupManyTxInputSchema:()=>Oi,UpdateTransferGroupManyTxOutputSchema:()=>wi,UpdateTransferGroupTxInputSchema:()=>xi,UpdateTransferGroupTxOutputSchema:()=>$i,UpdateTransferGroupsFnInputSchema:()=>Da,UpdateTransferGroupsFnOutputSchema:()=>Ea,UpdateTransferManyTxInputSchema:()=>Ii,UpdateTransferManyTxOutputSchema:()=>ji,UpdateTransferTxInputSchema:()=>bi,UpdateTransferTxOutputSchema:()=>Fi,UpdateTransfersFnInputSchema:()=>Ra,UpdateTransfersFnOutputSchema:()=>Ma,UpdateWalletFnInputSchema:()=>Wa,UpdateWalletFnOutputSchema:()=>Aa,UpdateWalletTxInputSchema:()=>vi,UpdateWalletTxOutputSchema:()=>ki,Validator:()=>Si,WalletStatusEnum:()=>pf,WalletTableInputSchema:()=>Tn,WalletTableSchema:()=>yn,WalletTokenSettingTableInputSchema:()=>bn,WalletTokenSettingTableSchema:()=>Fn,WalletTypeEnum:()=>of,WapiClientType:()=>sm,WapiSettingTableInputSchema:()=>xn,WapiSettingTableSchema:()=>$n,WapiSettingTypeEnum:()=>df,aggregateTransfers:()=>Nd,create:()=>mw,createAccessToken:()=>Ud,createContract:()=>qd,createDeposit:()=>Bd,createExchange:()=>uf,createToken:()=>lf,createTransfer:()=>cf,createTransferGroup:()=>mf,createTransfers:()=>hf,createWallet:()=>_f,createWithdrawal:()=>gf,findBalances:()=>Tf,findTokens:()=>yf,findTransferGroups:()=>bf,findTransfers:()=>Ff,findWallets:()=>xf,getBalance:()=>$f,getBalanceHistory:()=>Of,getFlags:()=>wf,getStatistics:()=>If,getToken:()=>jf,getTransfer:()=>vf,getTransferGroup:()=>kf,getWallet:()=>Sf,importData:()=>Cf,reverseTransfer:()=>Pf,reverseTransferGroup:()=>Gf,reverseTransfers:()=>Df,setFlags:()=>Ef,updateToken:()=>Rf,updateTransfer:()=>Mf,updateTransferGroup:()=>Wf,updateTransferGroups:()=>Af,updateTransfers:()=>Nf,updateWallet:()=>Uf,utils:()=>hw});var lu=WebSocket;function ie(...r){window.WAPI_DEBUG&&console.log(...r)}var nt=class extends Error{constructor({code:e,message:t,data:n,description:a}){var s;super(t),this.code=e,this.message=t,this.data=n,this.description=(s=a!=null?a:Hm[t])!=null?s:""}toJSON(){return{code:this.code,message:this.message,description:this.description,data:this.data}}},ko=class extends nt{constructor({message:e,data:t,code:n}){super({message:e,data:t,code:n||"DatabaseError"})}},Me=class extends nt{constructor({message:e,data:t,code:n}){super({message:e,data:t,code:n||"SchemaValidationError"})}},oe=class extends nt{constructor({message:e,data:t,code:n}){super({message:e,data:t,code:n||"InputError"})}},So=class extends nt{constructor({message:e,data:t,code:n}){super({message:e,data:t,code:n||"ConstraintError"})}},Co=class extends nt{constructor({message:e,data:t,code:n}){super({message:e,data:t,code:n||"UnknownError"})}},Sr=class extends nt{constructor({message:e,data:t,code:n}){super({message:e,data:t,code:n||"ConnectionError"})}},Cr=class extends nt{constructor({message:e,data:t,code:n}){super({message:e,data:t,code:n||"StreamError"})}},Pr=class extends nt{constructor({message:e,data:t,code:n}){super({message:e,data:t,code:n||"AuthenticationError"})}};function Po({message:r,data:e,code:t}){switch(t){case"SchemaValidationError":return new Me({message:r,data:e,code:t});case"DatabaseError":return new ko({message:r,data:e,code:t});case"InputError":return new oe({message:r,data:e,code:t});case"ConstraintError":return new So({message:r,data:e,code:t});case"ConnectionError":return new Sr({message:r,data:e,code:t});case"StreamError":return new Cr({message:r,data:e,code:t});case"AuthenticationError":return new Pr({message:r,data:e,code:t});default:return new Co({message:r,data:e,code:t})}}var Gr=(d=>(d.SchemaValidationError="SchemaValidationError",d.DatabaseError="DatabaseError",d.InputError="InputError",d.UnknownError="UnknownError",d.ConstraintError="ConstraintError",d.ConnectionError="ConnectionError",d.StreamError="StreamError",d.AuthenticationError="AuthenticationError",d))(Gr||{}),qe=(k=>(k.AUTHENTICATION_FAILED="AUTHENTICATION_FAILED",k.BAL_FUTURE_DATETIME="BAL_FUTURE_DATETIME",k.CONFLICTING_OPTIONS="CONFLICTING_OPTIONS",k.CONTRACT_OWNER_NOT_FOUND="CONTRACT_OWNER_NOT_FOUND",k.DATABASE_ERROR="DATABASE_ERROR",k.DISTRIBUTION_MISSING_TARGETS="DISTRIBUTION_MISSING_TARGETS",k.EXCHANGE_MISSING_TARGETS="EXCHANGE_MISSING_TARGETS",k.IMPORT_MISSING_CONTRACT_TOKEN="IMPORT_MISSING_CONTRACT_TOKEN",k.IMPORT_MISSING_TOKEN_WALLET="IMPORT_MISSING_TOKEN_WALLET",k.IMPORT_OBJECT_DUPLICATE="IMPORT_OBJECT_DUPLICATE",k.IMPORT_OBJECT_EXISTS="IMPORT_OBJECT_EXISTS",k.IMPORT_PREDATED_TRANSFER="IMPORT_PREDATED_TRANSFER",k.IMPORT_USE_BEFORE_CREATE="IMPORT_USE_BEFORE_CREATE",k.INPUT_NEEDS_IDENTIFIER="INPUT_NEEDS_IDENTIFIER",k.INPUT_NEEDS_TOKEN="INPUT_NEEDS_TOKEN",k.INPUT_STREAM_ERROR="INPUT_STREAM_ERROR",k.INPUT_STREAM_TIMEOUT="INPUT_STREAM_TIMEOUT",k.INPUT_STREAM_INVALID="INPUT_STREAM_INVALID",k.INPUT_STREAM_NOT_ALLOWED="INPUT_STREAM_NOT_ALLOWED",k.INPUT_INVALID="INPUT_INVALID",k.INVALID_COMPLEX_FILTER="INVALID_COMPLEX_FILTER",k.INVALID_FIELD_AGR_COMB="INVALID_FIELD_AGR_COMB",k.INVALID_FIELD_FOR_MODEL="INVALID_FIELD_FOR_MODEL",k.INVALID_LATEST_HASH="INVALID_LATEST_HASH",k.INVALID_MODEL="INVALID_MODEL",k.NO_METADATA_ON_MODEL="NO_METADATA_ON_MODEL",k.RUNNING_BALANCE_WITHOUT_WALLET="RUNNING_BALANCE_WITHOUT_WALLET",k.SIGNED_AMOUNT_WITHOUT_WALLET="SIGNED_AMOUNT_WITHOUT_WALLET",k.TOKEN_INVALID_WALLET="TOKEN_INVALID_WALLET",k.TOKEN_LIMIT_REACHED="TOKEN_LIMIT_REACHED",k.TR_AMOUNT_NOT_DIVISIBLE="TR_AMOUNT_NOT_DIVISIBLE",k.TR_CANCELLED_CANT_RV="TR_CANCELLED_CANT_RV",k.TR_CANT_UPDATE_TO_PENDING="TR_CANT_UPDATE_TO_PENDING",k.TR_DEPOSIT_CANT_RV_WITHOUT_FLAG="TR_DEPOSIT_CANT_RV_WITHOUT_FLAG",k.TR_FROM_WALLET_DEPOSIT="TR_FROM_WALLET_DEPOSIT",k.TR_FROM_WALLET_STATUS_CONSTRAINT="TR_FROM_WALLET_STATUS_CONSTRAINT",k.TR_INVALID_BALANCE="TR_INVALID_BALANCE",k.TR_INVALID_CANCELLED="TR_INVALID_CANCELLED",k.TR_TIMESTAMP_IN_PAST="TR_TIMESTAMP_IN_PAST",k.TR_TO_WALLET_STATUS_CONSTRAINT="TR_TO_WALLET_STATUS_CONSTRAINT",k.TR_TO_WALLET_WITHDRAWAL="TR_TO_WALLET_WITHDRAWAL",k.TR_TOKEN_DISABLED="TR_TOKEN_DISABLED",k.TR_TOKEN_DWONLY="TR_TOKEN_DWONLY",k.TR_TRG_CLOSED="TR_TRG_CLOSED",k.TR_TRG_STATUS_MISMATCH="TR_TRG_STATUS_MISMATCH",k.TR_WITHDRAWAL_CANT_RV_WITHOUT_FLAG="TR_WITHDRAWAL_CANT_RV_WITHOUT_FLAG",k.TRANSACTION_NOT_FOUND="TRANSACTION_NOT_FOUND",k.TRANSACTION_TIMEOUT="TRANSACTION_TIMEOUT",k.TRG_BALANCE_CHECK_REQUIRED_WITHOUT_STATUS_LOCK="TRG_BALANCE_CHECK_REQUIRED_WITHOUT_STATUS_LOCK",k.TRG_CANCELLED_CANT_RV="TRG_CANCELLED_CANT_RV",k.TRG_DEPOSIT_CANT_RV_WITHOUT_FLAG="TRG_DEPOSIT_CANT_RV_WITHOUT_FLAG",k.TRG_SINGLE_PENDING_TR_CANT_RV="TRG_SINGLE_PENDING_TR_CANT_RV",k.TRG_WITHDRAWAL_CANT_RV_WITHOUT_FLAG="TRG_WITHDRAWAL_CANT_RV_WITHOUT_FLAG",k.UNCLEAR_AGGREGATOR="UNCLEAR_AGGREGATOR",k.TR_MISSING_FILTER="TR_MISSING_FILTER",k.TRG_MISSING_FILTER="TRG_MISSING_FILTER",k.HTTP_BODY_SIZE="HTTP_BODY_SIZE",k.METHOD_DISABLED="METHOD_DISABLED",k.DATABASE_IMPORT_UNEXPECTED_ERROR="DATABASE_IMPORT_UNEXPECTED_ERROR",k.DATABASE_IMPORT_NOT_FOUND="DATABASE_IMPORT_NOT_FOUND",k.DATABASE_EXPORT_CONFLICT="DATABASE_EXPORT_CONFLICT",k.DATABASE_IMPORT_CONFLICT="DATABASE_IMPORT_CONFLICT",k.DATABASE_EXPORT_UNEXPECTED_ERROR="DATABASE_EXPORT_UNEXPECTED_ERROR",k.DATABASE_EXPORT_LIST_UNEXPECTED_ERROR="DATABASE_EXPORT_LIST_UNEXPECTED_ERROR",k.DATABASE_IMPORT_PROGRESS_NOT_FOUND="DATABASE_IMPORT_PROGRESS_NOT_FOUND",k.DATABASE_IMPORT_PROGRESS_UNEXPECTED_ERROR="DATABASE_IMPORT_PROGRESS_UNEXPECTED_ERROR",k.DATABASE_EXPORT_PROGRESS_NOT_FOUND="DATABASE_EXPORT_PROGRESS_NOT_FOUND",k.DATABASE_EXPORT_PROGRESS_UNEXPECTED_ERROR="DATABASE_EXPORT_PROGRESS_UNEXPECTED_ERROR",k))(qe||{}),Hm={AUTHENTICATION_FAILED:"Provided credentials are invalid",BAL_FUTURE_DATETIME:"Balance datetime can't be in the future",CONFLICTING_OPTIONS:"return_running_balance and return_running_balance_for can't be specified together",CONTRACT_OWNER_NOT_FOUND:"Unable to find Wallet specified as Contract token owner",DATABASE_ERROR:"Something went wrong in the DB layer",DISTRIBUTION_MISSING_TARGETS:"Unable to resolve all targets (Wallets, Tokens) for distribution request",EXCHANGE_MISSING_TARGETS:"Unable to resolve all targets (Wallets, Token) for exchange request",IMPORT_MISSING_CONTRACT_TOKEN:"The import contract specifies Token that does not exist",IMPORT_MISSING_TOKEN_WALLET:"The import results in invalid Token without valid Wallet",IMPORT_OBJECT_DUPLICATE:"The import includes create directives for same object multiple times",IMPORT_OBJECT_EXISTS:"The import includes create directives for already existing objects",IMPORT_PREDATED_TRANSFER:"The oldest Transfer in the import file is older than already existing Transfers in the WAPI instance",IMPORT_USE_BEFORE_CREATE:"The import includes create directive for object that is used in Transfer before create dateTime",INPUT_NEEDS_IDENTIFIER:"Missing identifier - automatically calculated identifiers conflict on identical input for 30s To make an identical transfer during that window you need to provide a unique identifier",INPUT_NEEDS_TOKEN:"token must be specified on input or in client config",INPUT_STREAM_ERROR:"Input stream emitted an error",INPUT_STREAM_TIMEOUT:"No data provided to input stream in 30s",INPUT_STREAM_INVALID:"Invalid input stream identifier provided",INPUT_STREAM_NOT_ALLOWED:"Method does not support input stream",INPUT_INVALID:"Invalid input on stream",INVALID_COMPLEX_FILTER:"The provided complex filter does not pass validation",INVALID_FIELD_AGR_COMB:"Provided aggregation field was not found on Model",INVALID_FIELD_FOR_MODEL:"Provided groupBy field was not found on Model",INVALID_LATEST_HASH:"Provided latest_control_hash does not match the latest outgoing Transfer from Wallet",INVALID_MODEL:"Provided Model name is invalid",NO_METADATA_ON_MODEL:"Can't use metadata field for grouping as current Model does not have metadata",RUNNING_BALANCE_WITHOUT_WALLET:"return_running_balance option requires Wallet filter to be specified",SIGNED_AMOUNT_WITHOUT_WALLET:"return_signed_balance option requires Wallet filter to be specified",TOKEN_INVALID_WALLET:"Invalid belongs_to wallet provided",TOKEN_LIMIT_REACHED:"Unable to issue more tokens as Token.limit has been reached",TR_AMOUNT_NOT_DIVISIBLE:"Transfer amount is not divisible by specified Token.divisor",TR_CANCELLED_CANT_RV:"Cancelled Transfer can not be reversed",TR_CANT_UPDATE_TO_PENDING:"Transfer status can only move from 'pending'->'finished'/'cancelled",TR_DEPOSIT_CANT_RV_WITHOUT_FLAG:"Deposits are expected connection points with outside systems, thus extra validation is required. Reversing a Transfer.type = 'deposit' requires reverse_deposit option to be true.",TR_FROM_WALLET_DEPOSIT:"From wallet can't be specified when doing a deposit",TR_FROM_WALLET_STATUS_CONSTRAINT:"From wallet.status doesn't allow this type of transfers",TR_INVALID_BALANCE:"Transfer results in invalid balance for a Wallet",TR_INVALID_CANCELLED:"Cant create cancelled transfer",TR_TIMESTAMP_IN_PAST:"Transfer.created_at must be the latest",TR_TO_WALLET_STATUS_CONSTRAINT:"To wallet.status doesn't allow this type of transfers",TR_TO_WALLET_WITHDRAWAL:"To wallet can't be specified when doing a withdrawal",TR_TOKEN_DISABLED:"Token status is set to 'disabled' - no new transfers allowed",TR_TOKEN_DWONLY:"Token status is set to 'dw-only' - only deposits or withdrawals allowed",TR_TRG_CLOSED:"Cant add Transfer to group. TransferGroup is closed",TR_TRG_STATUS_MISMATCH:"Transfers in transfer_group must match transfer_group.transfer_status",TR_WITHDRAWAL_CANT_RV_WITHOUT_FLAG:"Withdrawals are expected connection points with outside systems, thus extra validation is required. Reversing a Transfer.type = 'withdrawal' requires reverse_withdrawal option to be true.",TRANSACTION_NOT_FOUND:"No open DB transaction with provided was found",TRANSACTION_TIMEOUT:"Transaction timed out",TRG_BALANCE_CHECK_REQUIRED_WITHOUT_STATUS_LOCK:"For integrity reasons running balance validations are required if TransferGroup.transfer_status_lock = false",TRG_CANCELLED_CANT_RV:"Cancelled TransferGroup can not be reversed",TRG_DEPOSIT_CANT_RV_WITHOUT_FLAG:"TransferGroup includes Transfer.type = 'deposit', thus for extra validation the reverse_deposit option must be set true",TRG_SINGLE_PENDING_TR_CANT_RV:"Transfer is part of TransferGroup and can not be reversed separately",TRG_WITHDRAWAL_CANT_RV_WITHOUT_FLAG:"TransferGroup includes Transfer.type = 'withdrawal', thus for extra validation the reverse_withdrawal option must be set true",UNCLEAR_AGGREGATOR:"Invalid aggregator function provided",TR_MISSING_FILTER:"Transactions can't reversed or updated without valid filter",TRG_MISSING_FILTER:"Transaction groups can't reversed or updated without valid filter",HTTP_BODY_SIZE:"Http body size can't be more than 100MB",METHOD_DISABLED:"Method is disabled",DATABASE_IMPORT_UNEXPECTED_ERROR:"Unexpected error while importing database",DATABASE_IMPORT_NOT_FOUND:"Database import file not found",DATABASE_EXPORT_CONFLICT:"Database export already in progress",DATABASE_IMPORT_CONFLICT:"Database import already in progress",DATABASE_EXPORT_UNEXPECTED_ERROR:"Unexpected error while creating database export",DATABASE_EXPORT_LIST_UNEXPECTED_ERROR:"Unexpected error while listing database backups",DATABASE_IMPORT_PROGRESS_NOT_FOUND:"Import database progress not found",DATABASE_IMPORT_PROGRESS_UNEXPECTED_ERROR:"Unexpected error while getting database import progress",DATABASE_EXPORT_PROGRESS_NOT_FOUND:"Database backup progress not found",DATABASE_EXPORT_PROGRESS_UNEXPECTED_ERROR:"Unexpected error while getting database backup progress"};var Wi,zm=new Uint8Array(16);function Go(){if(!Wi&&(Wi=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Wi))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Wi(zm)}var be=[];for(let r=0;r<256;++r)be.push((r+256).toString(16).slice(1));function cu(r,e=0){return be[r[e+0]]+be[r[e+1]]+be[r[e+2]]+be[r[e+3]]+"-"+be[r[e+4]]+be[r[e+5]]+"-"+be[r[e+6]]+be[r[e+7]]+"-"+be[r[e+8]]+be[r[e+9]]+"-"+be[r[e+10]]+be[r[e+11]]+be[r[e+12]]+be[r[e+13]]+be[r[e+14]]+be[r[e+15]]}var Km=typeof crypto!="undefined"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Do={randomUUID:Km};function Qm(r,e,t){if(Do.randomUUID&&!e&&!r)return Do.randomUUID();r=r||{};let n=r.random||(r.rng||Go)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,e){t=t||0;for(let a=0;a<16;++a)e[t+a]=n[a];return e}return cu(n)}var tr=Qm;function Ct(r=8){return tr().split("-").pop().substr(0,r)}var Eo={timeouts:{},values:{},set(r,e){this.timeouts[r]=setTimeout(()=>this.clear(r),3e4),this.values[r]=e},get(r){return this.values[r]},getKey(r){let e=JSON.parse(JSON.stringify(r)),t="";return Object.keys(e).sort().forEach(n=>{let a="";e[n]&&typeof e[n]=="object"&&!Array.isArray(e[n])?a=this.getKey(e[n]):a=JSON.stringify(e[n]),t+=n+":"+a}),t},clear(r){this.timeouts[r]&&clearTimeout(this.timeouts[r]),delete this.timeouts[r],delete this.values[r]},clearAll(){Object.keys(this.timeouts).forEach(r=>{clearTimeout(this.timeouts[r])}),this.timeouts={},this.values={}}};function je(r){if(!r)return tr();let e=Eo.getKey(r);if(Eo.get(e))throw new oe({message:"INPUT_NEEDS_IDENTIFIER",data:r});let t=tr();return Eo.set(e,t),t}function _u(r){return new Promise(e=>setTimeout(e,r))}function gu(){return je()}function Ai(r){return JSON.parse(JSON.stringify(r))}function at(r,e,t){if(e in r){if(r[e]===void 0)throw new Me({message:`undefined provided for ${e}`,data:r});return r}if(!t)throw new Me({message:`${e} is required if no default set`,data:r});let n=Ai(r);return n[e]=t,n}function v(r){let e=Tu(r);if(e!=null)return{foreign:e}}function K(r){let e=Tu(r);if(e!=null)return{identifier:e}}function C({input:r,options:e,validate:t}){var a;let n=Ai(r);return(a=n.options)!=null||(n.options=e!=null?e:{}),t(n)}function Tu(r){return r==null?r:r+""}function Jm(r){return Object.keys(r).filter(e=>r[e]!==void 0).map(e=>`${encodeURIComponent(e)}=${encodeURIComponent(r[e])}`).join("&")}function mu(r){return r.host.replace(/^https:/,"wss:")+"?"+Jm({apikey:r.apikey,apisecret:r.apisecret,db:r.database,clientVersion:r.clientVersion})}function yu(r){return typeof window=="undefined"?[mu(r),{rejectUnauthorized:r.rejectUnauthorized}]:[mu(r)]}function Ni(r,e){let t={};return Object.keys(r).forEach(n=>{e[n]?typeof e[n]=="string"?t[e[n]]=r[n]:t[n]=e[n](r[n]):t[n]=r[n]}),t}function st(r){return r.split(",").map(e=>e.split(" ")).map(e=>{let[t,n]=e;return{field:t,direction:n==="desc"?"desc":"asc"}})}function bu(r){return new Date(r).setHours(0,0,0,0)>new Date().setHours(0,0,0,0)}function Xm(r){return r%4===0&&(r%100!==0||r%400===0)}var Ym=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,Zm=[0,31,28,31,30,31,30,31,31,30,31,30,31];function hu(r){let e=Ym.exec(r);if(!e)return!1;let t=+e[1],n=+e[2],a=+e[3];return n>=1&&n<=12&&a>=1&&a<=(n===2&&Xm(t)?29:Zm[n])}var eh=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i;function th(r,e){let t=eh.exec(r);if(!t)return!1;let n=+t[1],a=+t[2],s=+t[3],i=t[5];return(n<=23&&a<=59&&s<=59||n===23&&a===59&&s===60)&&(!e||i!=="")}var rh=/t|\s/i;function Fu(r){let e=r.split(rh);return e.length===1?hu(e[0]):e.length===2&&hu(e[0])&&th(e[1])}var Dr=class{constructor(e){this._data=[];this._error=[];this._end=[];this._finished=!1;this._options=e}on(e,t){switch(e){case"data":return this._data.push(t),this;case"end":return this._end.push(t),this;case"error":return this._error.push(t),this}}push(e){if(this._finished)throw new Error("Stream is closed");return e===null?this.end():(this._data.forEach(t=>t(e)),this)}error(e){if(this._finished)throw new Error("Stream is closed");return this._error.forEach(t=>t(e)),this}end(){if(this._finished)throw new Error("Stream is closed");return this._end.forEach(e=>e()),this._finished=!0,this}destroy(e){return this.error(e),this.end(),this}},Ui=class{constructor(){throw new TypeError("used in node version")}pipe(...e){throw new TypeError("used in node version")}pause(){throw new TypeError("used in node version")}resume(){throw new TypeError("used in node version")}on(...e){throw new TypeError("used in node version")}};var mt=class{constructor(e){this.streamObject=new Dr({objectMode:!0});this.outStreamObject=new Dr({objectMode:!0});this.started=!1;this.makeRequest=e}start(e){if(this.mode&&this.mode!==e)throw new Error("Already in use as "+this.mode);if(this.started)return;if(this.promise=new Promise((n,a)=>{this.resolve=n,this.reject=a}),this.started=!0,this.mode=e,this.makeRequest===void 0){this.streamObject.push(null),this.resolve(void 0);return}this.makeRequest(this.streamObject).catch(this.reject);let t=[];if(this.mode==="stream"){this.streamObject.on("data",n=>{if(n||this.outStreamObject.push(n),n.error){let a=Po(n.error);return this.outStreamObject.destroy(a),this.streamObject.destroy(a)}if(!n.prop){t.push(n);return}if(n.dataArr){let a=P({},n);delete a.dataArr,n.dataArr.forEach(s=>{this.outStreamObject.push(Z(P({},a),{data:s}))});return}this.outStreamObject.push(n)}).on("end",()=>{let n=t.pop();if(!n)return;let a=n.result;Object.keys(a).forEach(s=>{Array.isArray(a[s])&&(a[s].forEach(i=>{this.outStreamObject.push({type:"streamChunk",prop:s,data:i})}),a[s]=[])}),this.outStreamObject.push(n),this.outStreamObject.push(null)}).on("error",n=>{this.outStreamObject.destroy(n)});return}if(this.mode==="promise"){let n=new Map;this.streamObject.on("data",a=>{var i;if(a===void 0)return;if(a.error){let o=Po(a.error);return this.streamObject.destroy(o)}if(!a.prop){t.push(a);return}let s=(i=n.get(a.prop))!=null?i:[];a.dataArr?s.push(...a.dataArr):s.push(a.data),n.set(a.prop,s)}).on("end",()=>{let a=t.pop();if(!a)return;let s=a.result;if(!n.size)return this.resolve(s);let i=!1;n.forEach((o,d)=>{Array.isArray(s[d])?(o.push(...s[d]),s[d]=o):o.length===1?s[d]=o:(this.streamObject.destroy(new Cr({message:"Received multiple chunks for non-array property "+d,code:"StreamError",data:o})),i=!0)}),i||this.resolve(s)}).on("error",this.reject)}}then(e,t){return this.start("promise"),this.promise.then(e,t)}catch(e){return this.start("promise"),this.promise.catch(e)}stream(){return this.start("stream"),this.outStreamObject}};var Er=class extends mt{constructor(e,t){super(e),this.inputStream=t}input(e){return e?typeof e=="function"?(e(this.inputStream),this):(console.warn("currently disabled"),this):this.inputStream}};var Nc=Lm(Wc(),1);var hd={$schema:"http://json-schema.org/draft-07/schema",$id:"JSONRPCRequest",description:"A JSON RPC 2.0 request",oneOf:[{description:"An individual request",$ref:"#/definitions/request"}],definitions:{request:{type:"object",required:["jsonrpc","method"],properties:{jsonrpc:{enum:["2.0"]},method:{type:"string"},id:{type:["string","number","null"],note:["While allowed, null should be avoided: http://www.jsonrpc.org/specification#id1","While allowed, a number with a fractional part should be avoided: http://www.jsonrpc.org/specification#id2"]},params:{type:["array","object"]}}}}};var _d={$schema:"http://json-schema.org/draft-07/schema",$id:"JSONRPCResponse",description:"A JSON RPC 2.0 response",oneOf:[{$ref:"#/definitions/success"},{$ref:"#/definitions/error"}],definitions:{common:{required:["id","jsonrpc"],not:{description:"cannot have result and error at the same time",required:["result","error"]},type:"object",properties:{id:{type:["string","integer","null"],note:["spec says a number which should not contain a fractional part","We choose integer here, but this is unenforceable with some languages"]},jsonrpc:{enum:["2.0"]}}},success:{description:"A success. The result member is then required and can be anything.",allOf:[{$ref:"#/definitions/common"},{required:["result"]}]},error:{allOf:[{$ref:"#/definitions/common"},{required:["error"],properties:{error:{type:"object",required:["code","message"],properties:{code:{type:"integer",note:["unenforceable in some languages"]},message:{type:"string"},data:{description:"optional, can be anything"}}}}}]}}};var gd={$schema:"http://json-schema.org/draft-07/schema",$id:"ClientOptions",description:"Client input options",type:"object",properties:{client:{$ref:"#/definitions/ClientType"},connection:{anyOf:[{$ref:"#/definitions/ws_connection"},{$ref:"#/definitions/https_connection"}]}},required:["client","connection"],additionalProperties:!1,definitions:{ClientType:{$id:"ClientType",type:"string",enum:["ws","https"]},ws_connection:{description:"Connection options for ws api",type:"object",properties:{host:{description:"URL of the API",type:"string"},apikey:{description:"API key for the client",type:"string"},apisecret:{description:"API secret for the client",type:"string"}},required:["host","apikey","apisecret"]},https_connection:{description:"Connection options for https api",type:"object",properties:{host:{description:"URL of the API",type:"string"},jwt:{description:"Auth token for calling api",type:"string"}},required:["host"]}}};var qt={$schema:"http://json-schema.org/draft-07/schema",$id:"Consts",description:"Enums and consts used by the system",definitions:{Flags:{$id:"Flags",$comment:"knex|manual",description:"Allowed filtering functions",type:"object",properties:{allow_timestamps:{description:"Allow setting timestamps in transfer insert/update statements",type:"boolean"},production:{description:"Is running in production mode?",type:"boolean"}},$typescript:'{"additionalProperties":false}'},DbFilterMetadata:{$id:"FilterMetadata",$comment:"knex|manual",description:"Metadata filtering object",type:"object",propertyNames:{type:"string",format:"validkey"},patternProperties:{".*":{type:["string","boolean","number"]}}},DbFilterFunctionWherePrimitive:{$id:"DbFilterFunctionWherePrimitive",$comment:"knex|manual",description:"Filtering for where and orWhere",type:"object",properties:{function:{$ref:"#/definitions/DbFilterFunctionBasic"},field:{type:"string"},operator:{$ref:"#/definitions/DbFilterOperatorExtended"},value:{type:["string","number","boolean"]}},required:["function","field","value"],$typescript:'{"additionalProperties": false}'},DbFilterFunctionWherePrimitiveForeign:{$id:"DbFilterFunctionWherePrimitiveForeign",$comment:"knex|manual",description:"Filtering for where and orWhere",type:"object",properties:{function:{$ref:"#/definitions/DbFilterFunctionBasic"},field:{type:"string"},operator:{$ref:"#/definitions/DbFilterOperatorExtended"},value:{anyOf:[{type:["string","number","boolean"]},{type:"object",properties:{foreign:{type:["string","number"]}},required:["foreign"],$typescript:'{"additionalProperties": false}'}]}},required:["function","field","value"],$typescript:'{"additionalProperties": false}'},DbFilterFunctionWherePrimitiveIdentifier:{$id:"DbFilterFunctionWherePrimitiveIdentifier",$comment:"knex|manual",description:"Filtering for where and orWhere",type:"object",properties:{function:{$ref:"#/definitions/DbFilterFunctionBasic"},field:{type:"string"},operator:{$ref:"#/definitions/DbFilterOperatorExtended"},value:{anyOf:[{type:["string","number","boolean"]},{type:"object",properties:{identifier:{type:["string","number"]}},required:["identifier"],$typescript:'{"additionalProperties": false}'}]}},required:["function","field","value"],$typescript:'{"additionalProperties": false}'},DbFilterFunctionWhereMetadataPrimitive:{$id:"DbFilterFunctionWhereMetadataPrimitive",$comment:"knex|manual",description:"Filtering for where and orWhere",type:"object",properties:{function:{$ref:"#/definitions/DbFilterFunctionMetadataBasic"},field:{type:"string"},operator:{$ref:"#/definitions/DbFilterOperatorExtended"},value:{type:["string","number","boolean"]}},required:["function","field","value"],$typescript:'{"additionalProperties": false}'},DbFilterFunctionMetadataBasic:{$id:"DbFilterFunctionMetadataBasic",$comment:"knex|manual",type:"string",enum:["whereMetadata","orWhereMetadata"]},DbFilterFunctionWhereObject:{$id:"DbFilterFunctionWhereObject",$comment:"knex|manual",description:"Filtering for where and orWhere",type:"object",properties:{function:{$ref:"#/definitions/DbFilterFunctionBasic"},value:{type:"object",properties:{metadata:{$ref:"#/definitions/DbFilterMetadata"}}}},required:["function","value"],$typescript:'{"additionalProperties": false}'},DbFilterFunctionBasic:{$id:"DbFilterFunctionBasic",$comment:"knex|manual",type:"string",enum:["where","orWhere"]},DbFilterFunctionWhereIns:{$id:"DbFilterFunctionWhereIns",$comment:"knex|manual",description:"Filtering for whereIn and orWhereIn",type:"object",properties:{function:{$ref:"#/definitions/DbFilterFunctionIn"},field:{type:"string"},value:{anyOf:[{type:"array",items:{type:"string"},minItems:1},{type:"array",items:{type:"number"},minItems:1}]}},required:["function","field","value"],$typescript:'{"additionalProperties": false}'},DbFilterFunctionIn:{$id:"DbFilterFunctionIn",$comment:"knex|manual",type:"string",enum:["whereIn","orWhereIn"]},DbFilterFunctionWhereMetadataIns:{$id:"DbFilterFunctionWhereMetadataIns",$comment:"knex|manual",description:"Filtering for whereIn and orWhereIn for metadata",type:"object",properties:{function:{$ref:"#/definitions/DbFilterFunctionMetadataIn"},field:{type:"string"},value:{anyOf:[{type:"array",items:{type:"string"},minItems:1},{type:"array",items:{type:"number"},minItems:1}]}},required:["function","field","value"],$typescript:'{"additionalProperties": false}'},DbFilterFunctionMetadataIn:{$id:"DbFilterFunctionMetadataIn",$comment:"knex|manual",type:"string",enum:["whereMetadataIn","orWhereMetadataIn"]},DbFilterFunctionWhereMetadataNulls:{$id:"DbFilterFunctionWhereMetadataNulls",$comment:"knex|manual",description:"Filtering for whereNull and orWhereNull, whereNotNull and orWhereNotNull for metadata",type:"object",properties:{function:{$ref:"#/definitions/DbFilterFunctionMetadataNull"},field:{type:"string"}},required:["function","field"],$typescript:'{"additionalProperties": false}'},DbFilterFunctionMetadataNull:{$id:"DbFilterFunctionMetadataNull",$comment:"knex|manual",type:"string",enum:["whereMetadataNull","orWhereMetadataNull","whereMetadataNotNull","orWhereMetadataNotNull"]},DbFilterFunctionWhereNulls:{$id:"DbFilterFunctionWhereNulls",$comment:"knex|manual",description:"Filtering for whereNull and orWhereNull, whereNotNull and orWhereNotNull",type:"object",properties:{function:{$ref:"#/definitions/DbFilterFunctionNull"},field:{type:"string"}},required:["function","field"],$typescript:'{"additionalProperties": false}'},DbFilterFunctionNull:{$id:"DbFilterFunctionNull",$comment:"knex|manual",type:"string",enum:["whereNull","orWhereNull","whereNotNull","orWhereNotNull"]},DbFilterOperator:{$id:"DbFilterOperator",$comment:"knex|manual",description:"Allowed filtering operators, ignored when value is not primitive",type:"string",enum:["=",">=","<=","<",">"],default:"="},DbFilterOperatorString:{$id:"DbFilterOperatorString",$comment:"knex|manual",description:"Allowed filtering operators for strings",type:"string",enum:["like","ilike"]},DbFilterOperatorExtended:{$id:"DbFilterOperatorExtended",$comment:"knex|manual",description:"Allowed filtering operators, ignored when value is not primitive",type:"string",enum:["=",">=","<=","<",">","like","ilike"],default:"="},DbFilter:{$id:"DbFilter",$comment:"knex|manual",anyOf:[{$ref:"#/definitions/DbFilterMetadata"},{$ref:"#/definitions/DbFilterFunctionWhereInner"},{$ref:"#/definitions/DbFilterFunctionWherePrimitive"},{$ref:"#/definitions/DbFilterFunctionWherePrimitiveForeign"},{$ref:"#/definitions/DbFilterFunctionWherePrimitiveIdentifier"},{$ref:"#/definitions/DbFilterFunctionWhereMetadataPrimitive"},{$ref:"#/definitions/DbFilterFunctionWhereObject"},{$ref:"#/definitions/DbFilterFunctionWhereIns"},{$ref:"#/definitions/DbFilterFunctionWhereMetadataIns"},{$ref:"#/definitions/DbFilterFunctionWhereMetadataNulls"},{$ref:"#/definitions/DbFilterFunctionWhereNulls"}]},DbFilterFunctionWhereInner:{$id:"DbFilterFunctionWhereInner",$comment:"knex|manual",description:"Filtering for where and orWhere",type:"object",properties:{function:{$ref:"#/definitions/DbFilterFunctionBasic"},inner:{type:"array",items:{$ref:"#/definitions/DbFilter"}}},required:["function","inner"],$typescript:'{"additionalProperties": false}'},TokenType:{$id:"TokenType",$comment:"model",description:"DB type values for TokenType",type:"string",enum:["value","share","group","contract"]},TokenStatus:{$id:"TokenStatus",$comment:"model",description:"DB type values for TokenStatus",type:"string",enum:["active","dw-only","disabled"]},TransferGroupStatus:{$id:"TransferGroupStatus",$comment:"model",description:"DB type values for TransferGroupStatus",type:"string",enum:["open","closed"]},TransferStatus:{$id:"TransferStatus",$comment:"model",description:"DB type values for TransferStatus",type:"string",enum:["pending","finished","cancelled"]},TransferStatusInput:{$id:"TransferStatusInput",$comment:"model",description:"DB type input values for TransferStatus",type:"string",enum:["pending","finished"]},TransferGroupType:{$id:"TransferGroupType",$comment:"model",description:"DB type values for TransferGroupType",type:"string",enum:["regular","exchange","distribution"]},TransferType:{$id:"TransferType",$comment:"model",description:"DB type values for TransferType",type:"string",enum:["transfer","deposit","withdrawal"]},WalletType:{$id:"WalletType",$comment:"model",description:"DB type values for WalletType",type:"string",enum:["token","house","regular"]},WalletStatus:{$id:"WalletStatus",$comment:"model",description:"DB type values for WalletStatus",type:"string",enum:["active","disabled"]},WapiSettingType:{$id:"WapiSettingType",$comment:"model",description:"DB type values for WapiSettingType",type:"string",enum:["flag","setting"]},DbModelName:{$id:"DbModelName",$comment:"model",description:"DB Model Names",type:"string",enum:["Token","TransferGroup","TransferLog","Transfer","WalletTokenSetting","Wallet","WapiSetting"]}}};var fn={$schema:"http://json-schema.org/draft-07/schema",$id:"TokenTableInput",title:"TokenTableInput",description:"Units of value which can be transferred in this system",type:"object",properties:{foreign:{description:"Name of the token, used for name based token transfers. Must be unique",type:"string",maxLength:255,minLength:1},public:{description:"Boolean indicating if token can be traded with outside seed wallet",default:!0,type:"boolean"},metadata:{description:"Key/value object describing the token",type:["object","null"]},divisor:{description:"Minimum amount of token that can be transferred",type:["number","null"]},limit:{description:"Maximum amount of token that can be issued",type:["number","null"]},type:{description:"Type of the token",default:"value",$ref:"/db/consts.schema.json#/definitions/TokenType"},status:{description:"Current status for the token",default:"active",$ref:"/db/consts.schema.json#/definitions/TokenStatus"}},additionalProperties:!1,required:["foreign"]};var un={$schema:"http://json-schema.org/draft-07/schema",$id:"TokenTable",title:"TokenTable",description:"Units of value which can be transferred in this system",type:"object",properties:{id:{description:"System defined primary key",type:"integer"},foreign:{description:"Name of the token, used for name based token transfers. Must be unique",type:"string",maxLength:255,minLength:1},public:{description:"Boolean indicating if token can be traded with outside seed wallet",default:!0,type:"boolean"},belongs_to:{description:"Foreign key to seed wallet",type:"integer"},created_at:{description:"Datetime when the token was created",type:"string",format:"date-time"},updated_at:{description:"Datetime when the token was last updated",type:"string",format:"date-time"},metadata:{description:"Key/value object describing the token",type:["object","null"]},divisor:{description:"Minimum amount of token that can be transferred",type:["number","null"]},limit:{description:"Maximum amount of token that can be issued",type:["number","null"]},type:{description:"Type of the token",default:"value",$ref:"/db/consts.schema.json#/definitions/TokenType"},status:{description:"Current status for the token",default:"active",$ref:"/db/consts.schema.json#/definitions/TokenStatus"}},additionalProperties:!1,definitions:{TokenTableAccessibleFields:{$id:"TokenTableAccessibleFields",type:"string",enum:["id","foreign","public","metadata","divisor","limit","type","status"]},TokenTableFields:{$id:"TokenTableFields",type:"string",enum:["id","foreign","public","belongs_to","created_at","updated_at","metadata","divisor","limit","type","status"]},TokenTableStringFields:{$id:"TokenTableStringFields",type:"string",enum:["foreign","created_at","updated_at","type","status"]},TokenTableObjectFields:{$id:"TokenTableObjectFields",type:"string",enum:["metadata"]},TokenTableNumberFields:{$id:"TokenTableNumberFields",type:"string",enum:["id","belongs_to","divisor","limit"]},TokenTableBooleanFields:{$id:"TokenTableBooleanFields",type:"string",enum:["public"]}},required:["id","foreign","public","belongs_to","created_at","updated_at","type","status"]};var Td={$schema:"http://json-schema.org/draft-07/schema",$id:"TokenTableOptional",title:"TokenTableOptional",description:"Units of value which can be transferred in this system Only require id, other fields are optional",type:"object",properties:{id:{description:"System defined primary key",type:"integer"},foreign:{description:"Name of the token, used for name based token transfers. Must be unique",type:"string",maxLength:255,minLength:1},public:{description:"Boolean indicating if token can be traded with outside seed wallet",default:!0,type:"boolean"},belongs_to:{description:"Foreign key to seed wallet",type:"integer"},created_at:{description:"Datetime when the token was created",type:"string",format:"date-time"},updated_at:{description:"Datetime when the token was last updated",type:"string",format:"date-time"},metadata:{description:"Key/value object describing the token",type:["object","null"]},divisor:{description:"Minimum amount of token that can be transferred",type:["number","null"]},limit:{description:"Maximum amount of token that can be issued",type:["number","null"]},type:{description:"Type of the token",default:"value",$ref:"/db/consts.schema.json#/definitions/TokenType"},status:{description:"Current status for the token",default:"active",$ref:"/db/consts.schema.json#/definitions/TokenStatus"}},additionalProperties:!1,required:["id"]};var ln={$schema:"http://json-schema.org/draft-07/schema",$id:"TransferTableInput",title:"TransferTableInput",description:"A transfer of value from one wallet to another",type:"object",properties:{identifier:{description:"Identifier for this transfer. Must be unique",type:"string",maxLength:255,minLength:1},control_hash:{description:'Hash binding this transfer to the from_wallets transfer chain. It is calculated as sha256(latest_outgoing_hash + "-" + NEW.identifier)',type:["string","null"],maxLength:255},from_wallet_id:{description:"Foreign key to wallet funds originate from",type:"integer"},to_wallet_id:{description:"Foreign key to wallet where funds are going",type:"integer"},token_id:{description:"Foreign key to token this transfer refers to",type:"integer"},amount:{description:"The transfer amount",type:"number"},type:{description:"Type of the transfer",default:"transfer",$ref:"/db/consts.schema.json#/definitions/TransferType"},status:{description:"Status of the transfer",default:"finished",$ref:"/db/consts.schema.json#/definitions/TransferStatusInput"},force:{description:"Set to true to force transfer without checking for negative balance constraints",default:!1,type:"boolean"},created_at:{description:"Datetime when this transfer was created - can only be latest",type:"string",format:"date-time"},updated_at:{description:"Datetime when this transfer was updated - can only be latest",type:"string",format:"date-time"},metadata:{description:"Key/value object describing this transfer",type:["object","null"]},transfer_group_id:{description:"Foreign key pointing to the transfer_group this transfer belongs to",type:["integer","null"]},reverses_id:{description:"Foreign key pointing to the transfer this transfer reverses. Must be unique",type:["integer","null"]},status_finalized_at:{description:"DateTime transfer reached final status",type:["string","null"],format:"date-time"}},additionalProperties:!1,required:["identifier","from_wallet_id","to_wallet_id","token_id","amount"]};var cn={$schema:"http://json-schema.org/draft-07/schema",$id:"TransferTable",title:"TransferTable",description:"A transfer of value from one wallet to another",type:"object",properties:{id:{description:"System defined primary key",type:"integer"},identifier:{description:"Identifier for this transfer. Must be unique",type:"string",maxLength:255,minLength:1},control_hash:{description:'Hash binding this transfer to the from_wallets transfer chain. It is calculated as sha256(latest_outgoing_hash + "-" + NEW.identifier)',type:["string","null"],maxLength:255},from_wallet_id:{description:"Foreign key to wallet funds originate from",type:"integer"},to_wallet_id:{description:"Foreign key to wallet where funds are going",type:"integer"},token_id:{description:"Foreign key to token this transfer refers to",type:"integer"},amount:{description:"The transfer amount",type:"number"},type:{description:"Type of the transfer",default:"transfer",$ref:"/db/consts.schema.json#/definitions/TransferType"},status:{description:"Status of the transfer",default:"finished",$ref:"/db/consts.schema.json#/definitions/TransferStatus"},force:{description:"Set to true to force transfer without checking for negative balance constraints",default:!1,type:"boolean"},auto_hash:{description:"When set to true it will automatically calculate the control_hash",default:!1,type:"boolean"},created_at:{description:"Datetime when this transfer was created - can only be latest",type:"string",format:"date-time"},updated_at:{description:"Datetime when this transfer was updated - can only be latest",type:"string",format:"date-time"},metadata:{description:"Key/value object describing this transfer",type:["object","null"]},transfer_group_id:{description:"Foreign key pointing to the transfer_group this transfer belongs to",type:["integer","null"]},reverses_id:{description:"Foreign key pointing to the transfer this transfer reverses. Must be unique",type:["integer","null"]},status_finalized_at:{description:"DateTime transfer reached final status",type:["string","null"],format:"date-time"},group_validate:{description:"Boolean showing if the transfer_group has validate_final_balance_only",default:!1,type:"boolean"}},additionalProperties:!1,definitions:{TransferTableAccessibleFields:{$id:"TransferTableAccessibleFields",type:"string",enum:["id","identifier","control_hash","from_wallet_id","to_wallet_id","token_id","amount","type","status","force","created_at","updated_at","metadata","transfer_group_id","reverses_id","status_finalized_at"]},TransferTableFields:{$id:"TransferTableFields",type:"string",enum:["id","identifier","control_hash","from_wallet_id","to_wallet_id","token_id","amount","type","status","force","auto_hash","created_at","updated_at","metadata","transfer_group_id","reverses_id","status_finalized_at"]},TransferTableStringFields:{$id:"TransferTableStringFields",type:"string",enum:["identifier","control_hash","type","status","created_at","updated_at","status_finalized_at"]},TransferTableObjectFields:{$id:"TransferTableObjectFields",type:"string",enum:["metadata"]},TransferTableNumberFields:{$id:"TransferTableNumberFields",type:"string",enum:["id","from_wallet_id","to_wallet_id","token_id","amount","transfer_group_id","reverses_id"]},TransferTableBooleanFields:{$id:"TransferTableBooleanFields",type:"string",enum:["force","auto_hash"]}},required:["id","identifier","from_wallet_id","to_wallet_id","token_id","amount","type","status","force","auto_hash","created_at","updated_at"]};var yd={$schema:"http://json-schema.org/draft-07/schema",$id:"TransferTableOptional",title:"TransferTableOptional",description:"A transfer of value from one wallet to another Only require id, other fields are optional",type:"object",properties:{id:{description:"System defined primary key",type:"integer"},identifier:{description:"Identifier for this transfer. Must be unique",type:"string",maxLength:255,minLength:1},control_hash:{description:'Hash binding this transfer to the from_wallets transfer chain. It is calculated as sha256(latest_outgoing_hash + "-" + NEW.identifier)',type:["string","null"],maxLength:255},from_wallet_id:{description:"Foreign key to wallet funds originate from",type:"integer"},to_wallet_id:{description:"Foreign key to wallet where funds are going",type:"integer"},token_id:{description:"Foreign key to token this transfer refers to",type:"integer"},amount:{description:"The transfer amount",type:"number"},type:{description:"Type of the transfer",default:"transfer",$ref:"/db/consts.schema.json#/definitions/TransferType"},status:{description:"Status of the transfer",default:"finished",$ref:"/db/consts.schema.json#/definitions/TransferStatus"},force:{description:"Set to true to force transfer without checking for negative balance constraints",default:!1,type:"boolean"},auto_hash:{description:"When set to true it will automatically calculate the control_hash",default:!1,type:"boolean"},created_at:{description:"Datetime when this transfer was created - can only be latest",type:"string",format:"date-time"},updated_at:{description:"Datetime when this transfer was updated - can only be latest",type:"string",format:"date-time"},metadata:{description:"Key/value object describing this transfer",type:["object","null"]},transfer_group_id:{description:"Foreign key pointing to the transfer_group this transfer belongs to",type:["integer","null"]},reverses_id:{description:"Foreign key pointing to the transfer this transfer reverses. Must be unique",type:["integer","null"]},status_finalized_at:{description:"DateTime transfer reached final status",type:["string","null"],format:"date-time"},group_validate:{description:"Boolean showing if the transfer_group has validate_final_balance_only",default:!1,type:"boolean"}},additionalProperties:!1,required:["id"]};var mn={$schema:"http://json-schema.org/draft-07/schema",$id:"TransferGroupTableInput",title:"TransferGroupTableInput",description:"An entity collecting transfers into a group locked by status",type:"object",properties:{identifier:{description:"Identifier for this transfer. Must be unique",type:"string",maxLength:255,minLength:1},status:{description:"Lifecycle status for transfer group",default:"open",$ref:"/db/consts.schema.json#/definitions/TransferGroupStatus"},transfer_status:{description:"Status of the transfer",default:"pending",$ref:"/db/consts.schema.json#/definitions/TransferStatusInput"},metadata:{description:"Key/value object describing this transfer_group",type:["object","null"]},reverses_id:{description:"Foreign key pointing to the transfer_group this transfer_group reverses",type:["integer","null"]},status_finalized_at:{description:"Time transfer_group was closed",type:["string","null"],format:"date-time"},transfer_status_finalized_at:{description:"Time transfer_status reached final state. Must be unique",type:["string","null"],format:"date-time"},type:{description:"Type of the transfer group",default:"regular",$ref:"/db/consts.schema.json#/definitions/TransferGroupType"}},additionalProperties:!1,required:["identifier"]};var hn={$schema:"http://json-schema.org/draft-07/schema",$id:"TransferGroupTable",title:"TransferGroupTable",description:"An entity collecting transfers into a group locked by status",type:"object",properties:{id:{description:"System defined primary key",type:"integer"},identifier:{description:"Identifier for this transfer. Must be unique",type:"string",maxLength:255,minLength:1},status:{description:"Lifecycle status for transfer group",default:"open",$ref:"/db/consts.schema.json#/definitions/TransferGroupStatus"},transfer_status:{description:"Status of the transfer",default:"pending",$ref:"/db/consts.schema.json#/definitions/TransferStatus"},metadata:{description:"Key/value object describing this transfer_group",type:["object","null"]},created_at:{description:"Datetime when this transfer was created",type:"string",format:"date-time"},updated_at:{description:"Datetime when this transfer was updated",type:"string",format:"date-time"},reverses_id:{description:"Foreign key pointing to the transfer_group this transfer_group reverses",type:["integer","null"]},status_finalized_at:{description:"Time transfer_group was closed",type:["string","null"],format:"date-time"},transfer_status_finalized_at:{description:"Time transfer_status reached final state. Must be unique",type:["string","null"],format:"date-time"},type:{description:"Type of the transfer group",default:"regular",$ref:"/db/consts.schema.json#/definitions/TransferGroupType"},validate_final_balance_only:{description:"Boolean if only the final balances of wallets should be validated",default:!1,type:"boolean"}},additionalProperties:!1,definitions:{TransferGroupTableAccessibleFields:{$id:"TransferGroupTableAccessibleFields",type:"string",enum:["id","identifier","status","transfer_status","metadata","reverses_id","status_finalized_at","transfer_status_finalized_at","type"]},TransferGroupTableFields:{$id:"TransferGroupTableFields",type:"string",enum:["id","identifier","status","transfer_status","metadata","created_at","updated_at","reverses_id","status_finalized_at","transfer_status_finalized_at","type","validate_final_balance_only"]},TransferGroupTableStringFields:{$id:"TransferGroupTableStringFields",type:"string",enum:["identifier","status","transfer_status","created_at","updated_at","status_finalized_at","transfer_status_finalized_at","type"]},TransferGroupTableObjectFields:{$id:"TransferGroupTableObjectFields",type:"string",enum:["metadata"]},TransferGroupTableNumberFields:{$id:"TransferGroupTableNumberFields",type:"string",enum:["id","reverses_id"]},TransferGroupTableBooleanFields:{$id:"TransferGroupTableBooleanFields",type:"string",enum:["validate_final_balance_only"]}},required:["id","identifier","status","transfer_status","created_at","updated_at","type","validate_final_balance_only"]};var bd={$schema:"http://json-schema.org/draft-07/schema",$id:"TransferGroupTableOptional",title:"TransferGroupTableOptional",description:"An entity collecting transfers into a group locked by status Only require id, other fields are optional",type:"object",properties:{id:{description:"System defined primary key",type:"integer"},identifier:{description:"Identifier for this transfer. Must be unique",type:"string",maxLength:255,minLength:1},status:{description:"Lifecycle status for transfer group",default:"open",$ref:"/db/consts.schema.json#/definitions/TransferGroupStatus"},transfer_status:{description:"Status of the transfer",default:"pending",$ref:"/db/consts.schema.json#/definitions/TransferStatus"},metadata:{description:"Key/value object describing this transfer_group",type:["object","null"]},created_at:{description:"Datetime when this transfer was created",type:"string",format:"date-time"},updated_at:{description:"Datetime when this transfer was updated",type:"string",format:"date-time"},reverses_id:{description:"Foreign key pointing to the transfer_group this transfer_group reverses",type:["integer","null"]},status_finalized_at:{description:"Time transfer_group was closed",type:["string","null"],format:"date-time"},transfer_status_finalized_at:{description:"Time transfer_status reached final state. Must be unique",type:["string","null"],format:"date-time"},type:{description:"Type of the transfer group",default:"regular",$ref:"/db/consts.schema.json#/definitions/TransferGroupType"},validate_final_balance_only:{description:"Boolean if only the final balances of wallets should be validated",default:!1,type:"boolean"}},additionalProperties:!1,required:["id"]};var _n={$schema:"http://json-schema.org/draft-07/schema",$id:"TransferLogTableInput",title:"TransferLogTableInput",description:"This table is readonly, so no input is valid",$comment:"READONLY",type:"object",properties:{},additionalProperties:!1};var gn={$schema:"http://json-schema.org/draft-07/schema",$id:"TransferLogTable",title:"TransferLogTable",description:"Individual parts of a transfer, will be updated internally by db. Immutable",$comment:"READONLY",type:"object",properties:{id:{description:"System defined primary key",type:"integer"},transfer_id:{description:"Foreign key pointing to the transfer this log belongs to",type:"integer"},wallet_id:{description:"Foreign key pointing to the wallet this log refers to",type:"integer"},token_id:{description:"Foreign key pointing to the token this log refers to",type:"integer"},type:{description:"Type of this log",$ref:"/db/consts.schema.json#/definitions/TransferType"},amount:{description:"The amount the wallet balance is changed by",type:"number"},pending_amount:{description:"The pending balance of wallet after this transfer_log",type:"number"},finished_amount:{description:"The finished balance of wallet after this transfer_log",type:"number"},status:{description:"Status of this log - same as Transfer.status",$ref:"/db/consts.schema.json#/definitions/TransferStatus"},allow_negative:{description:"Boolean indicating if wallet (pending_amount + finished_amount) can be negative",default:!1,type:"boolean"},allow_positive:{description:"Boolean indicating if wallet (pending_amount + finished_amount) can be positive. Used for token balance to deny positive balance.",default:!0,type:"boolean"},force:{description:"Boolean indicating if the latest transfer from this wallet was forced to ignore negative balance checks",default:!1,type:"boolean"},created_at:{description:"Datetime this log was created",type:"string",format:"date-time"},latest_control_hash:{description:"Latest hash related to this wallet",type:["string","null"],maxLength:255},pending_amount_to:{description:"The incoming pending balance",type:"number"},pending_amount_from:{description:"The outgoing pending balance",type:"number"},group_balance:{description:"Running balance for the wallet in this group",type:["number","null"]},transfer_group_id:{description:"Foreign key pointing to the transfer_group this transfer_log belongs to",type:["integer","null"]},current:{description:"Boolean showing if this transfer_log is the latest for this wallet/token combination",default:!1,type:"boolean"},available_balance:{description:"Available balance that is sum of pending_amount_from and finished_amount",type:"number"},token_limit:{description:"If wallet = token.belongs_to and token has limit",type:["number","null"]}},additionalProperties:!1,definitions:{TransferLogTableAccessibleFields:{$id:"TransferLogTableAccessibleFields",type:"string",enum:["id","transfer_id","wallet_id","token_id","type","amount","pending_amount","finished_amount","status","created_at","pending_amount_to","pending_amount_from","available_balance","token_limit"]},TransferLogTableFields:{$id:"TransferLogTableFields",type:"string",enum:["id","transfer_id","wallet_id","token_id","type","amount","pending_amount","finished_amount","status","allow_negative","allow_positive","force","created_at","latest_control_hash","pending_amount_to","pending_amount_from","group_balance","current","available_balance","token_limit"]},TransferLogTableStringFields:{$id:"TransferLogTableStringFields",type:"string",enum:["type","status","created_at","latest_control_hash"]},TransferLogTableNumberFields:{$id:"TransferLogTableNumberFields",type:"string",enum:["id","transfer_id","wallet_id","token_id","amount","pending_amount","finished_amount","pending_amount_to","pending_amount_from","group_balance","available_balance","token_limit"]},TransferLogTableBooleanFields:{$id:"TransferLogTableBooleanFields",type:"string",enum:["allow_negative","allow_positive","force","current"]}},required:["id","transfer_id","wallet_id","token_id","type","amount","pending_amount","finished_amount","status","allow_negative","allow_positive","force","created_at","pending_amount_to","pending_amount_from","current","available_balance"]};var Fd={$schema:"http://json-schema.org/draft-07/schema",$id:"TransferLogTableOptional",title:"TransferLogTableOptional",description:"Individual parts of a transfer, will be updated internally by db. Immutable Only require id, other fields are optional",$comment:"READONLY",type:"object",properties:{id:{description:"System defined primary key",type:"integer"},transfer_id:{description:"Foreign key pointing to the transfer this log belongs to",type:"integer"},wallet_id:{description:"Foreign key pointing to the wallet this log refers to",type:"integer"},token_id:{description:"Foreign key pointing to the token this log refers to",type:"integer"},type:{description:"Type of this log",$ref:"/db/consts.schema.json#/definitions/TransferType"},amount:{description:"The amount the wallet balance is changed by",type:"number"},pending_amount:{description:"The pending balance of wallet after this transfer_log",type:"number"},finished_amount:{description:"The finished balance of wallet after this transfer_log",type:"number"},status:{description:"Status of this log - same as Transfer.status",$ref:"/db/consts.schema.json#/definitions/TransferStatus"},allow_negative:{description:"Boolean indicating if wallet (pending_amount + finished_amount) can be negative",default:!1,type:"boolean"},allow_positive:{description:"Boolean indicating if wallet (pending_amount + finished_amount) can be positive. Used for token balance to deny positive balance.",default:!0,type:"boolean"},force:{description:"Boolean indicating if the latest transfer from this wallet was forced to ignore negative balance checks",default:!1,type:"boolean"},created_at:{description:"Datetime this log was created",type:"string",format:"date-time"},latest_control_hash:{description:"Latest hash related to this wallet",type:["string","null"],maxLength:255},pending_amount_to:{description:"The incoming pending balance",type:"number"},pending_amount_from:{description:"The outgoing pending balance",type:"number"},group_balance:{description:"Running balance for the wallet in this group",type:["number","null"]},transfer_group_id:{description:"Foreign key pointing to the transfer_group this transfer_log belongs to",type:["integer","null"]},current:{description:"Boolean showing if this transfer_log is the latest for this wallet/token combination",default:!1,type:"boolean"},available_balance:{description:"Available balance that is sum of pending_amount_from and finished_amount",type:"number"},token_limit:{description:"If wallet = token.belongs_to and token has limit",type:["number","null"]}},additionalProperties:!1,required:["id"]};var Tn={$schema:"http://json-schema.org/draft-07/schema",$id:"WalletTableInput",title:"WalletTableInput",description:"Entities who can make transfers in this system",type:"object",properties:{foreign:{description:"User provided key for wallet. Must be unique",type:"string",maxLength:64,minLength:1},name:{description:"Name of the wallet",type:["string","null"],maxLength:255},metadata:{description:"Key/value metadata object",type:["object","null"]},type:{description:"Type of the wallet",default:"regular",$ref:"/db/consts.schema.json#/definitions/WalletType"},status:{description:"Current status for the wallet",default:"active",$ref:"/db/consts.schema.json#/definitions/WalletStatus"}},additionalProperties:!1,required:["foreign"]};var yn={$schema:"http://json-schema.org/draft-07/schema",$id:"WalletTable",title:"WalletTable",description:"Entities who can make transfers in this system",type:"object",properties:{id:{description:"System defined primary key",type:"integer"},foreign:{description:"User provided key for wallet. Must be unique",type:"string",maxLength:64,minLength:1},name:{description:"Name of the wallet",type:["string","null"],maxLength:255},metadata:{description:"Key/value metadata object",type:["object","null"]},type:{description:"Type of the wallet",default:"regular",$ref:"/db/consts.schema.json#/definitions/WalletType"},default_allow_negative:{description:"Boolean indicating if wallet (pending_amount + finished_amount) can be negative",default:!1,type:"boolean"},default_allow_positive:{description:"Boolean indicating if wallet (pending_amount + finished_amount) can be positive. Used for token balance to deny positive balance.",default:!0,type:"boolean"},created_at:{description:"Datetime when the wallet was created",type:"string",format:"date-time"},updated_at:{description:"Datetime when the wallet was last updated",type:"string",format:"date-time"},status:{description:"Current status for the wallet",default:"active",$ref:"/db/consts.schema.json#/definitions/WalletStatus"},default_dtw_to:{description:"Bitmap indicating default what types of transfers can originate from wallet",default:"110",type:"string",maxLength:255,minLength:1},default_dtw_from:{description:"Bitmap indicating default what types of transfers can end to wallet",default:"011",type:"string",maxLength:255,minLength:1}},additionalProperties:!1,definitions:{WalletTableAccessibleFields:{$id:"WalletTableAccessibleFields",type:"string",enum:["id","foreign","name","metadata","type","status"]},WalletTableFields:{$id:"WalletTableFields",type:"string",enum:["id","foreign","name","metadata","type","default_allow_negative","default_allow_positive","created_at","updated_at","status"]},WalletTableStringFields:{$id:"WalletTableStringFields",type:"string",enum:["foreign","name","type","created_at","updated_at","status"]},WalletTableObjectFields:{$id:"WalletTableObjectFields",type:"string",enum:["metadata"]},WalletTableNumberFields:{$id:"WalletTableNumberFields",type:"string",enum:["id"]},WalletTableBooleanFields:{$id:"WalletTableBooleanFields",type:"string",enum:["default_allow_negative","default_allow_positive"]}},required:["id","foreign","type","default_allow_negative","default_allow_positive","created_at","updated_at","status"]};var xd={$schema:"http://json-schema.org/draft-07/schema",$id:"WalletTableOptional",title:"WalletTableOptional",description:"Entities who can make transfers in this system Only require id, other fields are optional",type:"object",properties:{id:{description:"System defined primary key",type:"integer"},foreign:{description:"User provided key for wallet. Must be unique",type:"string",maxLength:64,minLength:1},name:{description:"Name of the wallet",type:["string","null"],maxLength:255},metadata:{description:"Key/value metadata object",type:["object","null"]},type:{description:"Type of the wallet",default:"regular",$ref:"/db/consts.schema.json#/definitions/WalletType"},default_allow_negative:{description:"Boolean indicating if wallet (pending_amount + finished_amount) can be negative",default:!1,type:"boolean"},default_allow_positive:{description:"Boolean indicating if wallet (pending_amount + finished_amount) can be positive. Used for token balance to deny positive balance.",default:!0,type:"boolean"},created_at:{description:"Datetime when the wallet was created",type:"string",format:"date-time"},updated_at:{description:"Datetime when the wallet was last updated",type:"string",format:"date-time"},status:{description:"Current status for the wallet",default:"active",$ref:"/db/consts.schema.json#/definitions/WalletStatus"},default_dtw_to:{description:"Bitmap indicating default what types of transfers can originate from wallet",default:"110",type:"string",maxLength:255,minLength:1},default_dtw_from:{description:"Bitmap indicating default what types of transfers can end to wallet",default:"011",type:"string",maxLength:255,minLength:1}},additionalProperties:!1,required:["id"]};var bn={$schema:"http://json-schema.org/draft-07/schema",$id:"WalletTokenSettingTableInput",title:"WalletTokenSettingTableInput",description:"Settings between a wallet and token",type:"object",properties:{},additionalProperties:!1};var Fn={$schema:"http://json-schema.org/draft-07/schema",$id:"WalletTokenSettingTable",title:"WalletTokenSettingTable",description:"Settings between a wallet and token",type:"object",properties:{id:{description:"System defined primary key",type:"integer"},wallet_id:{description:"Foreign key to wallet these settings refer to",type:"integer"},token_id:{description:"Foreign key to token these settings refer to",type:"integer"},allow_negative:{description:"Boolean indicating if wallet (pending_amount + finished_amount) can be negative",default:!1,type:"boolean"},allow_positive:{description:"Boolean indicating if wallet (pending_amount + finished_amount) can be positive. Used for token balance to deny positive balance.",default:!0,type:"boolean"},created_at:{description:"Datetime when the token was created",type:"string",format:"date-time"},updated_at:{description:"Datetime when the token was last updated",type:"string",format:"date-time"},dtw_to:{description:"Bitmap indicating default what types of transfers can originate from wallet",default:"110",type:"string",maxLength:255,minLength:1},dtw_from:{description:"Bitmap indicating default what types of transfers can end to wallet",default:"011",type:"string",maxLength:255,minLength:1}},additionalProperties:!1,definitions:{WalletTokenSettingTableAccessibleFields:{$id:"WalletTokenSettingTableAccessibleFields",type:"string",enum:["id"]},WalletTokenSettingTableFields:{$id:"WalletTokenSettingTableFields",type:"string",enum:["id","wallet_id","token_id","allow_negative","allow_positive","created_at","updated_at"]},WalletTokenSettingTableStringFields:{$id:"WalletTokenSettingTableStringFields",type:"string",enum:["created_at","updated_at"]},WalletTokenSettingTableNumberFields:{$id:"WalletTokenSettingTableNumberFields",type:"string",enum:["id","wallet_id","token_id"]},WalletTokenSettingTableBooleanFields:{$id:"WalletTokenSettingTableBooleanFields",type:"string",enum:["allow_negative","allow_positive"]}},required:["id","wallet_id","token_id","allow_negative","allow_positive","created_at","updated_at"]};var $d={$schema:"http://json-schema.org/draft-07/schema",$id:"WalletTokenSettingTableOptional",title:"WalletTokenSettingTableOptional",description:"Settings between a wallet and token Only require id, other fields are optional",type:"object",properties:{id:{description:"System defined primary key",type:"integer"},wallet_id:{description:"Foreign key to wallet these settings refer to",type:"integer"},token_id:{description:"Foreign key to token these settings refer to",type:"integer"},allow_negative:{description:"Boolean indicating if wallet (pending_amount + finished_amount) can be negative",default:!1,type:"boolean"},allow_positive:{description:"Boolean indicating if wallet (pending_amount + finished_amount) can be positive. Used for token balance to deny positive balance.",default:!0,type:"boolean"},created_at:{description:"Datetime when the token was created",type:"string",format:"date-time"},updated_at:{description:"Datetime when the token was last updated",type:"string",format:"date-time"},dtw_to:{description:"Bitmap indicating default what types of transfers can originate from wallet",default:"110",type:"string",maxLength:255,minLength:1},dtw_from:{description:"Bitmap indicating default what types of transfers can end to wallet",default:"011",type:"string",maxLength:255,minLength:1}},additionalProperties:!1,required:["id"]};var xn={$schema:"http://json-schema.org/draft-07/schema",$id:"WapiSettingTableInput",title:"WapiSettingTableInput",description:"Database settings",type:"object",properties:{type:{description:"",default:"flag",$ref:"/db/consts.schema.json#/definitions/WapiSettingType"},name:{description:"name of setting. Must be unique",type:"string",maxLength:32,minLength:1},value:{description:"value of setting",type:"string",minLength:1},applied:{description:"is setting applied",default:!1,type:"boolean"}},additionalProperties:!1,required:["name","value"]};var $n={$schema:"http://json-schema.org/draft-07/schema",$id:"WapiSettingTable",title:"WapiSettingTable",description:"Database settings",type:"object",properties:{id:{description:"System defined primary key",type:"integer"},type:{description:"",default:"flag",$ref:"/db/consts.schema.json#/definitions/WapiSettingType"},name:{description:"name of setting. Must be unique",type:"string",maxLength:32,minLength:1},value:{description:"value of setting",type:"string",minLength:1},applied:{description:"is setting applied",default:!1,type:"boolean"},created_at:{description:"Datetime when the flag was created",type:"string",format:"date-time"},updated_at:{description:"Datetime when the flag was last updated",type:"string",format:"date-time"}},additionalProperties:!1,definitions:{WapiSettingTableAccessibleFields:{$id:"WapiSettingTableAccessibleFields",type:"string",enum:["id","type","name","value","applied"]},WapiSettingTableFields:{$id:"WapiSettingTableFields",type:"string",enum:["id","type","name","value","applied","created_at","updated_at"]},WapiSettingTableStringFields:{$id:"WapiSettingTableStringFields",type:"string",enum:["type","name","value","created_at","updated_at"]},WapiSettingTableNumberFields:{$id:"WapiSettingTableNumberFields",type:"string",enum:["id"]},WapiSettingTableBooleanFields:{$id:"WapiSettingTableBooleanFields",type:"string",enum:["applied"]}},required:["id","type","name","value","applied","created_at","updated_at"]};var Od={$schema:"http://json-schema.org/draft-07/schema",$id:"WapiSettingTableOptional",title:"WapiSettingTableOptional",description:"Database settings Only require id, other fields are optional",type:"object",properties:{id:{description:"System defined primary key",type:"integer"},type:{description:"",default:"flag",$ref:"/db/consts.schema.json#/definitions/WapiSettingType"},name:{description:"name of setting. Must be unique",type:"string",maxLength:32,minLength:1},value:{description:"value of setting",type:"string",minLength:1},applied:{description:"is setting applied",default:!1,type:"boolean"},created_at:{description:"Datetime when the flag was created",type:"string",format:"date-time"},updated_at:{description:"Datetime when the flag was last updated",type:"string",format:"date-time"}},additionalProperties:!1,required:["id"]};var On={$schema:"http://json-schema.org/draft-07/schema",$id:"AggregateTransfersFnInput",title:"AggregateTransfersFnInput",description:"Input for aggregateTransfers",type:"object",properties:{wallet:{description:"Foreign of the wallet connected to transfers",type:["string","integer"]},token:{description:"Foreign of the token transferred",type:["string","integer"]},from_wallet:{description:"Foreign of the wallet transfers are made from",type:["string","integer"]},to_wallet:{description:"Foreign of the wallet transfers are made to",type:["string","integer"]},transfer_group:{description:"Foreign of the transfer_group the transfers are a part of",type:["string","integer"]},status:{description:"Status of the transfers",$ref:"/db/transfer/transfer.schema.input.json#/properties/status"},metadata:{description:"Metadata filter",$ref:"/db/consts.schema.json#/definitions/DbFilterMetadata"},aggregators:{description:"Array of aggregators to apply",type:"array",items:{$ref:"/txs/aggregate-transfer-many/aggregate-transfer-many.schema.input.json#/definitions/aggregate_transfer_many_aggregator"}},groups:{description:"Specifications on grouping the data",$ref:"/txs/aggregate-transfer-many/aggregate-transfer-many.schema.input.json#/definitions/aggregate_transfer_many_groups"},options:{description:"Optional flags for input",$ref:"#/definitions/aggregate_transfers_fn_options"}},definitions:{aggregate_transfers_fn_options:{description:"Optional flags for input",type:"object",allOf:[{$ref:"/txs/aggregate-transfer-many/aggregate-transfer-many.schema.input.json#/definitions/aggregate_transfer_many_tx_options"}]}},additionalProperties:!1,$aggregateQueryBuilder:!0};var wn={$schema:"http://json-schema.org/draft-07/schema",$id:"AggregateTransfersFnOutput",title:"AggregateTransfersFnOutput",description:"Output of aggregateTransfers",type:"object",$ref:"/txs/aggregate-transfer-many/aggregate-transfer-many.schema.output.json"};var In={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateAccessTokenFnInput",title:"CreateAccessTokenFnInput",description:"Input for createAccessToken",type:"object",properties:{token:{description:"Properties of the token to create",anyOf:[{$ref:"/txs/create-access-token/create-access-token.schema.input.json#/definitions/create_access_token_limited"},{$ref:"/txs/create-access-token/create-access-token.schema.input.json#/definitions/create_access_token_admin"}]},options:{$ref:"#/definitions/create_access_token_fn_options"}},definitions:{create_access_token_fn_options:{description:"Optional flags for input",type:"object",allOf:[{$ref:"/txs/create-access-token/create-access-token.schema.input.json#/definitions/create_access_token_tx_options"}]}},additionalProperties:!1};var jn={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateAccessTokenFnOutput",title:"CreateAccessTokenFnOutput",description:"Output of createAccessToken",type:"object",$ref:"/txs/create-access-token/create-access-token.schema.output.json"};var vn={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateContractFnInput",title:"CreateContractFnInput",description:"Input for createContract",type:"object",allOf:[{$ref:"#/definitions/create_contract_input"},{type:"object",properties:{options:{$ref:"#/definitions/create_contract_fn_options"}},$typescript:'{"additionalProperties": false}'}],definitions:{create_contract_fn_options:{description:"Optional flags for input",type:"object",allOf:[{$ref:"/txs/create-contract/create-contract.schema.input.json#/definitions/create_contract_tx_options"}],$typescript:'{"additionalProperties": false}'},create_contract_input:{type:"object",properties:{foreign:{description:"Unique foreign of the created Contract",type:["string","integer"]},metadata:{allOf:[{$ref:"/db/token/token.schema.input.json#/properties/metadata"}]},value_token:{description:"Foreign of the token this contract is valued in",type:["string","integer"]},value_amount:{description:"Amount of value this Contract has",type:"number"},owner:{description:"Foreign of the wallet this contract should initially belong to",type:["string","integer"]},buyer:{allOf:[{$ref:"#/definitions/create_contract_buyer_input"}]}},required:["foreign","value_amount","value_token"],$typescript:'{"additionalProperties": false}'},create_contract_buyer_input:{type:"object",description:"The properties of the contract from buyer side",properties:{wallet:{description:"Foreign of the wallet buying this contract",type:["string","integer"]},token:{description:"Foreign of the token buyer will buy with, defaults to Contract value token",type:["string","integer"]},amount:{description:"Amount the buyer will pay, defaults to contract value amount",type:"number"},metadata:{allOf:[{$ref:"/db/token/token.schema.input.json#/properties/metadata"}]},latest_control_hash:{description:"Latest control_hash on the buyer wallet",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]}},required:["wallet"],additionalProperties:!1}},$typescript:'{"additionalProperties": false}'};var kn={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateContractFnOutput",title:"CreateContractFnOutput",description:"Output of createContract",type:"object",$ref:"/txs/create-contract/create-contract.schema.output.json"};var Sn={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateDepositFnInput",title:"CreateDepositFnInput",description:"Input for createDeposit",type:"object",allOf:[{$ref:"#/definitions/create_deposit_input"},{type:"object",properties:{options:{$ref:"#/definitions/create_deposit_fn_options"}},$typescript:'{"additionalProperties": false}'}],definitions:{create_deposit_fn_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/create_deposit_fn_additional_options"}]},create_deposit_fn_additional_options:{type:"object",properties:{return_balance:{description:"return balance after deposit",type:"boolean",default:!1},create_wallet_if_not_exists:{type:"boolean",description:"If true then the wallet will be created if not found. Only valid with 'foreign'",default:!1}},$typescript:'{"additionalProperties": false}'},create_deposit_input:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},token:{description:"Id of the token to deposit as",type:["string","integer"]},wallet:{description:"Id of the wallet to deposit to",type:["string","integer"]},amount:{description:"amount to deposit",type:"number"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},status:{description:"status of the deposit",enum:["pending","finished"],default:"finished"},transfer_group:{description:"Id of the transfer_group this deposit is linked to",type:["string"]},created_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/created_at"}},required:["wallet","amount"],$typescript:'{"additionalProperties": false}'}},$typescript:'{"additionalProperties": false}'};var Cn={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateDepositFnOutput",title:"CreateDepositFnOutput",description:"Output of deposit",$ref:"/txs/create-deposit/create-deposit.schema.output.json"};var Pn={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateExchangeFnInput",title:"CreateExchangeFnInput",description:"Input for createExchange",type:"object",properties:{identifier:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/identifier"},from_identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},from_wallet:{description:"Foreign of Wallet where from_token is debited from/to_token is credited to",type:["string","integer"]},from_token:{description:"Foreign of Token that is transferred from->to",type:["string","integer"]},from_amount:{description:"Amount of from_token transferred",$ref:"/db/transfer/transfer.schema.input.json#/properties/amount"},to_identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},to_wallet:{description:"Foreign of Wallet where from_token is credited to/to_token is debited from. If not specified then to_token.belongs_to is used",type:["string","integer"]},to_token:{description:"Foreign of Token that is transferred to->from",type:["string","integer"]},to_amount:{description:"Amount of to_token transferred. If not specified then from_amount is used",$ref:"/db/transfer/transfer.schema.input.json#/properties/amount"},status:{description:"The state at which the exchange is created",type:"string",enum:["pending","finished"]},force:{$ref:"/db/transfer/transfer.schema.input.json#/properties/force"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},options:{$ref:"#/definitions/create_exchange_fn_options"}},required:["from_wallet","from_token","from_amount","to_token","to_wallet"],definitions:{create_exchange_fn_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/create_exchange_additional_options"}]},exchange_data:{type:"object",properties:{identifier:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/identifier"},from_identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},from_latest_control_hash:{description:"Latest control_hash on the from_wallet+from_token combo. Not required if no from_wallet specified",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]},from_wallet:{description:"Wallet where from_token is debited from/to_token is credited to. If not specified then from_token.belongs_to is used",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},from_token:{description:"Token that is transferred from->to",$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"},from_amount:{description:"Amount of from_token transferred",$ref:"/db/transfer/transfer.schema.input.json#/properties/amount"},to_identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},to_latest_control_hash:{description:"Latest control_hash on the to_wallet+to_token combo. Not required if no to_wallet specified",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]},to_wallet:{description:"Wallet where from_token is credited to/to_token is debited from. If not specified then to_token.belongs_to is used",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},to_token:{description:"Token that is transferred to->from",$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"},to_amount:{description:"Amount of to_token transferred. If not specified then from_amount is used",$ref:"/db/transfer/transfer.schema.input.json#/properties/amount"},status:{description:"The state at which the exchange is created",type:"string",enum:["pending","finished"]},force:{$ref:"/db/transfer/transfer.schema.input.json#/properties/force"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"}},additionalProperties:!1},create_exchange_additional_options:{description:"Optional flags for input",type:"object",default:{},$typescript:'{"additionalProperties":false}'}},additionalProperties:!1};var Gn={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateExchangeFnOutput",title:"CreateExchangeFnOutput",description:"Output of createExchange",$ref:"/txs/create-transfer-group/create-transfer-group.schema.output.json"};var Dn={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateTokenFnInput",title:"CreateTokenFnInput",description:"Input for createToken",allOf:[{$ref:"#/definitions/create_token_fn_input_data"},{$ref:"#/definitions/create_token_fn_options_property"}],definitions:{create_token_fn_options:{allOf:[{$ref:"/txs/create-token/create-token.schema.input.json#/definitions/create_token_tx_options"}]},create_token_fn_options_property:{type:"object",properties:{options:{$ref:"#/definitions/create_token_fn_options"}},$typescript:'{"additionalProperties": false}'},create_token_fn_input_data:{type:"object",properties:{foreign:{$ref:"/db/token/token.schema.input.json#/properties/foreign"},public:{$ref:"/db/token/token.schema.input.json#/properties/public"},metadata:{$ref:"/db/token/token.schema.input.json#/properties/metadata"},divisor:{$ref:"/db/token/token.schema.input.json#/properties/divisor"},limit:{$ref:"/db/token/token.schema.input.json#/properties/limit"},belongs_to:{description:"Id of the wallet this token belongs_to",type:["string","integer"]}},required:["foreign"],$typescript:'{"additionalProperties": false}'}},$typescript:'{"additionalProperties": false}'};var En={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateTokenFnOutput",title:"CreateTokenFnOutput",description:"Output of createToken",$ref:"/txs/create-token/create-token.schema.output.json"};var Rn={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateTransferFnInput",title:"CreateTransferFnInput",description:"Input for transfer",oneOf:[{$ref:"#/definitions/create_transfer_input"},{$ref:"#/definitions/create_transfer_withdrawal_input"},{$ref:"#/definitions/create_transfer_deposit_input"}],definitions:{create_transfer_fn_options:{$comment:"Using allOf so that references dont break",type:"object",allOf:[{$ref:"/txs/create-transfer/create-transfer.schema.input.json#/definitions/create_transfer_tx_options"}]},create_transfer_fn_options_property:{type:"object",properties:{options:{$ref:"#/definitions/create_transfer_fn_options"}},$typescript:'{"additionalProperties": false}'},create_transfer_input:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},token:{description:"Foreign of the token to transfer as",type:["string","integer"]},from_wallet:{description:"Foreign of the wallet to deposit to",type:["string","integer"]},to_wallet:{description:"Foreign of the wallet to deposit to",type:["string","integer"]},latest_control_hash:{description:"Latest control_hash on the from_wallet",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]},amount:{description:"amount to deposit",type:"number"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},type:{type:"string",enum:["transfer"]},status:{description:"status of the transfer",enum:["pending","finished"],default:"finished"},transfer_group:{description:"Id of the transfer_group this transfer is linked to",type:["string"]},created_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/created_at"},options:{$ref:"#/definitions/create_transfer_fn_options"}},required:["from_wallet","to_wallet","amount"],$typescript:'{"additionalProperties": false}'},create_transfer_withdrawal_input:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},token:{description:"Foreign of the token to transfer as",type:["string","integer"]},wallet:{description:"Foreign of the wallet to withdraw from",type:["string","integer"]},latest_control_hash:{description:"Latest control_hash on the from_wallet",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]},amount:{description:"amount to deposit",type:"number"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},type:{type:"string",enum:["withdrawal"]},status:{description:"status of the transfer",enum:["pending","finished"],default:"finished"},transfer_group:{description:"Id of the transfer_group this transfer is linked to",type:["string"]},created_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/created_at"},options:{$ref:"#/definitions/create_transfer_fn_options"}},required:["wallet","amount","type"],$typescript:'{"additionalProperties": false}'},create_transfer_deposit_input:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},token:{description:"Foreign of the token to transfer as",type:["string","integer"]},wallet:{description:"Foreign of the wallet to deposit to",type:["string","integer"]},amount:{description:"amount to deposit",type:"number"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},type:{type:"string",enum:["deposit"]},status:{description:"status of the transfer",enum:["pending","finished"],default:"finished"},transfer_group:{description:"Id of the transfer_group this transfer is linked to",type:["string"]},created_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/created_at"},options:{$ref:"#/definitions/create_transfer_fn_options"}},required:["wallet","amount","type"],$typescript:'{"additionalProperties": false}'},create_transfer_wild_input:{anyOf:[{$ref:"#/definitions/create_transfer_input"},{$ref:"#/definitions/create_transfer_withdrawal_input"},{$ref:"#/definitions/create_transfer_deposit_input"}]}},$typescript:'{"additionalProperties": false}'};var Mn={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateTransferFnOutput",title:"CreateTransferFnOutput",description:"Output of transfer",$ref:"/txs/create-transfer/create-transfer.schema.output.json"};var Wn={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateTransferGroupFnInput",title:"CreateTransferGroupFnInput",description:"Input for createTransferGroup",type:"object",allOf:[{$ref:"#/definitions/create_transfer_group_fn_input_data"},{$ref:"#/definitions/create_transfer_group_fn_options_property"}],definitions:{create_transfer_group_fn_options:{$comment:"Using allOf, because otherwise references break",type:"object",allOf:[{$ref:"/txs/create-transfer-group/create-transfer-group.schema.input.json#/definitions/create_transfer_group_tx_options"}]},create_transfer_group_fn_options_property:{type:"object",properties:{options:{$ref:"#/definitions/create_transfer_group_fn_options"}},$typescript:'{"additionalProperties": false}'},create_transfer_group_fn_input_data:{type:"object",properties:{identifier:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/identifier"},status:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/status"},transfer_status:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/transfer_status"},metadata:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/metadata"},children:{description:"Array of children",type:"array",items:{$ref:"#/definitions/child_transfer_data_fn"}}},$typescript:'{"additionalProperties": false}'},child_transfer_data_fn:{anyOf:[{$ref:"#/definitions/child_transfer_data_regular_fn"},{$ref:"#/definitions/child_transfer_data_withdrawal_fn"},{$ref:"#/definitions/child_transfer_data_deposit_fn"}]},child_transfer_data_regular_fn:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},token:{description:"Foreign of the token to transfer as",type:["string","integer"]},from_wallet:{description:"Foreign of the wallet to deposit to",type:["string","integer"]},to_wallet:{description:"Foreign of the wallet to deposit to",type:["string","integer"]},latest_control_hash:{description:"Latest control_hash on the from_wallet",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]},amount:{description:"amount to deposit",type:"number"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},type:{type:"string",enum:["transfer"]},created_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/created_at"}},required:["from_wallet","to_wallet","amount"],$typescript:'{"additionalProperties": false}'},child_transfer_data_withdrawal_fn:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},token:{description:"Foreign of the token to transfer as",type:["string","integer"]},wallet:{description:"Foreign of the wallet to withdraw from",type:["string","integer"]},latest_control_hash:{description:"Latest control_hash on the from_wallet",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]},amount:{description:"amount to deposit",type:"number"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},type:{type:"string",enum:["withdrawal"]},created_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/created_at"}},required:["wallet","amount","type"],$typescript:'{"additionalProperties": false}'},child_transfer_data_deposit_fn:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},token:{description:"Foreign of the token to transfer as",type:["string","integer"]},wallet:{description:"Foreign of the wallet to deposit to",type:["string","integer"]},amount:{description:"amount to deposit",type:"number"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},type:{type:"string",enum:["deposit"]},created_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/created_at"}},required:["wallet","amount","type"],$typescript:'{"additionalProperties": false}'}},$typescript:'{"additionalProperties": false}'};var An={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateTransferGroupFnOutput",title:"CreateTransferGroupFnOutput",description:"Output of createTransferGroup",type:"object",$ref:"/txs/create-transfer-group/create-transfer-group.schema.output.json"};var Nn={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateTransfersFnInput",title:"CreateTransfersFnInput",description:"Input for createTransfers",type:"object",properties:{transfers:{type:"array",description:"Array of transfer objects to create",minItems:1,items:{$ref:"/fns/create-transfer/create-transfer.schema.input.json#/definitions/create_transfer_wild_input"}},options:{$ref:"#/definitions/create_transfers_fn_options"}},definitions:{create_transfers_fn_options:{allOf:[{$ref:"/txs/create-transfer-many/create-transfer-many.schema.input.json#/definitions/create_transfer_many_tx_options"}]}},required:["transfers"],additionalProperties:!1};var Un={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateTransfersFnOutput",title:"CreateTransfersFnOutput",description:"Output of createTransfers",$ref:"/txs/create-transfer-many/create-transfer-many.schema.output.json"};var qn={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateWalletFnInput",title:"CreateWalletFnInput",description:"Input for createWallet",type:"object",allOf:[{$ref:"#/definitions/create_wallet_fn_input_data"},{$ref:"#/definitions/create_wallet_fn_options_property"}],definitions:{create_wallet_fn_options:{description:"Optional flags for input",type:"object",allOf:[{$ref:"/txs/create-wallet/create-wallet.schema.input.json#/definitions/create_wallet_tx_options"}]},create_wallet_fn_options_property:{type:"object",properties:{options:{$ref:"#/definitions/create_wallet_fn_options"}},$typescript:'{"additionalProperties": false}'},create_wallet_fn_input_data:{type:"object",properties:{foreign:{$ref:"/db/wallet/wallet.schema.input.json#/properties/foreign"},name:{$ref:"/db/wallet/wallet.schema.input.json#/properties/name"},metadata:{$ref:"/db/wallet/wallet.schema.input.json#/properties/metadata"},status:{$ref:"/db/wallet/wallet.schema.input.json#/properties/status"}},required:["foreign"],$typescript:'{"additionalProperties": false}'}},$typescript:'{"additionalProperties": false}'};var Bn={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateWalletFnOutput",title:"CreateWalletFnOutput",description:"Output of createWallet",type:"object",$ref:"/txs/create-wallet/create-wallet.schema.output.json"};var Ln={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateWithdrawalFnInput",title:"CreateWithdrawalFnInput",description:"Input for withdraw",type:"object",allOf:[{$ref:"#/definitions/create_withdrawal_input"},{type:"object",properties:{options:{$ref:"#/definitions/create_withdrawal_fn_options"}},$typescript:'{"additionalProperties": false}'}],definitions:{create_withdrawal_fn_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/create_withdrawal_fn_additional_options"}]},create_withdrawal_fn_additional_options:{type:"object",properties:{return_balance:{description:"Return balance after withdrawal",type:"boolean"}},default:{},$typescript:'{"additionalProperties": false}'},create_withdrawal_input:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},token:{description:"Foreign of the token to deposit as",type:["string","integer"]},wallet:{description:"Foreign of the wallet to deposit to",type:["string","integer"]},latest_control_hash:{description:"Latest control_hash on the from_wallet",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]},amount:{description:"amount to deposit",type:"number"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},status:{description:"status of the withdrawal",enum:["pending","finished"],default:"finished"},transfer_group:{description:"Id of the transfer_group this withdrawal is linked to",type:["string"]},created_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/created_at"}},required:["wallet","amount"],$typescript:'{"additionalProperties": false}'}},$typescript:'{"additionalProperties": false}'};var Vn={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateWithdrawalFnOutput",title:"CreateWithdrawalFnOutput",description:"Output of withdraw",$ref:"/txs/create-withdrawal/create-withdrawal.schema.output.json"};var Hn={$schema:"http://json-schema.org/draft-07/schema",$id:"FindBalancesFnInput",title:"FindBalancesFnInput",description:"Input for findBalances",type:"object",properties:{token:{description:"Id of the token to get balance",type:["string","integer"]},wallet:{description:"Id of the wallet to get balance from",type:["string","integer"]},options:{$ref:"#/definitions/find_balances_fn_options"}},definitions:{find_balances_fn_options:{description:"findBalances function options",allOf:[{$ref:"/fns/fn-consts.schema.json#/definitions/i_fn_find_options_extra"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_limiting_options"},{$ref:"/txs/find-balance-many/find-balance-many.schema.input.json#/definitions/find_balance_many_ordering_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_select_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_deselect_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_options"}]}},$queryBuilder:!0,additionalProperties:!1};var zn={$schema:"http://json-schema.org/draft-07/schema",$id:"FindBalancesFnOutput",title:"FindBalancesFnOutput",description:"Output of findBalances",type:"object",$ref:"/txs/find-balance-many/find-balance-many.schema.output.json"};var Kn={$schema:"http://json-schema.org/draft-07/schema",$id:"FindTokensFnInput",title:"FindTokensFnInput",description:"Input for findTokens",type:"object",properties:{foreign:{description:"Foreign of the token",type:["string","integer"]},type:{$ref:"/db/token/token.schema.json#/properties/type"},belongs_to:{description:"Foreign of the wallet connected to token",type:["string","integer"]},metadata:{description:"Metadata filter",$ref:"/db/consts.schema.json#/definitions/DbFilterMetadata"},options:{$ref:"#/definitions/find_tokens_fn_options"}},definitions:{find_tokens_fn_options:{description:"findtokens function options",allOf:[{$ref:"/fns/fn-consts.schema.json#/definitions/i_fn_find_options_extra"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_limiting_options"},{$ref:"/txs/find-token-many/find-token-many.schema.input.json#/definitions/find_token_many_ordering_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_select_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_deselect_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_options"}]}},$queryBuilder:!0,additionalProperties:!1};var Qn={$schema:"http://json-schema.org/draft-07/schema",$id:"FindTokensFnOutput",title:"FindTokensFnOutput",description:"Output of findTokens",type:"object",$ref:"/txs/find-token-many/find-token-many.schema.output.json"};var Jn={$schema:"http://json-schema.org/draft-07/schema",$id:"FindTransferGroupsFnInput",title:"FindTransferGroupsFnInput",description:"Input for findTransferGroups",type:"object",properties:{identifier:{description:"Identifier of the transfer_group",type:["string","integer"]},transfer_status:{description:"Status of the transfers",$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/transfer_status"},status:{description:"Status of the transfer_group",$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/status"},metadata:{description:"Metadata filter",$ref:"/db/consts.schema.json#/definitions/DbFilterMetadata"},reverses:{description:"Identifier of the transfer_group the transfer_group reverses",type:["string","integer"]},type:{description:"Type of the transfer group",$ref:"/db/consts.schema.json#/definitions/TransferGroupType"},options:{$ref:"#/definitions/find_transfer_groups_fn_options"}},definitions:{find_transfer_groups_fn_options:{description:"findTransferGroups function options",allOf:[{$ref:"/fns/fn-consts.schema.json#/definitions/i_fn_find_options_extra"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_limiting_options"},{$ref:"/txs/find-transfer-group-many/find-transfer-group-many.schema.input.json#/definitions/find_transfer_group_many_ordering_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/find_transfer_groups_fn_extra_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_select_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_deselect_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_options"}]},find_transfer_groups_fn_extra_options:{description:"simplified options for findTransferGroups",type:"object",properties:{},$typescript:'{"additionalProperties":false}'}},$queryBuilder:!0,additionalProperties:!1};var Xn={$schema:"http://json-schema.org/draft-07/schema",$id:"FindTransferGroupsFnOutput",title:"FindTransferGroupsFnOutput",description:"Output of findTransferGroups",type:"object",$ref:"/txs/find-transfer-group-many/find-transfer-group-many.schema.output.json"};var Yn={$schema:"http://json-schema.org/draft-07/schema",$id:"FindTransfersFnInput",title:"FindTransfersFnInput",description:"Input for findTransfers",type:"object",properties:{wallet:{description:"Foreign of the wallet connected to transfers",type:["string","integer"]},token:{description:"Foreign of the token transferred",type:["string","integer"]},from_wallet:{description:"Foreign of the wallet transfers are made from",type:["string","integer"]},to_wallet:{description:"Foreign of the wallet transfers are made to",type:["string","integer"]},transfer_group:{description:"Foreign of the transfer_group the transfers are a part of",type:["string","integer"]},status:{description:"Status of the transfers",$ref:"/db/transfer/transfer.schema.input.json#/properties/status"},metadata:{description:"Metadata filter",$ref:"/db/consts.schema.json#/definitions/DbFilterMetadata"},options:{$ref:"#/definitions/find_transfers_fn_options"}},definitions:{find_transfers_fn_options:{description:"findTransfers function options",allOf:[{$ref:"/fns/fn-consts.schema.json#/definitions/i_fn_find_options_extra"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_limiting_options"},{$ref:"/txs/find-transfer-many/find-transfer-many.schema.input.json#/definitions/find_transfer_many_ordering_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/find_transfers_fn_extra_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_select_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_deselect_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_options"}]},find_transfers_fn_extra_options:{description:"simplified options for findTransfers",type:"object",properties:{return_running_balance:{description:"return running balance for specified wallet under filter",type:"boolean"},return_signed_amount:{description:"return running balance for specified wallet under filter",type:"boolean"},return_running_balance_for_wallet:{description:"foreign key for which wallet should running balance be returned for",type:["string","integer"]},return_signed_amount_for_wallet:{description:"foreign key for which wallet should signed amounts be returned for",type:["string","integer"]}},$typescript:'{"additionalProperties":false}'}},$queryBuilder:!0,additionalProperties:!1};var Zn={$schema:"http://json-schema.org/draft-07/schema",$id:"FindTransfersFnOutput",title:"FindTransfersFnOutput",description:"Output of findTransfers",type:"object",$ref:"/txs/find-transfer-many/find-transfer-many.schema.output.json"};var ea={$schema:"http://json-schema.org/draft-07/schema",$id:"FindWalletsFnInput",title:"FindWalletsFnInput",description:"Input for findWallets",type:"object",properties:{foreign:{$ref:"/db/wallet/wallet.schema.json#/properties/foreign"},name:{$ref:"/db/wallet/wallet.schema.json#/properties/name"},type:{$ref:"/db/wallet/wallet.schema.json#/properties/type"},status:{$ref:"/db/wallet/wallet.schema.json#/properties/status"},metadata:{description:"Metadata filter",$ref:"/db/consts.schema.json#/definitions/DbFilterMetadata"},options:{$ref:"#/definitions/find_wallets_fn_options"}},definitions:{find_wallets_fn_options:{description:"Optional flags for input",type:"object",allOf:[{$ref:"/fns/fn-consts.schema.json#/definitions/i_fn_find_options_extra"},{$ref:"/txs/find-wallet-many/find-wallet-many.schema.input.json#/definitions/find_wallet_many_tx_options"},{$ref:"#/definitions/find_wallets_fn_extra_options"}]},find_wallets_fn_extra_options:{type:"object",properties:{include_balance_for_token:{description:"Foreign of token to include balance for",type:["string","number"]}},$typescript:'{"additionalProperties":false}'}},$queryBuilder:!0,additionalProperties:!1};var ta={$schema:"http://json-schema.org/draft-07/schema",$id:"FindWalletsFnOutput",title:"FindWalletsFnOutput",description:"Output of findWallets",type:"object",$ref:"/txs/find-wallet-many/find-wallet-many.schema.output.json"};var ra={$schema:"http://json-schema.org/draft-07/schema",$id:"FnConsts",description:"Generics used by functions",definitions:{i_fn_find_options:{description:"extended find options for client functions",allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_limiting_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_ordering_options"},{$ref:"#/definitions/i_fn_find_options_extra"}]},i_fn_find_options_extra:{description:"extra find options for client functions",$typescript:'{"additionalProperties":false}',type:"object",properties:{order_by:{description:"Ordering options in string format",type:"string"}}}}};var na={$schema:"http://json-schema.org/draft-07/schema",$id:"GetBalanceFnInput",title:"GetBalanceFnInput",description:"Input for Getbalance",type:"object",properties:{token:{description:"Id of the token to get balance",type:["string","integer"]},wallet:{description:"Id of the wallet to get balance from",type:["string","integer"]},datetime:{description:"Date and time this balance should be got",type:"string"},options:{$ref:"#/definitions/get_balance_fn_options"}},definitions:{get_balance_fn_options:{allOf:[{$ref:"/txs/get-balance/get-balance.schema.input.json#/definitions/get_balance_tx_options"}]}},required:["wallet"],additionalProperties:!1};var aa={$schema:"http://json-schema.org/draft-07/schema",$id:"GetBalanceFnOutput",title:"GetBalanceFnOutput",description:"Output of balance",type:"object",$ref:"/txs/get-balance/get-balance.schema.output.json"};var sa={$schema:"http://json-schema.org/draft-07/schema",$id:"GetBalanceHistoryFnInput",title:"GetBalanceHistoryFnInput",description:"Input for getBalanceHistory",type:"object",properties:{token:{description:"Id of the token to get balance",type:["string","integer"]},wallet:{description:"Id of the wallet to get balance from",type:["string","integer"]},options:{$ref:"#/definitions/get_balance_history_fn_options"}},definitions:{get_balance_history_fn_options:{description:"Optional flags for input",type:"object",allOf:[{$ref:"/txs/get-balance-history/get-balance-history.schema.input.json#/definitions/get_balance_history_tx_options"}]}},required:["wallet"],additionalProperties:!1};var ia={$schema:"http://json-schema.org/draft-07/schema",$id:"GetBalanceHistoryFnOutput",title:"GetBalanceHistoryFnOutput",description:"Output of getBalanceHistory",type:"object",$ref:"/txs/get-balance-history/get-balance-history.schema.output.json"};var oa={$schema:"http://json-schema.org/draft-07/schema",$id:"GetFlagsFnInput",title:"GetFlagsFnInput",description:"Input for getFlags",type:"object",properties:{options:{$ref:"#/definitions/get_flags_fn_options"}},default:{},definitions:{get_flags_fn_options:{allOf:[{$ref:"/txs/get-flags/get-flags.schema.input.json#/definitions/get_flags_tx_options"}]}},additionalProperties:!1};var pa={$schema:"http://json-schema.org/draft-07/schema",$id:"GetFlagsFnOutput",title:"GetFlagsFnOutput",description:"Output of getFlags",$ref:"/txs/get-flags/get-flags.schema.output.json"};var da={$schema:"http://json-schema.org/draft-07/schema",$id:"GetStatisticsFnInput",title:"GetStatisticsFnInput",description:"Input for getStatistics",type:"object",properties:{model:{$ref:"/txs/get-statistics/get-statistics.schema.input.json#/definitions/statistics_model"},groups:{$ref:"/txs/get-statistics/get-statistics.schema.input.json#/definitions/statistics_groups"},aggregator:{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_aggregator"},filter:{$ref:"/txs/get-statistics/get-statistics.schema.input.json#/definitions/statistics_filter"},options:{$ref:"#/definitions/get_statistics_fn_options"}},definitions:{get_statistics_fn_options:{description:"Optional flags for input",type:"object",allOf:[{$ref:"/txs/get-statistics/get-statistics.schema.input.json#/definitions/get_statistics_tx_options"}]}},additionalProperties:!1};var fa={$schema:"http://json-schema.org/draft-07/schema",$id:"GetStatisticsFnOutput",title:"GetStatisticsFnOutput",description:"Output of getStatistics",type:"object",$ref:"/txs/get-statistics/get-statistics.schema.output.json"};var ua={$schema:"http://json-schema.org/draft-07/schema",$id:"GetTokenFnInput",title:"GetTokenFnInput",description:"Input for getToken",type:"object",properties:{foreign:{$ref:"/db/token/token.schema.json#/properties/foreign"},options:{$ref:"#/definitions/get_token_fn_options"}},definitions:{get_token_fn_options:{allOf:[{$ref:"/txs/get-token/get-token.schema.input.json#/definitions/get_token_tx_options"}]}},additionalProperties:!1};var la={$schema:"http://json-schema.org/draft-07/schema",$id:"GetTokenFnOutput",title:"GetTokenFnOutput",description:"Output of getToken",$ref:"/txs/get-token/get-token.schema.output.json"};var ca={$schema:"http://json-schema.org/draft-07/schema",$id:"GetTransferFnInput",title:"GetTransferFnInput",description:"Input for getTransfer",type:"object",properties:{transfer:{description:"Transfer identifier",type:["string","integer"]},options:{$ref:"#/definitions/get_transfer_fn_options"}},definitions:{get_transfer_fn_options:{description:"Optional flags for input",allOf:[{$ref:"/txs/get-transfer/get-transfer.schema.input.json#/definitions/get_transfer_tx_options"}]}},required:["transfer"],additionalProperties:!1};var ma={$schema:"http://json-schema.org/draft-07/schema",$id:"GetTransferFnOutput",title:"GetTransferFnOutput",description:"Output of getTransfer",type:"object",$ref:"/txs/get-transfer/get-transfer.schema.output.json"};var ha={$schema:"http://json-schema.org/draft-07/schema",$id:"GetTransferGroupFnInput",title:"GetTransferGroupFnInput",description:"Input for getTransferGroup",type:"object",properties:{transfer_group:{description:"identifier of the transfer group to reverse",type:["string","number"]},options:{$ref:"#/definitions/get_transfer_group_fn_options"}},definitions:{get_transfer_group_fn_options:{description:"Optional flags for input",allOf:[{$ref:"/txs/get-transfer-group/get-transfer-group.schema.input.json#/definitions/get_transfer_group_tx_options"}]}},required:["transfer_group"],additionalProperties:!1};var _a={$schema:"http://json-schema.org/draft-07/schema",$id:"GetTransferGroupFnOutput",title:"GetTransferGroupFnOutput",description:"Output of getTransferGroup",type:"object",$ref:"/txs/get-transfer-group/get-transfer-group.schema.output.json"};var ga={$schema:"http://json-schema.org/draft-07/schema",$id:"GetWalletFnInput",title:"GetWalletFnInput",description:"Input for getWallet",type:"object",properties:{wallet:{description:"Wallet foreign",type:["string","integer"]},options:{$ref:"#/definitions/get_wallet_fn_options"}},definitions:{get_wallet_fn_options:{description:"Optional flags for input",type:"object",allOf:[{$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/get_wallet_tx_options"}]}},required:["wallet"],additionalProperties:!1};var Ta={$schema:"http://json-schema.org/draft-07/schema",$id:"GetWalletFnOutput",title:"GetWalletFnOutput",description:"Output of getWallet",type:"object",$ref:"/txs/get-wallet/get-wallet.schema.output.json"};var Bt={$schema:"http://json-schema.org/draft-07/schema",$id:"ImportDataFnInput",title:"ImportDataFnInput",description:"Input for import",type:"object",properties:{actions:{type:"array",items:{$ref:"#/definitions/import_data_fn_stream_chunk"}},options:{$ref:"#/definitions/import_data_fn_options"}},definitions:{import_data_fn_options:{description:"Optional flags for input",type:"object",allOf:[{$ref:"/txs/import-actions/import-actions.schema.input.json#/definitions/import_actions_tx_options"}]},import_data_fn_stream_chunk:{type:"object",anyOf:[{$ref:"#/definitions/import_wallet"},{$ref:"#/definitions/import_token"},{$ref:"#/definitions/import_transfer_group"},{$ref:"#/definitions/import_transfer"},{$ref:"#/definitions/import_reverse_transfer"},{$ref:"#/definitions/import_reverse_transfer_group"}]},import_wallet:{type:"object",properties:{target:{description:"Target of the action",type:"string",enum:["wallet"]},data:{allOf:[{$ref:"/fns/create-wallet/create-wallet.schema.input.json#/definitions/create_wallet_fn_input_data"}]}},required:["target","data"],$typescript:'{"additionalProperties": false}'},import_token:{type:"object",properties:{target:{description:"Target of the action",type:"string",enum:["token"]},data:{allOf:[{$ref:"/fns/create-token/create-token.schema.input.json#/definitions/create_token_fn_input_data"}]}},required:["target","data"],$typescript:'{"additionalProperties": false}'},import_transfer_group_extension:{type:"object",properties:{created_at:{type:"string",format:"date-time"},status_finalized_at:{type:"string",format:"date-time"},transfer_status_finalized_at:{type:"string",format:"date-time"}},$typescript:'{"additionalProperties": false}'},import_transfer_group_data:{allOf:[{$ref:"/fns/create-transfer-group/create-transfer-group.schema.input.json#/definitions/create_transfer_group_fn_input_data"},{$ref:"#/definitions/import_transfer_group_extension"}]},import_transfer_group:{type:"object",properties:{target:{description:"Target of the action",type:"string",enum:["transfer_group"]},data:{allOf:[{$ref:"#/definitions/import_transfer_group_data"}]}},required:["target","data"],$typescript:'{"additionalProperties": false}'},import_transfer_extension:{type:"object",properties:{created_at:{type:"string",format:"date-time"},status_finalized_at:{type:"string",format:"date-time"}},$typescript:'{"additionalProperties": false}'},import_transfer_data:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},token:{description:"Foreign of the token to transfer as",type:["string","integer"]},from_wallet:{description:"Foreign of the wallet to deposit to",type:["string","integer"]},to_wallet:{description:"Foreign of the wallet to deposit to",type:["string","integer"]},latest_control_hash:{description:"Latest control_hash on the from_wallet",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]},amount:{description:"amount to deposit",type:"number"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},type:{type:"string",enum:["transfer"]},status:{description:"status of the transfer",enum:["pending","cancelled","finished"],default:"finished"},transfer_group:{description:"Id of the transfer_group this transfer is linked to",type:["string"]},created_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/created_at"},status_finalized_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/status_finalized_at"}},required:["from_wallet","to_wallet","amount"],$typescript:'{"additionalProperties": false}'},import_withdrawal_data:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},token:{description:"Foreign of the token to transfer as",type:["string","integer"]},wallet:{description:"Foreign of the wallet to withdraw from",type:["string","integer"]},latest_control_hash:{description:"Latest control_hash on the from_wallet",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]},amount:{description:"amount to deposit",type:"number"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},type:{type:"string",enum:["withdrawal"]},status:{description:"status of the transfer",enum:["pending","cancelled","finished"],default:"finished"},transfer_group:{description:"Id of the transfer_group this transfer is linked to",type:["string"]},created_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/created_at"},status_finalized_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/status_finalized_at"}},required:["wallet","amount","type"],$typescript:'{"additionalProperties": false}'},import_deposit_data:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},token:{description:"Foreign of the token to transfer as",type:["string","integer"]},wallet:{description:"Foreign of the wallet to deposit to",type:["string","integer"]},amount:{description:"amount to deposit",type:"number"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},type:{type:"string",enum:["deposit"]},status:{description:"status of the transfer",enum:["pending","cancelled","finished"],default:"finished"},transfer_group:{description:"Id of the transfer_group this transfer is linked to",type:["string"]},created_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/created_at"},status_finalized_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/status_finalized_at"}},required:["wallet","amount","type"],$typescript:'{"additionalProperties": false}'},create_transfer_data_wild:{anyOf:[{$ref:"#/definitions/import_transfer_data"},{$ref:"#/definitions/import_withdrawal_data"},{$ref:"#/definitions/import_deposit_data"}]},import_transfer:{type:"object",properties:{target:{description:"Target of the action",type:"string",enum:["transfer"]},data:{allOf:[{$ref:"#/definitions/create_transfer_data_wild"}]}},required:["target","data"],$typescript:'{"additionalProperties": false}'},import_reverse_transfer_options:{type:"object",properties:{metadata_action:{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_action"}},$typescript:'{"additionalProperties": false}'},import_reverse_transfer_extension:{type:"object",properties:{options:{allOf:[{$ref:"#/definitions/import_reverse_transfer_options"}]}},$typescript:'{"additionalProperties": false}'},import_reverse_transfer_data:{allOf:[{$ref:"/fns/reverse-transfer/reverse-transfer.schema.input.json#/definitions/reverse_transfer_fn_input_data"},{$ref:"#/definitions/import_reverse_transfer_extension"}]},import_reverse_transfer:{type:"object",properties:{target:{description:"Target of the action",type:"string",enum:["reverse_transfer"]},data:{allOf:[{$ref:"#/definitions/import_reverse_transfer_data"}]}},required:["target","data"],$typescript:'{"additionalProperties": false}'},import_reverse_transfer_group_options:{type:"object",properties:{metadata_action:{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_action"},transfer_metadata_action:{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_action"}},$typescript:'{"additionalProperties": false}'},import_reverse_transfer_group_extension:{type:"object",properties:{options:{allOf:[{$ref:"#/definitions/import_reverse_transfer_group_options"}]}},$typescript:'{"additionalProperties": false}'},import_reverse_transfer_group_data:{allOf:[{$ref:"/fns/reverse-transfer-group/reverse-transfer-group.schema.input.json#/definitions/reverse_transfer_group_fn_input_data"},{$ref:"#/definitions/import_reverse_transfer_group_extension"}]},import_reverse_transfer_group:{type:"object",properties:{target:{description:"Target of the action",type:"string",enum:["reverse_transfer_group"]},data:{allOf:[{$ref:"#/definitions/import_reverse_transfer_group_data"}]}},required:["target","data"],$typescript:'{"additionalProperties": false}'}},$allowStreamInput:"import_data_fn_stream_chunk",additionalProperties:!1};var ya={$schema:"http://json-schema.org/draft-07/schema",$id:"ImportDataFnOutput",title:"ImportDataFnOutput",description:"Output of import",type:"object",$ref:"/txs/import-actions/import-actions.schema.output.json"};var ba={$schema:"http://json-schema.org/draft-07/schema",$id:"ReverseTransferFnInput",title:"ReverseTransferFnInput",description:"Input for reverseTransfer",allOf:[{$ref:"#/definitions/reverse_transfer_fn_input_data"},{$ref:"#/definitions/reverse_transfer_fn_options_property"}],definitions:{reverse_transfer_fn_options:{allOf:[{$ref:"/txs/reverse-transfer/reverse-transfer.schema.input.json#/definitions/reverse_transfer_tx_options"}]},reverse_transfer_fn_options_property:{type:"object",properties:{options:{$ref:"#/definitions/reverse_transfer_fn_options"}},$typescript:'{"additionalProperties": false}'},reverse_transfer_fn_input_data:{type:"object",properties:{transfer:{description:"Transfer identifier",type:["string","integer"]},status:{description:"Status of the created transfer",$ref:"/db/transfer/transfer.schema.input.json#/properties/status"},identifier:{description:"Identifier for the created transfer",$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},force:{description:"Force create the reverse transfer ignoring balance",$ref:"/db/transfer/transfer.schema.input.json#/properties/force"},metadata:{description:"Metadata for the reversed transfers",$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},extend_metadata:{description:"Key value object to extend metadata with on created transfer",$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/metadata"}},required:["transfer"],$typescript:'{"additionalProperties": false}'}},$typescript:'{"additionalProperties": false}'};var Fa={$schema:"http://json-schema.org/draft-07/schema",$id:"ReverseTransferFnOutput",title:"ReverseTransferFnOutput",description:"Output of reverseTransfer",$ref:"/txs/reverse-transfer/reverse-transfer.schema.output.json"};var xa={$schema:"http://json-schema.org/draft-07/schema",$id:"ReverseTransferGroupFnInput",title:"ReverseTransferGroupFnInput",description:"Input for reverseTransferGroup",allOf:[{$ref:"#/definitions/reverse_transfer_group_fn_input_data"},{$ref:"#/definitions/reverse_transfer_group_fn_options_property"}],definitions:{reverse_transfer_group_fn_options:{allOf:[{$ref:"/txs/reverse-transfer-group/reverse-transfer-group.schema.input.json#/definitions/reverse_transfer_group_tx_options"}]},reverse_transfer_group_fn_options_property:{type:"object",properties:{options:{$ref:"#/definitions/reverse_transfer_group_fn_options"}},$typescript:'{"additionalProperties": false}'},reverse_transfer_group_fn_input_data:{type:"object",properties:{transfer_group:{description:"identifier of the transfer group to reverse",type:["string","number"]},status:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/status"},transfer_status:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/transfer_status"},identifier:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/identifier"},force:{$ref:"/db/transfer/transfer.schema.input.json#/properties/force"},metadata:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/metadata"},transfer_metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},extend_metadata:{description:"Key value object to extend metadata with on created transfer",$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/metadata"},transfer_extend_metadata:{description:"Key value object to extend metadata with on created transfer",$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"}},required:["transfer_group"],$typescript:'{"additionalProperties": false}'}},$typescript:'{"additionalProperties": false}'};var $a={$schema:"http://json-schema.org/draft-07/schema",$id:"ReverseTransferGroupFnOutput",title:"ReverseTransferGroupFnOutput",description:"Output of reverseTransferGroup",$ref:"/txs/reverse-transfer-group/reverse-transfer-group.schema.output.json"};var Oa={$schema:"http://json-schema.org/draft-07/schema",$id:"ReverseTransfersFnInput",title:"ReverseTransfersFnInput",description:"Input for reverseTransfers",type:"object",properties:{wallet:{description:"Foreign of the wallet connected to transfers",type:["string","integer"]},token:{description:"Foreign of the token transferred",type:["string","integer"]},from_wallet:{description:"Foreign of the wallet transfers are made from",type:["string","integer"]},to_wallet:{description:"Foreign of the wallet transfers are made to",type:["string","integer"]},transfer_group:{description:"Foreign of the transfer_group the transfers are a part of",type:["string","integer"]},status:{description:"Status of the transfers",$ref:"/db/transfer/transfer.schema.input.json#/properties/status"},metadata:{description:"Metadata filter",$ref:"/db/consts.schema.json#/definitions/DbFilterMetadata"},reverse:{$ref:"/txs/reverse-transfer-many/reverse-transfer-many.schema.input.json#/definitions/reverse_transfer_many_modifications"},options:{$ref:"#/definitions/reverse_transfers_fn_options"}},definitions:{reverse_transfers_fn_options:{description:"findTransfers function options",allOf:[{$ref:"/txs/reverse-transfer-many/reverse-transfer-many.schema.input.json#/definitions/reverse_transfer_many_tx_options"}]},reverse_transfers_fn_modifications:{description:"In case the transfer will be made then apply these modifications",allOf:[{$ref:"/txs/reverse-transfer-many/reverse-transfer-many.schema.input.json#/definitions/reverse_transfer_many_modifications"}]}},$reverseQueryBuilder:!0,additionalProperties:!1};var wa={$schema:"http://json-schema.org/draft-07/schema",$id:"ReverseTransfersFnOutput",title:"ReverseTransfersFnOutput",description:"Output of reverseTransfers",type:"object",$ref:"/txs/reverse-transfer-many/reverse-transfer-many.schema.output.json"};var Ia={$schema:"http://json-schema.org/draft-07/schema",$id:"SetFlagsFnInput",title:"SetFlagsFnInput",description:"Input for setFlags",allOf:[{$ref:"#/definitions/set_flags_properties"}],definitions:{set_flags_fn_options:{allOf:[{$ref:"/txs/set-flags/set-flags.schema.input.json#/definitions/set_flags_tx_options"}]},set_flags_properties:{allOf:[{$ref:"/db/consts.schema.json#/definitions/Flags"},{$ref:"#/definitions/set_flags_options_property"}]},set_flags_options_property:{type:"object",properties:{options:{$ref:"#/definitions/set_flags_fn_options"}},$typescript:'{"additionalProperties": false}'}},$typescript:'{"additionalProperties": false}'};var ja={$schema:"http://json-schema.org/draft-07/schema",$id:"SetFlagsFnOutput",title:"SetFlagsFnOutput",description:"Output of setFlags",$ref:"/txs/set-flags/set-flags.schema.output.json"};var va={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTokenFnInput",title:"UpdateTokenFnInput",description:"Input for updateToken",type:"object",properties:{token:{description:"Token foreign",type:["string","number"]},metadata:{$ref:"/db/token/token.schema.json#/properties/metadata"},public:{$ref:"/db/token/token.schema.json#/properties/public"},status:{$ref:"/db/token/token.schema.json#/properties/status"},options:{$ref:"#/definitions/update_token_fn_options"}},definitions:{update_token_fn_fields:{description:"Updateable fields",type:"object",allOf:[{$ref:"/txs/update-token/update-token.schema.input.json#/definitions/update_token_fields"}]},update_token_fn_options:{description:"Optional flags for input",type:"object",allOf:[{$ref:"/txs/update-token/update-token.schema.input.json#/definitions/update_token_tx_options"}]}},additionalProperties:!1,required:["token"]};var ka={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTokenFnOutput",title:"UpdateTokenFnOutput",description:"Output of updateToken",type:"object",$ref:"/txs/update-token/update-token.schema.output.json"};var Sa={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTransferFnInput",title:"UpdateTransferFnInput",description:"Input for updateTransfer",type:"object",properties:{transfer:{description:"Transfer identifier",type:["string","integer"]},status:{description:"Status the transfer should be set to",enum:["finished","cancelled"]},metadata:{$ref:"/db/transfer/transfer.schema.json#/properties/metadata"},options:{$ref:"#/definitions/update_transfer_fn_options"}},definitions:{update_transfer_fn_options:{allOf:[{$ref:"/txs/update-transfer/update-transfer.schema.input.json#/definitions/update_transfer_tx_options"}]}},additionalProperties:!1,required:["transfer"]};var Ca={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTransferFnOutput",title:"UpdateTransferFnOutput",description:"Output of updateTransfer",type:"object",$ref:"/txs/update-transfer/update-transfer.schema.output.json"};var Pa={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTransferGroupFnInput",title:"UpdateTransferGroupFnInput",description:"Input for updateTransferGroup",anyOf:[{$ref:"#/definitions/update_transfer_group_fn_status"},{$ref:"#/definitions/update_transfer_group_fn_transfer_status"},{$ref:"#/definitions/update_transfer_group_fn_metadata"}],definitions:{update_transfer_group_fn_options:{$comment:"Using allOf so that references dont break",type:"object",allOf:[{$ref:"/txs/update-transfer-group/update-transfer-group.schema.input.json#/definitions/update_transfer_group_tx_options"}]},update_transfer_group_fn_status:{type:"object",properties:{transfer_group:{description:"identifier of the transfer group to reverse",type:["string","number"]},status:{description:"Lifecycle status of the TransferGroup",$ref:"/db/consts.schema.json#/definitions/TransferGroupStatus"},transfer_status:{description:"Status all the transfers should be set at.",$ref:"/db/consts.schema.json#/definitions/TransferStatus"},metadata:{description:"Key value object to be replaced or extended with existing TransferGroup metadata",$ref:"/db/transfer/transfer.schema.json#/properties/metadata"},options:{$ref:"#/definitions/update_transfer_group_fn_options"}},required:["transfer_group","status"],$typescript:'{"additionalProperties": false}'},update_transfer_group_fn_transfer_status:{type:"object",properties:{transfer_group:{description:"identifier of the transfer group to update",type:["string","number"]},status:{description:"Lifecycle status of the TransferGroup",$ref:"/db/consts.schema.json#/definitions/TransferGroupStatus"},transfer_status:{description:"Status all the transfers should be set at.",$ref:"/db/consts.schema.json#/definitions/TransferStatus"},metadata:{description:"Key value object to be replaced or extended with existing TransferGroup metadata",$ref:"/db/transfer/transfer.schema.json#/properties/metadata"},options:{$ref:"#/definitions/update_transfer_group_fn_options"}},required:["transfer_group","transfer_status"],$typescript:'{"additionalProperties": false}'},update_transfer_group_fn_metadata:{type:"object",properties:{transfer_group:{description:"identifier of the transfer group to update",type:["string","number"]},status:{description:"Lifecycle status of the TransferGroup",$ref:"/db/consts.schema.json#/definitions/TransferGroupStatus"},transfer_status:{description:"Status all the transfers should be set at.",$ref:"/db/consts.schema.json#/definitions/TransferStatus"},metadata:{description:"Key value object to be replaced or extended with existing TransferGroup metadata",$ref:"/db/transfer/transfer.schema.json#/properties/metadata"},options:{$ref:"#/definitions/update_transfer_group_fn_options"}},required:["transfer_group","metadata"],$typescript:'{"additionalProperties": false}'}}};var Ga={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTransferGroupFnOutput",title:"UpdateTransferGroupFnOutput",description:"Output of updateTransferGroup",type:"object",$ref:"/txs/update-transfer-group/update-transfer-group.schema.output.json"};var Da={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTransferGroupsFnInput",title:"UpdateTransferGroupsFnInput",description:"Input for updateTransferGroups",type:"object",properties:{transfer_status:{description:"Status of the transfers",$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/transfer_status"},status:{description:"Status of the transfer_group",$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/status"},metadata:{description:"Metadata filter",$ref:"/db/consts.schema.json#/definitions/DbFilterMetadata"},reverses:{description:"Identifier of the transfer_group the transfer_group reverses",type:["string","integer"]},type:{description:"Type of the transfer group",$ref:"/db/consts.schema.json#/definitions/TransferGroupType"},update:{$ref:"#/definitions/update_transfer_groups_fn_update_fields"},options:{$ref:"#/definitions/update_transfer_groups_fn_options"}},definitions:{update_transfer_groups_fn_update_fields:{type:"object",allOf:[{$ref:"/txs/update-transfer-group/update-transfer-group.schema.input.json#/definitions/update_transfer_group_data"}]},update_transfer_groups_fn_options:{description:"Optional flags for input",type:"object",allOf:[{$ref:"/txs/update-transfer-group/update-transfer-group.schema.input.json#/definitions/update_transfer_group_tx_options"}]}},$updateQueryBuilder:!0,additionalProperties:!1};var Ea={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTransferGroupsFnOutput",title:"UpdateTransferGroupsFnOutput",description:"Output of updateTransferGroups",type:"object",$ref:"/txs/update-transfer-group-many/update-transfer-group-many.schema.output.json"};var Ra={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTransfersFnInput",title:"UpdateTransfersFnInput",description:"Input for updateTransfers",type:"object",properties:{wallet:{description:"Foreign of the wallet connected to transfers",type:["string","integer"]},token:{description:"Foreign of the token transferred",type:["string","integer"]},from_wallet:{description:"Foreign of the wallet transfers are made from",type:["string","integer"]},to_wallet:{description:"Foreign of the wallet transfers are made to",type:["string","integer"]},transfer_group:{description:"Foreign of the transfer_group the transfers are a part of",type:["string","integer"]},status:{description:"Status of the transfers",$ref:"/db/transfer/transfer.schema.input.json#/properties/status"},metadata:{description:"Metadata filter",$ref:"/db/consts.schema.json#/definitions/DbFilterMetadata"},update:{$ref:"/txs/update-transfer/update-transfer.schema.input.json#/definitions/update_transfer_fields"},options:{$ref:"#/definitions/update_transfers_fn_options"}},definitions:{update_transfers_fn_options:{description:"Optional flags for input",type:"object",allOf:[{$ref:"/txs/update-transfer-many/update-transfer-many.schema.input.json#/definitions/update_transfer_many_tx_options"}]},update_transfers_fn_update_fields:{type:"object",allOf:[{$ref:"/txs/update-transfer/update-transfer.schema.input.json#/definitions/update_transfer_fields"}]}},$updateQueryBuilder:!0,additionalProperties:!1};var Ma={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTransfersFnOutput",title:"UpdateTransfersFnOutput",description:"Output of updateTransfers",type:"object",$ref:"/txs/update-transfer-many/update-transfer-many.schema.output.json"};var Wa={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateWalletFnInput",title:"UpdateWalletFnInput",description:"Input for updateWallet",type:"object",properties:{wallet:{description:"Wallet foreign",type:["string","integer"]},metadata:{$ref:"/db/wallet/wallet.schema.json#/properties/metadata"},name:{$ref:"/db/wallet/wallet.schema.input.json#/properties/name"},status:{$ref:"/db/wallet/wallet.schema.input.json#/properties/status"},options:{$ref:"#/definitions/update_wallet_fn_options"}},definitions:{update_wallet_fn_fields:{description:"Updatable fields",type:"object",allOf:[{$ref:"/txs/update-wallet/update-wallet.schema.input.json#/definitions/update_wallet_fields"}]},update_wallet_fn_options:{description:"Optional flags for input",type:"object",allOf:[{$ref:"/txs/update-wallet/update-wallet.schema.input.json#/definitions/update_wallet_tx_options"}]}},additionalProperties:!1,required:["wallet"]};var Aa={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateWalletFnOutput",title:"UpdateWalletFnOutput",description:"Output of updateWallet",type:"object",$ref:"/txs/update-wallet/update-wallet.schema.output.json"};var Na={$schema:"http://json-schema.org/draft-07/schema",$id:"AggregateTransferManyTxInput",title:"AggregateTransferManyTxInput",description:"Input for aggregateTransferMany",type:"object",properties:{transfer:{$ref:"/txs/find-transfer-many/find-transfer-many.schema.input.json#/definitions/find_transfer_many_filter"},aggregators:{description:"Array of aggregators to apply",type:"array",items:{$ref:"#/definitions/aggregate_transfer_many_aggregator"}},groups:{$ref:"#/definitions/aggregate_transfer_many_groups"},options:{$ref:"#/definitions/aggregate_transfer_many_tx_options"}},definitions:{aggregate_transfer_many_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/aggregate_transfer_many_additional_options"}]},aggregate_transfer_many_additional_options:{$typescript:'{"additionalProperties":false}',description:"Optional flags to aggregate data",type:"object",properties:{return_all_intervals:{description:"Add empty values for each interval if no matching data",type:"object",properties:{start_time:{type:"string"},end_time:{type:"string"}},additionalProperties:!1,required:["start_time","end_time"]}}},aggregate_transfer_many_groups:{type:"array",maxItems:5,items:{$ref:"#/definitions/aggregate_transfer_many_group"}},aggregate_transfer_many_group:{anyOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_group_period"},{$ref:"#/definitions/aggregate_transfer_many_group_field"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_group_metadata_field"}]},aggregate_transfer_many_group_field:{type:"object",properties:{type:{type:"string",enum:["field"]},field:{$ref:"#/definitions/aggregate_transfer_many_group_by_fields"},alias:{type:"string"}},required:["type","field"],additionalProperties:!1},aggregate_transfer_many_group_by_fields:{type:"string",enum:["type","status","from_wallet","to_wallet","wallet","token","transfer_group"]},aggregate_transfer_many_aggregator:{description:"Aggregator description",anyOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_aggregator_simple"},{$ref:"#/definitions/aggregate_transfer_many_aggregator_complex"}]},aggregate_transfer_many_aggregator_complex:{description:"Function and field to group",type:"object",properties:{function:{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_aggregator_simple"},field:{description:"Field to group by",type:"string",enum:["from.amount","to.amount","amount","abs.amount","transfer_group","from_wallet","to_wallet","wallet","token","id"]},alias:{description:"Alias to group under",type:"string"}},$typescript:'{"additionalProperties":false}'}},additionalProperties:!1};var Ua={$schema:"http://json-schema.org/draft-07/schema",$id:"AggregateTransferManyTxOutput",title:"AggregateTransferManyTxOutput",description:"Output of aggregateTransferMany",type:"object",properties:{rows:{description:"The results of the aggregation",$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_aggregate_results"},metadata:{description:"Information about the aggregation",$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_aggregating_metadata"}},additionalProperties:!1};var qa={$schema:"http://json-schema.org/draft-07/schema",$id:"AuthenticationCheckTxInput",title:"AuthenticationCheckTxInput",description:"Input for authenticationCheck",type:"object",properties:{options:{$ref:"#/definitions/authentication_check_tx_options"}},definitions:{authentication_check_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/authentication_check_additional_options"}]},authentication_check_additional_options:{description:"Optional flags for input",type:"object",default:{},$typescript:'{"additionalProperties":false}'}},additionalProperties:!1};var Ba={$schema:"http://json-schema.org/draft-07/schema",$id:"AuthenticationCheckTxOutput",title:"AuthenticationCheckTxOutput",description:"Output of authenticationCheck",type:"object",properties:{},additionalProperties:!1};var La={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateAccessTokenTxInput",title:"CreateAccessTokenTxInput",description:"Input for createAccessToken",type:"object",properties:{token:{anyOf:[{$ref:"#/definitions/create_access_token_limited"},{$ref:"#/definitions/create_access_token_admin"}]},options:{$ref:"#/definitions/create_access_token_tx_options"}},definitions:{create_access_token_limited:{type:"object",properties:{type:{enum:["limited"]},scopes:{type:"array",items:{type:"string",enum:["aggregateTransferMany","findBalanceMany","findTokenMany","findTransferGroupMany","findTransferMany","findWalletMany","getBalance","getBalanceHistory","getStatistics","getToken","getTokenMany","getTransfer","getTransferGroup","getWallet","getWalletMany"]}},filters:{description:"Forced filters for requests",type:"object",$ref:"#/definitions/create_access_token_forced_filters"},expiresIn:{description:"JWT expiration time in minutes",type:"number"},options:{$ref:"#/definitions/create_access_token_tx_options"}},required:["scopes","type","expiresIn"],additionalProperties:!1},create_access_token_admin:{type:"object",properties:{type:{enum:["admin"]},expiresIn:{description:"JWT expiration time in minutes",type:"number"},options:{$ref:"#/definitions/create_access_token_tx_options"}},required:["type","expiresIn"],additionalProperties:!1},create_access_token_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/create_access_token_additional_options"}]},create_access_token_additional_options:{description:"Optional flags for input",type:"object",default:{},$typescript:'{"additionalProperties":false}'},create_access_token_forced_filters:{type:"object",properties:{wallet_foreign:{type:"string"},from_wallet_foreign:{type:"string"},to_wallet_foreign:{type:"string"},token_foreign:{type:"string"}},additionalProperties:!1}},additionalProperties:!1};var Va={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateAccessTokenTxOutput",title:"CreateAccessTokenTxOutput",description:"Output of createAccessToken",type:"object",properties:{authToken:{description:"The JWT token",type:"string"}},required:["token"],additionalProperties:!1};var Ha={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateContractTxInput",title:"CreateContractTxInput",description:"Input for createContract",type:"object",properties:{token:{allOf:[{$ref:"#/definitions/create_contract_token"}]},exchange:{allOf:[{$ref:"#/definitions/create_contract_exchange"}]},options:{$ref:"#/definitions/create_contract_tx_options"}},definitions:{create_contract_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/create_contract_additional_options"}]},create_contract_additional_options:{description:"Optional flags for input",type:"object",default:{},$typescript:'{"additionalProperties":false}'},create_contract_token:{type:"object",properties:{foreign:{allOf:[{$ref:"/db/token/token.schema.input.json#/properties/foreign"}]},metadata:{allOf:[{$ref:"/db/token/token.schema.input.json#/properties/metadata"}]},deposits:{allOf:[{$ref:"#/definitions/create_contract_deposits"}]},owner:{description:"The inital owner of the contract, defaults to foreign = 'house'",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"}},additionalProperties:!1,required:["foreign","deposits"]},create_contract_deposit:{type:"object",properties:{token:{description:"Token that is moved",allOf:[{$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"}]},amount:{allOf:[{$ref:"/db/transfer/transfer.schema.input.json#/properties/amount"}]}},additionalProperties:!1,required:["token","amount"]},create_contract_deposits:{type:"array",items:{allOf:[{$ref:"#/definitions/create_contract_deposit"}]},minItems:1},create_contract_exchange:{type:"object",properties:{from_wallet:{description:"Wallet the contract will belong to at the end (buyer)",allOf:[{$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"}]},from_latest_control_hash:{description:"Latest control_hash on the from_wallet+from_token combo",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]},from_token:{description:"Token that is transferred from from_wallet in exchange of the contract",$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"},to_wallet:{description:"Wallet the payment for the contract is sent to (seller)",allOf:[{$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"}]},amount:{allOf:[{$ref:"/db/transfer/transfer.schema.input.json#/properties/amount"}]},status:{description:"The state at which the exchange is created",type:"string",enum:["pending","finished"]},force:{allOf:[{$ref:"/db/transfer/transfer.schema.input.json#/properties/force"}]},metadata:{allOf:[{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"}]}},additionalProperties:!1,required:["from_wallet","amount"]}},required:["token"],additionalProperties:!1};var za={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateContractTxOutput",title:"CreateContractTxOutput",description:"Output of createContract",type:"object",properties:{token:{$ref:"/db/token/token.schema.json"},exchange:{description:"Created exchange for the Contract",allOf:[{$ref:"/txs/create-transfer-group/create-transfer-group.schema.output.json"}]}},required:["token"],additionalProperties:!1};var Ka={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateDepositTxInput",title:"CreateDepositTxInput",description:"Input for createDeposit",type:"object",properties:{deposit:{$ref:"/txs/create-transfer/create-transfer.schema.input.json#/definitions/transfer_data_deposit"},options:{$ref:"#/definitions/create_deposit_tx_options"}},definitions:{create_deposit_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"/txs/create-transfer/create-transfer.schema.input.json#/definitions/create_transfer_additional_options"}]}},additionalProperties:!1,required:["deposit"]};var Qa={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateDepositTxOutput",title:"CreateDepositTxOutput",description:"The transfer of funds and optionally the destination wallet balance",allOf:[{$ref:"/txs/create-transfer/create-transfer.schema.output.json"}]};var Ja={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateDistributionTxInput",title:"CreateDistributionTxInput",description:"Input for createDistribution",type:"object",properties:{distribution:{$ref:"#/definitions/distribution"},options:{$ref:"#/definitions/create_distribution_tx_options"}},definitions:{create_distribution_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/create_distribution_additional_options"}]},create_distribution_additional_options:{description:"Optional flags for input",type:"object",default:{dryrun:!1},properties:{dryrun:{type:"boolean",default:!1}},$typescript:'{"additionalProperties":false}'},leftover_target:{type:"object",properties:{rule:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_distributor_leftover_rule"}]},target:{type:"object",properties:{wallet:{allOf:[{$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"}]},metadata:{allOf:[{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"}]}},required:["wallet"],additionalProperties:!1}},required:["rule"],additionalProperties:!1},distribution:{description:"Distribute funds from one wallet between multiple wallets",type:"object",properties:{identifier:{description:"Unique identifier for this distribution",type:"string"},latest_control_hash:{description:"Latest control_hash on the from_wallet",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]},from_wallet:{description:"Wallet where funds are debited",allOf:[{$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"}]},token:{description:"Token that is moved",allOf:[{$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"}]},amount:{allOf:[{$ref:"/db/transfer/transfer.schema.input.json#/properties/amount"}]},status:{allOf:[{$ref:"/db/transfer/transfer.schema.input.json#/properties/status"}]},force:{allOf:[{$ref:"/db/transfer/transfer.schema.input.json#/properties/force"}]},metadata:{allOf:[{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"}]},copy_wallet_metadata_fields:{description:"Copy metadata information from Wallet metadata to transfer metadata",type:"array",items:{$ref:"#/definitions/copy_metadata_field"}},transfer_group:{description:"TransferGroup the transfer belongs to",allOf:[{$ref:"/txs/get-transfer-group/get-transfer-group.schema.input.json#/definitions/unique_transfer_group_filter"}]},targets:{anyOf:[{$ref:"#/definitions/target_wallets"},{$ref:"#/definitions/target_token"}]},leftover:{allOf:[{$ref:"#/definitions/leftover_target"}]}},required:["identifier","from_wallet","token","amount","targets","leftover"],additionalProperties:!1},copy_metadata_field:{description:"Copy metadata info from property to property",type:"object",properties:{from_property:{type:"string"},to_property:{type:"string"}},required:["from_property"],additionalProperties:!1},target_token:{description:"Wallets will receive funds based on their balance of this token",allOf:[{$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"}]},target_wallet:{type:"object",properties:{wallet:{description:"Wallet where funds are credited",allOf:[{$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"}]},portion:{description:"Number specifying the portion of funds to be credited",type:["string","number"]},metadata:{allOf:[{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"}]}},required:["wallet"],additionalProperties:!1},target_wallets:{type:"array",items:{$ref:"#/definitions/target_wallet"},minItems:1}},required:["distribution"],additionalProperties:!1};var Xa={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateDistributionTxOutput",title:"CreateDistributionTxOutput",description:"Output of createDistribution",type:"object",properties:{transfer_group:{description:"Created distribution transfer group",allOf:[{$ref:"/db/transfer-group/transfer-group.schema.json"}]},transfers:{description:"Created transfers",type:"array",items:{$ref:"/db/transfer/transfer.schema.json"}}},required:["transfer_group","transfers"],additionalProperties:!1};var Ya={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateTokenTxInput",title:"CreateTokenTxInput",description:"Input for createToken function",type:"object",properties:{token:{$ref:"#/definitions/create_token_input"},options:{$ref:"#/definitions/create_token_tx_options"}},definitions:{create_token_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"}]},create_token_input:{type:"object",properties:{foreign:{$ref:"/db/token/token.schema.json#/properties/foreign"},public:{$ref:"/db/token/token.schema.json#/properties/public"},metadata:{$ref:"/db/token/token.schema.json#/properties/metadata"},divisor:{$ref:"/db/token/token.schema.json#/properties/divisor"},limit:{$ref:"/db/token/token.schema.json#/properties/limit"},type:{$ref:"/db/token/token.schema.json#/properties/type"},belongs_to:{description:"Wallet this token belongs_to",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"}},additionalProperties:!1,required:["foreign"]}},required:["token"],additionalProperties:!1};var Za={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateTokenTxOutput",title:"CreateTokenTxOutput",description:"The created token and respective wallet",type:"object",properties:{token:{$ref:"/db/token/token.schema.json"},wallet:{$ref:"/db/wallet/wallet.schema.json"}},additionalProperties:!1,required:["token","wallet"]};var es={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateTransferTxInput",title:"CreateTransferTxInput",description:"Input for createTransfer",type:"object",properties:{transfer:{$ref:"#/definitions/transfer_data"},options:{$ref:"#/definitions/create_transfer_tx_options"}},definitions:{create_transfer_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/create_transfer_additional_options"}]},create_transfer_additional_options:{description:"Additional flags to determine the return",type:"object",default:{},properties:{return_from_balance:{$id:"return_from_balance",description:"Whether the request should also return from wallet balance",type:"boolean",default:!1},return_to_balance:{$id:"return_to_balance",description:"Whether the request should also return to wallet balance",type:"boolean",default:!1},create_to_wallet_if_not_exists:{type:"boolean",description:"If true then the wallet will be created if not found. Only valid with 'foreign'",default:!1}},$typescript:'{"additionalProperties": false}'},transfer_data:{anyOf:[{$ref:"#/definitions/transfer_data_regular"},{$ref:"#/definitions/transfer_data_deposit"},{$ref:"#/definitions/transfer_data_withdrawal"}]},transfer_data_regular:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},latest_control_hash:{description:"Latest control_hash on the from_wallet",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]},from_wallet:{description:"Wallet where funds are debited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},to_wallet:{description:"Wallet where funds are credited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},token:{description:"Token that is moved",$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"},amount:{$ref:"/db/transfer/transfer.schema.input.json#/properties/amount"},type:{description:"Type of transfer",enum:["transfer"]},status:{$ref:"/db/transfer/transfer.schema.input.json#/properties/status"},force:{$ref:"/db/transfer/transfer.schema.input.json#/properties/force"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},transfer_group:{description:"TransferGroup the transfer belongs to",$ref:"/txs/get-transfer-group/get-transfer-group.schema.input.json#/definitions/unique_transfer_group_filter"},created_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/created_at"}},required:["from_wallet","to_wallet","token","amount","type"],$typescript:'{"additionalProperties": false}'},transfer_data_deposit:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},latest_control_hash:{description:"Latest control_hash on the from_wallet",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]},from_wallet:{description:"Wallet where funds are debited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},to_wallet:{description:"Wallet where funds are credited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},token:{description:"Token that is moved",$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"},amount:{$ref:"/db/transfer/transfer.schema.input.json#/properties/amount"},type:{description:"Type of transfer",enum:["deposit"]},status:{$ref:"/db/transfer/transfer.schema.input.json#/properties/status"},force:{$ref:"/db/transfer/transfer.schema.input.json#/properties/force"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},transfer_group:{description:"TransferGroup the transfer belongs to",$ref:"/txs/get-transfer-group/get-transfer-group.schema.input.json#/definitions/unique_transfer_group_filter"},created_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/created_at"}},required:["to_wallet","token","amount"],$typescript:'{"additionalProperties": false}'},transfer_data_withdrawal:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},latest_control_hash:{description:"Latest control_hash on the from_wallet",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]},from_wallet:{description:"Wallet where funds are debited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},to_wallet:{description:"Wallet where funds are credited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},token:{description:"Token that is moved",$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"},amount:{$ref:"/db/transfer/transfer.schema.input.json#/properties/amount"},type:{description:"Type of transfer",enum:["withdrawal"]},status:{$ref:"/db/transfer/transfer.schema.input.json#/properties/status"},force:{$ref:"/db/transfer/transfer.schema.input.json#/properties/force"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},transfer_group:{description:"TransferGroup the transfer belongs to",$ref:"/txs/get-transfer-group/get-transfer-group.schema.input.json#/definitions/unique_transfer_group_filter"},created_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/created_at"}},required:["from_wallet","token","amount"],$typescript:'{"additionalProperties": false}'}},required:["transfer"],additionalProperties:!1};var ts={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateTransferTxOutput",title:"CreateTransferTxOutput",description:"Output of createTransfer",type:"object",properties:{transfer:{description:"Created transfer object",$ref:"/txs/get-transfer/get-transfer.schema.output.json#/definitions/transfer"},from_balance:{description:"Debited wallet balance",$ref:"/txs/get-balance/get-balance.schema.output.json#/definitions/balance"},to_balance:{description:"Credited wallet balance",$ref:"/txs/get-balance/get-balance.schema.output.json#/definitions/balance"}},additionalProperties:!1,required:["transfer"]};var rs={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateTransferGroupTxInput",title:"CreateTransferGroupTxInput",description:"Input for createTransferGroup",type:"object",properties:{transfer_group:{$ref:"#/definitions/transfer_group_data"},options:{$ref:"#/definitions/create_transfer_group_tx_options"}},definitions:{create_transfer_group_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/create_transfer_group_additional_options"}]},create_transfer_group_additional_options:{description:"Optional flags for input",type:"object",default:{},properties:{create_to_wallet_if_not_exists:{type:"boolean",description:"If true then the wallet will be created if not found. Only valid with 'foreign'",default:!1},validate_final_balance_only:{type:"boolean",description:"If true then transfers within a group will ignore balance restrictions. Only final transfers for wallets are checked. Only valid with transfer_status_lock",default:!1}},$typescript:'{"additionalProperties": false}'},transfer_group_data:{type:"object",description:"Input for the transferGroup to create",properties:{identifier:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/identifier"},status:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/status"},transfer_status:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/transfer_status"},metadata:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/metadata"},children:{description:"Array of children",type:"array",items:{$ref:"#/definitions/child_transfer_data"}}},additionalProperties:!1},child_transfer_data:{anyOf:[{$ref:"#/definitions/child_transfer_data_regular"},{$ref:"#/definitions/child_transfer_data_deposit"},{$ref:"#/definitions/child_transfer_data_withdrawal"}]},child_transfer_data_regular:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},latest_control_hash:{description:"Latest control_hash on the from_wallet",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]},from_wallet:{description:"Wallet where funds are debited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},to_wallet:{description:"Wallet where funds are credited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},token:{description:"Token that is moved",$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"},amount:{$ref:"/db/transfer/transfer.schema.input.json#/properties/amount"},type:{description:"Type of transfer",enum:["transfer"]},force:{$ref:"/db/transfer/transfer.schema.input.json#/properties/force"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},created_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/created_at"}},required:["from_wallet","to_wallet","token","amount","type"],$typescript:'{"additionalProperties": false}'},child_transfer_data_deposit:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},latest_control_hash:{description:"Latest control_hash on the from_wallet",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]},from_wallet:{description:"Wallet where funds are debited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},to_wallet:{description:"Wallet where funds are credited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},token:{description:"Token that is moved",$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"},amount:{$ref:"/db/transfer/transfer.schema.input.json#/properties/amount"},type:{description:"Type of transfer",enum:["deposit"]},force:{$ref:"/db/transfer/transfer.schema.input.json#/properties/force"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},created_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/created_at"}},required:["to_wallet","token","amount"],$typescript:'{"additionalProperties": false}'},child_transfer_data_withdrawal:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},latest_control_hash:{description:"Latest control_hash on the from_wallet",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]},from_wallet:{description:"Wallet where funds are debited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},to_wallet:{description:"Wallet where funds are credited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},token:{description:"Token that is moved",$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"},amount:{$ref:"/db/transfer/transfer.schema.input.json#/properties/amount"},type:{description:"Type of transfer",enum:["withdrawal"]},force:{$ref:"/db/transfer/transfer.schema.input.json#/properties/force"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},created_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/created_at"}},required:["from_wallet","token","amount"],$typescript:'{"additionalProperties": false}'}},required:[],additionalProperties:!1};var ns={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateTransferGroupTxOutput",title:"CreateTransferGroupTxOutput",description:"Output of createTransferGroup",type:"object",properties:{transfer_group:{$ref:"/db/transfer-group/transfer-group.schema.json"},transfers:{description:"Created transfer objects",type:"array",items:{$ref:"/txs/get-transfer/get-transfer.schema.output.json#/definitions/transfer"}}},required:["transfer_group"],additionalProperties:!1};var as={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateTransferManyTxInput",title:"CreateTransferManyTxInput",description:"Input for CreateTransferMany",type:"object",properties:{transfers:{description:"An array of transfers",type:"array",items:{$ref:"/txs/create-transfer/create-transfer.schema.input.json#/definitions/transfer_data"}},options:{$ref:"#/definitions/create_transfer_many_tx_options"}},definitions:{create_transfer_many_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/create_transfer_many_additional_options"}]},create_transfer_many_additional_options:{description:"Optional flags for input",type:"object",default:{},properties:{return_from_balance:{$id:"return_from_balance",description:"Whether the request should also return from wallet balance",type:"boolean",default:!1},return_to_balance:{$id:"return_to_balance",description:"Whether the request should also return to wallet balance",type:"boolean",default:!1},create_to_wallet_if_not_exists:{type:"boolean",description:"If true then the wallet will be created if not found. Only valid with 'foreign'",default:!1}},$typescript:'{"additionalProperties": false}'}},required:["transfers"],additionalProperties:!1};var ss={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateTransferManyTxOutput",title:"CreateTransferManyTxOutput",description:"Output of CreateTransferMany",type:"object",properties:{transfers:{description:"Created transfer objects",type:"array",items:{$ref:"/txs/get-transfer/get-transfer.schema.output.json#/definitions/transfer"}},from_balances:{description:"Debited wallet balances",type:"array",items:{$ref:"/txs/get-balance/get-balance.schema.output.json#/definitions/balance"}},to_balances:{description:"Credited wallet balances",type:"array",items:{$ref:"/txs/get-balance/get-balance.schema.output.json#/definitions/balance"}}},required:["transfers"],additionalProperties:!1};var is={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateWalletTxInput",title:"CreateWalletTxInput",description:"Input for createWallet",type:"object",properties:{wallet:{$ref:"/db/wallet/wallet.schema.input.json"},options:{$ref:"#/definitions/create_wallet_tx_options"}},definitions:{create_wallet_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"}]}},additionalProperties:!1,required:["wallet"]};var os={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateWalletTxOutput",title:"CreateWalletTxOutput",description:"The created wallet",type:"object",properties:{wallet:{$ref:"/db/wallet/wallet.schema.json"}},additionalProperties:!1,required:["wallet"]};var ps={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateWithdrawalTxInput",title:"CreateWithdrawalTxInput",description:"Input for createWithdrawal",type:"object",properties:{withdrawal:{$ref:"/txs/create-transfer/create-transfer.schema.input.json#/definitions/transfer_data_withdrawal"},options:{$ref:"#/definitions/create_withdrawal_tx_options"}},definitions:{create_withdrawal_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"/txs/create-transfer/create-transfer.schema.input.json#/definitions/create_transfer_additional_options"}]}},required:["withdrawal"],additionalProperties:!1};var ds={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateWithdrawalTxOutput",title:"CreateWithdrawalTxOutput",description:"Output of createWithdrawal",allOf:[{$ref:"/txs/create-transfer/create-transfer.schema.output.json"}]};var fs={$schema:"http://json-schema.org/draft-07/schema",$id:"ExportDatabaseTxInput",title:"ExportDatabaseTxInput",description:"Input for exportDatabase",type:"object",properties:{export_name:{description:"Name of the created export file",type:"string"}},definitions:{},additionalProperties:!1};var us={$schema:"http://json-schema.org/draft-07/schema",$id:"ExportDatabaseTxOutput",title:"ExportDatabaseTxOutput",description:"Output of exportDatabase",type:"object",properties:{message:{type:"string"}},additionalProperties:!1};var ls={$schema:"http://json-schema.org/draft-07/schema",$id:"FindBalanceManyTxInput",title:"FindBalanceManyTxInput",description:"Input for findBalanceMany",type:"object",properties:{balance:{$ref:"#/definitions/find_balance_many_filter"},options:{$ref:"#/definitions/find_balance_many_tx_options"}},definitions:{find_balance_many_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_limiting_options"},{$ref:"#/definitions/find_balance_many_ordering_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/find_balance_many_additional_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_select_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_deselect_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_options"}]},find_balance_many_additional_options:{description:"Optional flags for input",type:"object",default:{},$typescript:'{"additionalProperties":false}'},find_balance_many_ordering_options:{$typescript:'{"additionalProperties":false}',description:"Optional flags for input ordering",type:"object",properties:{order:{description:"Ordering options",type:"array",items:{$ref:"#/definitions/find_balance_many_ordering_input"}}}},find_balance_many_ordering_input:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_ordering_input"},{$ref:"#/definitions/find_balance_many_ordering_input_field"}]},find_balance_many_ordering_input_field:{type:"object",properties:{field:{$ref:"/db/transfer-log/transfer-log.schema.json#/definitions/TransferLogTableFields"}},$typescript:'{"additionalProperties": false}'},balance_filter_foreign_fields:{type:"string",enum:["wallet","token"]},advanced_balance_filter_fields_foreign:{type:"object",properties:{field:{$ref:"#/definitions/balance_filter_foreign_fields"}},required:["field"],$typescript:'{"additionalProperties": false}'},balance_filter:{type:"object",properties:{wallet:{$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},token:{$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"},transfer:{$ref:"/txs/get-transfer/get-transfer.schema.input.json#/definitions/unique_transfer_filter"},type:{$ref:"/db/transfer-log/transfer-log.schema.json#/properties/type"},amount:{$ref:"/db/transfer-log/transfer-log.schema.json#/properties/amount"},pending_amount:{$ref:"/db/transfer-log/transfer-log.schema.json#/properties/pending_amount"},finished_amount:{$ref:"/db/transfer-log/transfer-log.schema.json#/properties/finished_amount"},status:{$ref:"/db/transfer-log/transfer-log.schema.json#/properties/status"},metadata:{$ref:"/db/consts.schema.json#/definitions/DbFilterMetadata"}},$typescript:'{"additionalProperties": false}'},advanced_balance_filter_inner:{type:"object",properties:{inner:{type:"array",items:{$ref:"#/definitions/advanced_balance_filter"}}},$typescript:'{"additionalProperties":false}'},advanced_balance_filter_where_inner:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereInner"},{$ref:"#/definitions/advanced_balance_filter_inner"}]},advanced_balance_filter_where_primitive:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWherePrimitive"},{$ref:"#/definitions/advanced_balance_filter_fields"}]},advanced_balance_filter_where_primitive_foreign:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWherePrimitiveForeign"},{$ref:"#/definitions/advanced_balance_filter_fields_foreign"}]},advanced_balance_filter_where_object:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereObject"},{$ref:"#/definitions/advanced_balance_filter_values"}]},advanced_balance_filter_where_in:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereIns"},{$ref:"#/definitions/advanced_balance_filter_fields_w_foreign"}]},advanced_balance_filter_where_null:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereNulls"},{$ref:"#/definitions/advanced_balance_filter_fields"}]},advanced_balance_filter_fields:{type:"object",properties:{field:{type:"string",enum:["type","amount","pending_amount","finished_amount","status","metadata","updated_at"]}},required:["field"],$typescript:'{"additionalProperties": false}'},advanced_balance_filter_fields_w_foreign:{type:"object",properties:{field:{anyOf:[{$ref:"/db/transfer-log/transfer-log.schema.json#/definitions/TransferLogTableFields"},{$ref:"#/definitions/balance_filter_foreign_fields"}]}},required:["field"],$typescript:'{"additionalProperties": false}'},advanced_balance_filter_values:{type:"object",properties:{value:{$ref:"#/definitions/balance_filter"}},required:["value"],$typescript:'{"additionalProperties": false}'},advanced_balance_filter:{anyOf:[{$ref:"#/definitions/advanced_balance_filter_where_inner"},{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereMetadataIns"},{$ref:"#/definitions/advanced_balance_filter_where_object"},{$ref:"#/definitions/advanced_balance_filter_where_primitive"},{$ref:"#/definitions/advanced_balance_filter_where_primitive_foreign"},{$ref:"#/definitions/advanced_balance_filter_where_in"},{$ref:"#/definitions/advanced_balance_filter_where_null"},{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereMetadataNulls"}]},advanced_balance_filter_array:{type:"array",items:{$ref:"#/definitions/advanced_balance_filter"}},find_balance_many_filter:{oneOf:[{$ref:"#/definitions/balance_filter"},{$ref:"#/definitions/advanced_balance_filter_array"}]}},additionalProperties:!1};var cs={$schema:"http://json-schema.org/draft-07/schema",$id:"FindBalanceManyTxOutput",title:"FindBalanceManyTxOutput",description:"Output of findBalanceMany",type:"object",properties:{balances:{description:"Found balances",type:"array",items:{$ref:"/txs/get-balance/get-balance.schema.output.json#/definitions/balance"}},metadata:{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_find_metadata"}},required:["balances","metadata"],additionalProperties:!1};var ms={$schema:"http://json-schema.org/draft-07/schema",$id:"FindTokenManyTxInput",title:"FindTokenManyTxInput",description:"Input for findTokenMany",type:"object",properties:{token:{$ref:"#/definitions/find_token_many_filter"},options:{$ref:"#/definitions/find_token_many_tx_options"}},definitions:{find_token_many_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_limiting_options"},{$ref:"#/definitions/find_token_many_ordering_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/find_token_many_additional_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_select_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_deselect_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_options"}]},find_token_many_additional_options:{description:"Optional flags for input",type:"object",default:{},$typescript:'{"additionalProperties":false}'},find_token_many_ordering_options:{$typescript:'{"additionalProperties":false}',description:"Optional flags for input ordering",type:"object",properties:{order:{description:"Ordering options",type:"array",items:{$ref:"#/definitions/find_token_many_ordering_input"}}}},find_token_many_ordering_input:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_ordering_input"},{$ref:"#/definitions/find_token_many_ordering_input_field"}]},find_token_many_ordering_input_field:{type:"object",properties:{field:{$ref:"/db/token/token.schema.json#/definitions/TokenTableFields"}},$typescript:'{"additionalProperties": false}'},token_filter_foreign_fields:{type:"string",enum:["belongs_to"]},token_filter:{type:"object",properties:{foreign:{description:"Foreign of token to return",$ref:"/db/token/token.schema.json#/properties/foreign"},type:{$ref:"/db/token/token.schema.json#/properties/type"},metadata:{$ref:"/db/consts.schema.json#/definitions/DbFilterMetadata"},belongs_to:{$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"}},$typescript:'{"additionalProperties": false}'},advanced_token_filter_inner:{type:"object",properties:{inner:{type:"array",items:{$ref:"#/definitions/advanced_token_filter"}}},$typescript:'{"additionalProperties":false}'},advanced_token_filter_where_inner:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereInner"},{$ref:"#/definitions/advanced_token_filter_inner"}]},advanced_token_filter_where_primitive:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWherePrimitive"},{$ref:"#/definitions/advanced_token_filter_fields"}]},advanced_token_filter_where_primitive_foreign:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWherePrimitiveForeign"},{$ref:"#/definitions/advanced_token_filter_fields_foreign"}]},advanced_token_filter_where_object:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereObject"},{$ref:"#/definitions/advanced_token_filter_values"}]},advanced_token_filter_where_in:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereIns"},{$ref:"#/definitions/advanced_token_filter_fields_w_foreign"}]},advanced_token_filter_where_null:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereNulls"},{$ref:"#/definitions/advanced_token_filter_fields"}]},advanced_token_filter_fields:{type:"object",properties:{field:{$ref:"/db/token/token.schema.json#/definitions/TokenTableFields"}},required:["field"],$typescript:'{"additionalProperties": false}'},advanced_token_filter_fields_foreign:{type:"object",properties:{field:{$ref:"#/definitions/token_filter_foreign_fields"}},required:["field"],$typescript:'{"additionalProperties": false}'},advanced_token_filter_fields_w_foreign:{type:"object",properties:{field:{anyOf:[{$ref:"/db/token/token.schema.json#/definitions/TokenTableFields"},{$ref:"#/definitions/token_filter_foreign_fields"}]}},required:["field"],$typescript:'{"additionalProperties": false}'},advanced_token_filter_values:{type:"object",properties:{value:{$ref:"#/definitions/token_filter"}},required:["value"],$typescript:'{"additionalProperties": false}'},advanced_token_filter:{anyOf:[{$ref:"#/definitions/advanced_token_filter_where_inner"},{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereMetadataIns"},{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereMetadataPrimitive"},{$ref:"#/definitions/advanced_token_filter_where_object"},{$ref:"#/definitions/advanced_token_filter_where_primitive"},{$ref:"#/definitions/advanced_token_filter_where_primitive_foreign"},{$ref:"#/definitions/advanced_token_filter_where_in"},{$ref:"#/definitions/advanced_token_filter_where_null"},{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereMetadataNulls"}]},advanced_token_filter_array:{type:"array",items:{$ref:"#/definitions/advanced_token_filter"}},find_token_many_filter:{oneOf:[{$ref:"#/definitions/token_filter"},{$ref:"#/definitions/advanced_token_filter_array"}]}},additionalProperties:!1};var hs={$schema:"http://json-schema.org/draft-07/schema",$id:"FindTokenManyTxOutput",title:"FindTokenManyTxOutput",description:"Output of findTokenMany",type:"object",properties:{tokens:{description:"Found tokens",type:"array",items:{$ref:"/txs/get-token/get-token.schema.output.json#/definitions/token"}},metadata:{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_find_metadata"}},required:["tokens","metadata"],additionalProperties:!1};var _s={$schema:"http://json-schema.org/draft-07/schema",$id:"FindTransferGroupManyTxInput",title:"FindTransferGroupManyTxInput",description:"Input for findTransferGroupMany",type:"object",properties:{transfer_group:{$ref:"#/definitions/find_transfer_group_many_filter"},options:{$ref:"#/definitions/find_transfer_group_many_tx_options"}},definitions:{find_transfer_group_many_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_limiting_options"},{$ref:"#/definitions/find_transfer_group_many_ordering_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/find_transfer_group_many_additional_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_select_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_deselect_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_options"}]},find_transfer_group_many_additional_options:{$typescript:'{"additionalProperties":false}',type:"object",properties:{return_transfers:{description:"Return running balance for each transfer_group for wallet in question",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"}}},find_transfer_group_many_ordering_options:{$typescript:'{"additionalProperties":false}',description:"Optional flags for input ordering",type:"object",properties:{order:{description:"Ordering options",type:"array",items:{$ref:"#/definitions/find_transfer_group_many_ordering_input"}}}},find_transfer_group_many_ordering_input:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_ordering_input"},{$ref:"#/definitions/find_transfer_group_many_ordering_input_field"}]},find_transfer_group_many_ordering_input_field:{type:"object",properties:{field:{$ref:"/db/transfer-group/transfer-group.schema.json#/definitions/TransferGroupTableFields"}},$typescript:'{"additionalProperties": false}'},transfer_group_filter_identifier_fields:{type:"string",enum:["transfer_group","reverses"]},advanced_transfer_group_filter_fields_identifier:{type:"object",properties:{field:{$ref:"#/definitions/transfer_group_filter_identifier_fields"}},required:["field"],$typescript:'{"additionalProperties": false}'},transfer_group_filter:{type:"object",properties:{identifier:{$ref:"/db/transfer-group/transfer-group.schema.json#/properties/identifier"},status:{$ref:"/db/transfer-group/transfer-group.schema.json#/properties/status"},type:{$ref:"/db/transfer-group/transfer-group.schema.json#/properties/type"},transfer_status:{$ref:"/db/transfer-group/transfer-group.schema.json#/properties/transfer_status"},reverses:{$ref:"/txs/get-transfer-group/get-transfer-group.schema.input.json#/definitions/unique_transfer_group_filter"},metadata:{$ref:"/db/consts.schema.json#/definitions/DbFilterMetadata"}},$typescript:'{"additionalProperties": false}'},advanced_transfer_group_filter_inner:{type:"object",properties:{inner:{type:"array",items:{$ref:"#/definitions/advanced_transfer_group_filter"}}},$typescript:'{"additionalProperties":false}'},advanced_transfer_group_filter_where_inner:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereInner"},{$ref:"#/definitions/advanced_transfer_group_filter_inner"}]},advanced_transfer_group_filter_where_primitive:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWherePrimitive"},{$ref:"#/definitions/advanced_transfer_group_filter_fields"}]},advanced_transfer_group_filter_where_primitive_identifier:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWherePrimitiveIdentifier"},{$ref:"#/definitions/advanced_transfer_group_filter_fields_identifier"}]},advanced_transfer_group_filter_where_object:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereObject"},{$ref:"#/definitions/advanced_transfer_group_filter_values"}]},advanced_transfer_group_filter_where_in:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereIns"},{$ref:"#/definitions/advanced_transfer_group_filter_fields_w_foreign"}]},advanced_transfer_group_filter_where_null:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereNulls"},{$ref:"#/definitions/advanced_transfer_group_filter_fields"}]},advanced_transfer_group_filter_fields:{type:"object",properties:{field:{$ref:"/db/transfer-group/transfer-group.schema.json#/definitions/TransferGroupTableFields"}},required:["field"],$typescript:'{"additionalProperties": false}'},advanced_transfer_group_filter_fields_w_foreign:{type:"object",properties:{field:{anyOf:[{$ref:"/db/transfer-group/transfer-group.schema.json#/definitions/TransferGroupTableFields"},{$ref:"#/definitions/transfer_group_filter_identifier_fields"}]}},required:["field"],$typescript:'{"additionalProperties": false}'},advanced_transfer_group_filter_values:{type:"object",properties:{value:{$ref:"#/definitions/transfer_group_filter"}},required:["value"],$typescript:'{"additionalProperties": false}'},advanced_transfer_group_filter:{anyOf:[{$ref:"#/definitions/advanced_transfer_group_filter_where_inner"},{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereMetadataIns"},{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereMetadataPrimitive"},{$ref:"#/definitions/advanced_transfer_group_filter_where_object"},{$ref:"#/definitions/advanced_transfer_group_filter_where_primitive"},{$ref:"#/definitions/advanced_transfer_group_filter_where_primitive_identifier"},{$ref:"#/definitions/advanced_transfer_group_filter_where_in"},{$ref:"#/definitions/advanced_transfer_group_filter_where_null"},{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereMetadataNulls"}]},advanced_transfer_group_filter_array:{type:"array",items:{$ref:"#/definitions/advanced_transfer_group_filter"}},find_transfer_group_many_filter:{oneOf:[{$ref:"#/definitions/transfer_group_filter"},{$ref:"#/definitions/advanced_transfer_group_filter_array"}]}},required:["transfer_group"],additionalProperties:!1};var gs={$schema:"http://json-schema.org/draft-07/schema",$id:"FindTransferGroupManyTxOutput",title:"FindTransferGroupManyTxOutput",description:"Output of find-transfer-group-many",type:"object",properties:{transfer_groups:{description:"Found transfers",type:"array",items:{$ref:"/txs/get-transfer-group/get-transfer-group.schema.output.json#/definitions/transfer_group"}},metadata:{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_find_metadata"}},required:["transfer_groups","metadata"],additionalProperties:!1};var Ts={$schema:"http://json-schema.org/draft-07/schema",$id:"FindTransferManyTxInput",title:"FindTransferManyTxInput",description:"Input for findTransferMany",type:"object",properties:{transfer:{$ref:"#/definitions/find_transfer_many_filter"},options:{$ref:"#/definitions/find_transfer_many_tx_options"}},definitions:{find_transfer_many_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_limiting_options"},{$ref:"#/definitions/find_transfer_many_ordering_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/find_transfer_many_additional_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_select_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_deselect_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_options"}]},find_transfer_many_additional_options:{$typescript:'{"additionalProperties":false}',type:"object",properties:{return_running_balance_for_wallet:{description:"Return running balance for each transfer for wallet in question",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},return_signed_amount_for_wallet:{description:"Return amount as signed value for each transfer for wallet in question",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"}}},find_transfer_many_ordering_options:{$typescript:'{"additionalProperties":false}',description:"Optional flags for input ordering",type:"object",properties:{order:{description:"Ordering options",type:"array",items:{$ref:"#/definitions/find_transfer_many_ordering_input"}}}},find_transfer_many_ordering_input:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_ordering_input"},{$ref:"#/definitions/find_transfer_many_ordering_input_field"}]},find_transfer_many_ordering_input_field:{type:"object",properties:{field:{$ref:"/db/transfer/transfer.schema.json#/definitions/TransferTableAccessibleFields"}},$typescript:'{"additionalProperties": false}'},transfer_filter_foreign_fields:{type:"string",enum:["from_wallet","to_wallet","wallet","token"]},transfer_filter_identifier_fields:{type:"string",enum:["transfer_group"]},transfer_filter:{type:"object",properties:{from_wallet:{$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},to_wallet:{$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},wallet:{$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},token:{$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"},status:{$ref:"/db/transfer/transfer.schema.json#/properties/status"},transfer_group:{$ref:"/txs/get-transfer-group/get-transfer-group.schema.input.json#/definitions/unique_transfer_group_filter"},metadata:{$ref:"/db/consts.schema.json#/definitions/DbFilterMetadata"}},$typescript:'{"additionalProperties": false}'},advanced_transfer_filter_inner:{type:"object",properties:{inner:{type:"array",items:{$ref:"#/definitions/advanced_transfer_filter"}}},$typescript:'{"additionalProperties":false}'},advanced_transfer_filter_where_inner:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereInner"},{$ref:"#/definitions/advanced_transfer_filter_inner"}]},advanced_transfer_filter_where_primitive:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWherePrimitive"},{$ref:"#/definitions/advanced_transfer_filter_fields"}]},advanced_transfer_filter_where_primitive_foreign:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWherePrimitiveForeign"},{$ref:"#/definitions/advanced_transfer_filter_fields_foreign"}]},advanced_transfer_filter_where_primitive_identifier:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWherePrimitiveIdentifier"},{$ref:"#/definitions/advanced_transfer_filter_fields_identifier"}]},advanced_transfer_filter_where_object:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereObject"},{$ref:"#/definitions/advanced_transfer_filter_values"}]},advanced_transfer_filter_where_in:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereIns"},{$ref:"#/definitions/advanced_transfer_filter_fields_w_foreign"}]},advanced_transfer_filter_where_null:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereNulls"},{$ref:"#/definitions/advanced_transfer_filter_fields"}]},advanced_transfer_filter_fields:{type:"object",properties:{field:{$ref:"/db/transfer/transfer.schema.json#/definitions/TransferTableAccessibleFields"}},required:["field"],$typescript:'{"additionalProperties": false}'},advanced_transfer_filter_fields_foreign:{type:"object",properties:{field:{$ref:"#/definitions/transfer_filter_foreign_fields"}},required:["field"],$typescript:'{"additionalProperties": false}'},advanced_transfer_filter_fields_identifier:{type:"object",properties:{field:{$ref:"#/definitions/transfer_filter_identifier_fields"}},required:["field"],$typescript:'{"additionalProperties": false}'},advanced_transfer_filter_fields_w_foreign:{type:"object",properties:{field:{anyOf:[{$ref:"/db/transfer/transfer.schema.json#/definitions/TransferTableAccessibleFields"},{$ref:"#/definitions/transfer_filter_foreign_fields"}]}},required:["field"],$typescript:'{"additionalProperties": false}'},advanced_transfer_filter_values:{type:"object",properties:{value:{$ref:"#/definitions/transfer_filter"}},required:["value"],$typescript:'{"additionalProperties": false}'},advanced_transfer_filter:{anyOf:[{$ref:"#/definitions/advanced_transfer_filter_where_inner"},{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereMetadataIns"},{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereMetadataPrimitive"},{$ref:"#/definitions/advanced_transfer_filter_where_object"},{$ref:"#/definitions/advanced_transfer_filter_where_primitive"},{$ref:"#/definitions/advanced_transfer_filter_where_primitive_foreign"},{$ref:"#/definitions/advanced_transfer_filter_where_primitive_identifier"},{$ref:"#/definitions/advanced_transfer_filter_where_in"},{$ref:"#/definitions/advanced_transfer_filter_where_null"},{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereMetadataNulls"}]},advanced_transfer_filter_array:{type:"array",items:{$ref:"#/definitions/advanced_transfer_filter"}},find_transfer_many_filter:{oneOf:[{$ref:"#/definitions/transfer_filter"},{$ref:"#/definitions/advanced_transfer_filter_array"}]}},required:["transfer"],additionalProperties:!1};var ys={$schema:"http://json-schema.org/draft-07/schema",$id:"FindTransferManyTxOutput",title:"FindTransferManyTxOutput",description:"Output of findTransferMany",type:"object",properties:{transfers:{description:"Found transfers",type:"array",items:{$ref:"/txs/get-transfer/get-transfer.schema.output.json#/definitions/transfer"}},metadata:{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_find_metadata"}},required:["transfers","metadata"],additionalProperties:!1};var bs={$schema:"http://json-schema.org/draft-07/schema",$id:"FindWalletManyTxInput",title:"FindWalletManyTxInput",description:"Input for findWalletMany",type:"object",properties:{wallet:{$ref:"#/definitions/find_wallet_many_filter"},options:{$ref:"#/definitions/find_wallet_many_tx_options"}},definitions:{find_wallet_many_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_limiting_options"},{$ref:"#/definitions/find_wallet_many_ordering_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/find_wallet_many_additional_options"},{$ref:"#/definitions/find_wallet_many_select_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_options"}]},find_wallet_many_additional_options:{description:"Optional flags for input",type:"object",properties:{include_balance_for_token:{description:"If specified each wallet will have its balance included",$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"}},default:{},$typescript:'{"additionalProperties":false}'},find_wallet_many_ordering_options:{$typescript:'{"additionalProperties":false}',description:"Optional flags for input ordering",type:"object",properties:{order:{description:"Ordering options",type:"array",items:{$ref:"#/definitions/find_wallet_many_ordering_input"}}}},find_wallet_many_ordering_input:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_ordering_input"},{$ref:"#/definitions/find_wallet_many_ordering_input_field"}]},find_wallet_many_ordering_input_field:{type:"object",properties:{field:{$ref:"#/definitions/advanced_wallet_filter_fields"}},$typescript:'{"additionalProperties": false}'},find_wallet_many_filter:{oneOf:[{$ref:"#/definitions/wallet_filter"},{$ref:"#/definitions/advanced_wallet_filter_array"}]},wallet_filter:{type:"object",properties:{foreign:{$ref:"/db/wallet/wallet.schema.json#/properties/foreign"},name:{$ref:"/db/wallet/wallet.schema.json#/properties/name"},type:{$ref:"/db/wallet/wallet.schema.json#/properties/type"},status:{$ref:"/db/wallet/wallet.schema.json#/properties/status"},metadata:{$ref:"/db/consts.schema.json#/definitions/DbFilterMetadata"}},$typescript:'{"additionalProperties":false}'},advanced_wallet_filter_where_inner:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereInner"},{$ref:"#/definitions/advanced_wallet_filter_inner"}]},advanced_wallet_filter_inner:{type:"object",properties:{inner:{type:"array",items:{$ref:"#/definitions/advanced_wallet_filter"}}},$typescript:'{"additionalProperties":false}'},advanced_wallet_filter_where_primitive:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWherePrimitive"},{$ref:"#/definitions/advanced_wallet_filter_fields_object"}]},advanced_wallet_filter_where_object:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereObject"},{$ref:"#/definitions/advanced_wallet_filter_values"}]},advanced_wallet_filter_where_in:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereIns"},{$ref:"#/definitions/advanced_wallet_filter_fields_object"}]},advanced_wallet_filter_where_null:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereNulls"},{$ref:"#/definitions/advanced_wallet_filter_fields_object"}]},advanced_wallet_filter_fields_object:{type:"object",properties:{field:{$ref:"#/definitions/advanced_wallet_filter_fields"}},required:["field"],$typescript:'{"additionalProperties": false}'},advanced_wallet_filter_fields:{type:"string",enum:["id","balance_pending_amount","balance_finished_amount","balance_available_balance","foreign","name","type","status","created_at"]},advanced_wallet_filter_string_fields:{type:"string",enum:["foreign","name","type","status","created_at"]},advanced_wallet_filter_number_fields:{type:"string",enum:["id","balance_pending_amount","balance_finished_amount","balance_available_balance"]},advanced_wallet_filter_values:{type:"object",properties:{value:{$ref:"#/definitions/wallet_filter"}},required:["value"],$typescript:'{"additionalProperties": false}'},advanced_wallet_filter:{anyOf:[{$ref:"#/definitions/advanced_wallet_filter_where_inner"},{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereMetadataIns"},{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereMetadataPrimitive"},{$ref:"#/definitions/advanced_wallet_filter_where_primitive"},{$ref:"#/definitions/advanced_wallet_filter_where_object"},{$ref:"#/definitions/advanced_wallet_filter_where_in"},{$ref:"#/definitions/advanced_wallet_filter_where_null"}]},advanced_wallet_filter_array:{type:"array",items:{$ref:"#/definitions/advanced_wallet_filter"}},find_wallet_many_select_options:{$typescript:'{"additionalProperties":false}',description:"Optional flags to limit search result",type:"object",properties:{select:{description:"Select options",type:"array",items:{$ref:"/txs/find-wallet-many/find-wallet-many.schema.output.json#/definitions/wallet_with_balance_fields"}}}}},additionalProperties:!1};var Fs={$schema:"http://json-schema.org/draft-07/schema",$id:"FindWalletManyTxOutput",title:"FindWalletManyTxOutput",description:"Output of findWalletMany",type:"object",properties:{wallets:{description:"Wallets matching the query",type:"array",items:{anyOf:[{$ref:"/db/wallet/wallet.schema.json"},{type:"null"},{$ref:"#/definitions/wallet_with_balance"}]}},metadata:{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_find_metadata"}},definitions:{wallet_with_balance:{type:"object",properties:{id:{description:"System defined primary key",type:"integer"},foreign:{description:"User provided key for wallet. Must be unique",type:"string"},name:{description:"Name of the wallet",type:["string","null"]},metadata:{description:"Key/value metadata object",type:["object","null"]},type:{description:"Type of the wallet",default:"regular",$ref:"/db/consts.schema.json#/definitions/WalletType"},status:{description:"Current status for the wallet",default:"active",type:"string"},default_allow_negative:{description:"Boolean indicating if wallet (pending_amount + finished_amount) can be negative",default:!1,type:"boolean"},default_allow_positive:{description:"Boolean indicating if wallet (pending_amount + finished_amount) can be positive. Used for token balance to deny positive balance.",default:!0,type:"boolean"},created_at:{description:"Datetime when the wallet was created",type:"string",format:"date-time"},updated_at:{description:"Datetime when the wallet was last updated",type:"string",format:"date-time"},balance_transfer_id:{description:"Latest transfer id",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/transfer_id"},balance_token_id:{description:"Token ID of balance",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/token_id"},balance_token_foreign:{description:"Token Foreign of balance",$ref:"/db/token/token.schema.json#/properties/foreign"},balance_pending_amount:{description:"Current pending balance",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/pending_amount"},balance_pending_amount_to:{description:"Sum of incoming pending transfers",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/pending_amount_to"},balance_pending_amount_from:{description:"Sum of outgoing pending transfers",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/pending_amount_from"},balance_finished_amount:{description:"Current finished balance",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/finished_amount"},balance_amount:{description:"Current finished and pending balance sum",type:"number"},balance_available_balance:{description:"Available balance that is sum of pending_amount_from and finished_amount",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/available_balance"},balance_latest_control_hash:{description:"Latest control_hash associated with wallet token combination",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/latest_control_hash"},balance_updated_at:{description:"Last modification date of balance",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/created_at"}},additionalProperties:!1},wallet_with_balance_fields:{type:"string",enum:["id","foreign","name","metadata","type","status","default_allow_negative","default_allow_positive","created_at","updated_at","balance_transfer_id","balance_token_id","balance_token_foreign","balance_pending_amount","balance_pending_amount_to","balance_pending_amount_from","balance_finished_amount","balance_amount","balance_latest_control_hash","balance_updated_at","balance_available_balance"]}},required:["wallets","metadata"],additionalProperties:!1};var xs={$schema:"http://json-schema.org/draft-07/schema",$id:"FinishTransactionTxInput",title:"FinishTransactionTxInput",description:"Input for finishTransaction",type:"object",properties:{action:{description:"Finish transaction with commit/rollback",default:"commit",type:"string",enum:["commit","rollback"]},options:{$ref:"#/definitions/finish_transaction_tx_options"}},definitions:{finish_transaction_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/finish_transaction_additional_options"}]},finish_transaction_additional_options:{type:"object",properties:{transaction_id:{description:"Id of the transaction context to run the query in",type:"string"}},required:["transaction_id"],$typescript:'{"additionalProperties": false}'}},required:["action","options"],additionalProperties:!1};var $s={$schema:"http://json-schema.org/draft-07/schema",$id:"FinishTransactionTxOutput",title:"FinishTransactionTxOutput",description:"Output of finishTransaction",type:"object",properties:{success:{type:"boolean"},message:{description:"Error message when success is false",type:"string"}},required:["success"],additionalProperties:!1};var Os={$schema:"http://json-schema.org/draft-07/schema",$id:"GetBalanceTxInput",title:"GetBalanceTxInput",description:"Input for getBalance",type:"object",properties:{balance:{$ref:"#/definitions/unique_balance_filter"},options:{$ref:"#/definitions/get_balance_tx_options"}},definitions:{get_balance_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/get_balance_additional_options"}]},get_balance_additional_options:{description:"Optional flags for input",type:"object",properties:{create_wallet_if_not_exists:{type:"boolean",description:"If true then the missing wallet will be created if not found. Only valid with 'foreign'",default:!1},create_token_if_not_exists:{type:"boolean",description:"If true then the missing token will be created if not found. Only valid with 'foreign'",default:!1},create_if_not_exists:{type:"boolean",description:"If true then the missing balance will be created if not found. ",default:!1}},default:{},$typescript:'{"additionalProperties": false}'},unique_balance_filter:{type:"object",properties:{wallet:{$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},token:{$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"},datetime:{description:"Time the balance should be retrieved at",type:"string"}},required:["wallet","token"],additionalProperties:!1}},required:["balance"],additionalProperties:!1};var ws={$schema:"http://json-schema.org/draft-07/schema",$id:"GetBalanceTxOutput",title:"GetBalanceTxOutput",description:"Output of getBalance",type:"object",properties:{balance:{description:"requested balance",$ref:"#/definitions/balance"}},definitions:{balance:{type:"object",properties:{transfer_id:{description:"Latest transfer id",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/transfer_id"},token_id:{description:"Token ID of balance",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/token_id"},token_foreign:{description:"Token Foreign of balance",$ref:"/db/token/token.schema.json#/properties/foreign"},wallet_id:{description:"Wallet ID of balance",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/wallet_id"},wallet_foreign:{description:"Wallet Foreign of balance",$ref:"/db/wallet/wallet.schema.json#/properties/foreign"},pending_amount:{description:"Current pending balance",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/pending_amount"},pending_amount_to:{description:"Sum of incoming pending transfers",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/pending_amount_to"},pending_amount_from:{description:"Sum of outgoing pending transfers",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/pending_amount_from"},available_balance:{description:"Available balance that is sum of pending_amount_from and finished_amount",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/available_balance"},finished_amount:{description:"Current finished balance",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/finished_amount"},amount:{description:"Current finished and pending balance sum",type:"number"},latest_control_hash:{description:"Latest control_hash associated with wallet token combination",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/latest_control_hash"},updated_at:{description:"Last modification date of balance",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/created_at"}},required:["token_id","token_foreign","wallet_id","wallet_foreign","pending_amount","finished_amount","amount","latest_control_hash","updated_at"],additionalProperties:!1},balance_fields:{description:"Fields on the balance object",type:"string",enum:["transfer_id","token_id","token_foreign","wallet_id","wallet_foreign","pending_amount","pending_amount_to","pending_amount_from","finished_amount","available_balance","amount","latest_control_hash","updated_at"]}},additionalProperties:!1};var Is={$schema:"http://json-schema.org/draft-07/schema",$id:"GetBalanceHistoryTxInput",title:"GetBalanceHistoryTxInput",description:"Input for getBalanceHistory",type:"object",properties:{balance:{$ref:"/txs/get-balance/get-balance.schema.input.json#/definitions/unique_balance_filter"},options:{$ref:"#/definitions/get_balance_history_tx_options"}},definitions:{get_balance_history_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/get_balance_history_additional_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_limiting_options"},{$ref:"#/definitions/get_balance_history_ordering_options"},{$ref:"#/definitions/balance_history_select_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_options"}]},get_balance_history_additional_options:{description:"Optional flags for input",type:"object",properties:{create_wallet_if_not_exists:{type:"boolean",description:"If true then the missing wallet will be created if not found. Only valid with 'foreign'",default:!1},create_token_if_not_exists:{type:"boolean",description:"If true then the missing token will be created if not found. Only valid with 'foreign'",default:!1}},default:{},$typescript:'{"additionalProperties":false}'},get_balance_history_ordering_options:{$typescript:'{"additionalProperties":false}',description:"Optional flags for input ordering",type:"object",properties:{order:{description:"Ordering options",type:"string",enum:["asc","desc"]}}},balance_history_select_options:{$typescript:'{"additionalProperties":false}',description:"Optional flags to limit search result",type:"object",properties:{select:{description:"Select options",type:"array",items:{$ref:"/txs/get-balance-history/get-balance-history.schema.output.json#/definitions/balance_history_fields"}}}}},additionalProperties:!1};var js={$schema:"http://json-schema.org/draft-07/schema",$id:"GetBalanceHistoryTxOutput",title:"GetBalanceHistoryTxOutput",description:"Output of getBalanceHistory",type:"object",properties:{balances:{description:"Resolved balance change objects",type:"array",items:{$ref:"#/definitions/balance_history"}},metadata:{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_find_metadata"}},definitions:{balance_history:{type:"object",properties:{balance_id:{description:"The internal ID of the balance",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/id"},token_id:{description:"Token ID of balance",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/token_id"},token_foreign:{description:"Token Foreign of balance",$ref:"/db/token/token.schema.json#/properties/foreign"},wallet_id:{description:"Wallet ID of balance",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/wallet_id"},wallet_foreign:{description:"Wallet Foreign of balance",$ref:"/db/wallet/wallet.schema.json#/properties/foreign"},pending_amount:{description:"Current pending balance",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/pending_amount"},pending_amount_to:{description:"Sum of incoming pending transfers",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/pending_amount_to"},pending_amount_from:{description:"Sum of outgoing pending transfers",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/pending_amount_from"},available_balance:{description:"Available balance that is sum of pending_amount_from and finished_amount",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/available_balance"},finished_amount:{description:"Current finished balance",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/finished_amount"},amount:{description:"Current finished and pending balance sum",type:"number"},latest_control_hash:{description:"Latest control_hash associated with wallet token combination",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/latest_control_hash"},updated_at:{description:"Last modification date of balance",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/created_at"},transfer_id:{$ref:"/db/transfer/transfer.schema.json#/properties/id"},transfer_identifier:{$ref:"/db/transfer/transfer.schema.json#/properties/identifier"},transfer_control_hash:{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},transfer_from_wallet_id:{$ref:"/db/transfer/transfer.schema.json#/properties/from_wallet_id"},transfer_from_wallet_foreign:{$ref:"/db/wallet/wallet.schema.json#/properties/foreign"},transfer_to_wallet_id:{$ref:"/db/transfer/transfer.schema.json#/properties/to_wallet_id"},transfer_to_wallet_foreign:{$ref:"/db/wallet/wallet.schema.json#/properties/foreign"},transfer_amount:{$ref:"/db/transfer/transfer.schema.json#/properties/amount"},transfer_type:{$ref:"/db/transfer/transfer.schema.json#/properties/type"},transfer_status:{$ref:"/db/transfer/transfer.schema.json#/properties/status"},transfer_force:{$ref:"/db/transfer/transfer.schema.json#/properties/force"},transfer_created_at:{$ref:"/db/transfer/transfer.schema.json#/properties/created_at"},transfer_updated_at:{$ref:"/db/transfer/transfer.schema.json#/properties/updated_at"},transfer_metadata:{$ref:"/db/transfer/transfer.schema.json#/properties/metadata"},transfer_transfer_group_id:{$ref:"/db/transfer/transfer.schema.json#/properties/transfer_group_id"},transfer_transfer_group_identifier:{description:"Transfer Group identifier if transfer belongs to a group",type:"string"},transfer_reverses_id:{$ref:"/db/transfer/transfer.schema.json#/properties/reverses_id"},transfer_reverses_identifier:{description:"Reverses identifier if transfer reverses another transfer",type:"string"},transfer_status_finalized_at:{description:"DateTime transfer reached final status",type:["string","null"],format:"date-time"}},$typescript:'{"additionalProperties": false}'},balance_history_fields:{type:"string",enum:["transfer_id","transfer_identifier","transfer_control_hash","transfer_from_wallet_id","transfer_from_wallet_foreign","transfer_to_wallet_id","transfer_to_wallet_foreign","transfer_amount","transfer_type","transfer_status","transfer_force","transfer_created_at","transfer_updated_at","transfer_metadata","transfer_transfer_group_id","transfer_transfer_group_identifier","transfer_reverses_id","transfer_reverses_identifier","transfer_status_finalized_at","balance_id","token_id","token_foreign","wallet_id","wallet_foreign","pending_amount","pending_amount_to","pending_amount_from","finished_amount","amount","latest_control_hash","updated_at","status"]}},additionalProperties:!1};var vs={$schema:"http://json-schema.org/draft-07/schema",$id:"GetDatabaseExportProgressTxInput",title:"GetDatabaseExportProgressTxInput",description:"Input for getDatabaseExportProgress",type:"object",properties:{options:{$ref:"#/definitions/get_database_backup_progress_tx_options"}},definitions:{get_database_backup_progress_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/get_database_backup_progress_additional_options"}]},get_database_backup_progress_additional_options:{description:"Optional flags for input",type:"object",default:{},$typescript:'{"additionalProperties":false}'}},additionalProperties:!1};var ks={$schema:"http://json-schema.org/draft-07/schema",$id:"GetDatabaseExportProgressTxOutput",title:"GetDatabaseExportProgressTxOutput",description:"Output of getDatabaseExportProgress",type:"object",properties:{size:{type:"number",description:"Size of a exported backup in MB"},started:{type:"boolean",description:"Boolean indicating if export has started"},finished:{type:"boolean",description:"Boolean indicating if export has finished"},error:{type:"string",description:"Error message in case one occurs"}},required:["size","started","finished"],additionalProperties:!1};var Ss={$schema:"http://json-schema.org/draft-07/schema",$id:"GetDatabaseImportProgressTxInput",title:"GetDatabaseImportProgressTxInput",description:"Input for GetDatabaseImportProgress",type:"object",properties:{options:{$ref:"#/definitions/import_database_progress_tx_options"}},definitions:{import_database_progress_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"}]}},additionalProperties:!1};var Cs={$schema:"http://json-schema.org/draft-07/schema",$id:"GetDatabaseImportProgressTxOutput",title:"GetDatabaseImportProgressTxOutput",description:"Output of GetDatabaseImportProgress",type:"object",properties:{progress:{type:"number",description:"Percentage of imported database"},started:{type:"boolean",description:"Boolean indicating if import has started"},finished:{type:"boolean",description:"Boolean indicating if import has finished"},error:{type:"string",description:"Error message in case one occurs"}},required:["progress","started","finished"],additionalProperties:!1};var Ps={$schema:"http://json-schema.org/draft-07/schema",$id:"GetFlagsTxInput",title:"GetFlagsTxInput",description:"Input for getFlags",type:"object",properties:{options:{$ref:"#/definitions/get_flags_tx_options"}},definitions:{get_flags_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options_without_tx"}]}},additionalProperties:!1};var Gs={$schema:"http://json-schema.org/draft-07/schema",$id:"GetFlagsTxOutput",title:"GetFlagsTxOutput",description:"Output of getFlags",type:"object",properties:{flags:{$ref:"/db/consts.schema.json#/definitions/Flags"}},additionalProperties:!1};var Ds={$schema:"http://json-schema.org/draft-07/schema",$id:"GetStatisticsTxInput",title:"GetStatisticsTxInput",description:"Input for getStatistics",type:"object",properties:{model:{$ref:"#/definitions/statistics_model"},groups:{$ref:"#/definitions/statistics_groups"},aggregator:{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_aggregator"},filter:{$ref:"#/definitions/statistics_filter"},options:{$ref:"#/definitions/get_statistics_tx_options"}},definitions:{get_statistics_tx_options:{description:"Optional flags for input",type:"object",default:{},properties:{tracking_id:{description:"User provided id added to logs for debugging",type:"string"}},additionalProperties:!1},statistics_groups:{type:"array",description:"Array of grouping definitions",maxItems:5,items:{$ref:"#/definitions/statistics_group"}},statistics_group:{anyOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_group"},{$ref:"#/definitions/statistics_group_field"}]},statistics_group_field:{type:"object",properties:{type:{type:"string",enum:["field"]},value:{$ref:"#/definitions/statistics_field"},alias:{type:"string"}},required:["type","value"],additionalProperties:!1},statistics_model:{description:"Model to return statistics about",type:"string",enum:["Transfer","TransferGroup","Wallet","Token"],default:"Transfer"},statistics_field:{description:"Field to group statistics about. Only used with group_by_field type",type:"string",enum:["type","status","transfer_status"],default:"type"},statistics_filter:{description:"Filter to apply to transfers before grouping",anyOf:[{$ref:"#/definitions/statistics_general_filter"},{$ref:"#/definitions/statistics_transfer_filter"}]},statistics_general_filter:{type:"object",properties:{start_time:{type:"string",format:"date-time"},end_time:{type:"string",format:"date-time"}},$typescript:'{"additionalProperties":false}'},statistics_transfer_filter:{type:"object",properties:{status:{$ref:"/db/transfer/transfer.schema.json#/properties/status"},start_time:{type:"string",format:"date-time"},end_time:{type:"string",format:"date-time"}},$typescript:'{"additionalProperties":false}'}},additionalProperties:!1};var Es={$schema:"http://json-schema.org/draft-07/schema",$id:"GetStatisticsTxOutput",title:"GetStatisticsTxOutput",description:"Output of getStatistics",type:"object",properties:{rows:{description:"Results of the aggregation",$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_aggregate_results"}},definitions:{},required:["rows"],additionalProperties:!1};var Rs={$schema:"http://json-schema.org/draft-07/schema",$id:"GetTokenTxInput",title:"GetTokenTxInput",description:"Input for getToken",type:"object",properties:{token:{$ref:"#/definitions/unique_token_filter"},options:{$ref:"#/definitions/get_token_tx_options"}},definitions:{get_token_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/get_token_additional_options"}]},get_token_additional_options:{description:"Optional flags for input",type:"object",properties:{ignore_cache:{description:"If true then result is returned from cache layer if possible",type:"boolean",default:!1},create_if_not_exists:{type:"boolean",description:"If true then the token will be created if not found. Only valid with 'foreign'",default:!1},return_only_id:{type:"boolean",description:"If true then the returning object is only guaranteed to have id",default:!1}},default:{},$typescript:'{"additionalProperties": false}'},unique_token_filter:{description:"UNIQUE filtering options for token",anyOf:[{$ref:"#/definitions/unique_token_filter_id"},{$ref:"#/definitions/unique_token_filter_foreign"}]},unique_token_filter_id:{type:"object",description:"ID based filter for token",properties:{id:{description:"Id of wallet to return",$ref:"/db/wallet/wallet.schema.json#/properties/id"},foreign:{description:"Foreign of wallet to return",$ref:"/db/wallet/wallet.schema.json#/properties/name"}},required:["id"],additionalProperties:!1},unique_token_filter_foreign:{type:"object",description:"Foreign based filter for token",properties:{id:{description:"Id of wallet to return",$ref:"/db/wallet/wallet.schema.json#/properties/id"},foreign:{description:"Foreign of wallet to return",$ref:"/db/wallet/wallet.schema.json#/properties/name"}},required:["foreign"],additionalProperties:!1}},required:["token"],additionalProperties:!1};var Ms={$schema:"http://json-schema.org/draft-07/schema",$id:"GetTokenTxOutput",title:"GetTokenTxOutput",description:"Output of getToken",type:"object",properties:{token:{description:"requested token",$ref:"#/definitions/token"}},definitions:{token:{properties:{id:{$ref:"/db/token/token.schema.json#/properties/id"},foreign:{$ref:"/db/token/token.schema.json#/properties/foreign"},public:{$ref:"/db/token/token.schema.json#/properties/public"},belongs_to:{$ref:"/db/token/token.schema.json#/properties/belongs_to"},created_at:{$ref:"/db/token/token.schema.json#/properties/created_at"},updated_at:{$ref:"/db/token/token.schema.json#/properties/updated_at"},metadata:{$ref:"/db/token/token.schema.json#/properties/metadata"},divisor:{$ref:"/db/token/token.schema.json#/properties/divisor"},limit:{$ref:"/db/token/token.schema.json#/properties/limit"},type:{$ref:"/db/token/token.schema.json#/properties/type"},belongs_to_foreign:{description:"Foreign of the belongs_to wallet if exists",type:["string","null"]}},required:["id"],additionalProperties:!1}},additionalProperties:!1};var Ws={$schema:"http://json-schema.org/draft-07/schema",$id:"GetTokenManyTxInput",title:"GetTokenManyTxInput",description:"Input for getTokenMany",type:"object",properties:{tokens:{type:"array",items:{$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"}},options:{$ref:"#/definitions/get_token_many_tx_options"}},definitions:{get_token_many_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/get_token_many_additional_options"}]},get_token_many_additional_options:{description:"Optional flags for input",type:"object",properties:{ignore_cache:{type:"boolean",default:!1},create_if_not_exists:{type:"boolean",description:"If true then the token will be created if not found. Only valid with 'foreign'",default:!1},return_only_id:{type:"boolean",description:"If true then the returning object is only guaranteed to have id",default:!1}},default:{},$typescript:'{"additionalProperties": false}'}},required:["tokens"],additionalProperties:!1};var As={$schema:"http://json-schema.org/draft-07/schema",$id:"GetTokenManyTxOutput",title:"GetTokenManyTxOutput",description:"Output of getTokenMany",type:"object",properties:{tokens:{type:"array",items:{$ref:"#/definitions/TokenResult"}}},definitions:{TokenResult:{anyOf:[{$ref:"/db/token/token.schema.json"},{$ref:"/db/token/token.schema.optional.json"},{type:"null"}]}},required:["tokens"],additionalProperties:!1};var Ns={$schema:"http://json-schema.org/draft-07/schema",$id:"GetTransferTxInput",title:"GetTransferTxInput",description:"Input for getTransfer",type:"object",properties:{transfer:{$ref:"#/definitions/unique_transfer_filter"},options:{$ref:"#/definitions/get_transfer_tx_options"}},definitions:{get_transfer_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"}]},unique_transfer_filter:{description:"UNIQUE filtering options for transfer",anyOf:[{$ref:"#/definitions/unique_transfer_filter_id"},{$ref:"#/definitions/unique_transfer_filter_identifier"}]},unique_transfer_filter_id:{type:"object",description:"ID based filter of transfer",properties:{id:{description:"Id of transfer to return",$ref:"/db/transfer/transfer.schema.json#/properties/id"},identifier:{description:"Identifier of transfer to return",$ref:"/db/transfer/transfer.schema.json#/properties/identifier"}},required:["id"],additionalProperties:!1},unique_transfer_filter_identifier:{type:"object",description:"identifier based filter of transfer",properties:{id:{description:"Id of transfer to return",$ref:"/db/transfer/transfer.schema.json#/properties/id"},identifier:{description:"Identifier of transfer to return",$ref:"/db/transfer/transfer.schema.json#/properties/identifier"}},required:["identifier"],additionalProperties:!1}},required:["transfer"],additionalProperties:!1};var Us={$schema:"http://json-schema.org/draft-07/schema",$id:"GetTransferTxOutput",title:"GetTransferTxOutput",description:"Output of getTransfer",type:"object",properties:{transfer:{$ref:"#/definitions/transfer"}},definitions:{transfer:{type:"object",description:"requested transfer",properties:{id:{$ref:"/db/transfer/transfer.schema.json#/properties/id"},identifier:{$ref:"/db/transfer/transfer.schema.json#/properties/identifier"},control_hash:{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},from_wallet_id:{$ref:"/db/transfer/transfer.schema.json#/properties/from_wallet_id"},from_wallet_foreign:{$ref:"/db/wallet/wallet.schema.json#/properties/foreign"},to_wallet_id:{$ref:"/db/transfer/transfer.schema.json#/properties/to_wallet_id"},to_wallet_foreign:{$ref:"/db/wallet/wallet.schema.json#/properties/foreign"},token_id:{$ref:"/db/transfer/transfer.schema.json#/properties/token_id"},token_foreign:{$ref:"/db/token/token.schema.json#/properties/foreign"},amount:{$ref:"/db/transfer/transfer.schema.json#/properties/amount"},type:{$ref:"/db/transfer/transfer.schema.json#/properties/type"},status:{$ref:"/db/transfer/transfer.schema.json#/properties/status"},force:{$ref:"/db/transfer/transfer.schema.json#/properties/force"},auto_hash:{$ref:"/db/transfer/transfer.schema.json#/properties/auto_hash"},created_at:{$ref:"/db/transfer/transfer.schema.json#/properties/created_at"},updated_at:{$ref:"/db/transfer/transfer.schema.json#/properties/updated_at"},metadata:{$ref:"/db/transfer/transfer.schema.json#/properties/metadata"},transfer_group_id:{$ref:"/db/transfer/transfer.schema.json#/properties/transfer_group_id"},transfer_group_identifier:{description:"Transfer Group identifier if transfer belongs to a group",type:"string"},reverses_id:{$ref:"/db/transfer/transfer.schema.json#/properties/reverses_id"},reverses_identifier:{description:"Reverses identifier if transfer reverses another transfer",type:"string"},balance_id:{description:"Iterator marking the position of the balance in the continuum",type:["number","null"]},balance_pending:{description:"Wallet pending balance after transfer",type:["number","null"]},balance_pending_to:{description:"Wallet pending_to balance after transfer",type:["number","null"]},balance_pending_from:{description:"Wallet pending_from balance after transfer",type:["number","null"]},balance_finished:{description:"Wallet finished balance after transfer",type:["number","null"]},signed_amount:{description:"amount with a sign according to transfer direction",type:["number","null"]},status_finalized_at:{description:"DateTime transfer reached final status",type:["string","null"],format:"date-time"}},additionalProperties:!1,required:["id","identifier","from_wallet_id","from_wallet_foreign","to_wallet_id","to_wallet_foreign","token_id","token_foreign","amount","type","status","force","created_at"]},transfer_optional:{type:"object",description:"requested transfer",properties:{id:{$ref:"/db/transfer/transfer.schema.json#/properties/id"},identifier:{$ref:"/db/transfer/transfer.schema.json#/properties/identifier"},control_hash:{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},from_wallet_id:{$ref:"/db/transfer/transfer.schema.json#/properties/from_wallet_id"},from_wallet_foreign:{$ref:"/db/wallet/wallet.schema.json#/properties/foreign"},to_wallet_id:{$ref:"/db/transfer/transfer.schema.json#/properties/to_wallet_id"},to_wallet_foreign:{$ref:"/db/wallet/wallet.schema.json#/properties/foreign"},token_id:{$ref:"/db/transfer/transfer.schema.json#/properties/token_id"},token_foreign:{$ref:"/db/token/token.schema.json#/properties/foreign"},amount:{$ref:"/db/transfer/transfer.schema.json#/properties/amount"},type:{$ref:"/db/transfer/transfer.schema.json#/properties/type"},status:{$ref:"/db/transfer/transfer.schema.json#/properties/status"},force:{$ref:"/db/transfer/transfer.schema.json#/properties/force"},auto_hash:{$ref:"/db/transfer/transfer.schema.json#/properties/auto_hash"},created_at:{$ref:"/db/transfer/transfer.schema.json#/properties/created_at"},updated_at:{$ref:"/db/transfer/transfer.schema.json#/properties/updated_at"},metadata:{$ref:"/db/transfer/transfer.schema.json#/properties/metadata"},transfer_group_id:{$ref:"/db/transfer/transfer.schema.json#/properties/transfer_group_id"},transfer_group_identifier:{description:"Transfer Group identifier if transfer belongs to a group",type:"string"},reverses_id:{$ref:"/db/transfer/transfer.schema.json#/properties/reverses_id"},balance_id:{description:"Iterator marking the position of the balance in the continuum",type:["number","null"]},balance_pending:{description:"Wallet pending balance after transfer",type:["number","null"]},balance_pending_to:{description:"Wallet pending_to balance after transfer",type:["number","null"]},balance_pending_from:{description:"Wallet pending_from balance after transfer",type:["number","null"]},balance_finished:{description:"Wallet finished balance after transfer",type:["number","null"]},signed_amount:{description:"amount with a sign according to transfer direction",type:["number","null"]},status_finalized_at:{description:"DateTime transfer reached final status",type:["string","null"],format:"date-time"}},additionalProperties:!1}},additionalProperties:!1};var qs={$schema:"http://json-schema.org/draft-07/schema",$id:"GetTransferGroupTxInput",title:"GetTransferGroupTxInput",description:"Input for getTransferGroup",type:"object",properties:{transfer_group:{$ref:"#/definitions/unique_transfer_group_filter"},options:{$ref:"#/definitions/get_transfer_group_tx_options"}},definitions:{get_transfer_group_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/get_transfer_group_additional_options"}]},get_transfer_group_additional_options:{description:"Optional flags for input",type:"object",properties:{create_if_not_exists:{type:"boolean",description:"If true then the transfer_group will be created if not found. Only valid with 'identifier'",default:!1},return_only_id:{type:"boolean",description:"If true then the returning object is only guaranteed to have id",default:!1}},default:{},$typescript:'{"additionalProperties": false}'},unique_transfer_group_filter:{description:"UNIQUE filtering options for transfer",anyOf:[{$ref:"#/definitions/unique_transfer_group_filter_id"},{$ref:"#/definitions/unique_transfer_group_filter_identifier"}]},unique_transfer_group_filter_id:{type:"object",description:"ID based filter of transfer",properties:{id:{description:"Id of transfer_group to return",$ref:"/db/transfer-group/transfer-group.schema.json#/properties/id"},identifier:{description:"Identifier of transfer_group to return",$ref:"/db/transfer-group/transfer-group.schema.json#/properties/identifier"}},required:["id"],additionalProperties:!1},unique_transfer_group_filter_identifier:{type:"object",description:"identifier based filter of transfer",properties:{id:{description:"Id of transfer_group to return",$ref:"/db/transfer-group/transfer-group.schema.json#/properties/id"},identifier:{description:"Identifier of transfer_group to return",$ref:"/db/transfer-group/transfer-group.schema.json#/properties/identifier"}},required:["identifier"],additionalProperties:!1}},required:["transfer_group"],additionalProperties:!1};var Bs={$schema:"http://json-schema.org/draft-07/schema",$id:"GetTransferGroupTxOutput",title:"GetTransferGroupTxOutput",description:"Output of getTransferGroup",type:"object",properties:{transfer_group:{$ref:"#/definitions/transfer_group"}},definitions:{transfer_group:{description:"requested transfer_group",properties:{id:{$ref:"/db/transfer-group/transfer-group.schema.json#/properties/id"},identifier:{$ref:"/db/transfer-group/transfer-group.schema.json#/properties/identifier"},status:{$ref:"/db/transfer-group/transfer-group.schema.json#/properties/status"},transfer_status:{$ref:"/db/transfer-group/transfer-group.schema.json#/properties/transfer_status"},metadata:{$ref:"/db/transfer-group/transfer-group.schema.json#/properties/metadata"},created_at:{$ref:"/db/transfer-group/transfer-group.schema.json#/properties/created_at"},updated_at:{$ref:"/db/transfer-group/transfer-group.schema.json#/properties/updated_at"},reverses_id:{$ref:"/db/transfer-group/transfer-group.schema.json#/properties/reverses_id"},status_finalized_at:{$ref:"/db/transfer-group/transfer-group.schema.json#/properties/status_finalized_at"},transfer_status_finalized_at:{$ref:"/db/transfer-group/transfer-group.schema.json#/properties/transfer_status_finalized_at"},type:{$ref:"/db/transfer-group/transfer-group.schema.json#/properties/type"},validate_final_balance_only:{$ref:"/db/transfer-group/transfer-group.schema.json#/properties/validate_final_balance_only"},reverses_identifier:{description:"Identifier of the transfer group this reverses",type:["string","null"]}},additionalProperties:!1,required:["id"]}},additionalProperties:!1};var Ls={$schema:"http://json-schema.org/draft-07/schema",$id:"GetWalletTxInput",title:"GetWalletTxInput",description:"Input for getWallet",type:"object",properties:{wallet:{$ref:"#/definitions/unique_wallet_filter"},options:{$ref:"#/definitions/get_wallet_tx_options"}},definitions:{get_wallet_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/get_wallet_additional_options"}]},get_wallet_additional_options:{description:"Optional flags for input",type:"object",properties:{ignore_cache:{description:"If true the wallet is returned from cache layer if possible",type:"boolean",default:!1},create_if_not_exists:{type:"boolean",description:"If true then the wallet will be created if not found. Only valid with 'foreign'",default:!1},return_only_id:{type:"boolean",description:"If true then the returning object is only guaranteed to have id",default:!1}},default:{},$typescript:'{"additionalProperties": false}'},unique_wallet_filter:{type:"object",description:"UNIQUE filtering options for wallet",anyOf:[{$ref:"#/definitions/unique_wallet_filter_id"},{$ref:"#/definitions/unique_wallet_filter_foreign"}]},unique_wallet_filter_id:{type:"object",description:"ID based filter for wallet",properties:{id:{description:"Id of wallet to return",$ref:"/db/wallet/wallet.schema.json#/properties/id"},foreign:{description:"Foreign of wallet to return",$ref:"/db/wallet/wallet.schema.json#/properties/name"}},required:["id"],additionalProperties:!1},unique_wallet_filter_foreign:{type:"object",description:"Foreign based filter for wallet",properties:{id:{description:"Id of wallet to return",$ref:"/db/wallet/wallet.schema.json#/properties/id"},foreign:{description:"Foreign of wallet to return",$ref:"/db/wallet/wallet.schema.json#/properties/name"}},required:["foreign"],additionalProperties:!1}},required:["wallet"],additionalProperties:!1};var Vs={$schema:"http://json-schema.org/draft-07/schema",$id:"GetWalletTxOutput",title:"GetWalletTxOutput",description:"Output of getWallet",type:"object",properties:{wallet:{description:"requested wallet",anyOf:[{$ref:"/db/wallet/wallet.schema.json"},{$ref:"/db/wallet/wallet.schema.optional.json"}]}},additionalProperties:!1};var Hs={$schema:"http://json-schema.org/draft-07/schema",$id:"GetWalletManyTxInput",title:"GetWalletManyTxInput",description:"Input for getWalletMany",type:"object",properties:{wallets:{type:"array",items:{$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"}},options:{$ref:"#/definitions/get_wallet_many_tx_options"}},definitions:{get_wallet_many_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/get_wallet_many_additional_options"}]},get_wallet_many_additional_options:{description:"Optional flags for input",type:"object",properties:{ignore_cache:{type:"boolean",default:!1},create_if_not_exists:{type:"boolean",description:"If true then the wallet will be created if not found. Only valid with 'foreign'",default:!1},return_only_id:{type:"boolean",description:"If true then the returning object is only guaranteed to have id",default:!1}},default:{},$typescript:'{"additionalProperties": false}'}},additionalProperties:!1};var zs={$schema:"http://json-schema.org/draft-07/schema",$id:"GetWalletManyTxOutput",title:"GetWalletManyTxOutput",description:"Output of getWalletMany",type:"object",properties:{wallets:{type:"array",items:{$ref:"#/definitions/WalletResult"}}},definitions:{WalletResult:{anyOf:[{$ref:"/db/wallet/wallet.schema.json"},{$ref:"/db/wallet/wallet.schema.optional.json"},{type:"null"}]}},required:["wallets"],additionalProperties:!1};var Lt={$schema:"http://json-schema.org/draft-07/schema",$id:"ImportActionsTxInput",title:"ImportActionsTxInput",description:"Input for importActions",type:"object",properties:{actions:{description:"Array of actions to import.",type:"array",items:{$ref:"#/definitions/import_actions_tx_stream_chunk"}},options:{$ref:"#/definitions/import_actions_tx_options"}},required:["actions"],definitions:{import_actions_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"}]},import_actions_tx_stream_chunk:{type:"object",anyOf:[{$ref:"#/definitions/import_action_wallet"},{$ref:"#/definitions/import_action_token"},{$ref:"#/definitions/import_action_transfer_group"},{$ref:"#/definitions/import_action_transfer"}]},import_action_wallet:{type:"object",properties:{target:{description:"Target of the action",type:"string",enum:["wallet"]},data:{$ref:"/db/wallet/wallet.schema.input.json"}},required:["target","data"],additionalProperties:!1},import_action_token:{type:"object",properties:{target:{description:"Target of the action",type:"string",enum:["token"]},data:{$ref:"/txs/create-token/create-token.schema.input.json#/definitions/create_token_input"}},required:["target","data"],additionalProperties:!1},import_action_transfer_group_extension:{type:"object",properties:{created_at:{type:"string",format:"date-time"},status_finalized_at:{type:"string",format:"date-time"},transfer_status_finalized_at:{type:"string",format:"date-time"}},$typescript:'{"additionalProperties": false}'},import_action_transfer_group_data:{allOf:[{$ref:"/txs/create-transfer-group/create-transfer-group.schema.input.json#/definitions/transfer_group_data"},{$ref:"#/definitions/import_action_transfer_group_extension"}]},import_action_transfer_group:{type:"object",properties:{target:{description:"Target of the action",type:"string",enum:["transfer_group"]},data:{allOf:[{$ref:"#/definitions/import_action_transfer_group_data"}]}},required:["target","data"],additionalProperties:!1},import_action_transfer_data:{anyOf:[{$ref:"#/definitions/import_action_transfer_data_regular"},{$ref:"#/definitions/import_action_transfer_data_deposit"},{$ref:"#/definitions/import_action_transfer_data_withdrawal"}]},import_action_transfer_data_regular:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},from_wallet:{description:"Wallet where funds are debited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},to_wallet:{description:"Wallet where funds are credited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},token:{description:"Token that is moved",$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"},amount:{$ref:"/db/transfer/transfer.schema.input.json#/properties/amount"},type:{description:"Type of transfer",enum:["transfer"]},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},status:{$ref:"/db/consts.schema.json#/definitions/TransferStatus"},transfer_group:{description:"TransferGroup the transfer belongs to",$ref:"/txs/get-transfer-group/get-transfer-group.schema.input.json#/definitions/unique_transfer_group_filter"},created_at:{type:"string",format:"date-time"},status_finalized_at:{type:"string",format:"date-time"}},required:["from_wallet","to_wallet","token","amount","type"],$typescript:'{"additionalProperties": false}'},import_action_transfer_data_deposit:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},from_wallet:{description:"Wallet where funds are debited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},to_wallet:{description:"Wallet where funds are credited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},token:{description:"Token that is moved",$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"},amount:{$ref:"/db/transfer/transfer.schema.input.json#/properties/amount"},type:{description:"Type of transfer",enum:["deposit"]},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},status:{$ref:"/db/consts.schema.json#/definitions/TransferStatus"},transfer_group:{description:"TransferGroup the transfer belongs to",$ref:"/txs/get-transfer-group/get-transfer-group.schema.input.json#/definitions/unique_transfer_group_filter"},created_at:{type:"string",format:"date-time"},status_finalized_at:{type:"string",format:"date-time"}},required:["to_wallet","token","amount"],$typescript:'{"additionalProperties": false}'},import_action_transfer_data_withdrawal:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},from_wallet:{description:"Wallet where funds are debited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},to_wallet:{description:"Wallet where funds are credited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},token:{description:"Token that is moved",$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"},amount:{$ref:"/db/transfer/transfer.schema.input.json#/properties/amount"},type:{description:"Type of transfer",enum:["withdrawal"]},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},status:{$ref:"/db/consts.schema.json#/definitions/TransferStatus"},transfer_group:{description:"TransferGroup the transfer belongs to",$ref:"/txs/get-transfer-group/get-transfer-group.schema.input.json#/definitions/unique_transfer_group_filter"},created_at:{type:"string",format:"date-time"},status_finalized_at:{type:"string",format:"date-time"}},required:["from_wallet","token","amount"],$typescript:'{"additionalProperties": false}'},import_action_transfer:{type:"object",properties:{target:{description:"Target of the action",type:"string",enum:["transfer"]},data:{allOf:[{$ref:"#/definitions/import_action_transfer_data"}]}},required:["target","data"],additionalProperties:!1}},$allowStreamInput:"import_actions_tx_stream_chunk",additionalProperties:!1};var Ks={$schema:"http://json-schema.org/draft-07/schema",$id:"ImportActionsTxOutput",title:"ImportActionsTxOutput",description:"Output of importActions",type:"object",properties:{progress:{type:"array"},erroneous:{type:"array"}},additionalProperties:!1};var Qs={$schema:"http://json-schema.org/draft-07/schema",$id:"ImportDatabaseTxInput",title:"ImportDatabaseTxInput",description:"Input for importDatabase",type:"object",properties:{name:{type:"string"}},definitions:{},additionalProperties:!1};var Js={$schema:"http://json-schema.org/draft-07/schema",$id:"ImportDatabaseTxOutput",title:"ImportDatabaseTxOutput",description:"Output of importDatabase",type:"object",properties:{message:{type:"string"}},additionalProperties:!1};var Xs={$schema:"http://json-schema.org/draft-07/schema",$id:"ListDatabaseExportsTxInput",title:"ListDatabaseExportsTxInput",description:"Input for listDatabaseExports",type:"object",properties:{},definitions:{},additionalProperties:!1};var Ys={$schema:"http://json-schema.org/draft-07/schema",$id:"ListDatabaseExportsTxOutput",title:"ListDatabaseExportsTxOutput",description:"Output of listDatabaseExports",type:"object",properties:{exports:{type:"array",items:{$ref:"#/definitions/database_export"}}},required:["exports"],definitions:{database_export:{type:"object",properties:{name:{description:"Name of the export",type:"string"},size:{description:"Size of the export",type:"number"}},required:["name","size"]}},additionalProperties:!1};var Zs={$schema:"http://json-schema.org/draft-07/schema",$id:"QueryTxInput",title:"QueryTxInput",description:"Input for query",type:"object",properties:{query:{description:"SELECT query",type:"string"},params:{description:"Parameters for the query",type:"array"},options:{$ref:"#/definitions/query_tx_options"}},definitions:{query_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options_without_tx"}]}},required:["query","params"],additionalProperties:!1};var ei={$schema:"http://json-schema.org/draft-07/schema",$id:"QueryTxOutput",title:"QueryTxOutput",description:"Output of query",type:"object",properties:{results:{description:"The query results",type:"array"}},required:["results"],additionalProperties:!1};var ti={$schema:"http://json-schema.org/draft-07/schema",$id:"QueryLogsTxInput",title:"QueryLogsTxInput",description:"Input for queryLogs",type:"object",properties:{startTime:{description:"Log entries start time",type:"string"},endTime:{description:"Log entries end time",type:"string"},tracking_id:{type:"string"},level:{type:"string",enum:["debug","info","warning","error"]},options:{$ref:"#/definitions/query_logs_tx_options"}},definitions:{query_logs_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/query_logs_additional_options"}]},query_logs_additional_options:{description:"Optional flags for input",type:"object",default:{exact_level:!1},properties:{exact_level:{description:"Should query be limited to exactly defined level or greater than",type:"boolean"}},$typescript:'{"additionalProperties":false}'}},additionalProperties:!1};var ri={$schema:"http://json-schema.org/draft-07/schema",$id:"QueryLogsTxOutput",title:"QueryLogsTxOutput",description:"Output of queryLogs",type:"object",properties:{logs:{type:"array",items:{$ref:"#/definitions/query_log_entry"}}},definitions:{query_log_entry:{type:"object",properties:{level:{description:"Log level",type:"string",enum:["debug","info","warning","error"]},timestamp:{description:"Timestamp when log was created",type:"string"},payload:{description:"Log payload",type:"object"}},additionalProperties:!1}},required:["logs"],additionalProperties:!1};var ni={$schema:"http://json-schema.org/draft-07/schema",$id:"ResetDatabaseTxInput",title:"ResetDatabaseTxInput",description:"Input for resetDatabase",type:"object",properties:{confirmation:{description:"hash to confirm database delete",type:"string"},version:{description:"target semver for the database",type:"string"},options:{$ref:"#/definitions/reset_database_tx_options"}},definitions:{reset_database_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options_without_tx"}]}},additionalProperties:!1};var ai={$schema:"http://json-schema.org/draft-07/schema",$id:"ResetDatabaseTxOutput",title:"ResetDatabaseTxOutput",description:"Output of resetDatabase",type:"object",properties:{message:{description:"Message about operation",type:"string"},confirmation:{description:"confirmation hash to resend",type:"string"}},additionalProperties:!1};var si={$schema:"http://json-schema.org/draft-07/schema",$id:"ReverseTransferTxInput",title:"ReverseTransferTxInput",description:"Input for reverseTransfer",type:"object",properties:{transfer:{$ref:"/txs/get-transfer/get-transfer.schema.input.json#/definitions/unique_transfer_filter"},reverse:{$ref:"#/definitions/transfer_reverse_modifications"},options:{$ref:"#/definitions/reverse_transfer_tx_options"}},definitions:{reverse_transfer_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/reverse_transfer_additional_options"}]},reverse_transfer_additional_options:{description:"Optional flags for input",type:"object",default:{},properties:{reverse_deposit:{$id:"reverse_deposit",description:"Whether to create withdrawal transaction for deposit (will default to pending)",type:"boolean",default:!1},reverse_withdrawal:{$id:"reverse_withdrawal",description:"Whether to create deposit transaction for withdrawal (will default to pending)",type:"boolean",default:!1},return_from_balance:{$id:"return_from_balance",description:"Whether the request should also return from wallet balance",type:"boolean",default:!1},return_to_balance:{$id:"return_to_balance",description:"Whether the request should also return to wallet balance",type:"boolean",default:!1},metadata_action:{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_action_for_reverse"}},$typescript:'{"additionalProperties": false}'},transfer_reverse_modifications:{description:"In case the transfer will be made then apply these modifications",type:"object",properties:{status:{$ref:"/db/transfer/transfer.schema.input.json#/properties/status"},identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},force:{$ref:"/db/transfer/transfer.schema.input.json#/properties/force"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},extend_metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"}},default:{},additionalProperties:!1}},required:["transfer"],additionalProperties:!1};var ii={$schema:"http://json-schema.org/draft-07/schema",$id:"ReverseTransferTxOutput",title:"ReverseTransferTxOutput",description:"Output of reverseTransfer",allOf:[{$ref:"/txs/update-transfer/update-transfer.schema.output.json"}]};var oi={$schema:"http://json-schema.org/draft-07/schema",$id:"ReverseTransferGroupTxInput",title:"ReverseTransferGroupTxInput",description:"Input for reverseTransferGroup",type:"object",properties:{transfer_group:{$ref:"/txs/get-transfer-group/get-transfer-group.schema.input.json#/definitions/unique_transfer_group_filter"},reverse:{$ref:"#/definitions/reverse_transfer_group_modifications"},options:{$ref:"#/definitions/reverse_transfer_group_tx_options"}},definitions:{reverse_transfer_group_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/reverse_transfer_group_additional_options"}]},reverse_transfer_group_additional_options:{description:"Optional flags for input",type:"object",default:{},properties:{reverse_deposit:{$id:"reverse_deposit",description:"Whether to create withdrawal transaction for deposits (will default to pending)",type:"boolean",default:!1},reverse_withdrawal:{$id:"reverse_withdrawal",description:"Whether to create deposit transaction for withdrawals (will default to pending)",type:"boolean",default:!1},return_transfers:{description:"Should the update return all transfers belonging to group",type:"boolean"},validate_final_balance_only:{type:"boolean",description:"If true then transfers within a group will ignore balance restrictions. Only final transfers for wallets are checked.",default:!1},metadata_action:{$id:"metadata_action",$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_action_for_reverse"},transfer_metadata_action:{$id:"transfer_metadata_action",$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_action_for_reverse"}},$typescript:'{"additionalProperties": false}'},reverse_transfer_group_modifications:{description:"In case the transferGroup will be made then apply these modifications",type:"object",properties:{status:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/status"},transfer_status:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/transfer_status"},identifier:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/identifier"},force:{$ref:"/db/transfer/transfer.schema.input.json#/properties/force"},metadata:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/metadata"},transfer_metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},extend_metadata:{description:"Key value object to be merged with existing metadata",$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/metadata"},transfer_extend_metadata:{description:"Key value object to be merged with each transfers existing metadata",$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"}},default:{},additionalProperties:!1}},additionalProperties:!1};var pi={$schema:"http://json-schema.org/draft-07/schema",$id:"ReverseTransferGroupTxOutput",title:"ReverseTransferGroupTxOutput",description:"Output of reverseTransferGroup",type:"object",properties:{transfer_group:{$ref:"/db/transfer-group/transfer-group.schema.json"},transfers:{description:"Created transfer objects",type:"array",items:{$ref:"/txs/get-transfer/get-transfer.schema.output.json#/definitions/transfer"}}},additionalProperties:!1};var di={$schema:"http://json-schema.org/draft-07/schema",$id:"ReverseTransferGroupManyTxInput",title:"ReverseTransferGroupManyTxInput",description:"Input for reverseTransferGroupMany",type:"object",properties:{transfer_group:{$ref:"/txs/find-transfer-group-many/find-transfer-group-many.schema.input.json#/definitions/find_transfer_group_many_filter"},reverse:{$ref:"#/definitions/reverse_transfer_group_many_modifications"},options:{$ref:"#/definitions/reverse_transfer_group_many_tx_options"}},definitions:{reverse_transfer_group_many_modifications:{description:"In case the transferGroup will be made then apply these modifications",type:"object",properties:{status:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/status"},transfer_status:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/transfer_status"},force:{$ref:"/db/transfer/transfer.schema.input.json#/properties/force"},metadata:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/metadata"},transfer_metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},extend_metadata:{description:"Key value object to be merged with existing metadata",$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/metadata"},transfer_extend_metadata:{description:"Key value object to be merged with each transfers existing metadata",$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"}},default:{},additionalProperties:!1},reverse_transfer_group_many_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"/txs/reverse-transfer-group/reverse-transfer-group.schema.input.json#/definitions/reverse_transfer_group_additional_options"}]},reverse_transfer_group_many_additional_options:{description:"Optional flags for input",type:"object",default:{},$typescript:'{"additionalProperties":false}'}},required:["transfer_group"],additionalProperties:!1};var fi={$schema:"http://json-schema.org/draft-07/schema",$id:"ReverseTransferGroupManyTxOutput",title:"ReverseTransferGroupManyTxOutput",description:"Output of reverseTransferGroupMany",type:"object",properties:{transfer_groups:{description:"Reversed transfer groups",type:"array",items:{$ref:"/db/transfer-group/transfer-group.schema.json"}},transfers:{description:"Created transfer objects",type:"array",items:{$ref:"/txs/get-transfer/get-transfer.schema.output.json#/definitions/transfer"}}},additionalProperties:!1};var ui={$schema:"http://json-schema.org/draft-07/schema",$id:"ReverseTransferManyTxInput",title:"ReverseTransferManyTxInput",description:"Input for reverseTransferMany",type:"object",properties:{transfer:{$ref:"/txs/find-transfer-many/find-transfer-many.schema.input.json#/definitions/find_transfer_many_filter"},reverse:{$ref:"#/definitions/reverse_transfer_many_modifications"},options:{$ref:"#/definitions/reverse_transfer_many_tx_options"}},definitions:{reverse_transfer_many_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/reverse_transfer_many_additional_options"}]},reverse_transfer_many_additional_options:{description:"Optional flags for input",type:"object",default:{},properties:{reverse_deposit:{$id:"reverse_deposit",description:"Whether to create withdrawal transaction for deposit (will default to pending)",type:"boolean",default:!1},reverse_withdrawal:{$id:"reverse_withdrawal",description:"Whether to create deposit transaction for withdrawal (will default to pending)",type:"boolean",default:!1},metadata_action:{$id:"metadata_action",$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_action_for_reverse"}},$typescript:'{"additionalProperties": false}'},reverse_transfer_many_modifications:{description:"In case the transfer will be made then apply these modifications",type:"object",properties:{status:{$ref:"/db/transfer/transfer.schema.input.json#/properties/status"},force:{$ref:"/db/transfer/transfer.schema.input.json#/properties/force"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"}},default:{},additionalProperties:!1}},required:["transfer"],additionalProperties:!1};var li={$schema:"http://json-schema.org/draft-07/schema",$id:"ReverseTransferManyTxOutput",title:"ReverseTransferManyTxOutput",description:"Output of reverseTransferMany",properties:{transfers:{description:"Created transfer array",type:"array",items:{$ref:"/txs/get-transfer/get-transfer.schema.output.json#/definitions/transfer"}}},additionalProperties:!1};var ci={$schema:"http://json-schema.org/draft-07/schema",$id:"SetFlagsTxInput",title:"SetFlagsTxInput",description:"Input for setFlags",type:"object",properties:{flags:{$ref:"/db/consts.schema.json#/definitions/Flags"},options:{$ref:"#/definitions/set_flags_tx_options"}},definitions:{set_flags_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options_without_tx"}]}},required:["flags"],additionalProperties:!1};var mi={$schema:"http://json-schema.org/draft-07/schema",$id:"SetFlagsTxOutput",title:"SetFlagsTxOutput",description:"Output of setFlags",type:"object",properties:{flags:{$ref:"/db/consts.schema.json#/definitions/Flags"},message:{description:"optional message",type:"string"}},required:["flags"],additionalProperties:!1};var hi={$schema:"http://json-schema.org/draft-07/schema",$id:"StartTransactionTxInput",title:"StartTransactionTxInput",description:"Input for startTransaction",type:"object",properties:{options:{$ref:"#/definitions/start_transaction_tx_options"}},definitions:{start_transaction_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options_without_tx"}]}},additionalProperties:!1};var _i={$schema:"http://json-schema.org/draft-07/schema",$id:"StartTransactionTxOutput",title:"StartTransactionTxOutput",description:"Output of startTransaction",type:"object",properties:{transaction_id:{type:"string"}},additionalProperties:!1};var gi={$schema:"http://json-schema.org/draft-07/schema",$id:"TxConsts",description:"Generics used by functions",definitions:{i_tx_general_options_without_tx:{description:"Generic flags for input",type:"object",default:{},properties:{tracking_id:{description:"User provided id added to logs for debugging",type:"string"}},$typescript:'{"additionalProperties":false}'},i_tx_general_options:{description:"Generic flags for input",type:"object",default:{},properties:{transaction_id:{description:"Id of the transaction context to run the query in",type:"string"},tracking_id:{description:"User provided id added to logs for debugging",type:"string"}},$typescript:'{"additionalProperties":false}'},i_tx_metadata_options:{description:"Metadata flags for input",type:"object",default:{},properties:{return_metadata_total:{description:"Return the total rows count in metadata",type:"boolean"}},$typescript:'{"additionalProperties":false}'},i_tx_limiting_options:{$typescript:'{"additionalProperties":false}',description:"Optional flags for input limiting",type:"object",properties:{limit:{description:"Number of records to return",type:"integer"},offset:{description:"Number of records to omit from the beginning",type:"integer"}},default:{limit:20,offset:0}},i_tx_ordering_options:{$typescript:'{"additionalProperties":false}',description:"Optional flags for input ordering",type:"object",properties:{order:{description:"Ordering options",type:"array",items:{$ref:"#/definitions/i_tx_ordering_input"}}}},i_tx_select_options:{$typescript:'{"additionalProperties":false}',description:"Optional flags to limit search result",type:"object",properties:{select:{description:"Select options",type:"array",items:{type:"string"}}}},i_tx_deselect_options:{$typescript:'{"additionalProperties":false}',description:"Optional flag to remove field from select",type:"object",properties:{deselect:{description:"Deselect options",type:"array",items:{type:"string"}}}},i_tx_aggregating_options:{$typescript:'{"additionalProperties":false}',description:"Optional flags to aggregate data",type:"object",properties:{aggregator:{$ref:"#/definitions/i_tx_aggregator"},aggregators:{type:"array",items:{$ref:"#/definitions/i_tx_aggregator"}},groups:{$ref:"#/definitions/i_tx_groups"}}},i_tx_find_metadata:{description:"Metadata about the search",type:"object",properties:{total:{description:"Total number of records matching the query",type:"integer"},offset:{description:"Current query offset",type:"integer"},limit:{description:"Current query limit",type:"integer"},more_rows:{description:"Boolean showing if there would be more rows to return with a higher offset/limit",type:"boolean"},order:{description:"Ordering options",type:"array",items:{$ref:"#/definitions/i_tx_ordering_input"}}},required:["offset","limit","more_rows"],additionalProperties:!1},i_tx_aggregating_metadata:{description:"Metadata about the aggregation",type:"object",properties:{aggregators:{type:"array",items:{$ref:"#/definitions/i_tx_aggregator"}},groups:{$ref:"#/definitions/i_tx_groups"}},required:["aggregators"],additionalProperties:!1},i_tx_ordering_input:{description:"Input for orderBy",type:"object",properties:{field:{description:"Field to order by",type:"string"},direction:{description:"Direction to order",default:"asc",type:"string",enum:["asc","desc"]},nulls:{description:"Should nulls be first or last",type:"string",enum:["first","last"]}},required:["field"],additionalProperties:!1},i_tx_groups:{type:"array",maxItems:5,items:{$ref:"#/definitions/i_tx_group"}},i_tx_group:{anyOf:[{$ref:"#/definitions/i_tx_group_period"},{$ref:"#/definitions/i_tx_group_field"},{$ref:"#/definitions/i_tx_group_metadata_field"}]},i_tx_group_period:{type:"object",properties:{type:{type:"string",enum:["period"]},field:{$ref:"#/definitions/i_tx_period"},alias:{type:"string"}},required:["type","field"],additionalProperties:!1},i_tx_group_field:{type:"object",properties:{type:{type:"string",enum:["field"]},field:{type:"string"},alias:{type:"string"}},required:["type","field"],additionalProperties:!1},i_tx_group_metadata_field:{type:"object",properties:{type:{type:"string",enum:["metadata_field"]},field:{type:"string"},alias:{type:"string"}},required:["type","field"],additionalProperties:!1},i_tx_period:{anyOf:[{$ref:"#/definitions/i_tx_period_simple"},{$ref:"#/definitions/i_tx_period_timezone"}]},i_tx_period_simple:{description:"Time period rows should be grouped by",type:"string",enum:["year","month","week","day","hour","minute"],default:"day"},i_tx_period_timezone:{type:"object",properties:{period:{$ref:"#/definitions/i_tx_period_simple"},timezone:{description:"",type:"string"}},required:["period","timezone"],additionalProperties:!1},i_tx_time_filter:{type:"object",properties:{start_time:{type:"string",format:"date-time"},end_time:{type:"string",format:"date-time"}},$typescript:'{"additionalProperties":false}'},i_tx_aggregator:{description:"Aggregator description",anyOf:[{$ref:"#/definitions/i_tx_aggregator_simple"},{$ref:"#/definitions/i_tx_aggregator_complex"}]},i_tx_aggregator_simple:{description:"Function to use for grouping",type:"string",enum:["count","countDistinct","sum","average","min","max"],default:"count"},i_tx_aggregator_complex:{description:"Function and field to group",type:"object",properties:{function:{$ref:"#/definitions/i_tx_aggregator_simple"},field:{description:"Field to group by",type:"string"},alias:{description:"Alias to group under",type:"string"}},$typescript:'{"additionalProperties":false}'},i_tx_aggregate_results:{type:"array",items:{$ref:"#/definitions/i_tx_aggregate_result"}},i_tx_aggregate_result:{type:"object",additionalProperties:{type:["string","number"]}},i_tx_distributor_leftover_rule:{description:"Rule for distribution grouping",type:"string",enum:["keep","random","largest","target"]},i_tx_metadata_action:{description:"Whether to replace or extend current metadata with new value",type:"string",enum:["replace","extend"],default:"replace"},i_tx_metadata_action_for_reverse:{description:"Whether to replace or extend current metadata with new value",type:"string",enum:["replace","replace_create_only","replace_cancel_only","extend","extend_create_only","extend_cancel_only"],default:"replace"}}};var Ti={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTokenTxInput",title:"UpdateTokenTxInput",description:"Input for updateToken",type:"object",properties:{token:{$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"},update:{$ref:"#/definitions/update_token_fields"},options:{$ref:"#/definitions/update_token_tx_options"}},definitions:{update_token_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/update_token_additional_options"}]},update_token_additional_options:{description:"Optional flags for input",type:"object",default:{},$typescript:'{"additionalProperties":false}',properties:{return_when_not_updated:{$id:"return_when_not_updated",description:"Whether the request should return the token object even if it was not updated",type:"boolean",default:!1}}},update_token_fields:{type:"object",$typescript:'{"additionalProperties":false}',properties:{metadata:{$ref:"/db/token/token.schema.json#/properties/metadata"},public:{$ref:"/db/token/token.schema.json#/properties/public"},status:{$ref:"/db/token/token.schema.json#/properties/status"}}}},required:["token"],additionalProperties:!1};var yi={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTokenTxOutput",title:"UpdateTokenTxOutput",description:"Output of updateToken",type:"object",properties:{token:{description:"Token object",$ref:"/db/token/token.schema.json"},updated:{description:"Boolean showing if the token was updated",type:"boolean"}},additionalProperties:!1};var bi={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTransferTxInput",title:"UpdateTransferTxInput",description:"Input for updateTransfer",type:"object",properties:{transfer:{$ref:"/txs/get-transfer/get-transfer.schema.input.json#/definitions/unique_transfer_filter"},update:{$ref:"#/definitions/update_transfer_fields"},options:{$ref:"#/definitions/update_transfer_tx_options"}},definitions:{update_transfer_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/update_transfer_additional_options"}]},update_transfer_additional_options:{description:"Optional flags for input",type:"object",default:{},properties:{return_from_balance:{$id:"return_from_balance",description:"Whether the request should also return from wallet balance",type:"boolean",default:!1},return_to_balance:{$id:"return_to_balance",description:"Whether the request should also return to wallet balance",type:"boolean",default:!1},return_when_not_updated:{$id:"return_when_not_updated",description:"Whether the request should return the transfer object even if it was not updated",type:"boolean",default:!1},metadata_action:{$id:"metadata_action",$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_action"}},$typescript:'{"additionalProperties": false}'},update_transfer_fields:{type:"object",description:"Changes to be made to the transfer",properties:{status:{description:"Status the transfer should be set as. Only pending transfers can be updated",default:"finished",$ref:"/db/consts.schema.json#/definitions/TransferStatus"},metadata:{$ref:"/db/transfer/transfer.schema.json#/properties/metadata"},extend_metadata:{$ref:"/db/transfer/transfer.schema.json#/properties/metadata"},updated_at:{$ref:"/db/transfer/transfer.schema.json#/properties/updated_at"}},default:{status:"finished"},additionalProperties:!1}},required:["transfer"],additionalProperties:!1};var Fi={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTransferTxOutput",title:"UpdateTransferTxOutput",description:"Output of updateTransfer",type:"object",properties:{transfer:{description:"Updated transfer object",$ref:"/txs/get-transfer/get-transfer.schema.output.json#/definitions/transfer"},updated:{description:"Boolean showing if the transfer was updated",type:"boolean"},from_balance:{description:"Debited wallet balance",$ref:"/txs/get-balance/get-balance.schema.output.json#/definitions/balance"},to_balance:{description:"Credited wallet balance",$ref:"/txs/get-balance/get-balance.schema.output.json#/definitions/balance"}},additionalProperties:!1};var xi={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTransferGroupTxInput",title:"UpdateTransferGroupTxInput",description:"Input for updateTransferGroup",type:"object",properties:{transfer_group:{$ref:"/txs/get-transfer-group/get-transfer-group.schema.input.json#/definitions/unique_transfer_group_filter"},update:{$ref:"#/definitions/update_transfer_group_data"},options:{$ref:"#/definitions/update_transfer_group_tx_options"}},definitions:{update_transfer_group_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options_without_tx"},{$ref:"#/definitions/update_transfer_group_additional_options"}]},update_transfer_group_additional_options:{description:"Optional flags for input",type:"object",default:{},properties:{return_transfers:{description:"Should the update return all transfers belonging to group",type:"boolean"},return_when_not_updated:{$id:"return_to_balance",description:"Whether the request should return the transfer_group object even if it was not updated",type:"boolean",default:!1},metadata_action:{$id:"metadata_action",$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_action"},transfer_metadata_action:{$id:"transfer_metadata_action",$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_action"}},$typescript:'{"additionalProperties": false}'},update_transfer_group_data:{description:"Changes to be made to the transfer_group",anyOf:[{$ref:"#/definitions/update_transfer_group_status"},{$ref:"#/definitions/update_transfer_group_transfer_status"},{$ref:"#/definitions/update_transfer_group_metadata"}]},update_transfer_group_status:{type:"object",properties:{status:{description:"Lifecycle status of the TransferGroup",$ref:"/db/consts.schema.json#/definitions/TransferGroupStatus"},transfer_status:{description:"Status all the transfers should be set at.",$ref:"/db/consts.schema.json#/definitions/TransferStatus"},metadata:{description:"Key value object to be replaced or extended with existing TransferGroup metadata",$ref:"/db/transfer/transfer.schema.json#/properties/metadata"},transfer_metadata:{description:"Key value object to be replaced or extended with existing Transfer metadata",$ref:"/db/transfer/transfer.schema.json#/properties/metadata"}},required:["status"],additionalProperties:!1},update_transfer_group_transfer_status:{type:"object",properties:{status:{description:"Lifecycle status of the TransferGroup",$ref:"/db/consts.schema.json#/definitions/TransferGroupStatus"},transfer_status:{description:"Status all the transfers should be set at. Changing transfer_status will also close the group",$ref:"/db/consts.schema.json#/definitions/TransferStatus"},metadata:{description:"Key value object to be replaced or extended with existing TransferGroup metadata",$ref:"/db/transfer/transfer.schema.json#/properties/metadata"},transfer_metadata:{description:"Key value object to be replaced or extended with existing Transfer metadata",$ref:"/db/transfer/transfer.schema.json#/properties/metadata"}},required:["transfer_status"],additionalProperties:!1},update_transfer_group_metadata:{type:"object",properties:{status:{description:"Lifecycle status of the TransferGroup",$ref:"/db/consts.schema.json#/definitions/TransferGroupStatus"},transfer_status:{description:"Status all the transfers should be set at.",$ref:"/db/consts.schema.json#/definitions/TransferStatus"},metadata:{description:"Key value object to be replaced or extended with existing TransferGroup metadata",$ref:"/db/transfer/transfer.schema.json#/properties/metadata"},transfer_metadata:{description:"Key value object to be replaced or extended with existing Transfer metadata",$ref:"/db/transfer/transfer.schema.json#/properties/metadata"}},required:["metadata"],additionalProperties:!1}},required:["transfer_group"],additionalProperties:!1};var $i={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTransferGroupTxOutput",title:"UpdateTransferGroupTxOutput",description:"Output of updateTransferGroup",type:"object",properties:{transfer_group:{$ref:"/db/transfer-group/transfer-group.schema.json"},updated:{description:"Boolean showing if the transfer_group was updated",type:"boolean"},transfers:{description:"Updated transfers",type:"array",items:{$ref:"/txs/get-transfer/get-transfer.schema.output.json#/definitions/transfer"}}},additionalProperties:!1};var Oi={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTransferGroupManyTxInput",title:"UpdateTransferGroupManyTxInput",description:"Input for updateTransferGroupMany",type:"object",properties:{transfer_group:{$ref:"/txs/find-transfer-group-many/find-transfer-group-many.schema.input.json#/definitions/find_transfer_group_many_filter"},update:{$ref:"/txs/update-transfer-group/update-transfer-group.schema.input.json#/definitions/update_transfer_group_data"},options:{$ref:"/txs/update-transfer-group/update-transfer-group.schema.input.json#/definitions/update_transfer_group_tx_options"}},definitions:{update_transfer_group_many_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/update_transfer_group_many_additional_options"}]},update_transfer_group_many_additional_options:{description:"Optional flags for input",type:"object",default:{},$typescript:'{"additionalProperties":false}'}},required:["transfer_group"],additionalProperties:!1};var wi={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTransferGroupManyTxOutput",title:"UpdateTransferGroupManyTxOutput",description:"Output of updateTransferGroupMany",type:"object",properties:{transfer_groups:{description:"Updated transfer groups",type:"array",items:{$ref:"/db/transfer-group/transfer-group.schema.json"}},updated:{description:"Boolean showing if the transfer_group was updated",type:"boolean"},transfers:{description:"Updated transfers",type:"array",items:{$ref:"/txs/get-transfer/get-transfer.schema.output.json#/definitions/transfer"}}},required:["transfer_groups"],additionalProperties:!1};var Ii={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTransferManyTxInput",title:"UpdateTransferManyTxInput",description:"Input for updateTransferMany",type:"object",properties:{transfer:{$ref:"/txs/find-transfer-many/find-transfer-many.schema.input.json#/definitions/find_transfer_many_filter"},update:{$ref:"/txs/update-transfer/update-transfer.schema.input.json#/definitions/update_transfer_fields"},options:{$ref:"#/definitions/update_transfer_many_tx_options"}},definitions:{update_transfer_many_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options_without_tx"},{$ref:"#/definitions/update_transfer_many_additional_options"}]},update_transfer_many_additional_options:{description:"Optional flags for input",type:"object",default:{},properties:{metadata_action:{$id:"metadata_action",$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_action"}},$typescript:'{"additionalProperties": false}'}},required:["transfer","update"],additionalProperties:!1};var ji={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTransferManyTxOutput",title:"UpdateTransferManyTxOutput",description:"Output of updateTransferMany",type:"object",properties:{transfers:{description:"Updated transfers array",type:"array",items:{$ref:"/txs/get-transfer/get-transfer.schema.output.json#/definitions/transfer"}},updated:{description:"Boolean showing if the transfers were updated",type:"boolean"}},additionalProperties:!1};var vi={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateWalletTxInput",title:"UpdateWalletTxInput",description:"Input for updateWallet",type:"object",properties:{wallet:{$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},update:{$ref:"#/definitions/update_wallet_fields"},options:{$ref:"#/definitions/update_wallet_tx_options"}},definitions:{update_wallet_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/update_wallet_additional_options"}]},update_wallet_additional_options:{description:"Optional flags for input",type:"object",default:{},properties:{return_when_not_updated:{description:"Whether the request should return the wallet object even if it was not updated",type:"boolean",default:!1}},$typescript:'{"additionalProperties":false}'},update_wallet_fields:{type:"object",properties:{metadata:{$ref:"/db/wallet/wallet.schema.json#/properties/metadata"},name:{$ref:"/db/wallet/wallet.schema.json#/properties/name"},status:{$ref:"/db/wallet/wallet.schema.json#/properties/status"}},$typescript:'{"additionalProperties":false}'}},required:["wallet"],additionalProperties:!1};var ki={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateWalletTxOutput",title:"UpdateWalletTxOutput",description:"Output of updateWallet",type:"object",properties:{wallet:{description:"Wallet object",anyOf:[{$ref:"/db/wallet/wallet.schema.json"},{$ref:"/db/wallet/wallet.schema.optional.json"}]},updated:{description:"Boolean showing if the wallet was updated",type:"boolean"}},additionalProperties:!1};var u=new Nc.default({removeAdditional:!0,useDefaults:!0,coerceTypes:!0,formats:{validkey:/^[A-Za-z_][A-Za-z0-9_-]+?$/},strict:!1});u.addFormat("date-time",{validate:Fu});function wd(r,e){if(e!==void 0)return new Me({message:e,data:r})}function Ac(r){return function(e){if(r===void 0)return{isValid:!1,inputCopy:e,error:wd([new Error("Undefined validator")],"Undefined validator")};try{let t=Ai(e),n=r(t),a=n?void 0:r.errors,s=n?void 0:u.errorsText(a),i=wd(a,s);return{isValid:n,inputCopy:t,error:i}}catch(t){return{isValid:!1,inputCopy:e,error:wd([t],t.message)}}}}function m(r,e){let t=JSON.parse(JSON.stringify(r));return Uc(t,e)}function Uc(r,e){return typeof r!="object"||Object.keys(r).forEach(t=>{t==="$ref"&&r.$ref.startsWith("#")?r.$ref=e+r.$ref:r[t]=Uc(r[t],e)}),r}function qc(r,e){let t=m(r,e),n=t.properties.options;return P({$id:t.$id.replace("Input","Options"),definitions:t.definitions},n)}function Bc(r,e){let t=m(r,e),n=t.definitions[r.$allowStreamInput];return P({$id:t.$id.replace("Input","StreamChunk"),definitions:t.definitions},n)}var l={};u.addSchema(m(hd,"/api/jsonrpc/jsonrpc.request.schema.json"),"/api/jsonrpc/jsonrpc.request.schema.json");l.JSONRPCRequest=hd;u.addSchema(m(_d,"/api/jsonrpc/jsonrpc.response.schema.json"),"/api/jsonrpc/jsonrpc.response.schema.json");l.JSONRPCResponse=_d;u.addSchema(m(gd,"/client-options.schema.json"),"/client-options.schema.json");l.ClientOptions=gd;u.addSchema(m(qt,"/db/consts.schema.json"),"/db/consts.schema.json");l.Consts=qt;u.addSchema(m(fn,"/db/token/token.schema.input.json"),"/db/token/token.schema.input.json");l.TokenTableInput=fn;u.addSchema(m(un,"/db/token/token.schema.json"),"/db/token/token.schema.json");l.TokenTable=un;u.addSchema(m(Td,"/db/token/token.schema.optional.json"),"/db/token/token.schema.optional.json");l.TokenTableOptional=Td;u.addSchema(m(ln,"/db/transfer/transfer.schema.input.json"),"/db/transfer/transfer.schema.input.json");l.TransferTableInput=ln;u.addSchema(m(cn,"/db/transfer/transfer.schema.json"),"/db/transfer/transfer.schema.json");l.TransferTable=cn;u.addSchema(m(yd,"/db/transfer/transfer.schema.optional.json"),"/db/transfer/transfer.schema.optional.json");l.TransferTableOptional=yd;u.addSchema(m(mn,"/db/transfer-group/transfer-group.schema.input.json"),"/db/transfer-group/transfer-group.schema.input.json");l.TransferGroupTableInput=mn;u.addSchema(m(hn,"/db/transfer-group/transfer-group.schema.json"),"/db/transfer-group/transfer-group.schema.json");l.TransferGroupTable=hn;u.addSchema(m(bd,"/db/transfer-group/transfer-group.schema.optional.json"),"/db/transfer-group/transfer-group.schema.optional.json");l.TransferGroupTableOptional=bd;u.addSchema(m(_n,"/db/transfer-log/transfer-log.schema.input.json"),"/db/transfer-log/transfer-log.schema.input.json");l.TransferLogTableInput=_n;u.addSchema(m(gn,"/db/transfer-log/transfer-log.schema.json"),"/db/transfer-log/transfer-log.schema.json");l.TransferLogTable=gn;u.addSchema(m(Fd,"/db/transfer-log/transfer-log.schema.optional.json"),"/db/transfer-log/transfer-log.schema.optional.json");l.TransferLogTableOptional=Fd;u.addSchema(m(Tn,"/db/wallet/wallet.schema.input.json"),"/db/wallet/wallet.schema.input.json");l.WalletTableInput=Tn;u.addSchema(m(yn,"/db/wallet/wallet.schema.json"),"/db/wallet/wallet.schema.json");l.WalletTable=yn;u.addSchema(m(xd,"/db/wallet/wallet.schema.optional.json"),"/db/wallet/wallet.schema.optional.json");l.WalletTableOptional=xd;u.addSchema(m(bn,"/db/wallet-token-setting/wallet-token-setting.schema.input.json"),"/db/wallet-token-setting/wallet-token-setting.schema.input.json");l.WalletTokenSettingTableInput=bn;u.addSchema(m(Fn,"/db/wallet-token-setting/wallet-token-setting.schema.json"),"/db/wallet-token-setting/wallet-token-setting.schema.json");l.WalletTokenSettingTable=Fn;u.addSchema(m($d,"/db/wallet-token-setting/wallet-token-setting.schema.optional.json"),"/db/wallet-token-setting/wallet-token-setting.schema.optional.json");l.WalletTokenSettingTableOptional=$d;u.addSchema(m(xn,"/db/wapi-setting/wapi-setting.schema.input.json"),"/db/wapi-setting/wapi-setting.schema.input.json");l.WapiSettingTableInput=xn;u.addSchema(m($n,"/db/wapi-setting/wapi-setting.schema.json"),"/db/wapi-setting/wapi-setting.schema.json");l.WapiSettingTable=$n;u.addSchema(m(Od,"/db/wapi-setting/wapi-setting.schema.optional.json"),"/db/wapi-setting/wapi-setting.schema.optional.json");l.WapiSettingTableOptional=Od;u.addSchema(m(On,"/fns/aggregate-transfers/aggregate-transfers.schema.input.json"),"/fns/aggregate-transfers/aggregate-transfers.schema.input.json");l.AggregateTransfersFnInput=On;u.addSchema(m(wn,"/fns/aggregate-transfers/aggregate-transfers.schema.output.json"),"/fns/aggregate-transfers/aggregate-transfers.schema.output.json");l.AggregateTransfersFnOutput=wn;u.addSchema(m(In,"/fns/create-access-token/create-access-token.schema.input.json"),"/fns/create-access-token/create-access-token.schema.input.json");l.CreateAccessTokenFnInput=In;u.addSchema(m(jn,"/fns/create-access-token/create-access-token.schema.output.json"),"/fns/create-access-token/create-access-token.schema.output.json");l.CreateAccessTokenFnOutput=jn;u.addSchema(m(vn,"/fns/create-contract/create-contract.schema.input.json"),"/fns/create-contract/create-contract.schema.input.json");l.CreateContractFnInput=vn;u.addSchema(m(kn,"/fns/create-contract/create-contract.schema.output.json"),"/fns/create-contract/create-contract.schema.output.json");l.CreateContractFnOutput=kn;u.addSchema(m(Sn,"/fns/create-deposit/create-deposit.schema.input.json"),"/fns/create-deposit/create-deposit.schema.input.json");l.CreateDepositFnInput=Sn;u.addSchema(m(Cn,"/fns/create-deposit/create-deposit.schema.output.json"),"/fns/create-deposit/create-deposit.schema.output.json");l.CreateDepositFnOutput=Cn;u.addSchema(m(Pn,"/fns/create-exchange/create-exchange.schema.input.json"),"/fns/create-exchange/create-exchange.schema.input.json");l.CreateExchangeFnInput=Pn;u.addSchema(m(Gn,"/fns/create-exchange/create-exchange.schema.output.json"),"/fns/create-exchange/create-exchange.schema.output.json");l.CreateExchangeFnOutput=Gn;u.addSchema(m(Dn,"/fns/create-token/create-token.schema.input.json"),"/fns/create-token/create-token.schema.input.json");l.CreateTokenFnInput=Dn;u.addSchema(m(En,"/fns/create-token/create-token.schema.output.json"),"/fns/create-token/create-token.schema.output.json");l.CreateTokenFnOutput=En;u.addSchema(m(Rn,"/fns/create-transfer/create-transfer.schema.input.json"),"/fns/create-transfer/create-transfer.schema.input.json");l.CreateTransferFnInput=Rn;u.addSchema(m(Mn,"/fns/create-transfer/create-transfer.schema.output.json"),"/fns/create-transfer/create-transfer.schema.output.json");l.CreateTransferFnOutput=Mn;u.addSchema(m(Wn,"/fns/create-transfer-group/create-transfer-group.schema.input.json"),"/fns/create-transfer-group/create-transfer-group.schema.input.json");l.CreateTransferGroupFnInput=Wn;u.addSchema(m(An,"/fns/create-transfer-group/create-transfer-group.schema.output.json"),"/fns/create-transfer-group/create-transfer-group.schema.output.json");l.CreateTransferGroupFnOutput=An;u.addSchema(m(Nn,"/fns/create-transfers/create-transfers.schema.input.json"),"/fns/create-transfers/create-transfers.schema.input.json");l.CreateTransfersFnInput=Nn;u.addSchema(m(Un,"/fns/create-transfers/create-transfers.schema.output.json"),"/fns/create-transfers/create-transfers.schema.output.json");l.CreateTransfersFnOutput=Un;u.addSchema(m(qn,"/fns/create-wallet/create-wallet.schema.input.json"),"/fns/create-wallet/create-wallet.schema.input.json");l.CreateWalletFnInput=qn;u.addSchema(m(Bn,"/fns/create-wallet/create-wallet.schema.output.json"),"/fns/create-wallet/create-wallet.schema.output.json");l.CreateWalletFnOutput=Bn;u.addSchema(m(Ln,"/fns/create-withdrawal/create-withdrawal.schema.input.json"),"/fns/create-withdrawal/create-withdrawal.schema.input.json");l.CreateWithdrawalFnInput=Ln;u.addSchema(m(Vn,"/fns/create-withdrawal/create-withdrawal.schema.output.json"),"/fns/create-withdrawal/create-withdrawal.schema.output.json");l.CreateWithdrawalFnOutput=Vn;u.addSchema(m(Hn,"/fns/find-balances/find-balances.schema.input.json"),"/fns/find-balances/find-balances.schema.input.json");l.FindBalancesFnInput=Hn;u.addSchema(m(zn,"/fns/find-balances/find-balances.schema.output.json"),"/fns/find-balances/find-balances.schema.output.json");l.FindBalancesFnOutput=zn;u.addSchema(m(Kn,"/fns/find-tokens/find-tokens.schema.input.json"),"/fns/find-tokens/find-tokens.schema.input.json");l.FindTokensFnInput=Kn;u.addSchema(m(Qn,"/fns/find-tokens/find-tokens.schema.output.json"),"/fns/find-tokens/find-tokens.schema.output.json");l.FindTokensFnOutput=Qn;u.addSchema(m(Jn,"/fns/find-transfer-groups/find-transfer-groups.schema.input.json"),"/fns/find-transfer-groups/find-transfer-groups.schema.input.json");l.FindTransferGroupsFnInput=Jn;u.addSchema(m(Xn,"/fns/find-transfer-groups/find-transfer-groups.schema.output.json"),"/fns/find-transfer-groups/find-transfer-groups.schema.output.json");l.FindTransferGroupsFnOutput=Xn;u.addSchema(m(Yn,"/fns/find-transfers/find-transfers.schema.input.json"),"/fns/find-transfers/find-transfers.schema.input.json");l.FindTransfersFnInput=Yn;u.addSchema(m(Zn,"/fns/find-transfers/find-transfers.schema.output.json"),"/fns/find-transfers/find-transfers.schema.output.json");l.FindTransfersFnOutput=Zn;u.addSchema(m(ea,"/fns/find-wallets/find-wallets.schema.input.json"),"/fns/find-wallets/find-wallets.schema.input.json");l.FindWalletsFnInput=ea;u.addSchema(m(ta,"/fns/find-wallets/find-wallets.schema.output.json"),"/fns/find-wallets/find-wallets.schema.output.json");l.FindWalletsFnOutput=ta;u.addSchema(m(ra,"/fns/fn-consts.schema.json"),"/fns/fn-consts.schema.json");l.FnConsts=ra;u.addSchema(m(na,"/fns/get-balance/get-balance.schema.input.json"),"/fns/get-balance/get-balance.schema.input.json");l.GetBalanceFnInput=na;u.addSchema(m(aa,"/fns/get-balance/get-balance.schema.output.json"),"/fns/get-balance/get-balance.schema.output.json");l.GetBalanceFnOutput=aa;u.addSchema(m(sa,"/fns/get-balance-history/get-balance-history.schema.input.json"),"/fns/get-balance-history/get-balance-history.schema.input.json");l.GetBalanceHistoryFnInput=sa;u.addSchema(m(ia,"/fns/get-balance-history/get-balance-history.schema.output.json"),"/fns/get-balance-history/get-balance-history.schema.output.json");l.GetBalanceHistoryFnOutput=ia;u.addSchema(m(oa,"/fns/get-flags/get-flags.schema.input.json"),"/fns/get-flags/get-flags.schema.input.json");l.GetFlagsFnInput=oa;u.addSchema(m(pa,"/fns/get-flags/get-flags.schema.output.json"),"/fns/get-flags/get-flags.schema.output.json");l.GetFlagsFnOutput=pa;u.addSchema(m(da,"/fns/get-statistics/get-statistics.schema.input.json"),"/fns/get-statistics/get-statistics.schema.input.json");l.GetStatisticsFnInput=da;u.addSchema(m(fa,"/fns/get-statistics/get-statistics.schema.output.json"),"/fns/get-statistics/get-statistics.schema.output.json");l.GetStatisticsFnOutput=fa;u.addSchema(m(ua,"/fns/get-token/get-token.schema.input.json"),"/fns/get-token/get-token.schema.input.json");l.GetTokenFnInput=ua;u.addSchema(m(la,"/fns/get-token/get-token.schema.output.json"),"/fns/get-token/get-token.schema.output.json");l.GetTokenFnOutput=la;u.addSchema(m(ca,"/fns/get-transfer/get-transfer.schema.input.json"),"/fns/get-transfer/get-transfer.schema.input.json");l.GetTransferFnInput=ca;u.addSchema(m(ma,"/fns/get-transfer/get-transfer.schema.output.json"),"/fns/get-transfer/get-transfer.schema.output.json");l.GetTransferFnOutput=ma;u.addSchema(m(ha,"/fns/get-transfer-group/get-transfer-group.schema.input.json"),"/fns/get-transfer-group/get-transfer-group.schema.input.json");l.GetTransferGroupFnInput=ha;u.addSchema(m(_a,"/fns/get-transfer-group/get-transfer-group.schema.output.json"),"/fns/get-transfer-group/get-transfer-group.schema.output.json");l.GetTransferGroupFnOutput=_a;u.addSchema(m(ga,"/fns/get-wallet/get-wallet.schema.input.json"),"/fns/get-wallet/get-wallet.schema.input.json");l.GetWalletFnInput=ga;u.addSchema(m(Ta,"/fns/get-wallet/get-wallet.schema.output.json"),"/fns/get-wallet/get-wallet.schema.output.json");l.GetWalletFnOutput=Ta;u.addSchema(m(Bt,"/fns/import-data/import-data.schema.input.json"),"/fns/import-data/import-data.schema.input.json");l.ImportDataFnInput=Bt;var Lc=qc(Bt,"/fns/import-data/import-data.schema.input.json");u.addSchema(Lc,"/fns/import-data/import-data.schema.options.json");l.ImportDataFnOptions=Lc;var Vc=Bc(Bt,"/fns/import-data/import-data.schema.input.json");u.addSchema(Vc,"/fns/import-data/import-data.schema.chunk.json");l.ImportDataFnStreamChunk=Vc;u.addSchema(m(ya,"/fns/import-data/import-data.schema.output.json"),"/fns/import-data/import-data.schema.output.json");l.ImportDataFnOutput=ya;u.addSchema(m(ba,"/fns/reverse-transfer/reverse-transfer.schema.input.json"),"/fns/reverse-transfer/reverse-transfer.schema.input.json");l.ReverseTransferFnInput=ba;u.addSchema(m(Fa,"/fns/reverse-transfer/reverse-transfer.schema.output.json"),"/fns/reverse-transfer/reverse-transfer.schema.output.json");l.ReverseTransferFnOutput=Fa;u.addSchema(m(xa,"/fns/reverse-transfer-group/reverse-transfer-group.schema.input.json"),"/fns/reverse-transfer-group/reverse-transfer-group.schema.input.json");l.ReverseTransferGroupFnInput=xa;u.addSchema(m($a,"/fns/reverse-transfer-group/reverse-transfer-group.schema.output.json"),"/fns/reverse-transfer-group/reverse-transfer-group.schema.output.json");l.ReverseTransferGroupFnOutput=$a;u.addSchema(m(Oa,"/fns/reverse-transfers/reverse-transfers.schema.input.json"),"/fns/reverse-transfers/reverse-transfers.schema.input.json");l.ReverseTransfersFnInput=Oa;u.addSchema(m(wa,"/fns/reverse-transfers/reverse-transfers.schema.output.json"),"/fns/reverse-transfers/reverse-transfers.schema.output.json");l.ReverseTransfersFnOutput=wa;u.addSchema(m(Ia,"/fns/set-flags/set-flags.schema.input.json"),"/fns/set-flags/set-flags.schema.input.json");l.SetFlagsFnInput=Ia;u.addSchema(m(ja,"/fns/set-flags/set-flags.schema.output.json"),"/fns/set-flags/set-flags.schema.output.json");l.SetFlagsFnOutput=ja;u.addSchema(m(va,"/fns/update-token/update-token.schema.input.json"),"/fns/update-token/update-token.schema.input.json");l.UpdateTokenFnInput=va;u.addSchema(m(ka,"/fns/update-token/update-token.schema.output.json"),"/fns/update-token/update-token.schema.output.json");l.UpdateTokenFnOutput=ka;u.addSchema(m(Sa,"/fns/update-transfer/update-transfer.schema.input.json"),"/fns/update-transfer/update-transfer.schema.input.json");l.UpdateTransferFnInput=Sa;u.addSchema(m(Ca,"/fns/update-transfer/update-transfer.schema.output.json"),"/fns/update-transfer/update-transfer.schema.output.json");l.UpdateTransferFnOutput=Ca;u.addSchema(m(Pa,"/fns/update-transfer-group/update-transfer-group.schema.input.json"),"/fns/update-transfer-group/update-transfer-group.schema.input.json");l.UpdateTransferGroupFnInput=Pa;u.addSchema(m(Ga,"/fns/update-transfer-group/update-transfer-group.schema.output.json"),"/fns/update-transfer-group/update-transfer-group.schema.output.json");l.UpdateTransferGroupFnOutput=Ga;u.addSchema(m(Da,"/fns/update-transfer-groups/update-transfer-groups.schema.input.json"),"/fns/update-transfer-groups/update-transfer-groups.schema.input.json");l.UpdateTransferGroupsFnInput=Da;u.addSchema(m(Ea,"/fns/update-transfer-groups/update-transfer-groups.schema.output.json"),"/fns/update-transfer-groups/update-transfer-groups.schema.output.json");l.UpdateTransferGroupsFnOutput=Ea;u.addSchema(m(Ra,"/fns/update-transfers/update-transfers.schema.input.json"),"/fns/update-transfers/update-transfers.schema.input.json");l.UpdateTransfersFnInput=Ra;u.addSchema(m(Ma,"/fns/update-transfers/update-transfers.schema.output.json"),"/fns/update-transfers/update-transfers.schema.output.json");l.UpdateTransfersFnOutput=Ma;u.addSchema(m(Wa,"/fns/update-wallet/update-wallet.schema.input.json"),"/fns/update-wallet/update-wallet.schema.input.json");l.UpdateWalletFnInput=Wa;u.addSchema(m(Aa,"/fns/update-wallet/update-wallet.schema.output.json"),"/fns/update-wallet/update-wallet.schema.output.json");l.UpdateWalletFnOutput=Aa;u.addSchema(m(Na,"/txs/aggregate-transfer-many/aggregate-transfer-many.schema.input.json"),"/txs/aggregate-transfer-many/aggregate-transfer-many.schema.input.json");l.AggregateTransferManyTxInput=Na;u.addSchema(m(Ua,"/txs/aggregate-transfer-many/aggregate-transfer-many.schema.output.json"),"/txs/aggregate-transfer-many/aggregate-transfer-many.schema.output.json");l.AggregateTransferManyTxOutput=Ua;u.addSchema(m(qa,"/txs/authentication-check/authentication-check.schema.input.json"),"/txs/authentication-check/authentication-check.schema.input.json");l.AuthenticationCheckTxInput=qa;u.addSchema(m(Ba,"/txs/authentication-check/authentication-check.schema.output.json"),"/txs/authentication-check/authentication-check.schema.output.json");l.AuthenticationCheckTxOutput=Ba;u.addSchema(m(La,"/txs/create-access-token/create-access-token.schema.input.json"),"/txs/create-access-token/create-access-token.schema.input.json");l.CreateAccessTokenTxInput=La;u.addSchema(m(Va,"/txs/create-access-token/create-access-token.schema.output.json"),"/txs/create-access-token/create-access-token.schema.output.json");l.CreateAccessTokenTxOutput=Va;u.addSchema(m(Ha,"/txs/create-contract/create-contract.schema.input.json"),"/txs/create-contract/create-contract.schema.input.json");l.CreateContractTxInput=Ha;u.addSchema(m(za,"/txs/create-contract/create-contract.schema.output.json"),"/txs/create-contract/create-contract.schema.output.json");l.CreateContractTxOutput=za;u.addSchema(m(Ka,"/txs/create-deposit/create-deposit.schema.input.json"),"/txs/create-deposit/create-deposit.schema.input.json");l.CreateDepositTxInput=Ka;u.addSchema(m(Qa,"/txs/create-deposit/create-deposit.schema.output.json"),"/txs/create-deposit/create-deposit.schema.output.json");l.CreateDepositTxOutput=Qa;u.addSchema(m(Ja,"/txs/create-distribution/create-distribution.schema.input.json"),"/txs/create-distribution/create-distribution.schema.input.json");l.CreateDistributionTxInput=Ja;u.addSchema(m(Xa,"/txs/create-distribution/create-distribution.schema.output.json"),"/txs/create-distribution/create-distribution.schema.output.json");l.CreateDistributionTxOutput=Xa;u.addSchema(m(Ya,"/txs/create-token/create-token.schema.input.json"),"/txs/create-token/create-token.schema.input.json");l.CreateTokenTxInput=Ya;u.addSchema(m(Za,"/txs/create-token/create-token.schema.output.json"),"/txs/create-token/create-token.schema.output.json");l.CreateTokenTxOutput=Za;u.addSchema(m(es,"/txs/create-transfer/create-transfer.schema.input.json"),"/txs/create-transfer/create-transfer.schema.input.json");l.CreateTransferTxInput=es;u.addSchema(m(ts,"/txs/create-transfer/create-transfer.schema.output.json"),"/txs/create-transfer/create-transfer.schema.output.json");l.CreateTransferTxOutput=ts;u.addSchema(m(rs,"/txs/create-transfer-group/create-transfer-group.schema.input.json"),"/txs/create-transfer-group/create-transfer-group.schema.input.json");l.CreateTransferGroupTxInput=rs;u.addSchema(m(ns,"/txs/create-transfer-group/create-transfer-group.schema.output.json"),"/txs/create-transfer-group/create-transfer-group.schema.output.json");l.CreateTransferGroupTxOutput=ns;u.addSchema(m(as,"/txs/create-transfer-many/create-transfer-many.schema.input.json"),"/txs/create-transfer-many/create-transfer-many.schema.input.json");l.CreateTransferManyTxInput=as;u.addSchema(m(ss,"/txs/create-transfer-many/create-transfer-many.schema.output.json"),"/txs/create-transfer-many/create-transfer-many.schema.output.json");l.CreateTransferManyTxOutput=ss;u.addSchema(m(is,"/txs/create-wallet/create-wallet.schema.input.json"),"/txs/create-wallet/create-wallet.schema.input.json");l.CreateWalletTxInput=is;u.addSchema(m(os,"/txs/create-wallet/create-wallet.schema.output.json"),"/txs/create-wallet/create-wallet.schema.output.json");l.CreateWalletTxOutput=os;u.addSchema(m(ps,"/txs/create-withdrawal/create-withdrawal.schema.input.json"),"/txs/create-withdrawal/create-withdrawal.schema.input.json");l.CreateWithdrawalTxInput=ps;u.addSchema(m(ds,"/txs/create-withdrawal/create-withdrawal.schema.output.json"),"/txs/create-withdrawal/create-withdrawal.schema.output.json");l.CreateWithdrawalTxOutput=ds;u.addSchema(m(fs,"/txs/export-database/export-database.schema.input.json"),"/txs/export-database/export-database.schema.input.json");l.ExportDatabaseTxInput=fs;u.addSchema(m(us,"/txs/export-database/export-database.schema.output.json"),"/txs/export-database/export-database.schema.output.json");l.ExportDatabaseTxOutput=us;u.addSchema(m(ls,"/txs/find-balance-many/find-balance-many.schema.input.json"),"/txs/find-balance-many/find-balance-many.schema.input.json");l.FindBalanceManyTxInput=ls;u.addSchema(m(cs,"/txs/find-balance-many/find-balance-many.schema.output.json"),"/txs/find-balance-many/find-balance-many.schema.output.json");l.FindBalanceManyTxOutput=cs;u.addSchema(m(ms,"/txs/find-token-many/find-token-many.schema.input.json"),"/txs/find-token-many/find-token-many.schema.input.json");l.FindTokenManyTxInput=ms;u.addSchema(m(hs,"/txs/find-token-many/find-token-many.schema.output.json"),"/txs/find-token-many/find-token-many.schema.output.json");l.FindTokenManyTxOutput=hs;u.addSchema(m(_s,"/txs/find-transfer-group-many/find-transfer-group-many.schema.input.json"),"/txs/find-transfer-group-many/find-transfer-group-many.schema.input.json");l.FindTransferGroupManyTxInput=_s;u.addSchema(m(gs,"/txs/find-transfer-group-many/find-transfer-group-many.schema.output.json"),"/txs/find-transfer-group-many/find-transfer-group-many.schema.output.json");l.FindTransferGroupManyTxOutput=gs;u.addSchema(m(Ts,"/txs/find-transfer-many/find-transfer-many.schema.input.json"),"/txs/find-transfer-many/find-transfer-many.schema.input.json");l.FindTransferManyTxInput=Ts;u.addSchema(m(ys,"/txs/find-transfer-many/find-transfer-many.schema.output.json"),"/txs/find-transfer-many/find-transfer-many.schema.output.json");l.FindTransferManyTxOutput=ys;u.addSchema(m(bs,"/txs/find-wallet-many/find-wallet-many.schema.input.json"),"/txs/find-wallet-many/find-wallet-many.schema.input.json");l.FindWalletManyTxInput=bs;u.addSchema(m(Fs,"/txs/find-wallet-many/find-wallet-many.schema.output.json"),"/txs/find-wallet-many/find-wallet-many.schema.output.json");l.FindWalletManyTxOutput=Fs;u.addSchema(m(xs,"/txs/finish-transaction/finish-transaction.schema.input.json"),"/txs/finish-transaction/finish-transaction.schema.input.json");l.FinishTransactionTxInput=xs;u.addSchema(m($s,"/txs/finish-transaction/finish-transaction.schema.output.json"),"/txs/finish-transaction/finish-transaction.schema.output.json");l.FinishTransactionTxOutput=$s;u.addSchema(m(Os,"/txs/get-balance/get-balance.schema.input.json"),"/txs/get-balance/get-balance.schema.input.json");l.GetBalanceTxInput=Os;u.addSchema(m(ws,"/txs/get-balance/get-balance.schema.output.json"),"/txs/get-balance/get-balance.schema.output.json");l.GetBalanceTxOutput=ws;u.addSchema(m(Is,"/txs/get-balance-history/get-balance-history.schema.input.json"),"/txs/get-balance-history/get-balance-history.schema.input.json");l.GetBalanceHistoryTxInput=Is;u.addSchema(m(js,"/txs/get-balance-history/get-balance-history.schema.output.json"),"/txs/get-balance-history/get-balance-history.schema.output.json");l.GetBalanceHistoryTxOutput=js;u.addSchema(m(vs,"/txs/get-database-export-progress/get-database-export-progress.schema.input.json"),"/txs/get-database-export-progress/get-database-export-progress.schema.input.json");l.GetDatabaseExportProgressTxInput=vs;u.addSchema(m(ks,"/txs/get-database-export-progress/get-database-export-progress.schema.output.json"),"/txs/get-database-export-progress/get-database-export-progress.schema.output.json");l.GetDatabaseExportProgressTxOutput=ks;u.addSchema(m(Ss,"/txs/get-database-import-progress/get-database-import-progress.schema.input.json"),"/txs/get-database-import-progress/get-database-import-progress.schema.input.json");l.GetDatabaseImportProgressTxInput=Ss;u.addSchema(m(Cs,"/txs/get-database-import-progress/get-database-import-progress.schema.output.json"),"/txs/get-database-import-progress/get-database-import-progress.schema.output.json");l.GetDatabaseImportProgressTxOutput=Cs;u.addSchema(m(Ps,"/txs/get-flags/get-flags.schema.input.json"),"/txs/get-flags/get-flags.schema.input.json");l.GetFlagsTxInput=Ps;u.addSchema(m(Gs,"/txs/get-flags/get-flags.schema.output.json"),"/txs/get-flags/get-flags.schema.output.json");l.GetFlagsTxOutput=Gs;u.addSchema(m(Ds,"/txs/get-statistics/get-statistics.schema.input.json"),"/txs/get-statistics/get-statistics.schema.input.json");l.GetStatisticsTxInput=Ds;u.addSchema(m(Es,"/txs/get-statistics/get-statistics.schema.output.json"),"/txs/get-statistics/get-statistics.schema.output.json");l.GetStatisticsTxOutput=Es;u.addSchema(m(Rs,"/txs/get-token/get-token.schema.input.json"),"/txs/get-token/get-token.schema.input.json");l.GetTokenTxInput=Rs;u.addSchema(m(Ms,"/txs/get-token/get-token.schema.output.json"),"/txs/get-token/get-token.schema.output.json");l.GetTokenTxOutput=Ms;u.addSchema(m(Ws,"/txs/get-token-many/get-token-many.schema.input.json"),"/txs/get-token-many/get-token-many.schema.input.json");l.GetTokenManyTxInput=Ws;u.addSchema(m(As,"/txs/get-token-many/get-token-many.schema.output.json"),"/txs/get-token-many/get-token-many.schema.output.json");l.GetTokenManyTxOutput=As;u.addSchema(m(Ns,"/txs/get-transfer/get-transfer.schema.input.json"),"/txs/get-transfer/get-transfer.schema.input.json");l.GetTransferTxInput=Ns;u.addSchema(m(Us,"/txs/get-transfer/get-transfer.schema.output.json"),"/txs/get-transfer/get-transfer.schema.output.json");l.GetTransferTxOutput=Us;u.addSchema(m(qs,"/txs/get-transfer-group/get-transfer-group.schema.input.json"),"/txs/get-transfer-group/get-transfer-group.schema.input.json");l.GetTransferGroupTxInput=qs;u.addSchema(m(Bs,"/txs/get-transfer-group/get-transfer-group.schema.output.json"),"/txs/get-transfer-group/get-transfer-group.schema.output.json");l.GetTransferGroupTxOutput=Bs;u.addSchema(m(Ls,"/txs/get-wallet/get-wallet.schema.input.json"),"/txs/get-wallet/get-wallet.schema.input.json");l.GetWalletTxInput=Ls;u.addSchema(m(Vs,"/txs/get-wallet/get-wallet.schema.output.json"),"/txs/get-wallet/get-wallet.schema.output.json");l.GetWalletTxOutput=Vs;u.addSchema(m(Hs,"/txs/get-wallet-many/get-wallet-many.schema.input.json"),"/txs/get-wallet-many/get-wallet-many.schema.input.json");l.GetWalletManyTxInput=Hs;u.addSchema(m(zs,"/txs/get-wallet-many/get-wallet-many.schema.output.json"),"/txs/get-wallet-many/get-wallet-many.schema.output.json");l.GetWalletManyTxOutput=zs;u.addSchema(m(Lt,"/txs/import-actions/import-actions.schema.input.json"),"/txs/import-actions/import-actions.schema.input.json");l.ImportActionsTxInput=Lt;var Hc=qc(Lt,"/txs/import-actions/import-actions.schema.input.json");u.addSchema(Hc,"/txs/import-actions/import-actions.schema.options.json");l.ImportActionsTxOptions=Hc;var zc=Bc(Lt,"/txs/import-actions/import-actions.schema.input.json");u.addSchema(zc,"/txs/import-actions/import-actions.schema.chunk.json");l.ImportActionsTxStreamChunk=zc;u.addSchema(m(Ks,"/txs/import-actions/import-actions.schema.output.json"),"/txs/import-actions/import-actions.schema.output.json");l.ImportActionsTxOutput=Ks;u.addSchema(m(Qs,"/txs/import-database/import-database.schema.input.json"),"/txs/import-database/import-database.schema.input.json");l.ImportDatabaseTxInput=Qs;u.addSchema(m(Js,"/txs/import-database/import-database.schema.output.json"),"/txs/import-database/import-database.schema.output.json");l.ImportDatabaseTxOutput=Js;u.addSchema(m(Xs,"/txs/list-database-exports/list-database-exports.schema.input.json"),"/txs/list-database-exports/list-database-exports.schema.input.json");l.ListDatabaseExportsTxInput=Xs;u.addSchema(m(Ys,"/txs/list-database-exports/list-database-exports.schema.output.json"),"/txs/list-database-exports/list-database-exports.schema.output.json");l.ListDatabaseExportsTxOutput=Ys;u.addSchema(m(Zs,"/txs/query/query.schema.input.json"),"/txs/query/query.schema.input.json");l.QueryTxInput=Zs;u.addSchema(m(ei,"/txs/query/query.schema.output.json"),"/txs/query/query.schema.output.json");l.QueryTxOutput=ei;u.addSchema(m(ti,"/txs/query-logs/query-logs.schema.input.json"),"/txs/query-logs/query-logs.schema.input.json");l.QueryLogsTxInput=ti;u.addSchema(m(ri,"/txs/query-logs/query-logs.schema.output.json"),"/txs/query-logs/query-logs.schema.output.json");l.QueryLogsTxOutput=ri;u.addSchema(m(ni,"/txs/reset-database/reset-database.schema.input.json"),"/txs/reset-database/reset-database.schema.input.json");l.ResetDatabaseTxInput=ni;u.addSchema(m(ai,"/txs/reset-database/reset-database.schema.output.json"),"/txs/reset-database/reset-database.schema.output.json");l.ResetDatabaseTxOutput=ai;u.addSchema(m(si,"/txs/reverse-transfer/reverse-transfer.schema.input.json"),"/txs/reverse-transfer/reverse-transfer.schema.input.json");l.ReverseTransferTxInput=si;u.addSchema(m(ii,"/txs/reverse-transfer/reverse-transfer.schema.output.json"),"/txs/reverse-transfer/reverse-transfer.schema.output.json");l.ReverseTransferTxOutput=ii;u.addSchema(m(oi,"/txs/reverse-transfer-group/reverse-transfer-group.schema.input.json"),"/txs/reverse-transfer-group/reverse-transfer-group.schema.input.json");l.ReverseTransferGroupTxInput=oi;u.addSchema(m(pi,"/txs/reverse-transfer-group/reverse-transfer-group.schema.output.json"),"/txs/reverse-transfer-group/reverse-transfer-group.schema.output.json");l.ReverseTransferGroupTxOutput=pi;u.addSchema(m(di,"/txs/reverse-transfer-group-many/reverse-transfer-group-many.schema.input.json"),"/txs/reverse-transfer-group-many/reverse-transfer-group-many.schema.input.json");l.ReverseTransferGroupManyTxInput=di;u.addSchema(m(fi,"/txs/reverse-transfer-group-many/reverse-transfer-group-many.schema.output.json"),"/txs/reverse-transfer-group-many/reverse-transfer-group-many.schema.output.json");l.ReverseTransferGroupManyTxOutput=fi;u.addSchema(m(ui,"/txs/reverse-transfer-many/reverse-transfer-many.schema.input.json"),"/txs/reverse-transfer-many/reverse-transfer-many.schema.input.json");l.ReverseTransferManyTxInput=ui;u.addSchema(m(li,"/txs/reverse-transfer-many/reverse-transfer-many.schema.output.json"),"/txs/reverse-transfer-many/reverse-transfer-many.schema.output.json");l.ReverseTransferManyTxOutput=li;u.addSchema(m(ci,"/txs/set-flags/set-flags.schema.input.json"),"/txs/set-flags/set-flags.schema.input.json");l.SetFlagsTxInput=ci;u.addSchema(m(mi,"/txs/set-flags/set-flags.schema.output.json"),"/txs/set-flags/set-flags.schema.output.json");l.SetFlagsTxOutput=mi;u.addSchema(m(hi,"/txs/start-transaction/start-transaction.schema.input.json"),"/txs/start-transaction/start-transaction.schema.input.json");l.StartTransactionTxInput=hi;u.addSchema(m(_i,"/txs/start-transaction/start-transaction.schema.output.json"),"/txs/start-transaction/start-transaction.schema.output.json");l.StartTransactionTxOutput=_i;u.addSchema(m(gi,"/txs/tx-consts.schema.json"),"/txs/tx-consts.schema.json");l.TxConsts=gi;u.addSchema(m(Ti,"/txs/update-token/update-token.schema.input.json"),"/txs/update-token/update-token.schema.input.json");l.UpdateTokenTxInput=Ti;u.addSchema(m(yi,"/txs/update-token/update-token.schema.output.json"),"/txs/update-token/update-token.schema.output.json");l.UpdateTokenTxOutput=yi;u.addSchema(m(bi,"/txs/update-transfer/update-transfer.schema.input.json"),"/txs/update-transfer/update-transfer.schema.input.json");l.UpdateTransferTxInput=bi;u.addSchema(m(Fi,"/txs/update-transfer/update-transfer.schema.output.json"),"/txs/update-transfer/update-transfer.schema.output.json");l.UpdateTransferTxOutput=Fi;u.addSchema(m(xi,"/txs/update-transfer-group/update-transfer-group.schema.input.json"),"/txs/update-transfer-group/update-transfer-group.schema.input.json");l.UpdateTransferGroupTxInput=xi;u.addSchema(m($i,"/txs/update-transfer-group/update-transfer-group.schema.output.json"),"/txs/update-transfer-group/update-transfer-group.schema.output.json");l.UpdateTransferGroupTxOutput=$i;u.addSchema(m(Oi,"/txs/update-transfer-group-many/update-transfer-group-many.schema.input.json"),"/txs/update-transfer-group-many/update-transfer-group-many.schema.input.json");l.UpdateTransferGroupManyTxInput=Oi;u.addSchema(m(wi,"/txs/update-transfer-group-many/update-transfer-group-many.schema.output.json"),"/txs/update-transfer-group-many/update-transfer-group-many.schema.output.json");l.UpdateTransferGroupManyTxOutput=wi;u.addSchema(m(Ii,"/txs/update-transfer-many/update-transfer-many.schema.input.json"),"/txs/update-transfer-many/update-transfer-many.schema.input.json");l.UpdateTransferManyTxInput=Ii;u.addSchema(m(ji,"/txs/update-transfer-many/update-transfer-many.schema.output.json"),"/txs/update-transfer-many/update-transfer-many.schema.output.json");l.UpdateTransferManyTxOutput=ji;u.addSchema(m(vi,"/txs/update-wallet/update-wallet.schema.input.json"),"/txs/update-wallet/update-wallet.schema.input.json");l.UpdateWalletTxInput=vi;u.addSchema(m(ki,"/txs/update-wallet/update-wallet.schema.output.json"),"/txs/update-wallet/update-wallet.schema.output.json");l.UpdateWalletTxOutput=ki;var U=(c=>(c.JSONRPCRequest="JSONRPCRequest",c.JSONRPCResponse="JSONRPCResponse",c.ClientOptions="ClientOptions",c.Consts="Consts",c.TokenTableInput="TokenTableInput",c.TokenTable="TokenTable",c.TokenTableOptional="TokenTableOptional",c.TransferTableInput="TransferTableInput",c.TransferTable="TransferTable",c.TransferTableOptional="TransferTableOptional",c.TransferGroupTableInput="TransferGroupTableInput",c.TransferGroupTable="TransferGroupTable",c.TransferGroupTableOptional="TransferGroupTableOptional",c.TransferLogTableInput="TransferLogTableInput",c.TransferLogTable="TransferLogTable",c.TransferLogTableOptional="TransferLogTableOptional",c.WalletTableInput="WalletTableInput",c.WalletTable="WalletTable",c.WalletTableOptional="WalletTableOptional",c.WalletTokenSettingTableInput="WalletTokenSettingTableInput",c.WalletTokenSettingTable="WalletTokenSettingTable",c.WalletTokenSettingTableOptional="WalletTokenSettingTableOptional",c.WapiSettingTableInput="WapiSettingTableInput",c.WapiSettingTable="WapiSettingTable",c.WapiSettingTableOptional="WapiSettingTableOptional",c.AggregateTransfersFnInput="AggregateTransfersFnInput",c.AggregateTransfersFnOutput="AggregateTransfersFnOutput",c.CreateAccessTokenFnInput="CreateAccessTokenFnInput",c.CreateAccessTokenFnOutput="CreateAccessTokenFnOutput",c.CreateContractFnInput="CreateContractFnInput",c.CreateContractFnOutput="CreateContractFnOutput",c.CreateDepositFnInput="CreateDepositFnInput",c.CreateDepositFnOutput="CreateDepositFnOutput",c.CreateExchangeFnInput="CreateExchangeFnInput",c.CreateExchangeFnOutput="CreateExchangeFnOutput",c.CreateTokenFnInput="CreateTokenFnInput",c.CreateTokenFnOutput="CreateTokenFnOutput",c.CreateTransferFnInput="CreateTransferFnInput",c.CreateTransferFnOutput="CreateTransferFnOutput",c.CreateTransferGroupFnInput="CreateTransferGroupFnInput",c.CreateTransferGroupFnOutput="CreateTransferGroupFnOutput",c.CreateTransfersFnInput="CreateTransfersFnInput",c.CreateTransfersFnOutput="CreateTransfersFnOutput",c.CreateWalletFnInput="CreateWalletFnInput",c.CreateWalletFnOutput="CreateWalletFnOutput",c.CreateWithdrawalFnInput="CreateWithdrawalFnInput",c.CreateWithdrawalFnOutput="CreateWithdrawalFnOutput",c.FindBalancesFnInput="FindBalancesFnInput",c.FindBalancesFnOutput="FindBalancesFnOutput",c.FindTokensFnInput="FindTokensFnInput",c.FindTokensFnOutput="FindTokensFnOutput",c.FindTransferGroupsFnInput="FindTransferGroupsFnInput",c.FindTransferGroupsFnOutput="FindTransferGroupsFnOutput",c.FindTransfersFnInput="FindTransfersFnInput",c.FindTransfersFnOutput="FindTransfersFnOutput",c.FindWalletsFnInput="FindWalletsFnInput",c.FindWalletsFnOutput="FindWalletsFnOutput",c.FnConsts="FnConsts",c.GetBalanceFnInput="GetBalanceFnInput",c.GetBalanceFnOutput="GetBalanceFnOutput",c.GetBalanceHistoryFnInput="GetBalanceHistoryFnInput",c.GetBalanceHistoryFnOutput="GetBalanceHistoryFnOutput",c.GetFlagsFnInput="GetFlagsFnInput",c.GetFlagsFnOutput="GetFlagsFnOutput",c.GetStatisticsFnInput="GetStatisticsFnInput",c.GetStatisticsFnOutput="GetStatisticsFnOutput",c.GetTokenFnInput="GetTokenFnInput",c.GetTokenFnOutput="GetTokenFnOutput",c.GetTransferFnInput="GetTransferFnInput",c.GetTransferFnOutput="GetTransferFnOutput",c.GetTransferGroupFnInput="GetTransferGroupFnInput",c.GetTransferGroupFnOutput="GetTransferGroupFnOutput",c.GetWalletFnInput="GetWalletFnInput",c.GetWalletFnOutput="GetWalletFnOutput",c.ImportDataFnInput="ImportDataFnInput",c.ImportDataFnOptions="ImportDataFnOptions",c.ImportDataFnStreamChunk="ImportDataFnStreamChunk",c.ImportDataFnOutput="ImportDataFnOutput",c.ReverseTransferFnInput="ReverseTransferFnInput",c.ReverseTransferFnOutput="ReverseTransferFnOutput",c.ReverseTransferGroupFnInput="ReverseTransferGroupFnInput",c.ReverseTransferGroupFnOutput="ReverseTransferGroupFnOutput",c.ReverseTransfersFnInput="ReverseTransfersFnInput",c.ReverseTransfersFnOutput="ReverseTransfersFnOutput",c.SetFlagsFnInput="SetFlagsFnInput",c.SetFlagsFnOutput="SetFlagsFnOutput",c.UpdateTokenFnInput="UpdateTokenFnInput",c.UpdateTokenFnOutput="UpdateTokenFnOutput",c.UpdateTransferFnInput="UpdateTransferFnInput",c.UpdateTransferFnOutput="UpdateTransferFnOutput",c.UpdateTransferGroupFnInput="UpdateTransferGroupFnInput",c.UpdateTransferGroupFnOutput="UpdateTransferGroupFnOutput",c.UpdateTransferGroupsFnInput="UpdateTransferGroupsFnInput",c.UpdateTransferGroupsFnOutput="UpdateTransferGroupsFnOutput",c.UpdateTransfersFnInput="UpdateTransfersFnInput",c.UpdateTransfersFnOutput="UpdateTransfersFnOutput",c.UpdateWalletFnInput="UpdateWalletFnInput",c.UpdateWalletFnOutput="UpdateWalletFnOutput",c.AggregateTransferManyTxInput="AggregateTransferManyTxInput",c.AggregateTransferManyTxOutput="AggregateTransferManyTxOutput",c.AuthenticationCheckTxInput="AuthenticationCheckTxInput",c.AuthenticationCheckTxOutput="AuthenticationCheckTxOutput",c.CreateAccessTokenTxInput="CreateAccessTokenTxInput",c.CreateAccessTokenTxOutput="CreateAccessTokenTxOutput",c.CreateContractTxInput="CreateContractTxInput",c.CreateContractTxOutput="CreateContractTxOutput",c.CreateDepositTxInput="CreateDepositTxInput",c.CreateDepositTxOutput="CreateDepositTxOutput",c.CreateDistributionTxInput="CreateDistributionTxInput",c.CreateDistributionTxOutput="CreateDistributionTxOutput",c.CreateTokenTxInput="CreateTokenTxInput",c.CreateTokenTxOutput="CreateTokenTxOutput",c.CreateTransferTxInput="CreateTransferTxInput",c.CreateTransferTxOutput="CreateTransferTxOutput",c.CreateTransferGroupTxInput="CreateTransferGroupTxInput",c.CreateTransferGroupTxOutput="CreateTransferGroupTxOutput",c.CreateTransferManyTxInput="CreateTransferManyTxInput",c.CreateTransferManyTxOutput="CreateTransferManyTxOutput",c.CreateWalletTxInput="CreateWalletTxInput",c.CreateWalletTxOutput="CreateWalletTxOutput",c.CreateWithdrawalTxInput="CreateWithdrawalTxInput",c.CreateWithdrawalTxOutput="CreateWithdrawalTxOutput",c.ExportDatabaseTxInput="ExportDatabaseTxInput",c.ExportDatabaseTxOutput="ExportDatabaseTxOutput",c.FindBalanceManyTxInput="FindBalanceManyTxInput",c.FindBalanceManyTxOutput="FindBalanceManyTxOutput",c.FindTokenManyTxInput="FindTokenManyTxInput",c.FindTokenManyTxOutput="FindTokenManyTxOutput",c.FindTransferGroupManyTxInput="FindTransferGroupManyTxInput",c.FindTransferGroupManyTxOutput="FindTransferGroupManyTxOutput",c.FindTransferManyTxInput="FindTransferManyTxInput",c.FindTransferManyTxOutput="FindTransferManyTxOutput",c.FindWalletManyTxInput="FindWalletManyTxInput",c.FindWalletManyTxOutput="FindWalletManyTxOutput",c.FinishTransactionTxInput="FinishTransactionTxInput",c.FinishTransactionTxOutput="FinishTransactionTxOutput",c.GetBalanceTxInput="GetBalanceTxInput",c.GetBalanceTxOutput="GetBalanceTxOutput",c.GetBalanceHistoryTxInput="GetBalanceHistoryTxInput",c.GetBalanceHistoryTxOutput="GetBalanceHistoryTxOutput",c.GetDatabaseExportProgressTxInput="GetDatabaseExportProgressTxInput",c.GetDatabaseExportProgressTxOutput="GetDatabaseExportProgressTxOutput",c.GetDatabaseImportProgressTxInput="GetDatabaseImportProgressTxInput",c.GetDatabaseImportProgressTxOutput="GetDatabaseImportProgressTxOutput",c.GetFlagsTxInput="GetFlagsTxInput",c.GetFlagsTxOutput="GetFlagsTxOutput",c.GetStatisticsTxInput="GetStatisticsTxInput",c.GetStatisticsTxOutput="GetStatisticsTxOutput",c.GetTokenTxInput="GetTokenTxInput",c.GetTokenTxOutput="GetTokenTxOutput",c.GetTokenManyTxInput="GetTokenManyTxInput",c.GetTokenManyTxOutput="GetTokenManyTxOutput",c.GetTransferTxInput="GetTransferTxInput",c.GetTransferTxOutput="GetTransferTxOutput",c.GetTransferGroupTxInput="GetTransferGroupTxInput",c.GetTransferGroupTxOutput="GetTransferGroupTxOutput",c.GetWalletTxInput="GetWalletTxInput",c.GetWalletTxOutput="GetWalletTxOutput",c.GetWalletManyTxInput="GetWalletManyTxInput",c.GetWalletManyTxOutput="GetWalletManyTxOutput",c.ImportActionsTxInput="ImportActionsTxInput",c.ImportActionsTxOptions="ImportActionsTxOptions",c.ImportActionsTxStreamChunk="ImportActionsTxStreamChunk",c.ImportActionsTxOutput="ImportActionsTxOutput",c.ImportDatabaseTxInput="ImportDatabaseTxInput",c.ImportDatabaseTxOutput="ImportDatabaseTxOutput",c.ListDatabaseExportsTxInput="ListDatabaseExportsTxInput",c.ListDatabaseExportsTxOutput="ListDatabaseExportsTxOutput",c.QueryTxInput="QueryTxInput",c.QueryTxOutput="QueryTxOutput",c.QueryLogsTxInput="QueryLogsTxInput",c.QueryLogsTxOutput="QueryLogsTxOutput",c.ResetDatabaseTxInput="ResetDatabaseTxInput",c.ResetDatabaseTxOutput="ResetDatabaseTxOutput",c.ReverseTransferTxInput="ReverseTransferTxInput",c.ReverseTransferTxOutput="ReverseTransferTxOutput",c.ReverseTransferGroupTxInput="ReverseTransferGroupTxInput",c.ReverseTransferGroupTxOutput="ReverseTransferGroupTxOutput",c.ReverseTransferGroupManyTxInput="ReverseTransferGroupManyTxInput",c.ReverseTransferGroupManyTxOutput="ReverseTransferGroupManyTxOutput",c.ReverseTransferManyTxInput="ReverseTransferManyTxInput",c.ReverseTransferManyTxOutput="ReverseTransferManyTxOutput",c.SetFlagsTxInput="SetFlagsTxInput",c.SetFlagsTxOutput="SetFlagsTxOutput",c.StartTransactionTxInput="StartTransactionTxInput",c.StartTransactionTxOutput="StartTransactionTxOutput",c.TxConsts="TxConsts",c.UpdateTokenTxInput="UpdateTokenTxInput",c.UpdateTokenTxOutput="UpdateTokenTxOutput",c.UpdateTransferTxInput="UpdateTransferTxInput",c.UpdateTransferTxOutput="UpdateTransferTxOutput",c.UpdateTransferGroupTxInput="UpdateTransferGroupTxInput",c.UpdateTransferGroupTxOutput="UpdateTransferGroupTxOutput",c.UpdateTransferGroupManyTxInput="UpdateTransferGroupManyTxInput",c.UpdateTransferGroupManyTxOutput="UpdateTransferGroupManyTxOutput",c.UpdateTransferManyTxInput="UpdateTransferManyTxInput",c.UpdateTransferManyTxOutput="UpdateTransferManyTxOutput",c.UpdateWalletTxInput="UpdateWalletTxInput",c.UpdateWalletTxOutput="UpdateWalletTxOutput",c))(U||{}),Si={ajv:u,createValidator(r){let e=u.compile(r);return Ac(e)},getValidator(r){let e=u.getSchema(r);return Ac(e)},getSchema(r){return l[r]},Schemas:l,SchemaNames:U},CD=Si.createValidator,y=Si.getValidator;var Ci=(i=>(i.year="year",i.month="month",i.week="week",i.day="day",i.hour="hour",i.minute="minute",i))(Ci||{}),Id=(i=>(i.count="count",i.countDistinct="countDistinct",i.sum="sum",i.average="average",i.min="min",i.max="max",i))(Id||{}),jd=(a=>(a.keep="keep",a.random="random",a.largest="largest",a.target="target",a))(jd||{}),vd=(t=>(t.replace="replace",t.extend="extend",t))(vd||{}),kd=(i=>(i.replace="replace",i.replace_create_only="replace_create_only",i.replace_cancel_only="replace_cancel_only",i.extend="extend",i.extend_create_only="extend_create_only",i.extend_cancel_only="extend_cancel_only",i))(kd||{});var S$=y("AggregateTransferManyTxInput");var C$=y("AuthenticationCheckTxInput");var P$=y("CreateAccessTokenTxInput");var G$=y("CreateContractTxInput");var D$=y("CreateDepositTxInput");var E$=y("CreateDistributionTxInput");var R$=y("CreateTokenTxInput");var M$=y("CreateTransferTxInput");var W$=y("CreateTransferGroupTxInput");var A$=y("CreateTransferManyTxInput");var N$=y("CreateWalletTxInput");var U$=y("CreateWithdrawalTxInput");var q$=y("ExportDatabaseTxInput");var B$=y("FindBalanceManyTxInput");var L$=y("FindTokenManyTxInput");var V$=y("FindTransferGroupManyTxInput");var H$=y("FindTransferManyTxInput");var z$=y("FindWalletManyTxInput");var K$=y("FinishTransactionTxInput");var Q$=y("GetBalanceTxInput");var J$=y("GetBalanceHistoryTxInput");var X$=y("GetDatabaseExportProgressTxInput");var Y$=y("GetDatabaseImportProgressTxInput");var Z$=y("GetFlagsTxInput");var eO=y("GetStatisticsTxInput");var tO=y("GetTokenTxInput");var rO=y("GetTokenManyTxInput");var nO=y("GetTransferTxInput");var aO=y("GetTransferGroupTxInput");var sO=y("GetWalletTxInput");var iO=y("GetWalletManyTxInput");var oO=y("ImportActionsTxInput");var pO=y("ImportDatabaseTxInput");var dO=y("ListDatabaseExportsTxInput");var fO=y("QueryTxInput");var uO=y("QueryLogsTxInput");var lO=y("ResetDatabaseTxInput");var cO=y("ReverseTransferTxInput");var mO=y("ReverseTransferGroupTxInput");var hO=y("ReverseTransferGroupManyTxInput");var _O=y("ReverseTransferManyTxInput");var gO=y("SetFlagsTxInput");var TO=y("StartTransactionTxInput");var yO=y("UpdateTokenTxInput");var bO=y("UpdateTransferTxInput");var FO=y("UpdateTransferGroupTxInput");var xO=y("UpdateTransferGroupManyTxInput");var $O=y("UpdateTransferManyTxInput");var OO=y("UpdateWalletTxInput"),Sd={aggregateTransferMany:S$,authenticationCheck:C$,createAccessToken:P$,createContract:G$,createDeposit:D$,createDistribution:E$,createToken:R$,createTransfer:M$,createTransferGroup:W$,createTransferMany:A$,createWallet:N$,createWithdrawal:U$,exportDatabase:q$,findBalanceMany:B$,findTokenMany:L$,findTransferGroupMany:V$,findTransferMany:H$,findWalletMany:z$,finishTransaction:K$,getBalance:Q$,getBalanceHistory:J$,getDatabaseExportProgress:X$,getDatabaseImportProgress:Y$,getFlags:Z$,getStatistics:eO,getToken:tO,getTokenMany:rO,getTransfer:nO,getTransferGroup:aO,getWallet:sO,getWalletMany:iO,importActions:oO,importDatabase:pO,listDatabaseExports:dO,query:fO,queryLogs:uO,resetDatabase:lO,reverseTransfer:cO,reverseTransferGroup:mO,reverseTransferGroupMany:hO,reverseTransferMany:_O,setFlags:gO,startTransaction:TO,updateToken:yO,updateTransfer:bO,updateTransferGroup:FO,updateTransferGroupMany:xO,updateTransferMany:$O,updateWallet:OO},Cd=(E=>(E.aggregateTransferMany="aggregateTransferMany",E.authenticationCheck="authenticationCheck",E.createAccessToken="createAccessToken",E.createContract="createContract",E.createDeposit="createDeposit",E.createDistribution="createDistribution",E.createToken="createToken",E.createTransfer="createTransfer",E.createTransferGroup="createTransferGroup",E.createTransferMany="createTransferMany",E.createWallet="createWallet",E.createWithdrawal="createWithdrawal",E.exportDatabase="exportDatabase",E.findBalanceMany="findBalanceMany",E.findTokenMany="findTokenMany",E.findTransferGroupMany="findTransferGroupMany",E.findTransferMany="findTransferMany",E.findWalletMany="findWalletMany",E.finishTransaction="finishTransaction",E.getBalance="getBalance",E.getBalanceHistory="getBalanceHistory",E.getDatabaseExportProgress="getDatabaseExportProgress",E.getDatabaseImportProgress="getDatabaseImportProgress",E.getFlags="getFlags",E.getStatistics="getStatistics",E.getToken="getToken",E.getTokenMany="getTokenMany",E.getTransfer="getTransfer",E.getTransferGroup="getTransferGroup",E.getWallet="getWallet",E.getWalletMany="getWalletMany",E.importActions="importActions",E.importDatabase="importDatabase",E.listDatabaseExports="listDatabaseExports",E.query="query",E.queryLogs="queryLogs",E.resetDatabase="resetDatabase",E.reverseTransfer="reverseTransfer",E.reverseTransferGroup="reverseTransferGroup",E.reverseTransferGroupMany="reverseTransferGroupMany",E.reverseTransferMany="reverseTransferMany",E.setFlags="setFlags",E.startTransaction="startTransaction",E.updateToken="updateToken",E.updateTransfer="updateTransfer",E.updateTransferGroup="updateTransferGroup",E.updateTransferGroupMany="updateTransferGroupMany",E.updateTransferMany="updateTransferMany",E.updateWallet="updateWallet",E))(Cd||{});var wO=y("ImportActionsTxInput");function Kc(r){let{error:e}=wO(r);return e===void 0}var S0=y("ImportActionsTxOutput");var C0=y("ImportActionsTxStreamChunk");var IO=y("ImportActionsTxOptions");function Qc(r){let{error:e}=IO(r);return e===void 0}var _r=class{constructor(e,t,n){this.isConnected=!1;this.hooks=new Proxy({},{set(e,t,n){if(typeof n!="function")throw new TypeError("Hooks can only be functions");return e[t]=n,!0}});this._requests=new Map;this._error=!1;this._sending=new Set;this.type=t,this._connection=e,this.connectionType=t,this.$connect=n}_setConnected(e){this.isConnected=e,this.isConnected&&this._error!==!1&&(this._error=!1),this.isConnected&&this.hooks.connected&&this.hooks.connected(this.socId),!this.isConnected&&this.hooks.disconnected&&this.hooks.disconnected()}_setErrored(e){this._error=e,this.isConnected&&this._setConnected(!1)}_send(e){throw new Error("This method must be implemented by child class")}_reconnect(){throw new Error("This method must be implemented by child class")}close(){return _e(this,null,function*(){throw new Error("This method must be implemented by child class")})}_connectionLost(){this._requests.forEach((e,t)=>{"stream"in e&&e.stream.destroy(new Sr({message:"connection lost"})),this._requests.delete(t)}),this.socId=void 0}_handleMessage(e){var o,d,g;if(this.hooks.message&&this.hooks.message(e),"method"in e){let h=e;if(h.method==="ping"){this._send({jsonrpc:"2.0",result:"pong",id:h.id});return}ie("Unexpected JSONRPCRequest",e);return}let t=e;if(this.hooks.message&&this.hooks.message(t),t.id===null){ie("Unexpected JSONRPCResponse",e);return}if(t.result==="ack"){this._sending.delete(t.id);return}let n=this._requests.get(t.id);if(!n){ie("No Request found for incoming",e);return}if("handle"in n){n.handle(t),delete n.handle;return}t.error&&"error"in n&&n.error(t.error);let a=t;if(((o=a.result)==null?void 0:o.type)==="streamPause"&&"pause"in n){n.pause();return}if(((d=a.result)==null?void 0:d.type)==="streamResume"&&"resume"in n){n.resume();return}let{stream:s,start:i}=n;if(((g=a.result)==null?void 0:g.type)==="streamChunk"){s.push(a.result);return}s.push(a),s.push(null),this._requests.delete(a.id),this.connectionType==="ws"&&this._send({jsonrpc:"2.0",method:"ack",params:Date.now()-i,id:a.id})}_sendTransaction(e,t){let{isValid:n,inputCopy:a,error:s}=Sd[e](t);if(!n)throw s;let i={jsonrpc:"2.0",method:e,params:a,id:Ct()};return this.hooks.preflight&&this.hooks.preflight(i)===!1?new mt:new mt(o=>_e(this,null,function*(){this._error&&this._reconnect(),this.isConnected||(yield this.$connect),this._requests.set(i.id,{stream:o,start:Date.now()}),this._sending.add(i.id),this._send(i)}))}_streamTransaction(e,t,n,a){let s=Date.now(),i=Ct(),o,d=({method:w,params:b})=>{if(o)return;let $={jsonrpc:"2.0",method:w,params:P({streamId:i},b),id:Ct()};this._sending.add($.id),this._send($)},g=(w,b)=>{o||(d({method:"streamError",params:{error:b}}),o=b,w.push({error:b}))},h=new Ui,T=a?h.pipe(a):h,O={jsonrpc:"2.0",method:"streamStart",params:{method:e,options:n},id:i};return this.hooks.preflight&&this.hooks.preflight(O)===!1?new Er:new Er(w=>_e(this,null,function*(){this._error&&this._reconnect(),this.isConnected||(yield this.$connect);let b=setTimeout(()=>{w.push({error:new oe({message:"INPUT_STREAM_TIMEOUT"})})},3e4);this._requests.set(O.id,{stream:w,start:s,error($){o=$,ie("stream:error()>",$)},pause(){h.pause()},resume(){h.resume()},handle($){if($.error){w.push($);return}T.on("data",I=>{if(!o){if(b&&(clearTimeout(b),b=null),!t(I)){g(w,new Me({message:"INPUT_INVALID",data:I}));return}d({method:"streamData",params:{data:I}})}}).on("error",I=>{o||(b&&(clearTimeout(b),b=null),d({method:"streamError",params:{error:I}}),w.push({error:new oe({message:"INPUT_STREAM_ERROR",data:I})}))}).on("end",()=>{b&&(clearTimeout(b),b=null),d({method:"streamEnd",params:{}})})}}),this._sending.add(O.id),this._send(O)}),h)}aggregateTransferMany(e){return this._sendTransaction("aggregateTransferMany",e)}authenticationCheck(e){return this._sendTransaction("authenticationCheck",e)}createAccessToken(e){return this._sendTransaction("createAccessToken",e)}createContract(e){return this._sendTransaction("createContract",e)}createDeposit(e){return this._sendTransaction("createDeposit",e)}createDistribution(e){return this._sendTransaction("createDistribution",e)}createToken(e){return this._sendTransaction("createToken",e)}createTransfer(e){return this._sendTransaction("createTransfer",e)}createTransferGroup(e){return this._sendTransaction("createTransferGroup",e)}createTransferMany(e){return this._sendTransaction("createTransferMany",e)}createWallet(e){return this._sendTransaction("createWallet",e)}createWithdrawal(e){return this._sendTransaction("createWithdrawal",e)}exportDatabase(e){return this._sendTransaction("exportDatabase",e)}findBalanceMany(e){return this._sendTransaction("findBalanceMany",e)}findTokenMany(e){return this._sendTransaction("findTokenMany",e)}findTransferGroupMany(e){return this._sendTransaction("findTransferGroupMany",e)}findTransferMany(e){return this._sendTransaction("findTransferMany",e)}findWalletMany(e){return this._sendTransaction("findWalletMany",e)}finishTransaction(e){return this._sendTransaction("finishTransaction",e)}getBalance(e){return this._sendTransaction("getBalance",e)}getBalanceHistory(e){return this._sendTransaction("getBalanceHistory",e)}getDatabaseExportProgress(e){return this._sendTransaction("getDatabaseExportProgress",e)}getDatabaseImportProgress(e){return this._sendTransaction("getDatabaseImportProgress",e)}getFlags(e){return this._sendTransaction("getFlags",e)}getStatistics(e){return this._sendTransaction("getStatistics",e)}getToken(e){return this._sendTransaction("getToken",e)}getTokenMany(e){return this._sendTransaction("getTokenMany",e)}getTransfer(e){return this._sendTransaction("getTransfer",e)}getTransferGroup(e){return this._sendTransaction("getTransferGroup",e)}getWallet(e){return this._sendTransaction("getWallet",e)}getWalletMany(e){return this._sendTransaction("getWalletMany",e)}importActions(e){return this._sendTransaction("importActions",e)}importActionsStream(e,t){if(e!==void 0&&!Qc(e))throw new Me({message:"INPUT_INVALID",data:e});return this._streamTransaction("importActions",Kc,e,t)}importDatabase(e){return this._sendTransaction("importDatabase",e)}listDatabaseExports(e){return this._sendTransaction("listDatabaseExports",e)}query(e){return this._sendTransaction("query",e)}queryLogs(e){return this._sendTransaction("queryLogs",e)}resetDatabase(e){return this._sendTransaction("resetDatabase",e)}reverseTransfer(e){return this._sendTransaction("reverseTransfer",e)}reverseTransferGroup(e){return this._sendTransaction("reverseTransferGroup",e)}reverseTransferGroupMany(e){return this._sendTransaction("reverseTransferGroupMany",e)}reverseTransferMany(e){return this._sendTransaction("reverseTransferMany",e)}setFlags(e){return this._sendTransaction("setFlags",e)}startTransaction(e){return this._sendTransaction("startTransaction",e)}updateToken(e){return this._sendTransaction("updateToken",e)}updateTransfer(e){return this._sendTransaction("updateTransfer",e)}updateTransferGroup(e){return this._sendTransaction("updateTransferGroup",e)}updateTransferGroupMany(e){return this._sendTransaction("updateTransferGroupMany",e)}updateTransferMany(e){return this._sendTransaction("updateTransferMany",e)}updateWallet(e){return this._sendTransaction("updateWallet",e)}};var Jc,jO=(Jc=window.WAPI_VERSION)!=null?Jc:"";function Gd(r){let e=Xc(r);return new Pd(e,r)}function Xc(r){var w;let e=Object.assign({rejectUnauthorized:(w=r.rejectUnauthorized)!=null?w:!0,clientVersion:jO},r),t=yu(e),n=new lu(...t),a,s,i=!1,o;n.onclose=d,n.onerror=g,n.onmessage=h;function d(b){if(ie(`createConnection>close(reason:${b.reason},code:${b.code},wasClean:${b.wasClean})`),b.code===4030)return T(new Pr({message:"AUTHENTICATION_FAILED",code:"AuthenticationError"}));T(new Error("WS closed"))}function g(b){ie(`createConnection>error(message:${b.message},error:${b.error},type:${b.type})`),T(b.error)}function h(b){ie(`createConnection>message(type:${b.type},data:${b.data})`);let{data:$}=b,I;try{I=JSON.parse($.toString())}catch(j){return ie("Invalid JSON response",j),T(new Error("Invalid JSON response"))}if(I.result!=="ready")return ie("Invalid first message"),T(new Error("Invalid first message - "+JSON.stringify(I)));T()}function T(b){i||(delete n.onmessage,delete n.onerror,delete n.onclose,b?(s(b),n.close()):a(o),i=!0)}let O=new Promise((b,$)=>{a=b,s=$});return{ws:n,$connect:O}}var Pd=class extends _r{constructor(t,n){super(t.ws,"ws",t.$connect);this._tryToReconnect=!0;this._config=n,this.$connect.then(a=>(this.socId=a,this._ready())).catch(a=>{this.socId||this._setErrored(a)})}_setErrored(t){super._setErrored(t),t.hasOwnProperty("code")&&t.code==="AuthenticationError"&&(this._tryToReconnect=!1)}_ready(){this._setConnected(!0),this._connection.onmessage=t=>{let{data:n,type:a}=t;if(ie(`message(type:${a},data:${n})`),a==="message"){let s=JSON.parse(n.toString());this._handleMessage(s),this._heartbeat()}},this._connection.onerror=t=>{let{message:n,error:a,type:s}=t;ie(`error(message:${n},error:${a},type:${s})`)},this._connection.onclose=t=>{let{reason:n,code:a,wasClean:s}=t;ie(`close(reason:${n},code:${a},wasClean:${s})`),this._setConnected(!1),clearTimeout(this._pingTimeout),this._connectionLost(),this._reconnect()},this._heartbeat()}_reconnect(){if(ie("reconnect(),tryToReconnect:",this._tryToReconnect),!this._tryToReconnect)return;if(this.hooks.reconnect&&!this.hooks.reconnect()){ie("reconnect hook returned false");return}let t=window.WAPI_RECONNECT_ATTEMPTS&&parseInt(window.WAPI_RECONNECT_ATTEMPTS)||10,n=window.WAPI_MAX_RECONNECT_WAIT&&parseInt(window.WAPI_MAX_RECONNECT_WAIT)||1e4;this.$connect=_e(this,null,function*(){let a;for(let s=0;s<t+1;s++)try{ie("Trying to connect, attempt:",s);let{ws:i,$connect:o}=Xc(this._config);a=yield o,this.socId=a,this._connection=i,this._ready();break}catch(i){if(i.code==="AuthenticationError"||s>t-1)throw i;yield _u(Math.min(Math.pow(1.5,s)*1e3,n))}return a})}_heartbeat(){ie("heartbeat"),clearTimeout(this._pingTimeout),this._pingTimeout=setTimeout(()=>{if(this._sending.size)return ie("pingTimeout reached, but sending.size:",this._sending.size),this._heartbeat();ie("timeout"),this._connection.close(),this._setConnected(!1),this._reconnect()},31e3)}_send(t){ie("send()",t),this._connection.send(JSON.stringify(t))}close(){return _e(this,null,function*(){return ie("close()"),this._tryToReconnect=!1,clearTimeout(this._pingTimeout),this._setConnected(!1),this._connection.close()})}};var Dd=typeof globalThis!="undefined"&&globalThis||typeof self!="undefined"&&self||typeof Dd!="undefined"&&Dd,Ed=Dd.fetch;function Md(r){let e=vO(r);return new Rd(e,r)}function vO(r){let e=r.host.replace(/^wss:/,"https:");function t(s){return _e(this,null,function*(){ie(`http_createConnection>message(body:${s})`)})}function n(s,i){return _e(this,null,function*(){let o=JSON.parse(s),g=yield(yield Ed(`${r.host}/api`,{keepalive:!0,method:"POST",headers:{Authorization:`Bearer ${i}`},body:s})).json();this.onmessage(Z(P({},g),{id:o.id}))})}let a=Ed(`${e}/api`,{method:"POST",headers:{Authorization:`Bearer ${r.jwt}`},body:JSON.stringify({jsonrpc:"2.0",method:"authenticationCheck",params:{},id:Ct()})}).then(s=>s.json()).then(s=>{if(s.error)throw new Error(s.error.message)});return{send:n,onmessage:t,$connect:a}}var Rd=class extends _r{constructor(e,t){super(e,"https",e.$connect),this.jwt=t.jwt,this.$connect.then(()=>{this._ready()}).catch(n=>{this._setErrored(n)})}_send(e){ie("send()",e),this._connection.send(JSON.stringify(e),this.jwt)}_ready(){this._setConnected(!0),this._connection.onmessage=e=>_e(this,null,function*(){ie(`http_message(data:${e})`),this._handleMessage(e)})}close(){return _e(this,null,function*(){ie("close()"),this._setConnected(!1)})}_reconnect(){return _e(this,null,function*(){ie("reconnect()")})}};var Ad=class r{constructor(e){this.filter=[];this.modifierFn=e}add(e){return this.filter.push(e),this}addWhere(e,t,n,a){if(typeof t=="object"){let s={};for(let[i,o]of Object.entries(t))s[i]=this.modifierFn?this.modifierFn(i,o):o;return this.add({function:e,value:s})}if(typeof t=="function"){let s=new r(this.modifierFn);return t.call(s,s),this.add({function:e,inner:s.toJSON().filter})}if(a!==void 0)return this.add({function:e,field:t,operator:n,value:a});if(typeof n=="object")return this.add({function:e,value:{[t]:n}});if(n!==void 0){let s=this.modifierFn?this.modifierFn(t,n):n;return this.add({function:e,field:t,value:s})}throw TypeError("Invalid input")}where(e,t,n){return this.addWhere("where",e,t,n)}orWhere(e,t,n){return this.addWhere("orWhere",e,t,n)}whereIn(e,t){return this.add({function:"whereIn",field:e,value:t})}orWhereIn(e,t){return this.add({function:"orWhereIn",field:e,value:t})}whereNull(e){return this.add({function:"whereNull",field:e})}orWhereNull(e){return this.add({function:"orWhereNull",field:e})}whereNotNull(e){return this.add({function:"whereNotNull",field:e})}orWhereNotNull(e){return this.add({function:"orWhereNotNull",field:e})}whereMetadata(e,t,n){return n===void 0?this.add({function:"whereMetadata",field:e,operator:"=",value:t}):this.add({function:"whereMetadata",field:e,operator:t,value:n})}orWhereMetadata(e,t,n){return n===void 0?this.add({function:"orWhereMetadata",field:e,operator:"=",value:t}):this.add({function:"orWhereMetadata",field:e,operator:t,value:n})}whereMetadataIn(e,t){return this.add({function:"whereMetadataIn",field:e,value:t})}orWhereMetadataIn(e,t){return this.add({function:"orWhereMetadataIn",field:e,value:t})}whereMetadataNull(e){return this.add({function:"whereMetadataNull",field:e})}orWhereMetadataNull(e){return this.add({function:"orWhereMetadataNull",field:e})}whereMetadataNotNull(e){return this.add({function:"whereMetadataNotNull",field:e})}orWhereMetadataNotNull(e){return this.add({function:"orWhereMetadataNotNull",field:e})}toJSON(){return{filter:JSON.parse(JSON.stringify(this.filter))}}};function Wd(r){return r.map(e=>{if(typeof e=="string"){if(e.includes(" "))throw new TypeError("invalid order option: "+e);return{field:e,direction:"asc"}}return{field:e.column,direction:e.order,nulls:e.nulls}})}var Tr=class extends Ad{constructor({start:t,modifiers:n,optionsModifiers:a}){super(n);this.optionsObject={};this.execFn=t,this.optionsModifiers=a}start(){return this.execFn(this.toJSON())}toJSON(){return Z(P({},super.toJSON()),{options:P({},this.optionsObject)})}options(t){if(this.optionsModifiers===void 0)return this.optionsObject=P(P({},this.optionsObject),t),this;this.optionsObject=P({},this.optionsObject);for(let[n,a]of Object.entries(t))this.optionsObject[n]=this.optionsModifiers(n,a);return this}then(t,n){return this.start().then(t,n)}catch(t){return this.start().catch(t)}stream(){return this.start().stream()}},De=class extends Tr{constructor({start:e,modifiers:t,optionsModifiers:n}){super({start:a=>e(a),modifiers:t,optionsModifiers:n})}limit(e){return this.optionsObject.limit=e,this}offset(e){return this.optionsObject.offset=e,this}orderBy(e,t,n){if(!Array.isArray(e)&&typeof e!="string")throw new TypeError("invalid input");if(Array.isArray(e))return this.optionsObject.order=Wd(e),this;if(!e.includes(" "))return this.optionsObject.order=Wd([{column:e,order:t||"asc",nulls:n}]),this;let[a,s,i,o]=e.split(" ");if(s!=="asc"&&s!=="desc")throw new TypeError("invalid order");let d={column:a,order:s};if(i==="nulls"){if(!["first","last"].includes(o))throw new TypeError("invalid nulls order");d.nulls=o}return this.optionsObject.order=Wd([e]),this}select(...e){return this.optionsObject.select=e,this}deselect(...e){return this.optionsObject.deselect=e,this}};function gr(r,e){if(!e)return{function:r,alias:r};if(!e.includes(" "))return{function:r,field:e,alias:r};if(!e.includes(" as "))throw new oe({message:"Invalid Aggregator"});let[t,n]=e.split(" as ");return{function:r,field:t,alias:n||t}}var Fo=class extends Tr{constructor({start:t,modifiers:n,optionsModifiers:a}){super({start:s=>t(s),modifiers:n,optionsModifiers:a});this.aggregatorObject={aggregators:[]};this.timezoneString=""}toJSON(){return Z(P({},super.toJSON()),{aggregators:JSON.parse(JSON.stringify(this.aggregatorObject.aggregators)),groups:JSON.parse(JSON.stringify(this.aggregatorObject.groups||[]))})}timezone(t){return this.timezoneString=t,this.aggregatorObject.groups&&Array.isArray(this.aggregatorObject.groups)&&this.aggregatorObject.groups.forEach(n=>{n.type==="period"&&(n.field={period:n.field,timezone:t})}),this}groupBy(t,...n){let a={};if(typeof t!="string")throw new TypeError("expected string as input, got"+typeof t);let[s,i]=t.split(" as ");if(Ci.hasOwnProperty(s))a.type="period",a.alias=i||s,this.timezoneString?a.field={period:s,timezone:this.timezoneString}:a.field=s;else if(s.startsWith("metadata.")){let[,o]=s.split(".");a.type="metadata_field",a.field=o,a.alias=i||o}else a.type="field",a.field=s,a.alias=i||s;return this.aggregatorObject.groups?this.aggregatorObject.groups.push(a):this.aggregatorObject.groups=[a],n.length&&n.forEach(o=>this.groupBy(o)),this}count(t){return this.aggregatorObject.aggregators.push(gr("count",t)),this}distinct(t){return this.aggregatorObject.aggregators.push(gr("countDistinct",t)),this}avg(t){return this.aggregatorObject.aggregators.push(gr("average",t)),this}min(t){return this.aggregatorObject.aggregators.push(gr("min",t)),this}max(t){return this.aggregatorObject.aggregators.push(gr("max",t)),this}sum(t){return this.aggregatorObject.aggregators.push(gr("sum",t)),this}},yr=class extends Tr{constructor({start:t,modifiers:n,optionsModifiers:a}){super({start:t,modifiers:n,optionsModifiers:a});this.updateObject={}}toJSON(){return Z(P({},super.toJSON()),{update:JSON.parse(JSON.stringify(this.updateObject))})}update(t){return this.updateObject=Object.assign(this.updateObject,t),this}},xo=class extends Tr{constructor({start:t,modifiers:n,optionsModifiers:a}){super({start:t,modifiers:n,optionsModifiers:a});this.reverseModifications={}}toJSON(){return Z(P({},super.toJSON()),{reverse:JSON.parse(JSON.stringify(this.reverseModifications))})}reverse(t){return this.reverseModifications=Object.assign(this.reverseModifications,t),this}};var kO=y("AggregateTransfersFnInput");function Nd(r,e,t){let{client:n}=r;if(e===void 0)return new Fo({start(b){return n.api.aggregateTransferMany({transfer:b.filter,options:b.options,groups:b.groups,aggregators:b.aggregators})},modifiers(b,$){return["token","wallet","from_wallet","to_wallet"].includes(b)?v($):b==="transfer_group"?K($):$}});let{inputCopy:a,error:s}=C({input:e,options:t,validate:kO});if(s)throw s;let{token:i,wallet:o,from_wallet:d,to_wallet:g,transfer_group:h,status:T,metadata:O}=a,w={token:v(i),wallet:v(o),from_wallet:v(d),to_wallet:v(g),transfer_group:K(h),status:T,metadata:O};return n.api.aggregateTransferMany({transfer:w,groups:a.groups,aggregators:a.aggregators})}var SO=y("CreateAccessTokenFnInput");function Ud(r,e,t){let{client:n}=r,{inputCopy:a,error:s}=C({input:e,options:t,validate:SO});if(s)throw s;return n.api.createAccessToken({token:a.token,options:r})}var CO=y("CreateContractFnInput");function qd(r,e,t){let{client:n}=r,{inputCopy:a,error:s}=C({input:e,options:t,validate:CO});if(s)throw s;let i={token:{foreign:a.foreign+"",metadata:a.metadata,owner:v(a.owner),deposits:[{token:v(a.value_token),amount:a.value_amount}]}};return a.buyer&&(a.buyer.latest_control_hash&&console.warn("deprecated: latest_control_hash is deprecated and will be ignored"),i.exchange={from_wallet:v(a.buyer.wallet),amount:a.buyer.amount||a.value_amount,from_token:v(a.buyer.token||a.value_token),metadata:a.buyer.metadata}),n.api.createContract(i)}var PO=y("CreateDepositFnInput");function Bd(r,e,t){let{client:n}=r,a=at(e,"token",n.getConfig("token")),{inputCopy:s,error:i}=C({input:a,options:t,validate:PO});if(i)throw i;let o=s.token||n.getConfig("token");if(o===void 0)throw new oe({message:"INPUT_NEEDS_TOKEN",data:e});let d=s.options;delete s.options;let g=Z(P({},s),{identifier:s.identifier,transfer_group:K(s.transfer_group),token:v(o),to_wallet:v(s.wallet),type:"deposit"});return g.identifier||(g.identifier=je(g)),n.api.createTransfer({transfer:g,options:Ni(d,{return_balance:"return_to_balance",create_wallet_if_not_exists:"create_to_wallet_if_not_exists"})})}var Ld=(t=>(t.whereMetadata="whereMetadata",t.orWhereMetadata="orWhereMetadata",t))(Ld||{}),Vd=(t=>(t.where="where",t.orWhere="orWhere",t))(Vd||{}),Hd=(t=>(t.whereIn="whereIn",t.orWhereIn="orWhereIn",t))(Hd||{}),zd=(t=>(t.whereMetadataIn="whereMetadataIn",t.orWhereMetadataIn="orWhereMetadataIn",t))(zd||{}),Kd=(a=>(a.whereMetadataNull="whereMetadataNull",a.orWhereMetadataNull="orWhereMetadataNull",a.whereMetadataNotNull="whereMetadataNotNull",a.orWhereMetadataNotNull="orWhereMetadataNotNull",a))(Kd||{}),Qd=(a=>(a.whereNull="whereNull",a.orWhereNull="orWhereNull",a.whereNotNull="whereNotNull",a.orWhereNotNull="orWhereNotNull",a))(Qd||{}),Jd=(r=>(r["="]="=",r[">="]=">=",r["<="]="<=",r["<"]="<",r[">"]=">",r))(Jd||{}),Xd=(t=>(t.like="like",t.ilike="ilike",t))(Xd||{}),Yd=(t=>(t["="]="=",t[">="]=">=",t["<="]="<=",t["<"]="<",t[">"]=">",t.like="like",t.ilike="ilike",t))(Yd||{}),Zd=(a=>(a.value="value",a.share="share",a.group="group",a.contract="contract",a))(Zd||{}),ef=(t=>(t.active="active",t["dw-only"]="dw-only",t.disabled="disabled",t))(ef||{}),tf=(t=>(t.open="open",t.closed="closed",t))(tf||{}),rf=(n=>(n.pending="pending",n.finished="finished",n.cancelled="cancelled",n))(rf||{}),nf=(t=>(t.pending="pending",t.finished="finished",t))(nf||{}),af=(n=>(n.regular="regular",n.exchange="exchange",n.distribution="distribution",n))(af||{}),sf=(n=>(n.transfer="transfer",n.deposit="deposit",n.withdrawal="withdrawal",n))(sf||{}),of=(n=>(n.token="token",n.house="house",n.regular="regular",n))(of||{}),pf=(t=>(t.active="active",t.disabled="disabled",t))(pf||{}),df=(t=>(t.flag="flag",t.setting="setting",t))(df||{}),ff=(o=>(o.Token="Token",o.TransferGroup="TransferGroup",o.TransferLog="TransferLog",o.Transfer="Transfer",o.WalletTokenSetting="WalletTokenSetting",o.Wallet="Wallet",o.WapiSetting="WapiSetting",o))(ff||{});var GO=y("CreateExchangeFnInput");function uf(r,e,t){var o,d,g,h,T;let{client:n}=r,{inputCopy:a,error:s}=C({input:e,options:t,validate:GO});if(s)throw s;let i=a.options;return delete a.options,(o=a.identifier)!=null||(a.identifier=je(a)),n.api.createTransferGroup({transfer_group:{identifier:a.identifier,status:"closed",transfer_status:(d=a.status)!=null?d:"pending",metadata:a.metadata,children:[{identifier:(g=a.from_identifier)!=null?g:je(),from_wallet:v(a.from_wallet),to_wallet:v(a.to_wallet),token:v(a.from_token),type:a.from_wallet?"transfer":"deposit",amount:a.from_amount,metadata:a.metadata,force:a.force},{identifier:(h=a.to_identifier)!=null?h:je(),from_wallet:v(a.to_wallet),to_wallet:v(a.from_wallet),token:v(a.to_token),type:a.to_wallet?"transfer":"deposit",amount:(T=a.to_amount)!=null?T:a.from_amount,metadata:a.metadata,force:a.force}]},options:i})}var DO=y("CreateTokenFnInput");function lf(r,e,t){let{client:n}=r,{inputCopy:a,error:s}=C({input:e,options:t,validate:DO});if(s)throw s;let i=a.options;return delete a.options,n.api.createToken({token:Z(P({},a),{belongs_to:v(a.belongs_to)}),options:i})}var EO=y("CreateTransferFnInput");function cf(r,e,t){let{client:n}=r,a=at(e,"token",n.getConfig("token")),{inputCopy:s,error:i}=C({input:a,options:t,validate:EO});if(i)throw i;let o=Pi(s,n.getConfig("token"));return o.identifier||(o.identifier=je(o)),n.api.createTransfer({transfer:o,options:s.options})}function Pi(r,e){r.type=r.type||"transfer";let t={identifier:r.identifier,token:v(r.token||e),amount:r.amount,metadata:r.metadata,status:r.status,type:r.type,transfer_group:K(r.transfer_group),created_at:r.created_at};if(r.type==="transfer")return r.latest_control_hash&&console.warn("deprecated: latest_control_hash is deprecated"),Z(P({},t),{from_wallet:v(r.from_wallet),to_wallet:v(r.to_wallet)});if(r.type==="withdrawal")return r.latest_control_hash&&console.warn("deprecated: latest_control_hash is deprecated"),Z(P({},t),{from_wallet:v(r.wallet)});if(r.type==="deposit")return Z(P({},t),{to_wallet:v(r.wallet)})}var RO=y("CreateTransferGroupFnInput");function mf(r,e,t){let{client:n}=r,{inputCopy:a,error:s}=C({input:e,options:t,validate:RO});if(s)throw s;let i=JSON.parse(JSON.stringify(a));return delete i.options,i.children&&(i.children=i.children.map(o=>Pi(o,n.getConfig("token")))),i.identifier||(i.identifier=je(i)),n.api.createTransferGroup({transfer_group:i,options:a.options})}var MO=y("CreateTransfersFnInput");function hf(r,e,t){let{client:n}=r,{inputCopy:a,error:s}=C({input:e,options:t,validate:MO});if(s)throw s;let i=a.transfers.map(o=>Pi(o,n.getConfig("token")));for(let o of i)o.identifier||(o.identifier=je(o));return n.api.createTransferMany({transfers:i,options:a.options})}var WO=y("CreateWalletFnInput");function _f(r,e,t){let{client:n}=r,{inputCopy:a,error:s}=C({input:e,options:t,validate:WO});if(s)throw s;let i=a.options;return delete a.options,n.api.createWallet({wallet:P({},a),options:i})}var AO=y("CreateWithdrawalFnInput");function gf(r,e,t){let{client:n}=r,a=at(e,"token",n.getConfig("token")),{inputCopy:s,error:i}=C({input:a,options:t,validate:AO});if(i)throw i;let o=s.options;delete s.options,s.latest_control_hash&&(console.warn("deprecated: latest_control_hash is deprecated"),delete s.latest_control_hash);let d=s.token||n.getConfig("token");if(d===void 0)throw new oe({message:"INPUT_NEEDS_TOKEN",data:e});let g=Z(P({},s),{identifier:s.identifier,transfer_group:K(s.transfer_group),token:v(d),from_wallet:v(s.wallet),type:"withdrawal"});return g.identifier||(g.identifier=je(g)),n.api.createTransfer({transfer:g,options:Ni(o,{return_balance:"return_from_balance"})})}var NO=y("FindBalancesFnInput");function Tf(r,e,t){var g,h;let{client:n}=r;if(e===void 0)return new De({start(T){return n.api.findBalanceMany({balance:T.filter,options:T.options})},modifiers(T,O){return["wallet","token"].includes(T)?v(O):O}});let{inputCopy:a,error:s}=C({input:e,options:t,validate:NO});if(s)throw s;let i={};a.wallet&&(i.wallet=v(a.wallet)),a.token&&(i.token=v(a.token));let o=(g=a.options)==null?void 0:g.order_by;(h=a.options)==null||delete h.order_by;let d=P({},a.options);return!d.order&&o&&(d.order=st(o)),n.api.findBalanceMany({balance:i,options:d})}var UO=y("FindTokensFnInput");function yf(r,e,t){var g,h;let{client:n}=r;if(e===void 0)return new De({start(T){return n.api.findTokenMany({token:T.filter,options:T.options})},modifiers(T,O){return["belongs_to"].includes(T)?v(O):O}});let{inputCopy:a,error:s}=C({input:e,options:t,validate:UO});if(s)throw s;let i={foreign:a.foreign?a.foreign+"":void 0,type:a.type,metadata:a.metadata};a.belongs_to&&(i.belongs_to=v(a.belongs_to));let o=(g=a.options)==null?void 0:g.order_by;(h=a.options)==null||delete h.order_by;let d=P({},a.options);return!d.order&&o&&(d.order=st(o)),n.api.findTokenMany({token:i,options:d})}var qO=y("FindTransferGroupsFnInput");function bf(r,e,t){var b,$;let{client:n}=r;if(e===void 0)return new De({start(I){return n.api.findTransferGroupMany({transfer_group:I.filter,options:I.options})},modifiers(I,j){return["transfer_group","reverses"].includes(I)?K(j):j}});let{inputCopy:a,error:s}=C({input:e,options:t,validate:qO});if(s)throw s;let{identifier:i,transfer_status:o,status:d,metadata:g,type:h}=a,T={identifier:i,transfer_status:o,status:d,metadata:g,type:h};a.reverses&&(T.reverses=K(a.reverses));let O=(b=a.options)==null?void 0:b.order_by;($=a.options)==null||delete $.order_by;let w=P({},a.options);return!w.order&&O&&(w.order=st(O)),n.api.findTransferGroupMany({transfer_group:T,options:w})}var BO=y("FindTransfersFnInput");function Ff(r,e,t){var $;let{client:n}=r;if(e===void 0)return new De({start(I){return n.api.findTransferMany({transfer:I.filter,options:I.options})},modifiers(I,j){return["token","wallet","from_wallet","to_wallet"].includes(I)?v(j):I==="transfer_group"?K(j):j}});let{inputCopy:a,error:s}=C({input:e,options:t,validate:BO});if(s)throw s;let{token:i,wallet:o,from_wallet:d,to_wallet:g}=a,h={token:v(i),wallet:v(o),from_wallet:v(d),to_wallet:v(g)};a.transfer_group&&(h.transfer_group=K(a.transfer_group)),a.status&&(h.status=a.status),a.metadata&&(h.metadata=a.metadata),($=a.options)!=null||(a.options={});let T=a.options.order_by;if(delete a.options.order_by,a.options.return_running_balance){if(a.options.return_running_balance_for_wallet)throw new oe({message:"CONFLICTING_OPTIONS",data:{options:a.options}});if(!h.wallet)throw new oe({message:"RUNNING_BALANCE_WITHOUT_WALLET",data:{input:a}});a.options.return_running_balance_for_wallet=a.wallet}let O=a.options.return_running_balance_for_wallet;if(delete a.options.return_running_balance_for_wallet,a.options.return_signed_amount){if(a.options.return_signed_amount_for_wallet)throw new oe({message:"CONFLICTING_OPTIONS",data:{options:a.options}});if(!h.wallet)throw new oe({message:"SIGNED_AMOUNT_WITHOUT_WALLET",data:{input:a}});a.options.return_signed_amount_for_wallet=a.wallet}let w=a.options.return_signed_amount_for_wallet;delete a.options.return_signed_amount_for_wallet;let b=P({},a.options);return!b.order&&T&&(b.order=st(T)),O&&(b.return_running_balance_for_wallet=v(O)),w&&(b.return_signed_amount_for_wallet=v(w)),n.api.findTransferMany({transfer:h,options:b})}var LO=y("FindWalletsFnInput");function xf(r,e,t){var h;let{client:n}=r;if(e===void 0)return new De({start(T){return n.api.findWalletMany({wallet:T.filter,options:T.options})},optionsModifiers(T,O){return T==="include_balance_for_token"&&typeof O!="object"?v(O):O}});let{inputCopy:a,error:s}=C({input:e,options:t,validate:LO});if(s)throw s;let i=(h=a.options)!=null?h:{};delete a.options;let o=P({},a),d=i.order_by;delete i.order_by;let g=P({},i);return!g.order&&d&&(g.order=st(d)),n.api.findWalletMany({wallet:o,options:g})}var VO=y("GetBalanceFnInput");function $f(r,e,t){let{client:n}=r,a=at(e,"token",n.getConfig("token")),{inputCopy:s,error:i}=C({input:a,options:t,validate:VO});if(i)throw i;if(s.datetime&&bu(s.datetime))throw new oe({message:"BAL_FUTURE_DATETIME",data:s});let o=s.token||n.getConfig("token");if(o===void 0)throw new oe({message:"INPUT_NEEDS_TOKEN",data:e});return n.api.getBalance({balance:{wallet:v(s.wallet),token:v(o),datetime:s.datetime},options:s.options})}var HO=y("GetBalanceHistoryFnInput");function Of(r,e,t){let{client:n}=r,{inputCopy:a,error:s}=C({input:e,options:t,validate:HO});if(s)throw s;let i=a.token||n.getConfig("token");if(i===void 0)throw new oe({message:"INPUT_NEEDS_TOKEN",data:e});return n.api.getBalanceHistory({balance:{wallet:v(a.wallet),token:v(i)},options:a.options})}var zO=y("GetFlagsFnInput");function wf(r,e,t){let{client:n}=r,{error:a,inputCopy:s}=C({input:e||{},options:t,validate:zO});if(a)throw a;return n.api.getFlags({options:s.options})}var KO=y("GetStatisticsFnInput");function If(r,e,t){let{client:n}=r,{inputCopy:a,error:s}=C({input:e||{},options:t,validate:KO});if(s)throw s;return n.api.getStatistics({model:a.model||"Transfer",aggregator:a.aggregator||"count",groups:a.groups,filter:a.filter,options:a.options})}var QO=y("GetTokenFnInput");function jf(r,e={},t){let{client:n}=r,a=at(e,"foreign",n.getConfig("token")),{inputCopy:s,error:i}=C({input:a,options:t,validate:QO});if(i)throw i;let o=s.foreign||n.getConfig("token");if(o===void 0)throw new oe({message:"INPUT_NEEDS_TOKEN",data:e});return n.api.getToken({token:v(o),options:s.options})}var JO=y("GetTransferFnInput");function vf(r,e,t){let{client:n}=r,{inputCopy:a,error:s}=C({input:e,options:t,validate:JO});if(s)throw s;return n.api.getTransfer({transfer:K(a.transfer),options:a.options})}var XO=y("GetTransferGroupFnInput");function kf(r,e,t){let{client:n}=r,{inputCopy:a,error:s}=C({input:e,options:t,validate:XO});if(s)throw s;return n.api.getTransferGroup({transfer_group:K(a.transfer_group),options:a.options})}var YO=y("GetWalletFnInput");function Sf(r,e,t){let{client:n}=r,{inputCopy:a,error:s}=C({input:e,options:t,validate:YO});if(s)throw s;return n.api.getWallet({wallet:v(a.wallet),options:a.options})}var ZO=y("ImportDataFnInput");function Yc(r){let{error:e}=ZO(r);return e===void 0}var lW=y("ImportDataFnOutput");var cW=y("ImportDataFnStreamChunk");var ew=y("ImportDataFnOptions");function Zc(r){let{error:e}=ew(r);return e===void 0}function Cf(){throw new Error("import-data available only in node client")}var tw=y("ReverseTransferFnInput");function Pf(r,e,t){let{client:n}=r,{inputCopy:a,error:s}=C({input:e,options:t,validate:tw});if(s)throw s;return a.extend_metadata&&console.warn("deprecated: extend_metadata is deprecated. Use metadata_action instead"),n.api.reverseTransfer({transfer:K(a.transfer),reverse:{force:a.force,metadata:a.metadata,extend_metadata:a.extend_metadata,identifier:a.identifier,status:a.status},options:a.options})}var rw=y("ReverseTransferGroupFnInput");function Gf(r,e,t){let{client:n}=r,{inputCopy:a,error:s}=C({input:e,options:t,validate:rw});if(s)throw s;return a.extend_metadata&&console.warn("deprecated: extend_metadata is deprecated. Use metadata_action instead"),n.api.reverseTransferGroup({transfer_group:K(a.transfer_group),reverse:{status:a.status,force:a.force,transfer_status:a.transfer_status,identifier:a.identifier,metadata:a.metadata,transfer_metadata:a.transfer_metadata,extend_metadata:a.extend_metadata,transfer_extend_metadata:a.transfer_extend_metadata},options:a.options})}var nw=y("ReverseTransfersFnInput");function Df(r,e,t){let{client:n}=r;if(e===void 0)return new xo({start(T){return n.api.reverseTransferMany({transfer:T.filter,reverse:T.reverse,options:T.options})},modifiers(T,O){return["token","wallet","from_wallet","to_wallet"].includes(T)?v(O):T==="transfer_group"?K(O):O}});let{inputCopy:a,error:s}=C({input:e,options:t,validate:nw});if(s)throw s;let{token:i,wallet:o,from_wallet:d,to_wallet:g}=a,h={token:v(i),wallet:v(o),from_wallet:v(d),to_wallet:v(g)};return a.transfer_group&&(h.transfer_group=K(a.transfer_group)),a.status&&(h.status=a.status),a.metadata&&(h.metadata=a.metadata),n.api.reverseTransferMany({transfer:h,reverse:a.reverse,options:a.options})}var aw=y("SetFlagsFnInput");function Ef(r,e,t){let{client:n}=r,{inputCopy:a,error:s}=C({input:e,options:t,validate:aw});if(s)throw s;let i=Object.keys(qt.definitions.Flags.properties),o={};if(i.forEach(d=>{d in a&&(o[d]=a[d])}),Object.keys(o).length<1)throw new oe({message:`One of [${i.join()}] is required`,data:e});return n.api.setFlags({flags:o,options:a.options})}var sw=y("UpdateTokenFnInput");function Rf(r,e,t){let{client:n}=r,{inputCopy:a,error:s}=C({input:e,options:t,validate:sw});if(s)throw s;return n.api.updateToken({token:v(a.token),update:{public:a.public,metadata:a.metadata,status:a.status},options:a.options})}var iw=y("UpdateTransferFnInput");function Mf(r,e,t){let{client:n}=r,{inputCopy:a,error:s}=C({input:e,options:t,validate:iw});if(s)throw s;return n.api.updateTransfer({transfer:K(a.transfer),update:{status:a.status,metadata:a.metadata},options:a.options})}var ow=y("UpdateTransferGroupFnInput");function Wf(r,e,t){let{client:n}=r,{inputCopy:a,error:s}=C({input:e,options:t,validate:ow});if(s)throw s;return n.api.updateTransferGroup({transfer_group:K(a.transfer_group),update:{transfer_status:a.transfer_status,status:a.status,metadata:a.metadata},options:a.options})}var pw=y("UpdateTransferGroupsFnInput");function Af(r,e,t){let{client:n}=r;if(e===void 0)return new yr({start(O){return n.api.updateTransferGroupMany({transfer_group:O.filter,update:O.update,options:O.options})},modifiers(O,w){return["transfer_group","reverses"].includes(O)?K(w):w}});let{inputCopy:a,error:s}=C({input:e,options:t,validate:pw});if(s)throw s;let{transfer_status:i,status:o,metadata:d,type:g,update:h}=a,T={transfer_status:i,status:o,metadata:d,type:g};return a.reverses&&(T.reverses=K(a.reverses)),n.api.updateTransferGroupMany({transfer_group:T,update:h,options:a.options})}var dw=y("UpdateTransfersFnInput");function Nf(r,e,t){let{client:n}=r;if(e===void 0)return new yr({start(T){return n.api.updateTransferMany({transfer:T.filter,update:T.update,options:T.options})},modifiers(T,O){return["token","wallet","from_wallet","to_wallet"].includes(T)?v(O):T==="transfer_group"?K(O):O}});let{inputCopy:a,error:s}=C({input:e,options:t,validate:dw});if(s)throw s;let{token:i,wallet:o,from_wallet:d,to_wallet:g}=a,h={token:v(i),wallet:v(o),from_wallet:v(d),to_wallet:v(g)};return a.transfer_group&&(h.transfer_group=K(a.transfer_group)),a.status&&(h.status=a.status),a.metadata&&(h.metadata=a.metadata),n.api.updateTransferMany({transfer:h,update:a.update,options:a.options})}var fw=y("UpdateWalletFnInput");function Uf(r,e,t){let{client:n}=r,{inputCopy:a,error:s}=C({input:e,options:t,validate:fw});if(s)throw s;return n.api.updateWallet({wallet:v(a.wallet),update:{metadata:a.metadata,status:a.status,name:a.name},options:a.options})}var uw={aggregateTransfers:y("AggregateTransfersFnInput"),createAccessToken:y("CreateAccessTokenFnInput"),createContract:y("CreateContractFnInput"),createDeposit:y("CreateDepositFnInput"),createExchange:y("CreateExchangeFnInput"),createToken:y("CreateTokenFnInput"),createTransfer:y("CreateTransferFnInput"),createTransferGroup:y("CreateTransferGroupFnInput"),createTransfers:y("CreateTransfersFnInput"),createWallet:y("CreateWalletFnInput"),createWithdrawal:y("CreateWithdrawalFnInput"),findBalances:y("FindBalancesFnInput"),findTokens:y("FindTokensFnInput"),findTransferGroups:y("FindTransferGroupsFnInput"),findTransfers:y("FindTransfersFnInput"),findWallets:y("FindWalletsFnInput"),getBalance:y("GetBalanceFnInput"),getBalanceHistory:y("GetBalanceHistoryFnInput"),getFlags:y("GetFlagsFnInput"),getStatistics:y("GetStatisticsFnInput"),getToken:y("GetTokenFnInput"),getTransfer:y("GetTransferFnInput"),getTransferGroup:y("GetTransferGroupFnInput"),getWallet:y("GetWalletFnInput"),importData:y("ImportDataFnInput"),reverseTransfer:y("ReverseTransferFnInput"),reverseTransferGroup:y("ReverseTransferGroupFnInput"),reverseTransfers:y("ReverseTransfersFnInput"),setFlags:y("SetFlagsFnInput"),updateToken:y("UpdateTokenFnInput"),updateTransfer:y("UpdateTransferFnInput"),updateTransferGroup:y("UpdateTransferGroupFnInput"),updateTransferGroups:y("UpdateTransferGroupsFnInput"),updateTransfers:y("UpdateTransfersFnInput"),updateWallet:y("UpdateWalletFnInput")},R={aggregateTransfers:Nd,createAccessToken:Ud,createContract:qd,createDeposit:Bd,createExchange:uf,createToken:lf,createTransfer:cf,createTransferGroup:mf,createTransfers:hf,createWallet:_f,createWithdrawal:gf,findBalances:Tf,findTokens:yf,findTransferGroups:bf,findTransfers:Ff,findWallets:xf,getBalance:$f,getBalanceHistory:Of,getFlags:wf,getStatistics:If,getToken:jf,getTransfer:vf,getTransferGroup:kf,getWallet:Sf,importData:Cf,reverseTransfer:Pf,reverseTransferGroup:Gf,reverseTransfers:Df,setFlags:Ef,updateToken:Rf,updateTransfer:Mf,updateTransferGroup:Wf,updateTransferGroups:Af,updateTransfers:Nf,updateWallet:Uf},em=(L=>(L.aggregateTransfers="aggregateTransfers",L.createAccessToken="createAccessToken",L.createContract="createContract",L.createDeposit="createDeposit",L.createExchange="createExchange",L.createToken="createToken",L.createTransfer="createTransfer",L.createTransferGroup="createTransferGroup",L.createTransfers="createTransfers",L.createWallet="createWallet",L.createWithdrawal="createWithdrawal",L.findBalances="findBalances",L.findTokens="findTokens",L.findTransferGroups="findTransferGroups",L.findTransfers="findTransfers",L.findWallets="findWallets",L.getBalance="getBalance",L.getBalanceHistory="getBalanceHistory",L.getFlags="getFlags",L.getStatistics="getStatistics",L.getToken="getToken",L.getTransfer="getTransfer",L.getTransferGroup="getTransferGroup",L.getWallet="getWallet",L.importData="importData",L.reverseTransfer="reverseTransfer",L.reverseTransferGroup="reverseTransferGroup",L.reverseTransfers="reverseTransfers",L.setFlags="setFlags",L.updateToken="updateToken",L.updateTransfer="updateTransfer",L.updateTransferGroup="updateTransferGroup",L.updateTransferGroups="updateTransferGroups",L.updateTransfers="updateTransfers",L.updateWallet="updateWallet",L))(em||{}),tm=(t=>(t.findTransfers="findTransfers",t.findWallets="findWallets",t))(tm||{});var rm,lw=(rm=window.WAPI_VERSION)!=null?rm:"",br=class{constructor(e,t){this.config={};if(this.api=e,this.$connect=e.$connect,t&&(t.token&&(this.config=Z(P({},this.config),{token:t.token})),t.hooks))for(let[n,a]of Object.entries(t.hooks))this.setHook(n,a)}close(){return _e(this,null,function*(){return this.api.close()})}version(){return lw}setHook(e,t){if(typeof t!="function")throw new TypeError("Hooks can only be functions");return this.api.hooks[e]=t,this}configure(e){return this.config=P(P({},this.config),e),this}getConfig(e){return this.config[e]}aggregateTransfers(e,t){return e===void 0?R.aggregateTransfers({client:this}):R.aggregateTransfers({client:this},e,t)}createAccessToken(e,t){return R.createAccessToken({client:this},e,t)}createContract(e,t){return R.createContract({client:this},e,t)}createDeposit(e,t){return R.createDeposit({client:this},e,t)}createExchange(e,t){return R.createExchange({client:this},e,t)}createToken(e,t){return R.createToken({client:this},e,t)}createTransfer(e,t){return R.createTransfer({client:this},e,t)}createTransferGroup(e,t){return R.createTransferGroup({client:this},e,t)}createTransfers(e,t){return R.createTransfers({client:this},e,t)}createWallet(e,t){return R.createWallet({client:this},e,t)}createWithdrawal(e,t){return R.createWithdrawal({client:this},e,t)}findBalances(e,t){return e===void 0?R.findBalances({client:this}):R.findBalances({client:this},e,t)}findTokens(e,t){return e===void 0?R.findTokens({client:this}):R.findTokens({client:this},e,t)}findTransferGroups(e,t){return e===void 0?R.findTransferGroups({client:this}):R.findTransferGroups({client:this},e,t)}findTransfers(e,t){return e===void 0?R.findTransfers({client:this}):R.findTransfers({client:this},e,t)}findWallets(e,t){return e===void 0?R.findWallets({client:this}):R.findWallets({client:this},e,t)}getBalance(e,t){return R.getBalance({client:this},e,t)}getBalanceHistory(e,t){return R.getBalanceHistory({client:this},e,t)}getFlags(e,t){return R.getFlags({client:this},e,t)}getStatistics(e,t){return R.getStatistics({client:this},e,t)}getToken(e,t){return R.getToken({client:this},e,t)}getTransfer(e,t){return R.getTransfer({client:this},e,t)}getTransferGroup(e,t){return R.getTransferGroup({client:this},e,t)}getWallet(e,t){return R.getWallet({client:this},e,t)}importData(e,t){if(e===void 0&&t===void 0)return R.importData({client:this});if(t===void 0&&Zc(e))return R.importData({client:this},e);if(Yc(e))return R.importData({client:this},e,t);throw new Me({message:"INPUT_INVALID",data:{input:e,options:t}})}reverseTransfer(e,t){return R.reverseTransfer({client:this},e,t)}reverseTransferGroup(e,t){return R.reverseTransferGroup({client:this},e,t)}reverseTransfers(e,t){return e===void 0?R.reverseTransfers({client:this}):R.reverseTransfers({client:this},e,t)}setFlags(e,t){return R.setFlags({client:this},e,t)}updateToken(e,t){return R.updateToken({client:this},e,t)}updateTransfer(e,t){return R.updateTransfer({client:this},e,t)}updateTransferGroup(e,t){return R.updateTransferGroup({client:this},e,t)}updateTransferGroups(e,t){return e===void 0?R.updateTransferGroups({client:this}):R.updateTransferGroups({client:this},e,t)}updateTransfers(e,t){return e===void 0?R.updateTransfers({client:this}):R.updateTransfers({client:this},e,t)}updateWallet(e,t){return R.updateWallet({client:this},e,t)}};function nm(r,e){let t=Gd(r);return new br(t,e)}function am(r,e){let t=Md(r);return new br(t,e)}var cw=Si.getValidator("ClientOptions"),sm=(t=>(t.ws="ws",t.https="https",t))(sm||{});function mw(r){let e=r.config,{inputCopy:t,error:n}=cw(r);if(n)throw n;if(t.client==="ws")return nm(t.connection,e);if(t.client==="https")return am(t.connection,e);throw new TypeError("Invalid client type")}var hw={getIdentifier:gu};return Vm(_w);})();
8
+ deps: ${t}}`};var BT={keyword:"dependencies",type:"object",schemaType:"object",error:pt.error,code(r){let[e,t]=LT(r);ic(r,e),oc(r,t)}};function LT({schema:r}){let e={},t={};for(let n in r){if(n==="__proto__")continue;let a=Array.isArray(r[n])?e:t;a[n]=r[n]}return[e,t]}function ic(r,e=r.schema){let{gen:t,data:n,it:a}=r;if(Object.keys(e).length===0)return;let s=t.let("missing");for(let i in e){let o=e[i];if(o.length===0)continue;let d=(0,dn.propertyInData)(t,n,i,a.opts.ownProperties);r.setParams({property:i,depsCount:o.length,deps:o.join(", ")}),a.allErrors?t.if(d,()=>{for(let g of o)(0,dn.checkReportMissingProp)(r,g)}):(t.if((0,Qp._)`${d} && (${(0,dn.checkMissingProp)(r,o,s)})`),(0,dn.reportMissingProp)(r,s),t.else())}}pt.validatePropertyDeps=ic;function oc(r,e=r.schema){let{gen:t,data:n,keyword:a,it:s}=r,i=t.name("valid");for(let o in e)(0,qT.alwaysValidSchema)(s,e[o])||(t.if((0,dn.propertyInData)(t,n,o,s.opts.ownProperties),()=>{let d=r.subschema({keyword:a,schemaProp:o},i);r.mergeValidEvaluated(d,i)},()=>t.var(i,!0)),r.ok(i))}pt.validateSchemaDeps=oc;pt.default=BT});var fc=G(Jp=>{"use strict";Object.defineProperty(Jp,"__esModule",{value:!0});var dc=V(),VT=te(),HT={message:"property name must be valid",params:({params:r})=>(0,dc._)`{propertyName: ${r.propertyName}}`},zT={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:HT,code(r){let{gen:e,schema:t,data:n,it:a}=r;if((0,VT.alwaysValidSchema)(a,t))return;let s=e.name("valid");e.forIn("key",n,i=>{r.setParams({propertyName:i}),r.subschema({keyword:"propertyNames",data:i,dataTypes:["string"],propertyName:i,compositeRule:!0},s),e.if((0,dc.not)(s),()=>{r.error(!0),a.allErrors||e.break()})}),r.ok(s)}};Jp.default=zT});var Yp=G(Xp=>{"use strict";Object.defineProperty(Xp,"__esModule",{value:!0});var mo=Le(),Xe=V(),KT=gt(),ho=te(),QT={message:"must NOT have additional properties",params:({params:r})=>(0,Xe._)`{additionalProperty: ${r.additionalProperty}}`},JT={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:QT,code(r){let{gen:e,schema:t,parentSchema:n,data:a,errsCount:s,it:i}=r;if(!s)throw new Error("ajv implementation error");let{allErrors:o,opts:d}=i;if(i.props=!0,d.removeAdditional!=="all"&&(0,ho.alwaysValidSchema)(i,t))return;let g=(0,mo.allSchemaProperties)(n.properties),h=(0,mo.allSchemaProperties)(n.patternProperties);T(),r.ok((0,Xe._)`${s} === ${KT.default.errors}`);function T(){e.forIn("key",a,I=>{!g.length&&!h.length?b(I):e.if(O(I),()=>b(I))})}function O(I){let j;if(g.length>8){let z=(0,ho.schemaRefOrVal)(i,n.properties,"properties");j=(0,mo.isOwnProperty)(e,z,I)}else g.length?j=(0,Xe.or)(...g.map(z=>(0,Xe._)`${I} === ${z}`)):j=Xe.nil;return h.length&&(j=(0,Xe.or)(j,...h.map(z=>(0,Xe._)`${(0,mo.usePattern)(r,z)}.test(${I})`))),(0,Xe.not)(j)}function w(I){e.code((0,Xe._)`delete ${a}[${I}]`)}function b(I){if(d.removeAdditional==="all"||d.removeAdditional&&t===!1){w(I);return}if(t===!1){r.setParams({additionalProperty:I}),r.error(),o||e.break();return}if(typeof t=="object"&&!(0,ho.alwaysValidSchema)(i,t)){let j=e.name("valid");d.removeAdditional==="failing"?($(I,j,!1),e.if((0,Xe.not)(j),()=>{r.reset(),w(I)})):($(I,j),o||e.if((0,Xe.not)(j),()=>e.break()))}}function $(I,j,z){let q={keyword:"additionalProperties",dataProp:I,dataPropType:ho.Type.Str};z===!1&&Object.assign(q,{compositeRule:!0,createErrors:!1,allErrors:!1}),r.subschema(q,j)}}};Xp.default=JT});var cc=G(ed=>{"use strict";Object.defineProperty(ed,"__esModule",{value:!0});var XT=Qr(),uc=Le(),Zp=te(),lc=Yp(),YT={keyword:"properties",type:"object",schemaType:"object",code(r){let{gen:e,schema:t,parentSchema:n,data:a,it:s}=r;s.opts.removeAdditional==="all"&&n.additionalProperties===void 0&&lc.default.code(new XT.KeywordCxt(s,lc.default,"additionalProperties"));let i=(0,uc.allSchemaProperties)(t);for(let T of i)s.definedProperties.add(T);s.opts.unevaluated&&i.length&&s.props!==!0&&(s.props=Zp.mergeEvaluated.props(e,(0,Zp.toHash)(i),s.props));let o=i.filter(T=>!(0,Zp.alwaysValidSchema)(s,t[T]));if(o.length===0)return;let d=e.name("valid");for(let T of o)g(T)?h(T):(e.if((0,uc.propertyInData)(e,a,T,s.opts.ownProperties)),h(T),s.allErrors||e.else().var(d,!0),e.endIf()),r.it.definedProperties.add(T),r.ok(d);function g(T){return s.opts.useDefaults&&!s.compositeRule&&t[T].default!==void 0}function h(T){r.subschema({keyword:"properties",schemaProp:T,dataProp:T},d)}}};ed.default=YT});var gc=G(td=>{"use strict";Object.defineProperty(td,"__esModule",{value:!0});var mc=Le(),_o=V(),hc=te(),_c=te(),ZT={keyword:"patternProperties",type:"object",schemaType:"object",code(r){let{gen:e,schema:t,data:n,parentSchema:a,it:s}=r,{opts:i}=s,o=(0,mc.allSchemaProperties)(t),d=o.filter($=>(0,hc.alwaysValidSchema)(s,t[$]));if(o.length===0||d.length===o.length&&(!s.opts.unevaluated||s.props===!0))return;let g=i.strictSchema&&!i.allowMatchingProperties&&a.properties,h=e.name("valid");s.props!==!0&&!(s.props instanceof _o.Name)&&(s.props=(0,_c.evaluatedPropsToName)(e,s.props));let{props:T}=s;O();function O(){for(let $ of o)g&&w($),s.allErrors?b($):(e.var(h,!0),b($),e.if(h))}function w($){for(let I in g)new RegExp($).test(I)&&(0,hc.checkStrictMode)(s,`property ${I} matches pattern ${$} (use allowMatchingProperties)`)}function b($){e.forIn("key",n,I=>{e.if((0,_o._)`${(0,mc.usePattern)(r,$)}.test(${I})`,()=>{let j=d.includes($);j||r.subschema({keyword:"patternProperties",schemaProp:$,dataProp:I,dataPropType:_c.Type.Str},h),s.opts.unevaluated&&T!==!0?e.assign((0,_o._)`${T}[${I}]`,!0):!j&&!s.allErrors&&e.if((0,_o.not)(h),()=>e.break())})})}}};td.default=ZT});var Tc=G(rd=>{"use strict";Object.defineProperty(rd,"__esModule",{value:!0});var ey=te(),ty={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(r){let{gen:e,schema:t,it:n}=r;if((0,ey.alwaysValidSchema)(n,t)){r.fail();return}let a=e.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"}};rd.default=ty});var yc=G(nd=>{"use strict";Object.defineProperty(nd,"__esModule",{value:!0});var ry=Le(),ny={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:ry.validateUnion,error:{message:"must match a schema in anyOf"}};nd.default=ny});var bc=G(ad=>{"use strict";Object.defineProperty(ad,"__esModule",{value:!0});var go=V(),ay=te(),sy={message:"must match exactly one schema in oneOf",params:({params:r})=>(0,go._)`{passingSchemas: ${r.passing}}`},iy={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:sy,code(r){let{gen:e,schema:t,parentSchema:n,it:a}=r;if(!Array.isArray(t))throw new Error("ajv implementation error");if(a.opts.discriminator&&n.discriminator)return;let s=t,i=e.let("valid",!1),o=e.let("passing",null),d=e.name("_valid");r.setParams({passing:o}),e.block(g),r.result(i,()=>r.reset(),()=>r.error(!0));function g(){s.forEach((h,T)=>{let O;(0,ay.alwaysValidSchema)(a,h)?e.var(d,!0):O=r.subschema({keyword:"oneOf",schemaProp:T,compositeRule:!0},d),T>0&&e.if((0,go._)`${d} && ${i}`).assign(i,!1).assign(o,(0,go._)`[${o}, ${T}]`).else(),e.if(d,()=>{e.assign(i,!0),e.assign(o,T),O&&r.mergeEvaluated(O,go.Name)})})}}};ad.default=iy});var Fc=G(sd=>{"use strict";Object.defineProperty(sd,"__esModule",{value:!0});var oy=te(),py={keyword:"allOf",schemaType:"array",code(r){let{gen:e,schema:t,it:n}=r;if(!Array.isArray(t))throw new Error("ajv implementation error");let a=e.name("valid");t.forEach((s,i)=>{if((0,oy.alwaysValidSchema)(n,s))return;let o=r.subschema({keyword:"allOf",schemaProp:i},a);r.ok(a),r.mergeEvaluated(o)})}};sd.default=py});var Oc=G(id=>{"use strict";Object.defineProperty(id,"__esModule",{value:!0});var To=V(),$c=te(),dy={message:({params:r})=>(0,To.str)`must match "${r.ifClause}" schema`,params:({params:r})=>(0,To._)`{failingKeyword: ${r.ifClause}}`},fy={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:dy,code(r){let{gen:e,parentSchema:t,it:n}=r;t.then===void 0&&t.else===void 0&&(0,$c.checkStrictMode)(n,'"if" without "then" and "else" is ignored');let a=xc(n,"then"),s=xc(n,"else");if(!a&&!s)return;let i=e.let("valid",!0),o=e.name("_valid");if(d(),r.reset(),a&&s){let h=e.let("ifClause");r.setParams({ifClause:h}),e.if(o,g("then",h),g("else",h))}else a?e.if(o,g("then")):e.if((0,To.not)(o),g("else"));r.pass(i,()=>r.error(!0));function d(){let h=r.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},o);r.mergeEvaluated(h)}function g(h,T){return()=>{let O=r.subschema({keyword:h},o);e.assign(i,o),r.mergeValidEvaluated(O,i),T?e.assign(T,(0,To._)`${h}`):r.setParams({ifClause:h})}}}};function xc(r,e){let t=r.schema[e];return t!==void 0&&!(0,$c.alwaysValidSchema)(r,t)}id.default=fy});var wc=G(od=>{"use strict";Object.defineProperty(od,"__esModule",{value:!0});var uy=te(),ly={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:r,parentSchema:e,it:t}){e.if===void 0&&(0,uy.checkStrictMode)(t,`"${r}" without "if" is ignored`)}};od.default=ly});var Ic=G(pd=>{"use strict";Object.defineProperty(pd,"__esModule",{value:!0});var cy=Lp(),my=rc(),hy=Vp(),_y=ac(),gy=sc(),Ty=pc(),yy=fc(),by=Yp(),Fy=cc(),xy=gc(),$y=Tc(),Oy=yc(),wy=bc(),Iy=Fc(),jy=Oc(),vy=wc();function ky(r=!1){let e=[$y.default,Oy.default,wy.default,Iy.default,jy.default,vy.default,yy.default,by.default,Ty.default,Fy.default,xy.default];return r?e.push(my.default,_y.default):e.push(cy.default,hy.default),e.push(gy.default),e}pd.default=ky});var jc=G(dd=>{"use strict";Object.defineProperty(dd,"__esModule",{value:!0});var ge=V(),Sy={message:({schemaCode:r})=>(0,ge.str)`must match format "${r}"`,params:({schemaCode:r})=>(0,ge._)`{format: ${r}}`},Cy={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:Sy,code(r,e){let{gen:t,data:n,$data:a,schema:s,schemaCode:i,it:o}=r,{opts:d,errSchemaPath:g,schemaEnv:h,self:T}=o;if(!d.validateFormats)return;a?O():w();function O(){let b=t.scopeValue("formats",{ref:T.formats,code:d.code.formats}),$=t.const("fDef",(0,ge._)`${b}[${i}]`),I=t.let("fType"),j=t.let("format");t.if((0,ge._)`typeof ${$} == "object" && !(${$} instanceof RegExp)`,()=>t.assign(I,(0,ge._)`${$}.type || "string"`).assign(j,(0,ge._)`${$}.validate`),()=>t.assign(I,(0,ge._)`"string"`).assign(j,$)),r.fail$data((0,ge.or)(z(),q()));function z(){return d.strictSchema===!1?ge.nil:(0,ge._)`${i} && !${j}`}function q(){let ae=h.$async?(0,ge._)`(${$}.async ? await ${j}(${n}) : ${j}(${n}))`:(0,ge._)`${j}(${n})`,W=(0,ge._)`(typeof ${j} == "function" ? ${ae} : ${j}.test(${n}))`;return(0,ge._)`${j} && ${j} !== true && ${I} === ${e} && !${W}`}}function w(){let b=T.formats[s];if(!b){z();return}if(b===!0)return;let[$,I,j]=q(b);$===e&&r.pass(ae());function z(){if(d.strictSchema===!1){T.logger.warn(W());return}throw new Error(W());function W(){return`unknown format "${s}" ignored in schema at path "${g}"`}}function q(W){let We=W instanceof RegExp?(0,ge.regexpCode)(W):d.code.formats?(0,ge._)`${d.code.formats}${(0,ge.getProperty)(s)}`:void 0,ze=t.scopeValue("formats",{key:s,ref:W,code:We});return typeof W=="object"&&!(W instanceof RegExp)?[W.type||"string",W.validate,(0,ge._)`${ze}.validate`]:["string",W,ze]}function ae(){if(typeof b=="object"&&!(b instanceof RegExp)&&b.async){if(!h.$async)throw new Error("async format in sync schema");return(0,ge._)`await ${j}(${n})`}return typeof I=="function"?(0,ge._)`${j}(${n})`:(0,ge._)`${j}.test(${n})`}}}};dd.default=Cy});var vc=G(fd=>{"use strict";Object.defineProperty(fd,"__esModule",{value:!0});var Py=jc(),Gy=[Py.default];fd.default=Gy});var kc=G(lr=>{"use strict";Object.defineProperty(lr,"__esModule",{value:!0});lr.contentVocabulary=lr.metadataVocabulary=void 0;lr.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];lr.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});var Cc=G(ud=>{"use strict";Object.defineProperty(ud,"__esModule",{value:!0});var Dy=Wl(),Ey=Yl(),My=Ic(),Ry=vc(),Sc=kc(),Wy=[Dy.default,Ey.default,(0,My.default)(),Ry.default,Sc.metadataVocabulary,Sc.contentVocabulary];ud.default=Wy});var Gc=G(yo=>{"use strict";Object.defineProperty(yo,"__esModule",{value:!0});yo.DiscrError=void 0;var Pc;(function(r){r.Tag="tag",r.Mapping="mapping"})(Pc||(yo.DiscrError=Pc={}))});var Ec=G(cd=>{"use strict";Object.defineProperty(cd,"__esModule",{value:!0});var cr=V(),ld=Gc(),Dc=ro(),Ay=Jr(),Ny=te(),Uy={message:({params:{discrError:r,tagName:e}})=>r===ld.DiscrError.Tag?`tag "${e}" must be string`:`value of tag "${e}" must be in oneOf`,params:({params:{discrError:r,tag:e,tagName:t}})=>(0,cr._)`{error: ${r}, tag: ${t}, tagValue: ${e}}`},qy={keyword:"discriminator",type:"object",schemaType:"object",error:Uy,code(r){let{gen:e,data:t,schema:n,parentSchema:a,it:s}=r,{oneOf:i}=a;if(!s.opts.discriminator)throw new Error("discriminator: requires discriminator option");let o=n.propertyName;if(typeof o!="string")throw new Error("discriminator: requires propertyName");if(n.mapping)throw new Error("discriminator: mapping is not supported");if(!i)throw new Error("discriminator: requires oneOf keyword");let d=e.let("valid",!1),g=e.const("tag",(0,cr._)`${t}${(0,cr.getProperty)(o)}`);e.if((0,cr._)`typeof ${g} == "string"`,()=>h(),()=>r.error(!1,{discrError:ld.DiscrError.Tag,tag:g,tagName:o})),r.ok(d);function h(){let w=O();e.if(!1);for(let b in w)e.elseIf((0,cr._)`${g} === ${b}`),e.assign(d,T(w[b]));e.else(),r.error(!1,{discrError:ld.DiscrError.Mapping,tag:g,tagName:o}),e.endIf()}function T(w){let b=e.name("valid"),$=r.subschema({keyword:"oneOf",schemaProp:w},b);return r.mergeEvaluated($,cr.Name),b}function O(){var w;let b={},$=j(a),I=!0;for(let ae=0;ae<i.length;ae++){let W=i[ae];if(W!=null&&W.$ref&&!(0,Ny.schemaHasRulesButRef)(W,s.self.RULES)){let ze=W.$ref;if(W=Dc.resolveRef.call(s.self,s.schemaEnv.root,s.baseId,ze),W instanceof Dc.SchemaEnv&&(W=W.schema),W===void 0)throw new Ay.default(s.opts.uriResolver,s.baseId,ze)}let We=(w=W==null?void 0:W.properties)===null||w===void 0?void 0:w[o];if(typeof We!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${o}"`);I=I&&($||j(W)),z(We,ae)}if(!I)throw new Error(`discriminator: "${o}" must be required`);return b;function j({required:ae}){return Array.isArray(ae)&&ae.includes(o)}function z(ae,W){if(ae.const)q(ae.const,W);else if(ae.enum)for(let We of ae.enum)q(We,W);else throw new Error(`discriminator: "properties/${o}" must have "const" or "enum"`)}function q(ae,W){if(typeof ae!="string"||ae in b)throw new Error(`discriminator: "${o}" values must be unique strings`);b[ae]=W}}}};cd.default=qy});var Mc=G((hj,By)=>{By.exports={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0}});var Wc=G((le,md)=>{"use strict";Object.defineProperty(le,"__esModule",{value:!0});le.MissingRefError=le.ValidationError=le.CodeGen=le.Name=le.nil=le.stringify=le.str=le._=le.KeywordCxt=le.Ajv=void 0;var Ly=Pl(),Vy=Cc(),Hy=Ec(),Rc=Mc(),zy=["/properties"],bo="http://json-schema.org/draft-07/schema",mr=class extends Ly.default{_addVocabularies(){super._addVocabularies(),Vy.default.forEach(e=>this.addVocabulary(e)),this.opts.discriminator&&this.addKeyword(Hy.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let e=this.opts.$data?this.$dataMetaSchema(Rc,zy):Rc;this.addMetaSchema(e,bo,!1),this.refs["http://json-schema.org/schema"]=bo}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(bo)?bo:void 0)}};le.Ajv=mr;md.exports=le=mr;md.exports.Ajv=mr;Object.defineProperty(le,"__esModule",{value:!0});le.default=mr;var Ky=Qr();Object.defineProperty(le,"KeywordCxt",{enumerable:!0,get:function(){return Ky.KeywordCxt}});var hr=V();Object.defineProperty(le,"_",{enumerable:!0,get:function(){return hr._}});Object.defineProperty(le,"str",{enumerable:!0,get:function(){return hr.str}});Object.defineProperty(le,"stringify",{enumerable:!0,get:function(){return hr.stringify}});Object.defineProperty(le,"nil",{enumerable:!0,get:function(){return hr.nil}});Object.defineProperty(le,"Name",{enumerable:!0,get:function(){return hr.Name}});Object.defineProperty(le,"CodeGen",{enumerable:!0,get:function(){return hr.CodeGen}});var Qy=eo();Object.defineProperty(le,"ValidationError",{enumerable:!0,get:function(){return Qy.default}});var Jy=Jr();Object.defineProperty(le,"MissingRefError",{enumerable:!0,get:function(){return Jy.default}})});var gw={};Bm(gw,{APIFunctions:()=>Cd,APIValidators:()=>Sd,AggregateTransferManyTxInputSchema:()=>Na,AggregateTransferManyTxOutputSchema:()=>Ua,AggregateTransfersFnInputSchema:()=>On,AggregateTransfersFnOutputSchema:()=>wn,AuthenticationCheckTxInputSchema:()=>qa,AuthenticationCheckTxOutputSchema:()=>Ba,Client:()=>br,ClientFunctions:()=>M,ClientFunctionsEnum:()=>em,ClientQueryBuilderFunctionsEnum:()=>tm,ClientValidators:()=>lw,ConstsSchema:()=>qt,CreateAccessTokenFnInputSchema:()=>In,CreateAccessTokenFnOutputSchema:()=>jn,CreateAccessTokenTxInputSchema:()=>La,CreateAccessTokenTxOutputSchema:()=>Va,CreateContractFnInputSchema:()=>vn,CreateContractFnOutputSchema:()=>kn,CreateContractTxInputSchema:()=>Ha,CreateContractTxOutputSchema:()=>za,CreateDepositFnInputSchema:()=>Sn,CreateDepositFnOutputSchema:()=>Cn,CreateDepositTxInputSchema:()=>Ka,CreateDepositTxOutputSchema:()=>Qa,CreateDistributionTxInputSchema:()=>Ja,CreateDistributionTxOutputSchema:()=>Xa,CreateExchangeFnInputSchema:()=>Pn,CreateExchangeFnOutputSchema:()=>Gn,CreateTokenFnInputSchema:()=>Dn,CreateTokenFnOutputSchema:()=>En,CreateTokenTxInputSchema:()=>Ya,CreateTokenTxOutputSchema:()=>Za,CreateTransferFnInputSchema:()=>Mn,CreateTransferFnOutputSchema:()=>Rn,CreateTransferGroupFnInputSchema:()=>Wn,CreateTransferGroupFnOutputSchema:()=>An,CreateTransferGroupTxInputSchema:()=>rs,CreateTransferGroupTxOutputSchema:()=>ns,CreateTransferManyTxInputSchema:()=>as,CreateTransferManyTxOutputSchema:()=>ss,CreateTransferTxInputSchema:()=>es,CreateTransferTxOutputSchema:()=>ts,CreateTransfersFnInputSchema:()=>Nn,CreateTransfersFnOutputSchema:()=>Un,CreateWalletFnInputSchema:()=>qn,CreateWalletFnOutputSchema:()=>Bn,CreateWalletTxInputSchema:()=>is,CreateWalletTxOutputSchema:()=>os,CreateWithdrawalFnInputSchema:()=>Ln,CreateWithdrawalFnOutputSchema:()=>Vn,CreateWithdrawalTxInputSchema:()=>ps,CreateWithdrawalTxOutputSchema:()=>ds,DbFilterFunctionBasicEnum:()=>Vd,DbFilterFunctionInEnum:()=>Hd,DbFilterFunctionMetadataBasicEnum:()=>Ld,DbFilterFunctionMetadataInEnum:()=>zd,DbFilterFunctionMetadataNullEnum:()=>Kd,DbFilterFunctionNullEnum:()=>Qd,DbFilterOperatorEnum:()=>Jd,DbFilterOperatorExtendedEnum:()=>Yd,DbFilterOperatorStringEnum:()=>Xd,DbModelNameEnum:()=>ff,ErrorMessage:()=>qe,Errors:()=>Gr,ExportDatabaseTxInputSchema:()=>fs,ExportDatabaseTxOutputSchema:()=>us,FindBalanceManyTxInputSchema:()=>ls,FindBalanceManyTxOutputSchema:()=>cs,FindBalancesFnInputSchema:()=>Hn,FindBalancesFnOutputSchema:()=>zn,FindTokenManyTxInputSchema:()=>ms,FindTokenManyTxOutputSchema:()=>hs,FindTokensFnInputSchema:()=>Kn,FindTokensFnOutputSchema:()=>Qn,FindTransferGroupManyTxInputSchema:()=>_s,FindTransferGroupManyTxOutputSchema:()=>gs,FindTransferGroupsFnInputSchema:()=>Jn,FindTransferGroupsFnOutputSchema:()=>Xn,FindTransferManyTxInputSchema:()=>Ts,FindTransferManyTxOutputSchema:()=>ys,FindTransfersFnInputSchema:()=>Yn,FindTransfersFnOutputSchema:()=>Zn,FindWalletManyTxInputSchema:()=>bs,FindWalletManyTxOutputSchema:()=>Fs,FindWalletsFnInputSchema:()=>ea,FindWalletsFnOutputSchema:()=>ta,FinishTransactionTxInputSchema:()=>xs,FinishTransactionTxOutputSchema:()=>$s,FnConstsSchema:()=>ra,GetBalanceFnInputSchema:()=>na,GetBalanceFnOutputSchema:()=>aa,GetBalanceHistoryFnInputSchema:()=>sa,GetBalanceHistoryFnOutputSchema:()=>ia,GetBalanceHistoryTxInputSchema:()=>Is,GetBalanceHistoryTxOutputSchema:()=>js,GetBalanceTxInputSchema:()=>Os,GetBalanceTxOutputSchema:()=>ws,GetDatabaseExportProgressTxInputSchema:()=>vs,GetDatabaseExportProgressTxOutputSchema:()=>ks,GetDatabaseImportProgressTxInputSchema:()=>Ss,GetDatabaseImportProgressTxOutputSchema:()=>Cs,GetFlagsFnInputSchema:()=>oa,GetFlagsFnOutputSchema:()=>pa,GetFlagsTxInputSchema:()=>Ps,GetFlagsTxOutputSchema:()=>Gs,GetStatisticsFnInputSchema:()=>da,GetStatisticsFnOutputSchema:()=>fa,GetStatisticsTxInputSchema:()=>Ds,GetStatisticsTxOutputSchema:()=>Es,GetTokenFnInputSchema:()=>ua,GetTokenFnOutputSchema:()=>la,GetTokenManyTxInputSchema:()=>Ws,GetTokenManyTxOutputSchema:()=>As,GetTokenTxInputSchema:()=>Ms,GetTokenTxOutputSchema:()=>Rs,GetTransferFnInputSchema:()=>ca,GetTransferFnOutputSchema:()=>ma,GetTransferGroupFnInputSchema:()=>ha,GetTransferGroupFnOutputSchema:()=>_a,GetTransferGroupTxInputSchema:()=>qs,GetTransferGroupTxOutputSchema:()=>Bs,GetTransferTxInputSchema:()=>Ns,GetTransferTxOutputSchema:()=>Us,GetWalletFnInputSchema:()=>ga,GetWalletFnOutputSchema:()=>Ta,GetWalletManyTxInputSchema:()=>Hs,GetWalletManyTxOutputSchema:()=>zs,GetWalletTxInputSchema:()=>Ls,GetWalletTxOutputSchema:()=>Vs,ITxAggregatorSimpleEnum:()=>Id,ITxDistributorLeftoverRuleEnum:()=>jd,ITxMetadataActionEnum:()=>vd,ITxMetadataActionForReverseEnum:()=>kd,ITxPeriodSimpleEnum:()=>Ci,ImportActionsTxInputSchema:()=>Lt,ImportActionsTxOutputSchema:()=>Ks,ImportDataFnInputSchema:()=>Bt,ImportDataFnOutputSchema:()=>ya,ImportDatabaseTxInputSchema:()=>Qs,ImportDatabaseTxOutputSchema:()=>Js,ListDatabaseExportsTxInputSchema:()=>Xs,ListDatabaseExportsTxOutputSchema:()=>Ys,QueryBuilder:()=>De,QueryLogsTxInputSchema:()=>ti,QueryLogsTxOutputSchema:()=>ri,QueryTxInputSchema:()=>Zs,QueryTxOutputSchema:()=>ei,ResetDatabaseTxInputSchema:()=>ni,ResetDatabaseTxOutputSchema:()=>ai,ReverseTransferFnInputSchema:()=>ba,ReverseTransferFnOutputSchema:()=>Fa,ReverseTransferGroupFnInputSchema:()=>xa,ReverseTransferGroupFnOutputSchema:()=>$a,ReverseTransferGroupManyTxInputSchema:()=>di,ReverseTransferGroupManyTxOutputSchema:()=>fi,ReverseTransferGroupTxInputSchema:()=>oi,ReverseTransferGroupTxOutputSchema:()=>pi,ReverseTransferManyTxInputSchema:()=>ui,ReverseTransferManyTxOutputSchema:()=>li,ReverseTransferTxInputSchema:()=>si,ReverseTransferTxOutputSchema:()=>ii,ReverseTransfersFnInputSchema:()=>Oa,ReverseTransfersFnOutputSchema:()=>wa,SetFlagsFnInputSchema:()=>Ia,SetFlagsFnOutputSchema:()=>ja,SetFlagsTxInputSchema:()=>ci,SetFlagsTxOutputSchema:()=>mi,StartTransactionTxInputSchema:()=>hi,StartTransactionTxOutputSchema:()=>_i,StreamPromise:()=>mt,TokenStatusEnum:()=>ef,TokenTableInputSchema:()=>fn,TokenTableSchema:()=>un,TokenTypeEnum:()=>Zd,TransferGroupStatusEnum:()=>tf,TransferGroupTableInputSchema:()=>mn,TransferGroupTableSchema:()=>hn,TransferGroupTypeEnum:()=>af,TransferLogTableInputSchema:()=>_n,TransferLogTableSchema:()=>gn,TransferStatusEnum:()=>rf,TransferStatusInputEnum:()=>nf,TransferTableInputSchema:()=>ln,TransferTableSchema:()=>cn,TransferTypeEnum:()=>sf,TxConstsSchema:()=>gi,UpdateTokenFnInputSchema:()=>va,UpdateTokenFnOutputSchema:()=>ka,UpdateTokenTxInputSchema:()=>Ti,UpdateTokenTxOutputSchema:()=>yi,UpdateTransferFnInputSchema:()=>Sa,UpdateTransferFnOutputSchema:()=>Ca,UpdateTransferGroupFnInputSchema:()=>Pa,UpdateTransferGroupFnOutputSchema:()=>Ga,UpdateTransferGroupManyTxInputSchema:()=>Oi,UpdateTransferGroupManyTxOutputSchema:()=>wi,UpdateTransferGroupTxInputSchema:()=>xi,UpdateTransferGroupTxOutputSchema:()=>$i,UpdateTransferGroupsFnInputSchema:()=>Da,UpdateTransferGroupsFnOutputSchema:()=>Ea,UpdateTransferManyTxInputSchema:()=>Ii,UpdateTransferManyTxOutputSchema:()=>ji,UpdateTransferTxInputSchema:()=>bi,UpdateTransferTxOutputSchema:()=>Fi,UpdateTransfersFnInputSchema:()=>Ma,UpdateTransfersFnOutputSchema:()=>Ra,UpdateWalletFnInputSchema:()=>Wa,UpdateWalletFnOutputSchema:()=>Aa,UpdateWalletTxInputSchema:()=>vi,UpdateWalletTxOutputSchema:()=>ki,Validator:()=>Si,WalletStatusEnum:()=>pf,WalletTableInputSchema:()=>Tn,WalletTableSchema:()=>yn,WalletTokenSettingTableInputSchema:()=>bn,WalletTokenSettingTableSchema:()=>Fn,WalletTypeEnum:()=>of,WapiClientType:()=>sm,WapiSettingTableInputSchema:()=>xn,WapiSettingTableSchema:()=>$n,WapiSettingTypeEnum:()=>df,aggregateTransfers:()=>Nd,create:()=>hw,createAccessToken:()=>Ud,createContract:()=>qd,createDeposit:()=>Bd,createExchange:()=>uf,createToken:()=>lf,createTransfer:()=>cf,createTransferGroup:()=>mf,createTransfers:()=>hf,createWallet:()=>_f,createWithdrawal:()=>gf,findBalances:()=>Tf,findTokens:()=>yf,findTransferGroups:()=>bf,findTransfers:()=>Ff,findWallets:()=>xf,getBalance:()=>$f,getBalanceHistory:()=>Of,getFlags:()=>wf,getStatistics:()=>If,getToken:()=>jf,getTransfer:()=>vf,getTransferGroup:()=>kf,getWallet:()=>Sf,importData:()=>Cf,reverseTransfer:()=>Pf,reverseTransferGroup:()=>Gf,reverseTransfers:()=>Df,setFlags:()=>Ef,updateToken:()=>Mf,updateTransfer:()=>Rf,updateTransferGroup:()=>Wf,updateTransferGroups:()=>Af,updateTransfers:()=>Nf,updateWallet:()=>Uf,utils:()=>_w});var lu=WebSocket;function ie(...r){window.WAPI_DEBUG&&console.log(...r)}var nt=class extends Error{constructor({code:e,message:t,data:n,description:a}){var s;super(t),this.code=e,this.message=t,this.data=n,this.description=(s=a!=null?a:Hm[t])!=null?s:""}toJSON(){return{code:this.code,message:this.message,description:this.description,data:this.data}}},ko=class extends nt{constructor({message:e,data:t,code:n}){super({message:e,data:t,code:n||"DatabaseError"})}},Re=class extends nt{constructor({message:e,data:t,code:n}){super({message:e,data:t,code:n||"SchemaValidationError"})}},oe=class extends nt{constructor({message:e,data:t,code:n}){super({message:e,data:t,code:n||"InputError"})}},So=class extends nt{constructor({message:e,data:t,code:n}){super({message:e,data:t,code:n||"ConstraintError"})}},Co=class extends nt{constructor({message:e,data:t,code:n}){super({message:e,data:t,code:n||"UnknownError"})}},Sr=class extends nt{constructor({message:e,data:t,code:n}){super({message:e,data:t,code:n||"ConnectionError"})}},Cr=class extends nt{constructor({message:e,data:t,code:n}){super({message:e,data:t,code:n||"StreamError"})}},Pr=class extends nt{constructor({message:e,data:t,code:n}){super({message:e,data:t,code:n||"AuthenticationError"})}};function Po({message:r,data:e,code:t}){switch(t){case"SchemaValidationError":return new Re({message:r,data:e,code:t});case"DatabaseError":return new ko({message:r,data:e,code:t});case"InputError":return new oe({message:r,data:e,code:t});case"ConstraintError":return new So({message:r,data:e,code:t});case"ConnectionError":return new Sr({message:r,data:e,code:t});case"StreamError":return new Cr({message:r,data:e,code:t});case"AuthenticationError":return new Pr({message:r,data:e,code:t});default:return new Co({message:r,data:e,code:t})}}var Gr=(d=>(d.SchemaValidationError="SchemaValidationError",d.DatabaseError="DatabaseError",d.InputError="InputError",d.UnknownError="UnknownError",d.ConstraintError="ConstraintError",d.ConnectionError="ConnectionError",d.StreamError="StreamError",d.AuthenticationError="AuthenticationError",d))(Gr||{}),qe=(k=>(k.AUTHENTICATION_FAILED="AUTHENTICATION_FAILED",k.BAL_FUTURE_DATETIME="BAL_FUTURE_DATETIME",k.CONFLICTING_OPTIONS="CONFLICTING_OPTIONS",k.CONTRACT_OWNER_NOT_FOUND="CONTRACT_OWNER_NOT_FOUND",k.DATABASE_ERROR="DATABASE_ERROR",k.DISTRIBUTION_MISSING_TARGETS="DISTRIBUTION_MISSING_TARGETS",k.EXCHANGE_MISSING_TARGETS="EXCHANGE_MISSING_TARGETS",k.IMPORT_MISSING_CONTRACT_TOKEN="IMPORT_MISSING_CONTRACT_TOKEN",k.IMPORT_MISSING_TOKEN_WALLET="IMPORT_MISSING_TOKEN_WALLET",k.IMPORT_OBJECT_DUPLICATE="IMPORT_OBJECT_DUPLICATE",k.IMPORT_OBJECT_EXISTS="IMPORT_OBJECT_EXISTS",k.IMPORT_PREDATED_TRANSFER="IMPORT_PREDATED_TRANSFER",k.IMPORT_USE_BEFORE_CREATE="IMPORT_USE_BEFORE_CREATE",k.INPUT_NEEDS_IDENTIFIER="INPUT_NEEDS_IDENTIFIER",k.INPUT_NEEDS_TOKEN="INPUT_NEEDS_TOKEN",k.INPUT_STREAM_ERROR="INPUT_STREAM_ERROR",k.INPUT_STREAM_TIMEOUT="INPUT_STREAM_TIMEOUT",k.INPUT_STREAM_INVALID="INPUT_STREAM_INVALID",k.INPUT_STREAM_NOT_ALLOWED="INPUT_STREAM_NOT_ALLOWED",k.INPUT_INVALID="INPUT_INVALID",k.INVALID_COMPLEX_FILTER="INVALID_COMPLEX_FILTER",k.INVALID_FIELD_AGR_COMB="INVALID_FIELD_AGR_COMB",k.INVALID_FIELD_FOR_MODEL="INVALID_FIELD_FOR_MODEL",k.INVALID_LATEST_HASH="INVALID_LATEST_HASH",k.INVALID_MODEL="INVALID_MODEL",k.NO_METADATA_ON_MODEL="NO_METADATA_ON_MODEL",k.RUNNING_BALANCE_WITHOUT_WALLET="RUNNING_BALANCE_WITHOUT_WALLET",k.SIGNED_AMOUNT_WITHOUT_WALLET="SIGNED_AMOUNT_WITHOUT_WALLET",k.TOKEN_INVALID_WALLET="TOKEN_INVALID_WALLET",k.TOKEN_LIMIT_REACHED="TOKEN_LIMIT_REACHED",k.TR_AMOUNT_NOT_DIVISIBLE="TR_AMOUNT_NOT_DIVISIBLE",k.TR_CANCELLED_CANT_RV="TR_CANCELLED_CANT_RV",k.TR_CANT_UPDATE_TO_PENDING="TR_CANT_UPDATE_TO_PENDING",k.TR_DEPOSIT_CANT_RV_WITHOUT_FLAG="TR_DEPOSIT_CANT_RV_WITHOUT_FLAG",k.TR_FROM_WALLET_DEPOSIT="TR_FROM_WALLET_DEPOSIT",k.TR_FROM_WALLET_STATUS_CONSTRAINT="TR_FROM_WALLET_STATUS_CONSTRAINT",k.TR_INVALID_BALANCE="TR_INVALID_BALANCE",k.TR_INVALID_CANCELLED="TR_INVALID_CANCELLED",k.TR_TIMESTAMP_IN_PAST="TR_TIMESTAMP_IN_PAST",k.TR_TO_WALLET_STATUS_CONSTRAINT="TR_TO_WALLET_STATUS_CONSTRAINT",k.TR_TO_WALLET_WITHDRAWAL="TR_TO_WALLET_WITHDRAWAL",k.TR_TOKEN_DISABLED="TR_TOKEN_DISABLED",k.TR_TOKEN_DWONLY="TR_TOKEN_DWONLY",k.TR_TRG_CLOSED="TR_TRG_CLOSED",k.TR_TRG_STATUS_MISMATCH="TR_TRG_STATUS_MISMATCH",k.TR_WITHDRAWAL_CANT_RV_WITHOUT_FLAG="TR_WITHDRAWAL_CANT_RV_WITHOUT_FLAG",k.TRANSACTION_NOT_FOUND="TRANSACTION_NOT_FOUND",k.TRANSACTION_TIMEOUT="TRANSACTION_TIMEOUT",k.TRG_BALANCE_CHECK_REQUIRED_WITHOUT_STATUS_LOCK="TRG_BALANCE_CHECK_REQUIRED_WITHOUT_STATUS_LOCK",k.TRG_CANCELLED_CANT_RV="TRG_CANCELLED_CANT_RV",k.TRG_DEPOSIT_CANT_RV_WITHOUT_FLAG="TRG_DEPOSIT_CANT_RV_WITHOUT_FLAG",k.TRG_SINGLE_PENDING_TR_CANT_RV="TRG_SINGLE_PENDING_TR_CANT_RV",k.TRG_WITHDRAWAL_CANT_RV_WITHOUT_FLAG="TRG_WITHDRAWAL_CANT_RV_WITHOUT_FLAG",k.UNCLEAR_AGGREGATOR="UNCLEAR_AGGREGATOR",k.TR_MISSING_FILTER="TR_MISSING_FILTER",k.TRG_MISSING_FILTER="TRG_MISSING_FILTER",k.HTTP_BODY_SIZE="HTTP_BODY_SIZE",k.METHOD_DISABLED="METHOD_DISABLED",k.DATABASE_IMPORT_UNEXPECTED_ERROR="DATABASE_IMPORT_UNEXPECTED_ERROR",k.DATABASE_IMPORT_NOT_FOUND="DATABASE_IMPORT_NOT_FOUND",k.DATABASE_EXPORT_CONFLICT="DATABASE_EXPORT_CONFLICT",k.DATABASE_IMPORT_CONFLICT="DATABASE_IMPORT_CONFLICT",k.DATABASE_EXPORT_UNEXPECTED_ERROR="DATABASE_EXPORT_UNEXPECTED_ERROR",k.DATABASE_EXPORT_LIST_UNEXPECTED_ERROR="DATABASE_EXPORT_LIST_UNEXPECTED_ERROR",k.DATABASE_IMPORT_PROGRESS_NOT_FOUND="DATABASE_IMPORT_PROGRESS_NOT_FOUND",k.DATABASE_IMPORT_PROGRESS_UNEXPECTED_ERROR="DATABASE_IMPORT_PROGRESS_UNEXPECTED_ERROR",k.DATABASE_EXPORT_PROGRESS_NOT_FOUND="DATABASE_EXPORT_PROGRESS_NOT_FOUND",k.DATABASE_EXPORT_PROGRESS_UNEXPECTED_ERROR="DATABASE_EXPORT_PROGRESS_UNEXPECTED_ERROR",k))(qe||{}),Hm={AUTHENTICATION_FAILED:"Provided credentials are invalid",BAL_FUTURE_DATETIME:"Balance datetime can't be in the future",CONFLICTING_OPTIONS:"return_running_balance and return_running_balance_for can't be specified together",CONTRACT_OWNER_NOT_FOUND:"Unable to find Wallet specified as Contract token owner",DATABASE_ERROR:"Something went wrong in the DB layer",DISTRIBUTION_MISSING_TARGETS:"Unable to resolve all targets (Wallets, Tokens) for distribution request",EXCHANGE_MISSING_TARGETS:"Unable to resolve all targets (Wallets, Token) for exchange request",IMPORT_MISSING_CONTRACT_TOKEN:"The import contract specifies Token that does not exist",IMPORT_MISSING_TOKEN_WALLET:"The import results in invalid Token without valid Wallet",IMPORT_OBJECT_DUPLICATE:"The import includes create directives for same object multiple times",IMPORT_OBJECT_EXISTS:"The import includes create directives for already existing objects",IMPORT_PREDATED_TRANSFER:"The oldest Transfer in the import file is older than already existing Transfers in the WAPI instance",IMPORT_USE_BEFORE_CREATE:"The import includes create directive for object that is used in Transfer before create dateTime",INPUT_NEEDS_IDENTIFIER:"Missing identifier - automatically calculated identifiers conflict on identical input for 30s To make an identical transfer during that window you need to provide a unique identifier",INPUT_NEEDS_TOKEN:"token must be specified on input or in client config",INPUT_STREAM_ERROR:"Input stream emitted an error",INPUT_STREAM_TIMEOUT:"No data provided to input stream in 30s",INPUT_STREAM_INVALID:"Invalid input stream identifier provided",INPUT_STREAM_NOT_ALLOWED:"Method does not support input stream",INPUT_INVALID:"Invalid input on stream",INVALID_COMPLEX_FILTER:"The provided complex filter does not pass validation",INVALID_FIELD_AGR_COMB:"Provided aggregation field was not found on Model",INVALID_FIELD_FOR_MODEL:"Provided groupBy field was not found on Model",INVALID_LATEST_HASH:"Provided latest_control_hash does not match the latest outgoing Transfer from Wallet",INVALID_MODEL:"Provided Model name is invalid",NO_METADATA_ON_MODEL:"Can't use metadata field for grouping as current Model does not have metadata",RUNNING_BALANCE_WITHOUT_WALLET:"return_running_balance option requires Wallet filter to be specified",SIGNED_AMOUNT_WITHOUT_WALLET:"return_signed_balance option requires Wallet filter to be specified",TOKEN_INVALID_WALLET:"Invalid belongs_to wallet provided",TOKEN_LIMIT_REACHED:"Unable to issue more tokens as Token.limit has been reached",TR_AMOUNT_NOT_DIVISIBLE:"Transfer amount is not divisible by specified Token.divisor",TR_CANCELLED_CANT_RV:"Cancelled Transfer can not be reversed",TR_CANT_UPDATE_TO_PENDING:"Transfer status can only move from 'pending'->'finished'/'cancelled",TR_DEPOSIT_CANT_RV_WITHOUT_FLAG:"Deposits are expected connection points with outside systems, thus extra validation is required. Reversing a Transfer.type = 'deposit' requires reverse_deposit option to be true.",TR_FROM_WALLET_DEPOSIT:"From wallet can't be specified when doing a deposit",TR_FROM_WALLET_STATUS_CONSTRAINT:"From wallet.status doesn't allow this type of transfers",TR_INVALID_BALANCE:"Transfer results in invalid balance for a Wallet",TR_INVALID_CANCELLED:"Cant create cancelled transfer",TR_TIMESTAMP_IN_PAST:"Transfer.created_at must be the latest",TR_TO_WALLET_STATUS_CONSTRAINT:"To wallet.status doesn't allow this type of transfers",TR_TO_WALLET_WITHDRAWAL:"To wallet can't be specified when doing a withdrawal",TR_TOKEN_DISABLED:"Token status is set to 'disabled' - no new transfers allowed",TR_TOKEN_DWONLY:"Token status is set to 'dw-only' - only deposits or withdrawals allowed",TR_TRG_CLOSED:"Cant add Transfer to group. TransferGroup is closed",TR_TRG_STATUS_MISMATCH:"Transfers in transfer_group must match transfer_group.transfer_status",TR_WITHDRAWAL_CANT_RV_WITHOUT_FLAG:"Withdrawals are expected connection points with outside systems, thus extra validation is required. Reversing a Transfer.type = 'withdrawal' requires reverse_withdrawal option to be true.",TRANSACTION_NOT_FOUND:"No open DB transaction with provided was found",TRANSACTION_TIMEOUT:"Transaction timed out",TRG_BALANCE_CHECK_REQUIRED_WITHOUT_STATUS_LOCK:"For integrity reasons running balance validations are required if TransferGroup.transfer_status_lock = false",TRG_CANCELLED_CANT_RV:"Cancelled TransferGroup can not be reversed",TRG_DEPOSIT_CANT_RV_WITHOUT_FLAG:"TransferGroup includes Transfer.type = 'deposit', thus for extra validation the reverse_deposit option must be set true",TRG_SINGLE_PENDING_TR_CANT_RV:"Transfer is part of TransferGroup and can not be reversed separately",TRG_WITHDRAWAL_CANT_RV_WITHOUT_FLAG:"TransferGroup includes Transfer.type = 'withdrawal', thus for extra validation the reverse_withdrawal option must be set true",UNCLEAR_AGGREGATOR:"Invalid aggregator function provided",TR_MISSING_FILTER:"Transactions can't reversed or updated without valid filter",TRG_MISSING_FILTER:"Transaction groups can't reversed or updated without valid filter",HTTP_BODY_SIZE:"Http body size can't be more than 100MB",METHOD_DISABLED:"Method is disabled",DATABASE_IMPORT_UNEXPECTED_ERROR:"Unexpected error while importing database",DATABASE_IMPORT_NOT_FOUND:"Database import file not found",DATABASE_EXPORT_CONFLICT:"Database export already in progress",DATABASE_IMPORT_CONFLICT:"Database import already in progress",DATABASE_EXPORT_UNEXPECTED_ERROR:"Unexpected error while creating database export",DATABASE_EXPORT_LIST_UNEXPECTED_ERROR:"Unexpected error while listing database backups",DATABASE_IMPORT_PROGRESS_NOT_FOUND:"Import database progress not found",DATABASE_IMPORT_PROGRESS_UNEXPECTED_ERROR:"Unexpected error while getting database import progress",DATABASE_EXPORT_PROGRESS_NOT_FOUND:"Database backup progress not found",DATABASE_EXPORT_PROGRESS_UNEXPECTED_ERROR:"Unexpected error while getting database backup progress"};var Wi,zm=new Uint8Array(16);function Go(){if(!Wi&&(Wi=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Wi))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Wi(zm)}var be=[];for(let r=0;r<256;++r)be.push((r+256).toString(16).slice(1));function cu(r,e=0){return be[r[e+0]]+be[r[e+1]]+be[r[e+2]]+be[r[e+3]]+"-"+be[r[e+4]]+be[r[e+5]]+"-"+be[r[e+6]]+be[r[e+7]]+"-"+be[r[e+8]]+be[r[e+9]]+"-"+be[r[e+10]]+be[r[e+11]]+be[r[e+12]]+be[r[e+13]]+be[r[e+14]]+be[r[e+15]]}var Km=typeof crypto!="undefined"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Do={randomUUID:Km};function Qm(r,e,t){if(Do.randomUUID&&!e&&!r)return Do.randomUUID();r=r||{};let n=r.random||(r.rng||Go)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,e){t=t||0;for(let a=0;a<16;++a)e[t+a]=n[a];return e}return cu(n)}var tr=Qm;function Ct(r=8){return tr().split("-").pop().substr(0,r)}var Eo={timeouts:{},values:{},set(r,e){this.timeouts[r]=setTimeout(()=>this.clear(r),3e4),this.values[r]=e},get(r){return this.values[r]},getKey(r){let e=JSON.parse(JSON.stringify(r)),t="";return Object.keys(e).sort().forEach(n=>{let a="";e[n]&&typeof e[n]=="object"&&!Array.isArray(e[n])?a=this.getKey(e[n]):a=JSON.stringify(e[n]),t+=n+":"+a}),t},clear(r){this.timeouts[r]&&clearTimeout(this.timeouts[r]),delete this.timeouts[r],delete this.values[r]},clearAll(){Object.keys(this.timeouts).forEach(r=>{clearTimeout(this.timeouts[r])}),this.timeouts={},this.values={}}};function je(r){if(!r)return tr();let e=Eo.getKey(r);if(Eo.get(e))throw new oe({message:"INPUT_NEEDS_IDENTIFIER",data:r});let t=tr();return Eo.set(e,t),t}function _u(r){return new Promise(e=>setTimeout(e,r))}function gu(){return je()}function Ai(r){return JSON.parse(JSON.stringify(r))}function at(r,e,t){if(e in r){if(r[e]===void 0)throw new Re({message:`undefined provided for ${e}`,data:r});return r}if(!t)throw new Re({message:`${e} is required if no default set`,data:r});let n=Ai(r);return n[e]=t,n}function v(r){let e=Tu(r);if(e!=null)return{foreign:e}}function K(r){let e=Tu(r);if(e!=null)return{identifier:e}}function C({input:r,options:e,validate:t}){var a;let n=Ai(r);return(a=n.options)!=null||(n.options=e!=null?e:{}),t(n)}function Tu(r){return r==null?r:r+""}function Jm(r){return Object.keys(r).filter(e=>r[e]!==void 0).map(e=>`${encodeURIComponent(e)}=${encodeURIComponent(r[e])}`).join("&")}function mu(r){return r.host.replace(/^https:/,"wss:")+"?"+Jm({apikey:r.apikey,apisecret:r.apisecret,db:r.database,clientVersion:r.clientVersion})}function yu(r){return typeof window=="undefined"?[mu(r),{rejectUnauthorized:r.rejectUnauthorized}]:[mu(r)]}function Ni(r,e){let t={};return Object.keys(r).forEach(n=>{e[n]?typeof e[n]=="string"?t[e[n]]=r[n]:t[n]=e[n](r[n]):t[n]=r[n]}),t}function st(r){return r.split(",").map(e=>e.split(" ")).map(e=>{let[t,n]=e;return{field:t,direction:n==="desc"?"desc":"asc"}})}function bu(r){return new Date(r).setHours(0,0,0,0)>new Date().setHours(0,0,0,0)}function Xm(r){return r%4===0&&(r%100!==0||r%400===0)}var Ym=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,Zm=[0,31,28,31,30,31,30,31,31,30,31,30,31];function hu(r){let e=Ym.exec(r);if(!e)return!1;let t=+e[1],n=+e[2],a=+e[3];return n>=1&&n<=12&&a>=1&&a<=(n===2&&Xm(t)?29:Zm[n])}var eh=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i;function th(r,e){let t=eh.exec(r);if(!t)return!1;let n=+t[1],a=+t[2],s=+t[3],i=t[5];return(n<=23&&a<=59&&s<=59||n===23&&a===59&&s===60)&&(!e||i!=="")}var rh=/t|\s/i;function Fu(r){let e=r.split(rh);return e.length===1?hu(e[0]):e.length===2&&hu(e[0])&&th(e[1])}var Dr=class{constructor(e){this._data=[];this._error=[];this._end=[];this._finished=!1;this._options=e}on(e,t){switch(e){case"data":return this._data.push(t),this;case"end":return this._end.push(t),this;case"error":return this._error.push(t),this}}push(e){if(this._finished)throw new Error("Stream is closed");return e===null?this.end():(this._data.forEach(t=>t(e)),this)}error(e){if(this._finished)throw new Error("Stream is closed");return this._error.forEach(t=>t(e)),this}end(){if(this._finished)throw new Error("Stream is closed");return this._end.forEach(e=>e()),this._finished=!0,this}destroy(e){return this.error(e),this.end(),this}},Ui=class{constructor(){throw new TypeError("used in node version")}pipe(...e){throw new TypeError("used in node version")}pause(){throw new TypeError("used in node version")}resume(){throw new TypeError("used in node version")}on(...e){throw new TypeError("used in node version")}};var mt=class{constructor(e){this.streamObject=new Dr({objectMode:!0});this.outStreamObject=new Dr({objectMode:!0});this.started=!1;this.makeRequest=e}start(e){if(this.mode&&this.mode!==e)throw new Error("Already in use as "+this.mode);if(this.started)return;if(this.promise=new Promise((n,a)=>{this.resolve=n,this.reject=a}),this.started=!0,this.mode=e,this.makeRequest===void 0){this.streamObject.push(null),this.resolve(void 0);return}this.makeRequest(this.streamObject).catch(this.reject);let t=[];if(this.mode==="stream"){this.streamObject.on("data",n=>{if(n||this.outStreamObject.push(n),n.error){let a=Po(n.error);return this.outStreamObject.destroy(a),this.streamObject.destroy(a)}if(!n.prop){t.push(n);return}if(n.dataArr){let a=P({},n);delete a.dataArr,n.dataArr.forEach(s=>{this.outStreamObject.push(Z(P({},a),{data:s}))});return}this.outStreamObject.push(n)}).on("end",()=>{let n=t.pop();if(!n)return;let a=n.result;Object.keys(a).forEach(s=>{Array.isArray(a[s])&&(a[s].forEach(i=>{this.outStreamObject.push({type:"streamChunk",prop:s,data:i})}),a[s]=[])}),this.outStreamObject.push(n),this.outStreamObject.push(null)}).on("error",n=>{this.outStreamObject.destroy(n)});return}if(this.mode==="promise"){let n=new Map;this.streamObject.on("data",a=>{var i;if(a===void 0)return;if(a.error){let o=Po(a.error);return this.streamObject.destroy(o)}if(!a.prop){t.push(a);return}let s=(i=n.get(a.prop))!=null?i:[];a.dataArr?s.push(...a.dataArr):s.push(a.data),n.set(a.prop,s)}).on("end",()=>{let a=t.pop();if(!a)return;let s=a.result;if(!n.size)return this.resolve(s);let i=!1;n.forEach((o,d)=>{Array.isArray(s[d])?(o.push(...s[d]),s[d]=o):o.length===1?s[d]=o:(this.streamObject.destroy(new Cr({message:"Received multiple chunks for non-array property "+d,code:"StreamError",data:o})),i=!0)}),i||this.resolve(s)}).on("error",this.reject)}}then(e,t){return this.start("promise"),this.promise.then(e,t)}catch(e){return this.start("promise"),this.promise.catch(e)}stream(){return this.start("stream"),this.outStreamObject}};var Er=class extends mt{constructor(e,t){super(e),this.inputStream=t}input(e){return e?typeof e=="function"?(e(this.inputStream),this):(console.warn("currently disabled"),this):this.inputStream}};var Nc=Lm(Wc(),1);var hd={$schema:"http://json-schema.org/draft-07/schema",$id:"JSONRPCRequest",description:"A JSON RPC 2.0 request",oneOf:[{description:"An individual request",$ref:"#/definitions/request"}],definitions:{request:{type:"object",required:["jsonrpc","method"],properties:{jsonrpc:{enum:["2.0"]},method:{type:"string"},id:{type:["string","number","null"],note:["While allowed, null should be avoided: http://www.jsonrpc.org/specification#id1","While allowed, a number with a fractional part should be avoided: http://www.jsonrpc.org/specification#id2"]},params:{type:["array","object"]}}}}};var _d={$schema:"http://json-schema.org/draft-07/schema",$id:"JSONRPCResponse",description:"A JSON RPC 2.0 response",oneOf:[{$ref:"#/definitions/success"},{$ref:"#/definitions/error"}],definitions:{common:{required:["id","jsonrpc"],not:{description:"cannot have result and error at the same time",required:["result","error"]},type:"object",properties:{id:{type:["string","integer","null"],note:["spec says a number which should not contain a fractional part","We choose integer here, but this is unenforceable with some languages"]},jsonrpc:{enum:["2.0"]}}},success:{description:"A success. The result member is then required and can be anything.",allOf:[{$ref:"#/definitions/common"},{required:["result"]}]},error:{allOf:[{$ref:"#/definitions/common"},{required:["error"],properties:{error:{type:"object",required:["code","message"],properties:{code:{type:"integer",note:["unenforceable in some languages"]},message:{type:"string"},data:{description:"optional, can be anything"}}}}}]}}};var gd={$schema:"http://json-schema.org/draft-07/schema",$id:"ClientOptions",description:"Client input options",type:"object",properties:{client:{$ref:"#/definitions/ClientType"},connection:{anyOf:[{$ref:"#/definitions/ws_connection"},{$ref:"#/definitions/https_connection"}]}},required:["client","connection"],additionalProperties:!1,definitions:{ClientType:{$id:"ClientType",type:"string",enum:["ws","https"]},ws_connection:{description:"Connection options for ws api",type:"object",properties:{host:{description:"URL of the API",type:"string"},apikey:{description:"API key for the client",type:"string"},apisecret:{description:"API secret for the client",type:"string"}},required:["host","apikey","apisecret"]},https_connection:{description:"Connection options for https api",type:"object",properties:{host:{description:"URL of the API",type:"string"},jwt:{description:"Auth token for calling api",type:"string"}},required:["host"]}}};var qt={$schema:"http://json-schema.org/draft-07/schema",$id:"Consts",description:"Enums and consts used by the system",definitions:{Flags:{$id:"Flags",$comment:"knex|manual",description:"Allowed filtering functions",type:"object",properties:{allow_timestamps:{description:"Allow setting timestamps in transfer insert/update statements",type:"boolean"},production:{description:"Is running in production mode?",type:"boolean"}},$typescript:'{"additionalProperties":false}'},DbFilterMetadata:{$id:"FilterMetadata",$comment:"knex|manual",description:"Metadata filtering object",type:"object",propertyNames:{type:"string",format:"validkey"},patternProperties:{".*":{type:["string","boolean","number"]}}},DbFilterFunctionWherePrimitive:{$id:"DbFilterFunctionWherePrimitive",$comment:"knex|manual",description:"Filtering for where and orWhere",type:"object",properties:{function:{$ref:"#/definitions/DbFilterFunctionBasic"},field:{type:"string"},operator:{$ref:"#/definitions/DbFilterOperatorExtended"},value:{type:["string","number","boolean"]}},required:["function","field","value"],$typescript:'{"additionalProperties": false}'},DbFilterFunctionWherePrimitiveForeign:{$id:"DbFilterFunctionWherePrimitiveForeign",$comment:"knex|manual",description:"Filtering for where and orWhere",type:"object",properties:{function:{$ref:"#/definitions/DbFilterFunctionBasic"},field:{type:"string"},operator:{$ref:"#/definitions/DbFilterOperatorExtended"},value:{anyOf:[{type:["string","number","boolean"]},{type:"object",properties:{foreign:{type:["string","number"]}},required:["foreign"],$typescript:'{"additionalProperties": false}'}]}},required:["function","field","value"],$typescript:'{"additionalProperties": false}'},DbFilterFunctionWherePrimitiveIdentifier:{$id:"DbFilterFunctionWherePrimitiveIdentifier",$comment:"knex|manual",description:"Filtering for where and orWhere",type:"object",properties:{function:{$ref:"#/definitions/DbFilterFunctionBasic"},field:{type:"string"},operator:{$ref:"#/definitions/DbFilterOperatorExtended"},value:{anyOf:[{type:["string","number","boolean"]},{type:"object",properties:{identifier:{type:["string","number"]}},required:["identifier"],$typescript:'{"additionalProperties": false}'}]}},required:["function","field","value"],$typescript:'{"additionalProperties": false}'},DbFilterFunctionWhereMetadataPrimitive:{$id:"DbFilterFunctionWhereMetadataPrimitive",$comment:"knex|manual",description:"Filtering for where and orWhere",type:"object",properties:{function:{$ref:"#/definitions/DbFilterFunctionMetadataBasic"},field:{type:"string"},operator:{$ref:"#/definitions/DbFilterOperatorExtended"},value:{type:["string","number","boolean"]}},required:["function","field","value"],$typescript:'{"additionalProperties": false}'},DbFilterFunctionMetadataBasic:{$id:"DbFilterFunctionMetadataBasic",$comment:"knex|manual",type:"string",enum:["whereMetadata","orWhereMetadata"]},DbFilterFunctionWhereObject:{$id:"DbFilterFunctionWhereObject",$comment:"knex|manual",description:"Filtering for where and orWhere",type:"object",properties:{function:{$ref:"#/definitions/DbFilterFunctionBasic"},value:{type:"object",properties:{metadata:{$ref:"#/definitions/DbFilterMetadata"}}}},required:["function","value"],$typescript:'{"additionalProperties": false}'},DbFilterFunctionBasic:{$id:"DbFilterFunctionBasic",$comment:"knex|manual",type:"string",enum:["where","orWhere"]},DbFilterFunctionWhereIns:{$id:"DbFilterFunctionWhereIns",$comment:"knex|manual",description:"Filtering for whereIn and orWhereIn",type:"object",properties:{function:{$ref:"#/definitions/DbFilterFunctionIn"},field:{type:"string"},value:{anyOf:[{type:"array",items:{type:"string"},minItems:1},{type:"array",items:{type:"number"},minItems:1}]}},required:["function","field","value"],$typescript:'{"additionalProperties": false}'},DbFilterFunctionIn:{$id:"DbFilterFunctionIn",$comment:"knex|manual",type:"string",enum:["whereIn","orWhereIn"]},DbFilterFunctionWhereMetadataIns:{$id:"DbFilterFunctionWhereMetadataIns",$comment:"knex|manual",description:"Filtering for whereIn and orWhereIn for metadata",type:"object",properties:{function:{$ref:"#/definitions/DbFilterFunctionMetadataIn"},field:{type:"string"},value:{anyOf:[{type:"array",items:{type:"string"},minItems:1},{type:"array",items:{type:"number"},minItems:1}]}},required:["function","field","value"],$typescript:'{"additionalProperties": false}'},DbFilterFunctionMetadataIn:{$id:"DbFilterFunctionMetadataIn",$comment:"knex|manual",type:"string",enum:["whereMetadataIn","orWhereMetadataIn"]},DbFilterFunctionWhereMetadataNulls:{$id:"DbFilterFunctionWhereMetadataNulls",$comment:"knex|manual",description:"Filtering for whereNull and orWhereNull, whereNotNull and orWhereNotNull for metadata",type:"object",properties:{function:{$ref:"#/definitions/DbFilterFunctionMetadataNull"},field:{type:"string"}},required:["function","field"],$typescript:'{"additionalProperties": false}'},DbFilterFunctionMetadataNull:{$id:"DbFilterFunctionMetadataNull",$comment:"knex|manual",type:"string",enum:["whereMetadataNull","orWhereMetadataNull","whereMetadataNotNull","orWhereMetadataNotNull"]},DbFilterFunctionWhereNulls:{$id:"DbFilterFunctionWhereNulls",$comment:"knex|manual",description:"Filtering for whereNull and orWhereNull, whereNotNull and orWhereNotNull",type:"object",properties:{function:{$ref:"#/definitions/DbFilterFunctionNull"},field:{type:"string"}},required:["function","field"],$typescript:'{"additionalProperties": false}'},DbFilterFunctionNull:{$id:"DbFilterFunctionNull",$comment:"knex|manual",type:"string",enum:["whereNull","orWhereNull","whereNotNull","orWhereNotNull"]},DbFilterOperator:{$id:"DbFilterOperator",$comment:"knex|manual",description:"Allowed filtering operators, ignored when value is not primitive",type:"string",enum:["=",">=","<=","<",">"],default:"="},DbFilterOperatorString:{$id:"DbFilterOperatorString",$comment:"knex|manual",description:"Allowed filtering operators for strings",type:"string",enum:["like","ilike"]},DbFilterOperatorExtended:{$id:"DbFilterOperatorExtended",$comment:"knex|manual",description:"Allowed filtering operators, ignored when value is not primitive",type:"string",enum:["=",">=","<=","<",">","like","ilike"],default:"="},DbFilter:{$id:"DbFilter",$comment:"knex|manual",anyOf:[{$ref:"#/definitions/DbFilterMetadata"},{$ref:"#/definitions/DbFilterFunctionWhereInner"},{$ref:"#/definitions/DbFilterFunctionWherePrimitive"},{$ref:"#/definitions/DbFilterFunctionWherePrimitiveForeign"},{$ref:"#/definitions/DbFilterFunctionWherePrimitiveIdentifier"},{$ref:"#/definitions/DbFilterFunctionWhereMetadataPrimitive"},{$ref:"#/definitions/DbFilterFunctionWhereObject"},{$ref:"#/definitions/DbFilterFunctionWhereIns"},{$ref:"#/definitions/DbFilterFunctionWhereMetadataIns"},{$ref:"#/definitions/DbFilterFunctionWhereMetadataNulls"},{$ref:"#/definitions/DbFilterFunctionWhereNulls"}]},DbFilterFunctionWhereInner:{$id:"DbFilterFunctionWhereInner",$comment:"knex|manual",description:"Filtering for where and orWhere",type:"object",properties:{function:{$ref:"#/definitions/DbFilterFunctionBasic"},inner:{type:"array",items:{$ref:"#/definitions/DbFilter"}}},required:["function","inner"],$typescript:'{"additionalProperties": false}'},TokenType:{$id:"TokenType",$comment:"model",description:"DB type values for TokenType",type:"string",enum:["value","share","group","contract"]},TokenStatus:{$id:"TokenStatus",$comment:"model",description:"DB type values for TokenStatus",type:"string",enum:["active","dw-only","disabled"]},TransferGroupStatus:{$id:"TransferGroupStatus",$comment:"model",description:"DB type values for TransferGroupStatus",type:"string",enum:["open","closed"]},TransferStatus:{$id:"TransferStatus",$comment:"model",description:"DB type values for TransferStatus",type:"string",enum:["pending","finished","cancelled"]},TransferStatusInput:{$id:"TransferStatusInput",$comment:"model",description:"DB type input values for TransferStatus",type:"string",enum:["pending","finished"]},TransferGroupType:{$id:"TransferGroupType",$comment:"model",description:"DB type values for TransferGroupType",type:"string",enum:["regular","exchange","distribution"]},TransferType:{$id:"TransferType",$comment:"model",description:"DB type values for TransferType",type:"string",enum:["transfer","deposit","withdrawal"]},WalletType:{$id:"WalletType",$comment:"model",description:"DB type values for WalletType",type:"string",enum:["token","house","regular"]},WalletStatus:{$id:"WalletStatus",$comment:"model",description:"DB type values for WalletStatus",type:"string",enum:["active","disabled"]},WapiSettingType:{$id:"WapiSettingType",$comment:"model",description:"DB type values for WapiSettingType",type:"string",enum:["flag","setting"]},DbModelName:{$id:"DbModelName",$comment:"model",description:"DB Model Names",type:"string",enum:["Token","TransferGroup","TransferLog","Transfer","WalletTokenSetting","Wallet","WapiSetting"]}}};var fn={$schema:"http://json-schema.org/draft-07/schema",$id:"TokenTableInput",title:"TokenTableInput",description:"Units of value which can be transferred in this system",type:"object",properties:{foreign:{description:"Name of the token, used for name based token transfers. Must be unique",type:"string",maxLength:255,minLength:1},public:{description:"Boolean indicating if token can be traded with outside seed wallet",default:!0,type:"boolean"},metadata:{description:"Key/value object describing the token",type:["object","null"]},divisor:{description:"Minimum amount of token that can be transferred",type:["number","null"]},limit:{description:"Maximum amount of token that can be issued",type:["number","null"]},type:{description:"Type of the token",default:"value",$ref:"/db/consts.schema.json#/definitions/TokenType"},status:{description:"Current status for the token",default:"active",$ref:"/db/consts.schema.json#/definitions/TokenStatus"}},additionalProperties:!1,required:["foreign"]};var un={$schema:"http://json-schema.org/draft-07/schema",$id:"TokenTable",title:"TokenTable",description:"Units of value which can be transferred in this system",type:"object",properties:{id:{description:"System defined primary key",type:"integer"},foreign:{description:"Name of the token, used for name based token transfers. Must be unique",type:"string",maxLength:255,minLength:1},public:{description:"Boolean indicating if token can be traded with outside seed wallet",default:!0,type:"boolean"},belongs_to:{description:"Foreign key to seed wallet",type:"integer"},created_at:{description:"Datetime when the token was created",type:"string",format:"date-time"},updated_at:{description:"Datetime when the token was last updated",type:"string",format:"date-time"},metadata:{description:"Key/value object describing the token",type:["object","null"]},divisor:{description:"Minimum amount of token that can be transferred",type:["number","null"]},limit:{description:"Maximum amount of token that can be issued",type:["number","null"]},type:{description:"Type of the token",default:"value",$ref:"/db/consts.schema.json#/definitions/TokenType"},status:{description:"Current status for the token",default:"active",$ref:"/db/consts.schema.json#/definitions/TokenStatus"}},additionalProperties:!1,definitions:{TokenTableAccessibleFields:{$id:"TokenTableAccessibleFields",type:"string",enum:["id","foreign","public","metadata","divisor","limit","type","status"]},TokenTableFields:{$id:"TokenTableFields",type:"string",enum:["id","foreign","public","belongs_to","created_at","updated_at","metadata","divisor","limit","type","status"]},TokenTableStringFields:{$id:"TokenTableStringFields",type:"string",enum:["foreign","created_at","updated_at","type","status"]},TokenTableObjectFields:{$id:"TokenTableObjectFields",type:"string",enum:["metadata"]},TokenTableNumberFields:{$id:"TokenTableNumberFields",type:"string",enum:["id","belongs_to","divisor","limit"]},TokenTableBooleanFields:{$id:"TokenTableBooleanFields",type:"string",enum:["public"]}},required:["id","foreign","public","belongs_to","created_at","updated_at","type","status"]};var Td={$schema:"http://json-schema.org/draft-07/schema",$id:"TokenTableOptional",title:"TokenTableOptional",description:"Units of value which can be transferred in this system Only require id, other fields are optional",type:"object",properties:{id:{description:"System defined primary key",type:"integer"},foreign:{description:"Name of the token, used for name based token transfers. Must be unique",type:"string",maxLength:255,minLength:1},public:{description:"Boolean indicating if token can be traded with outside seed wallet",default:!0,type:"boolean"},belongs_to:{description:"Foreign key to seed wallet",type:"integer"},created_at:{description:"Datetime when the token was created",type:"string",format:"date-time"},updated_at:{description:"Datetime when the token was last updated",type:"string",format:"date-time"},metadata:{description:"Key/value object describing the token",type:["object","null"]},divisor:{description:"Minimum amount of token that can be transferred",type:["number","null"]},limit:{description:"Maximum amount of token that can be issued",type:["number","null"]},type:{description:"Type of the token",default:"value",$ref:"/db/consts.schema.json#/definitions/TokenType"},status:{description:"Current status for the token",default:"active",$ref:"/db/consts.schema.json#/definitions/TokenStatus"}},additionalProperties:!1,required:["id"]};var ln={$schema:"http://json-schema.org/draft-07/schema",$id:"TransferTableInput",title:"TransferTableInput",description:"A transfer of value from one wallet to another",type:"object",properties:{identifier:{description:"Identifier for this transfer. Must be unique",type:"string",maxLength:255,minLength:1},control_hash:{description:'Hash binding this transfer to the from_wallets transfer chain. It is calculated as sha256(latest_outgoing_hash + "-" + NEW.identifier)',type:["string","null"],maxLength:255},from_wallet_id:{description:"Foreign key to wallet funds originate from",type:"integer"},to_wallet_id:{description:"Foreign key to wallet where funds are going",type:"integer"},token_id:{description:"Foreign key to token this transfer refers to",type:"integer"},amount:{description:"The transfer amount",type:"number"},type:{description:"Type of the transfer",default:"transfer",$ref:"/db/consts.schema.json#/definitions/TransferType"},status:{description:"Status of the transfer",default:"finished",$ref:"/db/consts.schema.json#/definitions/TransferStatusInput"},force:{description:"Set to true to force transfer without checking for negative balance constraints",default:!1,type:"boolean"},created_at:{description:"Datetime when this transfer was created - can only be latest",type:"string",format:"date-time"},updated_at:{description:"Datetime when this transfer was updated - can only be latest",type:"string",format:"date-time"},metadata:{description:"Key/value object describing this transfer",type:["object","null"]},transfer_group_id:{description:"Foreign key pointing to the transfer_group this transfer belongs to",type:["integer","null"]},reverses_id:{description:"Foreign key pointing to the transfer this transfer reverses. Must be unique",type:["integer","null"]},status_finalized_at:{description:"DateTime transfer reached final status",type:["string","null"],format:"date-time"}},additionalProperties:!1,required:["identifier","from_wallet_id","to_wallet_id","token_id","amount"]};var cn={$schema:"http://json-schema.org/draft-07/schema",$id:"TransferTable",title:"TransferTable",description:"A transfer of value from one wallet to another",type:"object",properties:{id:{description:"System defined primary key",type:"integer"},identifier:{description:"Identifier for this transfer. Must be unique",type:"string",maxLength:255,minLength:1},control_hash:{description:'Hash binding this transfer to the from_wallets transfer chain. It is calculated as sha256(latest_outgoing_hash + "-" + NEW.identifier)',type:["string","null"],maxLength:255},from_wallet_id:{description:"Foreign key to wallet funds originate from",type:"integer"},to_wallet_id:{description:"Foreign key to wallet where funds are going",type:"integer"},token_id:{description:"Foreign key to token this transfer refers to",type:"integer"},amount:{description:"The transfer amount",type:"number"},type:{description:"Type of the transfer",default:"transfer",$ref:"/db/consts.schema.json#/definitions/TransferType"},status:{description:"Status of the transfer",default:"finished",$ref:"/db/consts.schema.json#/definitions/TransferStatus"},force:{description:"Set to true to force transfer without checking for negative balance constraints",default:!1,type:"boolean"},auto_hash:{description:"When set to true it will automatically calculate the control_hash",default:!1,type:"boolean"},created_at:{description:"Datetime when this transfer was created - can only be latest",type:"string",format:"date-time"},updated_at:{description:"Datetime when this transfer was updated - can only be latest",type:"string",format:"date-time"},metadata:{description:"Key/value object describing this transfer",type:["object","null"]},transfer_group_id:{description:"Foreign key pointing to the transfer_group this transfer belongs to",type:["integer","null"]},reverses_id:{description:"Foreign key pointing to the transfer this transfer reverses. Must be unique",type:["integer","null"]},status_finalized_at:{description:"DateTime transfer reached final status",type:["string","null"],format:"date-time"},group_validate:{description:"Boolean showing if the transfer_group has validate_final_balance_only",default:!1,type:"boolean"}},additionalProperties:!1,definitions:{TransferTableAccessibleFields:{$id:"TransferTableAccessibleFields",type:"string",enum:["id","identifier","control_hash","from_wallet_id","to_wallet_id","token_id","amount","type","status","force","created_at","updated_at","metadata","transfer_group_id","reverses_id","status_finalized_at"]},TransferTableFields:{$id:"TransferTableFields",type:"string",enum:["id","identifier","control_hash","from_wallet_id","to_wallet_id","token_id","amount","type","status","force","auto_hash","created_at","updated_at","metadata","transfer_group_id","reverses_id","status_finalized_at"]},TransferTableStringFields:{$id:"TransferTableStringFields",type:"string",enum:["identifier","control_hash","type","status","created_at","updated_at","status_finalized_at"]},TransferTableObjectFields:{$id:"TransferTableObjectFields",type:"string",enum:["metadata"]},TransferTableNumberFields:{$id:"TransferTableNumberFields",type:"string",enum:["id","from_wallet_id","to_wallet_id","token_id","amount","transfer_group_id","reverses_id"]},TransferTableBooleanFields:{$id:"TransferTableBooleanFields",type:"string",enum:["force","auto_hash"]}},required:["id","identifier","from_wallet_id","to_wallet_id","token_id","amount","type","status","force","auto_hash","created_at","updated_at"]};var yd={$schema:"http://json-schema.org/draft-07/schema",$id:"TransferTableOptional",title:"TransferTableOptional",description:"A transfer of value from one wallet to another Only require id, other fields are optional",type:"object",properties:{id:{description:"System defined primary key",type:"integer"},identifier:{description:"Identifier for this transfer. Must be unique",type:"string",maxLength:255,minLength:1},control_hash:{description:'Hash binding this transfer to the from_wallets transfer chain. It is calculated as sha256(latest_outgoing_hash + "-" + NEW.identifier)',type:["string","null"],maxLength:255},from_wallet_id:{description:"Foreign key to wallet funds originate from",type:"integer"},to_wallet_id:{description:"Foreign key to wallet where funds are going",type:"integer"},token_id:{description:"Foreign key to token this transfer refers to",type:"integer"},amount:{description:"The transfer amount",type:"number"},type:{description:"Type of the transfer",default:"transfer",$ref:"/db/consts.schema.json#/definitions/TransferType"},status:{description:"Status of the transfer",default:"finished",$ref:"/db/consts.schema.json#/definitions/TransferStatus"},force:{description:"Set to true to force transfer without checking for negative balance constraints",default:!1,type:"boolean"},auto_hash:{description:"When set to true it will automatically calculate the control_hash",default:!1,type:"boolean"},created_at:{description:"Datetime when this transfer was created - can only be latest",type:"string",format:"date-time"},updated_at:{description:"Datetime when this transfer was updated - can only be latest",type:"string",format:"date-time"},metadata:{description:"Key/value object describing this transfer",type:["object","null"]},transfer_group_id:{description:"Foreign key pointing to the transfer_group this transfer belongs to",type:["integer","null"]},reverses_id:{description:"Foreign key pointing to the transfer this transfer reverses. Must be unique",type:["integer","null"]},status_finalized_at:{description:"DateTime transfer reached final status",type:["string","null"],format:"date-time"},group_validate:{description:"Boolean showing if the transfer_group has validate_final_balance_only",default:!1,type:"boolean"}},additionalProperties:!1,required:["id"]};var mn={$schema:"http://json-schema.org/draft-07/schema",$id:"TransferGroupTableInput",title:"TransferGroupTableInput",description:"An entity collecting transfers into a group locked by status",type:"object",properties:{identifier:{description:"Identifier for this transfer. Must be unique",type:"string",maxLength:255,minLength:1},status:{description:"Lifecycle status for transfer group",default:"open",$ref:"/db/consts.schema.json#/definitions/TransferGroupStatus"},transfer_status:{description:"Status of the transfer",default:"pending",$ref:"/db/consts.schema.json#/definitions/TransferStatusInput"},metadata:{description:"Key/value object describing this transfer_group",type:["object","null"]},reverses_id:{description:"Foreign key pointing to the transfer_group this transfer_group reverses",type:["integer","null"]},status_finalized_at:{description:"Time transfer_group was closed",type:["string","null"],format:"date-time"},transfer_status_finalized_at:{description:"Time transfer_status reached final state. Must be unique",type:["string","null"],format:"date-time"},type:{description:"Type of the transfer group",default:"regular",$ref:"/db/consts.schema.json#/definitions/TransferGroupType"}},additionalProperties:!1,required:["identifier"]};var hn={$schema:"http://json-schema.org/draft-07/schema",$id:"TransferGroupTable",title:"TransferGroupTable",description:"An entity collecting transfers into a group locked by status",type:"object",properties:{id:{description:"System defined primary key",type:"integer"},identifier:{description:"Identifier for this transfer. Must be unique",type:"string",maxLength:255,minLength:1},status:{description:"Lifecycle status for transfer group",default:"open",$ref:"/db/consts.schema.json#/definitions/TransferGroupStatus"},transfer_status:{description:"Status of the transfer",default:"pending",$ref:"/db/consts.schema.json#/definitions/TransferStatus"},metadata:{description:"Key/value object describing this transfer_group",type:["object","null"]},created_at:{description:"Datetime when this transfer was created",type:"string",format:"date-time"},updated_at:{description:"Datetime when this transfer was updated",type:"string",format:"date-time"},reverses_id:{description:"Foreign key pointing to the transfer_group this transfer_group reverses",type:["integer","null"]},status_finalized_at:{description:"Time transfer_group was closed",type:["string","null"],format:"date-time"},transfer_status_finalized_at:{description:"Time transfer_status reached final state. Must be unique",type:["string","null"],format:"date-time"},type:{description:"Type of the transfer group",default:"regular",$ref:"/db/consts.schema.json#/definitions/TransferGroupType"},validate_final_balance_only:{description:"Boolean if only the final balances of wallets should be validated",default:!1,type:"boolean"}},additionalProperties:!1,definitions:{TransferGroupTableAccessibleFields:{$id:"TransferGroupTableAccessibleFields",type:"string",enum:["id","identifier","status","transfer_status","metadata","reverses_id","status_finalized_at","transfer_status_finalized_at","type"]},TransferGroupTableFields:{$id:"TransferGroupTableFields",type:"string",enum:["id","identifier","status","transfer_status","metadata","created_at","updated_at","reverses_id","status_finalized_at","transfer_status_finalized_at","type","validate_final_balance_only"]},TransferGroupTableStringFields:{$id:"TransferGroupTableStringFields",type:"string",enum:["identifier","status","transfer_status","created_at","updated_at","status_finalized_at","transfer_status_finalized_at","type"]},TransferGroupTableObjectFields:{$id:"TransferGroupTableObjectFields",type:"string",enum:["metadata"]},TransferGroupTableNumberFields:{$id:"TransferGroupTableNumberFields",type:"string",enum:["id","reverses_id"]},TransferGroupTableBooleanFields:{$id:"TransferGroupTableBooleanFields",type:"string",enum:["validate_final_balance_only"]}},required:["id","identifier","status","transfer_status","created_at","updated_at","type","validate_final_balance_only"]};var bd={$schema:"http://json-schema.org/draft-07/schema",$id:"TransferGroupTableOptional",title:"TransferGroupTableOptional",description:"An entity collecting transfers into a group locked by status Only require id, other fields are optional",type:"object",properties:{id:{description:"System defined primary key",type:"integer"},identifier:{description:"Identifier for this transfer. Must be unique",type:"string",maxLength:255,minLength:1},status:{description:"Lifecycle status for transfer group",default:"open",$ref:"/db/consts.schema.json#/definitions/TransferGroupStatus"},transfer_status:{description:"Status of the transfer",default:"pending",$ref:"/db/consts.schema.json#/definitions/TransferStatus"},metadata:{description:"Key/value object describing this transfer_group",type:["object","null"]},created_at:{description:"Datetime when this transfer was created",type:"string",format:"date-time"},updated_at:{description:"Datetime when this transfer was updated",type:"string",format:"date-time"},reverses_id:{description:"Foreign key pointing to the transfer_group this transfer_group reverses",type:["integer","null"]},status_finalized_at:{description:"Time transfer_group was closed",type:["string","null"],format:"date-time"},transfer_status_finalized_at:{description:"Time transfer_status reached final state. Must be unique",type:["string","null"],format:"date-time"},type:{description:"Type of the transfer group",default:"regular",$ref:"/db/consts.schema.json#/definitions/TransferGroupType"},validate_final_balance_only:{description:"Boolean if only the final balances of wallets should be validated",default:!1,type:"boolean"}},additionalProperties:!1,required:["id"]};var _n={$schema:"http://json-schema.org/draft-07/schema",$id:"TransferLogTableInput",title:"TransferLogTableInput",description:"This table is readonly, so no input is valid",$comment:"READONLY",type:"object",properties:{},additionalProperties:!1};var gn={$schema:"http://json-schema.org/draft-07/schema",$id:"TransferLogTable",title:"TransferLogTable",description:"Individual parts of a transfer, will be updated internally by db. Immutable",$comment:"READONLY",type:"object",properties:{id:{description:"System defined primary key",type:"integer"},transfer_id:{description:"Foreign key pointing to the transfer this log belongs to",type:"integer"},wallet_id:{description:"Foreign key pointing to the wallet this log refers to",type:"integer"},token_id:{description:"Foreign key pointing to the token this log refers to",type:"integer"},type:{description:"Type of this log",$ref:"/db/consts.schema.json#/definitions/TransferType"},amount:{description:"The amount the wallet balance is changed by",type:"number"},pending_amount:{description:"The pending balance of wallet after this transfer_log",type:"number"},finished_amount:{description:"The finished balance of wallet after this transfer_log",type:"number"},status:{description:"Status of this log - same as Transfer.status",$ref:"/db/consts.schema.json#/definitions/TransferStatus"},allow_negative:{description:"Boolean indicating if wallet (pending_amount + finished_amount) can be negative",default:!1,type:"boolean"},allow_positive:{description:"Boolean indicating if wallet (pending_amount + finished_amount) can be positive. Used for token balance to deny positive balance.",default:!0,type:"boolean"},force:{description:"Boolean indicating if the latest transfer from this wallet was forced to ignore negative balance checks",default:!1,type:"boolean"},created_at:{description:"Datetime this log was created",type:"string",format:"date-time"},latest_control_hash:{description:"Latest hash related to this wallet",type:["string","null"],maxLength:255},pending_amount_to:{description:"The incoming pending balance",type:"number"},pending_amount_from:{description:"The outgoing pending balance",type:"number"},group_balance:{description:"Running balance for the wallet in this group",type:["number","null"]},transfer_group_id:{description:"Foreign key pointing to the transfer_group this transfer_log belongs to",type:["integer","null"]},current:{description:"Boolean showing if this transfer_log is the latest for this wallet/token combination",default:!1,type:"boolean"},available_balance:{description:"Available balance that is sum of pending_amount_from and finished_amount",type:"number"},token_limit:{description:"If wallet = token.belongs_to and token has limit",type:["number","null"]}},additionalProperties:!1,definitions:{TransferLogTableAccessibleFields:{$id:"TransferLogTableAccessibleFields",type:"string",enum:["id","transfer_id","wallet_id","token_id","type","amount","pending_amount","finished_amount","status","created_at","pending_amount_to","pending_amount_from","available_balance","token_limit"]},TransferLogTableFields:{$id:"TransferLogTableFields",type:"string",enum:["id","transfer_id","wallet_id","token_id","type","amount","pending_amount","finished_amount","status","allow_negative","allow_positive","force","created_at","latest_control_hash","pending_amount_to","pending_amount_from","group_balance","current","available_balance","token_limit"]},TransferLogTableStringFields:{$id:"TransferLogTableStringFields",type:"string",enum:["type","status","created_at","latest_control_hash"]},TransferLogTableNumberFields:{$id:"TransferLogTableNumberFields",type:"string",enum:["id","transfer_id","wallet_id","token_id","amount","pending_amount","finished_amount","pending_amount_to","pending_amount_from","group_balance","available_balance","token_limit"]},TransferLogTableBooleanFields:{$id:"TransferLogTableBooleanFields",type:"string",enum:["allow_negative","allow_positive","force","current"]}},required:["id","transfer_id","wallet_id","token_id","type","amount","pending_amount","finished_amount","status","allow_negative","allow_positive","force","created_at","pending_amount_to","pending_amount_from","current","available_balance"]};var Fd={$schema:"http://json-schema.org/draft-07/schema",$id:"TransferLogTableOptional",title:"TransferLogTableOptional",description:"Individual parts of a transfer, will be updated internally by db. Immutable Only require id, other fields are optional",$comment:"READONLY",type:"object",properties:{id:{description:"System defined primary key",type:"integer"},transfer_id:{description:"Foreign key pointing to the transfer this log belongs to",type:"integer"},wallet_id:{description:"Foreign key pointing to the wallet this log refers to",type:"integer"},token_id:{description:"Foreign key pointing to the token this log refers to",type:"integer"},type:{description:"Type of this log",$ref:"/db/consts.schema.json#/definitions/TransferType"},amount:{description:"The amount the wallet balance is changed by",type:"number"},pending_amount:{description:"The pending balance of wallet after this transfer_log",type:"number"},finished_amount:{description:"The finished balance of wallet after this transfer_log",type:"number"},status:{description:"Status of this log - same as Transfer.status",$ref:"/db/consts.schema.json#/definitions/TransferStatus"},allow_negative:{description:"Boolean indicating if wallet (pending_amount + finished_amount) can be negative",default:!1,type:"boolean"},allow_positive:{description:"Boolean indicating if wallet (pending_amount + finished_amount) can be positive. Used for token balance to deny positive balance.",default:!0,type:"boolean"},force:{description:"Boolean indicating if the latest transfer from this wallet was forced to ignore negative balance checks",default:!1,type:"boolean"},created_at:{description:"Datetime this log was created",type:"string",format:"date-time"},latest_control_hash:{description:"Latest hash related to this wallet",type:["string","null"],maxLength:255},pending_amount_to:{description:"The incoming pending balance",type:"number"},pending_amount_from:{description:"The outgoing pending balance",type:"number"},group_balance:{description:"Running balance for the wallet in this group",type:["number","null"]},transfer_group_id:{description:"Foreign key pointing to the transfer_group this transfer_log belongs to",type:["integer","null"]},current:{description:"Boolean showing if this transfer_log is the latest for this wallet/token combination",default:!1,type:"boolean"},available_balance:{description:"Available balance that is sum of pending_amount_from and finished_amount",type:"number"},token_limit:{description:"If wallet = token.belongs_to and token has limit",type:["number","null"]}},additionalProperties:!1,required:["id"]};var Tn={$schema:"http://json-schema.org/draft-07/schema",$id:"WalletTableInput",title:"WalletTableInput",description:"Entities who can make transfers in this system",type:"object",properties:{foreign:{description:"User provided key for wallet. Must be unique",type:"string",maxLength:64,minLength:1},name:{description:"Name of the wallet",type:["string","null"],maxLength:255},metadata:{description:"Key/value metadata object",type:["object","null"]},type:{description:"Type of the wallet",default:"regular",$ref:"/db/consts.schema.json#/definitions/WalletType"},status:{description:"Current status for the wallet",default:"active",$ref:"/db/consts.schema.json#/definitions/WalletStatus"}},additionalProperties:!1,required:["foreign"]};var yn={$schema:"http://json-schema.org/draft-07/schema",$id:"WalletTable",title:"WalletTable",description:"Entities who can make transfers in this system",type:"object",properties:{id:{description:"System defined primary key",type:"integer"},foreign:{description:"User provided key for wallet. Must be unique",type:"string",maxLength:64,minLength:1},name:{description:"Name of the wallet",type:["string","null"],maxLength:255},metadata:{description:"Key/value metadata object",type:["object","null"]},type:{description:"Type of the wallet",default:"regular",$ref:"/db/consts.schema.json#/definitions/WalletType"},default_allow_negative:{description:"Boolean indicating if wallet (pending_amount + finished_amount) can be negative",default:!1,type:"boolean"},default_allow_positive:{description:"Boolean indicating if wallet (pending_amount + finished_amount) can be positive. Used for token balance to deny positive balance.",default:!0,type:"boolean"},created_at:{description:"Datetime when the wallet was created",type:"string",format:"date-time"},updated_at:{description:"Datetime when the wallet was last updated",type:"string",format:"date-time"},status:{description:"Current status for the wallet",default:"active",$ref:"/db/consts.schema.json#/definitions/WalletStatus"},default_dtw_to:{description:"Bitmap indicating default what types of transfers can originate from wallet",default:"110",type:"string",maxLength:255,minLength:1},default_dtw_from:{description:"Bitmap indicating default what types of transfers can end to wallet",default:"011",type:"string",maxLength:255,minLength:1}},additionalProperties:!1,definitions:{WalletTableAccessibleFields:{$id:"WalletTableAccessibleFields",type:"string",enum:["id","foreign","name","metadata","type","status"]},WalletTableFields:{$id:"WalletTableFields",type:"string",enum:["id","foreign","name","metadata","type","default_allow_negative","default_allow_positive","created_at","updated_at","status"]},WalletTableStringFields:{$id:"WalletTableStringFields",type:"string",enum:["foreign","name","type","created_at","updated_at","status"]},WalletTableObjectFields:{$id:"WalletTableObjectFields",type:"string",enum:["metadata"]},WalletTableNumberFields:{$id:"WalletTableNumberFields",type:"string",enum:["id"]},WalletTableBooleanFields:{$id:"WalletTableBooleanFields",type:"string",enum:["default_allow_negative","default_allow_positive"]}},required:["id","foreign","type","default_allow_negative","default_allow_positive","created_at","updated_at","status"]};var xd={$schema:"http://json-schema.org/draft-07/schema",$id:"WalletTableOptional",title:"WalletTableOptional",description:"Entities who can make transfers in this system Only require id, other fields are optional",type:"object",properties:{id:{description:"System defined primary key",type:"integer"},foreign:{description:"User provided key for wallet. Must be unique",type:"string",maxLength:64,minLength:1},name:{description:"Name of the wallet",type:["string","null"],maxLength:255},metadata:{description:"Key/value metadata object",type:["object","null"]},type:{description:"Type of the wallet",default:"regular",$ref:"/db/consts.schema.json#/definitions/WalletType"},default_allow_negative:{description:"Boolean indicating if wallet (pending_amount + finished_amount) can be negative",default:!1,type:"boolean"},default_allow_positive:{description:"Boolean indicating if wallet (pending_amount + finished_amount) can be positive. Used for token balance to deny positive balance.",default:!0,type:"boolean"},created_at:{description:"Datetime when the wallet was created",type:"string",format:"date-time"},updated_at:{description:"Datetime when the wallet was last updated",type:"string",format:"date-time"},status:{description:"Current status for the wallet",default:"active",$ref:"/db/consts.schema.json#/definitions/WalletStatus"},default_dtw_to:{description:"Bitmap indicating default what types of transfers can originate from wallet",default:"110",type:"string",maxLength:255,minLength:1},default_dtw_from:{description:"Bitmap indicating default what types of transfers can end to wallet",default:"011",type:"string",maxLength:255,minLength:1}},additionalProperties:!1,required:["id"]};var bn={$schema:"http://json-schema.org/draft-07/schema",$id:"WalletTokenSettingTableInput",title:"WalletTokenSettingTableInput",description:"Settings between a wallet and token",type:"object",properties:{},additionalProperties:!1};var Fn={$schema:"http://json-schema.org/draft-07/schema",$id:"WalletTokenSettingTable",title:"WalletTokenSettingTable",description:"Settings between a wallet and token",type:"object",properties:{id:{description:"System defined primary key",type:"integer"},wallet_id:{description:"Foreign key to wallet these settings refer to",type:"integer"},token_id:{description:"Foreign key to token these settings refer to",type:"integer"},allow_negative:{description:"Boolean indicating if wallet (pending_amount + finished_amount) can be negative",default:!1,type:"boolean"},allow_positive:{description:"Boolean indicating if wallet (pending_amount + finished_amount) can be positive. Used for token balance to deny positive balance.",default:!0,type:"boolean"},created_at:{description:"Datetime when the token was created",type:"string",format:"date-time"},updated_at:{description:"Datetime when the token was last updated",type:"string",format:"date-time"},dtw_to:{description:"Bitmap indicating default what types of transfers can originate from wallet",default:"110",type:"string",maxLength:255,minLength:1},dtw_from:{description:"Bitmap indicating default what types of transfers can end to wallet",default:"011",type:"string",maxLength:255,minLength:1}},additionalProperties:!1,definitions:{WalletTokenSettingTableAccessibleFields:{$id:"WalletTokenSettingTableAccessibleFields",type:"string",enum:["id"]},WalletTokenSettingTableFields:{$id:"WalletTokenSettingTableFields",type:"string",enum:["id","wallet_id","token_id","allow_negative","allow_positive","created_at","updated_at"]},WalletTokenSettingTableStringFields:{$id:"WalletTokenSettingTableStringFields",type:"string",enum:["created_at","updated_at"]},WalletTokenSettingTableNumberFields:{$id:"WalletTokenSettingTableNumberFields",type:"string",enum:["id","wallet_id","token_id"]},WalletTokenSettingTableBooleanFields:{$id:"WalletTokenSettingTableBooleanFields",type:"string",enum:["allow_negative","allow_positive"]}},required:["id","wallet_id","token_id","allow_negative","allow_positive","created_at","updated_at"]};var $d={$schema:"http://json-schema.org/draft-07/schema",$id:"WalletTokenSettingTableOptional",title:"WalletTokenSettingTableOptional",description:"Settings between a wallet and token Only require id, other fields are optional",type:"object",properties:{id:{description:"System defined primary key",type:"integer"},wallet_id:{description:"Foreign key to wallet these settings refer to",type:"integer"},token_id:{description:"Foreign key to token these settings refer to",type:"integer"},allow_negative:{description:"Boolean indicating if wallet (pending_amount + finished_amount) can be negative",default:!1,type:"boolean"},allow_positive:{description:"Boolean indicating if wallet (pending_amount + finished_amount) can be positive. Used for token balance to deny positive balance.",default:!0,type:"boolean"},created_at:{description:"Datetime when the token was created",type:"string",format:"date-time"},updated_at:{description:"Datetime when the token was last updated",type:"string",format:"date-time"},dtw_to:{description:"Bitmap indicating default what types of transfers can originate from wallet",default:"110",type:"string",maxLength:255,minLength:1},dtw_from:{description:"Bitmap indicating default what types of transfers can end to wallet",default:"011",type:"string",maxLength:255,minLength:1}},additionalProperties:!1,required:["id"]};var xn={$schema:"http://json-schema.org/draft-07/schema",$id:"WapiSettingTableInput",title:"WapiSettingTableInput",description:"Database settings",type:"object",properties:{type:{description:"",default:"flag",$ref:"/db/consts.schema.json#/definitions/WapiSettingType"},name:{description:"name of setting. Must be unique",type:"string",maxLength:32,minLength:1},value:{description:"value of setting",type:"string",minLength:1},applied:{description:"is setting applied",default:!1,type:"boolean"}},additionalProperties:!1,required:["name","value"]};var $n={$schema:"http://json-schema.org/draft-07/schema",$id:"WapiSettingTable",title:"WapiSettingTable",description:"Database settings",type:"object",properties:{id:{description:"System defined primary key",type:"integer"},type:{description:"",default:"flag",$ref:"/db/consts.schema.json#/definitions/WapiSettingType"},name:{description:"name of setting. Must be unique",type:"string",maxLength:32,minLength:1},value:{description:"value of setting",type:"string",minLength:1},applied:{description:"is setting applied",default:!1,type:"boolean"},created_at:{description:"Datetime when the flag was created",type:"string",format:"date-time"},updated_at:{description:"Datetime when the flag was last updated",type:"string",format:"date-time"}},additionalProperties:!1,definitions:{WapiSettingTableAccessibleFields:{$id:"WapiSettingTableAccessibleFields",type:"string",enum:["id","type","name","value","applied"]},WapiSettingTableFields:{$id:"WapiSettingTableFields",type:"string",enum:["id","type","name","value","applied","created_at","updated_at"]},WapiSettingTableStringFields:{$id:"WapiSettingTableStringFields",type:"string",enum:["type","name","value","created_at","updated_at"]},WapiSettingTableNumberFields:{$id:"WapiSettingTableNumberFields",type:"string",enum:["id"]},WapiSettingTableBooleanFields:{$id:"WapiSettingTableBooleanFields",type:"string",enum:["applied"]}},required:["id","type","name","value","applied","created_at","updated_at"]};var Od={$schema:"http://json-schema.org/draft-07/schema",$id:"WapiSettingTableOptional",title:"WapiSettingTableOptional",description:"Database settings Only require id, other fields are optional",type:"object",properties:{id:{description:"System defined primary key",type:"integer"},type:{description:"",default:"flag",$ref:"/db/consts.schema.json#/definitions/WapiSettingType"},name:{description:"name of setting. Must be unique",type:"string",maxLength:32,minLength:1},value:{description:"value of setting",type:"string",minLength:1},applied:{description:"is setting applied",default:!1,type:"boolean"},created_at:{description:"Datetime when the flag was created",type:"string",format:"date-time"},updated_at:{description:"Datetime when the flag was last updated",type:"string",format:"date-time"}},additionalProperties:!1,required:["id"]};var On={$schema:"http://json-schema.org/draft-07/schema",$id:"AggregateTransfersFnInput",title:"AggregateTransfersFnInput",description:"Input for aggregateTransfers",type:"object",properties:{wallet:{description:"Foreign of the wallet connected to transfers",type:["string","integer"]},token:{description:"Foreign of the token transferred",type:["string","integer"]},from_wallet:{description:"Foreign of the wallet transfers are made from",type:["string","integer"]},to_wallet:{description:"Foreign of the wallet transfers are made to",type:["string","integer"]},transfer_group:{description:"Foreign of the transfer_group the transfers are a part of",type:["string","integer"]},status:{description:"Status of the transfers",$ref:"/db/transfer/transfer.schema.input.json#/properties/status"},metadata:{description:"Metadata filter",$ref:"/db/consts.schema.json#/definitions/DbFilterMetadata"},aggregators:{description:"Array of aggregators to apply",type:"array",items:{$ref:"/txs/aggregate-transfer-many/aggregate-transfer-many.schema.input.json#/definitions/aggregate_transfer_many_aggregator"}},groups:{description:"Specifications on grouping the data",$ref:"/txs/aggregate-transfer-many/aggregate-transfer-many.schema.input.json#/definitions/aggregate_transfer_many_groups"},options:{description:"Optional flags for input",$ref:"#/definitions/aggregate_transfers_fn_options"}},definitions:{aggregate_transfers_fn_options:{description:"Optional flags for input",type:"object",allOf:[{$ref:"/txs/aggregate-transfer-many/aggregate-transfer-many.schema.input.json#/definitions/aggregate_transfer_many_tx_options"}]}},additionalProperties:!1,$aggregateQueryBuilder:!0};var wn={$schema:"http://json-schema.org/draft-07/schema",$id:"AggregateTransfersFnOutput",title:"AggregateTransfersFnOutput",description:"Output of aggregateTransfers",type:"object",$ref:"/txs/aggregate-transfer-many/aggregate-transfer-many.schema.output.json"};var In={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateAccessTokenFnInput",title:"CreateAccessTokenFnInput",description:"Input for createAccessToken",type:"object",properties:{token:{description:"Properties of the token to create",anyOf:[{$ref:"#/definitions/create_access_token_fn_limited"},{$ref:"/txs/create-access-token/create-access-token.schema.input.json#/definitions/create_access_token_admin"}]},options:{$ref:"#/definitions/create_access_token_fn_options"}},definitions:{create_access_token_fn_options:{description:"Optional flags for input",type:"object",allOf:[{$ref:"/txs/create-access-token/create-access-token.schema.input.json#/definitions/create_access_token_tx_options"}]},create_access_token_fn_limited:{type:"object",properties:{type:{enum:["limited"]},scopes:{type:"array",items:{type:"string",enum:["aggregateTransfers","findBalances","findTokens","findTransferGroups","findTransfers","findWallets","aggregateTransferMany","findBalanceMany","findTokenMany","findTransferGroupMany","findTransferMany","findWalletMany","getBalance","getBalanceHistory","getStatistics","getToken","getTokenMany","getTransfer","getTransferGroup","getWallet","getWalletMany"]}},filters:{description:"Forced filters for requests",type:"object",$ref:"/txs/create-access-token/create-access-token.schema.input.json#/definitions/create_access_token_forced_filters"},expiresIn:{description:"JWT expiration time in minutes",type:"number"}},required:["scopes","type","expiresIn"],additionalProperties:!1}},additionalProperties:!1};var jn={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateAccessTokenFnOutput",title:"CreateAccessTokenFnOutput",description:"Output of createAccessToken",type:"object",$ref:"/txs/create-access-token/create-access-token.schema.output.json"};var vn={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateContractFnInput",title:"CreateContractFnInput",description:"Input for createContract",type:"object",allOf:[{$ref:"#/definitions/create_contract_input"},{type:"object",properties:{options:{$ref:"#/definitions/create_contract_fn_options"}},$typescript:'{"additionalProperties": false}'}],definitions:{create_contract_fn_options:{description:"Optional flags for input",type:"object",allOf:[{$ref:"/txs/create-contract/create-contract.schema.input.json#/definitions/create_contract_tx_options"}],$typescript:'{"additionalProperties": false}'},create_contract_input:{type:"object",properties:{foreign:{description:"Unique foreign of the created Contract",type:["string","integer"]},metadata:{allOf:[{$ref:"/db/token/token.schema.input.json#/properties/metadata"}]},value_token:{description:"Foreign of the token this contract is valued in",type:["string","integer"]},value_amount:{description:"Amount of value this Contract has",type:"number"},owner:{description:"Foreign of the wallet this contract should initially belong to",type:["string","integer"]},buyer:{allOf:[{$ref:"#/definitions/create_contract_buyer_input"}]}},required:["foreign","value_amount","value_token"],$typescript:'{"additionalProperties": false}'},create_contract_buyer_input:{type:"object",description:"The properties of the contract from buyer side",properties:{wallet:{description:"Foreign of the wallet buying this contract",type:["string","integer"]},token:{description:"Foreign of the token buyer will buy with, defaults to Contract value token",type:["string","integer"]},amount:{description:"Amount the buyer will pay, defaults to contract value amount",type:"number"},metadata:{allOf:[{$ref:"/db/token/token.schema.input.json#/properties/metadata"}]},latest_control_hash:{description:"Latest control_hash on the buyer wallet",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]}},required:["wallet"],additionalProperties:!1}},$typescript:'{"additionalProperties": false}'};var kn={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateContractFnOutput",title:"CreateContractFnOutput",description:"Output of createContract",type:"object",$ref:"/txs/create-contract/create-contract.schema.output.json"};var Sn={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateDepositFnInput",title:"CreateDepositFnInput",description:"Input for createDeposit",type:"object",allOf:[{$ref:"#/definitions/create_deposit_input"},{type:"object",properties:{options:{$ref:"#/definitions/create_deposit_fn_options"}},$typescript:'{"additionalProperties": false}'}],definitions:{create_deposit_fn_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/create_deposit_fn_additional_options"}]},create_deposit_fn_additional_options:{type:"object",properties:{return_balance:{description:"return balance after deposit",type:"boolean",default:!1},create_wallet_if_not_exists:{type:"boolean",description:"If true then the wallet will be created if not found. Only valid with 'foreign'",default:!1}},$typescript:'{"additionalProperties": false}'},create_deposit_input:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},token:{description:"Id of the token to deposit as",type:["string","integer"]},wallet:{description:"Id of the wallet to deposit to",type:["string","integer"]},amount:{description:"amount to deposit",type:"number"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},status:{description:"status of the deposit",enum:["pending","finished"],default:"finished"},transfer_group:{description:"Id of the transfer_group this deposit is linked to",type:["string"]},created_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/created_at"}},required:["wallet","amount"],$typescript:'{"additionalProperties": false}'}},$typescript:'{"additionalProperties": false}'};var Cn={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateDepositFnOutput",title:"CreateDepositFnOutput",description:"Output of deposit",$ref:"/txs/create-deposit/create-deposit.schema.output.json"};var Pn={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateExchangeFnInput",title:"CreateExchangeFnInput",description:"Input for createExchange",type:"object",properties:{identifier:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/identifier"},from_identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},from_wallet:{description:"Foreign of Wallet where from_token is debited from/to_token is credited to",type:["string","integer"]},from_token:{description:"Foreign of Token that is transferred from->to",type:["string","integer"]},from_amount:{description:"Amount of from_token transferred",$ref:"/db/transfer/transfer.schema.input.json#/properties/amount"},to_identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},to_wallet:{description:"Foreign of Wallet where from_token is credited to/to_token is debited from. If not specified then to_token.belongs_to is used",type:["string","integer"]},to_token:{description:"Foreign of Token that is transferred to->from",type:["string","integer"]},to_amount:{description:"Amount of to_token transferred. If not specified then from_amount is used",$ref:"/db/transfer/transfer.schema.input.json#/properties/amount"},status:{description:"The state at which the exchange is created",type:"string",enum:["pending","finished"]},force:{$ref:"/db/transfer/transfer.schema.input.json#/properties/force"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},options:{$ref:"#/definitions/create_exchange_fn_options"}},required:["from_wallet","from_token","from_amount","to_token","to_wallet"],definitions:{create_exchange_fn_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/create_exchange_additional_options"}]},exchange_data:{type:"object",properties:{identifier:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/identifier"},from_identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},from_latest_control_hash:{description:"Latest control_hash on the from_wallet+from_token combo. Not required if no from_wallet specified",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]},from_wallet:{description:"Wallet where from_token is debited from/to_token is credited to. If not specified then from_token.belongs_to is used",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},from_token:{description:"Token that is transferred from->to",$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"},from_amount:{description:"Amount of from_token transferred",$ref:"/db/transfer/transfer.schema.input.json#/properties/amount"},to_identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},to_latest_control_hash:{description:"Latest control_hash on the to_wallet+to_token combo. Not required if no to_wallet specified",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]},to_wallet:{description:"Wallet where from_token is credited to/to_token is debited from. If not specified then to_token.belongs_to is used",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},to_token:{description:"Token that is transferred to->from",$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"},to_amount:{description:"Amount of to_token transferred. If not specified then from_amount is used",$ref:"/db/transfer/transfer.schema.input.json#/properties/amount"},status:{description:"The state at which the exchange is created",type:"string",enum:["pending","finished"]},force:{$ref:"/db/transfer/transfer.schema.input.json#/properties/force"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"}},additionalProperties:!1},create_exchange_additional_options:{description:"Optional flags for input",type:"object",default:{},$typescript:'{"additionalProperties":false}'}},additionalProperties:!1};var Gn={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateExchangeFnOutput",title:"CreateExchangeFnOutput",description:"Output of createExchange",$ref:"/txs/create-transfer-group/create-transfer-group.schema.output.json"};var Dn={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateTokenFnInput",title:"CreateTokenFnInput",description:"Input for createToken",allOf:[{$ref:"#/definitions/create_token_fn_input_data"},{$ref:"#/definitions/create_token_fn_options_property"}],definitions:{create_token_fn_options:{allOf:[{$ref:"/txs/create-token/create-token.schema.input.json#/definitions/create_token_tx_options"}]},create_token_fn_options_property:{type:"object",properties:{options:{$ref:"#/definitions/create_token_fn_options"}},$typescript:'{"additionalProperties": false}'},create_token_fn_input_data:{type:"object",properties:{foreign:{$ref:"/db/token/token.schema.input.json#/properties/foreign"},public:{$ref:"/db/token/token.schema.input.json#/properties/public"},metadata:{$ref:"/db/token/token.schema.input.json#/properties/metadata"},divisor:{$ref:"/db/token/token.schema.input.json#/properties/divisor"},limit:{$ref:"/db/token/token.schema.input.json#/properties/limit"},belongs_to:{description:"Id of the wallet this token belongs_to",type:["string","integer"]}},required:["foreign"],$typescript:'{"additionalProperties": false}'}},$typescript:'{"additionalProperties": false}'};var En={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateTokenFnOutput",title:"CreateTokenFnOutput",description:"Output of createToken",$ref:"/txs/create-token/create-token.schema.output.json"};var Mn={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateTransferFnInput",title:"CreateTransferFnInput",description:"Input for transfer",oneOf:[{$ref:"#/definitions/create_transfer_input"},{$ref:"#/definitions/create_transfer_withdrawal_input"},{$ref:"#/definitions/create_transfer_deposit_input"}],definitions:{create_transfer_fn_options:{$comment:"Using allOf so that references dont break",type:"object",allOf:[{$ref:"/txs/create-transfer/create-transfer.schema.input.json#/definitions/create_transfer_tx_options"}]},create_transfer_fn_options_property:{type:"object",properties:{options:{$ref:"#/definitions/create_transfer_fn_options"}},$typescript:'{"additionalProperties": false}'},create_transfer_input:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},token:{description:"Foreign of the token to transfer as",type:["string","integer"]},from_wallet:{description:"Foreign of the wallet to deposit to",type:["string","integer"]},to_wallet:{description:"Foreign of the wallet to deposit to",type:["string","integer"]},latest_control_hash:{description:"Latest control_hash on the from_wallet",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]},amount:{description:"amount to deposit",type:"number"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},type:{type:"string",enum:["transfer"]},status:{description:"status of the transfer",enum:["pending","finished"],default:"finished"},transfer_group:{description:"Id of the transfer_group this transfer is linked to",type:["string"]},created_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/created_at"},options:{$ref:"#/definitions/create_transfer_fn_options"}},required:["from_wallet","to_wallet","amount"],$typescript:'{"additionalProperties": false}'},create_transfer_withdrawal_input:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},token:{description:"Foreign of the token to transfer as",type:["string","integer"]},wallet:{description:"Foreign of the wallet to withdraw from",type:["string","integer"]},latest_control_hash:{description:"Latest control_hash on the from_wallet",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]},amount:{description:"amount to deposit",type:"number"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},type:{type:"string",enum:["withdrawal"]},status:{description:"status of the transfer",enum:["pending","finished"],default:"finished"},transfer_group:{description:"Id of the transfer_group this transfer is linked to",type:["string"]},created_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/created_at"},options:{$ref:"#/definitions/create_transfer_fn_options"}},required:["wallet","amount","type"],$typescript:'{"additionalProperties": false}'},create_transfer_deposit_input:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},token:{description:"Foreign of the token to transfer as",type:["string","integer"]},wallet:{description:"Foreign of the wallet to deposit to",type:["string","integer"]},amount:{description:"amount to deposit",type:"number"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},type:{type:"string",enum:["deposit"]},status:{description:"status of the transfer",enum:["pending","finished"],default:"finished"},transfer_group:{description:"Id of the transfer_group this transfer is linked to",type:["string"]},created_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/created_at"},options:{$ref:"#/definitions/create_transfer_fn_options"}},required:["wallet","amount","type"],$typescript:'{"additionalProperties": false}'},create_transfer_wild_input:{anyOf:[{$ref:"#/definitions/create_transfer_input"},{$ref:"#/definitions/create_transfer_withdrawal_input"},{$ref:"#/definitions/create_transfer_deposit_input"}]}},$typescript:'{"additionalProperties": false}'};var Rn={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateTransferFnOutput",title:"CreateTransferFnOutput",description:"Output of transfer",$ref:"/txs/create-transfer/create-transfer.schema.output.json"};var Wn={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateTransferGroupFnInput",title:"CreateTransferGroupFnInput",description:"Input for createTransferGroup",type:"object",allOf:[{$ref:"#/definitions/create_transfer_group_fn_input_data"},{$ref:"#/definitions/create_transfer_group_fn_options_property"}],definitions:{create_transfer_group_fn_options:{$comment:"Using allOf, because otherwise references break",type:"object",allOf:[{$ref:"/txs/create-transfer-group/create-transfer-group.schema.input.json#/definitions/create_transfer_group_tx_options"}]},create_transfer_group_fn_options_property:{type:"object",properties:{options:{$ref:"#/definitions/create_transfer_group_fn_options"}},$typescript:'{"additionalProperties": false}'},create_transfer_group_fn_input_data:{type:"object",properties:{identifier:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/identifier"},status:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/status"},transfer_status:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/transfer_status"},metadata:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/metadata"},children:{description:"Array of children",type:"array",items:{$ref:"#/definitions/child_transfer_data_fn"}}},$typescript:'{"additionalProperties": false}'},child_transfer_data_fn:{anyOf:[{$ref:"#/definitions/child_transfer_data_regular_fn"},{$ref:"#/definitions/child_transfer_data_withdrawal_fn"},{$ref:"#/definitions/child_transfer_data_deposit_fn"}]},child_transfer_data_regular_fn:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},token:{description:"Foreign of the token to transfer as",type:["string","integer"]},from_wallet:{description:"Foreign of the wallet to deposit to",type:["string","integer"]},to_wallet:{description:"Foreign of the wallet to deposit to",type:["string","integer"]},latest_control_hash:{description:"Latest control_hash on the from_wallet",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]},amount:{description:"amount to deposit",type:"number"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},type:{type:"string",enum:["transfer"]},created_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/created_at"}},required:["from_wallet","to_wallet","amount"],$typescript:'{"additionalProperties": false}'},child_transfer_data_withdrawal_fn:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},token:{description:"Foreign of the token to transfer as",type:["string","integer"]},wallet:{description:"Foreign of the wallet to withdraw from",type:["string","integer"]},latest_control_hash:{description:"Latest control_hash on the from_wallet",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]},amount:{description:"amount to deposit",type:"number"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},type:{type:"string",enum:["withdrawal"]},created_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/created_at"}},required:["wallet","amount","type"],$typescript:'{"additionalProperties": false}'},child_transfer_data_deposit_fn:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},token:{description:"Foreign of the token to transfer as",type:["string","integer"]},wallet:{description:"Foreign of the wallet to deposit to",type:["string","integer"]},amount:{description:"amount to deposit",type:"number"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},type:{type:"string",enum:["deposit"]},created_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/created_at"}},required:["wallet","amount","type"],$typescript:'{"additionalProperties": false}'}},$typescript:'{"additionalProperties": false}'};var An={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateTransferGroupFnOutput",title:"CreateTransferGroupFnOutput",description:"Output of createTransferGroup",type:"object",$ref:"/txs/create-transfer-group/create-transfer-group.schema.output.json"};var Nn={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateTransfersFnInput",title:"CreateTransfersFnInput",description:"Input for createTransfers",type:"object",properties:{transfers:{type:"array",description:"Array of transfer objects to create",minItems:1,items:{$ref:"/fns/create-transfer/create-transfer.schema.input.json#/definitions/create_transfer_wild_input"}},options:{$ref:"#/definitions/create_transfers_fn_options"}},definitions:{create_transfers_fn_options:{allOf:[{$ref:"/txs/create-transfer-many/create-transfer-many.schema.input.json#/definitions/create_transfer_many_tx_options"}]}},required:["transfers"],additionalProperties:!1};var Un={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateTransfersFnOutput",title:"CreateTransfersFnOutput",description:"Output of createTransfers",$ref:"/txs/create-transfer-many/create-transfer-many.schema.output.json"};var qn={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateWalletFnInput",title:"CreateWalletFnInput",description:"Input for createWallet",type:"object",allOf:[{$ref:"#/definitions/create_wallet_fn_input_data"},{$ref:"#/definitions/create_wallet_fn_options_property"}],definitions:{create_wallet_fn_options:{description:"Optional flags for input",type:"object",allOf:[{$ref:"/txs/create-wallet/create-wallet.schema.input.json#/definitions/create_wallet_tx_options"}]},create_wallet_fn_options_property:{type:"object",properties:{options:{$ref:"#/definitions/create_wallet_fn_options"}},$typescript:'{"additionalProperties": false}'},create_wallet_fn_input_data:{type:"object",properties:{foreign:{$ref:"/db/wallet/wallet.schema.input.json#/properties/foreign"},name:{$ref:"/db/wallet/wallet.schema.input.json#/properties/name"},metadata:{$ref:"/db/wallet/wallet.schema.input.json#/properties/metadata"},status:{$ref:"/db/wallet/wallet.schema.input.json#/properties/status"}},required:["foreign"],$typescript:'{"additionalProperties": false}'}},$typescript:'{"additionalProperties": false}'};var Bn={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateWalletFnOutput",title:"CreateWalletFnOutput",description:"Output of createWallet",type:"object",$ref:"/txs/create-wallet/create-wallet.schema.output.json"};var Ln={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateWithdrawalFnInput",title:"CreateWithdrawalFnInput",description:"Input for withdraw",type:"object",allOf:[{$ref:"#/definitions/create_withdrawal_input"},{type:"object",properties:{options:{$ref:"#/definitions/create_withdrawal_fn_options"}},$typescript:'{"additionalProperties": false}'}],definitions:{create_withdrawal_fn_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/create_withdrawal_fn_additional_options"}]},create_withdrawal_fn_additional_options:{type:"object",properties:{return_balance:{description:"Return balance after withdrawal",type:"boolean"}},default:{},$typescript:'{"additionalProperties": false}'},create_withdrawal_input:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},token:{description:"Foreign of the token to deposit as",type:["string","integer"]},wallet:{description:"Foreign of the wallet to deposit to",type:["string","integer"]},latest_control_hash:{description:"Latest control_hash on the from_wallet",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]},amount:{description:"amount to deposit",type:"number"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},status:{description:"status of the withdrawal",enum:["pending","finished"],default:"finished"},transfer_group:{description:"Id of the transfer_group this withdrawal is linked to",type:["string"]},created_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/created_at"}},required:["wallet","amount"],$typescript:'{"additionalProperties": false}'}},$typescript:'{"additionalProperties": false}'};var Vn={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateWithdrawalFnOutput",title:"CreateWithdrawalFnOutput",description:"Output of withdraw",$ref:"/txs/create-withdrawal/create-withdrawal.schema.output.json"};var Hn={$schema:"http://json-schema.org/draft-07/schema",$id:"FindBalancesFnInput",title:"FindBalancesFnInput",description:"Input for findBalances",type:"object",properties:{token:{description:"Id of the token to get balance",type:["string","integer"]},wallet:{description:"Id of the wallet to get balance from",type:["string","integer"]},options:{$ref:"#/definitions/find_balances_fn_options"}},definitions:{find_balances_fn_options:{description:"findBalances function options",allOf:[{$ref:"/fns/fn-consts.schema.json#/definitions/i_fn_find_options_extra"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_limiting_options"},{$ref:"/txs/find-balance-many/find-balance-many.schema.input.json#/definitions/find_balance_many_ordering_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_select_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_deselect_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_options"}]}},$queryBuilder:!0,additionalProperties:!1};var zn={$schema:"http://json-schema.org/draft-07/schema",$id:"FindBalancesFnOutput",title:"FindBalancesFnOutput",description:"Output of findBalances",type:"object",$ref:"/txs/find-balance-many/find-balance-many.schema.output.json"};var Kn={$schema:"http://json-schema.org/draft-07/schema",$id:"FindTokensFnInput",title:"FindTokensFnInput",description:"Input for findTokens",type:"object",properties:{foreign:{description:"Foreign of the token",type:["string","integer"]},type:{$ref:"/db/token/token.schema.json#/properties/type"},belongs_to:{description:"Foreign of the wallet connected to token",type:["string","integer"]},metadata:{description:"Metadata filter",$ref:"/db/consts.schema.json#/definitions/DbFilterMetadata"},options:{$ref:"#/definitions/find_tokens_fn_options"}},definitions:{find_tokens_fn_options:{description:"findtokens function options",allOf:[{$ref:"/fns/fn-consts.schema.json#/definitions/i_fn_find_options_extra"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_limiting_options"},{$ref:"/txs/find-token-many/find-token-many.schema.input.json#/definitions/find_token_many_ordering_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_select_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_deselect_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_options"}]}},$queryBuilder:!0,additionalProperties:!1};var Qn={$schema:"http://json-schema.org/draft-07/schema",$id:"FindTokensFnOutput",title:"FindTokensFnOutput",description:"Output of findTokens",type:"object",$ref:"/txs/find-token-many/find-token-many.schema.output.json"};var Jn={$schema:"http://json-schema.org/draft-07/schema",$id:"FindTransferGroupsFnInput",title:"FindTransferGroupsFnInput",description:"Input for findTransferGroups",type:"object",properties:{identifier:{description:"Identifier of the transfer_group",type:["string","integer"]},transfer_status:{description:"Status of the transfers",$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/transfer_status"},status:{description:"Status of the transfer_group",$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/status"},metadata:{description:"Metadata filter",$ref:"/db/consts.schema.json#/definitions/DbFilterMetadata"},reverses:{description:"Identifier of the transfer_group the transfer_group reverses",type:["string","integer"]},type:{description:"Type of the transfer group",$ref:"/db/consts.schema.json#/definitions/TransferGroupType"},options:{$ref:"#/definitions/find_transfer_groups_fn_options"}},definitions:{find_transfer_groups_fn_options:{description:"findTransferGroups function options",allOf:[{$ref:"/fns/fn-consts.schema.json#/definitions/i_fn_find_options_extra"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_limiting_options"},{$ref:"/txs/find-transfer-group-many/find-transfer-group-many.schema.input.json#/definitions/find_transfer_group_many_ordering_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/find_transfer_groups_fn_extra_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_select_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_deselect_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_options"}]},find_transfer_groups_fn_extra_options:{description:"simplified options for findTransferGroups",type:"object",properties:{},$typescript:'{"additionalProperties":false}'}},$queryBuilder:!0,additionalProperties:!1};var Xn={$schema:"http://json-schema.org/draft-07/schema",$id:"FindTransferGroupsFnOutput",title:"FindTransferGroupsFnOutput",description:"Output of findTransferGroups",type:"object",$ref:"/txs/find-transfer-group-many/find-transfer-group-many.schema.output.json"};var Yn={$schema:"http://json-schema.org/draft-07/schema",$id:"FindTransfersFnInput",title:"FindTransfersFnInput",description:"Input for findTransfers",type:"object",properties:{wallet:{description:"Foreign of the wallet connected to transfers",type:["string","integer"]},token:{description:"Foreign of the token transferred",type:["string","integer"]},from_wallet:{description:"Foreign of the wallet transfers are made from",type:["string","integer"]},to_wallet:{description:"Foreign of the wallet transfers are made to",type:["string","integer"]},transfer_group:{description:"Foreign of the transfer_group the transfers are a part of",type:["string","integer"]},status:{description:"Status of the transfers",$ref:"/db/transfer/transfer.schema.input.json#/properties/status"},metadata:{description:"Metadata filter",$ref:"/db/consts.schema.json#/definitions/DbFilterMetadata"},options:{$ref:"#/definitions/find_transfers_fn_options"}},definitions:{find_transfers_fn_options:{description:"findTransfers function options",allOf:[{$ref:"/fns/fn-consts.schema.json#/definitions/i_fn_find_options_extra"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_limiting_options"},{$ref:"/txs/find-transfer-many/find-transfer-many.schema.input.json#/definitions/find_transfer_many_ordering_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/find_transfers_fn_extra_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_select_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_deselect_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_options"}]},find_transfers_fn_extra_options:{description:"simplified options for findTransfers",type:"object",properties:{return_running_balance:{description:"return running balance for specified wallet under filter",type:"boolean"},return_signed_amount:{description:"return running balance for specified wallet under filter",type:"boolean"},return_running_balance_for_wallet:{description:"foreign key for which wallet should running balance be returned for",type:["string","integer"]},return_signed_amount_for_wallet:{description:"foreign key for which wallet should signed amounts be returned for",type:["string","integer"]}},$typescript:'{"additionalProperties":false}'}},$queryBuilder:!0,additionalProperties:!1};var Zn={$schema:"http://json-schema.org/draft-07/schema",$id:"FindTransfersFnOutput",title:"FindTransfersFnOutput",description:"Output of findTransfers",type:"object",$ref:"/txs/find-transfer-many/find-transfer-many.schema.output.json"};var ea={$schema:"http://json-schema.org/draft-07/schema",$id:"FindWalletsFnInput",title:"FindWalletsFnInput",description:"Input for findWallets",type:"object",properties:{foreign:{$ref:"/db/wallet/wallet.schema.json#/properties/foreign"},name:{$ref:"/db/wallet/wallet.schema.json#/properties/name"},type:{$ref:"/db/wallet/wallet.schema.json#/properties/type"},status:{$ref:"/db/wallet/wallet.schema.json#/properties/status"},metadata:{description:"Metadata filter",$ref:"/db/consts.schema.json#/definitions/DbFilterMetadata"},options:{$ref:"#/definitions/find_wallets_fn_options"}},definitions:{find_wallets_fn_options:{description:"Optional flags for input",type:"object",allOf:[{$ref:"/fns/fn-consts.schema.json#/definitions/i_fn_find_options_extra"},{$ref:"/txs/find-wallet-many/find-wallet-many.schema.input.json#/definitions/find_wallet_many_tx_options"},{$ref:"#/definitions/find_wallets_fn_extra_options"}]},find_wallets_fn_extra_options:{type:"object",properties:{include_balance_for_token:{description:"Foreign of token to include balance for",type:["string","number"]}},$typescript:'{"additionalProperties":false}'}},$queryBuilder:!0,additionalProperties:!1};var ta={$schema:"http://json-schema.org/draft-07/schema",$id:"FindWalletsFnOutput",title:"FindWalletsFnOutput",description:"Output of findWallets",type:"object",$ref:"/txs/find-wallet-many/find-wallet-many.schema.output.json"};var ra={$schema:"http://json-schema.org/draft-07/schema",$id:"FnConsts",description:"Generics used by functions",definitions:{i_fn_find_options:{description:"extended find options for client functions",allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_limiting_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_ordering_options"},{$ref:"#/definitions/i_fn_find_options_extra"}]},i_fn_find_options_extra:{description:"extra find options for client functions",$typescript:'{"additionalProperties":false}',type:"object",properties:{order_by:{description:"Ordering options in string format",type:"string"}}}}};var na={$schema:"http://json-schema.org/draft-07/schema",$id:"GetBalanceFnInput",title:"GetBalanceFnInput",description:"Input for Getbalance",type:"object",properties:{token:{description:"Id of the token to get balance",type:["string","integer"]},wallet:{description:"Id of the wallet to get balance from",type:["string","integer"]},datetime:{description:"Date and time this balance should be got",type:"string"},options:{$ref:"#/definitions/get_balance_fn_options"}},definitions:{get_balance_fn_options:{allOf:[{$ref:"/txs/get-balance/get-balance.schema.input.json#/definitions/get_balance_tx_options"}]}},required:["wallet"],additionalProperties:!1};var aa={$schema:"http://json-schema.org/draft-07/schema",$id:"GetBalanceFnOutput",title:"GetBalanceFnOutput",description:"Output of balance",type:"object",$ref:"/txs/get-balance/get-balance.schema.output.json"};var sa={$schema:"http://json-schema.org/draft-07/schema",$id:"GetBalanceHistoryFnInput",title:"GetBalanceHistoryFnInput",description:"Input for getBalanceHistory",type:"object",properties:{token:{description:"Id of the token to get balance",type:["string","integer"]},wallet:{description:"Id of the wallet to get balance from",type:["string","integer"]},options:{$ref:"#/definitions/get_balance_history_fn_options"}},definitions:{get_balance_history_fn_options:{description:"Optional flags for input",type:"object",allOf:[{$ref:"/txs/get-balance-history/get-balance-history.schema.input.json#/definitions/get_balance_history_tx_options"}]}},required:["wallet"],additionalProperties:!1};var ia={$schema:"http://json-schema.org/draft-07/schema",$id:"GetBalanceHistoryFnOutput",title:"GetBalanceHistoryFnOutput",description:"Output of getBalanceHistory",type:"object",$ref:"/txs/get-balance-history/get-balance-history.schema.output.json"};var oa={$schema:"http://json-schema.org/draft-07/schema",$id:"GetFlagsFnInput",title:"GetFlagsFnInput",description:"Input for getFlags",type:"object",properties:{options:{$ref:"#/definitions/get_flags_fn_options"}},default:{},definitions:{get_flags_fn_options:{allOf:[{$ref:"/txs/get-flags/get-flags.schema.input.json#/definitions/get_flags_tx_options"}]}},additionalProperties:!1};var pa={$schema:"http://json-schema.org/draft-07/schema",$id:"GetFlagsFnOutput",title:"GetFlagsFnOutput",description:"Output of getFlags",$ref:"/txs/get-flags/get-flags.schema.output.json"};var da={$schema:"http://json-schema.org/draft-07/schema",$id:"GetStatisticsFnInput",title:"GetStatisticsFnInput",description:"Input for getStatistics",type:"object",properties:{model:{$ref:"/txs/get-statistics/get-statistics.schema.input.json#/definitions/statistics_model"},groups:{$ref:"/txs/get-statistics/get-statistics.schema.input.json#/definitions/statistics_groups"},aggregator:{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_aggregator"},filter:{$ref:"/txs/get-statistics/get-statistics.schema.input.json#/definitions/statistics_filter"},options:{$ref:"#/definitions/get_statistics_fn_options"}},definitions:{get_statistics_fn_options:{description:"Optional flags for input",type:"object",allOf:[{$ref:"/txs/get-statistics/get-statistics.schema.input.json#/definitions/get_statistics_tx_options"}]}},additionalProperties:!1};var fa={$schema:"http://json-schema.org/draft-07/schema",$id:"GetStatisticsFnOutput",title:"GetStatisticsFnOutput",description:"Output of getStatistics",type:"object",$ref:"/txs/get-statistics/get-statistics.schema.output.json"};var ua={$schema:"http://json-schema.org/draft-07/schema",$id:"GetTokenFnInput",title:"GetTokenFnInput",description:"Input for getToken",type:"object",properties:{foreign:{$ref:"/db/token/token.schema.json#/properties/foreign"},options:{$ref:"#/definitions/get_token_fn_options"}},definitions:{get_token_fn_options:{allOf:[{$ref:"/txs/get-token/get-token.schema.input.json#/definitions/get_token_tx_options"}]}},additionalProperties:!1};var la={$schema:"http://json-schema.org/draft-07/schema",$id:"GetTokenFnOutput",title:"GetTokenFnOutput",description:"Output of getToken",$ref:"/txs/get-token/get-token.schema.output.json"};var ca={$schema:"http://json-schema.org/draft-07/schema",$id:"GetTransferFnInput",title:"GetTransferFnInput",description:"Input for getTransfer",type:"object",properties:{transfer:{description:"Transfer identifier",type:["string","integer"]},options:{$ref:"#/definitions/get_transfer_fn_options"}},definitions:{get_transfer_fn_options:{description:"Optional flags for input",allOf:[{$ref:"/txs/get-transfer/get-transfer.schema.input.json#/definitions/get_transfer_tx_options"}]}},required:["transfer"],additionalProperties:!1};var ma={$schema:"http://json-schema.org/draft-07/schema",$id:"GetTransferFnOutput",title:"GetTransferFnOutput",description:"Output of getTransfer",type:"object",$ref:"/txs/get-transfer/get-transfer.schema.output.json"};var ha={$schema:"http://json-schema.org/draft-07/schema",$id:"GetTransferGroupFnInput",title:"GetTransferGroupFnInput",description:"Input for getTransferGroup",type:"object",properties:{transfer_group:{description:"identifier of the transfer group to reverse",type:["string","number"]},options:{$ref:"#/definitions/get_transfer_group_fn_options"}},definitions:{get_transfer_group_fn_options:{description:"Optional flags for input",allOf:[{$ref:"/txs/get-transfer-group/get-transfer-group.schema.input.json#/definitions/get_transfer_group_tx_options"}]}},required:["transfer_group"],additionalProperties:!1};var _a={$schema:"http://json-schema.org/draft-07/schema",$id:"GetTransferGroupFnOutput",title:"GetTransferGroupFnOutput",description:"Output of getTransferGroup",type:"object",$ref:"/txs/get-transfer-group/get-transfer-group.schema.output.json"};var ga={$schema:"http://json-schema.org/draft-07/schema",$id:"GetWalletFnInput",title:"GetWalletFnInput",description:"Input for getWallet",type:"object",properties:{wallet:{description:"Wallet foreign",type:["string","integer"]},options:{$ref:"#/definitions/get_wallet_fn_options"}},definitions:{get_wallet_fn_options:{description:"Optional flags for input",type:"object",allOf:[{$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/get_wallet_tx_options"}]}},required:["wallet"],additionalProperties:!1};var Ta={$schema:"http://json-schema.org/draft-07/schema",$id:"GetWalletFnOutput",title:"GetWalletFnOutput",description:"Output of getWallet",type:"object",$ref:"/txs/get-wallet/get-wallet.schema.output.json"};var Bt={$schema:"http://json-schema.org/draft-07/schema",$id:"ImportDataFnInput",title:"ImportDataFnInput",description:"Input for import",type:"object",properties:{actions:{type:"array",items:{$ref:"#/definitions/import_data_fn_stream_chunk"}},options:{$ref:"#/definitions/import_data_fn_options"}},definitions:{import_data_fn_options:{description:"Optional flags for input",type:"object",allOf:[{$ref:"/txs/import-actions/import-actions.schema.input.json#/definitions/import_actions_tx_options"}]},import_data_fn_stream_chunk:{type:"object",anyOf:[{$ref:"#/definitions/import_wallet"},{$ref:"#/definitions/import_token"},{$ref:"#/definitions/import_transfer_group"},{$ref:"#/definitions/import_transfer"},{$ref:"#/definitions/import_reverse_transfer"},{$ref:"#/definitions/import_reverse_transfer_group"}]},import_wallet:{type:"object",properties:{target:{description:"Target of the action",type:"string",enum:["wallet"]},data:{allOf:[{$ref:"/fns/create-wallet/create-wallet.schema.input.json#/definitions/create_wallet_fn_input_data"}]}},required:["target","data"],$typescript:'{"additionalProperties": false}'},import_token:{type:"object",properties:{target:{description:"Target of the action",type:"string",enum:["token"]},data:{allOf:[{$ref:"/fns/create-token/create-token.schema.input.json#/definitions/create_token_fn_input_data"}]}},required:["target","data"],$typescript:'{"additionalProperties": false}'},import_transfer_group_extension:{type:"object",properties:{created_at:{type:"string",format:"date-time"},status_finalized_at:{type:"string",format:"date-time"},transfer_status_finalized_at:{type:"string",format:"date-time"}},$typescript:'{"additionalProperties": false}'},import_transfer_group_data:{allOf:[{$ref:"/fns/create-transfer-group/create-transfer-group.schema.input.json#/definitions/create_transfer_group_fn_input_data"},{$ref:"#/definitions/import_transfer_group_extension"}]},import_transfer_group:{type:"object",properties:{target:{description:"Target of the action",type:"string",enum:["transfer_group"]},data:{allOf:[{$ref:"#/definitions/import_transfer_group_data"}]}},required:["target","data"],$typescript:'{"additionalProperties": false}'},import_transfer_extension:{type:"object",properties:{created_at:{type:"string",format:"date-time"},status_finalized_at:{type:"string",format:"date-time"}},$typescript:'{"additionalProperties": false}'},import_transfer_data:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},token:{description:"Foreign of the token to transfer as",type:["string","integer"]},from_wallet:{description:"Foreign of the wallet to deposit to",type:["string","integer"]},to_wallet:{description:"Foreign of the wallet to deposit to",type:["string","integer"]},latest_control_hash:{description:"Latest control_hash on the from_wallet",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]},amount:{description:"amount to deposit",type:"number"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},type:{type:"string",enum:["transfer"]},status:{description:"status of the transfer",enum:["pending","cancelled","finished"],default:"finished"},transfer_group:{description:"Id of the transfer_group this transfer is linked to",type:["string"]},created_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/created_at"},status_finalized_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/status_finalized_at"}},required:["from_wallet","to_wallet","amount"],$typescript:'{"additionalProperties": false}'},import_withdrawal_data:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},token:{description:"Foreign of the token to transfer as",type:["string","integer"]},wallet:{description:"Foreign of the wallet to withdraw from",type:["string","integer"]},latest_control_hash:{description:"Latest control_hash on the from_wallet",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]},amount:{description:"amount to deposit",type:"number"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},type:{type:"string",enum:["withdrawal"]},status:{description:"status of the transfer",enum:["pending","cancelled","finished"],default:"finished"},transfer_group:{description:"Id of the transfer_group this transfer is linked to",type:["string"]},created_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/created_at"},status_finalized_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/status_finalized_at"}},required:["wallet","amount","type"],$typescript:'{"additionalProperties": false}'},import_deposit_data:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},token:{description:"Foreign of the token to transfer as",type:["string","integer"]},wallet:{description:"Foreign of the wallet to deposit to",type:["string","integer"]},amount:{description:"amount to deposit",type:"number"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},type:{type:"string",enum:["deposit"]},status:{description:"status of the transfer",enum:["pending","cancelled","finished"],default:"finished"},transfer_group:{description:"Id of the transfer_group this transfer is linked to",type:["string"]},created_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/created_at"},status_finalized_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/status_finalized_at"}},required:["wallet","amount","type"],$typescript:'{"additionalProperties": false}'},create_transfer_data_wild:{anyOf:[{$ref:"#/definitions/import_transfer_data"},{$ref:"#/definitions/import_withdrawal_data"},{$ref:"#/definitions/import_deposit_data"}]},import_transfer:{type:"object",properties:{target:{description:"Target of the action",type:"string",enum:["transfer"]},data:{allOf:[{$ref:"#/definitions/create_transfer_data_wild"}]}},required:["target","data"],$typescript:'{"additionalProperties": false}'},import_reverse_transfer_options:{type:"object",properties:{metadata_action:{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_action"}},$typescript:'{"additionalProperties": false}'},import_reverse_transfer_extension:{type:"object",properties:{options:{allOf:[{$ref:"#/definitions/import_reverse_transfer_options"}]}},$typescript:'{"additionalProperties": false}'},import_reverse_transfer_data:{allOf:[{$ref:"/fns/reverse-transfer/reverse-transfer.schema.input.json#/definitions/reverse_transfer_fn_input_data"},{$ref:"#/definitions/import_reverse_transfer_extension"}]},import_reverse_transfer:{type:"object",properties:{target:{description:"Target of the action",type:"string",enum:["reverse_transfer"]},data:{allOf:[{$ref:"#/definitions/import_reverse_transfer_data"}]}},required:["target","data"],$typescript:'{"additionalProperties": false}'},import_reverse_transfer_group_options:{type:"object",properties:{metadata_action:{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_action"},transfer_metadata_action:{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_action"}},$typescript:'{"additionalProperties": false}'},import_reverse_transfer_group_extension:{type:"object",properties:{options:{allOf:[{$ref:"#/definitions/import_reverse_transfer_group_options"}]}},$typescript:'{"additionalProperties": false}'},import_reverse_transfer_group_data:{allOf:[{$ref:"/fns/reverse-transfer-group/reverse-transfer-group.schema.input.json#/definitions/reverse_transfer_group_fn_input_data"},{$ref:"#/definitions/import_reverse_transfer_group_extension"}]},import_reverse_transfer_group:{type:"object",properties:{target:{description:"Target of the action",type:"string",enum:["reverse_transfer_group"]},data:{allOf:[{$ref:"#/definitions/import_reverse_transfer_group_data"}]}},required:["target","data"],$typescript:'{"additionalProperties": false}'}},$allowStreamInput:"import_data_fn_stream_chunk",additionalProperties:!1};var ya={$schema:"http://json-schema.org/draft-07/schema",$id:"ImportDataFnOutput",title:"ImportDataFnOutput",description:"Output of import",type:"object",$ref:"/txs/import-actions/import-actions.schema.output.json"};var ba={$schema:"http://json-schema.org/draft-07/schema",$id:"ReverseTransferFnInput",title:"ReverseTransferFnInput",description:"Input for reverseTransfer",allOf:[{$ref:"#/definitions/reverse_transfer_fn_input_data"},{$ref:"#/definitions/reverse_transfer_fn_options_property"}],definitions:{reverse_transfer_fn_options:{allOf:[{$ref:"/txs/reverse-transfer/reverse-transfer.schema.input.json#/definitions/reverse_transfer_tx_options"}]},reverse_transfer_fn_options_property:{type:"object",properties:{options:{$ref:"#/definitions/reverse_transfer_fn_options"}},$typescript:'{"additionalProperties": false}'},reverse_transfer_fn_input_data:{type:"object",properties:{transfer:{description:"Transfer identifier",type:["string","integer"]},status:{description:"Status of the created transfer",$ref:"/db/transfer/transfer.schema.input.json#/properties/status"},identifier:{description:"Identifier for the created transfer",$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},force:{description:"Force create the reverse transfer ignoring balance",$ref:"/db/transfer/transfer.schema.input.json#/properties/force"},metadata:{description:"Metadata for the reversed transfers",$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},extend_metadata:{description:"Key value object to extend metadata with on created transfer",$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/metadata"}},required:["transfer"],$typescript:'{"additionalProperties": false}'}},$typescript:'{"additionalProperties": false}'};var Fa={$schema:"http://json-schema.org/draft-07/schema",$id:"ReverseTransferFnOutput",title:"ReverseTransferFnOutput",description:"Output of reverseTransfer",$ref:"/txs/reverse-transfer/reverse-transfer.schema.output.json"};var xa={$schema:"http://json-schema.org/draft-07/schema",$id:"ReverseTransferGroupFnInput",title:"ReverseTransferGroupFnInput",description:"Input for reverseTransferGroup",allOf:[{$ref:"#/definitions/reverse_transfer_group_fn_input_data"},{$ref:"#/definitions/reverse_transfer_group_fn_options_property"}],definitions:{reverse_transfer_group_fn_options:{allOf:[{$ref:"/txs/reverse-transfer-group/reverse-transfer-group.schema.input.json#/definitions/reverse_transfer_group_tx_options"}]},reverse_transfer_group_fn_options_property:{type:"object",properties:{options:{$ref:"#/definitions/reverse_transfer_group_fn_options"}},$typescript:'{"additionalProperties": false}'},reverse_transfer_group_fn_input_data:{type:"object",properties:{transfer_group:{description:"identifier of the transfer group to reverse",type:["string","number"]},status:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/status"},transfer_status:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/transfer_status"},identifier:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/identifier"},force:{$ref:"/db/transfer/transfer.schema.input.json#/properties/force"},metadata:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/metadata"},transfer_metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},extend_metadata:{description:"Key value object to extend metadata with on created transfer",$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/metadata"},transfer_extend_metadata:{description:"Key value object to extend metadata with on created transfer",$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"}},required:["transfer_group"],$typescript:'{"additionalProperties": false}'}},$typescript:'{"additionalProperties": false}'};var $a={$schema:"http://json-schema.org/draft-07/schema",$id:"ReverseTransferGroupFnOutput",title:"ReverseTransferGroupFnOutput",description:"Output of reverseTransferGroup",$ref:"/txs/reverse-transfer-group/reverse-transfer-group.schema.output.json"};var Oa={$schema:"http://json-schema.org/draft-07/schema",$id:"ReverseTransfersFnInput",title:"ReverseTransfersFnInput",description:"Input for reverseTransfers",type:"object",properties:{wallet:{description:"Foreign of the wallet connected to transfers",type:["string","integer"]},token:{description:"Foreign of the token transferred",type:["string","integer"]},from_wallet:{description:"Foreign of the wallet transfers are made from",type:["string","integer"]},to_wallet:{description:"Foreign of the wallet transfers are made to",type:["string","integer"]},transfer_group:{description:"Foreign of the transfer_group the transfers are a part of",type:["string","integer"]},status:{description:"Status of the transfers",$ref:"/db/transfer/transfer.schema.input.json#/properties/status"},metadata:{description:"Metadata filter",$ref:"/db/consts.schema.json#/definitions/DbFilterMetadata"},reverse:{$ref:"/txs/reverse-transfer-many/reverse-transfer-many.schema.input.json#/definitions/reverse_transfer_many_modifications"},options:{$ref:"#/definitions/reverse_transfers_fn_options"}},definitions:{reverse_transfers_fn_options:{description:"findTransfers function options",allOf:[{$ref:"/txs/reverse-transfer-many/reverse-transfer-many.schema.input.json#/definitions/reverse_transfer_many_tx_options"}]},reverse_transfers_fn_modifications:{description:"In case the transfer will be made then apply these modifications",allOf:[{$ref:"/txs/reverse-transfer-many/reverse-transfer-many.schema.input.json#/definitions/reverse_transfer_many_modifications"}]}},$reverseQueryBuilder:!0,additionalProperties:!1};var wa={$schema:"http://json-schema.org/draft-07/schema",$id:"ReverseTransfersFnOutput",title:"ReverseTransfersFnOutput",description:"Output of reverseTransfers",type:"object",$ref:"/txs/reverse-transfer-many/reverse-transfer-many.schema.output.json"};var Ia={$schema:"http://json-schema.org/draft-07/schema",$id:"SetFlagsFnInput",title:"SetFlagsFnInput",description:"Input for setFlags",allOf:[{$ref:"#/definitions/set_flags_properties"}],definitions:{set_flags_fn_options:{allOf:[{$ref:"/txs/set-flags/set-flags.schema.input.json#/definitions/set_flags_tx_options"}]},set_flags_properties:{allOf:[{$ref:"/db/consts.schema.json#/definitions/Flags"},{$ref:"#/definitions/set_flags_options_property"}]},set_flags_options_property:{type:"object",properties:{options:{$ref:"#/definitions/set_flags_fn_options"}},$typescript:'{"additionalProperties": false}'}},$typescript:'{"additionalProperties": false}'};var ja={$schema:"http://json-schema.org/draft-07/schema",$id:"SetFlagsFnOutput",title:"SetFlagsFnOutput",description:"Output of setFlags",$ref:"/txs/set-flags/set-flags.schema.output.json"};var va={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTokenFnInput",title:"UpdateTokenFnInput",description:"Input for updateToken",type:"object",properties:{token:{description:"Token foreign",type:["string","number"]},metadata:{$ref:"/db/token/token.schema.json#/properties/metadata"},public:{$ref:"/db/token/token.schema.json#/properties/public"},status:{$ref:"/db/token/token.schema.json#/properties/status"},options:{$ref:"#/definitions/update_token_fn_options"}},definitions:{update_token_fn_fields:{description:"Updateable fields",type:"object",allOf:[{$ref:"/txs/update-token/update-token.schema.input.json#/definitions/update_token_fields"}]},update_token_fn_options:{description:"Optional flags for input",type:"object",allOf:[{$ref:"/txs/update-token/update-token.schema.input.json#/definitions/update_token_tx_options"}]}},additionalProperties:!1,required:["token"]};var ka={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTokenFnOutput",title:"UpdateTokenFnOutput",description:"Output of updateToken",type:"object",$ref:"/txs/update-token/update-token.schema.output.json"};var Sa={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTransferFnInput",title:"UpdateTransferFnInput",description:"Input for updateTransfer",type:"object",properties:{transfer:{description:"Transfer identifier",type:["string","integer"]},status:{description:"Status the transfer should be set to",enum:["finished","cancelled"]},metadata:{$ref:"/db/transfer/transfer.schema.json#/properties/metadata"},options:{$ref:"#/definitions/update_transfer_fn_options"}},definitions:{update_transfer_fn_options:{allOf:[{$ref:"/txs/update-transfer/update-transfer.schema.input.json#/definitions/update_transfer_tx_options"}]}},additionalProperties:!1,required:["transfer"]};var Ca={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTransferFnOutput",title:"UpdateTransferFnOutput",description:"Output of updateTransfer",type:"object",$ref:"/txs/update-transfer/update-transfer.schema.output.json"};var Pa={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTransferGroupFnInput",title:"UpdateTransferGroupFnInput",description:"Input for updateTransferGroup",anyOf:[{$ref:"#/definitions/update_transfer_group_fn_status"},{$ref:"#/definitions/update_transfer_group_fn_transfer_status"},{$ref:"#/definitions/update_transfer_group_fn_metadata"}],definitions:{update_transfer_group_fn_options:{$comment:"Using allOf so that references dont break",type:"object",allOf:[{$ref:"/txs/update-transfer-group/update-transfer-group.schema.input.json#/definitions/update_transfer_group_tx_options"}]},update_transfer_group_fn_status:{type:"object",properties:{transfer_group:{description:"identifier of the transfer group to reverse",type:["string","number"]},status:{description:"Lifecycle status of the TransferGroup",$ref:"/db/consts.schema.json#/definitions/TransferGroupStatus"},transfer_status:{description:"Status all the transfers should be set at.",$ref:"/db/consts.schema.json#/definitions/TransferStatus"},metadata:{description:"Key value object to be replaced or extended with existing TransferGroup metadata",$ref:"/db/transfer/transfer.schema.json#/properties/metadata"},options:{$ref:"#/definitions/update_transfer_group_fn_options"}},required:["transfer_group","status"],$typescript:'{"additionalProperties": false}'},update_transfer_group_fn_transfer_status:{type:"object",properties:{transfer_group:{description:"identifier of the transfer group to update",type:["string","number"]},status:{description:"Lifecycle status of the TransferGroup",$ref:"/db/consts.schema.json#/definitions/TransferGroupStatus"},transfer_status:{description:"Status all the transfers should be set at.",$ref:"/db/consts.schema.json#/definitions/TransferStatus"},metadata:{description:"Key value object to be replaced or extended with existing TransferGroup metadata",$ref:"/db/transfer/transfer.schema.json#/properties/metadata"},options:{$ref:"#/definitions/update_transfer_group_fn_options"}},required:["transfer_group","transfer_status"],$typescript:'{"additionalProperties": false}'},update_transfer_group_fn_metadata:{type:"object",properties:{transfer_group:{description:"identifier of the transfer group to update",type:["string","number"]},status:{description:"Lifecycle status of the TransferGroup",$ref:"/db/consts.schema.json#/definitions/TransferGroupStatus"},transfer_status:{description:"Status all the transfers should be set at.",$ref:"/db/consts.schema.json#/definitions/TransferStatus"},metadata:{description:"Key value object to be replaced or extended with existing TransferGroup metadata",$ref:"/db/transfer/transfer.schema.json#/properties/metadata"},options:{$ref:"#/definitions/update_transfer_group_fn_options"}},required:["transfer_group","metadata"],$typescript:'{"additionalProperties": false}'}}};var Ga={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTransferGroupFnOutput",title:"UpdateTransferGroupFnOutput",description:"Output of updateTransferGroup",type:"object",$ref:"/txs/update-transfer-group/update-transfer-group.schema.output.json"};var Da={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTransferGroupsFnInput",title:"UpdateTransferGroupsFnInput",description:"Input for updateTransferGroups",type:"object",properties:{transfer_status:{description:"Status of the transfers",$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/transfer_status"},status:{description:"Status of the transfer_group",$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/status"},metadata:{description:"Metadata filter",$ref:"/db/consts.schema.json#/definitions/DbFilterMetadata"},reverses:{description:"Identifier of the transfer_group the transfer_group reverses",type:["string","integer"]},type:{description:"Type of the transfer group",$ref:"/db/consts.schema.json#/definitions/TransferGroupType"},update:{$ref:"#/definitions/update_transfer_groups_fn_update_fields"},options:{$ref:"#/definitions/update_transfer_groups_fn_options"}},definitions:{update_transfer_groups_fn_update_fields:{type:"object",allOf:[{$ref:"/txs/update-transfer-group/update-transfer-group.schema.input.json#/definitions/update_transfer_group_data"}]},update_transfer_groups_fn_options:{description:"Optional flags for input",type:"object",allOf:[{$ref:"/txs/update-transfer-group/update-transfer-group.schema.input.json#/definitions/update_transfer_group_tx_options"}]}},$updateQueryBuilder:!0,additionalProperties:!1};var Ea={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTransferGroupsFnOutput",title:"UpdateTransferGroupsFnOutput",description:"Output of updateTransferGroups",type:"object",$ref:"/txs/update-transfer-group-many/update-transfer-group-many.schema.output.json"};var Ma={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTransfersFnInput",title:"UpdateTransfersFnInput",description:"Input for updateTransfers",type:"object",properties:{wallet:{description:"Foreign of the wallet connected to transfers",type:["string","integer"]},token:{description:"Foreign of the token transferred",type:["string","integer"]},from_wallet:{description:"Foreign of the wallet transfers are made from",type:["string","integer"]},to_wallet:{description:"Foreign of the wallet transfers are made to",type:["string","integer"]},transfer_group:{description:"Foreign of the transfer_group the transfers are a part of",type:["string","integer"]},status:{description:"Status of the transfers",$ref:"/db/transfer/transfer.schema.input.json#/properties/status"},metadata:{description:"Metadata filter",$ref:"/db/consts.schema.json#/definitions/DbFilterMetadata"},update:{$ref:"/txs/update-transfer/update-transfer.schema.input.json#/definitions/update_transfer_fields"},options:{$ref:"#/definitions/update_transfers_fn_options"}},definitions:{update_transfers_fn_options:{description:"Optional flags for input",type:"object",allOf:[{$ref:"/txs/update-transfer-many/update-transfer-many.schema.input.json#/definitions/update_transfer_many_tx_options"}]},update_transfers_fn_update_fields:{type:"object",allOf:[{$ref:"/txs/update-transfer/update-transfer.schema.input.json#/definitions/update_transfer_fields"}]}},$updateQueryBuilder:!0,additionalProperties:!1};var Ra={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTransfersFnOutput",title:"UpdateTransfersFnOutput",description:"Output of updateTransfers",type:"object",$ref:"/txs/update-transfer-many/update-transfer-many.schema.output.json"};var Wa={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateWalletFnInput",title:"UpdateWalletFnInput",description:"Input for updateWallet",type:"object",properties:{wallet:{description:"Wallet foreign",type:["string","integer"]},metadata:{$ref:"/db/wallet/wallet.schema.json#/properties/metadata"},name:{$ref:"/db/wallet/wallet.schema.input.json#/properties/name"},status:{$ref:"/db/wallet/wallet.schema.input.json#/properties/status"},options:{$ref:"#/definitions/update_wallet_fn_options"}},definitions:{update_wallet_fn_fields:{description:"Updatable fields",type:"object",allOf:[{$ref:"/txs/update-wallet/update-wallet.schema.input.json#/definitions/update_wallet_fields"}]},update_wallet_fn_options:{description:"Optional flags for input",type:"object",allOf:[{$ref:"/txs/update-wallet/update-wallet.schema.input.json#/definitions/update_wallet_tx_options"}]}},additionalProperties:!1,required:["wallet"]};var Aa={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateWalletFnOutput",title:"UpdateWalletFnOutput",description:"Output of updateWallet",type:"object",$ref:"/txs/update-wallet/update-wallet.schema.output.json"};var Na={$schema:"http://json-schema.org/draft-07/schema",$id:"AggregateTransferManyTxInput",title:"AggregateTransferManyTxInput",description:"Input for aggregateTransferMany",type:"object",properties:{transfer:{$ref:"/txs/find-transfer-many/find-transfer-many.schema.input.json#/definitions/find_transfer_many_filter"},aggregators:{description:"Array of aggregators to apply",type:"array",items:{$ref:"#/definitions/aggregate_transfer_many_aggregator"}},groups:{$ref:"#/definitions/aggregate_transfer_many_groups"},options:{$ref:"#/definitions/aggregate_transfer_many_tx_options"}},definitions:{aggregate_transfer_many_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/aggregate_transfer_many_additional_options"}]},aggregate_transfer_many_additional_options:{$typescript:'{"additionalProperties":false}',description:"Optional flags to aggregate data",type:"object",properties:{return_all_intervals:{description:"Add empty values for each interval if no matching data",type:"object",properties:{start_time:{type:"string"},end_time:{type:"string"}},additionalProperties:!1,required:["start_time","end_time"]}}},aggregate_transfer_many_groups:{type:"array",maxItems:5,items:{$ref:"#/definitions/aggregate_transfer_many_group"}},aggregate_transfer_many_group:{anyOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_group_period"},{$ref:"#/definitions/aggregate_transfer_many_group_field"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_group_metadata_field"}]},aggregate_transfer_many_group_field:{type:"object",properties:{type:{type:"string",enum:["field"]},field:{$ref:"#/definitions/aggregate_transfer_many_group_by_fields"},alias:{type:"string"}},required:["type","field"],additionalProperties:!1},aggregate_transfer_many_group_by_fields:{type:"string",enum:["type","status","from_wallet","to_wallet","wallet","token","transfer_group"]},aggregate_transfer_many_aggregator:{description:"Aggregator description",anyOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_aggregator_simple"},{$ref:"#/definitions/aggregate_transfer_many_aggregator_complex"}]},aggregate_transfer_many_aggregator_complex:{description:"Function and field to group",type:"object",properties:{function:{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_aggregator_simple"},field:{description:"Field to group by",type:"string",enum:["from.amount","to.amount","amount","abs.amount","transfer_group","from_wallet","to_wallet","wallet","token","id"]},alias:{description:"Alias to group under",type:"string"}},$typescript:'{"additionalProperties":false}'}},additionalProperties:!1};var Ua={$schema:"http://json-schema.org/draft-07/schema",$id:"AggregateTransferManyTxOutput",title:"AggregateTransferManyTxOutput",description:"Output of aggregateTransferMany",type:"object",properties:{rows:{description:"The results of the aggregation",$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_aggregate_results"},metadata:{description:"Information about the aggregation",$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_aggregating_metadata"}},additionalProperties:!1};var qa={$schema:"http://json-schema.org/draft-07/schema",$id:"AuthenticationCheckTxInput",title:"AuthenticationCheckTxInput",description:"Input for authenticationCheck",type:"object",properties:{options:{$ref:"#/definitions/authentication_check_tx_options"}},definitions:{authentication_check_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/authentication_check_additional_options"}]},authentication_check_additional_options:{description:"Optional flags for input",type:"object",default:{},$typescript:'{"additionalProperties":false}'}},additionalProperties:!1};var Ba={$schema:"http://json-schema.org/draft-07/schema",$id:"AuthenticationCheckTxOutput",title:"AuthenticationCheckTxOutput",description:"Output of authenticationCheck",type:"object",properties:{},additionalProperties:!1};var La={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateAccessTokenTxInput",title:"CreateAccessTokenTxInput",description:"Input for createAccessToken",type:"object",properties:{token:{anyOf:[{$ref:"#/definitions/create_access_token_limited"},{$ref:"#/definitions/create_access_token_admin"}]},options:{$ref:"#/definitions/create_access_token_tx_options"}},definitions:{create_access_token_limited:{type:"object",properties:{type:{enum:["limited"]},scopes:{type:"array",items:{type:"string",enum:["aggregateTransferMany","findBalanceMany","findTokenMany","findTransferGroupMany","findTransferMany","findWalletMany","getBalance","getBalanceHistory","getStatistics","getToken","getTokenMany","getTransfer","getTransferGroup","getWallet","getWalletMany"]}},filters:{description:"Forced filters for requests",type:"object",$ref:"#/definitions/create_access_token_forced_filters"},expiresIn:{description:"JWT expiration time in minutes",type:"number"}},required:["scopes","type","expiresIn"],additionalProperties:!1},create_access_token_admin:{type:"object",properties:{type:{enum:["admin"]},expiresIn:{description:"JWT expiration time in minutes",type:"number"}},required:["type","expiresIn"],additionalProperties:!1},create_access_token_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/create_access_token_additional_options"}]},create_access_token_additional_options:{description:"Optional flags for input",type:"object",default:{},$typescript:'{"additionalProperties":false}'},create_access_token_forced_filters:{type:"object",properties:{wallet_foreign:{type:"string"},from_wallet_foreign:{type:"string"},to_wallet_foreign:{type:"string"},token_foreign:{type:"string"}},additionalProperties:!1}},additionalProperties:!1};var Va={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateAccessTokenTxOutput",title:"CreateAccessTokenTxOutput",description:"Output of createAccessToken",type:"object",properties:{authToken:{description:"The JWT token",type:"string"}},required:["token"],additionalProperties:!1};var Ha={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateContractTxInput",title:"CreateContractTxInput",description:"Input for createContract",type:"object",properties:{token:{allOf:[{$ref:"#/definitions/create_contract_token"}]},exchange:{allOf:[{$ref:"#/definitions/create_contract_exchange"}]},options:{$ref:"#/definitions/create_contract_tx_options"}},definitions:{create_contract_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/create_contract_additional_options"}]},create_contract_additional_options:{description:"Optional flags for input",type:"object",default:{},$typescript:'{"additionalProperties":false}'},create_contract_token:{type:"object",properties:{foreign:{allOf:[{$ref:"/db/token/token.schema.input.json#/properties/foreign"}]},metadata:{allOf:[{$ref:"/db/token/token.schema.input.json#/properties/metadata"}]},deposits:{allOf:[{$ref:"#/definitions/create_contract_deposits"}]},owner:{description:"The inital owner of the contract, defaults to foreign = 'house'",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"}},additionalProperties:!1,required:["foreign","deposits"]},create_contract_deposit:{type:"object",properties:{token:{description:"Token that is moved",allOf:[{$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"}]},amount:{allOf:[{$ref:"/db/transfer/transfer.schema.input.json#/properties/amount"}]}},additionalProperties:!1,required:["token","amount"]},create_contract_deposits:{type:"array",items:{allOf:[{$ref:"#/definitions/create_contract_deposit"}]},minItems:1},create_contract_exchange:{type:"object",properties:{from_wallet:{description:"Wallet the contract will belong to at the end (buyer)",allOf:[{$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"}]},from_latest_control_hash:{description:"Latest control_hash on the from_wallet+from_token combo",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]},from_token:{description:"Token that is transferred from from_wallet in exchange of the contract",$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"},to_wallet:{description:"Wallet the payment for the contract is sent to (seller)",allOf:[{$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"}]},amount:{allOf:[{$ref:"/db/transfer/transfer.schema.input.json#/properties/amount"}]},status:{description:"The state at which the exchange is created",type:"string",enum:["pending","finished"]},force:{allOf:[{$ref:"/db/transfer/transfer.schema.input.json#/properties/force"}]},metadata:{allOf:[{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"}]}},additionalProperties:!1,required:["from_wallet","amount"]}},required:["token"],additionalProperties:!1};var za={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateContractTxOutput",title:"CreateContractTxOutput",description:"Output of createContract",type:"object",properties:{token:{$ref:"/db/token/token.schema.json"},exchange:{description:"Created exchange for the Contract",allOf:[{$ref:"/txs/create-transfer-group/create-transfer-group.schema.output.json"}]}},required:["token"],additionalProperties:!1};var Ka={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateDepositTxInput",title:"CreateDepositTxInput",description:"Input for createDeposit",type:"object",properties:{deposit:{$ref:"/txs/create-transfer/create-transfer.schema.input.json#/definitions/transfer_data_deposit"},options:{$ref:"#/definitions/create_deposit_tx_options"}},definitions:{create_deposit_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"/txs/create-transfer/create-transfer.schema.input.json#/definitions/create_transfer_additional_options"}]}},additionalProperties:!1,required:["deposit"]};var Qa={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateDepositTxOutput",title:"CreateDepositTxOutput",description:"The transfer of funds and optionally the destination wallet balance",allOf:[{$ref:"/txs/create-transfer/create-transfer.schema.output.json"}]};var Ja={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateDistributionTxInput",title:"CreateDistributionTxInput",description:"Input for createDistribution",type:"object",properties:{distribution:{$ref:"#/definitions/distribution"},options:{$ref:"#/definitions/create_distribution_tx_options"}},definitions:{create_distribution_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/create_distribution_additional_options"}]},create_distribution_additional_options:{description:"Optional flags for input",type:"object",default:{dryrun:!1},properties:{dryrun:{type:"boolean",default:!1}},$typescript:'{"additionalProperties":false}'},leftover_target:{type:"object",properties:{rule:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_distributor_leftover_rule"}]},target:{type:"object",properties:{wallet:{allOf:[{$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"}]},metadata:{allOf:[{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"}]}},required:["wallet"],additionalProperties:!1}},required:["rule"],additionalProperties:!1},distribution:{description:"Distribute funds from one wallet between multiple wallets",type:"object",properties:{identifier:{description:"Unique identifier for this distribution",type:"string"},latest_control_hash:{description:"Latest control_hash on the from_wallet",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]},from_wallet:{description:"Wallet where funds are debited",allOf:[{$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"}]},token:{description:"Token that is moved",allOf:[{$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"}]},amount:{allOf:[{$ref:"/db/transfer/transfer.schema.input.json#/properties/amount"}]},status:{allOf:[{$ref:"/db/transfer/transfer.schema.input.json#/properties/status"}]},force:{allOf:[{$ref:"/db/transfer/transfer.schema.input.json#/properties/force"}]},metadata:{allOf:[{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"}]},copy_wallet_metadata_fields:{description:"Copy metadata information from Wallet metadata to transfer metadata",type:"array",items:{$ref:"#/definitions/copy_metadata_field"}},transfer_group:{description:"TransferGroup the transfer belongs to",allOf:[{$ref:"/txs/get-transfer-group/get-transfer-group.schema.input.json#/definitions/unique_transfer_group_filter"}]},targets:{anyOf:[{$ref:"#/definitions/target_wallets"},{$ref:"#/definitions/target_token"}]},leftover:{allOf:[{$ref:"#/definitions/leftover_target"}]}},required:["identifier","from_wallet","token","amount","targets","leftover"],additionalProperties:!1},copy_metadata_field:{description:"Copy metadata info from property to property",type:"object",properties:{from_property:{type:"string"},to_property:{type:"string"}},required:["from_property"],additionalProperties:!1},target_token:{description:"Wallets will receive funds based on their balance of this token",allOf:[{$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"}]},target_wallet:{type:"object",properties:{wallet:{description:"Wallet where funds are credited",allOf:[{$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"}]},portion:{description:"Number specifying the portion of funds to be credited",type:["string","number"]},metadata:{allOf:[{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"}]}},required:["wallet"],additionalProperties:!1},target_wallets:{type:"array",items:{$ref:"#/definitions/target_wallet"},minItems:1}},required:["distribution"],additionalProperties:!1};var Xa={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateDistributionTxOutput",title:"CreateDistributionTxOutput",description:"Output of createDistribution",type:"object",properties:{transfer_group:{description:"Created distribution transfer group",allOf:[{$ref:"/db/transfer-group/transfer-group.schema.json"}]},transfers:{description:"Created transfers",type:"array",items:{$ref:"/db/transfer/transfer.schema.json"}}},required:["transfer_group","transfers"],additionalProperties:!1};var Ya={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateTokenTxInput",title:"CreateTokenTxInput",description:"Input for createToken function",type:"object",properties:{token:{$ref:"#/definitions/create_token_input"},options:{$ref:"#/definitions/create_token_tx_options"}},definitions:{create_token_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"}]},create_token_input:{type:"object",properties:{foreign:{$ref:"/db/token/token.schema.json#/properties/foreign"},public:{$ref:"/db/token/token.schema.json#/properties/public"},metadata:{$ref:"/db/token/token.schema.json#/properties/metadata"},divisor:{$ref:"/db/token/token.schema.json#/properties/divisor"},limit:{$ref:"/db/token/token.schema.json#/properties/limit"},type:{$ref:"/db/token/token.schema.json#/properties/type"},belongs_to:{description:"Wallet this token belongs_to",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"}},additionalProperties:!1,required:["foreign"]}},required:["token"],additionalProperties:!1};var Za={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateTokenTxOutput",title:"CreateTokenTxOutput",description:"The created token and respective wallet",type:"object",properties:{token:{$ref:"/db/token/token.schema.json"},wallet:{$ref:"/db/wallet/wallet.schema.json"}},additionalProperties:!1,required:["token","wallet"]};var es={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateTransferTxInput",title:"CreateTransferTxInput",description:"Input for createTransfer",type:"object",properties:{transfer:{$ref:"#/definitions/transfer_data"},options:{$ref:"#/definitions/create_transfer_tx_options"}},definitions:{create_transfer_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/create_transfer_additional_options"}]},create_transfer_additional_options:{description:"Additional flags to determine the return",type:"object",default:{},properties:{return_from_balance:{$id:"return_from_balance",description:"Whether the request should also return from wallet balance",type:"boolean",default:!1},return_to_balance:{$id:"return_to_balance",description:"Whether the request should also return to wallet balance",type:"boolean",default:!1},create_to_wallet_if_not_exists:{type:"boolean",description:"If true then the wallet will be created if not found. Only valid with 'foreign'",default:!1}},$typescript:'{"additionalProperties": false}'},transfer_data:{anyOf:[{$ref:"#/definitions/transfer_data_regular"},{$ref:"#/definitions/transfer_data_deposit"},{$ref:"#/definitions/transfer_data_withdrawal"}]},transfer_data_regular:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},latest_control_hash:{description:"Latest control_hash on the from_wallet",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]},from_wallet:{description:"Wallet where funds are debited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},to_wallet:{description:"Wallet where funds are credited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},token:{description:"Token that is moved",$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"},amount:{$ref:"/db/transfer/transfer.schema.input.json#/properties/amount"},type:{description:"Type of transfer",enum:["transfer"]},status:{$ref:"/db/transfer/transfer.schema.input.json#/properties/status"},force:{$ref:"/db/transfer/transfer.schema.input.json#/properties/force"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},transfer_group:{description:"TransferGroup the transfer belongs to",$ref:"/txs/get-transfer-group/get-transfer-group.schema.input.json#/definitions/unique_transfer_group_filter"},created_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/created_at"}},required:["from_wallet","to_wallet","token","amount","type"],$typescript:'{"additionalProperties": false}'},transfer_data_deposit:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},latest_control_hash:{description:"Latest control_hash on the from_wallet",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]},from_wallet:{description:"Wallet where funds are debited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},to_wallet:{description:"Wallet where funds are credited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},token:{description:"Token that is moved",$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"},amount:{$ref:"/db/transfer/transfer.schema.input.json#/properties/amount"},type:{description:"Type of transfer",enum:["deposit"]},status:{$ref:"/db/transfer/transfer.schema.input.json#/properties/status"},force:{$ref:"/db/transfer/transfer.schema.input.json#/properties/force"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},transfer_group:{description:"TransferGroup the transfer belongs to",$ref:"/txs/get-transfer-group/get-transfer-group.schema.input.json#/definitions/unique_transfer_group_filter"},created_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/created_at"}},required:["to_wallet","token","amount"],$typescript:'{"additionalProperties": false}'},transfer_data_withdrawal:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},latest_control_hash:{description:"Latest control_hash on the from_wallet",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]},from_wallet:{description:"Wallet where funds are debited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},to_wallet:{description:"Wallet where funds are credited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},token:{description:"Token that is moved",$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"},amount:{$ref:"/db/transfer/transfer.schema.input.json#/properties/amount"},type:{description:"Type of transfer",enum:["withdrawal"]},status:{$ref:"/db/transfer/transfer.schema.input.json#/properties/status"},force:{$ref:"/db/transfer/transfer.schema.input.json#/properties/force"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},transfer_group:{description:"TransferGroup the transfer belongs to",$ref:"/txs/get-transfer-group/get-transfer-group.schema.input.json#/definitions/unique_transfer_group_filter"},created_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/created_at"}},required:["from_wallet","token","amount"],$typescript:'{"additionalProperties": false}'}},required:["transfer"],additionalProperties:!1};var ts={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateTransferTxOutput",title:"CreateTransferTxOutput",description:"Output of createTransfer",type:"object",properties:{transfer:{description:"Created transfer object",$ref:"/txs/get-transfer/get-transfer.schema.output.json#/definitions/transfer"},from_balance:{description:"Debited wallet balance",$ref:"/txs/get-balance/get-balance.schema.output.json#/definitions/balance"},to_balance:{description:"Credited wallet balance",$ref:"/txs/get-balance/get-balance.schema.output.json#/definitions/balance"}},additionalProperties:!1,required:["transfer"]};var rs={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateTransferGroupTxInput",title:"CreateTransferGroupTxInput",description:"Input for createTransferGroup",type:"object",properties:{transfer_group:{$ref:"#/definitions/transfer_group_data"},options:{$ref:"#/definitions/create_transfer_group_tx_options"}},definitions:{create_transfer_group_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/create_transfer_group_additional_options"}]},create_transfer_group_additional_options:{description:"Optional flags for input",type:"object",default:{},properties:{create_to_wallet_if_not_exists:{type:"boolean",description:"If true then the wallet will be created if not found. Only valid with 'foreign'",default:!1},validate_final_balance_only:{type:"boolean",description:"If true then transfers within a group will ignore balance restrictions. Only final transfers for wallets are checked. Only valid with transfer_status_lock",default:!1}},$typescript:'{"additionalProperties": false}'},transfer_group_data:{type:"object",description:"Input for the transferGroup to create",properties:{identifier:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/identifier"},status:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/status"},transfer_status:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/transfer_status"},metadata:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/metadata"},children:{description:"Array of children",type:"array",items:{$ref:"#/definitions/child_transfer_data"}}},additionalProperties:!1},child_transfer_data:{anyOf:[{$ref:"#/definitions/child_transfer_data_regular"},{$ref:"#/definitions/child_transfer_data_deposit"},{$ref:"#/definitions/child_transfer_data_withdrawal"}]},child_transfer_data_regular:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},latest_control_hash:{description:"Latest control_hash on the from_wallet",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]},from_wallet:{description:"Wallet where funds are debited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},to_wallet:{description:"Wallet where funds are credited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},token:{description:"Token that is moved",$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"},amount:{$ref:"/db/transfer/transfer.schema.input.json#/properties/amount"},type:{description:"Type of transfer",enum:["transfer"]},force:{$ref:"/db/transfer/transfer.schema.input.json#/properties/force"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},created_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/created_at"}},required:["from_wallet","to_wallet","token","amount","type"],$typescript:'{"additionalProperties": false}'},child_transfer_data_deposit:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},latest_control_hash:{description:"Latest control_hash on the from_wallet",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]},from_wallet:{description:"Wallet where funds are debited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},to_wallet:{description:"Wallet where funds are credited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},token:{description:"Token that is moved",$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"},amount:{$ref:"/db/transfer/transfer.schema.input.json#/properties/amount"},type:{description:"Type of transfer",enum:["deposit"]},force:{$ref:"/db/transfer/transfer.schema.input.json#/properties/force"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},created_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/created_at"}},required:["to_wallet","token","amount"],$typescript:'{"additionalProperties": false}'},child_transfer_data_withdrawal:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},latest_control_hash:{description:"Latest control_hash on the from_wallet",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]},from_wallet:{description:"Wallet where funds are debited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},to_wallet:{description:"Wallet where funds are credited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},token:{description:"Token that is moved",$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"},amount:{$ref:"/db/transfer/transfer.schema.input.json#/properties/amount"},type:{description:"Type of transfer",enum:["withdrawal"]},force:{$ref:"/db/transfer/transfer.schema.input.json#/properties/force"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},created_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/created_at"}},required:["from_wallet","token","amount"],$typescript:'{"additionalProperties": false}'}},required:[],additionalProperties:!1};var ns={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateTransferGroupTxOutput",title:"CreateTransferGroupTxOutput",description:"Output of createTransferGroup",type:"object",properties:{transfer_group:{$ref:"/db/transfer-group/transfer-group.schema.json"},transfers:{description:"Created transfer objects",type:"array",items:{$ref:"/txs/get-transfer/get-transfer.schema.output.json#/definitions/transfer"}}},required:["transfer_group"],additionalProperties:!1};var as={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateTransferManyTxInput",title:"CreateTransferManyTxInput",description:"Input for CreateTransferMany",type:"object",properties:{transfers:{description:"An array of transfers",type:"array",items:{$ref:"/txs/create-transfer/create-transfer.schema.input.json#/definitions/transfer_data"}},options:{$ref:"#/definitions/create_transfer_many_tx_options"}},definitions:{create_transfer_many_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/create_transfer_many_additional_options"}]},create_transfer_many_additional_options:{description:"Optional flags for input",type:"object",default:{},properties:{return_from_balance:{$id:"return_from_balance",description:"Whether the request should also return from wallet balance",type:"boolean",default:!1},return_to_balance:{$id:"return_to_balance",description:"Whether the request should also return to wallet balance",type:"boolean",default:!1},create_to_wallet_if_not_exists:{type:"boolean",description:"If true then the wallet will be created if not found. Only valid with 'foreign'",default:!1}},$typescript:'{"additionalProperties": false}'}},required:["transfers"],additionalProperties:!1};var ss={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateTransferManyTxOutput",title:"CreateTransferManyTxOutput",description:"Output of CreateTransferMany",type:"object",properties:{transfers:{description:"Created transfer objects",type:"array",items:{$ref:"/txs/get-transfer/get-transfer.schema.output.json#/definitions/transfer"}},from_balances:{description:"Debited wallet balances",type:"array",items:{$ref:"/txs/get-balance/get-balance.schema.output.json#/definitions/balance"}},to_balances:{description:"Credited wallet balances",type:"array",items:{$ref:"/txs/get-balance/get-balance.schema.output.json#/definitions/balance"}}},required:["transfers"],additionalProperties:!1};var is={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateWalletTxInput",title:"CreateWalletTxInput",description:"Input for createWallet",type:"object",properties:{wallet:{$ref:"/db/wallet/wallet.schema.input.json"},options:{$ref:"#/definitions/create_wallet_tx_options"}},definitions:{create_wallet_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"}]}},additionalProperties:!1,required:["wallet"]};var os={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateWalletTxOutput",title:"CreateWalletTxOutput",description:"The created wallet",type:"object",properties:{wallet:{$ref:"/db/wallet/wallet.schema.json"}},additionalProperties:!1,required:["wallet"]};var ps={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateWithdrawalTxInput",title:"CreateWithdrawalTxInput",description:"Input for createWithdrawal",type:"object",properties:{withdrawal:{$ref:"/txs/create-transfer/create-transfer.schema.input.json#/definitions/transfer_data_withdrawal"},options:{$ref:"#/definitions/create_withdrawal_tx_options"}},definitions:{create_withdrawal_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"/txs/create-transfer/create-transfer.schema.input.json#/definitions/create_transfer_additional_options"}]}},required:["withdrawal"],additionalProperties:!1};var ds={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateWithdrawalTxOutput",title:"CreateWithdrawalTxOutput",description:"Output of createWithdrawal",allOf:[{$ref:"/txs/create-transfer/create-transfer.schema.output.json"}]};var fs={$schema:"http://json-schema.org/draft-07/schema",$id:"ExportDatabaseTxInput",title:"ExportDatabaseTxInput",description:"Input for exportDatabase",type:"object",properties:{export_name:{description:"Name of the created export file",type:"string"}},definitions:{},additionalProperties:!1};var us={$schema:"http://json-schema.org/draft-07/schema",$id:"ExportDatabaseTxOutput",title:"ExportDatabaseTxOutput",description:"Output of exportDatabase",type:"object",properties:{message:{type:"string"}},additionalProperties:!1};var ls={$schema:"http://json-schema.org/draft-07/schema",$id:"FindBalanceManyTxInput",title:"FindBalanceManyTxInput",description:"Input for findBalanceMany",type:"object",properties:{balance:{$ref:"#/definitions/find_balance_many_filter"},options:{$ref:"#/definitions/find_balance_many_tx_options"}},definitions:{find_balance_many_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_limiting_options"},{$ref:"#/definitions/find_balance_many_ordering_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/find_balance_many_additional_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_select_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_deselect_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_options"}]},find_balance_many_additional_options:{description:"Optional flags for input",type:"object",default:{},$typescript:'{"additionalProperties":false}'},find_balance_many_ordering_options:{$typescript:'{"additionalProperties":false}',description:"Optional flags for input ordering",type:"object",properties:{order:{description:"Ordering options",type:"array",items:{$ref:"#/definitions/find_balance_many_ordering_input"}}}},find_balance_many_ordering_input:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_ordering_input"},{$ref:"#/definitions/find_balance_many_ordering_input_field"}]},find_balance_many_ordering_input_field:{type:"object",properties:{field:{$ref:"/db/transfer-log/transfer-log.schema.json#/definitions/TransferLogTableFields"}},$typescript:'{"additionalProperties": false}'},balance_filter_foreign_fields:{type:"string",enum:["wallet","token"]},advanced_balance_filter_fields_foreign:{type:"object",properties:{field:{$ref:"#/definitions/balance_filter_foreign_fields"}},required:["field"],$typescript:'{"additionalProperties": false}'},balance_filter:{type:"object",properties:{wallet:{$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},token:{$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"},transfer:{$ref:"/txs/get-transfer/get-transfer.schema.input.json#/definitions/unique_transfer_filter"},type:{$ref:"/db/transfer-log/transfer-log.schema.json#/properties/type"},amount:{$ref:"/db/transfer-log/transfer-log.schema.json#/properties/amount"},pending_amount:{$ref:"/db/transfer-log/transfer-log.schema.json#/properties/pending_amount"},finished_amount:{$ref:"/db/transfer-log/transfer-log.schema.json#/properties/finished_amount"},status:{$ref:"/db/transfer-log/transfer-log.schema.json#/properties/status"},metadata:{$ref:"/db/consts.schema.json#/definitions/DbFilterMetadata"}},$typescript:'{"additionalProperties": false}'},advanced_balance_filter_inner:{type:"object",properties:{inner:{type:"array",items:{$ref:"#/definitions/advanced_balance_filter"}}},$typescript:'{"additionalProperties":false}'},advanced_balance_filter_where_inner:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereInner"},{$ref:"#/definitions/advanced_balance_filter_inner"}]},advanced_balance_filter_where_primitive:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWherePrimitive"},{$ref:"#/definitions/advanced_balance_filter_fields"}]},advanced_balance_filter_where_primitive_foreign:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWherePrimitiveForeign"},{$ref:"#/definitions/advanced_balance_filter_fields_foreign"}]},advanced_balance_filter_where_object:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereObject"},{$ref:"#/definitions/advanced_balance_filter_values"}]},advanced_balance_filter_where_in:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereIns"},{$ref:"#/definitions/advanced_balance_filter_fields_w_foreign"}]},advanced_balance_filter_where_null:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereNulls"},{$ref:"#/definitions/advanced_balance_filter_fields"}]},advanced_balance_filter_fields:{type:"object",properties:{field:{type:"string",enum:["type","amount","pending_amount","finished_amount","status","metadata","updated_at"]}},required:["field"],$typescript:'{"additionalProperties": false}'},advanced_balance_filter_fields_w_foreign:{type:"object",properties:{field:{anyOf:[{$ref:"/db/transfer-log/transfer-log.schema.json#/definitions/TransferLogTableFields"},{$ref:"#/definitions/balance_filter_foreign_fields"}]}},required:["field"],$typescript:'{"additionalProperties": false}'},advanced_balance_filter_values:{type:"object",properties:{value:{$ref:"#/definitions/balance_filter"}},required:["value"],$typescript:'{"additionalProperties": false}'},advanced_balance_filter:{anyOf:[{$ref:"#/definitions/advanced_balance_filter_where_inner"},{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereMetadataIns"},{$ref:"#/definitions/advanced_balance_filter_where_object"},{$ref:"#/definitions/advanced_balance_filter_where_primitive"},{$ref:"#/definitions/advanced_balance_filter_where_primitive_foreign"},{$ref:"#/definitions/advanced_balance_filter_where_in"},{$ref:"#/definitions/advanced_balance_filter_where_null"},{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereMetadataNulls"}]},advanced_balance_filter_array:{type:"array",items:{$ref:"#/definitions/advanced_balance_filter"}},find_balance_many_filter:{oneOf:[{$ref:"#/definitions/balance_filter"},{$ref:"#/definitions/advanced_balance_filter_array"}]}},additionalProperties:!1};var cs={$schema:"http://json-schema.org/draft-07/schema",$id:"FindBalanceManyTxOutput",title:"FindBalanceManyTxOutput",description:"Output of findBalanceMany",type:"object",properties:{balances:{description:"Found balances",type:"array",items:{$ref:"/txs/get-balance/get-balance.schema.output.json#/definitions/balance"}},metadata:{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_find_metadata"}},required:["balances","metadata"],additionalProperties:!1};var ms={$schema:"http://json-schema.org/draft-07/schema",$id:"FindTokenManyTxInput",title:"FindTokenManyTxInput",description:"Input for findTokenMany",type:"object",properties:{token:{$ref:"#/definitions/find_token_many_filter"},options:{$ref:"#/definitions/find_token_many_tx_options"}},definitions:{find_token_many_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_limiting_options"},{$ref:"#/definitions/find_token_many_ordering_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/find_token_many_additional_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_select_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_deselect_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_options"}]},find_token_many_additional_options:{description:"Optional flags for input",type:"object",default:{},$typescript:'{"additionalProperties":false}'},find_token_many_ordering_options:{$typescript:'{"additionalProperties":false}',description:"Optional flags for input ordering",type:"object",properties:{order:{description:"Ordering options",type:"array",items:{$ref:"#/definitions/find_token_many_ordering_input"}}}},find_token_many_ordering_input:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_ordering_input"},{$ref:"#/definitions/find_token_many_ordering_input_field"}]},find_token_many_ordering_input_field:{type:"object",properties:{field:{$ref:"/db/token/token.schema.json#/definitions/TokenTableFields"}},$typescript:'{"additionalProperties": false}'},token_filter_foreign_fields:{type:"string",enum:["belongs_to"]},token_filter:{type:"object",properties:{foreign:{description:"Foreign of token to return",$ref:"/db/token/token.schema.json#/properties/foreign"},type:{$ref:"/db/token/token.schema.json#/properties/type"},metadata:{$ref:"/db/consts.schema.json#/definitions/DbFilterMetadata"},belongs_to:{$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"}},$typescript:'{"additionalProperties": false}'},advanced_token_filter_inner:{type:"object",properties:{inner:{type:"array",items:{$ref:"#/definitions/advanced_token_filter"}}},$typescript:'{"additionalProperties":false}'},advanced_token_filter_where_inner:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereInner"},{$ref:"#/definitions/advanced_token_filter_inner"}]},advanced_token_filter_where_primitive:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWherePrimitive"},{$ref:"#/definitions/advanced_token_filter_fields"}]},advanced_token_filter_where_primitive_foreign:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWherePrimitiveForeign"},{$ref:"#/definitions/advanced_token_filter_fields_foreign"}]},advanced_token_filter_where_object:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereObject"},{$ref:"#/definitions/advanced_token_filter_values"}]},advanced_token_filter_where_in:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereIns"},{$ref:"#/definitions/advanced_token_filter_fields_w_foreign"}]},advanced_token_filter_where_null:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereNulls"},{$ref:"#/definitions/advanced_token_filter_fields"}]},advanced_token_filter_fields:{type:"object",properties:{field:{$ref:"/db/token/token.schema.json#/definitions/TokenTableFields"}},required:["field"],$typescript:'{"additionalProperties": false}'},advanced_token_filter_fields_foreign:{type:"object",properties:{field:{$ref:"#/definitions/token_filter_foreign_fields"}},required:["field"],$typescript:'{"additionalProperties": false}'},advanced_token_filter_fields_w_foreign:{type:"object",properties:{field:{anyOf:[{$ref:"/db/token/token.schema.json#/definitions/TokenTableFields"},{$ref:"#/definitions/token_filter_foreign_fields"}]}},required:["field"],$typescript:'{"additionalProperties": false}'},advanced_token_filter_values:{type:"object",properties:{value:{$ref:"#/definitions/token_filter"}},required:["value"],$typescript:'{"additionalProperties": false}'},advanced_token_filter:{anyOf:[{$ref:"#/definitions/advanced_token_filter_where_inner"},{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereMetadataIns"},{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereMetadataPrimitive"},{$ref:"#/definitions/advanced_token_filter_where_object"},{$ref:"#/definitions/advanced_token_filter_where_primitive"},{$ref:"#/definitions/advanced_token_filter_where_primitive_foreign"},{$ref:"#/definitions/advanced_token_filter_where_in"},{$ref:"#/definitions/advanced_token_filter_where_null"},{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereMetadataNulls"}]},advanced_token_filter_array:{type:"array",items:{$ref:"#/definitions/advanced_token_filter"}},find_token_many_filter:{oneOf:[{$ref:"#/definitions/token_filter"},{$ref:"#/definitions/advanced_token_filter_array"}]}},additionalProperties:!1};var hs={$schema:"http://json-schema.org/draft-07/schema",$id:"FindTokenManyTxOutput",title:"FindTokenManyTxOutput",description:"Output of findTokenMany",type:"object",properties:{tokens:{description:"Found tokens",type:"array",items:{$ref:"/txs/get-token/get-token.schema.output.json#/definitions/token"}},metadata:{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_find_metadata"}},required:["tokens","metadata"],additionalProperties:!1};var _s={$schema:"http://json-schema.org/draft-07/schema",$id:"FindTransferGroupManyTxInput",title:"FindTransferGroupManyTxInput",description:"Input for findTransferGroupMany",type:"object",properties:{transfer_group:{$ref:"#/definitions/find_transfer_group_many_filter"},options:{$ref:"#/definitions/find_transfer_group_many_tx_options"}},definitions:{find_transfer_group_many_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_limiting_options"},{$ref:"#/definitions/find_transfer_group_many_ordering_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/find_transfer_group_many_additional_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_select_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_deselect_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_options"}]},find_transfer_group_many_additional_options:{$typescript:'{"additionalProperties":false}',type:"object",properties:{return_transfers:{description:"Return running balance for each transfer_group for wallet in question",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"}}},find_transfer_group_many_ordering_options:{$typescript:'{"additionalProperties":false}',description:"Optional flags for input ordering",type:"object",properties:{order:{description:"Ordering options",type:"array",items:{$ref:"#/definitions/find_transfer_group_many_ordering_input"}}}},find_transfer_group_many_ordering_input:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_ordering_input"},{$ref:"#/definitions/find_transfer_group_many_ordering_input_field"}]},find_transfer_group_many_ordering_input_field:{type:"object",properties:{field:{$ref:"/db/transfer-group/transfer-group.schema.json#/definitions/TransferGroupTableFields"}},$typescript:'{"additionalProperties": false}'},transfer_group_filter_identifier_fields:{type:"string",enum:["transfer_group","reverses"]},advanced_transfer_group_filter_fields_identifier:{type:"object",properties:{field:{$ref:"#/definitions/transfer_group_filter_identifier_fields"}},required:["field"],$typescript:'{"additionalProperties": false}'},transfer_group_filter:{type:"object",properties:{identifier:{$ref:"/db/transfer-group/transfer-group.schema.json#/properties/identifier"},status:{$ref:"/db/transfer-group/transfer-group.schema.json#/properties/status"},type:{$ref:"/db/transfer-group/transfer-group.schema.json#/properties/type"},transfer_status:{$ref:"/db/transfer-group/transfer-group.schema.json#/properties/transfer_status"},reverses:{$ref:"/txs/get-transfer-group/get-transfer-group.schema.input.json#/definitions/unique_transfer_group_filter"},metadata:{$ref:"/db/consts.schema.json#/definitions/DbFilterMetadata"}},$typescript:'{"additionalProperties": false}'},advanced_transfer_group_filter_inner:{type:"object",properties:{inner:{type:"array",items:{$ref:"#/definitions/advanced_transfer_group_filter"}}},$typescript:'{"additionalProperties":false}'},advanced_transfer_group_filter_where_inner:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereInner"},{$ref:"#/definitions/advanced_transfer_group_filter_inner"}]},advanced_transfer_group_filter_where_primitive:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWherePrimitive"},{$ref:"#/definitions/advanced_transfer_group_filter_fields"}]},advanced_transfer_group_filter_where_primitive_identifier:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWherePrimitiveIdentifier"},{$ref:"#/definitions/advanced_transfer_group_filter_fields_identifier"}]},advanced_transfer_group_filter_where_object:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereObject"},{$ref:"#/definitions/advanced_transfer_group_filter_values"}]},advanced_transfer_group_filter_where_in:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereIns"},{$ref:"#/definitions/advanced_transfer_group_filter_fields_w_foreign"}]},advanced_transfer_group_filter_where_null:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereNulls"},{$ref:"#/definitions/advanced_transfer_group_filter_fields"}]},advanced_transfer_group_filter_fields:{type:"object",properties:{field:{$ref:"/db/transfer-group/transfer-group.schema.json#/definitions/TransferGroupTableFields"}},required:["field"],$typescript:'{"additionalProperties": false}'},advanced_transfer_group_filter_fields_w_foreign:{type:"object",properties:{field:{anyOf:[{$ref:"/db/transfer-group/transfer-group.schema.json#/definitions/TransferGroupTableFields"},{$ref:"#/definitions/transfer_group_filter_identifier_fields"}]}},required:["field"],$typescript:'{"additionalProperties": false}'},advanced_transfer_group_filter_values:{type:"object",properties:{value:{$ref:"#/definitions/transfer_group_filter"}},required:["value"],$typescript:'{"additionalProperties": false}'},advanced_transfer_group_filter:{anyOf:[{$ref:"#/definitions/advanced_transfer_group_filter_where_inner"},{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereMetadataIns"},{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereMetadataPrimitive"},{$ref:"#/definitions/advanced_transfer_group_filter_where_object"},{$ref:"#/definitions/advanced_transfer_group_filter_where_primitive"},{$ref:"#/definitions/advanced_transfer_group_filter_where_primitive_identifier"},{$ref:"#/definitions/advanced_transfer_group_filter_where_in"},{$ref:"#/definitions/advanced_transfer_group_filter_where_null"},{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereMetadataNulls"}]},advanced_transfer_group_filter_array:{type:"array",items:{$ref:"#/definitions/advanced_transfer_group_filter"}},find_transfer_group_many_filter:{oneOf:[{$ref:"#/definitions/transfer_group_filter"},{$ref:"#/definitions/advanced_transfer_group_filter_array"}]}},required:["transfer_group"],additionalProperties:!1};var gs={$schema:"http://json-schema.org/draft-07/schema",$id:"FindTransferGroupManyTxOutput",title:"FindTransferGroupManyTxOutput",description:"Output of find-transfer-group-many",type:"object",properties:{transfer_groups:{description:"Found transfers",type:"array",items:{$ref:"/txs/get-transfer-group/get-transfer-group.schema.output.json#/definitions/transfer_group"}},metadata:{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_find_metadata"}},required:["transfer_groups","metadata"],additionalProperties:!1};var Ts={$schema:"http://json-schema.org/draft-07/schema",$id:"FindTransferManyTxInput",title:"FindTransferManyTxInput",description:"Input for findTransferMany",type:"object",properties:{transfer:{$ref:"#/definitions/find_transfer_many_filter"},options:{$ref:"#/definitions/find_transfer_many_tx_options"}},definitions:{find_transfer_many_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_limiting_options"},{$ref:"#/definitions/find_transfer_many_ordering_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/find_transfer_many_additional_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_select_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_deselect_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_options"}]},find_transfer_many_additional_options:{$typescript:'{"additionalProperties":false}',type:"object",properties:{return_running_balance_for_wallet:{description:"Return running balance for each transfer for wallet in question",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},return_signed_amount_for_wallet:{description:"Return amount as signed value for each transfer for wallet in question",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"}}},find_transfer_many_ordering_options:{$typescript:'{"additionalProperties":false}',description:"Optional flags for input ordering",type:"object",properties:{order:{description:"Ordering options",type:"array",items:{$ref:"#/definitions/find_transfer_many_ordering_input"}}}},find_transfer_many_ordering_input:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_ordering_input"},{$ref:"#/definitions/find_transfer_many_ordering_input_field"}]},find_transfer_many_ordering_input_field:{type:"object",properties:{field:{$ref:"/db/transfer/transfer.schema.json#/definitions/TransferTableAccessibleFields"}},$typescript:'{"additionalProperties": false}'},transfer_filter_foreign_fields:{type:"string",enum:["from_wallet","to_wallet","wallet","token"]},transfer_filter_identifier_fields:{type:"string",enum:["transfer_group"]},transfer_filter:{type:"object",properties:{from_wallet:{$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},to_wallet:{$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},wallet:{$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},token:{$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"},status:{$ref:"/db/transfer/transfer.schema.json#/properties/status"},transfer_group:{$ref:"/txs/get-transfer-group/get-transfer-group.schema.input.json#/definitions/unique_transfer_group_filter"},metadata:{$ref:"/db/consts.schema.json#/definitions/DbFilterMetadata"}},$typescript:'{"additionalProperties": false}'},advanced_transfer_filter_inner:{type:"object",properties:{inner:{type:"array",items:{$ref:"#/definitions/advanced_transfer_filter"}}},$typescript:'{"additionalProperties":false}'},advanced_transfer_filter_where_inner:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereInner"},{$ref:"#/definitions/advanced_transfer_filter_inner"}]},advanced_transfer_filter_where_primitive:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWherePrimitive"},{$ref:"#/definitions/advanced_transfer_filter_fields"}]},advanced_transfer_filter_where_primitive_foreign:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWherePrimitiveForeign"},{$ref:"#/definitions/advanced_transfer_filter_fields_foreign"}]},advanced_transfer_filter_where_primitive_identifier:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWherePrimitiveIdentifier"},{$ref:"#/definitions/advanced_transfer_filter_fields_identifier"}]},advanced_transfer_filter_where_object:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereObject"},{$ref:"#/definitions/advanced_transfer_filter_values"}]},advanced_transfer_filter_where_in:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereIns"},{$ref:"#/definitions/advanced_transfer_filter_fields_w_foreign"}]},advanced_transfer_filter_where_null:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereNulls"},{$ref:"#/definitions/advanced_transfer_filter_fields"}]},advanced_transfer_filter_fields:{type:"object",properties:{field:{$ref:"/db/transfer/transfer.schema.json#/definitions/TransferTableAccessibleFields"}},required:["field"],$typescript:'{"additionalProperties": false}'},advanced_transfer_filter_fields_foreign:{type:"object",properties:{field:{$ref:"#/definitions/transfer_filter_foreign_fields"}},required:["field"],$typescript:'{"additionalProperties": false}'},advanced_transfer_filter_fields_identifier:{type:"object",properties:{field:{$ref:"#/definitions/transfer_filter_identifier_fields"}},required:["field"],$typescript:'{"additionalProperties": false}'},advanced_transfer_filter_fields_w_foreign:{type:"object",properties:{field:{anyOf:[{$ref:"/db/transfer/transfer.schema.json#/definitions/TransferTableAccessibleFields"},{$ref:"#/definitions/transfer_filter_foreign_fields"}]}},required:["field"],$typescript:'{"additionalProperties": false}'},advanced_transfer_filter_values:{type:"object",properties:{value:{$ref:"#/definitions/transfer_filter"}},required:["value"],$typescript:'{"additionalProperties": false}'},advanced_transfer_filter:{anyOf:[{$ref:"#/definitions/advanced_transfer_filter_where_inner"},{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereMetadataIns"},{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereMetadataPrimitive"},{$ref:"#/definitions/advanced_transfer_filter_where_object"},{$ref:"#/definitions/advanced_transfer_filter_where_primitive"},{$ref:"#/definitions/advanced_transfer_filter_where_primitive_foreign"},{$ref:"#/definitions/advanced_transfer_filter_where_primitive_identifier"},{$ref:"#/definitions/advanced_transfer_filter_where_in"},{$ref:"#/definitions/advanced_transfer_filter_where_null"},{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereMetadataNulls"}]},advanced_transfer_filter_array:{type:"array",items:{$ref:"#/definitions/advanced_transfer_filter"}},find_transfer_many_filter:{oneOf:[{$ref:"#/definitions/transfer_filter"},{$ref:"#/definitions/advanced_transfer_filter_array"}]}},required:["transfer"],additionalProperties:!1};var ys={$schema:"http://json-schema.org/draft-07/schema",$id:"FindTransferManyTxOutput",title:"FindTransferManyTxOutput",description:"Output of findTransferMany",type:"object",properties:{transfers:{description:"Found transfers",type:"array",items:{$ref:"/txs/get-transfer/get-transfer.schema.output.json#/definitions/transfer"}},metadata:{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_find_metadata"}},required:["transfers","metadata"],additionalProperties:!1};var bs={$schema:"http://json-schema.org/draft-07/schema",$id:"FindWalletManyTxInput",title:"FindWalletManyTxInput",description:"Input for findWalletMany",type:"object",properties:{wallet:{$ref:"#/definitions/find_wallet_many_filter"},options:{$ref:"#/definitions/find_wallet_many_tx_options"}},definitions:{find_wallet_many_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_limiting_options"},{$ref:"#/definitions/find_wallet_many_ordering_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/find_wallet_many_additional_options"},{$ref:"#/definitions/find_wallet_many_select_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_options"}]},find_wallet_many_additional_options:{description:"Optional flags for input",type:"object",properties:{include_balance_for_token:{description:"If specified each wallet will have its balance included",$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"}},default:{},$typescript:'{"additionalProperties":false}'},find_wallet_many_ordering_options:{$typescript:'{"additionalProperties":false}',description:"Optional flags for input ordering",type:"object",properties:{order:{description:"Ordering options",type:"array",items:{$ref:"#/definitions/find_wallet_many_ordering_input"}}}},find_wallet_many_ordering_input:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_ordering_input"},{$ref:"#/definitions/find_wallet_many_ordering_input_field"}]},find_wallet_many_ordering_input_field:{type:"object",properties:{field:{$ref:"#/definitions/advanced_wallet_filter_fields"}},$typescript:'{"additionalProperties": false}'},find_wallet_many_filter:{oneOf:[{$ref:"#/definitions/wallet_filter"},{$ref:"#/definitions/advanced_wallet_filter_array"}]},wallet_filter:{type:"object",properties:{foreign:{$ref:"/db/wallet/wallet.schema.json#/properties/foreign"},name:{$ref:"/db/wallet/wallet.schema.json#/properties/name"},type:{$ref:"/db/wallet/wallet.schema.json#/properties/type"},status:{$ref:"/db/wallet/wallet.schema.json#/properties/status"},metadata:{$ref:"/db/consts.schema.json#/definitions/DbFilterMetadata"}},$typescript:'{"additionalProperties":false}'},advanced_wallet_filter_where_inner:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereInner"},{$ref:"#/definitions/advanced_wallet_filter_inner"}]},advanced_wallet_filter_inner:{type:"object",properties:{inner:{type:"array",items:{$ref:"#/definitions/advanced_wallet_filter"}}},$typescript:'{"additionalProperties":false}'},advanced_wallet_filter_where_primitive:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWherePrimitive"},{$ref:"#/definitions/advanced_wallet_filter_fields_object"}]},advanced_wallet_filter_where_object:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereObject"},{$ref:"#/definitions/advanced_wallet_filter_values"}]},advanced_wallet_filter_where_in:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereIns"},{$ref:"#/definitions/advanced_wallet_filter_fields_object"}]},advanced_wallet_filter_where_null:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereNulls"},{$ref:"#/definitions/advanced_wallet_filter_fields_object"}]},advanced_wallet_filter_fields_object:{type:"object",properties:{field:{$ref:"#/definitions/advanced_wallet_filter_fields"}},required:["field"],$typescript:'{"additionalProperties": false}'},advanced_wallet_filter_fields:{type:"string",enum:["id","balance_pending_amount","balance_finished_amount","balance_available_balance","foreign","name","type","status","created_at"]},advanced_wallet_filter_string_fields:{type:"string",enum:["foreign","name","type","status","created_at"]},advanced_wallet_filter_number_fields:{type:"string",enum:["id","balance_pending_amount","balance_finished_amount","balance_available_balance"]},advanced_wallet_filter_values:{type:"object",properties:{value:{$ref:"#/definitions/wallet_filter"}},required:["value"],$typescript:'{"additionalProperties": false}'},advanced_wallet_filter:{anyOf:[{$ref:"#/definitions/advanced_wallet_filter_where_inner"},{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereMetadataIns"},{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereMetadataPrimitive"},{$ref:"#/definitions/advanced_wallet_filter_where_primitive"},{$ref:"#/definitions/advanced_wallet_filter_where_object"},{$ref:"#/definitions/advanced_wallet_filter_where_in"},{$ref:"#/definitions/advanced_wallet_filter_where_null"}]},advanced_wallet_filter_array:{type:"array",items:{$ref:"#/definitions/advanced_wallet_filter"}},find_wallet_many_select_options:{$typescript:'{"additionalProperties":false}',description:"Optional flags to limit search result",type:"object",properties:{select:{description:"Select options",type:"array",items:{$ref:"/txs/find-wallet-many/find-wallet-many.schema.output.json#/definitions/wallet_with_balance_fields"}}}}},additionalProperties:!1};var Fs={$schema:"http://json-schema.org/draft-07/schema",$id:"FindWalletManyTxOutput",title:"FindWalletManyTxOutput",description:"Output of findWalletMany",type:"object",properties:{wallets:{description:"Wallets matching the query",type:"array",items:{anyOf:[{$ref:"/db/wallet/wallet.schema.json"},{type:"null"},{$ref:"#/definitions/wallet_with_balance"}]}},metadata:{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_find_metadata"}},definitions:{wallet_with_balance:{type:"object",properties:{id:{description:"System defined primary key",type:"integer"},foreign:{description:"User provided key for wallet. Must be unique",type:"string"},name:{description:"Name of the wallet",type:["string","null"]},metadata:{description:"Key/value metadata object",type:["object","null"]},type:{description:"Type of the wallet",default:"regular",$ref:"/db/consts.schema.json#/definitions/WalletType"},status:{description:"Current status for the wallet",default:"active",type:"string"},default_allow_negative:{description:"Boolean indicating if wallet (pending_amount + finished_amount) can be negative",default:!1,type:"boolean"},default_allow_positive:{description:"Boolean indicating if wallet (pending_amount + finished_amount) can be positive. Used for token balance to deny positive balance.",default:!0,type:"boolean"},created_at:{description:"Datetime when the wallet was created",type:"string",format:"date-time"},updated_at:{description:"Datetime when the wallet was last updated",type:"string",format:"date-time"},balance_transfer_id:{description:"Latest transfer id",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/transfer_id"},balance_token_id:{description:"Token ID of balance",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/token_id"},balance_token_foreign:{description:"Token Foreign of balance",$ref:"/db/token/token.schema.json#/properties/foreign"},balance_pending_amount:{description:"Current pending balance",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/pending_amount"},balance_pending_amount_to:{description:"Sum of incoming pending transfers",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/pending_amount_to"},balance_pending_amount_from:{description:"Sum of outgoing pending transfers",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/pending_amount_from"},balance_finished_amount:{description:"Current finished balance",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/finished_amount"},balance_amount:{description:"Current finished and pending balance sum",type:"number"},balance_available_balance:{description:"Available balance that is sum of pending_amount_from and finished_amount",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/available_balance"},balance_latest_control_hash:{description:"Latest control_hash associated with wallet token combination",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/latest_control_hash"},balance_updated_at:{description:"Last modification date of balance",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/created_at"}},additionalProperties:!1},wallet_with_balance_fields:{type:"string",enum:["id","foreign","name","metadata","type","status","default_allow_negative","default_allow_positive","created_at","updated_at","balance_transfer_id","balance_token_id","balance_token_foreign","balance_pending_amount","balance_pending_amount_to","balance_pending_amount_from","balance_finished_amount","balance_amount","balance_latest_control_hash","balance_updated_at","balance_available_balance"]}},required:["wallets","metadata"],additionalProperties:!1};var xs={$schema:"http://json-schema.org/draft-07/schema",$id:"FinishTransactionTxInput",title:"FinishTransactionTxInput",description:"Input for finishTransaction",type:"object",properties:{action:{description:"Finish transaction with commit/rollback",default:"commit",type:"string",enum:["commit","rollback"]},options:{$ref:"#/definitions/finish_transaction_tx_options"}},definitions:{finish_transaction_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/finish_transaction_additional_options"}]},finish_transaction_additional_options:{type:"object",properties:{transaction_id:{description:"Id of the transaction context to run the query in",type:"string"}},required:["transaction_id"],$typescript:'{"additionalProperties": false}'}},required:["action","options"],additionalProperties:!1};var $s={$schema:"http://json-schema.org/draft-07/schema",$id:"FinishTransactionTxOutput",title:"FinishTransactionTxOutput",description:"Output of finishTransaction",type:"object",properties:{success:{type:"boolean"},message:{description:"Error message when success is false",type:"string"}},required:["success"],additionalProperties:!1};var Os={$schema:"http://json-schema.org/draft-07/schema",$id:"GetBalanceTxInput",title:"GetBalanceTxInput",description:"Input for getBalance",type:"object",properties:{balance:{$ref:"#/definitions/unique_balance_filter"},options:{$ref:"#/definitions/get_balance_tx_options"}},definitions:{get_balance_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/get_balance_additional_options"}]},get_balance_additional_options:{description:"Optional flags for input",type:"object",properties:{create_wallet_if_not_exists:{type:"boolean",description:"If true then the missing wallet will be created if not found. Only valid with 'foreign'",default:!1},create_token_if_not_exists:{type:"boolean",description:"If true then the missing token will be created if not found. Only valid with 'foreign'",default:!1},create_if_not_exists:{type:"boolean",description:"If true then the missing balance will be created if not found. ",default:!1}},default:{},$typescript:'{"additionalProperties": false}'},unique_balance_filter:{type:"object",properties:{wallet:{$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},token:{$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"},datetime:{description:"Time the balance should be retrieved at",type:"string"}},required:["wallet","token"],additionalProperties:!1}},required:["balance"],additionalProperties:!1};var ws={$schema:"http://json-schema.org/draft-07/schema",$id:"GetBalanceTxOutput",title:"GetBalanceTxOutput",description:"Output of getBalance",type:"object",properties:{balance:{description:"requested balance",$ref:"#/definitions/balance"}},definitions:{balance:{type:"object",properties:{transfer_id:{description:"Latest transfer id",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/transfer_id"},token_id:{description:"Token ID of balance",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/token_id"},token_foreign:{description:"Token Foreign of balance",$ref:"/db/token/token.schema.json#/properties/foreign"},wallet_id:{description:"Wallet ID of balance",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/wallet_id"},wallet_foreign:{description:"Wallet Foreign of balance",$ref:"/db/wallet/wallet.schema.json#/properties/foreign"},pending_amount:{description:"Current pending balance",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/pending_amount"},pending_amount_to:{description:"Sum of incoming pending transfers",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/pending_amount_to"},pending_amount_from:{description:"Sum of outgoing pending transfers",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/pending_amount_from"},available_balance:{description:"Available balance that is sum of pending_amount_from and finished_amount",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/available_balance"},finished_amount:{description:"Current finished balance",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/finished_amount"},amount:{description:"Current finished and pending balance sum",type:"number"},latest_control_hash:{description:"Latest control_hash associated with wallet token combination",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/latest_control_hash"},updated_at:{description:"Last modification date of balance",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/created_at"}},required:["token_id","token_foreign","wallet_id","wallet_foreign","pending_amount","finished_amount","amount","latest_control_hash","updated_at"],additionalProperties:!1},balance_fields:{description:"Fields on the balance object",type:"string",enum:["transfer_id","token_id","token_foreign","wallet_id","wallet_foreign","pending_amount","pending_amount_to","pending_amount_from","finished_amount","available_balance","amount","latest_control_hash","updated_at"]}},additionalProperties:!1};var Is={$schema:"http://json-schema.org/draft-07/schema",$id:"GetBalanceHistoryTxInput",title:"GetBalanceHistoryTxInput",description:"Input for getBalanceHistory",type:"object",properties:{balance:{$ref:"/txs/get-balance/get-balance.schema.input.json#/definitions/unique_balance_filter"},options:{$ref:"#/definitions/get_balance_history_tx_options"}},definitions:{get_balance_history_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/get_balance_history_additional_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_limiting_options"},{$ref:"#/definitions/get_balance_history_ordering_options"},{$ref:"#/definitions/balance_history_select_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_options"}]},get_balance_history_additional_options:{description:"Optional flags for input",type:"object",properties:{create_wallet_if_not_exists:{type:"boolean",description:"If true then the missing wallet will be created if not found. Only valid with 'foreign'",default:!1},create_token_if_not_exists:{type:"boolean",description:"If true then the missing token will be created if not found. Only valid with 'foreign'",default:!1}},default:{},$typescript:'{"additionalProperties":false}'},get_balance_history_ordering_options:{$typescript:'{"additionalProperties":false}',description:"Optional flags for input ordering",type:"object",properties:{order:{description:"Ordering options",type:"string",enum:["asc","desc"]}}},balance_history_select_options:{$typescript:'{"additionalProperties":false}',description:"Optional flags to limit search result",type:"object",properties:{select:{description:"Select options",type:"array",items:{$ref:"/txs/get-balance-history/get-balance-history.schema.output.json#/definitions/balance_history_fields"}}}}},additionalProperties:!1};var js={$schema:"http://json-schema.org/draft-07/schema",$id:"GetBalanceHistoryTxOutput",title:"GetBalanceHistoryTxOutput",description:"Output of getBalanceHistory",type:"object",properties:{balances:{description:"Resolved balance change objects",type:"array",items:{$ref:"#/definitions/balance_history"}},metadata:{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_find_metadata"}},definitions:{balance_history:{type:"object",properties:{balance_id:{description:"The internal ID of the balance",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/id"},token_id:{description:"Token ID of balance",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/token_id"},token_foreign:{description:"Token Foreign of balance",$ref:"/db/token/token.schema.json#/properties/foreign"},wallet_id:{description:"Wallet ID of balance",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/wallet_id"},wallet_foreign:{description:"Wallet Foreign of balance",$ref:"/db/wallet/wallet.schema.json#/properties/foreign"},pending_amount:{description:"Current pending balance",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/pending_amount"},pending_amount_to:{description:"Sum of incoming pending transfers",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/pending_amount_to"},pending_amount_from:{description:"Sum of outgoing pending transfers",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/pending_amount_from"},available_balance:{description:"Available balance that is sum of pending_amount_from and finished_amount",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/available_balance"},finished_amount:{description:"Current finished balance",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/finished_amount"},amount:{description:"Current finished and pending balance sum",type:"number"},latest_control_hash:{description:"Latest control_hash associated with wallet token combination",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/latest_control_hash"},updated_at:{description:"Last modification date of balance",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/created_at"},transfer_id:{$ref:"/db/transfer/transfer.schema.json#/properties/id"},transfer_identifier:{$ref:"/db/transfer/transfer.schema.json#/properties/identifier"},transfer_control_hash:{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},transfer_from_wallet_id:{$ref:"/db/transfer/transfer.schema.json#/properties/from_wallet_id"},transfer_from_wallet_foreign:{$ref:"/db/wallet/wallet.schema.json#/properties/foreign"},transfer_to_wallet_id:{$ref:"/db/transfer/transfer.schema.json#/properties/to_wallet_id"},transfer_to_wallet_foreign:{$ref:"/db/wallet/wallet.schema.json#/properties/foreign"},transfer_amount:{$ref:"/db/transfer/transfer.schema.json#/properties/amount"},transfer_type:{$ref:"/db/transfer/transfer.schema.json#/properties/type"},transfer_status:{$ref:"/db/transfer/transfer.schema.json#/properties/status"},transfer_force:{$ref:"/db/transfer/transfer.schema.json#/properties/force"},transfer_created_at:{$ref:"/db/transfer/transfer.schema.json#/properties/created_at"},transfer_updated_at:{$ref:"/db/transfer/transfer.schema.json#/properties/updated_at"},transfer_metadata:{$ref:"/db/transfer/transfer.schema.json#/properties/metadata"},transfer_transfer_group_id:{$ref:"/db/transfer/transfer.schema.json#/properties/transfer_group_id"},transfer_transfer_group_identifier:{description:"Transfer Group identifier if transfer belongs to a group",type:"string"},transfer_reverses_id:{$ref:"/db/transfer/transfer.schema.json#/properties/reverses_id"},transfer_reverses_identifier:{description:"Reverses identifier if transfer reverses another transfer",type:"string"},transfer_status_finalized_at:{description:"DateTime transfer reached final status",type:["string","null"],format:"date-time"}},$typescript:'{"additionalProperties": false}'},balance_history_fields:{type:"string",enum:["transfer_id","transfer_identifier","transfer_control_hash","transfer_from_wallet_id","transfer_from_wallet_foreign","transfer_to_wallet_id","transfer_to_wallet_foreign","transfer_amount","transfer_type","transfer_status","transfer_force","transfer_created_at","transfer_updated_at","transfer_metadata","transfer_transfer_group_id","transfer_transfer_group_identifier","transfer_reverses_id","transfer_reverses_identifier","transfer_status_finalized_at","balance_id","token_id","token_foreign","wallet_id","wallet_foreign","pending_amount","pending_amount_to","pending_amount_from","finished_amount","amount","latest_control_hash","updated_at","status"]}},additionalProperties:!1};var vs={$schema:"http://json-schema.org/draft-07/schema",$id:"GetDatabaseExportProgressTxInput",title:"GetDatabaseExportProgressTxInput",description:"Input for getDatabaseExportProgress",type:"object",properties:{options:{$ref:"#/definitions/get_database_backup_progress_tx_options"}},definitions:{get_database_backup_progress_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/get_database_backup_progress_additional_options"}]},get_database_backup_progress_additional_options:{description:"Optional flags for input",type:"object",default:{},$typescript:'{"additionalProperties":false}'}},additionalProperties:!1};var ks={$schema:"http://json-schema.org/draft-07/schema",$id:"GetDatabaseExportProgressTxOutput",title:"GetDatabaseExportProgressTxOutput",description:"Output of getDatabaseExportProgress",type:"object",properties:{size:{type:"number",description:"Size of a exported backup in MB"},started:{type:"boolean",description:"Boolean indicating if export has started"},finished:{type:"boolean",description:"Boolean indicating if export has finished"},error:{type:"string",description:"Error message in case one occurs"}},required:["size","started","finished"],additionalProperties:!1};var Ss={$schema:"http://json-schema.org/draft-07/schema",$id:"GetDatabaseImportProgressTxInput",title:"GetDatabaseImportProgressTxInput",description:"Input for GetDatabaseImportProgress",type:"object",properties:{options:{$ref:"#/definitions/import_database_progress_tx_options"}},definitions:{import_database_progress_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"}]}},additionalProperties:!1};var Cs={$schema:"http://json-schema.org/draft-07/schema",$id:"GetDatabaseImportProgressTxOutput",title:"GetDatabaseImportProgressTxOutput",description:"Output of GetDatabaseImportProgress",type:"object",properties:{progress:{type:"number",description:"Percentage of imported database"},started:{type:"boolean",description:"Boolean indicating if import has started"},finished:{type:"boolean",description:"Boolean indicating if import has finished"},error:{type:"string",description:"Error message in case one occurs"}},required:["progress","started","finished"],additionalProperties:!1};var Ps={$schema:"http://json-schema.org/draft-07/schema",$id:"GetFlagsTxInput",title:"GetFlagsTxInput",description:"Input for getFlags",type:"object",properties:{options:{$ref:"#/definitions/get_flags_tx_options"}},definitions:{get_flags_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options_without_tx"}]}},additionalProperties:!1};var Gs={$schema:"http://json-schema.org/draft-07/schema",$id:"GetFlagsTxOutput",title:"GetFlagsTxOutput",description:"Output of getFlags",type:"object",properties:{flags:{$ref:"/db/consts.schema.json#/definitions/Flags"}},additionalProperties:!1};var Ds={$schema:"http://json-schema.org/draft-07/schema",$id:"GetStatisticsTxInput",title:"GetStatisticsTxInput",description:"Input for getStatistics",type:"object",properties:{model:{$ref:"#/definitions/statistics_model"},groups:{$ref:"#/definitions/statistics_groups"},aggregator:{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_aggregator"},filter:{$ref:"#/definitions/statistics_filter"},options:{$ref:"#/definitions/get_statistics_tx_options"}},definitions:{get_statistics_tx_options:{description:"Optional flags for input",type:"object",default:{},properties:{tracking_id:{description:"User provided id added to logs for debugging",type:"string"}},additionalProperties:!1},statistics_groups:{type:"array",description:"Array of grouping definitions",maxItems:5,items:{$ref:"#/definitions/statistics_group"}},statistics_group:{anyOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_group"},{$ref:"#/definitions/statistics_group_field"}]},statistics_group_field:{type:"object",properties:{type:{type:"string",enum:["field"]},value:{$ref:"#/definitions/statistics_field"},alias:{type:"string"}},required:["type","value"],additionalProperties:!1},statistics_model:{description:"Model to return statistics about",type:"string",enum:["Transfer","TransferGroup","Wallet","Token"],default:"Transfer"},statistics_field:{description:"Field to group statistics about. Only used with group_by_field type",type:"string",enum:["type","status","transfer_status"],default:"type"},statistics_filter:{description:"Filter to apply to transfers before grouping",anyOf:[{$ref:"#/definitions/statistics_general_filter"},{$ref:"#/definitions/statistics_transfer_filter"}]},statistics_general_filter:{type:"object",properties:{start_time:{type:"string",format:"date-time"},end_time:{type:"string",format:"date-time"}},$typescript:'{"additionalProperties":false}'},statistics_transfer_filter:{type:"object",properties:{status:{$ref:"/db/transfer/transfer.schema.json#/properties/status"},start_time:{type:"string",format:"date-time"},end_time:{type:"string",format:"date-time"}},$typescript:'{"additionalProperties":false}'}},additionalProperties:!1};var Es={$schema:"http://json-schema.org/draft-07/schema",$id:"GetStatisticsTxOutput",title:"GetStatisticsTxOutput",description:"Output of getStatistics",type:"object",properties:{rows:{description:"Results of the aggregation",$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_aggregate_results"}},definitions:{},required:["rows"],additionalProperties:!1};var Ms={$schema:"http://json-schema.org/draft-07/schema",$id:"GetTokenTxInput",title:"GetTokenTxInput",description:"Input for getToken",type:"object",properties:{token:{$ref:"#/definitions/unique_token_filter"},options:{$ref:"#/definitions/get_token_tx_options"}},definitions:{get_token_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/get_token_additional_options"}]},get_token_additional_options:{description:"Optional flags for input",type:"object",properties:{ignore_cache:{description:"If true then result is returned from cache layer if possible",type:"boolean",default:!1},create_if_not_exists:{type:"boolean",description:"If true then the token will be created if not found. Only valid with 'foreign'",default:!1},return_only_id:{type:"boolean",description:"If true then the returning object is only guaranteed to have id",default:!1}},default:{},$typescript:'{"additionalProperties": false}'},unique_token_filter:{description:"UNIQUE filtering options for token",anyOf:[{$ref:"#/definitions/unique_token_filter_id"},{$ref:"#/definitions/unique_token_filter_foreign"}]},unique_token_filter_id:{type:"object",description:"ID based filter for token",properties:{id:{description:"Id of wallet to return",$ref:"/db/wallet/wallet.schema.json#/properties/id"},foreign:{description:"Foreign of wallet to return",$ref:"/db/wallet/wallet.schema.json#/properties/name"}},required:["id"],additionalProperties:!1},unique_token_filter_foreign:{type:"object",description:"Foreign based filter for token",properties:{id:{description:"Id of wallet to return",$ref:"/db/wallet/wallet.schema.json#/properties/id"},foreign:{description:"Foreign of wallet to return",$ref:"/db/wallet/wallet.schema.json#/properties/name"}},required:["foreign"],additionalProperties:!1}},required:["token"],additionalProperties:!1};var Rs={$schema:"http://json-schema.org/draft-07/schema",$id:"GetTokenTxOutput",title:"GetTokenTxOutput",description:"Output of getToken",type:"object",properties:{token:{description:"requested token",$ref:"#/definitions/token"}},definitions:{token:{properties:{id:{$ref:"/db/token/token.schema.json#/properties/id"},foreign:{$ref:"/db/token/token.schema.json#/properties/foreign"},public:{$ref:"/db/token/token.schema.json#/properties/public"},belongs_to:{$ref:"/db/token/token.schema.json#/properties/belongs_to"},created_at:{$ref:"/db/token/token.schema.json#/properties/created_at"},updated_at:{$ref:"/db/token/token.schema.json#/properties/updated_at"},metadata:{$ref:"/db/token/token.schema.json#/properties/metadata"},divisor:{$ref:"/db/token/token.schema.json#/properties/divisor"},limit:{$ref:"/db/token/token.schema.json#/properties/limit"},type:{$ref:"/db/token/token.schema.json#/properties/type"},belongs_to_foreign:{description:"Foreign of the belongs_to wallet if exists",type:["string","null"]}},required:["id"],additionalProperties:!1}},additionalProperties:!1};var Ws={$schema:"http://json-schema.org/draft-07/schema",$id:"GetTokenManyTxInput",title:"GetTokenManyTxInput",description:"Input for getTokenMany",type:"object",properties:{tokens:{type:"array",items:{$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"}},options:{$ref:"#/definitions/get_token_many_tx_options"}},definitions:{get_token_many_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/get_token_many_additional_options"}]},get_token_many_additional_options:{description:"Optional flags for input",type:"object",properties:{ignore_cache:{type:"boolean",default:!1},create_if_not_exists:{type:"boolean",description:"If true then the token will be created if not found. Only valid with 'foreign'",default:!1},return_only_id:{type:"boolean",description:"If true then the returning object is only guaranteed to have id",default:!1}},default:{},$typescript:'{"additionalProperties": false}'}},required:["tokens"],additionalProperties:!1};var As={$schema:"http://json-schema.org/draft-07/schema",$id:"GetTokenManyTxOutput",title:"GetTokenManyTxOutput",description:"Output of getTokenMany",type:"object",properties:{tokens:{type:"array",items:{$ref:"#/definitions/TokenResult"}}},definitions:{TokenResult:{anyOf:[{$ref:"/db/token/token.schema.json"},{$ref:"/db/token/token.schema.optional.json"},{type:"null"}]}},required:["tokens"],additionalProperties:!1};var Ns={$schema:"http://json-schema.org/draft-07/schema",$id:"GetTransferTxInput",title:"GetTransferTxInput",description:"Input for getTransfer",type:"object",properties:{transfer:{$ref:"#/definitions/unique_transfer_filter"},options:{$ref:"#/definitions/get_transfer_tx_options"}},definitions:{get_transfer_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"}]},unique_transfer_filter:{description:"UNIQUE filtering options for transfer",anyOf:[{$ref:"#/definitions/unique_transfer_filter_id"},{$ref:"#/definitions/unique_transfer_filter_identifier"}]},unique_transfer_filter_id:{type:"object",description:"ID based filter of transfer",properties:{id:{description:"Id of transfer to return",$ref:"/db/transfer/transfer.schema.json#/properties/id"},identifier:{description:"Identifier of transfer to return",$ref:"/db/transfer/transfer.schema.json#/properties/identifier"}},required:["id"],additionalProperties:!1},unique_transfer_filter_identifier:{type:"object",description:"identifier based filter of transfer",properties:{id:{description:"Id of transfer to return",$ref:"/db/transfer/transfer.schema.json#/properties/id"},identifier:{description:"Identifier of transfer to return",$ref:"/db/transfer/transfer.schema.json#/properties/identifier"}},required:["identifier"],additionalProperties:!1}},required:["transfer"],additionalProperties:!1};var Us={$schema:"http://json-schema.org/draft-07/schema",$id:"GetTransferTxOutput",title:"GetTransferTxOutput",description:"Output of getTransfer",type:"object",properties:{transfer:{$ref:"#/definitions/transfer"}},definitions:{transfer:{type:"object",description:"requested transfer",properties:{id:{$ref:"/db/transfer/transfer.schema.json#/properties/id"},identifier:{$ref:"/db/transfer/transfer.schema.json#/properties/identifier"},control_hash:{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},from_wallet_id:{$ref:"/db/transfer/transfer.schema.json#/properties/from_wallet_id"},from_wallet_foreign:{$ref:"/db/wallet/wallet.schema.json#/properties/foreign"},to_wallet_id:{$ref:"/db/transfer/transfer.schema.json#/properties/to_wallet_id"},to_wallet_foreign:{$ref:"/db/wallet/wallet.schema.json#/properties/foreign"},token_id:{$ref:"/db/transfer/transfer.schema.json#/properties/token_id"},token_foreign:{$ref:"/db/token/token.schema.json#/properties/foreign"},amount:{$ref:"/db/transfer/transfer.schema.json#/properties/amount"},type:{$ref:"/db/transfer/transfer.schema.json#/properties/type"},status:{$ref:"/db/transfer/transfer.schema.json#/properties/status"},force:{$ref:"/db/transfer/transfer.schema.json#/properties/force"},auto_hash:{$ref:"/db/transfer/transfer.schema.json#/properties/auto_hash"},created_at:{$ref:"/db/transfer/transfer.schema.json#/properties/created_at"},updated_at:{$ref:"/db/transfer/transfer.schema.json#/properties/updated_at"},metadata:{$ref:"/db/transfer/transfer.schema.json#/properties/metadata"},transfer_group_id:{$ref:"/db/transfer/transfer.schema.json#/properties/transfer_group_id"},transfer_group_identifier:{description:"Transfer Group identifier if transfer belongs to a group",type:"string"},reverses_id:{$ref:"/db/transfer/transfer.schema.json#/properties/reverses_id"},reverses_identifier:{description:"Reverses identifier if transfer reverses another transfer",type:"string"},balance_id:{description:"Iterator marking the position of the balance in the continuum",type:["number","null"]},balance_pending:{description:"Wallet pending balance after transfer",type:["number","null"]},balance_pending_to:{description:"Wallet pending_to balance after transfer",type:["number","null"]},balance_pending_from:{description:"Wallet pending_from balance after transfer",type:["number","null"]},balance_finished:{description:"Wallet finished balance after transfer",type:["number","null"]},signed_amount:{description:"amount with a sign according to transfer direction",type:["number","null"]},status_finalized_at:{description:"DateTime transfer reached final status",type:["string","null"],format:"date-time"}},additionalProperties:!1,required:["id","identifier","from_wallet_id","from_wallet_foreign","to_wallet_id","to_wallet_foreign","token_id","token_foreign","amount","type","status","force","created_at"]},transfer_optional:{type:"object",description:"requested transfer",properties:{id:{$ref:"/db/transfer/transfer.schema.json#/properties/id"},identifier:{$ref:"/db/transfer/transfer.schema.json#/properties/identifier"},control_hash:{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},from_wallet_id:{$ref:"/db/transfer/transfer.schema.json#/properties/from_wallet_id"},from_wallet_foreign:{$ref:"/db/wallet/wallet.schema.json#/properties/foreign"},to_wallet_id:{$ref:"/db/transfer/transfer.schema.json#/properties/to_wallet_id"},to_wallet_foreign:{$ref:"/db/wallet/wallet.schema.json#/properties/foreign"},token_id:{$ref:"/db/transfer/transfer.schema.json#/properties/token_id"},token_foreign:{$ref:"/db/token/token.schema.json#/properties/foreign"},amount:{$ref:"/db/transfer/transfer.schema.json#/properties/amount"},type:{$ref:"/db/transfer/transfer.schema.json#/properties/type"},status:{$ref:"/db/transfer/transfer.schema.json#/properties/status"},force:{$ref:"/db/transfer/transfer.schema.json#/properties/force"},auto_hash:{$ref:"/db/transfer/transfer.schema.json#/properties/auto_hash"},created_at:{$ref:"/db/transfer/transfer.schema.json#/properties/created_at"},updated_at:{$ref:"/db/transfer/transfer.schema.json#/properties/updated_at"},metadata:{$ref:"/db/transfer/transfer.schema.json#/properties/metadata"},transfer_group_id:{$ref:"/db/transfer/transfer.schema.json#/properties/transfer_group_id"},transfer_group_identifier:{description:"Transfer Group identifier if transfer belongs to a group",type:"string"},reverses_id:{$ref:"/db/transfer/transfer.schema.json#/properties/reverses_id"},balance_id:{description:"Iterator marking the position of the balance in the continuum",type:["number","null"]},balance_pending:{description:"Wallet pending balance after transfer",type:["number","null"]},balance_pending_to:{description:"Wallet pending_to balance after transfer",type:["number","null"]},balance_pending_from:{description:"Wallet pending_from balance after transfer",type:["number","null"]},balance_finished:{description:"Wallet finished balance after transfer",type:["number","null"]},signed_amount:{description:"amount with a sign according to transfer direction",type:["number","null"]},status_finalized_at:{description:"DateTime transfer reached final status",type:["string","null"],format:"date-time"}},additionalProperties:!1}},additionalProperties:!1};var qs={$schema:"http://json-schema.org/draft-07/schema",$id:"GetTransferGroupTxInput",title:"GetTransferGroupTxInput",description:"Input for getTransferGroup",type:"object",properties:{transfer_group:{$ref:"#/definitions/unique_transfer_group_filter"},options:{$ref:"#/definitions/get_transfer_group_tx_options"}},definitions:{get_transfer_group_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/get_transfer_group_additional_options"}]},get_transfer_group_additional_options:{description:"Optional flags for input",type:"object",properties:{create_if_not_exists:{type:"boolean",description:"If true then the transfer_group will be created if not found. Only valid with 'identifier'",default:!1},return_only_id:{type:"boolean",description:"If true then the returning object is only guaranteed to have id",default:!1}},default:{},$typescript:'{"additionalProperties": false}'},unique_transfer_group_filter:{description:"UNIQUE filtering options for transfer",anyOf:[{$ref:"#/definitions/unique_transfer_group_filter_id"},{$ref:"#/definitions/unique_transfer_group_filter_identifier"}]},unique_transfer_group_filter_id:{type:"object",description:"ID based filter of transfer",properties:{id:{description:"Id of transfer_group to return",$ref:"/db/transfer-group/transfer-group.schema.json#/properties/id"},identifier:{description:"Identifier of transfer_group to return",$ref:"/db/transfer-group/transfer-group.schema.json#/properties/identifier"}},required:["id"],additionalProperties:!1},unique_transfer_group_filter_identifier:{type:"object",description:"identifier based filter of transfer",properties:{id:{description:"Id of transfer_group to return",$ref:"/db/transfer-group/transfer-group.schema.json#/properties/id"},identifier:{description:"Identifier of transfer_group to return",$ref:"/db/transfer-group/transfer-group.schema.json#/properties/identifier"}},required:["identifier"],additionalProperties:!1}},required:["transfer_group"],additionalProperties:!1};var Bs={$schema:"http://json-schema.org/draft-07/schema",$id:"GetTransferGroupTxOutput",title:"GetTransferGroupTxOutput",description:"Output of getTransferGroup",type:"object",properties:{transfer_group:{$ref:"#/definitions/transfer_group"}},definitions:{transfer_group:{description:"requested transfer_group",properties:{id:{$ref:"/db/transfer-group/transfer-group.schema.json#/properties/id"},identifier:{$ref:"/db/transfer-group/transfer-group.schema.json#/properties/identifier"},status:{$ref:"/db/transfer-group/transfer-group.schema.json#/properties/status"},transfer_status:{$ref:"/db/transfer-group/transfer-group.schema.json#/properties/transfer_status"},metadata:{$ref:"/db/transfer-group/transfer-group.schema.json#/properties/metadata"},created_at:{$ref:"/db/transfer-group/transfer-group.schema.json#/properties/created_at"},updated_at:{$ref:"/db/transfer-group/transfer-group.schema.json#/properties/updated_at"},reverses_id:{$ref:"/db/transfer-group/transfer-group.schema.json#/properties/reverses_id"},status_finalized_at:{$ref:"/db/transfer-group/transfer-group.schema.json#/properties/status_finalized_at"},transfer_status_finalized_at:{$ref:"/db/transfer-group/transfer-group.schema.json#/properties/transfer_status_finalized_at"},type:{$ref:"/db/transfer-group/transfer-group.schema.json#/properties/type"},validate_final_balance_only:{$ref:"/db/transfer-group/transfer-group.schema.json#/properties/validate_final_balance_only"},reverses_identifier:{description:"Identifier of the transfer group this reverses",type:["string","null"]}},additionalProperties:!1,required:["id"]}},additionalProperties:!1};var Ls={$schema:"http://json-schema.org/draft-07/schema",$id:"GetWalletTxInput",title:"GetWalletTxInput",description:"Input for getWallet",type:"object",properties:{wallet:{$ref:"#/definitions/unique_wallet_filter"},options:{$ref:"#/definitions/get_wallet_tx_options"}},definitions:{get_wallet_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/get_wallet_additional_options"}]},get_wallet_additional_options:{description:"Optional flags for input",type:"object",properties:{ignore_cache:{description:"If true the wallet is returned from cache layer if possible",type:"boolean",default:!1},create_if_not_exists:{type:"boolean",description:"If true then the wallet will be created if not found. Only valid with 'foreign'",default:!1},return_only_id:{type:"boolean",description:"If true then the returning object is only guaranteed to have id",default:!1}},default:{},$typescript:'{"additionalProperties": false}'},unique_wallet_filter:{type:"object",description:"UNIQUE filtering options for wallet",anyOf:[{$ref:"#/definitions/unique_wallet_filter_id"},{$ref:"#/definitions/unique_wallet_filter_foreign"}]},unique_wallet_filter_id:{type:"object",description:"ID based filter for wallet",properties:{id:{description:"Id of wallet to return",$ref:"/db/wallet/wallet.schema.json#/properties/id"},foreign:{description:"Foreign of wallet to return",$ref:"/db/wallet/wallet.schema.json#/properties/name"}},required:["id"],additionalProperties:!1},unique_wallet_filter_foreign:{type:"object",description:"Foreign based filter for wallet",properties:{id:{description:"Id of wallet to return",$ref:"/db/wallet/wallet.schema.json#/properties/id"},foreign:{description:"Foreign of wallet to return",$ref:"/db/wallet/wallet.schema.json#/properties/name"}},required:["foreign"],additionalProperties:!1}},required:["wallet"],additionalProperties:!1};var Vs={$schema:"http://json-schema.org/draft-07/schema",$id:"GetWalletTxOutput",title:"GetWalletTxOutput",description:"Output of getWallet",type:"object",properties:{wallet:{description:"requested wallet",anyOf:[{$ref:"/db/wallet/wallet.schema.json"},{$ref:"/db/wallet/wallet.schema.optional.json"}]}},additionalProperties:!1};var Hs={$schema:"http://json-schema.org/draft-07/schema",$id:"GetWalletManyTxInput",title:"GetWalletManyTxInput",description:"Input for getWalletMany",type:"object",properties:{wallets:{type:"array",items:{$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"}},options:{$ref:"#/definitions/get_wallet_many_tx_options"}},definitions:{get_wallet_many_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/get_wallet_many_additional_options"}]},get_wallet_many_additional_options:{description:"Optional flags for input",type:"object",properties:{ignore_cache:{type:"boolean",default:!1},create_if_not_exists:{type:"boolean",description:"If true then the wallet will be created if not found. Only valid with 'foreign'",default:!1},return_only_id:{type:"boolean",description:"If true then the returning object is only guaranteed to have id",default:!1}},default:{},$typescript:'{"additionalProperties": false}'}},additionalProperties:!1};var zs={$schema:"http://json-schema.org/draft-07/schema",$id:"GetWalletManyTxOutput",title:"GetWalletManyTxOutput",description:"Output of getWalletMany",type:"object",properties:{wallets:{type:"array",items:{$ref:"#/definitions/WalletResult"}}},definitions:{WalletResult:{anyOf:[{$ref:"/db/wallet/wallet.schema.json"},{$ref:"/db/wallet/wallet.schema.optional.json"},{type:"null"}]}},required:["wallets"],additionalProperties:!1};var Lt={$schema:"http://json-schema.org/draft-07/schema",$id:"ImportActionsTxInput",title:"ImportActionsTxInput",description:"Input for importActions",type:"object",properties:{actions:{description:"Array of actions to import.",type:"array",items:{$ref:"#/definitions/import_actions_tx_stream_chunk"}},options:{$ref:"#/definitions/import_actions_tx_options"}},required:["actions"],definitions:{import_actions_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"}]},import_actions_tx_stream_chunk:{type:"object",anyOf:[{$ref:"#/definitions/import_action_wallet"},{$ref:"#/definitions/import_action_token"},{$ref:"#/definitions/import_action_transfer_group"},{$ref:"#/definitions/import_action_transfer"}]},import_action_wallet:{type:"object",properties:{target:{description:"Target of the action",type:"string",enum:["wallet"]},data:{$ref:"/db/wallet/wallet.schema.input.json"}},required:["target","data"],additionalProperties:!1},import_action_token:{type:"object",properties:{target:{description:"Target of the action",type:"string",enum:["token"]},data:{$ref:"/txs/create-token/create-token.schema.input.json#/definitions/create_token_input"}},required:["target","data"],additionalProperties:!1},import_action_transfer_group_extension:{type:"object",properties:{created_at:{type:"string",format:"date-time"},status_finalized_at:{type:"string",format:"date-time"},transfer_status_finalized_at:{type:"string",format:"date-time"}},$typescript:'{"additionalProperties": false}'},import_action_transfer_group_data:{allOf:[{$ref:"/txs/create-transfer-group/create-transfer-group.schema.input.json#/definitions/transfer_group_data"},{$ref:"#/definitions/import_action_transfer_group_extension"}]},import_action_transfer_group:{type:"object",properties:{target:{description:"Target of the action",type:"string",enum:["transfer_group"]},data:{allOf:[{$ref:"#/definitions/import_action_transfer_group_data"}]}},required:["target","data"],additionalProperties:!1},import_action_transfer_data:{anyOf:[{$ref:"#/definitions/import_action_transfer_data_regular"},{$ref:"#/definitions/import_action_transfer_data_deposit"},{$ref:"#/definitions/import_action_transfer_data_withdrawal"}]},import_action_transfer_data_regular:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},from_wallet:{description:"Wallet where funds are debited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},to_wallet:{description:"Wallet where funds are credited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},token:{description:"Token that is moved",$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"},amount:{$ref:"/db/transfer/transfer.schema.input.json#/properties/amount"},type:{description:"Type of transfer",enum:["transfer"]},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},status:{$ref:"/db/consts.schema.json#/definitions/TransferStatus"},transfer_group:{description:"TransferGroup the transfer belongs to",$ref:"/txs/get-transfer-group/get-transfer-group.schema.input.json#/definitions/unique_transfer_group_filter"},created_at:{type:"string",format:"date-time"},status_finalized_at:{type:"string",format:"date-time"}},required:["from_wallet","to_wallet","token","amount","type"],$typescript:'{"additionalProperties": false}'},import_action_transfer_data_deposit:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},from_wallet:{description:"Wallet where funds are debited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},to_wallet:{description:"Wallet where funds are credited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},token:{description:"Token that is moved",$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"},amount:{$ref:"/db/transfer/transfer.schema.input.json#/properties/amount"},type:{description:"Type of transfer",enum:["deposit"]},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},status:{$ref:"/db/consts.schema.json#/definitions/TransferStatus"},transfer_group:{description:"TransferGroup the transfer belongs to",$ref:"/txs/get-transfer-group/get-transfer-group.schema.input.json#/definitions/unique_transfer_group_filter"},created_at:{type:"string",format:"date-time"},status_finalized_at:{type:"string",format:"date-time"}},required:["to_wallet","token","amount"],$typescript:'{"additionalProperties": false}'},import_action_transfer_data_withdrawal:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},from_wallet:{description:"Wallet where funds are debited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},to_wallet:{description:"Wallet where funds are credited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},token:{description:"Token that is moved",$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"},amount:{$ref:"/db/transfer/transfer.schema.input.json#/properties/amount"},type:{description:"Type of transfer",enum:["withdrawal"]},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},status:{$ref:"/db/consts.schema.json#/definitions/TransferStatus"},transfer_group:{description:"TransferGroup the transfer belongs to",$ref:"/txs/get-transfer-group/get-transfer-group.schema.input.json#/definitions/unique_transfer_group_filter"},created_at:{type:"string",format:"date-time"},status_finalized_at:{type:"string",format:"date-time"}},required:["from_wallet","token","amount"],$typescript:'{"additionalProperties": false}'},import_action_transfer:{type:"object",properties:{target:{description:"Target of the action",type:"string",enum:["transfer"]},data:{allOf:[{$ref:"#/definitions/import_action_transfer_data"}]}},required:["target","data"],additionalProperties:!1}},$allowStreamInput:"import_actions_tx_stream_chunk",additionalProperties:!1};var Ks={$schema:"http://json-schema.org/draft-07/schema",$id:"ImportActionsTxOutput",title:"ImportActionsTxOutput",description:"Output of importActions",type:"object",properties:{progress:{type:"array"},erroneous:{type:"array"}},additionalProperties:!1};var Qs={$schema:"http://json-schema.org/draft-07/schema",$id:"ImportDatabaseTxInput",title:"ImportDatabaseTxInput",description:"Input for importDatabase",type:"object",properties:{name:{type:"string"}},definitions:{},additionalProperties:!1};var Js={$schema:"http://json-schema.org/draft-07/schema",$id:"ImportDatabaseTxOutput",title:"ImportDatabaseTxOutput",description:"Output of importDatabase",type:"object",properties:{message:{type:"string"}},additionalProperties:!1};var Xs={$schema:"http://json-schema.org/draft-07/schema",$id:"ListDatabaseExportsTxInput",title:"ListDatabaseExportsTxInput",description:"Input for listDatabaseExports",type:"object",properties:{},definitions:{},additionalProperties:!1};var Ys={$schema:"http://json-schema.org/draft-07/schema",$id:"ListDatabaseExportsTxOutput",title:"ListDatabaseExportsTxOutput",description:"Output of listDatabaseExports",type:"object",properties:{exports:{type:"array",items:{$ref:"#/definitions/database_export"}}},required:["exports"],definitions:{database_export:{type:"object",properties:{name:{description:"Name of the export",type:"string"},size:{description:"Size of the export",type:"number"}},required:["name","size"]}},additionalProperties:!1};var Zs={$schema:"http://json-schema.org/draft-07/schema",$id:"QueryTxInput",title:"QueryTxInput",description:"Input for query",type:"object",properties:{query:{description:"SELECT query",type:"string"},params:{description:"Parameters for the query",type:"array"},options:{$ref:"#/definitions/query_tx_options"}},definitions:{query_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options_without_tx"}]}},required:["query","params"],additionalProperties:!1};var ei={$schema:"http://json-schema.org/draft-07/schema",$id:"QueryTxOutput",title:"QueryTxOutput",description:"Output of query",type:"object",properties:{results:{description:"The query results",type:"array"}},required:["results"],additionalProperties:!1};var ti={$schema:"http://json-schema.org/draft-07/schema",$id:"QueryLogsTxInput",title:"QueryLogsTxInput",description:"Input for queryLogs",type:"object",properties:{startTime:{description:"Log entries start time",type:"string"},endTime:{description:"Log entries end time",type:"string"},tracking_id:{type:"string"},level:{type:"string",enum:["debug","info","warning","error"]},options:{$ref:"#/definitions/query_logs_tx_options"}},definitions:{query_logs_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/query_logs_additional_options"}]},query_logs_additional_options:{description:"Optional flags for input",type:"object",default:{exact_level:!1},properties:{exact_level:{description:"Should query be limited to exactly defined level or greater than",type:"boolean"}},$typescript:'{"additionalProperties":false}'}},additionalProperties:!1};var ri={$schema:"http://json-schema.org/draft-07/schema",$id:"QueryLogsTxOutput",title:"QueryLogsTxOutput",description:"Output of queryLogs",type:"object",properties:{logs:{type:"array",items:{$ref:"#/definitions/query_log_entry"}}},definitions:{query_log_entry:{type:"object",properties:{level:{description:"Log level",type:"string",enum:["debug","info","warning","error"]},timestamp:{description:"Timestamp when log was created",type:"string"},payload:{description:"Log payload",type:"object"}},additionalProperties:!1}},required:["logs"],additionalProperties:!1};var ni={$schema:"http://json-schema.org/draft-07/schema",$id:"ResetDatabaseTxInput",title:"ResetDatabaseTxInput",description:"Input for resetDatabase",type:"object",properties:{confirmation:{description:"hash to confirm database delete",type:"string"},version:{description:"target semver for the database",type:"string"},options:{$ref:"#/definitions/reset_database_tx_options"}},definitions:{reset_database_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options_without_tx"}]}},additionalProperties:!1};var ai={$schema:"http://json-schema.org/draft-07/schema",$id:"ResetDatabaseTxOutput",title:"ResetDatabaseTxOutput",description:"Output of resetDatabase",type:"object",properties:{message:{description:"Message about operation",type:"string"},confirmation:{description:"confirmation hash to resend",type:"string"}},additionalProperties:!1};var si={$schema:"http://json-schema.org/draft-07/schema",$id:"ReverseTransferTxInput",title:"ReverseTransferTxInput",description:"Input for reverseTransfer",type:"object",properties:{transfer:{$ref:"/txs/get-transfer/get-transfer.schema.input.json#/definitions/unique_transfer_filter"},reverse:{$ref:"#/definitions/transfer_reverse_modifications"},options:{$ref:"#/definitions/reverse_transfer_tx_options"}},definitions:{reverse_transfer_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/reverse_transfer_additional_options"}]},reverse_transfer_additional_options:{description:"Optional flags for input",type:"object",default:{},properties:{reverse_deposit:{$id:"reverse_deposit",description:"Whether to create withdrawal transaction for deposit (will default to pending)",type:"boolean",default:!1},reverse_withdrawal:{$id:"reverse_withdrawal",description:"Whether to create deposit transaction for withdrawal (will default to pending)",type:"boolean",default:!1},return_from_balance:{$id:"return_from_balance",description:"Whether the request should also return from wallet balance",type:"boolean",default:!1},return_to_balance:{$id:"return_to_balance",description:"Whether the request should also return to wallet balance",type:"boolean",default:!1},metadata_action:{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_action_for_reverse"}},$typescript:'{"additionalProperties": false}'},transfer_reverse_modifications:{description:"In case the transfer will be made then apply these modifications",type:"object",properties:{status:{$ref:"/db/transfer/transfer.schema.input.json#/properties/status"},identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},force:{$ref:"/db/transfer/transfer.schema.input.json#/properties/force"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},extend_metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"}},default:{},additionalProperties:!1}},required:["transfer"],additionalProperties:!1};var ii={$schema:"http://json-schema.org/draft-07/schema",$id:"ReverseTransferTxOutput",title:"ReverseTransferTxOutput",description:"Output of reverseTransfer",allOf:[{$ref:"/txs/update-transfer/update-transfer.schema.output.json"}]};var oi={$schema:"http://json-schema.org/draft-07/schema",$id:"ReverseTransferGroupTxInput",title:"ReverseTransferGroupTxInput",description:"Input for reverseTransferGroup",type:"object",properties:{transfer_group:{$ref:"/txs/get-transfer-group/get-transfer-group.schema.input.json#/definitions/unique_transfer_group_filter"},reverse:{$ref:"#/definitions/reverse_transfer_group_modifications"},options:{$ref:"#/definitions/reverse_transfer_group_tx_options"}},definitions:{reverse_transfer_group_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/reverse_transfer_group_additional_options"}]},reverse_transfer_group_additional_options:{description:"Optional flags for input",type:"object",default:{},properties:{reverse_deposit:{$id:"reverse_deposit",description:"Whether to create withdrawal transaction for deposits (will default to pending)",type:"boolean",default:!1},reverse_withdrawal:{$id:"reverse_withdrawal",description:"Whether to create deposit transaction for withdrawals (will default to pending)",type:"boolean",default:!1},return_transfers:{description:"Should the update return all transfers belonging to group",type:"boolean"},validate_final_balance_only:{type:"boolean",description:"If true then transfers within a group will ignore balance restrictions. Only final transfers for wallets are checked.",default:!1},metadata_action:{$id:"metadata_action",$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_action_for_reverse"},transfer_metadata_action:{$id:"transfer_metadata_action",$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_action_for_reverse"}},$typescript:'{"additionalProperties": false}'},reverse_transfer_group_modifications:{description:"In case the transferGroup will be made then apply these modifications",type:"object",properties:{status:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/status"},transfer_status:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/transfer_status"},identifier:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/identifier"},force:{$ref:"/db/transfer/transfer.schema.input.json#/properties/force"},metadata:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/metadata"},transfer_metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},extend_metadata:{description:"Key value object to be merged with existing metadata",$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/metadata"},transfer_extend_metadata:{description:"Key value object to be merged with each transfers existing metadata",$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"}},default:{},additionalProperties:!1}},additionalProperties:!1};var pi={$schema:"http://json-schema.org/draft-07/schema",$id:"ReverseTransferGroupTxOutput",title:"ReverseTransferGroupTxOutput",description:"Output of reverseTransferGroup",type:"object",properties:{transfer_group:{$ref:"/db/transfer-group/transfer-group.schema.json"},transfers:{description:"Created transfer objects",type:"array",items:{$ref:"/txs/get-transfer/get-transfer.schema.output.json#/definitions/transfer"}}},additionalProperties:!1};var di={$schema:"http://json-schema.org/draft-07/schema",$id:"ReverseTransferGroupManyTxInput",title:"ReverseTransferGroupManyTxInput",description:"Input for reverseTransferGroupMany",type:"object",properties:{transfer_group:{$ref:"/txs/find-transfer-group-many/find-transfer-group-many.schema.input.json#/definitions/find_transfer_group_many_filter"},reverse:{$ref:"#/definitions/reverse_transfer_group_many_modifications"},options:{$ref:"#/definitions/reverse_transfer_group_many_tx_options"}},definitions:{reverse_transfer_group_many_modifications:{description:"In case the transferGroup will be made then apply these modifications",type:"object",properties:{status:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/status"},transfer_status:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/transfer_status"},force:{$ref:"/db/transfer/transfer.schema.input.json#/properties/force"},metadata:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/metadata"},transfer_metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},extend_metadata:{description:"Key value object to be merged with existing metadata",$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/metadata"},transfer_extend_metadata:{description:"Key value object to be merged with each transfers existing metadata",$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"}},default:{},additionalProperties:!1},reverse_transfer_group_many_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"/txs/reverse-transfer-group/reverse-transfer-group.schema.input.json#/definitions/reverse_transfer_group_additional_options"}]},reverse_transfer_group_many_additional_options:{description:"Optional flags for input",type:"object",default:{},$typescript:'{"additionalProperties":false}'}},required:["transfer_group"],additionalProperties:!1};var fi={$schema:"http://json-schema.org/draft-07/schema",$id:"ReverseTransferGroupManyTxOutput",title:"ReverseTransferGroupManyTxOutput",description:"Output of reverseTransferGroupMany",type:"object",properties:{transfer_groups:{description:"Reversed transfer groups",type:"array",items:{$ref:"/db/transfer-group/transfer-group.schema.json"}},transfers:{description:"Created transfer objects",type:"array",items:{$ref:"/txs/get-transfer/get-transfer.schema.output.json#/definitions/transfer"}}},additionalProperties:!1};var ui={$schema:"http://json-schema.org/draft-07/schema",$id:"ReverseTransferManyTxInput",title:"ReverseTransferManyTxInput",description:"Input for reverseTransferMany",type:"object",properties:{transfer:{$ref:"/txs/find-transfer-many/find-transfer-many.schema.input.json#/definitions/find_transfer_many_filter"},reverse:{$ref:"#/definitions/reverse_transfer_many_modifications"},options:{$ref:"#/definitions/reverse_transfer_many_tx_options"}},definitions:{reverse_transfer_many_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/reverse_transfer_many_additional_options"}]},reverse_transfer_many_additional_options:{description:"Optional flags for input",type:"object",default:{},properties:{reverse_deposit:{$id:"reverse_deposit",description:"Whether to create withdrawal transaction for deposit (will default to pending)",type:"boolean",default:!1},reverse_withdrawal:{$id:"reverse_withdrawal",description:"Whether to create deposit transaction for withdrawal (will default to pending)",type:"boolean",default:!1},metadata_action:{$id:"metadata_action",$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_action_for_reverse"}},$typescript:'{"additionalProperties": false}'},reverse_transfer_many_modifications:{description:"In case the transfer will be made then apply these modifications",type:"object",properties:{status:{$ref:"/db/transfer/transfer.schema.input.json#/properties/status"},force:{$ref:"/db/transfer/transfer.schema.input.json#/properties/force"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"}},default:{},additionalProperties:!1}},required:["transfer"],additionalProperties:!1};var li={$schema:"http://json-schema.org/draft-07/schema",$id:"ReverseTransferManyTxOutput",title:"ReverseTransferManyTxOutput",description:"Output of reverseTransferMany",properties:{transfers:{description:"Created transfer array",type:"array",items:{$ref:"/txs/get-transfer/get-transfer.schema.output.json#/definitions/transfer"}}},additionalProperties:!1};var ci={$schema:"http://json-schema.org/draft-07/schema",$id:"SetFlagsTxInput",title:"SetFlagsTxInput",description:"Input for setFlags",type:"object",properties:{flags:{$ref:"/db/consts.schema.json#/definitions/Flags"},options:{$ref:"#/definitions/set_flags_tx_options"}},definitions:{set_flags_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options_without_tx"}]}},required:["flags"],additionalProperties:!1};var mi={$schema:"http://json-schema.org/draft-07/schema",$id:"SetFlagsTxOutput",title:"SetFlagsTxOutput",description:"Output of setFlags",type:"object",properties:{flags:{$ref:"/db/consts.schema.json#/definitions/Flags"},message:{description:"optional message",type:"string"}},required:["flags"],additionalProperties:!1};var hi={$schema:"http://json-schema.org/draft-07/schema",$id:"StartTransactionTxInput",title:"StartTransactionTxInput",description:"Input for startTransaction",type:"object",properties:{options:{$ref:"#/definitions/start_transaction_tx_options"}},definitions:{start_transaction_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options_without_tx"}]}},additionalProperties:!1};var _i={$schema:"http://json-schema.org/draft-07/schema",$id:"StartTransactionTxOutput",title:"StartTransactionTxOutput",description:"Output of startTransaction",type:"object",properties:{transaction_id:{type:"string"}},additionalProperties:!1};var gi={$schema:"http://json-schema.org/draft-07/schema",$id:"TxConsts",description:"Generics used by functions",definitions:{i_tx_general_options_without_tx:{description:"Generic flags for input",type:"object",default:{},properties:{tracking_id:{description:"User provided id added to logs for debugging",type:"string"}},$typescript:'{"additionalProperties":false}'},i_tx_general_options:{description:"Generic flags for input",type:"object",default:{},properties:{transaction_id:{description:"Id of the transaction context to run the query in",type:"string"},tracking_id:{description:"User provided id added to logs for debugging",type:"string"}},$typescript:'{"additionalProperties":false}'},i_tx_metadata_options:{description:"Metadata flags for input",type:"object",default:{},properties:{return_metadata_total:{description:"Return the total rows count in metadata",type:"boolean"}},$typescript:'{"additionalProperties":false}'},i_tx_limiting_options:{$typescript:'{"additionalProperties":false}',description:"Optional flags for input limiting",type:"object",properties:{limit:{description:"Number of records to return",type:"integer"},offset:{description:"Number of records to omit from the beginning",type:"integer"}},default:{limit:20,offset:0}},i_tx_ordering_options:{$typescript:'{"additionalProperties":false}',description:"Optional flags for input ordering",type:"object",properties:{order:{description:"Ordering options",type:"array",items:{$ref:"#/definitions/i_tx_ordering_input"}}}},i_tx_select_options:{$typescript:'{"additionalProperties":false}',description:"Optional flags to limit search result",type:"object",properties:{select:{description:"Select options",type:"array",items:{type:"string"}}}},i_tx_deselect_options:{$typescript:'{"additionalProperties":false}',description:"Optional flag to remove field from select",type:"object",properties:{deselect:{description:"Deselect options",type:"array",items:{type:"string"}}}},i_tx_aggregating_options:{$typescript:'{"additionalProperties":false}',description:"Optional flags to aggregate data",type:"object",properties:{aggregator:{$ref:"#/definitions/i_tx_aggregator"},aggregators:{type:"array",items:{$ref:"#/definitions/i_tx_aggregator"}},groups:{$ref:"#/definitions/i_tx_groups"}}},i_tx_find_metadata:{description:"Metadata about the search",type:"object",properties:{total:{description:"Total number of records matching the query",type:"integer"},offset:{description:"Current query offset",type:"integer"},limit:{description:"Current query limit",type:"integer"},more_rows:{description:"Boolean showing if there would be more rows to return with a higher offset/limit",type:"boolean"},order:{description:"Ordering options",type:"array",items:{$ref:"#/definitions/i_tx_ordering_input"}}},required:["offset","limit","more_rows"],additionalProperties:!1},i_tx_aggregating_metadata:{description:"Metadata about the aggregation",type:"object",properties:{aggregators:{type:"array",items:{$ref:"#/definitions/i_tx_aggregator"}},groups:{$ref:"#/definitions/i_tx_groups"}},required:["aggregators"],additionalProperties:!1},i_tx_ordering_input:{description:"Input for orderBy",type:"object",properties:{field:{description:"Field to order by",type:"string"},direction:{description:"Direction to order",default:"asc",type:"string",enum:["asc","desc"]},nulls:{description:"Should nulls be first or last",type:"string",enum:["first","last"]}},required:["field"],additionalProperties:!1},i_tx_groups:{type:"array",maxItems:5,items:{$ref:"#/definitions/i_tx_group"}},i_tx_group:{anyOf:[{$ref:"#/definitions/i_tx_group_period"},{$ref:"#/definitions/i_tx_group_field"},{$ref:"#/definitions/i_tx_group_metadata_field"}]},i_tx_group_period:{type:"object",properties:{type:{type:"string",enum:["period"]},field:{$ref:"#/definitions/i_tx_period"},alias:{type:"string"}},required:["type","field"],additionalProperties:!1},i_tx_group_field:{type:"object",properties:{type:{type:"string",enum:["field"]},field:{type:"string"},alias:{type:"string"}},required:["type","field"],additionalProperties:!1},i_tx_group_metadata_field:{type:"object",properties:{type:{type:"string",enum:["metadata_field"]},field:{type:"string"},alias:{type:"string"}},required:["type","field"],additionalProperties:!1},i_tx_period:{anyOf:[{$ref:"#/definitions/i_tx_period_simple"},{$ref:"#/definitions/i_tx_period_timezone"}]},i_tx_period_simple:{description:"Time period rows should be grouped by",type:"string",enum:["year","month","week","day","hour","minute"],default:"day"},i_tx_period_timezone:{type:"object",properties:{period:{$ref:"#/definitions/i_tx_period_simple"},timezone:{description:"",type:"string"}},required:["period","timezone"],additionalProperties:!1},i_tx_time_filter:{type:"object",properties:{start_time:{type:"string",format:"date-time"},end_time:{type:"string",format:"date-time"}},$typescript:'{"additionalProperties":false}'},i_tx_aggregator:{description:"Aggregator description",anyOf:[{$ref:"#/definitions/i_tx_aggregator_simple"},{$ref:"#/definitions/i_tx_aggregator_complex"}]},i_tx_aggregator_simple:{description:"Function to use for grouping",type:"string",enum:["count","countDistinct","sum","average","min","max"],default:"count"},i_tx_aggregator_complex:{description:"Function and field to group",type:"object",properties:{function:{$ref:"#/definitions/i_tx_aggregator_simple"},field:{description:"Field to group by",type:"string"},alias:{description:"Alias to group under",type:"string"}},$typescript:'{"additionalProperties":false}'},i_tx_aggregate_results:{type:"array",items:{$ref:"#/definitions/i_tx_aggregate_result"}},i_tx_aggregate_result:{type:"object",additionalProperties:{type:["string","number"]}},i_tx_distributor_leftover_rule:{description:"Rule for distribution grouping",type:"string",enum:["keep","random","largest","target"]},i_tx_metadata_action:{description:"Whether to replace or extend current metadata with new value",type:"string",enum:["replace","extend"],default:"replace"},i_tx_metadata_action_for_reverse:{description:"Whether to replace or extend current metadata with new value",type:"string",enum:["replace","replace_create_only","replace_cancel_only","extend","extend_create_only","extend_cancel_only"],default:"replace"}}};var Ti={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTokenTxInput",title:"UpdateTokenTxInput",description:"Input for updateToken",type:"object",properties:{token:{$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"},update:{$ref:"#/definitions/update_token_fields"},options:{$ref:"#/definitions/update_token_tx_options"}},definitions:{update_token_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/update_token_additional_options"}]},update_token_additional_options:{description:"Optional flags for input",type:"object",default:{},$typescript:'{"additionalProperties":false}',properties:{return_when_not_updated:{$id:"return_when_not_updated",description:"Whether the request should return the token object even if it was not updated",type:"boolean",default:!1}}},update_token_fields:{type:"object",$typescript:'{"additionalProperties":false}',properties:{metadata:{$ref:"/db/token/token.schema.json#/properties/metadata"},public:{$ref:"/db/token/token.schema.json#/properties/public"},status:{$ref:"/db/token/token.schema.json#/properties/status"}}}},required:["token"],additionalProperties:!1};var yi={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTokenTxOutput",title:"UpdateTokenTxOutput",description:"Output of updateToken",type:"object",properties:{token:{description:"Token object",$ref:"/db/token/token.schema.json"},updated:{description:"Boolean showing if the token was updated",type:"boolean"}},additionalProperties:!1};var bi={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTransferTxInput",title:"UpdateTransferTxInput",description:"Input for updateTransfer",type:"object",properties:{transfer:{$ref:"/txs/get-transfer/get-transfer.schema.input.json#/definitions/unique_transfer_filter"},update:{$ref:"#/definitions/update_transfer_fields"},options:{$ref:"#/definitions/update_transfer_tx_options"}},definitions:{update_transfer_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/update_transfer_additional_options"}]},update_transfer_additional_options:{description:"Optional flags for input",type:"object",default:{},properties:{return_from_balance:{$id:"return_from_balance",description:"Whether the request should also return from wallet balance",type:"boolean",default:!1},return_to_balance:{$id:"return_to_balance",description:"Whether the request should also return to wallet balance",type:"boolean",default:!1},return_when_not_updated:{$id:"return_when_not_updated",description:"Whether the request should return the transfer object even if it was not updated",type:"boolean",default:!1},metadata_action:{$id:"metadata_action",$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_action"}},$typescript:'{"additionalProperties": false}'},update_transfer_fields:{type:"object",description:"Changes to be made to the transfer",properties:{status:{description:"Status the transfer should be set as. Only pending transfers can be updated",default:"finished",$ref:"/db/consts.schema.json#/definitions/TransferStatus"},metadata:{$ref:"/db/transfer/transfer.schema.json#/properties/metadata"},extend_metadata:{$ref:"/db/transfer/transfer.schema.json#/properties/metadata"},updated_at:{$ref:"/db/transfer/transfer.schema.json#/properties/updated_at"}},default:{status:"finished"},additionalProperties:!1}},required:["transfer"],additionalProperties:!1};var Fi={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTransferTxOutput",title:"UpdateTransferTxOutput",description:"Output of updateTransfer",type:"object",properties:{transfer:{description:"Updated transfer object",$ref:"/txs/get-transfer/get-transfer.schema.output.json#/definitions/transfer"},updated:{description:"Boolean showing if the transfer was updated",type:"boolean"},from_balance:{description:"Debited wallet balance",$ref:"/txs/get-balance/get-balance.schema.output.json#/definitions/balance"},to_balance:{description:"Credited wallet balance",$ref:"/txs/get-balance/get-balance.schema.output.json#/definitions/balance"}},additionalProperties:!1};var xi={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTransferGroupTxInput",title:"UpdateTransferGroupTxInput",description:"Input for updateTransferGroup",type:"object",properties:{transfer_group:{$ref:"/txs/get-transfer-group/get-transfer-group.schema.input.json#/definitions/unique_transfer_group_filter"},update:{$ref:"#/definitions/update_transfer_group_data"},options:{$ref:"#/definitions/update_transfer_group_tx_options"}},definitions:{update_transfer_group_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options_without_tx"},{$ref:"#/definitions/update_transfer_group_additional_options"}]},update_transfer_group_additional_options:{description:"Optional flags for input",type:"object",default:{},properties:{return_transfers:{description:"Should the update return all transfers belonging to group",type:"boolean"},return_when_not_updated:{$id:"return_to_balance",description:"Whether the request should return the transfer_group object even if it was not updated",type:"boolean",default:!1},metadata_action:{$id:"metadata_action",$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_action"},transfer_metadata_action:{$id:"transfer_metadata_action",$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_action"}},$typescript:'{"additionalProperties": false}'},update_transfer_group_data:{description:"Changes to be made to the transfer_group",anyOf:[{$ref:"#/definitions/update_transfer_group_status"},{$ref:"#/definitions/update_transfer_group_transfer_status"},{$ref:"#/definitions/update_transfer_group_metadata"}]},update_transfer_group_status:{type:"object",properties:{status:{description:"Lifecycle status of the TransferGroup",$ref:"/db/consts.schema.json#/definitions/TransferGroupStatus"},transfer_status:{description:"Status all the transfers should be set at.",$ref:"/db/consts.schema.json#/definitions/TransferStatus"},metadata:{description:"Key value object to be replaced or extended with existing TransferGroup metadata",$ref:"/db/transfer/transfer.schema.json#/properties/metadata"},transfer_metadata:{description:"Key value object to be replaced or extended with existing Transfer metadata",$ref:"/db/transfer/transfer.schema.json#/properties/metadata"}},required:["status"],additionalProperties:!1},update_transfer_group_transfer_status:{type:"object",properties:{status:{description:"Lifecycle status of the TransferGroup",$ref:"/db/consts.schema.json#/definitions/TransferGroupStatus"},transfer_status:{description:"Status all the transfers should be set at. Changing transfer_status will also close the group",$ref:"/db/consts.schema.json#/definitions/TransferStatus"},metadata:{description:"Key value object to be replaced or extended with existing TransferGroup metadata",$ref:"/db/transfer/transfer.schema.json#/properties/metadata"},transfer_metadata:{description:"Key value object to be replaced or extended with existing Transfer metadata",$ref:"/db/transfer/transfer.schema.json#/properties/metadata"}},required:["transfer_status"],additionalProperties:!1},update_transfer_group_metadata:{type:"object",properties:{status:{description:"Lifecycle status of the TransferGroup",$ref:"/db/consts.schema.json#/definitions/TransferGroupStatus"},transfer_status:{description:"Status all the transfers should be set at.",$ref:"/db/consts.schema.json#/definitions/TransferStatus"},metadata:{description:"Key value object to be replaced or extended with existing TransferGroup metadata",$ref:"/db/transfer/transfer.schema.json#/properties/metadata"},transfer_metadata:{description:"Key value object to be replaced or extended with existing Transfer metadata",$ref:"/db/transfer/transfer.schema.json#/properties/metadata"}},required:["metadata"],additionalProperties:!1}},required:["transfer_group"],additionalProperties:!1};var $i={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTransferGroupTxOutput",title:"UpdateTransferGroupTxOutput",description:"Output of updateTransferGroup",type:"object",properties:{transfer_group:{$ref:"/db/transfer-group/transfer-group.schema.json"},updated:{description:"Boolean showing if the transfer_group was updated",type:"boolean"},transfers:{description:"Updated transfers",type:"array",items:{$ref:"/txs/get-transfer/get-transfer.schema.output.json#/definitions/transfer"}}},additionalProperties:!1};var Oi={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTransferGroupManyTxInput",title:"UpdateTransferGroupManyTxInput",description:"Input for updateTransferGroupMany",type:"object",properties:{transfer_group:{$ref:"/txs/find-transfer-group-many/find-transfer-group-many.schema.input.json#/definitions/find_transfer_group_many_filter"},update:{$ref:"/txs/update-transfer-group/update-transfer-group.schema.input.json#/definitions/update_transfer_group_data"},options:{$ref:"/txs/update-transfer-group/update-transfer-group.schema.input.json#/definitions/update_transfer_group_tx_options"}},definitions:{update_transfer_group_many_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/update_transfer_group_many_additional_options"}]},update_transfer_group_many_additional_options:{description:"Optional flags for input",type:"object",default:{},$typescript:'{"additionalProperties":false}'}},required:["transfer_group"],additionalProperties:!1};var wi={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTransferGroupManyTxOutput",title:"UpdateTransferGroupManyTxOutput",description:"Output of updateTransferGroupMany",type:"object",properties:{transfer_groups:{description:"Updated transfer groups",type:"array",items:{$ref:"/db/transfer-group/transfer-group.schema.json"}},updated:{description:"Boolean showing if the transfer_group was updated",type:"boolean"},transfers:{description:"Updated transfers",type:"array",items:{$ref:"/txs/get-transfer/get-transfer.schema.output.json#/definitions/transfer"}}},required:["transfer_groups"],additionalProperties:!1};var Ii={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTransferManyTxInput",title:"UpdateTransferManyTxInput",description:"Input for updateTransferMany",type:"object",properties:{transfer:{$ref:"/txs/find-transfer-many/find-transfer-many.schema.input.json#/definitions/find_transfer_many_filter"},update:{$ref:"/txs/update-transfer/update-transfer.schema.input.json#/definitions/update_transfer_fields"},options:{$ref:"#/definitions/update_transfer_many_tx_options"}},definitions:{update_transfer_many_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options_without_tx"},{$ref:"#/definitions/update_transfer_many_additional_options"}]},update_transfer_many_additional_options:{description:"Optional flags for input",type:"object",default:{},properties:{metadata_action:{$id:"metadata_action",$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_action"}},$typescript:'{"additionalProperties": false}'}},required:["transfer","update"],additionalProperties:!1};var ji={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTransferManyTxOutput",title:"UpdateTransferManyTxOutput",description:"Output of updateTransferMany",type:"object",properties:{transfers:{description:"Updated transfers array",type:"array",items:{$ref:"/txs/get-transfer/get-transfer.schema.output.json#/definitions/transfer"}},updated:{description:"Boolean showing if the transfers were updated",type:"boolean"}},additionalProperties:!1};var vi={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateWalletTxInput",title:"UpdateWalletTxInput",description:"Input for updateWallet",type:"object",properties:{wallet:{$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},update:{$ref:"#/definitions/update_wallet_fields"},options:{$ref:"#/definitions/update_wallet_tx_options"}},definitions:{update_wallet_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/update_wallet_additional_options"}]},update_wallet_additional_options:{description:"Optional flags for input",type:"object",default:{},properties:{return_when_not_updated:{description:"Whether the request should return the wallet object even if it was not updated",type:"boolean",default:!1}},$typescript:'{"additionalProperties":false}'},update_wallet_fields:{type:"object",properties:{metadata:{$ref:"/db/wallet/wallet.schema.json#/properties/metadata"},name:{$ref:"/db/wallet/wallet.schema.json#/properties/name"},status:{$ref:"/db/wallet/wallet.schema.json#/properties/status"}},$typescript:'{"additionalProperties":false}'}},required:["wallet"],additionalProperties:!1};var ki={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateWalletTxOutput",title:"UpdateWalletTxOutput",description:"Output of updateWallet",type:"object",properties:{wallet:{description:"Wallet object",anyOf:[{$ref:"/db/wallet/wallet.schema.json"},{$ref:"/db/wallet/wallet.schema.optional.json"}]},updated:{description:"Boolean showing if the wallet was updated",type:"boolean"}},additionalProperties:!1};var u=new Nc.default({removeAdditional:!0,useDefaults:!0,coerceTypes:!0,formats:{validkey:/^[A-Za-z_][A-Za-z0-9_-]+?$/},strict:!1});u.addFormat("date-time",{validate:Fu});function wd(r,e){if(e!==void 0)return new Re({message:e,data:r})}function Ac(r){return function(e){if(r===void 0)return{isValid:!1,inputCopy:e,error:wd([new Error("Undefined validator")],"Undefined validator")};try{let t=Ai(e),n=r(t),a=n?void 0:r.errors,s=n?void 0:u.errorsText(a),i=wd(a,s);return{isValid:n,inputCopy:t,error:i}}catch(t){return{isValid:!1,inputCopy:e,error:wd([t],t.message)}}}}function m(r,e){let t=JSON.parse(JSON.stringify(r));return Uc(t,e)}function Uc(r,e){return typeof r!="object"||Object.keys(r).forEach(t=>{t==="$ref"&&r.$ref.startsWith("#")?r.$ref=e+r.$ref:r[t]=Uc(r[t],e)}),r}function qc(r,e){let t=m(r,e),n=t.properties.options;return P({$id:t.$id.replace("Input","Options"),definitions:t.definitions},n)}function Bc(r,e){let t=m(r,e),n=t.definitions[r.$allowStreamInput];return P({$id:t.$id.replace("Input","StreamChunk"),definitions:t.definitions},n)}var l={};u.addSchema(m(hd,"/api/jsonrpc/jsonrpc.request.schema.json"),"/api/jsonrpc/jsonrpc.request.schema.json");l.JSONRPCRequest=hd;u.addSchema(m(_d,"/api/jsonrpc/jsonrpc.response.schema.json"),"/api/jsonrpc/jsonrpc.response.schema.json");l.JSONRPCResponse=_d;u.addSchema(m(gd,"/client-options.schema.json"),"/client-options.schema.json");l.ClientOptions=gd;u.addSchema(m(qt,"/db/consts.schema.json"),"/db/consts.schema.json");l.Consts=qt;u.addSchema(m(fn,"/db/token/token.schema.input.json"),"/db/token/token.schema.input.json");l.TokenTableInput=fn;u.addSchema(m(un,"/db/token/token.schema.json"),"/db/token/token.schema.json");l.TokenTable=un;u.addSchema(m(Td,"/db/token/token.schema.optional.json"),"/db/token/token.schema.optional.json");l.TokenTableOptional=Td;u.addSchema(m(ln,"/db/transfer/transfer.schema.input.json"),"/db/transfer/transfer.schema.input.json");l.TransferTableInput=ln;u.addSchema(m(cn,"/db/transfer/transfer.schema.json"),"/db/transfer/transfer.schema.json");l.TransferTable=cn;u.addSchema(m(yd,"/db/transfer/transfer.schema.optional.json"),"/db/transfer/transfer.schema.optional.json");l.TransferTableOptional=yd;u.addSchema(m(mn,"/db/transfer-group/transfer-group.schema.input.json"),"/db/transfer-group/transfer-group.schema.input.json");l.TransferGroupTableInput=mn;u.addSchema(m(hn,"/db/transfer-group/transfer-group.schema.json"),"/db/transfer-group/transfer-group.schema.json");l.TransferGroupTable=hn;u.addSchema(m(bd,"/db/transfer-group/transfer-group.schema.optional.json"),"/db/transfer-group/transfer-group.schema.optional.json");l.TransferGroupTableOptional=bd;u.addSchema(m(_n,"/db/transfer-log/transfer-log.schema.input.json"),"/db/transfer-log/transfer-log.schema.input.json");l.TransferLogTableInput=_n;u.addSchema(m(gn,"/db/transfer-log/transfer-log.schema.json"),"/db/transfer-log/transfer-log.schema.json");l.TransferLogTable=gn;u.addSchema(m(Fd,"/db/transfer-log/transfer-log.schema.optional.json"),"/db/transfer-log/transfer-log.schema.optional.json");l.TransferLogTableOptional=Fd;u.addSchema(m(Tn,"/db/wallet/wallet.schema.input.json"),"/db/wallet/wallet.schema.input.json");l.WalletTableInput=Tn;u.addSchema(m(yn,"/db/wallet/wallet.schema.json"),"/db/wallet/wallet.schema.json");l.WalletTable=yn;u.addSchema(m(xd,"/db/wallet/wallet.schema.optional.json"),"/db/wallet/wallet.schema.optional.json");l.WalletTableOptional=xd;u.addSchema(m(bn,"/db/wallet-token-setting/wallet-token-setting.schema.input.json"),"/db/wallet-token-setting/wallet-token-setting.schema.input.json");l.WalletTokenSettingTableInput=bn;u.addSchema(m(Fn,"/db/wallet-token-setting/wallet-token-setting.schema.json"),"/db/wallet-token-setting/wallet-token-setting.schema.json");l.WalletTokenSettingTable=Fn;u.addSchema(m($d,"/db/wallet-token-setting/wallet-token-setting.schema.optional.json"),"/db/wallet-token-setting/wallet-token-setting.schema.optional.json");l.WalletTokenSettingTableOptional=$d;u.addSchema(m(xn,"/db/wapi-setting/wapi-setting.schema.input.json"),"/db/wapi-setting/wapi-setting.schema.input.json");l.WapiSettingTableInput=xn;u.addSchema(m($n,"/db/wapi-setting/wapi-setting.schema.json"),"/db/wapi-setting/wapi-setting.schema.json");l.WapiSettingTable=$n;u.addSchema(m(Od,"/db/wapi-setting/wapi-setting.schema.optional.json"),"/db/wapi-setting/wapi-setting.schema.optional.json");l.WapiSettingTableOptional=Od;u.addSchema(m(On,"/fns/aggregate-transfers/aggregate-transfers.schema.input.json"),"/fns/aggregate-transfers/aggregate-transfers.schema.input.json");l.AggregateTransfersFnInput=On;u.addSchema(m(wn,"/fns/aggregate-transfers/aggregate-transfers.schema.output.json"),"/fns/aggregate-transfers/aggregate-transfers.schema.output.json");l.AggregateTransfersFnOutput=wn;u.addSchema(m(In,"/fns/create-access-token/create-access-token.schema.input.json"),"/fns/create-access-token/create-access-token.schema.input.json");l.CreateAccessTokenFnInput=In;u.addSchema(m(jn,"/fns/create-access-token/create-access-token.schema.output.json"),"/fns/create-access-token/create-access-token.schema.output.json");l.CreateAccessTokenFnOutput=jn;u.addSchema(m(vn,"/fns/create-contract/create-contract.schema.input.json"),"/fns/create-contract/create-contract.schema.input.json");l.CreateContractFnInput=vn;u.addSchema(m(kn,"/fns/create-contract/create-contract.schema.output.json"),"/fns/create-contract/create-contract.schema.output.json");l.CreateContractFnOutput=kn;u.addSchema(m(Sn,"/fns/create-deposit/create-deposit.schema.input.json"),"/fns/create-deposit/create-deposit.schema.input.json");l.CreateDepositFnInput=Sn;u.addSchema(m(Cn,"/fns/create-deposit/create-deposit.schema.output.json"),"/fns/create-deposit/create-deposit.schema.output.json");l.CreateDepositFnOutput=Cn;u.addSchema(m(Pn,"/fns/create-exchange/create-exchange.schema.input.json"),"/fns/create-exchange/create-exchange.schema.input.json");l.CreateExchangeFnInput=Pn;u.addSchema(m(Gn,"/fns/create-exchange/create-exchange.schema.output.json"),"/fns/create-exchange/create-exchange.schema.output.json");l.CreateExchangeFnOutput=Gn;u.addSchema(m(Dn,"/fns/create-token/create-token.schema.input.json"),"/fns/create-token/create-token.schema.input.json");l.CreateTokenFnInput=Dn;u.addSchema(m(En,"/fns/create-token/create-token.schema.output.json"),"/fns/create-token/create-token.schema.output.json");l.CreateTokenFnOutput=En;u.addSchema(m(Mn,"/fns/create-transfer/create-transfer.schema.input.json"),"/fns/create-transfer/create-transfer.schema.input.json");l.CreateTransferFnInput=Mn;u.addSchema(m(Rn,"/fns/create-transfer/create-transfer.schema.output.json"),"/fns/create-transfer/create-transfer.schema.output.json");l.CreateTransferFnOutput=Rn;u.addSchema(m(Wn,"/fns/create-transfer-group/create-transfer-group.schema.input.json"),"/fns/create-transfer-group/create-transfer-group.schema.input.json");l.CreateTransferGroupFnInput=Wn;u.addSchema(m(An,"/fns/create-transfer-group/create-transfer-group.schema.output.json"),"/fns/create-transfer-group/create-transfer-group.schema.output.json");l.CreateTransferGroupFnOutput=An;u.addSchema(m(Nn,"/fns/create-transfers/create-transfers.schema.input.json"),"/fns/create-transfers/create-transfers.schema.input.json");l.CreateTransfersFnInput=Nn;u.addSchema(m(Un,"/fns/create-transfers/create-transfers.schema.output.json"),"/fns/create-transfers/create-transfers.schema.output.json");l.CreateTransfersFnOutput=Un;u.addSchema(m(qn,"/fns/create-wallet/create-wallet.schema.input.json"),"/fns/create-wallet/create-wallet.schema.input.json");l.CreateWalletFnInput=qn;u.addSchema(m(Bn,"/fns/create-wallet/create-wallet.schema.output.json"),"/fns/create-wallet/create-wallet.schema.output.json");l.CreateWalletFnOutput=Bn;u.addSchema(m(Ln,"/fns/create-withdrawal/create-withdrawal.schema.input.json"),"/fns/create-withdrawal/create-withdrawal.schema.input.json");l.CreateWithdrawalFnInput=Ln;u.addSchema(m(Vn,"/fns/create-withdrawal/create-withdrawal.schema.output.json"),"/fns/create-withdrawal/create-withdrawal.schema.output.json");l.CreateWithdrawalFnOutput=Vn;u.addSchema(m(Hn,"/fns/find-balances/find-balances.schema.input.json"),"/fns/find-balances/find-balances.schema.input.json");l.FindBalancesFnInput=Hn;u.addSchema(m(zn,"/fns/find-balances/find-balances.schema.output.json"),"/fns/find-balances/find-balances.schema.output.json");l.FindBalancesFnOutput=zn;u.addSchema(m(Kn,"/fns/find-tokens/find-tokens.schema.input.json"),"/fns/find-tokens/find-tokens.schema.input.json");l.FindTokensFnInput=Kn;u.addSchema(m(Qn,"/fns/find-tokens/find-tokens.schema.output.json"),"/fns/find-tokens/find-tokens.schema.output.json");l.FindTokensFnOutput=Qn;u.addSchema(m(Jn,"/fns/find-transfer-groups/find-transfer-groups.schema.input.json"),"/fns/find-transfer-groups/find-transfer-groups.schema.input.json");l.FindTransferGroupsFnInput=Jn;u.addSchema(m(Xn,"/fns/find-transfer-groups/find-transfer-groups.schema.output.json"),"/fns/find-transfer-groups/find-transfer-groups.schema.output.json");l.FindTransferGroupsFnOutput=Xn;u.addSchema(m(Yn,"/fns/find-transfers/find-transfers.schema.input.json"),"/fns/find-transfers/find-transfers.schema.input.json");l.FindTransfersFnInput=Yn;u.addSchema(m(Zn,"/fns/find-transfers/find-transfers.schema.output.json"),"/fns/find-transfers/find-transfers.schema.output.json");l.FindTransfersFnOutput=Zn;u.addSchema(m(ea,"/fns/find-wallets/find-wallets.schema.input.json"),"/fns/find-wallets/find-wallets.schema.input.json");l.FindWalletsFnInput=ea;u.addSchema(m(ta,"/fns/find-wallets/find-wallets.schema.output.json"),"/fns/find-wallets/find-wallets.schema.output.json");l.FindWalletsFnOutput=ta;u.addSchema(m(ra,"/fns/fn-consts.schema.json"),"/fns/fn-consts.schema.json");l.FnConsts=ra;u.addSchema(m(na,"/fns/get-balance/get-balance.schema.input.json"),"/fns/get-balance/get-balance.schema.input.json");l.GetBalanceFnInput=na;u.addSchema(m(aa,"/fns/get-balance/get-balance.schema.output.json"),"/fns/get-balance/get-balance.schema.output.json");l.GetBalanceFnOutput=aa;u.addSchema(m(sa,"/fns/get-balance-history/get-balance-history.schema.input.json"),"/fns/get-balance-history/get-balance-history.schema.input.json");l.GetBalanceHistoryFnInput=sa;u.addSchema(m(ia,"/fns/get-balance-history/get-balance-history.schema.output.json"),"/fns/get-balance-history/get-balance-history.schema.output.json");l.GetBalanceHistoryFnOutput=ia;u.addSchema(m(oa,"/fns/get-flags/get-flags.schema.input.json"),"/fns/get-flags/get-flags.schema.input.json");l.GetFlagsFnInput=oa;u.addSchema(m(pa,"/fns/get-flags/get-flags.schema.output.json"),"/fns/get-flags/get-flags.schema.output.json");l.GetFlagsFnOutput=pa;u.addSchema(m(da,"/fns/get-statistics/get-statistics.schema.input.json"),"/fns/get-statistics/get-statistics.schema.input.json");l.GetStatisticsFnInput=da;u.addSchema(m(fa,"/fns/get-statistics/get-statistics.schema.output.json"),"/fns/get-statistics/get-statistics.schema.output.json");l.GetStatisticsFnOutput=fa;u.addSchema(m(ua,"/fns/get-token/get-token.schema.input.json"),"/fns/get-token/get-token.schema.input.json");l.GetTokenFnInput=ua;u.addSchema(m(la,"/fns/get-token/get-token.schema.output.json"),"/fns/get-token/get-token.schema.output.json");l.GetTokenFnOutput=la;u.addSchema(m(ca,"/fns/get-transfer/get-transfer.schema.input.json"),"/fns/get-transfer/get-transfer.schema.input.json");l.GetTransferFnInput=ca;u.addSchema(m(ma,"/fns/get-transfer/get-transfer.schema.output.json"),"/fns/get-transfer/get-transfer.schema.output.json");l.GetTransferFnOutput=ma;u.addSchema(m(ha,"/fns/get-transfer-group/get-transfer-group.schema.input.json"),"/fns/get-transfer-group/get-transfer-group.schema.input.json");l.GetTransferGroupFnInput=ha;u.addSchema(m(_a,"/fns/get-transfer-group/get-transfer-group.schema.output.json"),"/fns/get-transfer-group/get-transfer-group.schema.output.json");l.GetTransferGroupFnOutput=_a;u.addSchema(m(ga,"/fns/get-wallet/get-wallet.schema.input.json"),"/fns/get-wallet/get-wallet.schema.input.json");l.GetWalletFnInput=ga;u.addSchema(m(Ta,"/fns/get-wallet/get-wallet.schema.output.json"),"/fns/get-wallet/get-wallet.schema.output.json");l.GetWalletFnOutput=Ta;u.addSchema(m(Bt,"/fns/import-data/import-data.schema.input.json"),"/fns/import-data/import-data.schema.input.json");l.ImportDataFnInput=Bt;var Lc=qc(Bt,"/fns/import-data/import-data.schema.input.json");u.addSchema(Lc,"/fns/import-data/import-data.schema.options.json");l.ImportDataFnOptions=Lc;var Vc=Bc(Bt,"/fns/import-data/import-data.schema.input.json");u.addSchema(Vc,"/fns/import-data/import-data.schema.chunk.json");l.ImportDataFnStreamChunk=Vc;u.addSchema(m(ya,"/fns/import-data/import-data.schema.output.json"),"/fns/import-data/import-data.schema.output.json");l.ImportDataFnOutput=ya;u.addSchema(m(ba,"/fns/reverse-transfer/reverse-transfer.schema.input.json"),"/fns/reverse-transfer/reverse-transfer.schema.input.json");l.ReverseTransferFnInput=ba;u.addSchema(m(Fa,"/fns/reverse-transfer/reverse-transfer.schema.output.json"),"/fns/reverse-transfer/reverse-transfer.schema.output.json");l.ReverseTransferFnOutput=Fa;u.addSchema(m(xa,"/fns/reverse-transfer-group/reverse-transfer-group.schema.input.json"),"/fns/reverse-transfer-group/reverse-transfer-group.schema.input.json");l.ReverseTransferGroupFnInput=xa;u.addSchema(m($a,"/fns/reverse-transfer-group/reverse-transfer-group.schema.output.json"),"/fns/reverse-transfer-group/reverse-transfer-group.schema.output.json");l.ReverseTransferGroupFnOutput=$a;u.addSchema(m(Oa,"/fns/reverse-transfers/reverse-transfers.schema.input.json"),"/fns/reverse-transfers/reverse-transfers.schema.input.json");l.ReverseTransfersFnInput=Oa;u.addSchema(m(wa,"/fns/reverse-transfers/reverse-transfers.schema.output.json"),"/fns/reverse-transfers/reverse-transfers.schema.output.json");l.ReverseTransfersFnOutput=wa;u.addSchema(m(Ia,"/fns/set-flags/set-flags.schema.input.json"),"/fns/set-flags/set-flags.schema.input.json");l.SetFlagsFnInput=Ia;u.addSchema(m(ja,"/fns/set-flags/set-flags.schema.output.json"),"/fns/set-flags/set-flags.schema.output.json");l.SetFlagsFnOutput=ja;u.addSchema(m(va,"/fns/update-token/update-token.schema.input.json"),"/fns/update-token/update-token.schema.input.json");l.UpdateTokenFnInput=va;u.addSchema(m(ka,"/fns/update-token/update-token.schema.output.json"),"/fns/update-token/update-token.schema.output.json");l.UpdateTokenFnOutput=ka;u.addSchema(m(Sa,"/fns/update-transfer/update-transfer.schema.input.json"),"/fns/update-transfer/update-transfer.schema.input.json");l.UpdateTransferFnInput=Sa;u.addSchema(m(Ca,"/fns/update-transfer/update-transfer.schema.output.json"),"/fns/update-transfer/update-transfer.schema.output.json");l.UpdateTransferFnOutput=Ca;u.addSchema(m(Pa,"/fns/update-transfer-group/update-transfer-group.schema.input.json"),"/fns/update-transfer-group/update-transfer-group.schema.input.json");l.UpdateTransferGroupFnInput=Pa;u.addSchema(m(Ga,"/fns/update-transfer-group/update-transfer-group.schema.output.json"),"/fns/update-transfer-group/update-transfer-group.schema.output.json");l.UpdateTransferGroupFnOutput=Ga;u.addSchema(m(Da,"/fns/update-transfer-groups/update-transfer-groups.schema.input.json"),"/fns/update-transfer-groups/update-transfer-groups.schema.input.json");l.UpdateTransferGroupsFnInput=Da;u.addSchema(m(Ea,"/fns/update-transfer-groups/update-transfer-groups.schema.output.json"),"/fns/update-transfer-groups/update-transfer-groups.schema.output.json");l.UpdateTransferGroupsFnOutput=Ea;u.addSchema(m(Ma,"/fns/update-transfers/update-transfers.schema.input.json"),"/fns/update-transfers/update-transfers.schema.input.json");l.UpdateTransfersFnInput=Ma;u.addSchema(m(Ra,"/fns/update-transfers/update-transfers.schema.output.json"),"/fns/update-transfers/update-transfers.schema.output.json");l.UpdateTransfersFnOutput=Ra;u.addSchema(m(Wa,"/fns/update-wallet/update-wallet.schema.input.json"),"/fns/update-wallet/update-wallet.schema.input.json");l.UpdateWalletFnInput=Wa;u.addSchema(m(Aa,"/fns/update-wallet/update-wallet.schema.output.json"),"/fns/update-wallet/update-wallet.schema.output.json");l.UpdateWalletFnOutput=Aa;u.addSchema(m(Na,"/txs/aggregate-transfer-many/aggregate-transfer-many.schema.input.json"),"/txs/aggregate-transfer-many/aggregate-transfer-many.schema.input.json");l.AggregateTransferManyTxInput=Na;u.addSchema(m(Ua,"/txs/aggregate-transfer-many/aggregate-transfer-many.schema.output.json"),"/txs/aggregate-transfer-many/aggregate-transfer-many.schema.output.json");l.AggregateTransferManyTxOutput=Ua;u.addSchema(m(qa,"/txs/authentication-check/authentication-check.schema.input.json"),"/txs/authentication-check/authentication-check.schema.input.json");l.AuthenticationCheckTxInput=qa;u.addSchema(m(Ba,"/txs/authentication-check/authentication-check.schema.output.json"),"/txs/authentication-check/authentication-check.schema.output.json");l.AuthenticationCheckTxOutput=Ba;u.addSchema(m(La,"/txs/create-access-token/create-access-token.schema.input.json"),"/txs/create-access-token/create-access-token.schema.input.json");l.CreateAccessTokenTxInput=La;u.addSchema(m(Va,"/txs/create-access-token/create-access-token.schema.output.json"),"/txs/create-access-token/create-access-token.schema.output.json");l.CreateAccessTokenTxOutput=Va;u.addSchema(m(Ha,"/txs/create-contract/create-contract.schema.input.json"),"/txs/create-contract/create-contract.schema.input.json");l.CreateContractTxInput=Ha;u.addSchema(m(za,"/txs/create-contract/create-contract.schema.output.json"),"/txs/create-contract/create-contract.schema.output.json");l.CreateContractTxOutput=za;u.addSchema(m(Ka,"/txs/create-deposit/create-deposit.schema.input.json"),"/txs/create-deposit/create-deposit.schema.input.json");l.CreateDepositTxInput=Ka;u.addSchema(m(Qa,"/txs/create-deposit/create-deposit.schema.output.json"),"/txs/create-deposit/create-deposit.schema.output.json");l.CreateDepositTxOutput=Qa;u.addSchema(m(Ja,"/txs/create-distribution/create-distribution.schema.input.json"),"/txs/create-distribution/create-distribution.schema.input.json");l.CreateDistributionTxInput=Ja;u.addSchema(m(Xa,"/txs/create-distribution/create-distribution.schema.output.json"),"/txs/create-distribution/create-distribution.schema.output.json");l.CreateDistributionTxOutput=Xa;u.addSchema(m(Ya,"/txs/create-token/create-token.schema.input.json"),"/txs/create-token/create-token.schema.input.json");l.CreateTokenTxInput=Ya;u.addSchema(m(Za,"/txs/create-token/create-token.schema.output.json"),"/txs/create-token/create-token.schema.output.json");l.CreateTokenTxOutput=Za;u.addSchema(m(es,"/txs/create-transfer/create-transfer.schema.input.json"),"/txs/create-transfer/create-transfer.schema.input.json");l.CreateTransferTxInput=es;u.addSchema(m(ts,"/txs/create-transfer/create-transfer.schema.output.json"),"/txs/create-transfer/create-transfer.schema.output.json");l.CreateTransferTxOutput=ts;u.addSchema(m(rs,"/txs/create-transfer-group/create-transfer-group.schema.input.json"),"/txs/create-transfer-group/create-transfer-group.schema.input.json");l.CreateTransferGroupTxInput=rs;u.addSchema(m(ns,"/txs/create-transfer-group/create-transfer-group.schema.output.json"),"/txs/create-transfer-group/create-transfer-group.schema.output.json");l.CreateTransferGroupTxOutput=ns;u.addSchema(m(as,"/txs/create-transfer-many/create-transfer-many.schema.input.json"),"/txs/create-transfer-many/create-transfer-many.schema.input.json");l.CreateTransferManyTxInput=as;u.addSchema(m(ss,"/txs/create-transfer-many/create-transfer-many.schema.output.json"),"/txs/create-transfer-many/create-transfer-many.schema.output.json");l.CreateTransferManyTxOutput=ss;u.addSchema(m(is,"/txs/create-wallet/create-wallet.schema.input.json"),"/txs/create-wallet/create-wallet.schema.input.json");l.CreateWalletTxInput=is;u.addSchema(m(os,"/txs/create-wallet/create-wallet.schema.output.json"),"/txs/create-wallet/create-wallet.schema.output.json");l.CreateWalletTxOutput=os;u.addSchema(m(ps,"/txs/create-withdrawal/create-withdrawal.schema.input.json"),"/txs/create-withdrawal/create-withdrawal.schema.input.json");l.CreateWithdrawalTxInput=ps;u.addSchema(m(ds,"/txs/create-withdrawal/create-withdrawal.schema.output.json"),"/txs/create-withdrawal/create-withdrawal.schema.output.json");l.CreateWithdrawalTxOutput=ds;u.addSchema(m(fs,"/txs/export-database/export-database.schema.input.json"),"/txs/export-database/export-database.schema.input.json");l.ExportDatabaseTxInput=fs;u.addSchema(m(us,"/txs/export-database/export-database.schema.output.json"),"/txs/export-database/export-database.schema.output.json");l.ExportDatabaseTxOutput=us;u.addSchema(m(ls,"/txs/find-balance-many/find-balance-many.schema.input.json"),"/txs/find-balance-many/find-balance-many.schema.input.json");l.FindBalanceManyTxInput=ls;u.addSchema(m(cs,"/txs/find-balance-many/find-balance-many.schema.output.json"),"/txs/find-balance-many/find-balance-many.schema.output.json");l.FindBalanceManyTxOutput=cs;u.addSchema(m(ms,"/txs/find-token-many/find-token-many.schema.input.json"),"/txs/find-token-many/find-token-many.schema.input.json");l.FindTokenManyTxInput=ms;u.addSchema(m(hs,"/txs/find-token-many/find-token-many.schema.output.json"),"/txs/find-token-many/find-token-many.schema.output.json");l.FindTokenManyTxOutput=hs;u.addSchema(m(_s,"/txs/find-transfer-group-many/find-transfer-group-many.schema.input.json"),"/txs/find-transfer-group-many/find-transfer-group-many.schema.input.json");l.FindTransferGroupManyTxInput=_s;u.addSchema(m(gs,"/txs/find-transfer-group-many/find-transfer-group-many.schema.output.json"),"/txs/find-transfer-group-many/find-transfer-group-many.schema.output.json");l.FindTransferGroupManyTxOutput=gs;u.addSchema(m(Ts,"/txs/find-transfer-many/find-transfer-many.schema.input.json"),"/txs/find-transfer-many/find-transfer-many.schema.input.json");l.FindTransferManyTxInput=Ts;u.addSchema(m(ys,"/txs/find-transfer-many/find-transfer-many.schema.output.json"),"/txs/find-transfer-many/find-transfer-many.schema.output.json");l.FindTransferManyTxOutput=ys;u.addSchema(m(bs,"/txs/find-wallet-many/find-wallet-many.schema.input.json"),"/txs/find-wallet-many/find-wallet-many.schema.input.json");l.FindWalletManyTxInput=bs;u.addSchema(m(Fs,"/txs/find-wallet-many/find-wallet-many.schema.output.json"),"/txs/find-wallet-many/find-wallet-many.schema.output.json");l.FindWalletManyTxOutput=Fs;u.addSchema(m(xs,"/txs/finish-transaction/finish-transaction.schema.input.json"),"/txs/finish-transaction/finish-transaction.schema.input.json");l.FinishTransactionTxInput=xs;u.addSchema(m($s,"/txs/finish-transaction/finish-transaction.schema.output.json"),"/txs/finish-transaction/finish-transaction.schema.output.json");l.FinishTransactionTxOutput=$s;u.addSchema(m(Os,"/txs/get-balance/get-balance.schema.input.json"),"/txs/get-balance/get-balance.schema.input.json");l.GetBalanceTxInput=Os;u.addSchema(m(ws,"/txs/get-balance/get-balance.schema.output.json"),"/txs/get-balance/get-balance.schema.output.json");l.GetBalanceTxOutput=ws;u.addSchema(m(Is,"/txs/get-balance-history/get-balance-history.schema.input.json"),"/txs/get-balance-history/get-balance-history.schema.input.json");l.GetBalanceHistoryTxInput=Is;u.addSchema(m(js,"/txs/get-balance-history/get-balance-history.schema.output.json"),"/txs/get-balance-history/get-balance-history.schema.output.json");l.GetBalanceHistoryTxOutput=js;u.addSchema(m(vs,"/txs/get-database-export-progress/get-database-export-progress.schema.input.json"),"/txs/get-database-export-progress/get-database-export-progress.schema.input.json");l.GetDatabaseExportProgressTxInput=vs;u.addSchema(m(ks,"/txs/get-database-export-progress/get-database-export-progress.schema.output.json"),"/txs/get-database-export-progress/get-database-export-progress.schema.output.json");l.GetDatabaseExportProgressTxOutput=ks;u.addSchema(m(Ss,"/txs/get-database-import-progress/get-database-import-progress.schema.input.json"),"/txs/get-database-import-progress/get-database-import-progress.schema.input.json");l.GetDatabaseImportProgressTxInput=Ss;u.addSchema(m(Cs,"/txs/get-database-import-progress/get-database-import-progress.schema.output.json"),"/txs/get-database-import-progress/get-database-import-progress.schema.output.json");l.GetDatabaseImportProgressTxOutput=Cs;u.addSchema(m(Ps,"/txs/get-flags/get-flags.schema.input.json"),"/txs/get-flags/get-flags.schema.input.json");l.GetFlagsTxInput=Ps;u.addSchema(m(Gs,"/txs/get-flags/get-flags.schema.output.json"),"/txs/get-flags/get-flags.schema.output.json");l.GetFlagsTxOutput=Gs;u.addSchema(m(Ds,"/txs/get-statistics/get-statistics.schema.input.json"),"/txs/get-statistics/get-statistics.schema.input.json");l.GetStatisticsTxInput=Ds;u.addSchema(m(Es,"/txs/get-statistics/get-statistics.schema.output.json"),"/txs/get-statistics/get-statistics.schema.output.json");l.GetStatisticsTxOutput=Es;u.addSchema(m(Ms,"/txs/get-token/get-token.schema.input.json"),"/txs/get-token/get-token.schema.input.json");l.GetTokenTxInput=Ms;u.addSchema(m(Rs,"/txs/get-token/get-token.schema.output.json"),"/txs/get-token/get-token.schema.output.json");l.GetTokenTxOutput=Rs;u.addSchema(m(Ws,"/txs/get-token-many/get-token-many.schema.input.json"),"/txs/get-token-many/get-token-many.schema.input.json");l.GetTokenManyTxInput=Ws;u.addSchema(m(As,"/txs/get-token-many/get-token-many.schema.output.json"),"/txs/get-token-many/get-token-many.schema.output.json");l.GetTokenManyTxOutput=As;u.addSchema(m(Ns,"/txs/get-transfer/get-transfer.schema.input.json"),"/txs/get-transfer/get-transfer.schema.input.json");l.GetTransferTxInput=Ns;u.addSchema(m(Us,"/txs/get-transfer/get-transfer.schema.output.json"),"/txs/get-transfer/get-transfer.schema.output.json");l.GetTransferTxOutput=Us;u.addSchema(m(qs,"/txs/get-transfer-group/get-transfer-group.schema.input.json"),"/txs/get-transfer-group/get-transfer-group.schema.input.json");l.GetTransferGroupTxInput=qs;u.addSchema(m(Bs,"/txs/get-transfer-group/get-transfer-group.schema.output.json"),"/txs/get-transfer-group/get-transfer-group.schema.output.json");l.GetTransferGroupTxOutput=Bs;u.addSchema(m(Ls,"/txs/get-wallet/get-wallet.schema.input.json"),"/txs/get-wallet/get-wallet.schema.input.json");l.GetWalletTxInput=Ls;u.addSchema(m(Vs,"/txs/get-wallet/get-wallet.schema.output.json"),"/txs/get-wallet/get-wallet.schema.output.json");l.GetWalletTxOutput=Vs;u.addSchema(m(Hs,"/txs/get-wallet-many/get-wallet-many.schema.input.json"),"/txs/get-wallet-many/get-wallet-many.schema.input.json");l.GetWalletManyTxInput=Hs;u.addSchema(m(zs,"/txs/get-wallet-many/get-wallet-many.schema.output.json"),"/txs/get-wallet-many/get-wallet-many.schema.output.json");l.GetWalletManyTxOutput=zs;u.addSchema(m(Lt,"/txs/import-actions/import-actions.schema.input.json"),"/txs/import-actions/import-actions.schema.input.json");l.ImportActionsTxInput=Lt;var Hc=qc(Lt,"/txs/import-actions/import-actions.schema.input.json");u.addSchema(Hc,"/txs/import-actions/import-actions.schema.options.json");l.ImportActionsTxOptions=Hc;var zc=Bc(Lt,"/txs/import-actions/import-actions.schema.input.json");u.addSchema(zc,"/txs/import-actions/import-actions.schema.chunk.json");l.ImportActionsTxStreamChunk=zc;u.addSchema(m(Ks,"/txs/import-actions/import-actions.schema.output.json"),"/txs/import-actions/import-actions.schema.output.json");l.ImportActionsTxOutput=Ks;u.addSchema(m(Qs,"/txs/import-database/import-database.schema.input.json"),"/txs/import-database/import-database.schema.input.json");l.ImportDatabaseTxInput=Qs;u.addSchema(m(Js,"/txs/import-database/import-database.schema.output.json"),"/txs/import-database/import-database.schema.output.json");l.ImportDatabaseTxOutput=Js;u.addSchema(m(Xs,"/txs/list-database-exports/list-database-exports.schema.input.json"),"/txs/list-database-exports/list-database-exports.schema.input.json");l.ListDatabaseExportsTxInput=Xs;u.addSchema(m(Ys,"/txs/list-database-exports/list-database-exports.schema.output.json"),"/txs/list-database-exports/list-database-exports.schema.output.json");l.ListDatabaseExportsTxOutput=Ys;u.addSchema(m(Zs,"/txs/query/query.schema.input.json"),"/txs/query/query.schema.input.json");l.QueryTxInput=Zs;u.addSchema(m(ei,"/txs/query/query.schema.output.json"),"/txs/query/query.schema.output.json");l.QueryTxOutput=ei;u.addSchema(m(ti,"/txs/query-logs/query-logs.schema.input.json"),"/txs/query-logs/query-logs.schema.input.json");l.QueryLogsTxInput=ti;u.addSchema(m(ri,"/txs/query-logs/query-logs.schema.output.json"),"/txs/query-logs/query-logs.schema.output.json");l.QueryLogsTxOutput=ri;u.addSchema(m(ni,"/txs/reset-database/reset-database.schema.input.json"),"/txs/reset-database/reset-database.schema.input.json");l.ResetDatabaseTxInput=ni;u.addSchema(m(ai,"/txs/reset-database/reset-database.schema.output.json"),"/txs/reset-database/reset-database.schema.output.json");l.ResetDatabaseTxOutput=ai;u.addSchema(m(si,"/txs/reverse-transfer/reverse-transfer.schema.input.json"),"/txs/reverse-transfer/reverse-transfer.schema.input.json");l.ReverseTransferTxInput=si;u.addSchema(m(ii,"/txs/reverse-transfer/reverse-transfer.schema.output.json"),"/txs/reverse-transfer/reverse-transfer.schema.output.json");l.ReverseTransferTxOutput=ii;u.addSchema(m(oi,"/txs/reverse-transfer-group/reverse-transfer-group.schema.input.json"),"/txs/reverse-transfer-group/reverse-transfer-group.schema.input.json");l.ReverseTransferGroupTxInput=oi;u.addSchema(m(pi,"/txs/reverse-transfer-group/reverse-transfer-group.schema.output.json"),"/txs/reverse-transfer-group/reverse-transfer-group.schema.output.json");l.ReverseTransferGroupTxOutput=pi;u.addSchema(m(di,"/txs/reverse-transfer-group-many/reverse-transfer-group-many.schema.input.json"),"/txs/reverse-transfer-group-many/reverse-transfer-group-many.schema.input.json");l.ReverseTransferGroupManyTxInput=di;u.addSchema(m(fi,"/txs/reverse-transfer-group-many/reverse-transfer-group-many.schema.output.json"),"/txs/reverse-transfer-group-many/reverse-transfer-group-many.schema.output.json");l.ReverseTransferGroupManyTxOutput=fi;u.addSchema(m(ui,"/txs/reverse-transfer-many/reverse-transfer-many.schema.input.json"),"/txs/reverse-transfer-many/reverse-transfer-many.schema.input.json");l.ReverseTransferManyTxInput=ui;u.addSchema(m(li,"/txs/reverse-transfer-many/reverse-transfer-many.schema.output.json"),"/txs/reverse-transfer-many/reverse-transfer-many.schema.output.json");l.ReverseTransferManyTxOutput=li;u.addSchema(m(ci,"/txs/set-flags/set-flags.schema.input.json"),"/txs/set-flags/set-flags.schema.input.json");l.SetFlagsTxInput=ci;u.addSchema(m(mi,"/txs/set-flags/set-flags.schema.output.json"),"/txs/set-flags/set-flags.schema.output.json");l.SetFlagsTxOutput=mi;u.addSchema(m(hi,"/txs/start-transaction/start-transaction.schema.input.json"),"/txs/start-transaction/start-transaction.schema.input.json");l.StartTransactionTxInput=hi;u.addSchema(m(_i,"/txs/start-transaction/start-transaction.schema.output.json"),"/txs/start-transaction/start-transaction.schema.output.json");l.StartTransactionTxOutput=_i;u.addSchema(m(gi,"/txs/tx-consts.schema.json"),"/txs/tx-consts.schema.json");l.TxConsts=gi;u.addSchema(m(Ti,"/txs/update-token/update-token.schema.input.json"),"/txs/update-token/update-token.schema.input.json");l.UpdateTokenTxInput=Ti;u.addSchema(m(yi,"/txs/update-token/update-token.schema.output.json"),"/txs/update-token/update-token.schema.output.json");l.UpdateTokenTxOutput=yi;u.addSchema(m(bi,"/txs/update-transfer/update-transfer.schema.input.json"),"/txs/update-transfer/update-transfer.schema.input.json");l.UpdateTransferTxInput=bi;u.addSchema(m(Fi,"/txs/update-transfer/update-transfer.schema.output.json"),"/txs/update-transfer/update-transfer.schema.output.json");l.UpdateTransferTxOutput=Fi;u.addSchema(m(xi,"/txs/update-transfer-group/update-transfer-group.schema.input.json"),"/txs/update-transfer-group/update-transfer-group.schema.input.json");l.UpdateTransferGroupTxInput=xi;u.addSchema(m($i,"/txs/update-transfer-group/update-transfer-group.schema.output.json"),"/txs/update-transfer-group/update-transfer-group.schema.output.json");l.UpdateTransferGroupTxOutput=$i;u.addSchema(m(Oi,"/txs/update-transfer-group-many/update-transfer-group-many.schema.input.json"),"/txs/update-transfer-group-many/update-transfer-group-many.schema.input.json");l.UpdateTransferGroupManyTxInput=Oi;u.addSchema(m(wi,"/txs/update-transfer-group-many/update-transfer-group-many.schema.output.json"),"/txs/update-transfer-group-many/update-transfer-group-many.schema.output.json");l.UpdateTransferGroupManyTxOutput=wi;u.addSchema(m(Ii,"/txs/update-transfer-many/update-transfer-many.schema.input.json"),"/txs/update-transfer-many/update-transfer-many.schema.input.json");l.UpdateTransferManyTxInput=Ii;u.addSchema(m(ji,"/txs/update-transfer-many/update-transfer-many.schema.output.json"),"/txs/update-transfer-many/update-transfer-many.schema.output.json");l.UpdateTransferManyTxOutput=ji;u.addSchema(m(vi,"/txs/update-wallet/update-wallet.schema.input.json"),"/txs/update-wallet/update-wallet.schema.input.json");l.UpdateWalletTxInput=vi;u.addSchema(m(ki,"/txs/update-wallet/update-wallet.schema.output.json"),"/txs/update-wallet/update-wallet.schema.output.json");l.UpdateWalletTxOutput=ki;var U=(c=>(c.JSONRPCRequest="JSONRPCRequest",c.JSONRPCResponse="JSONRPCResponse",c.ClientOptions="ClientOptions",c.Consts="Consts",c.TokenTableInput="TokenTableInput",c.TokenTable="TokenTable",c.TokenTableOptional="TokenTableOptional",c.TransferTableInput="TransferTableInput",c.TransferTable="TransferTable",c.TransferTableOptional="TransferTableOptional",c.TransferGroupTableInput="TransferGroupTableInput",c.TransferGroupTable="TransferGroupTable",c.TransferGroupTableOptional="TransferGroupTableOptional",c.TransferLogTableInput="TransferLogTableInput",c.TransferLogTable="TransferLogTable",c.TransferLogTableOptional="TransferLogTableOptional",c.WalletTableInput="WalletTableInput",c.WalletTable="WalletTable",c.WalletTableOptional="WalletTableOptional",c.WalletTokenSettingTableInput="WalletTokenSettingTableInput",c.WalletTokenSettingTable="WalletTokenSettingTable",c.WalletTokenSettingTableOptional="WalletTokenSettingTableOptional",c.WapiSettingTableInput="WapiSettingTableInput",c.WapiSettingTable="WapiSettingTable",c.WapiSettingTableOptional="WapiSettingTableOptional",c.AggregateTransfersFnInput="AggregateTransfersFnInput",c.AggregateTransfersFnOutput="AggregateTransfersFnOutput",c.CreateAccessTokenFnInput="CreateAccessTokenFnInput",c.CreateAccessTokenFnOutput="CreateAccessTokenFnOutput",c.CreateContractFnInput="CreateContractFnInput",c.CreateContractFnOutput="CreateContractFnOutput",c.CreateDepositFnInput="CreateDepositFnInput",c.CreateDepositFnOutput="CreateDepositFnOutput",c.CreateExchangeFnInput="CreateExchangeFnInput",c.CreateExchangeFnOutput="CreateExchangeFnOutput",c.CreateTokenFnInput="CreateTokenFnInput",c.CreateTokenFnOutput="CreateTokenFnOutput",c.CreateTransferFnInput="CreateTransferFnInput",c.CreateTransferFnOutput="CreateTransferFnOutput",c.CreateTransferGroupFnInput="CreateTransferGroupFnInput",c.CreateTransferGroupFnOutput="CreateTransferGroupFnOutput",c.CreateTransfersFnInput="CreateTransfersFnInput",c.CreateTransfersFnOutput="CreateTransfersFnOutput",c.CreateWalletFnInput="CreateWalletFnInput",c.CreateWalletFnOutput="CreateWalletFnOutput",c.CreateWithdrawalFnInput="CreateWithdrawalFnInput",c.CreateWithdrawalFnOutput="CreateWithdrawalFnOutput",c.FindBalancesFnInput="FindBalancesFnInput",c.FindBalancesFnOutput="FindBalancesFnOutput",c.FindTokensFnInput="FindTokensFnInput",c.FindTokensFnOutput="FindTokensFnOutput",c.FindTransferGroupsFnInput="FindTransferGroupsFnInput",c.FindTransferGroupsFnOutput="FindTransferGroupsFnOutput",c.FindTransfersFnInput="FindTransfersFnInput",c.FindTransfersFnOutput="FindTransfersFnOutput",c.FindWalletsFnInput="FindWalletsFnInput",c.FindWalletsFnOutput="FindWalletsFnOutput",c.FnConsts="FnConsts",c.GetBalanceFnInput="GetBalanceFnInput",c.GetBalanceFnOutput="GetBalanceFnOutput",c.GetBalanceHistoryFnInput="GetBalanceHistoryFnInput",c.GetBalanceHistoryFnOutput="GetBalanceHistoryFnOutput",c.GetFlagsFnInput="GetFlagsFnInput",c.GetFlagsFnOutput="GetFlagsFnOutput",c.GetStatisticsFnInput="GetStatisticsFnInput",c.GetStatisticsFnOutput="GetStatisticsFnOutput",c.GetTokenFnInput="GetTokenFnInput",c.GetTokenFnOutput="GetTokenFnOutput",c.GetTransferFnInput="GetTransferFnInput",c.GetTransferFnOutput="GetTransferFnOutput",c.GetTransferGroupFnInput="GetTransferGroupFnInput",c.GetTransferGroupFnOutput="GetTransferGroupFnOutput",c.GetWalletFnInput="GetWalletFnInput",c.GetWalletFnOutput="GetWalletFnOutput",c.ImportDataFnInput="ImportDataFnInput",c.ImportDataFnOptions="ImportDataFnOptions",c.ImportDataFnStreamChunk="ImportDataFnStreamChunk",c.ImportDataFnOutput="ImportDataFnOutput",c.ReverseTransferFnInput="ReverseTransferFnInput",c.ReverseTransferFnOutput="ReverseTransferFnOutput",c.ReverseTransferGroupFnInput="ReverseTransferGroupFnInput",c.ReverseTransferGroupFnOutput="ReverseTransferGroupFnOutput",c.ReverseTransfersFnInput="ReverseTransfersFnInput",c.ReverseTransfersFnOutput="ReverseTransfersFnOutput",c.SetFlagsFnInput="SetFlagsFnInput",c.SetFlagsFnOutput="SetFlagsFnOutput",c.UpdateTokenFnInput="UpdateTokenFnInput",c.UpdateTokenFnOutput="UpdateTokenFnOutput",c.UpdateTransferFnInput="UpdateTransferFnInput",c.UpdateTransferFnOutput="UpdateTransferFnOutput",c.UpdateTransferGroupFnInput="UpdateTransferGroupFnInput",c.UpdateTransferGroupFnOutput="UpdateTransferGroupFnOutput",c.UpdateTransferGroupsFnInput="UpdateTransferGroupsFnInput",c.UpdateTransferGroupsFnOutput="UpdateTransferGroupsFnOutput",c.UpdateTransfersFnInput="UpdateTransfersFnInput",c.UpdateTransfersFnOutput="UpdateTransfersFnOutput",c.UpdateWalletFnInput="UpdateWalletFnInput",c.UpdateWalletFnOutput="UpdateWalletFnOutput",c.AggregateTransferManyTxInput="AggregateTransferManyTxInput",c.AggregateTransferManyTxOutput="AggregateTransferManyTxOutput",c.AuthenticationCheckTxInput="AuthenticationCheckTxInput",c.AuthenticationCheckTxOutput="AuthenticationCheckTxOutput",c.CreateAccessTokenTxInput="CreateAccessTokenTxInput",c.CreateAccessTokenTxOutput="CreateAccessTokenTxOutput",c.CreateContractTxInput="CreateContractTxInput",c.CreateContractTxOutput="CreateContractTxOutput",c.CreateDepositTxInput="CreateDepositTxInput",c.CreateDepositTxOutput="CreateDepositTxOutput",c.CreateDistributionTxInput="CreateDistributionTxInput",c.CreateDistributionTxOutput="CreateDistributionTxOutput",c.CreateTokenTxInput="CreateTokenTxInput",c.CreateTokenTxOutput="CreateTokenTxOutput",c.CreateTransferTxInput="CreateTransferTxInput",c.CreateTransferTxOutput="CreateTransferTxOutput",c.CreateTransferGroupTxInput="CreateTransferGroupTxInput",c.CreateTransferGroupTxOutput="CreateTransferGroupTxOutput",c.CreateTransferManyTxInput="CreateTransferManyTxInput",c.CreateTransferManyTxOutput="CreateTransferManyTxOutput",c.CreateWalletTxInput="CreateWalletTxInput",c.CreateWalletTxOutput="CreateWalletTxOutput",c.CreateWithdrawalTxInput="CreateWithdrawalTxInput",c.CreateWithdrawalTxOutput="CreateWithdrawalTxOutput",c.ExportDatabaseTxInput="ExportDatabaseTxInput",c.ExportDatabaseTxOutput="ExportDatabaseTxOutput",c.FindBalanceManyTxInput="FindBalanceManyTxInput",c.FindBalanceManyTxOutput="FindBalanceManyTxOutput",c.FindTokenManyTxInput="FindTokenManyTxInput",c.FindTokenManyTxOutput="FindTokenManyTxOutput",c.FindTransferGroupManyTxInput="FindTransferGroupManyTxInput",c.FindTransferGroupManyTxOutput="FindTransferGroupManyTxOutput",c.FindTransferManyTxInput="FindTransferManyTxInput",c.FindTransferManyTxOutput="FindTransferManyTxOutput",c.FindWalletManyTxInput="FindWalletManyTxInput",c.FindWalletManyTxOutput="FindWalletManyTxOutput",c.FinishTransactionTxInput="FinishTransactionTxInput",c.FinishTransactionTxOutput="FinishTransactionTxOutput",c.GetBalanceTxInput="GetBalanceTxInput",c.GetBalanceTxOutput="GetBalanceTxOutput",c.GetBalanceHistoryTxInput="GetBalanceHistoryTxInput",c.GetBalanceHistoryTxOutput="GetBalanceHistoryTxOutput",c.GetDatabaseExportProgressTxInput="GetDatabaseExportProgressTxInput",c.GetDatabaseExportProgressTxOutput="GetDatabaseExportProgressTxOutput",c.GetDatabaseImportProgressTxInput="GetDatabaseImportProgressTxInput",c.GetDatabaseImportProgressTxOutput="GetDatabaseImportProgressTxOutput",c.GetFlagsTxInput="GetFlagsTxInput",c.GetFlagsTxOutput="GetFlagsTxOutput",c.GetStatisticsTxInput="GetStatisticsTxInput",c.GetStatisticsTxOutput="GetStatisticsTxOutput",c.GetTokenTxInput="GetTokenTxInput",c.GetTokenTxOutput="GetTokenTxOutput",c.GetTokenManyTxInput="GetTokenManyTxInput",c.GetTokenManyTxOutput="GetTokenManyTxOutput",c.GetTransferTxInput="GetTransferTxInput",c.GetTransferTxOutput="GetTransferTxOutput",c.GetTransferGroupTxInput="GetTransferGroupTxInput",c.GetTransferGroupTxOutput="GetTransferGroupTxOutput",c.GetWalletTxInput="GetWalletTxInput",c.GetWalletTxOutput="GetWalletTxOutput",c.GetWalletManyTxInput="GetWalletManyTxInput",c.GetWalletManyTxOutput="GetWalletManyTxOutput",c.ImportActionsTxInput="ImportActionsTxInput",c.ImportActionsTxOptions="ImportActionsTxOptions",c.ImportActionsTxStreamChunk="ImportActionsTxStreamChunk",c.ImportActionsTxOutput="ImportActionsTxOutput",c.ImportDatabaseTxInput="ImportDatabaseTxInput",c.ImportDatabaseTxOutput="ImportDatabaseTxOutput",c.ListDatabaseExportsTxInput="ListDatabaseExportsTxInput",c.ListDatabaseExportsTxOutput="ListDatabaseExportsTxOutput",c.QueryTxInput="QueryTxInput",c.QueryTxOutput="QueryTxOutput",c.QueryLogsTxInput="QueryLogsTxInput",c.QueryLogsTxOutput="QueryLogsTxOutput",c.ResetDatabaseTxInput="ResetDatabaseTxInput",c.ResetDatabaseTxOutput="ResetDatabaseTxOutput",c.ReverseTransferTxInput="ReverseTransferTxInput",c.ReverseTransferTxOutput="ReverseTransferTxOutput",c.ReverseTransferGroupTxInput="ReverseTransferGroupTxInput",c.ReverseTransferGroupTxOutput="ReverseTransferGroupTxOutput",c.ReverseTransferGroupManyTxInput="ReverseTransferGroupManyTxInput",c.ReverseTransferGroupManyTxOutput="ReverseTransferGroupManyTxOutput",c.ReverseTransferManyTxInput="ReverseTransferManyTxInput",c.ReverseTransferManyTxOutput="ReverseTransferManyTxOutput",c.SetFlagsTxInput="SetFlagsTxInput",c.SetFlagsTxOutput="SetFlagsTxOutput",c.StartTransactionTxInput="StartTransactionTxInput",c.StartTransactionTxOutput="StartTransactionTxOutput",c.TxConsts="TxConsts",c.UpdateTokenTxInput="UpdateTokenTxInput",c.UpdateTokenTxOutput="UpdateTokenTxOutput",c.UpdateTransferTxInput="UpdateTransferTxInput",c.UpdateTransferTxOutput="UpdateTransferTxOutput",c.UpdateTransferGroupTxInput="UpdateTransferGroupTxInput",c.UpdateTransferGroupTxOutput="UpdateTransferGroupTxOutput",c.UpdateTransferGroupManyTxInput="UpdateTransferGroupManyTxInput",c.UpdateTransferGroupManyTxOutput="UpdateTransferGroupManyTxOutput",c.UpdateTransferManyTxInput="UpdateTransferManyTxInput",c.UpdateTransferManyTxOutput="UpdateTransferManyTxOutput",c.UpdateWalletTxInput="UpdateWalletTxInput",c.UpdateWalletTxOutput="UpdateWalletTxOutput",c))(U||{}),Si={ajv:u,createValidator(r){let e=u.compile(r);return Ac(e)},getValidator(r){let e=u.getSchema(r);return Ac(e)},getSchema(r){return l[r]},Schemas:l,SchemaNames:U},PD=Si.createValidator,y=Si.getValidator;var Ci=(i=>(i.year="year",i.month="month",i.week="week",i.day="day",i.hour="hour",i.minute="minute",i))(Ci||{}),Id=(i=>(i.count="count",i.countDistinct="countDistinct",i.sum="sum",i.average="average",i.min="min",i.max="max",i))(Id||{}),jd=(a=>(a.keep="keep",a.random="random",a.largest="largest",a.target="target",a))(jd||{}),vd=(t=>(t.replace="replace",t.extend="extend",t))(vd||{}),kd=(i=>(i.replace="replace",i.replace_create_only="replace_create_only",i.replace_cancel_only="replace_cancel_only",i.extend="extend",i.extend_create_only="extend_create_only",i.extend_cancel_only="extend_cancel_only",i))(kd||{});var S$=y("AggregateTransferManyTxInput");var C$=y("AuthenticationCheckTxInput");var P$=y("CreateAccessTokenTxInput");var G$=y("CreateContractTxInput");var D$=y("CreateDepositTxInput");var E$=y("CreateDistributionTxInput");var M$=y("CreateTokenTxInput");var R$=y("CreateTransferTxInput");var W$=y("CreateTransferGroupTxInput");var A$=y("CreateTransferManyTxInput");var N$=y("CreateWalletTxInput");var U$=y("CreateWithdrawalTxInput");var q$=y("ExportDatabaseTxInput");var B$=y("FindBalanceManyTxInput");var L$=y("FindTokenManyTxInput");var V$=y("FindTransferGroupManyTxInput");var H$=y("FindTransferManyTxInput");var z$=y("FindWalletManyTxInput");var K$=y("FinishTransactionTxInput");var Q$=y("GetBalanceTxInput");var J$=y("GetBalanceHistoryTxInput");var X$=y("GetDatabaseExportProgressTxInput");var Y$=y("GetDatabaseImportProgressTxInput");var Z$=y("GetFlagsTxInput");var eO=y("GetStatisticsTxInput");var tO=y("GetTokenTxInput");var rO=y("GetTokenManyTxInput");var nO=y("GetTransferTxInput");var aO=y("GetTransferGroupTxInput");var sO=y("GetWalletTxInput");var iO=y("GetWalletManyTxInput");var oO=y("ImportActionsTxInput");var pO=y("ImportDatabaseTxInput");var dO=y("ListDatabaseExportsTxInput");var fO=y("QueryTxInput");var uO=y("QueryLogsTxInput");var lO=y("ResetDatabaseTxInput");var cO=y("ReverseTransferTxInput");var mO=y("ReverseTransferGroupTxInput");var hO=y("ReverseTransferGroupManyTxInput");var _O=y("ReverseTransferManyTxInput");var gO=y("SetFlagsTxInput");var TO=y("StartTransactionTxInput");var yO=y("UpdateTokenTxInput");var bO=y("UpdateTransferTxInput");var FO=y("UpdateTransferGroupTxInput");var xO=y("UpdateTransferGroupManyTxInput");var $O=y("UpdateTransferManyTxInput");var OO=y("UpdateWalletTxInput"),Sd={aggregateTransferMany:S$,authenticationCheck:C$,createAccessToken:P$,createContract:G$,createDeposit:D$,createDistribution:E$,createToken:M$,createTransfer:R$,createTransferGroup:W$,createTransferMany:A$,createWallet:N$,createWithdrawal:U$,exportDatabase:q$,findBalanceMany:B$,findTokenMany:L$,findTransferGroupMany:V$,findTransferMany:H$,findWalletMany:z$,finishTransaction:K$,getBalance:Q$,getBalanceHistory:J$,getDatabaseExportProgress:X$,getDatabaseImportProgress:Y$,getFlags:Z$,getStatistics:eO,getToken:tO,getTokenMany:rO,getTransfer:nO,getTransferGroup:aO,getWallet:sO,getWalletMany:iO,importActions:oO,importDatabase:pO,listDatabaseExports:dO,query:fO,queryLogs:uO,resetDatabase:lO,reverseTransfer:cO,reverseTransferGroup:mO,reverseTransferGroupMany:hO,reverseTransferMany:_O,setFlags:gO,startTransaction:TO,updateToken:yO,updateTransfer:bO,updateTransferGroup:FO,updateTransferGroupMany:xO,updateTransferMany:$O,updateWallet:OO},Cd=(E=>(E.aggregateTransferMany="aggregateTransferMany",E.authenticationCheck="authenticationCheck",E.createAccessToken="createAccessToken",E.createContract="createContract",E.createDeposit="createDeposit",E.createDistribution="createDistribution",E.createToken="createToken",E.createTransfer="createTransfer",E.createTransferGroup="createTransferGroup",E.createTransferMany="createTransferMany",E.createWallet="createWallet",E.createWithdrawal="createWithdrawal",E.exportDatabase="exportDatabase",E.findBalanceMany="findBalanceMany",E.findTokenMany="findTokenMany",E.findTransferGroupMany="findTransferGroupMany",E.findTransferMany="findTransferMany",E.findWalletMany="findWalletMany",E.finishTransaction="finishTransaction",E.getBalance="getBalance",E.getBalanceHistory="getBalanceHistory",E.getDatabaseExportProgress="getDatabaseExportProgress",E.getDatabaseImportProgress="getDatabaseImportProgress",E.getFlags="getFlags",E.getStatistics="getStatistics",E.getToken="getToken",E.getTokenMany="getTokenMany",E.getTransfer="getTransfer",E.getTransferGroup="getTransferGroup",E.getWallet="getWallet",E.getWalletMany="getWalletMany",E.importActions="importActions",E.importDatabase="importDatabase",E.listDatabaseExports="listDatabaseExports",E.query="query",E.queryLogs="queryLogs",E.resetDatabase="resetDatabase",E.reverseTransfer="reverseTransfer",E.reverseTransferGroup="reverseTransferGroup",E.reverseTransferGroupMany="reverseTransferGroupMany",E.reverseTransferMany="reverseTransferMany",E.setFlags="setFlags",E.startTransaction="startTransaction",E.updateToken="updateToken",E.updateTransfer="updateTransfer",E.updateTransferGroup="updateTransferGroup",E.updateTransferGroupMany="updateTransferGroupMany",E.updateTransferMany="updateTransferMany",E.updateWallet="updateWallet",E))(Cd||{});var wO=y("ImportActionsTxInput");function Kc(r){let{error:e}=wO(r);return e===void 0}var CM=y("ImportActionsTxOutput");var PM=y("ImportActionsTxStreamChunk");var IO=y("ImportActionsTxOptions");function Qc(r){let{error:e}=IO(r);return e===void 0}var _r=class{constructor(e,t,n){this.isConnected=!1;this.hooks=new Proxy({},{set(e,t,n){if(typeof n!="function")throw new TypeError("Hooks can only be functions");return e[t]=n,!0}});this._requests=new Map;this._error=!1;this._sending=new Set;this.type=t,this._connection=e,this.connectionType=t,this.$connect=n}_setConnected(e){this.isConnected=e,this.isConnected&&this._error!==!1&&(this._error=!1),this.isConnected&&this.hooks.connected&&this.hooks.connected(this.socId),!this.isConnected&&this.hooks.disconnected&&this.hooks.disconnected()}_setErrored(e){this._error=e,this.isConnected&&this._setConnected(!1)}_send(e){throw new Error("This method must be implemented by child class")}_reconnect(){throw new Error("This method must be implemented by child class")}close(){return _e(this,null,function*(){throw new Error("This method must be implemented by child class")})}_connectionLost(){this._requests.forEach((e,t)=>{"stream"in e&&e.stream.destroy(new Sr({message:"connection lost"})),this._requests.delete(t)}),this.socId=void 0}_handleMessage(e){var o,d,g;if(this.hooks.message&&this.hooks.message(e),"method"in e){let h=e;if(h.method==="ping"){this._send({jsonrpc:"2.0",result:"pong",id:h.id});return}ie("Unexpected JSONRPCRequest",e);return}let t=e;if(this.hooks.message&&this.hooks.message(t),t.id===null){ie("Unexpected JSONRPCResponse",e);return}if(t.result==="ack"){this._sending.delete(t.id);return}let n=this._requests.get(t.id);if(!n){ie("No Request found for incoming",e);return}if("handle"in n){n.handle(t),delete n.handle;return}t.error&&"error"in n&&n.error(t.error);let a=t;if(((o=a.result)==null?void 0:o.type)==="streamPause"&&"pause"in n){n.pause();return}if(((d=a.result)==null?void 0:d.type)==="streamResume"&&"resume"in n){n.resume();return}let{stream:s,start:i}=n;if(((g=a.result)==null?void 0:g.type)==="streamChunk"){s.push(a.result);return}s.push(a),s.push(null),this._requests.delete(a.id),this.connectionType==="ws"&&this._send({jsonrpc:"2.0",method:"ack",params:Date.now()-i,id:a.id})}_sendTransaction(e,t){let{isValid:n,inputCopy:a,error:s}=Sd[e](t);if(!n)throw s;let i={jsonrpc:"2.0",method:e,params:a,id:Ct()};return this.hooks.preflight&&this.hooks.preflight(i)===!1?new mt:new mt(o=>_e(this,null,function*(){this._error&&this._reconnect(),this.isConnected||(yield this.$connect),this._requests.set(i.id,{stream:o,start:Date.now()}),this._sending.add(i.id),this._send(i)}))}_streamTransaction(e,t,n,a){let s=Date.now(),i=Ct(),o,d=({method:w,params:b})=>{if(o)return;let $={jsonrpc:"2.0",method:w,params:P({streamId:i},b),id:Ct()};this._sending.add($.id),this._send($)},g=(w,b)=>{o||(d({method:"streamError",params:{error:b}}),o=b,w.push({error:b}))},h=new Ui,T=a?h.pipe(a):h,O={jsonrpc:"2.0",method:"streamStart",params:{method:e,options:n},id:i};return this.hooks.preflight&&this.hooks.preflight(O)===!1?new Er:new Er(w=>_e(this,null,function*(){this._error&&this._reconnect(),this.isConnected||(yield this.$connect);let b=setTimeout(()=>{w.push({error:new oe({message:"INPUT_STREAM_TIMEOUT"})})},3e4);this._requests.set(O.id,{stream:w,start:s,error($){o=$,ie("stream:error()>",$)},pause(){h.pause()},resume(){h.resume()},handle($){if($.error){w.push($);return}T.on("data",I=>{if(!o){if(b&&(clearTimeout(b),b=null),!t(I)){g(w,new Re({message:"INPUT_INVALID",data:I}));return}d({method:"streamData",params:{data:I}})}}).on("error",I=>{o||(b&&(clearTimeout(b),b=null),d({method:"streamError",params:{error:I}}),w.push({error:new oe({message:"INPUT_STREAM_ERROR",data:I})}))}).on("end",()=>{b&&(clearTimeout(b),b=null),d({method:"streamEnd",params:{}})})}}),this._sending.add(O.id),this._send(O)}),h)}aggregateTransferMany(e){return this._sendTransaction("aggregateTransferMany",e)}authenticationCheck(e){return this._sendTransaction("authenticationCheck",e)}createAccessToken(e){return this._sendTransaction("createAccessToken",e)}createContract(e){return this._sendTransaction("createContract",e)}createDeposit(e){return this._sendTransaction("createDeposit",e)}createDistribution(e){return this._sendTransaction("createDistribution",e)}createToken(e){return this._sendTransaction("createToken",e)}createTransfer(e){return this._sendTransaction("createTransfer",e)}createTransferGroup(e){return this._sendTransaction("createTransferGroup",e)}createTransferMany(e){return this._sendTransaction("createTransferMany",e)}createWallet(e){return this._sendTransaction("createWallet",e)}createWithdrawal(e){return this._sendTransaction("createWithdrawal",e)}exportDatabase(e){return this._sendTransaction("exportDatabase",e)}findBalanceMany(e){return this._sendTransaction("findBalanceMany",e)}findTokenMany(e){return this._sendTransaction("findTokenMany",e)}findTransferGroupMany(e){return this._sendTransaction("findTransferGroupMany",e)}findTransferMany(e){return this._sendTransaction("findTransferMany",e)}findWalletMany(e){return this._sendTransaction("findWalletMany",e)}finishTransaction(e){return this._sendTransaction("finishTransaction",e)}getBalance(e){return this._sendTransaction("getBalance",e)}getBalanceHistory(e){return this._sendTransaction("getBalanceHistory",e)}getDatabaseExportProgress(e){return this._sendTransaction("getDatabaseExportProgress",e)}getDatabaseImportProgress(e){return this._sendTransaction("getDatabaseImportProgress",e)}getFlags(e){return this._sendTransaction("getFlags",e)}getStatistics(e){return this._sendTransaction("getStatistics",e)}getToken(e){return this._sendTransaction("getToken",e)}getTokenMany(e){return this._sendTransaction("getTokenMany",e)}getTransfer(e){return this._sendTransaction("getTransfer",e)}getTransferGroup(e){return this._sendTransaction("getTransferGroup",e)}getWallet(e){return this._sendTransaction("getWallet",e)}getWalletMany(e){return this._sendTransaction("getWalletMany",e)}importActions(e){return this._sendTransaction("importActions",e)}importActionsStream(e,t){if(e!==void 0&&!Qc(e))throw new Re({message:"INPUT_INVALID",data:e});return this._streamTransaction("importActions",Kc,e,t)}importDatabase(e){return this._sendTransaction("importDatabase",e)}listDatabaseExports(e){return this._sendTransaction("listDatabaseExports",e)}query(e){return this._sendTransaction("query",e)}queryLogs(e){return this._sendTransaction("queryLogs",e)}resetDatabase(e){return this._sendTransaction("resetDatabase",e)}reverseTransfer(e){return this._sendTransaction("reverseTransfer",e)}reverseTransferGroup(e){return this._sendTransaction("reverseTransferGroup",e)}reverseTransferGroupMany(e){return this._sendTransaction("reverseTransferGroupMany",e)}reverseTransferMany(e){return this._sendTransaction("reverseTransferMany",e)}setFlags(e){return this._sendTransaction("setFlags",e)}startTransaction(e){return this._sendTransaction("startTransaction",e)}updateToken(e){return this._sendTransaction("updateToken",e)}updateTransfer(e){return this._sendTransaction("updateTransfer",e)}updateTransferGroup(e){return this._sendTransaction("updateTransferGroup",e)}updateTransferGroupMany(e){return this._sendTransaction("updateTransferGroupMany",e)}updateTransferMany(e){return this._sendTransaction("updateTransferMany",e)}updateWallet(e){return this._sendTransaction("updateWallet",e)}};var Jc,jO=(Jc=window.WAPI_VERSION)!=null?Jc:"";function Gd(r){let e=Xc(r);return new Pd(e,r)}function Xc(r){var w;let e=Object.assign({rejectUnauthorized:(w=r.rejectUnauthorized)!=null?w:!0,clientVersion:jO},r),t=yu(e),n=new lu(...t),a,s,i=!1,o;n.onclose=d,n.onerror=g,n.onmessage=h;function d(b){if(ie(`createConnection>close(reason:${b.reason},code:${b.code},wasClean:${b.wasClean})`),b.code===4030)return T(new Pr({message:"AUTHENTICATION_FAILED",code:"AuthenticationError"}));T(new Error("WS closed"))}function g(b){ie(`createConnection>error(message:${b.message},error:${b.error},type:${b.type})`),T(b.error)}function h(b){ie(`createConnection>message(type:${b.type},data:${b.data})`);let{data:$}=b,I;try{I=JSON.parse($.toString())}catch(j){return ie("Invalid JSON response",j),T(new Error("Invalid JSON response"))}if(I.result!=="ready")return ie("Invalid first message"),T(new Error("Invalid first message - "+JSON.stringify(I)));T()}function T(b){i||(delete n.onmessage,delete n.onerror,delete n.onclose,b?(s(b),n.close()):a(o),i=!0)}let O=new Promise((b,$)=>{a=b,s=$});return{ws:n,$connect:O}}var Pd=class extends _r{constructor(t,n){super(t.ws,"ws",t.$connect);this._tryToReconnect=!0;this._config=n,this.$connect.then(a=>(this.socId=a,this._ready())).catch(a=>{this.socId||this._setErrored(a)})}_setErrored(t){super._setErrored(t),t.hasOwnProperty("code")&&t.code==="AuthenticationError"&&(this._tryToReconnect=!1)}_ready(){this._setConnected(!0),this._connection.onmessage=t=>{let{data:n,type:a}=t;if(ie(`message(type:${a},data:${n})`),a==="message"){let s=JSON.parse(n.toString());this._handleMessage(s),this._heartbeat()}},this._connection.onerror=t=>{let{message:n,error:a,type:s}=t;ie(`error(message:${n},error:${a},type:${s})`)},this._connection.onclose=t=>{let{reason:n,code:a,wasClean:s}=t;ie(`close(reason:${n},code:${a},wasClean:${s})`),this._setConnected(!1),clearTimeout(this._pingTimeout),this._connectionLost(),this._reconnect()},this._heartbeat()}_reconnect(){if(ie("reconnect(),tryToReconnect:",this._tryToReconnect),!this._tryToReconnect)return;if(this.hooks.reconnect&&!this.hooks.reconnect()){ie("reconnect hook returned false");return}let t=window.WAPI_RECONNECT_ATTEMPTS&&parseInt(window.WAPI_RECONNECT_ATTEMPTS)||10,n=window.WAPI_MAX_RECONNECT_WAIT&&parseInt(window.WAPI_MAX_RECONNECT_WAIT)||1e4;this.$connect=_e(this,null,function*(){let a;for(let s=0;s<t+1;s++)try{ie("Trying to connect, attempt:",s);let{ws:i,$connect:o}=Xc(this._config);a=yield o,this.socId=a,this._connection=i,this._ready();break}catch(i){if(i.code==="AuthenticationError"||s>t-1)throw i;yield _u(Math.min(Math.pow(1.5,s)*1e3,n))}return a})}_heartbeat(){ie("heartbeat"),clearTimeout(this._pingTimeout),this._pingTimeout=setTimeout(()=>{if(this._sending.size)return ie("pingTimeout reached, but sending.size:",this._sending.size),this._heartbeat();ie("timeout"),this._connection.close(),this._setConnected(!1),this._reconnect()},31e3)}_send(t){ie("send()",t),this._connection.send(JSON.stringify(t))}close(){return _e(this,null,function*(){return ie("close()"),this._tryToReconnect=!1,clearTimeout(this._pingTimeout),this._setConnected(!1),this._connection.close()})}};var Dd=typeof globalThis!="undefined"&&globalThis||typeof self!="undefined"&&self||typeof Dd!="undefined"&&Dd,Ed=Dd.fetch;function Rd(r){let e=vO(r);return new Md(e,r)}function vO(r){let e=r.host.replace(/^wss:/,"https:");function t(s){return _e(this,null,function*(){ie(`http_createConnection>message(body:${s})`)})}function n(s,i){return _e(this,null,function*(){let o=JSON.parse(s),g=yield(yield Ed(`${r.host}/api`,{keepalive:!0,method:"POST",headers:{Authorization:`Bearer ${i}`},body:s})).json();this.onmessage(Z(P({},g),{id:o.id}))})}let a=Ed(`${e}/api`,{method:"POST",headers:{Authorization:`Bearer ${r.jwt}`},body:JSON.stringify({jsonrpc:"2.0",method:"authenticationCheck",params:{},id:Ct()})}).then(s=>s.json()).then(s=>{if(s.error)throw new Error(s.error.message)});return{send:n,onmessage:t,$connect:a}}var Md=class extends _r{constructor(e,t){super(e,"https",e.$connect),this.jwt=t.jwt,this.$connect.then(()=>{this._ready()}).catch(n=>{this._setErrored(n)})}_send(e){ie("send()",e),this._connection.send(JSON.stringify(e),this.jwt)}_ready(){this._setConnected(!0),this._connection.onmessage=e=>_e(this,null,function*(){ie(`http_message(data:${e})`),this._handleMessage(e)})}close(){return _e(this,null,function*(){ie("close()"),this._setConnected(!1)})}_reconnect(){return _e(this,null,function*(){ie("reconnect()")})}};var Ad=class r{constructor(e){this.filter=[];this.modifierFn=e}add(e){return this.filter.push(e),this}addWhere(e,t,n,a){if(typeof t=="object"){let s={};for(let[i,o]of Object.entries(t))s[i]=this.modifierFn?this.modifierFn(i,o):o;return this.add({function:e,value:s})}if(typeof t=="function"){let s=new r(this.modifierFn);return t.call(s,s),this.add({function:e,inner:s.toJSON().filter})}if(a!==void 0)return this.add({function:e,field:t,operator:n,value:a});if(typeof n=="object")return this.add({function:e,value:{[t]:n}});if(n!==void 0){let s=this.modifierFn?this.modifierFn(t,n):n;return this.add({function:e,field:t,value:s})}throw TypeError("Invalid input")}where(e,t,n){return this.addWhere("where",e,t,n)}orWhere(e,t,n){return this.addWhere("orWhere",e,t,n)}whereIn(e,t){return this.add({function:"whereIn",field:e,value:t})}orWhereIn(e,t){return this.add({function:"orWhereIn",field:e,value:t})}whereNull(e){return this.add({function:"whereNull",field:e})}orWhereNull(e){return this.add({function:"orWhereNull",field:e})}whereNotNull(e){return this.add({function:"whereNotNull",field:e})}orWhereNotNull(e){return this.add({function:"orWhereNotNull",field:e})}whereMetadata(e,t,n){return n===void 0?this.add({function:"whereMetadata",field:e,operator:"=",value:t}):this.add({function:"whereMetadata",field:e,operator:t,value:n})}orWhereMetadata(e,t,n){return n===void 0?this.add({function:"orWhereMetadata",field:e,operator:"=",value:t}):this.add({function:"orWhereMetadata",field:e,operator:t,value:n})}whereMetadataIn(e,t){return this.add({function:"whereMetadataIn",field:e,value:t})}orWhereMetadataIn(e,t){return this.add({function:"orWhereMetadataIn",field:e,value:t})}whereMetadataNull(e){return this.add({function:"whereMetadataNull",field:e})}orWhereMetadataNull(e){return this.add({function:"orWhereMetadataNull",field:e})}whereMetadataNotNull(e){return this.add({function:"whereMetadataNotNull",field:e})}orWhereMetadataNotNull(e){return this.add({function:"orWhereMetadataNotNull",field:e})}toJSON(){return{filter:JSON.parse(JSON.stringify(this.filter))}}};function Wd(r){return r.map(e=>{if(typeof e=="string"){if(e.includes(" "))throw new TypeError("invalid order option: "+e);return{field:e,direction:"asc"}}return{field:e.column,direction:e.order,nulls:e.nulls}})}var Tr=class extends Ad{constructor({start:t,modifiers:n,optionsModifiers:a}){super(n);this.optionsObject={};this.execFn=t,this.optionsModifiers=a}start(){return this.execFn(this.toJSON())}toJSON(){return Z(P({},super.toJSON()),{options:P({},this.optionsObject)})}options(t){if(this.optionsModifiers===void 0)return this.optionsObject=P(P({},this.optionsObject),t),this;this.optionsObject=P({},this.optionsObject);for(let[n,a]of Object.entries(t))this.optionsObject[n]=this.optionsModifiers(n,a);return this}then(t,n){return this.start().then(t,n)}catch(t){return this.start().catch(t)}stream(){return this.start().stream()}},De=class extends Tr{constructor({start:e,modifiers:t,optionsModifiers:n}){super({start:a=>e(a),modifiers:t,optionsModifiers:n})}limit(e){return this.optionsObject.limit=e,this}offset(e){return this.optionsObject.offset=e,this}orderBy(e,t,n){if(!Array.isArray(e)&&typeof e!="string")throw new TypeError("invalid input");if(Array.isArray(e))return this.optionsObject.order=Wd(e),this;if(!e.includes(" "))return this.optionsObject.order=Wd([{column:e,order:t||"asc",nulls:n}]),this;let[a,s,i,o]=e.split(" ");if(s!=="asc"&&s!=="desc")throw new TypeError("invalid order");let d={column:a,order:s};if(i==="nulls"){if(!["first","last"].includes(o))throw new TypeError("invalid nulls order");d.nulls=o}return this.optionsObject.order=Wd([e]),this}select(...e){return this.optionsObject.select=e,this}deselect(...e){return this.optionsObject.deselect=e,this}};function gr(r,e){if(!e)return{function:r,alias:r};if(!e.includes(" "))return{function:r,field:e,alias:r};if(!e.includes(" as "))throw new oe({message:"Invalid Aggregator"});let[t,n]=e.split(" as ");return{function:r,field:t,alias:n||t}}var Fo=class extends Tr{constructor({start:t,modifiers:n,optionsModifiers:a}){super({start:s=>t(s),modifiers:n,optionsModifiers:a});this.aggregatorObject={aggregators:[]};this.timezoneString=""}toJSON(){return Z(P({},super.toJSON()),{aggregators:JSON.parse(JSON.stringify(this.aggregatorObject.aggregators)),groups:JSON.parse(JSON.stringify(this.aggregatorObject.groups||[]))})}timezone(t){return this.timezoneString=t,this.aggregatorObject.groups&&Array.isArray(this.aggregatorObject.groups)&&this.aggregatorObject.groups.forEach(n=>{n.type==="period"&&(n.field={period:n.field,timezone:t})}),this}groupBy(t,...n){let a={};if(typeof t!="string")throw new TypeError("expected string as input, got"+typeof t);let[s,i]=t.split(" as ");if(Ci.hasOwnProperty(s))a.type="period",a.alias=i||s,this.timezoneString?a.field={period:s,timezone:this.timezoneString}:a.field=s;else if(s.startsWith("metadata.")){let[,o]=s.split(".");a.type="metadata_field",a.field=o,a.alias=i||o}else a.type="field",a.field=s,a.alias=i||s;return this.aggregatorObject.groups?this.aggregatorObject.groups.push(a):this.aggregatorObject.groups=[a],n.length&&n.forEach(o=>this.groupBy(o)),this}count(t){return this.aggregatorObject.aggregators.push(gr("count",t)),this}distinct(t){return this.aggregatorObject.aggregators.push(gr("countDistinct",t)),this}avg(t){return this.aggregatorObject.aggregators.push(gr("average",t)),this}min(t){return this.aggregatorObject.aggregators.push(gr("min",t)),this}max(t){return this.aggregatorObject.aggregators.push(gr("max",t)),this}sum(t){return this.aggregatorObject.aggregators.push(gr("sum",t)),this}},yr=class extends Tr{constructor({start:t,modifiers:n,optionsModifiers:a}){super({start:t,modifiers:n,optionsModifiers:a});this.updateObject={}}toJSON(){return Z(P({},super.toJSON()),{update:JSON.parse(JSON.stringify(this.updateObject))})}update(t){return this.updateObject=Object.assign(this.updateObject,t),this}},xo=class extends Tr{constructor({start:t,modifiers:n,optionsModifiers:a}){super({start:t,modifiers:n,optionsModifiers:a});this.reverseModifications={}}toJSON(){return Z(P({},super.toJSON()),{reverse:JSON.parse(JSON.stringify(this.reverseModifications))})}reverse(t){return this.reverseModifications=Object.assign(this.reverseModifications,t),this}};var kO=y("AggregateTransfersFnInput");function Nd(r,e,t){let{client:n}=r;if(e===void 0)return new Fo({start(b){return n.api.aggregateTransferMany({transfer:b.filter,options:b.options,groups:b.groups,aggregators:b.aggregators})},modifiers(b,$){return["token","wallet","from_wallet","to_wallet"].includes(b)?v($):b==="transfer_group"?K($):$}});let{inputCopy:a,error:s}=C({input:e,options:t,validate:kO});if(s)throw s;let{token:i,wallet:o,from_wallet:d,to_wallet:g,transfer_group:h,status:T,metadata:O}=a,w={token:v(i),wallet:v(o),from_wallet:v(d),to_wallet:v(g),transfer_group:K(h),status:T,metadata:O};return n.api.aggregateTransferMany({transfer:w,groups:a.groups,aggregators:a.aggregators})}var SO=new Map(Object.entries({aggregateTransfers:"aggregateTransferMany",findBalances:"findBalanceMany",findTokens:"findTokenMany",findTransferGroups:"findTransferGroupMany",findTransfers:"findTransferMany",findWallets:"findWalletMany"})),CO=y("CreateAccessTokenFnInput");function Ud(r,e,t){var i;let{client:n}=r,{inputCopy:a,error:s}=C({input:e,options:t,validate:CO});if(s)throw s;return a.token&&"scopes"in a.token&&(a.token.scopes=Array.from(new Set((i=a.token)==null?void 0:i.scopes.map(o=>{var d;return(d=SO.get(o))!=null?d:o})))),n.api.createAccessToken({token:a.token,options:t})}var PO=y("CreateContractFnInput");function qd(r,e,t){let{client:n}=r,{inputCopy:a,error:s}=C({input:e,options:t,validate:PO});if(s)throw s;let i={token:{foreign:a.foreign+"",metadata:a.metadata,owner:v(a.owner),deposits:[{token:v(a.value_token),amount:a.value_amount}]}};return a.buyer&&(a.buyer.latest_control_hash&&console.warn("deprecated: latest_control_hash is deprecated and will be ignored"),i.exchange={from_wallet:v(a.buyer.wallet),amount:a.buyer.amount||a.value_amount,from_token:v(a.buyer.token||a.value_token),metadata:a.buyer.metadata}),n.api.createContract(i)}var GO=y("CreateDepositFnInput");function Bd(r,e,t){let{client:n}=r,a=at(e,"token",n.getConfig("token")),{inputCopy:s,error:i}=C({input:a,options:t,validate:GO});if(i)throw i;let o=s.token||n.getConfig("token");if(o===void 0)throw new oe({message:"INPUT_NEEDS_TOKEN",data:e});let d=s.options;delete s.options;let g=Z(P({},s),{identifier:s.identifier,transfer_group:K(s.transfer_group),token:v(o),to_wallet:v(s.wallet),type:"deposit"});return g.identifier||(g.identifier=je(g)),n.api.createTransfer({transfer:g,options:Ni(d,{return_balance:"return_to_balance",create_wallet_if_not_exists:"create_to_wallet_if_not_exists"})})}var Ld=(t=>(t.whereMetadata="whereMetadata",t.orWhereMetadata="orWhereMetadata",t))(Ld||{}),Vd=(t=>(t.where="where",t.orWhere="orWhere",t))(Vd||{}),Hd=(t=>(t.whereIn="whereIn",t.orWhereIn="orWhereIn",t))(Hd||{}),zd=(t=>(t.whereMetadataIn="whereMetadataIn",t.orWhereMetadataIn="orWhereMetadataIn",t))(zd||{}),Kd=(a=>(a.whereMetadataNull="whereMetadataNull",a.orWhereMetadataNull="orWhereMetadataNull",a.whereMetadataNotNull="whereMetadataNotNull",a.orWhereMetadataNotNull="orWhereMetadataNotNull",a))(Kd||{}),Qd=(a=>(a.whereNull="whereNull",a.orWhereNull="orWhereNull",a.whereNotNull="whereNotNull",a.orWhereNotNull="orWhereNotNull",a))(Qd||{}),Jd=(r=>(r["="]="=",r[">="]=">=",r["<="]="<=",r["<"]="<",r[">"]=">",r))(Jd||{}),Xd=(t=>(t.like="like",t.ilike="ilike",t))(Xd||{}),Yd=(t=>(t["="]="=",t[">="]=">=",t["<="]="<=",t["<"]="<",t[">"]=">",t.like="like",t.ilike="ilike",t))(Yd||{}),Zd=(a=>(a.value="value",a.share="share",a.group="group",a.contract="contract",a))(Zd||{}),ef=(t=>(t.active="active",t["dw-only"]="dw-only",t.disabled="disabled",t))(ef||{}),tf=(t=>(t.open="open",t.closed="closed",t))(tf||{}),rf=(n=>(n.pending="pending",n.finished="finished",n.cancelled="cancelled",n))(rf||{}),nf=(t=>(t.pending="pending",t.finished="finished",t))(nf||{}),af=(n=>(n.regular="regular",n.exchange="exchange",n.distribution="distribution",n))(af||{}),sf=(n=>(n.transfer="transfer",n.deposit="deposit",n.withdrawal="withdrawal",n))(sf||{}),of=(n=>(n.token="token",n.house="house",n.regular="regular",n))(of||{}),pf=(t=>(t.active="active",t.disabled="disabled",t))(pf||{}),df=(t=>(t.flag="flag",t.setting="setting",t))(df||{}),ff=(o=>(o.Token="Token",o.TransferGroup="TransferGroup",o.TransferLog="TransferLog",o.Transfer="Transfer",o.WalletTokenSetting="WalletTokenSetting",o.Wallet="Wallet",o.WapiSetting="WapiSetting",o))(ff||{});var DO=y("CreateExchangeFnInput");function uf(r,e,t){var o,d,g,h,T;let{client:n}=r,{inputCopy:a,error:s}=C({input:e,options:t,validate:DO});if(s)throw s;let i=a.options;return delete a.options,(o=a.identifier)!=null||(a.identifier=je(a)),n.api.createTransferGroup({transfer_group:{identifier:a.identifier,status:"closed",transfer_status:(d=a.status)!=null?d:"pending",metadata:a.metadata,children:[{identifier:(g=a.from_identifier)!=null?g:je(),from_wallet:v(a.from_wallet),to_wallet:v(a.to_wallet),token:v(a.from_token),type:a.from_wallet?"transfer":"deposit",amount:a.from_amount,metadata:a.metadata,force:a.force},{identifier:(h=a.to_identifier)!=null?h:je(),from_wallet:v(a.to_wallet),to_wallet:v(a.from_wallet),token:v(a.to_token),type:a.to_wallet?"transfer":"deposit",amount:(T=a.to_amount)!=null?T:a.from_amount,metadata:a.metadata,force:a.force}]},options:i})}var EO=y("CreateTokenFnInput");function lf(r,e,t){let{client:n}=r,{inputCopy:a,error:s}=C({input:e,options:t,validate:EO});if(s)throw s;let i=a.options;return delete a.options,n.api.createToken({token:Z(P({},a),{belongs_to:v(a.belongs_to)}),options:i})}var MO=y("CreateTransferFnInput");function cf(r,e,t){let{client:n}=r,a=at(e,"token",n.getConfig("token")),{inputCopy:s,error:i}=C({input:a,options:t,validate:MO});if(i)throw i;let o=Pi(s,n.getConfig("token"));return o.identifier||(o.identifier=je(o)),n.api.createTransfer({transfer:o,options:s.options})}function Pi(r,e){r.type=r.type||"transfer";let t={identifier:r.identifier,token:v(r.token||e),amount:r.amount,metadata:r.metadata,status:r.status,type:r.type,transfer_group:K(r.transfer_group),created_at:r.created_at};if(r.type==="transfer")return r.latest_control_hash&&console.warn("deprecated: latest_control_hash is deprecated"),Z(P({},t),{from_wallet:v(r.from_wallet),to_wallet:v(r.to_wallet)});if(r.type==="withdrawal")return r.latest_control_hash&&console.warn("deprecated: latest_control_hash is deprecated"),Z(P({},t),{from_wallet:v(r.wallet)});if(r.type==="deposit")return Z(P({},t),{to_wallet:v(r.wallet)})}var RO=y("CreateTransferGroupFnInput");function mf(r,e,t){let{client:n}=r,{inputCopy:a,error:s}=C({input:e,options:t,validate:RO});if(s)throw s;let i=JSON.parse(JSON.stringify(a));return delete i.options,i.children&&(i.children=i.children.map(o=>Pi(o,n.getConfig("token")))),i.identifier||(i.identifier=je(i)),n.api.createTransferGroup({transfer_group:i,options:a.options})}var WO=y("CreateTransfersFnInput");function hf(r,e,t){let{client:n}=r,{inputCopy:a,error:s}=C({input:e,options:t,validate:WO});if(s)throw s;let i=a.transfers.map(o=>Pi(o,n.getConfig("token")));for(let o of i)o.identifier||(o.identifier=je(o));return n.api.createTransferMany({transfers:i,options:a.options})}var AO=y("CreateWalletFnInput");function _f(r,e,t){let{client:n}=r,{inputCopy:a,error:s}=C({input:e,options:t,validate:AO});if(s)throw s;let i=a.options;return delete a.options,n.api.createWallet({wallet:P({},a),options:i})}var NO=y("CreateWithdrawalFnInput");function gf(r,e,t){let{client:n}=r,a=at(e,"token",n.getConfig("token")),{inputCopy:s,error:i}=C({input:a,options:t,validate:NO});if(i)throw i;let o=s.options;delete s.options,s.latest_control_hash&&(console.warn("deprecated: latest_control_hash is deprecated"),delete s.latest_control_hash);let d=s.token||n.getConfig("token");if(d===void 0)throw new oe({message:"INPUT_NEEDS_TOKEN",data:e});let g=Z(P({},s),{identifier:s.identifier,transfer_group:K(s.transfer_group),token:v(d),from_wallet:v(s.wallet),type:"withdrawal"});return g.identifier||(g.identifier=je(g)),n.api.createTransfer({transfer:g,options:Ni(o,{return_balance:"return_from_balance"})})}var UO=y("FindBalancesFnInput");function Tf(r,e,t){var g,h;let{client:n}=r;if(e===void 0)return new De({start(T){return n.api.findBalanceMany({balance:T.filter,options:T.options})},modifiers(T,O){return["wallet","token"].includes(T)?v(O):O}});let{inputCopy:a,error:s}=C({input:e,options:t,validate:UO});if(s)throw s;let i={};a.wallet&&(i.wallet=v(a.wallet)),a.token&&(i.token=v(a.token));let o=(g=a.options)==null?void 0:g.order_by;(h=a.options)==null||delete h.order_by;let d=P({},a.options);return!d.order&&o&&(d.order=st(o)),n.api.findBalanceMany({balance:i,options:d})}var qO=y("FindTokensFnInput");function yf(r,e,t){var g,h;let{client:n}=r;if(e===void 0)return new De({start(T){return n.api.findTokenMany({token:T.filter,options:T.options})},modifiers(T,O){return["belongs_to"].includes(T)?v(O):O}});let{inputCopy:a,error:s}=C({input:e,options:t,validate:qO});if(s)throw s;let i={foreign:a.foreign?a.foreign+"":void 0,type:a.type,metadata:a.metadata};a.belongs_to&&(i.belongs_to=v(a.belongs_to));let o=(g=a.options)==null?void 0:g.order_by;(h=a.options)==null||delete h.order_by;let d=P({},a.options);return!d.order&&o&&(d.order=st(o)),n.api.findTokenMany({token:i,options:d})}var BO=y("FindTransferGroupsFnInput");function bf(r,e,t){var b,$;let{client:n}=r;if(e===void 0)return new De({start(I){return n.api.findTransferGroupMany({transfer_group:I.filter,options:I.options})},modifiers(I,j){return["transfer_group","reverses"].includes(I)?K(j):j}});let{inputCopy:a,error:s}=C({input:e,options:t,validate:BO});if(s)throw s;let{identifier:i,transfer_status:o,status:d,metadata:g,type:h}=a,T={identifier:i,transfer_status:o,status:d,metadata:g,type:h};a.reverses&&(T.reverses=K(a.reverses));let O=(b=a.options)==null?void 0:b.order_by;($=a.options)==null||delete $.order_by;let w=P({},a.options);return!w.order&&O&&(w.order=st(O)),n.api.findTransferGroupMany({transfer_group:T,options:w})}var LO=y("FindTransfersFnInput");function Ff(r,e,t){var $;let{client:n}=r;if(e===void 0)return new De({start(I){return n.api.findTransferMany({transfer:I.filter,options:I.options})},modifiers(I,j){return["token","wallet","from_wallet","to_wallet"].includes(I)?v(j):I==="transfer_group"?K(j):j}});let{inputCopy:a,error:s}=C({input:e,options:t,validate:LO});if(s)throw s;let{token:i,wallet:o,from_wallet:d,to_wallet:g}=a,h={token:v(i),wallet:v(o),from_wallet:v(d),to_wallet:v(g)};a.transfer_group&&(h.transfer_group=K(a.transfer_group)),a.status&&(h.status=a.status),a.metadata&&(h.metadata=a.metadata),($=a.options)!=null||(a.options={});let T=a.options.order_by;if(delete a.options.order_by,a.options.return_running_balance){if(a.options.return_running_balance_for_wallet)throw new oe({message:"CONFLICTING_OPTIONS",data:{options:a.options}});if(!h.wallet)throw new oe({message:"RUNNING_BALANCE_WITHOUT_WALLET",data:{input:a}});a.options.return_running_balance_for_wallet=a.wallet}let O=a.options.return_running_balance_for_wallet;if(delete a.options.return_running_balance_for_wallet,a.options.return_signed_amount){if(a.options.return_signed_amount_for_wallet)throw new oe({message:"CONFLICTING_OPTIONS",data:{options:a.options}});if(!h.wallet)throw new oe({message:"SIGNED_AMOUNT_WITHOUT_WALLET",data:{input:a}});a.options.return_signed_amount_for_wallet=a.wallet}let w=a.options.return_signed_amount_for_wallet;delete a.options.return_signed_amount_for_wallet;let b=P({},a.options);return!b.order&&T&&(b.order=st(T)),O&&(b.return_running_balance_for_wallet=v(O)),w&&(b.return_signed_amount_for_wallet=v(w)),n.api.findTransferMany({transfer:h,options:b})}var VO=y("FindWalletsFnInput");function xf(r,e,t){var h;let{client:n}=r;if(e===void 0)return new De({start(T){return n.api.findWalletMany({wallet:T.filter,options:T.options})},optionsModifiers(T,O){return T==="include_balance_for_token"&&typeof O!="object"?v(O):O}});let{inputCopy:a,error:s}=C({input:e,options:t,validate:VO});if(s)throw s;let i=(h=a.options)!=null?h:{};delete a.options;let o=P({},a),d=i.order_by;delete i.order_by;let g=P({},i);return!g.order&&d&&(g.order=st(d)),n.api.findWalletMany({wallet:o,options:g})}var HO=y("GetBalanceFnInput");function $f(r,e,t){let{client:n}=r,a=at(e,"token",n.getConfig("token")),{inputCopy:s,error:i}=C({input:a,options:t,validate:HO});if(i)throw i;if(s.datetime&&bu(s.datetime))throw new oe({message:"BAL_FUTURE_DATETIME",data:s});let o=s.token||n.getConfig("token");if(o===void 0)throw new oe({message:"INPUT_NEEDS_TOKEN",data:e});return n.api.getBalance({balance:{wallet:v(s.wallet),token:v(o),datetime:s.datetime},options:s.options})}var zO=y("GetBalanceHistoryFnInput");function Of(r,e,t){let{client:n}=r,{inputCopy:a,error:s}=C({input:e,options:t,validate:zO});if(s)throw s;let i=a.token||n.getConfig("token");if(i===void 0)throw new oe({message:"INPUT_NEEDS_TOKEN",data:e});return n.api.getBalanceHistory({balance:{wallet:v(a.wallet),token:v(i)},options:a.options})}var KO=y("GetFlagsFnInput");function wf(r,e,t){let{client:n}=r,{error:a,inputCopy:s}=C({input:e||{},options:t,validate:KO});if(a)throw a;return n.api.getFlags({options:s.options})}var QO=y("GetStatisticsFnInput");function If(r,e,t){let{client:n}=r,{inputCopy:a,error:s}=C({input:e||{},options:t,validate:QO});if(s)throw s;return n.api.getStatistics({model:a.model||"Transfer",aggregator:a.aggregator||"count",groups:a.groups,filter:a.filter,options:a.options})}var JO=y("GetTokenFnInput");function jf(r,e={},t){let{client:n}=r,a=at(e,"foreign",n.getConfig("token")),{inputCopy:s,error:i}=C({input:a,options:t,validate:JO});if(i)throw i;let o=s.foreign||n.getConfig("token");if(o===void 0)throw new oe({message:"INPUT_NEEDS_TOKEN",data:e});return n.api.getToken({token:v(o),options:s.options})}var XO=y("GetTransferFnInput");function vf(r,e,t){let{client:n}=r,{inputCopy:a,error:s}=C({input:e,options:t,validate:XO});if(s)throw s;return n.api.getTransfer({transfer:K(a.transfer),options:a.options})}var YO=y("GetTransferGroupFnInput");function kf(r,e,t){let{client:n}=r,{inputCopy:a,error:s}=C({input:e,options:t,validate:YO});if(s)throw s;return n.api.getTransferGroup({transfer_group:K(a.transfer_group),options:a.options})}var ZO=y("GetWalletFnInput");function Sf(r,e,t){let{client:n}=r,{inputCopy:a,error:s}=C({input:e,options:t,validate:ZO});if(s)throw s;return n.api.getWallet({wallet:v(a.wallet),options:a.options})}var ew=y("ImportDataFnInput");function Yc(r){let{error:e}=ew(r);return e===void 0}var cW=y("ImportDataFnOutput");var mW=y("ImportDataFnStreamChunk");var tw=y("ImportDataFnOptions");function Zc(r){let{error:e}=tw(r);return e===void 0}function Cf(){throw new Error("import-data available only in node client")}var rw=y("ReverseTransferFnInput");function Pf(r,e,t){let{client:n}=r,{inputCopy:a,error:s}=C({input:e,options:t,validate:rw});if(s)throw s;return a.extend_metadata&&console.warn("deprecated: extend_metadata is deprecated. Use metadata_action instead"),n.api.reverseTransfer({transfer:K(a.transfer),reverse:{force:a.force,metadata:a.metadata,extend_metadata:a.extend_metadata,identifier:a.identifier,status:a.status},options:a.options})}var nw=y("ReverseTransferGroupFnInput");function Gf(r,e,t){let{client:n}=r,{inputCopy:a,error:s}=C({input:e,options:t,validate:nw});if(s)throw s;return a.extend_metadata&&console.warn("deprecated: extend_metadata is deprecated. Use metadata_action instead"),n.api.reverseTransferGroup({transfer_group:K(a.transfer_group),reverse:{status:a.status,force:a.force,transfer_status:a.transfer_status,identifier:a.identifier,metadata:a.metadata,transfer_metadata:a.transfer_metadata,extend_metadata:a.extend_metadata,transfer_extend_metadata:a.transfer_extend_metadata},options:a.options})}var aw=y("ReverseTransfersFnInput");function Df(r,e,t){let{client:n}=r;if(e===void 0)return new xo({start(T){return n.api.reverseTransferMany({transfer:T.filter,reverse:T.reverse,options:T.options})},modifiers(T,O){return["token","wallet","from_wallet","to_wallet"].includes(T)?v(O):T==="transfer_group"?K(O):O}});let{inputCopy:a,error:s}=C({input:e,options:t,validate:aw});if(s)throw s;let{token:i,wallet:o,from_wallet:d,to_wallet:g}=a,h={token:v(i),wallet:v(o),from_wallet:v(d),to_wallet:v(g)};return a.transfer_group&&(h.transfer_group=K(a.transfer_group)),a.status&&(h.status=a.status),a.metadata&&(h.metadata=a.metadata),n.api.reverseTransferMany({transfer:h,reverse:a.reverse,options:a.options})}var sw=y("SetFlagsFnInput");function Ef(r,e,t){let{client:n}=r,{inputCopy:a,error:s}=C({input:e,options:t,validate:sw});if(s)throw s;let i=Object.keys(qt.definitions.Flags.properties),o={};if(i.forEach(d=>{d in a&&(o[d]=a[d])}),Object.keys(o).length<1)throw new oe({message:`One of [${i.join()}] is required`,data:e});return n.api.setFlags({flags:o,options:a.options})}var iw=y("UpdateTokenFnInput");function Mf(r,e,t){let{client:n}=r,{inputCopy:a,error:s}=C({input:e,options:t,validate:iw});if(s)throw s;return n.api.updateToken({token:v(a.token),update:{public:a.public,metadata:a.metadata,status:a.status},options:a.options})}var ow=y("UpdateTransferFnInput");function Rf(r,e,t){let{client:n}=r,{inputCopy:a,error:s}=C({input:e,options:t,validate:ow});if(s)throw s;return n.api.updateTransfer({transfer:K(a.transfer),update:{status:a.status,metadata:a.metadata},options:a.options})}var pw=y("UpdateTransferGroupFnInput");function Wf(r,e,t){let{client:n}=r,{inputCopy:a,error:s}=C({input:e,options:t,validate:pw});if(s)throw s;return n.api.updateTransferGroup({transfer_group:K(a.transfer_group),update:{transfer_status:a.transfer_status,status:a.status,metadata:a.metadata},options:a.options})}var dw=y("UpdateTransferGroupsFnInput");function Af(r,e,t){let{client:n}=r;if(e===void 0)return new yr({start(O){return n.api.updateTransferGroupMany({transfer_group:O.filter,update:O.update,options:O.options})},modifiers(O,w){return["transfer_group","reverses"].includes(O)?K(w):w}});let{inputCopy:a,error:s}=C({input:e,options:t,validate:dw});if(s)throw s;let{transfer_status:i,status:o,metadata:d,type:g,update:h}=a,T={transfer_status:i,status:o,metadata:d,type:g};return a.reverses&&(T.reverses=K(a.reverses)),n.api.updateTransferGroupMany({transfer_group:T,update:h,options:a.options})}var fw=y("UpdateTransfersFnInput");function Nf(r,e,t){let{client:n}=r;if(e===void 0)return new yr({start(T){return n.api.updateTransferMany({transfer:T.filter,update:T.update,options:T.options})},modifiers(T,O){return["token","wallet","from_wallet","to_wallet"].includes(T)?v(O):T==="transfer_group"?K(O):O}});let{inputCopy:a,error:s}=C({input:e,options:t,validate:fw});if(s)throw s;let{token:i,wallet:o,from_wallet:d,to_wallet:g}=a,h={token:v(i),wallet:v(o),from_wallet:v(d),to_wallet:v(g)};return a.transfer_group&&(h.transfer_group=K(a.transfer_group)),a.status&&(h.status=a.status),a.metadata&&(h.metadata=a.metadata),n.api.updateTransferMany({transfer:h,update:a.update,options:a.options})}var uw=y("UpdateWalletFnInput");function Uf(r,e,t){let{client:n}=r,{inputCopy:a,error:s}=C({input:e,options:t,validate:uw});if(s)throw s;return n.api.updateWallet({wallet:v(a.wallet),update:{metadata:a.metadata,status:a.status,name:a.name},options:a.options})}var lw={aggregateTransfers:y("AggregateTransfersFnInput"),createAccessToken:y("CreateAccessTokenFnInput"),createContract:y("CreateContractFnInput"),createDeposit:y("CreateDepositFnInput"),createExchange:y("CreateExchangeFnInput"),createToken:y("CreateTokenFnInput"),createTransfer:y("CreateTransferFnInput"),createTransferGroup:y("CreateTransferGroupFnInput"),createTransfers:y("CreateTransfersFnInput"),createWallet:y("CreateWalletFnInput"),createWithdrawal:y("CreateWithdrawalFnInput"),findBalances:y("FindBalancesFnInput"),findTokens:y("FindTokensFnInput"),findTransferGroups:y("FindTransferGroupsFnInput"),findTransfers:y("FindTransfersFnInput"),findWallets:y("FindWalletsFnInput"),getBalance:y("GetBalanceFnInput"),getBalanceHistory:y("GetBalanceHistoryFnInput"),getFlags:y("GetFlagsFnInput"),getStatistics:y("GetStatisticsFnInput"),getToken:y("GetTokenFnInput"),getTransfer:y("GetTransferFnInput"),getTransferGroup:y("GetTransferGroupFnInput"),getWallet:y("GetWalletFnInput"),importData:y("ImportDataFnInput"),reverseTransfer:y("ReverseTransferFnInput"),reverseTransferGroup:y("ReverseTransferGroupFnInput"),reverseTransfers:y("ReverseTransfersFnInput"),setFlags:y("SetFlagsFnInput"),updateToken:y("UpdateTokenFnInput"),updateTransfer:y("UpdateTransferFnInput"),updateTransferGroup:y("UpdateTransferGroupFnInput"),updateTransferGroups:y("UpdateTransferGroupsFnInput"),updateTransfers:y("UpdateTransfersFnInput"),updateWallet:y("UpdateWalletFnInput")},M={aggregateTransfers:Nd,createAccessToken:Ud,createContract:qd,createDeposit:Bd,createExchange:uf,createToken:lf,createTransfer:cf,createTransferGroup:mf,createTransfers:hf,createWallet:_f,createWithdrawal:gf,findBalances:Tf,findTokens:yf,findTransferGroups:bf,findTransfers:Ff,findWallets:xf,getBalance:$f,getBalanceHistory:Of,getFlags:wf,getStatistics:If,getToken:jf,getTransfer:vf,getTransferGroup:kf,getWallet:Sf,importData:Cf,reverseTransfer:Pf,reverseTransferGroup:Gf,reverseTransfers:Df,setFlags:Ef,updateToken:Mf,updateTransfer:Rf,updateTransferGroup:Wf,updateTransferGroups:Af,updateTransfers:Nf,updateWallet:Uf},em=(L=>(L.aggregateTransfers="aggregateTransfers",L.createAccessToken="createAccessToken",L.createContract="createContract",L.createDeposit="createDeposit",L.createExchange="createExchange",L.createToken="createToken",L.createTransfer="createTransfer",L.createTransferGroup="createTransferGroup",L.createTransfers="createTransfers",L.createWallet="createWallet",L.createWithdrawal="createWithdrawal",L.findBalances="findBalances",L.findTokens="findTokens",L.findTransferGroups="findTransferGroups",L.findTransfers="findTransfers",L.findWallets="findWallets",L.getBalance="getBalance",L.getBalanceHistory="getBalanceHistory",L.getFlags="getFlags",L.getStatistics="getStatistics",L.getToken="getToken",L.getTransfer="getTransfer",L.getTransferGroup="getTransferGroup",L.getWallet="getWallet",L.importData="importData",L.reverseTransfer="reverseTransfer",L.reverseTransferGroup="reverseTransferGroup",L.reverseTransfers="reverseTransfers",L.setFlags="setFlags",L.updateToken="updateToken",L.updateTransfer="updateTransfer",L.updateTransferGroup="updateTransferGroup",L.updateTransferGroups="updateTransferGroups",L.updateTransfers="updateTransfers",L.updateWallet="updateWallet",L))(em||{}),tm=(t=>(t.findTransfers="findTransfers",t.findWallets="findWallets",t))(tm||{});var rm,cw=(rm=window.WAPI_VERSION)!=null?rm:"",br=class{constructor(e,t){this.config={};if(this.api=e,this.$connect=e.$connect,t&&(t.token&&(this.config=Z(P({},this.config),{token:t.token})),t.hooks))for(let[n,a]of Object.entries(t.hooks))this.setHook(n,a)}close(){return _e(this,null,function*(){return this.api.close()})}version(){return cw}setHook(e,t){if(typeof t!="function")throw new TypeError("Hooks can only be functions");return this.api.hooks[e]=t,this}configure(e){return this.config=P(P({},this.config),e),this}getConfig(e){return this.config[e]}aggregateTransfers(e,t){return e===void 0?M.aggregateTransfers({client:this}):M.aggregateTransfers({client:this},e,t)}createAccessToken(e,t){return M.createAccessToken({client:this},e,t)}createContract(e,t){return M.createContract({client:this},e,t)}createDeposit(e,t){return M.createDeposit({client:this},e,t)}createExchange(e,t){return M.createExchange({client:this},e,t)}createToken(e,t){return M.createToken({client:this},e,t)}createTransfer(e,t){return M.createTransfer({client:this},e,t)}createTransferGroup(e,t){return M.createTransferGroup({client:this},e,t)}createTransfers(e,t){return M.createTransfers({client:this},e,t)}createWallet(e,t){return M.createWallet({client:this},e,t)}createWithdrawal(e,t){return M.createWithdrawal({client:this},e,t)}findBalances(e,t){return e===void 0?M.findBalances({client:this}):M.findBalances({client:this},e,t)}findTokens(e,t){return e===void 0?M.findTokens({client:this}):M.findTokens({client:this},e,t)}findTransferGroups(e,t){return e===void 0?M.findTransferGroups({client:this}):M.findTransferGroups({client:this},e,t)}findTransfers(e,t){return e===void 0?M.findTransfers({client:this}):M.findTransfers({client:this},e,t)}findWallets(e,t){return e===void 0?M.findWallets({client:this}):M.findWallets({client:this},e,t)}getBalance(e,t){return M.getBalance({client:this},e,t)}getBalanceHistory(e,t){return M.getBalanceHistory({client:this},e,t)}getFlags(e,t){return M.getFlags({client:this},e,t)}getStatistics(e,t){return M.getStatistics({client:this},e,t)}getToken(e,t){return M.getToken({client:this},e,t)}getTransfer(e,t){return M.getTransfer({client:this},e,t)}getTransferGroup(e,t){return M.getTransferGroup({client:this},e,t)}getWallet(e,t){return M.getWallet({client:this},e,t)}importData(e,t){if(e===void 0&&t===void 0)return M.importData({client:this});if(t===void 0&&Zc(e))return M.importData({client:this},e);if(Yc(e))return M.importData({client:this},e,t);throw new Re({message:"INPUT_INVALID",data:{input:e,options:t}})}reverseTransfer(e,t){return M.reverseTransfer({client:this},e,t)}reverseTransferGroup(e,t){return M.reverseTransferGroup({client:this},e,t)}reverseTransfers(e,t){return e===void 0?M.reverseTransfers({client:this}):M.reverseTransfers({client:this},e,t)}setFlags(e,t){return M.setFlags({client:this},e,t)}updateToken(e,t){return M.updateToken({client:this},e,t)}updateTransfer(e,t){return M.updateTransfer({client:this},e,t)}updateTransferGroup(e,t){return M.updateTransferGroup({client:this},e,t)}updateTransferGroups(e,t){return e===void 0?M.updateTransferGroups({client:this}):M.updateTransferGroups({client:this},e,t)}updateTransfers(e,t){return e===void 0?M.updateTransfers({client:this}):M.updateTransfers({client:this},e,t)}updateWallet(e,t){return M.updateWallet({client:this},e,t)}};function nm(r,e){let t=Gd(r);return new br(t,e)}function am(r,e){let t=Rd(r);return new br(t,e)}var mw=Si.getValidator("ClientOptions"),sm=(t=>(t.ws="ws",t.https="https",t))(sm||{});function hw(r){let e=r.config,{inputCopy:t,error:n}=mw(r);if(n)throw n;if(t.client==="ws")return nm(t.connection,e);if(t.client==="https")return am(t.connection,e);throw new TypeError("Invalid client type")}var _w={getIdentifier:gu};return Vm(gw);})();
9
9
  /*! Bundled license information:
10
10
 
11
11
  uri-js/dist/es5/uri.all.js: