@mappedin/events 6.0.1-beta.51

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.
@@ -0,0 +1 @@
1
+ import{a as g,b as F,c as o,d as Ac,e as ya,f as D,g as To,h as ll,i as tt,j as H,k as Pt,l as Ct,m as ko,n as y,o as pg,p as A,q as c,r as p}from"./chunk-6DG3HUAY.js";var Pa=D(Me=>{"use strict";c();Object.defineProperty(Me,"__esModule",{value:!0});Me.regexpCode=Me.getEsmExportName=Me.getProperty=Me.safeStringify=Me.stringify=Me.strConcat=Me.addCodeArg=Me.str=Me._=Me.nil=Me._Code=Me.Name=Me.IDENTIFIER=Me._CodeOrName=void 0;var Bl=class Bl{};o(Bl,"_CodeOrName");var _a=Bl;Me._CodeOrName=_a;Me.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var Gl=class Gl extends _a{constructor(t){if(super(),!Me.IDENTIFIER.test(t))throw new Error("CodeGen: name must be a valid identifier");this.str=t}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};o(Gl,"Name");var xi=Gl;Me.Name=xi;var Kl=class Kl extends _a{constructor(t){super(),this._items=typeof t=="string"?[t]:t}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let t=this._items[0];return t===""||t==='""'}get str(){var t;return(t=this._str)!==null&&t!==void 0?t:this._str=this._items.reduce((r,n)=>"".concat(r).concat(n),"")}get names(){var t;return(t=this._names)!==null&&t!==void 0?t:this._names=this._items.reduce((r,n)=>(n instanceof xi&&(r[n.str]=(r[n.str]||0)+1),r),{})}};o(Kl,"_Code");var Lr=Kl;Me._Code=Lr;Me.nil=new Lr("");function Pg(e,...t){let r=[e[0]],n=0;for(;n<t.length;)Vl(r,t[n]),r.push(e[++n]);return new Lr(r)}o(Pg,"_");Me._=Pg;var zl=new Lr("+");function Eg(e,...t){let r=[Sa(e[0])],n=0;for(;n<t.length;)r.push(zl),Vl(r,t[n]),r.push(zl,Sa(e[++n]));return RF(r),new Lr(r)}o(Eg,"str");Me.str=Eg;function Vl(e,t){t instanceof Lr?e.push(...t._items):t instanceof xi?e.push(t):e.push(LF(t))}o(Vl,"addCodeArg");Me.addCodeArg=Vl;function RF(e){let t=1;for(;t<e.length-1;){if(e[t]===zl){let r=CF(e[t-1],e[t+1]);if(r!==void 0){e.splice(t-1,3,r);continue}e[t++]="+"}t++}}o(RF,"optimize");function CF(e,t){if(t==='""')return e;if(e==='""')return t;if(typeof e=="string")return t instanceof xi||e[e.length-1]!=='"'?void 0:typeof t!="string"?"".concat(e.slice(0,-1)).concat(t,'"'):t[0]==='"'?e.slice(0,-1)+t.slice(1):void 0;if(typeof t=="string"&&t[0]==='"'&&!(e instanceof xi))return'"'.concat(e).concat(t.slice(1))}o(CF,"mergeExprItems");var _g;function MF(e,t){return t.emptyStr()?e:e.emptyStr()?t:Eg(_g||(_g=y(["","",""])),e,t)}o(MF,"strConcat");Me.strConcat=MF;function LF(e){return typeof e=="number"||typeof e=="boolean"||e===null?e:Sa(Array.isArray(e)?e.join(","):e)}o(LF,"interpolate");function UF(e){return new Lr(Sa(e))}o(UF,"stringify");Me.stringify=UF;function Sa(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}o(Sa,"safeStringify");Me.safeStringify=Sa;var Sg;function DF(e){return typeof e=="string"&&Me.IDENTIFIER.test(e)?new Lr(".".concat(e)):Pg(Sg||(Sg=y(["[","]"])),e)}o(DF,"getProperty");Me.getProperty=DF;function qF(e){if(typeof e=="string"&&Me.IDENTIFIER.test(e))return new Lr("".concat(e));throw new Error("CodeGen: invalid export name: ".concat(e,", use explicit $id name mapping"))}o(qF,"getEsmExportName");Me.getEsmExportName=qF;function zF(e){return new Lr(e.toString())}o(zF,"regexpCode");Me.regexpCode=zF});var Ql=D(gr=>{"use strict";c();Object.defineProperty(gr,"__esModule",{value:!0});gr.ValueScope=gr.ValueScopeName=gr.Scope=gr.varKinds=gr.UsedValueState=void 0;var hr=Pa(),Jl=class Jl extends Error{constructor(t){super('CodeGen: "code" for '.concat(t," not defined")),this.value=t.value}};o(Jl,"ValueError");var Wl=Jl,Gc;(function(e){e[e.Started=0]="Started",e[e.Completed=1]="Completed"})(Gc||(gr.UsedValueState=Gc={}));gr.varKinds={const:new hr.Name("const"),let:new hr.Name("let"),var:new hr.Name("var")};var Zl=class Zl{constructor({prefixes:t,parent:r}={}){this._names={},this._prefixes=t,this._parent=r}toName(t){return t instanceof hr.Name?t:this.name(t)}name(t){return new hr.Name(this._newName(t))}_newName(t){let r=this._names[t]||this._nameGroup(t);return"".concat(t).concat(r.index++)}_nameGroup(t){var r,n;if(!((n=(r=this._parent)===null||r===void 0?void 0:r._prefixes)===null||n===void 0)&&n.has(t)||this._prefixes&&!this._prefixes.has(t))throw new Error('CodeGen: prefix "'.concat(t,'" is not allowed in this scope'));return this._names[t]={prefix:t,index:0}}};o(Zl,"Scope");var Kc=Zl;gr.Scope=Kc;var Tg,Yl=class Yl extends hr.Name{constructor(t,r){super(r),this.prefix=t}setValue(t,{property:r,itemIndex:n}){this.value=t,this.scopePath=(0,hr._)(Tg||(Tg=y([".","[","]"])),new hr.Name(r),n)}};o(Yl,"ValueScopeName");var Wc=Yl;gr.ValueScopeName=Wc;var kg,VF=(0,hr._)(kg||(kg=y(["\n"],["\\n"]))),Fg,Ag,jg,Xl=class Xl extends Kc{constructor(t){super(t),this._values={},this._scope=t.scope,this.opts=F(g({},t),{_n:t.lines?VF:hr.nil})}get(){return this._scope}name(t){return new Wc(t,this._newName(t))}value(t,r){var n;if(r.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let i=this.toName(t),{prefix:s}=i,a=(n=r.key)!==null&&n!==void 0?n:r.ref,u=this._values[s];if(u){let m=u.get(a);if(m)return m}else u=this._values[s]=new Map;u.set(a,i);let l=this._scope[s]||(this._scope[s]=[]),d=l.length;return l[d]=r.ref,i.setValue(r,{property:s,itemIndex:d}),i}getValue(t,r){let n=this._values[t];if(n)return n.get(r)}scopeRefs(t,r=this._values){return this._reduceValues(r,n=>{if(n.scopePath===void 0)throw new Error('CodeGen: name "'.concat(n,'" has no value'));return(0,hr._)(Fg||(Fg=y(["","",""])),t,n.scopePath)})}scopeCode(t=this._values,r,n){return this._reduceValues(t,i=>{if(i.value===void 0)throw new Error('CodeGen: name "'.concat(i,'" has no value'));return i.value.code},r,n)}_reduceValues(t,r,n={},i){let s=hr.nil;for(let a in t){let u=t[a];if(!u)continue;let l=n[a]=n[a]||new Map;u.forEach(d=>{if(l.has(d))return;l.set(d,Gc.Started);let m=r(d);if(m){let h=this.opts.es5?gr.varKinds.var:gr.varKinds.const;s=(0,hr._)(Ag||(Ag=y(["",""," "," = ",";",""])),s,h,d,m,this.opts._n)}else if(m=i==null?void 0:i(d))s=(0,hr._)(jg||(jg=y(["","","",""])),s,m,this.opts._n);else throw new Wl(d);l.set(d,Gc.Completed)})}return s}};o(Xl,"ValueScope");var Hl=Xl;gr.ValueScope=Hl});var de=D(ye=>{"use strict";c();Object.defineProperty(ye,"__esModule",{value:!0});ye.or=ye.and=ye.not=ye.CodeGen=ye.operators=ye.varKinds=ye.ValueScopeName=ye.ValueScope=ye.Scope=ye.Name=ye.regexpCode=ye.stringify=ye.getProperty=ye.nil=ye.strConcat=ye.str=ye._=void 0;var ve=Pa(),sn=Ql(),Ro=Pa();Object.defineProperty(ye,"_",{enumerable:!0,get:o(function(){return Ro._},"get")});Object.defineProperty(ye,"str",{enumerable:!0,get:o(function(){return Ro.str},"get")});Object.defineProperty(ye,"strConcat",{enumerable:!0,get:o(function(){return Ro.strConcat},"get")});Object.defineProperty(ye,"nil",{enumerable:!0,get:o(function(){return Ro.nil},"get")});Object.defineProperty(ye,"getProperty",{enumerable:!0,get:o(function(){return Ro.getProperty},"get")});Object.defineProperty(ye,"stringify",{enumerable:!0,get:o(function(){return Ro.stringify},"get")});Object.defineProperty(ye,"regexpCode",{enumerable:!0,get:o(function(){return Ro.regexpCode},"get")});Object.defineProperty(ye,"Name",{enumerable:!0,get:o(function(){return Ro.Name},"get")});var Yc=Ql();Object.defineProperty(ye,"Scope",{enumerable:!0,get:o(function(){return Yc.Scope},"get")});Object.defineProperty(ye,"ValueScope",{enumerable:!0,get:o(function(){return Yc.ValueScope},"get")});Object.defineProperty(ye,"ValueScopeName",{enumerable:!0,get:o(function(){return Yc.ValueScopeName},"get")});Object.defineProperty(ye,"varKinds",{enumerable:!0,get:o(function(){return Yc.varKinds},"get")});ye.operators={GT:new ve._Code(">"),GTE:new ve._Code(">="),LT:new ve._Code("<"),LTE:new ve._Code("<="),EQ:new ve._Code("==="),NEQ:new ve._Code("!=="),NOT:new ve._Code("!"),OR:new ve._Code("||"),AND:new ve._Code("&&"),ADD:new ve._Code("+")};var pp=class pp{optimizeNodes(){return this}optimizeNames(t,r){return this}};o(pp,"Node");var to=pp,dp=class dp extends to{constructor(t,r,n){super(),this.varKind=t,this.name=r,this.rhs=n}render({es5:t,_n:r}){let n=t?sn.varKinds.var:this.varKind,i=this.rhs===void 0?"":" = ".concat(this.rhs);return"".concat(n," ").concat(this.name).concat(i,";")+r}optimizeNames(t,r){if(t[this.name.str])return this.rhs&&(this.rhs=ls(this.rhs,t,r)),this}get names(){return this.rhs instanceof ve._CodeOrName?this.rhs.names:{}}};o(dp,"Def");var ep=dp,mp=class mp extends to{constructor(t,r,n){super(),this.lhs=t,this.rhs=r,this.sideEffects=n}render({_n:t}){return"".concat(this.lhs," = ").concat(this.rhs,";")+t}optimizeNames(t,r){if(!(this.lhs instanceof ve.Name&&!t[this.lhs.str]&&!this.sideEffects))return this.rhs=ls(this.rhs,t,r),this}get names(){let t=this.lhs instanceof ve.Name?{}:g({},this.lhs.names);return Zc(t,this.rhs)}};o(mp,"Assign");var Hc=mp,yp=class yp extends Hc{constructor(t,r,n,i){super(t,n,i),this.op=r}render({_n:t}){return"".concat(this.lhs," ").concat(this.op,"= ").concat(this.rhs,";")+t}};o(yp,"AssignOp");var tp=yp,hp=class hp extends to{constructor(t){super(),this.label=t,this.names={}}render({_n:t}){return"".concat(this.label,":")+t}};o(hp,"Label");var rp=hp,gp=class gp extends to{constructor(t){super(),this.label=t,this.names={}}render({_n:t}){let r=this.label?" ".concat(this.label):"";return"break".concat(r,";")+t}};o(gp,"Break");var np=gp,xp=class xp extends to{constructor(t){super(),this.error=t}render({_n:t}){return"throw ".concat(this.error,";")+t}get names(){return this.error.names}};o(xp,"Throw");var op=xp,Ip=class Ip extends to{constructor(t){super(),this.code=t}render({_n:t}){return"".concat(this.code,";")+t}optimizeNodes(){return"".concat(this.code)?this:void 0}optimizeNames(t,r){return this.code=ls(this.code,t,r),this}get names(){return this.code instanceof ve._CodeOrName?this.code.names:{}}};o(Ip,"AnyCode");var ip=Ip,bp=class bp extends to{constructor(t=[]){super(),this.nodes=t}render(t){return this.nodes.reduce((r,n)=>r+n.render(t),"")}optimizeNodes(){let{nodes:t}=this,r=t.length;for(;r--;){let n=t[r].optimizeNodes();Array.isArray(n)?t.splice(r,1,...n):n?t[r]=n:t.splice(r,1)}return t.length>0?this:void 0}optimizeNames(t,r){let{nodes:n}=this,i=n.length;for(;i--;){let s=n[i];s.optimizeNames(t,r)||(BF(t,s.names),n.splice(i,1))}return n.length>0?this:void 0}get names(){return this.nodes.reduce((t,r)=>wi(t,r.names),{})}};o(bp,"ParentNode");var Ea=bp,wp=class wp extends Ea{render(t){return"{"+t._n+super.render(t)+"}"+t._n}};o(wp,"BlockNode");var ro=wp,$p=class $p extends Ea{};o($p,"Root");var sp=$p,vp=class vp extends ro{};o(vp,"Else");var fs=vp;fs.kind="else";var us=class us extends ro{constructor(t,r){super(r),this.condition=t}render(t){let r="if(".concat(this.condition,")")+super.render(t);return this.else&&(r+="else "+this.else.render(t)),r}optimizeNodes(){super.optimizeNodes();let t=this.condition;if(t===!0)return this.nodes;let r=this.else;if(r){let n=r.optimizeNodes();r=this.else=Array.isArray(n)?new fs(n):n}if(r)return t===!1?r instanceof us?r:r.nodes:this.nodes.length?this:new us(Dg(t),r instanceof us?[r]:r.nodes);if(!(t===!1||!this.nodes.length))return this}optimizeNames(t,r){var n;if(this.else=(n=this.else)===null||n===void 0?void 0:n.optimizeNames(t,r),!!(super.optimizeNames(t,r)||this.else))return this.condition=ls(this.condition,t,r),this}get names(){let t=super.names;return Zc(t,this.condition),this.else&&wi(t,this.else.names),t}};o(us,"If");var Ii=us;Ii.kind="if";var Op=class Op extends ro{};o(Op,"For");var bi=Op;bi.kind="for";var _p=class _p extends bi{constructor(t){super(),this.iteration=t}render(t){return"for(".concat(this.iteration,")")+super.render(t)}optimizeNames(t,r){if(super.optimizeNames(t,r))return this.iteration=ls(this.iteration,t,r),this}get names(){return wi(super.names,this.iteration.names)}};o(_p,"ForLoop");var ap=_p,Sp=class Sp extends bi{constructor(t,r,n,i){super(),this.varKind=t,this.name=r,this.from=n,this.to=i}render(t){let r=t.es5?sn.varKinds.var:this.varKind,{name:n,from:i,to:s}=this;return"for(".concat(r," ").concat(n,"=").concat(i,"; ").concat(n,"<").concat(s,"; ").concat(n,"++)")+super.render(t)}get names(){let t=Zc(super.names,this.from);return Zc(t,this.to)}};o(Sp,"ForRange");var cp=Sp,Pp=class Pp extends bi{constructor(t,r,n,i){super(),this.loop=t,this.varKind=r,this.name=n,this.iterable=i}render(t){return"for(".concat(this.varKind," ").concat(this.name," ").concat(this.loop," ").concat(this.iterable,")")+super.render(t)}optimizeNames(t,r){if(super.optimizeNames(t,r))return this.iterable=ls(this.iterable,t,r),this}get names(){return wi(super.names,this.iterable.names)}};o(Pp,"ForIter");var Jc=Pp,Ep=class Ep extends ro{constructor(t,r,n){super(),this.name=t,this.args=r,this.async=n}render(t){let r=this.async?"async ":"";return"".concat(r,"function ").concat(this.name,"(").concat(this.args,")")+super.render(t)}};o(Ep,"Func");var Ta=Ep;Ta.kind="func";var Tp=class Tp extends Ea{render(t){return"return "+super.render(t)}};o(Tp,"Return");var ka=Tp;ka.kind="return";var kp=class kp extends ro{render(t){let r="try"+super.render(t);return this.catch&&(r+=this.catch.render(t)),this.finally&&(r+=this.finally.render(t)),r}optimizeNodes(){var t,r;return super.optimizeNodes(),(t=this.catch)===null||t===void 0||t.optimizeNodes(),(r=this.finally)===null||r===void 0||r.optimizeNodes(),this}optimizeNames(t,r){var n,i;return super.optimizeNames(t,r),(n=this.catch)===null||n===void 0||n.optimizeNames(t,r),(i=this.finally)===null||i===void 0||i.optimizeNames(t,r),this}get names(){let t=super.names;return this.catch&&wi(t,this.catch.names),this.finally&&wi(t,this.finally.names),t}};o(kp,"Try");var up=kp,Fp=class Fp extends ro{constructor(t){super(),this.error=t}render(t){return"catch(".concat(this.error,")")+super.render(t)}};o(Fp,"Catch");var Fa=Fp;Fa.kind="catch";var Ap=class Ap extends ro{render(t){return"finally"+super.render(t)}};o(Ap,"Finally");var Aa=Ap;Aa.kind="finally";var Ng,Rg,Cg,jp=class jp{constructor(t,r={}){this._values={},this._blockStarts=[],this._constants={},this.opts=F(g({},r),{_n:r.lines?"\n":""}),this._extScope=t,this._scope=new sn.Scope({parent:t}),this._nodes=[new sp]}toString(){return this._root.render(this.opts)}name(t){return this._scope.name(t)}scopeName(t){return this._extScope.name(t)}scopeValue(t,r){let n=this._extScope.value(t,r);return(this._values[n.prefix]||(this._values[n.prefix]=new Set)).add(n),n}getScopeValue(t,r){return this._extScope.getValue(t,r)}scopeRefs(t){return this._extScope.scopeRefs(t,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(t,r,n,i){let s=this._scope.toName(r);return n!==void 0&&i&&(this._constants[s.str]=n),this._leafNode(new ep(t,s,n)),s}const(t,r,n){return this._def(sn.varKinds.const,t,r,n)}let(t,r,n){return this._def(sn.varKinds.let,t,r,n)}var(t,r,n){return this._def(sn.varKinds.var,t,r,n)}assign(t,r,n){return this._leafNode(new Hc(t,r,n))}add(t,r){return this._leafNode(new tp(t,ye.operators.ADD,r))}code(t){return typeof t=="function"?t():t!==ve.nil&&this._leafNode(new ip(t)),this}object(...t){let r=["{"];for(let[n,i]of t)r.length>1&&r.push(","),r.push(n),(n!==i||this.opts.es5)&&(r.push(":"),(0,ve.addCodeArg)(r,i));return r.push("}"),new ve._Code(r)}if(t,r,n){if(this._blockNode(new Ii(t)),r&&n)this.code(r).else().code(n).endIf();else if(r)this.code(r).endIf();else if(n)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(t){return this._elseNode(new Ii(t))}else(){return this._elseNode(new fs)}endIf(){return this._endBlockNode(Ii,fs)}_for(t,r){return this._blockNode(t),r&&this.code(r).endFor(),this}for(t,r){return this._for(new ap(t),r)}forRange(t,r,n,i,s=this.opts.es5?sn.varKinds.var:sn.varKinds.let){let a=this._scope.toName(t);return this._for(new cp(s,a,r,n),()=>i(a))}forOf(t,r,n,i=sn.varKinds.const){let s=this._scope.toName(t);if(this.opts.es5){let a=r instanceof ve.Name?r:this.var("_arr",r);return this.forRange("_i",0,(0,ve._)(Ng||(Ng=y(["",".length"])),a),u=>{this.var(s,(0,ve._)(Rg||(Rg=y(["","[","]"])),a,u)),n(s)})}return this._for(new Jc("of",i,s,r),()=>n(s))}forIn(t,r,n,i=this.opts.es5?sn.varKinds.var:sn.varKinds.const){if(this.opts.ownProperties)return this.forOf(t,(0,ve._)(Cg||(Cg=y(["Object.keys(",")"])),r),n);let s=this._scope.toName(t);return this._for(new Jc("in",i,s,r),()=>n(s))}endFor(){return this._endBlockNode(bi)}label(t){return this._leafNode(new rp(t))}break(t){return this._leafNode(new np(t))}return(t){let r=new ka;if(this._blockNode(r),this.code(t),r.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(ka)}try(t,r,n){if(!r&&!n)throw new Error('CodeGen: "try" without "catch" and "finally"');let i=new up;if(this._blockNode(i),this.code(t),r){let s=this.name("e");this._currNode=i.catch=new Fa(s),r(s)}return n&&(this._currNode=i.finally=new Aa,this.code(n)),this._endBlockNode(Fa,Aa)}throw(t){return this._leafNode(new op(t))}block(t,r){return this._blockStarts.push(this._nodes.length),t&&this.code(t).endBlock(r),this}endBlock(t){let r=this._blockStarts.pop();if(r===void 0)throw new Error("CodeGen: not in self-balancing block");let n=this._nodes.length-r;if(n<0||t!==void 0&&n!==t)throw new Error("CodeGen: wrong number of nodes: ".concat(n," vs ").concat(t," expected"));return this._nodes.length=r,this}func(t,r=ve.nil,n,i){return this._blockNode(new Ta(t,r,n)),i&&this.code(i).endFunc(),this}endFunc(){return this._endBlockNode(Ta)}optimize(t=1){for(;t-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(t){return this._currNode.nodes.push(t),this}_blockNode(t){this._currNode.nodes.push(t),this._nodes.push(t)}_endBlockNode(t,r){let n=this._currNode;if(n instanceof t||r&&n instanceof r)return this._nodes.pop(),this;throw new Error('CodeGen: not in block "'.concat(r?"".concat(t.kind,"/").concat(r.kind):t.kind,'"'))}_elseNode(t){let r=this._currNode;if(!(r instanceof Ii))throw new Error('CodeGen: "else" without "if"');return this._currNode=r.else=t,this}get _root(){return this._nodes[0]}get _currNode(){let t=this._nodes;return t[t.length-1]}set _currNode(t){let r=this._nodes;r[r.length-1]=t}};o(jp,"CodeGen");var fp=jp;ye.CodeGen=fp;function wi(e,t){for(let r in t)e[r]=(e[r]||0)+(t[r]||0);return e}o(wi,"addNames");function Zc(e,t){return t instanceof ve._CodeOrName?wi(e,t.names):e}o(Zc,"addExprNames");function ls(e,t,r){if(e instanceof ve.Name)return n(e);if(!i(e))return e;return new ve._Code(e._items.reduce((s,a)=>(a instanceof ve.Name&&(a=n(a)),a instanceof ve._Code?s.push(...a._items):s.push(a),s),[]));function n(s){let a=r[s.str];return a===void 0||t[s.str]!==1?s:(delete t[s.str],a)}function i(s){return s instanceof ve._Code&&s._items.some(a=>a instanceof ve.Name&&t[a.str]===1&&r[a.str]!==void 0)}}o(ls,"optimizeExpr");function BF(e,t){for(let r in t)e[r]=(e[r]||0)-(t[r]||0)}o(BF,"subtractNames");var Mg;function Dg(e){return typeof e=="boolean"||typeof e=="number"||e===null?!e:(0,ve._)(Mg||(Mg=y(["!",""])),lp(e))}o(Dg,"not");ye.not=Dg;var GF=qg(ye.operators.AND);function KF(...e){return e.reduce(GF)}o(KF,"and");ye.and=KF;var WF=qg(ye.operators.OR);function HF(...e){return e.reduce(WF)}o(HF,"or");ye.or=HF;var Lg;function qg(e){return(t,r)=>t===ve.nil?r:r===ve.nil?t:(0,ve._)(Lg||(Lg=y([""," "," ",""])),lp(t),e,lp(r))}o(qg,"mappend");var Ug;function lp(e){return e instanceof ve.Name?e:(0,ve._)(Ug||(Ug=y(["(",")"])),e)}o(lp,"par")});var Le=D(ge=>{"use strict";c();Object.defineProperty(ge,"__esModule",{value:!0});ge.checkStrictMode=ge.getErrorPath=ge.Type=ge.useFunc=ge.setEvaluated=ge.evaluatedPropsToName=ge.mergeEvaluated=ge.eachItem=ge.unescapeJsonPointer=ge.escapeJsonPointer=ge.escapeFragment=ge.unescapeFragment=ge.schemaRefOrVal=ge.schemaHasRulesButRef=ge.schemaHasRules=ge.checkUnknownRules=ge.alwaysValidSchema=ge.toHash=void 0;var rt=de(),JF=Pa();function ZF(e){let t={};for(let r of e)t[r]=!0;return t}o(ZF,"toHash");ge.toHash=ZF;function YF(e,t){return typeof t=="boolean"?t:Object.keys(t).length===0?!0:(cx(e,t),!ux(t,e.self.RULES.all))}o(YF,"alwaysValidSchema");ge.alwaysValidSchema=YF;function cx(e,t=e.schema){let{opts:r,self:n}=e;if(!r.strictSchema||typeof t=="boolean")return;let i=n.RULES.keywords;for(let s in t)i[s]||px(e,'unknown keyword: "'.concat(s,'"'))}o(cx,"checkUnknownRules");ge.checkUnknownRules=cx;function ux(e,t){if(typeof e=="boolean")return!e;for(let r in e)if(t[r])return!0;return!1}o(ux,"schemaHasRules");ge.schemaHasRules=ux;function XF(e,t){if(typeof e=="boolean")return!e;for(let r in e)if(r!=="$ref"&&t.all[r])return!0;return!1}o(XF,"schemaHasRulesButRef");ge.schemaHasRulesButRef=XF;var Bg,Gg;function QF({topSchemaRef:e,schemaPath:t},r,n,i){if(!i){if(typeof r=="number"||typeof r=="boolean")return r;if(typeof r=="string")return(0,rt._)(Bg||(Bg=y(["",""])),r)}return(0,rt._)(Gg||(Gg=y(["","","",""])),e,t,(0,rt.getProperty)(n))}o(QF,"schemaRefOrVal");ge.schemaRefOrVal=QF;function eA(e){return fx(decodeURIComponent(e))}o(eA,"unescapeFragment");ge.unescapeFragment=eA;function tA(e){return encodeURIComponent(Rp(e))}o(tA,"escapeFragment");ge.escapeFragment=tA;function Rp(e){return typeof e=="number"?"".concat(e):e.replace(/~/g,"~0").replace(/\//g,"~1")}o(Rp,"escapeJsonPointer");ge.escapeJsonPointer=Rp;function fx(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}o(fx,"unescapeJsonPointer");ge.unescapeJsonPointer=fx;function rA(e,t){if(Array.isArray(e))for(let r of e)t(r);else t(e)}o(rA,"eachItem");ge.eachItem=rA;function zg({mergeNames:e,mergeToName:t,mergeValues:r,resultToName:n}){return(i,s,a,u)=>{let l=a===void 0?s:a instanceof rt.Name?(s instanceof rt.Name?e(i,s,a):t(i,s,a),a):s instanceof rt.Name?(t(i,a,s),s):r(s,a);return u===rt.Name&&!(l instanceof rt.Name)?n(i,l):l}}o(zg,"makeMergeEvaluated");var Kg,Wg,Hg,Jg,Zg,Yg,Xg,Qg,ex,tx;ge.mergeEvaluated={props:zg({mergeNames:o((e,t,r)=>e.if((0,rt._)(Kg||(Kg=y([""," !== true && "," !== undefined"])),r,t),()=>{e.if((0,rt._)(Wg||(Wg=y([""," === true"])),t),()=>e.assign(r,!0),()=>e.assign(r,(0,rt._)(Hg||(Hg=y([""," || {}"])),r)).code((0,rt._)(Jg||(Jg=y(["Object.assign(",", ",")"])),r,t)))}),"mergeNames"),mergeToName:o((e,t,r)=>e.if((0,rt._)(Zg||(Zg=y([""," !== true"])),r),()=>{t===!0?e.assign(r,!0):(e.assign(r,(0,rt._)(Yg||(Yg=y([""," || {}"])),r)),Cp(e,r,t))}),"mergeToName"),mergeValues:o((e,t)=>e===!0?!0:g(g({},e),t),"mergeValues"),resultToName:lx}),items:zg({mergeNames:o((e,t,r)=>e.if((0,rt._)(Xg||(Xg=y([""," !== true && "," !== undefined"])),r,t),()=>e.assign(r,(0,rt._)(Qg||(Qg=y([""," === true ? true : "," > "," ? "," : ",""])),t,r,t,r,t))),"mergeNames"),mergeToName:o((e,t,r)=>e.if((0,rt._)(ex||(ex=y([""," !== true"])),r),()=>e.assign(r,t===!0?!0:(0,rt._)(tx||(tx=y([""," > "," ? "," : ",""])),r,t,r,t))),"mergeToName"),mergeValues:o((e,t)=>e===!0?!0:Math.max(e,t),"mergeValues"),resultToName:o((e,t)=>e.var("items",t),"resultToName")})};var rx;function lx(e,t){if(t===!0)return e.var("props",!0);let r=e.var("props",(0,rt._)(rx||(rx=y(["{}"]))));return t!==void 0&&Cp(e,r,t),r}o(lx,"evaluatedPropsToName");ge.evaluatedPropsToName=lx;var nx;function Cp(e,t,r){Object.keys(r).forEach(n=>e.assign((0,rt._)(nx||(nx=y(["","",""])),t,(0,rt.getProperty)(n)),!0))}o(Cp,"setEvaluated");ge.setEvaluated=Cp;var Vg={};function nA(e,t){return e.scopeValue("func",{ref:t,code:Vg[t.code]||(Vg[t.code]=new JF._Code(t.code))})}o(nA,"useFunc");ge.useFunc=nA;var Np;(function(e){e[e.Num=0]="Num",e[e.Str=1]="Str"})(Np||(ge.Type=Np={}));var ox,ix,sx,ax;function oA(e,t,r){if(e instanceof rt.Name){let n=t===Np.Num;return r?n?(0,rt._)(ox||(ox=y(['"[" + ',' + "]"'])),e):(0,rt._)(ix||(ix=y(['"[\'" + ',' + "\']"'])),e):n?(0,rt._)(sx||(sx=y(['"/" + ',""])),e):(0,rt._)(ax||(ax=y(['"/" + ','.replace(/~/g, "~0").replace(/\\//g, "~1")'],['"/" + ','.replace(/~/g, "~0").replace(/\\\\//g, "~1")'])),e)}return r?(0,rt.getProperty)(e).toString():"/"+Rp(e)}o(oA,"getErrorPath");ge.getErrorPath=oA;function px(e,t,r=e.opts.strictSchema){if(r){if(t="strict mode: ".concat(t),r===!0)throw new Error(t);e.self.logger.warn(t)}}o(px,"checkStrictMode");ge.checkStrictMode=px});var no=D(Mp=>{"use strict";c();Object.defineProperty(Mp,"__esModule",{value:!0});var Jt=de(),iA={data:new Jt.Name("data"),valCxt:new Jt.Name("valCxt"),instancePath:new Jt.Name("instancePath"),parentData:new Jt.Name("parentData"),parentDataProperty:new Jt.Name("parentDataProperty"),rootData:new Jt.Name("rootData"),dynamicAnchors:new Jt.Name("dynamicAnchors"),vErrors:new Jt.Name("vErrors"),errors:new Jt.Name("errors"),this:new Jt.Name("this"),self:new Jt.Name("self"),scope:new Jt.Name("scope"),json:new Jt.Name("json"),jsonPos:new Jt.Name("jsonPos"),jsonLen:new Jt.Name("jsonLen"),jsonPart:new Jt.Name("jsonPart")};Mp.default=iA});var ja=D(Zt=>{"use strict";c();Object.defineProperty(Zt,"__esModule",{value:!0});Zt.extendErrors=Zt.resetErrorsCount=Zt.reportExtraError=Zt.reportError=Zt.keyword$DataError=Zt.keywordError=void 0;var ke=de(),Xc=Le(),ar=no(),dx;Zt.keywordError={message:o(({keyword:e})=>(0,ke.str)(dx||(dx=y(['must pass "','" keyword validation'])),e),"message")};var mx,yx;Zt.keyword$DataError={message:o(({keyword:e,schemaType:t})=>t?(0,ke.str)(mx||(mx=y(['"','" keyword must be '," ($data)"])),e,t):(0,ke.str)(yx||(yx=y(['"','" keyword is invalid ($data)'])),e),"message")};var hx;function sA(e,t=Zt.keywordError,r,n){let{it:i}=e,{gen:s,compositeRule:a,allErrors:u}=i,l=Dx(e,t,r);(n!=null?n:a||u)?Lx(s,l):Ux(i,(0,ke._)(hx||(hx=y(["[","]"])),l))}o(sA,"reportError");Zt.reportError=sA;function aA(e,t=Zt.keywordError,r){let{it:n}=e,{gen:i,compositeRule:s,allErrors:a}=n,u=Dx(e,t,r);Lx(i,u),s||a||Ux(n,ar.default.vErrors)}o(aA,"reportExtraError");Zt.reportExtraError=aA;var gx,xx;function cA(e,t){e.assign(ar.default.errors,t),e.if((0,ke._)(gx||(gx=y([""," !== null"])),ar.default.vErrors),()=>e.if(t,()=>e.assign((0,ke._)(xx||(xx=y(["",".length"])),ar.default.vErrors),t),()=>e.assign(ar.default.vErrors,null)))}o(cA,"resetErrorsCount");Zt.resetErrorsCount=cA;var Ix,bx,wx,$x,vx,Ox,_x;function uA({gen:e,keyword:t,schemaValue:r,data:n,errsCount:i,it:s}){if(i===void 0)throw new Error("ajv implementation error");let a=e.name("err");e.forRange("i",i,ar.default.errors,u=>{e.const(a,(0,ke._)(Ix||(Ix=y(["","[","]"])),ar.default.vErrors,u)),e.if((0,ke._)(bx||(bx=y(["",".instancePath === undefined"])),a),()=>e.assign((0,ke._)(wx||(wx=y(["",".instancePath"])),a),(0,ke.strConcat)(ar.default.instancePath,s.errorPath))),e.assign((0,ke._)($x||($x=y(["",".schemaPath"])),a),(0,ke.str)(vx||(vx=y(["","/",""])),s.errSchemaPath,t)),s.opts.verbose&&(e.assign((0,ke._)(Ox||(Ox=y(["",".schema"])),a),r),e.assign((0,ke._)(_x||(_x=y(["",".data"])),a),n))})}o(uA,"extendErrors");Zt.extendErrors=uA;var Sx,Px,Ex,Tx;function Lx(e,t){let r=e.const("err",t);e.if((0,ke._)(Sx||(Sx=y([""," === null"])),ar.default.vErrors),()=>e.assign(ar.default.vErrors,(0,ke._)(Px||(Px=y(["[","]"])),r)),(0,ke._)(Ex||(Ex=y(["",".push(",")"])),ar.default.vErrors,r)),e.code((0,ke._)(Tx||(Tx=y(["","++"])),ar.default.errors))}o(Lx,"addError");var kx,Fx;function Ux(e,t){let{gen:r,validateName:n,schemaEnv:i}=e;i.$async?r.throw((0,ke._)(kx||(kx=y(["new ","(",")"])),e.ValidationError,t)):(r.assign((0,ke._)(Fx||(Fx=y(["",".errors"])),n),t),r.return(!1))}o(Ux,"returnErrors");var $i={keyword:new ke.Name("keyword"),schemaPath:new ke.Name("schemaPath"),params:new ke.Name("params"),propertyName:new ke.Name("propertyName"),message:new ke.Name("message"),schema:new ke.Name("schema"),parentSchema:new ke.Name("parentSchema")},Ax;function Dx(e,t,r){let{createErrors:n}=e.it;return n===!1?(0,ke._)(Ax||(Ax=y(["{}"]))):fA(e,t,r)}o(Dx,"errorObjectCode");function fA(e,t,r={}){let{gen:n,it:i}=e,s=[lA(i,r),pA(e,r)];return dA(e,t,s),n.object(...s)}o(fA,"errorObject");var jx;function lA({errorPath:e},{instancePath:t}){let r=t?(0,ke.str)(jx||(jx=y(["","",""])),e,(0,Xc.getErrorPath)(t,Xc.Type.Str)):e;return[ar.default.instancePath,(0,ke.strConcat)(ar.default.instancePath,r)]}o(lA,"errorInstancePath");var Nx,Rx;function pA({keyword:e,it:{errSchemaPath:t}},{schemaPath:r,parentSchema:n}){let i=n?t:(0,ke.str)(Nx||(Nx=y(["","/",""])),t,e);return r&&(i=(0,ke.str)(Rx||(Rx=y(["","",""])),i,(0,Xc.getErrorPath)(r,Xc.Type.Str))),[$i.schemaPath,i]}o(pA,"errorSchemaPath");var Cx,Mx;function dA(e,{params:t,message:r},n){let{keyword:i,data:s,schemaValue:a,it:u}=e,{opts:l,propertyName:d,topSchemaRef:m,schemaPath:h}=u;n.push([$i.keyword,i],[$i.params,typeof t=="function"?t(e):t||(0,ke._)(Cx||(Cx=y(["{}"])))]),l.messages&&n.push([$i.message,typeof r=="function"?r(e):r]),l.verbose&&n.push([$i.schema,a],[$i.parentSchema,(0,ke._)(Mx||(Mx=y(["","",""])),m,h)],[ar.default.data,s]),d&&n.push([$i.propertyName,d])}o(dA,"extraErrorProps")});var Vx=D(ps=>{"use strict";c();Object.defineProperty(ps,"__esModule",{value:!0});ps.boolOrEmptySchema=ps.topBoolOrEmptySchema=void 0;var mA=ja(),yA=de(),hA=no(),gA={message:"boolean schema is false"},qx;function xA(e){let{gen:t,schema:r,validateName:n}=e;r===!1?zx(e,!1):typeof r=="object"&&r.$async===!0?t.return(hA.default.data):(t.assign((0,yA._)(qx||(qx=y(["",".errors"])),n),null),t.return(!0))}o(xA,"topBoolOrEmptySchema");ps.topBoolOrEmptySchema=xA;function IA(e,t){let{gen:r,schema:n}=e;n===!1?(r.var(t,!1),zx(e)):r.var(t,!0)}o(IA,"boolOrEmptySchema");ps.boolOrEmptySchema=IA;function zx(e,t){let{gen:r,data:n}=e,i={gen:r,keyword:"false schema",data:n,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,mA.reportError)(i,gA,void 0,t)}o(zx,"falseSchemaError")});var Lp=D(ds=>{"use strict";c();Object.defineProperty(ds,"__esModule",{value:!0});ds.getRules=ds.isJSONType=void 0;var bA=["string","number","integer","boolean","null","object","array"],wA=new Set(bA);function $A(e){return typeof e=="string"&&wA.has(e)}o($A,"isJSONType");ds.isJSONType=$A;function vA(){let e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:F(g({},e),{integer:!0,boolean:!0,null:!0}),rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}o(vA,"getRules");ds.getRules=vA});var Up=D(Co=>{"use strict";c();Object.defineProperty(Co,"__esModule",{value:!0});Co.shouldUseRule=Co.shouldUseGroup=Co.schemaHasRulesForType=void 0;function OA({schema:e,self:t},r){let n=t.RULES.types[r];return n&&n!==!0&&Bx(e,n)}o(OA,"schemaHasRulesForType");Co.schemaHasRulesForType=OA;function Bx(e,t){return t.rules.some(r=>Gx(e,r))}o(Bx,"shouldUseGroup");Co.shouldUseGroup=Bx;function Gx(e,t){var r;return e[t.keyword]!==void 0||((r=t.definition.implements)===null||r===void 0?void 0:r.some(n=>e[n]!==void 0))}o(Gx,"shouldUseRule");Co.shouldUseRule=Gx});var Na=D(Yt=>{"use strict";c();Object.defineProperty(Yt,"__esModule",{value:!0});Yt.reportTypeError=Yt.checkDataTypes=Yt.checkDataType=Yt.coerceAndCheckDataType=Yt.getJSONTypes=Yt.getSchemaTypes=Yt.DataType=void 0;var _A=Lp(),SA=Up(),PA=ja(),fe=de(),_I=Le(),ms;(function(e){e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong"})(ms||(Yt.DataType=ms={}));function EA(e){let t=SI(e.type);if(t.includes("null")){if(e.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!t.length&&e.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');e.nullable===!0&&t.push("null")}return t}o(EA,"getSchemaTypes");Yt.getSchemaTypes=EA;function SI(e){let t=Array.isArray(e)?e:e?[e]:[];if(t.every(_A.isJSONType))return t;throw new Error("type must be JSONType or JSONType[]: "+t.join(","))}o(SI,"getJSONTypes");Yt.getJSONTypes=SI;function TA(e,t){let{gen:r,data:n,opts:i}=e,s=kA(t,i.coerceTypes),a=t.length>0&&!(s.length===0&&t.length===1&&(0,SA.schemaHasRulesForType)(e,t[0]));if(a){let u=qp(t,n,i.strictNumbers,ms.Wrong);r.if(u,()=>{s.length?FA(e,t,s):zp(e)})}return a}o(TA,"coerceAndCheckDataType");Yt.coerceAndCheckDataType=TA;var PI=new Set(["string","number","integer","boolean","null"]);function kA(e,t){return t?e.filter(r=>PI.has(r)||t==="array"&&r==="array"):[]}o(kA,"coerceToTypes");var Kx,Wx,Hx,Jx,Zx,Yx,Xx,Qx,eI,tI,rI,nI,oI,iI,sI,aI,cI,uI,fI,lI;function FA(e,t,r){let{gen:n,data:i,opts:s}=e,a=n.let("dataType",(0,fe._)(Kx||(Kx=y(["typeof ",""])),i)),u=n.let("coerced",(0,fe._)(Wx||(Wx=y(["undefined"]))));s.coerceTypes==="array"&&n.if((0,fe._)(Hx||(Hx=y([""," == 'object' && Array.isArray(",") && ",".length == 1"])),a,i,i),()=>n.assign(i,(0,fe._)(Jx||(Jx=y(["","[0]"])),i)).assign(a,(0,fe._)(Zx||(Zx=y(["typeof ",""])),i)).if(qp(t,i,s.strictNumbers),()=>n.assign(u,i))),n.if((0,fe._)(Yx||(Yx=y([""," !== undefined"])),u));for(let d of r)(PI.has(d)||d==="array"&&s.coerceTypes==="array")&&l(d);n.else(),zp(e),n.endIf(),n.if((0,fe._)(Xx||(Xx=y([""," !== undefined"])),u),()=>{n.assign(i,u),AA(e,u)});function l(d){switch(d){case"string":n.elseIf((0,fe._)(Qx||(Qx=y(["",' == "number" || ',' == "boolean"'])),a,a)).assign(u,(0,fe._)(eI||(eI=y(['"" + ',""])),i)).elseIf((0,fe._)(tI||(tI=y([""," === null"])),i)).assign(u,(0,fe._)(rI||(rI=y(['""']))));return;case"number":n.elseIf((0,fe._)(nI||(nI=y(["",' == "boolean" || '," === null\n || (",' == "string" && '," && "," == +",")"])),a,i,a,i,i,i)).assign(u,(0,fe._)(oI||(oI=y(["+",""])),i));return;case"integer":n.elseIf((0,fe._)(iI||(iI=y(["",' === "boolean" || '," === null\n || (",' === "string" && '," && "," == +"," && !("," % 1))"])),a,i,a,i,i,i,i)).assign(u,(0,fe._)(sI||(sI=y(["+",""])),i));return;case"boolean":n.elseIf((0,fe._)(aI||(aI=y(["",' === "false" || '," === 0 || "," === null"])),i,i,i)).assign(u,!1).elseIf((0,fe._)(cI||(cI=y(["",' === "true" || '," === 1"])),i,i)).assign(u,!0);return;case"null":n.elseIf((0,fe._)(uI||(uI=y(["",' === "" || '," === 0 || "," === false"])),i,i,i)),n.assign(u,null);return;case"array":n.elseIf((0,fe._)(fI||(fI=y(["",' === "string" || ',' === "number"\n || ',' === "boolean" || '," === null"])),a,a,a,i)).assign(u,(0,fe._)(lI||(lI=y(["[","]"])),i))}}o(l,"coerceSpecificType")}o(FA,"coerceData");var pI,dI;function AA({gen:e,parentData:t,parentDataProperty:r},n){e.if((0,fe._)(pI||(pI=y([""," !== undefined"])),t),()=>e.assign((0,fe._)(dI||(dI=y(["","[","]"])),t,r),n))}o(AA,"assignParentData");var mI,yI,hI,gI,xI,II,bI;function Dp(e,t,r,n=ms.Correct){let i=n===ms.Correct?fe.operators.EQ:fe.operators.NEQ,s;switch(e){case"null":return(0,fe._)(mI||(mI=y([""," "," null"])),t,i);case"array":s=(0,fe._)(yI||(yI=y(["Array.isArray(",")"])),t);break;case"object":s=(0,fe._)(hI||(hI=y([""," && typeof ",' == "object" && !Array.isArray(',")"])),t,t,t);break;case"integer":s=a((0,fe._)(gI||(gI=y(["!("," % 1) && !isNaN(",")"])),t,t));break;case"number":s=a();break;default:return(0,fe._)(xI||(xI=y(["typeof "," "," ",""])),t,i,e)}return n===ms.Correct?s:(0,fe.not)(s);function a(u=fe.nil){return(0,fe.and)((0,fe._)(II||(II=y(["typeof ",' == "number"'])),t),u,r?(0,fe._)(bI||(bI=y(["isFinite(",")"])),t):fe.nil)}}o(Dp,"checkDataType");Yt.checkDataType=Dp;var wI,$I;function qp(e,t,r,n){if(e.length===1)return Dp(e[0],t,r,n);let i,s=(0,_I.toHash)(e);if(s.array&&s.object){let a=(0,fe._)(wI||(wI=y(["typeof ",' != "object"'])),t);i=s.null?a:(0,fe._)($I||($I=y(["!"," || ",""])),t,a),delete s.null,delete s.array,delete s.object}else i=fe.nil;s.number&&delete s.integer;for(let a in s)i=(0,fe.and)(i,Dp(a,t,r,n));return i}o(qp,"checkDataTypes");Yt.checkDataTypes=qp;var vI,OI,jA={message:o(({schema:e})=>"must be ".concat(e),"message"),params:o(({schema:e,schemaValue:t})=>typeof e=="string"?(0,fe._)(vI||(vI=y(["{type: ","}"])),e):(0,fe._)(OI||(OI=y(["{type: ","}"])),t),"params")};function zp(e){let t=NA(e);(0,PA.reportError)(t,jA)}o(zp,"reportTypeError");Yt.reportTypeError=zp;function NA(e){let{gen:t,data:r,schema:n}=e,i=(0,_I.schemaRefOrVal)(e,n,"type");return{gen:t,keyword:"type",data:r,schema:n.type,schemaCode:i,schemaValue:i,parentSchema:n,params:{},it:e}}o(NA,"getTypeErrorContext")});var jI=D(Qc=>{"use strict";c();Object.defineProperty(Qc,"__esModule",{value:!0});Qc.assignDefaults=void 0;var ys=de(),RA=Le();function CA(e,t){let{properties:r,items:n}=e.schema;if(t==="object"&&r)for(let i in r)EI(e,i,r[i].default);else t==="array"&&Array.isArray(n)&&n.forEach((i,s)=>EI(e,s,i.default))}o(CA,"assignDefaults");Qc.assignDefaults=CA;var TI,kI,FI,AI;function EI(e,t,r){let{gen:n,compositeRule:i,data:s,opts:a}=e;if(r===void 0)return;let u=(0,ys._)(TI||(TI=y(["","",""])),s,(0,ys.getProperty)(t));if(i){(0,RA.checkStrictMode)(e,"default is ignored for: ".concat(u));return}let l=(0,ys._)(kI||(kI=y([""," === undefined"])),u);a.useDefaults==="empty"&&(l=(0,ys._)(FI||(FI=y([""," || "," === null || ",' === ""'])),l,u,u)),n.if(l,(0,ys._)(AI||(AI=y([""," = ",""])),u,(0,ys.stringify)(r)))}o(EI,"assignDefault")});var Ur=D(Ye=>{"use strict";c();Object.defineProperty(Ye,"__esModule",{value:!0});Ye.validateUnion=Ye.validateArray=Ye.usePattern=Ye.callValidateCode=Ye.schemaProperties=Ye.allSchemaProperties=Ye.noPropertyInData=Ye.propertyInData=Ye.isOwnProperty=Ye.hasPropFunc=Ye.reportMissingProp=Ye.checkMissingProp=Ye.checkReportMissingProp=void 0;var ut=de(),Vp=Le(),Mo=no(),MA=Le(),NI;function LA(e,t){let{gen:r,data:n,it:i}=e;r.if(Gp(r,n,t,i.opts.ownProperties),()=>{e.setParams({missingProperty:(0,ut._)(NI||(NI=y(["",""])),t)},!0),e.error()})}o(LA,"checkReportMissingProp");Ye.checkReportMissingProp=LA;var RI;function UA({gen:e,data:t,it:{opts:r}},n,i){return(0,ut.or)(...n.map(s=>(0,ut.and)(Gp(e,t,s,r.ownProperties),(0,ut._)(RI||(RI=y([""," = ",""])),i,s))))}o(UA,"checkMissingProp");Ye.checkMissingProp=UA;function DA(e,t){e.setParams({missingProperty:t},!0),e.error()}o(DA,"reportMissingProp");Ye.reportMissingProp=DA;var CI;function JI(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,ut._)(CI||(CI=y(["Object.prototype.hasOwnProperty"])))})}o(JI,"hasPropFunc");Ye.hasPropFunc=JI;var MI;function Bp(e,t,r){return(0,ut._)(MI||(MI=y(["",".call(",", ",")"])),JI(e),t,r)}o(Bp,"isOwnProperty");Ye.isOwnProperty=Bp;var LI,UI;function qA(e,t,r,n){let i=(0,ut._)(LI||(LI=y(["",""," !== undefined"])),t,(0,ut.getProperty)(r));return n?(0,ut._)(UI||(UI=y([""," && ",""])),i,Bp(e,t,r)):i}o(qA,"propertyInData");Ye.propertyInData=qA;var DI;function Gp(e,t,r,n){let i=(0,ut._)(DI||(DI=y(["",""," === undefined"])),t,(0,ut.getProperty)(r));return n?(0,ut.or)(i,(0,ut.not)(Bp(e,t,r))):i}o(Gp,"noPropertyInData");Ye.noPropertyInData=Gp;function ZI(e){return e?Object.keys(e).filter(t=>t!=="__proto__"):[]}o(ZI,"allSchemaProperties");Ye.allSchemaProperties=ZI;function zA(e,t){return ZI(t).filter(r=>!(0,Vp.alwaysValidSchema)(e,t[r]))}o(zA,"schemaProperties");Ye.schemaProperties=zA;var qI,zI,VI,BI;function VA({schemaCode:e,data:t,it:{gen:r,topSchemaRef:n,schemaPath:i,errorPath:s},it:a},u,l,d){let m=d?(0,ut._)(qI||(qI=y(["",", ",", ","",""])),e,t,n,i):t,h=[[Mo.default.instancePath,(0,ut.strConcat)(Mo.default.instancePath,s)],[Mo.default.parentData,a.parentData],[Mo.default.parentDataProperty,a.parentDataProperty],[Mo.default.rootData,Mo.default.rootData]];a.opts.dynamicRef&&h.push([Mo.default.dynamicAnchors,Mo.default.dynamicAnchors]);let b=(0,ut._)(zI||(zI=y(["",", ",""])),m,r.object(...h));return l!==ut.nil?(0,ut._)(VI||(VI=y(["",".call(",", ",")"])),u,l,b):(0,ut._)(BI||(BI=y(["","(",")"])),u,b)}o(VA,"callValidateCode");Ye.callValidateCode=VA;var GI,BA=(0,ut._)(GI||(GI=y(["new RegExp"]))),KI;function GA({gen:e,it:{opts:t}},r){let n=t.unicodeRegExp?"u":"",{regExp:i}=t.code,s=i(r,n);return e.scopeValue("pattern",{key:s.toString(),ref:s,code:(0,ut._)(KI||(KI=y(["","(",", ",")"])),i.code==="new RegExp"?BA:(0,MA.useFunc)(e,i),r,n)})}o(GA,"usePattern");Ye.usePattern=GA;var WI;function KA(e){let{gen:t,data:r,keyword:n,it:i}=e,s=t.name("valid");if(i.allErrors){let u=t.let("valid",!0);return a(()=>t.assign(u,!1)),u}return t.var(s,!0),a(()=>t.break()),s;function a(u){let l=t.const("len",(0,ut._)(WI||(WI=y(["",".length"])),r));t.forRange("i",0,l,d=>{e.subschema({keyword:n,dataProp:d,dataPropType:Vp.Type.Num},s),t.if((0,ut.not)(s),u)})}o(a,"validateItems")}o(KA,"validateArray");Ye.validateArray=KA;var HI;function WA(e){let{gen:t,schema:r,keyword:n,it:i}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(r.some(l=>(0,Vp.alwaysValidSchema)(i,l))&&!i.opts.unevaluated)return;let a=t.let("valid",!1),u=t.name("_valid");t.block(()=>r.forEach((l,d)=>{let m=e.subschema({keyword:n,schemaProp:d,compositeRule:!0},u);t.assign(a,(0,ut._)(HI||(HI=y([""," || ",""])),a,u)),e.mergeValidEvaluated(m,u)||t.if((0,ut.not)(a))})),e.result(a,()=>e.reset(),()=>e.error(!0))}o(WA,"validateUnion");Ye.validateUnion=WA});var ub=D(Sn=>{"use strict";c();Object.defineProperty(Sn,"__esModule",{value:!0});Sn.validateKeywordUsage=Sn.validSchemaType=Sn.funcKeywordCode=Sn.macroKeywordCode=void 0;var cr=de(),vi=no(),HA=Ur(),JA=ja();function ZA(e,t){let{gen:r,keyword:n,schema:i,parentSchema:s,it:a}=e,u=t.macro.call(a.self,i,s,a),l=cb(r,n,u);a.opts.validateSchema!==!1&&a.self.validateSchema(u,!0);let d=r.name("valid");e.subschema({schema:u,schemaPath:cr.nil,errSchemaPath:"".concat(a.errSchemaPath,"/").concat(n),topSchemaRef:l,compositeRule:!0},d),e.pass(d,()=>e.error(!0))}o(ZA,"macroKeywordCode");Sn.macroKeywordCode=ZA;var XI,QI,eb,tb,rb,nb;function YA(e,t){var r;let{gen:n,keyword:i,schema:s,parentSchema:a,$data:u,it:l}=e;QA(l,t);let d=!u&&t.compile?t.compile.call(l.self,s,a,l):t.validate,m=cb(n,i,d),h=n.let("valid");e.block$data(h,b),e.ok((r=t.valid)!==null&&r!==void 0?r:h);function b(){if(t.errors===!1)_(),t.modifying&&YI(e),E(()=>e.error());else{let k=t.async?$():O();t.modifying&&YI(e),E(()=>XA(e,k))}}o(b,"validateKeyword");function $(){let k=n.let("ruleErrs",null);return n.try(()=>_((0,cr._)(XI||(XI=y(["await "])))),G=>n.assign(h,!1).if((0,cr._)(QI||(QI=y([""," instanceof ",""])),G,l.ValidationError),()=>n.assign(k,(0,cr._)(eb||(eb=y(["",".errors"])),G)),()=>n.throw(G))),k}o($,"validateAsync");function O(){let k=(0,cr._)(tb||(tb=y(["",".errors"])),m);return n.assign(k,null),_(cr.nil),k}o(O,"validateSync");function _(k=t.async?(0,cr._)(rb||(rb=y(["await "]))):cr.nil){let G=l.opts.passContext?vi.default.this:vi.default.self,R=!("compile"in t&&!u||t.schema===!1);n.assign(h,(0,cr._)(nb||(nb=y(["","",""])),k,(0,HA.callValidateCode)(e,m,G,R)),t.modifying)}o(_,"assignValid");function E(k){var G;n.if((0,cr.not)((G=t.valid)!==null&&G!==void 0?G:h),k)}o(E,"reportErrs")}o(YA,"funcKeywordCode");Sn.funcKeywordCode=YA;var ob;function YI(e){let{gen:t,data:r,it:n}=e;t.if(n.parentData,()=>t.assign(r,(0,cr._)(ob||(ob=y(["","[","]"])),n.parentData,n.parentDataProperty)))}o(YI,"modifyData");var ib,sb,ab;function XA(e,t){let{gen:r}=e;r.if((0,cr._)(ib||(ib=y(["Array.isArray(",")"])),t),()=>{r.assign(vi.default.vErrors,(0,cr._)(sb||(sb=y([""," === null ? "," : ",".concat(",")"])),vi.default.vErrors,t,vi.default.vErrors,t)).assign(vi.default.errors,(0,cr._)(ab||(ab=y(["",".length"])),vi.default.vErrors)),(0,JA.extendErrors)(e)},()=>e.error())}o(XA,"addErrs");function QA({schemaEnv:e},t){if(t.async&&!e.$async)throw new Error("async keyword in sync schema")}o(QA,"checkAsyncKeyword");function cb(e,t,r){if(r===void 0)throw new Error('keyword "'.concat(t,'" failed to compile'));return e.scopeValue("keyword",typeof r=="function"?{ref:r}:{ref:r,code:(0,cr.stringify)(r)})}o(cb,"useKeyword");function ej(e,t,r=!1){return!t.length||t.some(n=>n==="array"?Array.isArray(e):n==="object"?e&&typeof e=="object"&&!Array.isArray(e):typeof e==n||r&&typeof e>"u")}o(ej,"validSchemaType");Sn.validSchemaType=ej;function tj({schema:e,opts:t,self:r,errSchemaPath:n},i,s){if(Array.isArray(i.keyword)?!i.keyword.includes(s):i.keyword!==s)throw new Error("ajv implementation error");let a=i.dependencies;if(a!=null&&a.some(u=>!Object.prototype.hasOwnProperty.call(e,u)))throw new Error("parent schema must have dependencies of ".concat(s,": ").concat(a.join(",")));if(i.validateSchema&&!i.validateSchema(e[s])){let l='keyword "'.concat(s,'" value is invalid at path "').concat(n,'": ')+r.errorsText(i.validateSchema.errors);if(t.validateSchema==="log")r.logger.error(l);else throw new Error(l)}}o(tj,"validateKeywordUsage");Sn.validateKeywordUsage=tj});var hb=D(Lo=>{"use strict";c();Object.defineProperty(Lo,"__esModule",{value:!0});Lo.extendSubschemaMode=Lo.extendSubschemaData=Lo.getSubschema=void 0;var Pn=de(),yb=Le(),fb,lb;function rj(e,{keyword:t,schemaProp:r,schema:n,schemaPath:i,errSchemaPath:s,topSchemaRef:a}){if(t!==void 0&&n!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(t!==void 0){let u=e.schema[t];return r===void 0?{schema:u,schemaPath:(0,Pn._)(fb||(fb=y(["","",""])),e.schemaPath,(0,Pn.getProperty)(t)),errSchemaPath:"".concat(e.errSchemaPath,"/").concat(t)}:{schema:u[r],schemaPath:(0,Pn._)(lb||(lb=y(["","","",""])),e.schemaPath,(0,Pn.getProperty)(t),(0,Pn.getProperty)(r)),errSchemaPath:"".concat(e.errSchemaPath,"/").concat(t,"/").concat((0,yb.escapeFragment)(r))}}if(n!==void 0){if(i===void 0||s===void 0||a===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:n,schemaPath:i,topSchemaRef:a,errSchemaPath:s}}throw new Error('either "keyword" or "schema" must be passed')}o(rj,"getSubschema");Lo.getSubschema=rj;var pb,db,mb;function nj(e,t,{dataProp:r,dataPropType:n,data:i,dataTypes:s,propertyName:a}){if(i!==void 0&&r!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');let{gen:u}=t;if(r!==void 0){let{errorPath:d,dataPathArr:m,opts:h}=t,b=u.let("data",(0,Pn._)(pb||(pb=y(["","",""])),t.data,(0,Pn.getProperty)(r)),!0);l(b),e.errorPath=(0,Pn.str)(db||(db=y(["","",""])),d,(0,yb.getErrorPath)(r,n,h.jsPropertySyntax)),e.parentDataProperty=(0,Pn._)(mb||(mb=y(["",""])),r),e.dataPathArr=[...m,e.parentDataProperty]}if(i!==void 0){let d=i instanceof Pn.Name?i:u.let("data",i,!0);l(d),a!==void 0&&(e.propertyName=a)}s&&(e.dataTypes=s);function l(d){e.data=d,e.dataLevel=t.dataLevel+1,e.dataTypes=[],t.definedProperties=new Set,e.parentData=t.data,e.dataNames=[...t.dataNames,d]}o(l,"dataContextProps")}o(nj,"extendSubschemaData");Lo.extendSubschemaData=nj;function oj(e,{jtdDiscriminator:t,jtdMetadata:r,compositeRule:n,createErrors:i,allErrors:s}){n!==void 0&&(e.compositeRule=n),i!==void 0&&(e.createErrors=i),s!==void 0&&(e.allErrors=s),e.jtdDiscriminator=t,e.jtdMetadata=r}o(oj,"extendSubschemaMode");Lo.extendSubschemaMode=oj});var Kp=D((qK,gb)=>{"use strict";c();gb.exports=o(function e(t,r){if(t===r)return!0;if(t&&r&&typeof t=="object"&&typeof r=="object"){if(t.constructor!==r.constructor)return!1;var n,i,s;if(Array.isArray(t)){if(n=t.length,n!=r.length)return!1;for(i=n;i--!==0;)if(!e(t[i],r[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if(s=Object.keys(t),n=s.length,n!==Object.keys(r).length)return!1;for(i=n;i--!==0;)if(!Object.prototype.hasOwnProperty.call(r,s[i]))return!1;for(i=n;i--!==0;){var a=s[i];if(!e(t[a],r[a]))return!1}return!0}return t!==t&&r!==r},"equal")});var Ib=D((BK,xb)=>{"use strict";c();var Uo=xb.exports=function(e,t,r){typeof t=="function"&&(r=t,t={}),r=t.cb||r;var n=typeof r=="function"?r:r.pre||function(){},i=r.post||function(){};eu(t,n,i,e,"",e)};Uo.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};Uo.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};Uo.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};Uo.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 eu(e,t,r,n,i,s,a,u,l,d){if(n&&typeof n=="object"&&!Array.isArray(n)){t(n,i,s,a,u,l,d);for(var m in n){var h=n[m];if(Array.isArray(h)){if(m in Uo.arrayKeywords)for(var b=0;b<h.length;b++)eu(e,t,r,h[b],i+"/"+m+"/"+b,s,i,m,n,b)}else if(m in Uo.propsKeywords){if(h&&typeof h=="object")for(var $ in h)eu(e,t,r,h[$],i+"/"+m+"/"+ij($),s,i,m,n,$)}else(m in Uo.keywords||e.allKeys&&!(m in Uo.skipKeywords))&&eu(e,t,r,h,i+"/"+m,s,i,m,n)}r(n,i,s,a,u,l,d)}}o(eu,"_traverse");function ij(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}o(ij,"escapeJsonPtr")});var Ra=D(xr=>{"use strict";c();Object.defineProperty(xr,"__esModule",{value:!0});xr.getSchemaRefs=xr.resolveUrl=xr.normalizeId=xr._getFullPath=xr.getFullPath=xr.inlineRef=void 0;var sj=Le(),aj=Kp(),cj=Ib(),uj=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function fj(e,t=!0){return typeof e=="boolean"?!0:t===!0?!Wp(e):t?bb(e)<=t:!1}o(fj,"inlineRef");xr.inlineRef=fj;var lj=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function Wp(e){for(let t in e){if(lj.has(t))return!0;let r=e[t];if(Array.isArray(r)&&r.some(Wp)||typeof r=="object"&&Wp(r))return!0}return!1}o(Wp,"hasRef");function bb(e){let t=0;for(let r in e){if(r==="$ref")return 1/0;if(t++,!uj.has(r)&&(typeof e[r]=="object"&&(0,sj.eachItem)(e[r],n=>t+=bb(n)),t===1/0))return 1/0}return t}o(bb,"countKeys");function wb(e,t="",r){r!==!1&&(t=hs(t));let n=e.parse(t);return $b(e,n)}o(wb,"getFullPath");xr.getFullPath=wb;function $b(e,t){return e.serialize(t).split("#")[0]+"#"}o($b,"_getFullPath");xr._getFullPath=$b;var pj=/#\/?$/;function hs(e){return e?e.replace(pj,""):""}o(hs,"normalizeId");xr.normalizeId=hs;function dj(e,t,r){return r=hs(r),e.resolve(t,r)}o(dj,"resolveUrl");xr.resolveUrl=dj;var mj=/^[a-z_][-a-z0-9._]*$/i;function yj(e,t){if(typeof e=="boolean")return{};let{schemaId:r,uriResolver:n}=this.opts,i=hs(e[r]||t),s={"":i},a=wb(n,i,!1),u={},l=new Set;return cj(e,{allKeys:!0},(h,b,$,O)=>{if(O===void 0)return;let _=a+b,E=s[O];typeof h[r]=="string"&&(E=k.call(this,h[r])),G.call(this,h.$anchor),G.call(this,h.$dynamicAnchor),s[b]=E;function k(R){let N=this.opts.uriResolver.resolve;if(R=hs(E?N(E,R):R),l.has(R))throw m(R);l.add(R);let C=this.refs[R];return typeof C=="string"&&(C=this.refs[C]),typeof C=="object"?d(h,C.schema,R):R!==hs(_)&&(R[0]==="#"?(d(h,u[R],R),u[R]=h):this.refs[R]=_),R}o(k,"addRef");function G(R){if(typeof R=="string"){if(!mj.test(R))throw new Error('invalid anchor "'.concat(R,'"'));k.call(this,"#".concat(R))}}o(G,"addAnchor")}),u;function d(h,b,$){if(b!==void 0&&!aj(h,b))throw m($)}o(d,"checkAmbiguosRef");function m(h){return new Error('reference "'.concat(h,'" resolves to more than one schema'))}o(m,"ambiguos")}o(yj,"getSchemaRefs");xr.getSchemaRefs=yj});var La=D(Do=>{"use strict";c();Object.defineProperty(Do,"__esModule",{value:!0});Do.getData=Do.KeywordCxt=Do.validateFunctionCode=void 0;var p0=Vx(),vb=Na(),Jp=Up(),tu=Na(),hj=jI(),Ma=ub(),Hp=hb(),Y=de(),ie=no(),gj=Ra(),oo=Le(),Ca=ja();function xj(e){if(y0(e)&&(h0(e),m0(e))){wj(e);return}d0(e,()=>(0,p0.topBoolOrEmptySchema)(e))}o(xj,"validateFunctionCode");Do.validateFunctionCode=xj;var Pb,Eb,Tb;function d0({gen:e,validateName:t,schema:r,schemaEnv:n,opts:i},s){i.code.es5?e.func(t,(0,Y._)(Pb||(Pb=y(["",", ",""])),ie.default.data,ie.default.valCxt),n.$async,()=>{e.code((0,Y._)(Eb||(Eb=y(['"use strict"; ',""])),Ob(r,i))),bj(e,i),e.code(s)}):e.func(t,(0,Y._)(Tb||(Tb=y(["",", ",""])),ie.default.data,Ij(i)),n.$async,()=>e.code(Ob(r,i)).code(s))}o(d0,"validateFunction");var kb,Fb;function Ij(e){return(0,Y._)(Fb||(Fb=y(["{",'="", ',", ",", ","=","","}={}"])),ie.default.instancePath,ie.default.parentData,ie.default.parentDataProperty,ie.default.rootData,ie.default.data,e.dynamicRef?(0,Y._)(kb||(kb=y([", ","={}"])),ie.default.dynamicAnchors):Y.nil)}o(Ij,"destructureValCxt");var Ab,jb,Nb,Rb,Cb,Mb,Lb,Ub,Db;function bj(e,t){e.if(ie.default.valCxt,()=>{e.var(ie.default.instancePath,(0,Y._)(Ab||(Ab=y(["",".",""])),ie.default.valCxt,ie.default.instancePath)),e.var(ie.default.parentData,(0,Y._)(jb||(jb=y(["",".",""])),ie.default.valCxt,ie.default.parentData)),e.var(ie.default.parentDataProperty,(0,Y._)(Nb||(Nb=y(["",".",""])),ie.default.valCxt,ie.default.parentDataProperty)),e.var(ie.default.rootData,(0,Y._)(Rb||(Rb=y(["",".",""])),ie.default.valCxt,ie.default.rootData)),t.dynamicRef&&e.var(ie.default.dynamicAnchors,(0,Y._)(Cb||(Cb=y(["",".",""])),ie.default.valCxt,ie.default.dynamicAnchors))},()=>{e.var(ie.default.instancePath,(0,Y._)(Mb||(Mb=y(['""'])))),e.var(ie.default.parentData,(0,Y._)(Lb||(Lb=y(["undefined"])))),e.var(ie.default.parentDataProperty,(0,Y._)(Ub||(Ub=y(["undefined"])))),e.var(ie.default.rootData,ie.default.data),t.dynamicRef&&e.var(ie.default.dynamicAnchors,(0,Y._)(Db||(Db=y(["{}"]))))})}o(bj,"destructureValCxtES5");function wj(e){let{schema:t,opts:r,gen:n}=e;d0(e,()=>{r.$comment&&t.$comment&&x0(e),Sj(e),n.let(ie.default.vErrors,null),n.let(ie.default.errors,0),r.unevaluated&&$j(e),g0(e),Tj(e)})}o(wj,"topSchemaObjCode");var qb,zb,Vb,Bb,Gb,Kb,Wb;function $j(e){let{gen:t,validateName:r}=e;e.evaluated=t.const("evaluated",(0,Y._)(qb||(qb=y(["",".evaluated"])),r)),t.if((0,Y._)(zb||(zb=y(["",".dynamicProps"])),e.evaluated),()=>t.assign((0,Y._)(Vb||(Vb=y(["",".props"])),e.evaluated),(0,Y._)(Bb||(Bb=y(["undefined"]))))),t.if((0,Y._)(Gb||(Gb=y(["",".dynamicItems"])),e.evaluated),()=>t.assign((0,Y._)(Kb||(Kb=y(["",".items"])),e.evaluated),(0,Y._)(Wb||(Wb=y(["undefined"])))))}o($j,"resetEvaluated");var Hb;function Ob(e,t){let r=typeof e=="object"&&e[t.schemaId];return r&&(t.code.source||t.code.process)?(0,Y._)(Hb||(Hb=y(["/*# sourceURL="," */"])),r):Y.nil}o(Ob,"funcSourceUrl");function vj(e,t){if(y0(e)&&(h0(e),m0(e))){Oj(e,t);return}(0,p0.boolOrEmptySchema)(e,t)}o(vj,"subschemaCode");function m0({schema:e,self:t}){if(typeof e=="boolean")return!e;for(let r in e)if(t.RULES.all[r])return!0;return!1}o(m0,"schemaCxtHasRules");function y0(e){return typeof e.schema!="boolean"}o(y0,"isSchemaObj");var Jb;function Oj(e,t){let{schema:r,gen:n,opts:i}=e;i.$comment&&r.$comment&&x0(e),Pj(e),Ej(e);let s=n.const("_errs",ie.default.errors);g0(e,s),n.var(t,(0,Y._)(Jb||(Jb=y([""," === ",""])),s,ie.default.errors))}o(Oj,"subSchemaObjCode");function h0(e){(0,oo.checkUnknownRules)(e),_j(e)}o(h0,"checkKeywords");function g0(e,t){if(e.opts.jtd)return _b(e,[],!1,t);let r=(0,vb.getSchemaTypes)(e.schema),n=(0,vb.coerceAndCheckDataType)(e,r);_b(e,r,!n,t)}o(g0,"typeAndKeywords");function _j(e){let{schema:t,errSchemaPath:r,opts:n,self:i}=e;t.$ref&&n.ignoreKeywordsWithRef&&(0,oo.schemaHasRulesButRef)(t,i.RULES)&&i.logger.warn('$ref: keywords ignored in schema at path "'.concat(r,'"'))}o(_j,"checkRefsAndKeywords");function Sj(e){let{schema:t,opts:r}=e;t.default!==void 0&&r.useDefaults&&r.strictSchema&&(0,oo.checkStrictMode)(e,"default is ignored in the schema root")}o(Sj,"checkNoDefault");function Pj(e){let t=e.schema[e.opts.schemaId];t&&(e.baseId=(0,gj.resolveUrl)(e.opts.uriResolver,e.baseId,t))}o(Pj,"updateContext");function Ej(e){if(e.schema.$async&&!e.schemaEnv.$async)throw new Error("async schema in sync schema")}o(Ej,"checkAsyncSchema");var Zb,Yb,Xb;function x0({gen:e,schemaEnv:t,schema:r,errSchemaPath:n,opts:i}){let s=r.$comment;if(i.$comment===!0)e.code((0,Y._)(Zb||(Zb=y(["",".logger.log(",")"])),ie.default.self,s));else if(typeof i.$comment=="function"){let a=(0,Y.str)(Yb||(Yb=y(["","/$comment"])),n),u=e.scopeValue("root",{ref:t.root});e.code((0,Y._)(Xb||(Xb=y(["",".opts.$comment(",", ",", ",".schema)"])),ie.default.self,s,a,u))}}o(x0,"commentKeyword");var Qb,e0,t0,r0;function Tj(e){let{gen:t,schemaEnv:r,validateName:n,ValidationError:i,opts:s}=e;r.$async?t.if((0,Y._)(Qb||(Qb=y([""," === 0"])),ie.default.errors),()=>t.return(ie.default.data),()=>t.throw((0,Y._)(e0||(e0=y(["new ","(",")"])),i,ie.default.vErrors))):(t.assign((0,Y._)(t0||(t0=y(["",".errors"])),n),ie.default.vErrors),s.unevaluated&&kj(e),t.return((0,Y._)(r0||(r0=y([""," === 0"])),ie.default.errors)))}o(Tj,"returnResults");var n0,o0;function kj({gen:e,evaluated:t,props:r,items:n}){r instanceof Y.Name&&e.assign((0,Y._)(n0||(n0=y(["",".props"])),t),r),n instanceof Y.Name&&e.assign((0,Y._)(o0||(o0=y(["",".items"])),t),n)}o(kj,"assignEvaluated");var i0;function _b(e,t,r,n){let{gen:i,schema:s,data:a,allErrors:u,opts:l,self:d}=e,{RULES:m}=d;if(s.$ref&&(l.ignoreKeywordsWithRef||!(0,oo.schemaHasRulesButRef)(s,m))){i.block(()=>b0(e,"$ref",m.all.$ref.definition));return}l.jtd||Fj(e,t),i.block(()=>{for(let b of m.rules)h(b);h(m.post)});function h(b){(0,Jp.shouldUseGroup)(s,b)&&(b.type?(i.if((0,tu.checkDataType)(b.type,a,l.strictNumbers)),Sb(e,b),t.length===1&&t[0]===b.type&&r&&(i.else(),(0,tu.reportTypeError)(e)),i.endIf()):Sb(e,b),u||i.if((0,Y._)(i0||(i0=y([""," === ",""])),ie.default.errors,n||0)))}o(h,"groupKeywords")}o(_b,"schemaKeywords");function Sb(e,t){let{gen:r,schema:n,opts:{useDefaults:i}}=e;i&&(0,hj.assignDefaults)(e,t.type),r.block(()=>{for(let s of t.rules)(0,Jp.shouldUseRule)(n,s)&&b0(e,s.keyword,s.definition,t.type)})}o(Sb,"iterateKeywords");function Fj(e,t){e.schemaEnv.meta||!e.opts.strictTypes||(Aj(e,t),e.opts.allowUnionTypes||jj(e,t),Nj(e,e.dataTypes))}o(Fj,"checkStrictTypes");function Aj(e,t){if(t.length){if(!e.dataTypes.length){e.dataTypes=t;return}t.forEach(r=>{I0(e.dataTypes,r)||Zp(e,'type "'.concat(r,'" not allowed by context "').concat(e.dataTypes.join(","),'"'))}),Cj(e,t)}}o(Aj,"checkContextTypes");function jj(e,t){t.length>1&&!(t.length===2&&t.includes("null"))&&Zp(e,"use allowUnionTypes to allow union type keyword")}o(jj,"checkMultipleTypes");function Nj(e,t){let r=e.self.RULES.all;for(let n in r){let i=r[n];if(typeof i=="object"&&(0,Jp.shouldUseRule)(e.schema,i)){let{type:s}=i.definition;s.length&&!s.some(a=>Rj(t,a))&&Zp(e,'missing type "'.concat(s.join(","),'" for keyword "').concat(n,'"'))}}}o(Nj,"checkKeywordTypes");function Rj(e,t){return e.includes(t)||t==="number"&&e.includes("integer")}o(Rj,"hasApplicableType");function I0(e,t){return e.includes(t)||t==="integer"&&e.includes("number")}o(I0,"includesType");function Cj(e,t){let r=[];for(let n of e.dataTypes)I0(t,n)?r.push(n):t.includes("integer")&&n==="number"&&r.push("integer");e.dataTypes=r}o(Cj,"narrowSchemaTypes");function Zp(e,t){let r=e.schemaEnv.baseId+e.errSchemaPath;t+=' at "'.concat(r,'" (strictTypes)'),(0,oo.checkStrictMode)(e,t,e.opts.strictTypes)}o(Zp,"strictTypesError");var s0,a0,c0,u0,Yp=class Yp{constructor(t,r,n){if((0,Ma.validateKeywordUsage)(t,r,n),this.gen=t.gen,this.allErrors=t.allErrors,this.keyword=n,this.data=t.data,this.schema=t.schema[n],this.$data=r.$data&&t.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,oo.schemaRefOrVal)(t,this.schema,n,this.$data),this.schemaType=r.schemaType,this.parentSchema=t.schema,this.params={},this.it=t,this.def=r,this.$data)this.schemaCode=t.gen.const("vSchema",w0(this.$data,t));else if(this.schemaCode=this.schemaValue,!(0,Ma.validSchemaType)(this.schema,r.schemaType,r.allowUndefined))throw new Error("".concat(n," value must be ").concat(JSON.stringify(r.schemaType)));("code"in r?r.trackErrors:r.errors!==!1)&&(this.errsCount=t.gen.const("_errs",ie.default.errors))}result(t,r,n){this.failResult((0,Y.not)(t),r,n)}failResult(t,r,n){this.gen.if(t),n?n():this.error(),r?(this.gen.else(),r(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(t,r){this.failResult((0,Y.not)(t),void 0,r)}fail(t){if(t===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(t),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(t){if(!this.$data)return this.fail(t);let{schemaCode:r}=this;this.fail((0,Y._)(s0||(s0=y([""," !== undefined && (",")"])),r,(0,Y.or)(this.invalid$data(),t)))}error(t,r,n){if(r){this.setParams(r),this._error(t,n),this.setParams({});return}this._error(t,n)}_error(t,r){(t?Ca.reportExtraError:Ca.reportError)(this,this.def.error,r)}$dataError(){(0,Ca.reportError)(this,this.def.$dataError||Ca.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,Ca.resetErrorsCount)(this.gen,this.errsCount)}ok(t){this.allErrors||this.gen.if(t)}setParams(t,r){r?Object.assign(this.params,t):this.params=t}block$data(t,r,n=Y.nil){this.gen.block(()=>{this.check$data(t,n),r()})}check$data(t=Y.nil,r=Y.nil){if(!this.$data)return;let{gen:n,schemaCode:i,schemaType:s,def:a}=this;n.if((0,Y.or)((0,Y._)(a0||(a0=y([""," === undefined"])),i),r)),t!==Y.nil&&n.assign(t,!0),(s.length||a.validateSchema)&&(n.elseIf(this.invalid$data()),this.$dataError(),t!==Y.nil&&n.assign(t,!1)),n.else()}invalid$data(){let{gen:t,schemaCode:r,schemaType:n,def:i,it:s}=this;return(0,Y.or)(a(),u());function a(){if(n.length){if(!(r instanceof Y.Name))throw new Error("ajv implementation error");let l=Array.isArray(n)?n:[n];return(0,Y._)(c0||(c0=y(["",""])),(0,tu.checkDataTypes)(l,r,s.opts.strictNumbers,tu.DataType.Wrong))}return Y.nil}function u(){if(i.validateSchema){let l=t.scopeValue("validate$data",{ref:i.validateSchema});return(0,Y._)(u0||(u0=y(["!","(",")"])),l,r)}return Y.nil}}subschema(t,r){let n=(0,Hp.getSubschema)(this.it,t);(0,Hp.extendSubschemaData)(n,this.it,t),(0,Hp.extendSubschemaMode)(n,t);let i=F(g(g({},this.it),n),{items:void 0,props:void 0});return vj(i,r),i}mergeEvaluated(t,r){let{it:n,gen:i}=this;n.opts.unevaluated&&(n.props!==!0&&t.props!==void 0&&(n.props=oo.mergeEvaluated.props(i,t.props,n.props,r)),n.items!==!0&&t.items!==void 0&&(n.items=oo.mergeEvaluated.items(i,t.items,n.items,r)))}mergeValidEvaluated(t,r){let{it:n,gen:i}=this;if(n.opts.unevaluated&&(n.props!==!0||n.items!==!0))return i.if(r,()=>this.mergeEvaluated(t,Y.Name)),!0}};o(Yp,"KeywordCxt");var ru=Yp;Do.KeywordCxt=ru;function b0(e,t,r,n){let i=new ru(e,r,t);"code"in r?r.code(i,n):i.$data&&r.validate?(0,Ma.funcKeywordCode)(i,r):"macro"in r?(0,Ma.macroKeywordCode)(i,r):(r.compile||r.validate)&&(0,Ma.funcKeywordCode)(i,r)}o(b0,"keywordCode");var Mj=/^\/(?:[^~]|~0|~1)*$/,Lj=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/,f0,l0;function w0(e,{dataLevel:t,dataNames:r,dataPathArr:n}){let i,s;if(e==="")return ie.default.rootData;if(e[0]==="/"){if(!Mj.test(e))throw new Error("Invalid JSON-pointer: ".concat(e));i=e,s=ie.default.rootData}else{let d=Lj.exec(e);if(!d)throw new Error("Invalid JSON-pointer: ".concat(e));let m=+d[1];if(i=d[2],i==="#"){if(m>=t)throw new Error(l("property/index",m));return n[t-m]}if(m>t)throw new Error(l("data",m));if(s=r[t-m],!i)return s}let a=s,u=i.split("/");for(let d of u)d&&(s=(0,Y._)(f0||(f0=y(["","",""])),s,(0,Y.getProperty)((0,oo.unescapeJsonPointer)(d))),a=(0,Y._)(l0||(l0=y([""," && ",""])),a,s));return a;function l(d,m){return"Cannot access ".concat(d," ").concat(m," levels up, current level is ").concat(t)}}o(w0,"getData");Do.getData=w0});var nu=D(Qp=>{"use strict";c();Object.defineProperty(Qp,"__esModule",{value:!0});var ed=class ed extends Error{constructor(t){super("validation failed"),this.errors=t,this.ajv=this.validation=!0}};o(ed,"ValidationError");var Xp=ed;Qp.default=Xp});var Ua=D(nd=>{"use strict";c();Object.defineProperty(nd,"__esModule",{value:!0});var td=Ra(),od=class od extends Error{constructor(t,r,n,i){super(i||"can't resolve reference ".concat(n," from id ").concat(r)),this.missingRef=(0,td.resolveUrl)(t,r,n),this.missingSchema=(0,td.normalizeId)((0,td.getFullPath)(t,this.missingRef))}};o(od,"MissingRefError");var rd=od;nd.default=rd});var iu=D(Dr=>{"use strict";c();Object.defineProperty(Dr,"__esModule",{value:!0});Dr.resolveSchema=Dr.getCompilingSchema=Dr.resolveRef=Dr.compileSchema=Dr.SchemaEnv=void 0;var an=de(),Uj=nu(),Oi=no(),cn=Ra(),$0=Le(),Dj=La(),ad=class ad{constructor(t){var r;this.refs={},this.dynamicAnchors={};let n;typeof t.schema=="object"&&(n=t.schema),this.schema=t.schema,this.schemaId=t.schemaId,this.root=t.root||this,this.baseId=(r=t.baseId)!==null&&r!==void 0?r:(0,cn.normalizeId)(n==null?void 0:n[t.schemaId||"$id"]),this.schemaPath=t.schemaPath,this.localRefs=t.localRefs,this.meta=t.meta,this.$async=n==null?void 0:n.$async,this.refs={}}};o(ad,"SchemaEnv");var gs=ad;Dr.SchemaEnv=gs;var v0,O0;function sd(e){let t=_0.call(this,e);if(t)return t;let r=(0,cn.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:n,lines:i}=this.opts.code,{ownProperties:s}=this.opts,a=new an.CodeGen(this.scope,{es5:n,lines:i,ownProperties:s}),u;e.$async&&(u=a.scopeValue("Error",{ref:Uj.default,code:(0,an._)(v0||(v0=y(['require("ajv/dist/runtime/validation_error").default'])))}));let l=a.scopeName("validate");e.validateName=l;let d={gen:a,allErrors:this.opts.allErrors,data:Oi.default.data,parentData:Oi.default.parentData,parentDataProperty:Oi.default.parentDataProperty,dataNames:[Oi.default.data],dataPathArr:[an.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:a.scopeValue("schema",this.opts.code.source===!0?{ref:e.schema,code:(0,an.stringify)(e.schema)}:{ref:e.schema}),validateName:l,ValidationError:u,schema:e.schema,schemaEnv:e,rootId:r,baseId:e.baseId||r,schemaPath:an.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,an._)(O0||(O0=y(['""']))),opts:this.opts,self:this},m;try{this._compilations.add(e),(0,Dj.validateFunctionCode)(d),a.optimize(this.opts.code.optimize);let h=a.toString();m="".concat(a.scopeRefs(Oi.default.scope),"return ").concat(h),this.opts.code.process&&(m=this.opts.code.process(m,e));let $=new Function("".concat(Oi.default.self),"".concat(Oi.default.scope),m)(this,this.scope.get());if(this.scope.value(l,{ref:$}),$.errors=null,$.schema=e.schema,$.schemaEnv=e,e.$async&&($.$async=!0),this.opts.code.source===!0&&($.source={validateName:l,validateCode:h,scopeValues:a._values}),this.opts.unevaluated){let{props:O,items:_}=d;$.evaluated={props:O instanceof an.Name?void 0:O,items:_ instanceof an.Name?void 0:_,dynamicProps:O instanceof an.Name,dynamicItems:_ instanceof an.Name},$.source&&($.source.evaluated=(0,an.stringify)($.evaluated))}return e.validate=$,e}catch(h){throw delete e.validate,delete e.validateName,m&&this.logger.error("Error compiling schema, function code:",m),h}finally{this._compilations.delete(e)}}o(sd,"compileSchema");Dr.compileSchema=sd;function qj(e,t,r){var n;r=(0,cn.resolveUrl)(this.opts.uriResolver,t,r);let i=e.refs[r];if(i)return i;let s=Bj.call(this,e,r);if(s===void 0){let a=(n=e.localRefs)===null||n===void 0?void 0:n[r],{schemaId:u}=this.opts;a&&(s=new gs({schema:a,schemaId:u,root:e,baseId:t}))}if(s!==void 0)return e.refs[r]=zj.call(this,s)}o(qj,"resolveRef");Dr.resolveRef=qj;function zj(e){return(0,cn.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:sd.call(this,e)}o(zj,"inlineOrCompile");function _0(e){for(let t of this._compilations)if(Vj(t,e))return t}o(_0,"getCompilingSchema");Dr.getCompilingSchema=_0;function Vj(e,t){return e.schema===t.schema&&e.root===t.root&&e.baseId===t.baseId}o(Vj,"sameSchemaEnv");function Bj(e,t){let r;for(;typeof(r=this.refs[t])=="string";)t=r;return r||this.schemas[t]||ou.call(this,e,t)}o(Bj,"resolve");function ou(e,t){let r=this.opts.uriResolver.parse(t),n=(0,cn._getFullPath)(this.opts.uriResolver,r),i=(0,cn.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&n===i)return id.call(this,r,e);let s=(0,cn.normalizeId)(n),a=this.refs[s]||this.schemas[s];if(typeof a=="string"){let u=ou.call(this,e,a);return typeof(u==null?void 0:u.schema)!="object"?void 0:id.call(this,r,u)}if(typeof(a==null?void 0:a.schema)=="object"){if(a.validate||sd.call(this,a),s===(0,cn.normalizeId)(t)){let{schema:u}=a,{schemaId:l}=this.opts,d=u[l];return d&&(i=(0,cn.resolveUrl)(this.opts.uriResolver,i,d)),new gs({schema:u,schemaId:l,root:e,baseId:i})}return id.call(this,r,a)}}o(ou,"resolveSchema");Dr.resolveSchema=ou;var Gj=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function id(e,{baseId:t,schema:r,root:n}){var i;if(((i=e.fragment)===null||i===void 0?void 0:i[0])!=="/")return;for(let u of e.fragment.slice(1).split("/")){if(typeof r=="boolean")return;let l=r[(0,$0.unescapeFragment)(u)];if(l===void 0)return;r=l;let d=typeof r=="object"&&r[this.opts.schemaId];!Gj.has(u)&&d&&(t=(0,cn.resolveUrl)(this.opts.uriResolver,t,d))}let s;if(typeof r!="boolean"&&r.$ref&&!(0,$0.schemaHasRulesButRef)(r,this.RULES)){let u=(0,cn.resolveUrl)(this.opts.uriResolver,t,r.$ref);s=ou.call(this,n,u)}let{schemaId:a}=this.opts;if(s=s||new gs({schema:r,schemaId:a,root:n,baseId:t}),s.schema!==s.root.schema)return s}o(id,"getJsonPointer")});var S0=D((c8,Kj)=>{Kj.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 E0=D((u8,P0)=>{"use strict";c();var Wj={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};P0.exports={HEX:Wj}});var C0=D((l8,R0)=>{"use strict";c();var{HEX:Hj}=E0(),Jj=new RegExp("^(?:(?:25[0-5]|2[0-4]\\d|1\\d{2}|[1-9]\\d|\\d)\\.){3}(?:25[0-5]|2[0-4]\\d|1\\d{2}|[1-9]\\d|\\d)$","u");function A0(e){if(N0(e,".")<3)return{host:e,isIPV4:!1};let t=e.match(Jj)||[],[r]=t;return r?{host:Yj(r,"."),isIPV4:!0}:{host:e,isIPV4:!1}}o(A0,"normalizeIPv4");function cd(e,t=!1){let r="",n=!0;for(let i of e){if(Hj[i]===void 0)return;i!=="0"&&n===!0&&(n=!1),n||(r+=i)}return t&&r.length===0&&(r="0"),r}o(cd,"stringArrayToHexStripped");function Zj(e){let t=0,r={error:!1,address:"",zone:""},n=[],i=[],s=!1,a=!1,u=!1;function l(){if(i.length){if(s===!1){let d=cd(i);if(d!==void 0)n.push(d);else return r.error=!0,!1}i.length=0}return!0}o(l,"consume");for(let d=0;d<e.length;d++){let m=e[d];if(!(m==="["||m==="]"))if(m===":"){if(a===!0&&(u=!0),!l())break;if(t++,n.push(":"),t>7){r.error=!0;break}d-1>=0&&e[d-1]===":"&&(a=!0);continue}else if(m==="%"){if(!l())break;s=!0}else{i.push(m);continue}}return i.length&&(s?r.zone=i.join(""):u?n.push(i.join("")):n.push(cd(i))),r.address=n.join(""),r}o(Zj,"getIPV6");function j0(e){if(N0(e,":")<2)return{host:e,isIPV6:!1};let t=Zj(e);if(t.error)return{host:e,isIPV6:!1};{let r=t.address,n=t.address;return t.zone&&(r+="%"+t.zone,n+="%25"+t.zone),{host:r,escapedHost:n,isIPV6:!0}}}o(j0,"normalizeIPv6");function Yj(e,t){let r="",n=!0,i=e.length;for(let s=0;s<i;s++){let a=e[s];a==="0"&&n?(s+1<=i&&e[s+1]===t||s+1===i)&&(r+=a,n=!1):(a===t?n=!0:n=!1,r+=a)}return r}o(Yj,"stripLeadingZeros");function N0(e,t){let r=0;for(let n=0;n<e.length;n++)e[n]===t&&r++;return r}o(N0,"findToken");var T0=new RegExp("^\\.\\.?\\/","u"),k0=new RegExp("^\\/\\.(?:\\/|$)","u"),F0=new RegExp("^\\/\\.\\.(?:\\/|$)","u"),Xj=new RegExp("^\\/?(?:.|\\n)*?(?=\\/|$)","u");function Qj(e){let t=[];for(;e.length;)if(e.match(T0))e=e.replace(T0,"");else if(e.match(k0))e=e.replace(k0,"/");else if(e.match(F0))e=e.replace(F0,"/"),t.pop();else if(e==="."||e==="..")e="";else{let r=e.match(Xj);if(r){let n=r[0];e=e.slice(n.length),t.push(n)}else throw new Error("Unexpected dot segment condition")}return t.join("")}o(Qj,"removeDotSegments");function e1(e,t){let r=t!==!0?escape:unescape;return e.scheme!==void 0&&(e.scheme=r(e.scheme)),e.userinfo!==void 0&&(e.userinfo=r(e.userinfo)),e.host!==void 0&&(e.host=r(e.host)),e.path!==void 0&&(e.path=r(e.path)),e.query!==void 0&&(e.query=r(e.query)),e.fragment!==void 0&&(e.fragment=r(e.fragment)),e}o(e1,"normalizeComponentEncoding");function t1(e){let t=[];if(e.userinfo!==void 0&&(t.push(e.userinfo),t.push("@")),e.host!==void 0){let r=unescape(e.host),n=A0(r);if(n.isIPV4)r=n.host;else{let i=j0(n.host);i.isIPV6===!0?r="[".concat(i.escapedHost,"]"):r=e.host}t.push(r)}return(typeof e.port=="number"||typeof e.port=="string")&&(t.push(":"),t.push(String(e.port))),t.length?t.join(""):void 0}o(t1,"recomposeAuthority");R0.exports={recomposeAuthority:t1,normalizeComponentEncoding:e1,removeDotSegments:Qj,normalizeIPv4:A0,normalizeIPv6:j0,stringArrayToHexStripped:cd}});var z0=D((m8,q0)=>{"use strict";c();var r1=new RegExp("^[\\da-f]{8}-[\\da-f]{4}-[\\da-f]{4}-[\\da-f]{4}-[\\da-f]{12}$","iu"),n1=new RegExp("([\\da-z][\\d\\-a-z]{0,31}):((?:[\\w!$'()*+,\\-.:;=@]|%[\\da-f]{2})+)","iu");function M0(e){return typeof e.secure=="boolean"?e.secure:String(e.scheme).toLowerCase()==="wss"}o(M0,"isSecure");function L0(e){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e}o(L0,"httpParse");function U0(e){let t=String(e.scheme).toLowerCase()==="https";return(e.port===(t?443:80)||e.port==="")&&(e.port=void 0),e.path||(e.path="/"),e}o(U0,"httpSerialize");function o1(e){return e.secure=M0(e),e.resourceName=(e.path||"/")+(e.query?"?"+e.query:""),e.path=void 0,e.query=void 0,e}o(o1,"wsParse");function i1(e){if((e.port===(M0(e)?443:80)||e.port==="")&&(e.port=void 0),typeof e.secure=="boolean"&&(e.scheme=e.secure?"wss":"ws",e.secure=void 0),e.resourceName){let[t,r]=e.resourceName.split("?");e.path=t&&t!=="/"?t:void 0,e.query=r,e.resourceName=void 0}return e.fragment=void 0,e}o(i1,"wsSerialize");function s1(e,t){if(!e.path)return e.error="URN can not be parsed",e;let r=e.path.match(n1);if(r){let n=t.scheme||e.scheme||"urn";e.nid=r[1].toLowerCase(),e.nss=r[2];let i="".concat(n,":").concat(t.nid||e.nid),s=ud[i];e.path=void 0,s&&(e=s.parse(e,t))}else e.error=e.error||"URN can not be parsed.";return e}o(s1,"urnParse");function a1(e,t){let r=t.scheme||e.scheme||"urn",n=e.nid.toLowerCase(),i="".concat(r,":").concat(t.nid||n),s=ud[i];s&&(e=s.serialize(e,t));let a=e,u=e.nss;return a.path="".concat(n||t.nid,":").concat(u),t.skipEscape=!0,a}o(a1,"urnSerialize");function c1(e,t){let r=e;return r.uuid=r.nss,r.nss=void 0,!t.tolerant&&(!r.uuid||!r1.test(r.uuid))&&(r.error=r.error||"UUID is not valid."),r}o(c1,"urnuuidParse");function u1(e){let t=e;return t.nss=(e.uuid||"").toLowerCase(),t}o(u1,"urnuuidSerialize");var D0={scheme:"http",domainHost:!0,parse:L0,serialize:U0},f1={scheme:"https",domainHost:D0.domainHost,parse:L0,serialize:U0},su={scheme:"ws",domainHost:!0,parse:o1,serialize:i1},l1={scheme:"wss",domainHost:su.domainHost,parse:su.parse,serialize:su.serialize},p1={scheme:"urn",parse:s1,serialize:a1,skipNormalize:!0},d1={scheme:"urn:uuid",parse:c1,serialize:u1,skipNormalize:!0},ud={http:D0,https:f1,ws:su,wss:l1,urn:p1,"urn:uuid":d1};q0.exports=ud});var B0=D((g8,cu)=>{"use strict";c();var{normalizeIPv6:m1,normalizeIPv4:y1,removeDotSegments:Da,recomposeAuthority:h1,normalizeComponentEncoding:au}=C0(),fd=z0();function g1(e,t){return typeof e=="string"?e=En(io(e,t),t):typeof e=="object"&&(e=io(En(e,t),t)),e}o(g1,"normalize");function x1(e,t,r){let n=Object.assign({scheme:"null"},r),i=V0(io(e,n),io(t,n),n,!0);return En(i,F(g({},n),{skipEscape:!0}))}o(x1,"resolve");function V0(e,t,r,n){let i={};return n||(e=io(En(e,r),r),t=io(En(t,r),r)),r=r||{},!r.tolerant&&t.scheme?(i.scheme=t.scheme,i.userinfo=t.userinfo,i.host=t.host,i.port=t.port,i.path=Da(t.path||""),i.query=t.query):(t.userinfo!==void 0||t.host!==void 0||t.port!==void 0?(i.userinfo=t.userinfo,i.host=t.host,i.port=t.port,i.path=Da(t.path||""),i.query=t.query):(t.path?(t.path.charAt(0)==="/"?i.path=Da(t.path):((e.userinfo!==void 0||e.host!==void 0||e.port!==void 0)&&!e.path?i.path="/"+t.path:e.path?i.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+t.path:i.path=t.path,i.path=Da(i.path)),i.query=t.query):(i.path=e.path,t.query!==void 0?i.query=t.query:i.query=e.query),i.userinfo=e.userinfo,i.host=e.host,i.port=e.port),i.scheme=e.scheme),i.fragment=t.fragment,i}o(V0,"resolveComponents");function I1(e,t,r){return typeof e=="string"?(e=unescape(e),e=En(au(io(e,r),!0),F(g({},r),{skipEscape:!0}))):typeof e=="object"&&(e=En(au(e,!0),F(g({},r),{skipEscape:!0}))),typeof t=="string"?(t=unescape(t),t=En(au(io(t,r),!0),F(g({},r),{skipEscape:!0}))):typeof t=="object"&&(t=En(au(t,!0),F(g({},r),{skipEscape:!0}))),e.toLowerCase()===t.toLowerCase()}o(I1,"equal");function En(e,t){let r={host:e.host,scheme:e.scheme,userinfo:e.userinfo,port:e.port,path:e.path,query:e.query,nid:e.nid,nss:e.nss,uuid:e.uuid,fragment:e.fragment,reference:e.reference,resourceName:e.resourceName,secure:e.secure,error:""},n=Object.assign({},t),i=[],s=fd[(n.scheme||r.scheme||"").toLowerCase()];s&&s.serialize&&s.serialize(r,n),r.path!==void 0&&(n.skipEscape?r.path=unescape(r.path):(r.path=escape(r.path),r.scheme!==void 0&&(r.path=r.path.split("%3A").join(":")))),n.reference!=="suffix"&&r.scheme&&i.push(r.scheme,":");let a=h1(r);if(a!==void 0&&(n.reference!=="suffix"&&i.push("//"),i.push(a),r.path&&r.path.charAt(0)!=="/"&&i.push("/")),r.path!==void 0){let u=r.path;!n.absolutePath&&(!s||!s.absolutePath)&&(u=Da(u)),a===void 0&&(u=u.replace(new RegExp("^\\/\\/","u"),"/%2F")),i.push(u)}return r.query!==void 0&&i.push("?",r.query),r.fragment!==void 0&&i.push("#",r.fragment),i.join("")}o(En,"serialize");var b1=Array.from({length:127},(e,t)=>new RegExp("[^!\"$&'()*+,\\-.;=_`a-z{}~]","u").test(String.fromCharCode(t)));function w1(e){let t=0;for(let r=0,n=e.length;r<n;++r)if(t=e.charCodeAt(r),t>126||b1[t])return!0;return!1}o(w1,"nonSimpleDomain");var $1=new RegExp("^(?:([^#/:?]+):)?(?:\\/\\/((?:([^#/?@]*)@)?(\\[[^#/?\\]]+\\]|[^#/:?]*)(?::(\\d*))?))?([^#?]*)(?:\\?([^#]*))?(?:#((?:.|[\\n\\r])*))?","u");function io(e,t){let r=Object.assign({},t),n={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},i=e.indexOf("%")!==-1,s=!1;r.reference==="suffix"&&(e=(r.scheme?r.scheme+":":"")+"//"+e);let a=e.match($1);if(a){if(n.scheme=a[1],n.userinfo=a[3],n.host=a[4],n.port=parseInt(a[5],10),n.path=a[6]||"",n.query=a[7],n.fragment=a[8],isNaN(n.port)&&(n.port=a[5]),n.host){let l=y1(n.host);if(l.isIPV4===!1){let d=m1(l.host);n.host=d.host.toLowerCase(),s=d.isIPV6}else n.host=l.host,s=!0}n.scheme===void 0&&n.userinfo===void 0&&n.host===void 0&&n.port===void 0&&n.query===void 0&&!n.path?n.reference="same-document":n.scheme===void 0?n.reference="relative":n.fragment===void 0?n.reference="absolute":n.reference="uri",r.reference&&r.reference!=="suffix"&&r.reference!==n.reference&&(n.error=n.error||"URI is not a "+r.reference+" reference.");let u=fd[(r.scheme||n.scheme||"").toLowerCase()];if(!r.unicodeSupport&&(!u||!u.unicodeSupport)&&n.host&&(r.domainHost||u&&u.domainHost)&&s===!1&&w1(n.host))try{n.host=URL.domainToASCII(n.host.toLowerCase())}catch(l){n.error=n.error||"Host's domain name can not be converted to ASCII: "+l}(!u||u&&!u.skipNormalize)&&(i&&n.scheme!==void 0&&(n.scheme=unescape(n.scheme)),i&&n.host!==void 0&&(n.host=unescape(n.host)),n.path&&(n.path=escape(unescape(n.path))),n.fragment&&(n.fragment=encodeURI(decodeURIComponent(n.fragment)))),u&&u.parse&&u.parse(n,r)}else n.error=n.error||"URI can not be parsed.";return n}o(io,"parse");var ld={SCHEMES:fd,normalize:g1,resolve:x1,resolveComponents:V0,equal:I1,serialize:En,parse:io};cu.exports=ld;cu.exports.default=ld;cu.exports.fastUri=ld});var K0=D(pd=>{"use strict";c();Object.defineProperty(pd,"__esModule",{value:!0});var G0=B0();G0.code='require("ajv/dist/runtime/uri").default';pd.default=G0});var ew=D(Lt=>{"use strict";c();Object.defineProperty(Lt,"__esModule",{value:!0});Lt.CodeGen=Lt.Name=Lt.nil=Lt.stringify=Lt.str=Lt._=Lt.KeywordCxt=void 0;var v1=La();Object.defineProperty(Lt,"KeywordCxt",{enumerable:!0,get:o(function(){return v1.KeywordCxt},"get")});var xs=de();Object.defineProperty(Lt,"_",{enumerable:!0,get:o(function(){return xs._},"get")});Object.defineProperty(Lt,"str",{enumerable:!0,get:o(function(){return xs.str},"get")});Object.defineProperty(Lt,"stringify",{enumerable:!0,get:o(function(){return xs.stringify},"get")});Object.defineProperty(Lt,"nil",{enumerable:!0,get:o(function(){return xs.nil},"get")});Object.defineProperty(Lt,"Name",{enumerable:!0,get:o(function(){return xs.Name},"get")});Object.defineProperty(Lt,"CodeGen",{enumerable:!0,get:o(function(){return xs.CodeGen},"get")});var O1=nu(),Y0=Ua(),_1=Lp(),qa=iu(),S1=de(),za=Ra(),uu=Na(),md=Le(),W0=S0(),P1=K0(),X0=o((e,t)=>new RegExp(e,t),"defaultRegExp");X0.code="new RegExp";var E1=["removeAdditional","useDefaults","coerceTypes"],T1=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),k1={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."},F1={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},H0=200;function A1(e){var t,r,n,i,s,a,u,l,d,m,h,b,$,O,_,E,k,G,R,N,C,me,le,ee,Z;let we=e.strict,$e=(t=e.code)===null||t===void 0?void 0:t.optimize,V=$e===!0||$e===void 0?1:$e||0,De=(n=(r=e.code)===null||r===void 0?void 0:r.regExp)!==null&&n!==void 0?n:X0,ue=(i=e.uriResolver)!==null&&i!==void 0?i:P1.default;return{strictSchema:(a=(s=e.strictSchema)!==null&&s!==void 0?s:we)!==null&&a!==void 0?a:!0,strictNumbers:(l=(u=e.strictNumbers)!==null&&u!==void 0?u:we)!==null&&l!==void 0?l:!0,strictTypes:(m=(d=e.strictTypes)!==null&&d!==void 0?d:we)!==null&&m!==void 0?m:"log",strictTuples:(b=(h=e.strictTuples)!==null&&h!==void 0?h:we)!==null&&b!==void 0?b:"log",strictRequired:(O=($=e.strictRequired)!==null&&$!==void 0?$:we)!==null&&O!==void 0?O:!1,code:e.code?F(g({},e.code),{optimize:V,regExp:De}):{optimize:V,regExp:De},loopRequired:(_=e.loopRequired)!==null&&_!==void 0?_:H0,loopEnum:(E=e.loopEnum)!==null&&E!==void 0?E:H0,meta:(k=e.meta)!==null&&k!==void 0?k:!0,messages:(G=e.messages)!==null&&G!==void 0?G:!0,inlineRefs:(R=e.inlineRefs)!==null&&R!==void 0?R:!0,schemaId:(N=e.schemaId)!==null&&N!==void 0?N:"$id",addUsedSchema:(C=e.addUsedSchema)!==null&&C!==void 0?C:!0,validateSchema:(me=e.validateSchema)!==null&&me!==void 0?me:!0,validateFormats:(le=e.validateFormats)!==null&&le!==void 0?le:!0,unicodeRegExp:(ee=e.unicodeRegExp)!==null&&ee!==void 0?ee:!0,int32range:(Z=e.int32range)!==null&&Z!==void 0?Z:!0,uriResolver:ue}}o(A1,"requiredOptions");var yd=class yd{constructor(t={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,t=this.opts=g(g({},t),A1(t));let{es5:r,lines:n}=this.opts.code;this.scope=new S1.ValueScope({scope:{},prefixes:T1,es5:r,lines:n}),this.logger=L1(t.logger);let i=t.validateFormats;t.validateFormats=!1,this.RULES=(0,_1.getRules)(),J0.call(this,k1,t,"NOT SUPPORTED"),J0.call(this,F1,t,"DEPRECATED","warn"),this._metaOpts=C1.call(this),t.formats&&N1.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),t.keywords&&R1.call(this,t.keywords),typeof t.meta=="object"&&this.addMetaSchema(t.meta),j1.call(this),t.validateFormats=i}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:t,meta:r,schemaId:n}=this.opts,i=W0;n==="id"&&(i=g({},W0),i.id=i.$id,delete i.$id),r&&t&&this.addMetaSchema(i,i[n],!1)}defaultMeta(){let{meta:t,schemaId:r}=this.opts;return this.opts.defaultMeta=typeof t=="object"?t[r]||t:void 0}validate(t,r){let n;if(typeof t=="string"){if(n=this.getSchema(t),!n)throw new Error('no schema with key or ref "'.concat(t,'"'))}else n=this.compile(t);let i=n(r);return"$async"in n||(this.errors=n.errors),i}compile(t,r){let n=this._addSchema(t,r);return n.validate||this._compileSchemaEnv(n)}compileAsync(t,r){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");let{loadSchema:n}=this.opts;return i.call(this,t,r);async function i(m,h){await s.call(this,m.$schema);let b=this._addSchema(m,h);return b.validate||a.call(this,b)}async function s(m){m&&!this.getSchema(m)&&await i.call(this,{$ref:m},!0)}async function a(m){try{return this._compileSchemaEnv(m)}catch(h){if(!(h instanceof Y0.default))throw h;return u.call(this,h),await l.call(this,h.missingSchema),a.call(this,m)}}function u({missingSchema:m,missingRef:h}){if(this.refs[m])throw new Error("AnySchema ".concat(m," is loaded but ").concat(h," cannot be resolved"))}async function l(m){let h=await d.call(this,m);this.refs[m]||await s.call(this,h.$schema),this.refs[m]||this.addSchema(h,m,r)}async function d(m){let h=this._loading[m];if(h)return h;try{return await(this._loading[m]=n(m))}finally{delete this._loading[m]}}}addSchema(t,r,n,i=this.opts.validateSchema){if(Array.isArray(t)){for(let a of t)this.addSchema(a,void 0,n,i);return this}let s;if(typeof t=="object"){let{schemaId:a}=this.opts;if(s=t[a],s!==void 0&&typeof s!="string")throw new Error("schema ".concat(a," must be string"))}return r=(0,za.normalizeId)(r||s),this._checkUnique(r),this.schemas[r]=this._addSchema(t,n,r,i,!0),this}addMetaSchema(t,r,n=this.opts.validateSchema){return this.addSchema(t,r,!0,n),this}validateSchema(t,r){if(typeof t=="boolean")return!0;let n;if(n=t.$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 i=this.validate(n,t);if(!i&&r){let s="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(s);else throw new Error(s)}return i}getSchema(t){let r;for(;typeof(r=Z0.call(this,t))=="string";)t=r;if(r===void 0){let{schemaId:n}=this.opts,i=new qa.SchemaEnv({schema:{},schemaId:n});if(r=qa.resolveSchema.call(this,i,t),!r)return;this.refs[t]=r}return r.validate||this._compileSchemaEnv(r)}removeSchema(t){if(t instanceof RegExp)return this._removeAllSchemas(this.schemas,t),this._removeAllSchemas(this.refs,t),this;switch(typeof t){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{let r=Z0.call(this,t);return typeof r=="object"&&this._cache.delete(r.schema),delete this.schemas[t],delete this.refs[t],this}case"object":{let r=t;this._cache.delete(r);let n=t[this.opts.schemaId];return n&&(n=(0,za.normalizeId)(n),delete this.schemas[n],delete this.refs[n]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(t){for(let r of t)this.addKeyword(r);return this}addKeyword(t,r){let n;if(typeof t=="string")n=t,typeof r=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),r.keyword=n);else if(typeof t=="object"&&r===void 0){if(r=t,n=r.keyword,Array.isArray(n)&&!n.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(D1.call(this,n,r),!r)return(0,md.eachItem)(n,s=>dd.call(this,s)),this;z1.call(this,r);let i=F(g({},r),{type:(0,uu.getJSONTypes)(r.type),schemaType:(0,uu.getJSONTypes)(r.schemaType)});return(0,md.eachItem)(n,i.type.length===0?s=>dd.call(this,s,i):s=>i.type.forEach(a=>dd.call(this,s,i,a))),this}getKeyword(t){let r=this.RULES.all[t];return typeof r=="object"?r.definition:!!r}removeKeyword(t){let{RULES:r}=this;delete r.keywords[t],delete r.all[t];for(let n of r.rules){let i=n.rules.findIndex(s=>s.keyword===t);i>=0&&n.rules.splice(i,1)}return this}addFormat(t,r){return typeof r=="string"&&(r=new RegExp(r)),this.formats[t]=r,this}errorsText(t=this.errors,{separator:r=", ",dataVar:n="data"}={}){return!t||t.length===0?"No errors":t.map(i=>"".concat(n).concat(i.instancePath," ").concat(i.message)).reduce((i,s)=>i+r+s)}$dataMetaSchema(t,r){let n=this.RULES.all;t=JSON.parse(JSON.stringify(t));for(let i of r){let s=i.split("/").slice(1),a=t;for(let u of s)a=a[u];for(let u in n){let l=n[u];if(typeof l!="object")continue;let{$data:d}=l.definition,m=a[u];d&&m&&(a[u]=Q0(m))}}return t}_removeAllSchemas(t,r){for(let n in t){let i=t[n];(!r||r.test(n))&&(typeof i=="string"?delete t[n]:i&&!i.meta&&(this._cache.delete(i.schema),delete t[n]))}}_addSchema(t,r,n,i=this.opts.validateSchema,s=this.opts.addUsedSchema){let a,{schemaId:u}=this.opts;if(typeof t=="object")a=t[u];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof t!="boolean")throw new Error("schema must be object or boolean")}let l=this._cache.get(t);if(l!==void 0)return l;n=(0,za.normalizeId)(a||n);let d=za.getSchemaRefs.call(this,t,n);return l=new qa.SchemaEnv({schema:t,schemaId:u,meta:r,baseId:n,localRefs:d}),this._cache.set(l.schema,l),s&&!n.startsWith("#")&&(n&&this._checkUnique(n),this.refs[n]=l),i&&this.validateSchema(t,!0),l}_checkUnique(t){if(this.schemas[t]||this.refs[t])throw new Error('schema with key or id "'.concat(t,'" already exists'))}_compileSchemaEnv(t){if(t.meta?this._compileMetaSchema(t):qa.compileSchema.call(this,t),!t.validate)throw new Error("ajv implementation error");return t.validate}_compileMetaSchema(t){let r=this.opts;this.opts=this._metaOpts;try{qa.compileSchema.call(this,t)}finally{this.opts=r}}};o(yd,"Ajv");var Va=yd;Va.ValidationError=O1.default;Va.MissingRefError=Y0.default;Lt.default=Va;function J0(e,t,r,n="error"){for(let i in e){let s=i;s in t&&this.logger[n]("".concat(r,": option ").concat(i,". ").concat(e[s]))}}o(J0,"checkOptions");function Z0(e){return e=(0,za.normalizeId)(e),this.schemas[e]||this.refs[e]}o(Z0,"getSchEnv");function j1(){let e=this.opts.schemas;if(e)if(Array.isArray(e))this.addSchema(e);else for(let t in e)this.addSchema(e[t],t)}o(j1,"addInitialSchemas");function N1(){for(let e in this.opts.formats){let t=this.opts.formats[e];t&&this.addFormat(e,t)}}o(N1,"addInitialFormats");function R1(e){if(Array.isArray(e)){this.addVocabulary(e);return}this.logger.warn("keywords option as map is deprecated, pass array");for(let t in e){let r=e[t];r.keyword||(r.keyword=t),this.addKeyword(r)}}o(R1,"addInitialKeywords");function C1(){let e=g({},this.opts);for(let t of E1)delete e[t];return e}o(C1,"getMetaSchemaOptions");var M1={log(){},warn(){},error(){}};function L1(e){if(e===!1)return M1;if(e===void 0)return console;if(e.log&&e.warn&&e.error)return e;throw new Error("logger must implement log, warn and error methods")}o(L1,"getLogger");var U1=/^[a-z_$][a-z0-9_$:-]*$/i;function D1(e,t){let{RULES:r}=this;if((0,md.eachItem)(e,n=>{if(r.keywords[n])throw new Error("Keyword ".concat(n," is already defined"));if(!U1.test(n))throw new Error("Keyword ".concat(n," has invalid name"))}),!!t&&t.$data&&!("code"in t||"validate"in t))throw new Error('$data keyword must have "code" or "validate" function')}o(D1,"checkKeyword");function dd(e,t,r){var n;let i=t==null?void 0:t.post;if(r&&i)throw new Error('keyword with "post" flag cannot have "type"');let{RULES:s}=this,a=i?s.post:s.rules.find(({type:l})=>l===r);if(a||(a={type:r,rules:[]},s.rules.push(a)),s.keywords[e]=!0,!t)return;let u={keyword:e,definition:F(g({},t),{type:(0,uu.getJSONTypes)(t.type),schemaType:(0,uu.getJSONTypes)(t.schemaType)})};t.before?q1.call(this,a,u,t.before):a.rules.push(u),s.all[e]=u,(n=t.implements)===null||n===void 0||n.forEach(l=>this.addKeyword(l))}o(dd,"addRule");function q1(e,t,r){let n=e.rules.findIndex(i=>i.keyword===r);n>=0?e.rules.splice(n,0,t):(e.rules.push(t),this.logger.warn("rule ".concat(r," is not defined")))}o(q1,"addBeforeRule");function z1(e){let{metaSchema:t}=e;t!==void 0&&(e.$data&&this.opts.$data&&(t=Q0(t)),e.validateSchema=this.compile(t,!0))}o(z1,"keywordMetaschema");var V1={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function Q0(e){return{anyOf:[e,V1]}}o(Q0,"schemaOrData")});var tw=D(hd=>{"use strict";c();Object.defineProperty(hd,"__esModule",{value:!0});var B1={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};hd.default=B1});var mw=D(_i=>{"use strict";c();Object.defineProperty(_i,"__esModule",{value:!0});_i.callRef=_i.getValidate=void 0;var G1=Ua(),rw=Ur(),Ir=de(),Is=no(),nw=iu(),fu=Le(),ow,K1={keyword:"$ref",schemaType:"string",code(e){let{gen:t,schema:r,it:n}=e,{baseId:i,schemaEnv:s,validateName:a,opts:u,self:l}=n,{root:d}=s;if((r==="#"||r==="#/")&&i===d.baseId)return h();let m=nw.resolveRef.call(l,d,i,r);if(m===void 0)throw new G1.default(n.opts.uriResolver,i,r);if(m instanceof nw.SchemaEnv)return b(m);return $(m);function h(){if(s===d)return lu(e,a,s,s.$async);let O=t.scopeValue("root",{ref:d});return lu(e,(0,Ir._)(ow||(ow=y(["",".validate"])),O),d,d.$async)}function b(O){let _=dw(e,O);lu(e,_,O,O.$async)}function $(O){let _=t.scopeValue("schema",u.code.source===!0?{ref:O,code:(0,Ir.stringify)(O)}:{ref:O}),E=t.name("valid"),k=e.subschema({schema:O,dataTypes:[],schemaPath:Ir.nil,topSchemaRef:_,errSchemaPath:r},E);e.mergeEvaluated(k),e.ok(E)}}},iw;function dw(e,t){let{gen:r}=e;return t.validate?r.scopeValue("validate",{ref:t.validate}):(0,Ir._)(iw||(iw=y(["",".validate"])),r.scopeValue("wrapper",{ref:t}))}o(dw,"getValidate");_i.getValidate=dw;var sw,aw,cw,uw,fw,lw,pw;function lu(e,t,r,n){let{gen:i,it:s}=e,{allErrors:a,schemaEnv:u,opts:l}=s,d=l.passContext?Is.default.this:Ir.nil;n?m():h();function m(){if(!u.$async)throw new Error("async schema referenced by sync schema");let O=i.let("valid");i.try(()=>{i.code((0,Ir._)(sw||(sw=y(["await ",""])),(0,rw.callValidateCode)(e,t,d))),$(t),a||i.assign(O,!0)},_=>{i.if((0,Ir._)(aw||(aw=y(["!("," instanceof ",")"])),_,s.ValidationError),()=>i.throw(_)),b(_),a||i.assign(O,!1)}),e.ok(O)}o(m,"callAsyncRef");function h(){e.result((0,rw.callValidateCode)(e,t,d),()=>$(t),()=>b(t))}o(h,"callSyncRef");function b(O){let _=(0,Ir._)(cw||(cw=y(["",".errors"])),O);i.assign(Is.default.vErrors,(0,Ir._)(uw||(uw=y([""," === null ? "," : ",".concat(",")"])),Is.default.vErrors,_,Is.default.vErrors,_)),i.assign(Is.default.errors,(0,Ir._)(fw||(fw=y(["",".length"])),Is.default.vErrors))}o(b,"addErrorsFrom");function $(O){var _;if(!s.opts.unevaluated)return;let E=(_=r==null?void 0:r.validate)===null||_===void 0?void 0:_.evaluated;if(s.props!==!0)if(E&&!E.dynamicProps)E.props!==void 0&&(s.props=fu.mergeEvaluated.props(i,E.props,s.props));else{let k=i.var("props",(0,Ir._)(lw||(lw=y(["",".evaluated.props"])),O));s.props=fu.mergeEvaluated.props(i,k,s.props,Ir.Name)}if(s.items!==!0)if(E&&!E.dynamicItems)E.items!==void 0&&(s.items=fu.mergeEvaluated.items(i,E.items,s.items));else{let k=i.var("items",(0,Ir._)(pw||(pw=y(["",".evaluated.items"])),O));s.items=fu.mergeEvaluated.items(i,k,s.items,Ir.Name)}}o($,"addEvaluatedFrom")}o(lu,"callRef");_i.callRef=lu;_i.default=K1});var yw=D(gd=>{"use strict";c();Object.defineProperty(gd,"__esModule",{value:!0});var W1=tw(),H1=mw(),J1=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",W1.default,H1.default];gd.default=J1});var Iw=D(xd=>{"use strict";c();Object.defineProperty(xd,"__esModule",{value:!0});var pu=de(),qo=pu.operators,du={maximum:{okStr:"<=",ok:qo.LTE,fail:qo.GT},minimum:{okStr:">=",ok:qo.GTE,fail:qo.LT},exclusiveMaximum:{okStr:"<",ok:qo.LT,fail:qo.GTE},exclusiveMinimum:{okStr:">",ok:qo.GT,fail:qo.LTE}},hw,gw,Z1={message:o(({keyword:e,schemaCode:t})=>(0,pu.str)(hw||(hw=y(["must be "," ",""])),du[e].okStr,t),"message"),params:o(({keyword:e,schemaCode:t})=>(0,pu._)(gw||(gw=y(["{comparison: ",", limit: ","}"])),du[e].okStr,t),"params")},xw,Y1={keyword:Object.keys(du),type:"number",schemaType:"number",$data:!0,error:Z1,code(e){let{keyword:t,data:r,schemaCode:n}=e;e.fail$data((0,pu._)(xw||(xw=y([""," "," "," || isNaN(",")"])),r,du[t].fail,n,r))}};xd.default=Y1});var _w=D(Id=>{"use strict";c();Object.defineProperty(Id,"__esModule",{value:!0});var Ba=de(),bw,ww,X1={message:o(({schemaCode:e})=>(0,Ba.str)(bw||(bw=y(["must be multiple of ",""])),e),"message"),params:o(({schemaCode:e})=>(0,Ba._)(ww||(ww=y(["{multipleOf: ","}"])),e),"params")},$w,vw,Ow,Q1={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:X1,code(e){let{gen:t,data:r,schemaCode:n,it:i}=e,s=i.opts.multipleOfPrecision,a=t.let("res"),u=s?(0,Ba._)($w||($w=y(["Math.abs(Math.round(",") - ",") > 1e-",""])),a,a,s):(0,Ba._)(vw||(vw=y([""," !== parseInt(",")"])),a,a);e.fail$data((0,Ba._)(Ow||(Ow=y(["("," === 0 || ("," = ","/",", ","))"])),n,a,r,n,u))}};Id.default=Q1});var Pw=D(bd=>{"use strict";c();Object.defineProperty(bd,"__esModule",{value:!0});function Sw(e){let t=e.length,r=0,n=0,i;for(;n<t;)r++,i=e.charCodeAt(n++),i>=55296&&i<=56319&&n<t&&(i=e.charCodeAt(n),(i&64512)===56320&&n++);return r}o(Sw,"ucs2length");bd.default=Sw;Sw.code='require("ajv/dist/runtime/ucs2length").default'});var jw=D(wd=>{"use strict";c();Object.defineProperty(wd,"__esModule",{value:!0});var Si=de(),eN=Le(),tN=Pw(),Ew,Tw,rN={message({keyword:e,schemaCode:t}){let r=e==="maxLength"?"more":"fewer";return(0,Si.str)(Ew||(Ew=y(["must NOT have "," than "," characters"])),r,t)},params:o(({schemaCode:e})=>(0,Si._)(Tw||(Tw=y(["{limit: ","}"])),e),"params")},kw,Fw,Aw,nN={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:rN,code(e){let{keyword:t,data:r,schemaCode:n,it:i}=e,s=t==="maxLength"?Si.operators.GT:Si.operators.LT,a=i.opts.unicode===!1?(0,Si._)(kw||(kw=y(["",".length"])),r):(0,Si._)(Fw||(Fw=y(["","(",")"])),(0,eN.useFunc)(e.gen,tN.default),r);e.fail$data((0,Si._)(Aw||(Aw=y([""," "," ",""])),a,s,n))}};wd.default=nN});var Lw=D($d=>{"use strict";c();Object.defineProperty($d,"__esModule",{value:!0});var oN=Ur(),mu=de(),Nw,Rw,iN={message:o(({schemaCode:e})=>(0,mu.str)(Nw||(Nw=y(['must match pattern "','"'])),e),"message"),params:o(({schemaCode:e})=>(0,mu._)(Rw||(Rw=y(["{pattern: ","}"])),e),"params")},Cw,Mw,sN={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:iN,code(e){let{data:t,$data:r,schema:n,schemaCode:i,it:s}=e,a=s.opts.unicodeRegExp?"u":"",u=r?(0,mu._)(Cw||(Cw=y(["(new RegExp(",", ","))"])),i,a):(0,oN.usePattern)(e,n);e.fail$data((0,mu._)(Mw||(Mw=y(["!",".test(",")"])),u,t))}};$d.default=sN});var zw=D(vd=>{"use strict";c();Object.defineProperty(vd,"__esModule",{value:!0});var Ga=de(),Uw,Dw,aN={message({keyword:e,schemaCode:t}){let r=e==="maxProperties"?"more":"fewer";return(0,Ga.str)(Uw||(Uw=y(["must NOT have "," than "," properties"])),r,t)},params:o(({schemaCode:e})=>(0,Ga._)(Dw||(Dw=y(["{limit: ","}"])),e),"params")},qw,cN={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:aN,code(e){let{keyword:t,data:r,schemaCode:n}=e,i=t==="maxProperties"?Ga.operators.GT:Ga.operators.LT;e.fail$data((0,Ga._)(qw||(qw=y(["Object.keys(",").length "," ",""])),r,i,n))}};vd.default=cN});var Gw=D(Od=>{"use strict";c();Object.defineProperty(Od,"__esModule",{value:!0});var Ka=Ur(),Wa=de(),uN=Le(),Vw,Bw,fN={message:o(({params:{missingProperty:e}})=>(0,Wa.str)(Vw||(Vw=y(["must have required property '","'"])),e),"message"),params:o(({params:{missingProperty:e}})=>(0,Wa._)(Bw||(Bw=y(["{missingProperty: ","}"])),e),"params")},lN={keyword:"required",type:"object",schemaType:"array",$data:!0,error:fN,code(e){let{gen:t,schema:r,schemaCode:n,data:i,$data:s,it:a}=e,{opts:u}=a;if(!s&&r.length===0)return;let l=r.length>=u.loopRequired;if(a.allErrors?d():m(),u.strictRequired){let $=e.parentSchema.properties,{definedProperties:O}=e.it;for(let _ of r)if(($==null?void 0:$[_])===void 0&&!O.has(_)){let E=a.schemaEnv.baseId+a.errSchemaPath,k='required property "'.concat(_,'" is not defined at "').concat(E,'" (strictRequired)');(0,uN.checkStrictMode)(a,k,a.opts.strictRequired)}}function d(){if(l||s)e.block$data(Wa.nil,h);else for(let $ of r)(0,Ka.checkReportMissingProp)(e,$)}o(d,"allErrorsMode");function m(){let $=t.let("missing");if(l||s){let O=t.let("valid",!0);e.block$data(O,()=>b($,O)),e.ok(O)}else t.if((0,Ka.checkMissingProp)(e,r,$)),(0,Ka.reportMissingProp)(e,$),t.else()}o(m,"exitOnErrorMode");function h(){t.forOf("prop",n,$=>{e.setParams({missingProperty:$}),t.if((0,Ka.noPropertyInData)(t,i,$,u.ownProperties),()=>e.error())})}o(h,"loopAllRequired");function b($,O){e.setParams({missingProperty:$}),t.forOf($,n,()=>{t.assign(O,(0,Ka.propertyInData)(t,i,$,u.ownProperties)),t.if((0,Wa.not)(O),()=>{e.error(),t.break()})},Wa.nil)}o(b,"loopUntilMissing")}};Od.default=lN});var Jw=D(_d=>{"use strict";c();Object.defineProperty(_d,"__esModule",{value:!0});var Ha=de(),Kw,Ww,pN={message({keyword:e,schemaCode:t}){let r=e==="maxItems"?"more":"fewer";return(0,Ha.str)(Kw||(Kw=y(["must NOT have "," than "," items"])),r,t)},params:o(({schemaCode:e})=>(0,Ha._)(Ww||(Ww=y(["{limit: ","}"])),e),"params")},Hw,dN={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:pN,code(e){let{keyword:t,data:r,schemaCode:n}=e,i=t==="maxItems"?Ha.operators.GT:Ha.operators.LT;e.fail$data((0,Ha._)(Hw||(Hw=y(["",".length "," ",""])),r,i,n))}};_d.default=dN});var yu=D(Sd=>{"use strict";c();Object.defineProperty(Sd,"__esModule",{value:!0});var Zw=Kp();Zw.code='require("ajv/dist/runtime/equal").default';Sd.default=Zw});var m$=D(Ed=>{"use strict";c();Object.defineProperty(Ed,"__esModule",{value:!0});var Pd=Na(),Ut=de(),mN=Le(),yN=yu(),Yw,Xw,hN={message:o(({params:{i:e,j:t}})=>(0,Ut.str)(Yw||(Yw=y(["must NOT have duplicate items (items ## "," and "," are identical)"])),t,e),"message"),params:o(({params:{i:e,j:t}})=>(0,Ut._)(Xw||(Xw=y(["{i: ",", j: ","}"])),e,t),"params")},Qw,e$,t$,r$,n$,o$,i$,s$,a$,c$,u$,f$,l$,p$,d$,gN={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:hN,code(e){let{gen:t,data:r,$data:n,schema:i,parentSchema:s,schemaCode:a,it:u}=e;if(!n&&!i)return;let l=t.let("valid"),d=s.items?(0,Pd.getSchemaTypes)(s.items):[];e.block$data(l,m,(0,Ut._)(Qw||(Qw=y([""," === false"])),a)),e.ok(l);function m(){let O=t.let("i",(0,Ut._)(e$||(e$=y(["",".length"])),r)),_=t.let("j");e.setParams({i:O,j:_}),t.assign(l,!0),t.if((0,Ut._)(t$||(t$=y([""," > 1"])),O),()=>(h()?b:$)(O,_))}o(m,"validateUniqueItems");function h(){return d.length>0&&!d.some(O=>O==="object"||O==="array")}o(h,"canOptimize");function b(O,_){let E=t.name("item"),k=(0,Pd.checkDataTypes)(d,E,u.opts.strictNumbers,Pd.DataType.Wrong),G=t.const("indices",(0,Ut._)(r$||(r$=y(["{}"]))));t.for((0,Ut._)(n$||(n$=y([";","--;"])),O),()=>{t.let(E,(0,Ut._)(o$||(o$=y(["","[","]"])),r,O)),t.if(k,(0,Ut._)(i$||(i$=y(["continue"])))),d.length>1&&t.if((0,Ut._)(s$||(s$=y(["typeof ",' == "string"'])),E),(0,Ut._)(a$||(a$=y(["",' += "_"'])),E)),t.if((0,Ut._)(c$||(c$=y(["typeof ","[",'] == "number"'])),G,E),()=>{t.assign(_,(0,Ut._)(u$||(u$=y(["","[","]"])),G,E)),e.error(),t.assign(l,!1).break()}).code((0,Ut._)(f$||(f$=y(["","[","] = ",""])),G,E,O))})}o(b,"loopN");function $(O,_){let E=(0,mN.useFunc)(t,yN.default),k=t.name("outer");t.label(k).for((0,Ut._)(l$||(l$=y([";","--;"])),O),()=>t.for((0,Ut._)(p$||(p$=y([""," = ","; ","--;"])),_,O,_),()=>t.if((0,Ut._)(d$||(d$=y(["","(","[","], ","[","])"])),E,r,O,r,_),()=>{e.error(),t.assign(l,!1).break(k)})))}o($,"loopN2")}};Ed.default=gN});var x$=D(kd=>{"use strict";c();Object.defineProperty(kd,"__esModule",{value:!0});var Td=de(),xN=Le(),IN=yu(),y$,bN={message:"must be equal to constant",params:o(({schemaCode:e})=>(0,Td._)(y$||(y$=y(["{allowedValue: ","}"])),e),"params")},h$,g$,wN={keyword:"const",$data:!0,error:bN,code(e){let{gen:t,data:r,$data:n,schemaCode:i,schema:s}=e;n||s&&typeof s=="object"?e.fail$data((0,Td._)(h$||(h$=y(["!","(",", ",")"])),(0,xN.useFunc)(t,IN.default),r,i)):e.fail((0,Td._)(g$||(g$=y([""," !== ",""])),s,r))}};kd.default=wN});var v$=D(Fd=>{"use strict";c();Object.defineProperty(Fd,"__esModule",{value:!0});var Ja=de(),$N=Le(),vN=yu(),I$,ON={message:"must be equal to one of the allowed values",params:o(({schemaCode:e})=>(0,Ja._)(I$||(I$=y(["{allowedValues: ","}"])),e),"params")},b$,w$,$$,_N={keyword:"enum",schemaType:"array",$data:!0,error:ON,code(e){let{gen:t,data:r,$data:n,schema:i,schemaCode:s,it:a}=e;if(!n&&i.length===0)throw new Error("enum must have non-empty array");let u=i.length>=a.opts.loopEnum,l,d=o(()=>l!=null?l:l=(0,$N.useFunc)(t,vN.default),"getEql"),m;if(u||n)m=t.let("valid"),e.block$data(m,h);else{if(!Array.isArray(i))throw new Error("ajv implementation error");let $=t.const("vSchema",s);m=(0,Ja.or)(...i.map((O,_)=>b($,_)))}e.pass(m);function h(){t.assign(m,!1),t.forOf("v",s,$=>t.if((0,Ja._)(b$||(b$=y(["","(",", ",")"])),d(),r,$),()=>t.assign(m,!0).break()))}o(h,"loopEnum");function b($,O){let _=i[O];return typeof _=="object"&&_!==null?(0,Ja._)(w$||(w$=y(["","(",", ","[","])"])),d(),r,$,O):(0,Ja._)($$||($$=y([""," === ",""])),r,_)}o(b,"equalCode")}};Fd.default=_N});var O$=D(Ad=>{"use strict";c();Object.defineProperty(Ad,"__esModule",{value:!0});var SN=Iw(),PN=_w(),EN=jw(),TN=Lw(),kN=zw(),FN=Gw(),AN=Jw(),jN=m$(),NN=x$(),RN=v$(),CN=[SN.default,PN.default,EN.default,TN.default,kN.default,FN.default,AN.default,jN.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},NN.default,RN.default];Ad.default=CN});var Nd=D(Za=>{"use strict";c();Object.defineProperty(Za,"__esModule",{value:!0});Za.validateAdditionalItems=void 0;var Pi=de(),jd=Le(),_$,S$,MN={message:o(({params:{len:e}})=>(0,Pi.str)(_$||(_$=y(["must NOT have more than "," items"])),e),"message"),params:o(({params:{len:e}})=>(0,Pi._)(S$||(S$=y(["{limit: ","}"])),e),"params")},LN={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:MN,code(e){let{parentSchema:t,it:r}=e,{items:n}=t;if(!Array.isArray(n)){(0,jd.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas');return}k$(e,n)}},P$,E$,T$;function k$(e,t){let{gen:r,schema:n,data:i,keyword:s,it:a}=e;a.items=!0;let u=r.const("len",(0,Pi._)(P$||(P$=y(["",".length"])),i));if(n===!1)e.setParams({len:t.length}),e.pass((0,Pi._)(E$||(E$=y([""," <= ",""])),u,t.length));else if(typeof n=="object"&&!(0,jd.alwaysValidSchema)(a,n)){let d=r.var("valid",(0,Pi._)(T$||(T$=y([""," <= ",""])),u,t.length));r.if((0,Pi.not)(d),()=>l(d)),e.ok(d)}function l(d){r.forRange("i",t.length,u,m=>{e.subschema({keyword:s,dataProp:m,dataPropType:jd.Type.Num},d),a.allErrors||r.if((0,Pi.not)(d),()=>r.break())})}o(l,"validateItems")}o(k$,"validateAdditionalItems");Za.validateAdditionalItems=k$;Za.default=LN});var Rd=D(Ya=>{"use strict";c();Object.defineProperty(Ya,"__esModule",{value:!0});Ya.validateTuple=void 0;var F$=de(),hu=Le(),UN=Ur(),DN={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){let{schema:t,it:r}=e;if(Array.isArray(t))return N$(e,"additionalItems",t);r.items=!0,!(0,hu.alwaysValidSchema)(r,t)&&e.ok((0,UN.validateArray)(e))}},A$,j$;function N$(e,t,r=e.schema){let{gen:n,parentSchema:i,data:s,keyword:a,it:u}=e;m(i),u.opts.unevaluated&&r.length&&u.items!==!0&&(u.items=hu.mergeEvaluated.items(n,r.length,u.items));let l=n.name("valid"),d=n.const("len",(0,F$._)(A$||(A$=y(["",".length"])),s));r.forEach((h,b)=>{(0,hu.alwaysValidSchema)(u,h)||(n.if((0,F$._)(j$||(j$=y([""," > ",""])),d,b),()=>e.subschema({keyword:a,schemaProp:b,dataProp:b},l)),e.ok(l))});function m(h){let{opts:b,errSchemaPath:$}=u,O=r.length,_=O===h.minItems&&(O===h.maxItems||h[t]===!1);if(b.strictTuples&&!_){let E='"'.concat(a,'" is ').concat(O,"-tuple, but minItems or maxItems/").concat(t,' are not specified or different at path "').concat($,'"');(0,hu.checkStrictMode)(u,E,b.strictTuples)}}o(m,"checkStrictTuple")}o(N$,"validateTuple");Ya.validateTuple=N$;Ya.default=DN});var R$=D(Cd=>{"use strict";c();Object.defineProperty(Cd,"__esModule",{value:!0});var qN=Rd(),zN={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:o(e=>(0,qN.validateTuple)(e,"items"),"code")};Cd.default=zN});var U$=D(Md=>{"use strict";c();Object.defineProperty(Md,"__esModule",{value:!0});var C$=de(),VN=Le(),BN=Ur(),GN=Nd(),M$,L$,KN={message:o(({params:{len:e}})=>(0,C$.str)(M$||(M$=y(["must NOT have more than "," items"])),e),"message"),params:o(({params:{len:e}})=>(0,C$._)(L$||(L$=y(["{limit: ","}"])),e),"params")},WN={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:KN,code(e){let{schema:t,parentSchema:r,it:n}=e,{prefixItems:i}=r;n.items=!0,!(0,VN.alwaysValidSchema)(n,t)&&(i?(0,GN.validateAdditionalItems)(e,i):e.ok((0,BN.validateArray)(e)))}};Md.default=WN});var X$=D(Ld=>{"use strict";c();Object.defineProperty(Ld,"__esModule",{value:!0});var qr=de(),gu=Le(),D$,q$,z$,V$,HN={message:o(({params:{min:e,max:t}})=>t===void 0?(0,qr.str)(D$||(D$=y(["must contain at least "," valid item(s)"])),e):(0,qr.str)(q$||(q$=y(["must contain at least "," and no more than "," valid item(s)"])),e,t),"message"),params:o(({params:{min:e,max:t}})=>t===void 0?(0,qr._)(z$||(z$=y(["{minContains: ","}"])),e):(0,qr._)(V$||(V$=y(["{minContains: ",", maxContains: ","}"])),e,t),"params")},B$,G$,K$,W$,H$,J$,Z$,Y$,JN={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:HN,code(e){let{gen:t,schema:r,parentSchema:n,data:i,it:s}=e,a,u,{minContains:l,maxContains:d}=n;s.opts.next?(a=l===void 0?1:l,u=d):a=1;let m=t.const("len",(0,qr._)(B$||(B$=y(["",".length"])),i));if(e.setParams({min:a,max:u}),u===void 0&&a===0){(0,gu.checkStrictMode)(s,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(u!==void 0&&a>u){(0,gu.checkStrictMode)(s,'"minContains" > "maxContains" is always invalid'),e.fail();return}if((0,gu.alwaysValidSchema)(s,r)){let _=(0,qr._)(G$||(G$=y([""," >= ",""])),m,a);u!==void 0&&(_=(0,qr._)(K$||(K$=y([""," && "," <= ",""])),_,m,u)),e.pass(_);return}s.items=!0;let h=t.name("valid");u===void 0&&a===1?$(h,()=>t.if(h,()=>t.break())):a===0?(t.let(h,!0),u!==void 0&&t.if((0,qr._)(W$||(W$=y(["",".length > 0"])),i),b)):(t.let(h,!1),b()),e.result(h,()=>e.reset());function b(){let _=t.name("_valid"),E=t.let("count",0);$(_,()=>t.if(_,()=>O(E)))}o(b,"validateItemsWithCount");function $(_,E){t.forRange("i",0,m,k=>{e.subschema({keyword:"contains",dataProp:k,dataPropType:gu.Type.Num,compositeRule:!0},_),E()})}o($,"validateItems");function O(_){t.code((0,qr._)(H$||(H$=y(["","++"])),_)),u===void 0?t.if((0,qr._)(J$||(J$=y([""," >= ",""])),_,a),()=>t.assign(h,!0).break()):(t.if((0,qr._)(Z$||(Z$=y([""," > ",""])),_,u),()=>t.assign(h,!1).break()),a===1?t.assign(h,!0):t.if((0,qr._)(Y$||(Y$=y([""," >= ",""])),_,a),()=>t.assign(h,!0)))}o(O,"checkLimits")}};Ld.default=JN});var ov=D(Tn=>{"use strict";c();Object.defineProperty(Tn,"__esModule",{value:!0});Tn.validateSchemaDeps=Tn.validatePropertyDeps=Tn.error=void 0;var Ud=de(),ZN=Le(),Xa=Ur(),Q$,ev;Tn.error={message:o(({params:{property:e,depsCount:t,deps:r}})=>{let n=t===1?"property":"properties";return(0,Ud.str)(Q$||(Q$=y(["must have "," "," when property "," is present"])),n,r,e)},"message"),params:o(({params:{property:e,depsCount:t,deps:r,missingProperty:n}})=>(0,Ud._)(ev||(ev=y(["{property: ",",\n missingProperty: ",",\n depsCount: ",",\n deps: ","}"])),e,n,t,r),"params")};var YN={keyword:"dependencies",type:"object",schemaType:"object",error:Tn.error,code(e){let[t,r]=XN(e);rv(e,t),nv(e,r)}};function XN({schema:e}){let t={},r={};for(let n in e){if(n==="__proto__")continue;let i=Array.isArray(e[n])?t:r;i[n]=e[n]}return[t,r]}o(XN,"splitDependencies");var tv;function rv(e,t=e.schema){let{gen:r,data:n,it:i}=e;if(Object.keys(t).length===0)return;let s=r.let("missing");for(let a in t){let u=t[a];if(u.length===0)continue;let l=(0,Xa.propertyInData)(r,n,a,i.opts.ownProperties);e.setParams({property:a,depsCount:u.length,deps:u.join(", ")}),i.allErrors?r.if(l,()=>{for(let d of u)(0,Xa.checkReportMissingProp)(e,d)}):(r.if((0,Ud._)(tv||(tv=y([""," && (",")"])),l,(0,Xa.checkMissingProp)(e,u,s))),(0,Xa.reportMissingProp)(e,s),r.else())}}o(rv,"validatePropertyDeps");Tn.validatePropertyDeps=rv;function nv(e,t=e.schema){let{gen:r,data:n,keyword:i,it:s}=e,a=r.name("valid");for(let u in t)(0,ZN.alwaysValidSchema)(s,t[u])||(r.if((0,Xa.propertyInData)(r,n,u,s.opts.ownProperties),()=>{let l=e.subschema({keyword:i,schemaProp:u},a);e.mergeValidEvaluated(l,a)},()=>r.var(a,!0)),e.ok(a))}o(nv,"validateSchemaDeps");Tn.validateSchemaDeps=nv;Tn.default=YN});var av=D(Dd=>{"use strict";c();Object.defineProperty(Dd,"__esModule",{value:!0});var sv=de(),QN=Le(),iv,eR={message:"property name must be valid",params:o(({params:e})=>(0,sv._)(iv||(iv=y(["{propertyName: ","}"])),e.propertyName),"params")},tR={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:eR,code(e){let{gen:t,schema:r,data:n,it:i}=e;if((0,QN.alwaysValidSchema)(i,r))return;let s=t.name("valid");t.forIn("key",n,a=>{e.setParams({propertyName:a}),e.subschema({keyword:"propertyNames",data:a,dataTypes:["string"],propertyName:a,compositeRule:!0},s),t.if((0,sv.not)(s),()=>{e.error(!0),i.allErrors||t.break()})}),e.ok(s)}};Dd.default=tR});var zd=D(qd=>{"use strict";c();Object.defineProperty(qd,"__esModule",{value:!0});var xu=Ur(),un=de(),rR=no(),Iu=Le(),cv,nR={message:"must NOT have additional properties",params:o(({params:e})=>(0,un._)(cv||(cv=y(["{additionalProperty: ","}"])),e.additionalProperty),"params")},uv,fv,lv,pv,oR={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:nR,code(e){let{gen:t,schema:r,parentSchema:n,data:i,errsCount:s,it:a}=e;if(!s)throw new Error("ajv implementation error");let{allErrors:u,opts:l}=a;if(a.props=!0,l.removeAdditional!=="all"&&(0,Iu.alwaysValidSchema)(a,r))return;let d=(0,xu.allSchemaProperties)(n.properties),m=(0,xu.allSchemaProperties)(n.patternProperties);h(),e.ok((0,un._)(uv||(uv=y([""," === ",""])),s,rR.default.errors));function h(){t.forIn("key",i,E=>{!d.length&&!m.length?O(E):t.if(b(E),()=>O(E))})}o(h,"checkAdditionalProperties");function b(E){let k;if(d.length>8){let G=(0,Iu.schemaRefOrVal)(a,n.properties,"properties");k=(0,xu.isOwnProperty)(t,G,E)}else d.length?k=(0,un.or)(...d.map(G=>(0,un._)(fv||(fv=y([""," === ",""])),E,G))):k=un.nil;return m.length&&(k=(0,un.or)(k,...m.map(G=>(0,un._)(lv||(lv=y(["",".test(",")"])),(0,xu.usePattern)(e,G),E)))),(0,un.not)(k)}o(b,"isAdditional");function $(E){t.code((0,un._)(pv||(pv=y(["delete ","[","]"])),i,E))}o($,"deleteAdditional");function O(E){if(l.removeAdditional==="all"||l.removeAdditional&&r===!1){$(E);return}if(r===!1){e.setParams({additionalProperty:E}),e.error(),u||t.break();return}if(typeof r=="object"&&!(0,Iu.alwaysValidSchema)(a,r)){let k=t.name("valid");l.removeAdditional==="failing"?(_(E,k,!1),t.if((0,un.not)(k),()=>{e.reset(),$(E)})):(_(E,k),u||t.if((0,un.not)(k),()=>t.break()))}}o(O,"additionalPropertyCode");function _(E,k,G){let R={keyword:"additionalProperties",dataProp:E,dataPropType:Iu.Type.Str};G===!1&&Object.assign(R,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(R,k)}o(_,"applyAdditionalSchema")}};qd.default=oR});var yv=D(Bd=>{"use strict";c();Object.defineProperty(Bd,"__esModule",{value:!0});var iR=La(),dv=Ur(),Vd=Le(),mv=zd(),sR={keyword:"properties",type:"object",schemaType:"object",code(e){let{gen:t,schema:r,parentSchema:n,data:i,it:s}=e;s.opts.removeAdditional==="all"&&n.additionalProperties===void 0&&mv.default.code(new iR.KeywordCxt(s,mv.default,"additionalProperties"));let a=(0,dv.allSchemaProperties)(r);for(let h of a)s.definedProperties.add(h);s.opts.unevaluated&&a.length&&s.props!==!0&&(s.props=Vd.mergeEvaluated.props(t,(0,Vd.toHash)(a),s.props));let u=a.filter(h=>!(0,Vd.alwaysValidSchema)(s,r[h]));if(u.length===0)return;let l=t.name("valid");for(let h of u)d(h)?m(h):(t.if((0,dv.propertyInData)(t,i,h,s.opts.ownProperties)),m(h),s.allErrors||t.else().var(l,!0),t.endIf()),e.it.definedProperties.add(h),e.ok(l);function d(h){return s.opts.useDefaults&&!s.compositeRule&&r[h].default!==void 0}o(d,"hasDefault");function m(h){e.subschema({keyword:"properties",schemaProp:h,dataProp:h},l)}o(m,"applyPropertySchema")}};Bd.default=sR});var wv=D(Gd=>{"use strict";c();Object.defineProperty(Gd,"__esModule",{value:!0});var hv=Ur(),bu=de(),gv=Le(),xv=Le(),Iv,bv,aR={keyword:"patternProperties",type:"object",schemaType:"object",code(e){let{gen:t,schema:r,data:n,parentSchema:i,it:s}=e,{opts:a}=s,u=(0,hv.allSchemaProperties)(r),l=u.filter(_=>(0,gv.alwaysValidSchema)(s,r[_]));if(u.length===0||l.length===u.length&&(!s.opts.unevaluated||s.props===!0))return;let d=a.strictSchema&&!a.allowMatchingProperties&&i.properties,m=t.name("valid");s.props!==!0&&!(s.props instanceof bu.Name)&&(s.props=(0,xv.evaluatedPropsToName)(t,s.props));let{props:h}=s;b();function b(){for(let _ of u)d&&$(_),s.allErrors?O(_):(t.var(m,!0),O(_),t.if(m))}o(b,"validatePatternProperties");function $(_){for(let E in d)new RegExp(_).test(E)&&(0,gv.checkStrictMode)(s,"property ".concat(E," matches pattern ").concat(_," (use allowMatchingProperties)"))}o($,"checkMatchingProperties");function O(_){t.forIn("key",n,E=>{t.if((0,bu._)(Iv||(Iv=y(["",".test(",")"])),(0,hv.usePattern)(e,_),E),()=>{let k=l.includes(_);k||e.subschema({keyword:"patternProperties",schemaProp:_,dataProp:E,dataPropType:xv.Type.Str},m),s.opts.unevaluated&&h!==!0?t.assign((0,bu._)(bv||(bv=y(["","[","]"])),h,E),!0):!k&&!s.allErrors&&t.if((0,bu.not)(m),()=>t.break())})})}o(O,"validateProperties")}};Gd.default=aR});var $v=D(Kd=>{"use strict";c();Object.defineProperty(Kd,"__esModule",{value:!0});var cR=Le(),uR={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){let{gen:t,schema:r,it:n}=e;if((0,cR.alwaysValidSchema)(n,r)){e.fail();return}let i=t.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},i),e.failResult(i,()=>e.reset(),()=>e.error())},error:{message:"must NOT be valid"}};Kd.default=uR});var vv=D(Wd=>{"use strict";c();Object.defineProperty(Wd,"__esModule",{value:!0});var fR=Ur(),lR={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:fR.validateUnion,error:{message:"must match a schema in anyOf"}};Wd.default=lR});var Pv=D(Hd=>{"use strict";c();Object.defineProperty(Hd,"__esModule",{value:!0});var wu=de(),pR=Le(),Ov,dR={message:"must match exactly one schema in oneOf",params:o(({params:e})=>(0,wu._)(Ov||(Ov=y(["{passingSchemas: ","}"])),e.passing),"params")},_v,Sv,mR={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:dR,code(e){let{gen:t,schema:r,parentSchema:n,it:i}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(i.opts.discriminator&&n.discriminator)return;let s=r,a=t.let("valid",!1),u=t.let("passing",null),l=t.name("_valid");e.setParams({passing:u}),t.block(d),e.result(a,()=>e.reset(),()=>e.error(!0));function d(){s.forEach((m,h)=>{let b;(0,pR.alwaysValidSchema)(i,m)?t.var(l,!0):b=e.subschema({keyword:"oneOf",schemaProp:h,compositeRule:!0},l),h>0&&t.if((0,wu._)(_v||(_v=y([""," && ",""])),l,a)).assign(a,!1).assign(u,(0,wu._)(Sv||(Sv=y(["[",", ","]"])),u,h)).else(),t.if(l,()=>{t.assign(a,!0),t.assign(u,h),b&&e.mergeEvaluated(b,wu.Name)})})}o(d,"validateOneOf")}};Hd.default=mR});var Ev=D(Jd=>{"use strict";c();Object.defineProperty(Jd,"__esModule",{value:!0});var yR=Le(),hR={keyword:"allOf",schemaType:"array",code(e){let{gen:t,schema:r,it:n}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");let i=t.name("valid");r.forEach((s,a)=>{if((0,yR.alwaysValidSchema)(n,s))return;let u=e.subschema({keyword:"allOf",schemaProp:a},i);e.ok(i),e.mergeEvaluated(u)})}};Jd.default=hR});var Nv=D(Zd=>{"use strict";c();Object.defineProperty(Zd,"__esModule",{value:!0});var $u=de(),jv=Le(),kv,Fv,gR={message:o(({params:e})=>(0,$u.str)(kv||(kv=y(['must match "','" schema'])),e.ifClause),"message"),params:o(({params:e})=>(0,$u._)(Fv||(Fv=y(["{failingKeyword: ","}"])),e.ifClause),"params")},Av,xR={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:gR,code(e){let{gen:t,parentSchema:r,it:n}=e;r.then===void 0&&r.else===void 0&&(0,jv.checkStrictMode)(n,'"if" without "then" and "else" is ignored');let i=Tv(n,"then"),s=Tv(n,"else");if(!i&&!s)return;let a=t.let("valid",!0),u=t.name("_valid");if(l(),e.reset(),i&&s){let m=t.let("ifClause");e.setParams({ifClause:m}),t.if(u,d("then",m),d("else",m))}else i?t.if(u,d("then")):t.if((0,$u.not)(u),d("else"));e.pass(a,()=>e.error(!0));function l(){let m=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},u);e.mergeEvaluated(m)}o(l,"validateIf");function d(m,h){return()=>{let b=e.subschema({keyword:m},u);t.assign(a,u),e.mergeValidEvaluated(b,a),h?t.assign(h,(0,$u._)(Av||(Av=y(["",""])),m)):e.setParams({ifClause:m})}}o(d,"validateClause")}};function Tv(e,t){let r=e.schema[t];return r!==void 0&&!(0,jv.alwaysValidSchema)(e,r)}o(Tv,"hasSchema");Zd.default=xR});var Rv=D(Yd=>{"use strict";c();Object.defineProperty(Yd,"__esModule",{value:!0});var IR=Le(),bR={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:r}){t.if===void 0&&(0,IR.checkStrictMode)(r,'"'.concat(e,'" without "if" is ignored'))}};Yd.default=bR});var Cv=D(Xd=>{"use strict";c();Object.defineProperty(Xd,"__esModule",{value:!0});var wR=Nd(),$R=R$(),vR=Rd(),OR=U$(),_R=X$(),SR=ov(),PR=av(),ER=zd(),TR=yv(),kR=wv(),FR=$v(),AR=vv(),jR=Pv(),NR=Ev(),RR=Nv(),CR=Rv();function MR(e=!1){let t=[FR.default,AR.default,jR.default,NR.default,RR.default,CR.default,PR.default,ER.default,SR.default,TR.default,kR.default];return e?t.push($R.default,OR.default):t.push(wR.default,vR.default),t.push(_R.default),t}o(MR,"getApplicator");Xd.default=MR});var eO=D(Qd=>{"use strict";c();Object.defineProperty(Qd,"__esModule",{value:!0});var wt=de(),Mv,Lv,LR={message:o(({schemaCode:e})=>(0,wt.str)(Mv||(Mv=y(['must match format "','"'])),e),"message"),params:o(({schemaCode:e})=>(0,wt._)(Lv||(Lv=y(["{format: ","}"])),e),"params")},Uv,Dv,qv,zv,Vv,Bv,Gv,Kv,Wv,Hv,Jv,Zv,Yv,Xv,Qv,UR={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:LR,code(e,t){let{gen:r,data:n,$data:i,schema:s,schemaCode:a,it:u}=e,{opts:l,errSchemaPath:d,schemaEnv:m,self:h}=u;if(!l.validateFormats)return;i?b():$();function b(){let O=r.scopeValue("formats",{ref:h.formats,code:l.code.formats}),_=r.const("fDef",(0,wt._)(Uv||(Uv=y(["","[","]"])),O,a)),E=r.let("fType"),k=r.let("format");r.if((0,wt._)(Dv||(Dv=y(["typeof ",' == "object" && !('," instanceof RegExp)"])),_,_),()=>r.assign(E,(0,wt._)(qv||(qv=y(["",'.type || "string"'])),_)).assign(k,(0,wt._)(zv||(zv=y(["",".validate"])),_)),()=>r.assign(E,(0,wt._)(Vv||(Vv=y(['"string"'])))).assign(k,_)),e.fail$data((0,wt.or)(G(),R()));function G(){return l.strictSchema===!1?wt.nil:(0,wt._)(Bv||(Bv=y([""," && !",""])),a,k)}o(G,"unknownFmt");function R(){let N=m.$async?(0,wt._)(Gv||(Gv=y(["(",".async ? await ","(",") : ","(","))"])),_,k,n,k,n):(0,wt._)(Kv||(Kv=y(["","(",")"])),k,n),C=(0,wt._)(Wv||(Wv=y(["(typeof ",' == "function" ? '," : ",".test(","))"])),k,N,k,n);return(0,wt._)(Hv||(Hv=y([""," && "," !== true && "," === "," && !",""])),k,k,E,t,C)}o(R,"invalidFmt")}o(b,"validate$DataFormat");function $(){let O=h.formats[s];if(!O){G();return}if(O===!0)return;let[_,E,k]=R(O);_===t&&e.pass(N());function G(){if(l.strictSchema===!1){h.logger.warn(C());return}throw new Error(C());function C(){return'unknown format "'.concat(s,'" ignored in schema at path "').concat(d,'"')}}o(G,"unknownFormat");function R(C){let me=C instanceof RegExp?(0,wt.regexpCode)(C):l.code.formats?(0,wt._)(Jv||(Jv=y(["","",""])),l.code.formats,(0,wt.getProperty)(s)):void 0,le=r.scopeValue("formats",{key:s,ref:C,code:me});return typeof C=="object"&&!(C instanceof RegExp)?[C.type||"string",C.validate,(0,wt._)(Zv||(Zv=y(["",".validate"])),le)]:["string",C,le]}o(R,"getFormat");function N(){if(typeof O=="object"&&!(O instanceof RegExp)&&O.async){if(!m.$async)throw new Error("async format in sync schema");return(0,wt._)(Yv||(Yv=y(["await ","(",")"])),k,n)}return typeof E=="function"?(0,wt._)(Xv||(Xv=y(["","(",")"])),k,n):(0,wt._)(Qv||(Qv=y(["",".test(",")"])),k,n)}o(N,"validCondition")}o($,"validateFormat")}};Qd.default=UR});var tO=D(em=>{"use strict";c();Object.defineProperty(em,"__esModule",{value:!0});var DR=eO(),qR=[DR.default];em.default=qR});var rO=D(bs=>{"use strict";c();Object.defineProperty(bs,"__esModule",{value:!0});bs.contentVocabulary=bs.metadataVocabulary=void 0;bs.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];bs.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});var oO=D(tm=>{"use strict";c();Object.defineProperty(tm,"__esModule",{value:!0});var zR=yw(),VR=O$(),BR=Cv(),GR=tO(),nO=rO(),KR=[zR.default,VR.default,(0,BR.default)(),GR.default,nO.metadataVocabulary,nO.contentVocabulary];tm.default=KR});var sO=D(vu=>{"use strict";c();Object.defineProperty(vu,"__esModule",{value:!0});vu.DiscrError=void 0;var iO;(function(e){e.Tag="tag",e.Mapping="mapping"})(iO||(vu.DiscrError=iO={}))});var pO=D(nm=>{"use strict";c();Object.defineProperty(nm,"__esModule",{value:!0});var ws=de(),rm=sO(),aO=iu(),WR=Ua(),HR=Le(),cO,JR={message:o(({params:{discrError:e,tagName:t}})=>e===rm.DiscrError.Tag?'tag "'.concat(t,'" must be string'):'value of tag "'.concat(t,'" must be in oneOf'),"message"),params:o(({params:{discrError:e,tag:t,tagName:r}})=>(0,ws._)(cO||(cO=y(["{error: ",", tag: ",", tagValue: ","}"])),e,r,t),"params")},uO,fO,lO,ZR={keyword:"discriminator",type:"object",schemaType:"object",error:JR,code(e){let{gen:t,data:r,schema:n,parentSchema:i,it:s}=e,{oneOf:a}=i;if(!s.opts.discriminator)throw new Error("discriminator: requires discriminator option");let u=n.propertyName;if(typeof u!="string")throw new Error("discriminator: requires propertyName");if(n.mapping)throw new Error("discriminator: mapping is not supported");if(!a)throw new Error("discriminator: requires oneOf keyword");let l=t.let("valid",!1),d=t.const("tag",(0,ws._)(uO||(uO=y(["","",""])),r,(0,ws.getProperty)(u)));t.if((0,ws._)(fO||(fO=y(["typeof ",' == "string"'])),d),()=>m(),()=>e.error(!1,{discrError:rm.DiscrError.Tag,tag:d,tagName:u})),e.ok(l);function m(){let $=b();t.if(!1);for(let O in $)t.elseIf((0,ws._)(lO||(lO=y([""," === ",""])),d,O)),t.assign(l,h($[O]));t.else(),e.error(!1,{discrError:rm.DiscrError.Mapping,tag:d,tagName:u}),t.endIf()}o(m,"validateMapping");function h($){let O=t.name("valid"),_=e.subschema({keyword:"oneOf",schemaProp:$},O);return e.mergeEvaluated(_,ws.Name),O}o(h,"applyTagSchema");function b(){var $;let O={},_=k(i),E=!0;for(let N=0;N<a.length;N++){let C=a[N];if(C!=null&&C.$ref&&!(0,HR.schemaHasRulesButRef)(C,s.self.RULES)){let le=C.$ref;if(C=aO.resolveRef.call(s.self,s.schemaEnv.root,s.baseId,le),C instanceof aO.SchemaEnv&&(C=C.schema),C===void 0)throw new WR.default(s.opts.uriResolver,s.baseId,le)}let me=($=C==null?void 0:C.properties)===null||$===void 0?void 0:$[u];if(typeof me!="object")throw new Error('discriminator: oneOf subschemas (or referenced schemas) must have "properties/'.concat(u,'"'));E=E&&(_||k(C)),G(me,N)}if(!E)throw new Error('discriminator: "'.concat(u,'" must be required'));return O;function k({required:N}){return Array.isArray(N)&&N.includes(u)}function G(N,C){if(N.const)R(N.const,C);else if(N.enum)for(let me of N.enum)R(me,C);else throw new Error('discriminator: "properties/'.concat(u,'" must have "const" or "enum"'))}function R(N,C){if(typeof N!="string"||N in O)throw new Error('discriminator: "'.concat(u,'" values must be unique strings'));O[N]=C}}o(b,"getMapping")}};nm.default=ZR});var dO=D(($6,YR)=>{YR.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 sm=D((ft,om)=>{"use strict";c();Object.defineProperty(ft,"__esModule",{value:!0});ft.MissingRefError=ft.ValidationError=ft.CodeGen=ft.Name=ft.nil=ft.stringify=ft.str=ft._=ft.KeywordCxt=ft.Ajv=void 0;var XR=ew(),QR=oO(),eC=pO(),mO=dO(),tC=["/properties"],Ou="http://json-schema.org/draft-07/schema",im=class im extends XR.default{_addVocabularies(){super._addVocabularies(),QR.default.forEach(t=>this.addVocabulary(t)),this.opts.discriminator&&this.addKeyword(eC.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let t=this.opts.$data?this.$dataMetaSchema(mO,tC):mO;this.addMetaSchema(t,Ou,!1),this.refs["http://json-schema.org/schema"]=Ou}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(Ou)?Ou:void 0)}};o(im,"Ajv");var $s=im;ft.Ajv=$s;om.exports=ft=$s;om.exports.Ajv=$s;Object.defineProperty(ft,"__esModule",{value:!0});ft.default=$s;var rC=La();Object.defineProperty(ft,"KeywordCxt",{enumerable:!0,get:o(function(){return rC.KeywordCxt},"get")});var vs=de();Object.defineProperty(ft,"_",{enumerable:!0,get:o(function(){return vs._},"get")});Object.defineProperty(ft,"str",{enumerable:!0,get:o(function(){return vs.str},"get")});Object.defineProperty(ft,"stringify",{enumerable:!0,get:o(function(){return vs.stringify},"get")});Object.defineProperty(ft,"nil",{enumerable:!0,get:o(function(){return vs.nil},"get")});Object.defineProperty(ft,"Name",{enumerable:!0,get:o(function(){return vs.Name},"get")});Object.defineProperty(ft,"CodeGen",{enumerable:!0,get:o(function(){return vs.CodeGen},"get")});var nC=nu();Object.defineProperty(ft,"ValidationError",{enumerable:!0,get:o(function(){return nC.default},"get")});var oC=Ua();Object.defineProperty(ft,"MissingRefError",{enumerable:!0,get:o(function(){return oC.default},"get")})});var bO=D(kn=>{"use strict";c();Object.defineProperty(kn,"__esModule",{value:!0});kn.formatNames=kn.fastFormats=kn.fullFormats=void 0;function Os(e,t){return{validate:e,compare:t}}o(Os,"fmtDef");kn.fullFormats={date:Os(gO,um),time:Os(xO,fm),"date-time":Os(cC,IO),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:lC,"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:new RegExp("^(?:https?|ftp):\\/\\/(?:\\S+(?::\\S*)?@)?(?:(?!(?:10|127)(?:\\.\\d{1,3}){3})(?!(?:169\\.254|192\\.168)(?:\\.\\d{1,3}){2})(?!172\\.(?:1[6-9]|2\\d|3[0-1])(?:\\.\\d{1,3}){2})(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[1-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z0-9\\u{00a1}-\\u{ffff}]+-)*[a-z0-9\\u{00a1}-\\u{ffff}]+)(?:\\.(?:[a-z0-9\\u{00a1}-\\u{ffff}]+-)*[a-z0-9\\u{00a1}-\\u{ffff}]+)*(?:\\.(?:[a-z\\u{00a1}-\\u{ffff}]{2,})))(?::\\d{2,5})?(?:\\/[^\\s]*)?$","iu"),email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:xC,uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:pC,int32:{type:"number",validate:yC},int64:{type:"number",validate:hC},float:{type:"number",validate:hO},double:{type:"number",validate:hO},password:!0,binary:!0};kn.fastFormats=F(g({},kn.fullFormats),{date:Os(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,um),time:Os(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,fm),"date-time":Os(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,IO),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i});kn.formatNames=Object.keys(kn.fullFormats);function iC(e){return e%4===0&&(e%100!==0||e%400===0)}o(iC,"isLeapYear");var sC=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,aC=[0,31,28,31,30,31,30,31,31,30,31,30,31];function gO(e){let t=sC.exec(e);if(!t)return!1;let r=+t[1],n=+t[2],i=+t[3];return n>=1&&n<=12&&i>=1&&i<=(n===2&&iC(r)?29:aC[n])}o(gO,"date");function um(e,t){if(e&&t)return e>t?1:e<t?-1:0}o(um,"compareDate");var am=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i;function xO(e,t){let r=am.exec(e);if(!r)return!1;let n=+r[1],i=+r[2],s=+r[3],a=r[5];return(n<=23&&i<=59&&s<=59||n===23&&i===59&&s===60)&&(!t||a!=="")}o(xO,"time");function fm(e,t){if(!(e&&t))return;let r=am.exec(e),n=am.exec(t);if(r&&n)return e=r[1]+r[2]+r[3]+(r[4]||""),t=n[1]+n[2]+n[3]+(n[4]||""),e>t?1:e<t?-1:0}o(fm,"compareTime");var cm=/t|\s/i;function cC(e){let t=e.split(cm);return t.length===2&&gO(t[0])&&xO(t[1],!0)}o(cC,"date_time");function IO(e,t){if(!(e&&t))return;let[r,n]=e.split(cm),[i,s]=t.split(cm),a=um(r,i);if(a!==void 0)return a||fm(n,s)}o(IO,"compareDateTime");var uC=/\/|:/,fC=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function lC(e){return uC.test(e)&&fC.test(e)}o(lC,"uri");var yO=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function pC(e){return yO.lastIndex=0,yO.test(e)}o(pC,"byte");var dC=-(2**31),mC=2**31-1;function yC(e){return Number.isInteger(e)&&e<=mC&&e>=dC}o(yC,"validateInt32");function hC(e){return Number.isInteger(e)}o(hC,"validateInt64");function hO(){return!0}o(hO,"validateNumber");var gC=/[^\\]\\Z/;function xC(e){if(gC.test(e))return!1;try{return new RegExp(e),!0}catch(t){return!1}}o(xC,"regex")});var TO=D(_s=>{"use strict";c();Object.defineProperty(_s,"__esModule",{value:!0});_s.formatLimitDefinition=void 0;var IC=sm(),fn=de(),zo=fn.operators,_u={formatMaximum:{okStr:"<=",ok:zo.LTE,fail:zo.GT},formatMinimum:{okStr:">=",ok:zo.GTE,fail:zo.LT},formatExclusiveMaximum:{okStr:"<",ok:zo.LT,fail:zo.GTE},formatExclusiveMinimum:{okStr:">",ok:zo.GT,fail:zo.LTE}},wO,$O,bC={message:o(({keyword:e,schemaCode:t})=>fn.str(wO||(wO=y(["should be "," ",""])),_u[e].okStr,t),"message"),params:o(({keyword:e,schemaCode:t})=>fn._($O||($O=y(["{comparison: ",", limit: ","}"])),_u[e].okStr,t),"params")},vO,OO,_O,SO,PO,EO;_s.formatLimitDefinition={keyword:Object.keys(_u),type:"string",schemaType:"string",$data:!0,error:bC,code(e){let{gen:t,data:r,schemaCode:n,keyword:i,it:s}=e,{opts:a,self:u}=s;if(!a.validateFormats)return;let l=new IC.KeywordCxt(s,u.RULES.all.format.definition,"format");l.$data?d():m();function d(){let b=t.scopeValue("formats",{ref:u.formats,code:a.code.formats}),$=t.const("fmt",fn._(vO||(vO=y(["","[","]"])),b,l.schemaCode));e.fail$data(fn.or(fn._(OO||(OO=y(["typeof ",' != "object"'])),$),fn._(_O||(_O=y([""," instanceof RegExp"])),$),fn._(SO||(SO=y(["typeof ",'.compare != "function"'])),$),h($)))}o(d,"validate$DataFormat");function m(){let b=l.schema,$=u.formats[b];if(!$||$===!0)return;if(typeof $!="object"||$ instanceof RegExp||typeof $.compare!="function")throw new Error('"'.concat(i,'": format "').concat(b,'" does not define "compare" function'));let O=t.scopeValue("formats",{key:b,ref:$,code:a.code.formats?fn._(PO||(PO=y(["","",""])),a.code.formats,fn.getProperty(b)):void 0});e.fail$data(h(O))}o(m,"validateFormat");function h(b){return fn._(EO||(EO=y(["",".compare(",", ",") "," 0"])),b,r,n,_u[i].fail)}o(h,"compareCode")},dependencies:["format"]};var wC=o(e=>(e.addKeyword(_s.formatLimitDefinition),e),"formatLimitPlugin");_s.default=wC});var NO=D((Qa,jO)=>{"use strict";c();Object.defineProperty(Qa,"__esModule",{value:!0});var Ss=bO(),$C=TO(),lm=de(),kO=new lm.Name("fullFormats"),vC=new lm.Name("fastFormats"),pm=o((e,t={keywords:!0})=>{if(Array.isArray(t))return FO(e,t,Ss.fullFormats,kO),e;let[r,n]=t.mode==="fast"?[Ss.fastFormats,vC]:[Ss.fullFormats,kO],i=t.formats||Ss.formatNames;return FO(e,i,r,n),t.keywords&&$C.default(e),e},"formatsPlugin");pm.get=(e,t="full")=>{let n=(t==="fast"?Ss.fastFormats:Ss.fullFormats)[e];if(!n)throw new Error('Unknown format "'.concat(e,'"'));return n};var AO;function FO(e,t,r,n){var i,s;(i=(s=e.opts.code).formats)!==null&&i!==void 0||(s.formats=lm._(AO||(AO=y(['require("ajv-formats/dist/formats").',""])),n));for(let a of t)e.addFormat(a,r[a])}o(FO,"addFormats");jO.exports=Qa=pm;Object.defineProperty(Qa,"__esModule",{value:!0});Qa.default=pm});var ak=D((ag,cg)=>{c();(function(e,t){typeof ag=="object"&&typeof cg<"u"?cg.exports=t():typeof define=="function"&&define.amd?define(t):(e=e||self,e.TinyQueue=t())})(ag,function(){"use strict";var e=o(function(n,i){if(n===void 0&&(n=[]),i===void 0&&(i=t),this.data=n,this.length=this.data.length,this.compare=i,this.length>0)for(var s=(this.length>>1)-1;s>=0;s--)this._down(s)},"TinyQueue");e.prototype.push=o(function(n){this.data.push(n),this.length++,this._up(this.length-1)},"push"),e.prototype.pop=o(function(){if(this.length!==0){var n=this.data[0],i=this.data.pop();return this.length--,this.length>0&&(this.data[0]=i,this._down(0)),n}},"pop"),e.prototype.peek=o(function(){return this.data[0]},"peek"),e.prototype._up=o(function(n){for(var i=this,s=i.data,a=i.compare,u=s[n];n>0;){var l=n-1>>1,d=s[l];if(a(u,d)>=0)break;s[n]=d,n=l}s[n]=u},"_up"),e.prototype._down=o(function(n){for(var i=this,s=i.data,a=i.compare,u=this.length>>1,l=s[n];n<u;){var d=(n<<1)+1,m=s[d],h=d+1;if(h<this.length&&a(s[h],m)<0&&(d=h,m=s[h]),a(m,l)>=0)break;s[n]=m,n=d}s[n]=l},"_down");function t(r,n){return r<n?-1:r>n?1:0}return o(t,"defaultCompare"),e})});var uk=D((L0e,ug)=>{"use strict";c();var ul=ak();ul.default&&(ul=ul.default);ug.exports=ck;ug.exports.default=ck;function ck(e,t,r){t=t||1;for(var n,i,s,a,u=0;u<e[0].length;u++){var l=e[0][u];(!u||l[0]<n)&&(n=l[0]),(!u||l[1]<i)&&(i=l[1]),(!u||l[0]>s)&&(s=l[0]),(!u||l[1]>a)&&(a=l[1])}var d=s-n,m=a-i,h=Math.min(d,m),b=h/2;if(h===0){var $=[n,i];return $.distance=0,$}for(var O=new ul(void 0,uB),_=n;_<s;_+=h)for(var E=i;E<a;E+=h)O.push(new Qo(_+b,E+b,b,e));var k=lB(e),G=new Qo(n+d/2,i+m/2,0,e);G.d>k.d&&(k=G);for(var R=O.length;O.length;){var N=O.pop();N.d>k.d&&(k=N,r&&console.log("found best %d after %d probes",Math.round(1e4*N.d)/1e4,R)),!(N.max-k.d<=t)&&(b=N.h/2,O.push(new Qo(N.x-b,N.y-b,b,e)),O.push(new Qo(N.x+b,N.y-b,b,e)),O.push(new Qo(N.x-b,N.y+b,b,e)),O.push(new Qo(N.x+b,N.y+b,b,e)),R+=4)}r&&(console.log("num probes: "+R),console.log("best distance: "+k.d));var C=[k.x,k.y];return C.distance=k.d,C}o(ck,"polylabel");function uB(e,t){return t.max-e.max}o(uB,"compareMax");function Qo(e,t,r,n){this.x=e,this.y=t,this.h=r,this.d=fB(e,t,n),this.max=this.d+this.h*Math.SQRT2}o(Qo,"Cell");function fB(e,t,r){for(var n=!1,i=1/0,s=0;s<r.length;s++)for(var a=r[s],u=0,l=a.length,d=l-1;u<l;d=u++){var m=a[u],h=a[d];m[1]>t!=h[1]>t&&e<(h[0]-m[0])*(t-m[1])/(h[1]-m[1])+m[0]&&(n=!n),i=Math.min(i,pB(e,t,m,h))}return i===0?0:(n?1:-1)*Math.sqrt(i)}o(fB,"pointToPolygonDist");function lB(e){for(var t=0,r=0,n=0,i=e[0],s=0,a=i.length,u=a-1;s<a;u=s++){var l=i[s],d=i[u],m=l[0]*d[1]-d[0]*l[1];r+=(l[0]+d[0])*m,n+=(l[1]+d[1])*m,t+=m*3}return t===0?new Qo(i[0][0],i[0][1],0,e):new Qo(r/t,n/t,0,e)}o(lB,"getCentroidCell");function pB(e,t,r,n){var i=r[0],s=r[1],a=n[0]-i,u=n[1]-s;if(a!==0||u!==0){var l=((e-i)*a+(t-s)*u)/(a*a+u*u);l>1?(i=n[0],s=n[1]):l>0&&(i+=a*l,s+=u*l)}return a=e-i,u=t-s,a*a+u*u}o(pB,"getSegDistSq")});c();c();c();c();var $k="[MappedinJS]";function vk(e=""){let t="".concat($k).concat(e?"-".concat(e):""),r=o((n,i)=>{if(typeof window<"u"&&window.rnDebug){let s=i.map(a=>a instanceof Error&&a.stack?"".concat(a.message,"\n").concat(a.stack):a);window.rnDebug("".concat(t," ").concat(n,": ").concat(s.join(" ")))}},"rnDebug");return{logState:p.env.NODE_ENV==="test"?3:0,log(...n){this.logState<=0&&(console.log(t,...n),r("log",n))},warn(...n){this.logState<=1&&(console.warn(t,...n),r("warn",n))},error(...n){this.logState<=2&&(console.error(t,...n),r("error",n))},assert(...n){console.assert(...n)},time(n){console.time(n)},timeEnd(n){console.timeEnd(n)},setLevel(n){0<=n&&n<=3&&(this.logState=n)}}}o(vk,"createLogger");var Ok=vk();var Zi=Ok;c();c();var dl=class dl extends Error{};o(dl,"InvalidTokenError");var pl=dl;pl.prototype.name="InvalidTokenError";c();c();c();c();c();c();c();var $n,Xi,ei,ha,Yi=class Yi{constructor(t,r){Pt(this,ei);tt(this,"__type",Yi.__type);Pt(this,$n);Pt(this,Xi);tt(this,"id");tt(this,"type");Ct(this,$n,t),Ct(this,Xi,r),this.id="ev_".concat(t.id),this.type=t.type}static is(t){return t!=null&&typeof t=="object"&&"__type"in t&&t.__type===Yi.__type}get name(){var t;return(t=ko(this,ei,ha).call(this,"name"))!=null?t:""}get startDate(){return new Date(H(this,$n).startDate)}get endDate(){return new Date(H(this,$n).endDate)}get externalId(){return H(this,$n).externalId}get description(){return ko(this,ei,ha).call(this,"description")}get location(){let t=H(this,$n).location,r=t!=null&&t.startsWith("el_")?t:"el_".concat(t);return H(this,Xi).getById("enterprise-location",r)}get image(){let t=ko(this,ei,ha).call(this,"image");if(t!=null)return g({url:t.original},t)}get video(){let t=ko(this,ei,ha).call(this,"video");if(t!=null)return{url:t.original,thumbnail:t.thumbnail,width:t.width,height:t.height}}};$n=new WeakMap,Xi=new WeakMap,ei=new WeakSet,ha=o(function(t){var r,n,i,s,a;return(a=(s=(i=H(this,$n)._locale)==null?void 0:i[(n=(r=H(this,Xi).currentLanguage)==null?void 0:r.code)!=null?n:"en"])==null?void 0:s[t])!=null?a:H(this,$n)[t]},"#getLocalizedResource"),o(Yi,"EventMetaData"),tt(Yi,"__type","event");var jc=Yi;c();c();c();var qe={};To(qe,{BRAND:()=>Zk,DIRTY:()=>ti,EMPTY_PATH:()=>Ek,INVALID:()=>te,NEVER:()=>NF,OK:()=>Ht,ParseStatus:()=>Mt,Schema:()=>pe,ZodAny:()=>jo,ZodArray:()=>eo,ZodBigInt:()=>oi,ZodBoolean:()=>ii,ZodBranded:()=>va,ZodCatch:()=>hi,ZodDate:()=>si,ZodDefault:()=>yi,ZodDiscriminatedUnion:()=>Lc,ZodEffects:()=>Mr,ZodEnum:()=>di,ZodError:()=>mr,ZodFirstPartyTypeKind:()=>oe,ZodFunction:()=>Dc,ZodIntersection:()=>fi,ZodIssueCode:()=>j,ZodLazy:()=>li,ZodLiteral:()=>pi,ZodMap:()=>ss,ZodNaN:()=>cs,ZodNativeEnum:()=>mi,ZodNever:()=>on,ZodNull:()=>ci,ZodNullable:()=>_n,ZodNumber:()=>ni,ZodObject:()=>yr,ZodOptional:()=>Rr,ZodParsedType:()=>z,ZodPipeline:()=>Oa,ZodPromise:()=>No,ZodReadonly:()=>gi,ZodRecord:()=>Uc,ZodSchema:()=>pe,ZodSet:()=>as,ZodString:()=>Ao,ZodSymbol:()=>os,ZodTransformer:()=>Mr,ZodTuple:()=>On,ZodType:()=>pe,ZodUndefined:()=>ai,ZodUnion:()=>ui,ZodUnknown:()=>Qn,ZodVoid:()=>is,addIssueToContext:()=>M,any:()=>iF,array:()=>uF,bigint:()=>eF,boolean:()=>Og,coerce:()=>jF,custom:()=>wg,date:()=>tF,datetimeRegex:()=>Ig,defaultErrorMap:()=>Yn,discriminatedUnion:()=>dF,effect:()=>_F,enum:()=>$F,function:()=>IF,getErrorMap:()=>Qi,getParsedType:()=>vn,instanceof:()=>Xk,intersection:()=>mF,isAborted:()=>Cc,isAsync:()=>es,isDirty:()=>Mc,isValid:()=>Fo,late:()=>Yk,lazy:()=>bF,literal:()=>wF,makeIssue:()=>ga,map:()=>gF,nan:()=>Qk,nativeEnum:()=>vF,never:()=>aF,null:()=>oF,nullable:()=>PF,number:()=>vg,object:()=>fF,objectUtil:()=>ml,oboolean:()=>AF,onumber:()=>FF,optional:()=>SF,ostring:()=>kF,pipeline:()=>TF,preprocess:()=>EF,promise:()=>OF,quotelessJson:()=>_k,record:()=>hF,set:()=>xF,setErrorMap:()=>Pk,strictObject:()=>lF,string:()=>$g,symbol:()=>rF,transformer:()=>_F,tuple:()=>yF,undefined:()=>nF,union:()=>pF,unknown:()=>sF,util:()=>xe,void:()=>cF});c();c();c();c();c();var xe;(function(e){e.assertEqual=i=>{};function t(i){}o(t,"assertIs"),e.assertIs=t;function r(i){throw new Error}o(r,"assertNever"),e.assertNever=r,e.arrayToEnum=i=>{let s={};for(let a of i)s[a]=a;return s},e.getValidEnumValues=i=>{let s=e.objectKeys(i).filter(u=>typeof i[i[u]]!="number"),a={};for(let u of s)a[u]=i[u];return e.objectValues(a)},e.objectValues=i=>e.objectKeys(i).map(function(s){return i[s]}),e.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{let s=[];for(let a in i)Object.prototype.hasOwnProperty.call(i,a)&&s.push(a);return s},e.find=(i,s)=>{for(let a of i)if(s(a))return a},e.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&Number.isFinite(i)&&Math.floor(i)===i;function n(i,s=" | "){return i.map(a=>typeof a=="string"?"'".concat(a,"'"):a).join(s)}o(n,"joinValues"),e.joinValues=n,e.jsonStringifyReplacer=(i,s)=>typeof s=="bigint"?s.toString():s})(xe||(xe={}));var ml;(function(e){e.mergeShapes=(t,r)=>g(g({},t),r)})(ml||(ml={}));var z=xe.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),vn=o(e=>{switch(typeof e){case"undefined":return z.undefined;case"string":return z.string;case"number":return Number.isNaN(e)?z.nan:z.number;case"boolean":return z.boolean;case"function":return z.function;case"bigint":return z.bigint;case"symbol":return z.symbol;case"object":return Array.isArray(e)?z.array:e===null?z.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?z.promise:typeof Map<"u"&&e instanceof Map?z.map:typeof Set<"u"&&e instanceof Set?z.set:typeof Date<"u"&&e instanceof Date?z.date:z.object;default:return z.unknown}},"getParsedType");var j=xe.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),_k=o(e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:"),"quotelessJson"),Nc=class Nc extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};let r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=t}format(t){let r=t||function(s){return s.message},n={_errors:[]},i=o(s=>{for(let a of s.issues)if(a.code==="invalid_union")a.unionErrors.map(i);else if(a.code==="invalid_return_type")i(a.returnTypeError);else if(a.code==="invalid_arguments")i(a.argumentsError);else if(a.path.length===0)n._errors.push(r(a));else{let u=n,l=0;for(;l<a.path.length;){let d=a.path[l];l===a.path.length-1?(u[d]=u[d]||{_errors:[]},u[d]._errors.push(r(a))):u[d]=u[d]||{_errors:[]},u=u[d],l++}}},"processError");return i(this),n}static assert(t){if(!(t instanceof Nc))throw new Error("Not a ZodError: ".concat(t))}toString(){return this.message}get message(){return JSON.stringify(this.issues,xe.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=r=>r.message){let r={},n=[];for(let i of this.issues)i.path.length>0?(r[i.path[0]]=r[i.path[0]]||[],r[i.path[0]].push(t(i))):n.push(t(i));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}};o(Nc,"ZodError");var mr=Nc;mr.create=e=>new mr(e);var Sk=o((e,t)=>{let r;switch(e.code){case j.invalid_type:e.received===z.undefined?r="Required":r="Expected ".concat(e.expected,", received ").concat(e.received);break;case j.invalid_literal:r="Invalid literal value, expected ".concat(JSON.stringify(e.expected,xe.jsonStringifyReplacer));break;case j.unrecognized_keys:r="Unrecognized key(s) in object: ".concat(xe.joinValues(e.keys,", "));break;case j.invalid_union:r="Invalid input";break;case j.invalid_union_discriminator:r="Invalid discriminator value. Expected ".concat(xe.joinValues(e.options));break;case j.invalid_enum_value:r="Invalid enum value. Expected ".concat(xe.joinValues(e.options),", received '").concat(e.received,"'");break;case j.invalid_arguments:r="Invalid function arguments";break;case j.invalid_return_type:r="Invalid function return type";break;case j.invalid_date:r="Invalid date";break;case j.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(r='Invalid input: must include "'.concat(e.validation.includes,'"'),typeof e.validation.position=="number"&&(r="".concat(r," at one or more positions greater than or equal to ").concat(e.validation.position))):"startsWith"in e.validation?r='Invalid input: must start with "'.concat(e.validation.startsWith,'"'):"endsWith"in e.validation?r='Invalid input: must end with "'.concat(e.validation.endsWith,'"'):xe.assertNever(e.validation):e.validation!=="regex"?r="Invalid ".concat(e.validation):r="Invalid";break;case j.too_small:e.type==="array"?r="Array must contain ".concat(e.exact?"exactly":e.inclusive?"at least":"more than"," ").concat(e.minimum," element(s)"):e.type==="string"?r="String must contain ".concat(e.exact?"exactly":e.inclusive?"at least":"over"," ").concat(e.minimum," character(s)"):e.type==="number"?r="Number must be ".concat(e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than ").concat(e.minimum):e.type==="date"?r="Date must be ".concat(e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than ").concat(new Date(Number(e.minimum))):r="Invalid input";break;case j.too_big:e.type==="array"?r="Array must contain ".concat(e.exact?"exactly":e.inclusive?"at most":"less than"," ").concat(e.maximum," element(s)"):e.type==="string"?r="String must contain ".concat(e.exact?"exactly":e.inclusive?"at most":"under"," ").concat(e.maximum," character(s)"):e.type==="number"?r="Number must be ".concat(e.exact?"exactly":e.inclusive?"less than or equal to":"less than"," ").concat(e.maximum):e.type==="bigint"?r="BigInt must be ".concat(e.exact?"exactly":e.inclusive?"less than or equal to":"less than"," ").concat(e.maximum):e.type==="date"?r="Date must be ".concat(e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"," ").concat(new Date(Number(e.maximum))):r="Invalid input";break;case j.custom:r="Invalid input";break;case j.invalid_intersection_types:r="Intersection results could not be merged";break;case j.not_multiple_of:r="Number must be a multiple of ".concat(e.multipleOf);break;case j.not_finite:r="Number must be finite";break;default:r=t.defaultError,xe.assertNever(e)}return{message:r}},"errorMap"),Yn=Sk;var mg=Yn;function Pk(e){mg=e}o(Pk,"setErrorMap");function Qi(){return mg}o(Qi,"getErrorMap");c();var ga=o(e=>{let{data:t,path:r,errorMaps:n,issueData:i}=e,s=[...r,...i.path||[]],a=F(g({},i),{path:s});if(i.message!==void 0)return F(g({},i),{path:s,message:i.message});let u="",l=n.filter(d=>!!d).slice().reverse();for(let d of l)u=d(a,{data:t,defaultError:u}).message;return F(g({},i),{path:s,message:u})},"makeIssue"),Ek=[];function M(e,t){let r=Qi(),n=ga({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,r,r===Yn?void 0:Yn].filter(i=>!!i)});e.common.issues.push(n)}o(M,"addIssueToContext");var Rc=class Rc{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,r){let n=[];for(let i of r){if(i.status==="aborted")return te;i.status==="dirty"&&t.dirty(),n.push(i.value)}return{status:t.value,value:n}}static async mergeObjectAsync(t,r){let n=[];for(let i of r){let s=await i.key,a=await i.value;n.push({key:s,value:a})}return Rc.mergeObjectSync(t,n)}static mergeObjectSync(t,r){let n={};for(let i of r){let{key:s,value:a}=i;if(s.status==="aborted"||a.status==="aborted")return te;s.status==="dirty"&&t.dirty(),a.status==="dirty"&&t.dirty(),s.value!=="__proto__"&&(typeof a.value<"u"||i.alwaysSet)&&(n[s.value]=a.value)}return{status:t.value,value:n}}};o(Rc,"ParseStatus");var Mt=Rc,te=Object.freeze({status:"aborted"}),ti=o(e=>({status:"dirty",value:e}),"DIRTY"),Ht=o(e=>({status:"valid",value:e}),"OK"),Cc=o(e=>e.status==="aborted","isAborted"),Mc=o(e=>e.status==="dirty","isDirty"),Fo=o(e=>e.status==="valid","isValid"),es=o(e=>typeof Promise<"u"&&e instanceof Promise,"isAsync");c();c();c();var J;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(J||(J={}));var gl=class gl{constructor(t,r,n,i){this._cachedPath=[],this.parent=t,this.data=r,this._path=n,this._key=i}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}};o(gl,"ParseInputLazyPath");var Cr=gl,yg=o((e,t)=>{if(Fo(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let r=new mr(e.common.issues);return this._error=r,this._error}}},"handleResult");function ce(e){if(!e)return{};let{errorMap:t,invalid_type_error:r,required_error:n,description:i}=e;if(t&&(r||n))throw new Error('Can\'t use "invalid_type_error" or "required_error" in conjunction with custom error map.');return t?{errorMap:t,description:i}:{errorMap:o((a,u)=>{var d,m;let{message:l}=e;return a.code==="invalid_enum_value"?{message:l!=null?l:u.defaultError}:typeof u.data>"u"?{message:(d=l!=null?l:n)!=null?d:u.defaultError}:a.code!=="invalid_type"?{message:u.defaultError}:{message:(m=l!=null?l:r)!=null?m:u.defaultError}},"customMap"),description:i}}o(ce,"processCreateParams");var xl=class xl{get description(){return this._def.description}_getType(t){return vn(t.data)}_getOrReturnCtx(t,r){return r||{common:t.parent.common,data:t.data,parsedType:vn(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new Mt,ctx:{common:t.parent.common,data:t.data,parsedType:vn(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){let r=this._parse(t);if(es(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(t){let r=this._parse(t);return Promise.resolve(r)}parse(t,r){let n=this.safeParse(t,r);if(n.success)return n.data;throw n.error}safeParse(t,r){var s;let n={common:{issues:[],async:(s=r==null?void 0:r.async)!=null?s:!1,contextualErrorMap:r==null?void 0:r.errorMap},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:vn(t)},i=this._parseSync({data:t,path:n.path,parent:n});return yg(n,i)}"~validate"(t){var n,i;let r={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:vn(t)};if(!this["~standard"].async)try{let s=this._parseSync({data:t,path:[],parent:r});return Fo(s)?{value:s.value}:{issues:r.common.issues}}catch(s){(i=(n=s==null?void 0:s.message)==null?void 0:n.toLowerCase())!=null&&i.includes("encountered")&&(this["~standard"].async=!0),r.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:r}).then(s=>Fo(s)?{value:s.value}:{issues:r.common.issues})}async parseAsync(t,r){let n=await this.safeParseAsync(t,r);if(n.success)return n.data;throw n.error}async safeParseAsync(t,r){let n={common:{issues:[],contextualErrorMap:r==null?void 0:r.errorMap,async:!0},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:vn(t)},i=this._parse({data:t,path:n.path,parent:n}),s=await(es(i)?i:Promise.resolve(i));return yg(n,s)}refine(t,r){let n=o(i=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(i):r,"getIssueProperties");return this._refinement((i,s)=>{let a=t(i),u=o(()=>s.addIssue(g({code:j.custom},n(i))),"setError");return typeof Promise<"u"&&a instanceof Promise?a.then(l=>l?!0:(u(),!1)):a?!0:(u(),!1)})}refinement(t,r){return this._refinement((n,i)=>t(n)?!0:(i.addIssue(typeof r=="function"?r(n,i):r),!1))}_refinement(t){return new Mr({schema:this,typeName:oe.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:o(r=>this["~validate"](r),"validate")}}optional(){return Rr.create(this,this._def)}nullable(){return _n.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return eo.create(this)}promise(){return No.create(this,this._def)}or(t){return ui.create([this,t],this._def)}and(t){return fi.create(this,t,this._def)}transform(t){return new Mr(F(g({},ce(this._def)),{schema:this,typeName:oe.ZodEffects,effect:{type:"transform",transform:t}}))}default(t){let r=typeof t=="function"?t:()=>t;return new yi(F(g({},ce(this._def)),{innerType:this,defaultValue:r,typeName:oe.ZodDefault}))}brand(){return new va(g({typeName:oe.ZodBranded,type:this},ce(this._def)))}catch(t){let r=typeof t=="function"?t:()=>t;return new hi(F(g({},ce(this._def)),{innerType:this,catchValue:r,typeName:oe.ZodCatch}))}describe(t){let r=this.constructor;return new r(F(g({},this._def),{description:t}))}pipe(t){return Oa.create(this,t)}readonly(){return gi.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}};o(xl,"ZodType");var pe=xl,Tk=/^c[^\s-]{8,}$/i,kk=/^[0-9a-z]+$/,Fk=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Ak=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,jk=/^[a-z0-9_-]{21}$/i,Nk=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,Rk=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,Ck=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Mk="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",yl,Lk=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Uk=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,Dk=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,qk=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,zk=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Vk=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,gg="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",Bk=new RegExp("^".concat(gg,"$"));function xg(e){let t="[0-5]\\d";e.precision?t="".concat(t,"\\.\\d{").concat(e.precision,"}"):e.precision==null&&(t="".concat(t,"(\\.\\d+)?"));let r=e.precision?"+":"?";return"([01]\\d|2[0-3]):[0-5]\\d(:".concat(t,")").concat(r)}o(xg,"timeRegexSource");function Gk(e){return new RegExp("^".concat(xg(e),"$"))}o(Gk,"timeRegex");function Ig(e){let t="".concat(gg,"T").concat(xg(e)),r=[];return r.push(e.local?"Z?":"Z"),e.offset&&r.push("([+-]\\d{2}:?\\d{2})"),t="".concat(t,"(").concat(r.join("|"),")"),new RegExp("^".concat(t,"$"))}o(Ig,"datetimeRegex");function Kk(e,t){return!!((t==="v4"||!t)&&Lk.test(e)||(t==="v6"||!t)&&Dk.test(e))}o(Kk,"isValidIP");function Wk(e,t){if(!Nk.test(e))return!1;try{let[r]=e.split("."),n=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),i=JSON.parse(atob(n));return!(typeof i!="object"||i===null||"typ"in i&&(i==null?void 0:i.typ)!=="JWT"||!i.alg||t&&i.alg!==t)}catch(r){return!1}}o(Wk,"isValidJWT");function Hk(e,t){return!!((t==="v4"||!t)&&Uk.test(e)||(t==="v6"||!t)&&qk.test(e))}o(Hk,"isValidCidr");var ri=class ri extends pe{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==z.string){let s=this._getOrReturnCtx(t);return M(s,{code:j.invalid_type,expected:z.string,received:s.parsedType}),te}let n=new Mt,i;for(let s of this._def.checks)if(s.kind==="min")t.data.length<s.value&&(i=this._getOrReturnCtx(t,i),M(i,{code:j.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),n.dirty());else if(s.kind==="max")t.data.length>s.value&&(i=this._getOrReturnCtx(t,i),M(i,{code:j.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),n.dirty());else if(s.kind==="length"){let a=t.data.length>s.value,u=t.data.length<s.value;(a||u)&&(i=this._getOrReturnCtx(t,i),a?M(i,{code:j.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}):u&&M(i,{code:j.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}),n.dirty())}else if(s.kind==="email")Ck.test(t.data)||(i=this._getOrReturnCtx(t,i),M(i,{validation:"email",code:j.invalid_string,message:s.message}),n.dirty());else if(s.kind==="emoji")yl||(yl=new RegExp(Mk,"u")),yl.test(t.data)||(i=this._getOrReturnCtx(t,i),M(i,{validation:"emoji",code:j.invalid_string,message:s.message}),n.dirty());else if(s.kind==="uuid")Ak.test(t.data)||(i=this._getOrReturnCtx(t,i),M(i,{validation:"uuid",code:j.invalid_string,message:s.message}),n.dirty());else if(s.kind==="nanoid")jk.test(t.data)||(i=this._getOrReturnCtx(t,i),M(i,{validation:"nanoid",code:j.invalid_string,message:s.message}),n.dirty());else if(s.kind==="cuid")Tk.test(t.data)||(i=this._getOrReturnCtx(t,i),M(i,{validation:"cuid",code:j.invalid_string,message:s.message}),n.dirty());else if(s.kind==="cuid2")kk.test(t.data)||(i=this._getOrReturnCtx(t,i),M(i,{validation:"cuid2",code:j.invalid_string,message:s.message}),n.dirty());else if(s.kind==="ulid")Fk.test(t.data)||(i=this._getOrReturnCtx(t,i),M(i,{validation:"ulid",code:j.invalid_string,message:s.message}),n.dirty());else if(s.kind==="url")try{new URL(t.data)}catch(a){i=this._getOrReturnCtx(t,i),M(i,{validation:"url",code:j.invalid_string,message:s.message}),n.dirty()}else s.kind==="regex"?(s.regex.lastIndex=0,s.regex.test(t.data)||(i=this._getOrReturnCtx(t,i),M(i,{validation:"regex",code:j.invalid_string,message:s.message}),n.dirty())):s.kind==="trim"?t.data=t.data.trim():s.kind==="includes"?t.data.includes(s.value,s.position)||(i=this._getOrReturnCtx(t,i),M(i,{code:j.invalid_string,validation:{includes:s.value,position:s.position},message:s.message}),n.dirty()):s.kind==="toLowerCase"?t.data=t.data.toLowerCase():s.kind==="toUpperCase"?t.data=t.data.toUpperCase():s.kind==="startsWith"?t.data.startsWith(s.value)||(i=this._getOrReturnCtx(t,i),M(i,{code:j.invalid_string,validation:{startsWith:s.value},message:s.message}),n.dirty()):s.kind==="endsWith"?t.data.endsWith(s.value)||(i=this._getOrReturnCtx(t,i),M(i,{code:j.invalid_string,validation:{endsWith:s.value},message:s.message}),n.dirty()):s.kind==="datetime"?Ig(s).test(t.data)||(i=this._getOrReturnCtx(t,i),M(i,{code:j.invalid_string,validation:"datetime",message:s.message}),n.dirty()):s.kind==="date"?Bk.test(t.data)||(i=this._getOrReturnCtx(t,i),M(i,{code:j.invalid_string,validation:"date",message:s.message}),n.dirty()):s.kind==="time"?Gk(s).test(t.data)||(i=this._getOrReturnCtx(t,i),M(i,{code:j.invalid_string,validation:"time",message:s.message}),n.dirty()):s.kind==="duration"?Rk.test(t.data)||(i=this._getOrReturnCtx(t,i),M(i,{validation:"duration",code:j.invalid_string,message:s.message}),n.dirty()):s.kind==="ip"?Kk(t.data,s.version)||(i=this._getOrReturnCtx(t,i),M(i,{validation:"ip",code:j.invalid_string,message:s.message}),n.dirty()):s.kind==="jwt"?Wk(t.data,s.alg)||(i=this._getOrReturnCtx(t,i),M(i,{validation:"jwt",code:j.invalid_string,message:s.message}),n.dirty()):s.kind==="cidr"?Hk(t.data,s.version)||(i=this._getOrReturnCtx(t,i),M(i,{validation:"cidr",code:j.invalid_string,message:s.message}),n.dirty()):s.kind==="base64"?zk.test(t.data)||(i=this._getOrReturnCtx(t,i),M(i,{validation:"base64",code:j.invalid_string,message:s.message}),n.dirty()):s.kind==="base64url"?Vk.test(t.data)||(i=this._getOrReturnCtx(t,i),M(i,{validation:"base64url",code:j.invalid_string,message:s.message}),n.dirty()):xe.assertNever(s);return{status:n.value,value:t.data}}_regex(t,r,n){return this.refinement(i=>t.test(i),g({validation:r,code:j.invalid_string},J.errToObj(n)))}_addCheck(t){return new ri(F(g({},this._def),{checks:[...this._def.checks,t]}))}email(t){return this._addCheck(g({kind:"email"},J.errToObj(t)))}url(t){return this._addCheck(g({kind:"url"},J.errToObj(t)))}emoji(t){return this._addCheck(g({kind:"emoji"},J.errToObj(t)))}uuid(t){return this._addCheck(g({kind:"uuid"},J.errToObj(t)))}nanoid(t){return this._addCheck(g({kind:"nanoid"},J.errToObj(t)))}cuid(t){return this._addCheck(g({kind:"cuid"},J.errToObj(t)))}cuid2(t){return this._addCheck(g({kind:"cuid2"},J.errToObj(t)))}ulid(t){return this._addCheck(g({kind:"ulid"},J.errToObj(t)))}base64(t){return this._addCheck(g({kind:"base64"},J.errToObj(t)))}base64url(t){return this._addCheck(g({kind:"base64url"},J.errToObj(t)))}jwt(t){return this._addCheck(g({kind:"jwt"},J.errToObj(t)))}ip(t){return this._addCheck(g({kind:"ip"},J.errToObj(t)))}cidr(t){return this._addCheck(g({kind:"cidr"},J.errToObj(t)))}datetime(t){var r,n;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck(g({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(r=t==null?void 0:t.offset)!=null?r:!1,local:(n=t==null?void 0:t.local)!=null?n:!1},J.errToObj(t==null?void 0:t.message)))}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck(g({kind:"time",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision},J.errToObj(t==null?void 0:t.message)))}duration(t){return this._addCheck(g({kind:"duration"},J.errToObj(t)))}regex(t,r){return this._addCheck(g({kind:"regex",regex:t},J.errToObj(r)))}includes(t,r){return this._addCheck(g({kind:"includes",value:t,position:r==null?void 0:r.position},J.errToObj(r==null?void 0:r.message)))}startsWith(t,r){return this._addCheck(g({kind:"startsWith",value:t},J.errToObj(r)))}endsWith(t,r){return this._addCheck(g({kind:"endsWith",value:t},J.errToObj(r)))}min(t,r){return this._addCheck(g({kind:"min",value:t},J.errToObj(r)))}max(t,r){return this._addCheck(g({kind:"max",value:t},J.errToObj(r)))}length(t,r){return this._addCheck(g({kind:"length",value:t},J.errToObj(r)))}nonempty(t){return this.min(1,J.errToObj(t))}trim(){return new ri(F(g({},this._def),{checks:[...this._def.checks,{kind:"trim"}]}))}toLowerCase(){return new ri(F(g({},this._def),{checks:[...this._def.checks,{kind:"toLowerCase"}]}))}toUpperCase(){return new ri(F(g({},this._def),{checks:[...this._def.checks,{kind:"toUpperCase"}]}))}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxLength(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}};o(ri,"ZodString");var Ao=ri;Ao.create=e=>{var t;return new Ao(g({checks:[],typeName:oe.ZodString,coerce:(t=e==null?void 0:e.coerce)!=null?t:!1},ce(e)))};function Jk(e,t){let r=(e.toString().split(".")[1]||"").length,n=(t.toString().split(".")[1]||"").length,i=r>n?r:n,s=Number.parseInt(e.toFixed(i).replace(".","")),a=Number.parseInt(t.toFixed(i).replace(".",""));return s%a/10**i}o(Jk,"floatSafeRemainder");var xa=class xa extends pe{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==z.number){let s=this._getOrReturnCtx(t);return M(s,{code:j.invalid_type,expected:z.number,received:s.parsedType}),te}let n,i=new Mt;for(let s of this._def.checks)s.kind==="int"?xe.isInteger(t.data)||(n=this._getOrReturnCtx(t,n),M(n,{code:j.invalid_type,expected:"integer",received:"float",message:s.message}),i.dirty()):s.kind==="min"?(s.inclusive?t.data<s.value:t.data<=s.value)&&(n=this._getOrReturnCtx(t,n),M(n,{code:j.too_small,minimum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),i.dirty()):s.kind==="max"?(s.inclusive?t.data>s.value:t.data>=s.value)&&(n=this._getOrReturnCtx(t,n),M(n,{code:j.too_big,maximum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),i.dirty()):s.kind==="multipleOf"?Jk(t.data,s.value)!==0&&(n=this._getOrReturnCtx(t,n),M(n,{code:j.not_multiple_of,multipleOf:s.value,message:s.message}),i.dirty()):s.kind==="finite"?Number.isFinite(t.data)||(n=this._getOrReturnCtx(t,n),M(n,{code:j.not_finite,message:s.message}),i.dirty()):xe.assertNever(s);return{status:i.value,value:t.data}}gte(t,r){return this.setLimit("min",t,!0,J.toString(r))}gt(t,r){return this.setLimit("min",t,!1,J.toString(r))}lte(t,r){return this.setLimit("max",t,!0,J.toString(r))}lt(t,r){return this.setLimit("max",t,!1,J.toString(r))}setLimit(t,r,n,i){return new xa(F(g({},this._def),{checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:J.toString(i)}]}))}_addCheck(t){return new xa(F(g({},this._def),{checks:[...this._def.checks,t]}))}int(t){return this._addCheck({kind:"int",message:J.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:J.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:J.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:J.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:J.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:J.toString(r)})}finite(t){return this._addCheck({kind:"finite",message:J.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:J.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:J.toString(t)})}get minValue(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&xe.isInteger(t.value))}get isFinite(){let t=null,r=null;for(let n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(r===null||n.value>r)&&(r=n.value):n.kind==="max"&&(t===null||n.value<t)&&(t=n.value)}return Number.isFinite(r)&&Number.isFinite(t)}};o(xa,"ZodNumber");var ni=xa;ni.create=e=>new ni(g({checks:[],typeName:oe.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1},ce(e)));var Ia=class Ia extends pe{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch(s){return this._getInvalidInput(t)}if(this._getType(t)!==z.bigint)return this._getInvalidInput(t);let n,i=new Mt;for(let s of this._def.checks)s.kind==="min"?(s.inclusive?t.data<s.value:t.data<=s.value)&&(n=this._getOrReturnCtx(t,n),M(n,{code:j.too_small,type:"bigint",minimum:s.value,inclusive:s.inclusive,message:s.message}),i.dirty()):s.kind==="max"?(s.inclusive?t.data>s.value:t.data>=s.value)&&(n=this._getOrReturnCtx(t,n),M(n,{code:j.too_big,type:"bigint",maximum:s.value,inclusive:s.inclusive,message:s.message}),i.dirty()):s.kind==="multipleOf"?t.data%s.value!==BigInt(0)&&(n=this._getOrReturnCtx(t,n),M(n,{code:j.not_multiple_of,multipleOf:s.value,message:s.message}),i.dirty()):xe.assertNever(s);return{status:i.value,value:t.data}}_getInvalidInput(t){let r=this._getOrReturnCtx(t);return M(r,{code:j.invalid_type,expected:z.bigint,received:r.parsedType}),te}gte(t,r){return this.setLimit("min",t,!0,J.toString(r))}gt(t,r){return this.setLimit("min",t,!1,J.toString(r))}lte(t,r){return this.setLimit("max",t,!0,J.toString(r))}lt(t,r){return this.setLimit("max",t,!1,J.toString(r))}setLimit(t,r,n,i){return new Ia(F(g({},this._def),{checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:J.toString(i)}]}))}_addCheck(t){return new Ia(F(g({},this._def),{checks:[...this._def.checks,t]}))}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:J.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:J.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:J.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:J.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:J.toString(r)})}get minValue(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}};o(Ia,"ZodBigInt");var oi=Ia;oi.create=e=>{var t;return new oi(g({checks:[],typeName:oe.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!=null?t:!1},ce(e)))};var Il=class Il extends pe{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==z.boolean){let n=this._getOrReturnCtx(t);return M(n,{code:j.invalid_type,expected:z.boolean,received:n.parsedType}),te}return Ht(t.data)}};o(Il,"ZodBoolean");var ii=Il;ii.create=e=>new ii(g({typeName:oe.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1},ce(e)));var qc=class qc extends pe{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==z.date){let s=this._getOrReturnCtx(t);return M(s,{code:j.invalid_type,expected:z.date,received:s.parsedType}),te}if(Number.isNaN(t.data.getTime())){let s=this._getOrReturnCtx(t);return M(s,{code:j.invalid_date}),te}let n=new Mt,i;for(let s of this._def.checks)s.kind==="min"?t.data.getTime()<s.value&&(i=this._getOrReturnCtx(t,i),M(i,{code:j.too_small,message:s.message,inclusive:!0,exact:!1,minimum:s.value,type:"date"}),n.dirty()):s.kind==="max"?t.data.getTime()>s.value&&(i=this._getOrReturnCtx(t,i),M(i,{code:j.too_big,message:s.message,inclusive:!0,exact:!1,maximum:s.value,type:"date"}),n.dirty()):xe.assertNever(s);return{status:n.value,value:new Date(t.data.getTime())}}_addCheck(t){return new qc(F(g({},this._def),{checks:[...this._def.checks,t]}))}min(t,r){return this._addCheck({kind:"min",value:t.getTime(),message:J.toString(r)})}max(t,r){return this._addCheck({kind:"max",value:t.getTime(),message:J.toString(r)})}get minDate(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t!=null?new Date(t):null}};o(qc,"ZodDate");var si=qc;si.create=e=>new si(g({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:oe.ZodDate},ce(e)));var bl=class bl extends pe{_parse(t){if(this._getType(t)!==z.symbol){let n=this._getOrReturnCtx(t);return M(n,{code:j.invalid_type,expected:z.symbol,received:n.parsedType}),te}return Ht(t.data)}};o(bl,"ZodSymbol");var os=bl;os.create=e=>new os(g({typeName:oe.ZodSymbol},ce(e)));var wl=class wl extends pe{_parse(t){if(this._getType(t)!==z.undefined){let n=this._getOrReturnCtx(t);return M(n,{code:j.invalid_type,expected:z.undefined,received:n.parsedType}),te}return Ht(t.data)}};o(wl,"ZodUndefined");var ai=wl;ai.create=e=>new ai(g({typeName:oe.ZodUndefined},ce(e)));var $l=class $l extends pe{_parse(t){if(this._getType(t)!==z.null){let n=this._getOrReturnCtx(t);return M(n,{code:j.invalid_type,expected:z.null,received:n.parsedType}),te}return Ht(t.data)}};o($l,"ZodNull");var ci=$l;ci.create=e=>new ci(g({typeName:oe.ZodNull},ce(e)));var vl=class vl extends pe{constructor(){super(...arguments),this._any=!0}_parse(t){return Ht(t.data)}};o(vl,"ZodAny");var jo=vl;jo.create=e=>new jo(g({typeName:oe.ZodAny},ce(e)));var Ol=class Ol extends pe{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Ht(t.data)}};o(Ol,"ZodUnknown");var Qn=Ol;Qn.create=e=>new Qn(g({typeName:oe.ZodUnknown},ce(e)));var _l=class _l extends pe{_parse(t){let r=this._getOrReturnCtx(t);return M(r,{code:j.invalid_type,expected:z.never,received:r.parsedType}),te}};o(_l,"ZodNever");var on=_l;on.create=e=>new on(g({typeName:oe.ZodNever},ce(e)));var Sl=class Sl extends pe{_parse(t){if(this._getType(t)!==z.undefined){let n=this._getOrReturnCtx(t);return M(n,{code:j.invalid_type,expected:z.void,received:n.parsedType}),te}return Ht(t.data)}};o(Sl,"ZodVoid");var is=Sl;is.create=e=>new is(g({typeName:oe.ZodVoid},ce(e)));var rs=class rs extends pe{_parse(t){let{ctx:r,status:n}=this._processInputParams(t),i=this._def;if(r.parsedType!==z.array)return M(r,{code:j.invalid_type,expected:z.array,received:r.parsedType}),te;if(i.exactLength!==null){let a=r.data.length>i.exactLength.value,u=r.data.length<i.exactLength.value;(a||u)&&(M(r,{code:a?j.too_big:j.too_small,minimum:u?i.exactLength.value:void 0,maximum:a?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),n.dirty())}if(i.minLength!==null&&r.data.length<i.minLength.value&&(M(r,{code:j.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),n.dirty()),i.maxLength!==null&&r.data.length>i.maxLength.value&&(M(r,{code:j.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),n.dirty()),r.common.async)return Promise.all([...r.data].map((a,u)=>i.type._parseAsync(new Cr(r,a,r.path,u)))).then(a=>Mt.mergeArray(n,a));let s=[...r.data].map((a,u)=>i.type._parseSync(new Cr(r,a,r.path,u)));return Mt.mergeArray(n,s)}get element(){return this._def.type}min(t,r){return new rs(F(g({},this._def),{minLength:{value:t,message:J.toString(r)}}))}max(t,r){return new rs(F(g({},this._def),{maxLength:{value:t,message:J.toString(r)}}))}length(t,r){return new rs(F(g({},this._def),{exactLength:{value:t,message:J.toString(r)}}))}nonempty(t){return this.min(1,t)}};o(rs,"ZodArray");var eo=rs;eo.create=(e,t)=>new eo(g({type:e,minLength:null,maxLength:null,exactLength:null,typeName:oe.ZodArray},ce(t)));function ts(e){if(e instanceof yr){let t={};for(let r in e.shape){let n=e.shape[r];t[r]=Rr.create(ts(n))}return new yr(F(g({},e._def),{shape:o(()=>t,"shape")}))}else return e instanceof eo?new eo(F(g({},e._def),{type:ts(e.element)})):e instanceof Rr?Rr.create(ts(e.unwrap())):e instanceof _n?_n.create(ts(e.unwrap())):e instanceof On?On.create(e.items.map(t=>ts(t))):e}o(ts,"deepPartialify");var _r=class _r extends pe{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let t=this._def.shape(),r=xe.objectKeys(t);return this._cached={shape:t,keys:r},this._cached}_parse(t){if(this._getType(t)!==z.object){let d=this._getOrReturnCtx(t);return M(d,{code:j.invalid_type,expected:z.object,received:d.parsedType}),te}let{status:n,ctx:i}=this._processInputParams(t),{shape:s,keys:a}=this._getCached(),u=[];if(!(this._def.catchall instanceof on&&this._def.unknownKeys==="strip"))for(let d in i.data)a.includes(d)||u.push(d);let l=[];for(let d of a){let m=s[d],h=i.data[d];l.push({key:{status:"valid",value:d},value:m._parse(new Cr(i,h,i.path,d)),alwaysSet:d in i.data})}if(this._def.catchall instanceof on){let d=this._def.unknownKeys;if(d==="passthrough")for(let m of u)l.push({key:{status:"valid",value:m},value:{status:"valid",value:i.data[m]}});else if(d==="strict")u.length>0&&(M(i,{code:j.unrecognized_keys,keys:u}),n.dirty());else if(d!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let d=this._def.catchall;for(let m of u){let h=i.data[m];l.push({key:{status:"valid",value:m},value:d._parse(new Cr(i,h,i.path,m)),alwaysSet:m in i.data})}}return i.common.async?Promise.resolve().then(async()=>{let d=[];for(let m of l){let h=await m.key,b=await m.value;d.push({key:h,value:b,alwaysSet:m.alwaysSet})}return d}).then(d=>Mt.mergeObjectSync(n,d)):Mt.mergeObjectSync(n,l)}get shape(){return this._def.shape()}strict(t){return J.errToObj,new _r(g(F(g({},this._def),{unknownKeys:"strict"}),t!==void 0?{errorMap:o((r,n)=>{var s,a,u,l;let i=(u=(a=(s=this._def).errorMap)==null?void 0:a.call(s,r,n).message)!=null?u:n.defaultError;return r.code==="unrecognized_keys"?{message:(l=J.errToObj(t).message)!=null?l:i}:{message:i}},"errorMap")}:{}))}strip(){return new _r(F(g({},this._def),{unknownKeys:"strip"}))}passthrough(){return new _r(F(g({},this._def),{unknownKeys:"passthrough"}))}extend(t){return new _r(F(g({},this._def),{shape:o(()=>g(g({},this._def.shape()),t),"shape")}))}merge(t){return new _r({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:o(()=>g(g({},this._def.shape()),t._def.shape()),"shape"),typeName:oe.ZodObject})}setKey(t,r){return this.augment({[t]:r})}catchall(t){return new _r(F(g({},this._def),{catchall:t}))}pick(t){let r={};for(let n of xe.objectKeys(t))t[n]&&this.shape[n]&&(r[n]=this.shape[n]);return new _r(F(g({},this._def),{shape:o(()=>r,"shape")}))}omit(t){let r={};for(let n of xe.objectKeys(this.shape))t[n]||(r[n]=this.shape[n]);return new _r(F(g({},this._def),{shape:o(()=>r,"shape")}))}deepPartial(){return ts(this)}partial(t){let r={};for(let n of xe.objectKeys(this.shape)){let i=this.shape[n];t&&!t[n]?r[n]=i:r[n]=i.optional()}return new _r(F(g({},this._def),{shape:o(()=>r,"shape")}))}required(t){let r={};for(let n of xe.objectKeys(this.shape))if(t&&!t[n])r[n]=this.shape[n];else{let s=this.shape[n];for(;s instanceof Rr;)s=s._def.innerType;r[n]=s}return new _r(F(g({},this._def),{shape:o(()=>r,"shape")}))}keyof(){return bg(xe.objectKeys(this.shape))}};o(_r,"ZodObject");var yr=_r;yr.create=(e,t)=>new yr(g({shape:o(()=>e,"shape"),unknownKeys:"strip",catchall:on.create(),typeName:oe.ZodObject},ce(t)));yr.strictCreate=(e,t)=>new yr(g({shape:o(()=>e,"shape"),unknownKeys:"strict",catchall:on.create(),typeName:oe.ZodObject},ce(t)));yr.lazycreate=(e,t)=>new yr(g({shape:e,unknownKeys:"strip",catchall:on.create(),typeName:oe.ZodObject},ce(t)));var Pl=class Pl extends pe{_parse(t){let{ctx:r}=this._processInputParams(t),n=this._def.options;function i(s){for(let u of s)if(u.result.status==="valid")return u.result;for(let u of s)if(u.result.status==="dirty")return r.common.issues.push(...u.ctx.common.issues),u.result;let a=s.map(u=>new mr(u.ctx.common.issues));return M(r,{code:j.invalid_union,unionErrors:a}),te}if(o(i,"handleResults"),r.common.async)return Promise.all(n.map(async s=>{let a=F(g({},r),{common:F(g({},r.common),{issues:[]}),parent:null});return{result:await s._parseAsync({data:r.data,path:r.path,parent:a}),ctx:a}})).then(i);{let s,a=[];for(let l of n){let d=F(g({},r),{common:F(g({},r.common),{issues:[]}),parent:null}),m=l._parseSync({data:r.data,path:r.path,parent:d});if(m.status==="valid")return m;m.status==="dirty"&&!s&&(s={result:m,ctx:d}),d.common.issues.length&&a.push(d.common.issues)}if(s)return r.common.issues.push(...s.ctx.common.issues),s.result;let u=a.map(l=>new mr(l));return M(r,{code:j.invalid_union,unionErrors:u}),te}}get options(){return this._def.options}};o(Pl,"ZodUnion");var ui=Pl;ui.create=(e,t)=>new ui(g({options:e,typeName:oe.ZodUnion},ce(t)));var Xn=o(e=>e instanceof li?Xn(e.schema):e instanceof Mr?Xn(e.innerType()):e instanceof pi?[e.value]:e instanceof di?e.options:e instanceof mi?xe.objectValues(e.enum):e instanceof yi?Xn(e._def.innerType):e instanceof ai?[void 0]:e instanceof ci?[null]:e instanceof Rr?[void 0,...Xn(e.unwrap())]:e instanceof _n?[null,...Xn(e.unwrap())]:e instanceof va||e instanceof gi?Xn(e.unwrap()):e instanceof hi?Xn(e._def.innerType):[],"getDiscriminator"),zc=class zc extends pe{_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==z.object)return M(r,{code:j.invalid_type,expected:z.object,received:r.parsedType}),te;let n=this.discriminator,i=r.data[n],s=this.optionsMap.get(i);return s?r.common.async?s._parseAsync({data:r.data,path:r.path,parent:r}):s._parseSync({data:r.data,path:r.path,parent:r}):(M(r,{code:j.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),te)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,r,n){let i=new Map;for(let s of r){let a=Xn(s.shape[t]);if(!a.length)throw new Error("A discriminator value for key `".concat(t,"` could not be extracted from all schema options"));for(let u of a){if(i.has(u))throw new Error("Discriminator property ".concat(String(t)," has duplicate value ").concat(String(u)));i.set(u,s)}}return new zc(g({typeName:oe.ZodDiscriminatedUnion,discriminator:t,options:r,optionsMap:i},ce(n)))}};o(zc,"ZodDiscriminatedUnion");var Lc=zc;function hl(e,t){let r=vn(e),n=vn(t);if(e===t)return{valid:!0,data:e};if(r===z.object&&n===z.object){let i=xe.objectKeys(t),s=xe.objectKeys(e).filter(u=>i.indexOf(u)!==-1),a=g(g({},e),t);for(let u of s){let l=hl(e[u],t[u]);if(!l.valid)return{valid:!1};a[u]=l.data}return{valid:!0,data:a}}else if(r===z.array&&n===z.array){if(e.length!==t.length)return{valid:!1};let i=[];for(let s=0;s<e.length;s++){let a=e[s],u=t[s],l=hl(a,u);if(!l.valid)return{valid:!1};i.push(l.data)}return{valid:!0,data:i}}else return r===z.date&&n===z.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}o(hl,"mergeValues");var El=class El extends pe{_parse(t){let{status:r,ctx:n}=this._processInputParams(t),i=o((s,a)=>{if(Cc(s)||Cc(a))return te;let u=hl(s.value,a.value);return u.valid?((Mc(s)||Mc(a))&&r.dirty(),{status:r.value,value:u.data}):(M(n,{code:j.invalid_intersection_types}),te)},"handleParsed");return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([s,a])=>i(s,a)):i(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}};o(El,"ZodIntersection");var fi=El;fi.create=(e,t,r)=>new fi(g({left:e,right:t,typeName:oe.ZodIntersection},ce(r)));var Vc=class Vc extends pe{_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==z.array)return M(n,{code:j.invalid_type,expected:z.array,received:n.parsedType}),te;if(n.data.length<this._def.items.length)return M(n,{code:j.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),te;!this._def.rest&&n.data.length>this._def.items.length&&(M(n,{code:j.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());let s=[...n.data].map((a,u)=>{let l=this._def.items[u]||this._def.rest;return l?l._parse(new Cr(n,a,n.path,u)):null}).filter(a=>!!a);return n.common.async?Promise.all(s).then(a=>Mt.mergeArray(r,a)):Mt.mergeArray(r,s)}get items(){return this._def.items}rest(t){return new Vc(F(g({},this._def),{rest:t}))}};o(Vc,"ZodTuple");var On=Vc;On.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new On(g({items:e,typeName:oe.ZodTuple,rest:null},ce(t)))};var ba=class ba extends pe{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==z.object)return M(n,{code:j.invalid_type,expected:z.object,received:n.parsedType}),te;let i=[],s=this._def.keyType,a=this._def.valueType;for(let u in n.data)i.push({key:s._parse(new Cr(n,u,n.path,u)),value:a._parse(new Cr(n,n.data[u],n.path,u)),alwaysSet:u in n.data});return n.common.async?Mt.mergeObjectAsync(r,i):Mt.mergeObjectSync(r,i)}get element(){return this._def.valueType}static create(t,r,n){return r instanceof pe?new ba(g({keyType:t,valueType:r,typeName:oe.ZodRecord},ce(n))):new ba(g({keyType:Ao.create(),valueType:t,typeName:oe.ZodRecord},ce(r)))}};o(ba,"ZodRecord");var Uc=ba,Tl=class Tl extends pe{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==z.map)return M(n,{code:j.invalid_type,expected:z.map,received:n.parsedType}),te;let i=this._def.keyType,s=this._def.valueType,a=[...n.data.entries()].map(([u,l],d)=>({key:i._parse(new Cr(n,u,n.path,[d,"key"])),value:s._parse(new Cr(n,l,n.path,[d,"value"]))}));if(n.common.async){let u=new Map;return Promise.resolve().then(async()=>{for(let l of a){let d=await l.key,m=await l.value;if(d.status==="aborted"||m.status==="aborted")return te;(d.status==="dirty"||m.status==="dirty")&&r.dirty(),u.set(d.value,m.value)}return{status:r.value,value:u}})}else{let u=new Map;for(let l of a){let d=l.key,m=l.value;if(d.status==="aborted"||m.status==="aborted")return te;(d.status==="dirty"||m.status==="dirty")&&r.dirty(),u.set(d.value,m.value)}return{status:r.value,value:u}}}};o(Tl,"ZodMap");var ss=Tl;ss.create=(e,t,r)=>new ss(g({valueType:t,keyType:e,typeName:oe.ZodMap},ce(r)));var wa=class wa extends pe{_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==z.set)return M(n,{code:j.invalid_type,expected:z.set,received:n.parsedType}),te;let i=this._def;i.minSize!==null&&n.data.size<i.minSize.value&&(M(n,{code:j.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),r.dirty()),i.maxSize!==null&&n.data.size>i.maxSize.value&&(M(n,{code:j.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),r.dirty());let s=this._def.valueType;function a(l){let d=new Set;for(let m of l){if(m.status==="aborted")return te;m.status==="dirty"&&r.dirty(),d.add(m.value)}return{status:r.value,value:d}}o(a,"finalizeSet");let u=[...n.data.values()].map((l,d)=>s._parse(new Cr(n,l,n.path,d)));return n.common.async?Promise.all(u).then(l=>a(l)):a(u)}min(t,r){return new wa(F(g({},this._def),{minSize:{value:t,message:J.toString(r)}}))}max(t,r){return new wa(F(g({},this._def),{maxSize:{value:t,message:J.toString(r)}}))}size(t,r){return this.min(t,r).max(t,r)}nonempty(t){return this.min(1,t)}};o(wa,"ZodSet");var as=wa;as.create=(e,t)=>new as(g({valueType:e,minSize:null,maxSize:null,typeName:oe.ZodSet},ce(t)));var ns=class ns extends pe{constructor(){super(...arguments),this.validate=this.implement}_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==z.function)return M(r,{code:j.invalid_type,expected:z.function,received:r.parsedType}),te;function n(u,l){return ga({data:u,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Qi(),Yn].filter(d=>!!d),issueData:{code:j.invalid_arguments,argumentsError:l}})}o(n,"makeArgsIssue");function i(u,l){return ga({data:u,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Qi(),Yn].filter(d=>!!d),issueData:{code:j.invalid_return_type,returnTypeError:l}})}o(i,"makeReturnsIssue");let s={errorMap:r.common.contextualErrorMap},a=r.data;if(this._def.returns instanceof No){let u=this;return Ht(async function(...l){let d=new mr([]),m=await u._def.args.parseAsync(l,s).catch($=>{throw d.addIssue(n(l,$)),d}),h=await Reflect.apply(a,this,m);return await u._def.returns._def.type.parseAsync(h,s).catch($=>{throw d.addIssue(i(h,$)),d})})}else{let u=this;return Ht(function(...l){let d=u._def.args.safeParse(l,s);if(!d.success)throw new mr([n(l,d.error)]);let m=Reflect.apply(a,this,d.data),h=u._def.returns.safeParse(m,s);if(!h.success)throw new mr([i(m,h.error)]);return h.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new ns(F(g({},this._def),{args:On.create(t).rest(Qn.create())}))}returns(t){return new ns(F(g({},this._def),{returns:t}))}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,r,n){return new ns(g({args:t||On.create([]).rest(Qn.create()),returns:r||Qn.create(),typeName:oe.ZodFunction},ce(n)))}};o(ns,"ZodFunction");var Dc=ns,kl=class kl extends pe{get schema(){return this._def.getter()}_parse(t){let{ctx:r}=this._processInputParams(t);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}};o(kl,"ZodLazy");var li=kl;li.create=(e,t)=>new li(g({getter:e,typeName:oe.ZodLazy},ce(t)));var Fl=class Fl extends pe{_parse(t){if(t.data!==this._def.value){let r=this._getOrReturnCtx(t);return M(r,{received:r.data,code:j.invalid_literal,expected:this._def.value}),te}return{status:"valid",value:t.data}}get value(){return this._def.value}};o(Fl,"ZodLiteral");var pi=Fl;pi.create=(e,t)=>new pi(g({value:e,typeName:oe.ZodLiteral},ce(t)));function bg(e,t){return new di(g({values:e,typeName:oe.ZodEnum},ce(t)))}o(bg,"createZodEnum");var $a=class $a extends pe{_parse(t){if(typeof t.data!="string"){let r=this._getOrReturnCtx(t),n=this._def.values;return M(r,{expected:xe.joinValues(n),received:r.parsedType,code:j.invalid_type}),te}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(t.data)){let r=this._getOrReturnCtx(t),n=this._def.values;return M(r,{received:r.data,code:j.invalid_enum_value,options:n}),te}return Ht(t.data)}get options(){return this._def.values}get enum(){let t={};for(let r of this._def.values)t[r]=r;return t}get Values(){let t={};for(let r of this._def.values)t[r]=r;return t}get Enum(){let t={};for(let r of this._def.values)t[r]=r;return t}extract(t,r=this._def){return $a.create(t,g(g({},this._def),r))}exclude(t,r=this._def){return $a.create(this.options.filter(n=>!t.includes(n)),g(g({},this._def),r))}};o($a,"ZodEnum");var di=$a;di.create=bg;var Al=class Al extends pe{_parse(t){let r=xe.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(t);if(n.parsedType!==z.string&&n.parsedType!==z.number){let i=xe.objectValues(r);return M(n,{expected:xe.joinValues(i),received:n.parsedType,code:j.invalid_type}),te}if(this._cache||(this._cache=new Set(xe.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){let i=xe.objectValues(r);return M(n,{received:n.data,code:j.invalid_enum_value,options:i}),te}return Ht(t.data)}get enum(){return this._def.values}};o(Al,"ZodNativeEnum");var mi=Al;mi.create=(e,t)=>new mi(g({values:e,typeName:oe.ZodNativeEnum},ce(t)));var jl=class jl extends pe{unwrap(){return this._def.type}_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==z.promise&&r.common.async===!1)return M(r,{code:j.invalid_type,expected:z.promise,received:r.parsedType}),te;let n=r.parsedType===z.promise?r.data:Promise.resolve(r.data);return Ht(n.then(i=>this._def.type.parseAsync(i,{path:r.path,errorMap:r.common.contextualErrorMap})))}};o(jl,"ZodPromise");var No=jl;No.create=(e,t)=>new No(g({type:e,typeName:oe.ZodPromise},ce(t)));var Nl=class Nl extends pe{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===oe.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){let{status:r,ctx:n}=this._processInputParams(t),i=this._def.effect||null,s={addIssue:o(a=>{M(n,a),a.fatal?r.abort():r.dirty()},"addIssue"),get path(){return n.path}};if(s.addIssue=s.addIssue.bind(s),i.type==="preprocess"){let a=i.transform(n.data,s);if(n.common.async)return Promise.resolve(a).then(async u=>{if(r.value==="aborted")return te;let l=await this._def.schema._parseAsync({data:u,path:n.path,parent:n});return l.status==="aborted"?te:l.status==="dirty"?ti(l.value):r.value==="dirty"?ti(l.value):l});{if(r.value==="aborted")return te;let u=this._def.schema._parseSync({data:a,path:n.path,parent:n});return u.status==="aborted"?te:u.status==="dirty"?ti(u.value):r.value==="dirty"?ti(u.value):u}}if(i.type==="refinement"){let a=o(u=>{let l=i.refinement(u,s);if(n.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return u},"executeRefinement");if(n.common.async===!1){let u=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return u.status==="aborted"?te:(u.status==="dirty"&&r.dirty(),a(u.value),{status:r.value,value:u.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(u=>u.status==="aborted"?te:(u.status==="dirty"&&r.dirty(),a(u.value).then(()=>({status:r.value,value:u.value}))))}if(i.type==="transform")if(n.common.async===!1){let a=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!Fo(a))return te;let u=i.transform(a.value,s);if(u instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:u}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(a=>Fo(a)?Promise.resolve(i.transform(a.value,s)).then(u=>({status:r.value,value:u})):te);xe.assertNever(i)}};o(Nl,"ZodEffects");var Mr=Nl;Mr.create=(e,t,r)=>new Mr(g({schema:e,typeName:oe.ZodEffects,effect:t},ce(r)));Mr.createWithPreprocess=(e,t,r)=>new Mr(g({schema:t,effect:{type:"preprocess",transform:e},typeName:oe.ZodEffects},ce(r)));var Rl=class Rl extends pe{_parse(t){return this._getType(t)===z.undefined?Ht(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};o(Rl,"ZodOptional");var Rr=Rl;Rr.create=(e,t)=>new Rr(g({innerType:e,typeName:oe.ZodOptional},ce(t)));var Cl=class Cl extends pe{_parse(t){return this._getType(t)===z.null?Ht(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};o(Cl,"ZodNullable");var _n=Cl;_n.create=(e,t)=>new _n(g({innerType:e,typeName:oe.ZodNullable},ce(t)));var Ml=class Ml extends pe{_parse(t){let{ctx:r}=this._processInputParams(t),n=r.data;return r.parsedType===z.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}};o(Ml,"ZodDefault");var yi=Ml;yi.create=(e,t)=>new yi(g({innerType:e,typeName:oe.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default},ce(t)));var Ll=class Ll extends pe{_parse(t){let{ctx:r}=this._processInputParams(t),n=F(g({},r),{common:F(g({},r.common),{issues:[]})}),i=this._def.innerType._parse({data:n.data,path:n.path,parent:g({},n)});return es(i)?i.then(s=>({status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new mr(n.common.issues)},input:n.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new mr(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}};o(Ll,"ZodCatch");var hi=Ll;hi.create=(e,t)=>new hi(g({innerType:e,typeName:oe.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch},ce(t)));var Ul=class Ul extends pe{_parse(t){if(this._getType(t)!==z.nan){let n=this._getOrReturnCtx(t);return M(n,{code:j.invalid_type,expected:z.nan,received:n.parsedType}),te}return{status:"valid",value:t.data}}};o(Ul,"ZodNaN");var cs=Ul;cs.create=e=>new cs(g({typeName:oe.ZodNaN},ce(e)));var Zk=Symbol("zod_brand"),Dl=class Dl extends pe{_parse(t){let{ctx:r}=this._processInputParams(t),n=r.data;return this._def.type._parse({data:n,path:r.path,parent:r})}unwrap(){return this._def.type}};o(Dl,"ZodBranded");var va=Dl,Bc=class Bc extends pe{_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.common.async)return o(async()=>{let s=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return s.status==="aborted"?te:s.status==="dirty"?(r.dirty(),ti(s.value)):this._def.out._parseAsync({data:s.value,path:n.path,parent:n})},"handleAsync")();{let i=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return i.status==="aborted"?te:i.status==="dirty"?(r.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:n.path,parent:n})}}static create(t,r){return new Bc({in:t,out:r,typeName:oe.ZodPipeline})}};o(Bc,"ZodPipeline");var Oa=Bc,ql=class ql extends pe{_parse(t){let r=this._def.innerType._parse(t),n=o(i=>(Fo(i)&&(i.value=Object.freeze(i.value)),i),"freeze");return es(r)?r.then(i=>n(i)):n(r)}unwrap(){return this._def.innerType}};o(ql,"ZodReadonly");var gi=ql;gi.create=(e,t)=>new gi(g({innerType:e,typeName:oe.ZodReadonly},ce(t)));function hg(e,t){let r=typeof e=="function"?e(t):typeof e=="string"?{message:e}:e;return typeof r=="string"?{message:r}:r}o(hg,"cleanParams");function wg(e,t={},r){return e?jo.create().superRefine((n,i)=>{var a,u;let s=e(n);if(s instanceof Promise)return s.then(l=>{var d,m;if(!l){let h=hg(t,n),b=(m=(d=h.fatal)!=null?d:r)!=null?m:!0;i.addIssue(F(g({code:"custom"},h),{fatal:b}))}});if(!s){let l=hg(t,n),d=(u=(a=l.fatal)!=null?a:r)!=null?u:!0;i.addIssue(F(g({code:"custom"},l),{fatal:d}))}}):jo.create()}o(wg,"custom");var Yk={object:yr.lazycreate},oe;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(oe||(oe={}));var Xk=o((e,t={message:"Input not instance of ".concat(e.name)})=>wg(r=>r instanceof e,t),"instanceOfType"),$g=Ao.create,vg=ni.create,Qk=cs.create,eF=oi.create,Og=ii.create,tF=si.create,rF=os.create,nF=ai.create,oF=ci.create,iF=jo.create,sF=Qn.create,aF=on.create,cF=is.create,uF=eo.create,fF=yr.create,lF=yr.strictCreate,pF=ui.create,dF=Lc.create,mF=fi.create,yF=On.create,hF=Uc.create,gF=ss.create,xF=as.create,IF=Dc.create,bF=li.create,wF=pi.create,$F=di.create,vF=mi.create,OF=No.create,_F=Mr.create,SF=Rr.create,PF=_n.create,EF=Mr.createWithPreprocess,TF=Oa.create,kF=o(()=>$g().optional(),"ostring"),FF=o(()=>vg().optional(),"onumber"),AF=o(()=>Og().optional(),"oboolean"),jF={string:o(e=>Ao.create(F(g({},e),{coerce:!0})),"string"),number:o(e=>ni.create(F(g({},e),{coerce:!0})),"number"),boolean:o(e=>ii.create(F(g({},e),{coerce:!0})),"boolean"),bigint:o(e=>oi.create(F(g({},e),{coerce:!0})),"bigint"),date:o(e=>si.create(F(g({},e),{coerce:!0})),"date")};var NF=te;c();c();c();c();c();c();var CO=ll(sm(),1),MO=ll(NO(),1);c();var OC=o(e=>{var r;let t=e;return((r=t==null?void 0:t.allOf)==null?void 0:r.length)===2},"isPotentiallyBadSchema");function Su(e){if(typeof e!="object"||e===null)return e;if(Array.isArray(e))return e.map(Su);let t=g({},e);for(let[r,n]of Object.entries(t))if(typeof n=="object"&&n!==null){let i=Su(n);if(OC(i)){let s=i.allOf.findIndex(u=>u.type==="array"),a=i.allOf.findIndex(u=>u.type==="object");if(s!==-1&&a!==-1){t[r]=F(g({},i),{allOf:[i.allOf[s]]});continue}}t[r]=i}return t}o(Su,"cleanupInvalidArrayAllOf");var RO={$ref:"#/definitions/ParsedMVF",$schema:"http://json-schema.org/draft-07/schema#",definitions:{AnchoredFloorTextProperties:{additionalProperties:!1,properties:{align:{default:"center",description:"Horizontal alignment of multi-line text.",enum:["left","center","right"],type:"string"},color:{default:"black",description:"The color of the text in CSS format (e.g. `#000000`, `rgb(0, 0, 0)`, `black`).",type:"string"},fontFamily:{default:"Droid Sans",description:"The font family of the text.",type:"string"},fontSize:{default:12,description:"The em-height (multiplier of the font's height) at which to render the font, in meters. The font height is the distance between the ascender (highest point, height of an A) and descender (lowest point, bottom of a g) of the font. For example, if the font-size is 12, the space for a single character will be 12 meters high.",type:"number"},geometryId:{anyOf:[{$ref:"#/definitions/SpaceId"},{$ref:"#/definitions/ObstructionId"}],description:"The geometry to which this text belongs. It will be displayed on top of it."},rotation:{description:"Rotation in degrees, about the center of the text. North is 0, east is 90.",maximum:360,minimum:0,type:"number"},text:{description:"The text to display. Newline characters are supported.",type:"string"},visible:{default:!0,description:"Whether the text is visible.",type:"boolean"}},required:["align","color","fontFamily","fontSize","geometryId","rotation","text","visible"],type:"object"},AnchoredImageProperties:{additionalProperties:!1,properties:{anchorId:{anyOf:[{$ref:"#/definitions/SpaceId"},{$ref:"#/definitions/ObstructionId"}],description:"The geometry to which this image belongs. It will be displayed on top of it."},height:{description:"The height of the image when represented on the map, in meters.",minimum:0,type:"number"},path:{description:"The path to the image. This will be a remote URL.",type:"string"},rotation:{description:"Rotation in degrees, about the center of the image. North is 0, east is 90.",maximum:360,minimum:0,type:"number"},width:{description:"The width of the image when represented on the map, in meters.",minimum:0,type:"number"}},required:["anchorId","height","path","rotation","width"],type:"object"},AnchoredTextAreaProperties:{additionalProperties:!1,properties:{align:{$ref:"#/definitions/TextAreaAlignment",description:"The alignment of the text within the label. 'Near' means the text will be aligned up against the position. Typically in the SDK the text will be rotated to always be upright, so either the start or end of the text will be up against the position. 'Center' means it will be centered in the middle of the area."},anchorId:{anyOf:[{$ref:"#/definitions/SpaceId"},{$ref:"#/definitions/ObstructionId"}],description:"The geometry to which this text area belongs. It will be displayed on top of it."},maxHeight:{description:"The maximum height of the label, in meters. Half the height will be above the feature's position, half below.",exclusiveMinimum:0,type:"number"},maxWidth:{description:"The maximum width of the label, in meters. The left edge will start at the feature's position and extend in the rotation direction.",exclusiveMinimum:0,type:"number"},rotation:{description:"Rotation in degrees relative to north, about the position of the label. North is 0, east is 90.",maximum:360,minimum:0,type:"number"}},required:["align","anchorId","maxHeight","maxWidth","rotation"],type:"object"},AnnotationCollection:{additionalProperties:!1,properties:{features:{items:{additionalProperties:!1,properties:{geometry:{$ref:"#/definitions/Point"},properties:{$ref:"#/definitions/AnnotationProperties"},type:{$ref:"#/definitions/FeatureType"}},required:["type","geometry","properties"],type:"object"},type:"array"},type:{$ref:"#/definitions/FeatureCollectionType"}},required:["type","features"],type:"object"},AnnotationId:{pattern:"^a_[A-Za-z0-9_-]{8,}$",type:"string"},AnnotationProperties:{additionalProperties:!1,properties:{externalId:{type:"string"},id:{$ref:"#/definitions/AnnotationId"},symbolId:{type:"string"}},required:["id","symbolId"],type:"object"},Area:{additionalProperties:!1,properties:{geometry:{$ref:"#/definitions/Polygon"},properties:{$ref:"#/definitions/AreaProperties"},type:{$ref:"#/definitions/FeatureType"}},required:["type","geometry","properties"],type:"object"},AreaCollection:{additionalProperties:!1,properties:{features:{items:{$ref:"#/definitions/Area"},type:"array"},type:{$ref:"#/definitions/FeatureCollectionType"}},required:["type","features"],type:"object"},AreaId:{pattern:"^ar_[A-Za-z0-9_-]{8,}$",type:"string"},AreaProperties:{additionalProperties:!1,properties:{center:{$ref:"#/definitions/Position",description:"The center of mass of this area."},destinationNodes:{description:"A list of node IDs which can be used to navigate to this area.",items:{$ref:"#/definitions/NodeId"},type:"array"},details:{$ref:"#/definitions/Details"},externalId:{type:"string"},id:{$ref:"#/definitions/AreaId"}},required:["id"],type:"object"},Category:{additionalProperties:!1,properties:{icon:{description:"The category's icon",format:"uri",type:"string"},id:{$ref:"#/definitions/CategoryId"},name:{type:"string"},parent:{$ref:"#/definitions/CategoryId"}},required:["id","name","icon"],type:"object"},CategoryId:{description:"A category ID",pattern:"^cat_[A-Za-z0-9_-]{8,}$",type:"string"},Connection:{additionalProperties:!1,properties:{accessible:{type:"boolean"},details:{additionalProperties:!1,properties:{name:{type:"string"}},type:"object"},externalId:{type:"string"},extra:{additionalProperties:{},type:"object"},id:{$ref:"#/definitions/ConnectionId"},metadata:{$ref:"#/definitions/Metadata"},nodes:{description:"A list of node IDs corresponding to nodes that are a part of this connection.",items:{$ref:"#/definitions/NodeId"},type:"array"},type:{type:"string"}},required:["id","type","nodes","externalId"],type:"object"},ConnectionId:{pattern:"^c_[A-Za-z0-9_-]{8,}$",type:"string"},Connections:{items:{$ref:"#/definitions/Connection"},type:"array"},Day:{enum:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],type:"string"},DayOrPublicHoliday:{anyOf:[{$ref:"#/definitions/Day"},{const:"PublicHolidays",type:"string"}]},Details:{additionalProperties:!1,description:"Additional information about a given entity.",properties:{description:{type:"string"},images:{items:{$ref:"#/definitions/Image"},type:"array"},links:{items:{$ref:"#/definitions/Hyperlink"},type:"array"},name:{type:"string"}},type:"object"},EnterpriseCategory:{additionalProperties:!1,properties:{children:{items:{$ref:"#/definitions/EnterpriseCategoryId"},type:"array"},color:{type:"string"},externalId:{type:"string"},extra:{additionalProperties:{},type:"object"},icon:{description:"The category's icon",format:"uri",type:"string"},iconFromDefaultList:{type:["string","null"]},id:{$ref:"#/definitions/EnterpriseCategoryId"},locations:{items:{$ref:"#/definitions/EnterpriseLocationId"},type:"array"},name:{type:"string"},picture:{description:"The category's picture",format:"uri",type:"string"},sortOrder:{type:"number"}},required:["children","externalId","id","locations","name","sortOrder"],type:"object"},EnterpriseCategoryId:{description:"An ID for an enterprise category",pattern:"^ec_[A-Za-z0-9_-]{8,}$",type:"string"},EnterpriseCategoryPriority:{additionalProperties:{items:{$ref:"#/definitions/EnterpriseCategoryId"},type:"array"},description:"The ordered list of category ids that this location belongs to The order here determines the priority of the categories, with the first category being the highest priority for determining application logic like icon and color preference.",propertyNames:{description:"An ID for an enterprise location",pattern:"^el_[A-Za-z0-9_-]{8,}$"},type:"object"},EnterpriseCollection:{additionalProperties:!1,properties:{categories:{items:{$ref:"#/definitions/EnterpriseCategory"},type:"array"},categoryPriorities:{$ref:"#/definitions/EnterpriseCategoryPriority"},enterpriseStyles:{$ref:"#/definitions/EnterpriseStyles"},floorText:{$ref:"#/definitions/EnterpriseFloorText"},layers:{items:{$ref:"#/definitions/EnterpriseLayer"},type:"array"},locationInstances:{items:{$ref:"#/definitions/EnterpriseLocationInstance"},type:"array"},locations:{items:{$ref:"#/definitions/EnterpriseLocation"},type:"array"},textures:{items:{$ref:"#/definitions/EnterpriseTexture"},type:"array"},venue:{$ref:"#/definitions/EnterpriseVenue"}},required:["locations","categories","venue","locationInstances","layers"],type:"object"},EnterpriseFloorText:{additionalProperties:{anyOf:[{$ref:"#/definitions/FloorTextFeatureCollection"},{not:{}}]},description:"The text to display on a map, split into feature collection per floor.",type:"object"},EnterpriseLayer:{additionalProperties:!1,properties:{id:{$ref:"#/definitions/EnterpriseLayerId"},name:{type:"string"},spaces:{items:{$ref:"#/definitions/EnterpriseLayerSpace"},minItems:1,type:"array"}},required:["id","name","spaces"],type:"object"},EnterpriseLayerId:{pattern:"^ely_[A-Za-z0-9_-]{8,}$",type:"string"},EnterpriseLayerSpace:{additionalProperties:!1,properties:{floorId:{$ref:"#/definitions/FloorId"},spaceId:{$ref:"#/definitions/SpaceId"}},required:["floorId","spaceId"],type:"object"},EnterpriseLocation:{additionalProperties:!1,properties:{amenity:{description:"The location's amenity type. Only set if the location is an amenity",type:"string"},description:{type:"string"},externalId:{type:"string"},extra:{additionalProperties:{},type:"object"},gallery:{description:"The location's image gallery",items:{additionalProperties:!1,properties:{caption:{type:["string","null"]},embeddedUrl:{description:"The URL to link from the image",format:"uri",type:["string","null"]},image:{type:"string"}},required:["image"],type:"object"},type:"array"},hidden:{description:"Whether to show the location in applications",type:"boolean"},id:{$ref:"#/definitions/EnterpriseLocationId"},links:{description:"Web links for the location",items:{additionalProperties:!1,properties:{label:{type:"string"},url:{description:"The URL of the link",format:"uri",type:"string"}},required:["label","url"],type:"object"},type:"array"},logo:{description:"The location's logo",format:"uri",type:"string"},name:{type:"string"},nodes:{deprecated:"Use `spaces` instead. A location's nodes that are not attached to a polygon will be in the spaces array as a point space. Nodes that are attached to one of it's polygons will be destinationNodes on that polygon's space",items:{additionalProperties:!1,properties:{id:{$ref:"#/definitions/NodeId"},map:{$ref:"#/definitions/FloorId"}},required:["map","id"],type:"object"},type:"array"},operationHours:{items:{$ref:"#/definitions/OperationHours"},type:"array"},phone:{additionalProperties:!1,properties:{extension:{type:"string"},number:{type:"string"}},required:["number"],type:"object"},picture:{description:"The picture of the location",format:"uri",type:"string"},polygons:{deprecated:"Use `spaces` instead. All of a location's polygons will be in the spaces array.",items:{additionalProperties:!1,properties:{id:{$ref:"#/definitions/SpaceId"},map:{$ref:"#/definitions/FloorId"}},required:["map","id"],type:"object"},type:"array"},shortName:{type:"string"},showFloatingLabelWhenImagePresent:{description:"Whether to show the flat label when an image is present",type:"boolean"},showLogo:{description:"Whether to show the logo of the location",type:"boolean"},siblingGroups:{description:"Locations that are related to this location in some manner (described by the label)",items:{$ref:"#/definitions/SiblingGroup"},type:"array"},social:{additionalProperties:!1,description:"The location's social media links",properties:{facebook:{type:"string"},instagram:{type:"string"},twitter:{type:"string"},website:{type:"string"}},type:"object"},sortOrder:{type:"number"},spaces:{description:"The places that this location is anchored to in the physical world. These are either Polygon or Point spaces. A location can be attached to many spaces, and a space can be attached to many locations.\n\nIf there are different properties for the location on those spaces, they will show up in the location's {@link EnterpriseLocation.instances instances } property",items:{additionalProperties:!1,properties:{floor:{$ref:"#/definitions/FloorId"},id:{$ref:"#/definitions/SpaceId"}},required:["floor","id"],type:"object"},type:"array"},states:{description:"The location's state. No more than one state should be active at a time, and all but at most one should have dates set",items:{$ref:"#/definitions/LocationState"},type:"array"},tags:{items:{type:"string"},type:"array"},type:{type:"string"}},required:["externalId","id","name","nodes","polygons","sortOrder","spaces","type"],type:"object"},EnterpriseLocationId:{description:"An ID for an enterprise location",pattern:"^el_[A-Za-z0-9_-]{8,}$",type:"string"},EnterpriseLocationInstance:{additionalProperties:!1,description:"A locationInstance is a particular instace of an Enterprise Location that has some properties different from the parent. Eg, it may have different hours, or a slightly different name.\n\nA LocationInstance:\n- MUST have a parent, referring to an Enterprise Location.\n- MUST have a unique ID, for localization to work.\n- SHOULD have AT LEAST ONE polygon or node to anchor it in space.\n- SHOULD have AT LEAST ONE other Enterprise Location property set.\n\nIt is otherwise a Partial<EnterpriseLocation>\n\nUsage examples:\n- A locationInstance for a location with a different externalId so a customer can identify them individually.\n- A locationInstance with different operationHours, that might indicate different hours for that particular entrace.",properties:{amenity:{description:"The location's amenity type. Only set if the location is an amenity",type:"string"},description:{type:"string"},externalId:{type:"string"},extra:{additionalProperties:{},type:"object"},gallery:{description:"The location's image gallery",items:{additionalProperties:!1,properties:{caption:{type:["string","null"]},embeddedUrl:{description:"The URL to link from the image",format:"uri",type:["string","null"]},image:{type:"string"}},required:["image"],type:"object"},type:"array"},hidden:{description:"Whether to show the location in applications",type:"boolean"},id:{$ref:"#/definitions/EnterpriseLocationInstanceId"},links:{description:"Web links for the location",items:{additionalProperties:!1,properties:{label:{type:"string"},url:{description:"The URL of the link",format:"uri",type:"string"}},required:["label","url"],type:"object"},type:"array"},logo:{description:"The location's logo",format:"uri",type:"string"},name:{type:"string"},nodes:{deprecated:"Use `spaces` instead. A location's nodes that are not attached to a polygon will be in the spaces array as a point space. Nodes that are attached to one of it's polygons will be destinationNodes on that polygon's space",items:{additionalProperties:!1,properties:{id:{$ref:"#/definitions/NodeId"},map:{$ref:"#/definitions/FloorId"}},required:["map","id"],type:"object"},type:"array"},operationHours:{items:{$ref:"#/definitions/OperationHours"},type:"array"},parent:{$ref:"#/definitions/EnterpriseLocationId"},phone:{additionalProperties:!1,properties:{extension:{type:"string"},number:{type:"string"}},required:["number"],type:"object"},picture:{description:"The picture of the location",format:"uri",type:"string"},polygons:{deprecated:"Use `spaces` instead. All of a location's polygons will be in the spaces array.",items:{additionalProperties:!1,properties:{id:{$ref:"#/definitions/SpaceId"},map:{$ref:"#/definitions/FloorId"}},required:["map","id"],type:"object"},type:"array"},shortName:{type:"string"},showFloatingLabelWhenImagePresent:{description:"Whether to show the flat label when an image is present",type:"boolean"},showLogo:{description:"Whether to show the logo of the location",type:"boolean"},siblingGroups:{description:"Locations that are related to this location in some manner (described by the label)",items:{$ref:"#/definitions/SiblingGroup"},type:"array"},social:{additionalProperties:!1,description:"The location's social media links",properties:{facebook:{type:"string"},instagram:{type:"string"},twitter:{type:"string"},website:{type:"string"}},type:"object"},sortOrder:{type:"number"},spaces:{description:"The places that this location is anchored to in the physical world. These are either Polygon or Point spaces. A location can be attached to many spaces, and a space can be attached to many locations.\n\nIf there are different properties for the location on those spaces, they will show up in the location's {@link EnterpriseLocation.instances instances } property",items:{additionalProperties:!1,properties:{floor:{$ref:"#/definitions/FloorId"},id:{$ref:"#/definitions/SpaceId"}},required:["floor","id"],type:"object"},type:"array"},states:{description:"The location's state. No more than one state should be active at a time, and all but at most one should have dates set",items:{$ref:"#/definitions/LocationState"},type:"array"},tags:{items:{type:"string"},type:"array"},type:{type:"string"}},required:["id","parent"],type:"object"},EnterpriseLocationInstanceId:{description:"An ID for an enterprise location instance",pattern:"^eli_[A-Za-z0-9_-]{8,}$",type:"string"},EnterpriseStyles:{additionalProperties:{additionalProperties:!1,properties:{edgeOffset:{type:"number"},geometryAnchors:{items:{additionalProperties:!1,properties:{floorId:{$ref:"#/definitions/FloorId"},geometryId:{$ref:"#/definitions/SpaceId"}},required:["geometryId","floorId"],type:"object"},type:"array"}},required:["geometryAnchors"],type:"object"},type:"object"},EnterpriseTexture:{additionalProperties:!1,properties:{bounds:{description:"Coordinates of the texture's bounding box in format: [minLon, minLat, maxLon, maxLat].",items:{type:"number"},maxItems:4,minItems:4,type:"array"},face:{$ref:"#/definitions/EnterpriseTextureFace",description:"Face of the polygon that the texture will be applied to.\n\n'top' means that the texture will be applied to the upward-pointing face of the polygon.\n\n'side' means that the texture will be applied to every side face of the polygon."},geometryAnchors:{description:"Anchors for the texture on the geometry of the polygon.",items:{$ref:"#/definitions/EnterpriseTextureGeometryAnchor"},minItems:1,type:"array"},offset:{$ref:"#/definitions/EnterpriseTextureUV",description:"Controls the starting position of the texture on the surface. The u value shifts the texture horizontally and v shifts vertically."},path:{description:"Path to the texture image. Must be either a PNG or JPG format.",type:"string"},repeat:{$ref:"#/definitions/EnterpriseTextureUV",description:"Controls how many times the texture repeats across the surface. The u value controls horizontal repetition and v controls vertical repetition."},rotation:{description:"Rotation of the texture in degrees clockwise.\n\nFor top textures this is relative to north. North is 0, east is 90.\n\nFor side textures this is relative to the upward direction, with 0 degrees being upright.",maximum:360,minimum:0,type:"number"},surface:{$ref:"#/definitions/EnterpriseTextureSurface",description:"Surface of the polygon that the texture will be applied to.\n\n'inside' means that the texture will only be applied to the interior surface of the polygon.\n\n'outside' means that the texture will only be applied to the exterior surface of the polygon.\n\n'both' means that the texture will be applied to both interior and exterior surfaces of the polygon."}},required:["repeat","offset","rotation","path","face","surface","bounds","geometryAnchors"],type:"object"},EnterpriseTextureFace:{enum:["top","side"],type:"string"},EnterpriseTextureGeometryAnchor:{additionalProperties:!1,properties:{floorId:{$ref:"#/definitions/FloorId"},geometryId:{$ref:"#/definitions/SpaceId"}},required:["geometryId","floorId"],type:"object"},EnterpriseTextureSurface:{enum:["inside","outside","both"],type:"string"},EnterpriseTextureUV:{additionalProperties:!1,properties:{u:{type:"number"},v:{type:"number"}},required:["u","v"],type:"object"},EnterpriseVenue:{additionalProperties:!1,properties:{countrycode:{description:"The ISO 3166-1 alpha-2 country code of the venue, if known\n\nEg. `US` or `GB`",type:"string"},coverImage:{description:"The venue's cover image",format:"uri",type:"string"},defaultFloor:{$ref:"#/definitions/FloorId",description:"The venue's default floor"},defaultLanguage:{$ref:"#/definitions/Language"},defaultMap:{$ref:"#/definitions/FloorId",deprecated:"Use `defaultFloor` instead"},externalId:{type:"string"},extra:{additionalProperties:{},type:"object"},icon:{description:"The venue's icon",format:"uri",type:"string"},languages:{items:{$ref:"#/definitions/Language"},type:"array"},logo:{description:"The venue's logo",format:"uri",type:"string"},mappedinWebUrl:{description:"The base URL for Mappedin Web for this venue\n\nBetter name?",type:"string"},name:{type:"string"},operationHours:{description:"When this venue is open.",items:{$ref:"#/definitions/OperationHours"},type:"array"},slug:{type:"string"},topLocations:{items:{$ref:"#/definitions/EnterpriseLocationId"},type:"array"},tzid:{description:"The venue's timezone, from the IANA Time Zone Database. Should be in the format of `America/New_York`",pattern:"^[A-Za-z0-9\\/_-]+$",type:"string"}},required:["defaultLanguage","externalId","languages","name","slug"],type:"object"},EntranceCollection:{$ref:"#/definitions/FeatureCollection%3CLineString%2CEntranceProperties%3E"},EntranceId:{pattern:"^e_[A-Za-z0-9_-]{8,}$",type:"string"},EntranceProperties:{additionalProperties:!1,properties:{details:{$ref:"#/definitions/Details"},externalId:{type:"string"},id:{$ref:"#/definitions/EntranceId"},isExterior:{type:"boolean"},metadata:{$ref:"#/definitions/Metadata"},node:{$ref:"#/definitions/NodeId"}},required:["id","externalId"],type:"object"},Facade:{additionalProperties:!1,properties:{id:{$ref:"#/definitions/FacadeId"},spaces:{items:{$ref:"#/definitions/FacadeSpace"},minItems:1,type:"array"}},required:["id","spaces"],type:"object"},FacadeId:{pattern:"^fc_[A-Za-z0-9_-]{8,}$",type:"string"},FacadeSpace:{additionalProperties:!1,properties:{floorId:{$ref:"#/definitions/FloorId"},spaceId:{$ref:"#/definitions/SpaceId"}},required:["floorId","spaceId"],type:"object"},"Feature<(Polygon|LineString),ObstructionProperties>":{additionalProperties:!1,properties:{geometry:{anyOf:[{$ref:"#/definitions/Polygon"},{$ref:"#/definitions/LineString"}]},properties:{$ref:"#/definitions/ObstructionProperties"},type:{$ref:"#/definitions/FeatureType"}},required:["type","geometry","properties"],type:"object"},"Feature<(Polygon|LineString|Point),SpaceProperties>":{additionalProperties:!1,properties:{geometry:{anyOf:[{$ref:"#/definitions/Polygon"},{$ref:"#/definitions/LineString"},{$ref:"#/definitions/Point"}]},properties:{$ref:"#/definitions/SpaceProperties"},type:{$ref:"#/definitions/FeatureType"}},required:["type","geometry","properties"],type:"object"},"Feature<(Polygon|MultiPolygon|null),FloorProperties>":{additionalProperties:!1,properties:{geometry:{anyOf:[{$ref:"#/definitions/Polygon"},{$ref:"#/definitions/MultiPolygon"},{type:"null"}]},properties:{$ref:"#/definitions/FloorProperties"},type:{$ref:"#/definitions/FeatureType"}},required:["type","geometry","properties"],type:"object"},"Feature<LineString,EntranceProperties>":{additionalProperties:!1,properties:{geometry:{$ref:"#/definitions/LineString"},properties:{$ref:"#/definitions/EntranceProperties"},type:{$ref:"#/definitions/FeatureType"}},required:["type","geometry","properties"],type:"object"},"Feature<Point,FloorImageProperties>":{additionalProperties:!1,properties:{geometry:{$ref:"#/definitions/Point"},properties:{$ref:"#/definitions/FloorImageProperties"},type:{$ref:"#/definitions/FeatureType"}},required:["type","geometry","properties"],type:"object"},"Feature<Point,FloorTextProperties>":{additionalProperties:!1,properties:{geometry:{$ref:"#/definitions/Point"},properties:{$ref:"#/definitions/FloorTextProperties"},type:{$ref:"#/definitions/FeatureType"}},required:["type","geometry","properties"],type:"object"},"Feature<Point,NodeProperties>":{additionalProperties:!1,properties:{geometry:{$ref:"#/definitions/Point"},properties:{$ref:"#/definitions/NodeProperties"},type:{$ref:"#/definitions/FeatureType"}},required:["type","geometry","properties"],type:"object"},"Feature<Point,TextAreaProperties>":{additionalProperties:!1,properties:{geometry:{$ref:"#/definitions/Point"},properties:{$ref:"#/definitions/TextAreaProperties"},type:{$ref:"#/definitions/FeatureType"}},required:["type","geometry","properties"],type:"object"},"Feature<Polygon,FloorStackFootprintProperties>":{additionalProperties:!1,properties:{geometry:{$ref:"#/definitions/Polygon"},properties:{$ref:"#/definitions/FloorStackFootprintProperties"},type:{$ref:"#/definitions/FeatureType"}},required:["type","geometry","properties"],type:"object"},"FeatureCollection<(Polygon|LineString),ObstructionProperties>":{additionalProperties:!1,properties:{features:{items:{$ref:"#/definitions/Feature%3C(Polygon%7CLineString)%2CObstructionProperties%3E"},type:"array"},type:{$ref:"#/definitions/FeatureCollectionType"}},required:["type","features"],type:"object"},"FeatureCollection<(Polygon|LineString|Point),SpaceProperties>":{additionalProperties:!1,properties:{features:{items:{$ref:"#/definitions/Feature%3C(Polygon%7CLineString%7CPoint)%2CSpaceProperties%3E"},type:"array"},type:{$ref:"#/definitions/FeatureCollectionType"}},required:["type","features"],type:"object"},"FeatureCollection<(Polygon|MultiPolygon|null),FloorProperties>":{additionalProperties:!1,properties:{features:{items:{$ref:"#/definitions/Feature%3C(Polygon%7CMultiPolygon%7Cnull)%2CFloorProperties%3E"},type:"array"},type:{$ref:"#/definitions/FeatureCollectionType"}},required:["type","features"],type:"object"},"FeatureCollection<LineString,EntranceProperties>":{additionalProperties:!1,properties:{features:{items:{$ref:"#/definitions/Feature%3CLineString%2CEntranceProperties%3E"},type:"array"},type:{$ref:"#/definitions/FeatureCollectionType"}},required:["type","features"],type:"object"},"FeatureCollection<Point,FloorImageProperties>":{additionalProperties:!1,properties:{features:{items:{$ref:"#/definitions/Feature%3CPoint%2CFloorImageProperties%3E"},type:"array"},type:{$ref:"#/definitions/FeatureCollectionType"}},required:["type","features"],type:"object"},"FeatureCollection<Point,FloorTextProperties>":{additionalProperties:!1,properties:{features:{items:{$ref:"#/definitions/Feature%3CPoint%2CFloorTextProperties%3E"},type:"array"},type:{$ref:"#/definitions/FeatureCollectionType"}},required:["type","features"],type:"object"},"FeatureCollection<Point,NodeProperties>":{additionalProperties:!1,properties:{features:{items:{$ref:"#/definitions/Feature%3CPoint%2CNodeProperties%3E"},type:"array"},type:{$ref:"#/definitions/FeatureCollectionType"}},required:["type","features"],type:"object"},"FeatureCollection<Point,TextAreaProperties>":{additionalProperties:!1,properties:{features:{items:{$ref:"#/definitions/Feature%3CPoint%2CTextAreaProperties%3E"},type:"array"},type:{$ref:"#/definitions/FeatureCollectionType"}},required:["type","features"],type:"object"},"FeatureCollection<Polygon,FloorStackFootprintProperties>":{additionalProperties:!1,properties:{features:{items:{$ref:"#/definitions/Feature%3CPolygon%2CFloorStackFootprintProperties%3E"},type:"array"},type:{$ref:"#/definitions/FeatureCollectionType"}},required:["type","features"],type:"object"},FeatureCollectionType:{const:"FeatureCollection",description:"The type field used for a collection of GeoJSON features.",type:"string"},FeatureType:{const:"Feature",description:"The type field used for individual GeoJSON features.",type:"string"},FloatingFloorTextProperties:{additionalProperties:!1,properties:{align:{default:"center",description:"Horizontal alignment of multi-line text.",enum:["left","center","right"],type:"string"},color:{default:"black",description:"The color of the text in CSS format (e.g. `#000000`, `rgb(0, 0, 0)`, `black`).",type:"string"},fontFamily:{default:"Droid Sans",description:"The font family of the text.",type:"string"},fontSize:{default:12,description:"The em-height (multiplier of the font's height) at which to render the font, in meters. The font height is the distance between the ascender (highest point, height of an A) and descender (lowest point, bottom of a g) of the font. For example, if the font-size is 12, the space for a single character will be 12 meters high.",type:"number"},rotation:{description:"Rotation in degrees, about the center of the text. North is 0, east is 90.",maximum:360,minimum:0,type:"number"},text:{description:"The text to display. Newline characters are supported.",type:"string"},verticalOffset:{description:"The vertical offset of the text, in meters.",type:"number"},visible:{default:!0,description:"Whether the text is visible.",type:"boolean"}},required:["align","color","fontFamily","fontSize","rotation","text","verticalOffset","visible"],type:"object"},FloatingImageProperties:{additionalProperties:!1,properties:{height:{description:"The height of the image when represented on the map, in meters.",minimum:0,type:"number"},path:{description:"The path to the image. This will be a remote URL.",type:"string"},rotation:{description:"Rotation in degrees, about the center of the image. North is 0, east is 90.",maximum:360,minimum:0,type:"number"},verticalOffset:{description:"How high to position the image, in meters, relative to the ground plane.",minimum:0,type:"number"},width:{description:"The width of the image when represented on the map, in meters.",minimum:0,type:"number"}},required:["height","path","rotation","verticalOffset","width"],type:"object"},FloatingTextAreaProperties:{additionalProperties:!1,properties:{align:{$ref:"#/definitions/TextAreaAlignment",description:"The alignment of the text within the label. 'Near' means the text will be aligned up against the position. Typically in the SDK the text will be rotated to always be upright, so either the start or end of the text will be up against the position. 'Center' means it will be centered in the middle of the area."},maxHeight:{description:"The maximum height of the label, in meters. Half the height will be above the feature's position, half below.",exclusiveMinimum:0,type:"number"},maxWidth:{description:"The maximum width of the label, in meters. The left edge will start at the feature's position and extend in the rotation direction.",exclusiveMinimum:0,type:"number"},rotation:{description:"Rotation in degrees relative to north, about the position of the label. North is 0, east is 90.",maximum:360,minimum:0,type:"number"},verticalOffset:{description:"How high to position the text area, in meters, relative to the ground plane.",minimum:0,type:"number"}},required:["align","maxHeight","maxWidth","rotation","verticalOffset"],type:"object"},FloorCollection:{$ref:"#/definitions/FeatureCollection%3C(Polygon%7CMultiPolygon%7Cnull)%2CFloorProperties%3E"},FloorId:{description:"The m_ prefix is deprecated, from when floors were previously called maps. Use f_ as the prefix instead.",pattern:"^[mf]_[A-Za-z0-9_-]{8,}$",type:"string"},FloorImageFeatureCollection:{$ref:"#/definitions/FeatureCollection%3CPoint%2CFloorImageProperties%3E",description:"A collection of images to be displayed on a map. They are either attached to a polygon or are floating in space."},FloorImageProperties:{anyOf:[{$ref:"#/definitions/AnchoredImageProperties"},{$ref:"#/definitions/FloatingImageProperties"}]},FloorProperties:{additionalProperties:!1,properties:{elevation:{description:"The elevation of this map relative to other maps in the stack. Must be an integer.",type:"integer"},externalId:{description:"Use of this property as the name of the map is deprecated. Use the name property instead.",type:"string"},id:{$ref:"#/definitions/FloorId"},metadata:{$ref:"#/definitions/Metadata"},name:{type:"string"},shortName:{description:"A short name for the map, if it exists. Usually one or two characters (eg, 3, F1, L, etc.) For display in very small spaces, like a floor selector dropdown. Might line up with what is shown on elevator buttons in the physical world.",type:"string"},subtitle:{description:'A subtitle for the map, for display in larger spaces, usually beneath the full name. Provides additional context for what is actually on the map, if the name is not clear. For example, if the full name is "Level 1", the subtitle might be "Arrivals and Baggage Claim".\n\nShould be no more than a few words.',type:"string"}},required:["id","externalId","elevation"],type:"object"},FloorStack:{additionalProperties:!1,properties:{defaultFloor:{$ref:"#/definitions/FloorId",description:"The default floor to use when a floor is not specified."},externalId:{type:"string"},floors:{description:"A list of floor IDs that belong to this floor stack.",items:{$ref:"#/definitions/FloorId"},type:"array"},footprint:{$ref:"#/definitions/FeatureCollection%3CPolygon%2CFloorStackFootprintProperties%3E",description:"Provides a footprint for the map stack based on the geometry of the maps it contains. This is useful for rendering a map stack without loading all of its maps."},id:{$ref:"#/definitions/FloorStackId"},maps:{deprecated:"Use `floors` instead.",description:"A list of floor IDs that belong to this floor stack.",items:{$ref:"#/definitions/FloorId"},type:"array"},metadata:{$ref:"#/definitions/Metadata"},name:{type:"string"},shortName:{description:"A short name for the map stack, if it exists. For display in small spaces, like a floor selector dropdown.",type:"string"},type:{description:"The type of MapStack, e.g. Building, Outdoor. Defaults to Building.",enum:["Building","Outdoor"],type:"string"}},required:["id","externalId","name","maps"],type:"object"},FloorStackFootprintProperties:{additionalProperties:{not:{}},type:"object"},FloorStackId:{description:"The mg_ prefix is deprecated, from when floor stacks were previously called map groups. Use fs_ as the prefix instead.",pattern:"^fs_[A-Za-z0-9_-]{8,}$",type:"string"},FloorStacks:{items:{$ref:"#/definitions/FloorStack"},type:"array"},FloorTextFeatureCollection:{$ref:"#/definitions/FeatureCollection%3CPoint%2CFloorTextProperties%3E",description:"A collection of text to be displayed on a map. They are either attached to a space or are floating."},FloorTextProperties:{anyOf:[{$ref:"#/definitions/AnchoredFloorTextProperties"},{$ref:"#/definitions/FloatingFloorTextProperties"}]},Hyperlink:{additionalProperties:!1,properties:{displayName:{type:"string"},url:{type:"string"}},required:["url"],type:"object"},Image:{additionalProperties:!1,properties:{altText:{type:"string"},url:{type:"string"}},required:["url"],type:"object"},Language:{additionalProperties:!1,properties:{code:{type:"string"},name:{type:"string"}},required:["name","code"],type:"object"},Latitude:{description:"A WGS 84-compatible latitude coordinate value.",maximum:90,minimum:-90,type:"number"},LineString:{additionalProperties:!1,description:"An RFC-7946 compatible GeoJSON LineString geometry.",properties:{coordinates:{items:{$ref:"#/definitions/Position"},minItems:2,type:"array"},type:{const:"LineString",type:"string"}},required:["coordinates","type"],type:"object"},LineStringStyle:{additionalProperties:!1,properties:{altitude:{description:'How far off the "ground" the objects belonging to this layer should be drawn, in meters.',minimum:0,type:"number"},color:{description:"Color should be represented with a hash (#), followed by 6 hexadecimal digits. ex: #RRGGBB",pattern:"^#[0-9a-fA-F]{6}$",type:"string"},height:{description:"The height of the objects belonging to this layer, in meters.",minimum:0,type:"number"},lineStrings:{description:"The line strings which this style applies to.",items:{anyOf:[{$ref:"#/definitions/EntranceId"},{$ref:"#/definitions/ObstructionId"},{$ref:"#/definitions/SpaceId"}]},type:"array"},opacity:{maximum:1,minimum:0,type:"number"},width:{description:"The thickness of the line when rendered, in meters, measured from the center to the edge.",exclusiveMinimum:0,type:"number"}},required:["altitude","color","height","lineStrings","opacity","width"],type:"object"},LocalPosition:{description:"A position for a local coordinate system, measured in metres.",items:{type:"number"},maxItems:2,minItems:2,type:"array"},Location:{additionalProperties:!1,properties:{annotations:{items:{$ref:"#/definitions/LocationAnnotationMapping"},type:"array"},areas:{items:{$ref:"#/definitions/LocationAreaMapping"},type:"array"},categories:{items:{$ref:"#/definitions/CategoryId"},type:"array"},connections:{items:{$ref:"#/definitions/ConnectionId"},type:"array"},description:{type:"string"},entrances:{items:{$ref:"#/definitions/LocationEntranceMapping"},type:"array"},externalId:{type:"string"},icon:{description:"The location's icon, one of picture/category/logo",format:"uri",type:"string"},id:{$ref:"#/definitions/LocationId"},links:{description:"Web links for the location",items:{$ref:"#/definitions/LocationLink"},type:"array"},logo:{description:"The location's logo",format:"uri",type:"string"},name:{type:"string"},obstructions:{items:{$ref:"#/definitions/LocationObstructionMapping"},type:"array"},openingHoursSpecification:{description:"The location's opening hours",items:{$ref:"#/definitions/OpeningHoursSpecification"},type:"array"},phone:{type:"string"},pictures:{description:"The location's pictures",items:{$ref:"#/definitions/LocationPicture"},type:"array"},social:{description:"The location's social media links.",items:{$ref:"#/definitions/LocationSocial"},type:"array"},spaces:{items:{$ref:"#/definitions/LocationSpaceMapping"},type:"array"},website:{$ref:"#/definitions/LocationLink",description:"The location's website"}},required:["id","name","categories","spaces","obstructions","entrances","connections","annotations","areas","social","pictures","links","openingHoursSpecification"],type:"object"},LocationAnnotationMapping:{additionalProperties:!1,properties:{floor:{$ref:"#/definitions/FloorId"},id:{$ref:"#/definitions/AnnotationId"}},required:["floor","id"],type:"object"},LocationAreaMapping:{additionalProperties:!1,properties:{floor:{$ref:"#/definitions/FloorId"},id:{$ref:"#/definitions/AreaId"}},required:["floor","id"],type:"object"},LocationEntranceMapping:{additionalProperties:!1,properties:{floor:{$ref:"#/definitions/FloorId"},id:{$ref:"#/definitions/EntranceId"}},required:["floor","id"],type:"object"},LocationId:{description:"An ID for a location",pattern:"^loc_[A-Za-z0-9_-]{8,}$",type:"string"},LocationLink:{additionalProperties:!1,properties:{label:{type:"string"},url:{description:"The URL of the link",format:"uri",type:"string"}},required:["label","url"],type:"object"},LocationObstructionMapping:{additionalProperties:!1,properties:{floor:{$ref:"#/definitions/FloorId"},id:{$ref:"#/definitions/ObstructionId"}},required:["floor","id"],type:"object"},LocationPicture:{additionalProperties:!1,description:"The location's pictures Single-field object, because it's plausible we might add captions or comments in the future",properties:{url:{format:"uri",type:"string"}},type:"object"},LocationSocial:{additionalProperties:!1,properties:{name:{description:"The name of the social media platform.",type:"string"},url:{description:"The URL of the social media profile",format:"uri",type:"string"}},required:["name","url"],type:"object"},LocationSpaceMapping:{additionalProperties:!1,properties:{floor:{$ref:"#/definitions/FloorId"},id:{$ref:"#/definitions/SpaceId"}},required:["floor","id"],type:"object"},LocationState:{additionalProperties:!1,description:"The state of a location. Start and end dates are optional.",properties:{end:{description:"The start date of the state",format:"date",type:"string"},start:{description:"The start date of the state",format:"date",type:"string"},type:{description:"The type of the location state. Technically not limited, but should be one of the following:\n- closed-temporarily\n- new\n- pop-up\n- coming-soon\n- relocated",type:"string"}},required:["type"],type:"object"},Longitude:{description:"A WGS 84-compatible longitude coordinate value.",maximum:180,minimum:-180,type:"number"},ManifestCollection:{additionalProperties:!1,properties:{features:{items:{$ref:"#/definitions/ManifestFeature"},maxItems:1,minItems:1,type:"array"},type:{$ref:"#/definitions/FeatureCollectionType"}},required:["type","features"],type:"object"},ManifestFeature:{additionalProperties:!1,properties:{geometry:{$ref:"#/definitions/Point"},properties:{$ref:"#/definitions/ManifestProperties"},type:{$ref:"#/definitions/FeatureType"}},required:["type","geometry","properties"],type:"object"},ManifestFile:{additionalProperties:!1,properties:{name:{type:"string"},type:{const:"file",type:"string"}},required:["type","name"],type:"object"},ManifestFolder:{additionalProperties:!1,properties:{children:{items:{$ref:"#/definitions/ManifestFile"},minItems:1,type:"array"},name:{type:"string"},type:{const:"folder",type:"string"}},required:["type","name","children"],type:"object"},ManifestProperties:{additionalProperties:!1,properties:{folder_struct:{items:{anyOf:[{$ref:"#/definitions/ManifestFolder"},{$ref:"#/definitions/ManifestFile"}]},type:"array"},language:{description:"The RFC 5646 language tag of the MVF. https://datatracker.ietf.org/doc/html/rfc5646",examples:["en-US"],type:"string"},map:{description:"The identifier of the map that this MVF is for.",type:"string"},name:{type:"string"},naturalBearing:{description:'The angle, in degrees, the map is considered to be "naturally oriented" as, rather than facing directly north. 90 degrees means East is "up"',maximum:360,minimum:0,type:"number"},org_id:{type:"string"},time:{description:"An ISO 8601 date-time string, including timezone offset.",format:"date-time",type:"string"},tzid:{description:"The map's timezone, from the IANA Time Zone Database. Should be in the format of `America/New_York`",examples:["America/New_York"],pattern:"^[A-Za-z0-9_-]+\\/[A-Za-z0-9_-]+$",type:"string"},version:{const:"2.0.0",type:"string"}},required:["name","folder_struct","version","time"],type:"object"},Maps:{deprecated:"This is only present on `map.geojson` which is deprecated. Use\nthe collection on `floor.geojson` instead.",items:{$ref:"#/definitions/FloorProperties"},type:"array"},Material:{additionalProperties:!1,description:"The color and/or texture that should be applied to an instance of a Shape.\n\nIf both a color and a texture are provided, the color will be applied to the texture via a multiply operation. If neither are provided, the shape will be white.",properties:{color:{description:"The color of this mateial as a hex code.",pattern:"^#[0-9a-fA-F]{6}$",type:"string"},texture:{$ref:"#/definitions/Texture"}},type:"object"},Metadata:{additionalProperties:{},description:"Can be any extra metadata that is not part of the main MVF spec. Presence of any key or value is not guaranteed. Values are expected to be JSON-serializable.",type:"object"},ModelInstance:{additionalProperties:!1,description:"An instance of a 3D model.",properties:{altitude:{description:"The distance above ground, in metres, where this Decoration's origin point should be placed.",type:"number"},path:{description:"The path to this asset, relative to the MVF's models folder. Supports GLTF and OBJ.",minLength:1,type:"string"},position:{$ref:"#/definitions/Position",description:"The long/lat point that the Decoration's origin point correponds to."},rotation:{$ref:"#/definitions/Vector3",description:"The rotation, in Euler angles in XYZ order, that will be applied to this Decoration."},scale:{$ref:"#/definitions/Vector3",description:"The X, Y and Z scale that will be applied to this Decoration."}},required:["altitude","path","position","rotation","scale"],type:"object"},ModelInstanceCollection:{additionalProperties:{$ref:"#/definitions/ModelInstance"},description:"A map of model instances, where keys are valid polygon or obstruction IDs. Replaces the specified polygon.",type:"object"},MultiPolygon:{additionalProperties:!1,description:"An RFC-7946 compatible GeoJSON MultiPolygon geometry.",properties:{coordinates:{items:{items:{items:{$ref:"#/definitions/Position"},type:"array"},type:"array"},type:"array"},type:{const:"MultiPolygon",type:"string"}},required:["coordinates","type"],type:"object"},NodeCollection:{$ref:"#/definitions/FeatureCollection%3CPoint%2CNodeProperties%3E"},NodeId:{pattern:"^n_[A-Za-z0-9_-]{8,}$",type:"string"},NodeProperties:{additionalProperties:!1,properties:{externalId:{type:"string"},floor:{$ref:"#/definitions/FloorId",description:"The ID of the floor this node is found on."},id:{$ref:"#/definitions/NodeId"},map:{$ref:"#/definitions/FloorId",deprecated:"use `floor` instead.",description:"The ID of the floor this node is found on."},neighbors:{description:"A list of nodes that can be navigated to from this node.",items:{additionalProperties:!1,properties:{id:{$ref:"#/definitions/NodeId"},weight:{description:"The cost of navigating to this node.",minimum:0,type:"number"}},required:["id","weight"],type:"object"},type:"array"},preventSmoothing:{description:"Flag that may optionally indicate that a node is part of a custom path network rather than auto generated and should not be removed during smoothing/simplifcation.",type:"boolean"},space:{description:"The IDs of any spaces this node may be contained within.",items:{$ref:"#/definitions/SpaceId"},type:"array"}},required:["id","externalId","map","space","neighbors"],type:"object"},ObstructionCollection:{$ref:"#/definitions/FeatureCollection%3C(Polygon%7CLineString)%2CObstructionProperties%3E"},ObstructionId:{pattern:"^o_[A-Za-z0-9_-]{8,}$",type:"string"},ObstructionProperties:{additionalProperties:!1,properties:{center:{$ref:"#/definitions/Position",description:"The center of mass of this obstruction, if it is a polygon. This is undefined for line strings as this can be trivially derived."},details:{$ref:"#/definitions/Details"},entrances:{description:"A list of entrance IDs corresponding to entrances that can be used to navigate through this obstruction.",items:{$ref:"#/definitions/EntranceId"},type:"array"},externalId:{type:"string"},footprintComponent:{description:"Indicates whether this obstruction is considered part of the footprint of the building it is a part of. For example, an exterior wall would be considered part of the building footprint.",type:"boolean"},id:{$ref:"#/definitions/ObstructionId"},kind:{type:"string"},metadata:{$ref:"#/definitions/Metadata"}},required:["id","externalId","entrances"],type:"object"},OpeningHoursSpecification:{additionalProperties:!1,description:"We (almost) follow this schema (http://schema.org/OpeningHoursSpecification) The only difference is that we (like Google: https://developers.google.com/search/docs/data-types/local-businesses) accept dayOfWeek as an array as well as an individual day.\n\nBehavioral notes:\n- if the \"opens\" property is not present, the location is closed, and the closes property is ignored (Schema.org style)\n- if opens/closes are both set to 00:00, the location is closed (Google style)\n- If special hours do not specifiy certain weekdays being open, those weekdays are closed.\n- Not specifying dayOfWeek is equivalent to specifying every day of the week.\n- we will omit the '@type' property when producing MVFs. But we won't reject 3rd party MVFs that include it.",properties:{"@type":{const:"OpeningHoursSpecification",default:"OpeningHoursSpecification",description:"The type of opening hours",type:"string"},closes:{$ref:"#/definitions/Time",description:"The time the opening hours end"},dayOfWeek:{anyOf:[{$ref:"#/definitions/DayOrPublicHoliday"},{items:{$ref:"#/definitions/DayOrPublicHoliday"},maxItems:1,minItems:1,type:"array"},{items:{$ref:"#/definitions/DayOrPublicHoliday"},type:"array"}],description:"The days of the week the opening hours apply to"},opens:{$ref:"#/definitions/Time",description:"The time the opening hours start"},validFrom:{description:"The date the opening hours start, in ISO 8601 format",format:"date-time",type:"string"},validThrough:{description:"The date the opening hours end, in ISO 8601 format",format:"date-time",type:"string"}},type:"object"},OperationHours:{additionalProperties:!1,description:"We (almost) follow this schema (http://schema.org/OpeningHoursSpecification) The only difference is that we (like Google: https://developers.google.com/search/docs/data-types/local-businesses) accept dayOfWeek as an array as well as an individual day.",properties:{"@type":{const:"OpeningHoursSpecification",default:"OpeningHoursSpecification",description:"The type of operation hours",type:"string"},closes:{$ref:"#/definitions/Time",description:"The time the operation hours end"},dayOfWeek:{anyOf:[{$ref:"#/definitions/DayOrPublicHoliday"},{items:{$ref:"#/definitions/DayOrPublicHoliday"},maxItems:1,minItems:1,type:"array"},{items:{$ref:"#/definitions/DayOrPublicHoliday"},type:"array"}],description:"The days of the week the operation hours apply to"},opens:{$ref:"#/definitions/Time",description:"The time the operation hours start"},validFrom:{description:"The date the operation hours start, in ISO 8601 format",format:"date-time",type:"string"},validThrough:{description:"The date the operation hours end, in ISO 8601 format",format:"date-time",type:"string"}},type:"object"},ParsedMVF:{additionalProperties:!1,properties:{annotation:{additionalProperties:{anyOf:[{$ref:"#/definitions/AnnotationCollection"},{not:{}}]},propertyNames:{pattern:"^[mf]_[A-Za-z0-9_-]{8,}$"},type:"object"},area:{additionalProperties:{anyOf:[{$ref:"#/definitions/AreaCollection"},{not:{}}]},propertyNames:{pattern:"^[mf]_[A-Za-z0-9_-]{8,}$"},type:"object"},"category.json":{items:{$ref:"#/definitions/Category"},type:"array"},"connection.json":{$ref:"#/definitions/Connections"},enterprise:{$ref:"#/definitions/EnterpriseCollection"},entrance:{additionalProperties:{anyOf:[{$ref:"#/definitions/EntranceCollection"},{not:{}}]},propertyNames:{pattern:"^[mf]_[A-Za-z0-9_-]{8,}$"},type:"object"},facade:{additionalProperties:{anyOf:[{$ref:"#/definitions/Facade"},{not:{}}]},propertyNames:{pattern:"^fs_[A-Za-z0-9_-]{8,}$"},type:"object"},"floor.geojson":{$ref:"#/definitions/FloorCollection"},floorImages:{additionalProperties:{anyOf:[{$ref:"#/definitions/FloorImageFeatureCollection"},{not:{}}]},propertyNames:{pattern:"^[mf]_[A-Za-z0-9_-]{8,}$"},type:"object"},"floorstack.json":{$ref:"#/definitions/FloorStacks"},"location.json":{items:{$ref:"#/definitions/Location"},type:"array"},"manifest.geojson":{$ref:"#/definitions/ManifestCollection"},"map.geojson":{$ref:"#/definitions/Maps",deprecated:"Use `floor.geojson` instead."},"mapstack.geojson":{$ref:"#/definitions/FloorStacks",deprecated:"Use `floorstack.json` instead."},"mapstack.json":{$ref:"#/definitions/FloorStacks",deprecated:"Use `floorstack.json` instead."},modelInstances:{additionalProperties:{anyOf:[{$ref:"#/definitions/ModelInstanceCollection"},{not:{}}]},propertyNames:{pattern:"^[mf]_[A-Za-z0-9_-]{8,}$"},type:"object"},"node.geojson":{$ref:"#/definitions/NodeCollection"},obstruction:{additionalProperties:{anyOf:[{$ref:"#/definitions/ObstructionCollection"},{not:{}}]},propertyNames:{pattern:"^[mf]_[A-Za-z0-9_-]{8,}$"},type:"object"},shapeInstances:{additionalProperties:{anyOf:[{$ref:"#/definitions/ShapeInstanceCollection"},{not:{}}]},propertyNames:{pattern:"^[mf]_[A-Za-z0-9_-]{8,}$"},type:"object"},"shapes.json":{$ref:"#/definitions/ShapeCollection"},space:{additionalProperties:{anyOf:[{$ref:"#/definitions/SpaceCollection"},{not:{}}]},propertyNames:{pattern:"^[mf]_[A-Za-z0-9_-]{8,}$"},type:"object"},"styles.json":{$ref:"#/definitions/StyleCollection"},textAreas:{additionalProperties:{anyOf:[{$ref:"#/definitions/TextAreaFeatureCollection"},{not:{}}]},propertyNames:{pattern:"^[mf]_[A-Za-z0-9_-]{8,}$"},type:"object"},"tileset.json":{$ref:"#/definitions/TilesetCollection"},window:{additionalProperties:{anyOf:[{$ref:"#/definitions/WindowCollection"},{not:{}}]},propertyNames:{pattern:"^[mf]_[A-Za-z0-9_-]{8,}$"},type:"object"}},required:["manifest.geojson","mapstack.geojson","map.geojson","space","obstruction","connection.json","node.geojson","entrance"],type:"object"},Point:{additionalProperties:!1,description:"An RFC-7946 compatible GeoJSON Point geometry.",properties:{coordinates:{$ref:"#/definitions/Position"},type:{const:"Point",type:"string"}},required:["coordinates","type"],type:"object"},PointStyle:{additionalProperties:!1,properties:{points:{description:"The points which this style applies to.",items:{$ref:"#/definitions/SpaceId"},type:"array"},showImage:{description:"Whether or not the first image attached to the space or obstruction should be displayed on the point.",type:"boolean"}},required:["points"],type:"object"},Polygon:{additionalProperties:!1,description:"An RFC-7946 compatible GeoJSON Polygon geometry.",properties:{coordinates:{items:{items:{$ref:"#/definitions/Position"},type:"array"},type:"array"},type:{const:"Polygon",type:"string"}},required:["coordinates","type"],type:"object"},PolygonStyle:{additionalProperties:!1,properties:{altitude:{description:'How far off the "ground" the objects belonging to this layer should be drawn, in meters.',minimum:0,type:"number"},color:{description:"Color should be represented with a hash (#), followed by 6 hexadecimal digits. ex: #RRGGBB",pattern:"^#[0-9a-fA-F]{6}$",type:"string"},height:{description:"The height of the objects belonging to this layer, in meters.",minimum:0,type:"number"},opacity:{maximum:1,minimum:0,type:"number"},polygons:{description:"The polygons which this style applies to.",items:{anyOf:[{$ref:"#/definitions/ObstructionId"},{$ref:"#/definitions/SpaceId"}]},type:"array"},showImage:{description:"Whether or not the first image attached to the space or obstruction should be displayed on the polygon.",type:"boolean"}},required:["altitude","color","height","opacity","polygons"],type:"object"},Position:{description:"A valid WGS 84 position consisting of a longitude coodinate, followed by a latitude coordinate.",items:[{$ref:"#/definitions/Longitude"},{$ref:"#/definitions/Latitude"}],maxItems:2,minItems:2,type:"array"},Ring:{description:"A simple shape for part of a complex polygon",items:{$ref:"#/definitions/LocalPosition"},minItems:3,type:"array"},Shape:{description:"A 3D object made from extruded 2D polygons, that can be rendered to the map as a ShapeInstance.",items:{$ref:"#/definitions/ShapeComponent"},minItems:1,type:"array"},ShapeCollection:{additionalProperties:{$ref:"#/definitions/Shape"},description:"A group of Shapes, without any information as to how they will be placed in a scene.",propertyNames:{pattern:"^sh_[A-Za-z0-9_-]{8,}$"},type:"object"},ShapeComponent:{additionalProperties:!1,description:"A single extruded 2D polygon.",properties:{altitude:{description:"In metres.",type:"number"},geometry:{description:"Can contain holes, like GeoJSON.",items:{$ref:"#/definitions/Ring"},minItems:1,type:"array"},height:{description:"In metres.",exclusiveMinimum:0,type:"number"}},required:["geometry","altitude","height"],type:"object"},ShapeId:{pattern:"^sh_[A-Za-z0-9_-]{8,}$",type:"string"},ShapeInstance:{additionalProperties:!1,description:"An instance of a Shape.",properties:{altitude:{description:"The distance above ground, in metres, where this Decoration's origin point should be placed.",type:"number"},id:{$ref:"#/definitions/ShapeId",description:"The identifier of the Shape to be placed."},material:{$ref:"#/definitions/Material",description:"The color and/or texture to apply to this shape instance."},position:{$ref:"#/definitions/Position",description:"The long/lat point that the Decoration's origin point correponds to."},rotation:{$ref:"#/definitions/Vector3",description:"The rotation, in Euler angles in XYZ order, that will be applied to this Decoration."},scale:{$ref:"#/definitions/Vector3",description:"The X, Y and Z scale that will be applied to this Decoration."}},required:["altitude","id","material","position","rotation","scale"],type:"object"},ShapeInstanceCollection:{additionalProperties:{$ref:"#/definitions/ShapeInstance"},description:"A map of shape instances, where keys are valid polygon or obstruction IDs. Replaces the specified polygon.",type:"object"},SiblingGroup:{additionalProperties:!1,properties:{label:{type:"string"},siblings:{items:{$ref:"#/definitions/EnterpriseLocationId"},type:"array"}},required:["label","siblings"],type:"object"},SpaceCollection:{$ref:"#/definitions/FeatureCollection%3C(Polygon%7CLineString%7CPoint)%2CSpaceProperties%3E"},SpaceId:{pattern:"^s_[A-Za-z0-9_-]{8,}$",type:"string"},SpaceProperties:{additionalProperties:!1,properties:{center:{$ref:"#/definitions/Position",description:"The center of mass of this space, if it is a polygon. This is undefined for line string and point spaces as these can be trivially derived."},destinationNodes:{description:"A list of node IDs which can be used to navigate to this space.",items:{$ref:"#/definitions/NodeId"},type:"array"},details:{$ref:"#/definitions/Details"},externalId:{type:"string"},id:{$ref:"#/definitions/SpaceId"},kind:{type:"string"},metadata:{$ref:"#/definitions/Metadata"},tags:{description:"A list of tags that may apply to categorize the space, e.g. Void",items:{type:"string"},type:"array"}},required:["id","externalId","destinationNodes"],type:"object"},StyleCollection:{additionalProperties:{anyOf:[{$ref:"#/definitions/PolygonStyle"},{$ref:"#/definitions/LineStringStyle"},{$ref:"#/definitions/PointStyle"},{not:{}}]},description:"A map of layer styles, where keys represent the group IDs of each style.",type:"object"},TextAreaAlignment:{enum:["near","center"],type:"string"},TextAreaFeatureCollection:{$ref:"#/definitions/FeatureCollection%3CPoint%2CTextAreaProperties%3E",description:"A collection of text areas to be displayed on a map. They are either attached to a polygon or are floating in space."},TextAreaProperties:{anyOf:[{$ref:"#/definitions/AnchoredTextAreaProperties"},{$ref:"#/definitions/FloatingTextAreaProperties"}]},Texture:{additionalProperties:!1,description:"A reference to an image texture and how it should be applied to a Component.",properties:{path:{description:"The path to this asset, relative to the MVF's images folder.",minLength:1,type:"string"},repeat:{$ref:"#/definitions/TextureRepeat"}},required:["path"],type:"object"},TextureRepeat:{additionalProperties:!1,description:"How a texture should be placed on a Component.",properties:{u:{type:"number"},v:{type:"number"}},required:["u","v"],type:"object"},TilesetCollection:{additionalProperties:!1,description:"Collection of tileset styles",properties:{default:{$ref:"#/definitions/TilesetStyle",description:"Default tileset style that should be used"},others:{description:"Additional tileset styles that can be used",items:{$ref:"#/definitions/TilesetStyle"},type:"array"}},required:["default"],type:"object"},TilesetStyle:{additionalProperties:!1,description:"A tileset style definition",properties:{key:{description:"Unique identifier for this tileset style",minLength:1,type:"string"},name:{description:"Display name for this tileset style",minLength:1,type:"string"},url:{description:"URL to the tileset style definition. This should be a JSON file matching the MapLibre style specification.",format:"uri",type:"string"}},required:["key","name","url"],type:"object"},Time:{description:"A time in the format of HH:MM:SS",pattern:"^[0-2][0-9]:[0-6][0-9](:[0-6][0-9])?$",type:"string"},Vector3:{description:"A three-number tuple.",items:{type:"number"},maxItems:3,minItems:3,type:"array"},WindowCollection:{additionalProperties:!1,properties:{features:{items:{additionalProperties:!1,properties:{geometry:{$ref:"#/definitions/LineString"},properties:{$ref:"#/definitions/WindowProperties"},type:{$ref:"#/definitions/FeatureType"}},required:["type","geometry","properties"],type:"object"},type:"array"},type:{$ref:"#/definitions/FeatureCollectionType"}},required:["type","features"],type:"object"},WindowId:{pattern:"^w_[A-Za-z0-9_-]{8,}$",type:"string"},WindowProperties:{additionalProperties:!1,properties:{id:{$ref:"#/definitions/WindowId"}},required:["id"],type:"object"}}};var U6=MO.default.default(new CO.default.default).compile(Su(RO));c();c();c();c();c();c();c();c();c();c();c();c();c();c();c();c();c();c();c();c();c();c();c();var Oe={};To(Oe,{HasPropertyKey:()=>SC,IsArray:()=>Xt,IsAsyncIterator:()=>dm,IsBigInt:()=>ec,IsBoolean:()=>Vo,IsDate:()=>Ei,IsFunction:()=>mm,IsIterator:()=>ym,IsNull:()=>hm,IsNumber:()=>ln,IsObject:()=>Xe,IsRegExp:()=>tc,IsString:()=>ot,IsSymbol:()=>gm,IsUint8Array:()=>so,IsUndefined:()=>yt});c();function SC(e,t){return t in e}o(SC,"HasPropertyKey");function dm(e){return Xe(e)&&!Xt(e)&&!so(e)&&Symbol.asyncIterator in e}o(dm,"IsAsyncIterator");function Xt(e){return Array.isArray(e)}o(Xt,"IsArray");function ec(e){return typeof e=="bigint"}o(ec,"IsBigInt");function Vo(e){return typeof e=="boolean"}o(Vo,"IsBoolean");function Ei(e){return e instanceof globalThis.Date}o(Ei,"IsDate");function mm(e){return typeof e=="function"}o(mm,"IsFunction");function ym(e){return Xe(e)&&!Xt(e)&&!so(e)&&Symbol.iterator in e}o(ym,"IsIterator");function hm(e){return e===null}o(hm,"IsNull");function ln(e){return typeof e=="number"}o(ln,"IsNumber");function Xe(e){return typeof e=="object"&&e!==null}o(Xe,"IsObject");function tc(e){return e instanceof globalThis.RegExp}o(tc,"IsRegExp");function ot(e){return typeof e=="string"}o(ot,"IsString");function gm(e){return typeof e=="symbol"}o(gm,"IsSymbol");function so(e){return e instanceof globalThis.Uint8Array}o(so,"IsUint8Array");function yt(e){return e===void 0}o(yt,"IsUndefined");function PC(e){return e.map(t=>Pu(t))}o(PC,"ArrayType");function EC(e){return new Date(e.getTime())}o(EC,"DateType");function TC(e){return new Uint8Array(e)}o(TC,"Uint8ArrayType");function kC(e){return new RegExp(e.source,e.flags)}o(kC,"RegExpType");function FC(e){let t={};for(let r of Object.getOwnPropertyNames(e))t[r]=Pu(e[r]);for(let r of Object.getOwnPropertySymbols(e))t[r]=Pu(e[r]);return t}o(FC,"ObjectType");function Pu(e){return Xt(e)?PC(e):Ei(e)?EC(e):so(e)?TC(e):tc(e)?kC(e):Xe(e)?FC(e):e}o(Pu,"Visit");function lt(e){return Pu(e)}o(lt,"Clone");function LO(e){return e.map(t=>rc(t))}o(LO,"CloneRest");function rc(e,t){return t===void 0?lt(e):lt(g(g({},t),e))}o(rc,"CloneType");c();c();c();function Eu(e){return ae(e)&&Symbol.asyncIterator in e}o(Eu,"IsAsyncIterator");function Tu(e){return ae(e)&&Symbol.iterator in e}o(Tu,"IsIterator");function xm(e){return ae(e)&&(Object.getPrototypeOf(e)===Object.prototype||Object.getPrototypeOf(e)===null)}o(xm,"IsStandardObject");function ku(e){return e instanceof Promise}o(ku,"IsPromise");function ur(e){return e instanceof Date&&Number.isFinite(e.getTime())}o(ur,"IsDate");function UO(e){return e instanceof globalThis.Map}o(UO,"IsMap");function DO(e){return e instanceof globalThis.Set}o(DO,"IsSet");function zr(e){return ArrayBuffer.isView(e)}o(zr,"IsTypedArray");function Ps(e){return e instanceof globalThis.Uint8Array}o(Ps,"IsUint8Array");function ne(e,t){return t in e}o(ne,"HasPropertyKey");function ae(e){return e!==null&&typeof e=="object"}o(ae,"IsObject");function se(e){return Array.isArray(e)&&!ArrayBuffer.isView(e)}o(se,"IsArray");function ht(e){return e===void 0}o(ht,"IsUndefined");function ao(e){return e===null}o(ao,"IsNull");function Fn(e){return typeof e=="boolean"}o(Fn,"IsBoolean");function X(e){return typeof e=="number"}o(X,"IsNumber");function Fu(e){return Number.isInteger(e)}o(Fu,"IsInteger");function Dt(e){return typeof e=="bigint"}o(Dt,"IsBigInt");function _e(e){return typeof e=="string"}o(_e,"IsString");function Bo(e){return typeof e=="function"}o(Bo,"IsFunction");function co(e){return typeof e=="symbol"}o(co,"IsSymbol");function qt(e){return Dt(e)||Fn(e)||ao(e)||X(e)||_e(e)||co(e)||ht(e)}o(qt,"IsValueType");var Ge;(function(e){e.InstanceMode="default",e.ExactOptionalPropertyTypes=!1,e.AllowArrayObject=!1,e.AllowNaN=!1,e.AllowNullVoid=!1;function t(a,u){return e.ExactOptionalPropertyTypes?u in a:a[u]!==void 0}o(t,"IsExactOptionalProperty"),e.IsExactOptionalProperty=t;function r(a){let u=ae(a);return e.AllowArrayObject?u:u&&!se(a)}o(r,"IsObjectLike"),e.IsObjectLike=r;function n(a){return r(a)&&!(a instanceof Date)&&!(a instanceof Uint8Array)}o(n,"IsRecordLike"),e.IsRecordLike=n;function i(a){return e.AllowNaN?X(a):Number.isFinite(a)}o(i,"IsNumberLike"),e.IsNumberLike=i;function s(a){let u=ht(a);return e.AllowNullVoid?u||a===null:u}o(s,"IsVoidLike"),e.IsVoidLike=s})(Ge||(Ge={}));c();function AC(e){return globalThis.Object.freeze(e).map(t=>nc(t))}o(AC,"ImmutableArray");function jC(e){let t={};for(let r of Object.getOwnPropertyNames(e))t[r]=nc(e[r]);for(let r of Object.getOwnPropertySymbols(e))t[r]=nc(e[r]);return globalThis.Object.freeze(t)}o(jC,"ImmutableObject");function nc(e){return Xt(e)?AC(e):Ei(e)?e:so(e)?e:tc(e)?e:Xe(e)?jC(e):e}o(nc,"Immutable");function T(e,t){let r=t!==void 0?g(g({},t),e):e;switch(Ge.InstanceMode){case"freeze":return nc(r);case"clone":return lt(r);default:return r}}o(T,"CreateType");c();var Im=class Im extends Error{constructor(t){super(t)}};o(Im,"TypeBoxError");var re=Im;c();c();c();var pt=Symbol.for("TypeBox.Transform"),uo=Symbol.for("TypeBox.Readonly"),fr=Symbol.for("TypeBox.Optional"),Vr=Symbol.for("TypeBox.Hint"),v=Symbol.for("TypeBox.Kind");function qO(e){return Xe(e)&&e[uo]==="Readonly"}o(qO,"IsReadonly");function An(e){return Xe(e)&&e[fr]==="Optional"}o(An,"IsOptional");function bm(e){return Fe(e,"Any")}o(bm,"IsAny");function fo(e){return Fe(e,"Array")}o(fo,"IsArray");function oc(e){return Fe(e,"AsyncIterator")}o(oc,"IsAsyncIterator");function wm(e){return Fe(e,"BigInt")}o(wm,"IsBigInt");function $m(e){return Fe(e,"Boolean")}o($m,"IsBoolean");function ic(e){return Fe(e,"Constructor")}o(ic,"IsConstructor");function NC(e){return Fe(e,"Date")}o(NC,"IsDate");function sc(e){return Fe(e,"Function")}o(sc,"IsFunction");function Ti(e){return Fe(e,"Integer")}o(Ti,"IsInteger");function $t(e){return Fe(e,"Intersect")}o($t,"IsIntersect");function ac(e){return Fe(e,"Iterator")}o(ac,"IsIterator");function Fe(e,t){return Xe(e)&&v in e&&e[v]===t}o(Fe,"IsKindOf");function lo(e){return Fe(e,"Literal")}o(lo,"IsLiteral");function Sr(e){return Fe(e,"MappedKey")}o(Sr,"IsMappedKey");function dt(e){return Fe(e,"MappedResult")}o(dt,"IsMappedResult");function Go(e){return Fe(e,"Never")}o(Go,"IsNever");function RC(e){return Fe(e,"Not")}o(RC,"IsNot");function CC(e){return Fe(e,"Null")}o(CC,"IsNull");function ki(e){return Fe(e,"Number")}o(ki,"IsNumber");function Et(e){return Fe(e,"Object")}o(Et,"IsObject");function Fi(e){return Fe(e,"Promise")}o(Fi,"IsPromise");function vm(e){return Fe(e,"Record")}o(vm,"IsRecord");function Om(e){return Fe(e,"Ref")}o(Om,"IsRef");function _m(e){return Fe(e,"RegExp")}o(_m,"IsRegExp");function cc(e){return Fe(e,"String")}o(cc,"IsString");function MC(e){return Fe(e,"Symbol")}o(MC,"IsSymbol");function Pr(e){return Fe(e,"TemplateLiteral")}o(Pr,"IsTemplateLiteral");function LC(e){return Fe(e,"This")}o(LC,"IsThis");function Es(e){return Xe(e)&&pt in e}o(Es,"IsTransform");function pn(e){return Fe(e,"Tuple")}o(pn,"IsTuple");function UC(e){return Fe(e,"Undefined")}o(UC,"IsUndefined");function Ue(e){return Fe(e,"Union")}o(Ue,"IsUnion");function DC(e){return Fe(e,"Uint8Array")}o(DC,"IsUint8Array");function qC(e){return Fe(e,"Unknown")}o(qC,"IsUnknown");function zC(e){return Fe(e,"Unsafe")}o(zC,"IsUnsafe");function VC(e){return Fe(e,"Void")}o(VC,"IsVoid");function Ko(e){return Xe(e)&&v in e&&ot(e[v])}o(Ko,"IsKind");function dn(e){return bm(e)||fo(e)||$m(e)||wm(e)||oc(e)||ic(e)||NC(e)||sc(e)||Ti(e)||$t(e)||ac(e)||lo(e)||Sr(e)||dt(e)||Go(e)||RC(e)||CC(e)||ki(e)||Et(e)||Fi(e)||vm(e)||Om(e)||_m(e)||cc(e)||MC(e)||Pr(e)||LC(e)||pn(e)||UC(e)||Ue(e)||DC(e)||qC(e)||zC(e)||VC(e)||Ko(e)}o(dn,"IsSchema");var x={};To(x,{IsAny:()=>GO,IsArray:()=>KO,IsAsyncIterator:()=>WO,IsBigInt:()=>HO,IsBoolean:()=>JO,IsConstructor:()=>ZO,IsDate:()=>YO,IsFunction:()=>XO,IsInteger:()=>QO,IsIntersect:()=>e_,IsIterator:()=>t_,IsKind:()=>__,IsKindOf:()=>Pe,IsLiteral:()=>fc,IsLiteralBoolean:()=>JC,IsLiteralNumber:()=>n_,IsLiteralString:()=>r_,IsLiteralValue:()=>o_,IsMappedKey:()=>i_,IsMappedResult:()=>s_,IsNever:()=>a_,IsNot:()=>c_,IsNull:()=>u_,IsNumber:()=>f_,IsObject:()=>l_,IsOptional:()=>HC,IsPromise:()=>p_,IsProperties:()=>Tm,IsReadonly:()=>WC,IsRecord:()=>d_,IsRecursive:()=>ZC,IsRef:()=>m_,IsRegExp:()=>y_,IsSchema:()=>Se,IsString:()=>h_,IsSymbol:()=>g_,IsTemplateLiteral:()=>x_,IsThis:()=>I_,IsTransform:()=>it,IsTuple:()=>b_,IsUint8Array:()=>w_,IsUndefined:()=>Ts,IsUnion:()=>km,IsUnionLiteral:()=>YC,IsUnknown:()=>$_,IsUnsafe:()=>v_,IsVoid:()=>O_,TypeGuardUnknownTypeError:()=>Sm});c();var Fm=class Fm extends re{};o(Fm,"TypeGuardUnknownTypeError");var Sm=Fm,BC=["Any","Array","AsyncIterator","BigInt","Boolean","Constructor","Date","Enum","Function","Integer","Intersect","Iterator","Literal","MappedKey","MappedResult","Not","Null","Number","Object","Promise","Record","Ref","RegExp","String","Symbol","TemplateLiteral","This","Tuple","Undefined","Union","Uint8Array","Unknown","Void"];function zO(e){try{return new RegExp(e),!0}catch(t){return!1}}o(zO,"IsPattern");function Pm(e){if(!ot(e))return!1;for(let t=0;t<e.length;t++){let r=e.charCodeAt(t);if(r>=7&&r<=13||r===27||r===127)return!1}return!0}o(Pm,"IsControlCharacterFree");function VO(e){return Em(e)||Se(e)}o(VO,"IsAdditionalProperties");function uc(e){return yt(e)||ec(e)}o(uc,"IsOptionalBigInt");function nt(e){return yt(e)||ln(e)}o(nt,"IsOptionalNumber");function Em(e){return yt(e)||Vo(e)}o(Em,"IsOptionalBoolean");function We(e){return yt(e)||ot(e)}o(We,"IsOptionalString");function GC(e){return yt(e)||ot(e)&&Pm(e)&&zO(e)}o(GC,"IsOptionalPattern");function KC(e){return yt(e)||ot(e)&&Pm(e)}o(KC,"IsOptionalFormat");function BO(e){return yt(e)||Se(e)}o(BO,"IsOptionalSchema");function WC(e){return Xe(e)&&e[uo]==="Readonly"}o(WC,"IsReadonly");function HC(e){return Xe(e)&&e[fr]==="Optional"}o(HC,"IsOptional");function GO(e){return Pe(e,"Any")&&We(e.$id)}o(GO,"IsAny");function KO(e){return Pe(e,"Array")&&e.type==="array"&&We(e.$id)&&Se(e.items)&&nt(e.minItems)&&nt(e.maxItems)&&Em(e.uniqueItems)&&BO(e.contains)&&nt(e.minContains)&&nt(e.maxContains)}o(KO,"IsArray");function WO(e){return Pe(e,"AsyncIterator")&&e.type==="AsyncIterator"&&We(e.$id)&&Se(e.items)}o(WO,"IsAsyncIterator");function HO(e){return Pe(e,"BigInt")&&e.type==="bigint"&&We(e.$id)&&uc(e.exclusiveMaximum)&&uc(e.exclusiveMinimum)&&uc(e.maximum)&&uc(e.minimum)&&uc(e.multipleOf)}o(HO,"IsBigInt");function JO(e){return Pe(e,"Boolean")&&e.type==="boolean"&&We(e.$id)}o(JO,"IsBoolean");function ZO(e){return Pe(e,"Constructor")&&e.type==="Constructor"&&We(e.$id)&&Xt(e.parameters)&&e.parameters.every(t=>Se(t))&&Se(e.returns)}o(ZO,"IsConstructor");function YO(e){return Pe(e,"Date")&&e.type==="Date"&&We(e.$id)&&nt(e.exclusiveMaximumTimestamp)&&nt(e.exclusiveMinimumTimestamp)&&nt(e.maximumTimestamp)&&nt(e.minimumTimestamp)&&nt(e.multipleOfTimestamp)}o(YO,"IsDate");function XO(e){return Pe(e,"Function")&&e.type==="Function"&&We(e.$id)&&Xt(e.parameters)&&e.parameters.every(t=>Se(t))&&Se(e.returns)}o(XO,"IsFunction");function QO(e){return Pe(e,"Integer")&&e.type==="integer"&&We(e.$id)&&nt(e.exclusiveMaximum)&&nt(e.exclusiveMinimum)&&nt(e.maximum)&&nt(e.minimum)&&nt(e.multipleOf)}o(QO,"IsInteger");function Tm(e){return Xe(e)&&Object.entries(e).every(([t,r])=>Pm(t)&&Se(r))}o(Tm,"IsProperties");function e_(e){return Pe(e,"Intersect")&&!(ot(e.type)&&e.type!=="object")&&Xt(e.allOf)&&e.allOf.every(t=>Se(t)&&!it(t))&&We(e.type)&&(Em(e.unevaluatedProperties)||BO(e.unevaluatedProperties))&&We(e.$id)}o(e_,"IsIntersect");function t_(e){return Pe(e,"Iterator")&&e.type==="Iterator"&&We(e.$id)&&Se(e.items)}o(t_,"IsIterator");function Pe(e,t){return Xe(e)&&v in e&&e[v]===t}o(Pe,"IsKindOf");function r_(e){return fc(e)&&ot(e.const)}o(r_,"IsLiteralString");function n_(e){return fc(e)&&ln(e.const)}o(n_,"IsLiteralNumber");function JC(e){return fc(e)&&Vo(e.const)}o(JC,"IsLiteralBoolean");function fc(e){return Pe(e,"Literal")&&We(e.$id)&&o_(e.const)}o(fc,"IsLiteral");function o_(e){return Vo(e)||ln(e)||ot(e)}o(o_,"IsLiteralValue");function i_(e){return Pe(e,"MappedKey")&&Xt(e.keys)&&e.keys.every(t=>ln(t)||ot(t))}o(i_,"IsMappedKey");function s_(e){return Pe(e,"MappedResult")&&Tm(e.properties)}o(s_,"IsMappedResult");function a_(e){return Pe(e,"Never")&&Xe(e.not)&&Object.getOwnPropertyNames(e.not).length===0}o(a_,"IsNever");function c_(e){return Pe(e,"Not")&&Se(e.not)}o(c_,"IsNot");function u_(e){return Pe(e,"Null")&&e.type==="null"&&We(e.$id)}o(u_,"IsNull");function f_(e){return Pe(e,"Number")&&e.type==="number"&&We(e.$id)&&nt(e.exclusiveMaximum)&&nt(e.exclusiveMinimum)&&nt(e.maximum)&&nt(e.minimum)&&nt(e.multipleOf)}o(f_,"IsNumber");function l_(e){return Pe(e,"Object")&&e.type==="object"&&We(e.$id)&&Tm(e.properties)&&VO(e.additionalProperties)&&nt(e.minProperties)&&nt(e.maxProperties)}o(l_,"IsObject");function p_(e){return Pe(e,"Promise")&&e.type==="Promise"&&We(e.$id)&&Se(e.item)}o(p_,"IsPromise");function d_(e){return Pe(e,"Record")&&e.type==="object"&&We(e.$id)&&VO(e.additionalProperties)&&Xe(e.patternProperties)&&(t=>{let r=Object.getOwnPropertyNames(t.patternProperties);return r.length===1&&zO(r[0])&&Xe(t.patternProperties)&&Se(t.patternProperties[r[0]])})(e)}o(d_,"IsRecord");function ZC(e){return Xe(e)&&Vr in e&&e[Vr]==="Recursive"}o(ZC,"IsRecursive");function m_(e){return Pe(e,"Ref")&&We(e.$id)&&ot(e.$ref)}o(m_,"IsRef");function y_(e){return Pe(e,"RegExp")&&We(e.$id)&&ot(e.source)&&ot(e.flags)&&nt(e.maxLength)&&nt(e.minLength)}o(y_,"IsRegExp");function h_(e){return Pe(e,"String")&&e.type==="string"&&We(e.$id)&&nt(e.minLength)&&nt(e.maxLength)&&GC(e.pattern)&&KC(e.format)}o(h_,"IsString");function g_(e){return Pe(e,"Symbol")&&e.type==="symbol"&&We(e.$id)}o(g_,"IsSymbol");function x_(e){return Pe(e,"TemplateLiteral")&&e.type==="string"&&ot(e.pattern)&&e.pattern[0]==="^"&&e.pattern[e.pattern.length-1]==="$"}o(x_,"IsTemplateLiteral");function I_(e){return Pe(e,"This")&&We(e.$id)&&ot(e.$ref)}o(I_,"IsThis");function it(e){return Xe(e)&&pt in e}o(it,"IsTransform");function b_(e){return Pe(e,"Tuple")&&e.type==="array"&&We(e.$id)&&ln(e.minItems)&&ln(e.maxItems)&&e.minItems===e.maxItems&&(yt(e.items)&&yt(e.additionalItems)&&e.minItems===0||Xt(e.items)&&e.items.every(t=>Se(t)))}o(b_,"IsTuple");function Ts(e){return Pe(e,"Undefined")&&e.type==="undefined"&&We(e.$id)}o(Ts,"IsUndefined");function YC(e){return km(e)&&e.anyOf.every(t=>r_(t)||n_(t))}o(YC,"IsUnionLiteral");function km(e){return Pe(e,"Union")&&We(e.$id)&&Xe(e)&&Xt(e.anyOf)&&e.anyOf.every(t=>Se(t))}o(km,"IsUnion");function w_(e){return Pe(e,"Uint8Array")&&e.type==="Uint8Array"&&We(e.$id)&&nt(e.minByteLength)&&nt(e.maxByteLength)}o(w_,"IsUint8Array");function $_(e){return Pe(e,"Unknown")&&We(e.$id)}o($_,"IsUnknown");function v_(e){return Pe(e,"Unsafe")}o(v_,"IsUnsafe");function O_(e){return Pe(e,"Void")&&e.type==="void"&&We(e.$id)}o(O_,"IsVoid");function __(e){return Xe(e)&&v in e&&ot(e[v])&&!BC.includes(e[v])}o(__,"IsKind");function Se(e){return Xe(e)&&(GO(e)||KO(e)||JO(e)||HO(e)||WO(e)||ZO(e)||YO(e)||XO(e)||QO(e)||e_(e)||t_(e)||fc(e)||i_(e)||s_(e)||a_(e)||c_(e)||u_(e)||f_(e)||l_(e)||p_(e)||d_(e)||m_(e)||y_(e)||h_(e)||g_(e)||x_(e)||I_(e)||b_(e)||Ts(e)||km(e)||w_(e)||$_(e)||v_(e)||O_(e)||__(e))}o(Se,"IsSchema");c();var Am="(true|false)",lc="(0|[1-9][0-9]*)",jm="(.*)",XC="(?!.*)",cH="^".concat(Am,"$"),po="^".concat(lc,"$"),mo="^".concat(jm,"$"),S_="^".concat(XC,"$");c();var lr={};To(lr,{Clear:()=>eM,Delete:()=>tM,Entries:()=>QC,Get:()=>oM,Has:()=>rM,Set:()=>nM});c();var ks=new Map;function QC(){return new Map(ks)}o(QC,"Entries");function eM(){return ks.clear()}o(eM,"Clear");function tM(e){return ks.delete(e)}o(tM,"Delete");function rM(e){return ks.has(e)}o(rM,"Has");function nM(e,t){ks.set(e,t)}o(nM,"Set");function oM(e){return ks.get(e)}o(oM,"Get");var Tt={};To(Tt,{Clear:()=>sM,Delete:()=>aM,Entries:()=>iM,Get:()=>fM,Has:()=>cM,Set:()=>uM});c();var Fs=new Map;function iM(){return new Map(Fs)}o(iM,"Entries");function sM(){return Fs.clear()}o(sM,"Clear");function aM(e){return Fs.delete(e)}o(aM,"Delete");function cM(e){return Fs.has(e)}o(cM,"Has");function uM(e,t){Fs.set(e,t)}o(uM,"Set");function fM(e){return Fs.get(e)}o(fM,"Get");c();function P_(e,t){return e.includes(t)}o(P_,"SetIncludes");function E_(e){return[...new Set(e)]}o(E_,"SetDistinct");function lM(e,t){return e.filter(r=>t.includes(r))}o(lM,"SetIntersect");function pM(e,t){return e.reduce((r,n)=>lM(r,n),t)}o(pM,"SetIntersectManyResolve");function T_(e){return e.length===1?e[0]:e.length>1?pM(e.slice(1),e[0]):[]}o(T_,"SetIntersectMany");function k_(e){let t=[];for(let r of e)t.push(...r);return t}o(k_,"SetUnionMany");c();function Wo(e){return T({[v]:"Any"},e)}o(Wo,"Any");c();function Au(e,t){return T({[v]:"Array",type:"array",items:e},t)}o(Au,"Array");c();function ju(e,t){return T({[v]:"AsyncIterator",type:"AsyncIterator",items:e},t)}o(ju,"AsyncIterator");c();c();c();function dM(e,t){let i=e,{[t]:r}=i;return ya(i,[Ac(t)])}o(dM,"DiscardKey");function It(e,t){return t.reduce((r,n)=>dM(r,n),e)}o(It,"Discard");c();function He(e){return T({[v]:"Never",not:{}},e)}o(He,"Never");c();c();function Ae(e){return T({[v]:"MappedResult",properties:e})}o(Ae,"MappedResult");c();c();function Nu(e,t,r){return T({[v]:"Constructor",type:"Constructor",parameters:e,returns:t},r)}o(Nu,"Constructor");c();function Ho(e,t,r){return T({[v]:"Function",type:"Function",parameters:e,returns:t},r)}o(Ho,"Function");c();c();c();c();function pc(e,t){return T({[v]:"Union",anyOf:e},t)}o(pc,"UnionCreate");function mM(e){return e.some(t=>An(t))}o(mM,"IsUnionOptional");function F_(e){return e.map(t=>An(t)?yM(t):t)}o(F_,"RemoveOptionalFromRest");function yM(e){return It(e,[fr])}o(yM,"RemoveOptionalFromType");function hM(e,t){return mM(e)?br(pc(F_(e),t)):pc(F_(e),t)}o(hM,"ResolveUnion");function jn(e,t){return e.length===0?He(t):e.length===1?T(e[0],t):hM(e,t)}o(jn,"UnionEvaluated");c();function Je(e,t){return e.length===0?He(t):e.length===1?T(e[0],t):pc(e,t)}o(Je,"Union");c();c();c();var Rm=class Rm extends re{};o(Rm,"TemplateLiteralParserError");var Ru=Rm;function gM(e){return e.replace(/\\\$/g,"$").replace(/\\\*/g,"*").replace(/\\\^/g,"^").replace(/\\\|/g,"|").replace(/\\\(/g,"(").replace(/\\\)/g,")")}o(gM,"Unescape");function Nm(e,t,r){return e[t]===r&&e.charCodeAt(t-1)!==92}o(Nm,"IsNonEscaped");function yo(e,t){return Nm(e,t,"(")}o(yo,"IsOpenParen");function dc(e,t){return Nm(e,t,")")}o(dc,"IsCloseParen");function A_(e,t){return Nm(e,t,"|")}o(A_,"IsSeparator");function xM(e){if(!(yo(e,0)&&dc(e,e.length-1)))return!1;let t=0;for(let r=0;r<e.length;r++)if(yo(e,r)&&(t+=1),dc(e,r)&&(t-=1),t===0&&r!==e.length-1)return!1;return!0}o(xM,"IsGroup");function IM(e){return e.slice(1,e.length-1)}o(IM,"InGroup");function bM(e){let t=0;for(let r=0;r<e.length;r++)if(yo(e,r)&&(t+=1),dc(e,r)&&(t-=1),A_(e,r)&&t===0)return!0;return!1}o(bM,"IsPrecedenceOr");function wM(e){for(let t=0;t<e.length;t++)if(yo(e,t))return!0;return!1}o(wM,"IsPrecedenceAnd");function $M(e){let[t,r]=[0,0],n=[];for(let s=0;s<e.length;s++)if(yo(e,s)&&(t+=1),dc(e,s)&&(t-=1),A_(e,s)&&t===0){let a=e.slice(r,s);a.length>0&&n.push(As(a)),r=s+1}let i=e.slice(r);return i.length>0&&n.push(As(i)),n.length===0?{type:"const",const:""}:n.length===1?n[0]:{type:"or",expr:n}}o($M,"Or");function vM(e){function t(i,s){if(!yo(i,s))throw new Ru("TemplateLiteralParser: Index must point to open parens");let a=0;for(let u=s;u<i.length;u++)if(yo(i,u)&&(a+=1),dc(i,u)&&(a-=1),a===0)return[s,u];throw new Ru("TemplateLiteralParser: Unclosed group parens in expression")}o(t,"Group");function r(i,s){for(let a=s;a<i.length;a++)if(yo(i,a))return[s,a];return[s,i.length]}o(r,"Range");let n=[];for(let i=0;i<e.length;i++)if(yo(e,i)){let[s,a]=t(e,i),u=e.slice(s,a+1);n.push(As(u)),i=a}else{let[s,a]=r(e,i),u=e.slice(s,a);u.length>0&&n.push(As(u)),i=a-1}return n.length===0?{type:"const",const:""}:n.length===1?n[0]:{type:"and",expr:n}}o(vM,"And");function As(e){return xM(e)?As(IM(e)):bM(e)?$M(e):wM(e)?vM(e):{type:"const",const:gM(e)}}o(As,"TemplateLiteralParse");function js(e){return As(e.slice(1,e.length-1))}o(js,"TemplateLiteralParseExact");var Mm=class Mm extends re{};o(Mm,"TemplateLiteralFiniteError");var Cm=Mm;function OM(e){return e.type==="or"&&e.expr.length===2&&e.expr[0].type==="const"&&e.expr[0].const==="0"&&e.expr[1].type==="const"&&e.expr[1].const==="[1-9][0-9]*"}o(OM,"IsNumberExpression");function _M(e){return e.type==="or"&&e.expr.length===2&&e.expr[0].type==="const"&&e.expr[0].const==="true"&&e.expr[1].type==="const"&&e.expr[1].const==="false"}o(_M,"IsBooleanExpression");function SM(e){return e.type==="const"&&e.const===".*"}o(SM,"IsStringExpression");function Ai(e){return OM(e)||SM(e)?!1:_M(e)?!0:e.type==="and"?e.expr.every(t=>Ai(t)):e.type==="or"?e.expr.every(t=>Ai(t)):e.type==="const"?!0:(()=>{throw new Cm("Unknown expression type")})()}o(Ai,"IsTemplateLiteralExpressionFinite");function Cu(e){let t=js(e.pattern);return Ai(t)}o(Cu,"IsTemplateLiteralFinite");c();var Um=class Um extends re{};o(Um,"TemplateLiteralGenerateError");var Lm=Um;function*j_(e){if(e.length===1)return yield*A(e[0]);for(let t of e[0])for(let r of j_(e.slice(1)))yield"".concat(t).concat(r)}o(j_,"GenerateReduce");function*PM(e){return yield*A(j_(e.expr.map(t=>[...mc(t)])))}o(PM,"GenerateAnd");function*EM(e){for(let t of e.expr)yield*A(mc(t))}o(EM,"GenerateOr");function*TM(e){return yield e.const}o(TM,"GenerateConst");function*mc(e){return e.type==="and"?yield*A(PM(e)):e.type==="or"?yield*A(EM(e)):e.type==="const"?yield*A(TM(e)):(()=>{throw new Lm("Unknown expression")})()}o(mc,"TemplateLiteralExpressionGenerate");function Ns(e){let t=js(e.pattern);return Ai(t)?[...mc(t)]:[]}o(Ns,"TemplateLiteralGenerate");c();c();function ze(e,t){return T({[v]:"Literal",const:e,type:typeof e},t)}o(ze,"Literal");c();function Mu(e){return T({[v]:"Boolean",type:"boolean"},e)}o(Mu,"Boolean");c();function Rs(e){return T({[v]:"BigInt",type:"bigint"},e)}o(Rs,"BigInt");c();function Nn(e){return T({[v]:"Number",type:"number"},e)}o(Nn,"Number");c();function Br(e){return T({[v]:"String",type:"string"},e)}o(Br,"String");function*kM(e){let t=e.trim().replace(/"|'/g,"");return t==="boolean"?yield Mu():t==="number"?yield Nn():t==="bigint"?yield Rs():t==="string"?yield Br():yield(()=>{let r=t.split("|").map(n=>ze(n.trim()));return r.length===0?He():r.length===1?r[0]:jn(r)})()}o(kM,"FromUnion");function*FM(e){if(e[1]!=="{"){let t=ze("$"),r=Dm(e.slice(1));return yield*A([t,...r])}for(let t=2;t<e.length;t++)if(e[t]==="}"){let r=kM(e.slice(2,t)),n=Dm(e.slice(t+1));return yield*A([...r,...n])}yield ze(e)}o(FM,"FromTerminal");function*Dm(e){for(let t=0;t<e.length;t++)if(e[t]==="$"){let r=ze(e.slice(0,t)),n=FM(e.slice(t));return yield*A([r,...n])}yield ze(e)}o(Dm,"FromSyntax");function N_(e){return[...Dm(e)]}o(N_,"TemplateLiteralSyntax");c();var Vm=class Vm extends re{};o(Vm,"TemplateLiteralPatternError");var qm=Vm;function AM(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}o(AM,"Escape");function R_(e,t){return Pr(e)?e.pattern.slice(1,e.pattern.length-1):Ue(e)?"(".concat(e.anyOf.map(r=>R_(r,t)).join("|"),")"):ki(e)?"".concat(t).concat(lc):Ti(e)?"".concat(t).concat(lc):wm(e)?"".concat(t).concat(lc):cc(e)?"".concat(t).concat(jm):lo(e)?"".concat(t).concat(AM(e.const.toString())):$m(e)?"".concat(t).concat(Am):(()=>{throw new qm("Unexpected Kind '".concat(e[v],"'"))})()}o(R_,"Visit");function zm(e){return"^".concat(e.map(t=>R_(t,"")).join(""),"$")}o(zm,"TemplateLiteralPattern");c();function ji(e){let r=Ns(e).map(n=>ze(n));return jn(r)}o(ji,"TemplateLiteralToUnion");c();function Lu(e,t){let r=ot(e)?zm(N_(e)):zm(e);return T({[v]:"TemplateLiteral",type:"string",pattern:r},t)}o(Lu,"TemplateLiteral");function jM(e){return Ns(e).map(r=>r.toString())}o(jM,"FromTemplateLiteral");function NM(e){let t=[];for(let r of e)t.push(...wr(r));return t}o(NM,"FromUnion");function RM(e){return[e.toString()]}o(RM,"FromLiteral");function wr(e){return[...new Set(Pr(e)?jM(e):Ue(e)?NM(e.anyOf):lo(e)?RM(e.const):ki(e)?["[number]"]:Ti(e)?["[number]"]:[])]}o(wr,"IndexPropertyKeys");c();function CM(e,t,r){let n={};for(let i of Object.getOwnPropertyNames(t))n[i]=Cs(e,wr(t[i]),r);return n}o(CM,"FromProperties");function MM(e,t,r){return CM(e,t.properties,r)}o(MM,"FromMappedResult");function C_(e,t,r){let n=MM(e,t,r);return Ae(n)}o(C_,"IndexFromMappedResult");function L_(e,t){return e.map(r=>U_(r,t))}o(L_,"FromRest");function LM(e){return e.filter(t=>!Go(t))}o(LM,"FromIntersectRest");function UM(e,t){return Uu(LM(L_(e,t)))}o(UM,"FromIntersect");function DM(e){return e.some(t=>Go(t))?[]:e}o(DM,"FromUnionRest");function qM(e,t){return jn(DM(L_(e,t)))}o(qM,"FromUnion");function zM(e,t){return t in e?e[t]:t==="[number]"?jn(e):He()}o(zM,"FromTuple");function VM(e,t){return t==="[number]"?e:He()}o(VM,"FromArray");function BM(e,t){return t in e?e[t]:He()}o(BM,"FromProperty");function U_(e,t){var r;return $t(e)?UM(e.allOf,t):Ue(e)?qM(e.anyOf,t):pn(e)?zM((r=e.items)!=null?r:[],t):fo(e)?VM(e.items,t):Et(e)?BM(e.properties,t):He()}o(U_,"IndexFromPropertyKey");function yc(e,t){return t.map(r=>U_(e,r))}o(yc,"IndexFromPropertyKeys");function M_(e,t){return jn(yc(e,t))}o(M_,"FromSchema");function Cs(e,t,r){return dt(t)?C_(e,t,r):Sr(t)?D_(e,t,r):T(dn(t)?M_(e,wr(t)):M_(e,t),r)}o(Cs,"Index");function GM(e,t,r){return{[t]:Cs(e,[t],lt(r))}}o(GM,"MappedIndexPropertyKey");function KM(e,t,r){return t.reduce((n,i)=>g(g({},n),GM(e,i,r)),{})}o(KM,"MappedIndexPropertyKeys");function WM(e,t,r){return KM(e,t.keys,r)}o(WM,"MappedIndexProperties");function D_(e,t,r){let n=WM(e,t,r);return Ae(n)}o(D_,"IndexFromMappedKey");c();function Du(e,t){return T({[v]:"Iterator",type:"Iterator",items:e},t)}o(Du,"Iterator");c();function HM(e){let t=[];for(let r in e)An(e[r])||t.push(r);return t}o(HM,"RequiredKeys");function JM(e,t){let r=HM(e),n=r.length>0?{[v]:"Object",type:"object",properties:e,required:r}:{[v]:"Object",type:"object",properties:e};return T(n,t)}o(JM,"_Object");var Qe=JM;c();function qu(e,t){return T({[v]:"Promise",type:"Promise",item:e},t)}o(qu,"Promise");c();c();function ZM(e){return T(It(e,[uo]))}o(ZM,"RemoveReadonly");function YM(e){return T(F(g({},e),{[uo]:"Readonly"}))}o(YM,"AddReadonly");function XM(e,t){return t===!1?ZM(e):YM(e)}o(XM,"ReadonlyWithFlag");function Gr(e,t){let r=t!=null?t:!0;return dt(e)?q_(e,r):XM(e,r)}o(Gr,"Readonly");function QM(e,t){let r={};for(let n of globalThis.Object.getOwnPropertyNames(e))r[n]=Gr(e[n],t);return r}o(QM,"FromProperties");function eL(e,t){return QM(e.properties,t)}o(eL,"FromMappedResult");function q_(e,t){let r=eL(e,t);return Ae(r)}o(q_,"ReadonlyFromMappedResult");c();function Rn(e,t){return T(e.length>0?{[v]:"Tuple",type:"array",items:e,additionalItems:!1,minItems:e.length,maxItems:e.length}:{[v]:"Tuple",type:"array",minItems:e.length,maxItems:e.length},t)}o(Rn,"Tuple");function z_(e,t){return e in t?Kr(e,t[e]):Ae(t)}o(z_,"FromMappedResult");function tL(e){return{[e]:ze(e)}}o(tL,"MappedKeyToKnownMappedResultProperties");function rL(e){let t={};for(let r of e)t[r]=ze(r);return t}o(rL,"MappedKeyToUnknownMappedResultProperties");function nL(e,t){return P_(t,e)?tL(e):rL(t)}o(nL,"MappedKeyToMappedResultProperties");function oL(e,t){let r=nL(e,t);return z_(e,r)}o(oL,"FromMappedKey");function hc(e,t){return t.map(r=>Kr(e,r))}o(hc,"FromRest");function iL(e,t){let r={};for(let n of globalThis.Object.getOwnPropertyNames(t))r[n]=Kr(e,t[n]);return r}o(iL,"FromProperties");function Kr(e,t){var n;let r=g({},t);return An(t)?br(Kr(e,It(t,[fr]))):qO(t)?Gr(Kr(e,It(t,[uo]))):dt(t)?z_(e,t.properties):Sr(t)?oL(e,t.keys):ic(t)?Nu(hc(e,t.parameters),Kr(e,t.returns),r):sc(t)?Ho(hc(e,t.parameters),Kr(e,t.returns),r):oc(t)?ju(Kr(e,t.items),r):ac(t)?Du(Kr(e,t.items),r):$t(t)?$r(hc(e,t.allOf),r):Ue(t)?Je(hc(e,t.anyOf),r):pn(t)?Rn(hc(e,(n=t.items)!=null?n:[]),r):Et(t)?Qe(iL(e,t.properties),r):fo(t)?Au(Kr(e,t.items),r):Fi(t)?qu(Kr(e,t.item),r):t}o(Kr,"FromSchemaType");function sL(e,t){let r={};for(let n of e)r[n]=Kr(n,t);return r}o(sL,"MappedFunctionReturnType");function V_(e,t,r){let n=dn(e)?wr(e):e,i=t({[v]:"MappedKey",keys:n}),s=sL(n,i);return Qe(s,r)}o(V_,"Mapped");c();function aL(e){return T(It(e,[fr]))}o(aL,"RemoveOptional");function cL(e){return T(F(g({},e),{[fr]:"Optional"}))}o(cL,"AddOptional");function uL(e,t){return t===!1?aL(e):cL(e)}o(uL,"OptionalWithFlag");function br(e,t){let r=t!=null?t:!0;return dt(e)?B_(e,r):uL(e,r)}o(br,"Optional");function fL(e,t){let r={};for(let n of globalThis.Object.getOwnPropertyNames(e))r[n]=br(e[n],t);return r}o(fL,"FromProperties");function lL(e,t){return fL(e.properties,t)}o(lL,"FromMappedResult");function B_(e,t){let r=lL(e,t);return Ae(r)}o(B_,"OptionalFromMappedResult");c();function gc(e,t={}){let r=e.every(i=>Et(i)),n=dn(t.unevaluatedProperties)?{unevaluatedProperties:t.unevaluatedProperties}:{};return T(t.unevaluatedProperties===!1||dn(t.unevaluatedProperties)||r?F(g({},n),{[v]:"Intersect",type:"object",allOf:e}):F(g({},n),{[v]:"Intersect",allOf:e}),t)}o(gc,"IntersectCreate");function pL(e){return e.every(t=>An(t))}o(pL,"IsIntersectOptional");function dL(e){return It(e,[fr])}o(dL,"RemoveOptionalFromType");function G_(e){return e.map(t=>An(t)?dL(t):t)}o(G_,"RemoveOptionalFromRest");function mL(e,t){return pL(e)?br(gc(G_(e),t)):gc(G_(e),t)}o(mL,"ResolveIntersect");function Uu(e,t={}){if(e.length===0)return He(t);if(e.length===1)return T(e[0],t);if(e.some(r=>Es(r)))throw new Error("Cannot intersect transform types");return mL(e,t)}o(Uu,"IntersectEvaluated");c();function $r(e,t){if(e.length===0)return He(t);if(e.length===1)return T(e[0],t);if(e.some(r=>Es(r)))throw new Error("Cannot intersect transform types");return gc(e,t)}o($r,"Intersect");function K_(e){return e.map(t=>Bm(t))}o(K_,"FromRest");function yL(e){return $r(K_(e))}o(yL,"FromIntersect");function hL(e){return Je(K_(e))}o(hL,"FromUnion");function gL(e){return Bm(e)}o(gL,"FromPromise");function Bm(e){return $t(e)?yL(e.allOf):Ue(e)?hL(e.anyOf):Fi(e)?gL(e.item):e}o(Bm,"AwaitedResolve");function W_(e,t){return T(Bm(e),t)}o(W_,"Awaited");c();c();c();c();function H_(e){let t=[];for(let r of e)t.push(At(r));return t}o(H_,"FromRest");function xL(e){let t=H_(e);return k_(t)}o(xL,"FromIntersect");function IL(e){let t=H_(e);return T_(t)}o(IL,"FromUnion");function bL(e){return e.map((t,r)=>r.toString())}o(bL,"FromTuple");function wL(e){return["[number]"]}o(wL,"FromArray");function $L(e){return globalThis.Object.getOwnPropertyNames(e)}o($L,"FromProperties");function vL(e){return Gm?globalThis.Object.getOwnPropertyNames(e).map(r=>r[0]==="^"&&r[r.length-1]==="$"?r.slice(1,r.length-1):r):[]}o(vL,"FromPatternProperties");function At(e){var t;return $t(e)?xL(e.allOf):Ue(e)?IL(e.anyOf):pn(e)?bL((t=e.items)!=null?t:[]):fo(e)?wL(e.items):Et(e)?$L(e.properties):vm(e)?vL(e.patternProperties):[]}o(At,"KeyOfPropertyKeys");var Gm=!1;function ho(e){Gm=!0;let t=At(e);Gm=!1;let r=t.map(n=>"(".concat(n,")"));return"^(".concat(r.join("|"),")$")}o(ho,"KeyOfPattern");function OL(e){return e.map(t=>t==="[number]"?Nn():ze(t))}o(OL,"KeyOfPropertyKeysToRest");function zu(e,t){if(dt(e))return J_(e,t);{let r=At(e),n=OL(r),i=jn(n);return T(i,t)}}o(zu,"KeyOf");function _L(e,t){let r={};for(let n of globalThis.Object.getOwnPropertyNames(e))r[n]=zu(e[n],lt(t));return r}o(_L,"FromProperties");function SL(e,t){return _L(e.properties,t)}o(SL,"FromMappedResult");function J_(e,t){let r=SL(e,t);return Ae(r)}o(J_,"KeyOfFromMappedResult");c();function Jo(e){let t=At(e),r=yc(e,t);return t.map((n,i)=>[t[i],r[i]])}o(Jo,"KeyOfPropertyEntries");function PL(e){let t=[];for(let r of e)t.push(...At(r));return E_(t)}o(PL,"CompositeKeys");function EL(e){return e.filter(t=>!Go(t))}o(EL,"FilterNever");function TL(e,t){let r=[];for(let n of e)r.push(...yc(n,[t]));return EL(r)}o(TL,"CompositeProperty");function kL(e,t){let r={};for(let n of t)r[n]=Uu(TL(e,n));return r}o(kL,"CompositeProperties");function Z_(e,t){let r=PL(e),n=kL(e,r);return Qe(n,t)}o(Z_,"Composite");c();c();function Vu(e){return T({[v]:"Date",type:"Date"},e)}o(Vu,"Date");c();function Bu(e){return T({[v]:"Null",type:"null"},e)}o(Bu,"Null");c();function Gu(e){return T({[v]:"Symbol",type:"symbol"},e)}o(Gu,"Symbol");c();function Ku(e){return T({[v]:"Undefined",type:"undefined"},e)}o(Ku,"Undefined");c();function Wu(e){return T({[v]:"Uint8Array",type:"Uint8Array"},e)}o(Wu,"Uint8Array");c();function go(e){return T({[v]:"Unknown"},e)}o(go,"Unknown");function FL(e){return e.map(t=>Km(t,!1))}o(FL,"FromArray");function AL(e){let t={};for(let r of globalThis.Object.getOwnPropertyNames(e))t[r]=Gr(Km(e[r],!1));return t}o(AL,"FromProperties");function Hu(e,t){return t===!0?e:Gr(e)}o(Hu,"ConditionalReadonly");function Km(e,t){return dm(e)?Hu(Wo(),t):ym(e)?Hu(Wo(),t):Xt(e)?Gr(Rn(FL(e))):so(e)?Wu():Ei(e)?Vu():Xe(e)?Hu(Qe(AL(e)),t):mm(e)?Hu(Ho([],go()),t):yt(e)?Ku():hm(e)?Bu():gm(e)?Gu():ec(e)?Rs():ln(e)?ze(e):Vo(e)?ze(e):ot(e)?ze(e):Qe({})}o(Km,"FromValue");function Y_(e,t){return T(Km(e,!0),t)}o(Y_,"Const");c();function X_(e,t){return Rn(e.parameters,t)}o(X_,"ConstructorParameters");c();function xc(e,t){return e.map(r=>mn(r,t))}o(xc,"FromRest");function jL(e,t){let r={};for(let n of globalThis.Object.getOwnPropertyNames(e))r[n]=mn(e[n],t);return r}o(jL,"FromProperties");function NL(e,t){return e.parameters=xc(e.parameters,t),e.returns=mn(e.returns,t),e}o(NL,"FromConstructor");function RL(e,t){return e.parameters=xc(e.parameters,t),e.returns=mn(e.returns,t),e}o(RL,"FromFunction");function CL(e,t){return e.allOf=xc(e.allOf,t),e}o(CL,"FromIntersect");function ML(e,t){return e.anyOf=xc(e.anyOf,t),e}o(ML,"FromUnion");function LL(e,t){return yt(e.items)||(e.items=xc(e.items,t)),e}o(LL,"FromTuple");function UL(e,t){return e.items=mn(e.items,t),e}o(UL,"FromArray");function DL(e,t){return e.properties=jL(e.properties,t),e}o(DL,"FromObject");function qL(e,t){return e.item=mn(e.item,t),e}o(qL,"FromPromise");function zL(e,t){return e.items=mn(e.items,t),e}o(zL,"FromAsyncIterator");function VL(e,t){return e.items=mn(e.items,t),e}o(VL,"FromIterator");function BL(e,t){let r=t.find(i=>i.$id===e.$ref);if(r===void 0)throw Error("Unable to dereference schema with $id ".concat(e.$ref));let n=It(r,["$id"]);return mn(n,t)}o(BL,"FromRef");function GL(e,t){return ic(e)?NL(e,t):sc(e)?RL(e,t):$t(e)?CL(e,t):Ue(e)?ML(e,t):pn(e)?LL(e,t):fo(e)?UL(e,t):Et(e)?DL(e,t):Fi(e)?qL(e,t):oc(e)?zL(e,t):ac(e)?VL(e,t):Om(e)?BL(e,t):e}o(GL,"DerefResolve");function mn(e,t){return GL(rc(e),LO(t))}o(mn,"Deref");c();function Q_(e,t){if(yt(e))throw new Error("Enum undefined or empty");let r=globalThis.Object.getOwnPropertyNames(e).filter(s=>isNaN(s)).map(s=>e[s]),i=[...new Set(r)].map(s=>ze(s));return Je(i,F(g({},t),{[Vr]:"Enum"}))}o(Q_,"Enum");c();c();c();var Qm=class Qm extends re{};o(Qm,"ExtendsResolverError");var Hm=Qm,P;(function(e){e[e.Union=0]="Union",e[e.True=1]="True",e[e.False=2]="False"})(P||(P={}));function Wr(e){return e===P.False?e:P.True}o(Wr,"IntoBooleanResult");function Ms(e){throw new Hm(e)}o(Ms,"Throw");function Ot(e){return x.IsNever(e)||x.IsIntersect(e)||x.IsUnion(e)||x.IsUnknown(e)||x.IsAny(e)}o(Ot,"IsStructuralRight");function _t(e,t){return x.IsNever(t)?sS(e,t):x.IsIntersect(t)?Ju(e,t):x.IsUnion(t)?Xm(e,t):x.IsUnknown(t)?fS(e,t):x.IsAny(t)?Ym(e,t):Ms("StructuralRight")}o(_t,"StructuralRight");function Ym(e,t){return P.True}o(Ym,"FromAnyRight");function KL(e,t){return x.IsIntersect(t)?Ju(e,t):x.IsUnion(t)&&t.anyOf.some(r=>x.IsAny(r)||x.IsUnknown(r))?P.True:x.IsUnion(t)?P.Union:x.IsUnknown(t)||x.IsAny(t)?P.True:P.Union}o(KL,"FromAny");function WL(e,t){return x.IsUnknown(e)?P.False:x.IsAny(e)?P.Union:x.IsNever(e)?P.True:P.False}o(WL,"FromArrayRight");function HL(e,t){return x.IsObject(t)&&Zu(t)?P.True:Ot(t)?_t(e,t):x.IsArray(t)?Wr(Ze(e.items,t.items)):P.False}o(HL,"FromArray");function JL(e,t){return Ot(t)?_t(e,t):x.IsAsyncIterator(t)?Wr(Ze(e.items,t.items)):P.False}o(JL,"FromAsyncIterator");function ZL(e,t){return Ot(t)?_t(e,t):x.IsObject(t)?Qt(e,t):x.IsRecord(t)?Hr(e,t):x.IsBigInt(t)?P.True:P.False}o(ZL,"FromBigInt");function oS(e,t){return x.IsLiteralBoolean(e)||x.IsBoolean(e)?P.True:P.False}o(oS,"FromBooleanRight");function YL(e,t){return Ot(t)?_t(e,t):x.IsObject(t)?Qt(e,t):x.IsRecord(t)?Hr(e,t):x.IsBoolean(t)?P.True:P.False}o(YL,"FromBoolean");function XL(e,t){return Ot(t)?_t(e,t):x.IsObject(t)?Qt(e,t):x.IsConstructor(t)?e.parameters.length>t.parameters.length?P.False:e.parameters.every((r,n)=>Wr(Ze(t.parameters[n],r))===P.True)?Wr(Ze(e.returns,t.returns)):P.False:P.False}o(XL,"FromConstructor");function QL(e,t){return Ot(t)?_t(e,t):x.IsObject(t)?Qt(e,t):x.IsRecord(t)?Hr(e,t):x.IsDate(t)?P.True:P.False}o(QL,"FromDate");function eU(e,t){return Ot(t)?_t(e,t):x.IsObject(t)?Qt(e,t):x.IsFunction(t)?e.parameters.length>t.parameters.length?P.False:e.parameters.every((r,n)=>Wr(Ze(t.parameters[n],r))===P.True)?Wr(Ze(e.returns,t.returns)):P.False:P.False}o(eU,"FromFunction");function iS(e,t){return x.IsLiteral(e)&&Oe.IsNumber(e.const)||x.IsNumber(e)||x.IsInteger(e)?P.True:P.False}o(iS,"FromIntegerRight");function tU(e,t){return x.IsInteger(t)||x.IsNumber(t)?P.True:Ot(t)?_t(e,t):x.IsObject(t)?Qt(e,t):x.IsRecord(t)?Hr(e,t):P.False}o(tU,"FromInteger");function Ju(e,t){return t.allOf.every(r=>Ze(e,r)===P.True)?P.True:P.False}o(Ju,"FromIntersectRight");function rU(e,t){return e.allOf.some(r=>Ze(r,t)===P.True)?P.True:P.False}o(rU,"FromIntersect");function nU(e,t){return Ot(t)?_t(e,t):x.IsIterator(t)?Wr(Ze(e.items,t.items)):P.False}o(nU,"FromIterator");function oU(e,t){return x.IsLiteral(t)&&t.const===e.const?P.True:Ot(t)?_t(e,t):x.IsObject(t)?Qt(e,t):x.IsRecord(t)?Hr(e,t):x.IsString(t)?uS(e,t):x.IsNumber(t)?aS(e,t):x.IsInteger(t)?iS(e,t):x.IsBoolean(t)?oS(e,t):P.False}o(oU,"FromLiteral");function sS(e,t){return P.False}o(sS,"FromNeverRight");function iU(e,t){return P.True}o(iU,"FromNever");function eS(e){let[t,r]=[e,0];for(;x.IsNot(t);)t=t.not,r+=1;return r%2===0?t:go()}o(eS,"UnwrapTNot");function sU(e,t){return x.IsNot(e)?Ze(eS(e),t):x.IsNot(t)?Ze(e,eS(t)):Ms("Invalid fallthrough for Not")}o(sU,"FromNot");function aU(e,t){return Ot(t)?_t(e,t):x.IsObject(t)?Qt(e,t):x.IsRecord(t)?Hr(e,t):x.IsNull(t)?P.True:P.False}o(aU,"FromNull");function aS(e,t){return x.IsLiteralNumber(e)||x.IsNumber(e)||x.IsInteger(e)?P.True:P.False}o(aS,"FromNumberRight");function cU(e,t){return Ot(t)?_t(e,t):x.IsObject(t)?Qt(e,t):x.IsRecord(t)?Hr(e,t):x.IsInteger(t)||x.IsNumber(t)?P.True:P.False}o(cU,"FromNumber");function vr(e,t){return Object.getOwnPropertyNames(e.properties).length===t}o(vr,"IsObjectPropertyCount");function tS(e){return Zu(e)}o(tS,"IsObjectStringLike");function rS(e){return vr(e,0)||vr(e,1)&&"description"in e.properties&&x.IsUnion(e.properties.description)&&e.properties.description.anyOf.length===2&&(x.IsString(e.properties.description.anyOf[0])&&x.IsUndefined(e.properties.description.anyOf[1])||x.IsString(e.properties.description.anyOf[1])&&x.IsUndefined(e.properties.description.anyOf[0]))}o(rS,"IsObjectSymbolLike");function Wm(e){return vr(e,0)}o(Wm,"IsObjectNumberLike");function nS(e){return vr(e,0)}o(nS,"IsObjectBooleanLike");function uU(e){return vr(e,0)}o(uU,"IsObjectBigIntLike");function fU(e){return vr(e,0)}o(fU,"IsObjectDateLike");function lU(e){return Zu(e)}o(lU,"IsObjectUint8ArrayLike");function pU(e){let t=Nn();return vr(e,0)||vr(e,1)&&"length"in e.properties&&Wr(Ze(e.properties.length,t))===P.True}o(pU,"IsObjectFunctionLike");function dU(e){return vr(e,0)}o(dU,"IsObjectConstructorLike");function Zu(e){let t=Nn();return vr(e,0)||vr(e,1)&&"length"in e.properties&&Wr(Ze(e.properties.length,t))===P.True}o(Zu,"IsObjectArrayLike");function mU(e){let t=Ho([Wo()],Wo());return vr(e,0)||vr(e,1)&&"then"in e.properties&&Wr(Ze(e.properties.then,t))===P.True}o(mU,"IsObjectPromiseLike");function cS(e,t){return Ze(e,t)===P.False||x.IsOptional(e)&&!x.IsOptional(t)?P.False:P.True}o(cS,"Property");function Qt(e,t){return x.IsUnknown(e)?P.False:x.IsAny(e)?P.Union:x.IsNever(e)||x.IsLiteralString(e)&&tS(t)||x.IsLiteralNumber(e)&&Wm(t)||x.IsLiteralBoolean(e)&&nS(t)||x.IsSymbol(e)&&rS(t)||x.IsBigInt(e)&&uU(t)||x.IsString(e)&&tS(t)||x.IsSymbol(e)&&rS(t)||x.IsNumber(e)&&Wm(t)||x.IsInteger(e)&&Wm(t)||x.IsBoolean(e)&&nS(t)||x.IsUint8Array(e)&&lU(t)||x.IsDate(e)&&fU(t)||x.IsConstructor(e)&&dU(t)||x.IsFunction(e)&&pU(t)?P.True:x.IsRecord(e)&&x.IsString(Jm(e))?t[Vr]==="Record"?P.True:P.False:x.IsRecord(e)&&x.IsNumber(Jm(e))?vr(t,0)?P.True:P.False:P.False}o(Qt,"FromObjectRight");function yU(e,t){return Ot(t)?_t(e,t):x.IsRecord(t)?Hr(e,t):x.IsObject(t)?(()=>{for(let r of Object.getOwnPropertyNames(t.properties)){if(!(r in e.properties)&&!x.IsOptional(t.properties[r]))return P.False;if(x.IsOptional(t.properties[r]))return P.True;if(cS(e.properties[r],t.properties[r])===P.False)return P.False}return P.True})():P.False}o(yU,"FromObject");function hU(e,t){return Ot(t)?_t(e,t):x.IsObject(t)&&mU(t)?P.True:x.IsPromise(t)?Wr(Ze(e.item,t.item)):P.False}o(hU,"FromPromise");function Jm(e){return po in e.patternProperties?Nn():mo in e.patternProperties?Br():Ms("Unknown record key pattern")}o(Jm,"RecordKey");function Zm(e){return po in e.patternProperties?e.patternProperties[po]:mo in e.patternProperties?e.patternProperties[mo]:Ms("Unable to get record value schema")}o(Zm,"RecordValue");function Hr(e,t){let[r,n]=[Jm(t),Zm(t)];return x.IsLiteralString(e)&&x.IsNumber(r)&&Wr(Ze(e,n))===P.True?P.True:x.IsUint8Array(e)&&x.IsNumber(r)||x.IsString(e)&&x.IsNumber(r)||x.IsArray(e)&&x.IsNumber(r)?Ze(e,n):x.IsObject(e)?(()=>{for(let i of Object.getOwnPropertyNames(e.properties))if(cS(n,e.properties[i])===P.False)return P.False;return P.True})():P.False}o(Hr,"FromRecordRight");function gU(e,t){return Ot(t)?_t(e,t):x.IsObject(t)?Qt(e,t):x.IsRecord(t)?Ze(Zm(e),Zm(t)):P.False}o(gU,"FromRecord");function xU(e,t){let r=x.IsRegExp(e)?Br():e,n=x.IsRegExp(t)?Br():t;return Ze(r,n)}o(xU,"FromRegExp");function uS(e,t){return x.IsLiteral(e)&&Oe.IsString(e.const)||x.IsString(e)?P.True:P.False}o(uS,"FromStringRight");function IU(e,t){return Ot(t)?_t(e,t):x.IsObject(t)?Qt(e,t):x.IsRecord(t)?Hr(e,t):x.IsString(t)?P.True:P.False}o(IU,"FromString");function bU(e,t){return Ot(t)?_t(e,t):x.IsObject(t)?Qt(e,t):x.IsRecord(t)?Hr(e,t):x.IsSymbol(t)?P.True:P.False}o(bU,"FromSymbol");function wU(e,t){return x.IsTemplateLiteral(e)?Ze(ji(e),t):x.IsTemplateLiteral(t)?Ze(e,ji(t)):Ms("Invalid fallthrough for TemplateLiteral")}o(wU,"FromTemplateLiteral");function $U(e,t){return x.IsArray(t)&&e.items!==void 0&&e.items.every(r=>Ze(r,t.items)===P.True)}o($U,"IsArrayOfTuple");function vU(e,t){return x.IsNever(e)?P.True:x.IsUnknown(e)?P.False:x.IsAny(e)?P.Union:P.False}o(vU,"FromTupleRight");function OU(e,t){return Ot(t)?_t(e,t):x.IsObject(t)&&Zu(t)||x.IsArray(t)&&$U(e,t)?P.True:x.IsTuple(t)?Oe.IsUndefined(e.items)&&!Oe.IsUndefined(t.items)||!Oe.IsUndefined(e.items)&&Oe.IsUndefined(t.items)?P.False:Oe.IsUndefined(e.items)&&!Oe.IsUndefined(t.items)||e.items.every((r,n)=>Ze(r,t.items[n])===P.True)?P.True:P.False:P.False}o(OU,"FromTuple");function _U(e,t){return Ot(t)?_t(e,t):x.IsObject(t)?Qt(e,t):x.IsRecord(t)?Hr(e,t):x.IsUint8Array(t)?P.True:P.False}o(_U,"FromUint8Array");function SU(e,t){return Ot(t)?_t(e,t):x.IsObject(t)?Qt(e,t):x.IsRecord(t)?Hr(e,t):x.IsVoid(t)?TU(e,t):x.IsUndefined(t)?P.True:P.False}o(SU,"FromUndefined");function Xm(e,t){return t.anyOf.some(r=>Ze(e,r)===P.True)?P.True:P.False}o(Xm,"FromUnionRight");function PU(e,t){return e.anyOf.every(r=>Ze(r,t)===P.True)?P.True:P.False}o(PU,"FromUnion");function fS(e,t){return P.True}o(fS,"FromUnknownRight");function EU(e,t){return x.IsNever(t)?sS(e,t):x.IsIntersect(t)?Ju(e,t):x.IsUnion(t)?Xm(e,t):x.IsAny(t)?Ym(e,t):x.IsString(t)?uS(e,t):x.IsNumber(t)?aS(e,t):x.IsInteger(t)?iS(e,t):x.IsBoolean(t)?oS(e,t):x.IsArray(t)?WL(e,t):x.IsTuple(t)?vU(e,t):x.IsObject(t)?Qt(e,t):x.IsUnknown(t)?P.True:P.False}o(EU,"FromUnknown");function TU(e,t){return x.IsUndefined(e)||x.IsUndefined(e)?P.True:P.False}o(TU,"FromVoidRight");function kU(e,t){return x.IsIntersect(t)?Ju(e,t):x.IsUnion(t)?Xm(e,t):x.IsUnknown(t)?fS(e,t):x.IsAny(t)?Ym(e,t):x.IsObject(t)?Qt(e,t):x.IsVoid(t)?P.True:P.False}o(kU,"FromVoid");function Ze(e,t){return x.IsTemplateLiteral(e)||x.IsTemplateLiteral(t)?wU(e,t):x.IsRegExp(e)||x.IsRegExp(t)?xU(e,t):x.IsNot(e)||x.IsNot(t)?sU(e,t):x.IsAny(e)?KL(e,t):x.IsArray(e)?HL(e,t):x.IsBigInt(e)?ZL(e,t):x.IsBoolean(e)?YL(e,t):x.IsAsyncIterator(e)?JL(e,t):x.IsConstructor(e)?XL(e,t):x.IsDate(e)?QL(e,t):x.IsFunction(e)?eU(e,t):x.IsInteger(e)?tU(e,t):x.IsIntersect(e)?rU(e,t):x.IsIterator(e)?nU(e,t):x.IsLiteral(e)?oU(e,t):x.IsNever(e)?iU(e,t):x.IsNull(e)?aU(e,t):x.IsNumber(e)?cU(e,t):x.IsObject(e)?yU(e,t):x.IsRecord(e)?gU(e,t):x.IsString(e)?IU(e,t):x.IsSymbol(e)?bU(e,t):x.IsTuple(e)?OU(e,t):x.IsPromise(e)?hU(e,t):x.IsUint8Array(e)?_U(e,t):x.IsUndefined(e)?SU(e,t):x.IsUnion(e)?PU(e,t):x.IsUnknown(e)?EU(e,t):x.IsVoid(e)?kU(e,t):Ms("Unknown left type operand '".concat(e[v],"'"))}o(Ze,"Visit");function Zo(e,t){return Ze(e,t)}o(Zo,"ExtendsCheck");c();c();c();function FU(e,t,r,n,i){let s={};for(let a of globalThis.Object.getOwnPropertyNames(e))s[a]=Ls(e[a],t,r,n,lt(i));return s}o(FU,"FromProperties");function AU(e,t,r,n,i){return FU(e.properties,t,r,n,i)}o(AU,"FromMappedResult");function lS(e,t,r,n,i){let s=AU(e,t,r,n,i);return Ae(s)}o(lS,"ExtendsFromMappedResult");function jU(e,t,r,n){let i=Zo(e,t);return i===P.Union?Je([r,n]):i===P.True?r:n}o(jU,"ExtendsResolve");function Ls(e,t,r,n,i){return dt(e)?lS(e,t,r,n,i):Sr(e)?T(pS(e,t,r,n,i)):T(jU(e,t,r,n),i)}o(Ls,"Extends");function NU(e,t,r,n,i){return{[e]:Ls(ze(e),t,r,n,lt(i))}}o(NU,"FromPropertyKey");function RU(e,t,r,n,i){return e.reduce((s,a)=>g(g({},s),NU(a,t,r,n,i)),{})}o(RU,"FromPropertyKeys");function CU(e,t,r,n,i){return RU(e.keys,t,r,n,i)}o(CU,"FromMappedKey");function pS(e,t,r,n,i){let s=CU(e,t,r,n,i);return Ae(s)}o(pS,"ExtendsFromMappedKey");c();function MU(e){return e.allOf.every(t=>xo(t))}o(MU,"Intersect");function LU(e){return e.anyOf.some(t=>xo(t))}o(LU,"Union");function UU(e){return!xo(e.not)}o(UU,"Not");function xo(e){return e[v]==="Intersect"?MU(e):e[v]==="Union"?LU(e):e[v]==="Not"?UU(e):e[v]==="Undefined"}o(xo,"ExtendsUndefinedCheck");c();function dS(e,t){return Us(ji(e),t)}o(dS,"ExcludeFromTemplateLiteral");function DU(e,t){let r=e.filter(n=>Zo(n,t)===P.False);return r.length===1?r[0]:Je(r)}o(DU,"ExcludeRest");function Us(e,t,r={}){return Pr(e)?T(dS(e,t),r):dt(e)?T(mS(e,t),r):T(Ue(e)?DU(e.anyOf,t):Zo(e,t)!==P.False?He():e,r)}o(Us,"Exclude");function qU(e,t){let r={};for(let n of globalThis.Object.getOwnPropertyNames(e))r[n]=Us(e[n],t);return r}o(qU,"FromProperties");function zU(e,t){return qU(e.properties,t)}o(zU,"FromMappedResult");function mS(e,t){let r=zU(e,t);return Ae(r)}o(mS,"ExcludeFromMappedResult");c();c();c();function yS(e,t){return Ds(ji(e),t)}o(yS,"ExtractFromTemplateLiteral");function VU(e,t){let r=e.filter(n=>Zo(n,t)!==P.False);return r.length===1?r[0]:Je(r)}o(VU,"ExtractRest");function Ds(e,t,r){return Pr(e)?T(yS(e,t),r):dt(e)?T(hS(e,t),r):T(Ue(e)?VU(e.anyOf,t):Zo(e,t)!==P.False?e:He(),r)}o(Ds,"Extract");function BU(e,t){let r={};for(let n of globalThis.Object.getOwnPropertyNames(e))r[n]=Ds(e[n],t);return r}o(BU,"FromProperties");function GU(e,t){return BU(e.properties,t)}o(GU,"FromMappedResult");function hS(e,t){let r=GU(e,t);return Ae(r)}o(hS,"ExtractFromMappedResult");c();function gS(e,t){return T(e.returns,t)}o(gS,"InstanceType");c();function xS(e){return T({[v]:"Integer",type:"integer"},e)}o(xS,"Integer");c();c();c();function KU(e,t,r){return{[e]:yn(ze(e),t,lt(r))}}o(KU,"MappedIntrinsicPropertyKey");function WU(e,t,r){return e.reduce((i,s)=>g(g({},i),KU(s,t,r)),{})}o(WU,"MappedIntrinsicPropertyKeys");function HU(e,t,r){return WU(e.keys,t,r)}o(HU,"MappedIntrinsicProperties");function IS(e,t,r){let n=HU(e,t,r);return Ae(n)}o(IS,"IntrinsicFromMappedKey");function JU(e){let[t,r]=[e.slice(0,1),e.slice(1)];return[t.toLowerCase(),r].join("")}o(JU,"ApplyUncapitalize");function ZU(e){let[t,r]=[e.slice(0,1),e.slice(1)];return[t.toUpperCase(),r].join("")}o(ZU,"ApplyCapitalize");function YU(e){return e.toUpperCase()}o(YU,"ApplyUppercase");function XU(e){return e.toLowerCase()}o(XU,"ApplyLowercase");function QU(e,t,r){let n=js(e.pattern);if(!Ai(n))return F(g({},e),{pattern:bS(e.pattern,t)});let a=[...mc(n)].map(d=>ze(d)),u=wS(a,t),l=Je(u);return Lu([l],r)}o(QU,"FromTemplateLiteral");function bS(e,t){return typeof e=="string"?t==="Uncapitalize"?JU(e):t==="Capitalize"?ZU(e):t==="Uppercase"?YU(e):t==="Lowercase"?XU(e):e:e.toString()}o(bS,"FromLiteralValue");function wS(e,t){return e.map(r=>yn(r,t))}o(wS,"FromRest");function yn(e,t,r={}){return Sr(e)?IS(e,t,r):Pr(e)?QU(e,t,r):Ue(e)?Je(wS(e.anyOf,t),r):lo(e)?ze(bS(e.const,t),r):T(e,r)}o(yn,"Intrinsic");function $S(e,t={}){return yn(e,"Capitalize",t)}o($S,"Capitalize");c();function vS(e,t={}){return yn(e,"Lowercase",t)}o(vS,"Lowercase");c();function OS(e,t={}){return yn(e,"Uncapitalize",t)}o(OS,"Uncapitalize");c();function _S(e,t={}){return yn(e,"Uppercase",t)}o(_S,"Uppercase");c();function SS(e,t){return T({[v]:"Not",not:e},t)}o(SS,"Not");c();c();c();function e2(e,t,r){let n={};for(let i of globalThis.Object.getOwnPropertyNames(e))n[i]=qs(e[i],t,lt(r));return n}o(e2,"FromProperties");function t2(e,t,r){return e2(e.properties,t,r)}o(t2,"FromMappedResult");function PS(e,t,r){let n=t2(e,t,r);return Ae(n)}o(PS,"OmitFromMappedResult");function r2(e,t){return e.map(r=>ey(r,t))}o(r2,"FromIntersect");function n2(e,t){return e.map(r=>ey(r,t))}o(n2,"FromUnion");function o2(e,t){let i=e,{[t]:r}=i;return ya(i,[Ac(t)])}o(o2,"FromProperty");function i2(e,t){return t.reduce((r,n)=>o2(r,n),e)}o(i2,"FromProperties");function s2(e,t){let r=It(e,[pt,"$id","required","properties"]),n=i2(e.properties,t);return Qe(n,r)}o(s2,"FromObject");function ey(e,t){return $t(e)?$r(r2(e.allOf,t)):Ue(e)?Je(n2(e.anyOf,t)):Et(e)?s2(e,t):Qe({})}o(ey,"OmitResolve");function qs(e,t,r){if(Sr(t))return ES(e,t,r);if(dt(e))return PS(e,t,r);let n=dn(t)?wr(t):t;return T(g(g({},ey(e,n)),r))}o(qs,"Omit");function a2(e,t,r){return{[t]:qs(e,[t],lt(r))}}o(a2,"FromPropertyKey");function c2(e,t,r){return t.reduce((n,i)=>g(g({},n),a2(e,i,r)),{})}o(c2,"FromPropertyKeys");function u2(e,t,r){return c2(e,t.keys,r)}o(u2,"FromMappedKey");function ES(e,t,r){let n=u2(e,t,r);return Ae(n)}o(ES,"OmitFromMappedKey");c();function TS(e,t){return Rn(e.parameters,t)}o(TS,"Parameters");c();c();function kS(e){return e.map(t=>FS(t))}o(kS,"FromRest");function f2(e){let t={};for(let r of globalThis.Object.getOwnPropertyNames(e))t[r]=br(e[r]);return t}o(f2,"FromProperties");function l2(e){let t=It(e,[pt,"$id","required","properties"]),r=f2(e.properties);return Qe(r,t)}o(l2,"FromObject");function FS(e){return $t(e)?$r(kS(e.allOf)):Ue(e)?Je(kS(e.anyOf)):Et(e)?l2(e):Qe({})}o(FS,"PartialResolve");function Yu(e,t){return dt(e)?AS(e,t):T(g(g({},FS(e)),t))}o(Yu,"Partial");function p2(e,t){let r={};for(let n of globalThis.Object.getOwnPropertyNames(e))r[n]=Yu(e[n],lt(t));return r}o(p2,"FromProperties");function d2(e,t){return p2(e.properties,t)}o(d2,"FromMappedResult");function AS(e,t){let r=d2(e,t);return Ae(r)}o(AS,"PartialFromMappedResult");c();c();c();function m2(e,t,r){let n={};for(let i of globalThis.Object.getOwnPropertyNames(e))n[i]=zs(e[i],t,lt(r));return n}o(m2,"FromProperties");function y2(e,t,r){return m2(e.properties,t,r)}o(y2,"FromMappedResult");function jS(e,t,r){let n=y2(e,t,r);return Ae(n)}o(jS,"PickFromMappedResult");function h2(e,t){return e.map(r=>ty(r,t))}o(h2,"FromIntersect");function g2(e,t){return e.map(r=>ty(r,t))}o(g2,"FromUnion");function x2(e,t){let r={};for(let n of t)n in e&&(r[n]=e[n]);return r}o(x2,"FromProperties");function I2(e,t){let r=It(e,[pt,"$id","required","properties"]),n=x2(e.properties,t);return Qe(n,r)}o(I2,"FromObject");function ty(e,t){return $t(e)?$r(h2(e.allOf,t)):Ue(e)?Je(g2(e.anyOf,t)):Et(e)?I2(e,t):Qe({})}o(ty,"PickResolve");function zs(e,t,r){if(Sr(t))return NS(e,t,r);if(dt(e))return jS(e,t,r);let n=dn(t)?wr(t):t;return T(g(g({},ty(e,n)),r))}o(zs,"Pick");function b2(e,t,r){return{[t]:zs(e,[t],lt(r))}}o(b2,"FromPropertyKey");function w2(e,t,r){return t.reduce((n,i)=>g(g({},n),b2(e,i,r)),{})}o(w2,"FromPropertyKeys");function $2(e,t,r){return w2(e,t.keys,r)}o($2,"FromMappedKey");function NS(e,t,r){let n=$2(e,t,r);return Ae(n)}o(NS,"PickFromMappedKey");c();function RS(e){return Gr(br(e))}o(RS,"ReadonlyOptional");c();function Ni(e,t,r){return T({[v]:"Record",type:"object",patternProperties:{[e]:t}},r)}o(Ni,"RecordCreateFromPattern");function ry(e,t,r){let n={};for(let i of e)n[i]=t;return Qe(n,F(g({},r),{[Vr]:"Record"}))}o(ry,"RecordCreateFromKeys");function v2(e,t,r){return Cu(e)?ry(wr(e),t,r):Ni(e.pattern,t,r)}o(v2,"FromTemplateLiteralKey");function O2(e,t,r){return ry(wr(Je(e)),t,r)}o(O2,"FromUnionKey");function _2(e,t,r){return ry([e.toString()],t,r)}o(_2,"FromLiteralKey");function S2(e,t,r){return Ni(e.source,t,r)}o(S2,"FromRegExpKey");function P2(e,t,r){let n=yt(e.pattern)?mo:e.pattern;return Ni(n,t,r)}o(P2,"FromStringKey");function E2(e,t,r){return Ni(mo,t,r)}o(E2,"FromAnyKey");function T2(e,t,r){return Ni(S_,t,r)}o(T2,"FromNeverKey");function k2(e,t,r){return Ni(po,t,r)}o(k2,"FromIntegerKey");function F2(e,t,r){return Ni(po,t,r)}o(F2,"FromNumberKey");function CS(e,t,r={}){return Ue(e)?O2(e.anyOf,t,r):Pr(e)?v2(e,t,r):lo(e)?_2(e.const,t,r):Ti(e)?k2(e,t,r):ki(e)?F2(e,t,r):_m(e)?S2(e,t,r):cc(e)?P2(e,t,r):bm(e)?E2(e,t,r):Go(e)?T2(e,t,r):He(r)}o(CS,"Record");c();var A2=0;function MS(e,t={}){yt(t.$id)&&(t.$id="T".concat(A2++));let r=rc(e({[v]:"This",$ref:"".concat(t.$id)}));return r.$id=t.$id,T(g({[Vr]:"Recursive"},r),t)}o(MS,"Recursive");c();function LS(e,t){if(ot(e))return T({[v]:"Ref",$ref:e},t);if(yt(e.$id))throw new Error("Reference target type must specify an $id");return T({[v]:"Ref",$ref:e.$id},t)}o(LS,"Ref");c();function US(e,t){let r=ot(e)?new globalThis.RegExp(e):e;return T({[v]:"RegExp",type:"RegExp",source:r.source,flags:r.flags},t)}o(US,"RegExp");c();c();function DS(e){return e.map(t=>qS(t))}o(DS,"FromRest");function j2(e){let t={};for(let r of globalThis.Object.getOwnPropertyNames(e))t[r]=It(e[r],[fr]);return t}o(j2,"FromProperties");function N2(e){let t=It(e,[pt,"$id","required","properties"]),r=j2(e.properties);return Qe(r,t)}o(N2,"FromObject");function qS(e){return $t(e)?$r(DS(e.allOf)):Ue(e)?Je(DS(e.anyOf)):Et(e)?N2(e):Qe({})}o(qS,"RequiredResolve");function Xu(e,t){return dt(e)?zS(e,t):T(g(g({},qS(e)),t))}o(Xu,"Required");function R2(e,t){let r={};for(let n of globalThis.Object.getOwnPropertyNames(e))r[n]=Xu(e[n],t);return r}o(R2,"FromProperties");function C2(e,t){return R2(e.properties,t)}o(C2,"FromMappedResult");function zS(e,t){let r=C2(e,t);return Ae(r)}o(zS,"RequiredFromMappedResult");c();function M2(e){var t;return $t(e)?e.allOf:Ue(e)?e.anyOf:pn(e)?(t=e.items)!=null?t:[]:[]}o(M2,"RestResolve");function VS(e){return M2(e)}o(VS,"Rest");c();function BS(e,t){return T(e.returns,t)}o(BS,"ReturnType");c();function GS(e){return JSON.parse(JSON.stringify(e))}o(GS,"Strict");c();var iy=class iy{constructor(t){this.schema=t}Decode(t){return new oy(this.schema,t)}};o(iy,"TransformDecodeBuilder");var ny=iy,sy=class sy{constructor(t,r){this.schema=t,this.decode=r}EncodeTransform(t,r){let s={Encode:o(a=>r[pt].Encode(t(a)),"Encode"),Decode:o(a=>this.decode(r[pt].Decode(a)),"Decode")};return F(g({},r),{[pt]:s})}EncodeSchema(t,r){let n={Decode:this.decode,Encode:t};return F(g({},r),{[pt]:n})}Encode(t){return Es(this.schema)?this.EncodeTransform(t,this.schema):this.EncodeSchema(t,this.schema)}};o(sy,"TransformEncodeBuilder");var oy=sy;function KS(e){return new ny(e)}o(KS,"Transform");c();function Qu(e={}){var t;return T({[v]:(t=e[v])!=null?t:"Unsafe"},e)}o(Qu,"Unsafe");c();function WS(e){return T({[v]:"Void",type:"void"},e)}o(WS,"Void");c();var ay={};To(ay,{Any:()=>Wo,Array:()=>Au,AsyncIterator:()=>ju,Awaited:()=>W_,BigInt:()=>Rs,Boolean:()=>Mu,Capitalize:()=>$S,Composite:()=>Z_,Const:()=>Y_,Constructor:()=>Nu,ConstructorParameters:()=>X_,Date:()=>Vu,Deref:()=>mn,Enum:()=>Q_,Exclude:()=>Us,Extends:()=>Ls,Extract:()=>Ds,Function:()=>Ho,Index:()=>Cs,InstanceType:()=>gS,Integer:()=>xS,Intersect:()=>$r,Iterator:()=>Du,KeyOf:()=>zu,Literal:()=>ze,Lowercase:()=>vS,Mapped:()=>V_,Never:()=>He,Not:()=>SS,Null:()=>Bu,Number:()=>Nn,Object:()=>Qe,Omit:()=>qs,Optional:()=>br,Parameters:()=>TS,Partial:()=>Yu,Pick:()=>zs,Promise:()=>qu,Readonly:()=>Gr,ReadonlyOptional:()=>RS,Record:()=>CS,Recursive:()=>MS,Ref:()=>LS,RegExp:()=>US,Required:()=>Xu,Rest:()=>VS,ReturnType:()=>BS,Strict:()=>GS,String:()=>Br,Symbol:()=>Gu,TemplateLiteral:()=>Lu,Transform:()=>KS,Tuple:()=>Rn,Uint8Array:()=>Wu,Uncapitalize:()=>OS,Undefined:()=>Ku,Union:()=>Je,Unknown:()=>go,Unsafe:()=>Qu,Uppercase:()=>_S,Void:()=>WS});c();var f=ay;var mt=o((e,t)=>f.Unsafe(f.String({$id:t,pattern:"^".concat(e,"_[A-Za-z0-9-]{8,}$")})),"Ident"),er=mt("g","GeometryId"),je=mt("f","FloorId"),cy=[er,je];c();c();var Ic=f.Object({externalId:f.String({description:"An identifier that can be used to link this entity to data outside of the MVF."}),name:f.String({description:"The name of the entity."}),shortName:f.String({description:"A short name for the entity."}),description:f.String({description:"A description of the entity."}),icon:f.String({format:"uri",description:"A URL to an icon for the entity."})},{$id:"BaseDetails",description:"Additional information about a given entity."}),uy=f.Partial(Ic,{$id:"Details",description:"Additional information about a given entity."}),hn=f.Object({details:f.Optional(f.Ref(uy))},{$id:"WithDetails"}),Ri=o(e=>{let t=[...e].sort(),r=f.Pick(Ic,e),n=f.Omit(Ic,e);return f.Object({details:f.Intersect([r,f.Partial(n)])},{$id:"WithRequiredDetails_".concat(t.join("_"))})},"WithRequiredDetails"),fy=[Ic,uy];c();c();var ly=f.Record(f.String(),f.Unknown(),{$id:"Extra"}),gn=f.Object({extra:f.Optional(f.Ref(ly))}),py=[ly];c();c();var Vs=f.Object({geometryId:f.Ref(er),floorId:f.Ref(je)},{$id:"GeometryAnchor"}),L2=f.Object({geometryAnchor:f.Ref(Vs)}),Ci=o((e,t)=>f.Object({geometryAnchors:f.Array(f.Ref(Vs),e)},t),"WithGeometryAnchors"),dy=[Vs];c();c();c();c();c();var Bs=f.Number({$id:"Longitude",minimum:-180,maximum:180,description:"A WGS 84-compatible longitude coordinate value."}),Gs=f.Number({$id:"Latitude",minimum:-90,maximum:90,description:"A WGS 84-compatible latitude coordinate value."}),Mi=f.Tuple([f.Ref(Bs),f.Ref(Gs)],{$id:"Position",minItems:2,maxItems:2,description:"A valid WGS 84 position consisting of a longitude value, followed by a latitude value."}),tr=f.Object({type:f.Literal("Point"),coordinates:f.Ref(Mi)},{$id:"Point",description:"An RFC-7946 compatible GeoJSON Point geometry."}),ef=f.Object({type:f.Literal("MultiPoint"),coordinates:f.Array(f.Ref(Mi))},{$id:"MultiPoint",description:"An RFC-7946 compatible GeoJSON MultiPoint geometry."}),tf=f.Object({type:f.Literal("LineString"),coordinates:f.Array(f.Ref(Mi),{minItems:2,description:"At least two positions are required."})},{$id:"LineString",description:"An RFC-7946 compatible GeoJSON LineString geometry."}),rf=f.Object({type:f.Literal("MultiLineString"),coordinates:f.Array(f.Array(f.Ref(Mi),{minItems:2}))},{$id:"MultiLineString",description:"An RFC-7946 compatible GeoJSON MultiLineString geometry."}),HS=f.Array(f.Ref(Mi),{$id:"LinearRing",minItems:4,description:"A linear ring is a building block of a polygon or multi-polygon."}),my=f.Array(f.Ref(HS),{$id:"LinearRings",minItems:1,description:"A collection of linear rings, at least one of which is the exterior ring of a polygon."}),Ks=f.Object({type:f.Literal("Polygon"),coordinates:f.Ref(my)},{$id:"Polygon",description:"An RFC-7946 compatible GeoJSON Polygon geometry."}),Ws=f.Object({type:f.Literal("MultiPolygon"),coordinates:f.Array(f.Ref(my))},{$id:"MultiPolygon",description:"An RFC-7946 compatible GeoJSON MultiPolygon geometry."}),zt=o((e,t,r)=>f.Object({type:f.Literal("Feature"),geometry:e,properties:t},r),"Feature"),pr=o((e,t,r)=>f.Object({type:f.Literal("FeatureCollection"),features:f.Array(e,r)},t),"FeatureCollection"),yy=[Bs,Gs,Mi,tr,ef,tf,rf,HS,my,Ks,Ws];var JS=f.Intersect([f.Object({id:f.Ref(je),elevation:f.Integer({description:"An ordinal representing the elevation of this map relative to other maps in the stack."}),subtitle:f.Optional(f.String({description:"The subtitle of the floor."}))}),hn],{$id:"FloorProperties"}),ZS=zt(f.Union([f.Ref(Ks),f.Ref(Ws),f.Null()]),f.Ref(JS),{$id:"FloorFeature"}),YS=pr(f.Ref(ZS),{$id:"FloorCollection"}),U2=f.Object({floors:f.Ref(YS)}),XS={name:"core:floors",intoBundle:o(function*(e){e.floors!=null&&(yield{path:"floors.geojson",contents:e.floors})},"intoBundle"),fromBundle:o((e,t,r)=>{if(e==="floors.geojson")return{floors:r(t)}},"fromBundle"),schema:U2,references:[JS,ZS,YS]};c();c();c();var hy=class hy{constructor(t){tt(this,"_value");this._value=t}[Symbol.iterator](){return this}next(){if(this._value==null)return{done:!0,value:void 0};let t=this._value;return this._value=null,{done:!1,value:t}}};o(hy,"OptionIterator");var nf=hy,gy=class gy{constructor(t){tt(this,"_tag","Some");tt(this,"_value");this._value=t}get value(){return this._value}isSome(){return!0}isSomeAnd(t){return t(this.value)}isNone(){return!1}equals(t){return t.isSome()&&t.value===this.value}expect(t){return this.value}unwrap(){return this.value}unwrapOr(t){return this.value}unwrapOrElse(t){return this.value}inspect(t){return t(this.value),this}inspectNone(t){return this}map(t){return QS(t(this.value))}mapAsync(t){return t(this.value).then(r=>QS(r))}mapOr(t,r){return this.map(t).unwrapOr(r)}mapOrAsync(t,r){return this.mapAsync(t).then(n=>n.unwrapOr(r))}mapOrElse(t,r){return this.map(t).unwrapOrElse(r)}mapOrElseAsync(t,r){return this.mapAsync(t).then(n=>n.unwrapOrElse(r))}and(t){return t}andThen(t){return t(this.value)}andThenAsync(t){return t(this.value)}filter(t){return t(this.value)?this:Yo()}or(t){return this}orElse(t){return this}xor(t){return t.isSome()?Yo():this}toString(){return"Some(".concat(this.value,")")}okOr(t){return B(this.value)}okOrElse(t){return B(this.value)}iter(){return new nf(this.value)}[Symbol.iterator](){return this.iter()}zip(t){return t.isSome()?Hs([this.value,t.value]):Yo()}zipWith(t,r){return t.isSome()?Hs(r(this.value,t.value)):Yo()}get[Symbol.toStringTag](){return"Some"}};o(gy,"Some");var of=gy,xy=class xy{constructor(){tt(this,"_tag","None")}get value(){return null}isSome(){return!1}isSomeAnd(t){return!1}isNone(){return!0}equals(t){return t.isNone()}expect(t){throw new Error(t)}unwrap(){throw new Error("Tried to unwrap a None value!")}unwrapOr(t){return t}unwrapOrElse(t){return t()}inspect(t){return this}inspectNone(t){return t(),this}map(t){return this}mapAsync(t){return Promise.resolve(this)}mapOr(t,r){return r}mapOrAsync(t,r){return Promise.resolve(r)}mapOrElse(t,r){return r()}mapOrElseAsync(t,r){return r()}and(t){return this}andThen(t){return this}andThenAsync(t){return Promise.resolve(this)}filter(t){return this}or(t){return t}orElse(t){return t()}xor(t){return t}toString(){return"None"}okOr(t){return W(t)}okOrElse(t){return W(t())}iter(){return new nf(null)}[Symbol.iterator](){return this.iter()}zip(t){return this}zipWith(t,r){return this}get[Symbol.toStringTag](){return"None"}};o(xy,"None");var sf=xy,Hs=o(e=>new of(e),"some"),Yo=o(()=>new sf,"none"),QS=o(e=>e instanceof of||e instanceof sf?e:e==null?Yo():Hs(e),"option");var wy=class wy{constructor(t){tt(this,"_value");this._value=t}[Symbol.iterator](){return this}next(){if(this._value==null)return{done:!0,value:void 0};let t=this._value;return this._value=null,{done:!1,value:t}}};o(wy,"ResultIterator");var af=wy,$y=class $y{constructor(t){tt(this,"_tag","Ok");tt(this,"_value");this._value=t}get value(){return this._value}get error(){return null}isOk(){return!0}isOkAnd(t){return t(this.value)}isErr(){return!1}isErrAnd(t){return!1}ok(){return Hs(this.value)}err(){return Yo()}expect(t){return this.value}expectErr(t){throw new Error(t)}unwrap(){return this.value}unwrapOr(t){return this.value}unwrapOrElse(t){return this.value}inspect(t){return t(this.value),this}inspectErr(){return this}map(t){return B(t(this.value))}async mapAsync(t){return t(this.value).then(B)}mapOr(t,r){return t(this.value)}async mapOrAsync(t,r){return t(this.value)}mapOrElse(t,r){return t(this.value)}async mapOrElseAsync(t,r){return t(this.value)}mapErr(t){return this}iter(){return new af(this.value)}[Symbol.iterator](){return this.iter()}and(t){return t}andThen(t){return t(this.value)}or(t){return this}orElse(t){return this}async andThenAsync(t){return t(this.value)}toString(){return"Ok(".concat(this.value,")")}get[Symbol.toStringTag](){return"Ok"}};o($y,"Ok");var Iy=$y,cf=class cf{constructor(t){tt(this,"_tag","Err");tt(this,"_error");this._error=t}get value(){return null}get error(){return this._error}isOk(){return!1}isOkAnd(t){return!1}isErr(){return!0}isErrAnd(t){return t(this.error)}ok(){return Yo()}err(){return Hs(this.error)}expect(t){throw new Error(t)}expectErr(t){return this.error}unwrap(){throw this.error}unwrapOr(t){return t}unwrapOrElse(t){return t()}inspect(){return this}inspectErr(t){return t(this.error),this}map(t){return this}iter(){return new af(null)}[Symbol.iterator](){return this.iter()}async mapAsync(t){return this}mapOr(t,r){return r}async mapOrAsync(t,r){return r}mapOrElse(t,r){return r()}async mapOrElseAsync(t,r){return r()}mapErr(t){return new cf(t(this.error))}and(t){return this}andThen(t){return this}async andThenAsync(t){return this}or(t){return t}orElse(t){return t(this.error)}toString(){return"Err(".concat(this.error,")")}get[Symbol.toStringTag](){return"Err"}};o(cf,"Err");var by=cf,B=o(e=>new Iy(e),"ok"),W=o(e=>new by(e),"err");c();var Cn;(function(e){e.GeometryMissingError="GeometryMissingError",e.FloorMissingError="FloorMissingError",e.UnknownFloorError="UnknownFloorError",e.UnknownGeometryError="UnknownGeometryError"})(Cn||(Cn={}));var D2=o(e=>{var t,r;return new Map((r=(t=e.floors)==null?void 0:t.features.map(n=>[n.properties.id,n]))!=null?r:[])},"createFloorMap"),Io=o(e=>{let t=D2(e);return o(n=>{let i=t.get(n);return i==null?W({kind:Cn.UnknownFloorError,properties:{floorId:n}}):B(i)},"floorLookup")},"createFloorLookup");c();c();c();c();var bt=o(e=>f.Unsafe(e),"PartialRecord");c();var Ke=o(e=>Object.keys(e),"typedKeys");c();var eP=o(e=>{if(e.floors==null)return W({kind:Cn.FloorMissingError,properties:null});if(e.geometry==null)return W({kind:Cn.GeometryMissingError,properties:null});let t=Io(e);for(let r of Ke(e.geometry)){let n=t(r);if(n.isErr())return n}return B(!0)},"validateGeometry");var tP=f.Intersect([f.Object({id:f.Ref(er)}),hn],{$id:"GeometryProperties"}),rP=zt(f.Union([f.Ref(tr),f.Ref(ef),f.Ref(tf),f.Ref(rf),f.Ref(Ks),f.Ref(Ws)]),f.Ref(tP),{$id:"GeometryFeature"}),nP=pr(f.Ref(rP),{$id:"GeometryCollection"}),q2=f.Object({geometry:bt(f.Record(je,f.Ref(nP),{additionalProperties:!1}))},{$id:"GeometrySchema"}),z2=/^geometry\/(.*)\.geojson$/,oP={name:"core:geometry",schema:q2,intoBundle:o(function*(e){if(e.geometry!=null)for(let t of Ke(e.geometry))yield{path:"geometry/".concat(t,".geojson"),contents:e.geometry[t]}},"intoBundle"),fromBundle:o((e,t,r)=>{var i;let n=(i=e.match(z2))==null?void 0:i[1];if(n)return{geometry:{[n]:r(t)}}},"fromBundle"),references:[tP,rP,nP],integrityCheck:eP};c();c();var rr=o(e=>Object.entries(e),"typedEntries");var V2=o(e=>{var r;let t=new Map;for(let[n,i]of rr((r=e.geometry)!=null?r:{}))t.set(n,new Map(i==null?void 0:i.features.map(s=>[s.properties.id,s])));return t},"createLookupMap"),kt=o(e=>{let t=V2(e);return o((n,i)=>{let s=t.get(n);if(s==null)return W({kind:Cn.UnknownFloorError,properties:{floorId:n}});let a=s.get(i);return a==null?W({kind:Cn.UnknownGeometryError,properties:{floorId:n,geometryId:i}}):B(a)},"geometryLookup")},"createGeometryLookup");c();var vy=f.Object({type:f.Literal("file"),name:f.String({description:"The name of the file."})},{$id:"ManifestFile"}),iP=f.Recursive(e=>f.Object({type:f.Literal("folder"),name:f.String({description:"The name of the folder."}),children:f.Array(f.Union([e,f.Ref(vy)]),{minItems:1,description:"The children of the folder."})}),{$id:"ManifestFolder"}),sP=f.Object({name:f.String({description:"The name of the map."}),version:f.Literal("3.0.0",{description:"The version of the manifest."}),orgId:f.Optional(f.String({description:"The identifier of the organization that the map this MVF is for belongs to."})),mapId:f.Optional(f.String({description:"The identifier of the map that this MVF is for."})),contents:f.Array(f.Union([f.Ref(iP),f.Ref(vy)]),{minItems:1,description:"The contents of the MVF bundle."}),time:f.String({format:"date-time",description:"An ISO 8601 date-time string, including timezone offset."}),tzid:f.Optional(f.Unsafe(f.String({description:"A valid IANA timezone identifier.",pattern:"^[A-Za-z0-9_-]+/[A-Za-z0-9_-]+$"}))),naturalBearing:f.Optional(f.Number({minimum:0,maximum:360,description:'The angle, in degrees, the map is considered to be "naturally oriented" as, rather than facing directly north. 90 degrees means East is "up"'})),defaultFloor:f.Optional(f.Ref(je,{description:"The default floor ID of the map."})),language:f.Optional(f.String({description:"The language code of the map."}))},{$id:"ManifestProperties"}),aP=pr(zt(tr,f.Ref(sP)),{$id:"ManifestCollection"},{minItems:1,maxItems:1}),B2=f.Object({manifest:f.Ref(aP)}),cP={name:"core:manifest",intoBundle:o(function*(e){e.manifest!=null&&(yield{path:"manifest.geojson",contents:e.manifest})},"intoBundle"),fromBundle:o((e,t,r)=>{if(e==="manifest.geojson")return{manifest:r(t)}},"fromBundle"),schema:B2,references:[vy,iP,sP,aP]};var Jr=f.Object({geometryId:f.Ref(er)},{$id:"WithGeometryId"}),uf=f.Object({geometryIds:f.Array(f.Ref(er))},{$id:"WithGeometryIds"}),Oy=[Jr,uf];c();c();var uP=o((e,t)=>f.Unsafe(f.Transform(f.String(t)).Decode(r=>e.includes(r)?r:"unknown").Encode(r=>r)),"SafeStringEnumSchema"),Or=o((e,t)=>{let r=uP(e,t),n=[...e,"unknown"],i=Object.freeze(Object.fromEntries([...e,"unknown"].map(s=>[s,s])));return{schema:r,values:n,record:i}},"SafeStringEnum");c();c();c();var bc;(function(e){e.AnnotationNonPointGeometryError="AnnotationNonPointGeometryError",e.AnnotationUnknownSymbolError="AnnotationUnknownSymbolError"})(bc||(bc={}));var fP=o(e=>{var n;if(e.annotations==null)return B(!0);let t=kt(e),r=new Set(Ke((n=e.annotationSymbols)!=null?n:{}));for(let i of Ke(e.annotations)){let s=e.annotations[i];if(s!=null)for(let a of s){if(!r.has(a.symbolKey))return W({kind:bc.AnnotationUnknownSymbolError,properties:{annotationId:a.id,symbolKey:a.symbolKey}});let u=t(i,a.geometryId);if(u.isErr())return u;if(u.value.geometry.type!=="Point")return W({kind:bc.AnnotationNonPointGeometryError,properties:{annotationId:a.id,floorId:i,geometryId:a.geometryId}})}}return B(!0)},"validateAnnotations");var lP=mt("a","AnnotationId"),_y=f.Intersect([Jr,f.Object({id:f.Ref(lP,{description:"The unique identifier for the annotation."}),externalId:f.Optional(f.String({description:"The external identifier for the annotation."})),symbolKey:f.String({description:"The symbol identifier for the annotation."})})],{$id:"AnnotationProperties"}),pP=f.Object({url:f.String({format:"uri",description:"The URL for the symbol."}),name:f.String({description:"The name of the symbol."})},{$id:"AnnotationSymbol"}),G2=f.Object({annotations:bt(f.Record(je,f.Array(f.Ref(_y)),{additionalProperties:!1})),annotationSymbols:bt(f.Record(f.Index(_y,["symbolKey"]),f.Ref(pP)))},{$id:"AnnotationsSchema"}),K2=/^annotations\/(.*)\.json$/,dP={name:"ext:mvf-annotations",schema:G2,intoBundle:o(function*(e){if(e.annotations!=null)for(let t of Ke(e.annotations))yield{path:"annotations/".concat(t,".json"),contents:e.annotations[t]};e.annotationSymbols!=null&&(yield{path:"annotation-symbols.json",contents:e.annotationSymbols})},"intoBundle"),fromBundle:o((e,t,r)=>{var i;if(e==="annotation-symbols.json")return{annotationSymbols:r(t)};let n=(i=e.match(K2))==null?void 0:i[1];if(n)return{annotations:{[n]:r(t)}}},"fromBundle"),references:[lP,_y,pP],integrityCheck:fP};c();c();c();c();c();c();c();c();var Py=class Py extends re{constructor(t){super("Duplicate type kind '".concat(t,"' detected"))}};o(Py,"TypeSystemDuplicateTypeKind");var Sy=Py,Ey=class Ey extends re{constructor(t){super("Duplicate string format '".concat(t,"' detected"))}};o(Ey,"TypeSystemDuplicateFormat");var wc=Ey,ff;(function(e){function t(n,i){if(Tt.Has(n))throw new Sy(n);return Tt.Set(n,i),(s={})=>Qu(F(g({},s),{[v]:n}))}o(t,"Type"),e.Type=t;function r(n,i){if(lr.Has(n))throw new wc(n);return lr.Set(n,i),n}o(r,"Format"),e.Format=r})(ff||(ff={}));c();c();c();function W2(e){switch(e.errorType){case S.ArrayContains:return"Expected array to contain at least one matching value";case S.ArrayMaxContains:return"Expected array to contain no more than ".concat(e.schema.maxContains," matching values");case S.ArrayMinContains:return"Expected array to contain at least ".concat(e.schema.minContains," matching values");case S.ArrayMaxItems:return"Expected array length to be less or equal to ".concat(e.schema.maxItems);case S.ArrayMinItems:return"Expected array length to be greater or equal to ".concat(e.schema.minItems);case S.ArrayUniqueItems:return"Expected array elements to be unique";case S.Array:return"Expected array";case S.AsyncIterator:return"Expected AsyncIterator";case S.BigIntExclusiveMaximum:return"Expected bigint to be less than ".concat(e.schema.exclusiveMaximum);case S.BigIntExclusiveMinimum:return"Expected bigint to be greater than ".concat(e.schema.exclusiveMinimum);case S.BigIntMaximum:return"Expected bigint to be less or equal to ".concat(e.schema.maximum);case S.BigIntMinimum:return"Expected bigint to be greater or equal to ".concat(e.schema.minimum);case S.BigIntMultipleOf:return"Expected bigint to be a multiple of ".concat(e.schema.multipleOf);case S.BigInt:return"Expected bigint";case S.Boolean:return"Expected boolean";case S.DateExclusiveMinimumTimestamp:return"Expected Date timestamp to be greater than ".concat(e.schema.exclusiveMinimumTimestamp);case S.DateExclusiveMaximumTimestamp:return"Expected Date timestamp to be less than ".concat(e.schema.exclusiveMaximumTimestamp);case S.DateMinimumTimestamp:return"Expected Date timestamp to be greater or equal to ".concat(e.schema.minimumTimestamp);case S.DateMaximumTimestamp:return"Expected Date timestamp to be less or equal to ".concat(e.schema.maximumTimestamp);case S.DateMultipleOfTimestamp:return"Expected Date timestamp to be a multiple of ".concat(e.schema.multipleOfTimestamp);case S.Date:return"Expected Date";case S.Function:return"Expected function";case S.IntegerExclusiveMaximum:return"Expected integer to be less than ".concat(e.schema.exclusiveMaximum);case S.IntegerExclusiveMinimum:return"Expected integer to be greater than ".concat(e.schema.exclusiveMinimum);case S.IntegerMaximum:return"Expected integer to be less or equal to ".concat(e.schema.maximum);case S.IntegerMinimum:return"Expected integer to be greater or equal to ".concat(e.schema.minimum);case S.IntegerMultipleOf:return"Expected integer to be a multiple of ".concat(e.schema.multipleOf);case S.Integer:return"Expected integer";case S.IntersectUnevaluatedProperties:return"Unexpected property";case S.Intersect:return"Expected all values to match";case S.Iterator:return"Expected Iterator";case S.Literal:return"Expected ".concat(typeof e.schema.const=="string"?"'".concat(e.schema.const,"'"):e.schema.const);case S.Never:return"Never";case S.Not:return"Value should not match";case S.Null:return"Expected null";case S.NumberExclusiveMaximum:return"Expected number to be less than ".concat(e.schema.exclusiveMaximum);case S.NumberExclusiveMinimum:return"Expected number to be greater than ".concat(e.schema.exclusiveMinimum);case S.NumberMaximum:return"Expected number to be less or equal to ".concat(e.schema.maximum);case S.NumberMinimum:return"Expected number to be greater or equal to ".concat(e.schema.minimum);case S.NumberMultipleOf:return"Expected number to be a multiple of ".concat(e.schema.multipleOf);case S.Number:return"Expected number";case S.Object:return"Expected object";case S.ObjectAdditionalProperties:return"Unexpected property";case S.ObjectMaxProperties:return"Expected object to have no more than ".concat(e.schema.maxProperties," properties");case S.ObjectMinProperties:return"Expected object to have at least ".concat(e.schema.minProperties," properties");case S.ObjectRequiredProperty:return"Expected required property";case S.Promise:return"Expected Promise";case S.RegExp:return"Expected string to match regular expression";case S.StringFormatUnknown:return"Unknown format '".concat(e.schema.format,"'");case S.StringFormat:return"Expected string to match '".concat(e.schema.format,"' format");case S.StringMaxLength:return"Expected string length less or equal to ".concat(e.schema.maxLength);case S.StringMinLength:return"Expected string length greater or equal to ".concat(e.schema.minLength);case S.StringPattern:return"Expected string to match '".concat(e.schema.pattern,"'");case S.String:return"Expected string";case S.Symbol:return"Expected symbol";case S.TupleLength:return"Expected tuple to have ".concat(e.schema.maxItems||0," elements");case S.Tuple:return"Expected tuple";case S.Uint8ArrayMaxByteLength:return"Expected byte length less or equal to ".concat(e.schema.maxByteLength);case S.Uint8ArrayMinByteLength:return"Expected byte length greater or equal to ".concat(e.schema.minByteLength);case S.Uint8Array:return"Expected Uint8Array";case S.Undefined:return"Expected undefined";case S.Union:return"Expected union value";case S.Void:return"Expected void";case S.Kind:return"Expected kind '".concat(e.schema[v],"'");default:return"Unknown error type"}}o(W2,"DefaultErrorFunction");var H2=W2;function mP(){return H2}o(mP,"GetErrorFunction");c();var ky=class ky extends re{constructor(t){super("Unable to dereference schema with $id '".concat(t.$ref,"'")),this.schema=t}};o(ky,"TypeDereferenceError");var Ty=ky;function J2(e,t){let r=t.find(n=>n.$id===e.$ref);if(r===void 0)throw new Ty(e);return Ne(r,t)}o(J2,"Resolve");function Zr(e,t){return!_e(e.$id)||t.some(r=>r.$id===e.$id)||t.push(e),t}o(Zr,"Pushref");function Ne(e,t){return e[v]==="This"||e[v]==="Ref"?J2(e,t):e}o(Ne,"Deref");c();var Ay=class Ay extends re{constructor(t){super("Unable to hash value"),this.value=t}};o(Ay,"ValueHashError");var Fy=Ay,Er;(function(e){e[e.Undefined=0]="Undefined",e[e.Null=1]="Null",e[e.Boolean=2]="Boolean",e[e.Number=3]="Number",e[e.String=4]="String",e[e.Object=5]="Object",e[e.Array=6]="Array",e[e.Date=7]="Date",e[e.Uint8Array=8]="Uint8Array",e[e.Symbol=9]="Symbol",e[e.BigInt=10]="BigInt"})(Er||(Er={}));var Js=BigInt("14695981039346656037"),[Z2,Y2]=[BigInt("1099511628211"),BigInt("18446744073709551616")],X2=Array.from({length:256}).map((e,t)=>BigInt(t)),yP=new Float64Array(1),hP=new DataView(yP.buffer),gP=new Uint8Array(yP.buffer);function*Q2(e){let t=e===0?1:Math.ceil(Math.floor(Math.log2(e)+1)/8);for(let r=0;r<t;r++)yield e>>8*(t-1-r)&255}o(Q2,"NumberToBytes");function eD(e){nr(Er.Array);for(let t of e)Zs(t)}o(eD,"ArrayType");function tD(e){nr(Er.Boolean),nr(e?1:0)}o(tD,"BooleanType");function rD(e){nr(Er.BigInt),hP.setBigInt64(0,e);for(let t of gP)nr(t)}o(rD,"BigIntType");function nD(e){nr(Er.Date),Zs(e.getTime())}o(nD,"DateType");function oD(e){nr(Er.Null)}o(oD,"NullType");function iD(e){nr(Er.Number),hP.setFloat64(0,e);for(let t of gP)nr(t)}o(iD,"NumberType");function sD(e){nr(Er.Object);for(let t of globalThis.Object.getOwnPropertyNames(e).sort())Zs(t),Zs(e[t])}o(sD,"ObjectType");function aD(e){nr(Er.String);for(let t=0;t<e.length;t++)for(let r of Q2(e.charCodeAt(t)))nr(r)}o(aD,"StringType");function cD(e){nr(Er.Symbol),Zs(e.description)}o(cD,"SymbolType");function uD(e){nr(Er.Uint8Array);for(let t=0;t<e.length;t++)nr(e[t])}o(uD,"Uint8ArrayType");function fD(e){return nr(Er.Undefined)}o(fD,"UndefinedType");function Zs(e){if(se(e))return eD(e);if(Fn(e))return tD(e);if(Dt(e))return rD(e);if(ur(e))return nD(e);if(ao(e))return oD(e);if(X(e))return iD(e);if(ae(e))return sD(e);if(_e(e))return aD(e);if(co(e))return cD(e);if(Ps(e))return uD(e);if(ht(e))return fD(e);throw new Fy(e)}o(Zs,"Visit");function nr(e){Js=Js^X2[e],Js=Js*Z2%Y2}o(nr,"FNV1A64");function Xo(e){return Js=BigInt("14695981039346656037"),Zs(e),Js}o(Xo,"Hash");c();var Ny=class Ny extends re{constructor(t){super("Unknown type"),this.schema=t}};o(Ny,"ValueCheckUnknownTypeError");var jy=Ny;function lD(e){return e[v]==="Any"||e[v]==="Unknown"}o(lD,"IsAnyOrUnknown");function Ie(e){return e!==void 0}o(Ie,"IsDefined");function pD(e,t,r){return!0}o(pD,"FromAny");function dD(e,t,r){if(!se(r)||Ie(e.minItems)&&!(r.length>=e.minItems)||Ie(e.maxItems)&&!(r.length<=e.maxItems)||!r.every(s=>Vt(e.items,t,s))||e.uniqueItems===!0&&!function(){let s=new Set;for(let a of r){let u=Xo(a);if(s.has(u))return!1;s.add(u)}return!0}())return!1;if(!(Ie(e.contains)||X(e.minContains)||X(e.maxContains)))return!0;let n=Ie(e.contains)?e.contains:He(),i=r.reduce((s,a)=>Vt(n,t,a)?s+1:s,0);return!(i===0||X(e.minContains)&&i<e.minContains||X(e.maxContains)&&i>e.maxContains)}o(dD,"FromArray");function mD(e,t,r){return Eu(r)}o(mD,"FromAsyncIterator");function yD(e,t,r){return!(!Dt(r)||Ie(e.exclusiveMaximum)&&!(r<e.exclusiveMaximum)||Ie(e.exclusiveMinimum)&&!(r>e.exclusiveMinimum)||Ie(e.maximum)&&!(r<=e.maximum)||Ie(e.minimum)&&!(r>=e.minimum)||Ie(e.multipleOf)&&r%e.multipleOf!==BigInt(0))}o(yD,"FromBigInt");function hD(e,t,r){return Fn(r)}o(hD,"FromBoolean");function gD(e,t,r){return Vt(e.returns,t,r.prototype)}o(gD,"FromConstructor");function xD(e,t,r){return!(!ur(r)||Ie(e.exclusiveMaximumTimestamp)&&!(r.getTime()<e.exclusiveMaximumTimestamp)||Ie(e.exclusiveMinimumTimestamp)&&!(r.getTime()>e.exclusiveMinimumTimestamp)||Ie(e.maximumTimestamp)&&!(r.getTime()<=e.maximumTimestamp)||Ie(e.minimumTimestamp)&&!(r.getTime()>=e.minimumTimestamp)||Ie(e.multipleOfTimestamp)&&r.getTime()%e.multipleOfTimestamp!==0)}o(xD,"FromDate");function ID(e,t,r){return Bo(r)}o(ID,"FromFunction");function bD(e,t,r){return!(!Fu(r)||Ie(e.exclusiveMaximum)&&!(r<e.exclusiveMaximum)||Ie(e.exclusiveMinimum)&&!(r>e.exclusiveMinimum)||Ie(e.maximum)&&!(r<=e.maximum)||Ie(e.minimum)&&!(r>=e.minimum)||Ie(e.multipleOf)&&r%e.multipleOf!==0)}o(bD,"FromInteger");function wD(e,t,r){let n=e.allOf.every(i=>Vt(i,t,r));if(e.unevaluatedProperties===!1){let i=new RegExp(ho(e)),s=Object.getOwnPropertyNames(r).every(a=>i.test(a));return n&&s}else if(Se(e.unevaluatedProperties)){let i=new RegExp(ho(e)),s=Object.getOwnPropertyNames(r).every(a=>i.test(a)||Vt(e.unevaluatedProperties,t,r[a]));return n&&s}else return n}o(wD,"FromIntersect");function $D(e,t,r){return Tu(r)}o($D,"FromIterator");function vD(e,t,r){return r===e.const}o(vD,"FromLiteral");function OD(e,t,r){return!1}o(OD,"FromNever");function _D(e,t,r){return!Vt(e.not,t,r)}o(_D,"FromNot");function SD(e,t,r){return ao(r)}o(SD,"FromNull");function PD(e,t,r){return!(!Ge.IsNumberLike(r)||Ie(e.exclusiveMaximum)&&!(r<e.exclusiveMaximum)||Ie(e.exclusiveMinimum)&&!(r>e.exclusiveMinimum)||Ie(e.minimum)&&!(r>=e.minimum)||Ie(e.maximum)&&!(r<=e.maximum)||Ie(e.multipleOf)&&r%e.multipleOf!==0)}o(PD,"FromNumber");function ED(e,t,r){if(!Ge.IsObjectLike(r)||Ie(e.minProperties)&&!(Object.getOwnPropertyNames(r).length>=e.minProperties)||Ie(e.maxProperties)&&!(Object.getOwnPropertyNames(r).length<=e.maxProperties))return!1;let n=Object.getOwnPropertyNames(e.properties);for(let i of n){let s=e.properties[i];if(e.required&&e.required.includes(i)){if(!Vt(s,t,r[i])||(xo(s)||lD(s))&&!(i in r))return!1}else if(Ge.IsExactOptionalProperty(r,i)&&!Vt(s,t,r[i]))return!1}if(e.additionalProperties===!1){let i=Object.getOwnPropertyNames(r);return e.required&&e.required.length===n.length&&i.length===n.length?!0:i.every(s=>n.includes(s))}else return typeof e.additionalProperties=="object"?Object.getOwnPropertyNames(r).every(s=>n.includes(s)||Vt(e.additionalProperties,t,r[s])):!0}o(ED,"FromObject");function TD(e,t,r){return ku(r)}o(TD,"FromPromise");function kD(e,t,r){if(!Ge.IsRecordLike(r)||Ie(e.minProperties)&&!(Object.getOwnPropertyNames(r).length>=e.minProperties)||Ie(e.maxProperties)&&!(Object.getOwnPropertyNames(r).length<=e.maxProperties))return!1;let[n,i]=Object.entries(e.patternProperties)[0],s=new RegExp(n),a=Object.entries(r).every(([d,m])=>s.test(d)?Vt(i,t,m):!0),u=typeof e.additionalProperties=="object"?Object.entries(r).every(([d,m])=>s.test(d)?!0:Vt(e.additionalProperties,t,m)):!0,l=e.additionalProperties===!1?Object.getOwnPropertyNames(r).every(d=>s.test(d)):!0;return a&&u&&l}o(kD,"FromRecord");function FD(e,t,r){return Vt(Ne(e,t),t,r)}o(FD,"FromRef");function AD(e,t,r){let n=new RegExp(e.source,e.flags);return Ie(e.minLength)&&!(r.length>=e.minLength)||Ie(e.maxLength)&&!(r.length<=e.maxLength)?!1:n.test(r)}o(AD,"FromRegExp");function jD(e,t,r){return!_e(r)||Ie(e.minLength)&&!(r.length>=e.minLength)||Ie(e.maxLength)&&!(r.length<=e.maxLength)||Ie(e.pattern)&&!new RegExp(e.pattern).test(r)?!1:Ie(e.format)?lr.Has(e.format)?lr.Get(e.format)(r):!1:!0}o(jD,"FromString");function ND(e,t,r){return co(r)}o(ND,"FromSymbol");function RD(e,t,r){return _e(r)&&new RegExp(e.pattern).test(r)}o(RD,"FromTemplateLiteral");function CD(e,t,r){return Vt(Ne(e,t),t,r)}o(CD,"FromThis");function MD(e,t,r){if(!se(r)||e.items===void 0&&r.length!==0||r.length!==e.maxItems)return!1;if(!e.items)return!0;for(let n=0;n<e.items.length;n++)if(!Vt(e.items[n],t,r[n]))return!1;return!0}o(MD,"FromTuple");function LD(e,t,r){return ht(r)}o(LD,"FromUndefined");function UD(e,t,r){return e.anyOf.some(n=>Vt(n,t,r))}o(UD,"FromUnion");function DD(e,t,r){return!(!Ps(r)||Ie(e.maxByteLength)&&!(r.length<=e.maxByteLength)||Ie(e.minByteLength)&&!(r.length>=e.minByteLength))}o(DD,"FromUint8Array");function qD(e,t,r){return!0}o(qD,"FromUnknown");function zD(e,t,r){return Ge.IsVoidLike(r)}o(zD,"FromVoid");function VD(e,t,r){return Tt.Has(e[v])?Tt.Get(e[v])(e,r):!1}o(VD,"FromKind");function Vt(e,t,r){let n=Ie(e.$id)?[...t,e]:t,i=e;switch(i[v]){case"Any":return pD(i,n,r);case"Array":return dD(i,n,r);case"AsyncIterator":return mD(i,n,r);case"BigInt":return yD(i,n,r);case"Boolean":return hD(i,n,r);case"Constructor":return gD(i,n,r);case"Date":return xD(i,n,r);case"Function":return ID(i,n,r);case"Integer":return bD(i,n,r);case"Intersect":return wD(i,n,r);case"Iterator":return $D(i,n,r);case"Literal":return vD(i,n,r);case"Never":return OD(i,n,r);case"Not":return _D(i,n,r);case"Null":return SD(i,n,r);case"Number":return PD(i,n,r);case"Object":return ED(i,n,r);case"Promise":return TD(i,n,r);case"Record":return kD(i,n,r);case"Ref":return FD(i,n,r);case"RegExp":return AD(i,n,r);case"String":return jD(i,n,r);case"Symbol":return ND(i,n,r);case"TemplateLiteral":return RD(i,n,r);case"This":return CD(i,n,r);case"Tuple":return MD(i,n,r);case"Undefined":return LD(i,n,r);case"Union":return UD(i,n,r);case"Uint8Array":return DD(i,n,r);case"Unknown":return qD(i,n,r);case"Void":return zD(i,n,r);default:if(!Tt.Has(i[v]))throw new jy(i);return VD(i,n,r)}}o(Vt,"Visit");function he(...e){return e.length===3?Vt(e[0],e[1],e[2]):Vt(e[0],[],e[1])}o(he,"Check");var S;(function(e){e[e.ArrayContains=0]="ArrayContains",e[e.ArrayMaxContains=1]="ArrayMaxContains",e[e.ArrayMaxItems=2]="ArrayMaxItems",e[e.ArrayMinContains=3]="ArrayMinContains",e[e.ArrayMinItems=4]="ArrayMinItems",e[e.ArrayUniqueItems=5]="ArrayUniqueItems",e[e.Array=6]="Array",e[e.AsyncIterator=7]="AsyncIterator",e[e.BigIntExclusiveMaximum=8]="BigIntExclusiveMaximum",e[e.BigIntExclusiveMinimum=9]="BigIntExclusiveMinimum",e[e.BigIntMaximum=10]="BigIntMaximum",e[e.BigIntMinimum=11]="BigIntMinimum",e[e.BigIntMultipleOf=12]="BigIntMultipleOf",e[e.BigInt=13]="BigInt",e[e.Boolean=14]="Boolean",e[e.DateExclusiveMaximumTimestamp=15]="DateExclusiveMaximumTimestamp",e[e.DateExclusiveMinimumTimestamp=16]="DateExclusiveMinimumTimestamp",e[e.DateMaximumTimestamp=17]="DateMaximumTimestamp",e[e.DateMinimumTimestamp=18]="DateMinimumTimestamp",e[e.DateMultipleOfTimestamp=19]="DateMultipleOfTimestamp",e[e.Date=20]="Date",e[e.Function=21]="Function",e[e.IntegerExclusiveMaximum=22]="IntegerExclusiveMaximum",e[e.IntegerExclusiveMinimum=23]="IntegerExclusiveMinimum",e[e.IntegerMaximum=24]="IntegerMaximum",e[e.IntegerMinimum=25]="IntegerMinimum",e[e.IntegerMultipleOf=26]="IntegerMultipleOf",e[e.Integer=27]="Integer",e[e.IntersectUnevaluatedProperties=28]="IntersectUnevaluatedProperties",e[e.Intersect=29]="Intersect",e[e.Iterator=30]="Iterator",e[e.Kind=31]="Kind",e[e.Literal=32]="Literal",e[e.Never=33]="Never",e[e.Not=34]="Not",e[e.Null=35]="Null",e[e.NumberExclusiveMaximum=36]="NumberExclusiveMaximum",e[e.NumberExclusiveMinimum=37]="NumberExclusiveMinimum",e[e.NumberMaximum=38]="NumberMaximum",e[e.NumberMinimum=39]="NumberMinimum",e[e.NumberMultipleOf=40]="NumberMultipleOf",e[e.Number=41]="Number",e[e.ObjectAdditionalProperties=42]="ObjectAdditionalProperties",e[e.ObjectMaxProperties=43]="ObjectMaxProperties",e[e.ObjectMinProperties=44]="ObjectMinProperties",e[e.ObjectRequiredProperty=45]="ObjectRequiredProperty",e[e.Object=46]="Object",e[e.Promise=47]="Promise",e[e.RegExp=48]="RegExp",e[e.StringFormatUnknown=49]="StringFormatUnknown",e[e.StringFormat=50]="StringFormat",e[e.StringMaxLength=51]="StringMaxLength",e[e.StringMinLength=52]="StringMinLength",e[e.StringPattern=53]="StringPattern",e[e.String=54]="String",e[e.Symbol=55]="Symbol",e[e.TupleLength=56]="TupleLength",e[e.Tuple=57]="Tuple",e[e.Uint8ArrayMaxByteLength=58]="Uint8ArrayMaxByteLength",e[e.Uint8ArrayMinByteLength=59]="Uint8ArrayMinByteLength",e[e.Uint8Array=60]="Uint8Array",e[e.Undefined=61]="Undefined",e[e.Union=62]="Union",e[e.Void=63]="Void"})(S||(S={}));var Cy=class Cy extends re{constructor(t){super("Unknown type"),this.schema=t}};o(Cy,"ValueErrorsUnknownTypeError");var Ry=Cy;function bo(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}o(bo,"EscapeKey");function be(e){return e!==void 0}o(be,"IsDefined");var My=class My{constructor(t){this.iterator=t}[Symbol.iterator](){return this.iterator}First(){let t=this.iterator.next();return t.done?void 0:t.value}};o(My,"ValueErrorIterator");var Yr=My;function L(e,t,r,n,i=[]){return{type:e,schema:t,path:r,value:n,message:mP()({errorType:e,path:r,schema:t,value:n,errors:i}),errors:i}}o(L,"Create");function*BD(e,t,r,n){}o(BD,"FromAny");function*GD(e,t,r,n){if(!se(n))return yield L(S.Array,e,r,n);be(e.minItems)&&!(n.length>=e.minItems)&&(yield L(S.ArrayMinItems,e,r,n)),be(e.maxItems)&&!(n.length<=e.maxItems)&&(yield L(S.ArrayMaxItems,e,r,n));for(let a=0;a<n.length;a++)yield*A(Bt(e.items,t,"".concat(r,"/").concat(a),n[a]));if(e.uniqueItems===!0&&!function(){let a=new Set;for(let u of n){let l=Xo(u);if(a.has(l))return!1;a.add(l)}return!0}()&&(yield L(S.ArrayUniqueItems,e,r,n)),!(be(e.contains)||be(e.minContains)||be(e.maxContains)))return;let i=be(e.contains)?e.contains:He(),s=n.reduce((a,u,l)=>Bt(i,t,"".concat(r).concat(l),u).next().done===!0?a+1:a,0);s===0&&(yield L(S.ArrayContains,e,r,n)),X(e.minContains)&&s<e.minContains&&(yield L(S.ArrayMinContains,e,r,n)),X(e.maxContains)&&s>e.maxContains&&(yield L(S.ArrayMaxContains,e,r,n))}o(GD,"FromArray");function*KD(e,t,r,n){Eu(n)||(yield L(S.AsyncIterator,e,r,n))}o(KD,"FromAsyncIterator");function*WD(e,t,r,n){if(!Dt(n))return yield L(S.BigInt,e,r,n);be(e.exclusiveMaximum)&&!(n<e.exclusiveMaximum)&&(yield L(S.BigIntExclusiveMaximum,e,r,n)),be(e.exclusiveMinimum)&&!(n>e.exclusiveMinimum)&&(yield L(S.BigIntExclusiveMinimum,e,r,n)),be(e.maximum)&&!(n<=e.maximum)&&(yield L(S.BigIntMaximum,e,r,n)),be(e.minimum)&&!(n>=e.minimum)&&(yield L(S.BigIntMinimum,e,r,n)),be(e.multipleOf)&&n%e.multipleOf!==BigInt(0)&&(yield L(S.BigIntMultipleOf,e,r,n))}o(WD,"FromBigInt");function*HD(e,t,r,n){Fn(n)||(yield L(S.Boolean,e,r,n))}o(HD,"FromBoolean");function*JD(e,t,r,n){yield*A(Bt(e.returns,t,r,n.prototype))}o(JD,"FromConstructor");function*ZD(e,t,r,n){if(!ur(n))return yield L(S.Date,e,r,n);be(e.exclusiveMaximumTimestamp)&&!(n.getTime()<e.exclusiveMaximumTimestamp)&&(yield L(S.DateExclusiveMaximumTimestamp,e,r,n)),be(e.exclusiveMinimumTimestamp)&&!(n.getTime()>e.exclusiveMinimumTimestamp)&&(yield L(S.DateExclusiveMinimumTimestamp,e,r,n)),be(e.maximumTimestamp)&&!(n.getTime()<=e.maximumTimestamp)&&(yield L(S.DateMaximumTimestamp,e,r,n)),be(e.minimumTimestamp)&&!(n.getTime()>=e.minimumTimestamp)&&(yield L(S.DateMinimumTimestamp,e,r,n)),be(e.multipleOfTimestamp)&&n.getTime()%e.multipleOfTimestamp!==0&&(yield L(S.DateMultipleOfTimestamp,e,r,n))}o(ZD,"FromDate");function*YD(e,t,r,n){Bo(n)||(yield L(S.Function,e,r,n))}o(YD,"FromFunction");function*XD(e,t,r,n){if(!Fu(n))return yield L(S.Integer,e,r,n);be(e.exclusiveMaximum)&&!(n<e.exclusiveMaximum)&&(yield L(S.IntegerExclusiveMaximum,e,r,n)),be(e.exclusiveMinimum)&&!(n>e.exclusiveMinimum)&&(yield L(S.IntegerExclusiveMinimum,e,r,n)),be(e.maximum)&&!(n<=e.maximum)&&(yield L(S.IntegerMaximum,e,r,n)),be(e.minimum)&&!(n>=e.minimum)&&(yield L(S.IntegerMinimum,e,r,n)),be(e.multipleOf)&&n%e.multipleOf!==0&&(yield L(S.IntegerMultipleOf,e,r,n))}o(XD,"FromInteger");function*QD(e,t,r,n){let i=!1;for(let s of e.allOf)for(let a of Bt(s,t,r,n))i=!0,yield a;if(i)return yield L(S.Intersect,e,r,n);if(e.unevaluatedProperties===!1){let s=new RegExp(ho(e));for(let a of Object.getOwnPropertyNames(n))s.test(a)||(yield L(S.IntersectUnevaluatedProperties,e,"".concat(r,"/").concat(a),n))}if(typeof e.unevaluatedProperties=="object"){let s=new RegExp(ho(e));for(let a of Object.getOwnPropertyNames(n))if(!s.test(a)){let u=Bt(e.unevaluatedProperties,t,"".concat(r,"/").concat(a),n[a]).next();u.done||(yield u.value)}}}o(QD,"FromIntersect");function*eq(e,t,r,n){Tu(n)||(yield L(S.Iterator,e,r,n))}o(eq,"FromIterator");function*tq(e,t,r,n){n!==e.const&&(yield L(S.Literal,e,r,n))}o(tq,"FromLiteral");function*rq(e,t,r,n){yield L(S.Never,e,r,n)}o(rq,"FromNever");function*nq(e,t,r,n){Bt(e.not,t,r,n).next().done===!0&&(yield L(S.Not,e,r,n))}o(nq,"FromNot");function*oq(e,t,r,n){ao(n)||(yield L(S.Null,e,r,n))}o(oq,"FromNull");function*iq(e,t,r,n){if(!Ge.IsNumberLike(n))return yield L(S.Number,e,r,n);be(e.exclusiveMaximum)&&!(n<e.exclusiveMaximum)&&(yield L(S.NumberExclusiveMaximum,e,r,n)),be(e.exclusiveMinimum)&&!(n>e.exclusiveMinimum)&&(yield L(S.NumberExclusiveMinimum,e,r,n)),be(e.maximum)&&!(n<=e.maximum)&&(yield L(S.NumberMaximum,e,r,n)),be(e.minimum)&&!(n>=e.minimum)&&(yield L(S.NumberMinimum,e,r,n)),be(e.multipleOf)&&n%e.multipleOf!==0&&(yield L(S.NumberMultipleOf,e,r,n))}o(iq,"FromNumber");function*sq(e,t,r,n){if(!Ge.IsObjectLike(n))return yield L(S.Object,e,r,n);be(e.minProperties)&&!(Object.getOwnPropertyNames(n).length>=e.minProperties)&&(yield L(S.ObjectMinProperties,e,r,n)),be(e.maxProperties)&&!(Object.getOwnPropertyNames(n).length<=e.maxProperties)&&(yield L(S.ObjectMaxProperties,e,r,n));let i=Array.isArray(e.required)?e.required:[],s=Object.getOwnPropertyNames(e.properties),a=Object.getOwnPropertyNames(n);for(let u of i)a.includes(u)||(yield L(S.ObjectRequiredProperty,e.properties[u],"".concat(r,"/").concat(bo(u)),void 0));if(e.additionalProperties===!1)for(let u of a)s.includes(u)||(yield L(S.ObjectAdditionalProperties,e,"".concat(r,"/").concat(bo(u)),n[u]));if(typeof e.additionalProperties=="object")for(let u of a)s.includes(u)||(yield*A(Bt(e.additionalProperties,t,"".concat(r,"/").concat(bo(u)),n[u])));for(let u of s){let l=e.properties[u];e.required&&e.required.includes(u)?(yield*A(Bt(l,t,"".concat(r,"/").concat(bo(u)),n[u])),xo(e)&&!(u in n)&&(yield L(S.ObjectRequiredProperty,l,"".concat(r,"/").concat(bo(u)),void 0))):Ge.IsExactOptionalProperty(n,u)&&(yield*A(Bt(l,t,"".concat(r,"/").concat(bo(u)),n[u])))}}o(sq,"FromObject");function*aq(e,t,r,n){ku(n)||(yield L(S.Promise,e,r,n))}o(aq,"FromPromise");function*cq(e,t,r,n){if(!Ge.IsRecordLike(n))return yield L(S.Object,e,r,n);be(e.minProperties)&&!(Object.getOwnPropertyNames(n).length>=e.minProperties)&&(yield L(S.ObjectMinProperties,e,r,n)),be(e.maxProperties)&&!(Object.getOwnPropertyNames(n).length<=e.maxProperties)&&(yield L(S.ObjectMaxProperties,e,r,n));let[i,s]=Object.entries(e.patternProperties)[0],a=new RegExp(i);for(let[u,l]of Object.entries(n))a.test(u)&&(yield*A(Bt(s,t,"".concat(r,"/").concat(bo(u)),l)));if(typeof e.additionalProperties=="object")for(let[u,l]of Object.entries(n))a.test(u)||(yield*A(Bt(e.additionalProperties,t,"".concat(r,"/").concat(bo(u)),l)));if(e.additionalProperties===!1){for(let[u,l]of Object.entries(n))if(!a.test(u))return yield L(S.ObjectAdditionalProperties,e,"".concat(r,"/").concat(bo(u)),l)}}o(cq,"FromRecord");function*uq(e,t,r,n){yield*A(Bt(Ne(e,t),t,r,n))}o(uq,"FromRef");function*fq(e,t,r,n){if(!_e(n))return yield L(S.String,e,r,n);if(be(e.minLength)&&!(n.length>=e.minLength)&&(yield L(S.StringMinLength,e,r,n)),be(e.maxLength)&&!(n.length<=e.maxLength)&&(yield L(S.StringMaxLength,e,r,n)),!new RegExp(e.source,e.flags).test(n))return yield L(S.RegExp,e,r,n)}o(fq,"FromRegExp");function*lq(e,t,r,n){if(!_e(n))return yield L(S.String,e,r,n);be(e.minLength)&&!(n.length>=e.minLength)&&(yield L(S.StringMinLength,e,r,n)),be(e.maxLength)&&!(n.length<=e.maxLength)&&(yield L(S.StringMaxLength,e,r,n)),_e(e.pattern)&&(new RegExp(e.pattern).test(n)||(yield L(S.StringPattern,e,r,n))),_e(e.format)&&(lr.Has(e.format)?lr.Get(e.format)(n)||(yield L(S.StringFormat,e,r,n)):yield L(S.StringFormatUnknown,e,r,n))}o(lq,"FromString");function*pq(e,t,r,n){co(n)||(yield L(S.Symbol,e,r,n))}o(pq,"FromSymbol");function*dq(e,t,r,n){if(!_e(n))return yield L(S.String,e,r,n);new RegExp(e.pattern).test(n)||(yield L(S.StringPattern,e,r,n))}o(dq,"FromTemplateLiteral");function*mq(e,t,r,n){yield*A(Bt(Ne(e,t),t,r,n))}o(mq,"FromThis");function*yq(e,t,r,n){if(!se(n))return yield L(S.Tuple,e,r,n);if(e.items===void 0&&n.length!==0)return yield L(S.TupleLength,e,r,n);if(n.length!==e.maxItems)return yield L(S.TupleLength,e,r,n);if(e.items)for(let i=0;i<e.items.length;i++)yield*A(Bt(e.items[i],t,"".concat(r,"/").concat(i),n[i]))}o(yq,"FromTuple");function*hq(e,t,r,n){ht(n)||(yield L(S.Undefined,e,r,n))}o(hq,"FromUndefined");function*gq(e,t,r,n){if(he(e,t,n))return;let i=e.anyOf.map(s=>new Yr(Bt(s,t,r,n)));yield L(S.Union,e,r,n,i)}o(gq,"FromUnion");function*xq(e,t,r,n){if(!Ps(n))return yield L(S.Uint8Array,e,r,n);be(e.maxByteLength)&&!(n.length<=e.maxByteLength)&&(yield L(S.Uint8ArrayMaxByteLength,e,r,n)),be(e.minByteLength)&&!(n.length>=e.minByteLength)&&(yield L(S.Uint8ArrayMinByteLength,e,r,n))}o(xq,"FromUint8Array");function*Iq(e,t,r,n){}o(Iq,"FromUnknown");function*bq(e,t,r,n){Ge.IsVoidLike(n)||(yield L(S.Void,e,r,n))}o(bq,"FromVoid");function*wq(e,t,r,n){Tt.Get(e[v])(e,n)||(yield L(S.Kind,e,r,n))}o(wq,"FromKind");function*Bt(e,t,r,n){let i=be(e.$id)?[...t,e]:t,s=e;switch(s[v]){case"Any":return yield*A(BD(s,i,r,n));case"Array":return yield*A(GD(s,i,r,n));case"AsyncIterator":return yield*A(KD(s,i,r,n));case"BigInt":return yield*A(WD(s,i,r,n));case"Boolean":return yield*A(HD(s,i,r,n));case"Constructor":return yield*A(JD(s,i,r,n));case"Date":return yield*A(ZD(s,i,r,n));case"Function":return yield*A(YD(s,i,r,n));case"Integer":return yield*A(XD(s,i,r,n));case"Intersect":return yield*A(QD(s,i,r,n));case"Iterator":return yield*A(eq(s,i,r,n));case"Literal":return yield*A(tq(s,i,r,n));case"Never":return yield*A(rq(s,i,r,n));case"Not":return yield*A(nq(s,i,r,n));case"Null":return yield*A(oq(s,i,r,n));case"Number":return yield*A(iq(s,i,r,n));case"Object":return yield*A(sq(s,i,r,n));case"Promise":return yield*A(aq(s,i,r,n));case"Record":return yield*A(cq(s,i,r,n));case"Ref":return yield*A(uq(s,i,r,n));case"RegExp":return yield*A(fq(s,i,r,n));case"String":return yield*A(lq(s,i,r,n));case"Symbol":return yield*A(pq(s,i,r,n));case"TemplateLiteral":return yield*A(dq(s,i,r,n));case"This":return yield*A(mq(s,i,r,n));case"Tuple":return yield*A(yq(s,i,r,n));case"Undefined":return yield*A(hq(s,i,r,n));case"Union":return yield*A(gq(s,i,r,n));case"Uint8Array":return yield*A(xq(s,i,r,n));case"Unknown":return yield*A(Iq(s,i,r,n));case"Void":return yield*A(bq(s,i,r,n));default:if(!Tt.Has(s[v]))throw new Ry(e);return yield*A(wq(s,i,r,n))}}o(Bt,"Visit");function Mn(...e){let t=e.length===3?Bt(e[0],e[1],"",e[2]):Bt(e[0],[],"",e[1]);return new Yr(t)}o(Mn,"Errors");c();var $q=function(e,t,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(e,r):i?i.value=r:t.set(e,r),r},IP=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},Ly,lf,bP,Dy=class Dy extends re{constructor(t){let r=t.First();super(r===void 0?"Invalid Value":r.message),Ly.add(this),lf.set(this,void 0),$q(this,lf,t,"f"),this.error=r}Errors(){return new Yr(IP(this,Ly,"m",bP).call(this))}};o(Dy,"AssertError");var Uy=Dy;lf=new WeakMap,Ly=new WeakSet,bP=o(function*(){this.error&&(yield this.error),yield*A(IP(this,lf,"f"))},"_AssertError_Iterator");function xP(e,t,r){if(!he(e,t,r))throw new Uy(Mn(e,t,r))}o(xP,"AssertValue");function pf(...e){return e.length===3?xP(e[0],e[1],e[2]):xP(e[0],[],e[1])}o(pf,"Assert");c();c();c();function vq(e){let t={};for(let r of Object.getOwnPropertyNames(e))t[r]=Re(e[r]);for(let r of Object.getOwnPropertySymbols(e))t[r]=Re(e[r]);return t}o(vq,"FromObject");function Oq(e){return e.map(t=>Re(t))}o(Oq,"FromArray");function _q(e){return e.slice()}o(_q,"FromTypedArray");function Sq(e){return new Map(Re([...e.entries()]))}o(Sq,"FromMap");function Pq(e){return new Set(Re([...e.entries()]))}o(Pq,"FromSet");function Eq(e){return new Date(e.toISOString())}o(Eq,"FromDate");function Re(e){if(se(e))return Oq(e);if(ur(e))return Eq(e);if(zr(e))return _q(e);if(UO(e))return Sq(e);if(DO(e))return Pq(e);if(ae(e))return vq(e);if(qt(e))return e;throw new Error("ValueClone: Unable to clone value")}o(Re,"Clone");var qy=class qy extends re{constructor(t,r){super(r),this.schema=t}};o(qy,"ValueCreateError");var Tr=qy;function Ce(e){return Bo(e)?e():Re(e)}o(Ce,"FromDefault");function Tq(e,t){return ne(e,"default")?Ce(e.default):{}}o(Tq,"FromAny");function kq(e,t){if(e.uniqueItems===!0&&!ne(e,"default"))throw new Tr(e,"Array with the uniqueItems constraint requires a default value");if("contains"in e&&!ne(e,"default"))throw new Tr(e,"Array with the contains constraint requires a default value");return"default"in e?Ce(e.default):e.minItems!==void 0?Array.from({length:e.minItems}).map(r=>kr(e.items,t)):[]}o(kq,"FromArray");function Fq(e,t){return ne(e,"default")?Ce(e.default):function(){return pg(this,null,function*(){})}()}o(Fq,"FromAsyncIterator");function Aq(e,t){return ne(e,"default")?Ce(e.default):BigInt(0)}o(Aq,"FromBigInt");function jq(e,t){return ne(e,"default")?Ce(e.default):!1}o(jq,"FromBoolean");function Nq(e,t){if(ne(e,"default"))return Ce(e.default);{let r=kr(e.returns,t);return typeof r=="object"&&!Array.isArray(r)?class{constructor(){for(let[n,i]of Object.entries(r)){let s=this;s[n]=i}}}:class{}}}o(Nq,"FromConstructor");function Rq(e,t){return ne(e,"default")?Ce(e.default):e.minimumTimestamp!==void 0?new Date(e.minimumTimestamp):new Date}o(Rq,"FromDate");function Cq(e,t){return ne(e,"default")?Ce(e.default):()=>kr(e.returns,t)}o(Cq,"FromFunction");function Mq(e,t){return ne(e,"default")?Ce(e.default):e.minimum!==void 0?e.minimum:0}o(Mq,"FromInteger");function Lq(e,t){if(ne(e,"default"))return Ce(e.default);{let r=e.allOf.reduce((n,i)=>{let s=kr(i,t);return typeof s=="object"?g(g({},n),s):s},{});if(!he(e,t,r))throw new Tr(e,"Intersect produced invalid value. Consider using a default value.");return r}}o(Lq,"FromIntersect");function Uq(e,t){return ne(e,"default")?Ce(e.default):function*(){}()}o(Uq,"FromIterator");function Dq(e,t){return ne(e,"default")?Ce(e.default):e.const}o(Dq,"FromLiteral");function qq(e,t){if(ne(e,"default"))return Ce(e.default);throw new Tr(e,"Never types cannot be created. Consider using a default value.")}o(qq,"FromNever");function zq(e,t){if(ne(e,"default"))return Ce(e.default);throw new Tr(e,"Not types must have a default value")}o(zq,"FromNot");function Vq(e,t){return ne(e,"default")?Ce(e.default):null}o(Vq,"FromNull");function Bq(e,t){return ne(e,"default")?Ce(e.default):e.minimum!==void 0?e.minimum:0}o(Bq,"FromNumber");function Gq(e,t){if(ne(e,"default"))return Ce(e.default);{let r=new Set(e.required),n={};for(let[i,s]of Object.entries(e.properties))r.has(i)&&(n[i]=kr(s,t));return n}}o(Gq,"FromObject");function Kq(e,t){return ne(e,"default")?Ce(e.default):Promise.resolve(kr(e.item,t))}o(Kq,"FromPromise");function Wq(e,t){let[r,n]=Object.entries(e.patternProperties)[0];if(ne(e,"default"))return Ce(e.default);if(r===mo||r===po)return{};{let i=r.slice(1,r.length-1).split("|"),s={};for(let a of i)s[a]=kr(n,t);return s}}o(Wq,"FromRecord");function Hq(e,t){return ne(e,"default")?Ce(e.default):kr(Ne(e,t),t)}o(Hq,"FromRef");function Jq(e,t){if(ne(e,"default"))return Ce(e.default);throw new Tr(e,"RegExp types cannot be created. Consider using a default value.")}o(Jq,"FromRegExp");function Zq(e,t){if(e.pattern!==void 0){if(ne(e,"default"))return Ce(e.default);throw new Tr(e,"String types with patterns must specify a default value")}else if(e.format!==void 0){if(ne(e,"default"))return Ce(e.default);throw new Tr(e,"String types with formats must specify a default value")}else return ne(e,"default")?Ce(e.default):e.minLength!==void 0?Array.from({length:e.minLength}).map(()=>" ").join(""):""}o(Zq,"FromString");function Yq(e,t){return ne(e,"default")?Ce(e.default):"value"in e?Symbol.for(e.value):Symbol()}o(Yq,"FromSymbol");function Xq(e,t){if(ne(e,"default"))return Ce(e.default);if(!Cu(e))throw new Tr(e,"Can only create template literals that produce a finite variants. Consider using a default value.");return Ns(e)[0]}o(Xq,"FromTemplateLiteral");function Qq(e,t){if(wP++>a9)throw new Tr(e,"Cannot create recursive type as it appears possibly infinite. Consider using a default.");return ne(e,"default")?Ce(e.default):kr(Ne(e,t),t)}o(Qq,"FromThis");function e9(e,t){return ne(e,"default")?Ce(e.default):e.items===void 0?[]:Array.from({length:e.minItems}).map((r,n)=>kr(e.items[n],t))}o(e9,"FromTuple");function t9(e,t){if(ne(e,"default"))return Ce(e.default)}o(t9,"FromUndefined");function r9(e,t){if(ne(e,"default"))return Ce(e.default);if(e.anyOf.length===0)throw new Error("ValueCreate.Union: Cannot create Union with zero variants");return kr(e.anyOf[0],t)}o(r9,"FromUnion");function n9(e,t){return ne(e,"default")?Ce(e.default):e.minByteLength!==void 0?new Uint8Array(e.minByteLength):new Uint8Array(0)}o(n9,"FromUint8Array");function o9(e,t){return ne(e,"default")?Ce(e.default):{}}o(o9,"FromUnknown");function i9(e,t){if(ne(e,"default"))return Ce(e.default)}o(i9,"FromVoid");function s9(e,t){if(ne(e,"default"))return Ce(e.default);throw new Error("User defined types must specify a default value")}o(s9,"FromKind");function kr(e,t){let r=Zr(e,t),n=e;switch(n[v]){case"Any":return Tq(n,r);case"Array":return kq(n,r);case"AsyncIterator":return Fq(n,r);case"BigInt":return Aq(n,r);case"Boolean":return jq(n,r);case"Constructor":return Nq(n,r);case"Date":return Rq(n,r);case"Function":return Cq(n,r);case"Integer":return Mq(n,r);case"Intersect":return Lq(n,r);case"Iterator":return Uq(n,r);case"Literal":return Dq(n,r);case"Never":return qq(n,r);case"Not":return zq(n,r);case"Null":return Vq(n,r);case"Number":return Bq(n,r);case"Object":return Gq(n,r);case"Promise":return Kq(n,r);case"Record":return Wq(n,r);case"Ref":return Hq(n,r);case"RegExp":return Jq(n,r);case"String":return Zq(n,r);case"Symbol":return Yq(n,r);case"TemplateLiteral":return Xq(n,r);case"This":return Qq(n,r);case"Tuple":return e9(n,r);case"Undefined":return t9(n,r);case"Union":return r9(n,r);case"Uint8Array":return n9(n,r);case"Unknown":return o9(n,r);case"Void":return i9(n,r);default:if(!Tt.Has(n[v]))throw new Tr(n,"Unknown type");return s9(n,r)}}o(kr,"Visit");var a9=512,wP=0;function Xr(...e){return wP=0,e.length===2?kr(e[0],e[1]):kr(e[0],[])}o(Xr,"Create");var Vy=class Vy extends re{constructor(t,r){super(r),this.schema=t}};o(Vy,"ValueCastError");var df=Vy;function c9(e,t,r){if(e[v]==="Object"&&typeof r=="object"&&!ao(r)){let n=e,i=Object.getOwnPropertyNames(r),s=Object.entries(n.properties),[a,u]=[1/s.length,s.length];return s.reduce((l,[d,m])=>{let h=m[v]==="Literal"&&m.const===r[d]?u:0,b=he(m,t,r[d])?a:0,$=i.includes(d)?a:0;return l+(h+b+$)},0)}else return he(e,t,r)?1:0}o(c9,"ScoreUnion");function u9(e,t,r){let n=e.anyOf.map(a=>Ne(a,t)),[i,s]=[n[0],0];for(let a of n){let u=c9(a,t,r);u>s&&(i=a,s=u)}return i}o(u9,"SelectUnion");function f9(e,t,r){if("default"in e)return typeof r=="function"?e.default:Re(e.default);{let n=u9(e,t,r);return zy(n,t,r)}}o(f9,"CastUnion");function l9(e,t,r){return he(e,t,r)?Re(r):Xr(e,t)}o(l9,"DefaultClone");function p9(e,t,r){return he(e,t,r)?r:Xr(e,t)}o(p9,"Default");function d9(e,t,r){if(he(e,t,r))return Re(r);let n=se(r)?Re(r):Xr(e,t),i=X(e.minItems)&&n.length<e.minItems?[...n,...Array.from({length:e.minItems-n.length},()=>null)]:n,a=(X(e.maxItems)&&i.length>e.maxItems?i.slice(0,e.maxItems):i).map(l=>Ln(e.items,t,l));if(e.uniqueItems!==!0)return a;let u=[...new Set(a)];if(!he(e,t,u))throw new df(e,"Array cast produced invalid data due to uniqueItems constraint");return u}o(d9,"FromArray");function m9(e,t,r){if(he(e,t,r))return Xr(e,t);let n=new Set(e.returns.required||[]),i=o(function(){},"result");for(let[s,a]of Object.entries(e.returns.properties))!n.has(s)&&r.prototype[s]===void 0||(i.prototype[s]=Ln(a,t,r.prototype[s]));return i}o(m9,"FromConstructor");function y9(e,t,r){let n=Xr(e,t),i=ae(n)&&ae(r)?g(g({},n),r):r;return he(e,t,i)?i:Xr(e,t)}o(y9,"FromIntersect");function h9(e,t,r){throw new df(e,"Never types cannot be cast")}o(h9,"FromNever");function g9(e,t,r){if(he(e,t,r))return r;if(r===null||typeof r!="object")return Xr(e,t);let n=new Set(e.required||[]),i={};for(let[s,a]of Object.entries(e.properties))!n.has(s)&&r[s]===void 0||(i[s]=Ln(a,t,r[s]));if(typeof e.additionalProperties=="object"){let s=Object.getOwnPropertyNames(e.properties);for(let a of Object.getOwnPropertyNames(r))s.includes(a)||(i[a]=Ln(e.additionalProperties,t,r[a]))}return i}o(g9,"FromObject");function x9(e,t,r){if(he(e,t,r))return Re(r);if(r===null||typeof r!="object"||Array.isArray(r)||r instanceof Date)return Xr(e,t);let n=Object.getOwnPropertyNames(e.patternProperties)[0],i=e.patternProperties[n],s={};for(let[a,u]of Object.entries(r))s[a]=Ln(i,t,u);return s}o(x9,"FromRecord");function I9(e,t,r){return Ln(Ne(e,t),t,r)}o(I9,"FromRef");function b9(e,t,r){return Ln(Ne(e,t),t,r)}o(b9,"FromThis");function w9(e,t,r){return he(e,t,r)?Re(r):se(r)?e.items===void 0?[]:e.items.map((n,i)=>Ln(n,t,r[i])):Xr(e,t)}o(w9,"FromTuple");function $9(e,t,r){return he(e,t,r)?Re(r):f9(e,t,r)}o($9,"FromUnion");function Ln(e,t,r){let n=_e(e.$id)?[...t,e]:t,i=e;switch(e[v]){case"Array":return d9(i,n,r);case"Constructor":return m9(i,n,r);case"Intersect":return y9(i,n,r);case"Never":return h9(i,n,r);case"Object":return g9(i,n,r);case"Record":return x9(i,n,r);case"Ref":return I9(i,n,r);case"This":return b9(i,n,r);case"Tuple":return w9(i,n,r);case"Union":return $9(i,n,r);case"Date":case"Symbol":case"Uint8Array":return l9(e,t,r);default:return p9(i,n,r)}}o(Ln,"Visit");function zy(...e){return e.length===3?Ln(e[0],e[1],e[2]):Ln(e[0],[],e[1])}o(zy,"Cast");c();function v9(e){return Ko(e)&&e[v]!=="Unsafe"}o(v9,"IsCheckable");function O9(e,t,r){return se(r)?r.map(n=>Fr(e.items,t,n)):r}o(O9,"FromArray");function _9(e,t,r){let n=e.unevaluatedProperties,s=e.allOf.map(u=>Fr(u,t,Re(r))).reduce((u,l)=>ae(l)?g(g({},u),l):l,{});if(!ae(r)||!ae(s)||!Ko(n))return s;let a=At(e);for(let u of Object.getOwnPropertyNames(r))a.includes(u)||he(n,t,r[u])&&(s[u]=Fr(n,t,r[u]));return s}o(_9,"FromIntersect");function S9(e,t,r){if(!ae(r)||se(r))return r;let n=e.additionalProperties;for(let i of Object.getOwnPropertyNames(r)){if(ne(e.properties,i)){r[i]=Fr(e.properties[i],t,r[i]);continue}if(Ko(n)&&he(n,t,r[i])){r[i]=Fr(n,t,r[i]);continue}delete r[i]}return r}o(S9,"FromObject");function P9(e,t,r){if(!ae(r))return r;let n=e.additionalProperties,i=Object.getOwnPropertyNames(r),[s,a]=Object.entries(e.patternProperties)[0],u=new RegExp(s);for(let l of i){if(u.test(l)){r[l]=Fr(a,t,r[l]);continue}if(Ko(n)&&he(n,t,r[l])){r[l]=Fr(n,t,r[l]);continue}delete r[l]}return r}o(P9,"FromRecord");function E9(e,t,r){return Fr(Ne(e,t),t,r)}o(E9,"FromRef");function T9(e,t,r){return Fr(Ne(e,t),t,r)}o(T9,"FromThis");function k9(e,t,r){if(!se(r))return r;if(ht(e.items))return[];let n=Math.min(r.length,e.items.length);for(let i=0;i<n;i++)r[i]=Fr(e.items[i],t,r[i]);return r.length>n?r.slice(0,n):r}o(k9,"FromTuple");function F9(e,t,r){for(let n of e.anyOf)if(v9(n)&&he(n,t,r))return Fr(n,t,r);return r}o(F9,"FromUnion");function Fr(e,t,r){let n=_e(e.$id)?[...t,e]:t,i=e;switch(i[v]){case"Array":return O9(i,n,r);case"Intersect":return _9(i,n,r);case"Object":return S9(i,n,r);case"Record":return P9(i,n,r);case"Ref":return E9(i,n,r);case"This":return T9(i,n,r);case"Tuple":return k9(i,n,r);case"Union":return F9(i,n,r);default:return r}}o(Fr,"Visit");function mf(...e){return e.length===3?Fr(e[0],e[1],e[2]):Fr(e[0],[],e[1])}o(mf,"Clean");c();function yf(e){return _e(e)&&!isNaN(e)&&!isNaN(parseFloat(e))}o(yf,"IsStringNumeric");function A9(e){return Dt(e)||Fn(e)||X(e)}o(A9,"IsValueToString");function $c(e){return e===!0||X(e)&&e===1||Dt(e)&&e===BigInt("1")||_e(e)&&(e.toLowerCase()==="true"||e==="1")}o($c,"IsValueTrue");function vc(e){return e===!1||X(e)&&(e===0||Object.is(e,-0))||Dt(e)&&e===BigInt("0")||_e(e)&&(e.toLowerCase()==="false"||e==="0"||e==="-0")}o(vc,"IsValueFalse");function j9(e){return _e(e)&&/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i.test(e)}o(j9,"IsTimeStringWithTimeZone");function N9(e){return _e(e)&&/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)?$/i.test(e)}o(N9,"IsTimeStringWithoutTimeZone");function R9(e){return _e(e)&&/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i.test(e)}o(R9,"IsDateTimeStringWithTimeZone");function C9(e){return _e(e)&&/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)?$/i.test(e)}o(C9,"IsDateTimeStringWithoutTimeZone");function M9(e){return _e(e)&&/^\d\d\d\d-[0-1]\d-[0-3]\d$/i.test(e)}o(M9,"IsDateString");function L9(e,t){let r=vP(e);return r===t?r:e}o(L9,"TryConvertLiteralString");function U9(e,t){let r=OP(e);return r===t?r:e}o(U9,"TryConvertLiteralNumber");function D9(e,t){let r=$P(e);return r===t?r:e}o(D9,"TryConvertLiteralBoolean");function q9(e,t){return _e(e.const)?L9(t,e.const):X(e.const)?U9(t,e.const):Fn(e.const)?D9(t,e.const):t}o(q9,"TryConvertLiteral");function $P(e){return $c(e)?!0:vc(e)?!1:e}o($P,"TryConvertBoolean");function z9(e){let t=o(r=>r.split(".")[0],"truncateInteger");return yf(e)?BigInt(t(e)):X(e)?BigInt(Math.trunc(e)):vc(e)?BigInt(0):$c(e)?BigInt(1):e}o(z9,"TryConvertBigInt");function vP(e){return A9(e)?e.toString():co(e)&&e.description!==void 0?e.description.toString():e}o(vP,"TryConvertString");function OP(e){return yf(e)?parseFloat(e):$c(e)?1:vc(e)?0:e}o(OP,"TryConvertNumber");function V9(e){return yf(e)?parseInt(e):X(e)?e|0:$c(e)?1:vc(e)?0:e}o(V9,"TryConvertInteger");function B9(e){return _e(e)&&e.toLowerCase()==="null"?null:e}o(B9,"TryConvertNull");function G9(e){return _e(e)&&e==="undefined"?void 0:e}o(G9,"TryConvertUndefined");function K9(e){return ur(e)?e:X(e)?new Date(e):$c(e)?new Date(1):vc(e)?new Date(0):yf(e)?new Date(parseInt(e)):N9(e)?new Date("1970-01-01T".concat(e,".000Z")):j9(e)?new Date("1970-01-01T".concat(e)):C9(e)?new Date("".concat(e,".000Z")):R9(e)?new Date(e):M9(e)?new Date("".concat(e,"T00:00:00.000Z")):e}o(K9,"TryConvertDate");function W9(e,t,r){return(se(r)?r:[r]).map(i=>Un(e.items,t,i))}o(W9,"FromArray");function H9(e,t,r){return z9(r)}o(H9,"FromBigInt");function J9(e,t,r){return $P(r)}o(J9,"FromBoolean");function Z9(e,t,r){return K9(r)}o(Z9,"FromDate");function Y9(e,t,r){return V9(r)}o(Y9,"FromInteger");function X9(e,t,r){return e.allOf.reduce((n,i)=>Un(i,t,n),r)}o(X9,"FromIntersect");function Q9(e,t,r){return q9(e,r)}o(Q9,"FromLiteral");function e4(e,t,r){return B9(r)}o(e4,"FromNull");function t4(e,t,r){return OP(r)}o(t4,"FromNumber");function r4(e,t,r){if(!ae(r))return r;for(let n of Object.getOwnPropertyNames(e.properties))ne(r,n)&&(r[n]=Un(e.properties[n],t,r[n]));return r}o(r4,"FromObject");function n4(e,t,r){if(!ae(r))return r;let i=Object.getOwnPropertyNames(e.patternProperties)[0],s=e.patternProperties[i];for(let[a,u]of Object.entries(r))r[a]=Un(s,t,u);return r}o(n4,"FromRecord");function o4(e,t,r){return Un(Ne(e,t),t,r)}o(o4,"FromRef");function i4(e,t,r){return vP(r)}o(i4,"FromString");function s4(e,t,r){return _e(r)||X(r)?Symbol(r):r}o(s4,"FromSymbol");function a4(e,t,r){return Un(Ne(e,t),t,r)}o(a4,"FromThis");function c4(e,t,r){return se(r)&&!ht(e.items)?r.map((i,s)=>s<e.items.length?Un(e.items[s],t,i):i):r}o(c4,"FromTuple");function u4(e,t,r){return G9(r)}o(u4,"FromUndefined");function f4(e,t,r){for(let n of e.anyOf){let i=Un(n,t,Re(r));if(he(n,t,i))return i}return r}o(f4,"FromUnion");function Un(e,t,r){let n=Zr(e,t),i=e;switch(e[v]){case"Array":return W9(i,n,r);case"BigInt":return H9(i,n,r);case"Boolean":return J9(i,n,r);case"Date":return Z9(i,n,r);case"Integer":return Y9(i,n,r);case"Intersect":return X9(i,n,r);case"Literal":return Q9(i,n,r);case"Null":return e4(i,n,r);case"Number":return t4(i,n,r);case"Object":return r4(i,n,r);case"Record":return n4(i,n,r);case"Ref":return o4(i,n,r);case"String":return i4(i,n,r);case"Symbol":return s4(i,n,r);case"This":return a4(i,n,r);case"Tuple":return c4(i,n,r);case"Undefined":return u4(i,n,r);case"Union":return f4(i,n,r);default:return r}}o(Un,"Visit");function hf(...e){return e.length===3?Un(e[0],e[1],e[2]):Un(e[0],[],e[1])}o(hf,"Convert");c();c();var By=class By extends re{constructor(t,r,n){super("Unable to decode value as it does not match the expected schema"),this.schema=t,this.value=r,this.error=n}};o(By,"TransformDecodeCheckError");var Ys=By,Gy=class Gy extends re{constructor(t,r,n,i){super(i instanceof Error?i.message:"Unknown error"),this.schema=t,this.path=r,this.value=n,this.error=i}};o(Gy,"TransformDecodeError");var Li=Gy;function gt(e,t,r){try{return it(e)?e[pt].Decode(r):r}catch(n){throw new Li(e,t,r,n)}}o(gt,"Default");function l4(e,t,r,n){return se(n)?gt(e,r,n.map((i,s)=>Dn(e.items,t,"".concat(r,"/").concat(s),i))):gt(e,r,n)}o(l4,"FromArray");function p4(e,t,r,n){if(!ae(n)||qt(n))return gt(e,r,n);let i=Jo(e),s=i.map(m=>m[0]),a=g({},n);for(let[m,h]of i)m in a&&(a[m]=Dn(h,t,"".concat(r,"/").concat(m),a[m]));if(!it(e.unevaluatedProperties))return gt(e,r,a);let u=Object.getOwnPropertyNames(a),l=e.unevaluatedProperties,d=g({},a);for(let m of u)s.includes(m)||(d[m]=gt(l,"".concat(r,"/").concat(m),d[m]));return gt(e,r,d)}o(p4,"FromIntersect");function d4(e,t,r,n){return gt(e,r,Dn(e.not,t,r,n))}o(d4,"FromNot");function m4(e,t,r,n){if(!ae(n))return gt(e,r,n);let i=At(e),s=g({},n);for(let d of i)ne(s,d)&&(ht(s[d])&&(!Ts(e.properties[d])||Ge.IsExactOptionalProperty(s,d))||(s[d]=Dn(e.properties[d],t,"".concat(r,"/").concat(d),s[d])));if(!Se(e.additionalProperties))return gt(e,r,s);let a=Object.getOwnPropertyNames(s),u=e.additionalProperties,l=g({},s);for(let d of a)i.includes(d)||(l[d]=gt(u,"".concat(r,"/").concat(d),l[d]));return gt(e,r,l)}o(m4,"FromObject");function y4(e,t,r,n){if(!ae(n))return gt(e,r,n);let i=Object.getOwnPropertyNames(e.patternProperties)[0],s=new RegExp(i),a=g({},n);for(let m of Object.getOwnPropertyNames(n))s.test(m)&&(a[m]=Dn(e.patternProperties[i],t,"".concat(r,"/").concat(m),a[m]));if(!Se(e.additionalProperties))return gt(e,r,a);let u=Object.getOwnPropertyNames(a),l=e.additionalProperties,d=g({},a);for(let m of u)s.test(m)||(d[m]=gt(l,"".concat(r,"/").concat(m),d[m]));return gt(e,r,d)}o(y4,"FromRecord");function h4(e,t,r,n){let i=Ne(e,t);return gt(e,r,Dn(i,t,r,n))}o(h4,"FromRef");function g4(e,t,r,n){let i=Ne(e,t);return gt(e,r,Dn(i,t,r,n))}o(g4,"FromThis");function x4(e,t,r,n){return se(n)&&se(e.items)?gt(e,r,e.items.map((i,s)=>Dn(i,t,"".concat(r,"/").concat(s),n[s]))):gt(e,r,n)}o(x4,"FromTuple");function I4(e,t,r,n){for(let i of e.anyOf){if(!he(i,t,n))continue;let s=Dn(i,t,r,n);return gt(e,r,s)}return gt(e,r,n)}o(I4,"FromUnion");function Dn(e,t,r,n){let i=Zr(e,t),s=e;switch(e[v]){case"Array":return l4(s,i,r,n);case"Intersect":return p4(s,i,r,n);case"Not":return d4(s,i,r,n);case"Object":return m4(s,i,r,n);case"Record":return y4(s,i,r,n);case"Ref":return h4(s,i,r,n);case"Symbol":return gt(s,r,n);case"This":return g4(s,i,r,n);case"Tuple":return x4(s,i,r,n);case"Union":return I4(s,i,r,n);default:return gt(s,r,n)}}o(Dn,"Visit");function Xs(e,t,r){return Dn(e,t,"",r)}o(Xs,"TransformDecode");c();var Ky=class Ky extends re{constructor(t,r,n){super("The encoded value does not match the expected schema"),this.schema=t,this.value=r,this.error=n}};o(Ky,"TransformEncodeCheckError");var Qs=Ky,Wy=class Wy extends re{constructor(t,r,n,i){super("".concat(i instanceof Error?i.message:"Unknown error")),this.schema=t,this.path=r,this.value=n,this.error=i}};o(Wy,"TransformEncodeError");var Ui=Wy;function or(e,t,r){try{return it(e)?e[pt].Encode(r):r}catch(n){throw new Ui(e,t,r,n)}}o(or,"Default");function b4(e,t,r,n){let i=or(e,r,n);return se(i)?i.map((s,a)=>qn(e.items,t,"".concat(r,"/").concat(a),s)):i}o(b4,"FromArray");function w4(e,t,r,n){let i=or(e,r,n);if(!ae(n)||qt(n))return i;let s=Jo(e),a=s.map(h=>h[0]),u=g({},i);for(let[h,b]of s)h in u&&(u[h]=qn(b,t,"".concat(r,"/").concat(h),u[h]));if(!it(e.unevaluatedProperties))return u;let l=Object.getOwnPropertyNames(u),d=e.unevaluatedProperties,m=g({},u);for(let h of l)a.includes(h)||(m[h]=or(d,"".concat(r,"/").concat(h),m[h]));return m}o(w4,"FromIntersect");function $4(e,t,r,n){return or(e.not,r,or(e,r,n))}o($4,"FromNot");function v4(e,t,r,n){let i=or(e,r,n);if(!ae(i))return i;let s=At(e),a=g({},i);for(let m of s)ne(a,m)&&(ht(a[m])&&(!Ts(e.properties[m])||Ge.IsExactOptionalProperty(a,m))||(a[m]=qn(e.properties[m],t,"".concat(r,"/").concat(m),a[m])));if(!Se(e.additionalProperties))return a;let u=Object.getOwnPropertyNames(a),l=e.additionalProperties,d=g({},a);for(let m of u)s.includes(m)||(d[m]=or(l,"".concat(r,"/").concat(m),d[m]));return d}o(v4,"FromObject");function O4(e,t,r,n){let i=or(e,r,n);if(!ae(n))return i;let s=Object.getOwnPropertyNames(e.patternProperties)[0],a=new RegExp(s),u=g({},i);for(let h of Object.getOwnPropertyNames(n))a.test(h)&&(u[h]=qn(e.patternProperties[s],t,"".concat(r,"/").concat(h),u[h]));if(!Se(e.additionalProperties))return u;let l=Object.getOwnPropertyNames(u),d=e.additionalProperties,m=g({},u);for(let h of l)a.test(h)||(m[h]=or(d,"".concat(r,"/").concat(h),m[h]));return m}o(O4,"FromRecord");function _4(e,t,r,n){let i=Ne(e,t),s=qn(i,t,r,n);return or(e,r,s)}o(_4,"FromRef");function S4(e,t,r,n){let i=Ne(e,t),s=qn(i,t,r,n);return or(e,r,s)}o(S4,"FromThis");function P4(e,t,r,n){let i=or(e,r,n);return se(e.items)?e.items.map((s,a)=>qn(s,t,"".concat(r,"/").concat(a),i[a])):[]}o(P4,"FromTuple");function E4(e,t,r,n){for(let i of e.anyOf){if(!he(i,t,n))continue;let s=qn(i,t,r,n);return or(e,r,s)}for(let i of e.anyOf){let s=qn(i,t,r,n);if(he(e,t,s))return or(e,r,s)}return or(e,r,n)}o(E4,"FromUnion");function qn(e,t,r,n){let i=Zr(e,t),s=e;switch(e[v]){case"Array":return b4(s,i,r,n);case"Intersect":return w4(s,i,r,n);case"Not":return $4(s,i,r,n);case"Object":return v4(s,i,r,n);case"Record":return O4(s,i,r,n);case"Ref":return _4(s,i,r,n);case"This":return S4(s,i,r,n);case"Tuple":return P4(s,i,r,n);case"Union":return E4(s,i,r,n);default:return or(s,r,n)}}o(qn,"Visit");function gf(e,t,r){return qn(e,t,"",r)}o(gf,"TransformEncode");c();function T4(e,t){return it(e)||jt(e.items,t)}o(T4,"FromArray");function k4(e,t){return it(e)||jt(e.items,t)}o(k4,"FromAsyncIterator");function F4(e,t){return it(e)||jt(e.returns,t)||e.parameters.some(r=>jt(r,t))}o(F4,"FromConstructor");function A4(e,t){return it(e)||jt(e.returns,t)||e.parameters.some(r=>jt(r,t))}o(A4,"FromFunction");function j4(e,t){return it(e)||it(e.unevaluatedProperties)||e.allOf.some(r=>jt(r,t))}o(j4,"FromIntersect");function N4(e,t){return it(e)||jt(e.items,t)}o(N4,"FromIterator");function R4(e,t){return it(e)||jt(e.not,t)}o(R4,"FromNot");function C4(e,t){return it(e)||Object.values(e.properties).some(r=>jt(r,t))||Se(e.additionalProperties)&&jt(e.additionalProperties,t)}o(C4,"FromObject");function M4(e,t){return it(e)||jt(e.item,t)}o(M4,"FromPromise");function L4(e,t){let r=Object.getOwnPropertyNames(e.patternProperties)[0],n=e.patternProperties[r];return it(e)||jt(n,t)||Se(e.additionalProperties)&&it(e.additionalProperties)}o(L4,"FromRecord");function U4(e,t){return it(e)?!0:jt(Ne(e,t),t)}o(U4,"FromRef");function D4(e,t){return it(e)?!0:jt(Ne(e,t),t)}o(D4,"FromThis");function q4(e,t){return it(e)||!ht(e.items)&&e.items.some(r=>jt(r,t))}o(q4,"FromTuple");function z4(e,t){return it(e)||e.anyOf.some(r=>jt(r,t))}o(z4,"FromUnion");function jt(e,t){let r=Zr(e,t),n=e;if(e.$id&&Hy.has(e.$id))return!1;switch(e.$id&&Hy.add(e.$id),e[v]){case"Array":return T4(n,r);case"AsyncIterator":return k4(n,r);case"Constructor":return F4(n,r);case"Function":return A4(n,r);case"Intersect":return j4(n,r);case"Iterator":return N4(n,r);case"Not":return R4(n,r);case"Object":return C4(n,r);case"Promise":return M4(n,r);case"Record":return L4(n,r);case"Ref":return U4(n,r);case"This":return D4(n,r);case"Tuple":return q4(n,r);case"Union":return z4(n,r);default:return it(e)}}o(jt,"Visit");var Hy=new Set;function zn(e,t){return Hy.clear(),jt(e,t)}o(zn,"HasTransform");function _P(...e){let[t,r,n]=e.length===3?[e[0],e[1],e[2]]:[e[0],[],e[1]];if(!he(t,r,n))throw new Ys(t,n,Mn(t,r,n).First());return zn(t,r)?Xs(t,r,n):n}o(_P,"Decode");c();function wo(e,t){let r=ne(e,"default")?e.default:void 0,n=Bo(r)?r():Re(r);return ht(t)?n:ae(t)&&ae(n)?Object.assign(n,t):t}o(wo,"ValueOrDefault");function Jy(e){return Ko(e)&&"default"in e}o(Jy,"HasDefaultProperty");function V4(e,t,r){let n=wo(e,r);if(!se(n))return n;for(let i=0;i<n.length;i++)n[i]=Ar(e.items,t,n[i]);return n}o(V4,"FromArray");function B4(e,t,r){return ur(r)?r:wo(e,r)}o(B4,"FromDate");function G4(e,t,r){let n=wo(e,r);return e.allOf.reduce((i,s)=>{let a=Ar(s,t,n);return ae(a)?g(g({},i),a):a},{})}o(G4,"FromIntersect");function K4(e,t,r){let n=wo(e,r);if(!ae(n))return n;let i=Object.getOwnPropertyNames(e.properties);for(let s of i){let a=Ar(e.properties[s],t,n[s]);ht(a)||(n[s]=Ar(e.properties[s],t,n[s]))}if(!Jy(e.additionalProperties))return n;for(let s of Object.getOwnPropertyNames(n))i.includes(s)||(n[s]=Ar(e.additionalProperties,t,n[s]));return n}o(K4,"FromObject");function W4(e,t,r){let n=wo(e,r);if(!ae(n))return n;let i=e.additionalProperties,[s,a]=Object.entries(e.patternProperties)[0],u=new RegExp(s);for(let l of Object.getOwnPropertyNames(n))u.test(l)&&Jy(a)&&(n[l]=Ar(a,t,n[l]));if(!Jy(i))return n;for(let l of Object.getOwnPropertyNames(n))u.test(l)||(n[l]=Ar(i,t,n[l]));return n}o(W4,"FromRecord");function H4(e,t,r){return Ar(Ne(e,t),t,wo(e,r))}o(H4,"FromRef");function J4(e,t,r){return Ar(Ne(e,t),t,r)}o(J4,"FromThis");function Z4(e,t,r){let n=wo(e,r);if(!se(n)||ht(e.items))return n;let[i,s]=[e.items,Math.max(e.items.length,n.length)];for(let a=0;a<s;a++)a<i.length&&(n[a]=Ar(i[a],t,n[a]));return n}o(Z4,"FromTuple");function Y4(e,t,r){let n=wo(e,r);for(let i of e.anyOf){let s=Ar(i,t,Re(n));if(he(i,t,s))return s}return n}o(Y4,"FromUnion");function Ar(e,t,r){let n=Zr(e,t),i=e;switch(i[v]){case"Array":return V4(i,n,r);case"Date":return B4(i,n,r);case"Intersect":return G4(i,n,r);case"Object":return K4(i,n,r);case"Record":return W4(i,n,r);case"Ref":return H4(i,n,r);case"This":return J4(i,n,r);case"Tuple":return Z4(i,n,r);case"Union":return Y4(i,n,r);default:return wo(i,r)}}o(Ar,"Visit");function xf(...e){return e.length===3?Ar(e[0],e[1],e[2]):Ar(e[0],[],e[1])}o(xf,"Default");c();c();var Qr={};To(Qr,{Delete:()=>Q4,Format:()=>Oc,Get:()=>tz,Has:()=>ez,Set:()=>X4,ValuePointerRootDeleteError:()=>bf,ValuePointerRootSetError:()=>If});c();var Zy=class Zy extends re{constructor(t,r,n){super("Cannot set root value"),this.value=t,this.path=r,this.update=n}};o(Zy,"ValuePointerRootSetError");var If=Zy,Yy=class Yy extends re{constructor(t,r){super("Cannot delete root value"),this.value=t,this.path=r}};o(Yy,"ValuePointerRootDeleteError");var bf=Yy;function SP(e){return e.indexOf("~")===-1?e:e.replace(/~1/g,"/").replace(/~0/g,"~")}o(SP,"Escape");function*Oc(e){if(e==="")return;let[t,r]=[0,0];for(let n=0;n<e.length;n++)e.charAt(n)==="/"?(n===0||(r=n,yield SP(e.slice(t,r))),t=n+1):r=n;yield SP(e.slice(t))}o(Oc,"Format");function X4(e,t,r){if(t==="")throw new If(e,t,r);let[n,i,s]=[null,e,""];for(let a of Oc(t))i[a]===void 0&&(i[a]={}),n=i,i=i[a],s=a;n[s]=r}o(X4,"Set");function Q4(e,t){if(t==="")throw new bf(e,t);let[r,n,i]=[null,e,""];for(let s of Oc(t)){if(n[s]===void 0||n[s]===null)return;r=n,n=n[s],i=s}if(Array.isArray(r)){let s=parseInt(i);r.splice(s,1)}else delete r[i]}o(Q4,"Delete");function ez(e,t){if(t==="")return!0;let[r,n,i]=[null,e,""];for(let s of Oc(t)){if(n[s]===void 0)return!1;r=n,n=n[s],i=s}return Object.getOwnPropertyNames(r).includes(i)}o(ez,"Has");function tz(e,t){if(t==="")return e;let r=e;for(let n of Oc(t)){if(r[n]===void 0)return;r=r[n]}return r}o(tz,"Get");c();function rz(e,t){if(!ae(t))return!1;let r=[...Object.keys(e),...Object.getOwnPropertySymbols(e)],n=[...Object.keys(t),...Object.getOwnPropertySymbols(t)];return r.length!==n.length?!1:r.every(i=>Di(e[i],t[i]))}o(rz,"ObjectType");function nz(e,t){return ur(t)&&e.getTime()===t.getTime()}o(nz,"DateType");function oz(e,t){return!se(t)||e.length!==t.length?!1:e.every((r,n)=>Di(r,t[n]))}o(oz,"ArrayType");function iz(e,t){return!zr(t)||e.length!==t.length||Object.getPrototypeOf(e).constructor.name!==Object.getPrototypeOf(t).constructor.name?!1:e.every((r,n)=>Di(r,t[n]))}o(iz,"TypedArrayType");function sz(e,t){return e===t}o(sz,"ValueType");function Di(e,t){if(ur(e))return nz(e,t);if(zr(e))return iz(e,t);if(se(e))return oz(e,t);if(ae(e))return rz(e,t);if(qt(e))return sz(e,t);throw new Error("ValueEquals: Unable to compare value")}o(Di,"Equal");var az=Qe({type:ze("insert"),path:Br(),value:go()}),cz=Qe({type:ze("update"),path:Br(),value:go()}),uz=Qe({type:ze("delete"),path:Br()}),EP=Je([az,cz,uz]),Xy=class Xy extends re{constructor(t,r){super(r),this.value=t}};o(Xy,"ValueDiffError");var wf=Xy;function $f(e,t){return{type:"update",path:e,value:t}}o($f,"CreateUpdate");function TP(e,t){return{type:"insert",path:e,value:t}}o(TP,"CreateInsert");function kP(e){return{type:"delete",path:e}}o(kP,"CreateDelete");function PP(e){if(globalThis.Object.getOwnPropertySymbols(e).length>0)throw new wf(e,"Cannot diff objects with symbols")}o(PP,"AssertDiffable");function*fz(e,t,r){if(PP(t),PP(r),!xm(r))return yield $f(e,r);let n=globalThis.Object.getOwnPropertyNames(t),i=globalThis.Object.getOwnPropertyNames(r);for(let s of i)ne(t,s)||(yield TP("".concat(e,"/").concat(s),r[s]));for(let s of n)ne(r,s)&&(Di(t,r)||(yield*A(vf("".concat(e,"/").concat(s),t[s],r[s]))));for(let s of n)ne(r,s)||(yield kP("".concat(e,"/").concat(s)))}o(fz,"ObjectType");function*lz(e,t,r){if(!se(r))return yield $f(e,r);for(let n=0;n<Math.min(t.length,r.length);n++)yield*A(vf("".concat(e,"/").concat(n),t[n],r[n]));for(let n=0;n<r.length;n++)n<t.length||(yield TP("".concat(e,"/").concat(n),r[n]));for(let n=t.length-1;n>=0;n--)n<r.length||(yield kP("".concat(e,"/").concat(n)))}o(lz,"ArrayType");function*pz(e,t,r){if(!zr(r)||t.length!==r.length||globalThis.Object.getPrototypeOf(t).constructor.name!==globalThis.Object.getPrototypeOf(r).constructor.name)return yield $f(e,r);for(let n=0;n<Math.min(t.length,r.length);n++)yield*A(vf("".concat(e,"/").concat(n),t[n],r[n]))}o(pz,"TypedArrayType");function*dz(e,t,r){t!==r&&(yield $f(e,r))}o(dz,"ValueType");function*vf(e,t,r){if(xm(t))return yield*A(fz(e,t,r));if(se(t))return yield*A(lz(e,t,r));if(zr(t))return yield*A(pz(e,t,r));if(qt(t))return yield*A(dz(e,t,r));throw new wf(t,"Unable to diff value")}o(vf,"Visit");function FP(e,t){return[...vf("",e,t)]}o(FP,"Diff");function mz(e){return e.length>0&&e[0].path===""&&e[0].type==="update"}o(mz,"IsRootUpdate");function yz(e){return e.length===0}o(yz,"IsIdentity");function AP(e,t){if(mz(t))return Re(t[0].value);if(yz(t))return Re(e);let r=Re(e);for(let n of t)switch(n.type){case"insert":{Qr.Set(r,n.path,n.value);break}case"update":{Qr.Set(r,n.path,n.value);break}case"delete":{Qr.Delete(r,n.path);break}}return r}o(AP,"Patch");c();function jP(...e){let[t,r,n]=e.length===3?[e[0],e[1],e[2]]:[e[0],[],e[1]],i=zn(t,r)?gf(t,r,n):n;if(!he(t,r,i))throw new Qs(t,i,Mn(t,r,i).First());return i}o(jP,"Encode");c();var eh=class eh extends re{constructor(t){super(t)}};o(eh,"ValueMutateError");var Of=eh;function hz(e,t,r,n){if(!ae(r))Qr.Set(e,t,Re(n));else{let i=Object.getOwnPropertyNames(r),s=Object.getOwnPropertyNames(n);for(let a of i)s.includes(a)||delete r[a];for(let a of s)i.includes(a)||(r[a]=null);for(let a of s)Qy(e,"".concat(t,"/").concat(a),r[a],n[a])}}o(hz,"ObjectType");function gz(e,t,r,n){if(!se(r))Qr.Set(e,t,Re(n));else{for(let i=0;i<n.length;i++)Qy(e,"".concat(t,"/").concat(i),r[i],n[i]);r.splice(n.length)}}o(gz,"ArrayType");function xz(e,t,r,n){if(zr(r)&&r.length===n.length)for(let i=0;i<r.length;i++)r[i]=n[i];else Qr.Set(e,t,Re(n))}o(xz,"TypedArrayType");function Iz(e,t,r,n){r!==n&&Qr.Set(e,t,n)}o(Iz,"ValueType");function Qy(e,t,r,n){if(se(n))return gz(e,t,r,n);if(zr(n))return xz(e,t,r,n);if(ae(n))return hz(e,t,r,n);if(qt(n))return Iz(e,t,r,n)}o(Qy,"Visit");function NP(e){return zr(e)||qt(e)}o(NP,"IsNonMutableValue");function bz(e,t){return ae(e)&&se(t)||se(e)&&ae(t)}o(bz,"IsMismatchedValue");function RP(e,t){if(NP(e)||NP(t))throw new Of("Only object and array types can be mutated at the root level");if(bz(e,t))throw new Of("Cannot assign due type mismatch of assignable values");Qy(e,"",e,t)}o(RP,"Mutate");c();var wz=[(e,t,r)=>Re(r),(e,t,r)=>xf(e,t,r),(e,t,r)=>mf(e,t,r),(e,t,r)=>hf(e,t,r),(e,t,r)=>(pf(e,t,r),r),(e,t,r)=>zn(e,t)?Xs(e,t,r):r];function CP(e,t,r){return wz.reduce((n,i)=>i(e,t,n),r)}o(CP,"ParseValue");function MP(...e){return e.length===3?CP(e[0],e[1],e[2]):CP(e[0],[],e[1])}o(MP,"Parse");c();var $o={};To($o,{Assert:()=>pf,Cast:()=>zy,Check:()=>he,Clean:()=>mf,Clone:()=>Re,Convert:()=>hf,Create:()=>Xr,Decode:()=>_P,Default:()=>xf,Diff:()=>FP,Edit:()=>EP,Encode:()=>jP,Equal:()=>Di,Errors:()=>Mn,Hash:()=>Xo,Mutate:()=>RP,Parse:()=>MP,Patch:()=>AP,ValueErrorIterator:()=>Yr});c();c();var rh=class rh extends re{constructor(r){super("Unable to dereference schema with $id '".concat(r.$ref,"'"));tt(this,"schema");this.schema=r}};o(rh,"TypeDereferenceError");var th=rh;function $z(e,t){let r=t.find(n=>n.$id===e.$ref);if(r===void 0)throw new th(e);return qi(r,t)}o($z,"Resolve");function _f(e,t){return!Oe.IsString(e.$id)||t.some(r=>r.$id===e.$id)||t.push(e),t}o(_f,"Pushref");function qi(e,t){return e[v]==="This"||e[v]==="Ref"?$z(e,t):e}o(qi,"Deref");c();function vz(e,t,r){let n=e.get(t);if(n!==void 0)return n;let i=zn(t,r);return e.set(t,i),i}o(vz,"HasTransformCached");function Sf(){let e=new WeakMap;return{HasTransform:o((t,r)=>vz(e,t,r),"HasTransform")}}o(Sf,"CreateTransformCache");function xt(e,t,r){try{return x.IsTransform(e)?e[pt].Decode(r):r}catch(n){throw new Li(e,t,r,n)}}o(xt,"Default");function Oz(e,t,r,n,i){return Oe.IsArray(n)?xt(e,r,n.map((s,a)=>Vn(e.items,t,"".concat(r,"/").concat(a),s,i))):xt(e,r,n)}o(Oz,"FromArray");function _z(e,t,r,n,i){if(!Oe.IsObject(n)||qt(n))return xt(e,r,n);let s=Jo(e),a=s.map(h=>h[0]),u=g({},n);for(let[h,b]of s)h in u&&(u[h]=Vn(b,t,"".concat(r,"/").concat(h),u[h],i));if(!x.IsTransform(e.unevaluatedProperties))return xt(e,r,u);let l=Object.getOwnPropertyNames(u),d=e.unevaluatedProperties,m=g({},u);for(let h of l)a.includes(h)||(m[h]=xt(d,"".concat(r,"/").concat(h),m[h]));return xt(e,r,m)}o(_z,"FromIntersect");function Sz(e,t,r,n,i){return xt(e,r,Vn(e.not,t,r,n,i))}o(Sz,"FromNot");function Pz(e,t,r,n,i){if(!Oe.IsObject(n))return xt(e,r,n);let s=At(e),a=g({},n);for(let m of s)Oe.HasPropertyKey(a,m)&&(Oe.IsUndefined(a[m])&&(!x.IsUndefined(e.properties[m])||Ge.IsExactOptionalProperty(a,m))||(a[m]=Vn(e.properties[m],t,"".concat(r,"/").concat(m),a[m],i)));if(!x.IsSchema(e.additionalProperties))return xt(e,r,a);let u=Object.getOwnPropertyNames(a),l=e.additionalProperties,d=g({},a);for(let m of u)s.includes(m)||(d[m]=xt(l,"".concat(r,"/").concat(m),d[m]));return xt(e,r,d)}o(Pz,"FromObject");function Ez(e,t,r,n,i){if(!Oe.IsObject(n))return xt(e,r,n);let s=Object.getOwnPropertyNames(e.patternProperties)[0],a=new RegExp(s),u=g({},n);for(let h of Object.getOwnPropertyNames(n))a.test(h)&&(u[h]=Vn(e.patternProperties[s],t,"".concat(r,"/").concat(h),u[h],i));if(!x.IsSchema(e.additionalProperties))return xt(e,r,u);let l=Object.getOwnPropertyNames(u),d=e.additionalProperties,m=g({},u);for(let h of l)a.test(h)||(m[h]=xt(d,"".concat(r,"/").concat(h),m[h]));return xt(e,r,m)}o(Ez,"FromRecord");function Tz(e,t,r,n,i){let s=qi(e,t);return xt(e,r,Vn(s,t,r,n,i))}o(Tz,"FromRef");function kz(e,t,r,n,i){let s=qi(e,t);return xt(e,r,Vn(s,t,r,n,i))}o(kz,"FromThis");function Fz(e,t,r,n,i){return Oe.IsArray(n)&&Oe.IsArray(e.items)?xt(e,r,e.items.map((s,a)=>Vn(s,t,"".concat(r,"/").concat(a),n[a],i))):xt(e,r,n)}o(Fz,"FromTuple");function Az(e,t,r,n,i){for(let s of e.anyOf){if(!$o.Check(s,t,n))continue;let a=Vn(s,t,r,n,i);return xt(e,r,a)}return xt(e,r,n)}o(Az,"FromUnion");function Vn(e,t,r,n,i){if(!i.HasTransform(e,t))return n;let s=_f(e,t),a=e;switch(e[v]){case"Array":return Oz(a,s,r,n,i);case"Intersect":return _z(a,s,r,n,i);case"Not":return Sz(a,s,r,n,i);case"Object":return Pz(a,s,r,n,i);case"Record":return Ez(a,s,r,n,i);case"Ref":return Tz(a,s,r,n,i);case"Symbol":return xt(a,r,n);case"This":return kz(a,s,r,n,i);case"Tuple":return Fz(a,s,r,n,i);case"Union":return Az(a,s,r,n,i);default:return xt(a,r,n)}}o(Vn,"Visit");function LP(e,t,r){let n=Sf();return Vn(e,t,"",r,n)}o(LP,"FastTransformDecode");c();function ir(e,t,r){try{return x.IsTransform(e)?e[pt].Encode(r):r}catch(n){throw new Ui(e,t,r,n)}}o(ir,"Default");function jz(e,t,r,n,i){let s=ir(e,r,n);return Oe.IsArray(s)?s.map((a,u)=>Bn(e.items,t,"".concat(r,"/").concat(u),a,i)):s}o(jz,"FromArray");function Nz(e,t,r,n,i){let s=ir(e,r,n);if(!Oe.IsObject(n)||qt(n))return s;let a=Jo(e),u=a.map(b=>b[0]),l=g({},s);for(let[b,$]of a)b in l&&(l[b]=Bn($,t,"".concat(r,"/").concat(b),l[b],i));if(!x.IsTransform(e.unevaluatedProperties))return l;let d=Object.getOwnPropertyNames(l),m=e.unevaluatedProperties,h=g({},l);for(let b of d)u.includes(b)||(h[b]=ir(m,"".concat(r,"/").concat(b),h[b]));return h}o(Nz,"FromIntersect");function Rz(e,t,r,n){return ir(e.not,r,ir(e,r,n))}o(Rz,"FromNot");function Cz(e,t,r,n,i){let s=ir(e,r,n);if(!Oe.IsObject(s))return s;let a=At(e),u=g({},s);for(let h of a)Oe.HasPropertyKey(u,h)&&(Oe.IsUndefined(u[h])&&(!x.IsUndefined(e.properties[h])||Ge.IsExactOptionalProperty(u,h))||(u[h]=Bn(e.properties[h],t,"".concat(r,"/").concat(h),u[h],i)));if(!x.IsSchema(e.additionalProperties))return u;let l=Object.getOwnPropertyNames(u),d=e.additionalProperties,m=g({},u);for(let h of l)a.includes(h)||(m[h]=ir(d,"".concat(r,"/").concat(h),m[h]));return m}o(Cz,"FromObject");function Mz(e,t,r,n,i){let s=ir(e,r,n);if(!Oe.IsObject(n))return s;let a=Object.getOwnPropertyNames(e.patternProperties)[0],u=new RegExp(a),l=g({},s);for(let b of Object.getOwnPropertyNames(n))u.test(b)&&(l[b]=Bn(e.patternProperties[a],t,"".concat(r,"/").concat(b),l[b],i));if(!x.IsSchema(e.additionalProperties))return l;let d=Object.getOwnPropertyNames(l),m=e.additionalProperties,h=g({},l);for(let b of d)u.test(b)||(h[b]=ir(m,"".concat(r,"/").concat(b),h[b]));return h}o(Mz,"FromRecord");function Lz(e,t,r,n,i){let s=qi(e,t),a=Bn(s,t,r,n,i);return ir(e,r,a)}o(Lz,"FromRef");function Uz(e,t,r,n,i){let s=qi(e,t),a=Bn(s,t,r,n,i);return ir(e,r,a)}o(Uz,"FromThis");function Dz(e,t,r,n,i){let s=ir(e,r,n);return Oe.IsArray(e.items)?e.items.map((a,u)=>Bn(a,t,"".concat(r,"/").concat(u),s[u],i)):[]}o(Dz,"FromTuple");function qz(e,t,r,n,i){for(let s of e.anyOf){if(!$o.Check(s,t,n))continue;let a=Bn(s,t,r,n,i);return ir(e,r,a)}for(let s of e.anyOf){let a=Bn(s,t,r,n,i);if($o.Check(e,t,a))return ir(e,r,a)}return ir(e,r,n)}o(qz,"FromUnion");function Bn(e,t,r,n,i){if(!i.HasTransform(e,t))return n;let s=_f(e,t),a=e;switch(e[v]){case"Array":return jz(a,s,r,n,i);case"Intersect":return Nz(a,s,r,n,i);case"Not":return Rz(a,s,r,n);case"Object":return Cz(a,s,r,n,i);case"Record":return Mz(a,s,r,n,i);case"Ref":return Lz(a,s,r,n,i);case"This":return Uz(a,s,r,n,i);case"Tuple":return Dz(a,s,r,n,i);case"Union":return qz(a,s,r,n,i);default:return ir(a,r,n)}}o(Bn,"Visit");function UP(e,t,r){let n=Sf();return Bn(e,t,"",r,n)}o(UP,"FastTransformEncode");c();var ah=class ah{constructor(t,r,n,i){this.schema=t,this.references=r,this.checkFunc=n,this.code=i,this.hasTransform=zn(t,r)}Code(){return this.code}Errors(t){return Mn(this.schema,this.references,t)}Check(t){return this.checkFunc(t)}Decode(t){if(!this.checkFunc(t))throw new Ys(this.schema,t,this.Errors(t).First());return this.hasTransform?Xs(this.schema,this.references,t):t}Encode(t){let r=this.hasTransform?gf(this.schema,this.references,t):t;if(!this.checkFunc(r))throw new Qs(this.schema,t,this.Errors(t).First());return r}};o(ah,"TypeCheck");var nh=ah,vo;(function(e){function t(s){return s===36}o(t,"DollarSign"),e.DollarSign=t;function r(s){return s===95}o(r,"IsUnderscore"),e.IsUnderscore=r;function n(s){return s>=65&&s<=90||s>=97&&s<=122}o(n,"IsAlpha"),e.IsAlpha=n;function i(s){return s>=48&&s<=57}o(i,"IsNumeric"),e.IsNumeric=i})(vo||(vo={}));var Pf;(function(e){function t(s){return s.length===0?!1:vo.IsNumeric(s.charCodeAt(0))}o(t,"IsFirstCharacterNumeric");function r(s){if(t(s))return!1;for(let a=0;a<s.length;a++){let u=s.charCodeAt(a);if(!(vo.IsAlpha(u)||vo.IsNumeric(u)||vo.DollarSign(u)||vo.IsUnderscore(u)))return!1}return!0}o(r,"IsAccessor");function n(s){return s.replace(/'/g,"\\'")}o(n,"EscapeHyphen");function i(s,a){return r(a)?"".concat(s,".").concat(a):"".concat(s,"['").concat(n(a),"']")}o(i,"Encode"),e.Encode=i})(Pf||(Pf={}));var oh;(function(e){function t(r){let n=[];for(let i=0;i<r.length;i++){let s=r.charCodeAt(i);vo.IsNumeric(s)||vo.IsAlpha(s)?n.push(r.charAt(i)):n.push("_".concat(s,"_"))}return n.join("").replace(/__/g,"_")}o(t,"Encode"),e.Encode=t})(oh||(oh={}));var ih;(function(e){function t(r){return r.replace(/'/g,"\\'")}o(t,"Escape"),e.Escape=t})(ih||(ih={}));var ch=class ch extends re{constructor(t){super("Unknown type"),this.schema=t}};o(ch,"TypeCompilerUnknownTypeError");var sh=ch,uh=class uh extends re{constructor(t){super("Preflight validation check failed to guard for the given schema"),this.schema=t}};o(uh,"TypeCompilerTypeGuardError");var Ef=uh,zi;(function(e){function t(a,u,l){return Ge.ExactOptionalPropertyTypes?"('".concat(u,"' in ").concat(a," ? ").concat(l," : true)"):"(".concat(Pf.Encode(a,u)," !== undefined ? ").concat(l," : true)")}o(t,"IsExactOptionalProperty"),e.IsExactOptionalProperty=t;function r(a){return Ge.AllowArrayObject?"(typeof ".concat(a," === 'object' && ").concat(a," !== null)"):"(typeof ".concat(a," === 'object' && ").concat(a," !== null && !Array.isArray(").concat(a,"))")}o(r,"IsObjectLike"),e.IsObjectLike=r;function n(a){return Ge.AllowArrayObject?"(typeof ".concat(a," === 'object' && ").concat(a," !== null && !(").concat(a," instanceof Date) && !(").concat(a," instanceof Uint8Array))"):"(typeof ".concat(a," === 'object' && ").concat(a," !== null && !Array.isArray(").concat(a,") && !(").concat(a," instanceof Date) && !(").concat(a," instanceof Uint8Array))")}o(n,"IsRecordLike"),e.IsRecordLike=n;function i(a){return Ge.AllowNaN?"typeof ".concat(a," === 'number'"):"Number.isFinite(".concat(a,")")}o(i,"IsNumberLike"),e.IsNumberLike=i;function s(a){return Ge.AllowNullVoid?"(".concat(a," === undefined || ").concat(a," === null)"):"".concat(a," === undefined")}o(s,"IsVoidLike"),e.IsVoidLike=s})(zi||(zi={}));var Tf;(function(e){function t(I){return I[v]==="Any"||I[v]==="Unknown"}o(t,"IsAnyOrUnknown");function*r(I,U,w){yield"true"}o(r,"FromAny");function*n(I,U,w){yield"Array.isArray(".concat(w,")");let[Q,q]=[Ft("value","any"),Ft("acc","number")];X(I.maxItems)&&(yield"".concat(w,".length <= ").concat(I.maxItems)),X(I.minItems)&&(yield"".concat(w,".length >= ").concat(I.minItems));let K=Nt(I.items,U,"value");if(yield"".concat(w,".every((").concat(Q,") => ").concat(K,")"),Se(I.contains)||X(I.minContains)||X(I.maxContains)){let ct=Se(I.contains)?I.contains:He(),sr=Nt(ct,U,"value"),Zn=X(I.minContains)?["(count >= ".concat(I.minContains,")")]:[],nn=X(I.maxContains)?["(count <= ".concat(I.maxContains,")")]:[],wn="const count = value.reduce((".concat(q,", ").concat(Q,") => ").concat(sr," ? acc + 1 : acc, 0)"),Fc=["(count > 0)",...Zn,...nn].join(" && ");yield"((".concat(Q,") => { ").concat(wn,"; return ").concat(Fc,"})(").concat(w,")")}if(I.uniqueItems===!0){let sr="const set = new Set(); for(const element of value) { ".concat("const hashed = hash(element); if(set.has(hashed)) { return false } else { set.add(hashed) } } return true"," }");yield"((".concat(Q,") => { ").concat(sr," )(").concat(w,")")}}o(n,"FromArray");function*i(I,U,w){yield"(typeof value === 'object' && Symbol.asyncIterator in ".concat(w,")")}o(i,"FromAsyncIterator");function*s(I,U,w){yield"(typeof ".concat(w," === 'bigint')"),Dt(I.exclusiveMaximum)&&(yield"".concat(w," < BigInt(").concat(I.exclusiveMaximum,")")),Dt(I.exclusiveMinimum)&&(yield"".concat(w," > BigInt(").concat(I.exclusiveMinimum,")")),Dt(I.maximum)&&(yield"".concat(w," <= BigInt(").concat(I.maximum,")")),Dt(I.minimum)&&(yield"".concat(w," >= BigInt(").concat(I.minimum,")")),Dt(I.multipleOf)&&(yield"(".concat(w," % BigInt(").concat(I.multipleOf,")) === 0"))}o(s,"FromBigInt");function*a(I,U,w){yield"(typeof ".concat(w," === 'boolean')")}o(a,"FromBoolean");function*u(I,U,w){yield*A(vt(I.returns,U,"".concat(w,".prototype")))}o(u,"FromConstructor");function*l(I,U,w){yield"(".concat(w," instanceof Date) && Number.isFinite(").concat(w,".getTime())"),X(I.exclusiveMaximumTimestamp)&&(yield"".concat(w,".getTime() < ").concat(I.exclusiveMaximumTimestamp)),X(I.exclusiveMinimumTimestamp)&&(yield"".concat(w,".getTime() > ").concat(I.exclusiveMinimumTimestamp)),X(I.maximumTimestamp)&&(yield"".concat(w,".getTime() <= ").concat(I.maximumTimestamp)),X(I.minimumTimestamp)&&(yield"".concat(w,".getTime() >= ").concat(I.minimumTimestamp)),X(I.multipleOfTimestamp)&&(yield"(".concat(w,".getTime() % ").concat(I.multipleOfTimestamp,") === 0"))}o(l,"FromDate");function*d(I,U,w){yield"(typeof ".concat(w," === 'function')")}o(d,"FromFunction");function*m(I,U,w){yield"Number.isInteger(".concat(w,")"),X(I.exclusiveMaximum)&&(yield"".concat(w," < ").concat(I.exclusiveMaximum)),X(I.exclusiveMinimum)&&(yield"".concat(w," > ").concat(I.exclusiveMinimum)),X(I.maximum)&&(yield"".concat(w," <= ").concat(I.maximum)),X(I.minimum)&&(yield"".concat(w," >= ").concat(I.minimum)),X(I.multipleOf)&&(yield"(".concat(w," % ").concat(I.multipleOf,") === 0"))}o(m,"FromInteger");function*h(I,U,w){let Q=I.allOf.map(q=>Nt(q,U,w)).join(" && ");if(I.unevaluatedProperties===!1){let q=Kt("".concat(new RegExp(ho(I)),";")),K="Object.getOwnPropertyNames(".concat(w,").every(key => ").concat(q,".test(key))");yield"(".concat(Q," && ").concat(K,")")}else if(Se(I.unevaluatedProperties)){let q=Kt("".concat(new RegExp(ho(I)),";")),K="Object.getOwnPropertyNames(".concat(w,").every(key => ").concat(q,".test(key) || ").concat(Nt(I.unevaluatedProperties,U,"".concat(w,"[key]")),")");yield"(".concat(Q," && ").concat(K,")")}else yield"(".concat(Q,")")}o(h,"FromIntersect");function*b(I,U,w){yield"(typeof value === 'object' && Symbol.iterator in ".concat(w,")")}o(b,"FromIterator");function*$(I,U,w){typeof I.const=="number"||typeof I.const=="boolean"?yield"(".concat(w," === ").concat(I.const,")"):yield"(".concat(w," === '").concat(ih.Escape(I.const),"')")}o($,"FromLiteral");function*O(I,U,w){yield"false"}o(O,"FromNever");function*_(I,U,w){let Q=Nt(I.not,U,w);yield"(!".concat(Q,")")}o(_,"FromNot");function*E(I,U,w){yield"(".concat(w," === null)")}o(E,"FromNull");function*k(I,U,w){yield zi.IsNumberLike(w),X(I.exclusiveMaximum)&&(yield"".concat(w," < ").concat(I.exclusiveMaximum)),X(I.exclusiveMinimum)&&(yield"".concat(w," > ").concat(I.exclusiveMinimum)),X(I.maximum)&&(yield"".concat(w," <= ").concat(I.maximum)),X(I.minimum)&&(yield"".concat(w," >= ").concat(I.minimum)),X(I.multipleOf)&&(yield"(".concat(w," % ").concat(I.multipleOf,") === 0"))}o(k,"FromNumber");function*G(I,U,w){yield zi.IsObjectLike(w),X(I.minProperties)&&(yield"Object.getOwnPropertyNames(".concat(w,").length >= ").concat(I.minProperties)),X(I.maxProperties)&&(yield"Object.getOwnPropertyNames(".concat(w,").length <= ").concat(I.maxProperties));let Q=Object.getOwnPropertyNames(I.properties);for(let q of Q){let K=Pf.Encode(w,q),ct=I.properties[q];if(I.required&&I.required.includes(q))yield*A(vt(ct,U,K)),(xo(ct)||t(ct))&&(yield"('".concat(q,"' in ").concat(w,")"));else{let sr=Nt(ct,U,K);yield zi.IsExactOptionalProperty(w,q,sr)}}if(I.additionalProperties===!1)if(I.required&&I.required.length===Q.length)yield"Object.getOwnPropertyNames(".concat(w,").length === ").concat(Q.length);else{let q="[".concat(Q.map(K=>"'".concat(K,"'")).join(", "),"]");yield"Object.getOwnPropertyNames(".concat(w,").every(key => ").concat(q,".includes(key))")}if(typeof I.additionalProperties=="object"){let q=Nt(I.additionalProperties,U,"".concat(w,"[key]")),K="[".concat(Q.map(ct=>"'".concat(ct,"'")).join(", "),"]");yield"(Object.getOwnPropertyNames(".concat(w,").every(key => ").concat(K,".includes(key) || ").concat(q,"))")}}o(G,"FromObject");function*R(I,U,w){yield"(typeof value === 'object' && typeof ".concat(w,".then === 'function')")}o(R,"FromPromise");function*N(I,U,w){yield zi.IsRecordLike(w),X(I.minProperties)&&(yield"Object.getOwnPropertyNames(".concat(w,").length >= ").concat(I.minProperties)),X(I.maxProperties)&&(yield"Object.getOwnPropertyNames(".concat(w,").length <= ").concat(I.maxProperties));let[Q,q]=Object.entries(I.patternProperties)[0],K=Kt("".concat(new RegExp(Q))),ct=Nt(q,U,"value"),sr=Se(I.additionalProperties)?Nt(I.additionalProperties,U,w):I.additionalProperties===!1?"false":"true",Zn="(".concat(K,".test(key) ? ").concat(ct," : ").concat(sr,")");yield"(Object.entries(".concat(w,").every(([key, value]) => ").concat(Zn,"))")}o(N,"FromRecord");function*C(I,U,w){let Q=Ne(I,U);if(Te.functions.has(I.$ref))return yield"".concat(Rt(I.$ref),"(").concat(w,")");yield*A(vt(Q,U,w))}o(C,"FromRef");function*me(I,U,w){let Q=Kt("".concat(new RegExp(I.source,I.flags),";"));yield"(typeof ".concat(w," === 'string')"),X(I.maxLength)&&(yield"".concat(w,".length <= ").concat(I.maxLength)),X(I.minLength)&&(yield"".concat(w,".length >= ").concat(I.minLength)),yield"".concat(Q,".test(").concat(w,")")}o(me,"FromRegExp");function*le(I,U,w){if(yield"(typeof ".concat(w," === 'string')"),X(I.maxLength)&&(yield"".concat(w,".length <= ").concat(I.maxLength)),X(I.minLength)&&(yield"".concat(w,".length >= ").concat(I.minLength)),I.pattern!==void 0){let Q=Kt("".concat(new RegExp(I.pattern),";"));yield"".concat(Q,".test(").concat(w,")")}I.format!==void 0&&(yield"format('".concat(I.format,"', ").concat(w,")"))}o(le,"FromString");function*ee(I,U,w){yield"(typeof ".concat(w," === 'symbol')")}o(ee,"FromSymbol");function*Z(I,U,w){yield"(typeof ".concat(w," === 'string')");let Q=Kt("".concat(new RegExp(I.pattern),";"));yield"".concat(Q,".test(").concat(w,")")}o(Z,"FromTemplateLiteral");function*we(I,U,w){yield"".concat(Rt(I.$ref),"(").concat(w,")")}o(we,"FromThis");function*$e(I,U,w){if(yield"Array.isArray(".concat(w,")"),I.items===void 0)return yield"".concat(w,".length === 0");yield"(".concat(w,".length === ").concat(I.maxItems,")");for(let Q=0;Q<I.items.length;Q++){let q=Nt(I.items[Q],U,"".concat(w,"[").concat(Q,"]"));yield"".concat(q)}}o($e,"FromTuple");function*V(I,U,w){yield"".concat(w," === undefined")}o(V,"FromUndefined");function*De(I,U,w){let Q=I.anyOf.map(q=>Nt(q,U,w));yield"(".concat(Q.join(" || "),")")}o(De,"FromUnion");function*ue(I,U,w){yield"".concat(w," instanceof Uint8Array"),X(I.maxByteLength)&&(yield"(".concat(w,".length <= ").concat(I.maxByteLength,")")),X(I.minByteLength)&&(yield"(".concat(w,".length >= ").concat(I.minByteLength,")"))}o(ue,"FromUint8Array");function*Ve(I,U,w){yield"true"}o(Ve,"FromUnknown");function*Ee(I,U,w){yield zi.IsVoidLike(w)}o(Ee,"FromVoid");function*et(I,U,w){let Q=Te.instances.size;Te.instances.set(Q,I),yield"kind('".concat(I[v],"', ").concat(Q,", ").concat(w,")")}o(et,"FromKind");function*vt(I,U,w,Q=!0){let q=_e(I.$id)?[...U,I]:U,K=I;if(Q&&_e(I.$id)){let ct=Rt(I.$id);if(Te.functions.has(ct))return yield"".concat(ct,"(").concat(w,")");{let sr=Wt(ct,I,U,"value",!1);return Te.functions.set(ct,sr),yield"".concat(ct,"(").concat(w,")")}}switch(K[v]){case"Any":return yield*A(r(K,q,w));case"Array":return yield*A(n(K,q,w));case"AsyncIterator":return yield*A(i(K,q,w));case"BigInt":return yield*A(s(K,q,w));case"Boolean":return yield*A(a(K,q,w));case"Constructor":return yield*A(u(K,q,w));case"Date":return yield*A(l(K,q,w));case"Function":return yield*A(d(K,q,w));case"Integer":return yield*A(m(K,q,w));case"Intersect":return yield*A(h(K,q,w));case"Iterator":return yield*A(b(K,q,w));case"Literal":return yield*A($(K,q,w));case"Never":return yield*A(O(K,q,w));case"Not":return yield*A(_(K,q,w));case"Null":return yield*A(E(K,q,w));case"Number":return yield*A(k(K,q,w));case"Object":return yield*A(G(K,q,w));case"Promise":return yield*A(R(K,q,w));case"Record":return yield*A(N(K,q,w));case"Ref":return yield*A(C(K,q,w));case"RegExp":return yield*A(me(K,q,w));case"String":return yield*A(le(K,q,w));case"Symbol":return yield*A(ee(K,q,w));case"TemplateLiteral":return yield*A(Z(K,q,w));case"This":return yield*A(we(K,q,w));case"Tuple":return yield*A($e(K,q,w));case"Undefined":return yield*A(V(K,q,w));case"Union":return yield*A(De(K,q,w));case"Uint8Array":return yield*A(ue(K,q,w));case"Unknown":return yield*A(Ve(K,q,w));case"Void":return yield*A(Ee(K,q,w));default:if(!Tt.Has(K[v]))throw new sh(I);return yield*A(et(K,q,w))}}o(vt,"Visit");let Te={language:"javascript",functions:new Map,variables:new Map,instances:new Map};function Nt(I,U,w,Q=!0){return"(".concat([...vt(I,U,w,Q)].join(" && "),")")}o(Nt,"CreateExpression");function Rt(I){return"check_".concat(oh.Encode(I))}o(Rt,"CreateFunctionName");function Kt(I){let U="local_".concat(Te.variables.size);return Te.variables.set(U,"const ".concat(U," = ").concat(I)),U}o(Kt,"CreateVariable");function Wt(I,U,w,Q,q=!0){let[K,ct]=["\n",wn=>"".padStart(wn," ")],sr=Ft("value","any"),Zn=at("boolean"),nn=[...vt(U,w,Q,q)].map(wn=>"".concat(ct(4)).concat(wn)).join(" &&".concat(K));return"function ".concat(I,"(").concat(sr,")").concat(Zn," {").concat(K).concat(ct(2),"return (").concat(K).concat(nn).concat(K).concat(ct(2),")\n}")}o(Wt,"CreateFunction");function Ft(I,U){let w=Te.language==="typescript"?": ".concat(U):"";return"".concat(I).concat(w)}o(Ft,"CreateParameter");function at(I){return Te.language==="typescript"?": ".concat(I):""}o(at,"CreateReturns");function Nr(I,U,w){let Q=Wt("check",I,U,"value"),q=Ft("value","any"),K=at("boolean"),ct=[...Te.functions.values()],sr=[...Te.variables.values()],Zn=_e(I.$id)?"return function check(".concat(q,")").concat(K," {\n return ").concat(Rt(I.$id),"(value)\n}"):"return ".concat(Q);return[...sr,...ct,Zn].join("\n")}o(Nr,"Build");function Jn(...I){let U={language:"javascript"},[w,Q,q]=I.length===2&&se(I[1])?[I[0],I[1],U]:I.length===2&&!se(I[1])?[I[0],[],I[1]]:I.length===3?[I[0],I[1],I[2]]:I.length===1?[I[0],[],U]:[null,[],U];if(Te.language=q.language,Te.variables.clear(),Te.functions.clear(),Te.instances.clear(),!Se(w))throw new Ef(w);for(let K of Q)if(!Se(K))throw new Ef(K);return Nr(w,Q,q)}o(Jn,"Code"),e.Code=Jn;function Eo(I,U=[]){let w=Jn(I,U,{language:"javascript"}),Q=globalThis.Function("kind","format","hash",w),q=new Map(Te.instances);function K(nn,wn,Fc){if(!Tt.Has(nn)||!q.has(wn))return!1;let bk=Tt.Get(nn),wk=q.get(wn);return bk(wk,Fc)}o(K,"typeRegistryFunction");function ct(nn,wn){return lr.Has(nn)?lr.Get(nn)(wn):!1}o(ct,"formatRegistryFunction");function sr(nn){return Xo(nn)}o(sr,"hashFunction");let Zn=Q(K,ct,sr);return new nh(I,U,Zn,w)}o(Eo,"Compile"),e.Compile=Eo})(Tf||(Tf={}));c();c();var DP={},zz=o(function(e,t,r,n,i){var s=new Worker(DP[t]||(DP[t]=URL.createObjectURL(new Blob([e+';addEventListener("error",function(e){e=e.error;postMessage({$e$:[e.message,e.code,e.stack]})})'],{type:"text/javascript"}))));return s.onmessage=function(a){var u=a.data,l=u.$e$;if(l){var d=new Error(l[0]);d.code=l[1],d.stack=l[2],i(d,null)}else i(null,u)},s.postMessage(r,n),s},"wk"),st=Uint8Array,dr=Uint16Array,Pc=Int32Array,na=new st([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),oa=new st([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),_c=new st([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),BP=o(function(e,t){for(var r=new dr(31),n=0;n<31;++n)r[n]=t+=1<<e[n-1];for(var i=new Pc(r[30]),n=1;n<30;++n)for(var s=r[n];s<r[n+1];++s)i[s]=s-r[n]<<5|n;return{b:r,r:i}},"freb"),GP=BP(na,2),hh=GP.b,Nf=GP.r;hh[28]=258,Nf[258]=28;var KP=BP(oa,0),WP=KP.b,lh=KP.r,Sc=new dr(32768);for(Be=0;Be<32768;++Be)Oo=(Be&43690)>>1|(Be&21845)<<1,Oo=(Oo&52428)>>2|(Oo&13107)<<2,Oo=(Oo&61680)>>4|(Oo&3855)<<4,Sc[Be]=((Oo&65280)>>8|(Oo&255)<<8)>>1;var Oo,Be,tn=o(function(e,t,r){for(var n=e.length,i=0,s=new dr(t);i<n;++i)e[i]&&++s[e[i]-1];var a=new dr(t);for(i=1;i<t;++i)a[i]=a[i-1]+s[i-1]<<1;var u;if(r){u=new dr(1<<t);var l=15-t;for(i=0;i<n;++i)if(e[i])for(var d=i<<4|e[i],m=t-e[i],h=a[e[i]-1]++<<m,b=h|(1<<m)-1;h<=b;++h)u[Sc[h]>>l]=d}else for(u=new dr(n),i=0;i<n;++i)e[i]&&(u[i]=Sc[a[e[i]-1]++]>>15-e[i]);return u},"hMap"),_o=new st(288);for(Be=0;Be<144;++Be)_o[Be]=8;var Be;for(Be=144;Be<256;++Be)_o[Be]=9;var Be;for(Be=256;Be<280;++Be)_o[Be]=7;var Be;for(Be=280;Be<288;++Be)_o[Be]=8;var Be,ra=new st(32);for(Be=0;Be<32;++Be)ra[Be]=5;var Be,HP=tn(_o,9,0),JP=tn(_o,9,1),ZP=tn(ra,5,0),YP=tn(ra,5,1),Ff=o(function(e){for(var t=e[0],r=1;r<e.length;++r)e[r]>t&&(t=e[r]);return t},"max"),en=o(function(e,t,r){var n=t/8|0;return(e[n]|e[n+1]<<8)>>(t&7)&r},"bits"),Af=o(function(e,t){var r=t/8|0;return(e[r]|e[r+1]<<8|e[r+2]<<16)>>(t&7)},"bits16"),Ec=o(function(e){return(e+7)/8|0},"shft"),Vi=o(function(e,t,r){return(t==null||t<0)&&(t=0),(r==null||r>e.length)&&(r=e.length),new st(e.subarray(t,r))},"slc"),Lf={UnexpectedEOF:0,InvalidBlockType:1,InvalidLengthLiteral:2,InvalidDistance:3,StreamFinished:4,NoStreamHandler:5,InvalidHeader:6,NoCallback:7,InvalidUTF8:8,ExtraFieldTooLong:9,InvalidDate:10,FilenameTooLong:11,StreamFinishing:12,InvalidZipData:13,UnknownCompressionMethod:14},XP=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],St=o(function(e,t,r){var n=new Error(t||XP[e]);if(n.code=e,Error.captureStackTrace&&Error.captureStackTrace(n,St),!r)throw n;return n},"err"),QP=o(function(e,t,r,n){var i=e.length,s=n?n.length:0;if(!i||t.f&&!t.l)return r||new st(0);var a=!r,u=a||t.i!=2,l=t.i;a&&(r=new st(i*3));var d=o(function(w){var Q=r.length;if(w>Q){var q=new st(Math.max(Q*2,w));q.set(r),r=q}},"cbuf"),m=t.f||0,h=t.p||0,b=t.b||0,$=t.l,O=t.d,_=t.m,E=t.n,k=i*8;do{if(!$){m=en(e,h,1);var G=en(e,h+1,3);if(h+=3,G)if(G==1)$=JP,O=YP,_=9,E=5;else if(G==2){var me=en(e,h,31)+257,le=en(e,h+10,15)+4,ee=me+en(e,h+5,31)+1;h+=14;for(var Z=new st(ee),we=new st(19),$e=0;$e<le;++$e)we[_c[$e]]=en(e,h+$e*3,7);h+=le*3;for(var V=Ff(we),De=(1<<V)-1,ue=tn(we,V,1),$e=0;$e<ee;){var Ve=ue[en(e,h,De)];h+=Ve&15;var R=Ve>>4;if(R<16)Z[$e++]=R;else{var Ee=0,et=0;for(R==16?(et=3+en(e,h,3),h+=2,Ee=Z[$e-1]):R==17?(et=3+en(e,h,7),h+=3):R==18&&(et=11+en(e,h,127),h+=7);et--;)Z[$e++]=Ee}}var vt=Z.subarray(0,me),Te=Z.subarray(me);_=Ff(vt),E=Ff(Te),$=tn(vt,_,1),O=tn(Te,E,1)}else St(1);else{var R=Ec(h)+4,N=e[R-4]|e[R-3]<<8,C=R+N;if(C>i){l&&St(0);break}u&&d(b+N),r.set(e.subarray(R,C),b),t.b=b+=N,t.p=h=C*8,t.f=m;continue}if(h>k){l&&St(0);break}}u&&d(b+131072);for(var Nt=(1<<_)-1,Rt=(1<<E)-1,Kt=h;;Kt=h){var Ee=$[Af(e,h)&Nt],Wt=Ee>>4;if(h+=Ee&15,h>k){l&&St(0);break}if(Ee||St(2),Wt<256)r[b++]=Wt;else if(Wt==256){Kt=h,$=null;break}else{var Ft=Wt-254;if(Wt>264){var $e=Wt-257,at=na[$e];Ft=en(e,h,(1<<at)-1)+hh[$e],h+=at}var Nr=O[Af(e,h)&Rt],Jn=Nr>>4;Nr||St(3),h+=Nr&15;var Te=WP[Jn];if(Jn>3){var at=oa[Jn];Te+=Af(e,h)&(1<<at)-1,h+=at}if(h>k){l&&St(0);break}u&&d(b+131072);var Eo=b+Ft;if(b<Te){var I=s-Te,U=Math.min(Te,Eo);for(I+b<0&&St(3);b<U;++b)r[b]=n[I+b]}for(;b<Eo;++b)r[b]=r[b-Te]}}t.l=$,t.p=Kt,t.b=b,t.f=m,$&&(m=1,t.m=_,t.d=O,t.n=E)}while(!m);return b!=r.length&&a?Vi(r,0,b):r.subarray(0,b)},"inflt"),Gn=o(function(e,t,r){r<<=t&7;var n=t/8|0;e[n]|=r,e[n+1]|=r>>8},"wbits"),ea=o(function(e,t,r){r<<=t&7;var n=t/8|0;e[n]|=r,e[n+1]|=r>>8,e[n+2]|=r>>16},"wbits16"),jf=o(function(e,t){for(var r=[],n=0;n<e.length;++n)e[n]&&r.push({s:n,f:e[n]});var i=r.length,s=r.slice();if(!i)return{t:xh,l:0};if(i==1){var a=new st(r[0].s+1);return a[r[0].s]=1,{t:a,l:1}}r.sort(function(C,me){return C.f-me.f}),r.push({s:-1,f:25001});var u=r[0],l=r[1],d=0,m=1,h=2;for(r[0]={s:-1,f:u.f+l.f,l:u,r:l};m!=i-1;)u=r[r[d].f<r[h].f?d++:h++],l=r[d!=m&&r[d].f<r[h].f?d++:h++],r[m++]={s:-1,f:u.f+l.f,l:u,r:l};for(var b=s[0].s,n=1;n<i;++n)s[n].s>b&&(b=s[n].s);var $=new dr(b+1),O=Rf(r[m-1],$,0);if(O>t){var n=0,_=0,E=O-t,k=1<<E;for(s.sort(function(me,le){return $[le.s]-$[me.s]||me.f-le.f});n<i;++n){var G=s[n].s;if($[G]>t)_+=k-(1<<O-$[G]),$[G]=t;else break}for(_>>=E;_>0;){var R=s[n].s;$[R]<t?_-=1<<t-$[R]++-1:++n}for(;n>=0&&_;--n){var N=s[n].s;$[N]==t&&(--$[N],++_)}O=t}return{t:new st($),l:O}},"hTree"),Rf=o(function(e,t,r){return e.s==-1?Math.max(Rf(e.l,t,r+1),Rf(e.r,t,r+1)):t[e.s]=r},"ln"),ph=o(function(e){for(var t=e.length;t&&!e[--t];);for(var r=new dr(++t),n=0,i=e[0],s=1,a=o(function(l){r[n++]=l},"w"),u=1;u<=t;++u)if(e[u]==i&&u!=t)++s;else{if(!i&&s>2){for(;s>138;s-=138)a(32754);s>2&&(a(s>10?s-11<<5|28690:s-3<<5|12305),s=0)}else if(s>3){for(a(i),--s;s>6;s-=6)a(8304);s>2&&(a(s-3<<5|8208),s=0)}for(;s--;)a(i);s=1,i=e[u]}return{c:r.subarray(0,n),n:t}},"lc"),ta=o(function(e,t){for(var r=0,n=0;n<t.length;++n)r+=e[n]*t[n];return r},"clen"),gh=o(function(e,t,r){var n=r.length,i=Ec(t+2);e[i]=n&255,e[i+1]=n>>8,e[i+2]=e[i]^255,e[i+3]=e[i+1]^255;for(var s=0;s<n;++s)e[i+s+4]=r[s];return(i+4+n)*8},"wfblk"),dh=o(function(e,t,r,n,i,s,a,u,l,d,m){Gn(t,m++,r),++i[256];for(var h=jf(i,15),b=h.t,$=h.l,O=jf(s,15),_=O.t,E=O.l,k=ph(b),G=k.c,R=k.n,N=ph(_),C=N.c,me=N.n,le=new dr(19),ee=0;ee<G.length;++ee)++le[G[ee]&31];for(var ee=0;ee<C.length;++ee)++le[C[ee]&31];for(var Z=jf(le,7),we=Z.t,$e=Z.l,V=19;V>4&&!we[_c[V-1]];--V);var De=d+5<<3,ue=ta(i,_o)+ta(s,ra)+a,Ve=ta(i,b)+ta(s,_)+a+14+3*V+ta(le,we)+2*le[16]+3*le[17]+7*le[18];if(l>=0&&De<=ue&&De<=Ve)return gh(t,m,e.subarray(l,l+d));var Ee,et,vt,Te;if(Gn(t,m,1+(Ve<ue)),m+=2,Ve<ue){Ee=tn(b,$,0),et=b,vt=tn(_,E,0),Te=_;var Nt=tn(we,$e,0);Gn(t,m,R-257),Gn(t,m+5,me-1),Gn(t,m+10,V-4),m+=14;for(var ee=0;ee<V;++ee)Gn(t,m+3*ee,we[_c[ee]]);m+=3*V;for(var Rt=[G,C],Kt=0;Kt<2;++Kt)for(var Wt=Rt[Kt],ee=0;ee<Wt.length;++ee){var Ft=Wt[ee]&31;Gn(t,m,Nt[Ft]),m+=we[Ft],Ft>15&&(Gn(t,m,Wt[ee]>>5&127),m+=Wt[ee]>>12)}}else Ee=HP,et=_o,vt=ZP,Te=ra;for(var ee=0;ee<u;++ee){var at=n[ee];if(at>255){var Ft=at>>18&31;ea(t,m,Ee[Ft+257]),m+=et[Ft+257],Ft>7&&(Gn(t,m,at>>23&31),m+=na[Ft]);var Nr=at&31;ea(t,m,vt[Nr]),m+=Te[Nr],Nr>3&&(ea(t,m,at>>5&8191),m+=oa[Nr])}else ea(t,m,Ee[at]),m+=et[at]}return ea(t,m,Ee[256]),m+et[256]},"wblk"),eE=new Pc([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),xh=new st(0),tE=o(function(e,t,r,n,i,s){var a=s.z||e.length,u=new st(n+a+5*(1+Math.ceil(a/7e3))+i),l=u.subarray(n,u.length-i),d=s.l,m=(s.r||0)&7;if(t){m&&(l[0]=s.r>>3);for(var h=eE[t-1],b=h>>13,$=h&8191,O=(1<<r)-1,_=s.p||new dr(32768),E=s.h||new dr(O+1),k=Math.ceil(r/3),G=2*k,R=o(function(K){return(e[K]^e[K+1]<<k^e[K+2]<<G)&O},"hsh"),N=new Pc(25e3),C=new dr(288),me=new dr(32),le=0,ee=0,Z=s.i||0,we=0,$e=s.w||0,V=0;Z+2<a;++Z){var De=R(Z),ue=Z&32767,Ve=E[De];if(_[ue]=Ve,E[De]=ue,$e<=Z){var Ee=a-Z;if((le>7e3||we>24576)&&(Ee>423||!d)){m=dh(e,l,0,N,C,me,ee,we,V,Z-V,m),we=le=ee=0,V=Z;for(var et=0;et<286;++et)C[et]=0;for(var et=0;et<30;++et)me[et]=0}var vt=2,Te=0,Nt=$,Rt=ue-Ve&32767;if(Ee>2&&De==R(Z-Rt))for(var Kt=Math.min(b,Ee)-1,Wt=Math.min(32767,Z),Ft=Math.min(258,Ee);Rt<=Wt&&--Nt&&ue!=Ve;){if(e[Z+vt]==e[Z+vt-Rt]){for(var at=0;at<Ft&&e[Z+at]==e[Z+at-Rt];++at);if(at>vt){if(vt=at,Te=Rt,at>Kt)break;for(var Nr=Math.min(Rt,at-2),Jn=0,et=0;et<Nr;++et){var Eo=Z-Rt+et&32767,I=_[Eo],U=Eo-I&32767;U>Jn&&(Jn=U,Ve=Eo)}}}ue=Ve,Ve=_[ue],Rt+=ue-Ve&32767}if(Te){N[we++]=268435456|Nf[vt]<<18|lh[Te];var w=Nf[vt]&31,Q=lh[Te]&31;ee+=na[w]+oa[Q],++C[257+w],++me[Q],$e=Z+vt,++le}else N[we++]=e[Z],++C[e[Z]]}}for(Z=Math.max(Z,$e);Z<a;++Z)N[we++]=e[Z],++C[e[Z]];m=dh(e,l,d,N,C,me,ee,we,V,Z-V,m),d||(s.r=m&7|l[m/8|0]<<3,m-=7,s.h=E,s.p=_,s.i=Z,s.w=$e)}else{for(var Z=s.w||0;Z<a+d;Z+=65535){var q=Z+65535;q>=a&&(l[m/8|0]=d,q=a),m=gh(l,m+1,e.subarray(Z,q))}s.i=a}return Vi(u,0,n+Ec(m)+i)},"dflt"),Vz=function(){for(var e=new Int32Array(256),t=0;t<256;++t){for(var r=t,n=9;--n;)r=(r&1&&-306674912)^r>>>1;e[t]=r}return e}(),Bz=o(function(){var e=-1;return{p:o(function(t){for(var r=e,n=0;n<t.length;++n)r=Vz[r&255^t[n]]^r>>>8;e=r},"p"),d:o(function(){return~e},"d")}},"crc");var rE=o(function(e,t,r,n,i){if(!i&&(i={l:1},t.dictionary)){var s=t.dictionary.subarray(-32768),a=new st(s.length+e.length);a.set(s),a.set(e,s.length),e=a,i.w=s.length}return tE(e,t.level==null?6:t.level,t.mem==null?i.l?Math.ceil(Math.max(8,Math.min(13,Math.log(e.length)))*1.5):20:12+t.mem,r,n,i)},"dopt"),Ih=o(function(e,t){var r={};for(var n in e)r[n]=e[n];for(var n in t)r[n]=t[n];return r},"mrg"),qP=o(function(e,t,r){for(var n=e(),i=e.toString(),s=i.slice(i.indexOf("[")+1,i.lastIndexOf("]")).replace(/\s+/g,"").split(","),a=0;a<n.length;++a){var u=n[a],l=s[a];if(typeof u=="function"){t+=";"+l+"=";var d=u.toString();if(u.prototype)if(d.indexOf("[native code]")!=-1){var m=d.indexOf(" ",8)+1;t+=d.slice(m,d.indexOf("(",m))}else{t+=d;for(var h in u.prototype)t+=";"+l+".prototype."+h+"="+u.prototype[h].toString()}else t+=d}else r[l]=u}return t},"wcln"),kf=[],Gz=o(function(e){var t=[];for(var r in e)e[r].buffer&&t.push((e[r]=new e[r].constructor(e[r])).buffer);return t},"cbfs"),Kz=o(function(e,t,r,n){if(!kf[r]){for(var i="",s={},a=e.length-1,u=0;u<a;++u)i=qP(e[u],i,s);kf[r]={c:qP(e[a],i,s),e:s}}var l=Ih({},kf[r].e);return zz(kf[r].c+";onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage="+t.toString()+"}",r,l,Gz(l),n)},"wrkr"),Wz=o(function(){return[st,dr,Pc,na,oa,_c,hh,WP,JP,YP,Sc,XP,tn,Ff,en,Af,Ec,Vi,St,QP,wh,Uf,nE]},"bInflt"),Hz=o(function(){return[st,dr,Pc,na,oa,_c,Nf,lh,HP,_o,ZP,ra,Sc,eE,xh,tn,Gn,ea,jf,Rf,ph,ta,gh,dh,Ec,Vi,tE,rE,bh,Uf]},"bDflt");var Uf=o(function(e){return postMessage(e,[e.buffer])},"pbf"),nE=o(function(e){return e&&{out:e.size&&new st(e.size),dictionary:e.dictionary}},"gopt"),oE=o(function(e,t,r,n,i,s){var a=Kz(r,n,i,function(u,l){a.terminate(),s(u,l)});return a.postMessage([e,t],t.consume?[e.buffer]:[]),function(){a.terminate()}},"cbify");var Kn=o(function(e,t){return e[t]|e[t+1]<<8},"b2"),xn=o(function(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24)>>>0},"b4"),fh=o(function(e,t){return xn(e,t)+xn(e,t+4)*4294967296},"b8"),Gt=o(function(e,t,r){for(;r;++t)e[t]=r,r>>>=8},"wbytes");function Jz(e,t,r){return r||(r=t,t={}),typeof r!="function"&&St(7),oE(e,t,[Hz],function(n){return Uf(bh(n.data[0],n.data[1]))},0,r)}o(Jz,"deflate");function bh(e,t){return rE(e,t||{},0,0)}o(bh,"deflateSync");function Zz(e,t,r){return r||(r=t,t={}),typeof r!="function"&&St(7),oE(e,t,[Wz],function(n){return Uf(wh(n.data[0],nE(n.data[1])))},1,r)}o(Zz,"inflate");function wh(e,t){return QP(e,{i:2},t&&t.out,t&&t.dictionary)}o(wh,"inflateSync");var iE=o(function(e,t,r,n){for(var i in e){var s=e[i],a=t+i,u=n;Array.isArray(s)&&(u=Ih(n,s[1]),s=s[0]),s instanceof st?r[a]=[s,u]:(r[a+="/"]=[new st(0),u],iE(s,a,r,n))}},"fltn"),zP=typeof TextEncoder<"u"&&new TextEncoder,mh=typeof TextDecoder<"u"&&new TextDecoder,Yz=0;try{mh.decode(xh,{stream:!0}),Yz=1}catch(e){}var Xz=o(function(e){for(var t="",r=0;;){var n=e[r++],i=(n>127)+(n>223)+(n>239);if(r+i>e.length)return{s:t,r:Vi(e,r-1)};i?i==3?(n=((n&15)<<18|(e[r++]&63)<<12|(e[r++]&63)<<6|e[r++]&63)-65536,t+=String.fromCharCode(55296|n>>10,56320|n&1023)):i&1?t+=String.fromCharCode((n&31)<<6|e[r++]&63):t+=String.fromCharCode((n&15)<<12|(e[r++]&63)<<6|e[r++]&63):t+=String.fromCharCode(n)}},"dutf8");function Cf(e,t){if(t){for(var r=new st(e.length),n=0;n<e.length;++n)r[n]=e.charCodeAt(n);return r}if(zP)return zP.encode(e);for(var i=e.length,s=new st(e.length+(e.length>>1)),a=0,u=o(function(m){s[a++]=m},"w"),n=0;n<i;++n){if(a+5>s.length){var l=new st(a+8+(i-n<<1));l.set(s),s=l}var d=e.charCodeAt(n);d<128||t?u(d):d<2048?(u(192|d>>6),u(128|d&63)):d>55295&&d<57344?(d=65536+(d&1047552)|e.charCodeAt(++n)&1023,u(240|d>>18),u(128|d>>12&63),u(128|d>>6&63),u(128|d&63)):(u(224|d>>12),u(128|d>>6&63),u(128|d&63))}return Vi(s,0,a)}o(Cf,"strToU8");function $h(e,t){if(t){for(var r="",n=0;n<e.length;n+=16384)r+=String.fromCharCode.apply(null,e.subarray(n,n+16384));return r}else{if(mh)return mh.decode(e);var i=Xz(e),s=i.s,r=i.r;return r.length&&St(8),s}}o($h,"strFromU8");var Qz=o(function(e,t){return t+30+Kn(e,t+26)+Kn(e,t+28)},"slzh"),eV=o(function(e,t,r){var n=Kn(e,t+28),i=$h(e.subarray(t+46,t+46+n),!(Kn(e,t+8)&2048)),s=t+46+n,a=xn(e,t+20),u=r&&a==4294967295?tV(e,s):[a,xn(e,t+24),xn(e,t+42)],l=u[0],d=u[1],m=u[2];return[Kn(e,t+10),l,d,i,s+Kn(e,t+30)+Kn(e,t+32),m]},"zh"),tV=o(function(e,t){for(;Kn(e,t)!=1;t+=4+Kn(e,t+2));return[fh(e,t+12),fh(e,t+4),fh(e,t+20)]},"z64e"),yh=o(function(e){var t=0;if(e)for(var r in e){var n=e[r].length;n>65535&&St(9),t+=n+4}return t},"exfl"),VP=o(function(e,t,r,n,i,s,a,u){var l=n.length,d=r.extra,m=u&&u.length,h=yh(d);Gt(e,t,a!=null?33639248:67324752),t+=4,a!=null&&(e[t++]=20,e[t++]=r.os),e[t]=20,t+=2,e[t++]=r.flag<<1|(s<0&&8),e[t++]=i&&8,e[t++]=r.compression&255,e[t++]=r.compression>>8;var b=new Date(r.mtime==null?Date.now():r.mtime),$=b.getFullYear()-1980;if(($<0||$>119)&&St(10),Gt(e,t,$<<25|b.getMonth()+1<<21|b.getDate()<<16|b.getHours()<<11|b.getMinutes()<<5|b.getSeconds()>>1),t+=4,s!=-1&&(Gt(e,t,r.crc),Gt(e,t+4,s<0?-s-2:s),Gt(e,t+8,r.size)),Gt(e,t+12,l),Gt(e,t+14,h),t+=16,a!=null&&(Gt(e,t,m),Gt(e,t+6,r.attrs),Gt(e,t+10,a),t+=14),e.set(n,t),t+=l,h)for(var O in d){var _=d[O],E=_.length;Gt(e,t,+O),Gt(e,t+2,E),e.set(_,t+4),t+=4+E}return m&&(e.set(u,t),t+=m),t},"wzh"),rV=o(function(e,t,r,n,i){Gt(e,t,101010256),Gt(e,t+8,r),Gt(e,t+10,r),Gt(e,t+12,n),Gt(e,t+16,i)},"wzf");function sE(e,t,r){r||(r=t,t={}),typeof r!="function"&&St(7);var n={};iE(e,"",n,t);var i=Object.keys(n),s=i.length,a=0,u=0,l=s,d=new Array(s),m=[],h=o(function(){for(var E=0;E<m.length;++E)m[E]()},"tAll"),b=o(function(E,k){Mf(function(){r(E,k)})},"cbd");Mf(function(){b=r});var $=o(function(){var E=new st(u+22),k=a,G=u-a;u=0;for(var R=0;R<l;++R){var N=d[R];try{var C=N.c.length;VP(E,u,N,N.f,N.u,C);var me=30+N.f.length+yh(N.extra),le=u+me;E.set(N.c,le),VP(E,a,N,N.f,N.u,C,u,N.m),a+=16+me+(N.m?N.m.length:0),u=le+C}catch(ee){return b(ee,null)}}rV(E,a,d.length,G,k),b(null,E)},"cbf");s||$();for(var O=o(function(E){var k=i[E],G=n[k],R=G[0],N=G[1],C=Bz(),me=R.length;C.p(R);var le=Cf(k),ee=le.length,Z=N.comment,we=Z&&Cf(Z),$e=we&&we.length,V=yh(N.extra),De=N.level==0?0:8,ue=o(function(Ve,Ee){if(Ve)h(),b(Ve,null);else{var et=Ee.length;d[E]=Ih(N,{size:me,crc:C.d(),c:Ee,f:le,m:we,u:ee!=k.length||we&&Z.length!=$e,compression:De}),a+=30+ee+V+et,u+=76+2*(ee+V)+($e||0)+et,--s||$()}},"cbl");if(ee>65535&&ue(St(11,0,1),null),!De)ue(null,R);else if(me<16e4)try{ue(null,bh(R,N))}catch(Ve){ue(Ve,null)}else m.push(Jz(R,N,ue))},"_loop_1"),_=0;_<l;++_)O(_);return h}o(sE,"zip");var Mf=typeof queueMicrotask=="function"?queueMicrotask:typeof setTimeout=="function"?setTimeout:function(e){e()};function aE(e,t,r){r||(r=t,t={}),typeof r!="function"&&St(7);var n=[],i=o(function(){for(var E=0;E<n.length;++E)n[E]()},"tAll"),s={},a=o(function(E,k){Mf(function(){r(E,k)})},"cbd");Mf(function(){a=r});for(var u=e.length-22;xn(e,u)!=101010256;--u)if(!u||e.length-u>65558)return a(St(13,0,1),null),i;var l=Kn(e,u+8);if(l){var d=l,m=xn(e,u+16),h=m==4294967295||d==65535;if(h){var b=xn(e,u-12);h=xn(e,b)==101075792,h&&(d=l=xn(e,b+32),m=xn(e,b+48))}for(var $=t&&t.filter,O=o(function(E){var k=eV(e,m,h),G=k[0],R=k[1],N=k[2],C=k[3],me=k[4],le=k[5],ee=Qz(e,le);m=me;var Z=o(function($e,V){$e?(i(),a($e,null)):(V&&(s[C]=V),--l||a(null,s))},"cbl");if(!$||$({name:C,size:R,originalSize:N,compression:G}))if(!G)Z(null,Vi(e,ee,ee+R));else if(G==8){var we=e.subarray(ee,ee+R);if(N<524288||R>.8*N)try{Z(null,wh(we,{out:new st(N)}))}catch($e){Z($e,null)}else n.push(Zz(we,{size:N},Z))}else Z(St(14,"unknown compression type "+G,1),null);else Z(null,null)},"_loop_3"),_=0;_<d;++_)O(_)}else a(null,{});return i}o(aE,"unzip");c();var nV=o(e=>{if(e!=null)return e.trim()===""?void 0:e},"maybePath"),oV=o(e=>e!=null,"notNull"),Df=o((e,t,r=0)=>{var n;if(x.IsNull(e))return"null";if(x.IsUndefined(e))return"undefined";if(x.IsString(e))return"<string>";if(x.IsNumber(e))return"<number>";if(x.IsBoolean(e))return"<boolean>";if(x.IsLiteral(e))return typeof e.const=="string"?"'".concat(e.const,"'"):"".concat(e.const);if(x.IsRef(e)){let i=t.find(s=>s.$id===e.$ref);return i==null?e.$ref:Df(i,t,r)}if(x.IsArray(e))return"".concat(Df(e.items,t,r+1),"[]");if(x.IsUnion(e)&&(!(e.anyOf.length>5)||e.$id==null)){let s="".concat(e.anyOf.map(a=>Df(a,t,r+1)).filter(oV).join(" | "));return r>0?"(".concat(s,")"):s}return(n=e.$id)!=null?n:""},"resolveSchemaIdent"),iV=o((e,t,r)=>{var s;let n=t.message;x.IsUnion(t.schema)&&(n="Expected one of: ".concat(Df(t.schema,r)));let i="#/definitions/".concat(e).concat((s=nV(t.path))!=null?s:"");return"".concat(i,": ").concat(n)},"errorHandler"),qf=o((e,t,r)=>{let n=t.First();if(n!=null)return iV(e,n,r)},"shortError");var ia;(function(e){e.Archive="Archive",e.Validate="Validate",e.Encode="Encode",e.Unknown="Unknown"})(ia||(ia={}));var Oh=class Oh extends Error{constructor(r,n){super(n);tt(this,"name");tt(this,"kind");this.name="CompressError",this.kind=r}};o(Oh,"CompressError");var sa=Oh,sV=o(e=>new sa(ia.Archive,e.message),"flateErrorIntoCompressError"),aV=o(e=>{let t=Object.values(Lf);return e instanceof Error&&"code"in e&&typeof e.code=="number"&&t.includes(e.code)},"isFlateError"),cV=o((e,t,r)=>{var n;return new sa(ia.Validate,(n=qf(e,t,r))!=null?n:"Unknown validate error")},"checkErrorIntoCompressError"),uV=o(e=>new sa(ia.Encode,e.message),"encodeErrorIntoCompressError"),fV=o(e=>new sa(ia.Unknown,e instanceof Error?e.message:String(e)),"unknownErrorIntoCompressError"),vh=o((e,t,r)=>t instanceof Ui?uV(t):t instanceof Yr?cV(e,t,r):aV(t)?sV(t):fV(t),"intoCompressError");c();var aa;(function(e){e.Unarchive="Unarchive",e.Validate="Validate",e.Decode="Decode",e.Unknown="Unknown"})(aa||(aa={}));var Sh=class Sh extends Error{constructor(r,n){super(n);tt(this,"name");tt(this,"kind");this.name="DecompressError",this.kind=r}};o(Sh,"DecompressError");var ca=Sh,lV=o(e=>new ca(aa.Unarchive,e.message),"flateErrorIntoDecompressError"),pV=o(e=>{let t=Object.values(Lf);return e instanceof Error&&"code"in e&&typeof e.code=="number"&&t.includes(e.code)},"isFlateError"),dV=o((e,t,r)=>{var n;return new ca(aa.Validate,(n=qf(e,t,r))!=null?n:"Unknown validate error")},"checkErrorIntoDecompressError"),mV=o(e=>new ca(aa.Decode,e.message),"decodeErrorIntoDecompressError"),yV=o(e=>new ca(aa.Unknown,e instanceof Error?e.message:String(e)),"unknownErrorIntoDecompressError"),_h=o((e,t,r)=>t instanceof Li?mV(t):t instanceof Yr?dV(e,t,r):pV(t)?lV(t):yV(t),"intoDecompressError");c();c();c();var hV=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,gV=[0,31,28,31,30,31,30,31,31,30,31,30,31],xV=o(e=>e%4===0&&(e%100!==0||e%400===0),"isLeapYear"),zf=o(e=>{let t=hV.exec(e);if(!t)return!1;let r=+t[1],n=+t[2],i=+t[3];return n>=1&&n<=12&&i>=1&&i<=(n===2&&xV(r)?29:gV[n])},"date");c();var IV=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i,Vf=o(e=>{let t=IV.exec(e);if(!t)return!1;let r=+t[1],n=+t[2],i=+t[3],s=t[4],a=t[5]==="-"?-1:1,u=+(t[6]||0),l=+(t[7]||0);if(u>23||l>59||!s)return!1;if(r<=23&&n<=59&&i<60)return!0;let d=n-l*a,m=r-u*a-(d<0?1:0);return(m===23||m===-1)&&(d===59||d===-1)&&i<61},"time");var bV=/t|\s/i,cE=o(e=>{let t=e.split(bV);return t.length===2&&zf(t[0])&&Vf(t[1])},"dateTime");c();var wV=/\/|:/,$V=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,uE=o(e=>wV.test(e)&&$V.test(e),"uri");var vV=[["date",zf],["time",Vf],["date-time",cE],["uri",uE]],fE=o(()=>{for(let[e,t]of vV)try{ff.Format(e,t)}catch(r){if(r instanceof wc)continue;throw r}},"registerFormats");c();c();c();var lE=o(e=>e instanceof Error?e:new Error(String(e)),"asError");var Bf=o(e=>(...t)=>{try{return B(e(...t))}catch(r){return W(lE(r))}},"safeFn");var OV=Bf((e,t)=>{let r={};for(let n of t)for(let i of n.intoBundle(e))r[i.path]=Cf(JSON.stringify(i.contents));return r}),Ph=o(async(e,t,r)=>OV(e,t).andThenAsync(n=>new Promise(i=>{sE(n,F(g({},r),{consume:!0}),(s,a)=>{i(s?W(s):B(a))})})),"compress");c();c();function Gf(e,t,r=[]){let n=g({},e);for(let[i,s]of Object.entries(t))if(s!==void 0)if(i in n){let a=i;if(Array.isArray(s)&&s.length>0){let u=_V(s[0],r);if(u){let l=n[a];if(!Array.isArray(l))throw new Error("Expected array at ".concat(i,", got ").concat(typeof l));let d=new Map(s.map(b=>[pE(b,u),b])),h=l.map(b=>{let $=d.get(pE(b,u));return $?Gf(b,$,r):b});n[a]=h}else n[a]=s}else{let u=n[a];typeof u=="object"&&u!==null&&typeof s=="object"&&s!==null?Object.keys(s).length===0?n[a]=s:n[a]=Gf(u,s,r):n[i]=s}}else n[i]=s;return n}o(Gf,"deepMergeOn");function _V(e,t){function r(n){if(typeof n!="object"||n===null)return null;for(let i of t)if(i in n&&typeof n[i]<"u")return[i];if(Array.isArray(n))return null;for(let[i,s]of Object.entries(n)){let a=r(s);if(a)return[i,...a]}return null}return o(r,"search"),r(e)}o(_V,"findIdentifierKey");function pE(e,t){return t.reduce((r,n)=>{if(r&&typeof r=="object")return r[n]},e)}o(pE,"getValueByKeyPath");var SV=o(e=>e,"identity"),PV=o(e=>JSON.parse($h(e)),"jsonDecode"),EV=o((e,t)=>t.some(r=>r.fromBundle(e.name,new Uint8Array,SV)!==void 0),"isFileExpected"),TV=Bf((e,t)=>{let r={};for(let n of Object.keys(e)){let i=e[n];for(let s of t){let a=s.fromBundle(n,i,PV);if(a){r=Gf(r,a,[]);break}}}return r}),Eh=o(async(e,t)=>new Promise(r=>aE(e,{filter:o(n=>EV(n,t),"filter")},(n,i)=>{r(n?W(n):B(i))})).then(r=>r.andThen(n=>TV(n,t))),"decompress");c();var kV=o(e=>typeof e=="object"&&e!=null&&"$ref"in e&&typeof e.$ref=="string","isRef"),FV=o(e=>{if(e.length<2)return!1;let t=e.filter(kV);if(t.length!==e.length)return!1;let r=t[0].$ref;return t.slice(1).every(n=>n.$ref===r)},"isDuplicateRef"),Kf=o(e=>typeof e=="object"&&e!=null&&"allOf"in e&&Array.isArray(e.allOf)&&FV(e.allOf)?e.allOf[0]:typeof e=="object"&&e!=null&&!Array.isArray(e)?Object.fromEntries(Object.entries(e).map(([t,r])=>[t,Kf(r)])):Array.isArray(e)?e.map(Kf):e,"fixDuplicateAllOf");c();var Wf=o(e=>typeof e=="object"&&e!=null&&"$ref"in e?F(g({},e),{$ref:"#/definitions/".concat(e.$ref)}):typeof e=="object"&&e!=null&&!Array.isArray(e)?Object.fromEntries(Object.entries(e).map(([t,r])=>[t,Wf(r)])):Array.isArray(e)?e.map(Wf):e,"prefixReferences");var ua;(function(e){e.InvalidTypeboxSchema="InvalidTypeboxSchema",e.MissingReferenceId="MissingReferenceId",e.DuplicateReferenceId="DuplicateReferenceId",e.TypeboxError="TypeboxError",e.UnknownError="UnknownError"})(ua||(ua={}));var AV=o(e=>({next(){for(let r of e){let n=r.next();if(!n.done)return n}return{done:!0,value:void 0}},[Symbol.iterator](){return this}}),"join"),jV=o((...e)=>{let t=new Map;for(let r of AV(e)){if(!r.$id)continue;let n=t.get(r.$id);if(n!=null&&n!==r)return W({kind:ua.DuplicateReferenceId,message:"Failed to register a reference for a schema with an $id that has already been used",schema:r});t.set(r.$id,r)}return B(t)},"computeReferenceMap"),rn,Bi,So,In,Jf=class Jf{constructor(t,r,n,i){Pt(this,rn);Pt(this,Bi);Pt(this,So,[]);Pt(this,In);Ct(this,rn,t),Ct(this,Bi,r),Ct(this,So,n),Ct(this,In,i),this.is=this.is.bind(this),this.parse=this.parse.bind(this),this.verify=this.verify.bind(this),this.jsonSchema=this.jsonSchema.bind(this),this.compress=this.compress.bind(this),this.decompress=this.decompress.bind(this)}static create(t,r="CoreMVF"){let n=f.Composite(t.extensions.map(s=>s.schema),{$id:r});if(!x.IsSchema(n))return W({kind:ua.InvalidTypeboxSchema,message:"Attempting to merge schemas produced an invalid schema",schema:n});let i=jV(yy.values(),cy.values(),fy.values(),py.values(),dy.values(),Oy.values(),t.extensions.flatMap(s=>{var a;return(a=s.references)!=null?a:[]}).values());if(!i.isOk())return i;try{fE();let s=Tf.Compile(n,[...i.value.values()]);return B(new Jf(n,s,t.extensions,i.value))}catch(s){return s instanceof re?W({kind:ua.TypeboxError,message:s.message,original:s}):W({kind:ua.UnknownError,message:"An unknown error occurred while compiling the schema",original:s})}}is(t){return H(this,Bi).Check(t)}parse(t){return H(this,Bi).Check(t)?B(t):W(H(this,Bi).Errors(t))}decode(t){try{return B(LP(H(this,rn),[...H(this,In).values()],t))}catch(r){return W(r)}}encode(t){try{return B(UP(H(this,rn),[...H(this,In).values()],t))}catch(r){return W(r)}}verify(t){for(let r of H(this,So))if(r.integrityCheck){let n=r.integrityCheck(t);if(n.isErr())return W(n.error)}return B(!0)}jsonSchema(){var n;let t=JSON.parse(JSON.stringify([H(this,rn),...H(this,In).values()])),r=Kf(Wf({$id:"#/definitions/".concat((n=H(this,rn).$id)!=null?n:"CoreMVF"),$schema:"http://json-schema.org/draft-07/schema#",references:t}));return JSON.stringify(r,null,2)}async compress(t){return this.encode(t).andThen(r=>this.parse(r)).andThenAsync(r=>Ph(r,H(this,So))).then(r=>r.mapErr(n=>{var i;return vh((i=H(this,rn).$id)!=null?i:"CoreMVF",n,[...H(this,In).values()])}))}async compressUnsafe(t){return this.encode(t).andThenAsync(r=>Ph(r,H(this,So))).then(r=>r.mapErr(n=>{var i;return vh((i=H(this,rn).$id)!=null?i:"CoreMVF",n,[...H(this,In).values()])}))}async decompress(t){return Eh(t,H(this,So)).then(r=>r.andThen(n=>this.parse(n)).andThen(n=>this.decode(n)).mapErr(n=>{var i;return _h((i=H(this,rn).$id)!=null?i:"CoreMVF",n,[...H(this,In).values()])}))}async decompressUnsafe(t){return Eh(t,H(this,So)).then(r=>r.andThen(n=>this.decode(n)).mapErr(n=>{var i;return _h((i=H(this,rn).$id)!=null?i:"CoreMVF",n,[...H(this,In).values()])}))}};rn=new WeakMap,Bi=new WeakMap,So=new WeakMap,In=new WeakMap,o(Jf,"MVFParser");var Hf=Jf;var fa,Th=class Th{constructor(){Pt(this,fa,[]);this.extend=this.extend.bind(this)}extend(t){return H(this,fa).push(t),this}extendOptional(t){let r=F(g({},t),{schema:f.Partial(t.schema)});return H(this,fa).push(r),this}build(){return Hf.create(this)}get extensions(){return H(this,fa)}};fa=new WeakMap,o(Th,"MVFParserBuilder");var Zf=Th;var dE=o(()=>new Zf().extend(XS).extend(oP).extend(cP),"createParser");var Gi=mt("lcat","LocationCategoryId"),kh=f.Intersect([f.Object({id:f.Ref(Gi),parent:f.Optional(f.Ref(Gi))}),Ri(["name"]),gn],{$id:"LocationCategory"}),mE=[Gi,kh];c();c();var Ki;(function(e){e.UnknownCategoryError="UnknownCategoryError",e.UnknownParentCategoryError="UnknownParentCategoryError",e.UnknownParentLocationError="UnknownParentLocationError"})(Ki||(Ki={}));var yE=o(e=>{var i,s,a,u,l,d,m,h,b;if(e.locationCategories==null&&e.locations==null)return B(!0);let t=new Set((s=(i=e.locationCategories)==null?void 0:i.map($=>$.id))!=null?s:[]);for(let $ of(a=e.locationCategories)!=null?a:[])if($.parent!=null&&!t.has($.parent))return W({kind:Ki.UnknownParentCategoryError,properties:{categoryId:$.id,parentCategoryId:$.parent}});let r=kt(e);for(let $ of(u=e.locations)!=null?u:[]){for(let O of $.categories)if(!t.has(O))return W({kind:Ki.UnknownCategoryError,properties:{locationId:$.id,categoryId:O}});for(let O of $.geometryAnchors){let _=r(O.floorId,O.geometryId);if(_.isErr())return _}}let n=new Set((d=(l=e.locations)==null?void 0:l.map($=>$.id))!=null?d:[]);for(let $ of(m=e.locationInstances)!=null?m:[]){if(!n.has($.parentId))return W({kind:Ki.UnknownParentLocationError,properties:{locationInstanceId:$.id,parentLocationId:$.parentId}});for(let O of(h=$.categories)!=null?h:[])if(!t.has(O))return W({kind:Ki.UnknownCategoryError,properties:{locationId:$.id,categoryId:O}});for(let O of(b=$.geometryAnchors)!=null?b:[]){let _=r(O.floorId,O.geometryId);if(_.isErr())return _}}return B(!0)},"validateLocations");c();var Wi=mt("loc","LocationId"),Yf=mt("loci","LocationInstanceId"),hE=f.Object({name:f.String(),url:f.String({format:"uri"})},{$id:"LocationSocial"}),gE=f.Object({url:f.String({format:"uri"})},{$id:"LocationImage"}),Fh=f.Object({label:f.String(),url:f.String({format:"uri"})},{$id:"LocationLink"}),Ah=f.String({pattern:"^[0-2][0-9]:[0-6][0-9](:[0-6][0-9])?$",$id:"OpeningHoursTime"}),xE=f.Union([f.Literal("Sunday"),f.Literal("Monday"),f.Literal("Tuesday"),f.Literal("Wednesday"),f.Literal("Thursday"),f.Literal("Friday"),f.Literal("Saturday")],{$id:"OpeningHoursDay"}),NV="PublicHolidays",jh=f.Union([xE,f.Literal(NV)],{$id:"OpeningHoursDayOrPublicHoliday"}),Xf=f.Object({"@type":f.Optional(f.Literal("OpeningHoursSpecification",{description:"The type of opening hours"})),opens:f.Optional(f.Ref(Ah,{description:"The time the opening hours start"})),closes:f.Optional(f.Ref(Ah,{description:"The time the opening hours end"})),dayOfWeek:f.Optional(f.Union([f.Ref(jh),f.Array(f.Ref(jh))],{description:"The days of the week the opening hours apply to"})),validFrom:f.Optional(f.String({format:"date-time",description:"The date the opening hours start, in ISO 8601 format"})),validTo:f.Optional(f.String({format:"date-time",description:"The date the opening hours end, in ISO 8601 format"}))},{$id:"OpeningHoursSpecification"}),Qf=f.Intersect([f.Object({id:f.Ref(Wi),categories:f.Array(f.Ref(Gi)),logo:f.Optional(f.String({format:"uri"})),phone:f.Optional(f.String()),social:f.Array(f.Ref(hE)),images:f.Array(f.Ref(gE)),links:f.Array(f.Ref(Fh)),website:f.Optional(f.Ref(Fh)),openingHours:f.Optional(f.Array(f.Ref(Xf)))}),Ri(["name"]),Ci(),gn],{$id:"Location"}),Nh=f.Intersect([f.Object({id:f.Ref(Yf),parentId:f.Ref(Wi)}),f.Partial(f.Omit(Qf,["id","parentId"]))],{$id:"LocationInstance"}),el=[Wi,Yf,hE,gE,Fh,Ah,xE,jh,Xf,Qf,Nh];var RV=f.Object({locations:f.Array(f.Ref(Qf)),locationCategories:f.Array(f.Ref(kh)),locationInstances:f.Optional(f.Array(f.Ref(Nh)))},{$id:"LocationsExtensionSchema"}),IE="locations.json",bE="location-categories.json",wE="location-instances.json",$E={name:"ext:locations",schema:RV,intoBundle:o(function*(e){e.locations!=null&&(yield{path:IE,contents:e.locations}),e.locationCategories!=null&&(yield{path:bE,contents:e.locationCategories}),e.locationInstances!=null&&(yield{path:wE,contents:e.locationInstances})},"intoBundle"),fromBundle:o((e,t,r)=>{if(e===IE)return{locations:r(t)};if(e===bE)return{locationCategories:r(t)};if(e===wE)return{locationInstances:r(t)}},"fromBundle"),references:[...mE,...el],integrityCheck:yE};c();c();var Wn;(function(e){e.UnknownEnterpriseLocationError="UnknownEnterpriseLocationError",e.EnterpriseLocationWithUnknownLocationError="EnterpriseLocationWithUnknownLocationError",e.EnterpriseCategoryWithUnknownLocationCategoryError="EnterpriseCategoryWithUnknownLocationCategoryError",e.InstanceWithUnknownLocationInstanceError="InstanceWithUnknownLocationInstanceError",e.InstanceWithUnknownEnterpriseLocationError="InstanceWithUnknownEnterpriseLocationError",e.EnterpriseLocationWithUnknownSibling="EnterpriseLocationWithUnknownSibling",e.EnterpriseLocationInstanceWithUnknownSibling="EnterpriseLocationInstanceWithUnknownSibling"})(Wn||(Wn={}));var vE=o(e=>{var l,d,m,h,b,$,O,_,E,k,G,R,N,C,me,le,ee,Z,we,$e;if(e.enterprise==null)return B(!0);let t=e.enterprise,r=new Set((d=(l=e.locationCategories)==null?void 0:l.map(V=>V.id))!=null?d:[]);for(let V of(m=t.categories)!=null?m:[])if(!r.has(V.categoryId))return W({kind:Wn.EnterpriseCategoryWithUnknownLocationCategoryError,properties:{enterpriseCategoryId:V.id,locationCategoryId:V.categoryId}});let n=new Set((b=(h=e.locations)==null?void 0:h.map(V=>V.id))!=null?b:[]);for(let V of($=t.locations)!=null?$:[]){if(!n.has(V.locationId))return W({kind:Wn.EnterpriseLocationWithUnknownLocationError,properties:{enterpriseLocationId:V.id,locationId:V.locationId}});for(let De of(O=V.siblingGroups)!=null?O:[])for(let ue of(_=De.siblings)!=null?_:[])if(!n.has(ue))return W({kind:Wn.EnterpriseLocationWithUnknownSibling,properties:{enterpriseLocationId:V.id,siblingLocationId:ue,label:De.label}})}let i=new Set((k=(E=e.enterprise.locations)==null?void 0:E.map(V=>V.id))!=null?k:[]);if(((G=t.venue)==null?void 0:G.topLocations)!=null){for(let V of t.venue.topLocations)if(!i.has(V))return W({kind:Wn.UnknownEnterpriseLocationError,properties:{enterpriseLocationId:V}})}let s=new Set((N=(R=e.locationInstances)==null?void 0:R.map(V=>V.id))!=null?N:[]);for(let V of(C=t.locationInstances)!=null?C:[]){if(!i.has(V.parentId))return W({kind:Wn.InstanceWithUnknownEnterpriseLocationError,properties:{enterpriseLocationInstanceId:V.id,enterpriseLocationId:V.parentId}});if(!s.has(V.locationInstanceId))return W({kind:Wn.InstanceWithUnknownLocationInstanceError,properties:{enterpriseLocationInstanceId:V.id,locationInstanceId:V.locationInstanceId}});for(let De of(me=V.siblingGroups)!=null?me:[])for(let ue of(le=De.siblings)!=null?le:[])if(!n.has(ue))return W({kind:Wn.EnterpriseLocationInstanceWithUnknownSibling,properties:{enterpriseLocationInstanceId:V.id,siblingLocationId:ue,label:De.label}})}let a=Io(e),u=kt(e);for(let[V,De]of rr((ee=t.floorText)!=null?ee:{})){let ue=a(V);if(ue.isErr())return ue;for(let Ve of De.features){if(!("geometryId"in Ve.properties))continue;let Ee=u(V,Ve.properties.geometryId);if(Ee.isErr())return Ee}}for(let[V,De]of rr((Z=t.textures)!=null?Z:{})){let ue=a(V);if(ue.isErr())return ue;for(let Ve of De){let Ee=u(V,Ve.geometryId);if(Ee.isErr())return Ee}}for(let[V,De]of rr((we=t.layers)!=null?we:{})){let ue=a(V);if(ue.isErr())return ue;for(let Ve of Ke(De!=null?De:{})){let Ee=u(V,Ve);if(Ee.isErr())return Ee}}for(let[V,De]of rr(($e=t.textAreas)!=null?$e:{})){let ue=a(V);if(ue.isErr())return ue;for(let Ve of De.features)if("geometryId"in Ve.properties){let Ee=u(V,Ve.properties.geometryId);if(Ee.isErr())return Ee}}return B(!0)},"validateCMS");c();c();var Hi=mt("el","EnterpriseLocationId"),Rh=mt("ec","EnterpriseCategoryId"),Ch=mt("eli","EnterpriseLocationInstanceId"),Mh=mt("ev","EnterpriseVenueId"),Lh=mt("eft","EnterpriseFloorTextId"),OE=[Hi,Rh,Ch,Mh,Lh];var _E=f.Object({id:f.Ref(Rh),categoryId:f.Ref(Gi),color:f.Optional(f.String()),sortOrder:f.Number(),iconFromDefaultList:f.Optional(f.Union([f.String(),f.Null()])),picture:f.Optional(f.String({format:"uri",description:"The category's picture"}))},{$id:"EnterpriseCategory"}),Uh=f.Object({categories:f.Optional(f.Array(f.Ref(_E)))},{$id:"EnterpriseCategoriesSchema"}),SE=[_E,Uh];c();var PE=Or(["left","center","right"]),CV=PE.schema,Khe=PE.values,Dh=f.Object({id:f.Ref(Lh),text:f.String(),visible:f.Boolean({default:!0}),fontSize:f.Number({default:12,minimum:1}),fontFamily:f.String({default:"Droid Sans"}),color:f.String({default:"black"}),rotation:f.Number({minimum:0,maximum:360}),align:CV},{$id:"FloorTextCommonProperties"}),qh=f.Intersect([f.Ref(Dh),Jr],{$id:"AnchoredFloorTextProperties"}),zh=f.Intersect([f.Ref(Dh),f.Object({verticalOffset:f.Number()})],{$id:"FloatingFloorTextProperties"}),EE=f.Union([f.Ref(qh),f.Ref(zh)],{$id:"FloorTextProperties"}),TE=zt(tr,f.Ref(EE),{$id:"FloorTextFeature"}),MV=zt(tr,f.Ref(qh),{$id:"AnchoredFloorTextFeature"}),LV=zt(tr,f.Ref(zh),{$id:"FloatingFloorTextFeature"}),kE=pr(f.Ref(TE),{$id:"EnterpriseFloorTextFeatureCollection"}),FE=f.Record(je,f.Ref(kE),{$id:"EnterpriseFloorTextCollectionsByFloor",additionalProperties:!1}),Vh=f.Object({floorText:f.Optional(f.Ref(FE))},{$id:"EnterpriseFloorTextSchema"}),AE=[Dh,qh,zh,EE,TE,MV,LV,kE,FE,Vh];c();var jE=bt(f.Record(er,f.String({minLength:1}),{additionalProperties:!1,$id:"EnterpriseLayers"})),NE=bt(f.Record(je,f.Ref(jE),{additionalProperties:!1,$id:"EnterpriseLayersByFloor"})),Bh=f.Object({layers:f.Optional(f.Ref(NE))},{$id:"EnterpriseLayersSchema"}),RE=[jE,NE,Bh];c();c();c();var Gh=Or(["closed-temporarily","new","pop-up","coming-soon","relocated"]),UV=Gh.schema,nge=Gh.values,oge=Gh.record,Kh=f.Object({type:UV,start:f.Optional(f.String({format:"date",description:"The start date of the state"})),end:f.Optional(f.String({format:"date",description:"The end date of the state"}))},{$id:"LocationState",description:"The state of a location. Start and end dates are optional."}),Wh=f.Object({label:f.String(),siblings:f.Array(f.Ref(Wi))},{$id:"SiblingGroup"}),tl=f.Object({name:f.String(),code:f.String()},{$id:"Language"}),CE=[Kh,Wh,tl];var rl=f.Object({id:f.Ref(Hi),locationId:f.Ref(Wi),type:f.String(),sortOrder:f.Number(),tags:f.Optional(f.Array(f.String())),picture:f.Optional(f.String({format:"uri",description:"The picture of the location"})),states:f.Optional(f.Array(f.Ref(Kh),{description:"The location's state. No more than one state should be active at a time, and all but at most one should have dates set"})),siblingGroups:f.Optional(f.Array(f.Ref(Wh))),gallery:f.Optional(f.Array(f.Object({caption:f.Optional(f.String()),image:f.String({format:"uri"}),embeddedUrl:f.Optional(f.String({format:"uri",description:"The URL to link from the image"}))},{description:"The location's image gallery"}),{description:"The location's image gallery"})),showFloatingLabelWhenImagePresent:f.Optional(f.Boolean({description:"Whether to show the flat label when an image is present"})),amenity:f.Optional(f.String({description:"The location's amenity type. Only set if the location is an amenity"})),showLogo:f.Optional(f.Boolean({description:"Whether to show the logo of the location"}))},{$id:"EnterpriseLocation"}),Hh=f.Object({locations:f.Optional(f.Array(f.Ref(rl)))},{$id:"EnterpriseLocationsSchema"}),ME=[rl,Hh];var LE=f.Intersect([f.Object({id:f.Ref(Ch),parentId:f.Ref(Hi),locationInstanceId:f.Ref(Yf)}),f.Partial(f.Omit(rl,["id","parentId","locationId"]))],{$id:"EnterpriseLocationInstance",description:"A locationInstance is a particular instance of an Enterprise Location that has some properties different from the parent."}),Jh=f.Object({locationInstances:f.Optional(f.Array(f.Ref(LE)))},{$id:"EnterpriseLocationInstancesSchema"}),UE=[LE,Jh];c();var Zh=Or(["near","center"],{$id:"EnterpriseTextAreaAlignment"}),DE=Zh.schema,vge=Zh.values,Oge=Zh.record,Yh=f.Object({maxWidth:f.Number({exclusiveMinimum:0,description:"The maximum width of the label, in meters."}),maxHeight:f.Number({exclusiveMinimum:0,description:"The maximum height of the label, in meters."}),align:f.Ref(DE),rotation:f.Number({minimum:0,maximum:360,description:"Rotation in degrees, about the center of the image. North is 0, east is 90."})},{$id:"EnterpriseBaseTextAreaProperties"}),qE=f.Intersect([f.Ref(Yh),Jr],{$id:"EnterpriseAnchoredTextAreaProperties"}),zE=f.Intersect([f.Ref(Yh),f.Object({verticalOffset:f.Number({minimum:0,description:"How high to position the image, in meters, relative to the ground plane."})})],{$id:"EnterpriseFloatingTextAreaProperties"}),VE=f.Union([qE,zE],{$id:"EnterpriseTextAreaProperties"}),BE=zt(f.Ref(tr),VE,{$id:"EnterpriseTextAreaFeature"}),GE=pr(f.Ref(BE),{$id:"EnterpriseTextAreaCollection"}),KE=f.Record(je,f.Ref(GE),{$id:"EnterpriseTextAreasByFloor",additionalProperties:!1}),WE=f.Object({textAreas:f.Optional(f.Ref(KE))},{$id:"EnterpriseTextAreasSchema"}),HE=[DE,Yh,qE,zE,VE,BE,GE,KE];c();var Xh=f.Object({u:f.Number(),v:f.Number()},{$id:"EnterpriseTextureUV"}),Qh=Or(["top","side"],{$id:"EnterpriseTextureFace"}),JE=Qh.schema,Tge=Qh.values,kge=Qh.record,eg=Or(["inside","outside","both"],{$id:"EnterpriseTextureSurface"}),ZE=eg.schema,Fge=eg.values,Age=eg.record,YE=f.Tuple([Bs,Gs,Bs,Gs],{$id:"EnterpriseTextureBounds"}),XE=f.Intersect([f.Object({repeat:f.Ref(Xh),offset:f.Ref(Xh),rotation:f.Number({minimum:0,maximum:360}),path:f.String({format:"uri"}),face:f.Ref(JE),surface:f.Ref(ZE),bounds:f.Ref(YE)},{$id:"EnterpriseTextureProperties"}),Jr],{$id:"EnterpriseTexture"}),QE=f.Array(f.Ref(XE),{$id:"EnterpriseTextures"}),eT=f.Record(je,f.Ref(QE),{$id:"EnterpriseTexturesByFloor",additionalProperties:!1}),tg=f.Object({textures:f.Optional(f.Ref(eT))},{$id:"EnterpriseTexturesSchema"}),tT=[XE,QE,tg,Xh,JE,ZE,YE,eT];c();var rT=f.Intersect([f.Object({id:f.Ref(Mh),slug:f.String(),defaultLanguage:f.Ref(tl),languages:f.Array(f.Ref(tl)),countrycode:f.Optional(f.String()),logo:f.Optional(f.String({format:"uri"})),mappedinWebUrl:f.Optional(f.String({format:"uri"})),topLocations:f.Optional(f.Array(f.Ref(Hi))),operationHours:f.Optional(f.Array(f.Ref(Xf))),coverImage:f.Optional(f.String({format:"uri"}))}),Ri(["name"]),gn],{$id:"EnterpriseVenue"}),rg=f.Object({venue:f.Optional(f.Ref(rT))},{$id:"EnterpriseVenueSchema"}),nT=[rT,rg];var iT=f.Intersect([rg,Hh,Jh,Uh,tg,Vh,Bh,WE],{$id:"EnterpriseProperties"}),oT=f.Object({enterprise:f.Optional(f.Ref(iT))},{$id:"CMSExtensionSchema"}),DV=/^enterprise\/(?:([^/]+)\/)?([^/]+)\.(?:json|geojson)$/,sT={name:"ext:cms",schema:oT,intoBundle:o(function*(e){var r,n,i,s,a,u;if(e.enterprise==null)return;let t=e.enterprise;for(let l of Ke(t))switch(l){case"floorText":for(let d of Ke((r=t.floorText)!=null?r:{}))yield{path:"enterprise/floorText/".concat(d,".geojson"),contents:((n=t.floorText)!=null?n:{})[d]};continue;case"textures":for(let d of Ke((i=t.textures)!=null?i:{}))yield{path:"enterprise/textures/".concat(d,".json"),contents:((s=t.textures)!=null?s:{})[d]};continue;case"textAreas":for(let d of Ke((a=t.textAreas)!=null?a:{}))yield{path:"enterprise/textAreas/".concat(d,".geojson"),contents:((u=t.textAreas)!=null?u:{})[d]};continue;default:yield{path:"enterprise/".concat(l,".json"),contents:t[l]};continue}},"intoBundle"),fromBundle:o((e,t,r)=>{let n=e.match(DV);if(!n)return;let[,i,s]=n,a=r(t);switch(i){case"floorText":case"textures":case"textAreas":return{enterprise:{[i]:{[s]:a}}};default:return{enterprise:{[s]:a}}}},"fromBundle"),references:[iT,oT,...nT,...ME,...UE,...SE,...tT,...RE,...AE,...HE,...OE,...CE,...el],integrityCheck:vE};c();c();c();c();var bn;(function(e){e.NavigationFlagMissingDeclaration="NavigationFlagMissingDeclaration",e.NavigationFlagDuplicateBit="NavigationFlagDuplicateBit",e.NavigationFlagIncorrectFlagsLength="NavigationFlagIncorrectFlagsLength",e.NavigationFlagValueTooBig="NavigationFlagValueTooBig"})(bn||(bn={}));var aT=o(e=>{let{navigationFlags:t}=e;if(!t||Object.keys(t).length===0)return B(!0);let r=Object.entries(t).map(([s,a])=>g({key:s},a)).sort((s,a)=>s.index!==a.index?s.index-a.index:s.bit-a.bit),n=0,i=-1;for(let s of r){if(s.bit===i)return W({kind:bn.NavigationFlagDuplicateBit,properties:{index:s.index,bit:s.bit,path:"navigationFlags.".concat(s.key)}});if(s.index!=n){if(i!=31)return W({kind:bn.NavigationFlagMissingDeclaration,properties:{index:n,bit:i+1,path:"navigationFlags"}});if(s.index!=n+1||s.bit!=0)return W({kind:bn.NavigationFlagMissingDeclaration,properties:{index:n+1,bit:0,path:"navigationFlags"}});n=s.index,i=0}else{if(s.bit!==i+1)return W({kind:bn.NavigationFlagMissingDeclaration,properties:{index:s.index,bit:i+1,path:"navigationFlags"}});i=s.bit}}return B(!0)},"validateNavigationFlags");c();var cT=2**32-1,Tc=o(e=>{var i;let t=Object.keys((i=e.navigationFlags)!=null?i:{}).length;if(t===0)return{index:-1,flag:0};let r=Math.floor(t/32),n=t%32;return{index:r,flag:2**n-1}},"determineMaxNavigationFlags"),la=o((e,t,r)=>{if(t.index==-1&&e.length===0)return B(!0);let n=t.flag>0||t.index===-1?t.index+1:t.index;if(e.length!==n)return W({kind:bn.NavigationFlagIncorrectFlagsLength,properties:{expected:n,actual:e.length,path:r}});for(let i=0;i<e.length;i++){let s=e[i];if(i<t.index){if(s>cT)return W({kind:bn.NavigationFlagValueTooBig,properties:{index:i,flagValue:s,expectedMaxFlagValue:cT,path:r}});continue}else if(s>t.flag)return W({kind:bn.NavigationFlagValueTooBig,properties:{index:i,flagValue:s,expectedMaxFlagValue:t.flag,path:r}})}return B(!0)},"validateFlags");var qV=f.Object({index:f.Integer({description:"The index of the flag in a flags array.",minimum:0}),bit:f.Integer({description:"The bit position of the flag in a flag's bitfield.",minimum:0,maximum:31})},{$id:"NavigationFlagDeclarationCore"}),uT=f.Intersect([qV,hn],{$id:"NavigationFlagDeclaration",description:'A NavigationFlagDeclaration describes the relationship between a "key" that a developer might use to wayfind using that flag, and the index and bit position in an object\'s `flags` array.'});var fT=f.Record(f.String(),uT,{$id:"NavigationFlagDeclarations",description:"Any well known and custom flags present in the MVF"}),zV=f.Object({navigationFlags:f.Ref(fT)},{$id:"NavigationFlagsSchema"}),nl=f.Array(f.Integer({minimum:0,maximum:Math.pow(2,32)-1}),{$id:"Flags"}),ng=f.Object({flags:f.Ref(nl)},{$id:"WithFlags"}),Ji=f.Intersect([Vs,ng],{$id:"FlaggedGeometryAnchor"}),VV=f.Object({geometryAnchor:Ji},{$id:"WithFlaggedGeometryAnchor"}),BV=f.Object({geometryAnchors:f.Array(Ji)},{$id:"WithFlaggedGeometryAnchors"}),lT={name:"ext:mvf-navigation-flags",schema:zV,intoBundle:o(function*(e){e.navigationFlags!=null&&(yield{path:"navigationFlags.json",contents:e.navigationFlags})},"intoBundle"),fromBundle:o((e,t,r)=>e!=="navigationFlags.json"?void 0:{navigationFlags:r(t)},"fromBundle"),references:[uT,fT,nl,Ji,VV,BV],integrityCheck:aT};c();var pT=o(e=>{if(e.connections==null)return B(!0);let t=kt(e),r=Tc(e);for(let[n,i]of e.connections.entries()){for(let[s,a]of i.entrances.entries()){let u=t(a.floorId,a.geometryId);if(u.isErr())return u;let l=la(a.flags,r,"connections[".concat(n,"].entrances[").concat(s,"]"));if(l.isErr())return l}for(let[s,a]of i.exits.entries()){let u=t(a.floorId,a.geometryId);if(u.isErr())return u;let l=la(a.flags,r,"connections[".concat(n,"].exits[").concat(s,"]"));if(l.isErr())return l}}return B(!0)},"validateConnections");var mT=mt("c","ConnectionId"),{schema:GV,values:Rxe,record:Cxe}=Or(["elevator","escalator","travelator","stairs","door","ramp"],{$id:"ConnectionType"}),yT=GV;var hT=f.Intersect([f.Object({id:f.Ref(mT,{description:"The unique identifier for the connection."}),entrances:f.Array(f.Ref(Ji)),exits:f.Array(f.Ref(Ji)),entryCost:f.Number({description:"The cost to enter the connection.",minimum:0}),floorCostMultiplier:f.Number({description:"The cost multiplier for each floor transitioned.",minimum:1}),type:f.Ref(yT,{description:"The type of connection."})}),hn,gn],{$id:"ConnectionsProperties"}),gT=f.Array(f.Ref(hT),{$id:"ConnectionsCollection"}),KV=f.Object({connections:f.Ref(gT)},{$id:"ConnectionsExtensionSchema"}),dT="connections.json",xT={name:"ext:connections",schema:KV,intoBundle:o(function*(e){e.connections!=null&&(yield{path:dT,contents:e.connections})},"intoBundle"),fromBundle:o((e,t,r)=>{if(e===dT)return{connections:r(t)}},"fromBundle"),references:[hT,gT,yT,mT,Ji,nl],integrityCheck:pT};c();c();var IT=o(e=>{if(e.defaultStyle==null)return B(!0);let t=kt(e);for(let r of Object.values(e.defaultStyle))if(r!=null)for(let n of r.geometryAnchors){let i=t(n.floorId,n.geometryId);if(i.isErr())return i}return B(!0)},"validateDefaultStyle");var bT=f.Intersect([Ci(),gn,f.Object({altitude:f.Number({description:"How far off the bottom of the floor the objects with this style should be drawn, in meters."}),color:f.String({pattern:"^#[0-9a-fA-F]{6}$",description:"Color should be represented with a hash (#), followed by 6 hexadecimal digits. ex: #RRGGBB"}),height:f.Number({minimum:0,description:"The height of the objects belonging to this layer, in meters."}),opacity:f.Number({minimum:0,maximum:1,description:"The opacity of the objects belonging to this layer, from 0 to 1."}),buffer:f.Number({description:"The buffer amount to apply to the geometry, in meters. This can be used to inflate line string geometry for walls, but might also be applicable as a way to grow or shrink polygon geometry for aesthetic purposes. Can be negative."}),hidden:f.Optional(f.Boolean({description:"Whether or not the objects with this style should be hidden."}))})],{$id:"DefaultStyle"}),wT=f.Record(f.String(),f.Ref(bT),{$id:"DefaultStyleCollection",additionalProperties:!1}),WV=f.Object({defaultStyle:f.Ref(wT)},{$id:"DefaultStyleSchema"}),$T={name:"ext:mvf-default-style",schema:WV,intoBundle:o(function*(e){e.defaultStyle!=null&&(yield{path:"default-style.json",contents:e.defaultStyle})},"intoBundle"),fromBundle:o((e,t,r)=>{if(e==="default-style.json")return{defaultStyle:r(t)}},"fromBundle"),references:[bT,wT],integrityCheck:IT};c();c();c();c();var ol;(function(e){e.InvalidDefaultFloorError="InvalidDefaultFloorError"})(ol||(ol={}));var vT=o(e=>{if(e.floorStacks==null)return B(!0);let t=Io(e);for(let r of e.floorStacks){for(let n of r.floors){let i=t(n);if(i.isErr())return i}if(r.defaultFloor!=null&&!r.floors.includes(r.defaultFloor))return W({kind:ol.InvalidDefaultFloorError,properties:{floorStackId:r.id,floorId:r.defaultFloor}})}return B(!0)},"validateFloorStacks");var il=mt("fs","FloorStackId"),_T=f.Intersect([f.Object({id:f.Ref(il,{description:"The unique identifier for the floor stack."}),floors:f.Array(f.Ref(je),{uniqueItems:!0,minItems:1,description:"The floors that are part of this floor stack."}),defaultFloor:f.Optional(f.Ref(je,{description:"The default floor for the floor stack."}))}),hn],{$id:"FloorStacksProperties"}),ST=f.Array(f.Ref(_T),{$id:"FloorStackCollection"}),HV=f.Object({floorStacks:f.Ref(ST)},{$id:"FloorStackExtensionSchema"}),OT="floor-stacks.json",PT={name:"ext:floor-stacks",schema:HV,intoBundle:o(function*(e){e.floorStacks!=null&&(yield{path:OT,contents:e.floorStacks})},"intoBundle"),fromBundle:o((e,t,r)=>{if(e===OT)return{floorStacks:r(t)}},"fromBundle"),references:[il,_T,ST],integrityCheck:vT};c();c();var kc;(function(e){e.MissingFloorStackError="MissingFloorStackError",e.UnknownFloorStackError="UnknownFloorStackError"})(kc||(kc={}));var ET=o(e=>{if(e.facade==null)return B(!0);if(e.floorStacks==null)return W({kind:kc.MissingFloorStackError,properties:null});let t=new Set(e.floorStacks.map(n=>n.id)),r=kt(e);for(let[n,i]of rr(e.facade))if(i!=null){if(!t.has(n))return W({kind:kc.UnknownFloorStackError,properties:{floorStackId:n}});for(let s of i.geometryAnchors){let a=r(s.floorId,s.geometryId);if(a.isErr())return a}}return B(!0)},"validateFacade");var TT=mt("fc","FacadeId"),kT=f.Intersect([f.Object({id:f.Ref(TT)}),Ci({minItems:1})],{$id:"FacadeProperties"}),JV=f.Object({facade:bt(f.Record(il,f.Ref(kT),{additionalProperties:!1}))},{$id:"FacadeExtensionSchema"}),ZV=/^facade\/(.*)\.json$/,FT={name:"ext:facade",schema:JV,intoBundle:o(function*(e){if(e.facade!=null)for(let t of Ke(e.facade))yield{path:"facade/".concat(t,".json"),contents:e.facade[t]}},"intoBundle"),fromBundle:o((e,t,r)=>{var i;let n=(i=e.match(ZV))==null?void 0:i[1];if(n)return{facade:{[n]:r(t)}}},"fromBundle"),references:[TT,kT],integrityCheck:ET};c();c();var AT=o(e=>{if(e.floorImages==null)return B(!0);let t=kt(e);for(let[r,n]of rr(e.floorImages))if(n!=null)for(let i of n.features){if(!("geometryId"in i.properties))continue;let s=i.properties.geometryId,a=t(r,s);if(a.isErr())return a}return B(!0)},"validateFloorImages");var og=f.Object({path:f.String({format:"uri",description:"The path to the image. This will be a remote URL."}),width:f.Number({minimum:0,description:"The width of the image when represented on the map, in meters."}),height:f.Number({minimum:0,description:"The height of the image when represented on the map, in meters."}),rotation:f.Number({minimum:0,maximum:360,description:"Rotation in degrees, about the center of the image. North is 0, east is 90."})},{$id:"BaseFloorImageProperties"}),jT=f.Intersect([f.Ref(og),Jr],{$id:"AnchoredFloorImageProperties"}),NT=f.Intersect([f.Ref(og),f.Object({verticalOffset:f.Number({minimum:0,description:"How high to position the image, in meters, relative to the ground plane."})})],{$id:"FloatingFloorImageProperties"}),RT=f.Union([jT,NT],{$id:"FloorImageProperties"}),CT=zt(f.Ref(tr),RT,{$id:"FloorImageFeature"}),MT=pr(f.Ref(CT),{$id:"FloorImageCollection"}),YV=f.Object({floorImages:bt(f.Record(je,f.Ref(MT),{additionalProperties:!1}))},{$id:"FloorImagesExtensionSchema"}),XV=/^floorImages\/(.*)\.geojson$/,LT={name:"ext:floor-images",schema:YV,intoBundle:o(function*(e){if(e.floorImages!=null)for(let t of Ke(e.floorImages))yield{path:"floorImages/".concat(t,".geojson"),contents:e.floorImages[t]}},"intoBundle"),fromBundle:o((e,t,r)=>{var i;let n=(i=e.match(XV))==null?void 0:i[1];if(n)return{floorImages:{[n]:r(t)}}},"fromBundle"),references:[og,jT,NT,RT,CT,MT],integrityCheck:AT};c();c();var UT=o(e=>{if(e.kinds==null)return B(!0);let t=kt(e);for(let[r,n]of rr(e.kinds))if(n!=null)for(let i of Ke(n)){let s=t(r,i);if(s.isErr())return s}return B(!0)},"validateKinds");var{values:rbe,schema:QV,record:nbe}=Or(["room","hallway","wall","desk","poi","area","window"],{$id:"Kind"}),DT=QV;var qT=bt(f.Record(er,f.Ref(DT),{additionalProperties:!1,$id:"GeometryKinds"})),eB=f.Object({kinds:bt(f.Record(je,f.Ref(qT),{additionalProperties:!1}))},{$id:"KindsExtensionSchema"}),tB=/^kinds\/(.*)\.json$/,zT={name:"ext:kinds",schema:eB,intoBundle:o(function*(e){if(e.kinds!=null)for(let t of Ke(e.kinds))yield{path:"kinds/".concat(t,".json"),contents:e.kinds[t]}},"intoBundle"),fromBundle:o((e,t,r)=>{var i;let n=(i=e.match(tB))==null?void 0:i[1];if(n)return{kinds:{[n]:r(t)}}},"fromBundle"),references:[DT,qT],integrityCheck:UT};c();c();c();var sl;(function(e){e.UnknownNeighbor="UnknownNeighbor"})(sl||(sl={}));var VT=o(e=>{if(e.nodes==null)return B(!0);let t=kt(e),r=Tc(e);for(let[n,i]of rr(e.nodes)){if(i==null)continue;let s=new Set(i.features.map(a=>a.properties.id));for(let[a,u]of i.features.entries()){for(let l of u.properties.geometryIds){let d=t(n,l);if(d.isErr())return d}for(let[l,d]of u.properties.neighbors.entries()){if(!s.has(d.id))return W({kind:sl.UnknownNeighbor,properties:{floorId:n,nodeId:u.properties.id,neighborId:d.id}});let m=la(d.flags,r,'nodes["'.concat(n,'"].features[').concat(a,"].properties.neighbors[").concat(l,"]"));if(m.isErr())return m}}}return B(!0)},"validateNodes");var ig=mt("n","NodeId"),BT=f.Intersect([f.Object({id:f.Ref(ig,{description:"The unique identifier for the node."}),extraCost:f.Number({minimum:0,description:"The extra cost to traverse to the node, above the straight-line distance."})}),ng],{$id:"NodeNeighbor"}),GT=f.Intersect([f.Object({id:f.Ref(ig,{description:"The unique identifier for the node."}),neighbors:f.Array(f.Ref(BT),{description:"The neighbors of the node."})}),uf],{$id:"NodeProperties"}),KT=zt(f.Ref(tr),GT,{$id:"NodeFeature"}),WT=pr(f.Ref(KT),{$id:"NodeCollection"}),rB=f.Object({nodes:bt(f.Record(je,f.Ref(WT),{additionalProperties:!1}))},{$id:"NodesExtensionSchema"}),nB=/^nodes\/(.*)\.json$/,HT={name:"ext:nodes",schema:rB,intoBundle:o(function*(e){if(e.nodes!=null)for(let t of Ke(e.nodes))yield{path:"nodes/".concat(t,".json"),contents:e.nodes[t]}},"intoBundle"),fromBundle:o((e,t,r)=>{var i;let n=(i=e.match(nB))==null?void 0:i[1];if(n)return{nodes:{[n]:r(t)}}},"fromBundle"),references:[ig,BT,GT,KT,WT],integrityCheck:VT};c();c();c();var al;(function(e){e.FloorInFloorStackError="FloorInFloorStackError"})(al||(al={}));var JT=o(e=>{if(e.outdoors==null)return B(!0);let t=Io(e);for(let r of e.outdoors.floors){let n=t(r);if(n.isErr())return n;if(e.floorStacks!=null){for(let i of e.floorStacks)if(i.floors.includes(r))return W({kind:al.FloorInFloorStackError,properties:{floorId:r,floorStackId:i.id}})}}return B(!0)},"validateOutdoors");var YT=f.Object({floors:f.Array(f.Ref(je),{uniqueItems:!0,description:"A list of floor IDs that should be considered to contain outdoor features."})},{$id:"Outdoors"}),oB=f.Object({outdoors:f.Ref(YT)},{$id:"OutdoorsExtensionSchema"}),ZT="outdoors.json",XT={name:"ext:outdoors",schema:oB,intoBundle:o(function*(e){e.outdoors!=null&&(yield{path:ZT,contents:e.outdoors})},"intoBundle"),fromBundle:o((e,t,r)=>{if(e===ZT)return{outdoors:r(t)}},"fromBundle"),references:[YT],integrityCheck:JT};c();c();c();var cl;(function(e){e.TilesetDuplicateKeyError="TilesetDuplicateKeyError"})(cl||(cl={}));var QT=o(e=>{if(e.tileset==null)return B(!0);let t=new Set;if(t.add(e.tileset.default.key),e.tileset.others)for(let r of e.tileset.others){if(t.has(r.key))return W({kind:cl.TilesetDuplicateKeyError,properties:{key:r.key}});t.add(r.key)}return B(!0)},"validateTilesets");var sg=f.Object({key:f.String({minLength:1,description:"Unique identifier for the tileset style."}),name:f.String({minLength:1,description:"Display name of the tileset style."}),url:f.String({format:"uri",description:"URL of the tileset style."})},{$id:"TilesetStyle",description:"A tileset style definition."}),ek=f.Object({default:f.Ref(sg,{description:"The default tileset style, which should be used."}),others:f.Optional(f.Array(f.Ref(sg,{description:"Additional tileset styles that can be used."})))},{$id:"TilesetCollection"}),iB=f.Object({tileset:f.Ref(ek)},{$id:"TilesetExtensionSchema"}),tk={name:"ext:mvf-tileset",schema:iB,intoBundle:o(function*(e){e.tileset!=null&&(yield{path:"tileset.json",contents:e.tileset})},"intoBundle"),fromBundle:o((e,t,r)=>{if(e==="tileset.json")return{tileset:r(t)}},"fromBundle"),references:[sg,ek],integrityCheck:QT};c();var rk=f.Object({},{$id:"WalkableProperties"}),nk=f.Object({},{$id:"NonWalkableProperties"}),ok=bt(f.Record(er,f.Ref(rk),{$id:"WalkableGeometries",additionalProperties:!1})),ik=bt(f.Record(er,f.Ref(nk),{$id:"NonWalkableGeometries",additionalProperties:!1})),sB=f.Object({walkable:bt(f.Record(je,f.Ref(ok),{additionalProperties:!1})),nonwalkable:bt(f.Record(je,f.Ref(ik),{additionalProperties:!1}))},{$id:"TraversabilitySchema"}),aB=/^walkable\/(.*)\.json$/,cB=/^nonwalkable\/(.*)\.json$/,sk={name:"ext:mvf-traversability",schema:sB,intoBundle:o(function*(e){if(e.walkable!=null)for(let t of Ke(e.walkable))yield{path:"walkable/".concat(t,".json"),contents:e.walkable[t]};if(e.nonwalkable!=null)for(let t of Ke(e.nonwalkable))yield{path:"nonwalkable/".concat(t,".json"),contents:e.nonwalkable[t]}},"intoBundle"),fromBundle:o((e,t,r)=>{var s,a;let n=(s=e.match(aB))==null?void 0:s[1];if(n!=null)return{walkable:{[n]:r(t)}};let i=(a=e.match(cB))==null?void 0:a[1];if(i!=null)return{nonwalkable:{[i]:r(t)}}},"fromBundle"),references:[rk,nk,ok,ik]};c();c();c();c();c();c();c();c();c();c();c();var dB=ll(uk(),1);c();c();c();c();var Xwe=dE().extendOptional(lT).extendOptional(HT).extendOptional(xT).extendOptional(zT).extendOptional(sk).extendOptional($T).extendOptional(PT).extendOptional(XT).extendOptional(tk).extendOptional(LT).extendOptional(FT).extendOptional(dP).extendOptional($E).extendOptional(sT).build().expect("Invalid parser, this should never happen. Likely a bug in the MVFv2 library, or one of the extensions.");c();c();c();c();var hB=60,A$e=hB*60*1e3;c();var gB=60,q$e=gB*60*1e3;var pk=globalThis.fetch,dk,J$e=(dk=p==null?void 0:p.env)==null?void 0:dk.npm_package_version;function fl(){if(pk==null)throw new Error("fetch is not available in your environment. Pass your own function into `setFetchFn` (node-fetch, etc)");return pk}o(fl,"isomorphicFetch");var xB=Object.freeze({baseUri:"https://app.mappedin.com/",baseAuthUri:"https://app.mappedin.com/",analyticsBaseUri:"https://api-gateway.mappedin.com/track-analytics/a/",tileServerUri:"https://tiles-cdn.mappedin.com/styles/mappedin/style.json"}),Z$e=Object.freeze(F(g({},xB),{baseUri:"https://api-gateway.mappedin.com/",baseAuthUri:"https://auth.mappedin.com/"})),Y$e=Object.freeze({baseUri:"https://api-gateway.eu.mappedin.com/",baseAuthUri:"https://auth.eu.mappedin.com/",analyticsBaseUri:"https://api-gateway.eu.mappedin.com/track-analytics/a/",tileServerUri:"https://tiles-cdn.eu.mappedin.com/styles/mappedin/style.json"}),X$e=Object.freeze({baseUri:"https://api-gateway-staging.mappedin.net/",baseAuthUri:"https://auth-staging.mappedin.net/",analyticsBaseUri:"https://api-gateway-staging.mappedin.net/track-analytics/a/",tileServerUri:"https://tiles-cdn.mappedin.com/styles/mappedin/style.json"}),Q$e=Object.freeze({baseUri:"https://app-staging.mappedin.net/",baseAuthUri:"https://app-staging.mappedin.net/",analyticsBaseUri:"https://api-gateway-staging.mappedin.net/track-analytics/a/",tileServerUri:"https://tiles-cdn.mappedin.com/styles/mappedin/style.json"});var mk={id:qe.string(),name:qe.string(),type:qe.string(),startDate:qe.number(),endDate:qe.number(),externalId:qe.string().optional(),description:qe.string().optional(),location:qe.string().optional(),image:qe.object({original:qe.string(),xxsmall:qe.string().optional(),xsmall:qe.string().optional(),small:qe.string().optional(),medium:qe.string().optional(),large:qe.string().optional(),xlarge:qe.string().optional(),xxlarge:qe.string().optional()}).optional(),video:qe.object({width:qe.number(),height:qe.number(),thumbnail:qe.string(),content:qe.string(),original:qe.string()}).optional(),_locale:qe.record(qe.string(),qe.record(qe.string(),qe.unknown())).optional()},yk=qe.object(mk),hk=Object.keys(mk),gk=o(async(e,t,r,n={})=>{let i=new URLSearchParams(n),s=new URL("/public/1/event/".concat(e),t);return s.search=i.toString(),await(await fl()(s.toString(),{headers:{Authorization:"Bearer ".concat(r)}})).json()},"fetchEvents");var Po,jr,Hn,pa,da,ma,xk,Ik,lg=class lg{constructor(t,r={}){Pt(this,ma);Pt(this,Po);Pt(this,jr,{eventsById:new Map,eventsByLocationId:new Map});Pt(this,Hn,null);Pt(this,pa,!1);Pt(this,da);var n;Ct(this,Po,t),Ct(this,da,F(g({includeExpired:!1},r),{fields:hk.concat((n=r.fields)!=null?n:[])}))}async load(){return H(this,Hn)!=null?H(this,Hn):(Ct(this,Hn,(async()=>{let t=await ko(this,ma,xk).call(this);H(this,Hn)!=null&&(await ko(this,ma,Ik).call(this,t),Ct(this,pa,!0),Ct(this,Hn,null))})()),H(this,Hn))}get ready(){return H(this,pa)}get events(){return Array.from(H(this,jr).eventsById.values())}getById(t){return H(this,jr).eventsById.get(t)}getByLocationId(t){var r;return(r=H(this,jr).eventsByLocationId.get(t))!=null?r:[]}destroy(){H(this,jr).eventsById.clear(),H(this,jr).eventsByLocationId.clear(),Ct(this,Hn,null),Ct(this,pa,!1)}};Po=new WeakMap,jr=new WeakMap,Hn=new WeakMap,pa=new WeakMap,da=new WeakMap,ma=new WeakSet,xk=o(async function(){if(!H(this,Po).internal.enterpriseMode)return Zi.warn("Events are currently only supported for CMS maps!"),[];let t=H(this,Po).mapId;if(t==null)throw new Error("Failed to fetch events! Map ID was not specified in getMapData.");let r=H(this,Po).getAccessToken();if(r==null)throw new Error("Failed to fetch events! Could not get access token from MapData.");let n={fields:H(this,da).fields.join(","),lang:"all"};H(this,da).includeExpired||(n.activeAtOrAfter="now");let i=await gk(t,H(this,Po).getEnv().baseUri,r,n);if(!Array.isArray(i))throw new Error("Failed to fetch events! Invalid response format.");return i.filter(s=>{let a=yk.safeParse(s);return a.success||Zi.warn("Failed to parse event!",s,a.error),a.success})},"#fetchEvents"),Ik=o(async function(t){var r,n;H(this,jr).eventsById.clear(),H(this,jr).eventsByLocationId.clear();for(let i of t){let s=new jc(i,H(this,Po));H(this,jr).eventsById.set(s.id,s);let a=(r=s.location)==null?void 0:r.id;a!=null&&H(this,jr).eventsByLocationId.set(a,[...(n=H(this,jr).eventsByLocationId.get(a))!=null?n:[],s])}},"#createEvents"),o(lg,"EventsManager");var fg=lg;export{fg as EventsManager};