@mappedin/events 6.0.1-beta.53 → 6.0.1-beta.54

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +0,0 @@
1
- import{a as S,b as Y,c as o,d as ma,e as Yo,f as G,g as go,h as mu,i as H,j as He,k as Io,l as rs,n as h,o as wh,p as C,q as c}from"./chunk-JZZHN5TJ.js";var cs=G(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 Xu=class Xu{};o(Xu,"_CodeOrName");var ss=Xu;Me._CodeOrName=ss;Me.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var Qu=class Qu extends ss{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(Qu,"Name");var xo=Qu;Me.Name=xo;var ep=class ep extends ss{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 xo&&(r[n.str]=(r[n.str]||0)+1),r),{})}};o(ep,"_Code");var br=ep;Me._Code=br;Me.nil=new br("");function vh(e,...t){let r=[e[0]],n=0;for(;n<t.length;)Yu(r,t[n]),r.push(e[++n]);return new br(r)}o(vh,"_");Me._=vh;var Ju=new br("+");function Ah(e,...t){let r=[as(e[0])],n=0;for(;n<t.length;)r.push(Ju),Yu(r,t[n]),r.push(Ju,as(e[++n]));return B1(r),new br(r)}o(Ah,"str");Me.str=Ah;function Yu(e,t){t instanceof br?e.push(...t._items):t instanceof xo?e.push(t):e.push(H1(t))}o(Yu,"addCodeArg");Me.addCodeArg=Yu;function B1(e){let t=1;for(;t<e.length-1;){if(e[t]===Ju){let r=V1(e[t-1],e[t+1]);if(r!==void 0){e.splice(t-1,3,r);continue}e[t++]="+"}t++}}o(B1,"optimize");function V1(e,t){if(t==='""')return e;if(e==='""')return t;if(typeof e=="string")return t instanceof xo||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 xo))return'"'.concat(e).concat(t.slice(1))}o(V1,"mergeExprItems");var Eh;function W1(e,t){return t.emptyStr()?e:e.emptyStr()?t:Ah(Eh||(Eh=h(["","",""])),e,t)}o(W1,"strConcat");Me.strConcat=W1;function H1(e){return typeof e=="number"||typeof e=="boolean"||e===null?e:as(Array.isArray(e)?e.join(","):e)}o(H1,"interpolate");function Z1(e){return new br(as(e))}o(Z1,"stringify");Me.stringify=Z1;function as(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}o(as,"safeStringify");Me.safeStringify=as;var Th;function J1(e){return typeof e=="string"&&Me.IDENTIFIER.test(e)?new br(".".concat(e)):vh(Th||(Th=h(["[","]"])),e)}o(J1,"getProperty");Me.getProperty=J1;function Y1(e){if(typeof e=="string"&&Me.IDENTIFIER.test(e))return new br("".concat(e));throw new Error("CodeGen: invalid export name: ".concat(e,", use explicit $id name mapping"))}o(Y1,"getEsmExportName");Me.getEsmExportName=Y1;function X1(e){return new br(e.toString())}o(X1,"regexpCode");Me.regexpCode=X1});var ap=G(ir=>{"use strict";c();Object.defineProperty(ir,"__esModule",{value:!0});ir.ValueScope=ir.ValueScopeName=ir.Scope=ir.varKinds=ir.UsedValueState=void 0;var or=cs(),np=class np extends Error{constructor(t){super('CodeGen: "code" for '.concat(t," not defined")),this.value=t.value}};o(np,"ValueError");var tp=np,Va;(function(e){e[e.Started=0]="Started",e[e.Completed=1]="Completed"})(Va||(ir.UsedValueState=Va={}));ir.varKinds={const:new or.Name("const"),let:new or.Name("let"),var:new or.Name("var")};var op=class op{constructor({prefixes:t,parent:r}={}){this._names={},this._prefixes=t,this._parent=r}toName(t){return t instanceof or.Name?t:this.name(t)}name(t){return new or.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(op,"Scope");var Wa=op;ir.Scope=Wa;var jh,ip=class ip extends or.Name{constructor(t,r){super(r),this.prefix=t}setValue(t,{property:r,itemIndex:n}){this.value=t,this.scopePath=(0,or._)(jh||(jh=h([".","[","]"])),new or.Name(r),n)}};o(ip,"ValueScopeName");var Ha=ip;ir.ValueScopeName=Ha;var kh,Q1=(0,or._)(kh||(kh=h(["\n"],["\\n"]))),_h,Nh,Rh,sp=class sp extends Wa{constructor(t){super(t),this._values={},this._scope=t.scope,this.opts=Y(S({},t),{_n:t.lines?Q1:or.nil})}get(){return this._scope}name(t){return new Ha(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,f=this._values[s];if(f){let l=f.get(a);if(l)return l}else f=this._values[s]=new Map;f.set(a,i);let p=this._scope[s]||(this._scope[s]=[]),d=p.length;return p[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,or._)(_h||(_h=h(["","",""])),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=or.nil;for(let a in t){let f=t[a];if(!f)continue;let p=n[a]=n[a]||new Map;f.forEach(d=>{if(p.has(d))return;p.set(d,Va.Started);let l=r(d);if(l){let m=this.opts.es5?ir.varKinds.var:ir.varKinds.const;s=(0,or._)(Nh||(Nh=h(["",""," "," = ",";",""])),s,m,d,l,this.opts._n)}else if(l=i==null?void 0:i(d))s=(0,or._)(Rh||(Rh=h(["","","",""])),s,l,this.opts._n);else throw new tp(d);p.set(d,Va.Completed)})}return s}};o(sp,"ValueScope");var rp=sp;ir.ValueScope=rp});var me=G(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 we=cs(),Dr=ap(),Yn=cs();Object.defineProperty(ye,"_",{enumerable:!0,get:o(function(){return Yn._},"get")});Object.defineProperty(ye,"str",{enumerable:!0,get:o(function(){return Yn.str},"get")});Object.defineProperty(ye,"strConcat",{enumerable:!0,get:o(function(){return Yn.strConcat},"get")});Object.defineProperty(ye,"nil",{enumerable:!0,get:o(function(){return Yn.nil},"get")});Object.defineProperty(ye,"getProperty",{enumerable:!0,get:o(function(){return Yn.getProperty},"get")});Object.defineProperty(ye,"stringify",{enumerable:!0,get:o(function(){return Yn.stringify},"get")});Object.defineProperty(ye,"regexpCode",{enumerable:!0,get:o(function(){return Yn.regexpCode},"get")});Object.defineProperty(ye,"Name",{enumerable:!0,get:o(function(){return Yn.Name},"get")});var Xa=ap();Object.defineProperty(ye,"Scope",{enumerable:!0,get:o(function(){return Xa.Scope},"get")});Object.defineProperty(ye,"ValueScope",{enumerable:!0,get:o(function(){return Xa.ValueScope},"get")});Object.defineProperty(ye,"ValueScopeName",{enumerable:!0,get:o(function(){return Xa.ValueScopeName},"get")});Object.defineProperty(ye,"varKinds",{enumerable:!0,get:o(function(){return Xa.varKinds},"get")});ye.operators={GT:new we._Code(">"),GTE:new we._Code(">="),LT:new we._Code("<"),LTE:new we._Code("<="),EQ:new we._Code("==="),NEQ:new we._Code("!=="),NOT:new we._Code("!"),OR:new we._Code("||"),AND:new we._Code("&&"),ADD:new we._Code("+")};var bp=class bp{optimizeNodes(){return this}optimizeNames(t,r){return this}};o(bp,"Node");var Sn=bp,$p=class $p extends Sn{constructor(t,r,n){super(),this.varKind=t,this.name=r,this.rhs=n}render({es5:t,_n:r}){let n=t?Dr.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=ei(this.rhs,t,r)),this}get names(){return this.rhs instanceof we._CodeOrName?this.rhs.names:{}}};o($p,"Def");var cp=$p,wp=class wp extends Sn{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 we.Name&&!t[this.lhs.str]&&!this.sideEffects))return this.rhs=ei(this.rhs,t,r),this}get names(){let t=this.lhs instanceof we.Name?{}:S({},this.lhs.names);return Ya(t,this.rhs)}};o(wp,"Assign");var Za=wp,Pp=class Pp extends Za{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(Pp,"AssignOp");var fp=Pp,Op=class Op extends Sn{constructor(t){super(),this.label=t,this.names={}}render({_n:t}){return"".concat(this.label,":")+t}};o(Op,"Label");var up=Op,Fp=class Fp extends Sn{constructor(t){super(),this.label=t,this.names={}}render({_n:t}){let r=this.label?" ".concat(this.label):"";return"break".concat(r,";")+t}};o(Fp,"Break");var pp=Fp,Sp=class Sp extends Sn{constructor(t){super(),this.error=t}render({_n:t}){return"throw ".concat(this.error,";")+t}get names(){return this.error.names}};o(Sp,"Throw");var lp=Sp,Ep=class Ep extends Sn{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=ei(this.code,t,r),this}get names(){return this.code instanceof we._CodeOrName?this.code.names:{}}};o(Ep,"AnyCode");var dp=Ep,Tp=class Tp extends Sn{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)||(ev(t,s.names),n.splice(i,1))}return n.length>0?this:void 0}get names(){return this.nodes.reduce((t,r)=>wo(t,r.names),{})}};o(Tp,"ParentNode");var fs=Tp,vp=class vp extends fs{render(t){return"{"+t._n+super.render(t)+"}"+t._n}};o(vp,"BlockNode");var En=vp,Ap=class Ap extends fs{};o(Ap,"Root");var mp=Ap,jp=class jp extends En{};o(jp,"Else");var Qo=jp;Qo.kind="else";var Xo=class Xo extends En{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 Qo(n):n}if(r)return t===!1?r instanceof Xo?r:r.nodes:this.nodes.length?this:new Xo(Kh(t),r instanceof Xo?[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=ei(this.condition,t,r),this}get names(){let t=super.names;return Ya(t,this.condition),this.else&&wo(t,this.else.names),t}};o(Xo,"If");var bo=Xo;bo.kind="if";var kp=class kp extends En{};o(kp,"For");var $o=kp;$o.kind="for";var _p=class _p extends $o{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=ei(this.iteration,t,r),this}get names(){return wo(super.names,this.iteration.names)}};o(_p,"ForLoop");var yp=_p,Np=class Np extends $o{constructor(t,r,n,i){super(),this.varKind=t,this.name=r,this.from=n,this.to=i}render(t){let r=t.es5?Dr.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=Ya(super.names,this.from);return Ya(t,this.to)}};o(Np,"ForRange");var hp=Np,Rp=class Rp extends $o{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=ei(this.iterable,t,r),this}get names(){return wo(super.names,this.iterable.names)}};o(Rp,"ForIter");var Ja=Rp,Cp=class Cp extends En{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(Cp,"Func");var us=Cp;us.kind="func";var Mp=class Mp extends fs{render(t){return"return "+super.render(t)}};o(Mp,"Return");var ps=Mp;ps.kind="return";var Lp=class Lp extends En{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&&wo(t,this.catch.names),this.finally&&wo(t,this.finally.names),t}};o(Lp,"Try");var gp=Lp,Up=class Up extends En{constructor(t){super(),this.error=t}render(t){return"catch(".concat(this.error,")")+super.render(t)}};o(Up,"Catch");var ls=Up;ls.kind="catch";var Dp=class Dp extends En{render(t){return"finally"+super.render(t)}};o(Dp,"Finally");var ds=Dp;ds.kind="finally";var Ch,Mh,Lh,qp=class qp{constructor(t,r={}){this._values={},this._blockStarts=[],this._constants={},this.opts=Y(S({},r),{_n:r.lines?"\n":""}),this._extScope=t,this._scope=new Dr.Scope({parent:t}),this._nodes=[new mp]}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 cp(t,s,n)),s}const(t,r,n){return this._def(Dr.varKinds.const,t,r,n)}let(t,r,n){return this._def(Dr.varKinds.let,t,r,n)}var(t,r,n){return this._def(Dr.varKinds.var,t,r,n)}assign(t,r,n){return this._leafNode(new Za(t,r,n))}add(t,r){return this._leafNode(new fp(t,ye.operators.ADD,r))}code(t){return typeof t=="function"?t():t!==we.nil&&this._leafNode(new dp(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,we.addCodeArg)(r,i));return r.push("}"),new we._Code(r)}if(t,r,n){if(this._blockNode(new bo(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 bo(t))}else(){return this._elseNode(new Qo)}endIf(){return this._endBlockNode(bo,Qo)}_for(t,r){return this._blockNode(t),r&&this.code(r).endFor(),this}for(t,r){return this._for(new yp(t),r)}forRange(t,r,n,i,s=this.opts.es5?Dr.varKinds.var:Dr.varKinds.let){let a=this._scope.toName(t);return this._for(new hp(s,a,r,n),()=>i(a))}forOf(t,r,n,i=Dr.varKinds.const){let s=this._scope.toName(t);if(this.opts.es5){let a=r instanceof we.Name?r:this.var("_arr",r);return this.forRange("_i",0,(0,we._)(Ch||(Ch=h(["",".length"])),a),f=>{this.var(s,(0,we._)(Mh||(Mh=h(["","[","]"])),a,f)),n(s)})}return this._for(new Ja("of",i,s,r),()=>n(s))}forIn(t,r,n,i=this.opts.es5?Dr.varKinds.var:Dr.varKinds.const){if(this.opts.ownProperties)return this.forOf(t,(0,we._)(Lh||(Lh=h(["Object.keys(",")"])),r),n);let s=this._scope.toName(t);return this._for(new Ja("in",i,s,r),()=>n(s))}endFor(){return this._endBlockNode($o)}label(t){return this._leafNode(new up(t))}break(t){return this._leafNode(new pp(t))}return(t){let r=new ps;if(this._blockNode(r),this.code(t),r.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(ps)}try(t,r,n){if(!r&&!n)throw new Error('CodeGen: "try" without "catch" and "finally"');let i=new gp;if(this._blockNode(i),this.code(t),r){let s=this.name("e");this._currNode=i.catch=new ls(s),r(s)}return n&&(this._currNode=i.finally=new ds,this.code(n)),this._endBlockNode(ls,ds)}throw(t){return this._leafNode(new lp(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=we.nil,n,i){return this._blockNode(new us(t,r,n)),i&&this.code(i).endFunc(),this}endFunc(){return this._endBlockNode(us)}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 bo))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(qp,"CodeGen");var Ip=qp;ye.CodeGen=Ip;function wo(e,t){for(let r in t)e[r]=(e[r]||0)+(t[r]||0);return e}o(wo,"addNames");function Ya(e,t){return t instanceof we._CodeOrName?wo(e,t.names):e}o(Ya,"addExprNames");function ei(e,t,r){if(e instanceof we.Name)return n(e);if(!i(e))return e;return new we._Code(e._items.reduce((s,a)=>(a instanceof we.Name&&(a=n(a)),a instanceof we._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 we._Code&&s._items.some(a=>a instanceof we.Name&&t[a.str]===1&&r[a.str]!==void 0)}}o(ei,"optimizeExpr");function ev(e,t){for(let r in t)e[r]=(e[r]||0)-(t[r]||0)}o(ev,"subtractNames");var Uh;function Kh(e){return typeof e=="boolean"||typeof e=="number"||e===null?!e:(0,we._)(Uh||(Uh=h(["!",""])),xp(e))}o(Kh,"not");ye.not=Kh;var tv=zh(ye.operators.AND);function rv(...e){return e.reduce(tv)}o(rv,"and");ye.and=rv;var nv=zh(ye.operators.OR);function ov(...e){return e.reduce(nv)}o(ov,"or");ye.or=ov;var Dh;function zh(e){return(t,r)=>t===we.nil?r:r===we.nil?t:(0,we._)(Dh||(Dh=h([""," "," ",""])),xp(t),e,xp(r))}o(zh,"mappend");var qh;function xp(e){return e instanceof we.Name?e:(0,we._)(qh||(qh=h(["(",")"])),e)}o(xp,"par")});var Le=G(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 Xe=me(),iv=cs();function sv(e){let t={};for(let r of e)t[r]=!0;return t}o(sv,"toHash");ge.toHash=sv;function av(e,t){return typeof t=="boolean"?t:Object.keys(t).length===0?!0:(ug(e,t),!pg(t,e.self.RULES.all))}o(av,"alwaysValidSchema");ge.alwaysValidSchema=av;function ug(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]||mg(e,'unknown keyword: "'.concat(s,'"'))}o(ug,"checkUnknownRules");ge.checkUnknownRules=ug;function pg(e,t){if(typeof e=="boolean")return!e;for(let r in e)if(t[r])return!0;return!1}o(pg,"schemaHasRules");ge.schemaHasRules=pg;function cv(e,t){if(typeof e=="boolean")return!e;for(let r in e)if(r!=="$ref"&&t.all[r])return!0;return!1}o(cv,"schemaHasRulesButRef");ge.schemaHasRulesButRef=cv;var Vh,Wh;function fv({topSchemaRef:e,schemaPath:t},r,n,i){if(!i){if(typeof r=="number"||typeof r=="boolean")return r;if(typeof r=="string")return(0,Xe._)(Vh||(Vh=h(["",""])),r)}return(0,Xe._)(Wh||(Wh=h(["","","",""])),e,t,(0,Xe.getProperty)(n))}o(fv,"schemaRefOrVal");ge.schemaRefOrVal=fv;function uv(e){return lg(decodeURIComponent(e))}o(uv,"unescapeFragment");ge.unescapeFragment=uv;function pv(e){return encodeURIComponent(zp(e))}o(pv,"escapeFragment");ge.escapeFragment=pv;function zp(e){return typeof e=="number"?"".concat(e):e.replace(/~/g,"~0").replace(/\//g,"~1")}o(zp,"escapeJsonPointer");ge.escapeJsonPointer=zp;function lg(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}o(lg,"unescapeJsonPointer");ge.unescapeJsonPointer=lg;function lv(e,t){if(Array.isArray(e))for(let r of e)t(r);else t(e)}o(lv,"eachItem");ge.eachItem=lv;function Gh({mergeNames:e,mergeToName:t,mergeValues:r,resultToName:n}){return(i,s,a,f)=>{let p=a===void 0?s:a instanceof Xe.Name?(s instanceof Xe.Name?e(i,s,a):t(i,s,a),a):s instanceof Xe.Name?(t(i,a,s),s):r(s,a);return f===Xe.Name&&!(p instanceof Xe.Name)?n(i,p):p}}o(Gh,"makeMergeEvaluated");var Hh,Zh,Jh,Yh,Xh,Qh,eg,tg,rg,ng;ge.mergeEvaluated={props:Gh({mergeNames:o((e,t,r)=>e.if((0,Xe._)(Hh||(Hh=h([""," !== true && "," !== undefined"])),r,t),()=>{e.if((0,Xe._)(Zh||(Zh=h([""," === true"])),t),()=>e.assign(r,!0),()=>e.assign(r,(0,Xe._)(Jh||(Jh=h([""," || {}"])),r)).code((0,Xe._)(Yh||(Yh=h(["Object.assign(",", ",")"])),r,t)))}),"mergeNames"),mergeToName:o((e,t,r)=>e.if((0,Xe._)(Xh||(Xh=h([""," !== true"])),r),()=>{t===!0?e.assign(r,!0):(e.assign(r,(0,Xe._)(Qh||(Qh=h([""," || {}"])),r)),Gp(e,r,t))}),"mergeToName"),mergeValues:o((e,t)=>e===!0?!0:S(S({},e),t),"mergeValues"),resultToName:dg}),items:Gh({mergeNames:o((e,t,r)=>e.if((0,Xe._)(eg||(eg=h([""," !== true && "," !== undefined"])),r,t),()=>e.assign(r,(0,Xe._)(tg||(tg=h([""," === true ? true : "," > "," ? "," : ",""])),t,r,t,r,t))),"mergeNames"),mergeToName:o((e,t,r)=>e.if((0,Xe._)(rg||(rg=h([""," !== true"])),r),()=>e.assign(r,t===!0?!0:(0,Xe._)(ng||(ng=h([""," > "," ? "," : ",""])),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 og;function dg(e,t){if(t===!0)return e.var("props",!0);let r=e.var("props",(0,Xe._)(og||(og=h(["{}"]))));return t!==void 0&&Gp(e,r,t),r}o(dg,"evaluatedPropsToName");ge.evaluatedPropsToName=dg;var ig;function Gp(e,t,r){Object.keys(r).forEach(n=>e.assign((0,Xe._)(ig||(ig=h(["","",""])),t,(0,Xe.getProperty)(n)),!0))}o(Gp,"setEvaluated");ge.setEvaluated=Gp;var Bh={};function dv(e,t){return e.scopeValue("func",{ref:t,code:Bh[t.code]||(Bh[t.code]=new iv._Code(t.code))})}o(dv,"useFunc");ge.useFunc=dv;var Kp;(function(e){e[e.Num=0]="Num",e[e.Str=1]="Str"})(Kp||(ge.Type=Kp={}));var sg,ag,cg,fg;function mv(e,t,r){if(e instanceof Xe.Name){let n=t===Kp.Num;return r?n?(0,Xe._)(sg||(sg=h(['"[" + ',' + "]"'])),e):(0,Xe._)(ag||(ag=h(['"[\'" + ',' + "\']"'])),e):n?(0,Xe._)(cg||(cg=h(['"/" + ',""])),e):(0,Xe._)(fg||(fg=h(['"/" + ','.replace(/~/g, "~0").replace(/\\//g, "~1")'],['"/" + ','.replace(/~/g, "~0").replace(/\\\\//g, "~1")'])),e)}return r?(0,Xe.getProperty)(e).toString():"/"+zp(e)}o(mv,"getErrorPath");ge.getErrorPath=mv;function mg(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(mg,"checkStrictMode");ge.checkStrictMode=mg});var Tn=G(Bp=>{"use strict";c();Object.defineProperty(Bp,"__esModule",{value:!0});var Dt=me(),yv={data:new Dt.Name("data"),valCxt:new Dt.Name("valCxt"),instancePath:new Dt.Name("instancePath"),parentData:new Dt.Name("parentData"),parentDataProperty:new Dt.Name("parentDataProperty"),rootData:new Dt.Name("rootData"),dynamicAnchors:new Dt.Name("dynamicAnchors"),vErrors:new Dt.Name("vErrors"),errors:new Dt.Name("errors"),this:new Dt.Name("this"),self:new Dt.Name("self"),scope:new Dt.Name("scope"),json:new Dt.Name("json"),jsonPos:new Dt.Name("jsonPos"),jsonLen:new Dt.Name("jsonLen"),jsonPart:new Dt.Name("jsonPart")};Bp.default=yv});var ms=G(qt=>{"use strict";c();Object.defineProperty(qt,"__esModule",{value:!0});qt.extendErrors=qt.resetErrorsCount=qt.reportExtraError=qt.reportError=qt.keyword$DataError=qt.keywordError=void 0;var ve=me(),Qa=Le(),Yt=Tn(),yg;qt.keywordError={message:o(({keyword:e})=>(0,ve.str)(yg||(yg=h(['must pass "','" keyword validation'])),e),"message")};var hg,gg;qt.keyword$DataError={message:o(({keyword:e,schemaType:t})=>t?(0,ve.str)(hg||(hg=h(['"','" keyword must be '," ($data)"])),e,t):(0,ve.str)(gg||(gg=h(['"','" keyword is invalid ($data)'])),e),"message")};var Ig;function hv(e,t=qt.keywordError,r,n){let{it:i}=e,{gen:s,compositeRule:a,allErrors:f}=i,p=Kg(e,t,r);(n!=null?n:a||f)?Dg(s,p):qg(i,(0,ve._)(Ig||(Ig=h(["[","]"])),p))}o(hv,"reportError");qt.reportError=hv;function gv(e,t=qt.keywordError,r){let{it:n}=e,{gen:i,compositeRule:s,allErrors:a}=n,f=Kg(e,t,r);Dg(i,f),s||a||qg(n,Yt.default.vErrors)}o(gv,"reportExtraError");qt.reportExtraError=gv;var xg,bg;function Iv(e,t){e.assign(Yt.default.errors,t),e.if((0,ve._)(xg||(xg=h([""," !== null"])),Yt.default.vErrors),()=>e.if(t,()=>e.assign((0,ve._)(bg||(bg=h(["",".length"])),Yt.default.vErrors),t),()=>e.assign(Yt.default.vErrors,null)))}o(Iv,"resetErrorsCount");qt.resetErrorsCount=Iv;var $g,wg,Pg,Og,Fg,Sg,Eg;function xv({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,Yt.default.errors,f=>{e.const(a,(0,ve._)($g||($g=h(["","[","]"])),Yt.default.vErrors,f)),e.if((0,ve._)(wg||(wg=h(["",".instancePath === undefined"])),a),()=>e.assign((0,ve._)(Pg||(Pg=h(["",".instancePath"])),a),(0,ve.strConcat)(Yt.default.instancePath,s.errorPath))),e.assign((0,ve._)(Og||(Og=h(["",".schemaPath"])),a),(0,ve.str)(Fg||(Fg=h(["","/",""])),s.errSchemaPath,t)),s.opts.verbose&&(e.assign((0,ve._)(Sg||(Sg=h(["",".schema"])),a),r),e.assign((0,ve._)(Eg||(Eg=h(["",".data"])),a),n))})}o(xv,"extendErrors");qt.extendErrors=xv;var Tg,vg,Ag,jg;function Dg(e,t){let r=e.const("err",t);e.if((0,ve._)(Tg||(Tg=h([""," === null"])),Yt.default.vErrors),()=>e.assign(Yt.default.vErrors,(0,ve._)(vg||(vg=h(["[","]"])),r)),(0,ve._)(Ag||(Ag=h(["",".push(",")"])),Yt.default.vErrors,r)),e.code((0,ve._)(jg||(jg=h(["","++"])),Yt.default.errors))}o(Dg,"addError");var kg,_g;function qg(e,t){let{gen:r,validateName:n,schemaEnv:i}=e;i.$async?r.throw((0,ve._)(kg||(kg=h(["new ","(",")"])),e.ValidationError,t)):(r.assign((0,ve._)(_g||(_g=h(["",".errors"])),n),t),r.return(!1))}o(qg,"returnErrors");var Po={keyword:new ve.Name("keyword"),schemaPath:new ve.Name("schemaPath"),params:new ve.Name("params"),propertyName:new ve.Name("propertyName"),message:new ve.Name("message"),schema:new ve.Name("schema"),parentSchema:new ve.Name("parentSchema")},Ng;function Kg(e,t,r){let{createErrors:n}=e.it;return n===!1?(0,ve._)(Ng||(Ng=h(["{}"]))):bv(e,t,r)}o(Kg,"errorObjectCode");function bv(e,t,r={}){let{gen:n,it:i}=e,s=[$v(i,r),wv(e,r)];return Pv(e,t,s),n.object(...s)}o(bv,"errorObject");var Rg;function $v({errorPath:e},{instancePath:t}){let r=t?(0,ve.str)(Rg||(Rg=h(["","",""])),e,(0,Qa.getErrorPath)(t,Qa.Type.Str)):e;return[Yt.default.instancePath,(0,ve.strConcat)(Yt.default.instancePath,r)]}o($v,"errorInstancePath");var Cg,Mg;function wv({keyword:e,it:{errSchemaPath:t}},{schemaPath:r,parentSchema:n}){let i=n?t:(0,ve.str)(Cg||(Cg=h(["","/",""])),t,e);return r&&(i=(0,ve.str)(Mg||(Mg=h(["","",""])),i,(0,Qa.getErrorPath)(r,Qa.Type.Str))),[Po.schemaPath,i]}o(wv,"errorSchemaPath");var Lg,Ug;function Pv(e,{params:t,message:r},n){let{keyword:i,data:s,schemaValue:a,it:f}=e,{opts:p,propertyName:d,topSchemaRef:l,schemaPath:m}=f;n.push([Po.keyword,i],[Po.params,typeof t=="function"?t(e):t||(0,ve._)(Lg||(Lg=h(["{}"])))]),p.messages&&n.push([Po.message,typeof r=="function"?r(e):r]),p.verbose&&n.push([Po.schema,a],[Po.parentSchema,(0,ve._)(Ug||(Ug=h(["","",""])),l,m)],[Yt.default.data,s]),d&&n.push([Po.propertyName,d])}o(Pv,"extraErrorProps")});var Bg=G(ti=>{"use strict";c();Object.defineProperty(ti,"__esModule",{value:!0});ti.boolOrEmptySchema=ti.topBoolOrEmptySchema=void 0;var Ov=ms(),Fv=me(),Sv=Tn(),Ev={message:"boolean schema is false"},zg;function Tv(e){let{gen:t,schema:r,validateName:n}=e;r===!1?Gg(e,!1):typeof r=="object"&&r.$async===!0?t.return(Sv.default.data):(t.assign((0,Fv._)(zg||(zg=h(["",".errors"])),n),null),t.return(!0))}o(Tv,"topBoolOrEmptySchema");ti.topBoolOrEmptySchema=Tv;function vv(e,t){let{gen:r,schema:n}=e;n===!1?(r.var(t,!1),Gg(e)):r.var(t,!0)}o(vv,"boolOrEmptySchema");ti.boolOrEmptySchema=vv;function Gg(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,Ov.reportError)(i,Ev,void 0,t)}o(Gg,"falseSchemaError")});var Vp=G(ri=>{"use strict";c();Object.defineProperty(ri,"__esModule",{value:!0});ri.getRules=ri.isJSONType=void 0;var Av=["string","number","integer","boolean","null","object","array"],jv=new Set(Av);function kv(e){return typeof e=="string"&&jv.has(e)}o(kv,"isJSONType");ri.isJSONType=kv;function _v(){let e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:Y(S({},e),{integer:!0,boolean:!0,null:!0}),rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}o(_v,"getRules");ri.getRules=_v});var Wp=G(Xn=>{"use strict";c();Object.defineProperty(Xn,"__esModule",{value:!0});Xn.shouldUseRule=Xn.shouldUseGroup=Xn.schemaHasRulesForType=void 0;function Nv({schema:e,self:t},r){let n=t.RULES.types[r];return n&&n!==!0&&Vg(e,n)}o(Nv,"schemaHasRulesForType");Xn.schemaHasRulesForType=Nv;function Vg(e,t){return t.rules.some(r=>Wg(e,r))}o(Vg,"shouldUseGroup");Xn.shouldUseGroup=Vg;function Wg(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(Wg,"shouldUseRule");Xn.shouldUseRule=Wg});var ys=G(Kt=>{"use strict";c();Object.defineProperty(Kt,"__esModule",{value:!0});Kt.reportTypeError=Kt.checkDataTypes=Kt.checkDataType=Kt.coerceAndCheckDataType=Kt.getJSONTypes=Kt.getSchemaTypes=Kt.DataType=void 0;var Rv=Vp(),Cv=Wp(),Mv=ms(),de=me(),EI=Le(),ni;(function(e){e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong"})(ni||(Kt.DataType=ni={}));function Lv(e){let t=TI(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(Lv,"getSchemaTypes");Kt.getSchemaTypes=Lv;function TI(e){let t=Array.isArray(e)?e:e?[e]:[];if(t.every(Rv.isJSONType))return t;throw new Error("type must be JSONType or JSONType[]: "+t.join(","))}o(TI,"getJSONTypes");Kt.getJSONTypes=TI;function Uv(e,t){let{gen:r,data:n,opts:i}=e,s=Dv(t,i.coerceTypes),a=t.length>0&&!(s.length===0&&t.length===1&&(0,Cv.schemaHasRulesForType)(e,t[0]));if(a){let f=Zp(t,n,i.strictNumbers,ni.Wrong);r.if(f,()=>{s.length?qv(e,t,s):Jp(e)})}return a}o(Uv,"coerceAndCheckDataType");Kt.coerceAndCheckDataType=Uv;var vI=new Set(["string","number","integer","boolean","null"]);function Dv(e,t){return t?e.filter(r=>vI.has(r)||t==="array"&&r==="array"):[]}o(Dv,"coerceToTypes");var Hg,Zg,Jg,Yg,Xg,Qg,eI,tI,rI,nI,oI,iI,sI,aI,cI,fI,uI,pI,lI,dI;function qv(e,t,r){let{gen:n,data:i,opts:s}=e,a=n.let("dataType",(0,de._)(Hg||(Hg=h(["typeof ",""])),i)),f=n.let("coerced",(0,de._)(Zg||(Zg=h(["undefined"]))));s.coerceTypes==="array"&&n.if((0,de._)(Jg||(Jg=h([""," == 'object' && Array.isArray(",") && ",".length == 1"])),a,i,i),()=>n.assign(i,(0,de._)(Yg||(Yg=h(["","[0]"])),i)).assign(a,(0,de._)(Xg||(Xg=h(["typeof ",""])),i)).if(Zp(t,i,s.strictNumbers),()=>n.assign(f,i))),n.if((0,de._)(Qg||(Qg=h([""," !== undefined"])),f));for(let d of r)(vI.has(d)||d==="array"&&s.coerceTypes==="array")&&p(d);n.else(),Jp(e),n.endIf(),n.if((0,de._)(eI||(eI=h([""," !== undefined"])),f),()=>{n.assign(i,f),Kv(e,f)});function p(d){switch(d){case"string":n.elseIf((0,de._)(tI||(tI=h(["",' == "number" || ',' == "boolean"'])),a,a)).assign(f,(0,de._)(rI||(rI=h(['"" + ',""])),i)).elseIf((0,de._)(nI||(nI=h([""," === null"])),i)).assign(f,(0,de._)(oI||(oI=h(['""']))));return;case"number":n.elseIf((0,de._)(iI||(iI=h(["",' == "boolean" || '," === null\n || (",' == "string" && '," && "," == +",")"])),a,i,a,i,i,i)).assign(f,(0,de._)(sI||(sI=h(["+",""])),i));return;case"integer":n.elseIf((0,de._)(aI||(aI=h(["",' === "boolean" || '," === null\n || (",' === "string" && '," && "," == +"," && !("," % 1))"])),a,i,a,i,i,i,i)).assign(f,(0,de._)(cI||(cI=h(["+",""])),i));return;case"boolean":n.elseIf((0,de._)(fI||(fI=h(["",' === "false" || '," === 0 || "," === null"])),i,i,i)).assign(f,!1).elseIf((0,de._)(uI||(uI=h(["",' === "true" || '," === 1"])),i,i)).assign(f,!0);return;case"null":n.elseIf((0,de._)(pI||(pI=h(["",' === "" || '," === 0 || "," === false"])),i,i,i)),n.assign(f,null);return;case"array":n.elseIf((0,de._)(lI||(lI=h(["",' === "string" || ',' === "number"\n || ',' === "boolean" || '," === null"])),a,a,a,i)).assign(f,(0,de._)(dI||(dI=h(["[","]"])),i))}}o(p,"coerceSpecificType")}o(qv,"coerceData");var mI,yI;function Kv({gen:e,parentData:t,parentDataProperty:r},n){e.if((0,de._)(mI||(mI=h([""," !== undefined"])),t),()=>e.assign((0,de._)(yI||(yI=h(["","[","]"])),t,r),n))}o(Kv,"assignParentData");var hI,gI,II,xI,bI,$I,wI;function Hp(e,t,r,n=ni.Correct){let i=n===ni.Correct?de.operators.EQ:de.operators.NEQ,s;switch(e){case"null":return(0,de._)(hI||(hI=h([""," "," null"])),t,i);case"array":s=(0,de._)(gI||(gI=h(["Array.isArray(",")"])),t);break;case"object":s=(0,de._)(II||(II=h([""," && typeof ",' == "object" && !Array.isArray(',")"])),t,t,t);break;case"integer":s=a((0,de._)(xI||(xI=h(["!("," % 1) && !isNaN(",")"])),t,t));break;case"number":s=a();break;default:return(0,de._)(bI||(bI=h(["typeof "," "," ",""])),t,i,e)}return n===ni.Correct?s:(0,de.not)(s);function a(f=de.nil){return(0,de.and)((0,de._)($I||($I=h(["typeof ",' == "number"'])),t),f,r?(0,de._)(wI||(wI=h(["isFinite(",")"])),t):de.nil)}}o(Hp,"checkDataType");Kt.checkDataType=Hp;var PI,OI;function Zp(e,t,r,n){if(e.length===1)return Hp(e[0],t,r,n);let i,s=(0,EI.toHash)(e);if(s.array&&s.object){let a=(0,de._)(PI||(PI=h(["typeof ",' != "object"'])),t);i=s.null?a:(0,de._)(OI||(OI=h(["!"," || ",""])),t,a),delete s.null,delete s.array,delete s.object}else i=de.nil;s.number&&delete s.integer;for(let a in s)i=(0,de.and)(i,Hp(a,t,r,n));return i}o(Zp,"checkDataTypes");Kt.checkDataTypes=Zp;var FI,SI,zv={message:o(({schema:e})=>"must be ".concat(e),"message"),params:o(({schema:e,schemaValue:t})=>typeof e=="string"?(0,de._)(FI||(FI=h(["{type: ","}"])),e):(0,de._)(SI||(SI=h(["{type: ","}"])),t),"params")};function Jp(e){let t=Gv(e);(0,Mv.reportError)(t,zv)}o(Jp,"reportTypeError");Kt.reportTypeError=Jp;function Gv(e){let{gen:t,data:r,schema:n}=e,i=(0,EI.schemaRefOrVal)(e,n,"type");return{gen:t,keyword:"type",data:r,schema:n.type,schemaCode:i,schemaValue:i,parentSchema:n,params:{},it:e}}o(Gv,"getTypeErrorContext")});var RI=G(ec=>{"use strict";c();Object.defineProperty(ec,"__esModule",{value:!0});ec.assignDefaults=void 0;var oi=me(),Bv=Le();function Vv(e,t){let{properties:r,items:n}=e.schema;if(t==="object"&&r)for(let i in r)AI(e,i,r[i].default);else t==="array"&&Array.isArray(n)&&n.forEach((i,s)=>AI(e,s,i.default))}o(Vv,"assignDefaults");ec.assignDefaults=Vv;var jI,kI,_I,NI;function AI(e,t,r){let{gen:n,compositeRule:i,data:s,opts:a}=e;if(r===void 0)return;let f=(0,oi._)(jI||(jI=h(["","",""])),s,(0,oi.getProperty)(t));if(i){(0,Bv.checkStrictMode)(e,"default is ignored for: ".concat(f));return}let p=(0,oi._)(kI||(kI=h([""," === undefined"])),f);a.useDefaults==="empty"&&(p=(0,oi._)(_I||(_I=h([""," || "," === null || ",' === ""'])),p,f,f)),n.if(p,(0,oi._)(NI||(NI=h([""," = ",""])),f,(0,oi.stringify)(r)))}o(AI,"assignDefault")});var $r=G(Ze=>{"use strict";c();Object.defineProperty(Ze,"__esModule",{value:!0});Ze.validateUnion=Ze.validateArray=Ze.usePattern=Ze.callValidateCode=Ze.schemaProperties=Ze.allSchemaProperties=Ze.noPropertyInData=Ze.propertyInData=Ze.isOwnProperty=Ze.hasPropFunc=Ze.reportMissingProp=Ze.checkMissingProp=Ze.checkReportMissingProp=void 0;var nt=me(),Yp=Le(),Qn=Tn(),Wv=Le(),CI;function Hv(e,t){let{gen:r,data:n,it:i}=e;r.if(Qp(r,n,t,i.opts.ownProperties),()=>{e.setParams({missingProperty:(0,nt._)(CI||(CI=h(["",""])),t)},!0),e.error()})}o(Hv,"checkReportMissingProp");Ze.checkReportMissingProp=Hv;var MI;function Zv({gen:e,data:t,it:{opts:r}},n,i){return(0,nt.or)(...n.map(s=>(0,nt.and)(Qp(e,t,s,r.ownProperties),(0,nt._)(MI||(MI=h([""," = ",""])),i,s))))}o(Zv,"checkMissingProp");Ze.checkMissingProp=Zv;function Jv(e,t){e.setParams({missingProperty:t},!0),e.error()}o(Jv,"reportMissingProp");Ze.reportMissingProp=Jv;var LI;function YI(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,nt._)(LI||(LI=h(["Object.prototype.hasOwnProperty"])))})}o(YI,"hasPropFunc");Ze.hasPropFunc=YI;var UI;function Xp(e,t,r){return(0,nt._)(UI||(UI=h(["",".call(",", ",")"])),YI(e),t,r)}o(Xp,"isOwnProperty");Ze.isOwnProperty=Xp;var DI,qI;function Yv(e,t,r,n){let i=(0,nt._)(DI||(DI=h(["",""," !== undefined"])),t,(0,nt.getProperty)(r));return n?(0,nt._)(qI||(qI=h([""," && ",""])),i,Xp(e,t,r)):i}o(Yv,"propertyInData");Ze.propertyInData=Yv;var KI;function Qp(e,t,r,n){let i=(0,nt._)(KI||(KI=h(["",""," === undefined"])),t,(0,nt.getProperty)(r));return n?(0,nt.or)(i,(0,nt.not)(Xp(e,t,r))):i}o(Qp,"noPropertyInData");Ze.noPropertyInData=Qp;function XI(e){return e?Object.keys(e).filter(t=>t!=="__proto__"):[]}o(XI,"allSchemaProperties");Ze.allSchemaProperties=XI;function Xv(e,t){return XI(t).filter(r=>!(0,Yp.alwaysValidSchema)(e,t[r]))}o(Xv,"schemaProperties");Ze.schemaProperties=Xv;var zI,GI,BI,VI;function Qv({schemaCode:e,data:t,it:{gen:r,topSchemaRef:n,schemaPath:i,errorPath:s},it:a},f,p,d){let l=d?(0,nt._)(zI||(zI=h(["",", ",", ","",""])),e,t,n,i):t,m=[[Qn.default.instancePath,(0,nt.strConcat)(Qn.default.instancePath,s)],[Qn.default.parentData,a.parentData],[Qn.default.parentDataProperty,a.parentDataProperty],[Qn.default.rootData,Qn.default.rootData]];a.opts.dynamicRef&&m.push([Qn.default.dynamicAnchors,Qn.default.dynamicAnchors]);let g=(0,nt._)(GI||(GI=h(["",", ",""])),l,r.object(...m));return p!==nt.nil?(0,nt._)(BI||(BI=h(["",".call(",", ",")"])),f,p,g):(0,nt._)(VI||(VI=h(["","(",")"])),f,g)}o(Qv,"callValidateCode");Ze.callValidateCode=Qv;var WI,eA=(0,nt._)(WI||(WI=h(["new RegExp"]))),HI;function tA({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,nt._)(HI||(HI=h(["","(",", ",")"])),i.code==="new RegExp"?eA:(0,Wv.useFunc)(e,i),r,n)})}o(tA,"usePattern");Ze.usePattern=tA;var ZI;function rA(e){let{gen:t,data:r,keyword:n,it:i}=e,s=t.name("valid");if(i.allErrors){let f=t.let("valid",!0);return a(()=>t.assign(f,!1)),f}return t.var(s,!0),a(()=>t.break()),s;function a(f){let p=t.const("len",(0,nt._)(ZI||(ZI=h(["",".length"])),r));t.forRange("i",0,p,d=>{e.subschema({keyword:n,dataProp:d,dataPropType:Yp.Type.Num},s),t.if((0,nt.not)(s),f)})}o(a,"validateItems")}o(rA,"validateArray");Ze.validateArray=rA;var JI;function nA(e){let{gen:t,schema:r,keyword:n,it:i}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(r.some(p=>(0,Yp.alwaysValidSchema)(i,p))&&!i.opts.unevaluated)return;let a=t.let("valid",!1),f=t.name("_valid");t.block(()=>r.forEach((p,d)=>{let l=e.subschema({keyword:n,schemaProp:d,compositeRule:!0},f);t.assign(a,(0,nt._)(JI||(JI=h([""," || ",""])),a,f)),e.mergeValidEvaluated(l,f)||t.if((0,nt.not)(a))})),e.result(a,()=>e.reset(),()=>e.error(!0))}o(nA,"validateUnion");Ze.validateUnion=nA});var px=G(rn=>{"use strict";c();Object.defineProperty(rn,"__esModule",{value:!0});rn.validateKeywordUsage=rn.validSchemaType=rn.funcKeywordCode=rn.macroKeywordCode=void 0;var Xt=me(),Oo=Tn(),oA=$r(),iA=ms();function sA(e,t){let{gen:r,keyword:n,schema:i,parentSchema:s,it:a}=e,f=t.macro.call(a.self,i,s,a),p=ux(r,n,f);a.opts.validateSchema!==!1&&a.self.validateSchema(f,!0);let d=r.name("valid");e.subschema({schema:f,schemaPath:Xt.nil,errSchemaPath:"".concat(a.errSchemaPath,"/").concat(n),topSchemaRef:p,compositeRule:!0},d),e.pass(d,()=>e.error(!0))}o(sA,"macroKeywordCode");rn.macroKeywordCode=sA;var ex,tx,rx,nx,ox,ix;function aA(e,t){var r;let{gen:n,keyword:i,schema:s,parentSchema:a,$data:f,it:p}=e;fA(p,t);let d=!f&&t.compile?t.compile.call(p.self,s,a,p):t.validate,l=ux(n,i,d),m=n.let("valid");e.block$data(m,g),e.ok((r=t.valid)!==null&&r!==void 0?r:m);function g(){if(t.errors===!1)F(),t.modifying&&QI(e),w(()=>e.error());else{let O=t.async?b():P();t.modifying&&QI(e),w(()=>cA(e,O))}}o(g,"validateKeyword");function b(){let O=n.let("ruleErrs",null);return n.try(()=>F((0,Xt._)(ex||(ex=h(["await "])))),N=>n.assign(m,!1).if((0,Xt._)(tx||(tx=h([""," instanceof ",""])),N,p.ValidationError),()=>n.assign(O,(0,Xt._)(rx||(rx=h(["",".errors"])),N)),()=>n.throw(N))),O}o(b,"validateAsync");function P(){let O=(0,Xt._)(nx||(nx=h(["",".errors"])),l);return n.assign(O,null),F(Xt.nil),O}o(P,"validateSync");function F(O=t.async?(0,Xt._)(ox||(ox=h(["await "]))):Xt.nil){let N=p.opts.passContext?Oo.default.this:Oo.default.self,A=!("compile"in t&&!f||t.schema===!1);n.assign(m,(0,Xt._)(ix||(ix=h(["","",""])),O,(0,oA.callValidateCode)(e,l,N,A)),t.modifying)}o(F,"assignValid");function w(O){var N;n.if((0,Xt.not)((N=t.valid)!==null&&N!==void 0?N:m),O)}o(w,"reportErrs")}o(aA,"funcKeywordCode");rn.funcKeywordCode=aA;var sx;function QI(e){let{gen:t,data:r,it:n}=e;t.if(n.parentData,()=>t.assign(r,(0,Xt._)(sx||(sx=h(["","[","]"])),n.parentData,n.parentDataProperty)))}o(QI,"modifyData");var ax,cx,fx;function cA(e,t){let{gen:r}=e;r.if((0,Xt._)(ax||(ax=h(["Array.isArray(",")"])),t),()=>{r.assign(Oo.default.vErrors,(0,Xt._)(cx||(cx=h([""," === null ? "," : ",".concat(",")"])),Oo.default.vErrors,t,Oo.default.vErrors,t)).assign(Oo.default.errors,(0,Xt._)(fx||(fx=h(["",".length"])),Oo.default.vErrors)),(0,iA.extendErrors)(e)},()=>e.error())}o(cA,"addErrs");function fA({schemaEnv:e},t){if(t.async&&!e.$async)throw new Error("async keyword in sync schema")}o(fA,"checkAsyncKeyword");function ux(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,Xt.stringify)(r)})}o(ux,"useKeyword");function uA(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(uA,"validSchemaType");rn.validSchemaType=uA;function pA({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(f=>!Object.prototype.hasOwnProperty.call(e,f)))throw new Error("parent schema must have dependencies of ".concat(s,": ").concat(a.join(",")));if(i.validateSchema&&!i.validateSchema(e[s])){let p='keyword "'.concat(s,'" value is invalid at path "').concat(n,'": ')+r.errorsText(i.validateSchema.errors);if(t.validateSchema==="log")r.logger.error(p);else throw new Error(p)}}o(pA,"validateKeywordUsage");rn.validateKeywordUsage=pA});var Ix=G(eo=>{"use strict";c();Object.defineProperty(eo,"__esModule",{value:!0});eo.extendSubschemaMode=eo.extendSubschemaData=eo.getSubschema=void 0;var nn=me(),gx=Le(),lx,dx;function lA(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 f=e.schema[t];return r===void 0?{schema:f,schemaPath:(0,nn._)(lx||(lx=h(["","",""])),e.schemaPath,(0,nn.getProperty)(t)),errSchemaPath:"".concat(e.errSchemaPath,"/").concat(t)}:{schema:f[r],schemaPath:(0,nn._)(dx||(dx=h(["","","",""])),e.schemaPath,(0,nn.getProperty)(t),(0,nn.getProperty)(r)),errSchemaPath:"".concat(e.errSchemaPath,"/").concat(t,"/").concat((0,gx.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(lA,"getSubschema");eo.getSubschema=lA;var mx,yx,hx;function dA(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:f}=t;if(r!==void 0){let{errorPath:d,dataPathArr:l,opts:m}=t,g=f.let("data",(0,nn._)(mx||(mx=h(["","",""])),t.data,(0,nn.getProperty)(r)),!0);p(g),e.errorPath=(0,nn.str)(yx||(yx=h(["","",""])),d,(0,gx.getErrorPath)(r,n,m.jsPropertySyntax)),e.parentDataProperty=(0,nn._)(hx||(hx=h(["",""])),r),e.dataPathArr=[...l,e.parentDataProperty]}if(i!==void 0){let d=i instanceof nn.Name?i:f.let("data",i,!0);p(d),a!==void 0&&(e.propertyName=a)}s&&(e.dataTypes=s);function p(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(p,"dataContextProps")}o(dA,"extendSubschemaData");eo.extendSubschemaData=dA;function mA(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(mA,"extendSubschemaMode");eo.extendSubschemaMode=mA});var el=G((Q4,xx)=>{"use strict";c();xx.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 $x=G((rz,bx)=>{"use strict";c();var to=bx.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(){};tc(t,n,i,e,"",e)};to.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};to.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};to.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};to.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 tc(e,t,r,n,i,s,a,f,p,d){if(n&&typeof n=="object"&&!Array.isArray(n)){t(n,i,s,a,f,p,d);for(var l in n){var m=n[l];if(Array.isArray(m)){if(l in to.arrayKeywords)for(var g=0;g<m.length;g++)tc(e,t,r,m[g],i+"/"+l+"/"+g,s,i,l,n,g)}else if(l in to.propsKeywords){if(m&&typeof m=="object")for(var b in m)tc(e,t,r,m[b],i+"/"+l+"/"+yA(b),s,i,l,n,b)}else(l in to.keywords||e.allKeys&&!(l in to.skipKeywords))&&tc(e,t,r,m,i+"/"+l,s,i,l,n)}r(n,i,s,a,f,p,d)}}o(tc,"_traverse");function yA(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}o(yA,"escapeJsonPtr")});var hs=G(sr=>{"use strict";c();Object.defineProperty(sr,"__esModule",{value:!0});sr.getSchemaRefs=sr.resolveUrl=sr.normalizeId=sr._getFullPath=sr.getFullPath=sr.inlineRef=void 0;var hA=Le(),gA=el(),IA=$x(),xA=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function bA(e,t=!0){return typeof e=="boolean"?!0:t===!0?!tl(e):t?wx(e)<=t:!1}o(bA,"inlineRef");sr.inlineRef=bA;var $A=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function tl(e){for(let t in e){if($A.has(t))return!0;let r=e[t];if(Array.isArray(r)&&r.some(tl)||typeof r=="object"&&tl(r))return!0}return!1}o(tl,"hasRef");function wx(e){let t=0;for(let r in e){if(r==="$ref")return 1/0;if(t++,!xA.has(r)&&(typeof e[r]=="object"&&(0,hA.eachItem)(e[r],n=>t+=wx(n)),t===1/0))return 1/0}return t}o(wx,"countKeys");function Px(e,t="",r){r!==!1&&(t=ii(t));let n=e.parse(t);return Ox(e,n)}o(Px,"getFullPath");sr.getFullPath=Px;function Ox(e,t){return e.serialize(t).split("#")[0]+"#"}o(Ox,"_getFullPath");sr._getFullPath=Ox;var wA=/#\/?$/;function ii(e){return e?e.replace(wA,""):""}o(ii,"normalizeId");sr.normalizeId=ii;function PA(e,t,r){return r=ii(r),e.resolve(t,r)}o(PA,"resolveUrl");sr.resolveUrl=PA;var OA=/^[a-z_][-a-z0-9._]*$/i;function FA(e,t){if(typeof e=="boolean")return{};let{schemaId:r,uriResolver:n}=this.opts,i=ii(e[r]||t),s={"":i},a=Px(n,i,!1),f={},p=new Set;return IA(e,{allKeys:!0},(m,g,b,P)=>{if(P===void 0)return;let F=a+g,w=s[P];typeof m[r]=="string"&&(w=O.call(this,m[r])),N.call(this,m.$anchor),N.call(this,m.$dynamicAnchor),s[g]=w;function O(A){let k=this.opts.uriResolver.resolve;if(A=ii(w?k(w,A):A),p.has(A))throw l(A);p.add(A);let R=this.refs[A];return typeof R=="string"&&(R=this.refs[R]),typeof R=="object"?d(m,R.schema,A):A!==ii(F)&&(A[0]==="#"?(d(m,f[A],A),f[A]=m):this.refs[A]=F),A}o(O,"addRef");function N(A){if(typeof A=="string"){if(!OA.test(A))throw new Error('invalid anchor "'.concat(A,'"'));O.call(this,"#".concat(A))}}o(N,"addAnchor")}),f;function d(m,g,b){if(g!==void 0&&!gA(m,g))throw l(b)}o(d,"checkAmbiguosRef");function l(m){return new Error('reference "'.concat(m,'" resolves to more than one schema'))}o(l,"ambiguos")}o(FA,"getSchemaRefs");sr.getSchemaRefs=FA});var xs=G(ro=>{"use strict";c();Object.defineProperty(ro,"__esModule",{value:!0});ro.getData=ro.KeywordCxt=ro.validateFunctionCode=void 0;var mb=Bg(),Fx=ys(),nl=Wp(),rc=ys(),SA=RI(),Is=px(),rl=Ix(),Q=me(),fe=Tn(),EA=hs(),vn=Le(),gs=ms();function TA(e){if(gb(e)&&(Ib(e),hb(e))){jA(e);return}yb(e,()=>(0,mb.topBoolOrEmptySchema)(e))}o(TA,"validateFunctionCode");ro.validateFunctionCode=TA;var vx,Ax,jx;function yb({gen:e,validateName:t,schema:r,schemaEnv:n,opts:i},s){i.code.es5?e.func(t,(0,Q._)(vx||(vx=h(["",", ",""])),fe.default.data,fe.default.valCxt),n.$async,()=>{e.code((0,Q._)(Ax||(Ax=h(['"use strict"; ',""])),Sx(r,i))),AA(e,i),e.code(s)}):e.func(t,(0,Q._)(jx||(jx=h(["",", ",""])),fe.default.data,vA(i)),n.$async,()=>e.code(Sx(r,i)).code(s))}o(yb,"validateFunction");var kx,_x;function vA(e){return(0,Q._)(_x||(_x=h(["{",'="", ',", ",", ","=","","}={}"])),fe.default.instancePath,fe.default.parentData,fe.default.parentDataProperty,fe.default.rootData,fe.default.data,e.dynamicRef?(0,Q._)(kx||(kx=h([", ","={}"])),fe.default.dynamicAnchors):Q.nil)}o(vA,"destructureValCxt");var Nx,Rx,Cx,Mx,Lx,Ux,Dx,qx,Kx;function AA(e,t){e.if(fe.default.valCxt,()=>{e.var(fe.default.instancePath,(0,Q._)(Nx||(Nx=h(["",".",""])),fe.default.valCxt,fe.default.instancePath)),e.var(fe.default.parentData,(0,Q._)(Rx||(Rx=h(["",".",""])),fe.default.valCxt,fe.default.parentData)),e.var(fe.default.parentDataProperty,(0,Q._)(Cx||(Cx=h(["",".",""])),fe.default.valCxt,fe.default.parentDataProperty)),e.var(fe.default.rootData,(0,Q._)(Mx||(Mx=h(["",".",""])),fe.default.valCxt,fe.default.rootData)),t.dynamicRef&&e.var(fe.default.dynamicAnchors,(0,Q._)(Lx||(Lx=h(["",".",""])),fe.default.valCxt,fe.default.dynamicAnchors))},()=>{e.var(fe.default.instancePath,(0,Q._)(Ux||(Ux=h(['""'])))),e.var(fe.default.parentData,(0,Q._)(Dx||(Dx=h(["undefined"])))),e.var(fe.default.parentDataProperty,(0,Q._)(qx||(qx=h(["undefined"])))),e.var(fe.default.rootData,fe.default.data),t.dynamicRef&&e.var(fe.default.dynamicAnchors,(0,Q._)(Kx||(Kx=h(["{}"]))))})}o(AA,"destructureValCxtES5");function jA(e){let{schema:t,opts:r,gen:n}=e;yb(e,()=>{r.$comment&&t.$comment&&bb(e),CA(e),n.let(fe.default.vErrors,null),n.let(fe.default.errors,0),r.unevaluated&&kA(e),xb(e),UA(e)})}o(jA,"topSchemaObjCode");var zx,Gx,Bx,Vx,Wx,Hx,Zx;function kA(e){let{gen:t,validateName:r}=e;e.evaluated=t.const("evaluated",(0,Q._)(zx||(zx=h(["",".evaluated"])),r)),t.if((0,Q._)(Gx||(Gx=h(["",".dynamicProps"])),e.evaluated),()=>t.assign((0,Q._)(Bx||(Bx=h(["",".props"])),e.evaluated),(0,Q._)(Vx||(Vx=h(["undefined"]))))),t.if((0,Q._)(Wx||(Wx=h(["",".dynamicItems"])),e.evaluated),()=>t.assign((0,Q._)(Hx||(Hx=h(["",".items"])),e.evaluated),(0,Q._)(Zx||(Zx=h(["undefined"])))))}o(kA,"resetEvaluated");var Jx;function Sx(e,t){let r=typeof e=="object"&&e[t.schemaId];return r&&(t.code.source||t.code.process)?(0,Q._)(Jx||(Jx=h(["/*# sourceURL="," */"])),r):Q.nil}o(Sx,"funcSourceUrl");function _A(e,t){if(gb(e)&&(Ib(e),hb(e))){NA(e,t);return}(0,mb.boolOrEmptySchema)(e,t)}o(_A,"subschemaCode");function hb({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(hb,"schemaCxtHasRules");function gb(e){return typeof e.schema!="boolean"}o(gb,"isSchemaObj");var Yx;function NA(e,t){let{schema:r,gen:n,opts:i}=e;i.$comment&&r.$comment&&bb(e),MA(e),LA(e);let s=n.const("_errs",fe.default.errors);xb(e,s),n.var(t,(0,Q._)(Yx||(Yx=h([""," === ",""])),s,fe.default.errors))}o(NA,"subSchemaObjCode");function Ib(e){(0,vn.checkUnknownRules)(e),RA(e)}o(Ib,"checkKeywords");function xb(e,t){if(e.opts.jtd)return Ex(e,[],!1,t);let r=(0,Fx.getSchemaTypes)(e.schema),n=(0,Fx.coerceAndCheckDataType)(e,r);Ex(e,r,!n,t)}o(xb,"typeAndKeywords");function RA(e){let{schema:t,errSchemaPath:r,opts:n,self:i}=e;t.$ref&&n.ignoreKeywordsWithRef&&(0,vn.schemaHasRulesButRef)(t,i.RULES)&&i.logger.warn('$ref: keywords ignored in schema at path "'.concat(r,'"'))}o(RA,"checkRefsAndKeywords");function CA(e){let{schema:t,opts:r}=e;t.default!==void 0&&r.useDefaults&&r.strictSchema&&(0,vn.checkStrictMode)(e,"default is ignored in the schema root")}o(CA,"checkNoDefault");function MA(e){let t=e.schema[e.opts.schemaId];t&&(e.baseId=(0,EA.resolveUrl)(e.opts.uriResolver,e.baseId,t))}o(MA,"updateContext");function LA(e){if(e.schema.$async&&!e.schemaEnv.$async)throw new Error("async schema in sync schema")}o(LA,"checkAsyncSchema");var Xx,Qx,eb;function bb({gen:e,schemaEnv:t,schema:r,errSchemaPath:n,opts:i}){let s=r.$comment;if(i.$comment===!0)e.code((0,Q._)(Xx||(Xx=h(["",".logger.log(",")"])),fe.default.self,s));else if(typeof i.$comment=="function"){let a=(0,Q.str)(Qx||(Qx=h(["","/$comment"])),n),f=e.scopeValue("root",{ref:t.root});e.code((0,Q._)(eb||(eb=h(["",".opts.$comment(",", ",", ",".schema)"])),fe.default.self,s,a,f))}}o(bb,"commentKeyword");var tb,rb,nb,ob;function UA(e){let{gen:t,schemaEnv:r,validateName:n,ValidationError:i,opts:s}=e;r.$async?t.if((0,Q._)(tb||(tb=h([""," === 0"])),fe.default.errors),()=>t.return(fe.default.data),()=>t.throw((0,Q._)(rb||(rb=h(["new ","(",")"])),i,fe.default.vErrors))):(t.assign((0,Q._)(nb||(nb=h(["",".errors"])),n),fe.default.vErrors),s.unevaluated&&DA(e),t.return((0,Q._)(ob||(ob=h([""," === 0"])),fe.default.errors)))}o(UA,"returnResults");var ib,sb;function DA({gen:e,evaluated:t,props:r,items:n}){r instanceof Q.Name&&e.assign((0,Q._)(ib||(ib=h(["",".props"])),t),r),n instanceof Q.Name&&e.assign((0,Q._)(sb||(sb=h(["",".items"])),t),n)}o(DA,"assignEvaluated");var ab;function Ex(e,t,r,n){let{gen:i,schema:s,data:a,allErrors:f,opts:p,self:d}=e,{RULES:l}=d;if(s.$ref&&(p.ignoreKeywordsWithRef||!(0,vn.schemaHasRulesButRef)(s,l))){i.block(()=>wb(e,"$ref",l.all.$ref.definition));return}p.jtd||qA(e,t),i.block(()=>{for(let g of l.rules)m(g);m(l.post)});function m(g){(0,nl.shouldUseGroup)(s,g)&&(g.type?(i.if((0,rc.checkDataType)(g.type,a,p.strictNumbers)),Tx(e,g),t.length===1&&t[0]===g.type&&r&&(i.else(),(0,rc.reportTypeError)(e)),i.endIf()):Tx(e,g),f||i.if((0,Q._)(ab||(ab=h([""," === ",""])),fe.default.errors,n||0)))}o(m,"groupKeywords")}o(Ex,"schemaKeywords");function Tx(e,t){let{gen:r,schema:n,opts:{useDefaults:i}}=e;i&&(0,SA.assignDefaults)(e,t.type),r.block(()=>{for(let s of t.rules)(0,nl.shouldUseRule)(n,s)&&wb(e,s.keyword,s.definition,t.type)})}o(Tx,"iterateKeywords");function qA(e,t){e.schemaEnv.meta||!e.opts.strictTypes||(KA(e,t),e.opts.allowUnionTypes||zA(e,t),GA(e,e.dataTypes))}o(qA,"checkStrictTypes");function KA(e,t){if(t.length){if(!e.dataTypes.length){e.dataTypes=t;return}t.forEach(r=>{$b(e.dataTypes,r)||ol(e,'type "'.concat(r,'" not allowed by context "').concat(e.dataTypes.join(","),'"'))}),VA(e,t)}}o(KA,"checkContextTypes");function zA(e,t){t.length>1&&!(t.length===2&&t.includes("null"))&&ol(e,"use allowUnionTypes to allow union type keyword")}o(zA,"checkMultipleTypes");function GA(e,t){let r=e.self.RULES.all;for(let n in r){let i=r[n];if(typeof i=="object"&&(0,nl.shouldUseRule)(e.schema,i)){let{type:s}=i.definition;s.length&&!s.some(a=>BA(t,a))&&ol(e,'missing type "'.concat(s.join(","),'" for keyword "').concat(n,'"'))}}}o(GA,"checkKeywordTypes");function BA(e,t){return e.includes(t)||t==="number"&&e.includes("integer")}o(BA,"hasApplicableType");function $b(e,t){return e.includes(t)||t==="integer"&&e.includes("number")}o($b,"includesType");function VA(e,t){let r=[];for(let n of e.dataTypes)$b(t,n)?r.push(n):t.includes("integer")&&n==="number"&&r.push("integer");e.dataTypes=r}o(VA,"narrowSchemaTypes");function ol(e,t){let r=e.schemaEnv.baseId+e.errSchemaPath;t+=' at "'.concat(r,'" (strictTypes)'),(0,vn.checkStrictMode)(e,t,e.opts.strictTypes)}o(ol,"strictTypesError");var cb,fb,ub,pb,il=class il{constructor(t,r,n){if((0,Is.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,vn.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",Pb(this.$data,t));else if(this.schemaCode=this.schemaValue,!(0,Is.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",fe.default.errors))}result(t,r,n){this.failResult((0,Q.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,Q.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,Q._)(cb||(cb=h([""," !== undefined && (",")"])),r,(0,Q.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?gs.reportExtraError:gs.reportError)(this,this.def.error,r)}$dataError(){(0,gs.reportError)(this,this.def.$dataError||gs.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,gs.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=Q.nil){this.gen.block(()=>{this.check$data(t,n),r()})}check$data(t=Q.nil,r=Q.nil){if(!this.$data)return;let{gen:n,schemaCode:i,schemaType:s,def:a}=this;n.if((0,Q.or)((0,Q._)(fb||(fb=h([""," === undefined"])),i),r)),t!==Q.nil&&n.assign(t,!0),(s.length||a.validateSchema)&&(n.elseIf(this.invalid$data()),this.$dataError(),t!==Q.nil&&n.assign(t,!1)),n.else()}invalid$data(){let{gen:t,schemaCode:r,schemaType:n,def:i,it:s}=this;return(0,Q.or)(a(),f());function a(){if(n.length){if(!(r instanceof Q.Name))throw new Error("ajv implementation error");let p=Array.isArray(n)?n:[n];return(0,Q._)(ub||(ub=h(["",""])),(0,rc.checkDataTypes)(p,r,s.opts.strictNumbers,rc.DataType.Wrong))}return Q.nil}function f(){if(i.validateSchema){let p=t.scopeValue("validate$data",{ref:i.validateSchema});return(0,Q._)(pb||(pb=h(["!","(",")"])),p,r)}return Q.nil}}subschema(t,r){let n=(0,rl.getSubschema)(this.it,t);(0,rl.extendSubschemaData)(n,this.it,t),(0,rl.extendSubschemaMode)(n,t);let i=Y(S(S({},this.it),n),{items:void 0,props:void 0});return _A(i,r),i}mergeEvaluated(t,r){let{it:n,gen:i}=this;n.opts.unevaluated&&(n.props!==!0&&t.props!==void 0&&(n.props=vn.mergeEvaluated.props(i,t.props,n.props,r)),n.items!==!0&&t.items!==void 0&&(n.items=vn.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,Q.Name)),!0}};o(il,"KeywordCxt");var nc=il;ro.KeywordCxt=nc;function wb(e,t,r,n){let i=new nc(e,r,t);"code"in r?r.code(i,n):i.$data&&r.validate?(0,Is.funcKeywordCode)(i,r):"macro"in r?(0,Is.macroKeywordCode)(i,r):(r.compile||r.validate)&&(0,Is.funcKeywordCode)(i,r)}o(wb,"keywordCode");var WA=/^\/(?:[^~]|~0|~1)*$/,HA=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/,lb,db;function Pb(e,{dataLevel:t,dataNames:r,dataPathArr:n}){let i,s;if(e==="")return fe.default.rootData;if(e[0]==="/"){if(!WA.test(e))throw new Error("Invalid JSON-pointer: ".concat(e));i=e,s=fe.default.rootData}else{let d=HA.exec(e);if(!d)throw new Error("Invalid JSON-pointer: ".concat(e));let l=+d[1];if(i=d[2],i==="#"){if(l>=t)throw new Error(p("property/index",l));return n[t-l]}if(l>t)throw new Error(p("data",l));if(s=r[t-l],!i)return s}let a=s,f=i.split("/");for(let d of f)d&&(s=(0,Q._)(lb||(lb=h(["","",""])),s,(0,Q.getProperty)((0,vn.unescapeJsonPointer)(d))),a=(0,Q._)(db||(db=h([""," && ",""])),a,s));return a;function p(d,l){return"Cannot access ".concat(d," ").concat(l," levels up, current level is ").concat(t)}}o(Pb,"getData");ro.getData=Pb});var oc=G(al=>{"use strict";c();Object.defineProperty(al,"__esModule",{value:!0});var cl=class cl extends Error{constructor(t){super("validation failed"),this.errors=t,this.ajv=this.validation=!0}};o(cl,"ValidationError");var sl=cl;al.default=sl});var bs=G(pl=>{"use strict";c();Object.defineProperty(pl,"__esModule",{value:!0});var fl=hs(),ll=class ll extends Error{constructor(t,r,n,i){super(i||"can't resolve reference ".concat(n," from id ").concat(r)),this.missingRef=(0,fl.resolveUrl)(t,r,n),this.missingSchema=(0,fl.normalizeId)((0,fl.getFullPath)(t,this.missingRef))}};o(ll,"MissingRefError");var ul=ll;pl.default=ul});var sc=G(wr=>{"use strict";c();Object.defineProperty(wr,"__esModule",{value:!0});wr.resolveSchema=wr.getCompilingSchema=wr.resolveRef=wr.compileSchema=wr.SchemaEnv=void 0;var qr=me(),ZA=oc(),Fo=Tn(),Kr=hs(),Ob=Le(),JA=xs(),yl=class yl{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,Kr.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(yl,"SchemaEnv");var si=yl;wr.SchemaEnv=si;var Fb,Sb;function ml(e){let t=Eb.call(this,e);if(t)return t;let r=(0,Kr.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:n,lines:i}=this.opts.code,{ownProperties:s}=this.opts,a=new qr.CodeGen(this.scope,{es5:n,lines:i,ownProperties:s}),f;e.$async&&(f=a.scopeValue("Error",{ref:ZA.default,code:(0,qr._)(Fb||(Fb=h(['require("ajv/dist/runtime/validation_error").default'])))}));let p=a.scopeName("validate");e.validateName=p;let d={gen:a,allErrors:this.opts.allErrors,data:Fo.default.data,parentData:Fo.default.parentData,parentDataProperty:Fo.default.parentDataProperty,dataNames:[Fo.default.data],dataPathArr:[qr.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:a.scopeValue("schema",this.opts.code.source===!0?{ref:e.schema,code:(0,qr.stringify)(e.schema)}:{ref:e.schema}),validateName:p,ValidationError:f,schema:e.schema,schemaEnv:e,rootId:r,baseId:e.baseId||r,schemaPath:qr.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,qr._)(Sb||(Sb=h(['""']))),opts:this.opts,self:this},l;try{this._compilations.add(e),(0,JA.validateFunctionCode)(d),a.optimize(this.opts.code.optimize);let m=a.toString();l="".concat(a.scopeRefs(Fo.default.scope),"return ").concat(m),this.opts.code.process&&(l=this.opts.code.process(l,e));let b=new Function("".concat(Fo.default.self),"".concat(Fo.default.scope),l)(this,this.scope.get());if(this.scope.value(p,{ref:b}),b.errors=null,b.schema=e.schema,b.schemaEnv=e,e.$async&&(b.$async=!0),this.opts.code.source===!0&&(b.source={validateName:p,validateCode:m,scopeValues:a._values}),this.opts.unevaluated){let{props:P,items:F}=d;b.evaluated={props:P instanceof qr.Name?void 0:P,items:F instanceof qr.Name?void 0:F,dynamicProps:P instanceof qr.Name,dynamicItems:F instanceof qr.Name},b.source&&(b.source.evaluated=(0,qr.stringify)(b.evaluated))}return e.validate=b,e}catch(m){throw delete e.validate,delete e.validateName,l&&this.logger.error("Error compiling schema, function code:",l),m}finally{this._compilations.delete(e)}}o(ml,"compileSchema");wr.compileSchema=ml;function YA(e,t,r){var n;r=(0,Kr.resolveUrl)(this.opts.uriResolver,t,r);let i=e.refs[r];if(i)return i;let s=ej.call(this,e,r);if(s===void 0){let a=(n=e.localRefs)===null||n===void 0?void 0:n[r],{schemaId:f}=this.opts;a&&(s=new si({schema:a,schemaId:f,root:e,baseId:t}))}if(s!==void 0)return e.refs[r]=XA.call(this,s)}o(YA,"resolveRef");wr.resolveRef=YA;function XA(e){return(0,Kr.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:ml.call(this,e)}o(XA,"inlineOrCompile");function Eb(e){for(let t of this._compilations)if(QA(t,e))return t}o(Eb,"getCompilingSchema");wr.getCompilingSchema=Eb;function QA(e,t){return e.schema===t.schema&&e.root===t.root&&e.baseId===t.baseId}o(QA,"sameSchemaEnv");function ej(e,t){let r;for(;typeof(r=this.refs[t])=="string";)t=r;return r||this.schemas[t]||ic.call(this,e,t)}o(ej,"resolve");function ic(e,t){let r=this.opts.uriResolver.parse(t),n=(0,Kr._getFullPath)(this.opts.uriResolver,r),i=(0,Kr.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&n===i)return dl.call(this,r,e);let s=(0,Kr.normalizeId)(n),a=this.refs[s]||this.schemas[s];if(typeof a=="string"){let f=ic.call(this,e,a);return typeof(f==null?void 0:f.schema)!="object"?void 0:dl.call(this,r,f)}if(typeof(a==null?void 0:a.schema)=="object"){if(a.validate||ml.call(this,a),s===(0,Kr.normalizeId)(t)){let{schema:f}=a,{schemaId:p}=this.opts,d=f[p];return d&&(i=(0,Kr.resolveUrl)(this.opts.uriResolver,i,d)),new si({schema:f,schemaId:p,root:e,baseId:i})}return dl.call(this,r,a)}}o(ic,"resolveSchema");wr.resolveSchema=ic;var tj=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function dl(e,{baseId:t,schema:r,root:n}){var i;if(((i=e.fragment)===null||i===void 0?void 0:i[0])!=="/")return;for(let f of e.fragment.slice(1).split("/")){if(typeof r=="boolean")return;let p=r[(0,Ob.unescapeFragment)(f)];if(p===void 0)return;r=p;let d=typeof r=="object"&&r[this.opts.schemaId];!tj.has(f)&&d&&(t=(0,Kr.resolveUrl)(this.opts.uriResolver,t,d))}let s;if(typeof r!="boolean"&&r.$ref&&!(0,Ob.schemaHasRulesButRef)(r,this.RULES)){let f=(0,Kr.resolveUrl)(this.opts.uriResolver,t,r.$ref);s=ic.call(this,n,f)}let{schemaId:a}=this.opts;if(s=s||new si({schema:r,schemaId:a,root:n,baseId:t}),s.schema!==s.root.schema)return s}o(dl,"getJsonPointer")});var Tb=G((bz,rj)=>{rj.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 Ab=G(($z,vb)=>{"use strict";c();var nj={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};vb.exports={HEX:nj}});var Lb=G((Pz,Mb)=>{"use strict";c();var{HEX:oj}=Ab(),ij=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 Nb(e){if(Cb(e,".")<3)return{host:e,isIPV4:!1};let t=e.match(ij)||[],[r]=t;return r?{host:aj(r,"."),isIPV4:!0}:{host:e,isIPV4:!1}}o(Nb,"normalizeIPv4");function hl(e,t=!1){let r="",n=!0;for(let i of e){if(oj[i]===void 0)return;i!=="0"&&n===!0&&(n=!1),n||(r+=i)}return t&&r.length===0&&(r="0"),r}o(hl,"stringArrayToHexStripped");function sj(e){let t=0,r={error:!1,address:"",zone:""},n=[],i=[],s=!1,a=!1,f=!1;function p(){if(i.length){if(s===!1){let d=hl(i);if(d!==void 0)n.push(d);else return r.error=!0,!1}i.length=0}return!0}o(p,"consume");for(let d=0;d<e.length;d++){let l=e[d];if(!(l==="["||l==="]"))if(l===":"){if(a===!0&&(f=!0),!p())break;if(t++,n.push(":"),t>7){r.error=!0;break}d-1>=0&&e[d-1]===":"&&(a=!0);continue}else if(l==="%"){if(!p())break;s=!0}else{i.push(l);continue}}return i.length&&(s?r.zone=i.join(""):f?n.push(i.join("")):n.push(hl(i))),r.address=n.join(""),r}o(sj,"getIPV6");function Rb(e){if(Cb(e,":")<2)return{host:e,isIPV6:!1};let t=sj(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(Rb,"normalizeIPv6");function aj(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(aj,"stripLeadingZeros");function Cb(e,t){let r=0;for(let n=0;n<e.length;n++)e[n]===t&&r++;return r}o(Cb,"findToken");var jb=new RegExp("^\\.\\.?\\/","u"),kb=new RegExp("^\\/\\.(?:\\/|$)","u"),_b=new RegExp("^\\/\\.\\.(?:\\/|$)","u"),cj=new RegExp("^\\/?(?:.|\\n)*?(?=\\/|$)","u");function fj(e){let t=[];for(;e.length;)if(e.match(jb))e=e.replace(jb,"");else if(e.match(kb))e=e.replace(kb,"/");else if(e.match(_b))e=e.replace(_b,"/"),t.pop();else if(e==="."||e==="..")e="";else{let r=e.match(cj);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(fj,"removeDotSegments");function uj(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(uj,"normalizeComponentEncoding");function pj(e){let t=[];if(e.userinfo!==void 0&&(t.push(e.userinfo),t.push("@")),e.host!==void 0){let r=unescape(e.host),n=Nb(r);if(n.isIPV4)r=n.host;else{let i=Rb(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(pj,"recomposeAuthority");Mb.exports={recomposeAuthority:pj,normalizeComponentEncoding:uj,removeDotSegments:fj,normalizeIPv4:Nb,normalizeIPv6:Rb,stringArrayToHexStripped:hl}});var Gb=G((Sz,zb)=>{"use strict";c();var lj=new RegExp("^[\\da-f]{8}-[\\da-f]{4}-[\\da-f]{4}-[\\da-f]{4}-[\\da-f]{12}$","iu"),dj=new RegExp("([\\da-z][\\d\\-a-z]{0,31}):((?:[\\w!$'()*+,\\-.:;=@]|%[\\da-f]{2})+)","iu");function Ub(e){return typeof e.secure=="boolean"?e.secure:String(e.scheme).toLowerCase()==="wss"}o(Ub,"isSecure");function Db(e){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e}o(Db,"httpParse");function qb(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(qb,"httpSerialize");function mj(e){return e.secure=Ub(e),e.resourceName=(e.path||"/")+(e.query?"?"+e.query:""),e.path=void 0,e.query=void 0,e}o(mj,"wsParse");function yj(e){if((e.port===(Ub(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(yj,"wsSerialize");function hj(e,t){if(!e.path)return e.error="URN can not be parsed",e;let r=e.path.match(dj);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=gl[i];e.path=void 0,s&&(e=s.parse(e,t))}else e.error=e.error||"URN can not be parsed.";return e}o(hj,"urnParse");function gj(e,t){let r=t.scheme||e.scheme||"urn",n=e.nid.toLowerCase(),i="".concat(r,":").concat(t.nid||n),s=gl[i];s&&(e=s.serialize(e,t));let a=e,f=e.nss;return a.path="".concat(n||t.nid,":").concat(f),t.skipEscape=!0,a}o(gj,"urnSerialize");function Ij(e,t){let r=e;return r.uuid=r.nss,r.nss=void 0,!t.tolerant&&(!r.uuid||!lj.test(r.uuid))&&(r.error=r.error||"UUID is not valid."),r}o(Ij,"urnuuidParse");function xj(e){let t=e;return t.nss=(e.uuid||"").toLowerCase(),t}o(xj,"urnuuidSerialize");var Kb={scheme:"http",domainHost:!0,parse:Db,serialize:qb},bj={scheme:"https",domainHost:Kb.domainHost,parse:Db,serialize:qb},ac={scheme:"ws",domainHost:!0,parse:mj,serialize:yj},$j={scheme:"wss",domainHost:ac.domainHost,parse:ac.parse,serialize:ac.serialize},wj={scheme:"urn",parse:hj,serialize:gj,skipNormalize:!0},Pj={scheme:"urn:uuid",parse:Ij,serialize:xj,skipNormalize:!0},gl={http:Kb,https:bj,ws:ac,wss:$j,urn:wj,"urn:uuid":Pj};zb.exports=gl});var Vb=G((vz,fc)=>{"use strict";c();var{normalizeIPv6:Oj,normalizeIPv4:Fj,removeDotSegments:$s,recomposeAuthority:Sj,normalizeComponentEncoding:cc}=Lb(),Il=Gb();function Ej(e,t){return typeof e=="string"?e=on(An(e,t),t):typeof e=="object"&&(e=An(on(e,t),t)),e}o(Ej,"normalize");function Tj(e,t,r){let n=Object.assign({scheme:"null"},r),i=Bb(An(e,n),An(t,n),n,!0);return on(i,Y(S({},n),{skipEscape:!0}))}o(Tj,"resolve");function Bb(e,t,r,n){let i={};return n||(e=An(on(e,r),r),t=An(on(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=$s(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=$s(t.path||""),i.query=t.query):(t.path?(t.path.charAt(0)==="/"?i.path=$s(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=$s(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(Bb,"resolveComponents");function vj(e,t,r){return typeof e=="string"?(e=unescape(e),e=on(cc(An(e,r),!0),Y(S({},r),{skipEscape:!0}))):typeof e=="object"&&(e=on(cc(e,!0),Y(S({},r),{skipEscape:!0}))),typeof t=="string"?(t=unescape(t),t=on(cc(An(t,r),!0),Y(S({},r),{skipEscape:!0}))):typeof t=="object"&&(t=on(cc(t,!0),Y(S({},r),{skipEscape:!0}))),e.toLowerCase()===t.toLowerCase()}o(vj,"equal");function on(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=Il[(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=Sj(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 f=r.path;!n.absolutePath&&(!s||!s.absolutePath)&&(f=$s(f)),a===void 0&&(f=f.replace(new RegExp("^\\/\\/","u"),"/%2F")),i.push(f)}return r.query!==void 0&&i.push("?",r.query),r.fragment!==void 0&&i.push("#",r.fragment),i.join("")}o(on,"serialize");var Aj=Array.from({length:127},(e,t)=>new RegExp("[^!\"$&'()*+,\\-.;=_`a-z{}~]","u").test(String.fromCharCode(t)));function jj(e){let t=0;for(let r=0,n=e.length;r<n;++r)if(t=e.charCodeAt(r),t>126||Aj[t])return!0;return!1}o(jj,"nonSimpleDomain");var kj=new RegExp("^(?:([^#/:?]+):)?(?:\\/\\/((?:([^#/?@]*)@)?(\\[[^#/?\\]]+\\]|[^#/:?]*)(?::(\\d*))?))?([^#?]*)(?:\\?([^#]*))?(?:#((?:.|[\\n\\r])*))?","u");function An(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(kj);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 p=Fj(n.host);if(p.isIPV4===!1){let d=Oj(p.host);n.host=d.host.toLowerCase(),s=d.isIPV6}else n.host=p.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 f=Il[(r.scheme||n.scheme||"").toLowerCase()];if(!r.unicodeSupport&&(!f||!f.unicodeSupport)&&n.host&&(r.domainHost||f&&f.domainHost)&&s===!1&&jj(n.host))try{n.host=URL.domainToASCII(n.host.toLowerCase())}catch(p){n.error=n.error||"Host's domain name can not be converted to ASCII: "+p}(!f||f&&!f.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)))),f&&f.parse&&f.parse(n,r)}else n.error=n.error||"URI can not be parsed.";return n}o(An,"parse");var xl={SCHEMES:Il,normalize:Ej,resolve:Tj,resolveComponents:Bb,equal:vj,serialize:on,parse:An};fc.exports=xl;fc.exports.default=xl;fc.exports.fastUri=xl});var Hb=G(bl=>{"use strict";c();Object.defineProperty(bl,"__esModule",{value:!0});var Wb=Vb();Wb.code='require("ajv/dist/runtime/uri").default';bl.default=Wb});var r0=G(kt=>{"use strict";c();Object.defineProperty(kt,"__esModule",{value:!0});kt.CodeGen=kt.Name=kt.nil=kt.stringify=kt.str=kt._=kt.KeywordCxt=void 0;var _j=xs();Object.defineProperty(kt,"KeywordCxt",{enumerable:!0,get:o(function(){return _j.KeywordCxt},"get")});var ai=me();Object.defineProperty(kt,"_",{enumerable:!0,get:o(function(){return ai._},"get")});Object.defineProperty(kt,"str",{enumerable:!0,get:o(function(){return ai.str},"get")});Object.defineProperty(kt,"stringify",{enumerable:!0,get:o(function(){return ai.stringify},"get")});Object.defineProperty(kt,"nil",{enumerable:!0,get:o(function(){return ai.nil},"get")});Object.defineProperty(kt,"Name",{enumerable:!0,get:o(function(){return ai.Name},"get")});Object.defineProperty(kt,"CodeGen",{enumerable:!0,get:o(function(){return ai.CodeGen},"get")});var Nj=oc(),Qb=bs(),Rj=Vp(),ws=sc(),Cj=me(),Ps=hs(),uc=ys(),wl=Le(),Zb=Tb(),Mj=Hb(),e0=o((e,t)=>new RegExp(e,t),"defaultRegExp");e0.code="new RegExp";var Lj=["removeAdditional","useDefaults","coerceTypes"],Uj=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),Dj={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."},qj={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},Jb=200;function Kj(e){var t,r,n,i,s,a,f,p,d,l,m,g,b,P,F,w,O,N,A,k,R,V,J,D,U;let ae=e.strict,se=(t=e.code)===null||t===void 0?void 0:t.optimize,M=se===!0||se===void 0?1:se||0,le=(n=(r=e.code)===null||r===void 0?void 0:r.regExp)!==null&&n!==void 0?n:e0,ce=(i=e.uriResolver)!==null&&i!==void 0?i:Mj.default;return{strictSchema:(a=(s=e.strictSchema)!==null&&s!==void 0?s:ae)!==null&&a!==void 0?a:!0,strictNumbers:(p=(f=e.strictNumbers)!==null&&f!==void 0?f:ae)!==null&&p!==void 0?p:!0,strictTypes:(l=(d=e.strictTypes)!==null&&d!==void 0?d:ae)!==null&&l!==void 0?l:"log",strictTuples:(g=(m=e.strictTuples)!==null&&m!==void 0?m:ae)!==null&&g!==void 0?g:"log",strictRequired:(P=(b=e.strictRequired)!==null&&b!==void 0?b:ae)!==null&&P!==void 0?P:!1,code:e.code?Y(S({},e.code),{optimize:M,regExp:le}):{optimize:M,regExp:le},loopRequired:(F=e.loopRequired)!==null&&F!==void 0?F:Jb,loopEnum:(w=e.loopEnum)!==null&&w!==void 0?w:Jb,meta:(O=e.meta)!==null&&O!==void 0?O:!0,messages:(N=e.messages)!==null&&N!==void 0?N:!0,inlineRefs:(A=e.inlineRefs)!==null&&A!==void 0?A:!0,schemaId:(k=e.schemaId)!==null&&k!==void 0?k:"$id",addUsedSchema:(R=e.addUsedSchema)!==null&&R!==void 0?R:!0,validateSchema:(V=e.validateSchema)!==null&&V!==void 0?V:!0,validateFormats:(J=e.validateFormats)!==null&&J!==void 0?J:!0,unicodeRegExp:(D=e.unicodeRegExp)!==null&&D!==void 0?D:!0,int32range:(U=e.int32range)!==null&&U!==void 0?U:!0,uriResolver:ce}}o(Kj,"requiredOptions");var Pl=class Pl{constructor(t={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,t=this.opts=S(S({},t),Kj(t));let{es5:r,lines:n}=this.opts.code;this.scope=new Cj.ValueScope({scope:{},prefixes:Uj,es5:r,lines:n}),this.logger=Hj(t.logger);let i=t.validateFormats;t.validateFormats=!1,this.RULES=(0,Rj.getRules)(),Yb.call(this,Dj,t,"NOT SUPPORTED"),Yb.call(this,qj,t,"DEPRECATED","warn"),this._metaOpts=Vj.call(this),t.formats&&Gj.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),t.keywords&&Bj.call(this,t.keywords),typeof t.meta=="object"&&this.addMetaSchema(t.meta),zj.call(this),t.validateFormats=i}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:t,meta:r,schemaId:n}=this.opts,i=Zb;n==="id"&&(i=S({},Zb),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(l,m){await s.call(this,l.$schema);let g=this._addSchema(l,m);return g.validate||a.call(this,g)}async function s(l){l&&!this.getSchema(l)&&await i.call(this,{$ref:l},!0)}async function a(l){try{return this._compileSchemaEnv(l)}catch(m){if(!(m instanceof Qb.default))throw m;return f.call(this,m),await p.call(this,m.missingSchema),a.call(this,l)}}function f({missingSchema:l,missingRef:m}){if(this.refs[l])throw new Error("AnySchema ".concat(l," is loaded but ").concat(m," cannot be resolved"))}async function p(l){let m=await d.call(this,l);this.refs[l]||await s.call(this,m.$schema),this.refs[l]||this.addSchema(m,l,r)}async function d(l){let m=this._loading[l];if(m)return m;try{return await(this._loading[l]=n(l))}finally{delete this._loading[l]}}}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,Ps.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=Xb.call(this,t))=="string";)t=r;if(r===void 0){let{schemaId:n}=this.opts,i=new ws.SchemaEnv({schema:{},schemaId:n});if(r=ws.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=Xb.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,Ps.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(Jj.call(this,n,r),!r)return(0,wl.eachItem)(n,s=>$l.call(this,s)),this;Xj.call(this,r);let i=Y(S({},r),{type:(0,uc.getJSONTypes)(r.type),schemaType:(0,uc.getJSONTypes)(r.schemaType)});return(0,wl.eachItem)(n,i.type.length===0?s=>$l.call(this,s,i):s=>i.type.forEach(a=>$l.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 f of s)a=a[f];for(let f in n){let p=n[f];if(typeof p!="object")continue;let{$data:d}=p.definition,l=a[f];d&&l&&(a[f]=t0(l))}}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:f}=this.opts;if(typeof t=="object")a=t[f];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 p=this._cache.get(t);if(p!==void 0)return p;n=(0,Ps.normalizeId)(a||n);let d=Ps.getSchemaRefs.call(this,t,n);return p=new ws.SchemaEnv({schema:t,schemaId:f,meta:r,baseId:n,localRefs:d}),this._cache.set(p.schema,p),s&&!n.startsWith("#")&&(n&&this._checkUnique(n),this.refs[n]=p),i&&this.validateSchema(t,!0),p}_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):ws.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{ws.compileSchema.call(this,t)}finally{this.opts=r}}};o(Pl,"Ajv");var Os=Pl;Os.ValidationError=Nj.default;Os.MissingRefError=Qb.default;kt.default=Os;function Yb(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(Yb,"checkOptions");function Xb(e){return e=(0,Ps.normalizeId)(e),this.schemas[e]||this.refs[e]}o(Xb,"getSchEnv");function zj(){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(zj,"addInitialSchemas");function Gj(){for(let e in this.opts.formats){let t=this.opts.formats[e];t&&this.addFormat(e,t)}}o(Gj,"addInitialFormats");function Bj(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(Bj,"addInitialKeywords");function Vj(){let e=S({},this.opts);for(let t of Lj)delete e[t];return e}o(Vj,"getMetaSchemaOptions");var Wj={log(){},warn(){},error(){}};function Hj(e){if(e===!1)return Wj;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(Hj,"getLogger");var Zj=/^[a-z_$][a-z0-9_$:-]*$/i;function Jj(e,t){let{RULES:r}=this;if((0,wl.eachItem)(e,n=>{if(r.keywords[n])throw new Error("Keyword ".concat(n," is already defined"));if(!Zj.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(Jj,"checkKeyword");function $l(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:p})=>p===r);if(a||(a={type:r,rules:[]},s.rules.push(a)),s.keywords[e]=!0,!t)return;let f={keyword:e,definition:Y(S({},t),{type:(0,uc.getJSONTypes)(t.type),schemaType:(0,uc.getJSONTypes)(t.schemaType)})};t.before?Yj.call(this,a,f,t.before):a.rules.push(f),s.all[e]=f,(n=t.implements)===null||n===void 0||n.forEach(p=>this.addKeyword(p))}o($l,"addRule");function Yj(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(Yj,"addBeforeRule");function Xj(e){let{metaSchema:t}=e;t!==void 0&&(e.$data&&this.opts.$data&&(t=t0(t)),e.validateSchema=this.compile(t,!0))}o(Xj,"keywordMetaschema");var Qj={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function t0(e){return{anyOf:[e,Qj]}}o(t0,"schemaOrData")});var n0=G(Ol=>{"use strict";c();Object.defineProperty(Ol,"__esModule",{value:!0});var ek={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};Ol.default=ek});var h0=G(So=>{"use strict";c();Object.defineProperty(So,"__esModule",{value:!0});So.callRef=So.getValidate=void 0;var tk=bs(),o0=$r(),ar=me(),ci=Tn(),i0=sc(),pc=Le(),s0,rk={keyword:"$ref",schemaType:"string",code(e){let{gen:t,schema:r,it:n}=e,{baseId:i,schemaEnv:s,validateName:a,opts:f,self:p}=n,{root:d}=s;if((r==="#"||r==="#/")&&i===d.baseId)return m();let l=i0.resolveRef.call(p,d,i,r);if(l===void 0)throw new tk.default(n.opts.uriResolver,i,r);if(l instanceof i0.SchemaEnv)return g(l);return b(l);function m(){if(s===d)return lc(e,a,s,s.$async);let P=t.scopeValue("root",{ref:d});return lc(e,(0,ar._)(s0||(s0=h(["",".validate"])),P),d,d.$async)}function g(P){let F=y0(e,P);lc(e,F,P,P.$async)}function b(P){let F=t.scopeValue("schema",f.code.source===!0?{ref:P,code:(0,ar.stringify)(P)}:{ref:P}),w=t.name("valid"),O=e.subschema({schema:P,dataTypes:[],schemaPath:ar.nil,topSchemaRef:F,errSchemaPath:r},w);e.mergeEvaluated(O),e.ok(w)}}},a0;function y0(e,t){let{gen:r}=e;return t.validate?r.scopeValue("validate",{ref:t.validate}):(0,ar._)(a0||(a0=h(["",".validate"])),r.scopeValue("wrapper",{ref:t}))}o(y0,"getValidate");So.getValidate=y0;var c0,f0,u0,p0,l0,d0,m0;function lc(e,t,r,n){let{gen:i,it:s}=e,{allErrors:a,schemaEnv:f,opts:p}=s,d=p.passContext?ci.default.this:ar.nil;n?l():m();function l(){if(!f.$async)throw new Error("async schema referenced by sync schema");let P=i.let("valid");i.try(()=>{i.code((0,ar._)(c0||(c0=h(["await ",""])),(0,o0.callValidateCode)(e,t,d))),b(t),a||i.assign(P,!0)},F=>{i.if((0,ar._)(f0||(f0=h(["!("," instanceof ",")"])),F,s.ValidationError),()=>i.throw(F)),g(F),a||i.assign(P,!1)}),e.ok(P)}o(l,"callAsyncRef");function m(){e.result((0,o0.callValidateCode)(e,t,d),()=>b(t),()=>g(t))}o(m,"callSyncRef");function g(P){let F=(0,ar._)(u0||(u0=h(["",".errors"])),P);i.assign(ci.default.vErrors,(0,ar._)(p0||(p0=h([""," === null ? "," : ",".concat(",")"])),ci.default.vErrors,F,ci.default.vErrors,F)),i.assign(ci.default.errors,(0,ar._)(l0||(l0=h(["",".length"])),ci.default.vErrors))}o(g,"addErrorsFrom");function b(P){var F;if(!s.opts.unevaluated)return;let w=(F=r==null?void 0:r.validate)===null||F===void 0?void 0:F.evaluated;if(s.props!==!0)if(w&&!w.dynamicProps)w.props!==void 0&&(s.props=pc.mergeEvaluated.props(i,w.props,s.props));else{let O=i.var("props",(0,ar._)(d0||(d0=h(["",".evaluated.props"])),P));s.props=pc.mergeEvaluated.props(i,O,s.props,ar.Name)}if(s.items!==!0)if(w&&!w.dynamicItems)w.items!==void 0&&(s.items=pc.mergeEvaluated.items(i,w.items,s.items));else{let O=i.var("items",(0,ar._)(m0||(m0=h(["",".evaluated.items"])),P));s.items=pc.mergeEvaluated.items(i,O,s.items,ar.Name)}}o(b,"addEvaluatedFrom")}o(lc,"callRef");So.callRef=lc;So.default=rk});var g0=G(Fl=>{"use strict";c();Object.defineProperty(Fl,"__esModule",{value:!0});var nk=n0(),ok=h0(),ik=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",nk.default,ok.default];Fl.default=ik});var $0=G(Sl=>{"use strict";c();Object.defineProperty(Sl,"__esModule",{value:!0});var dc=me(),no=dc.operators,mc={maximum:{okStr:"<=",ok:no.LTE,fail:no.GT},minimum:{okStr:">=",ok:no.GTE,fail:no.LT},exclusiveMaximum:{okStr:"<",ok:no.LT,fail:no.GTE},exclusiveMinimum:{okStr:">",ok:no.GT,fail:no.LTE}},I0,x0,sk={message:o(({keyword:e,schemaCode:t})=>(0,dc.str)(I0||(I0=h(["must be "," ",""])),mc[e].okStr,t),"message"),params:o(({keyword:e,schemaCode:t})=>(0,dc._)(x0||(x0=h(["{comparison: ",", limit: ","}"])),mc[e].okStr,t),"params")},b0,ak={keyword:Object.keys(mc),type:"number",schemaType:"number",$data:!0,error:sk,code(e){let{keyword:t,data:r,schemaCode:n}=e;e.fail$data((0,dc._)(b0||(b0=h([""," "," "," || isNaN(",")"])),r,mc[t].fail,n,r))}};Sl.default=ak});var E0=G(El=>{"use strict";c();Object.defineProperty(El,"__esModule",{value:!0});var Fs=me(),w0,P0,ck={message:o(({schemaCode:e})=>(0,Fs.str)(w0||(w0=h(["must be multiple of ",""])),e),"message"),params:o(({schemaCode:e})=>(0,Fs._)(P0||(P0=h(["{multipleOf: ","}"])),e),"params")},O0,F0,S0,fk={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:ck,code(e){let{gen:t,data:r,schemaCode:n,it:i}=e,s=i.opts.multipleOfPrecision,a=t.let("res"),f=s?(0,Fs._)(O0||(O0=h(["Math.abs(Math.round(",") - ",") > 1e-",""])),a,a,s):(0,Fs._)(F0||(F0=h([""," !== parseInt(",")"])),a,a);e.fail$data((0,Fs._)(S0||(S0=h(["("," === 0 || ("," = ","/",", ","))"])),n,a,r,n,f))}};El.default=fk});var v0=G(Tl=>{"use strict";c();Object.defineProperty(Tl,"__esModule",{value:!0});function T0(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(T0,"ucs2length");Tl.default=T0;T0.code='require("ajv/dist/runtime/ucs2length").default'});var R0=G(vl=>{"use strict";c();Object.defineProperty(vl,"__esModule",{value:!0});var Eo=me(),uk=Le(),pk=v0(),A0,j0,lk={message({keyword:e,schemaCode:t}){let r=e==="maxLength"?"more":"fewer";return(0,Eo.str)(A0||(A0=h(["must NOT have "," than "," characters"])),r,t)},params:o(({schemaCode:e})=>(0,Eo._)(j0||(j0=h(["{limit: ","}"])),e),"params")},k0,_0,N0,dk={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:lk,code(e){let{keyword:t,data:r,schemaCode:n,it:i}=e,s=t==="maxLength"?Eo.operators.GT:Eo.operators.LT,a=i.opts.unicode===!1?(0,Eo._)(k0||(k0=h(["",".length"])),r):(0,Eo._)(_0||(_0=h(["","(",")"])),(0,uk.useFunc)(e.gen,pk.default),r);e.fail$data((0,Eo._)(N0||(N0=h([""," "," ",""])),a,s,n))}};vl.default=dk});var D0=G(Al=>{"use strict";c();Object.defineProperty(Al,"__esModule",{value:!0});var mk=$r(),yc=me(),C0,M0,yk={message:o(({schemaCode:e})=>(0,yc.str)(C0||(C0=h(['must match pattern "','"'])),e),"message"),params:o(({schemaCode:e})=>(0,yc._)(M0||(M0=h(["{pattern: ","}"])),e),"params")},L0,U0,hk={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:yk,code(e){let{data:t,$data:r,schema:n,schemaCode:i,it:s}=e,a=s.opts.unicodeRegExp?"u":"",f=r?(0,yc._)(L0||(L0=h(["(new RegExp(",", ","))"])),i,a):(0,mk.usePattern)(e,n);e.fail$data((0,yc._)(U0||(U0=h(["!",".test(",")"])),f,t))}};Al.default=hk});var G0=G(jl=>{"use strict";c();Object.defineProperty(jl,"__esModule",{value:!0});var Ss=me(),q0,K0,gk={message({keyword:e,schemaCode:t}){let r=e==="maxProperties"?"more":"fewer";return(0,Ss.str)(q0||(q0=h(["must NOT have "," than "," properties"])),r,t)},params:o(({schemaCode:e})=>(0,Ss._)(K0||(K0=h(["{limit: ","}"])),e),"params")},z0,Ik={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:gk,code(e){let{keyword:t,data:r,schemaCode:n}=e,i=t==="maxProperties"?Ss.operators.GT:Ss.operators.LT;e.fail$data((0,Ss._)(z0||(z0=h(["Object.keys(",").length "," ",""])),r,i,n))}};jl.default=Ik});var W0=G(kl=>{"use strict";c();Object.defineProperty(kl,"__esModule",{value:!0});var Es=$r(),Ts=me(),xk=Le(),B0,V0,bk={message:o(({params:{missingProperty:e}})=>(0,Ts.str)(B0||(B0=h(["must have required property '","'"])),e),"message"),params:o(({params:{missingProperty:e}})=>(0,Ts._)(V0||(V0=h(["{missingProperty: ","}"])),e),"params")},$k={keyword:"required",type:"object",schemaType:"array",$data:!0,error:bk,code(e){let{gen:t,schema:r,schemaCode:n,data:i,$data:s,it:a}=e,{opts:f}=a;if(!s&&r.length===0)return;let p=r.length>=f.loopRequired;if(a.allErrors?d():l(),f.strictRequired){let b=e.parentSchema.properties,{definedProperties:P}=e.it;for(let F of r)if((b==null?void 0:b[F])===void 0&&!P.has(F)){let w=a.schemaEnv.baseId+a.errSchemaPath,O='required property "'.concat(F,'" is not defined at "').concat(w,'" (strictRequired)');(0,xk.checkStrictMode)(a,O,a.opts.strictRequired)}}function d(){if(p||s)e.block$data(Ts.nil,m);else for(let b of r)(0,Es.checkReportMissingProp)(e,b)}o(d,"allErrorsMode");function l(){let b=t.let("missing");if(p||s){let P=t.let("valid",!0);e.block$data(P,()=>g(b,P)),e.ok(P)}else t.if((0,Es.checkMissingProp)(e,r,b)),(0,Es.reportMissingProp)(e,b),t.else()}o(l,"exitOnErrorMode");function m(){t.forOf("prop",n,b=>{e.setParams({missingProperty:b}),t.if((0,Es.noPropertyInData)(t,i,b,f.ownProperties),()=>e.error())})}o(m,"loopAllRequired");function g(b,P){e.setParams({missingProperty:b}),t.forOf(b,n,()=>{t.assign(P,(0,Es.propertyInData)(t,i,b,f.ownProperties)),t.if((0,Ts.not)(P),()=>{e.error(),t.break()})},Ts.nil)}o(g,"loopUntilMissing")}};kl.default=$k});var Y0=G(_l=>{"use strict";c();Object.defineProperty(_l,"__esModule",{value:!0});var vs=me(),H0,Z0,wk={message({keyword:e,schemaCode:t}){let r=e==="maxItems"?"more":"fewer";return(0,vs.str)(H0||(H0=h(["must NOT have "," than "," items"])),r,t)},params:o(({schemaCode:e})=>(0,vs._)(Z0||(Z0=h(["{limit: ","}"])),e),"params")},J0,Pk={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:wk,code(e){let{keyword:t,data:r,schemaCode:n}=e,i=t==="maxItems"?vs.operators.GT:vs.operators.LT;e.fail$data((0,vs._)(J0||(J0=h(["",".length "," ",""])),r,i,n))}};_l.default=Pk});var hc=G(Nl=>{"use strict";c();Object.defineProperty(Nl,"__esModule",{value:!0});var X0=el();X0.code='require("ajv/dist/runtime/equal").default';Nl.default=X0});var h$=G(Cl=>{"use strict";c();Object.defineProperty(Cl,"__esModule",{value:!0});var Rl=ys(),_t=me(),Ok=Le(),Fk=hc(),Q0,e$,Sk={message:o(({params:{i:e,j:t}})=>(0,_t.str)(Q0||(Q0=h(["must NOT have duplicate items (items ## "," and "," are identical)"])),t,e),"message"),params:o(({params:{i:e,j:t}})=>(0,_t._)(e$||(e$=h(["{i: ",", j: ","}"])),e,t),"params")},t$,r$,n$,o$,i$,s$,a$,c$,f$,u$,p$,l$,d$,m$,y$,Ek={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:Sk,code(e){let{gen:t,data:r,$data:n,schema:i,parentSchema:s,schemaCode:a,it:f}=e;if(!n&&!i)return;let p=t.let("valid"),d=s.items?(0,Rl.getSchemaTypes)(s.items):[];e.block$data(p,l,(0,_t._)(t$||(t$=h([""," === false"])),a)),e.ok(p);function l(){let P=t.let("i",(0,_t._)(r$||(r$=h(["",".length"])),r)),F=t.let("j");e.setParams({i:P,j:F}),t.assign(p,!0),t.if((0,_t._)(n$||(n$=h([""," > 1"])),P),()=>(m()?g:b)(P,F))}o(l,"validateUniqueItems");function m(){return d.length>0&&!d.some(P=>P==="object"||P==="array")}o(m,"canOptimize");function g(P,F){let w=t.name("item"),O=(0,Rl.checkDataTypes)(d,w,f.opts.strictNumbers,Rl.DataType.Wrong),N=t.const("indices",(0,_t._)(o$||(o$=h(["{}"]))));t.for((0,_t._)(i$||(i$=h([";","--;"])),P),()=>{t.let(w,(0,_t._)(s$||(s$=h(["","[","]"])),r,P)),t.if(O,(0,_t._)(a$||(a$=h(["continue"])))),d.length>1&&t.if((0,_t._)(c$||(c$=h(["typeof ",' == "string"'])),w),(0,_t._)(f$||(f$=h(["",' += "_"'])),w)),t.if((0,_t._)(u$||(u$=h(["typeof ","[",'] == "number"'])),N,w),()=>{t.assign(F,(0,_t._)(p$||(p$=h(["","[","]"])),N,w)),e.error(),t.assign(p,!1).break()}).code((0,_t._)(l$||(l$=h(["","[","] = ",""])),N,w,P))})}o(g,"loopN");function b(P,F){let w=(0,Ok.useFunc)(t,Fk.default),O=t.name("outer");t.label(O).for((0,_t._)(d$||(d$=h([";","--;"])),P),()=>t.for((0,_t._)(m$||(m$=h([""," = ","; ","--;"])),F,P,F),()=>t.if((0,_t._)(y$||(y$=h(["","(","[","], ","[","])"])),w,r,P,r,F),()=>{e.error(),t.assign(p,!1).break(O)})))}o(b,"loopN2")}};Cl.default=Ek});var b$=G(Ll=>{"use strict";c();Object.defineProperty(Ll,"__esModule",{value:!0});var Ml=me(),Tk=Le(),vk=hc(),g$,Ak={message:"must be equal to constant",params:o(({schemaCode:e})=>(0,Ml._)(g$||(g$=h(["{allowedValue: ","}"])),e),"params")},I$,x$,jk={keyword:"const",$data:!0,error:Ak,code(e){let{gen:t,data:r,$data:n,schemaCode:i,schema:s}=e;n||s&&typeof s=="object"?e.fail$data((0,Ml._)(I$||(I$=h(["!","(",", ",")"])),(0,Tk.useFunc)(t,vk.default),r,i)):e.fail((0,Ml._)(x$||(x$=h([""," !== ",""])),s,r))}};Ll.default=jk});var F$=G(Ul=>{"use strict";c();Object.defineProperty(Ul,"__esModule",{value:!0});var As=me(),kk=Le(),_k=hc(),$$,Nk={message:"must be equal to one of the allowed values",params:o(({schemaCode:e})=>(0,As._)($$||($$=h(["{allowedValues: ","}"])),e),"params")},w$,P$,O$,Rk={keyword:"enum",schemaType:"array",$data:!0,error:Nk,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 f=i.length>=a.opts.loopEnum,p,d=o(()=>p!=null?p:p=(0,kk.useFunc)(t,_k.default),"getEql"),l;if(f||n)l=t.let("valid"),e.block$data(l,m);else{if(!Array.isArray(i))throw new Error("ajv implementation error");let b=t.const("vSchema",s);l=(0,As.or)(...i.map((P,F)=>g(b,F)))}e.pass(l);function m(){t.assign(l,!1),t.forOf("v",s,b=>t.if((0,As._)(w$||(w$=h(["","(",", ",")"])),d(),r,b),()=>t.assign(l,!0).break()))}o(m,"loopEnum");function g(b,P){let F=i[P];return typeof F=="object"&&F!==null?(0,As._)(P$||(P$=h(["","(",", ","[","])"])),d(),r,b,P):(0,As._)(O$||(O$=h([""," === ",""])),r,F)}o(g,"equalCode")}};Ul.default=Rk});var S$=G(Dl=>{"use strict";c();Object.defineProperty(Dl,"__esModule",{value:!0});var Ck=$0(),Mk=E0(),Lk=R0(),Uk=D0(),Dk=G0(),qk=W0(),Kk=Y0(),zk=h$(),Gk=b$(),Bk=F$(),Vk=[Ck.default,Mk.default,Lk.default,Uk.default,Dk.default,qk.default,Kk.default,zk.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},Gk.default,Bk.default];Dl.default=Vk});var Kl=G(js=>{"use strict";c();Object.defineProperty(js,"__esModule",{value:!0});js.validateAdditionalItems=void 0;var To=me(),ql=Le(),E$,T$,Wk={message:o(({params:{len:e}})=>(0,To.str)(E$||(E$=h(["must NOT have more than "," items"])),e),"message"),params:o(({params:{len:e}})=>(0,To._)(T$||(T$=h(["{limit: ","}"])),e),"params")},Hk={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:Wk,code(e){let{parentSchema:t,it:r}=e,{items:n}=t;if(!Array.isArray(n)){(0,ql.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas');return}k$(e,n)}},v$,A$,j$;function k$(e,t){let{gen:r,schema:n,data:i,keyword:s,it:a}=e;a.items=!0;let f=r.const("len",(0,To._)(v$||(v$=h(["",".length"])),i));if(n===!1)e.setParams({len:t.length}),e.pass((0,To._)(A$||(A$=h([""," <= ",""])),f,t.length));else if(typeof n=="object"&&!(0,ql.alwaysValidSchema)(a,n)){let d=r.var("valid",(0,To._)(j$||(j$=h([""," <= ",""])),f,t.length));r.if((0,To.not)(d),()=>p(d)),e.ok(d)}function p(d){r.forRange("i",t.length,f,l=>{e.subschema({keyword:s,dataProp:l,dataPropType:ql.Type.Num},d),a.allErrors||r.if((0,To.not)(d),()=>r.break())})}o(p,"validateItems")}o(k$,"validateAdditionalItems");js.validateAdditionalItems=k$;js.default=Hk});var zl=G(ks=>{"use strict";c();Object.defineProperty(ks,"__esModule",{value:!0});ks.validateTuple=void 0;var _$=me(),gc=Le(),Zk=$r(),Jk={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){let{schema:t,it:r}=e;if(Array.isArray(t))return C$(e,"additionalItems",t);r.items=!0,!(0,gc.alwaysValidSchema)(r,t)&&e.ok((0,Zk.validateArray)(e))}},N$,R$;function C$(e,t,r=e.schema){let{gen:n,parentSchema:i,data:s,keyword:a,it:f}=e;l(i),f.opts.unevaluated&&r.length&&f.items!==!0&&(f.items=gc.mergeEvaluated.items(n,r.length,f.items));let p=n.name("valid"),d=n.const("len",(0,_$._)(N$||(N$=h(["",".length"])),s));r.forEach((m,g)=>{(0,gc.alwaysValidSchema)(f,m)||(n.if((0,_$._)(R$||(R$=h([""," > ",""])),d,g),()=>e.subschema({keyword:a,schemaProp:g,dataProp:g},p)),e.ok(p))});function l(m){let{opts:g,errSchemaPath:b}=f,P=r.length,F=P===m.minItems&&(P===m.maxItems||m[t]===!1);if(g.strictTuples&&!F){let w='"'.concat(a,'" is ').concat(P,"-tuple, but minItems or maxItems/").concat(t,' are not specified or different at path "').concat(b,'"');(0,gc.checkStrictMode)(f,w,g.strictTuples)}}o(l,"checkStrictTuple")}o(C$,"validateTuple");ks.validateTuple=C$;ks.default=Jk});var M$=G(Gl=>{"use strict";c();Object.defineProperty(Gl,"__esModule",{value:!0});var Yk=zl(),Xk={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:o(e=>(0,Yk.validateTuple)(e,"items"),"code")};Gl.default=Xk});var q$=G(Bl=>{"use strict";c();Object.defineProperty(Bl,"__esModule",{value:!0});var L$=me(),Qk=Le(),e_=$r(),t_=Kl(),U$,D$,r_={message:o(({params:{len:e}})=>(0,L$.str)(U$||(U$=h(["must NOT have more than "," items"])),e),"message"),params:o(({params:{len:e}})=>(0,L$._)(D$||(D$=h(["{limit: ","}"])),e),"params")},n_={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:r_,code(e){let{schema:t,parentSchema:r,it:n}=e,{prefixItems:i}=r;n.items=!0,!(0,Qk.alwaysValidSchema)(n,t)&&(i?(0,t_.validateAdditionalItems)(e,i):e.ok((0,e_.validateArray)(e)))}};Bl.default=n_});var ew=G(Vl=>{"use strict";c();Object.defineProperty(Vl,"__esModule",{value:!0});var Pr=me(),Ic=Le(),K$,z$,G$,B$,o_={message:o(({params:{min:e,max:t}})=>t===void 0?(0,Pr.str)(K$||(K$=h(["must contain at least "," valid item(s)"])),e):(0,Pr.str)(z$||(z$=h(["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,Pr._)(G$||(G$=h(["{minContains: ","}"])),e):(0,Pr._)(B$||(B$=h(["{minContains: ",", maxContains: ","}"])),e,t),"params")},V$,W$,H$,Z$,J$,Y$,X$,Q$,i_={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:o_,code(e){let{gen:t,schema:r,parentSchema:n,data:i,it:s}=e,a,f,{minContains:p,maxContains:d}=n;s.opts.next?(a=p===void 0?1:p,f=d):a=1;let l=t.const("len",(0,Pr._)(V$||(V$=h(["",".length"])),i));if(e.setParams({min:a,max:f}),f===void 0&&a===0){(0,Ic.checkStrictMode)(s,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(f!==void 0&&a>f){(0,Ic.checkStrictMode)(s,'"minContains" > "maxContains" is always invalid'),e.fail();return}if((0,Ic.alwaysValidSchema)(s,r)){let F=(0,Pr._)(W$||(W$=h([""," >= ",""])),l,a);f!==void 0&&(F=(0,Pr._)(H$||(H$=h([""," && "," <= ",""])),F,l,f)),e.pass(F);return}s.items=!0;let m=t.name("valid");f===void 0&&a===1?b(m,()=>t.if(m,()=>t.break())):a===0?(t.let(m,!0),f!==void 0&&t.if((0,Pr._)(Z$||(Z$=h(["",".length > 0"])),i),g)):(t.let(m,!1),g()),e.result(m,()=>e.reset());function g(){let F=t.name("_valid"),w=t.let("count",0);b(F,()=>t.if(F,()=>P(w)))}o(g,"validateItemsWithCount");function b(F,w){t.forRange("i",0,l,O=>{e.subschema({keyword:"contains",dataProp:O,dataPropType:Ic.Type.Num,compositeRule:!0},F),w()})}o(b,"validateItems");function P(F){t.code((0,Pr._)(J$||(J$=h(["","++"])),F)),f===void 0?t.if((0,Pr._)(Y$||(Y$=h([""," >= ",""])),F,a),()=>t.assign(m,!0).break()):(t.if((0,Pr._)(X$||(X$=h([""," > ",""])),F,f),()=>t.assign(m,!1).break()),a===1?t.assign(m,!0):t.if((0,Pr._)(Q$||(Q$=h([""," >= ",""])),F,a),()=>t.assign(m,!0)))}o(P,"checkLimits")}};Vl.default=i_});var sw=G(sn=>{"use strict";c();Object.defineProperty(sn,"__esModule",{value:!0});sn.validateSchemaDeps=sn.validatePropertyDeps=sn.error=void 0;var Wl=me(),s_=Le(),_s=$r(),tw,rw;sn.error={message:o(({params:{property:e,depsCount:t,deps:r}})=>{let n=t===1?"property":"properties";return(0,Wl.str)(tw||(tw=h(["must have "," "," when property "," is present"])),n,r,e)},"message"),params:o(({params:{property:e,depsCount:t,deps:r,missingProperty:n}})=>(0,Wl._)(rw||(rw=h(["{property: ",",\n missingProperty: ",",\n depsCount: ",",\n deps: ","}"])),e,n,t,r),"params")};var a_={keyword:"dependencies",type:"object",schemaType:"object",error:sn.error,code(e){let[t,r]=c_(e);ow(e,t),iw(e,r)}};function c_({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(c_,"splitDependencies");var nw;function ow(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 f=t[a];if(f.length===0)continue;let p=(0,_s.propertyInData)(r,n,a,i.opts.ownProperties);e.setParams({property:a,depsCount:f.length,deps:f.join(", ")}),i.allErrors?r.if(p,()=>{for(let d of f)(0,_s.checkReportMissingProp)(e,d)}):(r.if((0,Wl._)(nw||(nw=h([""," && (",")"])),p,(0,_s.checkMissingProp)(e,f,s))),(0,_s.reportMissingProp)(e,s),r.else())}}o(ow,"validatePropertyDeps");sn.validatePropertyDeps=ow;function iw(e,t=e.schema){let{gen:r,data:n,keyword:i,it:s}=e,a=r.name("valid");for(let f in t)(0,s_.alwaysValidSchema)(s,t[f])||(r.if((0,_s.propertyInData)(r,n,f,s.opts.ownProperties),()=>{let p=e.subschema({keyword:i,schemaProp:f},a);e.mergeValidEvaluated(p,a)},()=>r.var(a,!0)),e.ok(a))}o(iw,"validateSchemaDeps");sn.validateSchemaDeps=iw;sn.default=a_});var fw=G(Hl=>{"use strict";c();Object.defineProperty(Hl,"__esModule",{value:!0});var cw=me(),f_=Le(),aw,u_={message:"property name must be valid",params:o(({params:e})=>(0,cw._)(aw||(aw=h(["{propertyName: ","}"])),e.propertyName),"params")},p_={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:u_,code(e){let{gen:t,schema:r,data:n,it:i}=e;if((0,f_.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,cw.not)(s),()=>{e.error(!0),i.allErrors||t.break()})}),e.ok(s)}};Hl.default=p_});var Jl=G(Zl=>{"use strict";c();Object.defineProperty(Zl,"__esModule",{value:!0});var xc=$r(),zr=me(),l_=Tn(),bc=Le(),uw,d_={message:"must NOT have additional properties",params:o(({params:e})=>(0,zr._)(uw||(uw=h(["{additionalProperty: ","}"])),e.additionalProperty),"params")},pw,lw,dw,mw,m_={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:d_,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:f,opts:p}=a;if(a.props=!0,p.removeAdditional!=="all"&&(0,bc.alwaysValidSchema)(a,r))return;let d=(0,xc.allSchemaProperties)(n.properties),l=(0,xc.allSchemaProperties)(n.patternProperties);m(),e.ok((0,zr._)(pw||(pw=h([""," === ",""])),s,l_.default.errors));function m(){t.forIn("key",i,w=>{!d.length&&!l.length?P(w):t.if(g(w),()=>P(w))})}o(m,"checkAdditionalProperties");function g(w){let O;if(d.length>8){let N=(0,bc.schemaRefOrVal)(a,n.properties,"properties");O=(0,xc.isOwnProperty)(t,N,w)}else d.length?O=(0,zr.or)(...d.map(N=>(0,zr._)(lw||(lw=h([""," === ",""])),w,N))):O=zr.nil;return l.length&&(O=(0,zr.or)(O,...l.map(N=>(0,zr._)(dw||(dw=h(["",".test(",")"])),(0,xc.usePattern)(e,N),w)))),(0,zr.not)(O)}o(g,"isAdditional");function b(w){t.code((0,zr._)(mw||(mw=h(["delete ","[","]"])),i,w))}o(b,"deleteAdditional");function P(w){if(p.removeAdditional==="all"||p.removeAdditional&&r===!1){b(w);return}if(r===!1){e.setParams({additionalProperty:w}),e.error(),f||t.break();return}if(typeof r=="object"&&!(0,bc.alwaysValidSchema)(a,r)){let O=t.name("valid");p.removeAdditional==="failing"?(F(w,O,!1),t.if((0,zr.not)(O),()=>{e.reset(),b(w)})):(F(w,O),f||t.if((0,zr.not)(O),()=>t.break()))}}o(P,"additionalPropertyCode");function F(w,O,N){let A={keyword:"additionalProperties",dataProp:w,dataPropType:bc.Type.Str};N===!1&&Object.assign(A,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(A,O)}o(F,"applyAdditionalSchema")}};Zl.default=m_});var gw=G(Xl=>{"use strict";c();Object.defineProperty(Xl,"__esModule",{value:!0});var y_=xs(),yw=$r(),Yl=Le(),hw=Jl(),h_={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&&hw.default.code(new y_.KeywordCxt(s,hw.default,"additionalProperties"));let a=(0,yw.allSchemaProperties)(r);for(let m of a)s.definedProperties.add(m);s.opts.unevaluated&&a.length&&s.props!==!0&&(s.props=Yl.mergeEvaluated.props(t,(0,Yl.toHash)(a),s.props));let f=a.filter(m=>!(0,Yl.alwaysValidSchema)(s,r[m]));if(f.length===0)return;let p=t.name("valid");for(let m of f)d(m)?l(m):(t.if((0,yw.propertyInData)(t,i,m,s.opts.ownProperties)),l(m),s.allErrors||t.else().var(p,!0),t.endIf()),e.it.definedProperties.add(m),e.ok(p);function d(m){return s.opts.useDefaults&&!s.compositeRule&&r[m].default!==void 0}o(d,"hasDefault");function l(m){e.subschema({keyword:"properties",schemaProp:m,dataProp:m},p)}o(l,"applyPropertySchema")}};Xl.default=h_});var Pw=G(Ql=>{"use strict";c();Object.defineProperty(Ql,"__esModule",{value:!0});var Iw=$r(),$c=me(),xw=Le(),bw=Le(),$w,ww,g_={keyword:"patternProperties",type:"object",schemaType:"object",code(e){let{gen:t,schema:r,data:n,parentSchema:i,it:s}=e,{opts:a}=s,f=(0,Iw.allSchemaProperties)(r),p=f.filter(F=>(0,xw.alwaysValidSchema)(s,r[F]));if(f.length===0||p.length===f.length&&(!s.opts.unevaluated||s.props===!0))return;let d=a.strictSchema&&!a.allowMatchingProperties&&i.properties,l=t.name("valid");s.props!==!0&&!(s.props instanceof $c.Name)&&(s.props=(0,bw.evaluatedPropsToName)(t,s.props));let{props:m}=s;g();function g(){for(let F of f)d&&b(F),s.allErrors?P(F):(t.var(l,!0),P(F),t.if(l))}o(g,"validatePatternProperties");function b(F){for(let w in d)new RegExp(F).test(w)&&(0,xw.checkStrictMode)(s,"property ".concat(w," matches pattern ").concat(F," (use allowMatchingProperties)"))}o(b,"checkMatchingProperties");function P(F){t.forIn("key",n,w=>{t.if((0,$c._)($w||($w=h(["",".test(",")"])),(0,Iw.usePattern)(e,F),w),()=>{let O=p.includes(F);O||e.subschema({keyword:"patternProperties",schemaProp:F,dataProp:w,dataPropType:bw.Type.Str},l),s.opts.unevaluated&&m!==!0?t.assign((0,$c._)(ww||(ww=h(["","[","]"])),m,w),!0):!O&&!s.allErrors&&t.if((0,$c.not)(l),()=>t.break())})})}o(P,"validateProperties")}};Ql.default=g_});var Ow=G(ed=>{"use strict";c();Object.defineProperty(ed,"__esModule",{value:!0});var I_=Le(),x_={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){let{gen:t,schema:r,it:n}=e;if((0,I_.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"}};ed.default=x_});var Fw=G(td=>{"use strict";c();Object.defineProperty(td,"__esModule",{value:!0});var b_=$r(),$_={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:b_.validateUnion,error:{message:"must match a schema in anyOf"}};td.default=$_});var vw=G(rd=>{"use strict";c();Object.defineProperty(rd,"__esModule",{value:!0});var wc=me(),w_=Le(),Sw,P_={message:"must match exactly one schema in oneOf",params:o(({params:e})=>(0,wc._)(Sw||(Sw=h(["{passingSchemas: ","}"])),e.passing),"params")},Ew,Tw,O_={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:P_,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),f=t.let("passing",null),p=t.name("_valid");e.setParams({passing:f}),t.block(d),e.result(a,()=>e.reset(),()=>e.error(!0));function d(){s.forEach((l,m)=>{let g;(0,w_.alwaysValidSchema)(i,l)?t.var(p,!0):g=e.subschema({keyword:"oneOf",schemaProp:m,compositeRule:!0},p),m>0&&t.if((0,wc._)(Ew||(Ew=h([""," && ",""])),p,a)).assign(a,!1).assign(f,(0,wc._)(Tw||(Tw=h(["[",", ","]"])),f,m)).else(),t.if(p,()=>{t.assign(a,!0),t.assign(f,m),g&&e.mergeEvaluated(g,wc.Name)})})}o(d,"validateOneOf")}};rd.default=O_});var Aw=G(nd=>{"use strict";c();Object.defineProperty(nd,"__esModule",{value:!0});var F_=Le(),S_={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,F_.alwaysValidSchema)(n,s))return;let f=e.subschema({keyword:"allOf",schemaProp:a},i);e.ok(i),e.mergeEvaluated(f)})}};nd.default=S_});var Cw=G(od=>{"use strict";c();Object.defineProperty(od,"__esModule",{value:!0});var Pc=me(),Rw=Le(),kw,_w,E_={message:o(({params:e})=>(0,Pc.str)(kw||(kw=h(['must match "','" schema'])),e.ifClause),"message"),params:o(({params:e})=>(0,Pc._)(_w||(_w=h(["{failingKeyword: ","}"])),e.ifClause),"params")},Nw,T_={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:E_,code(e){let{gen:t,parentSchema:r,it:n}=e;r.then===void 0&&r.else===void 0&&(0,Rw.checkStrictMode)(n,'"if" without "then" and "else" is ignored');let i=jw(n,"then"),s=jw(n,"else");if(!i&&!s)return;let a=t.let("valid",!0),f=t.name("_valid");if(p(),e.reset(),i&&s){let l=t.let("ifClause");e.setParams({ifClause:l}),t.if(f,d("then",l),d("else",l))}else i?t.if(f,d("then")):t.if((0,Pc.not)(f),d("else"));e.pass(a,()=>e.error(!0));function p(){let l=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},f);e.mergeEvaluated(l)}o(p,"validateIf");function d(l,m){return()=>{let g=e.subschema({keyword:l},f);t.assign(a,f),e.mergeValidEvaluated(g,a),m?t.assign(m,(0,Pc._)(Nw||(Nw=h(["",""])),l)):e.setParams({ifClause:l})}}o(d,"validateClause")}};function jw(e,t){let r=e.schema[t];return r!==void 0&&!(0,Rw.alwaysValidSchema)(e,r)}o(jw,"hasSchema");od.default=T_});var Mw=G(id=>{"use strict";c();Object.defineProperty(id,"__esModule",{value:!0});var v_=Le(),A_={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:r}){t.if===void 0&&(0,v_.checkStrictMode)(r,'"'.concat(e,'" without "if" is ignored'))}};id.default=A_});var Lw=G(sd=>{"use strict";c();Object.defineProperty(sd,"__esModule",{value:!0});var j_=Kl(),k_=M$(),__=zl(),N_=q$(),R_=ew(),C_=sw(),M_=fw(),L_=Jl(),U_=gw(),D_=Pw(),q_=Ow(),K_=Fw(),z_=vw(),G_=Aw(),B_=Cw(),V_=Mw();function W_(e=!1){let t=[q_.default,K_.default,z_.default,G_.default,B_.default,V_.default,M_.default,L_.default,C_.default,U_.default,D_.default];return e?t.push(k_.default,N_.default):t.push(j_.default,__.default),t.push(R_.default),t}o(W_,"getApplicator");sd.default=W_});var rP=G(ad=>{"use strict";c();Object.defineProperty(ad,"__esModule",{value:!0});var gt=me(),Uw,Dw,H_={message:o(({schemaCode:e})=>(0,gt.str)(Uw||(Uw=h(['must match format "','"'])),e),"message"),params:o(({schemaCode:e})=>(0,gt._)(Dw||(Dw=h(["{format: ","}"])),e),"params")},qw,Kw,zw,Gw,Bw,Vw,Ww,Hw,Zw,Jw,Yw,Xw,Qw,eP,tP,Z_={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:H_,code(e,t){let{gen:r,data:n,$data:i,schema:s,schemaCode:a,it:f}=e,{opts:p,errSchemaPath:d,schemaEnv:l,self:m}=f;if(!p.validateFormats)return;i?g():b();function g(){let P=r.scopeValue("formats",{ref:m.formats,code:p.code.formats}),F=r.const("fDef",(0,gt._)(qw||(qw=h(["","[","]"])),P,a)),w=r.let("fType"),O=r.let("format");r.if((0,gt._)(Kw||(Kw=h(["typeof ",' == "object" && !('," instanceof RegExp)"])),F,F),()=>r.assign(w,(0,gt._)(zw||(zw=h(["",'.type || "string"'])),F)).assign(O,(0,gt._)(Gw||(Gw=h(["",".validate"])),F)),()=>r.assign(w,(0,gt._)(Bw||(Bw=h(['"string"'])))).assign(O,F)),e.fail$data((0,gt.or)(N(),A()));function N(){return p.strictSchema===!1?gt.nil:(0,gt._)(Vw||(Vw=h([""," && !",""])),a,O)}o(N,"unknownFmt");function A(){let k=l.$async?(0,gt._)(Ww||(Ww=h(["(",".async ? await ","(",") : ","(","))"])),F,O,n,O,n):(0,gt._)(Hw||(Hw=h(["","(",")"])),O,n),R=(0,gt._)(Zw||(Zw=h(["(typeof ",' == "function" ? '," : ",".test(","))"])),O,k,O,n);return(0,gt._)(Jw||(Jw=h([""," && "," !== true && "," === "," && !",""])),O,O,w,t,R)}o(A,"invalidFmt")}o(g,"validate$DataFormat");function b(){let P=m.formats[s];if(!P){N();return}if(P===!0)return;let[F,w,O]=A(P);F===t&&e.pass(k());function N(){if(p.strictSchema===!1){m.logger.warn(R());return}throw new Error(R());function R(){return'unknown format "'.concat(s,'" ignored in schema at path "').concat(d,'"')}}o(N,"unknownFormat");function A(R){let V=R instanceof RegExp?(0,gt.regexpCode)(R):p.code.formats?(0,gt._)(Yw||(Yw=h(["","",""])),p.code.formats,(0,gt.getProperty)(s)):void 0,J=r.scopeValue("formats",{key:s,ref:R,code:V});return typeof R=="object"&&!(R instanceof RegExp)?[R.type||"string",R.validate,(0,gt._)(Xw||(Xw=h(["",".validate"])),J)]:["string",R,J]}o(A,"getFormat");function k(){if(typeof P=="object"&&!(P instanceof RegExp)&&P.async){if(!l.$async)throw new Error("async format in sync schema");return(0,gt._)(Qw||(Qw=h(["await ","(",")"])),O,n)}return typeof w=="function"?(0,gt._)(eP||(eP=h(["","(",")"])),O,n):(0,gt._)(tP||(tP=h(["",".test(",")"])),O,n)}o(k,"validCondition")}o(b,"validateFormat")}};ad.default=Z_});var nP=G(cd=>{"use strict";c();Object.defineProperty(cd,"__esModule",{value:!0});var J_=rP(),Y_=[J_.default];cd.default=Y_});var oP=G(fi=>{"use strict";c();Object.defineProperty(fi,"__esModule",{value:!0});fi.contentVocabulary=fi.metadataVocabulary=void 0;fi.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];fi.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});var sP=G(fd=>{"use strict";c();Object.defineProperty(fd,"__esModule",{value:!0});var X_=g0(),Q_=S$(),eN=Lw(),tN=nP(),iP=oP(),rN=[X_.default,Q_.default,(0,eN.default)(),tN.default,iP.metadataVocabulary,iP.contentVocabulary];fd.default=rN});var cP=G(Oc=>{"use strict";c();Object.defineProperty(Oc,"__esModule",{value:!0});Oc.DiscrError=void 0;var aP;(function(e){e.Tag="tag",e.Mapping="mapping"})(aP||(Oc.DiscrError=aP={}))});var mP=G(pd=>{"use strict";c();Object.defineProperty(pd,"__esModule",{value:!0});var ui=me(),ud=cP(),fP=sc(),nN=bs(),oN=Le(),uP,iN={message:o(({params:{discrError:e,tagName:t}})=>e===ud.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,ui._)(uP||(uP=h(["{error: ",", tag: ",", tagValue: ","}"])),e,r,t),"params")},pP,lP,dP,sN={keyword:"discriminator",type:"object",schemaType:"object",error:iN,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 f=n.propertyName;if(typeof f!="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 p=t.let("valid",!1),d=t.const("tag",(0,ui._)(pP||(pP=h(["","",""])),r,(0,ui.getProperty)(f)));t.if((0,ui._)(lP||(lP=h(["typeof ",' == "string"'])),d),()=>l(),()=>e.error(!1,{discrError:ud.DiscrError.Tag,tag:d,tagName:f})),e.ok(p);function l(){let b=g();t.if(!1);for(let P in b)t.elseIf((0,ui._)(dP||(dP=h([""," === ",""])),d,P)),t.assign(p,m(b[P]));t.else(),e.error(!1,{discrError:ud.DiscrError.Mapping,tag:d,tagName:f}),t.endIf()}o(l,"validateMapping");function m(b){let P=t.name("valid"),F=e.subschema({keyword:"oneOf",schemaProp:b},P);return e.mergeEvaluated(F,ui.Name),P}o(m,"applyTagSchema");function g(){var b;let P={},F=O(i),w=!0;for(let k=0;k<a.length;k++){let R=a[k];if(R!=null&&R.$ref&&!(0,oN.schemaHasRulesButRef)(R,s.self.RULES)){let J=R.$ref;if(R=fP.resolveRef.call(s.self,s.schemaEnv.root,s.baseId,J),R instanceof fP.SchemaEnv&&(R=R.schema),R===void 0)throw new nN.default(s.opts.uriResolver,s.baseId,J)}let V=(b=R==null?void 0:R.properties)===null||b===void 0?void 0:b[f];if(typeof V!="object")throw new Error('discriminator: oneOf subschemas (or referenced schemas) must have "properties/'.concat(f,'"'));w=w&&(F||O(R)),N(V,k)}if(!w)throw new Error('discriminator: "'.concat(f,'" must be required'));return P;function O({required:k}){return Array.isArray(k)&&k.includes(f)}function N(k,R){if(k.const)A(k.const,R);else if(k.enum)for(let V of k.enum)A(V,R);else throw new Error('discriminator: "properties/'.concat(f,'" must have "const" or "enum"'))}function A(k,R){if(typeof k!="string"||k in P)throw new Error('discriminator: "'.concat(f,'" values must be unique strings'));P[k]=R}}o(g,"getMapping")}};pd.default=sN});var yP=G((N5,aN)=>{aN.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 md=G((ot,ld)=>{"use strict";c();Object.defineProperty(ot,"__esModule",{value:!0});ot.MissingRefError=ot.ValidationError=ot.CodeGen=ot.Name=ot.nil=ot.stringify=ot.str=ot._=ot.KeywordCxt=ot.Ajv=void 0;var cN=r0(),fN=sP(),uN=mP(),hP=yP(),pN=["/properties"],Fc="http://json-schema.org/draft-07/schema",dd=class dd extends cN.default{_addVocabularies(){super._addVocabularies(),fN.default.forEach(t=>this.addVocabulary(t)),this.opts.discriminator&&this.addKeyword(uN.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let t=this.opts.$data?this.$dataMetaSchema(hP,pN):hP;this.addMetaSchema(t,Fc,!1),this.refs["http://json-schema.org/schema"]=Fc}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(Fc)?Fc:void 0)}};o(dd,"Ajv");var pi=dd;ot.Ajv=pi;ld.exports=ot=pi;ld.exports.Ajv=pi;Object.defineProperty(ot,"__esModule",{value:!0});ot.default=pi;var lN=xs();Object.defineProperty(ot,"KeywordCxt",{enumerable:!0,get:o(function(){return lN.KeywordCxt},"get")});var li=me();Object.defineProperty(ot,"_",{enumerable:!0,get:o(function(){return li._},"get")});Object.defineProperty(ot,"str",{enumerable:!0,get:o(function(){return li.str},"get")});Object.defineProperty(ot,"stringify",{enumerable:!0,get:o(function(){return li.stringify},"get")});Object.defineProperty(ot,"nil",{enumerable:!0,get:o(function(){return li.nil},"get")});Object.defineProperty(ot,"Name",{enumerable:!0,get:o(function(){return li.Name},"get")});Object.defineProperty(ot,"CodeGen",{enumerable:!0,get:o(function(){return li.CodeGen},"get")});var dN=oc();Object.defineProperty(ot,"ValidationError",{enumerable:!0,get:o(function(){return dN.default},"get")});var mN=bs();Object.defineProperty(ot,"MissingRefError",{enumerable:!0,get:o(function(){return mN.default},"get")})});var wP=G(an=>{"use strict";c();Object.defineProperty(an,"__esModule",{value:!0});an.formatNames=an.fastFormats=an.fullFormats=void 0;function di(e,t){return{validate:e,compare:t}}o(di,"fmtDef");an.fullFormats={date:di(xP,gd),time:di(bP,Id),"date-time":di(IN,$P),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:$N,"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:TN,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:wN,int32:{type:"number",validate:FN},int64:{type:"number",validate:SN},float:{type:"number",validate:IP},double:{type:"number",validate:IP},password:!0,binary:!0};an.fastFormats=Y(S({},an.fullFormats),{date:di(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,gd),time:di(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,Id),"date-time":di(/^\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,$P),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});an.formatNames=Object.keys(an.fullFormats);function yN(e){return e%4===0&&(e%100!==0||e%400===0)}o(yN,"isLeapYear");var hN=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,gN=[0,31,28,31,30,31,30,31,31,30,31,30,31];function xP(e){let t=hN.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&&yN(r)?29:gN[n])}o(xP,"date");function gd(e,t){if(e&&t)return e>t?1:e<t?-1:0}o(gd,"compareDate");var yd=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i;function bP(e,t){let r=yd.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(bP,"time");function Id(e,t){if(!(e&&t))return;let r=yd.exec(e),n=yd.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(Id,"compareTime");var hd=/t|\s/i;function IN(e){let t=e.split(hd);return t.length===2&&xP(t[0])&&bP(t[1],!0)}o(IN,"date_time");function $P(e,t){if(!(e&&t))return;let[r,n]=e.split(hd),[i,s]=t.split(hd),a=gd(r,i);if(a!==void 0)return a||Id(n,s)}o($P,"compareDateTime");var xN=/\/|:/,bN=/^(?:[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 $N(e){return xN.test(e)&&bN.test(e)}o($N,"uri");var gP=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function wN(e){return gP.lastIndex=0,gP.test(e)}o(wN,"byte");var PN=-(2**31),ON=2**31-1;function FN(e){return Number.isInteger(e)&&e<=ON&&e>=PN}o(FN,"validateInt32");function SN(e){return Number.isInteger(e)}o(SN,"validateInt64");function IP(){return!0}o(IP,"validateNumber");var EN=/[^\\]\\Z/;function TN(e){if(EN.test(e))return!1;try{return new RegExp(e),!0}catch(t){return!1}}o(TN,"regex")});var jP=G(mi=>{"use strict";c();Object.defineProperty(mi,"__esModule",{value:!0});mi.formatLimitDefinition=void 0;var vN=md(),Gr=me(),oo=Gr.operators,Sc={formatMaximum:{okStr:"<=",ok:oo.LTE,fail:oo.GT},formatMinimum:{okStr:">=",ok:oo.GTE,fail:oo.LT},formatExclusiveMaximum:{okStr:"<",ok:oo.LT,fail:oo.GTE},formatExclusiveMinimum:{okStr:">",ok:oo.GT,fail:oo.LTE}},PP,OP,AN={message:o(({keyword:e,schemaCode:t})=>Gr.str(PP||(PP=h(["should be "," ",""])),Sc[e].okStr,t),"message"),params:o(({keyword:e,schemaCode:t})=>Gr._(OP||(OP=h(["{comparison: ",", limit: ","}"])),Sc[e].okStr,t),"params")},FP,SP,EP,TP,vP,AP;mi.formatLimitDefinition={keyword:Object.keys(Sc),type:"string",schemaType:"string",$data:!0,error:AN,code(e){let{gen:t,data:r,schemaCode:n,keyword:i,it:s}=e,{opts:a,self:f}=s;if(!a.validateFormats)return;let p=new vN.KeywordCxt(s,f.RULES.all.format.definition,"format");p.$data?d():l();function d(){let g=t.scopeValue("formats",{ref:f.formats,code:a.code.formats}),b=t.const("fmt",Gr._(FP||(FP=h(["","[","]"])),g,p.schemaCode));e.fail$data(Gr.or(Gr._(SP||(SP=h(["typeof ",' != "object"'])),b),Gr._(EP||(EP=h([""," instanceof RegExp"])),b),Gr._(TP||(TP=h(["typeof ",'.compare != "function"'])),b),m(b)))}o(d,"validate$DataFormat");function l(){let g=p.schema,b=f.formats[g];if(!b||b===!0)return;if(typeof b!="object"||b instanceof RegExp||typeof b.compare!="function")throw new Error('"'.concat(i,'": format "').concat(g,'" does not define "compare" function'));let P=t.scopeValue("formats",{key:g,ref:b,code:a.code.formats?Gr._(vP||(vP=h(["","",""])),a.code.formats,Gr.getProperty(g)):void 0});e.fail$data(m(P))}o(l,"validateFormat");function m(g){return Gr._(AP||(AP=h(["",".compare(",", ",") "," 0"])),g,r,n,Sc[i].fail)}o(m,"compareCode")},dependencies:["format"]};var jN=o(e=>(e.addKeyword(mi.formatLimitDefinition),e),"formatLimitPlugin");mi.default=jN});var CP=G((Ns,RP)=>{"use strict";c();Object.defineProperty(Ns,"__esModule",{value:!0});var yi=wP(),kN=jP(),xd=me(),kP=new xd.Name("fullFormats"),_N=new xd.Name("fastFormats"),bd=o((e,t={keywords:!0})=>{if(Array.isArray(t))return _P(e,t,yi.fullFormats,kP),e;let[r,n]=t.mode==="fast"?[yi.fastFormats,_N]:[yi.fullFormats,kP],i=t.formats||yi.formatNames;return _P(e,i,r,n),t.keywords&&kN.default(e),e},"formatsPlugin");bd.get=(e,t="full")=>{let n=(t==="fast"?yi.fastFormats:yi.fullFormats)[e];if(!n)throw new Error('Unknown format "'.concat(e,'"'));return n};var NP;function _P(e,t,r,n){var i,s;(i=(s=e.opts.code).formats)!==null&&i!==void 0||(s.formats=xd._(NP||(NP=h(['require("ajv-formats/dist/formats").',""])),n));for(let a of t)e.addFormat(a,r[a])}o(_P,"addFormats");RP.exports=Ns=bd;Object.defineProperty(Ns,"__esModule",{value:!0});Ns.default=bd});var $1=G((Ih,xh)=>{c();(function(e,t){typeof Ih=="object"&&typeof xh<"u"?xh.exports=t():typeof define=="function"&&define.amd?define(t):(e=e||self,e.TinyQueue=t())})(Ih,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,f=s[n];n>0;){var p=n-1>>1,d=s[p];if(a(f,d)>=0)break;s[n]=d,n=p}s[n]=f},"_up"),e.prototype._down=o(function(n){for(var i=this,s=i.data,a=i.compare,f=this.length>>1,p=s[n];n<f;){var d=(n<<1)+1,l=s[d],m=d+1;if(m<this.length&&a(s[m],l)<0&&(d=m,l=s[m]),a(l,p)>=0)break;s[n]=l,n=d}s[n]=p},"_down");function t(r,n){return r<n?-1:r>n?1:0}return o(t,"defaultCompare"),e})});var P1=G((iIe,bh)=>{"use strict";c();var lu=$1();lu.default&&(lu=lu.default);bh.exports=w1;bh.exports.default=w1;function w1(e,t,r){t=t||1;for(var n,i,s,a,f=0;f<e[0].length;f++){var p=e[0][f];(!f||p[0]<n)&&(n=p[0]),(!f||p[1]<i)&&(i=p[1]),(!f||p[0]>s)&&(s=p[0]),(!f||p[1]>a)&&(a=p[1])}var d=s-n,l=a-i,m=Math.min(d,l),g=m/2;if(m===0){var b=[n,i];return b.distance=0,b}for(var P=new lu(void 0,M3),F=n;F<s;F+=m)for(var w=i;w<a;w+=m)P.push(new ho(F+g,w+g,g,e));var O=U3(e),N=new ho(n+d/2,i+l/2,0,e);N.d>O.d&&(O=N);for(var A=P.length;P.length;){var k=P.pop();k.d>O.d&&(O=k,r&&console.log("found best %d after %d probes",Math.round(1e4*k.d)/1e4,A)),!(k.max-O.d<=t)&&(g=k.h/2,P.push(new ho(k.x-g,k.y-g,g,e)),P.push(new ho(k.x+g,k.y-g,g,e)),P.push(new ho(k.x-g,k.y+g,g,e)),P.push(new ho(k.x+g,k.y+g,g,e)),A+=4)}r&&(console.log("num probes: "+A),console.log("best distance: "+O.d));var R=[O.x,O.y];return R.distance=O.d,R}o(w1,"polylabel");function M3(e,t){return t.max-e.max}o(M3,"compareMax");function ho(e,t,r,n){this.x=e,this.y=t,this.h=r,this.d=L3(e,t,n),this.max=this.d+this.h*Math.SQRT2}o(ho,"Cell");function L3(e,t,r){for(var n=!1,i=1/0,s=0;s<r.length;s++)for(var a=r[s],f=0,p=a.length,d=p-1;f<p;d=f++){var l=a[f],m=a[d];l[1]>t!=m[1]>t&&e<(m[0]-l[0])*(t-l[1])/(m[1]-l[1])+l[0]&&(n=!n),i=Math.min(i,D3(e,t,l,m))}return i===0?0:(n?1:-1)*Math.sqrt(i)}o(L3,"pointToPolygonDist");function U3(e){for(var t=0,r=0,n=0,i=e[0],s=0,a=i.length,f=a-1;s<a;f=s++){var p=i[s],d=i[f],l=p[0]*d[1]-d[0]*p[1];r+=(p[0]+d[0])*l,n+=(p[1]+d[1])*l,t+=l*3}return t===0?new ho(i[0][0],i[0][1],0,e):new ho(r/t,n/t,0,e)}o(U3,"getCentroidCell");function D3(e,t,r,n){var i=r[0],s=r[1],a=n[0]-i,f=n[1]-s;if(a!==0||f!==0){var p=((e-i)*a+(t-s)*f)/(a*a+f*f);p>1?(i=n[0],s=n[1]):p>0&&(i+=a*p,s+=f*p)}return a=e-i,f=t-s,a*a+f*f}o(D3,"getSegDistSq")});c();c();c();var yu=class yu extends Error{constructor(t){super(t),this.name="IntegrityError"}};o(yu,"IntegrityError");var $t=yu,hu=class hu extends $t{constructor(r,n){super("Floor stack '".concat(r.id,"' contains floor '").concat(n,"' which is not listed in floor.geojson / map.geojson"));H(this,"floorStack");H(this,"floorId");this.floorStack=r,this.floorId=n}};o(hu,"FloorStackUnknownMapError");var ya=hu,gu=class gu extends $t{constructor(r){super("A space collection references floor '".concat(r,"' which does not exist"));H(this,"floorId");this.floorId=r}};o(gu,"SpaceCollectionUnknownMapError");var ha=gu,Iu=class Iu extends $t{constructor(r,n){super("Space '".concat(r.id,"' references a destination node '").concat(n,"' which does not exist"));H(this,"space");H(this,"nodeId");this.space=r,this.nodeId=n}};o(Iu,"SpaceUnknownNodeError");var ga=Iu,xu=class xu extends $t{constructor(r){super("An obstruction collection references floor '".concat(r,"' which does not exist"));H(this,"floorId");this.floorId=r}};o(xu,"ObstructionCollectionUnknownMapError");var Ia=xu,bu=class bu extends $t{constructor(r,n,i){super("Obstruction '".concat(r.id,"' references an entrance '").concat(i,"' which does not exist on floor '").concat(n,"'"));H(this,"obstruction");H(this,"floorId");H(this,"entranceId");this.obstruction=r,this.floorId=n,this.entranceId=i}};o(bu,"ObstructionUnknownEntranceError");var xa=bu,$u=class $u extends $t{constructor(r,n){super("Connection '".concat(r.id,"' references a node '").concat(n,"' which does not exist"));H(this,"connection");H(this,"nodeId");this.connection=r,this.nodeId=n}};o($u,"ConnectionUnknownNodeError");var ba=$u,wu=class wu extends $t{constructor(r){var i;let n=(i=r.floor)!=null?i:r.map;super("Node '".concat(r.id,"' claims to be on floor '").concat(n,"' which does not exist"));H(this,"node");H(this,"floorId");this.node=r,this.floorId=n}};o(wu,"NodeUnknownFloorError");var $a=wu,Pu=class Pu extends $t{constructor(r,n){super("Node '".concat(r.id,"' references a space '").concat(n,"' (on floor '").concat(r.map,"') which does not exist"));H(this,"node");H(this,"spaceId");this.node=r,this.spaceId=n}};o(Pu,"NodeUnknownSpaceError");var wa=Pu,Ou=class Ou extends $t{constructor(r,n){super("Node '".concat(r.id,"' has a neighbor node '").concat(n,"' which does not exist"));H(this,"node");H(this,"neighborId");this.node=r,this.neighborId=n}};o(Ou,"NodeUnknownNeighborError");var Pa=Ou,Fu=class Fu extends $t{constructor(r,n,i){super("Style ".concat(r," references a ").concat(n," polygon ").concat(i," which does not exist."));H(this,"styleId");H(this,"polygonKind");H(this,"polygonId");this.styleId=r,this.polygonKind=n,this.polygonId=i}};o(Fu,"StyleUnknownPolygonError");var Oa=Fu,Su=class Su extends $t{constructor(r,n,i){super("Style ".concat(r," references a ").concat(n," line string ").concat(i," which does not exist."));H(this,"styleId");H(this,"lineStringKind");H(this,"lineStringId");this.styleId=r,this.lineStringKind=n,this.lineStringId=i}};o(Su,"StyleUnknownLineStringError");var Fa=Su,Eu=class Eu extends $t{constructor(r,n,i){super("Style ".concat(r," references a ").concat(n," point ").concat(i," which does not exist."));H(this,"styleId");H(this,"pointKind");H(this,"pointId");this.styleId=r,this.pointKind=n,this.pointId=i}};o(Eu,"StyleUnknownPointError");var Sa=Eu,Tu=class Tu extends $t{constructor(r){super("Style ".concat(r," does not appear to be a valid polygon or line string style."));H(this,"styleId");this.styleId=r}};o(Tu,"InvalidStyleError");var Ea=Tu,vu=class vu extends $t{constructor(r,n){super("An image for space polygon ".concat(r," is defined, but this polygon does not exist on floor ").concat(n,"."));H(this,"spaceId");H(this,"floorId");this.spaceId=r,this.floorId=n}};o(vu,"AnchoredImageUnknownSpaceError");var Ta=vu,Au=class Au extends $t{constructor(r,n){super("Text for space ".concat(r," is defined, but this space does not exist on floor ").concat(n,"."));H(this,"spaceId");H(this,"floorId");this.spaceId=r,this.floorId=n}};o(Au,"AnchoredFloorTextUnknownSpaceError");var va=Au,ju=class ju extends $t{constructor(r,n){super("Text for obstruction ".concat(r," is defined, but this obstruction does not exist on floor ").concat(n,"."));H(this,"obstructionId");H(this,"floorId");this.obstructionId=r,this.floorId=n}};o(ju,"AnchoredFloorTextUnknownObstructionError");var Aa=ju,ku=class ku extends $t{constructor(r,n){super("An image for obstruction polygon ".concat(r," is defined, but this polygon does not exist on floor ").concat(n,", or does not have allowed geometry."));H(this,"obstructionId");H(this,"floorId");this.obstructionId=r,this.floorId=n}};o(ku,"AnchoredImageUnknownObstructionError");var ja=ku,_u=class _u extends Error{constructor(r,n){super("A text area for space ".concat(r," is defined, but this space does not exist on floor ").concat(n,"."));H(this,"spaceId");H(this,"floorId");this.spaceId=r,this.floorId=n}};o(_u,"TextAreaUnknownSpaceError");var ka=_u,Nu=class Nu extends Error{constructor(r,n){super("A layer with space ".concat(r," is defined, but this space does not exist on floor ").concat(n,"."));H(this,"spaceId");H(this,"floorId");this.spaceId=r,this.floorId=n}};o(Nu,"EnterpriseLayerUnknownSpaceError");var _a=Nu,Ru=class Ru extends Error{constructor(r,n){super("An enterprise style references a space ".concat(r," which does not exist on floor ").concat(n,"."));H(this,"geometryId");H(this,"floorId");this.geometryId=r,this.floorId=n}};o(Ru,"EnterpriseStyleGeometryAnchorsUnknownSpaceError");var Na=Ru,Cu=class Cu extends Error{constructor(r,n){super("A texture for space ".concat(r," is defined, but this space does not exist on floor ").concat(n,"."));H(this,"spaceId");H(this,"floorId");this.spaceId=r,this.floorId=n}};o(Cu,"EnterpriseTextureUnknownSpaceError");var Ra=Cu,Mu=class Mu extends Error{constructor(r,n){super("A text area for obstruction ".concat(r," is defined, but this obstruction does not exist on floor ").concat(n,"."));H(this,"obstructionId");H(this,"floorId");this.obstructionId=r,this.floorId=n}};o(Mu,"TextAreaUnknownObstructionError");var Ca=Mu,Lu=class Lu extends Error{constructor(t){super("Enterprise location '".concat(t,"' does not exist.")),this.name="EnterpriseUnknownLocationError"}};o(Lu,"EnterpriseUnknownLocationError");var ns=Lu,Uu=class Uu extends Error{constructor(t){super("Enterprise location references unknown map '".concat(t,"'.")),this.name="EnterpriseUnknownMapError"}};o(Uu,"EnterpriseUnknownMapError");var os=Uu,Du=class Du extends Error{constructor(t,r,n){super("Enterprise location '".concat(t,"' references unknown space '").concat(r,"' on map '").concat(n,"'.")),this.name="EnterpriseLocationUnknownSpaceError"}};o(Du,"EnterpriseLocationUnknownSpaceError");var Ma=Du,qu=class qu extends Error{constructor(t){super("Enterprise category '".concat(t,"' does not exist.")),this.name="EnterpriseUnknownCategoryError"}};o(qu,"EnterpriseUnknownCategoryError");var La=qu,Ku=class Ku extends Error{constructor(t,r,n,i){super("Enterprise location '".concat(t,"' has an item '").concat(r,"' that references maps '").concat(n,"', but it is actually on '").concat(i,"'.")),this.name="EnterpriseInconsistentMapError"}};o(Ku,"EnterpriseInconsistentMapError");var Ua=Ku,zu=class zu extends Error{constructor(t){super("Cyclical reference detected in category hierarchy starting from category '".concat(t,"'")),this.name="EnterpriseCyclicalCategoryReferenceError"}};o(zu,"EnterpriseCyclicalCategoryReferenceError");var Da=zu,Gu=class Gu extends Error{constructor(t){super("Invalid timezone '".concat(t,"'")),this.name="EnterpriseInvalidTimeZoneError"}};o(Gu,"EnterpriseInvalidTimeZoneError");var qa=Gu,Bu=class Bu extends Error{constructor(t){super("An facade references floor stack '".concat(t,"' which does not exist")),this.name="FacadeUnknownFloorStackError"}};o(Bu,"FacadeUnknownFloorStackError");var Ka=Bu,Vu=class Vu extends Error{constructor(t,r){super("Facade '".concat(t,"' references floor '").concat(r,"' which does not exist")),this.name="FacadeUnknownFloorError"}};o(Vu,"FacadeUnknownFloorError");var za=Vu,Wu=class Wu extends Error{constructor(t,r,n){super("Facade '".concat(t,"' references space '").concat(r,"' (on floor '").concat(n,"') which does not exist")),this.name="FacadeUnknownSpaceError"}};o(Wu,"FacadeUnknownSpaceError");var Ga=Wu,Hu=class Hu extends $t{constructor(t){super("Duplicate tileset key found: ".concat(t)),this.name="DuplicateTilesetKeyError"}};o(Hu,"DuplicateTilesetKeyError");var Ba=Hu;c();var Ph=o(e=>"polygons"in e,"isPolygonStyle"),Oh=o(e=>"width"in e&&"lineStrings"in e,"isLineStringStyle"),Fh=o(e=>"points"in e,"isPointStyle");var Zu=o(e=>"anchorId"in e.properties||"geometryId"in e.properties,"isAnchoredImageOrTextLabelFeature");var is=o(e=>e["floor.geojson"]!=null?new Set(e["floor.geojson"].features.map(t=>t.properties.id)):new Set(e["map.geojson"].map(t=>t.id)),"availableFloorIds"),k1=o(e=>e["floorstack.json"]!=null?new Set(e["floorstack.json"].map(t=>t.id)):new Set(e["mapstack.geojson"].map(t=>t.id)),"availableFloorStackIds"),_1=o(e=>{var n,i;let t=is(e),r=(i=(n=e["floorstack.json"])!=null?n:e["mapstack.json"])!=null?i:e["mapstack.geojson"];for(let s of r)for(let a of s.maps)if(!t.has(a))throw new ya(s,a);return!0},"validateMapStacks"),N1=o(e=>{let t=is(e),r=new Set(e["node.geojson"].features.map(n=>n.properties.id));for(let[n,i]of Object.entries(e.space)){if(!t.has(n))throw new ha(n);if(i){for(let s of i.features)for(let a of s.properties.destinationNodes)if(!r.has(a))throw new ga(s.properties,a)}}return!0},"validateSpaces"),R1=o(e=>{let t=is(e),r=Object.entries(e.entrance).reduce((n,[i,s])=>(n[i]=new Set((s?s.features:[]).map(a=>a.properties.id)),n),{});for(let[n,i]of Object.entries(e.obstruction)){if(!t.has(n))throw new Ia(n);if(i)for(let s of i.features)for(let a of s.properties.entrances){let f=r[n];if(!f||!f.has(a))throw new xa(s.properties,n,a)}}return!0},"validateObstructions"),C1=o(e=>{let t=new Set(e["node.geojson"].features.map(r=>r.properties.id));for(let r of e["connection.json"])for(let n of r.nodes)if(!t.has(n))throw new ba(r,n);return!0},"validateConnections"),M1=o(e=>{var i,s;let t=is(e),r=Object.entries(e.space).reduce((a,[f,p])=>(a[f]=new Set((p?p.features:[]).map(d=>d.properties.id)),a),{}),n=new Set(e["node.geojson"].features.map(a=>a.properties.id));for(let a of e["node.geojson"].features){let f=(i=a.properties.floor)!=null?i:a.properties.map;if(!t.has(f))throw new $a(a.properties);for(let p of a.properties.space)if(!((s=r[f])!=null&&s.has(p)))throw new wa(a.properties,p);for(let p of a.properties.neighbors)if(!n.has(p.id))throw new Pa(a.properties,p.id)}return!0},"validateNodes"),L1=o(e=>{if(!e.facade)return!0;let t=k1(e),r=is(e),n=Object.entries(e.space).reduce((i,[s,a])=>(i[s]=new Set((a?a.features:[]).map(f=>f.properties.id)),i),{});for(let[i,s]of Object.entries(e.facade)){if(!t.has(i))throw new Ka(i);if(s)for(let{floorId:a,spaceId:f}of s.spaces){if(!r.has(a))throw new za(s.id,a);let p=n[a];if(!(p!=null&&p.has(f)))throw new Ga(s.id,f,a)}}return!0},"validateFacades"),U1=o(e=>{if(!e["styles.json"])return!0;let t={},r={},n={};Object.values(e.space).forEach(i=>{i==null||i.features.forEach(s=>{s.geometry.type==="Polygon"?t[s.properties.id]="space":s.geometry.type==="LineString"?r[s.properties.id]="space":s.geometry.type==="Point"&&(n[s.properties.id]="space")})}),Object.values(e.obstruction).forEach(i=>{i==null||i.features.forEach(s=>{s.geometry.type==="Polygon"?t[s.properties.id]="obstruction":s.geometry.type==="LineString"&&(r[s.properties.id]="obstruction")})}),Object.values(e.entrance).forEach(i=>{i==null||i.features.forEach(s=>{r[s.properties.id]="entrance"})});for(let[i,s]of Object.entries(e["styles.json"]))if(s)if(Ph(s))for(let a of s.polygons){let f=a.startsWith("s_")?"space":a.startsWith("o_")?"obstruction":"unknown";if(!t[a])throw new Oa(i,f,a)}else if(Oh(s))for(let a of s.lineStrings){let f=a.startsWith("s_")?"space":a.startsWith("o_")?"obstruction":a.startsWith("e_")?"entrance":"unknown";if(!r[a])throw new Fa(i,f,a)}else if(Fh(s)){for(let a of s.points)if(!n[a])throw new Sa(i,"space",a)}else throw new Ea(i);return!0},"validateStyles"),D1=o(e=>{var i,s,a;let t=(i=e==null?void 0:e.enterprise)==null?void 0:i.floorText;if(!t)return!0;let r=Object.entries(e.space).reduce((f,[p,d])=>(f[p]=new Set((d?d.features:[]).map(l=>l.properties.id)),f),{}),n=Object.entries(e.obstruction).reduce((f,[p,d])=>(f[p]=new Set((d?d.features:[]).filter(l=>l.geometry.type==="Polygon").map(l=>l.properties.id)),f),{});for(let[f,p]of Object.entries(t))if(p){for(let d of p.features)if(Zu(d)){let l=d.properties.geometryId;if(l.startsWith("o_")&&!((s=n[f])!=null&&s.has(l)))throw new Aa(l,f);if(l.startsWith("s_")&&!((a=r[f])!=null&&a.has(l)))throw new va(l,f)}}return!0},"validateFloorText"),q1=o(e=>{var i,s;let t=e.floorImages;if(!t)return!0;let r=Object.entries(e.space).reduce((a,[f,p])=>(a[f]=new Set((p?p.features:[]).map(d=>d.properties.id)),a),{}),n=Object.entries(e.obstruction).reduce((a,[f,p])=>(a[f]=new Set((p?p.features:[]).filter(d=>d.geometry.type==="Polygon").map(d=>d.properties.id)),a),{});for(let[a,f]of Object.entries(t))if(f){for(let p of f.features)if(Zu(p)){let d=p.properties.anchorId;if(d.startsWith("o_")&&!((i=n[a])!=null&&i.has(d)))throw new ja(d,a);if(d.startsWith("s_")&&!((s=r[a])!=null&&s.has(d)))throw new Ta(d,a)}}return!0},"validateFloorImages"),K1=o(e=>{var n,i;if(!e.textAreas)return!0;let t=Object.entries(e.space).reduce((s,[a,f])=>(s[a]=new Set((f?f.features:[]).map(p=>p.properties.id)),s),{}),r=Object.entries(e.obstruction).reduce((s,[a,f])=>(s[a]=new Set((f?f.features:[]).map(p=>p.properties.id)),s),{});for(let[s,a]of Object.entries(e.textAreas))if(a)for(let f of a.features)if("anchorId"in f.properties){let p=f.properties.anchorId;if(p.startsWith("s_")){if(!((n=t[s])!=null&&n.has(p)))throw new ka(p,s)}else if(p.startsWith("o_")){if(!((i=r[s])!=null&&i.has(p)))throw new Ca(p,s)}else throw new Error("Invalid text area anchor ID: ".concat(p))}else if("verticalOffset"in f.properties){if(f.properties.verticalOffset<0)throw new Error("Invalid vertical offset for floating text area: ".concat(f.properties.verticalOffset))}else throw new Error("Invalid text area properties: ".concat(JSON.stringify(f.properties)));return!0},"validateTextAreas"),z1=o(e=>{var p,d,l,m,g,b,P,F;if(!e.enterprise)return!0;let t=e.enterprise;if(t.venue.tzid)try{new Intl.DateTimeFormat("en",{timeZone:t.venue.tzid})}catch(w){throw new qa(t.venue.tzid)}let r=new Set(t.locations.map(w=>w.id));if(t.venue.topLocations){for(let w of t.venue.topLocations)if(!r.has(w))throw new ns(w)}let n=new Set((p=e["floor.geojson"])==null?void 0:p.features.map(w=>w.properties.id));if(t.venue.defaultFloor&&!n.has(t.venue.defaultFloor))throw new os(t.venue.defaultFloor);let i={};for(let[w,O]of Object.entries((d=e.space)!=null?d:{}))i[w]=new Set(O==null?void 0:O.features.map(N=>N.properties.id));for(let w of t.locations)for(let O of(l=w.spaces)!=null?l:[]){let{floor:N,id:A}=O;if(!n.has(N))throw new os(N);if(!((m=i[N])!=null&&m.has(A))){let k=Array.from(n.values()).map(R=>{var V;return(V=i[R])!=null&&V.has(A)?R:null}).find(R=>R!==null);throw k!=null?new Ua(w.id,A,N,k):new Ma(w.id,A,N)}}for(let w of t.layers)for(let{spaceId:O,floorId:N}of w.spaces)if(!((g=i[N])!=null&&g.has(O)))throw new _a(O,N);for(let[w,O]of Object.entries(t.enterpriseStyles||{}))for(let{geometryId:N,floorId:A}of O.geometryAnchors)if(!((b=i[A])!=null&&b.has(N)))throw new Na(N,A);for(let w of(P=t.textures)!=null?P:[])for(let O of w.geometryAnchors)if(!((F=i[O.floorId])!=null&&F.has(O.geometryId)))throw new Ra(O.geometryId,O.floorId);let s=new Set(t.categories.map(w=>w.id)),a={};for(let w of t.categories)a[w.id]=new Set(w.children);let f=o((w,O=new Set)=>{if(O.has(w))throw new Da(w);O.add(w);for(let N of a[w]||[])f(N,new Set(O));O.delete(w)},"checkCyclicalReferences");for(let w of t.categories){f(w.id);for(let O of w.children)if(!s.has(O))throw new La(O);for(let O of w.locations)if(!r.has(O))throw new ns(O)}return!0},"validateEnterprise"),G1=o(e=>{if(!e["tileset.json"])return!0;let t=new Set,r=e["tileset.json"];if(t.add(r.default.key),r.others)for(let n of r.others){if(t.has(n.key))throw new Ba(n.key);t.add(n.key)}return!0},"validateTilesets"),Sh=o(e=>_1(e)&&N1(e)&&R1(e)&&C1(e)&&M1(e)&&L1(e)&&U1(e)&&q1(e)&&K1(e)&&D1(e)&&z1(e)&&G1(e),"verifyMvfIntegrity");c();var LP=mu(md(),1),UP=mu(CP(),1);c();var NN=o(e=>{var r;let t=e;return((r=t==null?void 0:t.allOf)==null?void 0:r.length)===2},"isPotentiallyBadSchema");function Ec(e){if(typeof e!="object"||e===null)return e;if(Array.isArray(e))return e.map(Ec);let t=S({},e);for(let[r,n]of Object.entries(t))if(typeof n=="object"&&n!==null){let i=Ec(n);if(NN(i)){let s=i.allOf.findIndex(f=>f.type==="array"),a=i.allOf.findIndex(f=>f.type==="object");if(s!==-1&&a!==-1){t[r]=Y(S({},i),{allOf:[i.allOf[s]]});continue}}t[r]=i}return t}o(Ec,"cleanupInvalidArrayAllOf");var MP={$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 Tc=UP.default.default(new LP.default.default).compile(Ec(MP)),DP=o(e=>Tc(e),"validateMvf"),CN=o(e=>{var t,r;return Tc(e),(r=(t=Tc.errors)==null?void 0:t.map(n=>{let i=Tc.schema.$ref,s=n.instancePath,a=n.message;return"".concat(i).concat(s,": ").concat(a)}))!=null?r:[]},"getMvfValidationErrors");c();c();c();c();c();c();c();c();c();c();c();c();c();var p8="PublicHolidays";c();c();c();c();var MN=o(e=>{if(e==="space"||e==="obstruction"||e==="entrance")return{}},"defaultEntry"),LN=/\.json|\.geojson$/,vc=o((e,t,r)=>{let n=e[t];if(typeof n!="object"||Object.keys(n).length===0)return MN(t);let i={};for(let[s,a]of Object.entries(n)){let f=s.replace(LN,"");i[f]=JSON.parse(r(a))}return i},"rawFolderToParsed"),UN=["floorstack.json","styles.json","shapes.json","mapstack.json","floor.geojson","tileset.json","location.json","category.json"],DN=UN,qN=["annotation","textAreas","enterprise","floorImages","shapeInstances","modelInstances","window","area","facade"],KN=qN,zN=o(e=>{let t=new TextDecoder("utf-8"),r=t.decode.bind(t),n={"manifest.geojson":JSON.parse(r(e["manifest.geojson"])),"mapstack.geojson":JSON.parse(r(e["mapstack.geojson"])),"map.geojson":JSON.parse(r(e["map.geojson"])),"node.geojson":JSON.parse(r(e["node.geojson"])),"connection.json":JSON.parse(r(e["connection.json"])),space:vc(e,"space",r),obstruction:vc(e,"obstruction",r),entrance:vc(e,"entrance",r)};for(let i of DN)e[i]&&(n[i]=JSON.parse(r(e[i])));for(let i of KN)e[i]&&(n[i]=vc(e,i,r));return n},"rawToParsedMVF");c();c();c();c();c();c();var Pe={};go(Pe,{HasPropertyKey:()=>GN,IsArray:()=>zt,IsAsyncIterator:()=>$d,IsBigInt:()=>Rs,IsBoolean:()=>io,IsDate:()=>vo,IsFunction:()=>wd,IsIterator:()=>Pd,IsNull:()=>Od,IsNumber:()=>Br,IsObject:()=>Je,IsRegExp:()=>Cs,IsString:()=>et,IsSymbol:()=>Fd,IsUint8Array:()=>jn,IsUndefined:()=>ut});c();function GN(e,t){return t in e}o(GN,"HasPropertyKey");function $d(e){return Je(e)&&!zt(e)&&!jn(e)&&Symbol.asyncIterator in e}o($d,"IsAsyncIterator");function zt(e){return Array.isArray(e)}o(zt,"IsArray");function Rs(e){return typeof e=="bigint"}o(Rs,"IsBigInt");function io(e){return typeof e=="boolean"}o(io,"IsBoolean");function vo(e){return e instanceof globalThis.Date}o(vo,"IsDate");function wd(e){return typeof e=="function"}o(wd,"IsFunction");function Pd(e){return Je(e)&&!zt(e)&&!jn(e)&&Symbol.iterator in e}o(Pd,"IsIterator");function Od(e){return e===null}o(Od,"IsNull");function Br(e){return typeof e=="number"}o(Br,"IsNumber");function Je(e){return typeof e=="object"&&e!==null}o(Je,"IsObject");function Cs(e){return e instanceof globalThis.RegExp}o(Cs,"IsRegExp");function et(e){return typeof e=="string"}o(et,"IsString");function Fd(e){return typeof e=="symbol"}o(Fd,"IsSymbol");function jn(e){return e instanceof globalThis.Uint8Array}o(jn,"IsUint8Array");function ut(e){return e===void 0}o(ut,"IsUndefined");function BN(e){return e.map(t=>Ac(t))}o(BN,"ArrayType");function VN(e){return new Date(e.getTime())}o(VN,"DateType");function WN(e){return new Uint8Array(e)}o(WN,"Uint8ArrayType");function HN(e){return new RegExp(e.source,e.flags)}o(HN,"RegExpType");function ZN(e){let t={};for(let r of Object.getOwnPropertyNames(e))t[r]=Ac(e[r]);for(let r of Object.getOwnPropertySymbols(e))t[r]=Ac(e[r]);return t}o(ZN,"ObjectType");function Ac(e){return zt(e)?BN(e):vo(e)?VN(e):jn(e)?WN(e):Cs(e)?HN(e):Je(e)?ZN(e):e}o(Ac,"Visit");function it(e){return Ac(e)}o(it,"Clone");function qP(e){return e.map(t=>Ms(t))}o(qP,"CloneRest");function Ms(e,t){return t===void 0?it(e):it(S(S({},t),e))}o(Ms,"CloneType");c();c();c();function jc(e){return pe(e)&&Symbol.asyncIterator in e}o(jc,"IsAsyncIterator");function kc(e){return pe(e)&&Symbol.iterator in e}o(kc,"IsIterator");function Sd(e){return pe(e)&&(Object.getPrototypeOf(e)===Object.prototype||Object.getPrototypeOf(e)===null)}o(Sd,"IsStandardObject");function _c(e){return e instanceof Promise}o(_c,"IsPromise");function Qt(e){return e instanceof Date&&Number.isFinite(e.getTime())}o(Qt,"IsDate");function KP(e){return e instanceof globalThis.Map}o(KP,"IsMap");function zP(e){return e instanceof globalThis.Set}o(zP,"IsSet");function Or(e){return ArrayBuffer.isView(e)}o(Or,"IsTypedArray");function hi(e){return e instanceof globalThis.Uint8Array}o(hi,"IsUint8Array");function oe(e,t){return t in e}o(oe,"HasPropertyKey");function pe(e){return e!==null&&typeof e=="object"}o(pe,"IsObject");function ue(e){return Array.isArray(e)&&!ArrayBuffer.isView(e)}o(ue,"IsArray");function pt(e){return e===void 0}o(pt,"IsUndefined");function kn(e){return e===null}o(kn,"IsNull");function cn(e){return typeof e=="boolean"}o(cn,"IsBoolean");function re(e){return typeof e=="number"}o(re,"IsNumber");function Nc(e){return Number.isInteger(e)}o(Nc,"IsInteger");function Nt(e){return typeof e=="bigint"}o(Nt,"IsBigInt");function Oe(e){return typeof e=="string"}o(Oe,"IsString");function so(e){return typeof e=="function"}o(so,"IsFunction");function _n(e){return typeof e=="symbol"}o(_n,"IsSymbol");function Rt(e){return Nt(e)||cn(e)||kn(e)||re(e)||Oe(e)||_n(e)||pt(e)}o(Rt,"IsValueType");var ze;(function(e){e.InstanceMode="default",e.ExactOptionalPropertyTypes=!1,e.AllowArrayObject=!1,e.AllowNaN=!1,e.AllowNullVoid=!1;function t(a,f){return e.ExactOptionalPropertyTypes?f in a:a[f]!==void 0}o(t,"IsExactOptionalProperty"),e.IsExactOptionalProperty=t;function r(a){let f=pe(a);return e.AllowArrayObject?f:f&&!ue(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?re(a):Number.isFinite(a)}o(i,"IsNumberLike"),e.IsNumberLike=i;function s(a){let f=pt(a);return e.AllowNullVoid?f||a===null:f}o(s,"IsVoidLike"),e.IsVoidLike=s})(ze||(ze={}));c();function JN(e){return globalThis.Object.freeze(e).map(t=>Ls(t))}o(JN,"ImmutableArray");function YN(e){let t={};for(let r of Object.getOwnPropertyNames(e))t[r]=Ls(e[r]);for(let r of Object.getOwnPropertySymbols(e))t[r]=Ls(e[r]);return globalThis.Object.freeze(t)}o(YN,"ImmutableObject");function Ls(e){return zt(e)?JN(e):vo(e)?e:jn(e)?e:Cs(e)?e:Je(e)?YN(e):e}o(Ls,"Immutable");function j(e,t){let r=t!==void 0?S(S({},t),e):e;switch(ze.InstanceMode){case"freeze":return Ls(r);case"clone":return it(r);default:return r}}o(j,"CreateType");c();var Ed=class Ed extends Error{constructor(t){super(t)}};o(Ed,"TypeBoxError");var ne=Ed;c();c();c();var st=Symbol.for("TypeBox.Transform"),Nn=Symbol.for("TypeBox.Readonly"),er=Symbol.for("TypeBox.Optional"),Fr=Symbol.for("TypeBox.Hint"),E=Symbol.for("TypeBox.Kind");function GP(e){return Je(e)&&e[Nn]==="Readonly"}o(GP,"IsReadonly");function fn(e){return Je(e)&&e[er]==="Optional"}o(fn,"IsOptional");function Td(e){return Ae(e,"Any")}o(Td,"IsAny");function Rn(e){return Ae(e,"Array")}o(Rn,"IsArray");function Us(e){return Ae(e,"AsyncIterator")}o(Us,"IsAsyncIterator");function vd(e){return Ae(e,"BigInt")}o(vd,"IsBigInt");function Ad(e){return Ae(e,"Boolean")}o(Ad,"IsBoolean");function Ds(e){return Ae(e,"Constructor")}o(Ds,"IsConstructor");function XN(e){return Ae(e,"Date")}o(XN,"IsDate");function qs(e){return Ae(e,"Function")}o(qs,"IsFunction");function Ao(e){return Ae(e,"Integer")}o(Ao,"IsInteger");function It(e){return Ae(e,"Intersect")}o(It,"IsIntersect");function Ks(e){return Ae(e,"Iterator")}o(Ks,"IsIterator");function Ae(e,t){return Je(e)&&E in e&&e[E]===t}o(Ae,"IsKindOf");function Cn(e){return Ae(e,"Literal")}o(Cn,"IsLiteral");function dr(e){return Ae(e,"MappedKey")}o(dr,"IsMappedKey");function at(e){return Ae(e,"MappedResult")}o(at,"IsMappedResult");function ao(e){return Ae(e,"Never")}o(ao,"IsNever");function QN(e){return Ae(e,"Not")}o(QN,"IsNot");function eR(e){return Ae(e,"Null")}o(eR,"IsNull");function jo(e){return Ae(e,"Number")}o(jo,"IsNumber");function Et(e){return Ae(e,"Object")}o(Et,"IsObject");function ko(e){return Ae(e,"Promise")}o(ko,"IsPromise");function jd(e){return Ae(e,"Record")}o(jd,"IsRecord");function kd(e){return Ae(e,"Ref")}o(kd,"IsRef");function _d(e){return Ae(e,"RegExp")}o(_d,"IsRegExp");function zs(e){return Ae(e,"String")}o(zs,"IsString");function tR(e){return Ae(e,"Symbol")}o(tR,"IsSymbol");function mr(e){return Ae(e,"TemplateLiteral")}o(mr,"IsTemplateLiteral");function rR(e){return Ae(e,"This")}o(rR,"IsThis");function gi(e){return Je(e)&&st in e}o(gi,"IsTransform");function Vr(e){return Ae(e,"Tuple")}o(Vr,"IsTuple");function nR(e){return Ae(e,"Undefined")}o(nR,"IsUndefined");function Ue(e){return Ae(e,"Union")}o(Ue,"IsUnion");function oR(e){return Ae(e,"Uint8Array")}o(oR,"IsUint8Array");function iR(e){return Ae(e,"Unknown")}o(iR,"IsUnknown");function sR(e){return Ae(e,"Unsafe")}o(sR,"IsUnsafe");function aR(e){return Ae(e,"Void")}o(aR,"IsVoid");function co(e){return Je(e)&&E in e&&et(e[E])}o(co,"IsKind");function Wr(e){return Td(e)||Rn(e)||Ad(e)||vd(e)||Us(e)||Ds(e)||XN(e)||qs(e)||Ao(e)||It(e)||Ks(e)||Cn(e)||dr(e)||at(e)||ao(e)||QN(e)||eR(e)||jo(e)||Et(e)||ko(e)||jd(e)||kd(e)||_d(e)||zs(e)||tR(e)||mr(e)||rR(e)||Vr(e)||nR(e)||Ue(e)||oR(e)||iR(e)||sR(e)||aR(e)||co(e)}o(Wr,"IsSchema");var x={};go(x,{IsAny:()=>HP,IsArray:()=>ZP,IsAsyncIterator:()=>JP,IsBigInt:()=>YP,IsBoolean:()=>XP,IsConstructor:()=>QP,IsDate:()=>eO,IsFunction:()=>tO,IsInteger:()=>rO,IsIntersect:()=>nO,IsIterator:()=>oO,IsKind:()=>TO,IsKindOf:()=>Se,IsLiteral:()=>Bs,IsLiteralBoolean:()=>dR,IsLiteralNumber:()=>sO,IsLiteralString:()=>iO,IsLiteralValue:()=>aO,IsMappedKey:()=>cO,IsMappedResult:()=>fO,IsNever:()=>uO,IsNot:()=>pO,IsNull:()=>lO,IsNumber:()=>dO,IsObject:()=>mO,IsOptional:()=>lR,IsPromise:()=>yO,IsProperties:()=>Md,IsReadonly:()=>pR,IsRecord:()=>hO,IsRecursive:()=>mR,IsRef:()=>gO,IsRegExp:()=>IO,IsSchema:()=>Fe,IsString:()=>xO,IsSymbol:()=>bO,IsTemplateLiteral:()=>$O,IsThis:()=>wO,IsTransform:()=>tt,IsTuple:()=>PO,IsUint8Array:()=>OO,IsUndefined:()=>Ii,IsUnion:()=>Ld,IsUnionLiteral:()=>yR,IsUnknown:()=>FO,IsUnsafe:()=>SO,IsVoid:()=>EO,TypeGuardUnknownTypeError:()=>Nd});c();var Ud=class Ud extends ne{};o(Ud,"TypeGuardUnknownTypeError");var Nd=Ud,cR=["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 BP(e){try{return new RegExp(e),!0}catch(t){return!1}}o(BP,"IsPattern");function Rd(e){if(!et(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(Rd,"IsControlCharacterFree");function VP(e){return Cd(e)||Fe(e)}o(VP,"IsAdditionalProperties");function Gs(e){return ut(e)||Rs(e)}o(Gs,"IsOptionalBigInt");function Qe(e){return ut(e)||Br(e)}o(Qe,"IsOptionalNumber");function Cd(e){return ut(e)||io(e)}o(Cd,"IsOptionalBoolean");function Ge(e){return ut(e)||et(e)}o(Ge,"IsOptionalString");function fR(e){return ut(e)||et(e)&&Rd(e)&&BP(e)}o(fR,"IsOptionalPattern");function uR(e){return ut(e)||et(e)&&Rd(e)}o(uR,"IsOptionalFormat");function WP(e){return ut(e)||Fe(e)}o(WP,"IsOptionalSchema");function pR(e){return Je(e)&&e[Nn]==="Readonly"}o(pR,"IsReadonly");function lR(e){return Je(e)&&e[er]==="Optional"}o(lR,"IsOptional");function HP(e){return Se(e,"Any")&&Ge(e.$id)}o(HP,"IsAny");function ZP(e){return Se(e,"Array")&&e.type==="array"&&Ge(e.$id)&&Fe(e.items)&&Qe(e.minItems)&&Qe(e.maxItems)&&Cd(e.uniqueItems)&&WP(e.contains)&&Qe(e.minContains)&&Qe(e.maxContains)}o(ZP,"IsArray");function JP(e){return Se(e,"AsyncIterator")&&e.type==="AsyncIterator"&&Ge(e.$id)&&Fe(e.items)}o(JP,"IsAsyncIterator");function YP(e){return Se(e,"BigInt")&&e.type==="bigint"&&Ge(e.$id)&&Gs(e.exclusiveMaximum)&&Gs(e.exclusiveMinimum)&&Gs(e.maximum)&&Gs(e.minimum)&&Gs(e.multipleOf)}o(YP,"IsBigInt");function XP(e){return Se(e,"Boolean")&&e.type==="boolean"&&Ge(e.$id)}o(XP,"IsBoolean");function QP(e){return Se(e,"Constructor")&&e.type==="Constructor"&&Ge(e.$id)&&zt(e.parameters)&&e.parameters.every(t=>Fe(t))&&Fe(e.returns)}o(QP,"IsConstructor");function eO(e){return Se(e,"Date")&&e.type==="Date"&&Ge(e.$id)&&Qe(e.exclusiveMaximumTimestamp)&&Qe(e.exclusiveMinimumTimestamp)&&Qe(e.maximumTimestamp)&&Qe(e.minimumTimestamp)&&Qe(e.multipleOfTimestamp)}o(eO,"IsDate");function tO(e){return Se(e,"Function")&&e.type==="Function"&&Ge(e.$id)&&zt(e.parameters)&&e.parameters.every(t=>Fe(t))&&Fe(e.returns)}o(tO,"IsFunction");function rO(e){return Se(e,"Integer")&&e.type==="integer"&&Ge(e.$id)&&Qe(e.exclusiveMaximum)&&Qe(e.exclusiveMinimum)&&Qe(e.maximum)&&Qe(e.minimum)&&Qe(e.multipleOf)}o(rO,"IsInteger");function Md(e){return Je(e)&&Object.entries(e).every(([t,r])=>Rd(t)&&Fe(r))}o(Md,"IsProperties");function nO(e){return Se(e,"Intersect")&&!(et(e.type)&&e.type!=="object")&&zt(e.allOf)&&e.allOf.every(t=>Fe(t)&&!tt(t))&&Ge(e.type)&&(Cd(e.unevaluatedProperties)||WP(e.unevaluatedProperties))&&Ge(e.$id)}o(nO,"IsIntersect");function oO(e){return Se(e,"Iterator")&&e.type==="Iterator"&&Ge(e.$id)&&Fe(e.items)}o(oO,"IsIterator");function Se(e,t){return Je(e)&&E in e&&e[E]===t}o(Se,"IsKindOf");function iO(e){return Bs(e)&&et(e.const)}o(iO,"IsLiteralString");function sO(e){return Bs(e)&&Br(e.const)}o(sO,"IsLiteralNumber");function dR(e){return Bs(e)&&io(e.const)}o(dR,"IsLiteralBoolean");function Bs(e){return Se(e,"Literal")&&Ge(e.$id)&&aO(e.const)}o(Bs,"IsLiteral");function aO(e){return io(e)||Br(e)||et(e)}o(aO,"IsLiteralValue");function cO(e){return Se(e,"MappedKey")&&zt(e.keys)&&e.keys.every(t=>Br(t)||et(t))}o(cO,"IsMappedKey");function fO(e){return Se(e,"MappedResult")&&Md(e.properties)}o(fO,"IsMappedResult");function uO(e){return Se(e,"Never")&&Je(e.not)&&Object.getOwnPropertyNames(e.not).length===0}o(uO,"IsNever");function pO(e){return Se(e,"Not")&&Fe(e.not)}o(pO,"IsNot");function lO(e){return Se(e,"Null")&&e.type==="null"&&Ge(e.$id)}o(lO,"IsNull");function dO(e){return Se(e,"Number")&&e.type==="number"&&Ge(e.$id)&&Qe(e.exclusiveMaximum)&&Qe(e.exclusiveMinimum)&&Qe(e.maximum)&&Qe(e.minimum)&&Qe(e.multipleOf)}o(dO,"IsNumber");function mO(e){return Se(e,"Object")&&e.type==="object"&&Ge(e.$id)&&Md(e.properties)&&VP(e.additionalProperties)&&Qe(e.minProperties)&&Qe(e.maxProperties)}o(mO,"IsObject");function yO(e){return Se(e,"Promise")&&e.type==="Promise"&&Ge(e.$id)&&Fe(e.item)}o(yO,"IsPromise");function hO(e){return Se(e,"Record")&&e.type==="object"&&Ge(e.$id)&&VP(e.additionalProperties)&&Je(e.patternProperties)&&(t=>{let r=Object.getOwnPropertyNames(t.patternProperties);return r.length===1&&BP(r[0])&&Je(t.patternProperties)&&Fe(t.patternProperties[r[0]])})(e)}o(hO,"IsRecord");function mR(e){return Je(e)&&Fr in e&&e[Fr]==="Recursive"}o(mR,"IsRecursive");function gO(e){return Se(e,"Ref")&&Ge(e.$id)&&et(e.$ref)}o(gO,"IsRef");function IO(e){return Se(e,"RegExp")&&Ge(e.$id)&&et(e.source)&&et(e.flags)&&Qe(e.maxLength)&&Qe(e.minLength)}o(IO,"IsRegExp");function xO(e){return Se(e,"String")&&e.type==="string"&&Ge(e.$id)&&Qe(e.minLength)&&Qe(e.maxLength)&&fR(e.pattern)&&uR(e.format)}o(xO,"IsString");function bO(e){return Se(e,"Symbol")&&e.type==="symbol"&&Ge(e.$id)}o(bO,"IsSymbol");function $O(e){return Se(e,"TemplateLiteral")&&e.type==="string"&&et(e.pattern)&&e.pattern[0]==="^"&&e.pattern[e.pattern.length-1]==="$"}o($O,"IsTemplateLiteral");function wO(e){return Se(e,"This")&&Ge(e.$id)&&et(e.$ref)}o(wO,"IsThis");function tt(e){return Je(e)&&st in e}o(tt,"IsTransform");function PO(e){return Se(e,"Tuple")&&e.type==="array"&&Ge(e.$id)&&Br(e.minItems)&&Br(e.maxItems)&&e.minItems===e.maxItems&&(ut(e.items)&&ut(e.additionalItems)&&e.minItems===0||zt(e.items)&&e.items.every(t=>Fe(t)))}o(PO,"IsTuple");function Ii(e){return Se(e,"Undefined")&&e.type==="undefined"&&Ge(e.$id)}o(Ii,"IsUndefined");function yR(e){return Ld(e)&&e.anyOf.every(t=>iO(t)||sO(t))}o(yR,"IsUnionLiteral");function Ld(e){return Se(e,"Union")&&Ge(e.$id)&&Je(e)&&zt(e.anyOf)&&e.anyOf.every(t=>Fe(t))}o(Ld,"IsUnion");function OO(e){return Se(e,"Uint8Array")&&e.type==="Uint8Array"&&Ge(e.$id)&&Qe(e.minByteLength)&&Qe(e.maxByteLength)}o(OO,"IsUint8Array");function FO(e){return Se(e,"Unknown")&&Ge(e.$id)}o(FO,"IsUnknown");function SO(e){return Se(e,"Unsafe")}o(SO,"IsUnsafe");function EO(e){return Se(e,"Void")&&e.type==="void"&&Ge(e.$id)}o(EO,"IsVoid");function TO(e){return Je(e)&&E in e&&et(e[E])&&!cR.includes(e[E])}o(TO,"IsKind");function Fe(e){return Je(e)&&(HP(e)||ZP(e)||XP(e)||YP(e)||JP(e)||QP(e)||eO(e)||tO(e)||rO(e)||nO(e)||oO(e)||Bs(e)||cO(e)||fO(e)||uO(e)||pO(e)||lO(e)||dO(e)||mO(e)||yO(e)||hO(e)||gO(e)||IO(e)||xO(e)||bO(e)||$O(e)||wO(e)||PO(e)||Ii(e)||Ld(e)||OO(e)||FO(e)||SO(e)||EO(e)||TO(e))}o(Fe,"IsSchema");c();var Dd="(true|false)",Vs="(0|[1-9][0-9]*)",qd="(.*)",hR="(?!.*)",bB="^".concat(Dd,"$"),Mn="^".concat(Vs,"$"),Ln="^".concat(qd,"$"),vO="^".concat(hR,"$");c();var tr={};go(tr,{Clear:()=>IR,Delete:()=>xR,Entries:()=>gR,Get:()=>wR,Has:()=>bR,Set:()=>$R});c();var xi=new Map;function gR(){return new Map(xi)}o(gR,"Entries");function IR(){return xi.clear()}o(IR,"Clear");function xR(e){return xi.delete(e)}o(xR,"Delete");function bR(e){return xi.has(e)}o(bR,"Has");function $R(e,t){xi.set(e,t)}o($R,"Set");function wR(e){return xi.get(e)}o(wR,"Get");var Tt={};go(Tt,{Clear:()=>OR,Delete:()=>FR,Entries:()=>PR,Get:()=>TR,Has:()=>SR,Set:()=>ER});c();var bi=new Map;function PR(){return new Map(bi)}o(PR,"Entries");function OR(){return bi.clear()}o(OR,"Clear");function FR(e){return bi.delete(e)}o(FR,"Delete");function SR(e){return bi.has(e)}o(SR,"Has");function ER(e,t){bi.set(e,t)}o(ER,"Set");function TR(e){return bi.get(e)}o(TR,"Get");c();function AO(e,t){return e.includes(t)}o(AO,"SetIncludes");function jO(e){return[...new Set(e)]}o(jO,"SetDistinct");function vR(e,t){return e.filter(r=>t.includes(r))}o(vR,"SetIntersect");function AR(e,t){return e.reduce((r,n)=>vR(r,n),t)}o(AR,"SetIntersectManyResolve");function kO(e){return e.length===1?e[0]:e.length>1?AR(e.slice(1),e[0]):[]}o(kO,"SetIntersectMany");function _O(e){let t=[];for(let r of e)t.push(...r);return t}o(_O,"SetUnionMany");c();function fo(e){return j({[E]:"Any"},e)}o(fo,"Any");c();function Rc(e,t){return j({[E]:"Array",type:"array",items:e},t)}o(Rc,"Array");c();function Cc(e,t){return j({[E]:"AsyncIterator",type:"AsyncIterator",items:e},t)}o(Cc,"AsyncIterator");c();c();c();function jR(e,t){let i=e,{[t]:r}=i;return Yo(i,[ma(t)])}o(jR,"DiscardKey");function mt(e,t){return t.reduce((r,n)=>jR(r,n),e)}o(mt,"Discard");c();function Be(e){return j({[E]:"Never",not:{}},e)}o(Be,"Never");c();c();function je(e){return j({[E]:"MappedResult",properties:e})}o(je,"MappedResult");c();c();function Mc(e,t,r){return j({[E]:"Constructor",type:"Constructor",parameters:e,returns:t},r)}o(Mc,"Constructor");c();function uo(e,t,r){return j({[E]:"Function",type:"Function",parameters:e,returns:t},r)}o(uo,"Function");c();c();c();c();function Ws(e,t){return j({[E]:"Union",anyOf:e},t)}o(Ws,"UnionCreate");function kR(e){return e.some(t=>fn(t))}o(kR,"IsUnionOptional");function NO(e){return e.map(t=>fn(t)?_R(t):t)}o(NO,"RemoveOptionalFromRest");function _R(e){return mt(e,[er])}o(_R,"RemoveOptionalFromType");function NR(e,t){return kR(e)?cr(Ws(NO(e),t)):Ws(NO(e),t)}o(NR,"ResolveUnion");function un(e,t){return e.length===0?Be(t):e.length===1?j(e[0],t):NR(e,t)}o(un,"UnionEvaluated");c();function Ve(e,t){return e.length===0?Be(t):e.length===1?j(e[0],t):Ws(e,t)}o(Ve,"Union");c();c();c();var zd=class zd extends ne{};o(zd,"TemplateLiteralParserError");var Lc=zd;function RR(e){return e.replace(/\\\$/g,"$").replace(/\\\*/g,"*").replace(/\\\^/g,"^").replace(/\\\|/g,"|").replace(/\\\(/g,"(").replace(/\\\)/g,")")}o(RR,"Unescape");function Kd(e,t,r){return e[t]===r&&e.charCodeAt(t-1)!==92}o(Kd,"IsNonEscaped");function Un(e,t){return Kd(e,t,"(")}o(Un,"IsOpenParen");function Hs(e,t){return Kd(e,t,")")}o(Hs,"IsCloseParen");function RO(e,t){return Kd(e,t,"|")}o(RO,"IsSeparator");function CR(e){if(!(Un(e,0)&&Hs(e,e.length-1)))return!1;let t=0;for(let r=0;r<e.length;r++)if(Un(e,r)&&(t+=1),Hs(e,r)&&(t-=1),t===0&&r!==e.length-1)return!1;return!0}o(CR,"IsGroup");function MR(e){return e.slice(1,e.length-1)}o(MR,"InGroup");function LR(e){let t=0;for(let r=0;r<e.length;r++)if(Un(e,r)&&(t+=1),Hs(e,r)&&(t-=1),RO(e,r)&&t===0)return!0;return!1}o(LR,"IsPrecedenceOr");function UR(e){for(let t=0;t<e.length;t++)if(Un(e,t))return!0;return!1}o(UR,"IsPrecedenceAnd");function DR(e){let[t,r]=[0,0],n=[];for(let s=0;s<e.length;s++)if(Un(e,s)&&(t+=1),Hs(e,s)&&(t-=1),RO(e,s)&&t===0){let a=e.slice(r,s);a.length>0&&n.push($i(a)),r=s+1}let i=e.slice(r);return i.length>0&&n.push($i(i)),n.length===0?{type:"const",const:""}:n.length===1?n[0]:{type:"or",expr:n}}o(DR,"Or");function qR(e){function t(i,s){if(!Un(i,s))throw new Lc("TemplateLiteralParser: Index must point to open parens");let a=0;for(let f=s;f<i.length;f++)if(Un(i,f)&&(a+=1),Hs(i,f)&&(a-=1),a===0)return[s,f];throw new Lc("TemplateLiteralParser: Unclosed group parens in expression")}o(t,"Group");function r(i,s){for(let a=s;a<i.length;a++)if(Un(i,a))return[s,a];return[s,i.length]}o(r,"Range");let n=[];for(let i=0;i<e.length;i++)if(Un(e,i)){let[s,a]=t(e,i),f=e.slice(s,a+1);n.push($i(f)),i=a}else{let[s,a]=r(e,i),f=e.slice(s,a);f.length>0&&n.push($i(f)),i=a-1}return n.length===0?{type:"const",const:""}:n.length===1?n[0]:{type:"and",expr:n}}o(qR,"And");function $i(e){return CR(e)?$i(MR(e)):LR(e)?DR(e):UR(e)?qR(e):{type:"const",const:RR(e)}}o($i,"TemplateLiteralParse");function wi(e){return $i(e.slice(1,e.length-1))}o(wi,"TemplateLiteralParseExact");var Bd=class Bd extends ne{};o(Bd,"TemplateLiteralFiniteError");var Gd=Bd;function KR(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(KR,"IsNumberExpression");function zR(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(zR,"IsBooleanExpression");function GR(e){return e.type==="const"&&e.const===".*"}o(GR,"IsStringExpression");function _o(e){return KR(e)||GR(e)?!1:zR(e)?!0:e.type==="and"?e.expr.every(t=>_o(t)):e.type==="or"?e.expr.every(t=>_o(t)):e.type==="const"?!0:(()=>{throw new Gd("Unknown expression type")})()}o(_o,"IsTemplateLiteralExpressionFinite");function Uc(e){let t=wi(e.pattern);return _o(t)}o(Uc,"IsTemplateLiteralFinite");c();var Wd=class Wd extends ne{};o(Wd,"TemplateLiteralGenerateError");var Vd=Wd;function*CO(e){if(e.length===1)return yield*C(e[0]);for(let t of e[0])for(let r of CO(e.slice(1)))yield"".concat(t).concat(r)}o(CO,"GenerateReduce");function*BR(e){return yield*C(CO(e.expr.map(t=>[...Zs(t)])))}o(BR,"GenerateAnd");function*VR(e){for(let t of e.expr)yield*C(Zs(t))}o(VR,"GenerateOr");function*WR(e){return yield e.const}o(WR,"GenerateConst");function*Zs(e){return e.type==="and"?yield*C(BR(e)):e.type==="or"?yield*C(VR(e)):e.type==="const"?yield*C(WR(e)):(()=>{throw new Vd("Unknown expression")})()}o(Zs,"TemplateLiteralExpressionGenerate");function Pi(e){let t=wi(e.pattern);return _o(t)?[...Zs(t)]:[]}o(Pi,"TemplateLiteralGenerate");c();c();function De(e,t){return j({[E]:"Literal",const:e,type:typeof e},t)}o(De,"Literal");c();function Dc(e){return j({[E]:"Boolean",type:"boolean"},e)}o(Dc,"Boolean");c();function Oi(e){return j({[E]:"BigInt",type:"bigint"},e)}o(Oi,"BigInt");c();function pn(e){return j({[E]:"Number",type:"number"},e)}o(pn,"Number");c();function Sr(e){return j({[E]:"String",type:"string"},e)}o(Sr,"String");function*HR(e){let t=e.trim().replace(/"|'/g,"");return t==="boolean"?yield Dc():t==="number"?yield pn():t==="bigint"?yield Oi():t==="string"?yield Sr():yield(()=>{let r=t.split("|").map(n=>De(n.trim()));return r.length===0?Be():r.length===1?r[0]:un(r)})()}o(HR,"FromUnion");function*ZR(e){if(e[1]!=="{"){let t=De("$"),r=Hd(e.slice(1));return yield*C([t,...r])}for(let t=2;t<e.length;t++)if(e[t]==="}"){let r=HR(e.slice(2,t)),n=Hd(e.slice(t+1));return yield*C([...r,...n])}yield De(e)}o(ZR,"FromTerminal");function*Hd(e){for(let t=0;t<e.length;t++)if(e[t]==="$"){let r=De(e.slice(0,t)),n=ZR(e.slice(t));return yield*C([r,...n])}yield De(e)}o(Hd,"FromSyntax");function MO(e){return[...Hd(e)]}o(MO,"TemplateLiteralSyntax");c();var Yd=class Yd extends ne{};o(Yd,"TemplateLiteralPatternError");var Zd=Yd;function JR(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}o(JR,"Escape");function LO(e,t){return mr(e)?e.pattern.slice(1,e.pattern.length-1):Ue(e)?"(".concat(e.anyOf.map(r=>LO(r,t)).join("|"),")"):jo(e)?"".concat(t).concat(Vs):Ao(e)?"".concat(t).concat(Vs):vd(e)?"".concat(t).concat(Vs):zs(e)?"".concat(t).concat(qd):Cn(e)?"".concat(t).concat(JR(e.const.toString())):Ad(e)?"".concat(t).concat(Dd):(()=>{throw new Zd("Unexpected Kind '".concat(e[E],"'"))})()}o(LO,"Visit");function Jd(e){return"^".concat(e.map(t=>LO(t,"")).join(""),"$")}o(Jd,"TemplateLiteralPattern");c();function No(e){let r=Pi(e).map(n=>De(n));return un(r)}o(No,"TemplateLiteralToUnion");c();function qc(e,t){let r=et(e)?Jd(MO(e)):Jd(e);return j({[E]:"TemplateLiteral",type:"string",pattern:r},t)}o(qc,"TemplateLiteral");function YR(e){return Pi(e).map(r=>r.toString())}o(YR,"FromTemplateLiteral");function XR(e){let t=[];for(let r of e)t.push(...fr(r));return t}o(XR,"FromUnion");function QR(e){return[e.toString()]}o(QR,"FromLiteral");function fr(e){return[...new Set(mr(e)?YR(e):Ue(e)?XR(e.anyOf):Cn(e)?QR(e.const):jo(e)?["[number]"]:Ao(e)?["[number]"]:[])]}o(fr,"IndexPropertyKeys");c();function eC(e,t,r){let n={};for(let i of Object.getOwnPropertyNames(t))n[i]=Fi(e,fr(t[i]),r);return n}o(eC,"FromProperties");function tC(e,t,r){return eC(e,t.properties,r)}o(tC,"FromMappedResult");function UO(e,t,r){let n=tC(e,t,r);return je(n)}o(UO,"IndexFromMappedResult");function qO(e,t){return e.map(r=>KO(r,t))}o(qO,"FromRest");function rC(e){return e.filter(t=>!ao(t))}o(rC,"FromIntersectRest");function nC(e,t){return Kc(rC(qO(e,t)))}o(nC,"FromIntersect");function oC(e){return e.some(t=>ao(t))?[]:e}o(oC,"FromUnionRest");function iC(e,t){return un(oC(qO(e,t)))}o(iC,"FromUnion");function sC(e,t){return t in e?e[t]:t==="[number]"?un(e):Be()}o(sC,"FromTuple");function aC(e,t){return t==="[number]"?e:Be()}o(aC,"FromArray");function cC(e,t){return t in e?e[t]:Be()}o(cC,"FromProperty");function KO(e,t){var r;return It(e)?nC(e.allOf,t):Ue(e)?iC(e.anyOf,t):Vr(e)?sC((r=e.items)!=null?r:[],t):Rn(e)?aC(e.items,t):Et(e)?cC(e.properties,t):Be()}o(KO,"IndexFromPropertyKey");function Js(e,t){return t.map(r=>KO(e,r))}o(Js,"IndexFromPropertyKeys");function DO(e,t){return un(Js(e,t))}o(DO,"FromSchema");function Fi(e,t,r){return at(t)?UO(e,t,r):dr(t)?zO(e,t,r):j(Wr(t)?DO(e,fr(t)):DO(e,t),r)}o(Fi,"Index");function fC(e,t,r){return{[t]:Fi(e,[t],it(r))}}o(fC,"MappedIndexPropertyKey");function uC(e,t,r){return t.reduce((n,i)=>S(S({},n),fC(e,i,r)),{})}o(uC,"MappedIndexPropertyKeys");function pC(e,t,r){return uC(e,t.keys,r)}o(pC,"MappedIndexProperties");function zO(e,t,r){let n=pC(e,t,r);return je(n)}o(zO,"IndexFromMappedKey");c();function zc(e,t){return j({[E]:"Iterator",type:"Iterator",items:e},t)}o(zc,"Iterator");c();function lC(e){let t=[];for(let r in e)fn(e[r])||t.push(r);return t}o(lC,"RequiredKeys");function dC(e,t){let r=lC(e),n=r.length>0?{[E]:"Object",type:"object",properties:e,required:r}:{[E]:"Object",type:"object",properties:e};return j(n,t)}o(dC,"_Object");var Ye=dC;c();function Gc(e,t){return j({[E]:"Promise",type:"Promise",item:e},t)}o(Gc,"Promise");c();c();function mC(e){return j(mt(e,[Nn]))}o(mC,"RemoveReadonly");function yC(e){return j(Y(S({},e),{[Nn]:"Readonly"}))}o(yC,"AddReadonly");function hC(e,t){return t===!1?mC(e):yC(e)}o(hC,"ReadonlyWithFlag");function Er(e,t){let r=t!=null?t:!0;return at(e)?GO(e,r):hC(e,r)}o(Er,"Readonly");function gC(e,t){let r={};for(let n of globalThis.Object.getOwnPropertyNames(e))r[n]=Er(e[n],t);return r}o(gC,"FromProperties");function IC(e,t){return gC(e.properties,t)}o(IC,"FromMappedResult");function GO(e,t){let r=IC(e,t);return je(r)}o(GO,"ReadonlyFromMappedResult");c();function ln(e,t){return j(e.length>0?{[E]:"Tuple",type:"array",items:e,additionalItems:!1,minItems:e.length,maxItems:e.length}:{[E]:"Tuple",type:"array",minItems:e.length,maxItems:e.length},t)}o(ln,"Tuple");function BO(e,t){return e in t?Tr(e,t[e]):je(t)}o(BO,"FromMappedResult");function xC(e){return{[e]:De(e)}}o(xC,"MappedKeyToKnownMappedResultProperties");function bC(e){let t={};for(let r of e)t[r]=De(r);return t}o(bC,"MappedKeyToUnknownMappedResultProperties");function $C(e,t){return AO(t,e)?xC(e):bC(t)}o($C,"MappedKeyToMappedResultProperties");function wC(e,t){let r=$C(e,t);return BO(e,r)}o(wC,"FromMappedKey");function Ys(e,t){return t.map(r=>Tr(e,r))}o(Ys,"FromRest");function PC(e,t){let r={};for(let n of globalThis.Object.getOwnPropertyNames(t))r[n]=Tr(e,t[n]);return r}o(PC,"FromProperties");function Tr(e,t){var n;let r=S({},t);return fn(t)?cr(Tr(e,mt(t,[er]))):GP(t)?Er(Tr(e,mt(t,[Nn]))):at(t)?BO(e,t.properties):dr(t)?wC(e,t.keys):Ds(t)?Mc(Ys(e,t.parameters),Tr(e,t.returns),r):qs(t)?uo(Ys(e,t.parameters),Tr(e,t.returns),r):Us(t)?Cc(Tr(e,t.items),r):Ks(t)?zc(Tr(e,t.items),r):It(t)?ur(Ys(e,t.allOf),r):Ue(t)?Ve(Ys(e,t.anyOf),r):Vr(t)?ln(Ys(e,(n=t.items)!=null?n:[]),r):Et(t)?Ye(PC(e,t.properties),r):Rn(t)?Rc(Tr(e,t.items),r):ko(t)?Gc(Tr(e,t.item),r):t}o(Tr,"FromSchemaType");function OC(e,t){let r={};for(let n of e)r[n]=Tr(n,t);return r}o(OC,"MappedFunctionReturnType");function VO(e,t,r){let n=Wr(e)?fr(e):e,i=t({[E]:"MappedKey",keys:n}),s=OC(n,i);return Ye(s,r)}o(VO,"Mapped");c();function FC(e){return j(mt(e,[er]))}o(FC,"RemoveOptional");function SC(e){return j(Y(S({},e),{[er]:"Optional"}))}o(SC,"AddOptional");function EC(e,t){return t===!1?FC(e):SC(e)}o(EC,"OptionalWithFlag");function cr(e,t){let r=t!=null?t:!0;return at(e)?WO(e,r):EC(e,r)}o(cr,"Optional");function TC(e,t){let r={};for(let n of globalThis.Object.getOwnPropertyNames(e))r[n]=cr(e[n],t);return r}o(TC,"FromProperties");function vC(e,t){return TC(e.properties,t)}o(vC,"FromMappedResult");function WO(e,t){let r=vC(e,t);return je(r)}o(WO,"OptionalFromMappedResult");c();function Xs(e,t={}){let r=e.every(i=>Et(i)),n=Wr(t.unevaluatedProperties)?{unevaluatedProperties:t.unevaluatedProperties}:{};return j(t.unevaluatedProperties===!1||Wr(t.unevaluatedProperties)||r?Y(S({},n),{[E]:"Intersect",type:"object",allOf:e}):Y(S({},n),{[E]:"Intersect",allOf:e}),t)}o(Xs,"IntersectCreate");function AC(e){return e.every(t=>fn(t))}o(AC,"IsIntersectOptional");function jC(e){return mt(e,[er])}o(jC,"RemoveOptionalFromType");function HO(e){return e.map(t=>fn(t)?jC(t):t)}o(HO,"RemoveOptionalFromRest");function kC(e,t){return AC(e)?cr(Xs(HO(e),t)):Xs(HO(e),t)}o(kC,"ResolveIntersect");function Kc(e,t={}){if(e.length===0)return Be(t);if(e.length===1)return j(e[0],t);if(e.some(r=>gi(r)))throw new Error("Cannot intersect transform types");return kC(e,t)}o(Kc,"IntersectEvaluated");c();function ur(e,t){if(e.length===0)return Be(t);if(e.length===1)return j(e[0],t);if(e.some(r=>gi(r)))throw new Error("Cannot intersect transform types");return Xs(e,t)}o(ur,"Intersect");function ZO(e){return e.map(t=>Xd(t))}o(ZO,"FromRest");function _C(e){return ur(ZO(e))}o(_C,"FromIntersect");function NC(e){return Ve(ZO(e))}o(NC,"FromUnion");function RC(e){return Xd(e)}o(RC,"FromPromise");function Xd(e){return It(e)?_C(e.allOf):Ue(e)?NC(e.anyOf):ko(e)?RC(e.item):e}o(Xd,"AwaitedResolve");function JO(e,t){return j(Xd(e),t)}o(JO,"Awaited");c();c();c();c();function YO(e){let t=[];for(let r of e)t.push(At(r));return t}o(YO,"FromRest");function CC(e){let t=YO(e);return _O(t)}o(CC,"FromIntersect");function MC(e){let t=YO(e);return kO(t)}o(MC,"FromUnion");function LC(e){return e.map((t,r)=>r.toString())}o(LC,"FromTuple");function UC(e){return["[number]"]}o(UC,"FromArray");function DC(e){return globalThis.Object.getOwnPropertyNames(e)}o(DC,"FromProperties");function qC(e){return Qd?globalThis.Object.getOwnPropertyNames(e).map(r=>r[0]==="^"&&r[r.length-1]==="$"?r.slice(1,r.length-1):r):[]}o(qC,"FromPatternProperties");function At(e){var t;return It(e)?CC(e.allOf):Ue(e)?MC(e.anyOf):Vr(e)?LC((t=e.items)!=null?t:[]):Rn(e)?UC(e.items):Et(e)?DC(e.properties):jd(e)?qC(e.patternProperties):[]}o(At,"KeyOfPropertyKeys");var Qd=!1;function Dn(e){Qd=!0;let t=At(e);Qd=!1;let r=t.map(n=>"(".concat(n,")"));return"^(".concat(r.join("|"),")$")}o(Dn,"KeyOfPattern");function KC(e){return e.map(t=>t==="[number]"?pn():De(t))}o(KC,"KeyOfPropertyKeysToRest");function Bc(e,t){if(at(e))return XO(e,t);{let r=At(e),n=KC(r),i=un(n);return j(i,t)}}o(Bc,"KeyOf");function zC(e,t){let r={};for(let n of globalThis.Object.getOwnPropertyNames(e))r[n]=Bc(e[n],it(t));return r}o(zC,"FromProperties");function GC(e,t){return zC(e.properties,t)}o(GC,"FromMappedResult");function XO(e,t){let r=GC(e,t);return je(r)}o(XO,"KeyOfFromMappedResult");c();function po(e){let t=At(e),r=Js(e,t);return t.map((n,i)=>[t[i],r[i]])}o(po,"KeyOfPropertyEntries");function BC(e){let t=[];for(let r of e)t.push(...At(r));return jO(t)}o(BC,"CompositeKeys");function VC(e){return e.filter(t=>!ao(t))}o(VC,"FilterNever");function WC(e,t){let r=[];for(let n of e)r.push(...Js(n,[t]));return VC(r)}o(WC,"CompositeProperty");function HC(e,t){let r={};for(let n of t)r[n]=Kc(WC(e,n));return r}o(HC,"CompositeProperties");function QO(e,t){let r=BC(e),n=HC(e,r);return Ye(n,t)}o(QO,"Composite");c();c();function Vc(e){return j({[E]:"Date",type:"Date"},e)}o(Vc,"Date");c();function Wc(e){return j({[E]:"Null",type:"null"},e)}o(Wc,"Null");c();function Hc(e){return j({[E]:"Symbol",type:"symbol"},e)}o(Hc,"Symbol");c();function Zc(e){return j({[E]:"Undefined",type:"undefined"},e)}o(Zc,"Undefined");c();function Jc(e){return j({[E]:"Uint8Array",type:"Uint8Array"},e)}o(Jc,"Uint8Array");c();function qn(e){return j({[E]:"Unknown"},e)}o(qn,"Unknown");function ZC(e){return e.map(t=>em(t,!1))}o(ZC,"FromArray");function JC(e){let t={};for(let r of globalThis.Object.getOwnPropertyNames(e))t[r]=Er(em(e[r],!1));return t}o(JC,"FromProperties");function Yc(e,t){return t===!0?e:Er(e)}o(Yc,"ConditionalReadonly");function em(e,t){return $d(e)?Yc(fo(),t):Pd(e)?Yc(fo(),t):zt(e)?Er(ln(ZC(e))):jn(e)?Jc():vo(e)?Vc():Je(e)?Yc(Ye(JC(e)),t):wd(e)?Yc(uo([],qn()),t):ut(e)?Zc():Od(e)?Wc():Fd(e)?Hc():Rs(e)?Oi():Br(e)?De(e):io(e)?De(e):et(e)?De(e):Ye({})}o(em,"FromValue");function eF(e,t){return j(em(e,!0),t)}o(eF,"Const");c();function tF(e,t){return ln(e.parameters,t)}o(tF,"ConstructorParameters");c();function Qs(e,t){return e.map(r=>Hr(r,t))}o(Qs,"FromRest");function YC(e,t){let r={};for(let n of globalThis.Object.getOwnPropertyNames(e))r[n]=Hr(e[n],t);return r}o(YC,"FromProperties");function XC(e,t){return e.parameters=Qs(e.parameters,t),e.returns=Hr(e.returns,t),e}o(XC,"FromConstructor");function QC(e,t){return e.parameters=Qs(e.parameters,t),e.returns=Hr(e.returns,t),e}o(QC,"FromFunction");function eM(e,t){return e.allOf=Qs(e.allOf,t),e}o(eM,"FromIntersect");function tM(e,t){return e.anyOf=Qs(e.anyOf,t),e}o(tM,"FromUnion");function rM(e,t){return ut(e.items)||(e.items=Qs(e.items,t)),e}o(rM,"FromTuple");function nM(e,t){return e.items=Hr(e.items,t),e}o(nM,"FromArray");function oM(e,t){return e.properties=YC(e.properties,t),e}o(oM,"FromObject");function iM(e,t){return e.item=Hr(e.item,t),e}o(iM,"FromPromise");function sM(e,t){return e.items=Hr(e.items,t),e}o(sM,"FromAsyncIterator");function aM(e,t){return e.items=Hr(e.items,t),e}o(aM,"FromIterator");function cM(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=mt(r,["$id"]);return Hr(n,t)}o(cM,"FromRef");function fM(e,t){return Ds(e)?XC(e,t):qs(e)?QC(e,t):It(e)?eM(e,t):Ue(e)?tM(e,t):Vr(e)?rM(e,t):Rn(e)?nM(e,t):Et(e)?oM(e,t):ko(e)?iM(e,t):Us(e)?sM(e,t):Ks(e)?aM(e,t):kd(e)?cM(e,t):e}o(fM,"DerefResolve");function Hr(e,t){return fM(Ms(e),qP(t))}o(Hr,"Deref");c();function rF(e,t){if(ut(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=>De(s));return Ve(i,Y(S({},t),{[Fr]:"Enum"}))}o(rF,"Enum");c();c();c();var am=class am extends ne{};o(am,"ExtendsResolverError");var rm=am,v;(function(e){e[e.Union=0]="Union",e[e.True=1]="True",e[e.False=2]="False"})(v||(v={}));function vr(e){return e===v.False?e:v.True}o(vr,"IntoBooleanResult");function Si(e){throw new rm(e)}o(Si,"Throw");function wt(e){return x.IsNever(e)||x.IsIntersect(e)||x.IsUnion(e)||x.IsUnknown(e)||x.IsAny(e)}o(wt,"IsStructuralRight");function Pt(e,t){return x.IsNever(t)?fF(e,t):x.IsIntersect(t)?Xc(e,t):x.IsUnion(t)?sm(e,t):x.IsUnknown(t)?dF(e,t):x.IsAny(t)?im(e,t):Si("StructuralRight")}o(Pt,"StructuralRight");function im(e,t){return v.True}o(im,"FromAnyRight");function uM(e,t){return x.IsIntersect(t)?Xc(e,t):x.IsUnion(t)&&t.anyOf.some(r=>x.IsAny(r)||x.IsUnknown(r))?v.True:x.IsUnion(t)?v.Union:x.IsUnknown(t)||x.IsAny(t)?v.True:v.Union}o(uM,"FromAny");function pM(e,t){return x.IsUnknown(e)?v.False:x.IsAny(e)?v.Union:x.IsNever(e)?v.True:v.False}o(pM,"FromArrayRight");function lM(e,t){return x.IsObject(t)&&Qc(t)?v.True:wt(t)?Pt(e,t):x.IsArray(t)?vr(We(e.items,t.items)):v.False}o(lM,"FromArray");function dM(e,t){return wt(t)?Pt(e,t):x.IsAsyncIterator(t)?vr(We(e.items,t.items)):v.False}o(dM,"FromAsyncIterator");function mM(e,t){return wt(t)?Pt(e,t):x.IsObject(t)?Gt(e,t):x.IsRecord(t)?Ar(e,t):x.IsBigInt(t)?v.True:v.False}o(mM,"FromBigInt");function aF(e,t){return x.IsLiteralBoolean(e)||x.IsBoolean(e)?v.True:v.False}o(aF,"FromBooleanRight");function yM(e,t){return wt(t)?Pt(e,t):x.IsObject(t)?Gt(e,t):x.IsRecord(t)?Ar(e,t):x.IsBoolean(t)?v.True:v.False}o(yM,"FromBoolean");function hM(e,t){return wt(t)?Pt(e,t):x.IsObject(t)?Gt(e,t):x.IsConstructor(t)?e.parameters.length>t.parameters.length?v.False:e.parameters.every((r,n)=>vr(We(t.parameters[n],r))===v.True)?vr(We(e.returns,t.returns)):v.False:v.False}o(hM,"FromConstructor");function gM(e,t){return wt(t)?Pt(e,t):x.IsObject(t)?Gt(e,t):x.IsRecord(t)?Ar(e,t):x.IsDate(t)?v.True:v.False}o(gM,"FromDate");function IM(e,t){return wt(t)?Pt(e,t):x.IsObject(t)?Gt(e,t):x.IsFunction(t)?e.parameters.length>t.parameters.length?v.False:e.parameters.every((r,n)=>vr(We(t.parameters[n],r))===v.True)?vr(We(e.returns,t.returns)):v.False:v.False}o(IM,"FromFunction");function cF(e,t){return x.IsLiteral(e)&&Pe.IsNumber(e.const)||x.IsNumber(e)||x.IsInteger(e)?v.True:v.False}o(cF,"FromIntegerRight");function xM(e,t){return x.IsInteger(t)||x.IsNumber(t)?v.True:wt(t)?Pt(e,t):x.IsObject(t)?Gt(e,t):x.IsRecord(t)?Ar(e,t):v.False}o(xM,"FromInteger");function Xc(e,t){return t.allOf.every(r=>We(e,r)===v.True)?v.True:v.False}o(Xc,"FromIntersectRight");function bM(e,t){return e.allOf.some(r=>We(r,t)===v.True)?v.True:v.False}o(bM,"FromIntersect");function $M(e,t){return wt(t)?Pt(e,t):x.IsIterator(t)?vr(We(e.items,t.items)):v.False}o($M,"FromIterator");function wM(e,t){return x.IsLiteral(t)&&t.const===e.const?v.True:wt(t)?Pt(e,t):x.IsObject(t)?Gt(e,t):x.IsRecord(t)?Ar(e,t):x.IsString(t)?lF(e,t):x.IsNumber(t)?uF(e,t):x.IsInteger(t)?cF(e,t):x.IsBoolean(t)?aF(e,t):v.False}o(wM,"FromLiteral");function fF(e,t){return v.False}o(fF,"FromNeverRight");function PM(e,t){return v.True}o(PM,"FromNever");function nF(e){let[t,r]=[e,0];for(;x.IsNot(t);)t=t.not,r+=1;return r%2===0?t:qn()}o(nF,"UnwrapTNot");function OM(e,t){return x.IsNot(e)?We(nF(e),t):x.IsNot(t)?We(e,nF(t)):Si("Invalid fallthrough for Not")}o(OM,"FromNot");function FM(e,t){return wt(t)?Pt(e,t):x.IsObject(t)?Gt(e,t):x.IsRecord(t)?Ar(e,t):x.IsNull(t)?v.True:v.False}o(FM,"FromNull");function uF(e,t){return x.IsLiteralNumber(e)||x.IsNumber(e)||x.IsInteger(e)?v.True:v.False}o(uF,"FromNumberRight");function SM(e,t){return wt(t)?Pt(e,t):x.IsObject(t)?Gt(e,t):x.IsRecord(t)?Ar(e,t):x.IsInteger(t)||x.IsNumber(t)?v.True:v.False}o(SM,"FromNumber");function pr(e,t){return Object.getOwnPropertyNames(e.properties).length===t}o(pr,"IsObjectPropertyCount");function oF(e){return Qc(e)}o(oF,"IsObjectStringLike");function iF(e){return pr(e,0)||pr(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(iF,"IsObjectSymbolLike");function tm(e){return pr(e,0)}o(tm,"IsObjectNumberLike");function sF(e){return pr(e,0)}o(sF,"IsObjectBooleanLike");function EM(e){return pr(e,0)}o(EM,"IsObjectBigIntLike");function TM(e){return pr(e,0)}o(TM,"IsObjectDateLike");function vM(e){return Qc(e)}o(vM,"IsObjectUint8ArrayLike");function AM(e){let t=pn();return pr(e,0)||pr(e,1)&&"length"in e.properties&&vr(We(e.properties.length,t))===v.True}o(AM,"IsObjectFunctionLike");function jM(e){return pr(e,0)}o(jM,"IsObjectConstructorLike");function Qc(e){let t=pn();return pr(e,0)||pr(e,1)&&"length"in e.properties&&vr(We(e.properties.length,t))===v.True}o(Qc,"IsObjectArrayLike");function kM(e){let t=uo([fo()],fo());return pr(e,0)||pr(e,1)&&"then"in e.properties&&vr(We(e.properties.then,t))===v.True}o(kM,"IsObjectPromiseLike");function pF(e,t){return We(e,t)===v.False||x.IsOptional(e)&&!x.IsOptional(t)?v.False:v.True}o(pF,"Property");function Gt(e,t){return x.IsUnknown(e)?v.False:x.IsAny(e)?v.Union:x.IsNever(e)||x.IsLiteralString(e)&&oF(t)||x.IsLiteralNumber(e)&&tm(t)||x.IsLiteralBoolean(e)&&sF(t)||x.IsSymbol(e)&&iF(t)||x.IsBigInt(e)&&EM(t)||x.IsString(e)&&oF(t)||x.IsSymbol(e)&&iF(t)||x.IsNumber(e)&&tm(t)||x.IsInteger(e)&&tm(t)||x.IsBoolean(e)&&sF(t)||x.IsUint8Array(e)&&vM(t)||x.IsDate(e)&&TM(t)||x.IsConstructor(e)&&jM(t)||x.IsFunction(e)&&AM(t)?v.True:x.IsRecord(e)&&x.IsString(nm(e))?t[Fr]==="Record"?v.True:v.False:x.IsRecord(e)&&x.IsNumber(nm(e))?pr(t,0)?v.True:v.False:v.False}o(Gt,"FromObjectRight");function _M(e,t){return wt(t)?Pt(e,t):x.IsRecord(t)?Ar(e,t):x.IsObject(t)?(()=>{for(let r of Object.getOwnPropertyNames(t.properties)){if(!(r in e.properties)&&!x.IsOptional(t.properties[r]))return v.False;if(x.IsOptional(t.properties[r]))return v.True;if(pF(e.properties[r],t.properties[r])===v.False)return v.False}return v.True})():v.False}o(_M,"FromObject");function NM(e,t){return wt(t)?Pt(e,t):x.IsObject(t)&&kM(t)?v.True:x.IsPromise(t)?vr(We(e.item,t.item)):v.False}o(NM,"FromPromise");function nm(e){return Mn in e.patternProperties?pn():Ln in e.patternProperties?Sr():Si("Unknown record key pattern")}o(nm,"RecordKey");function om(e){return Mn in e.patternProperties?e.patternProperties[Mn]:Ln in e.patternProperties?e.patternProperties[Ln]:Si("Unable to get record value schema")}o(om,"RecordValue");function Ar(e,t){let[r,n]=[nm(t),om(t)];return x.IsLiteralString(e)&&x.IsNumber(r)&&vr(We(e,n))===v.True?v.True:x.IsUint8Array(e)&&x.IsNumber(r)||x.IsString(e)&&x.IsNumber(r)||x.IsArray(e)&&x.IsNumber(r)?We(e,n):x.IsObject(e)?(()=>{for(let i of Object.getOwnPropertyNames(e.properties))if(pF(n,e.properties[i])===v.False)return v.False;return v.True})():v.False}o(Ar,"FromRecordRight");function RM(e,t){return wt(t)?Pt(e,t):x.IsObject(t)?Gt(e,t):x.IsRecord(t)?We(om(e),om(t)):v.False}o(RM,"FromRecord");function CM(e,t){let r=x.IsRegExp(e)?Sr():e,n=x.IsRegExp(t)?Sr():t;return We(r,n)}o(CM,"FromRegExp");function lF(e,t){return x.IsLiteral(e)&&Pe.IsString(e.const)||x.IsString(e)?v.True:v.False}o(lF,"FromStringRight");function MM(e,t){return wt(t)?Pt(e,t):x.IsObject(t)?Gt(e,t):x.IsRecord(t)?Ar(e,t):x.IsString(t)?v.True:v.False}o(MM,"FromString");function LM(e,t){return wt(t)?Pt(e,t):x.IsObject(t)?Gt(e,t):x.IsRecord(t)?Ar(e,t):x.IsSymbol(t)?v.True:v.False}o(LM,"FromSymbol");function UM(e,t){return x.IsTemplateLiteral(e)?We(No(e),t):x.IsTemplateLiteral(t)?We(e,No(t)):Si("Invalid fallthrough for TemplateLiteral")}o(UM,"FromTemplateLiteral");function DM(e,t){return x.IsArray(t)&&e.items!==void 0&&e.items.every(r=>We(r,t.items)===v.True)}o(DM,"IsArrayOfTuple");function qM(e,t){return x.IsNever(e)?v.True:x.IsUnknown(e)?v.False:x.IsAny(e)?v.Union:v.False}o(qM,"FromTupleRight");function KM(e,t){return wt(t)?Pt(e,t):x.IsObject(t)&&Qc(t)||x.IsArray(t)&&DM(e,t)?v.True:x.IsTuple(t)?Pe.IsUndefined(e.items)&&!Pe.IsUndefined(t.items)||!Pe.IsUndefined(e.items)&&Pe.IsUndefined(t.items)?v.False:Pe.IsUndefined(e.items)&&!Pe.IsUndefined(t.items)||e.items.every((r,n)=>We(r,t.items[n])===v.True)?v.True:v.False:v.False}o(KM,"FromTuple");function zM(e,t){return wt(t)?Pt(e,t):x.IsObject(t)?Gt(e,t):x.IsRecord(t)?Ar(e,t):x.IsUint8Array(t)?v.True:v.False}o(zM,"FromUint8Array");function GM(e,t){return wt(t)?Pt(e,t):x.IsObject(t)?Gt(e,t):x.IsRecord(t)?Ar(e,t):x.IsVoid(t)?WM(e,t):x.IsUndefined(t)?v.True:v.False}o(GM,"FromUndefined");function sm(e,t){return t.anyOf.some(r=>We(e,r)===v.True)?v.True:v.False}o(sm,"FromUnionRight");function BM(e,t){return e.anyOf.every(r=>We(r,t)===v.True)?v.True:v.False}o(BM,"FromUnion");function dF(e,t){return v.True}o(dF,"FromUnknownRight");function VM(e,t){return x.IsNever(t)?fF(e,t):x.IsIntersect(t)?Xc(e,t):x.IsUnion(t)?sm(e,t):x.IsAny(t)?im(e,t):x.IsString(t)?lF(e,t):x.IsNumber(t)?uF(e,t):x.IsInteger(t)?cF(e,t):x.IsBoolean(t)?aF(e,t):x.IsArray(t)?pM(e,t):x.IsTuple(t)?qM(e,t):x.IsObject(t)?Gt(e,t):x.IsUnknown(t)?v.True:v.False}o(VM,"FromUnknown");function WM(e,t){return x.IsUndefined(e)||x.IsUndefined(e)?v.True:v.False}o(WM,"FromVoidRight");function HM(e,t){return x.IsIntersect(t)?Xc(e,t):x.IsUnion(t)?sm(e,t):x.IsUnknown(t)?dF(e,t):x.IsAny(t)?im(e,t):x.IsObject(t)?Gt(e,t):x.IsVoid(t)?v.True:v.False}o(HM,"FromVoid");function We(e,t){return x.IsTemplateLiteral(e)||x.IsTemplateLiteral(t)?UM(e,t):x.IsRegExp(e)||x.IsRegExp(t)?CM(e,t):x.IsNot(e)||x.IsNot(t)?OM(e,t):x.IsAny(e)?uM(e,t):x.IsArray(e)?lM(e,t):x.IsBigInt(e)?mM(e,t):x.IsBoolean(e)?yM(e,t):x.IsAsyncIterator(e)?dM(e,t):x.IsConstructor(e)?hM(e,t):x.IsDate(e)?gM(e,t):x.IsFunction(e)?IM(e,t):x.IsInteger(e)?xM(e,t):x.IsIntersect(e)?bM(e,t):x.IsIterator(e)?$M(e,t):x.IsLiteral(e)?wM(e,t):x.IsNever(e)?PM(e,t):x.IsNull(e)?FM(e,t):x.IsNumber(e)?SM(e,t):x.IsObject(e)?_M(e,t):x.IsRecord(e)?RM(e,t):x.IsString(e)?MM(e,t):x.IsSymbol(e)?LM(e,t):x.IsTuple(e)?KM(e,t):x.IsPromise(e)?NM(e,t):x.IsUint8Array(e)?zM(e,t):x.IsUndefined(e)?GM(e,t):x.IsUnion(e)?BM(e,t):x.IsUnknown(e)?VM(e,t):x.IsVoid(e)?HM(e,t):Si("Unknown left type operand '".concat(e[E],"'"))}o(We,"Visit");function lo(e,t){return We(e,t)}o(lo,"ExtendsCheck");c();c();c();function ZM(e,t,r,n,i){let s={};for(let a of globalThis.Object.getOwnPropertyNames(e))s[a]=Ei(e[a],t,r,n,it(i));return s}o(ZM,"FromProperties");function JM(e,t,r,n,i){return ZM(e.properties,t,r,n,i)}o(JM,"FromMappedResult");function mF(e,t,r,n,i){let s=JM(e,t,r,n,i);return je(s)}o(mF,"ExtendsFromMappedResult");function YM(e,t,r,n){let i=lo(e,t);return i===v.Union?Ve([r,n]):i===v.True?r:n}o(YM,"ExtendsResolve");function Ei(e,t,r,n,i){return at(e)?mF(e,t,r,n,i):dr(e)?j(yF(e,t,r,n,i)):j(YM(e,t,r,n),i)}o(Ei,"Extends");function XM(e,t,r,n,i){return{[e]:Ei(De(e),t,r,n,it(i))}}o(XM,"FromPropertyKey");function QM(e,t,r,n,i){return e.reduce((s,a)=>S(S({},s),XM(a,t,r,n,i)),{})}o(QM,"FromPropertyKeys");function eL(e,t,r,n,i){return QM(e.keys,t,r,n,i)}o(eL,"FromMappedKey");function yF(e,t,r,n,i){let s=eL(e,t,r,n,i);return je(s)}o(yF,"ExtendsFromMappedKey");c();function tL(e){return e.allOf.every(t=>Kn(t))}o(tL,"Intersect");function rL(e){return e.anyOf.some(t=>Kn(t))}o(rL,"Union");function nL(e){return!Kn(e.not)}o(nL,"Not");function Kn(e){return e[E]==="Intersect"?tL(e):e[E]==="Union"?rL(e):e[E]==="Not"?nL(e):e[E]==="Undefined"}o(Kn,"ExtendsUndefinedCheck");c();function hF(e,t){return Ti(No(e),t)}o(hF,"ExcludeFromTemplateLiteral");function oL(e,t){let r=e.filter(n=>lo(n,t)===v.False);return r.length===1?r[0]:Ve(r)}o(oL,"ExcludeRest");function Ti(e,t,r={}){return mr(e)?j(hF(e,t),r):at(e)?j(gF(e,t),r):j(Ue(e)?oL(e.anyOf,t):lo(e,t)!==v.False?Be():e,r)}o(Ti,"Exclude");function iL(e,t){let r={};for(let n of globalThis.Object.getOwnPropertyNames(e))r[n]=Ti(e[n],t);return r}o(iL,"FromProperties");function sL(e,t){return iL(e.properties,t)}o(sL,"FromMappedResult");function gF(e,t){let r=sL(e,t);return je(r)}o(gF,"ExcludeFromMappedResult");c();c();c();function IF(e,t){return vi(No(e),t)}o(IF,"ExtractFromTemplateLiteral");function aL(e,t){let r=e.filter(n=>lo(n,t)!==v.False);return r.length===1?r[0]:Ve(r)}o(aL,"ExtractRest");function vi(e,t,r){return mr(e)?j(IF(e,t),r):at(e)?j(xF(e,t),r):j(Ue(e)?aL(e.anyOf,t):lo(e,t)!==v.False?e:Be(),r)}o(vi,"Extract");function cL(e,t){let r={};for(let n of globalThis.Object.getOwnPropertyNames(e))r[n]=vi(e[n],t);return r}o(cL,"FromProperties");function fL(e,t){return cL(e.properties,t)}o(fL,"FromMappedResult");function xF(e,t){let r=fL(e,t);return je(r)}o(xF,"ExtractFromMappedResult");c();function bF(e,t){return j(e.returns,t)}o(bF,"InstanceType");c();function $F(e){return j({[E]:"Integer",type:"integer"},e)}o($F,"Integer");c();c();c();function uL(e,t,r){return{[e]:Zr(De(e),t,it(r))}}o(uL,"MappedIntrinsicPropertyKey");function pL(e,t,r){return e.reduce((i,s)=>S(S({},i),uL(s,t,r)),{})}o(pL,"MappedIntrinsicPropertyKeys");function lL(e,t,r){return pL(e.keys,t,r)}o(lL,"MappedIntrinsicProperties");function wF(e,t,r){let n=lL(e,t,r);return je(n)}o(wF,"IntrinsicFromMappedKey");function dL(e){let[t,r]=[e.slice(0,1),e.slice(1)];return[t.toLowerCase(),r].join("")}o(dL,"ApplyUncapitalize");function mL(e){let[t,r]=[e.slice(0,1),e.slice(1)];return[t.toUpperCase(),r].join("")}o(mL,"ApplyCapitalize");function yL(e){return e.toUpperCase()}o(yL,"ApplyUppercase");function hL(e){return e.toLowerCase()}o(hL,"ApplyLowercase");function gL(e,t,r){let n=wi(e.pattern);if(!_o(n))return Y(S({},e),{pattern:PF(e.pattern,t)});let a=[...Zs(n)].map(d=>De(d)),f=OF(a,t),p=Ve(f);return qc([p],r)}o(gL,"FromTemplateLiteral");function PF(e,t){return typeof e=="string"?t==="Uncapitalize"?dL(e):t==="Capitalize"?mL(e):t==="Uppercase"?yL(e):t==="Lowercase"?hL(e):e:e.toString()}o(PF,"FromLiteralValue");function OF(e,t){return e.map(r=>Zr(r,t))}o(OF,"FromRest");function Zr(e,t,r={}){return dr(e)?wF(e,t,r):mr(e)?gL(e,t,r):Ue(e)?Ve(OF(e.anyOf,t),r):Cn(e)?De(PF(e.const,t),r):j(e,r)}o(Zr,"Intrinsic");function FF(e,t={}){return Zr(e,"Capitalize",t)}o(FF,"Capitalize");c();function SF(e,t={}){return Zr(e,"Lowercase",t)}o(SF,"Lowercase");c();function EF(e,t={}){return Zr(e,"Uncapitalize",t)}o(EF,"Uncapitalize");c();function TF(e,t={}){return Zr(e,"Uppercase",t)}o(TF,"Uppercase");c();function vF(e,t){return j({[E]:"Not",not:e},t)}o(vF,"Not");c();c();c();function IL(e,t,r){let n={};for(let i of globalThis.Object.getOwnPropertyNames(e))n[i]=Ai(e[i],t,it(r));return n}o(IL,"FromProperties");function xL(e,t,r){return IL(e.properties,t,r)}o(xL,"FromMappedResult");function AF(e,t,r){let n=xL(e,t,r);return je(n)}o(AF,"OmitFromMappedResult");function bL(e,t){return e.map(r=>cm(r,t))}o(bL,"FromIntersect");function $L(e,t){return e.map(r=>cm(r,t))}o($L,"FromUnion");function wL(e,t){let i=e,{[t]:r}=i;return Yo(i,[ma(t)])}o(wL,"FromProperty");function PL(e,t){return t.reduce((r,n)=>wL(r,n),e)}o(PL,"FromProperties");function OL(e,t){let r=mt(e,[st,"$id","required","properties"]),n=PL(e.properties,t);return Ye(n,r)}o(OL,"FromObject");function cm(e,t){return It(e)?ur(bL(e.allOf,t)):Ue(e)?Ve($L(e.anyOf,t)):Et(e)?OL(e,t):Ye({})}o(cm,"OmitResolve");function Ai(e,t,r){if(dr(t))return jF(e,t,r);if(at(e))return AF(e,t,r);let n=Wr(t)?fr(t):t;return j(S(S({},cm(e,n)),r))}o(Ai,"Omit");function FL(e,t,r){return{[t]:Ai(e,[t],it(r))}}o(FL,"FromPropertyKey");function SL(e,t,r){return t.reduce((n,i)=>S(S({},n),FL(e,i,r)),{})}o(SL,"FromPropertyKeys");function EL(e,t,r){return SL(e,t.keys,r)}o(EL,"FromMappedKey");function jF(e,t,r){let n=EL(e,t,r);return je(n)}o(jF,"OmitFromMappedKey");c();function kF(e,t){return ln(e.parameters,t)}o(kF,"Parameters");c();c();function _F(e){return e.map(t=>NF(t))}o(_F,"FromRest");function TL(e){let t={};for(let r of globalThis.Object.getOwnPropertyNames(e))t[r]=cr(e[r]);return t}o(TL,"FromProperties");function vL(e){let t=mt(e,[st,"$id","required","properties"]),r=TL(e.properties);return Ye(r,t)}o(vL,"FromObject");function NF(e){return It(e)?ur(_F(e.allOf)):Ue(e)?Ve(_F(e.anyOf)):Et(e)?vL(e):Ye({})}o(NF,"PartialResolve");function ef(e,t){return at(e)?RF(e,t):j(S(S({},NF(e)),t))}o(ef,"Partial");function AL(e,t){let r={};for(let n of globalThis.Object.getOwnPropertyNames(e))r[n]=ef(e[n],it(t));return r}o(AL,"FromProperties");function jL(e,t){return AL(e.properties,t)}o(jL,"FromMappedResult");function RF(e,t){let r=jL(e,t);return je(r)}o(RF,"PartialFromMappedResult");c();c();c();function kL(e,t,r){let n={};for(let i of globalThis.Object.getOwnPropertyNames(e))n[i]=ji(e[i],t,it(r));return n}o(kL,"FromProperties");function _L(e,t,r){return kL(e.properties,t,r)}o(_L,"FromMappedResult");function CF(e,t,r){let n=_L(e,t,r);return je(n)}o(CF,"PickFromMappedResult");function NL(e,t){return e.map(r=>fm(r,t))}o(NL,"FromIntersect");function RL(e,t){return e.map(r=>fm(r,t))}o(RL,"FromUnion");function CL(e,t){let r={};for(let n of t)n in e&&(r[n]=e[n]);return r}o(CL,"FromProperties");function ML(e,t){let r=mt(e,[st,"$id","required","properties"]),n=CL(e.properties,t);return Ye(n,r)}o(ML,"FromObject");function fm(e,t){return It(e)?ur(NL(e.allOf,t)):Ue(e)?Ve(RL(e.anyOf,t)):Et(e)?ML(e,t):Ye({})}o(fm,"PickResolve");function ji(e,t,r){if(dr(t))return MF(e,t,r);if(at(e))return CF(e,t,r);let n=Wr(t)?fr(t):t;return j(S(S({},fm(e,n)),r))}o(ji,"Pick");function LL(e,t,r){return{[t]:ji(e,[t],it(r))}}o(LL,"FromPropertyKey");function UL(e,t,r){return t.reduce((n,i)=>S(S({},n),LL(e,i,r)),{})}o(UL,"FromPropertyKeys");function DL(e,t,r){return UL(e,t.keys,r)}o(DL,"FromMappedKey");function MF(e,t,r){let n=DL(e,t,r);return je(n)}o(MF,"PickFromMappedKey");c();function LF(e){return Er(cr(e))}o(LF,"ReadonlyOptional");c();function Ro(e,t,r){return j({[E]:"Record",type:"object",patternProperties:{[e]:t}},r)}o(Ro,"RecordCreateFromPattern");function um(e,t,r){let n={};for(let i of e)n[i]=t;return Ye(n,Y(S({},r),{[Fr]:"Record"}))}o(um,"RecordCreateFromKeys");function qL(e,t,r){return Uc(e)?um(fr(e),t,r):Ro(e.pattern,t,r)}o(qL,"FromTemplateLiteralKey");function KL(e,t,r){return um(fr(Ve(e)),t,r)}o(KL,"FromUnionKey");function zL(e,t,r){return um([e.toString()],t,r)}o(zL,"FromLiteralKey");function GL(e,t,r){return Ro(e.source,t,r)}o(GL,"FromRegExpKey");function BL(e,t,r){let n=ut(e.pattern)?Ln:e.pattern;return Ro(n,t,r)}o(BL,"FromStringKey");function VL(e,t,r){return Ro(Ln,t,r)}o(VL,"FromAnyKey");function WL(e,t,r){return Ro(vO,t,r)}o(WL,"FromNeverKey");function HL(e,t,r){return Ro(Mn,t,r)}o(HL,"FromIntegerKey");function ZL(e,t,r){return Ro(Mn,t,r)}o(ZL,"FromNumberKey");function UF(e,t,r={}){return Ue(e)?KL(e.anyOf,t,r):mr(e)?qL(e,t,r):Cn(e)?zL(e.const,t,r):Ao(e)?HL(e,t,r):jo(e)?ZL(e,t,r):_d(e)?GL(e,t,r):zs(e)?BL(e,t,r):Td(e)?VL(e,t,r):ao(e)?WL(e,t,r):Be(r)}o(UF,"Record");c();var JL=0;function DF(e,t={}){ut(t.$id)&&(t.$id="T".concat(JL++));let r=Ms(e({[E]:"This",$ref:"".concat(t.$id)}));return r.$id=t.$id,j(S({[Fr]:"Recursive"},r),t)}o(DF,"Recursive");c();function qF(e,t){if(et(e))return j({[E]:"Ref",$ref:e},t);if(ut(e.$id))throw new Error("Reference target type must specify an $id");return j({[E]:"Ref",$ref:e.$id},t)}o(qF,"Ref");c();function KF(e,t){let r=et(e)?new globalThis.RegExp(e):e;return j({[E]:"RegExp",type:"RegExp",source:r.source,flags:r.flags},t)}o(KF,"RegExp");c();c();function zF(e){return e.map(t=>GF(t))}o(zF,"FromRest");function YL(e){let t={};for(let r of globalThis.Object.getOwnPropertyNames(e))t[r]=mt(e[r],[er]);return t}o(YL,"FromProperties");function XL(e){let t=mt(e,[st,"$id","required","properties"]),r=YL(e.properties);return Ye(r,t)}o(XL,"FromObject");function GF(e){return It(e)?ur(zF(e.allOf)):Ue(e)?Ve(zF(e.anyOf)):Et(e)?XL(e):Ye({})}o(GF,"RequiredResolve");function tf(e,t){return at(e)?BF(e,t):j(S(S({},GF(e)),t))}o(tf,"Required");function QL(e,t){let r={};for(let n of globalThis.Object.getOwnPropertyNames(e))r[n]=tf(e[n],t);return r}o(QL,"FromProperties");function e2(e,t){return QL(e.properties,t)}o(e2,"FromMappedResult");function BF(e,t){let r=e2(e,t);return je(r)}o(BF,"RequiredFromMappedResult");c();function t2(e){var t;return It(e)?e.allOf:Ue(e)?e.anyOf:Vr(e)?(t=e.items)!=null?t:[]:[]}o(t2,"RestResolve");function VF(e){return t2(e)}o(VF,"Rest");c();function WF(e,t){return j(e.returns,t)}o(WF,"ReturnType");c();function HF(e){return JSON.parse(JSON.stringify(e))}o(HF,"Strict");c();var dm=class dm{constructor(t){this.schema=t}Decode(t){return new lm(this.schema,t)}};o(dm,"TransformDecodeBuilder");var pm=dm,mm=class mm{constructor(t,r){this.schema=t,this.decode=r}EncodeTransform(t,r){let s={Encode:o(a=>r[st].Encode(t(a)),"Encode"),Decode:o(a=>this.decode(r[st].Decode(a)),"Decode")};return Y(S({},r),{[st]:s})}EncodeSchema(t,r){let n={Decode:this.decode,Encode:t};return Y(S({},r),{[st]:n})}Encode(t){return gi(this.schema)?this.EncodeTransform(t,this.schema):this.EncodeSchema(t,this.schema)}};o(mm,"TransformEncodeBuilder");var lm=mm;function ZF(e){return new pm(e)}o(ZF,"Transform");c();function rf(e={}){var t;return j({[E]:(t=e[E])!=null?t:"Unsafe"},e)}o(rf,"Unsafe");c();function JF(e){return j({[E]:"Void",type:"void"},e)}o(JF,"Void");c();var ym={};go(ym,{Any:()=>fo,Array:()=>Rc,AsyncIterator:()=>Cc,Awaited:()=>JO,BigInt:()=>Oi,Boolean:()=>Dc,Capitalize:()=>FF,Composite:()=>QO,Const:()=>eF,Constructor:()=>Mc,ConstructorParameters:()=>tF,Date:()=>Vc,Deref:()=>Hr,Enum:()=>rF,Exclude:()=>Ti,Extends:()=>Ei,Extract:()=>vi,Function:()=>uo,Index:()=>Fi,InstanceType:()=>bF,Integer:()=>$F,Intersect:()=>ur,Iterator:()=>zc,KeyOf:()=>Bc,Literal:()=>De,Lowercase:()=>SF,Mapped:()=>VO,Never:()=>Be,Not:()=>vF,Null:()=>Wc,Number:()=>pn,Object:()=>Ye,Omit:()=>Ai,Optional:()=>cr,Parameters:()=>kF,Partial:()=>ef,Pick:()=>ji,Promise:()=>Gc,Readonly:()=>Er,ReadonlyOptional:()=>LF,Record:()=>UF,Recursive:()=>DF,Ref:()=>qF,RegExp:()=>KF,Required:()=>tf,Rest:()=>VF,ReturnType:()=>WF,Strict:()=>HF,String:()=>Sr,Symbol:()=>Hc,TemplateLiteral:()=>qc,Transform:()=>ZF,Tuple:()=>ln,Uint8Array:()=>Jc,Uncapitalize:()=>EF,Undefined:()=>Zc,Union:()=>Ve,Unknown:()=>qn,Unsafe:()=>rf,Uppercase:()=>TF,Void:()=>JF});c();var u=ym;var ct=o((e,t)=>u.Unsafe(u.String({$id:t,pattern:"^".concat(e,"_[A-Za-z0-9-]{8,}$")})),"Ident"),Bt=ct("g","GeometryId"),ke=ct("f","FloorId"),hm=[Bt,ke];c();c();var ea=u.Object({externalId:u.String({description:"An identifier that can be used to link this entity to data outside of the MVF."}),name:u.String({description:"The name of the entity."}),shortName:u.String({description:"A short name for the entity."}),description:u.String({description:"A description of the entity."}),icon:u.String({format:"uri",description:"A URL to an icon for the entity."})},{$id:"BaseDetails",description:"Additional information about a given entity."}),gm=u.Partial(ea,{$id:"Details",description:"Additional information about a given entity."}),Jr=u.Object({details:u.Optional(u.Ref(gm))},{$id:"WithDetails"}),Co=o(e=>{let t=[...e].sort(),r=u.Pick(ea,e),n=u.Omit(ea,e);return u.Object({details:u.Intersect([r,u.Partial(n)])},{$id:"WithRequiredDetails_".concat(t.join("_"))})},"WithRequiredDetails"),Im=[ea,gm];c();c();var xm=u.Record(u.String(),u.Unknown(),{$id:"Extra"}),Yr=u.Object({extra:u.Optional(u.Ref(xm))}),bm=[xm];c();c();var ki=u.Object({geometryId:u.Ref(Bt),floorId:u.Ref(ke)},{$id:"GeometryAnchor"}),r2=u.Object({geometryAnchor:u.Ref(ki)}),Mo=o((e,t)=>u.Object({geometryAnchors:u.Array(u.Ref(ki),e)},t),"WithGeometryAnchors"),$m=[ki];c();c();c();c();c();var _i=u.Number({$id:"Longitude",minimum:-180,maximum:180,description:"A WGS 84-compatible longitude coordinate value."}),Ni=u.Number({$id:"Latitude",minimum:-90,maximum:90,description:"A WGS 84-compatible latitude coordinate value."}),Lo=u.Tuple([u.Ref(_i),u.Ref(Ni)],{$id:"Position",minItems:2,maxItems:2,description:"A valid WGS 84 position consisting of a longitude value, followed by a latitude value."}),Vt=u.Object({type:u.Literal("Point"),coordinates:u.Ref(Lo)},{$id:"Point",description:"An RFC-7946 compatible GeoJSON Point geometry."}),nf=u.Object({type:u.Literal("MultiPoint"),coordinates:u.Array(u.Ref(Lo))},{$id:"MultiPoint",description:"An RFC-7946 compatible GeoJSON MultiPoint geometry."}),of=u.Object({type:u.Literal("LineString"),coordinates:u.Array(u.Ref(Lo),{minItems:2,description:"At least two positions are required."})},{$id:"LineString",description:"An RFC-7946 compatible GeoJSON LineString geometry."}),sf=u.Object({type:u.Literal("MultiLineString"),coordinates:u.Array(u.Array(u.Ref(Lo),{minItems:2}))},{$id:"MultiLineString",description:"An RFC-7946 compatible GeoJSON MultiLineString geometry."}),YF=u.Array(u.Ref(Lo),{$id:"LinearRing",minItems:4,description:"A linear ring is a building block of a polygon or multi-polygon."}),wm=u.Array(u.Ref(YF),{$id:"LinearRings",minItems:1,description:"A collection of linear rings, at least one of which is the exterior ring of a polygon."}),Ri=u.Object({type:u.Literal("Polygon"),coordinates:u.Ref(wm)},{$id:"Polygon",description:"An RFC-7946 compatible GeoJSON Polygon geometry."}),Ci=u.Object({type:u.Literal("MultiPolygon"),coordinates:u.Array(u.Ref(wm))},{$id:"MultiPolygon",description:"An RFC-7946 compatible GeoJSON MultiPolygon geometry."}),Ct=o((e,t,r)=>u.Object({type:u.Literal("Feature"),geometry:e,properties:t},r),"Feature"),rr=o((e,t,r)=>u.Object({type:u.Literal("FeatureCollection"),features:u.Array(e,r)},t),"FeatureCollection"),Pm=[_i,Ni,Lo,Vt,nf,of,sf,YF,wm,Ri,Ci];var XF=u.Intersect([u.Object({id:u.Ref(ke),elevation:u.Integer({description:"An ordinal representing the elevation of this map relative to other maps in the stack."}),subtitle:u.Optional(u.String({description:"The subtitle of the floor."}))}),Jr],{$id:"FloorProperties"}),QF=Ct(u.Union([u.Ref(Ri),u.Ref(Ci),u.Null()]),u.Ref(XF),{$id:"FloorFeature"}),eS=rr(u.Ref(QF),{$id:"FloorCollection"}),n2=u.Object({floors:u.Ref(eS)}),tS={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:n2,references:[XF,QF,eS]};c();c();c();var Om=class Om{constructor(t){H(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(Om,"OptionIterator");var af=Om,Fm=class Fm{constructor(t){H(this,"_tag","Some");H(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 rS(t(this.value))}mapAsync(t){return t(this.value).then(r=>rS(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:mo()}or(t){return this}orElse(t){return this}xor(t){return t.isSome()?mo():this}toString(){return"Some(".concat(this.value,")")}okOr(t){return B(this.value)}okOrElse(t){return B(this.value)}iter(){return new af(this.value)}[Symbol.iterator](){return this.iter()}zip(t){return t.isSome()?Mi([this.value,t.value]):mo()}zipWith(t,r){return t.isSome()?Mi(r(this.value,t.value)):mo()}get[Symbol.toStringTag](){return"Some"}};o(Fm,"Some");var cf=Fm,Sm=class Sm{constructor(){H(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 af(null)}[Symbol.iterator](){return this.iter()}zip(t){return this}zipWith(t,r){return this}get[Symbol.toStringTag](){return"None"}};o(Sm,"None");var ff=Sm,Mi=o(e=>new cf(e),"some"),mo=o(()=>new ff,"none"),rS=o(e=>e instanceof cf||e instanceof ff?e:e==null?mo():Mi(e),"option");var vm=class vm{constructor(t){H(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(vm,"ResultIterator");var uf=vm,Am=class Am{constructor(t){H(this,"_tag","Ok");H(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 Mi(this.value)}err(){return mo()}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 uf(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(Am,"Ok");var Em=Am,pf=class pf{constructor(t){H(this,"_tag","Err");H(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 mo()}err(){return Mi(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 uf(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 pf(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(pf,"Err");var Tm=pf,B=o(e=>new Em(e),"ok"),W=o(e=>new Tm(e),"err");c();var dn;(function(e){e.GeometryMissingError="GeometryMissingError",e.FloorMissingError="FloorMissingError",e.UnknownFloorError="UnknownFloorError",e.UnknownGeometryError="UnknownGeometryError"})(dn||(dn={}));var o2=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"),zn=o(e=>{let t=o2(e);return o(n=>{let i=t.get(n);return i==null?W({kind:dn.UnknownFloorError,properties:{floorId:n}}):B(i)},"floorLookup")},"createFloorLookup");c();c();c();c();var yt=o(e=>u.Unsafe(e),"PartialRecord");c();var Ee=o(e=>Object.keys(e),"typedKeys");c();var nS=o(e=>{if(e.floors==null)return W({kind:dn.FloorMissingError,properties:null});if(e.geometry==null)return W({kind:dn.GeometryMissingError,properties:null});let t=zn(e);for(let r of Ee(e.geometry)){let n=t(r);if(n.isErr())return n}return B(!0)},"validateGeometry");var oS=u.Intersect([u.Object({id:u.Ref(Bt)}),Jr],{$id:"GeometryProperties"}),iS=Ct(u.Union([u.Ref(Vt),u.Ref(nf),u.Ref(of),u.Ref(sf),u.Ref(Ri),u.Ref(Ci)]),u.Ref(oS),{$id:"GeometryFeature"}),sS=rr(u.Ref(iS),{$id:"GeometryCollection"}),i2=u.Object({geometry:yt(u.Record(ke,u.Ref(sS),{additionalProperties:!1}))},{$id:"GeometrySchema"}),s2=/^geometry\/(.*)\.geojson$/,aS={name:"core:geometry",schema:i2,intoBundle:o(function*(e){if(e.geometry!=null)for(let t of Ee(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(s2))==null?void 0:i[1];if(n)return{geometry:{[n]:r(t)}}},"fromBundle"),references:[oS,iS,sS],integrityCheck:nS};c();c();var _e=o(e=>Object.entries(e),"typedEntries");var a2=o(e=>{var r;let t=new Map;for(let[n,i]of _e((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"),vt=o(e=>{let t=a2(e);return o((n,i)=>{let s=t.get(n);if(s==null)return W({kind:dn.UnknownFloorError,properties:{floorId:n}});let a=s.get(i);return a==null?W({kind:dn.UnknownGeometryError,properties:{floorId:n,geometryId:i}}):B(a)},"geometryLookup")},"createGeometryLookup");c();var jm=u.Object({type:u.Literal("file"),name:u.String({description:"The name of the file."})},{$id:"ManifestFile"}),cS=u.Recursive(e=>u.Object({type:u.Literal("folder"),name:u.String({description:"The name of the folder."}),children:u.Array(u.Union([e,u.Ref(jm)]),{minItems:1,description:"The children of the folder."})}),{$id:"ManifestFolder"}),fS=u.Object({name:u.String({description:"The name of the map."}),version:u.Literal("3.0.0",{description:"The version of the manifest."}),orgId:u.Optional(u.String({description:"The identifier of the organization that the map this MVF is for belongs to."})),mapId:u.Optional(u.String({description:"The identifier of the map that this MVF is for."})),contents:u.Array(u.Union([u.Ref(cS),u.Ref(jm)]),{minItems:1,description:"The contents of the MVF bundle."}),time:u.String({format:"date-time",description:"An ISO 8601 date-time string, including timezone offset."}),tzid:u.Optional(u.Unsafe(u.String({description:"A valid IANA timezone identifier.",pattern:"^[A-Za-z0-9_-]+/[A-Za-z0-9_-]+$"}))),naturalBearing:u.Optional(u.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:u.Optional(u.Ref(ke,{description:"The default floor ID of the map."})),language:u.Optional(u.String({description:"The language code of the map."}))},{$id:"ManifestProperties"}),uS=rr(Ct(Vt,u.Ref(fS)),{$id:"ManifestCollection"},{minItems:1,maxItems:1}),c2=u.Object({manifest:u.Ref(uS)}),pS={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:c2,references:[jm,cS,fS,uS]};var jr=u.Object({geometryId:u.Ref(Bt)},{$id:"WithGeometryId"}),lf=u.Object({geometryIds:u.Array(u.Ref(Bt))},{$id:"WithGeometryIds"}),km=[jr,lf];c();c();var lS=o((e,t)=>u.Unsafe(u.Transform(u.String(t)).Decode(r=>e.includes(r)?r:"unknown").Encode(r=>r)),"SafeStringEnumSchema"),lr=o((e,t)=>{let r=lS(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 ta;(function(e){e.AnnotationNonPointGeometryError="AnnotationNonPointGeometryError",e.AnnotationUnknownSymbolError="AnnotationUnknownSymbolError"})(ta||(ta={}));var dS=o(e=>{var n;if(e.annotations==null)return B(!0);let t=vt(e),r=new Set(Ee((n=e.annotationSymbols)!=null?n:{}));for(let i of Ee(e.annotations)){let s=e.annotations[i];if(s!=null)for(let a of s){if(!r.has(a.symbolKey))return W({kind:ta.AnnotationUnknownSymbolError,properties:{annotationId:a.id,symbolKey:a.symbolKey}});let f=t(i,a.geometryId);if(f.isErr())return f;if(f.value.geometry.type!=="Point")return W({kind:ta.AnnotationNonPointGeometryError,properties:{annotationId:a.id,floorId:i,geometryId:a.geometryId}})}}return B(!0)},"validateAnnotations");var mS=ct("a","AnnotationId"),_m=u.Intersect([jr,u.Object({id:u.Ref(mS,{description:"The unique identifier for the annotation."}),externalId:u.Optional(u.String({description:"The external identifier for the annotation."})),symbolKey:u.String({description:"The symbol identifier for the annotation."})})],{$id:"AnnotationProperties"}),yS=u.Object({url:u.String({format:"uri",description:"The URL for the symbol."}),name:u.String({description:"The name of the symbol."})},{$id:"AnnotationSymbol"}),f2=u.Object({annotations:yt(u.Record(ke,u.Array(u.Ref(_m)),{additionalProperties:!1})),annotationSymbols:yt(u.Record(u.Index(_m,["symbolKey"]),u.Ref(yS)))},{$id:"AnnotationsSchema"}),u2=/^annotations\/(.*)\.json$/,hS={name:"ext:mvf-annotations",schema:f2,intoBundle:o(function*(e){if(e.annotations!=null)for(let t of Ee(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(u2))==null?void 0:i[1];if(n)return{annotations:{[n]:r(t)}}},"fromBundle"),references:[mS,_m,yS],integrityCheck:dS};c();c();c();c();c();c();c();c();var Rm=class Rm extends ne{constructor(t){super("Duplicate type kind '".concat(t,"' detected"))}};o(Rm,"TypeSystemDuplicateTypeKind");var Nm=Rm,Cm=class Cm extends ne{constructor(t){super("Duplicate string format '".concat(t,"' detected"))}};o(Cm,"TypeSystemDuplicateFormat");var ra=Cm,df;(function(e){function t(n,i){if(Tt.Has(n))throw new Nm(n);return Tt.Set(n,i),(s={})=>rf(Y(S({},s),{[E]:n}))}o(t,"Type"),e.Type=t;function r(n,i){if(tr.Has(n))throw new ra(n);return tr.Set(n,i),n}o(r,"Format"),e.Format=r})(df||(df={}));c();c();c();function p2(e){switch(e.errorType){case T.ArrayContains:return"Expected array to contain at least one matching value";case T.ArrayMaxContains:return"Expected array to contain no more than ".concat(e.schema.maxContains," matching values");case T.ArrayMinContains:return"Expected array to contain at least ".concat(e.schema.minContains," matching values");case T.ArrayMaxItems:return"Expected array length to be less or equal to ".concat(e.schema.maxItems);case T.ArrayMinItems:return"Expected array length to be greater or equal to ".concat(e.schema.minItems);case T.ArrayUniqueItems:return"Expected array elements to be unique";case T.Array:return"Expected array";case T.AsyncIterator:return"Expected AsyncIterator";case T.BigIntExclusiveMaximum:return"Expected bigint to be less than ".concat(e.schema.exclusiveMaximum);case T.BigIntExclusiveMinimum:return"Expected bigint to be greater than ".concat(e.schema.exclusiveMinimum);case T.BigIntMaximum:return"Expected bigint to be less or equal to ".concat(e.schema.maximum);case T.BigIntMinimum:return"Expected bigint to be greater or equal to ".concat(e.schema.minimum);case T.BigIntMultipleOf:return"Expected bigint to be a multiple of ".concat(e.schema.multipleOf);case T.BigInt:return"Expected bigint";case T.Boolean:return"Expected boolean";case T.DateExclusiveMinimumTimestamp:return"Expected Date timestamp to be greater than ".concat(e.schema.exclusiveMinimumTimestamp);case T.DateExclusiveMaximumTimestamp:return"Expected Date timestamp to be less than ".concat(e.schema.exclusiveMaximumTimestamp);case T.DateMinimumTimestamp:return"Expected Date timestamp to be greater or equal to ".concat(e.schema.minimumTimestamp);case T.DateMaximumTimestamp:return"Expected Date timestamp to be less or equal to ".concat(e.schema.maximumTimestamp);case T.DateMultipleOfTimestamp:return"Expected Date timestamp to be a multiple of ".concat(e.schema.multipleOfTimestamp);case T.Date:return"Expected Date";case T.Function:return"Expected function";case T.IntegerExclusiveMaximum:return"Expected integer to be less than ".concat(e.schema.exclusiveMaximum);case T.IntegerExclusiveMinimum:return"Expected integer to be greater than ".concat(e.schema.exclusiveMinimum);case T.IntegerMaximum:return"Expected integer to be less or equal to ".concat(e.schema.maximum);case T.IntegerMinimum:return"Expected integer to be greater or equal to ".concat(e.schema.minimum);case T.IntegerMultipleOf:return"Expected integer to be a multiple of ".concat(e.schema.multipleOf);case T.Integer:return"Expected integer";case T.IntersectUnevaluatedProperties:return"Unexpected property";case T.Intersect:return"Expected all values to match";case T.Iterator:return"Expected Iterator";case T.Literal:return"Expected ".concat(typeof e.schema.const=="string"?"'".concat(e.schema.const,"'"):e.schema.const);case T.Never:return"Never";case T.Not:return"Value should not match";case T.Null:return"Expected null";case T.NumberExclusiveMaximum:return"Expected number to be less than ".concat(e.schema.exclusiveMaximum);case T.NumberExclusiveMinimum:return"Expected number to be greater than ".concat(e.schema.exclusiveMinimum);case T.NumberMaximum:return"Expected number to be less or equal to ".concat(e.schema.maximum);case T.NumberMinimum:return"Expected number to be greater or equal to ".concat(e.schema.minimum);case T.NumberMultipleOf:return"Expected number to be a multiple of ".concat(e.schema.multipleOf);case T.Number:return"Expected number";case T.Object:return"Expected object";case T.ObjectAdditionalProperties:return"Unexpected property";case T.ObjectMaxProperties:return"Expected object to have no more than ".concat(e.schema.maxProperties," properties");case T.ObjectMinProperties:return"Expected object to have at least ".concat(e.schema.minProperties," properties");case T.ObjectRequiredProperty:return"Expected required property";case T.Promise:return"Expected Promise";case T.RegExp:return"Expected string to match regular expression";case T.StringFormatUnknown:return"Unknown format '".concat(e.schema.format,"'");case T.StringFormat:return"Expected string to match '".concat(e.schema.format,"' format");case T.StringMaxLength:return"Expected string length less or equal to ".concat(e.schema.maxLength);case T.StringMinLength:return"Expected string length greater or equal to ".concat(e.schema.minLength);case T.StringPattern:return"Expected string to match '".concat(e.schema.pattern,"'");case T.String:return"Expected string";case T.Symbol:return"Expected symbol";case T.TupleLength:return"Expected tuple to have ".concat(e.schema.maxItems||0," elements");case T.Tuple:return"Expected tuple";case T.Uint8ArrayMaxByteLength:return"Expected byte length less or equal to ".concat(e.schema.maxByteLength);case T.Uint8ArrayMinByteLength:return"Expected byte length greater or equal to ".concat(e.schema.minByteLength);case T.Uint8Array:return"Expected Uint8Array";case T.Undefined:return"Expected undefined";case T.Union:return"Expected union value";case T.Void:return"Expected void";case T.Kind:return"Expected kind '".concat(e.schema[E],"'");default:return"Unknown error type"}}o(p2,"DefaultErrorFunction");var l2=p2;function gS(){return l2}o(gS,"GetErrorFunction");c();var Lm=class Lm extends ne{constructor(t){super("Unable to dereference schema with $id '".concat(t.$ref,"'")),this.schema=t}};o(Lm,"TypeDereferenceError");var Mm=Lm;function d2(e,t){let r=t.find(n=>n.$id===e.$ref);if(r===void 0)throw new Mm(e);return Ne(r,t)}o(d2,"Resolve");function kr(e,t){return!Oe(e.$id)||t.some(r=>r.$id===e.$id)||t.push(e),t}o(kr,"Pushref");function Ne(e,t){return e[E]==="This"||e[E]==="Ref"?d2(e,t):e}o(Ne,"Deref");c();var Dm=class Dm extends ne{constructor(t){super("Unable to hash value"),this.value=t}};o(Dm,"ValueHashError");var Um=Dm,yr;(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"})(yr||(yr={}));var Li=BigInt("14695981039346656037"),[m2,y2]=[BigInt("1099511628211"),BigInt("18446744073709551616")],h2=Array.from({length:256}).map((e,t)=>BigInt(t)),IS=new Float64Array(1),xS=new DataView(IS.buffer),bS=new Uint8Array(IS.buffer);function*g2(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(g2,"NumberToBytes");function I2(e){Wt(yr.Array);for(let t of e)Ui(t)}o(I2,"ArrayType");function x2(e){Wt(yr.Boolean),Wt(e?1:0)}o(x2,"BooleanType");function b2(e){Wt(yr.BigInt),xS.setBigInt64(0,e);for(let t of bS)Wt(t)}o(b2,"BigIntType");function $2(e){Wt(yr.Date),Ui(e.getTime())}o($2,"DateType");function w2(e){Wt(yr.Null)}o(w2,"NullType");function P2(e){Wt(yr.Number),xS.setFloat64(0,e);for(let t of bS)Wt(t)}o(P2,"NumberType");function O2(e){Wt(yr.Object);for(let t of globalThis.Object.getOwnPropertyNames(e).sort())Ui(t),Ui(e[t])}o(O2,"ObjectType");function F2(e){Wt(yr.String);for(let t=0;t<e.length;t++)for(let r of g2(e.charCodeAt(t)))Wt(r)}o(F2,"StringType");function S2(e){Wt(yr.Symbol),Ui(e.description)}o(S2,"SymbolType");function E2(e){Wt(yr.Uint8Array);for(let t=0;t<e.length;t++)Wt(e[t])}o(E2,"Uint8ArrayType");function T2(e){return Wt(yr.Undefined)}o(T2,"UndefinedType");function Ui(e){if(ue(e))return I2(e);if(cn(e))return x2(e);if(Nt(e))return b2(e);if(Qt(e))return $2(e);if(kn(e))return w2(e);if(re(e))return P2(e);if(pe(e))return O2(e);if(Oe(e))return F2(e);if(_n(e))return S2(e);if(hi(e))return E2(e);if(pt(e))return T2(e);throw new Um(e)}o(Ui,"Visit");function Wt(e){Li=Li^h2[e],Li=Li*m2%y2}o(Wt,"FNV1A64");function yo(e){return Li=BigInt("14695981039346656037"),Ui(e),Li}o(yo,"Hash");c();var Km=class Km extends ne{constructor(t){super("Unknown type"),this.schema=t}};o(Km,"ValueCheckUnknownTypeError");var qm=Km;function v2(e){return e[E]==="Any"||e[E]==="Unknown"}o(v2,"IsAnyOrUnknown");function be(e){return e!==void 0}o(be,"IsDefined");function A2(e,t,r){return!0}o(A2,"FromAny");function j2(e,t,r){if(!ue(r)||be(e.minItems)&&!(r.length>=e.minItems)||be(e.maxItems)&&!(r.length<=e.maxItems)||!r.every(s=>Mt(e.items,t,s))||e.uniqueItems===!0&&!function(){let s=new Set;for(let a of r){let f=yo(a);if(s.has(f))return!1;s.add(f)}return!0}())return!1;if(!(be(e.contains)||re(e.minContains)||re(e.maxContains)))return!0;let n=be(e.contains)?e.contains:Be(),i=r.reduce((s,a)=>Mt(n,t,a)?s+1:s,0);return!(i===0||re(e.minContains)&&i<e.minContains||re(e.maxContains)&&i>e.maxContains)}o(j2,"FromArray");function k2(e,t,r){return jc(r)}o(k2,"FromAsyncIterator");function _2(e,t,r){return!(!Nt(r)||be(e.exclusiveMaximum)&&!(r<e.exclusiveMaximum)||be(e.exclusiveMinimum)&&!(r>e.exclusiveMinimum)||be(e.maximum)&&!(r<=e.maximum)||be(e.minimum)&&!(r>=e.minimum)||be(e.multipleOf)&&r%e.multipleOf!==BigInt(0))}o(_2,"FromBigInt");function N2(e,t,r){return cn(r)}o(N2,"FromBoolean");function R2(e,t,r){return Mt(e.returns,t,r.prototype)}o(R2,"FromConstructor");function C2(e,t,r){return!(!Qt(r)||be(e.exclusiveMaximumTimestamp)&&!(r.getTime()<e.exclusiveMaximumTimestamp)||be(e.exclusiveMinimumTimestamp)&&!(r.getTime()>e.exclusiveMinimumTimestamp)||be(e.maximumTimestamp)&&!(r.getTime()<=e.maximumTimestamp)||be(e.minimumTimestamp)&&!(r.getTime()>=e.minimumTimestamp)||be(e.multipleOfTimestamp)&&r.getTime()%e.multipleOfTimestamp!==0)}o(C2,"FromDate");function M2(e,t,r){return so(r)}o(M2,"FromFunction");function L2(e,t,r){return!(!Nc(r)||be(e.exclusiveMaximum)&&!(r<e.exclusiveMaximum)||be(e.exclusiveMinimum)&&!(r>e.exclusiveMinimum)||be(e.maximum)&&!(r<=e.maximum)||be(e.minimum)&&!(r>=e.minimum)||be(e.multipleOf)&&r%e.multipleOf!==0)}o(L2,"FromInteger");function U2(e,t,r){let n=e.allOf.every(i=>Mt(i,t,r));if(e.unevaluatedProperties===!1){let i=new RegExp(Dn(e)),s=Object.getOwnPropertyNames(r).every(a=>i.test(a));return n&&s}else if(Fe(e.unevaluatedProperties)){let i=new RegExp(Dn(e)),s=Object.getOwnPropertyNames(r).every(a=>i.test(a)||Mt(e.unevaluatedProperties,t,r[a]));return n&&s}else return n}o(U2,"FromIntersect");function D2(e,t,r){return kc(r)}o(D2,"FromIterator");function q2(e,t,r){return r===e.const}o(q2,"FromLiteral");function K2(e,t,r){return!1}o(K2,"FromNever");function z2(e,t,r){return!Mt(e.not,t,r)}o(z2,"FromNot");function G2(e,t,r){return kn(r)}o(G2,"FromNull");function B2(e,t,r){return!(!ze.IsNumberLike(r)||be(e.exclusiveMaximum)&&!(r<e.exclusiveMaximum)||be(e.exclusiveMinimum)&&!(r>e.exclusiveMinimum)||be(e.minimum)&&!(r>=e.minimum)||be(e.maximum)&&!(r<=e.maximum)||be(e.multipleOf)&&r%e.multipleOf!==0)}o(B2,"FromNumber");function V2(e,t,r){if(!ze.IsObjectLike(r)||be(e.minProperties)&&!(Object.getOwnPropertyNames(r).length>=e.minProperties)||be(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(!Mt(s,t,r[i])||(Kn(s)||v2(s))&&!(i in r))return!1}else if(ze.IsExactOptionalProperty(r,i)&&!Mt(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)||Mt(e.additionalProperties,t,r[s])):!0}o(V2,"FromObject");function W2(e,t,r){return _c(r)}o(W2,"FromPromise");function H2(e,t,r){if(!ze.IsRecordLike(r)||be(e.minProperties)&&!(Object.getOwnPropertyNames(r).length>=e.minProperties)||be(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,l])=>s.test(d)?Mt(i,t,l):!0),f=typeof e.additionalProperties=="object"?Object.entries(r).every(([d,l])=>s.test(d)?!0:Mt(e.additionalProperties,t,l)):!0,p=e.additionalProperties===!1?Object.getOwnPropertyNames(r).every(d=>s.test(d)):!0;return a&&f&&p}o(H2,"FromRecord");function Z2(e,t,r){return Mt(Ne(e,t),t,r)}o(Z2,"FromRef");function J2(e,t,r){let n=new RegExp(e.source,e.flags);return be(e.minLength)&&!(r.length>=e.minLength)||be(e.maxLength)&&!(r.length<=e.maxLength)?!1:n.test(r)}o(J2,"FromRegExp");function Y2(e,t,r){return!Oe(r)||be(e.minLength)&&!(r.length>=e.minLength)||be(e.maxLength)&&!(r.length<=e.maxLength)||be(e.pattern)&&!new RegExp(e.pattern).test(r)?!1:be(e.format)?tr.Has(e.format)?tr.Get(e.format)(r):!1:!0}o(Y2,"FromString");function X2(e,t,r){return _n(r)}o(X2,"FromSymbol");function Q2(e,t,r){return Oe(r)&&new RegExp(e.pattern).test(r)}o(Q2,"FromTemplateLiteral");function eU(e,t,r){return Mt(Ne(e,t),t,r)}o(eU,"FromThis");function tU(e,t,r){if(!ue(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(!Mt(e.items[n],t,r[n]))return!1;return!0}o(tU,"FromTuple");function rU(e,t,r){return pt(r)}o(rU,"FromUndefined");function nU(e,t,r){return e.anyOf.some(n=>Mt(n,t,r))}o(nU,"FromUnion");function oU(e,t,r){return!(!hi(r)||be(e.maxByteLength)&&!(r.length<=e.maxByteLength)||be(e.minByteLength)&&!(r.length>=e.minByteLength))}o(oU,"FromUint8Array");function iU(e,t,r){return!0}o(iU,"FromUnknown");function sU(e,t,r){return ze.IsVoidLike(r)}o(sU,"FromVoid");function aU(e,t,r){return Tt.Has(e[E])?Tt.Get(e[E])(e,r):!1}o(aU,"FromKind");function Mt(e,t,r){let n=be(e.$id)?[...t,e]:t,i=e;switch(i[E]){case"Any":return A2(i,n,r);case"Array":return j2(i,n,r);case"AsyncIterator":return k2(i,n,r);case"BigInt":return _2(i,n,r);case"Boolean":return N2(i,n,r);case"Constructor":return R2(i,n,r);case"Date":return C2(i,n,r);case"Function":return M2(i,n,r);case"Integer":return L2(i,n,r);case"Intersect":return U2(i,n,r);case"Iterator":return D2(i,n,r);case"Literal":return q2(i,n,r);case"Never":return K2(i,n,r);case"Not":return z2(i,n,r);case"Null":return G2(i,n,r);case"Number":return B2(i,n,r);case"Object":return V2(i,n,r);case"Promise":return W2(i,n,r);case"Record":return H2(i,n,r);case"Ref":return Z2(i,n,r);case"RegExp":return J2(i,n,r);case"String":return Y2(i,n,r);case"Symbol":return X2(i,n,r);case"TemplateLiteral":return Q2(i,n,r);case"This":return eU(i,n,r);case"Tuple":return tU(i,n,r);case"Undefined":return rU(i,n,r);case"Union":return nU(i,n,r);case"Uint8Array":return oU(i,n,r);case"Unknown":return iU(i,n,r);case"Void":return sU(i,n,r);default:if(!Tt.Has(i[E]))throw new qm(i);return aU(i,n,r)}}o(Mt,"Visit");function he(...e){return e.length===3?Mt(e[0],e[1],e[2]):Mt(e[0],[],e[1])}o(he,"Check");var T;(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"})(T||(T={}));var Gm=class Gm extends ne{constructor(t){super("Unknown type"),this.schema=t}};o(Gm,"ValueErrorsUnknownTypeError");var zm=Gm;function Gn(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}o(Gn,"EscapeKey");function $e(e){return e!==void 0}o($e,"IsDefined");var Bm=class Bm{constructor(t){this.iterator=t}[Symbol.iterator](){return this.iterator}First(){let t=this.iterator.next();return t.done?void 0:t.value}};o(Bm,"ValueErrorIterator");var _r=Bm;function z(e,t,r,n,i=[]){return{type:e,schema:t,path:r,value:n,message:gS()({errorType:e,path:r,schema:t,value:n,errors:i}),errors:i}}o(z,"Create");function*cU(e,t,r,n){}o(cU,"FromAny");function*fU(e,t,r,n){if(!ue(n))return yield z(T.Array,e,r,n);$e(e.minItems)&&!(n.length>=e.minItems)&&(yield z(T.ArrayMinItems,e,r,n)),$e(e.maxItems)&&!(n.length<=e.maxItems)&&(yield z(T.ArrayMaxItems,e,r,n));for(let a=0;a<n.length;a++)yield*C(Lt(e.items,t,"".concat(r,"/").concat(a),n[a]));if(e.uniqueItems===!0&&!function(){let a=new Set;for(let f of n){let p=yo(f);if(a.has(p))return!1;a.add(p)}return!0}()&&(yield z(T.ArrayUniqueItems,e,r,n)),!($e(e.contains)||$e(e.minContains)||$e(e.maxContains)))return;let i=$e(e.contains)?e.contains:Be(),s=n.reduce((a,f,p)=>Lt(i,t,"".concat(r).concat(p),f).next().done===!0?a+1:a,0);s===0&&(yield z(T.ArrayContains,e,r,n)),re(e.minContains)&&s<e.minContains&&(yield z(T.ArrayMinContains,e,r,n)),re(e.maxContains)&&s>e.maxContains&&(yield z(T.ArrayMaxContains,e,r,n))}o(fU,"FromArray");function*uU(e,t,r,n){jc(n)||(yield z(T.AsyncIterator,e,r,n))}o(uU,"FromAsyncIterator");function*pU(e,t,r,n){if(!Nt(n))return yield z(T.BigInt,e,r,n);$e(e.exclusiveMaximum)&&!(n<e.exclusiveMaximum)&&(yield z(T.BigIntExclusiveMaximum,e,r,n)),$e(e.exclusiveMinimum)&&!(n>e.exclusiveMinimum)&&(yield z(T.BigIntExclusiveMinimum,e,r,n)),$e(e.maximum)&&!(n<=e.maximum)&&(yield z(T.BigIntMaximum,e,r,n)),$e(e.minimum)&&!(n>=e.minimum)&&(yield z(T.BigIntMinimum,e,r,n)),$e(e.multipleOf)&&n%e.multipleOf!==BigInt(0)&&(yield z(T.BigIntMultipleOf,e,r,n))}o(pU,"FromBigInt");function*lU(e,t,r,n){cn(n)||(yield z(T.Boolean,e,r,n))}o(lU,"FromBoolean");function*dU(e,t,r,n){yield*C(Lt(e.returns,t,r,n.prototype))}o(dU,"FromConstructor");function*mU(e,t,r,n){if(!Qt(n))return yield z(T.Date,e,r,n);$e(e.exclusiveMaximumTimestamp)&&!(n.getTime()<e.exclusiveMaximumTimestamp)&&(yield z(T.DateExclusiveMaximumTimestamp,e,r,n)),$e(e.exclusiveMinimumTimestamp)&&!(n.getTime()>e.exclusiveMinimumTimestamp)&&(yield z(T.DateExclusiveMinimumTimestamp,e,r,n)),$e(e.maximumTimestamp)&&!(n.getTime()<=e.maximumTimestamp)&&(yield z(T.DateMaximumTimestamp,e,r,n)),$e(e.minimumTimestamp)&&!(n.getTime()>=e.minimumTimestamp)&&(yield z(T.DateMinimumTimestamp,e,r,n)),$e(e.multipleOfTimestamp)&&n.getTime()%e.multipleOfTimestamp!==0&&(yield z(T.DateMultipleOfTimestamp,e,r,n))}o(mU,"FromDate");function*yU(e,t,r,n){so(n)||(yield z(T.Function,e,r,n))}o(yU,"FromFunction");function*hU(e,t,r,n){if(!Nc(n))return yield z(T.Integer,e,r,n);$e(e.exclusiveMaximum)&&!(n<e.exclusiveMaximum)&&(yield z(T.IntegerExclusiveMaximum,e,r,n)),$e(e.exclusiveMinimum)&&!(n>e.exclusiveMinimum)&&(yield z(T.IntegerExclusiveMinimum,e,r,n)),$e(e.maximum)&&!(n<=e.maximum)&&(yield z(T.IntegerMaximum,e,r,n)),$e(e.minimum)&&!(n>=e.minimum)&&(yield z(T.IntegerMinimum,e,r,n)),$e(e.multipleOf)&&n%e.multipleOf!==0&&(yield z(T.IntegerMultipleOf,e,r,n))}o(hU,"FromInteger");function*gU(e,t,r,n){let i=!1;for(let s of e.allOf)for(let a of Lt(s,t,r,n))i=!0,yield a;if(i)return yield z(T.Intersect,e,r,n);if(e.unevaluatedProperties===!1){let s=new RegExp(Dn(e));for(let a of Object.getOwnPropertyNames(n))s.test(a)||(yield z(T.IntersectUnevaluatedProperties,e,"".concat(r,"/").concat(a),n))}if(typeof e.unevaluatedProperties=="object"){let s=new RegExp(Dn(e));for(let a of Object.getOwnPropertyNames(n))if(!s.test(a)){let f=Lt(e.unevaluatedProperties,t,"".concat(r,"/").concat(a),n[a]).next();f.done||(yield f.value)}}}o(gU,"FromIntersect");function*IU(e,t,r,n){kc(n)||(yield z(T.Iterator,e,r,n))}o(IU,"FromIterator");function*xU(e,t,r,n){n!==e.const&&(yield z(T.Literal,e,r,n))}o(xU,"FromLiteral");function*bU(e,t,r,n){yield z(T.Never,e,r,n)}o(bU,"FromNever");function*$U(e,t,r,n){Lt(e.not,t,r,n).next().done===!0&&(yield z(T.Not,e,r,n))}o($U,"FromNot");function*wU(e,t,r,n){kn(n)||(yield z(T.Null,e,r,n))}o(wU,"FromNull");function*PU(e,t,r,n){if(!ze.IsNumberLike(n))return yield z(T.Number,e,r,n);$e(e.exclusiveMaximum)&&!(n<e.exclusiveMaximum)&&(yield z(T.NumberExclusiveMaximum,e,r,n)),$e(e.exclusiveMinimum)&&!(n>e.exclusiveMinimum)&&(yield z(T.NumberExclusiveMinimum,e,r,n)),$e(e.maximum)&&!(n<=e.maximum)&&(yield z(T.NumberMaximum,e,r,n)),$e(e.minimum)&&!(n>=e.minimum)&&(yield z(T.NumberMinimum,e,r,n)),$e(e.multipleOf)&&n%e.multipleOf!==0&&(yield z(T.NumberMultipleOf,e,r,n))}o(PU,"FromNumber");function*OU(e,t,r,n){if(!ze.IsObjectLike(n))return yield z(T.Object,e,r,n);$e(e.minProperties)&&!(Object.getOwnPropertyNames(n).length>=e.minProperties)&&(yield z(T.ObjectMinProperties,e,r,n)),$e(e.maxProperties)&&!(Object.getOwnPropertyNames(n).length<=e.maxProperties)&&(yield z(T.ObjectMaxProperties,e,r,n));let i=Array.isArray(e.required)?e.required:[],s=Object.getOwnPropertyNames(e.properties),a=Object.getOwnPropertyNames(n);for(let f of i)a.includes(f)||(yield z(T.ObjectRequiredProperty,e.properties[f],"".concat(r,"/").concat(Gn(f)),void 0));if(e.additionalProperties===!1)for(let f of a)s.includes(f)||(yield z(T.ObjectAdditionalProperties,e,"".concat(r,"/").concat(Gn(f)),n[f]));if(typeof e.additionalProperties=="object")for(let f of a)s.includes(f)||(yield*C(Lt(e.additionalProperties,t,"".concat(r,"/").concat(Gn(f)),n[f])));for(let f of s){let p=e.properties[f];e.required&&e.required.includes(f)?(yield*C(Lt(p,t,"".concat(r,"/").concat(Gn(f)),n[f])),Kn(e)&&!(f in n)&&(yield z(T.ObjectRequiredProperty,p,"".concat(r,"/").concat(Gn(f)),void 0))):ze.IsExactOptionalProperty(n,f)&&(yield*C(Lt(p,t,"".concat(r,"/").concat(Gn(f)),n[f])))}}o(OU,"FromObject");function*FU(e,t,r,n){_c(n)||(yield z(T.Promise,e,r,n))}o(FU,"FromPromise");function*SU(e,t,r,n){if(!ze.IsRecordLike(n))return yield z(T.Object,e,r,n);$e(e.minProperties)&&!(Object.getOwnPropertyNames(n).length>=e.minProperties)&&(yield z(T.ObjectMinProperties,e,r,n)),$e(e.maxProperties)&&!(Object.getOwnPropertyNames(n).length<=e.maxProperties)&&(yield z(T.ObjectMaxProperties,e,r,n));let[i,s]=Object.entries(e.patternProperties)[0],a=new RegExp(i);for(let[f,p]of Object.entries(n))a.test(f)&&(yield*C(Lt(s,t,"".concat(r,"/").concat(Gn(f)),p)));if(typeof e.additionalProperties=="object")for(let[f,p]of Object.entries(n))a.test(f)||(yield*C(Lt(e.additionalProperties,t,"".concat(r,"/").concat(Gn(f)),p)));if(e.additionalProperties===!1){for(let[f,p]of Object.entries(n))if(!a.test(f))return yield z(T.ObjectAdditionalProperties,e,"".concat(r,"/").concat(Gn(f)),p)}}o(SU,"FromRecord");function*EU(e,t,r,n){yield*C(Lt(Ne(e,t),t,r,n))}o(EU,"FromRef");function*TU(e,t,r,n){if(!Oe(n))return yield z(T.String,e,r,n);if($e(e.minLength)&&!(n.length>=e.minLength)&&(yield z(T.StringMinLength,e,r,n)),$e(e.maxLength)&&!(n.length<=e.maxLength)&&(yield z(T.StringMaxLength,e,r,n)),!new RegExp(e.source,e.flags).test(n))return yield z(T.RegExp,e,r,n)}o(TU,"FromRegExp");function*vU(e,t,r,n){if(!Oe(n))return yield z(T.String,e,r,n);$e(e.minLength)&&!(n.length>=e.minLength)&&(yield z(T.StringMinLength,e,r,n)),$e(e.maxLength)&&!(n.length<=e.maxLength)&&(yield z(T.StringMaxLength,e,r,n)),Oe(e.pattern)&&(new RegExp(e.pattern).test(n)||(yield z(T.StringPattern,e,r,n))),Oe(e.format)&&(tr.Has(e.format)?tr.Get(e.format)(n)||(yield z(T.StringFormat,e,r,n)):yield z(T.StringFormatUnknown,e,r,n))}o(vU,"FromString");function*AU(e,t,r,n){_n(n)||(yield z(T.Symbol,e,r,n))}o(AU,"FromSymbol");function*jU(e,t,r,n){if(!Oe(n))return yield z(T.String,e,r,n);new RegExp(e.pattern).test(n)||(yield z(T.StringPattern,e,r,n))}o(jU,"FromTemplateLiteral");function*kU(e,t,r,n){yield*C(Lt(Ne(e,t),t,r,n))}o(kU,"FromThis");function*_U(e,t,r,n){if(!ue(n))return yield z(T.Tuple,e,r,n);if(e.items===void 0&&n.length!==0)return yield z(T.TupleLength,e,r,n);if(n.length!==e.maxItems)return yield z(T.TupleLength,e,r,n);if(e.items)for(let i=0;i<e.items.length;i++)yield*C(Lt(e.items[i],t,"".concat(r,"/").concat(i),n[i]))}o(_U,"FromTuple");function*NU(e,t,r,n){pt(n)||(yield z(T.Undefined,e,r,n))}o(NU,"FromUndefined");function*RU(e,t,r,n){if(he(e,t,n))return;let i=e.anyOf.map(s=>new _r(Lt(s,t,r,n)));yield z(T.Union,e,r,n,i)}o(RU,"FromUnion");function*CU(e,t,r,n){if(!hi(n))return yield z(T.Uint8Array,e,r,n);$e(e.maxByteLength)&&!(n.length<=e.maxByteLength)&&(yield z(T.Uint8ArrayMaxByteLength,e,r,n)),$e(e.minByteLength)&&!(n.length>=e.minByteLength)&&(yield z(T.Uint8ArrayMinByteLength,e,r,n))}o(CU,"FromUint8Array");function*MU(e,t,r,n){}o(MU,"FromUnknown");function*LU(e,t,r,n){ze.IsVoidLike(n)||(yield z(T.Void,e,r,n))}o(LU,"FromVoid");function*UU(e,t,r,n){Tt.Get(e[E])(e,n)||(yield z(T.Kind,e,r,n))}o(UU,"FromKind");function*Lt(e,t,r,n){let i=$e(e.$id)?[...t,e]:t,s=e;switch(s[E]){case"Any":return yield*C(cU(s,i,r,n));case"Array":return yield*C(fU(s,i,r,n));case"AsyncIterator":return yield*C(uU(s,i,r,n));case"BigInt":return yield*C(pU(s,i,r,n));case"Boolean":return yield*C(lU(s,i,r,n));case"Constructor":return yield*C(dU(s,i,r,n));case"Date":return yield*C(mU(s,i,r,n));case"Function":return yield*C(yU(s,i,r,n));case"Integer":return yield*C(hU(s,i,r,n));case"Intersect":return yield*C(gU(s,i,r,n));case"Iterator":return yield*C(IU(s,i,r,n));case"Literal":return yield*C(xU(s,i,r,n));case"Never":return yield*C(bU(s,i,r,n));case"Not":return yield*C($U(s,i,r,n));case"Null":return yield*C(wU(s,i,r,n));case"Number":return yield*C(PU(s,i,r,n));case"Object":return yield*C(OU(s,i,r,n));case"Promise":return yield*C(FU(s,i,r,n));case"Record":return yield*C(SU(s,i,r,n));case"Ref":return yield*C(EU(s,i,r,n));case"RegExp":return yield*C(TU(s,i,r,n));case"String":return yield*C(vU(s,i,r,n));case"Symbol":return yield*C(AU(s,i,r,n));case"TemplateLiteral":return yield*C(jU(s,i,r,n));case"This":return yield*C(kU(s,i,r,n));case"Tuple":return yield*C(_U(s,i,r,n));case"Undefined":return yield*C(NU(s,i,r,n));case"Union":return yield*C(RU(s,i,r,n));case"Uint8Array":return yield*C(CU(s,i,r,n));case"Unknown":return yield*C(MU(s,i,r,n));case"Void":return yield*C(LU(s,i,r,n));default:if(!Tt.Has(s[E]))throw new zm(e);return yield*C(UU(s,i,r,n))}}o(Lt,"Visit");function mn(...e){let t=e.length===3?Lt(e[0],e[1],"",e[2]):Lt(e[0],[],"",e[1]);return new _r(t)}o(mn,"Errors");c();var DU=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},wS=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)},Vm,mf,PS,Hm=class Hm extends ne{constructor(t){let r=t.First();super(r===void 0?"Invalid Value":r.message),Vm.add(this),mf.set(this,void 0),DU(this,mf,t,"f"),this.error=r}Errors(){return new _r(wS(this,Vm,"m",PS).call(this))}};o(Hm,"AssertError");var Wm=Hm;mf=new WeakMap,Vm=new WeakSet,PS=o(function*(){this.error&&(yield this.error),yield*C(wS(this,mf,"f"))},"_AssertError_Iterator");function $S(e,t,r){if(!he(e,t,r))throw new Wm(mn(e,t,r))}o($S,"AssertValue");function yf(...e){return e.length===3?$S(e[0],e[1],e[2]):$S(e[0],[],e[1])}o(yf,"Assert");c();c();c();function qU(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(qU,"FromObject");function KU(e){return e.map(t=>Re(t))}o(KU,"FromArray");function zU(e){return e.slice()}o(zU,"FromTypedArray");function GU(e){return new Map(Re([...e.entries()]))}o(GU,"FromMap");function BU(e){return new Set(Re([...e.entries()]))}o(BU,"FromSet");function VU(e){return new Date(e.toISOString())}o(VU,"FromDate");function Re(e){if(ue(e))return KU(e);if(Qt(e))return VU(e);if(Or(e))return zU(e);if(KP(e))return GU(e);if(zP(e))return BU(e);if(pe(e))return qU(e);if(Rt(e))return e;throw new Error("ValueClone: Unable to clone value")}o(Re,"Clone");var Zm=class Zm extends ne{constructor(t,r){super(r),this.schema=t}};o(Zm,"ValueCreateError");var hr=Zm;function Ce(e){return so(e)?e():Re(e)}o(Ce,"FromDefault");function WU(e,t){return oe(e,"default")?Ce(e.default):{}}o(WU,"FromAny");function HU(e,t){if(e.uniqueItems===!0&&!oe(e,"default"))throw new hr(e,"Array with the uniqueItems constraint requires a default value");if("contains"in e&&!oe(e,"default"))throw new hr(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=>gr(e.items,t)):[]}o(HU,"FromArray");function ZU(e,t){return oe(e,"default")?Ce(e.default):function(){return wh(this,null,function*(){})}()}o(ZU,"FromAsyncIterator");function JU(e,t){return oe(e,"default")?Ce(e.default):BigInt(0)}o(JU,"FromBigInt");function YU(e,t){return oe(e,"default")?Ce(e.default):!1}o(YU,"FromBoolean");function XU(e,t){if(oe(e,"default"))return Ce(e.default);{let r=gr(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(XU,"FromConstructor");function QU(e,t){return oe(e,"default")?Ce(e.default):e.minimumTimestamp!==void 0?new Date(e.minimumTimestamp):new Date}o(QU,"FromDate");function eD(e,t){return oe(e,"default")?Ce(e.default):()=>gr(e.returns,t)}o(eD,"FromFunction");function tD(e,t){return oe(e,"default")?Ce(e.default):e.minimum!==void 0?e.minimum:0}o(tD,"FromInteger");function rD(e,t){if(oe(e,"default"))return Ce(e.default);{let r=e.allOf.reduce((n,i)=>{let s=gr(i,t);return typeof s=="object"?S(S({},n),s):s},{});if(!he(e,t,r))throw new hr(e,"Intersect produced invalid value. Consider using a default value.");return r}}o(rD,"FromIntersect");function nD(e,t){return oe(e,"default")?Ce(e.default):function*(){}()}o(nD,"FromIterator");function oD(e,t){return oe(e,"default")?Ce(e.default):e.const}o(oD,"FromLiteral");function iD(e,t){if(oe(e,"default"))return Ce(e.default);throw new hr(e,"Never types cannot be created. Consider using a default value.")}o(iD,"FromNever");function sD(e,t){if(oe(e,"default"))return Ce(e.default);throw new hr(e,"Not types must have a default value")}o(sD,"FromNot");function aD(e,t){return oe(e,"default")?Ce(e.default):null}o(aD,"FromNull");function cD(e,t){return oe(e,"default")?Ce(e.default):e.minimum!==void 0?e.minimum:0}o(cD,"FromNumber");function fD(e,t){if(oe(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]=gr(s,t));return n}}o(fD,"FromObject");function uD(e,t){return oe(e,"default")?Ce(e.default):Promise.resolve(gr(e.item,t))}o(uD,"FromPromise");function pD(e,t){let[r,n]=Object.entries(e.patternProperties)[0];if(oe(e,"default"))return Ce(e.default);if(r===Ln||r===Mn)return{};{let i=r.slice(1,r.length-1).split("|"),s={};for(let a of i)s[a]=gr(n,t);return s}}o(pD,"FromRecord");function lD(e,t){return oe(e,"default")?Ce(e.default):gr(Ne(e,t),t)}o(lD,"FromRef");function dD(e,t){if(oe(e,"default"))return Ce(e.default);throw new hr(e,"RegExp types cannot be created. Consider using a default value.")}o(dD,"FromRegExp");function mD(e,t){if(e.pattern!==void 0){if(oe(e,"default"))return Ce(e.default);throw new hr(e,"String types with patterns must specify a default value")}else if(e.format!==void 0){if(oe(e,"default"))return Ce(e.default);throw new hr(e,"String types with formats must specify a default value")}else return oe(e,"default")?Ce(e.default):e.minLength!==void 0?Array.from({length:e.minLength}).map(()=>" ").join(""):""}o(mD,"FromString");function yD(e,t){return oe(e,"default")?Ce(e.default):"value"in e?Symbol.for(e.value):Symbol()}o(yD,"FromSymbol");function hD(e,t){if(oe(e,"default"))return Ce(e.default);if(!Uc(e))throw new hr(e,"Can only create template literals that produce a finite variants. Consider using a default value.");return Pi(e)[0]}o(hD,"FromTemplateLiteral");function gD(e,t){if(OS++>FD)throw new hr(e,"Cannot create recursive type as it appears possibly infinite. Consider using a default.");return oe(e,"default")?Ce(e.default):gr(Ne(e,t),t)}o(gD,"FromThis");function ID(e,t){return oe(e,"default")?Ce(e.default):e.items===void 0?[]:Array.from({length:e.minItems}).map((r,n)=>gr(e.items[n],t))}o(ID,"FromTuple");function xD(e,t){if(oe(e,"default"))return Ce(e.default)}o(xD,"FromUndefined");function bD(e,t){if(oe(e,"default"))return Ce(e.default);if(e.anyOf.length===0)throw new Error("ValueCreate.Union: Cannot create Union with zero variants");return gr(e.anyOf[0],t)}o(bD,"FromUnion");function $D(e,t){return oe(e,"default")?Ce(e.default):e.minByteLength!==void 0?new Uint8Array(e.minByteLength):new Uint8Array(0)}o($D,"FromUint8Array");function wD(e,t){return oe(e,"default")?Ce(e.default):{}}o(wD,"FromUnknown");function PD(e,t){if(oe(e,"default"))return Ce(e.default)}o(PD,"FromVoid");function OD(e,t){if(oe(e,"default"))return Ce(e.default);throw new Error("User defined types must specify a default value")}o(OD,"FromKind");function gr(e,t){let r=kr(e,t),n=e;switch(n[E]){case"Any":return WU(n,r);case"Array":return HU(n,r);case"AsyncIterator":return ZU(n,r);case"BigInt":return JU(n,r);case"Boolean":return YU(n,r);case"Constructor":return XU(n,r);case"Date":return QU(n,r);case"Function":return eD(n,r);case"Integer":return tD(n,r);case"Intersect":return rD(n,r);case"Iterator":return nD(n,r);case"Literal":return oD(n,r);case"Never":return iD(n,r);case"Not":return sD(n,r);case"Null":return aD(n,r);case"Number":return cD(n,r);case"Object":return fD(n,r);case"Promise":return uD(n,r);case"Record":return pD(n,r);case"Ref":return lD(n,r);case"RegExp":return dD(n,r);case"String":return mD(n,r);case"Symbol":return yD(n,r);case"TemplateLiteral":return hD(n,r);case"This":return gD(n,r);case"Tuple":return ID(n,r);case"Undefined":return xD(n,r);case"Union":return bD(n,r);case"Uint8Array":return $D(n,r);case"Unknown":return wD(n,r);case"Void":return PD(n,r);default:if(!Tt.Has(n[E]))throw new hr(n,"Unknown type");return OD(n,r)}}o(gr,"Visit");var FD=512,OS=0;function Nr(...e){return OS=0,e.length===2?gr(e[0],e[1]):gr(e[0],[])}o(Nr,"Create");var Ym=class Ym extends ne{constructor(t,r){super(r),this.schema=t}};o(Ym,"ValueCastError");var hf=Ym;function SD(e,t,r){if(e[E]==="Object"&&typeof r=="object"&&!kn(r)){let n=e,i=Object.getOwnPropertyNames(r),s=Object.entries(n.properties),[a,f]=[1/s.length,s.length];return s.reduce((p,[d,l])=>{let m=l[E]==="Literal"&&l.const===r[d]?f:0,g=he(l,t,r[d])?a:0,b=i.includes(d)?a:0;return p+(m+g+b)},0)}else return he(e,t,r)?1:0}o(SD,"ScoreUnion");function ED(e,t,r){let n=e.anyOf.map(a=>Ne(a,t)),[i,s]=[n[0],0];for(let a of n){let f=SD(a,t,r);f>s&&(i=a,s=f)}return i}o(ED,"SelectUnion");function TD(e,t,r){if("default"in e)return typeof r=="function"?e.default:Re(e.default);{let n=ED(e,t,r);return Jm(n,t,r)}}o(TD,"CastUnion");function vD(e,t,r){return he(e,t,r)?Re(r):Nr(e,t)}o(vD,"DefaultClone");function AD(e,t,r){return he(e,t,r)?r:Nr(e,t)}o(AD,"Default");function jD(e,t,r){if(he(e,t,r))return Re(r);let n=ue(r)?Re(r):Nr(e,t),i=re(e.minItems)&&n.length<e.minItems?[...n,...Array.from({length:e.minItems-n.length},()=>null)]:n,a=(re(e.maxItems)&&i.length>e.maxItems?i.slice(0,e.maxItems):i).map(p=>yn(e.items,t,p));if(e.uniqueItems!==!0)return a;let f=[...new Set(a)];if(!he(e,t,f))throw new hf(e,"Array cast produced invalid data due to uniqueItems constraint");return f}o(jD,"FromArray");function kD(e,t,r){if(he(e,t,r))return Nr(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]=yn(a,t,r.prototype[s]));return i}o(kD,"FromConstructor");function _D(e,t,r){let n=Nr(e,t),i=pe(n)&&pe(r)?S(S({},n),r):r;return he(e,t,i)?i:Nr(e,t)}o(_D,"FromIntersect");function ND(e,t,r){throw new hf(e,"Never types cannot be cast")}o(ND,"FromNever");function RD(e,t,r){if(he(e,t,r))return r;if(r===null||typeof r!="object")return Nr(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]=yn(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]=yn(e.additionalProperties,t,r[a]))}return i}o(RD,"FromObject");function CD(e,t,r){if(he(e,t,r))return Re(r);if(r===null||typeof r!="object"||Array.isArray(r)||r instanceof Date)return Nr(e,t);let n=Object.getOwnPropertyNames(e.patternProperties)[0],i=e.patternProperties[n],s={};for(let[a,f]of Object.entries(r))s[a]=yn(i,t,f);return s}o(CD,"FromRecord");function MD(e,t,r){return yn(Ne(e,t),t,r)}o(MD,"FromRef");function LD(e,t,r){return yn(Ne(e,t),t,r)}o(LD,"FromThis");function UD(e,t,r){return he(e,t,r)?Re(r):ue(r)?e.items===void 0?[]:e.items.map((n,i)=>yn(n,t,r[i])):Nr(e,t)}o(UD,"FromTuple");function DD(e,t,r){return he(e,t,r)?Re(r):TD(e,t,r)}o(DD,"FromUnion");function yn(e,t,r){let n=Oe(e.$id)?[...t,e]:t,i=e;switch(e[E]){case"Array":return jD(i,n,r);case"Constructor":return kD(i,n,r);case"Intersect":return _D(i,n,r);case"Never":return ND(i,n,r);case"Object":return RD(i,n,r);case"Record":return CD(i,n,r);case"Ref":return MD(i,n,r);case"This":return LD(i,n,r);case"Tuple":return UD(i,n,r);case"Union":return DD(i,n,r);case"Date":case"Symbol":case"Uint8Array":return vD(e,t,r);default:return AD(i,n,r)}}o(yn,"Visit");function Jm(...e){return e.length===3?yn(e[0],e[1],e[2]):yn(e[0],[],e[1])}o(Jm,"Cast");c();function qD(e){return co(e)&&e[E]!=="Unsafe"}o(qD,"IsCheckable");function KD(e,t,r){return ue(r)?r.map(n=>Ir(e.items,t,n)):r}o(KD,"FromArray");function zD(e,t,r){let n=e.unevaluatedProperties,s=e.allOf.map(f=>Ir(f,t,Re(r))).reduce((f,p)=>pe(p)?S(S({},f),p):p,{});if(!pe(r)||!pe(s)||!co(n))return s;let a=At(e);for(let f of Object.getOwnPropertyNames(r))a.includes(f)||he(n,t,r[f])&&(s[f]=Ir(n,t,r[f]));return s}o(zD,"FromIntersect");function GD(e,t,r){if(!pe(r)||ue(r))return r;let n=e.additionalProperties;for(let i of Object.getOwnPropertyNames(r)){if(oe(e.properties,i)){r[i]=Ir(e.properties[i],t,r[i]);continue}if(co(n)&&he(n,t,r[i])){r[i]=Ir(n,t,r[i]);continue}delete r[i]}return r}o(GD,"FromObject");function BD(e,t,r){if(!pe(r))return r;let n=e.additionalProperties,i=Object.getOwnPropertyNames(r),[s,a]=Object.entries(e.patternProperties)[0],f=new RegExp(s);for(let p of i){if(f.test(p)){r[p]=Ir(a,t,r[p]);continue}if(co(n)&&he(n,t,r[p])){r[p]=Ir(n,t,r[p]);continue}delete r[p]}return r}o(BD,"FromRecord");function VD(e,t,r){return Ir(Ne(e,t),t,r)}o(VD,"FromRef");function WD(e,t,r){return Ir(Ne(e,t),t,r)}o(WD,"FromThis");function HD(e,t,r){if(!ue(r))return r;if(pt(e.items))return[];let n=Math.min(r.length,e.items.length);for(let i=0;i<n;i++)r[i]=Ir(e.items[i],t,r[i]);return r.length>n?r.slice(0,n):r}o(HD,"FromTuple");function ZD(e,t,r){for(let n of e.anyOf)if(qD(n)&&he(n,t,r))return Ir(n,t,r);return r}o(ZD,"FromUnion");function Ir(e,t,r){let n=Oe(e.$id)?[...t,e]:t,i=e;switch(i[E]){case"Array":return KD(i,n,r);case"Intersect":return zD(i,n,r);case"Object":return GD(i,n,r);case"Record":return BD(i,n,r);case"Ref":return VD(i,n,r);case"This":return WD(i,n,r);case"Tuple":return HD(i,n,r);case"Union":return ZD(i,n,r);default:return r}}o(Ir,"Visit");function gf(...e){return e.length===3?Ir(e[0],e[1],e[2]):Ir(e[0],[],e[1])}o(gf,"Clean");c();function If(e){return Oe(e)&&!isNaN(e)&&!isNaN(parseFloat(e))}o(If,"IsStringNumeric");function JD(e){return Nt(e)||cn(e)||re(e)}o(JD,"IsValueToString");function na(e){return e===!0||re(e)&&e===1||Nt(e)&&e===BigInt("1")||Oe(e)&&(e.toLowerCase()==="true"||e==="1")}o(na,"IsValueTrue");function oa(e){return e===!1||re(e)&&(e===0||Object.is(e,-0))||Nt(e)&&e===BigInt("0")||Oe(e)&&(e.toLowerCase()==="false"||e==="0"||e==="-0")}o(oa,"IsValueFalse");function YD(e){return Oe(e)&&/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i.test(e)}o(YD,"IsTimeStringWithTimeZone");function XD(e){return Oe(e)&&/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)?$/i.test(e)}o(XD,"IsTimeStringWithoutTimeZone");function QD(e){return Oe(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(QD,"IsDateTimeStringWithTimeZone");function eq(e){return Oe(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(eq,"IsDateTimeStringWithoutTimeZone");function tq(e){return Oe(e)&&/^\d\d\d\d-[0-1]\d-[0-3]\d$/i.test(e)}o(tq,"IsDateString");function rq(e,t){let r=SS(e);return r===t?r:e}o(rq,"TryConvertLiteralString");function nq(e,t){let r=ES(e);return r===t?r:e}o(nq,"TryConvertLiteralNumber");function oq(e,t){let r=FS(e);return r===t?r:e}o(oq,"TryConvertLiteralBoolean");function iq(e,t){return Oe(e.const)?rq(t,e.const):re(e.const)?nq(t,e.const):cn(e.const)?oq(t,e.const):t}o(iq,"TryConvertLiteral");function FS(e){return na(e)?!0:oa(e)?!1:e}o(FS,"TryConvertBoolean");function sq(e){let t=o(r=>r.split(".")[0],"truncateInteger");return If(e)?BigInt(t(e)):re(e)?BigInt(Math.trunc(e)):oa(e)?BigInt(0):na(e)?BigInt(1):e}o(sq,"TryConvertBigInt");function SS(e){return JD(e)?e.toString():_n(e)&&e.description!==void 0?e.description.toString():e}o(SS,"TryConvertString");function ES(e){return If(e)?parseFloat(e):na(e)?1:oa(e)?0:e}o(ES,"TryConvertNumber");function aq(e){return If(e)?parseInt(e):re(e)?e|0:na(e)?1:oa(e)?0:e}o(aq,"TryConvertInteger");function cq(e){return Oe(e)&&e.toLowerCase()==="null"?null:e}o(cq,"TryConvertNull");function fq(e){return Oe(e)&&e==="undefined"?void 0:e}o(fq,"TryConvertUndefined");function uq(e){return Qt(e)?e:re(e)?new Date(e):na(e)?new Date(1):oa(e)?new Date(0):If(e)?new Date(parseInt(e)):XD(e)?new Date("1970-01-01T".concat(e,".000Z")):YD(e)?new Date("1970-01-01T".concat(e)):eq(e)?new Date("".concat(e,".000Z")):QD(e)?new Date(e):tq(e)?new Date("".concat(e,"T00:00:00.000Z")):e}o(uq,"TryConvertDate");function pq(e,t,r){return(ue(r)?r:[r]).map(i=>hn(e.items,t,i))}o(pq,"FromArray");function lq(e,t,r){return sq(r)}o(lq,"FromBigInt");function dq(e,t,r){return FS(r)}o(dq,"FromBoolean");function mq(e,t,r){return uq(r)}o(mq,"FromDate");function yq(e,t,r){return aq(r)}o(yq,"FromInteger");function hq(e,t,r){return e.allOf.reduce((n,i)=>hn(i,t,n),r)}o(hq,"FromIntersect");function gq(e,t,r){return iq(e,r)}o(gq,"FromLiteral");function Iq(e,t,r){return cq(r)}o(Iq,"FromNull");function xq(e,t,r){return ES(r)}o(xq,"FromNumber");function bq(e,t,r){if(!pe(r))return r;for(let n of Object.getOwnPropertyNames(e.properties))oe(r,n)&&(r[n]=hn(e.properties[n],t,r[n]));return r}o(bq,"FromObject");function $q(e,t,r){if(!pe(r))return r;let i=Object.getOwnPropertyNames(e.patternProperties)[0],s=e.patternProperties[i];for(let[a,f]of Object.entries(r))r[a]=hn(s,t,f);return r}o($q,"FromRecord");function wq(e,t,r){return hn(Ne(e,t),t,r)}o(wq,"FromRef");function Pq(e,t,r){return SS(r)}o(Pq,"FromString");function Oq(e,t,r){return Oe(r)||re(r)?Symbol(r):r}o(Oq,"FromSymbol");function Fq(e,t,r){return hn(Ne(e,t),t,r)}o(Fq,"FromThis");function Sq(e,t,r){return ue(r)&&!pt(e.items)?r.map((i,s)=>s<e.items.length?hn(e.items[s],t,i):i):r}o(Sq,"FromTuple");function Eq(e,t,r){return fq(r)}o(Eq,"FromUndefined");function Tq(e,t,r){for(let n of e.anyOf){let i=hn(n,t,Re(r));if(he(n,t,i))return i}return r}o(Tq,"FromUnion");function hn(e,t,r){let n=kr(e,t),i=e;switch(e[E]){case"Array":return pq(i,n,r);case"BigInt":return lq(i,n,r);case"Boolean":return dq(i,n,r);case"Date":return mq(i,n,r);case"Integer":return yq(i,n,r);case"Intersect":return hq(i,n,r);case"Literal":return gq(i,n,r);case"Null":return Iq(i,n,r);case"Number":return xq(i,n,r);case"Object":return bq(i,n,r);case"Record":return $q(i,n,r);case"Ref":return wq(i,n,r);case"String":return Pq(i,n,r);case"Symbol":return Oq(i,n,r);case"This":return Fq(i,n,r);case"Tuple":return Sq(i,n,r);case"Undefined":return Eq(i,n,r);case"Union":return Tq(i,n,r);default:return r}}o(hn,"Visit");function xf(...e){return e.length===3?hn(e[0],e[1],e[2]):hn(e[0],[],e[1])}o(xf,"Convert");c();c();var Xm=class Xm extends ne{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(Xm,"TransformDecodeCheckError");var Di=Xm,Qm=class Qm extends ne{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(Qm,"TransformDecodeError");var Uo=Qm;function lt(e,t,r){try{return tt(e)?e[st].Decode(r):r}catch(n){throw new Uo(e,t,r,n)}}o(lt,"Default");function vq(e,t,r,n){return ue(n)?lt(e,r,n.map((i,s)=>gn(e.items,t,"".concat(r,"/").concat(s),i))):lt(e,r,n)}o(vq,"FromArray");function Aq(e,t,r,n){if(!pe(n)||Rt(n))return lt(e,r,n);let i=po(e),s=i.map(l=>l[0]),a=S({},n);for(let[l,m]of i)l in a&&(a[l]=gn(m,t,"".concat(r,"/").concat(l),a[l]));if(!tt(e.unevaluatedProperties))return lt(e,r,a);let f=Object.getOwnPropertyNames(a),p=e.unevaluatedProperties,d=S({},a);for(let l of f)s.includes(l)||(d[l]=lt(p,"".concat(r,"/").concat(l),d[l]));return lt(e,r,d)}o(Aq,"FromIntersect");function jq(e,t,r,n){return lt(e,r,gn(e.not,t,r,n))}o(jq,"FromNot");function kq(e,t,r,n){if(!pe(n))return lt(e,r,n);let i=At(e),s=S({},n);for(let d of i)oe(s,d)&&(pt(s[d])&&(!Ii(e.properties[d])||ze.IsExactOptionalProperty(s,d))||(s[d]=gn(e.properties[d],t,"".concat(r,"/").concat(d),s[d])));if(!Fe(e.additionalProperties))return lt(e,r,s);let a=Object.getOwnPropertyNames(s),f=e.additionalProperties,p=S({},s);for(let d of a)i.includes(d)||(p[d]=lt(f,"".concat(r,"/").concat(d),p[d]));return lt(e,r,p)}o(kq,"FromObject");function _q(e,t,r,n){if(!pe(n))return lt(e,r,n);let i=Object.getOwnPropertyNames(e.patternProperties)[0],s=new RegExp(i),a=S({},n);for(let l of Object.getOwnPropertyNames(n))s.test(l)&&(a[l]=gn(e.patternProperties[i],t,"".concat(r,"/").concat(l),a[l]));if(!Fe(e.additionalProperties))return lt(e,r,a);let f=Object.getOwnPropertyNames(a),p=e.additionalProperties,d=S({},a);for(let l of f)s.test(l)||(d[l]=lt(p,"".concat(r,"/").concat(l),d[l]));return lt(e,r,d)}o(_q,"FromRecord");function Nq(e,t,r,n){let i=Ne(e,t);return lt(e,r,gn(i,t,r,n))}o(Nq,"FromRef");function Rq(e,t,r,n){let i=Ne(e,t);return lt(e,r,gn(i,t,r,n))}o(Rq,"FromThis");function Cq(e,t,r,n){return ue(n)&&ue(e.items)?lt(e,r,e.items.map((i,s)=>gn(i,t,"".concat(r,"/").concat(s),n[s]))):lt(e,r,n)}o(Cq,"FromTuple");function Mq(e,t,r,n){for(let i of e.anyOf){if(!he(i,t,n))continue;let s=gn(i,t,r,n);return lt(e,r,s)}return lt(e,r,n)}o(Mq,"FromUnion");function gn(e,t,r,n){let i=kr(e,t),s=e;switch(e[E]){case"Array":return vq(s,i,r,n);case"Intersect":return Aq(s,i,r,n);case"Not":return jq(s,i,r,n);case"Object":return kq(s,i,r,n);case"Record":return _q(s,i,r,n);case"Ref":return Nq(s,i,r,n);case"Symbol":return lt(s,r,n);case"This":return Rq(s,i,r,n);case"Tuple":return Cq(s,i,r,n);case"Union":return Mq(s,i,r,n);default:return lt(s,r,n)}}o(gn,"Visit");function qi(e,t,r){return gn(e,t,"",r)}o(qi,"TransformDecode");c();var ey=class ey extends ne{constructor(t,r,n){super("The encoded value does not match the expected schema"),this.schema=t,this.value=r,this.error=n}};o(ey,"TransformEncodeCheckError");var Ki=ey,ty=class ty extends ne{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(ty,"TransformEncodeError");var Do=ty;function Ht(e,t,r){try{return tt(e)?e[st].Encode(r):r}catch(n){throw new Do(e,t,r,n)}}o(Ht,"Default");function Lq(e,t,r,n){let i=Ht(e,r,n);return ue(i)?i.map((s,a)=>In(e.items,t,"".concat(r,"/").concat(a),s)):i}o(Lq,"FromArray");function Uq(e,t,r,n){let i=Ht(e,r,n);if(!pe(n)||Rt(n))return i;let s=po(e),a=s.map(m=>m[0]),f=S({},i);for(let[m,g]of s)m in f&&(f[m]=In(g,t,"".concat(r,"/").concat(m),f[m]));if(!tt(e.unevaluatedProperties))return f;let p=Object.getOwnPropertyNames(f),d=e.unevaluatedProperties,l=S({},f);for(let m of p)a.includes(m)||(l[m]=Ht(d,"".concat(r,"/").concat(m),l[m]));return l}o(Uq,"FromIntersect");function Dq(e,t,r,n){return Ht(e.not,r,Ht(e,r,n))}o(Dq,"FromNot");function qq(e,t,r,n){let i=Ht(e,r,n);if(!pe(i))return i;let s=At(e),a=S({},i);for(let l of s)oe(a,l)&&(pt(a[l])&&(!Ii(e.properties[l])||ze.IsExactOptionalProperty(a,l))||(a[l]=In(e.properties[l],t,"".concat(r,"/").concat(l),a[l])));if(!Fe(e.additionalProperties))return a;let f=Object.getOwnPropertyNames(a),p=e.additionalProperties,d=S({},a);for(let l of f)s.includes(l)||(d[l]=Ht(p,"".concat(r,"/").concat(l),d[l]));return d}o(qq,"FromObject");function Kq(e,t,r,n){let i=Ht(e,r,n);if(!pe(n))return i;let s=Object.getOwnPropertyNames(e.patternProperties)[0],a=new RegExp(s),f=S({},i);for(let m of Object.getOwnPropertyNames(n))a.test(m)&&(f[m]=In(e.patternProperties[s],t,"".concat(r,"/").concat(m),f[m]));if(!Fe(e.additionalProperties))return f;let p=Object.getOwnPropertyNames(f),d=e.additionalProperties,l=S({},f);for(let m of p)a.test(m)||(l[m]=Ht(d,"".concat(r,"/").concat(m),l[m]));return l}o(Kq,"FromRecord");function zq(e,t,r,n){let i=Ne(e,t),s=In(i,t,r,n);return Ht(e,r,s)}o(zq,"FromRef");function Gq(e,t,r,n){let i=Ne(e,t),s=In(i,t,r,n);return Ht(e,r,s)}o(Gq,"FromThis");function Bq(e,t,r,n){let i=Ht(e,r,n);return ue(e.items)?e.items.map((s,a)=>In(s,t,"".concat(r,"/").concat(a),i[a])):[]}o(Bq,"FromTuple");function Vq(e,t,r,n){for(let i of e.anyOf){if(!he(i,t,n))continue;let s=In(i,t,r,n);return Ht(e,r,s)}for(let i of e.anyOf){let s=In(i,t,r,n);if(he(e,t,s))return Ht(e,r,s)}return Ht(e,r,n)}o(Vq,"FromUnion");function In(e,t,r,n){let i=kr(e,t),s=e;switch(e[E]){case"Array":return Lq(s,i,r,n);case"Intersect":return Uq(s,i,r,n);case"Not":return Dq(s,i,r,n);case"Object":return qq(s,i,r,n);case"Record":return Kq(s,i,r,n);case"Ref":return zq(s,i,r,n);case"This":return Gq(s,i,r,n);case"Tuple":return Bq(s,i,r,n);case"Union":return Vq(s,i,r,n);default:return Ht(s,r,n)}}o(In,"Visit");function bf(e,t,r){return In(e,t,"",r)}o(bf,"TransformEncode");c();function Wq(e,t){return tt(e)||jt(e.items,t)}o(Wq,"FromArray");function Hq(e,t){return tt(e)||jt(e.items,t)}o(Hq,"FromAsyncIterator");function Zq(e,t){return tt(e)||jt(e.returns,t)||e.parameters.some(r=>jt(r,t))}o(Zq,"FromConstructor");function Jq(e,t){return tt(e)||jt(e.returns,t)||e.parameters.some(r=>jt(r,t))}o(Jq,"FromFunction");function Yq(e,t){return tt(e)||tt(e.unevaluatedProperties)||e.allOf.some(r=>jt(r,t))}o(Yq,"FromIntersect");function Xq(e,t){return tt(e)||jt(e.items,t)}o(Xq,"FromIterator");function Qq(e,t){return tt(e)||jt(e.not,t)}o(Qq,"FromNot");function e9(e,t){return tt(e)||Object.values(e.properties).some(r=>jt(r,t))||Fe(e.additionalProperties)&&jt(e.additionalProperties,t)}o(e9,"FromObject");function t9(e,t){return tt(e)||jt(e.item,t)}o(t9,"FromPromise");function r9(e,t){let r=Object.getOwnPropertyNames(e.patternProperties)[0],n=e.patternProperties[r];return tt(e)||jt(n,t)||Fe(e.additionalProperties)&&tt(e.additionalProperties)}o(r9,"FromRecord");function n9(e,t){return tt(e)?!0:jt(Ne(e,t),t)}o(n9,"FromRef");function o9(e,t){return tt(e)?!0:jt(Ne(e,t),t)}o(o9,"FromThis");function i9(e,t){return tt(e)||!pt(e.items)&&e.items.some(r=>jt(r,t))}o(i9,"FromTuple");function s9(e,t){return tt(e)||e.anyOf.some(r=>jt(r,t))}o(s9,"FromUnion");function jt(e,t){let r=kr(e,t),n=e;if(e.$id&&ry.has(e.$id))return!1;switch(e.$id&&ry.add(e.$id),e[E]){case"Array":return Wq(n,r);case"AsyncIterator":return Hq(n,r);case"Constructor":return Zq(n,r);case"Function":return Jq(n,r);case"Intersect":return Yq(n,r);case"Iterator":return Xq(n,r);case"Not":return Qq(n,r);case"Object":return e9(n,r);case"Promise":return t9(n,r);case"Record":return r9(n,r);case"Ref":return n9(n,r);case"This":return o9(n,r);case"Tuple":return i9(n,r);case"Union":return s9(n,r);default:return tt(e)}}o(jt,"Visit");var ry=new Set;function xn(e,t){return ry.clear(),jt(e,t)}o(xn,"HasTransform");function TS(...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 Di(t,n,mn(t,r,n).First());return xn(t,r)?qi(t,r,n):n}o(TS,"Decode");c();function Bn(e,t){let r=oe(e,"default")?e.default:void 0,n=so(r)?r():Re(r);return pt(t)?n:pe(t)&&pe(n)?Object.assign(n,t):t}o(Bn,"ValueOrDefault");function ny(e){return co(e)&&"default"in e}o(ny,"HasDefaultProperty");function a9(e,t,r){let n=Bn(e,r);if(!ue(n))return n;for(let i=0;i<n.length;i++)n[i]=xr(e.items,t,n[i]);return n}o(a9,"FromArray");function c9(e,t,r){return Qt(r)?r:Bn(e,r)}o(c9,"FromDate");function f9(e,t,r){let n=Bn(e,r);return e.allOf.reduce((i,s)=>{let a=xr(s,t,n);return pe(a)?S(S({},i),a):a},{})}o(f9,"FromIntersect");function u9(e,t,r){let n=Bn(e,r);if(!pe(n))return n;let i=Object.getOwnPropertyNames(e.properties);for(let s of i){let a=xr(e.properties[s],t,n[s]);pt(a)||(n[s]=xr(e.properties[s],t,n[s]))}if(!ny(e.additionalProperties))return n;for(let s of Object.getOwnPropertyNames(n))i.includes(s)||(n[s]=xr(e.additionalProperties,t,n[s]));return n}o(u9,"FromObject");function p9(e,t,r){let n=Bn(e,r);if(!pe(n))return n;let i=e.additionalProperties,[s,a]=Object.entries(e.patternProperties)[0],f=new RegExp(s);for(let p of Object.getOwnPropertyNames(n))f.test(p)&&ny(a)&&(n[p]=xr(a,t,n[p]));if(!ny(i))return n;for(let p of Object.getOwnPropertyNames(n))f.test(p)||(n[p]=xr(i,t,n[p]));return n}o(p9,"FromRecord");function l9(e,t,r){return xr(Ne(e,t),t,Bn(e,r))}o(l9,"FromRef");function d9(e,t,r){return xr(Ne(e,t),t,r)}o(d9,"FromThis");function m9(e,t,r){let n=Bn(e,r);if(!ue(n)||pt(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]=xr(i[a],t,n[a]));return n}o(m9,"FromTuple");function y9(e,t,r){let n=Bn(e,r);for(let i of e.anyOf){let s=xr(i,t,Re(n));if(he(i,t,s))return s}return n}o(y9,"FromUnion");function xr(e,t,r){let n=kr(e,t),i=e;switch(i[E]){case"Array":return a9(i,n,r);case"Date":return c9(i,n,r);case"Intersect":return f9(i,n,r);case"Object":return u9(i,n,r);case"Record":return p9(i,n,r);case"Ref":return l9(i,n,r);case"This":return d9(i,n,r);case"Tuple":return m9(i,n,r);case"Union":return y9(i,n,r);default:return Bn(i,r)}}o(xr,"Visit");function $f(...e){return e.length===3?xr(e[0],e[1],e[2]):xr(e[0],[],e[1])}o($f,"Default");c();c();var Rr={};go(Rr,{Delete:()=>g9,Format:()=>ia,Get:()=>x9,Has:()=>I9,Set:()=>h9,ValuePointerRootDeleteError:()=>Pf,ValuePointerRootSetError:()=>wf});c();var oy=class oy extends ne{constructor(t,r,n){super("Cannot set root value"),this.value=t,this.path=r,this.update=n}};o(oy,"ValuePointerRootSetError");var wf=oy,iy=class iy extends ne{constructor(t,r){super("Cannot delete root value"),this.value=t,this.path=r}};o(iy,"ValuePointerRootDeleteError");var Pf=iy;function vS(e){return e.indexOf("~")===-1?e:e.replace(/~1/g,"/").replace(/~0/g,"~")}o(vS,"Escape");function*ia(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 vS(e.slice(t,r))),t=n+1):r=n;yield vS(e.slice(t))}o(ia,"Format");function h9(e,t,r){if(t==="")throw new wf(e,t,r);let[n,i,s]=[null,e,""];for(let a of ia(t))i[a]===void 0&&(i[a]={}),n=i,i=i[a],s=a;n[s]=r}o(h9,"Set");function g9(e,t){if(t==="")throw new Pf(e,t);let[r,n,i]=[null,e,""];for(let s of ia(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(g9,"Delete");function I9(e,t){if(t==="")return!0;let[r,n,i]=[null,e,""];for(let s of ia(t)){if(n[s]===void 0)return!1;r=n,n=n[s],i=s}return Object.getOwnPropertyNames(r).includes(i)}o(I9,"Has");function x9(e,t){if(t==="")return e;let r=e;for(let n of ia(t)){if(r[n]===void 0)return;r=r[n]}return r}o(x9,"Get");c();function b9(e,t){if(!pe(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=>qo(e[i],t[i]))}o(b9,"ObjectType");function $9(e,t){return Qt(t)&&e.getTime()===t.getTime()}o($9,"DateType");function w9(e,t){return!ue(t)||e.length!==t.length?!1:e.every((r,n)=>qo(r,t[n]))}o(w9,"ArrayType");function P9(e,t){return!Or(t)||e.length!==t.length||Object.getPrototypeOf(e).constructor.name!==Object.getPrototypeOf(t).constructor.name?!1:e.every((r,n)=>qo(r,t[n]))}o(P9,"TypedArrayType");function O9(e,t){return e===t}o(O9,"ValueType");function qo(e,t){if(Qt(e))return $9(e,t);if(Or(e))return P9(e,t);if(ue(e))return w9(e,t);if(pe(e))return b9(e,t);if(Rt(e))return O9(e,t);throw new Error("ValueEquals: Unable to compare value")}o(qo,"Equal");var F9=Ye({type:De("insert"),path:Sr(),value:qn()}),S9=Ye({type:De("update"),path:Sr(),value:qn()}),E9=Ye({type:De("delete"),path:Sr()}),jS=Ve([F9,S9,E9]),sy=class sy extends ne{constructor(t,r){super(r),this.value=t}};o(sy,"ValueDiffError");var Of=sy;function Ff(e,t){return{type:"update",path:e,value:t}}o(Ff,"CreateUpdate");function kS(e,t){return{type:"insert",path:e,value:t}}o(kS,"CreateInsert");function _S(e){return{type:"delete",path:e}}o(_S,"CreateDelete");function AS(e){if(globalThis.Object.getOwnPropertySymbols(e).length>0)throw new Of(e,"Cannot diff objects with symbols")}o(AS,"AssertDiffable");function*T9(e,t,r){if(AS(t),AS(r),!Sd(r))return yield Ff(e,r);let n=globalThis.Object.getOwnPropertyNames(t),i=globalThis.Object.getOwnPropertyNames(r);for(let s of i)oe(t,s)||(yield kS("".concat(e,"/").concat(s),r[s]));for(let s of n)oe(r,s)&&(qo(t,r)||(yield*C(Sf("".concat(e,"/").concat(s),t[s],r[s]))));for(let s of n)oe(r,s)||(yield _S("".concat(e,"/").concat(s)))}o(T9,"ObjectType");function*v9(e,t,r){if(!ue(r))return yield Ff(e,r);for(let n=0;n<Math.min(t.length,r.length);n++)yield*C(Sf("".concat(e,"/").concat(n),t[n],r[n]));for(let n=0;n<r.length;n++)n<t.length||(yield kS("".concat(e,"/").concat(n),r[n]));for(let n=t.length-1;n>=0;n--)n<r.length||(yield _S("".concat(e,"/").concat(n)))}o(v9,"ArrayType");function*A9(e,t,r){if(!Or(r)||t.length!==r.length||globalThis.Object.getPrototypeOf(t).constructor.name!==globalThis.Object.getPrototypeOf(r).constructor.name)return yield Ff(e,r);for(let n=0;n<Math.min(t.length,r.length);n++)yield*C(Sf("".concat(e,"/").concat(n),t[n],r[n]))}o(A9,"TypedArrayType");function*j9(e,t,r){t!==r&&(yield Ff(e,r))}o(j9,"ValueType");function*Sf(e,t,r){if(Sd(t))return yield*C(T9(e,t,r));if(ue(t))return yield*C(v9(e,t,r));if(Or(t))return yield*C(A9(e,t,r));if(Rt(t))return yield*C(j9(e,t,r));throw new Of(t,"Unable to diff value")}o(Sf,"Visit");function NS(e,t){return[...Sf("",e,t)]}o(NS,"Diff");function k9(e){return e.length>0&&e[0].path===""&&e[0].type==="update"}o(k9,"IsRootUpdate");function _9(e){return e.length===0}o(_9,"IsIdentity");function RS(e,t){if(k9(t))return Re(t[0].value);if(_9(t))return Re(e);let r=Re(e);for(let n of t)switch(n.type){case"insert":{Rr.Set(r,n.path,n.value);break}case"update":{Rr.Set(r,n.path,n.value);break}case"delete":{Rr.Delete(r,n.path);break}}return r}o(RS,"Patch");c();function CS(...e){let[t,r,n]=e.length===3?[e[0],e[1],e[2]]:[e[0],[],e[1]],i=xn(t,r)?bf(t,r,n):n;if(!he(t,r,i))throw new Ki(t,i,mn(t,r,i).First());return i}o(CS,"Encode");c();var cy=class cy extends ne{constructor(t){super(t)}};o(cy,"ValueMutateError");var Ef=cy;function N9(e,t,r,n){if(!pe(r))Rr.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)ay(e,"".concat(t,"/").concat(a),r[a],n[a])}}o(N9,"ObjectType");function R9(e,t,r,n){if(!ue(r))Rr.Set(e,t,Re(n));else{for(let i=0;i<n.length;i++)ay(e,"".concat(t,"/").concat(i),r[i],n[i]);r.splice(n.length)}}o(R9,"ArrayType");function C9(e,t,r,n){if(Or(r)&&r.length===n.length)for(let i=0;i<r.length;i++)r[i]=n[i];else Rr.Set(e,t,Re(n))}o(C9,"TypedArrayType");function M9(e,t,r,n){r!==n&&Rr.Set(e,t,n)}o(M9,"ValueType");function ay(e,t,r,n){if(ue(n))return R9(e,t,r,n);if(Or(n))return C9(e,t,r,n);if(pe(n))return N9(e,t,r,n);if(Rt(n))return M9(e,t,r,n)}o(ay,"Visit");function MS(e){return Or(e)||Rt(e)}o(MS,"IsNonMutableValue");function L9(e,t){return pe(e)&&ue(t)||ue(e)&&pe(t)}o(L9,"IsMismatchedValue");function LS(e,t){if(MS(e)||MS(t))throw new Ef("Only object and array types can be mutated at the root level");if(L9(e,t))throw new Ef("Cannot assign due type mismatch of assignable values");ay(e,"",e,t)}o(LS,"Mutate");c();var U9=[(e,t,r)=>Re(r),(e,t,r)=>$f(e,t,r),(e,t,r)=>gf(e,t,r),(e,t,r)=>xf(e,t,r),(e,t,r)=>(yf(e,t,r),r),(e,t,r)=>xn(e,t)?qi(e,t,r):r];function US(e,t,r){return U9.reduce((n,i)=>i(e,t,n),r)}o(US,"ParseValue");function DS(...e){return e.length===3?US(e[0],e[1],e[2]):US(e[0],[],e[1])}o(DS,"Parse");c();var Vn={};go(Vn,{Assert:()=>yf,Cast:()=>Jm,Check:()=>he,Clean:()=>gf,Clone:()=>Re,Convert:()=>xf,Create:()=>Nr,Decode:()=>TS,Default:()=>$f,Diff:()=>NS,Edit:()=>jS,Encode:()=>CS,Equal:()=>qo,Errors:()=>mn,Hash:()=>yo,Mutate:()=>LS,Parse:()=>DS,Patch:()=>RS,ValueErrorIterator:()=>_r});c();c();var uy=class uy extends ne{constructor(r){super("Unable to dereference schema with $id '".concat(r.$ref,"'"));H(this,"schema");this.schema=r}};o(uy,"TypeDereferenceError");var fy=uy;function D9(e,t){let r=t.find(n=>n.$id===e.$ref);if(r===void 0)throw new fy(e);return Ko(r,t)}o(D9,"Resolve");function Tf(e,t){return!Pe.IsString(e.$id)||t.some(r=>r.$id===e.$id)||t.push(e),t}o(Tf,"Pushref");function Ko(e,t){return e[E]==="This"||e[E]==="Ref"?D9(e,t):e}o(Ko,"Deref");c();function q9(e,t,r){let n=e.get(t);if(n!==void 0)return n;let i=xn(t,r);return e.set(t,i),i}o(q9,"HasTransformCached");function vf(){let e=new WeakMap;return{HasTransform:o((t,r)=>q9(e,t,r),"HasTransform")}}o(vf,"CreateTransformCache");function dt(e,t,r){try{return x.IsTransform(e)?e[st].Decode(r):r}catch(n){throw new Uo(e,t,r,n)}}o(dt,"Default");function K9(e,t,r,n,i){return Pe.IsArray(n)?dt(e,r,n.map((s,a)=>bn(e.items,t,"".concat(r,"/").concat(a),s,i))):dt(e,r,n)}o(K9,"FromArray");function z9(e,t,r,n,i){if(!Pe.IsObject(n)||Rt(n))return dt(e,r,n);let s=po(e),a=s.map(m=>m[0]),f=S({},n);for(let[m,g]of s)m in f&&(f[m]=bn(g,t,"".concat(r,"/").concat(m),f[m],i));if(!x.IsTransform(e.unevaluatedProperties))return dt(e,r,f);let p=Object.getOwnPropertyNames(f),d=e.unevaluatedProperties,l=S({},f);for(let m of p)a.includes(m)||(l[m]=dt(d,"".concat(r,"/").concat(m),l[m]));return dt(e,r,l)}o(z9,"FromIntersect");function G9(e,t,r,n,i){return dt(e,r,bn(e.not,t,r,n,i))}o(G9,"FromNot");function B9(e,t,r,n,i){if(!Pe.IsObject(n))return dt(e,r,n);let s=At(e),a=S({},n);for(let l of s)Pe.HasPropertyKey(a,l)&&(Pe.IsUndefined(a[l])&&(!x.IsUndefined(e.properties[l])||ze.IsExactOptionalProperty(a,l))||(a[l]=bn(e.properties[l],t,"".concat(r,"/").concat(l),a[l],i)));if(!x.IsSchema(e.additionalProperties))return dt(e,r,a);let f=Object.getOwnPropertyNames(a),p=e.additionalProperties,d=S({},a);for(let l of f)s.includes(l)||(d[l]=dt(p,"".concat(r,"/").concat(l),d[l]));return dt(e,r,d)}o(B9,"FromObject");function V9(e,t,r,n,i){if(!Pe.IsObject(n))return dt(e,r,n);let s=Object.getOwnPropertyNames(e.patternProperties)[0],a=new RegExp(s),f=S({},n);for(let m of Object.getOwnPropertyNames(n))a.test(m)&&(f[m]=bn(e.patternProperties[s],t,"".concat(r,"/").concat(m),f[m],i));if(!x.IsSchema(e.additionalProperties))return dt(e,r,f);let p=Object.getOwnPropertyNames(f),d=e.additionalProperties,l=S({},f);for(let m of p)a.test(m)||(l[m]=dt(d,"".concat(r,"/").concat(m),l[m]));return dt(e,r,l)}o(V9,"FromRecord");function W9(e,t,r,n,i){let s=Ko(e,t);return dt(e,r,bn(s,t,r,n,i))}o(W9,"FromRef");function H9(e,t,r,n,i){let s=Ko(e,t);return dt(e,r,bn(s,t,r,n,i))}o(H9,"FromThis");function Z9(e,t,r,n,i){return Pe.IsArray(n)&&Pe.IsArray(e.items)?dt(e,r,e.items.map((s,a)=>bn(s,t,"".concat(r,"/").concat(a),n[a],i))):dt(e,r,n)}o(Z9,"FromTuple");function J9(e,t,r,n,i){for(let s of e.anyOf){if(!Vn.Check(s,t,n))continue;let a=bn(s,t,r,n,i);return dt(e,r,a)}return dt(e,r,n)}o(J9,"FromUnion");function bn(e,t,r,n,i){if(!i.HasTransform(e,t))return n;let s=Tf(e,t),a=e;switch(e[E]){case"Array":return K9(a,s,r,n,i);case"Intersect":return z9(a,s,r,n,i);case"Not":return G9(a,s,r,n,i);case"Object":return B9(a,s,r,n,i);case"Record":return V9(a,s,r,n,i);case"Ref":return W9(a,s,r,n,i);case"Symbol":return dt(a,r,n);case"This":return H9(a,s,r,n,i);case"Tuple":return Z9(a,s,r,n,i);case"Union":return J9(a,s,r,n,i);default:return dt(a,r,n)}}o(bn,"Visit");function qS(e,t,r){let n=vf();return bn(e,t,"",r,n)}o(qS,"FastTransformDecode");c();function Zt(e,t,r){try{return x.IsTransform(e)?e[st].Encode(r):r}catch(n){throw new Do(e,t,r,n)}}o(Zt,"Default");function Y9(e,t,r,n,i){let s=Zt(e,r,n);return Pe.IsArray(s)?s.map((a,f)=>$n(e.items,t,"".concat(r,"/").concat(f),a,i)):s}o(Y9,"FromArray");function X9(e,t,r,n,i){let s=Zt(e,r,n);if(!Pe.IsObject(n)||Rt(n))return s;let a=po(e),f=a.map(g=>g[0]),p=S({},s);for(let[g,b]of a)g in p&&(p[g]=$n(b,t,"".concat(r,"/").concat(g),p[g],i));if(!x.IsTransform(e.unevaluatedProperties))return p;let d=Object.getOwnPropertyNames(p),l=e.unevaluatedProperties,m=S({},p);for(let g of d)f.includes(g)||(m[g]=Zt(l,"".concat(r,"/").concat(g),m[g]));return m}o(X9,"FromIntersect");function Q9(e,t,r,n){return Zt(e.not,r,Zt(e,r,n))}o(Q9,"FromNot");function eK(e,t,r,n,i){let s=Zt(e,r,n);if(!Pe.IsObject(s))return s;let a=At(e),f=S({},s);for(let m of a)Pe.HasPropertyKey(f,m)&&(Pe.IsUndefined(f[m])&&(!x.IsUndefined(e.properties[m])||ze.IsExactOptionalProperty(f,m))||(f[m]=$n(e.properties[m],t,"".concat(r,"/").concat(m),f[m],i)));if(!x.IsSchema(e.additionalProperties))return f;let p=Object.getOwnPropertyNames(f),d=e.additionalProperties,l=S({},f);for(let m of p)a.includes(m)||(l[m]=Zt(d,"".concat(r,"/").concat(m),l[m]));return l}o(eK,"FromObject");function tK(e,t,r,n,i){let s=Zt(e,r,n);if(!Pe.IsObject(n))return s;let a=Object.getOwnPropertyNames(e.patternProperties)[0],f=new RegExp(a),p=S({},s);for(let g of Object.getOwnPropertyNames(n))f.test(g)&&(p[g]=$n(e.patternProperties[a],t,"".concat(r,"/").concat(g),p[g],i));if(!x.IsSchema(e.additionalProperties))return p;let d=Object.getOwnPropertyNames(p),l=e.additionalProperties,m=S({},p);for(let g of d)f.test(g)||(m[g]=Zt(l,"".concat(r,"/").concat(g),m[g]));return m}o(tK,"FromRecord");function rK(e,t,r,n,i){let s=Ko(e,t),a=$n(s,t,r,n,i);return Zt(e,r,a)}o(rK,"FromRef");function nK(e,t,r,n,i){let s=Ko(e,t),a=$n(s,t,r,n,i);return Zt(e,r,a)}o(nK,"FromThis");function oK(e,t,r,n,i){let s=Zt(e,r,n);return Pe.IsArray(e.items)?e.items.map((a,f)=>$n(a,t,"".concat(r,"/").concat(f),s[f],i)):[]}o(oK,"FromTuple");function iK(e,t,r,n,i){for(let s of e.anyOf){if(!Vn.Check(s,t,n))continue;let a=$n(s,t,r,n,i);return Zt(e,r,a)}for(let s of e.anyOf){let a=$n(s,t,r,n,i);if(Vn.Check(e,t,a))return Zt(e,r,a)}return Zt(e,r,n)}o(iK,"FromUnion");function $n(e,t,r,n,i){if(!i.HasTransform(e,t))return n;let s=Tf(e,t),a=e;switch(e[E]){case"Array":return Y9(a,s,r,n,i);case"Intersect":return X9(a,s,r,n,i);case"Not":return Q9(a,s,r,n);case"Object":return eK(a,s,r,n,i);case"Record":return tK(a,s,r,n,i);case"Ref":return rK(a,s,r,n,i);case"This":return nK(a,s,r,n,i);case"Tuple":return oK(a,s,r,n,i);case"Union":return iK(a,s,r,n,i);default:return Zt(a,r,n)}}o($n,"Visit");function KS(e,t,r){let n=vf();return $n(e,t,"",r,n)}o(KS,"FastTransformEncode");c();var yy=class yy{constructor(t,r,n,i){this.schema=t,this.references=r,this.checkFunc=n,this.code=i,this.hasTransform=xn(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 Di(this.schema,t,this.Errors(t).First());return this.hasTransform?qi(this.schema,this.references,t):t}Encode(t){let r=this.hasTransform?bf(this.schema,this.references,t):t;if(!this.checkFunc(r))throw new Ki(this.schema,t,this.Errors(t).First());return r}};o(yy,"TypeCheck");var py=yy,Wn;(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})(Wn||(Wn={}));var Af;(function(e){function t(s){return s.length===0?!1:Wn.IsNumeric(s.charCodeAt(0))}o(t,"IsFirstCharacterNumeric");function r(s){if(t(s))return!1;for(let a=0;a<s.length;a++){let f=s.charCodeAt(a);if(!(Wn.IsAlpha(f)||Wn.IsNumeric(f)||Wn.DollarSign(f)||Wn.IsUnderscore(f)))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})(Af||(Af={}));var ly;(function(e){function t(r){let n=[];for(let i=0;i<r.length;i++){let s=r.charCodeAt(i);Wn.IsNumeric(s)||Wn.IsAlpha(s)?n.push(r.charAt(i)):n.push("_".concat(s,"_"))}return n.join("").replace(/__/g,"_")}o(t,"Encode"),e.Encode=t})(ly||(ly={}));var dy;(function(e){function t(r){return r.replace(/'/g,"\\'")}o(t,"Escape"),e.Escape=t})(dy||(dy={}));var hy=class hy extends ne{constructor(t){super("Unknown type"),this.schema=t}};o(hy,"TypeCompilerUnknownTypeError");var my=hy,gy=class gy extends ne{constructor(t){super("Preflight validation check failed to guard for the given schema"),this.schema=t}};o(gy,"TypeCompilerTypeGuardError");var jf=gy,zo;(function(e){function t(a,f,p){return ze.ExactOptionalPropertyTypes?"('".concat(f,"' in ").concat(a," ? ").concat(p," : true)"):"(".concat(Af.Encode(a,f)," !== undefined ? ").concat(p," : true)")}o(t,"IsExactOptionalProperty"),e.IsExactOptionalProperty=t;function r(a){return ze.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 ze.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 ze.AllowNaN?"typeof ".concat(a," === 'number'"):"Number.isFinite(".concat(a,")")}o(i,"IsNumberLike"),e.IsNumberLike=i;function s(a){return ze.AllowNullVoid?"(".concat(a," === undefined || ").concat(a," === null)"):"".concat(a," === undefined")}o(s,"IsVoidLike"),e.IsVoidLike=s})(zo||(zo={}));var kf;(function(e){function t(I){return I[E]==="Any"||I[E]==="Unknown"}o(t,"IsAnyOrUnknown");function*r(I,_,$){yield"true"}o(r,"FromAny");function*n(I,_,$){yield"Array.isArray(".concat($,")");let[K,L]=[ht("value","any"),ht("acc","number")];re(I.maxItems)&&(yield"".concat($,".length <= ").concat(I.maxItems)),re(I.minItems)&&(yield"".concat($,".length >= ").concat(I.minItems));let q=xt(I.items,_,"value");if(yield"".concat($,".every((").concat(K,") => ").concat(q,")"),Fe(I.contains)||re(I.minContains)||re(I.maxContains)){let ie=Fe(I.contains)?I.contains:Be(),Jt=xt(ie,_,"value"),Fn=re(I.minContains)?["(count >= ".concat(I.minContains,")")]:[],Ur=re(I.maxContains)?["(count <= ".concat(I.maxContains,")")]:[],tn="const count = value.reduce((".concat(L,", ").concat(K,") => ").concat(Jt," ? acc + 1 : acc, 0)"),da=["(count > 0)",...Fn,...Ur].join(" && ");yield"((".concat(K,") => { ").concat(tn,"; return ").concat(da,"})(").concat($,")")}if(I.uniqueItems===!0){let Jt="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(K,") => { ").concat(Jt," )(").concat($,")")}}o(n,"FromArray");function*i(I,_,$){yield"(typeof value === 'object' && Symbol.asyncIterator in ".concat($,")")}o(i,"FromAsyncIterator");function*s(I,_,$){yield"(typeof ".concat($," === 'bigint')"),Nt(I.exclusiveMaximum)&&(yield"".concat($," < BigInt(").concat(I.exclusiveMaximum,")")),Nt(I.exclusiveMinimum)&&(yield"".concat($," > BigInt(").concat(I.exclusiveMinimum,")")),Nt(I.maximum)&&(yield"".concat($," <= BigInt(").concat(I.maximum,")")),Nt(I.minimum)&&(yield"".concat($," >= BigInt(").concat(I.minimum,")")),Nt(I.multipleOf)&&(yield"(".concat($," % BigInt(").concat(I.multipleOf,")) === 0"))}o(s,"FromBigInt");function*a(I,_,$){yield"(typeof ".concat($," === 'boolean')")}o(a,"FromBoolean");function*f(I,_,$){yield*C(ft(I.returns,_,"".concat($,".prototype")))}o(f,"FromConstructor");function*p(I,_,$){yield"(".concat($," instanceof Date) && Number.isFinite(").concat($,".getTime())"),re(I.exclusiveMaximumTimestamp)&&(yield"".concat($,".getTime() < ").concat(I.exclusiveMaximumTimestamp)),re(I.exclusiveMinimumTimestamp)&&(yield"".concat($,".getTime() > ").concat(I.exclusiveMinimumTimestamp)),re(I.maximumTimestamp)&&(yield"".concat($,".getTime() <= ").concat(I.maximumTimestamp)),re(I.minimumTimestamp)&&(yield"".concat($,".getTime() >= ").concat(I.minimumTimestamp)),re(I.multipleOfTimestamp)&&(yield"(".concat($,".getTime() % ").concat(I.multipleOfTimestamp,") === 0"))}o(p,"FromDate");function*d(I,_,$){yield"(typeof ".concat($," === 'function')")}o(d,"FromFunction");function*l(I,_,$){yield"Number.isInteger(".concat($,")"),re(I.exclusiveMaximum)&&(yield"".concat($," < ").concat(I.exclusiveMaximum)),re(I.exclusiveMinimum)&&(yield"".concat($," > ").concat(I.exclusiveMinimum)),re(I.maximum)&&(yield"".concat($," <= ").concat(I.maximum)),re(I.minimum)&&(yield"".concat($," >= ").concat(I.minimum)),re(I.multipleOf)&&(yield"(".concat($," % ").concat(I.multipleOf,") === 0"))}o(l,"FromInteger");function*m(I,_,$){let K=I.allOf.map(L=>xt(L,_,$)).join(" && ");if(I.unevaluatedProperties===!1){let L=Ft("".concat(new RegExp(Dn(I)),";")),q="Object.getOwnPropertyNames(".concat($,").every(key => ").concat(L,".test(key))");yield"(".concat(K," && ").concat(q,")")}else if(Fe(I.unevaluatedProperties)){let L=Ft("".concat(new RegExp(Dn(I)),";")),q="Object.getOwnPropertyNames(".concat($,").every(key => ").concat(L,".test(key) || ").concat(xt(I.unevaluatedProperties,_,"".concat($,"[key]")),")");yield"(".concat(K," && ").concat(q,")")}else yield"(".concat(K,")")}o(m,"FromIntersect");function*g(I,_,$){yield"(typeof value === 'object' && Symbol.iterator in ".concat($,")")}o(g,"FromIterator");function*b(I,_,$){typeof I.const=="number"||typeof I.const=="boolean"?yield"(".concat($," === ").concat(I.const,")"):yield"(".concat($," === '").concat(dy.Escape(I.const),"')")}o(b,"FromLiteral");function*P(I,_,$){yield"false"}o(P,"FromNever");function*F(I,_,$){let K=xt(I.not,_,$);yield"(!".concat(K,")")}o(F,"FromNot");function*w(I,_,$){yield"(".concat($," === null)")}o(w,"FromNull");function*O(I,_,$){yield zo.IsNumberLike($),re(I.exclusiveMaximum)&&(yield"".concat($," < ").concat(I.exclusiveMaximum)),re(I.exclusiveMinimum)&&(yield"".concat($," > ").concat(I.exclusiveMinimum)),re(I.maximum)&&(yield"".concat($," <= ").concat(I.maximum)),re(I.minimum)&&(yield"".concat($," >= ").concat(I.minimum)),re(I.multipleOf)&&(yield"(".concat($," % ").concat(I.multipleOf,") === 0"))}o(O,"FromNumber");function*N(I,_,$){yield zo.IsObjectLike($),re(I.minProperties)&&(yield"Object.getOwnPropertyNames(".concat($,").length >= ").concat(I.minProperties)),re(I.maxProperties)&&(yield"Object.getOwnPropertyNames(".concat($,").length <= ").concat(I.maxProperties));let K=Object.getOwnPropertyNames(I.properties);for(let L of K){let q=Af.Encode($,L),ie=I.properties[L];if(I.required&&I.required.includes(L))yield*C(ft(ie,_,q)),(Kn(ie)||t(ie))&&(yield"('".concat(L,"' in ").concat($,")"));else{let Jt=xt(ie,_,q);yield zo.IsExactOptionalProperty($,L,Jt)}}if(I.additionalProperties===!1)if(I.required&&I.required.length===K.length)yield"Object.getOwnPropertyNames(".concat($,").length === ").concat(K.length);else{let L="[".concat(K.map(q=>"'".concat(q,"'")).join(", "),"]");yield"Object.getOwnPropertyNames(".concat($,").every(key => ").concat(L,".includes(key))")}if(typeof I.additionalProperties=="object"){let L=xt(I.additionalProperties,_,"".concat($,"[key]")),q="[".concat(K.map(ie=>"'".concat(ie,"'")).join(", "),"]");yield"(Object.getOwnPropertyNames(".concat($,").every(key => ").concat(q,".includes(key) || ").concat(L,"))")}}o(N,"FromObject");function*A(I,_,$){yield"(typeof value === 'object' && typeof ".concat($,".then === 'function')")}o(A,"FromPromise");function*k(I,_,$){yield zo.IsRecordLike($),re(I.minProperties)&&(yield"Object.getOwnPropertyNames(".concat($,").length >= ").concat(I.minProperties)),re(I.maxProperties)&&(yield"Object.getOwnPropertyNames(".concat($,").length <= ").concat(I.maxProperties));let[K,L]=Object.entries(I.patternProperties)[0],q=Ft("".concat(new RegExp(K))),ie=xt(L,_,"value"),Jt=Fe(I.additionalProperties)?xt(I.additionalProperties,_,$):I.additionalProperties===!1?"false":"true",Fn="(".concat(q,".test(key) ? ").concat(ie," : ").concat(Jt,")");yield"(Object.entries(".concat($,").every(([key, value]) => ").concat(Fn,"))")}o(k,"FromRecord");function*R(I,_,$){let K=Ne(I,_);if(xe.functions.has(I.$ref))return yield"".concat(bt(I.$ref),"(").concat($,")");yield*C(ft(K,_,$))}o(R,"FromRef");function*V(I,_,$){let K=Ft("".concat(new RegExp(I.source,I.flags),";"));yield"(typeof ".concat($," === 'string')"),re(I.maxLength)&&(yield"".concat($,".length <= ").concat(I.maxLength)),re(I.minLength)&&(yield"".concat($,".length >= ").concat(I.minLength)),yield"".concat(K,".test(").concat($,")")}o(V,"FromRegExp");function*J(I,_,$){if(yield"(typeof ".concat($," === 'string')"),re(I.maxLength)&&(yield"".concat($,".length <= ").concat(I.maxLength)),re(I.minLength)&&(yield"".concat($,".length >= ").concat(I.minLength)),I.pattern!==void 0){let K=Ft("".concat(new RegExp(I.pattern),";"));yield"".concat(K,".test(").concat($,")")}I.format!==void 0&&(yield"format('".concat(I.format,"', ").concat($,")"))}o(J,"FromString");function*D(I,_,$){yield"(typeof ".concat($," === 'symbol')")}o(D,"FromSymbol");function*U(I,_,$){yield"(typeof ".concat($," === 'string')");let K=Ft("".concat(new RegExp(I.pattern),";"));yield"".concat(K,".test(").concat($,")")}o(U,"FromTemplateLiteral");function*ae(I,_,$){yield"".concat(bt(I.$ref),"(").concat($,")")}o(ae,"FromThis");function*se(I,_,$){if(yield"Array.isArray(".concat($,")"),I.items===void 0)return yield"".concat($,".length === 0");yield"(".concat($,".length === ").concat(I.maxItems,")");for(let K=0;K<I.items.length;K++){let L=xt(I.items[K],_,"".concat($,"[").concat(K,"]"));yield"".concat(L)}}o(se,"FromTuple");function*M(I,_,$){yield"".concat($," === undefined")}o(M,"FromUndefined");function*le(I,_,$){let K=I.anyOf.map(L=>xt(L,_,$));yield"(".concat(K.join(" || "),")")}o(le,"FromUnion");function*ce(I,_,$){yield"".concat($," instanceof Uint8Array"),re(I.maxByteLength)&&(yield"(".concat($,".length <= ").concat(I.maxByteLength,")")),re(I.minByteLength)&&(yield"(".concat($,".length >= ").concat(I.minByteLength,")"))}o(ce,"FromUint8Array");function*Te(I,_,$){yield"true"}o(Te,"FromUnknown");function*Ie(I,_,$){yield zo.IsVoidLike($)}o(Ie,"FromVoid");function*Ke(I,_,$){let K=xe.instances.size;xe.instances.set(K,I),yield"kind('".concat(I[E],"', ").concat(K,", ").concat($,")")}o(Ke,"FromKind");function*ft(I,_,$,K=!0){let L=Oe(I.$id)?[..._,I]:_,q=I;if(K&&Oe(I.$id)){let ie=bt(I.$id);if(xe.functions.has(ie))return yield"".concat(ie,"(").concat($,")");{let Jt=St(ie,I,_,"value",!1);return xe.functions.set(ie,Jt),yield"".concat(ie,"(").concat($,")")}}switch(q[E]){case"Any":return yield*C(r(q,L,$));case"Array":return yield*C(n(q,L,$));case"AsyncIterator":return yield*C(i(q,L,$));case"BigInt":return yield*C(s(q,L,$));case"Boolean":return yield*C(a(q,L,$));case"Constructor":return yield*C(f(q,L,$));case"Date":return yield*C(p(q,L,$));case"Function":return yield*C(d(q,L,$));case"Integer":return yield*C(l(q,L,$));case"Intersect":return yield*C(m(q,L,$));case"Iterator":return yield*C(g(q,L,$));case"Literal":return yield*C(b(q,L,$));case"Never":return yield*C(P(q,L,$));case"Not":return yield*C(F(q,L,$));case"Null":return yield*C(w(q,L,$));case"Number":return yield*C(O(q,L,$));case"Object":return yield*C(N(q,L,$));case"Promise":return yield*C(A(q,L,$));case"Record":return yield*C(k(q,L,$));case"Ref":return yield*C(R(q,L,$));case"RegExp":return yield*C(V(q,L,$));case"String":return yield*C(J(q,L,$));case"Symbol":return yield*C(D(q,L,$));case"TemplateLiteral":return yield*C(U(q,L,$));case"This":return yield*C(ae(q,L,$));case"Tuple":return yield*C(se(q,L,$));case"Undefined":return yield*C(M(q,L,$));case"Union":return yield*C(le(q,L,$));case"Uint8Array":return yield*C(ce(q,L,$));case"Unknown":return yield*C(Te(q,L,$));case"Void":return yield*C(Ie(q,L,$));default:if(!Tt.Has(q[E]))throw new my(I);return yield*C(Ke(q,L,$))}}o(ft,"Visit");let xe={language:"javascript",functions:new Map,variables:new Map,instances:new Map};function xt(I,_,$,K=!0){return"(".concat([...ft(I,_,$,K)].join(" && "),")")}o(xt,"CreateExpression");function bt(I){return"check_".concat(ly.Encode(I))}o(bt,"CreateFunctionName");function Ft(I){let _="local_".concat(xe.variables.size);return xe.variables.set(_,"const ".concat(_," = ").concat(I)),_}o(Ft,"CreateVariable");function St(I,_,$,K,L=!0){let[q,ie]=["\n",tn=>"".padStart(tn," ")],Jt=ht("value","any"),Fn=X("boolean"),Ur=[...ft(_,$,K,L)].map(tn=>"".concat(ie(4)).concat(tn)).join(" &&".concat(q));return"function ".concat(I,"(").concat(Jt,")").concat(Fn," {").concat(q).concat(ie(2),"return (").concat(q).concat(Ur).concat(q).concat(ie(2),")\n}")}o(St,"CreateFunction");function ht(I,_){let $=xe.language==="typescript"?": ".concat(_):"";return"".concat(I).concat($)}o(ht,"CreateParameter");function X(I){return xe.language==="typescript"?": ".concat(I):""}o(X,"CreateReturns");function ee(I,_,$){let K=St("check",I,_,"value"),L=ht("value","any"),q=X("boolean"),ie=[...xe.functions.values()],Jt=[...xe.variables.values()],Fn=Oe(I.$id)?"return function check(".concat(L,")").concat(q," {\n return ").concat(bt(I.$id),"(value)\n}"):"return ".concat(K);return[...Jt,...ie,Fn].join("\n")}o(ee,"Build");function Z(...I){let _={language:"javascript"},[$,K,L]=I.length===2&&ue(I[1])?[I[0],I[1],_]:I.length===2&&!ue(I[1])?[I[0],[],I[1]]:I.length===3?[I[0],I[1],I[2]]:I.length===1?[I[0],[],_]:[null,[],_];if(xe.language=L.language,xe.variables.clear(),xe.functions.clear(),xe.instances.clear(),!Fe($))throw new jf($);for(let q of K)if(!Fe(q))throw new jf(q);return ee($,K,L)}o(Z,"Code"),e.Code=Z;function te(I,_=[]){let $=Z(I,_,{language:"javascript"}),K=globalThis.Function("kind","format","hash",$),L=new Map(xe.instances);function q(Ur,tn,da){if(!Tt.Has(Ur)||!L.has(tn))return!1;let A1=Tt.Get(Ur),j1=L.get(tn);return A1(j1,da)}o(q,"typeRegistryFunction");function ie(Ur,tn){return tr.Has(Ur)?tr.Get(Ur)(tn):!1}o(ie,"formatRegistryFunction");function Jt(Ur){return yo(Ur)}o(Jt,"hashFunction");let Fn=K(q,ie,Jt);return new py(I,_,Fn,$)}o(te,"Compile"),e.Compile=te})(kf||(kf={}));c();c();var zS={},sK=o(function(e,t,r,n,i){var s=new Worker(zS[t]||(zS[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 f=a.data,p=f.$e$;if(p){var d=new Error(p[0]);d.code=p[1],d.stack=p[2],i(d,null)}else i(null,f)},s.postMessage(r,n),s},"wk"),rt=Uint8Array,nr=Uint16Array,ca=Int32Array,Vi=new rt([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]),Wi=new rt([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]),sa=new rt([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),WS=o(function(e,t){for(var r=new nr(31),n=0;n<31;++n)r[n]=t+=1<<e[n-1];for(var i=new ca(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"),HS=WS(Vi,2),Oy=HS.b,Mf=HS.r;Oy[28]=258,Mf[258]=28;var ZS=WS(Wi,0),JS=ZS.b,xy=ZS.r,aa=new nr(32768);for(qe=0;qe<32768;++qe)Hn=(qe&43690)>>1|(qe&21845)<<1,Hn=(Hn&52428)>>2|(Hn&13107)<<2,Hn=(Hn&61680)>>4|(Hn&3855)<<4,aa[qe]=((Hn&65280)>>8|(Hn&255)<<8)>>1;var Hn,qe,Mr=o(function(e,t,r){for(var n=e.length,i=0,s=new nr(t);i<n;++i)e[i]&&++s[e[i]-1];var a=new nr(t);for(i=1;i<t;++i)a[i]=a[i-1]+s[i-1]<<1;var f;if(r){f=new nr(1<<t);var p=15-t;for(i=0;i<n;++i)if(e[i])for(var d=i<<4|e[i],l=t-e[i],m=a[e[i]-1]++<<l,g=m|(1<<l)-1;m<=g;++m)f[aa[m]>>p]=d}else for(f=new nr(n),i=0;i<n;++i)e[i]&&(f[i]=aa[a[e[i]-1]++]>>15-e[i]);return f},"hMap"),Zn=new rt(288);for(qe=0;qe<144;++qe)Zn[qe]=8;var qe;for(qe=144;qe<256;++qe)Zn[qe]=9;var qe;for(qe=256;qe<280;++qe)Zn[qe]=7;var qe;for(qe=280;qe<288;++qe)Zn[qe]=8;var qe,Bi=new rt(32);for(qe=0;qe<32;++qe)Bi[qe]=5;var qe,YS=Mr(Zn,9,0),XS=Mr(Zn,9,1),QS=Mr(Bi,5,0),eE=Mr(Bi,5,1),Nf=o(function(e){for(var t=e[0],r=1;r<e.length;++r)e[r]>t&&(t=e[r]);return t},"max"),Cr=o(function(e,t,r){var n=t/8|0;return(e[n]|e[n+1]<<8)>>(t&7)&r},"bits"),Rf=o(function(e,t){var r=t/8|0;return(e[r]|e[r+1]<<8|e[r+2]<<16)>>(t&7)},"bits16"),fa=o(function(e){return(e+7)/8|0},"shft"),Go=o(function(e,t,r){return(t==null||t<0)&&(t=0),(r==null||r>e.length)&&(r=e.length),new rt(e.subarray(t,r))},"slc"),qf={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},tE=["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"],Ot=o(function(e,t,r){var n=new Error(t||tE[e]);if(n.code=e,Error.captureStackTrace&&Error.captureStackTrace(n,Ot),!r)throw n;return n},"err"),rE=o(function(e,t,r,n){var i=e.length,s=n?n.length:0;if(!i||t.f&&!t.l)return r||new rt(0);var a=!r,f=a||t.i!=2,p=t.i;a&&(r=new rt(i*3));var d=o(function($){var K=r.length;if($>K){var L=new rt(Math.max(K*2,$));L.set(r),r=L}},"cbuf"),l=t.f||0,m=t.p||0,g=t.b||0,b=t.l,P=t.d,F=t.m,w=t.n,O=i*8;do{if(!b){l=Cr(e,m,1);var N=Cr(e,m+1,3);if(m+=3,N)if(N==1)b=XS,P=eE,F=9,w=5;else if(N==2){var V=Cr(e,m,31)+257,J=Cr(e,m+10,15)+4,D=V+Cr(e,m+5,31)+1;m+=14;for(var U=new rt(D),ae=new rt(19),se=0;se<J;++se)ae[sa[se]]=Cr(e,m+se*3,7);m+=J*3;for(var M=Nf(ae),le=(1<<M)-1,ce=Mr(ae,M,1),se=0;se<D;){var Te=ce[Cr(e,m,le)];m+=Te&15;var A=Te>>4;if(A<16)U[se++]=A;else{var Ie=0,Ke=0;for(A==16?(Ke=3+Cr(e,m,3),m+=2,Ie=U[se-1]):A==17?(Ke=3+Cr(e,m,7),m+=3):A==18&&(Ke=11+Cr(e,m,127),m+=7);Ke--;)U[se++]=Ie}}var ft=U.subarray(0,V),xe=U.subarray(V);F=Nf(ft),w=Nf(xe),b=Mr(ft,F,1),P=Mr(xe,w,1)}else Ot(1);else{var A=fa(m)+4,k=e[A-4]|e[A-3]<<8,R=A+k;if(R>i){p&&Ot(0);break}f&&d(g+k),r.set(e.subarray(A,R),g),t.b=g+=k,t.p=m=R*8,t.f=l;continue}if(m>O){p&&Ot(0);break}}f&&d(g+131072);for(var xt=(1<<F)-1,bt=(1<<w)-1,Ft=m;;Ft=m){var Ie=b[Rf(e,m)&xt],St=Ie>>4;if(m+=Ie&15,m>O){p&&Ot(0);break}if(Ie||Ot(2),St<256)r[g++]=St;else if(St==256){Ft=m,b=null;break}else{var ht=St-254;if(St>264){var se=St-257,X=Vi[se];ht=Cr(e,m,(1<<X)-1)+Oy[se],m+=X}var ee=P[Rf(e,m)&bt],Z=ee>>4;ee||Ot(3),m+=ee&15;var xe=JS[Z];if(Z>3){var X=Wi[Z];xe+=Rf(e,m)&(1<<X)-1,m+=X}if(m>O){p&&Ot(0);break}f&&d(g+131072);var te=g+ht;if(g<xe){var I=s-xe,_=Math.min(xe,te);for(I+g<0&&Ot(3);g<_;++g)r[g]=n[I+g]}for(;g<te;++g)r[g]=r[g-xe]}}t.l=b,t.p=Ft,t.b=g,t.f=l,b&&(l=1,t.m=F,t.d=P,t.n=w)}while(!l);return g!=r.length&&a?Go(r,0,g):r.subarray(0,g)},"inflt"),wn=o(function(e,t,r){r<<=t&7;var n=t/8|0;e[n]|=r,e[n+1]|=r>>8},"wbits"),zi=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"),Cf=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:Sy,l:0};if(i==1){var a=new rt(r[0].s+1);return a[r[0].s]=1,{t:a,l:1}}r.sort(function(R,V){return R.f-V.f}),r.push({s:-1,f:25001});var f=r[0],p=r[1],d=0,l=1,m=2;for(r[0]={s:-1,f:f.f+p.f,l:f,r:p};l!=i-1;)f=r[r[d].f<r[m].f?d++:m++],p=r[d!=l&&r[d].f<r[m].f?d++:m++],r[l++]={s:-1,f:f.f+p.f,l:f,r:p};for(var g=s[0].s,n=1;n<i;++n)s[n].s>g&&(g=s[n].s);var b=new nr(g+1),P=Lf(r[l-1],b,0);if(P>t){var n=0,F=0,w=P-t,O=1<<w;for(s.sort(function(V,J){return b[J.s]-b[V.s]||V.f-J.f});n<i;++n){var N=s[n].s;if(b[N]>t)F+=O-(1<<P-b[N]),b[N]=t;else break}for(F>>=w;F>0;){var A=s[n].s;b[A]<t?F-=1<<t-b[A]++-1:++n}for(;n>=0&&F;--n){var k=s[n].s;b[k]==t&&(--b[k],++F)}P=t}return{t:new rt(b),l:P}},"hTree"),Lf=o(function(e,t,r){return e.s==-1?Math.max(Lf(e.l,t,r+1),Lf(e.r,t,r+1)):t[e.s]=r},"ln"),by=o(function(e){for(var t=e.length;t&&!e[--t];);for(var r=new nr(++t),n=0,i=e[0],s=1,a=o(function(p){r[n++]=p},"w"),f=1;f<=t;++f)if(e[f]==i&&f!=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[f]}return{c:r.subarray(0,n),n:t}},"lc"),Gi=o(function(e,t){for(var r=0,n=0;n<t.length;++n)r+=e[n]*t[n];return r},"clen"),Fy=o(function(e,t,r){var n=r.length,i=fa(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"),$y=o(function(e,t,r,n,i,s,a,f,p,d,l){wn(t,l++,r),++i[256];for(var m=Cf(i,15),g=m.t,b=m.l,P=Cf(s,15),F=P.t,w=P.l,O=by(g),N=O.c,A=O.n,k=by(F),R=k.c,V=k.n,J=new nr(19),D=0;D<N.length;++D)++J[N[D]&31];for(var D=0;D<R.length;++D)++J[R[D]&31];for(var U=Cf(J,7),ae=U.t,se=U.l,M=19;M>4&&!ae[sa[M-1]];--M);var le=d+5<<3,ce=Gi(i,Zn)+Gi(s,Bi)+a,Te=Gi(i,g)+Gi(s,F)+a+14+3*M+Gi(J,ae)+2*J[16]+3*J[17]+7*J[18];if(p>=0&&le<=ce&&le<=Te)return Fy(t,l,e.subarray(p,p+d));var Ie,Ke,ft,xe;if(wn(t,l,1+(Te<ce)),l+=2,Te<ce){Ie=Mr(g,b,0),Ke=g,ft=Mr(F,w,0),xe=F;var xt=Mr(ae,se,0);wn(t,l,A-257),wn(t,l+5,V-1),wn(t,l+10,M-4),l+=14;for(var D=0;D<M;++D)wn(t,l+3*D,ae[sa[D]]);l+=3*M;for(var bt=[N,R],Ft=0;Ft<2;++Ft)for(var St=bt[Ft],D=0;D<St.length;++D){var ht=St[D]&31;wn(t,l,xt[ht]),l+=ae[ht],ht>15&&(wn(t,l,St[D]>>5&127),l+=St[D]>>12)}}else Ie=YS,Ke=Zn,ft=QS,xe=Bi;for(var D=0;D<f;++D){var X=n[D];if(X>255){var ht=X>>18&31;zi(t,l,Ie[ht+257]),l+=Ke[ht+257],ht>7&&(wn(t,l,X>>23&31),l+=Vi[ht]);var ee=X&31;zi(t,l,ft[ee]),l+=xe[ee],ee>3&&(zi(t,l,X>>5&8191),l+=Wi[ee])}else zi(t,l,Ie[X]),l+=Ke[X]}return zi(t,l,Ie[256]),l+Ke[256]},"wblk"),nE=new ca([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),Sy=new rt(0),oE=o(function(e,t,r,n,i,s){var a=s.z||e.length,f=new rt(n+a+5*(1+Math.ceil(a/7e3))+i),p=f.subarray(n,f.length-i),d=s.l,l=(s.r||0)&7;if(t){l&&(p[0]=s.r>>3);for(var m=nE[t-1],g=m>>13,b=m&8191,P=(1<<r)-1,F=s.p||new nr(32768),w=s.h||new nr(P+1),O=Math.ceil(r/3),N=2*O,A=o(function(q){return(e[q]^e[q+1]<<O^e[q+2]<<N)&P},"hsh"),k=new ca(25e3),R=new nr(288),V=new nr(32),J=0,D=0,U=s.i||0,ae=0,se=s.w||0,M=0;U+2<a;++U){var le=A(U),ce=U&32767,Te=w[le];if(F[ce]=Te,w[le]=ce,se<=U){var Ie=a-U;if((J>7e3||ae>24576)&&(Ie>423||!d)){l=$y(e,p,0,k,R,V,D,ae,M,U-M,l),ae=J=D=0,M=U;for(var Ke=0;Ke<286;++Ke)R[Ke]=0;for(var Ke=0;Ke<30;++Ke)V[Ke]=0}var ft=2,xe=0,xt=b,bt=ce-Te&32767;if(Ie>2&&le==A(U-bt))for(var Ft=Math.min(g,Ie)-1,St=Math.min(32767,U),ht=Math.min(258,Ie);bt<=St&&--xt&&ce!=Te;){if(e[U+ft]==e[U+ft-bt]){for(var X=0;X<ht&&e[U+X]==e[U+X-bt];++X);if(X>ft){if(ft=X,xe=bt,X>Ft)break;for(var ee=Math.min(bt,X-2),Z=0,Ke=0;Ke<ee;++Ke){var te=U-bt+Ke&32767,I=F[te],_=te-I&32767;_>Z&&(Z=_,Te=te)}}}ce=Te,Te=F[ce],bt+=ce-Te&32767}if(xe){k[ae++]=268435456|Mf[ft]<<18|xy[xe];var $=Mf[ft]&31,K=xy[xe]&31;D+=Vi[$]+Wi[K],++R[257+$],++V[K],se=U+ft,++J}else k[ae++]=e[U],++R[e[U]]}}for(U=Math.max(U,se);U<a;++U)k[ae++]=e[U],++R[e[U]];l=$y(e,p,d,k,R,V,D,ae,M,U-M,l),d||(s.r=l&7|p[l/8|0]<<3,l-=7,s.h=w,s.p=F,s.i=U,s.w=se)}else{for(var U=s.w||0;U<a+d;U+=65535){var L=U+65535;L>=a&&(p[l/8|0]=d,L=a),l=Fy(p,l+1,e.subarray(U,L))}s.i=a}return Go(f,0,n+fa(l)+i)},"dflt"),aK=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}(),cK=o(function(){var e=-1;return{p:o(function(t){for(var r=e,n=0;n<t.length;++n)r=aK[r&255^t[n]]^r>>>8;e=r},"p"),d:o(function(){return~e},"d")}},"crc");var iE=o(function(e,t,r,n,i){if(!i&&(i={l:1},t.dictionary)){var s=t.dictionary.subarray(-32768),a=new rt(s.length+e.length);a.set(s),a.set(e,s.length),e=a,i.w=s.length}return oE(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"),Ey=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"),GS=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 f=n[a],p=s[a];if(typeof f=="function"){t+=";"+p+"=";var d=f.toString();if(f.prototype)if(d.indexOf("[native code]")!=-1){var l=d.indexOf(" ",8)+1;t+=d.slice(l,d.indexOf("(",l))}else{t+=d;for(var m in f.prototype)t+=";"+p+".prototype."+m+"="+f.prototype[m].toString()}else t+=d}else r[p]=f}return t},"wcln"),_f=[],fK=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"),uK=o(function(e,t,r,n){if(!_f[r]){for(var i="",s={},a=e.length-1,f=0;f<a;++f)i=GS(e[f],i,s);_f[r]={c:GS(e[a],i,s),e:s}}var p=Ey({},_f[r].e);return sK(_f[r].c+";onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage="+t.toString()+"}",r,p,fK(p),n)},"wrkr"),pK=o(function(){return[rt,nr,ca,Vi,Wi,sa,Oy,JS,XS,eE,aa,tE,Mr,Nf,Cr,Rf,fa,Go,Ot,rE,vy,Kf,sE]},"bInflt"),lK=o(function(){return[rt,nr,ca,Vi,Wi,sa,Mf,xy,YS,Zn,QS,Bi,aa,nE,Sy,Mr,wn,zi,Cf,Lf,by,Gi,Fy,$y,fa,Go,oE,iE,Ty,Kf]},"bDflt");var Kf=o(function(e){return postMessage(e,[e.buffer])},"pbf"),sE=o(function(e){return e&&{out:e.size&&new rt(e.size),dictionary:e.dictionary}},"gopt"),aE=o(function(e,t,r,n,i,s){var a=uK(r,n,i,function(f,p){a.terminate(),s(f,p)});return a.postMessage([e,t],t.consume?[e.buffer]:[]),function(){a.terminate()}},"cbify");var Pn=o(function(e,t){return e[t]|e[t+1]<<8},"b2"),Xr=o(function(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24)>>>0},"b4"),Iy=o(function(e,t){return Xr(e,t)+Xr(e,t+4)*4294967296},"b8"),Ut=o(function(e,t,r){for(;r;++t)e[t]=r,r>>>=8},"wbytes");function dK(e,t,r){return r||(r=t,t={}),typeof r!="function"&&Ot(7),aE(e,t,[lK],function(n){return Kf(Ty(n.data[0],n.data[1]))},0,r)}o(dK,"deflate");function Ty(e,t){return iE(e,t||{},0,0)}o(Ty,"deflateSync");function mK(e,t,r){return r||(r=t,t={}),typeof r!="function"&&Ot(7),aE(e,t,[pK],function(n){return Kf(vy(n.data[0],sE(n.data[1])))},1,r)}o(mK,"inflate");function vy(e,t){return rE(e,{i:2},t&&t.out,t&&t.dictionary)}o(vy,"inflateSync");var cE=o(function(e,t,r,n){for(var i in e){var s=e[i],a=t+i,f=n;Array.isArray(s)&&(f=Ey(n,s[1]),s=s[0]),s instanceof rt?r[a]=[s,f]:(r[a+="/"]=[new rt(0),f],cE(s,a,r,n))}},"fltn"),BS=typeof TextEncoder<"u"&&new TextEncoder,wy=typeof TextDecoder<"u"&&new TextDecoder,yK=0;try{wy.decode(Sy,{stream:!0}),yK=1}catch(e){}var hK=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:Go(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 Uf(e,t){if(t){for(var r=new rt(e.length),n=0;n<e.length;++n)r[n]=e.charCodeAt(n);return r}if(BS)return BS.encode(e);for(var i=e.length,s=new rt(e.length+(e.length>>1)),a=0,f=o(function(l){s[a++]=l},"w"),n=0;n<i;++n){if(a+5>s.length){var p=new rt(a+8+(i-n<<1));p.set(s),s=p}var d=e.charCodeAt(n);d<128||t?f(d):d<2048?(f(192|d>>6),f(128|d&63)):d>55295&&d<57344?(d=65536+(d&1047552)|e.charCodeAt(++n)&1023,f(240|d>>18),f(128|d>>12&63),f(128|d>>6&63),f(128|d&63)):(f(224|d>>12),f(128|d>>6&63),f(128|d&63))}return Go(s,0,a)}o(Uf,"strToU8");function Ay(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(wy)return wy.decode(e);var i=hK(e),s=i.s,r=i.r;return r.length&&Ot(8),s}}o(Ay,"strFromU8");var gK=o(function(e,t){return t+30+Pn(e,t+26)+Pn(e,t+28)},"slzh"),IK=o(function(e,t,r){var n=Pn(e,t+28),i=Ay(e.subarray(t+46,t+46+n),!(Pn(e,t+8)&2048)),s=t+46+n,a=Xr(e,t+20),f=r&&a==4294967295?xK(e,s):[a,Xr(e,t+24),Xr(e,t+42)],p=f[0],d=f[1],l=f[2];return[Pn(e,t+10),p,d,i,s+Pn(e,t+30)+Pn(e,t+32),l]},"zh"),xK=o(function(e,t){for(;Pn(e,t)!=1;t+=4+Pn(e,t+2));return[Iy(e,t+12),Iy(e,t+4),Iy(e,t+20)]},"z64e"),Py=o(function(e){var t=0;if(e)for(var r in e){var n=e[r].length;n>65535&&Ot(9),t+=n+4}return t},"exfl"),VS=o(function(e,t,r,n,i,s,a,f){var p=n.length,d=r.extra,l=f&&f.length,m=Py(d);Ut(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 g=new Date(r.mtime==null?Date.now():r.mtime),b=g.getFullYear()-1980;if((b<0||b>119)&&Ot(10),Ut(e,t,b<<25|g.getMonth()+1<<21|g.getDate()<<16|g.getHours()<<11|g.getMinutes()<<5|g.getSeconds()>>1),t+=4,s!=-1&&(Ut(e,t,r.crc),Ut(e,t+4,s<0?-s-2:s),Ut(e,t+8,r.size)),Ut(e,t+12,p),Ut(e,t+14,m),t+=16,a!=null&&(Ut(e,t,l),Ut(e,t+6,r.attrs),Ut(e,t+10,a),t+=14),e.set(n,t),t+=p,m)for(var P in d){var F=d[P],w=F.length;Ut(e,t,+P),Ut(e,t+2,w),e.set(F,t+4),t+=4+w}return l&&(e.set(f,t),t+=l),t},"wzh"),bK=o(function(e,t,r,n,i){Ut(e,t,101010256),Ut(e,t+8,r),Ut(e,t+10,r),Ut(e,t+12,n),Ut(e,t+16,i)},"wzf");function fE(e,t,r){r||(r=t,t={}),typeof r!="function"&&Ot(7);var n={};cE(e,"",n,t);var i=Object.keys(n),s=i.length,a=0,f=0,p=s,d=new Array(s),l=[],m=o(function(){for(var w=0;w<l.length;++w)l[w]()},"tAll"),g=o(function(w,O){Df(function(){r(w,O)})},"cbd");Df(function(){g=r});var b=o(function(){var w=new rt(f+22),O=a,N=f-a;f=0;for(var A=0;A<p;++A){var k=d[A];try{var R=k.c.length;VS(w,f,k,k.f,k.u,R);var V=30+k.f.length+Py(k.extra),J=f+V;w.set(k.c,J),VS(w,a,k,k.f,k.u,R,f,k.m),a+=16+V+(k.m?k.m.length:0),f=J+R}catch(D){return g(D,null)}}bK(w,a,d.length,N,O),g(null,w)},"cbf");s||b();for(var P=o(function(w){var O=i[w],N=n[O],A=N[0],k=N[1],R=cK(),V=A.length;R.p(A);var J=Uf(O),D=J.length,U=k.comment,ae=U&&Uf(U),se=ae&&ae.length,M=Py(k.extra),le=k.level==0?0:8,ce=o(function(Te,Ie){if(Te)m(),g(Te,null);else{var Ke=Ie.length;d[w]=Ey(k,{size:V,crc:R.d(),c:Ie,f:J,m:ae,u:D!=O.length||ae&&U.length!=se,compression:le}),a+=30+D+M+Ke,f+=76+2*(D+M)+(se||0)+Ke,--s||b()}},"cbl");if(D>65535&&ce(Ot(11,0,1),null),!le)ce(null,A);else if(V<16e4)try{ce(null,Ty(A,k))}catch(Te){ce(Te,null)}else l.push(dK(A,k,ce))},"_loop_1"),F=0;F<p;++F)P(F);return m}o(fE,"zip");var Df=typeof queueMicrotask=="function"?queueMicrotask:typeof setTimeout=="function"?setTimeout:function(e){e()};function uE(e,t,r){r||(r=t,t={}),typeof r!="function"&&Ot(7);var n=[],i=o(function(){for(var w=0;w<n.length;++w)n[w]()},"tAll"),s={},a=o(function(w,O){Df(function(){r(w,O)})},"cbd");Df(function(){a=r});for(var f=e.length-22;Xr(e,f)!=101010256;--f)if(!f||e.length-f>65558)return a(Ot(13,0,1),null),i;var p=Pn(e,f+8);if(p){var d=p,l=Xr(e,f+16),m=l==4294967295||d==65535;if(m){var g=Xr(e,f-12);m=Xr(e,g)==101075792,m&&(d=p=Xr(e,g+32),l=Xr(e,g+48))}for(var b=t&&t.filter,P=o(function(w){var O=IK(e,l,m),N=O[0],A=O[1],k=O[2],R=O[3],V=O[4],J=O[5],D=gK(e,J);l=V;var U=o(function(se,M){se?(i(),a(se,null)):(M&&(s[R]=M),--p||a(null,s))},"cbl");if(!b||b({name:R,size:A,originalSize:k,compression:N}))if(!N)U(null,Go(e,D,D+A));else if(N==8){var ae=e.subarray(D,D+A);if(k<524288||A>.8*k)try{U(null,vy(ae,{out:new rt(k)}))}catch(se){U(se,null)}else n.push(mK(ae,{size:k},U))}else U(Ot(14,"unknown compression type "+N,1),null);else U(null,null)},"_loop_3"),F=0;F<d;++F)P(F)}else a(null,{});return i}o(uE,"unzip");c();var $K=o(e=>{if(e!=null)return e.trim()===""?void 0:e},"maybePath"),wK=o(e=>e!=null,"notNull"),zf=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:zf(i,t,r)}if(x.IsArray(e))return"".concat(zf(e.items,t,r+1),"[]");if(x.IsUnion(e)&&(!(e.anyOf.length>5)||e.$id==null)){let s="".concat(e.anyOf.map(a=>zf(a,t,r+1)).filter(wK).join(" | "));return r>0?"(".concat(s,")"):s}return(n=e.$id)!=null?n:""},"resolveSchemaIdent"),PK=o((e,t,r)=>{var s;let n=t.message;x.IsUnion(t.schema)&&(n="Expected one of: ".concat(zf(t.schema,r)));let i="#/definitions/".concat(e).concat((s=$K(t.path))!=null?s:"");return"".concat(i,": ").concat(n)},"errorHandler"),Gf=o((e,t,r)=>{let n=t.First();if(n!=null)return PK(e,n,r)},"shortError");var Hi;(function(e){e.Archive="Archive",e.Validate="Validate",e.Encode="Encode",e.Unknown="Unknown"})(Hi||(Hi={}));var ky=class ky extends Error{constructor(r,n){super(n);H(this,"name");H(this,"kind");this.name="CompressError",this.kind=r}};o(ky,"CompressError");var Zi=ky,OK=o(e=>new Zi(Hi.Archive,e.message),"flateErrorIntoCompressError"),FK=o(e=>{let t=Object.values(qf);return e instanceof Error&&"code"in e&&typeof e.code=="number"&&t.includes(e.code)},"isFlateError"),SK=o((e,t,r)=>{var n;return new Zi(Hi.Validate,(n=Gf(e,t,r))!=null?n:"Unknown validate error")},"checkErrorIntoCompressError"),EK=o(e=>new Zi(Hi.Encode,e.message),"encodeErrorIntoCompressError"),TK=o(e=>new Zi(Hi.Unknown,e instanceof Error?e.message:String(e)),"unknownErrorIntoCompressError"),jy=o((e,t,r)=>t instanceof Do?EK(t):t instanceof _r?SK(e,t,r):FK(t)?OK(t):TK(t),"intoCompressError");c();var Ji;(function(e){e.Unarchive="Unarchive",e.Validate="Validate",e.Decode="Decode",e.Unknown="Unknown"})(Ji||(Ji={}));var Ny=class Ny extends Error{constructor(r,n){super(n);H(this,"name");H(this,"kind");this.name="DecompressError",this.kind=r}};o(Ny,"DecompressError");var Yi=Ny,vK=o(e=>new Yi(Ji.Unarchive,e.message),"flateErrorIntoDecompressError"),AK=o(e=>{let t=Object.values(qf);return e instanceof Error&&"code"in e&&typeof e.code=="number"&&t.includes(e.code)},"isFlateError"),jK=o((e,t,r)=>{var n;return new Yi(Ji.Validate,(n=Gf(e,t,r))!=null?n:"Unknown validate error")},"checkErrorIntoDecompressError"),kK=o(e=>new Yi(Ji.Decode,e.message),"decodeErrorIntoDecompressError"),_K=o(e=>new Yi(Ji.Unknown,e instanceof Error?e.message:String(e)),"unknownErrorIntoDecompressError"),_y=o((e,t,r)=>t instanceof Uo?kK(t):t instanceof _r?jK(e,t,r):AK(t)?vK(t):_K(t),"intoDecompressError");c();c();c();var NK=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,RK=[0,31,28,31,30,31,30,31,31,30,31,30,31],CK=o(e=>e%4===0&&(e%100!==0||e%400===0),"isLeapYear"),Bf=o(e=>{let t=NK.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&&CK(r)?29:RK[n])},"date");c();var MK=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i,Vf=o(e=>{let t=MK.exec(e);if(!t)return!1;let r=+t[1],n=+t[2],i=+t[3],s=t[4],a=t[5]==="-"?-1:1,f=+(t[6]||0),p=+(t[7]||0);if(f>23||p>59||!s)return!1;if(r<=23&&n<=59&&i<60)return!0;let d=n-p*a,l=r-f*a-(d<0?1:0);return(l===23||l===-1)&&(d===59||d===-1)&&i<61},"time");var LK=/t|\s/i,pE=o(e=>{let t=e.split(LK);return t.length===2&&Bf(t[0])&&Vf(t[1])},"dateTime");c();var UK=/\/|:/,DK=/^(?:[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,lE=o(e=>UK.test(e)&&DK.test(e),"uri");var qK=[["date",Bf],["time",Vf],["date-time",pE],["uri",lE]],dE=o(()=>{for(let[e,t]of qK)try{df.Format(e,t)}catch(r){if(r instanceof ra)continue;throw r}},"registerFormats");c();c();c();var mE=o(e=>e instanceof Error?e:new Error(String(e)),"asError");var Wf=o(e=>(...t)=>{try{return B(e(...t))}catch(r){return W(mE(r))}},"safeFn");var KK=Wf((e,t)=>{let r={};for(let n of t)for(let i of n.intoBundle(e))r[i.path]=Uf(JSON.stringify(i.contents));return r}),Ry=o(async(e,t,r)=>KK(e,t).andThenAsync(n=>new Promise(i=>{fE(n,Y(S({},r),{consume:!0}),(s,a)=>{i(s?W(s):B(a))})})),"compress");c();c();function Hf(e,t,r=[]){let n=S({},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 f=zK(s[0],r);if(f){let p=n[a];if(!Array.isArray(p))throw new Error("Expected array at ".concat(i,", got ").concat(typeof p));let d=new Map(s.map(g=>[yE(g,f),g])),m=p.map(g=>{let b=d.get(yE(g,f));return b?Hf(g,b,r):g});n[a]=m}else n[a]=s}else{let f=n[a];typeof f=="object"&&f!==null&&typeof s=="object"&&s!==null?Object.keys(s).length===0?n[a]=s:n[a]=Hf(f,s,r):n[i]=s}}else n[i]=s;return n}o(Hf,"deepMergeOn");function zK(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(zK,"findIdentifierKey");function yE(e,t){return t.reduce((r,n)=>{if(r&&typeof r=="object")return r[n]},e)}o(yE,"getValueByKeyPath");var GK=o(e=>e,"identity"),BK=o(e=>JSON.parse(Ay(e)),"jsonDecode"),VK=o((e,t)=>t.some(r=>r.fromBundle(e.name,new Uint8Array,GK)!==void 0),"isFileExpected"),WK=Wf((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,BK);if(a){r=Hf(r,a,[]);break}}}return r}),Cy=o(async(e,t)=>new Promise(r=>uE(e,{filter:o(n=>VK(n,t),"filter")},(n,i)=>{r(n?W(n):B(i))})).then(r=>r.andThen(n=>WK(n,t))),"decompress");c();var HK=o(e=>typeof e=="object"&&e!=null&&"$ref"in e&&typeof e.$ref=="string","isRef"),ZK=o(e=>{if(e.length<2)return!1;let t=e.filter(HK);if(t.length!==e.length)return!1;let r=t[0].$ref;return t.slice(1).every(n=>n.$ref===r)},"isDuplicateRef"),Zf=o(e=>typeof e=="object"&&e!=null&&"allOf"in e&&Array.isArray(e.allOf)&&ZK(e.allOf)?e.allOf[0]:typeof e=="object"&&e!=null&&!Array.isArray(e)?Object.fromEntries(Object.entries(e).map(([t,r])=>[t,Zf(r)])):Array.isArray(e)?e.map(Zf):e,"fixDuplicateAllOf");c();var Jf=o(e=>typeof e=="object"&&e!=null&&"$ref"in e?Y(S({},e),{$ref:"#/definitions/".concat(e.$ref)}):typeof e=="object"&&e!=null&&!Array.isArray(e)?Object.fromEntries(Object.entries(e).map(([t,r])=>[t,Jf(r)])):Array.isArray(e)?e.map(Jf):e,"prefixReferences");var Xi;(function(e){e.InvalidTypeboxSchema="InvalidTypeboxSchema",e.MissingReferenceId="MissingReferenceId",e.DuplicateReferenceId="DuplicateReferenceId",e.TypeboxError="TypeboxError",e.UnknownError="UnknownError"})(Xi||(Xi={}));var JK=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"),YK=o((...e)=>{let t=new Map;for(let r of JK(e)){if(!r.$id)continue;let n=t.get(r.$id);if(n!=null&&n!==r)return W({kind:Xi.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"),Lr,Bo,Jn,Qr,Xf=class Xf{constructor(t,r,n,i){Io(this,Lr);Io(this,Bo);Io(this,Jn,[]);Io(this,Qr);rs(this,Lr,t),rs(this,Bo,r),rs(this,Jn,n),rs(this,Qr,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=u.Composite(t.extensions.map(s=>s.schema),{$id:r});if(!x.IsSchema(n))return W({kind:Xi.InvalidTypeboxSchema,message:"Attempting to merge schemas produced an invalid schema",schema:n});let i=YK(Pm.values(),hm.values(),Im.values(),bm.values(),$m.values(),km.values(),t.extensions.flatMap(s=>{var a;return(a=s.references)!=null?a:[]}).values());if(!i.isOk())return i;try{dE();let s=kf.Compile(n,[...i.value.values()]);return B(new Xf(n,s,t.extensions,i.value))}catch(s){return s instanceof ne?W({kind:Xi.TypeboxError,message:s.message,original:s}):W({kind:Xi.UnknownError,message:"An unknown error occurred while compiling the schema",original:s})}}is(t){return He(this,Bo).Check(t)}parse(t){return He(this,Bo).Check(t)?B(t):W(He(this,Bo).Errors(t))}decode(t){try{return B(qS(He(this,Lr),[...He(this,Qr).values()],t))}catch(r){return W(r)}}encode(t){try{return B(KS(He(this,Lr),[...He(this,Qr).values()],t))}catch(r){return W(r)}}verify(t){for(let r of He(this,Jn))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([He(this,Lr),...He(this,Qr).values()])),r=Zf(Jf({$id:"#/definitions/".concat((n=He(this,Lr).$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=>Ry(r,He(this,Jn))).then(r=>r.mapErr(n=>{var i;return jy((i=He(this,Lr).$id)!=null?i:"CoreMVF",n,[...He(this,Qr).values()])}))}async compressUnsafe(t){return this.encode(t).andThenAsync(r=>Ry(r,He(this,Jn))).then(r=>r.mapErr(n=>{var i;return jy((i=He(this,Lr).$id)!=null?i:"CoreMVF",n,[...He(this,Qr).values()])}))}async decompress(t){return Cy(t,He(this,Jn)).then(r=>r.andThen(n=>this.parse(n)).andThen(n=>this.decode(n)).mapErr(n=>{var i;return _y((i=He(this,Lr).$id)!=null?i:"CoreMVF",n,[...He(this,Qr).values()])}))}async decompressUnsafe(t){return Cy(t,He(this,Jn)).then(r=>r.andThen(n=>this.decode(n)).mapErr(n=>{var i;return _y((i=He(this,Lr).$id)!=null?i:"CoreMVF",n,[...He(this,Qr).values()])}))}};Lr=new WeakMap,Bo=new WeakMap,Jn=new WeakMap,Qr=new WeakMap,o(Xf,"MVFParser");var Yf=Xf;var Qi,My=class My{constructor(){Io(this,Qi,[]);this.extend=this.extend.bind(this)}extend(t){return He(this,Qi).push(t),this}extendOptional(t){let r=Y(S({},t),{schema:u.Partial(t.schema)});return He(this,Qi).push(r),this}build(){return Yf.create(this)}get extensions(){return He(this,Qi)}};Qi=new WeakMap,o(My,"MVFParserBuilder");var Qf=My;var hE=o(()=>new Qf().extend(tS).extend(aS).extend(pS),"createParser");var Vo=ct("lcat","LocationCategoryId"),Ly=u.Intersect([u.Object({id:u.Ref(Vo),parent:u.Optional(u.Ref(Vo))}),Co(["name"]),Yr],{$id:"LocationCategory"}),gE=[Vo,Ly];c();c();var Wo;(function(e){e.UnknownCategoryError="UnknownCategoryError",e.UnknownParentCategoryError="UnknownParentCategoryError",e.UnknownParentLocationError="UnknownParentLocationError"})(Wo||(Wo={}));var IE=o(e=>{var i,s,a,f,p,d,l,m,g;if(e.locationCategories==null&&e.locations==null)return B(!0);let t=new Set((s=(i=e.locationCategories)==null?void 0:i.map(b=>b.id))!=null?s:[]);for(let b of(a=e.locationCategories)!=null?a:[])if(b.parent!=null&&!t.has(b.parent))return W({kind:Wo.UnknownParentCategoryError,properties:{categoryId:b.id,parentCategoryId:b.parent}});let r=vt(e);for(let b of(f=e.locations)!=null?f:[]){for(let P of b.categories)if(!t.has(P))return W({kind:Wo.UnknownCategoryError,properties:{locationId:b.id,categoryId:P}});for(let P of b.geometryAnchors){let F=r(P.floorId,P.geometryId);if(F.isErr())return F}}let n=new Set((d=(p=e.locations)==null?void 0:p.map(b=>b.id))!=null?d:[]);for(let b of(l=e.locationInstances)!=null?l:[]){if(!n.has(b.parentId))return W({kind:Wo.UnknownParentLocationError,properties:{locationInstanceId:b.id,parentLocationId:b.parentId}});for(let P of(m=b.categories)!=null?m:[])if(!t.has(P))return W({kind:Wo.UnknownCategoryError,properties:{locationId:b.id,categoryId:P}});for(let P of(g=b.geometryAnchors)!=null?g:[]){let F=r(P.floorId,P.geometryId);if(F.isErr())return F}}return B(!0)},"validateLocations");c();var Ho=ct("loc","LocationId"),eu=ct("loci","LocationInstanceId"),xE=u.Object({name:u.String(),url:u.String({format:"uri"})},{$id:"LocationSocial"}),bE=u.Object({url:u.String({format:"uri"})},{$id:"LocationImage"}),Uy=u.Object({label:u.String(),url:u.String({format:"uri"})},{$id:"LocationLink"}),Dy=u.String({pattern:"^[0-2][0-9]:[0-6][0-9](:[0-6][0-9])?$",$id:"OpeningHoursTime"}),$E=u.Union([u.Literal("Sunday"),u.Literal("Monday"),u.Literal("Tuesday"),u.Literal("Wednesday"),u.Literal("Thursday"),u.Literal("Friday"),u.Literal("Saturday")],{$id:"OpeningHoursDay"}),XK="PublicHolidays",qy=u.Union([$E,u.Literal(XK)],{$id:"OpeningHoursDayOrPublicHoliday"}),tu=u.Object({"@type":u.Optional(u.Literal("OpeningHoursSpecification",{description:"The type of opening hours"})),opens:u.Optional(u.Ref(Dy,{description:"The time the opening hours start"})),closes:u.Optional(u.Ref(Dy,{description:"The time the opening hours end"})),dayOfWeek:u.Optional(u.Union([u.Ref(qy),u.Array(u.Ref(qy))],{description:"The days of the week the opening hours apply to"})),validFrom:u.Optional(u.String({format:"date-time",description:"The date the opening hours start, in ISO 8601 format"})),validTo:u.Optional(u.String({format:"date-time",description:"The date the opening hours end, in ISO 8601 format"}))},{$id:"OpeningHoursSpecification"}),ru=u.Intersect([u.Object({id:u.Ref(Ho),categories:u.Array(u.Ref(Vo)),logo:u.Optional(u.String({format:"uri"})),phone:u.Optional(u.String()),social:u.Array(u.Ref(xE)),images:u.Array(u.Ref(bE)),links:u.Array(u.Ref(Uy)),website:u.Optional(u.Ref(Uy)),openingHours:u.Optional(u.Array(u.Ref(tu)))}),Co(["name"]),Mo(),Yr],{$id:"Location"}),Ky=u.Intersect([u.Object({id:u.Ref(eu),parentId:u.Ref(Ho)}),u.Partial(u.Omit(ru,["id","parentId"]))],{$id:"LocationInstance"}),nu=[Ho,eu,xE,bE,Uy,Dy,$E,qy,tu,ru,Ky];var QK=u.Object({locations:u.Array(u.Ref(ru)),locationCategories:u.Array(u.Ref(Ly)),locationInstances:u.Optional(u.Array(u.Ref(Ky)))},{$id:"LocationsExtensionSchema"}),wE="locations.json",PE="location-categories.json",OE="location-instances.json",FE={name:"ext:locations",schema:QK,intoBundle:o(function*(e){e.locations!=null&&(yield{path:wE,contents:e.locations}),e.locationCategories!=null&&(yield{path:PE,contents:e.locationCategories}),e.locationInstances!=null&&(yield{path:OE,contents:e.locationInstances})},"intoBundle"),fromBundle:o((e,t,r)=>{if(e===wE)return{locations:r(t)};if(e===PE)return{locationCategories:r(t)};if(e===OE)return{locationInstances:r(t)}},"fromBundle"),references:[...gE,...nu],integrityCheck:IE};c();c();var On;(function(e){e.UnknownEnterpriseLocationError="UnknownEnterpriseLocationError",e.EnterpriseLocationWithUnknownLocationError="EnterpriseLocationWithUnknownLocationError",e.EnterpriseCategoryWithUnknownLocationCategoryError="EnterpriseCategoryWithUnknownLocationCategoryError",e.InstanceWithUnknownLocationInstanceError="InstanceWithUnknownLocationInstanceError",e.InstanceWithUnknownEnterpriseLocationError="InstanceWithUnknownEnterpriseLocationError",e.EnterpriseLocationWithUnknownSibling="EnterpriseLocationWithUnknownSibling",e.EnterpriseLocationInstanceWithUnknownSibling="EnterpriseLocationInstanceWithUnknownSibling"})(On||(On={}));var SE=o(e=>{var p,d,l,m,g,b,P,F,w,O,N,A,k,R,V,J,D,U,ae,se;if(e.enterprise==null)return B(!0);let t=e.enterprise,r=new Set((d=(p=e.locationCategories)==null?void 0:p.map(M=>M.id))!=null?d:[]);for(let M of(l=t.categories)!=null?l:[])if(!r.has(M.categoryId))return W({kind:On.EnterpriseCategoryWithUnknownLocationCategoryError,properties:{enterpriseCategoryId:M.id,locationCategoryId:M.categoryId}});let n=new Set((g=(m=e.locations)==null?void 0:m.map(M=>M.id))!=null?g:[]);for(let M of(b=t.locations)!=null?b:[]){if(!n.has(M.locationId))return W({kind:On.EnterpriseLocationWithUnknownLocationError,properties:{enterpriseLocationId:M.id,locationId:M.locationId}});for(let le of(P=M.siblingGroups)!=null?P:[])for(let ce of(F=le.siblings)!=null?F:[])if(!n.has(ce))return W({kind:On.EnterpriseLocationWithUnknownSibling,properties:{enterpriseLocationId:M.id,siblingLocationId:ce,label:le.label}})}let i=new Set((O=(w=e.enterprise.locations)==null?void 0:w.map(M=>M.id))!=null?O:[]);if(((N=t.venue)==null?void 0:N.topLocations)!=null){for(let M of t.venue.topLocations)if(!i.has(M))return W({kind:On.UnknownEnterpriseLocationError,properties:{enterpriseLocationId:M}})}let s=new Set((k=(A=e.locationInstances)==null?void 0:A.map(M=>M.id))!=null?k:[]);for(let M of(R=t.locationInstances)!=null?R:[]){if(!i.has(M.parentId))return W({kind:On.InstanceWithUnknownEnterpriseLocationError,properties:{enterpriseLocationInstanceId:M.id,enterpriseLocationId:M.parentId}});if(!s.has(M.locationInstanceId))return W({kind:On.InstanceWithUnknownLocationInstanceError,properties:{enterpriseLocationInstanceId:M.id,locationInstanceId:M.locationInstanceId}});for(let le of(V=M.siblingGroups)!=null?V:[])for(let ce of(J=le.siblings)!=null?J:[])if(!n.has(ce))return W({kind:On.EnterpriseLocationInstanceWithUnknownSibling,properties:{enterpriseLocationInstanceId:M.id,siblingLocationId:ce,label:le.label}})}let a=zn(e),f=vt(e);for(let[M,le]of _e((D=t.floorText)!=null?D:{})){let ce=a(M);if(ce.isErr())return ce;for(let Te of le.features){if(!("geometryId"in Te.properties))continue;let Ie=f(M,Te.properties.geometryId);if(Ie.isErr())return Ie}}for(let[M,le]of _e((U=t.textures)!=null?U:{})){let ce=a(M);if(ce.isErr())return ce;for(let Te of le){let Ie=f(M,Te.geometryId);if(Ie.isErr())return Ie}}for(let[M,le]of _e((ae=t.layers)!=null?ae:{})){let ce=a(M);if(ce.isErr())return ce;for(let Te of Ee(le!=null?le:{})){let Ie=f(M,Te);if(Ie.isErr())return Ie}}for(let[M,le]of _e((se=t.textAreas)!=null?se:{})){let ce=a(M);if(ce.isErr())return ce;for(let Te of le.features)if("geometryId"in Te.properties){let Ie=f(M,Te.properties.geometryId);if(Ie.isErr())return Ie}}return B(!0)},"validateCMS");c();c();var Zo=ct("el","EnterpriseLocationId"),zy=ct("ec","EnterpriseCategoryId"),Gy=ct("eli","EnterpriseLocationInstanceId"),By=ct("ev","EnterpriseVenueId"),Vy=ct("eft","EnterpriseFloorTextId"),EE=[Zo,zy,Gy,By,Vy];var TE=u.Object({id:u.Ref(zy),categoryId:u.Ref(Vo),color:u.Optional(u.String()),sortOrder:u.Number(),iconFromDefaultList:u.Optional(u.Union([u.String(),u.Null()])),picture:u.Optional(u.String({format:"uri",description:"The category's picture"}))},{$id:"EnterpriseCategory"}),Wy=u.Object({categories:u.Optional(u.Array(u.Ref(TE)))},{$id:"EnterpriseCategoriesSchema"}),vE=[TE,Wy];c();var AE=lr(["left","center","right"]),e3=AE.schema,ode=AE.values,Hy=u.Object({id:u.Ref(Vy),text:u.String(),visible:u.Boolean({default:!0}),fontSize:u.Number({default:12,minimum:1}),fontFamily:u.String({default:"Droid Sans"}),color:u.String({default:"black"}),rotation:u.Number({minimum:0,maximum:360}),align:e3},{$id:"FloorTextCommonProperties"}),Zy=u.Intersect([u.Ref(Hy),jr],{$id:"AnchoredFloorTextProperties"}),Jy=u.Intersect([u.Ref(Hy),u.Object({verticalOffset:u.Number()})],{$id:"FloatingFloorTextProperties"}),jE=u.Union([u.Ref(Zy),u.Ref(Jy)],{$id:"FloorTextProperties"}),kE=Ct(Vt,u.Ref(jE),{$id:"FloorTextFeature"}),t3=Ct(Vt,u.Ref(Zy),{$id:"AnchoredFloorTextFeature"}),r3=Ct(Vt,u.Ref(Jy),{$id:"FloatingFloorTextFeature"}),_E=rr(u.Ref(kE),{$id:"EnterpriseFloorTextFeatureCollection"}),NE=u.Record(ke,u.Ref(_E),{$id:"EnterpriseFloorTextCollectionsByFloor",additionalProperties:!1}),Yy=u.Object({floorText:u.Optional(u.Ref(NE))},{$id:"EnterpriseFloorTextSchema"}),RE=[Hy,Zy,Jy,jE,kE,t3,r3,_E,NE,Yy];c();var CE=yt(u.Record(Bt,u.String({minLength:1}),{additionalProperties:!1,$id:"EnterpriseLayers"})),ME=yt(u.Record(ke,u.Ref(CE),{additionalProperties:!1,$id:"EnterpriseLayersByFloor"})),Xy=u.Object({layers:u.Optional(u.Ref(ME))},{$id:"EnterpriseLayersSchema"}),LE=[CE,ME,Xy];c();c();c();var Qy=lr(["closed-temporarily","new","pop-up","coming-soon","relocated"]),n3=Qy.schema,yde=Qy.values,hde=Qy.record,eh=u.Object({type:n3,start:u.Optional(u.String({format:"date",description:"The start date of the state"})),end:u.Optional(u.String({format:"date",description:"The end date of the state"}))},{$id:"LocationState",description:"The state of a location. Start and end dates are optional."}),th=u.Object({label:u.String(),siblings:u.Array(u.Ref(Ho))},{$id:"SiblingGroup"}),ou=u.Object({name:u.String(),code:u.String()},{$id:"Language"}),UE=[eh,th,ou];var iu=u.Object({id:u.Ref(Zo),locationId:u.Ref(Ho),type:u.String(),sortOrder:u.Number(),tags:u.Optional(u.Array(u.String())),picture:u.Optional(u.String({format:"uri",description:"The picture of the location"})),states:u.Optional(u.Array(u.Ref(eh),{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:u.Optional(u.Array(u.Ref(th))),gallery:u.Optional(u.Array(u.Object({caption:u.Optional(u.String()),image:u.String({format:"uri"}),embeddedUrl:u.Optional(u.String({format:"uri",description:"The URL to link from the image"}))},{description:"The location's image gallery"}),{description:"The location's image gallery"})),showFloatingLabelWhenImagePresent:u.Optional(u.Boolean({description:"Whether to show the flat label when an image is present"})),amenity:u.Optional(u.String({description:"The location's amenity type. Only set if the location is an amenity"})),showLogo:u.Optional(u.Boolean({description:"Whether to show the logo of the location"}))},{$id:"EnterpriseLocation"}),rh=u.Object({locations:u.Optional(u.Array(u.Ref(iu)))},{$id:"EnterpriseLocationsSchema"}),DE=[iu,rh];var qE=u.Intersect([u.Object({id:u.Ref(Gy),parentId:u.Ref(Zo),locationInstanceId:u.Ref(eu)}),u.Partial(u.Omit(iu,["id","parentId","locationId"]))],{$id:"EnterpriseLocationInstance",description:"A locationInstance is a particular instance of an Enterprise Location that has some properties different from the parent."}),nh=u.Object({locationInstances:u.Optional(u.Array(u.Ref(qE)))},{$id:"EnterpriseLocationInstancesSchema"}),KE=[qE,nh];c();var oh=lr(["near","center"],{$id:"EnterpriseTextAreaAlignment"}),zE=oh.schema,Rde=oh.values,Cde=oh.record,ih=u.Object({maxWidth:u.Number({exclusiveMinimum:0,description:"The maximum width of the label, in meters."}),maxHeight:u.Number({exclusiveMinimum:0,description:"The maximum height of the label, in meters."}),align:u.Ref(zE),rotation:u.Number({minimum:0,maximum:360,description:"Rotation in degrees, about the center of the image. North is 0, east is 90."})},{$id:"EnterpriseBaseTextAreaProperties"}),GE=u.Intersect([u.Ref(ih),jr],{$id:"EnterpriseAnchoredTextAreaProperties"}),BE=u.Intersect([u.Ref(ih),u.Object({verticalOffset:u.Number({minimum:0,description:"How high to position the image, in meters, relative to the ground plane."})})],{$id:"EnterpriseFloatingTextAreaProperties"}),VE=u.Union([GE,BE],{$id:"EnterpriseTextAreaProperties"}),WE=Ct(u.Ref(Vt),VE,{$id:"EnterpriseTextAreaFeature"}),HE=rr(u.Ref(WE),{$id:"EnterpriseTextAreaCollection"}),ZE=u.Record(ke,u.Ref(HE),{$id:"EnterpriseTextAreasByFloor",additionalProperties:!1}),JE=u.Object({textAreas:u.Optional(u.Ref(ZE))},{$id:"EnterpriseTextAreasSchema"}),YE=[zE,ih,GE,BE,VE,WE,HE,ZE];c();var sh=u.Object({u:u.Number(),v:u.Number()},{$id:"EnterpriseTextureUV"}),ah=lr(["top","side"],{$id:"EnterpriseTextureFace"}),XE=ah.schema,qde=ah.values,Kde=ah.record,ch=lr(["inside","outside","both"],{$id:"EnterpriseTextureSurface"}),QE=ch.schema,zde=ch.values,Gde=ch.record,eT=u.Tuple([_i,Ni,_i,Ni],{$id:"EnterpriseTextureBounds"}),tT=u.Intersect([u.Object({repeat:u.Ref(sh),offset:u.Ref(sh),rotation:u.Number({minimum:0,maximum:360}),path:u.String({format:"uri"}),face:u.Ref(XE),surface:u.Ref(QE),bounds:u.Ref(eT)},{$id:"EnterpriseTextureProperties"}),jr],{$id:"EnterpriseTexture"}),rT=u.Array(u.Ref(tT),{$id:"EnterpriseTextures"}),nT=u.Record(ke,u.Ref(rT),{$id:"EnterpriseTexturesByFloor",additionalProperties:!1}),fh=u.Object({textures:u.Optional(u.Ref(nT))},{$id:"EnterpriseTexturesSchema"}),oT=[tT,rT,fh,sh,XE,QE,eT,nT];c();var iT=u.Intersect([u.Object({id:u.Ref(By),slug:u.String(),defaultLanguage:u.Ref(ou),languages:u.Array(u.Ref(ou)),countrycode:u.Optional(u.String()),logo:u.Optional(u.String({format:"uri"})),mappedinWebUrl:u.Optional(u.String({format:"uri"})),topLocations:u.Optional(u.Array(u.Ref(Zo))),operationHours:u.Optional(u.Array(u.Ref(tu))),coverImage:u.Optional(u.String({format:"uri"}))}),Co(["name"]),Yr],{$id:"EnterpriseVenue"}),uh=u.Object({venue:u.Optional(u.Ref(iT))},{$id:"EnterpriseVenueSchema"}),sT=[iT,uh];var cT=u.Intersect([uh,rh,nh,Wy,fh,Yy,Xy,JE],{$id:"EnterpriseProperties"}),aT=u.Object({enterprise:u.Optional(u.Ref(cT))},{$id:"CMSExtensionSchema"}),o3=/^enterprise\/(?:([^/]+)\/)?([^/]+)\.(?:json|geojson)$/,fT={name:"ext:cms",schema:aT,intoBundle:o(function*(e){var r,n,i,s,a,f;if(e.enterprise==null)return;let t=e.enterprise;for(let p of Ee(t))switch(p){case"floorText":for(let d of Ee((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 Ee((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 Ee((a=t.textAreas)!=null?a:{}))yield{path:"enterprise/textAreas/".concat(d,".geojson"),contents:((f=t.textAreas)!=null?f:{})[d]};continue;default:yield{path:"enterprise/".concat(p,".json"),contents:t[p]};continue}},"intoBundle"),fromBundle:o((e,t,r)=>{let n=e.match(o3);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:[cT,aT,...sT,...DE,...KE,...vE,...oT,...LE,...RE,...YE,...EE,...UE,...nu],integrityCheck:SE};c();c();c();c();var en;(function(e){e.NavigationFlagMissingDeclaration="NavigationFlagMissingDeclaration",e.NavigationFlagDuplicateBit="NavigationFlagDuplicateBit",e.NavigationFlagIncorrectFlagsLength="NavigationFlagIncorrectFlagsLength",e.NavigationFlagValueTooBig="NavigationFlagValueTooBig"})(en||(en={}));var uT=o(e=>{let{navigationFlags:t}=e;if(!t||Object.keys(t).length===0)return B(!0);let r=Object.entries(t).map(([s,a])=>S({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:en.NavigationFlagDuplicateBit,properties:{index:s.index,bit:s.bit,path:"navigationFlags.".concat(s.key)}});if(s.index!=n){if(i!=31)return W({kind:en.NavigationFlagMissingDeclaration,properties:{index:n,bit:i+1,path:"navigationFlags"}});if(s.index!=n+1||s.bit!=0)return W({kind:en.NavigationFlagMissingDeclaration,properties:{index:n+1,bit:0,path:"navigationFlags"}});n=s.index,i=0}else{if(s.bit!==i+1)return W({kind:en.NavigationFlagMissingDeclaration,properties:{index:s.index,bit:i+1,path:"navigationFlags"}});i=s.bit}}return B(!0)},"validateNavigationFlags");c();function es(e,t){return t&&(e.flags[t.index]&1<<t.bit)!==0}o(es,"hasFlag");c();var pT=2**32-1,ua=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"),ts=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:en.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>pT)return W({kind:en.NavigationFlagValueTooBig,properties:{index:i,flagValue:s,expectedMaxFlagValue:pT,path:r}});continue}else if(s>t.flag)return W({kind:en.NavigationFlagValueTooBig,properties:{index:i,flagValue:s,expectedMaxFlagValue:t.flag,path:r}})}return B(!0)},"validateFlags");var i3=u.Object({index:u.Integer({description:"The index of the flag in a flags array.",minimum:0}),bit:u.Integer({description:"The bit position of the flag in a flag's bitfield.",minimum:0,maximum:31})},{$id:"NavigationFlagDeclarationCore"}),lT=u.Intersect([i3,Jr],{$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.'}),ph={accessible:"accessible",outdoors:"outdoors"},dT=u.Record(u.String(),lT,{$id:"NavigationFlagDeclarations",description:"Any well known and custom flags present in the MVF"}),s3=u.Object({navigationFlags:u.Ref(dT)},{$id:"NavigationFlagsSchema"}),su=u.Array(u.Integer({minimum:0,maximum:Math.pow(2,32)-1}),{$id:"Flags"}),lh=u.Object({flags:u.Ref(su)},{$id:"WithFlags"}),Jo=u.Intersect([ki,lh],{$id:"FlaggedGeometryAnchor"}),a3=u.Object({geometryAnchor:Jo},{$id:"WithFlaggedGeometryAnchor"}),c3=u.Object({geometryAnchors:u.Array(Jo)},{$id:"WithFlaggedGeometryAnchors"}),mT={name:"ext:mvf-navigation-flags",schema:s3,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:[lT,dT,su,Jo,a3,c3],integrityCheck:uT};c();var yT=o(e=>{if(e.connections==null)return B(!0);let t=vt(e),r=ua(e);for(let[n,i]of e.connections.entries()){for(let[s,a]of i.entrances.entries()){let f=t(a.floorId,a.geometryId);if(f.isErr())return f;let p=ts(a.flags,r,"connections[".concat(n,"].entrances[").concat(s,"]"));if(p.isErr())return p}for(let[s,a]of i.exits.entries()){let f=t(a.floorId,a.geometryId);if(f.isErr())return f;let p=ts(a.flags,r,"connections[".concat(n,"].exits[").concat(s,"]"));if(p.isErr())return p}}return B(!0)},"validateConnections");var gT=ct("c","ConnectionId"),{schema:f3,values:Yme,record:u3}=lr(["elevator","escalator","travelator","stairs","door","ramp"],{$id:"ConnectionType"}),IT=f3;var dh=u3,xT=u.Intersect([u.Object({id:u.Ref(gT,{description:"The unique identifier for the connection."}),entrances:u.Array(u.Ref(Jo)),exits:u.Array(u.Ref(Jo)),entryCost:u.Number({description:"The cost to enter the connection.",minimum:0}),floorCostMultiplier:u.Number({description:"The cost multiplier for each floor transitioned.",minimum:1}),type:u.Ref(IT,{description:"The type of connection."})}),Jr,Yr],{$id:"ConnectionsProperties"}),bT=u.Array(u.Ref(xT),{$id:"ConnectionsCollection"}),p3=u.Object({connections:u.Ref(bT)},{$id:"ConnectionsExtensionSchema"}),hT="connections.json",$T={name:"ext:connections",schema:p3,intoBundle:o(function*(e){e.connections!=null&&(yield{path:hT,contents:e.connections})},"intoBundle"),fromBundle:o((e,t,r)=>{if(e===hT)return{connections:r(t)}},"fromBundle"),references:[xT,bT,IT,gT,Jo,su],integrityCheck:yT};c();c();var wT=o(e=>{if(e.defaultStyle==null)return B(!0);let t=vt(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 PT=u.Intersect([Mo(),Yr,u.Object({altitude:u.Number({description:"How far off the bottom of the floor the objects with this style should be drawn, in meters."}),color:u.String({pattern:"^#[0-9a-fA-F]{6}$",description:"Color should be represented with a hash (#), followed by 6 hexadecimal digits. ex: #RRGGBB"}),height:u.Number({minimum:0,description:"The height of the objects belonging to this layer, in meters."}),opacity:u.Number({minimum:0,maximum:1,description:"The opacity of the objects belonging to this layer, from 0 to 1."}),buffer:u.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:u.Optional(u.Boolean({description:"Whether or not the objects with this style should be hidden."}))})],{$id:"DefaultStyle"}),OT=u.Record(u.String(),u.Ref(PT),{$id:"DefaultStyleCollection",additionalProperties:!1}),l3=u.Object({defaultStyle:u.Ref(OT)},{$id:"DefaultStyleSchema"}),FT={name:"ext:mvf-default-style",schema:l3,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:[PT,OT],integrityCheck:wT};c();c();c();c();var au;(function(e){e.InvalidDefaultFloorError="InvalidDefaultFloorError"})(au||(au={}));var ST=o(e=>{if(e.floorStacks==null)return B(!0);let t=zn(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:au.InvalidDefaultFloorError,properties:{floorStackId:r.id,floorId:r.defaultFloor}})}return B(!0)},"validateFloorStacks");var cu=ct("fs","FloorStackId"),TT=u.Intersect([u.Object({id:u.Ref(cu,{description:"The unique identifier for the floor stack."}),floors:u.Array(u.Ref(ke),{uniqueItems:!0,minItems:1,description:"The floors that are part of this floor stack."}),defaultFloor:u.Optional(u.Ref(ke,{description:"The default floor for the floor stack."}))}),Jr],{$id:"FloorStacksProperties"}),vT=u.Array(u.Ref(TT),{$id:"FloorStackCollection"}),d3=u.Object({floorStacks:u.Ref(vT)},{$id:"FloorStackExtensionSchema"}),ET="floor-stacks.json",AT={name:"ext:floor-stacks",schema:d3,intoBundle:o(function*(e){e.floorStacks!=null&&(yield{path:ET,contents:e.floorStacks})},"intoBundle"),fromBundle:o((e,t,r)=>{if(e===ET)return{floorStacks:r(t)}},"fromBundle"),references:[cu,TT,vT],integrityCheck:ST};c();c();var pa;(function(e){e.MissingFloorStackError="MissingFloorStackError",e.UnknownFloorStackError="UnknownFloorStackError"})(pa||(pa={}));var jT=o(e=>{if(e.facade==null)return B(!0);if(e.floorStacks==null)return W({kind:pa.MissingFloorStackError,properties:null});let t=new Set(e.floorStacks.map(n=>n.id)),r=vt(e);for(let[n,i]of _e(e.facade))if(i!=null){if(!t.has(n))return W({kind:pa.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 kT=ct("fc","FacadeId"),_T=u.Intersect([u.Object({id:u.Ref(kT)}),Mo({minItems:1})],{$id:"FacadeProperties"}),m3=u.Object({facade:yt(u.Record(cu,u.Ref(_T),{additionalProperties:!1}))},{$id:"FacadeExtensionSchema"}),y3=/^facade\/(.*)\.json$/,NT={name:"ext:facade",schema:m3,intoBundle:o(function*(e){if(e.facade!=null)for(let t of Ee(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(y3))==null?void 0:i[1];if(n)return{facade:{[n]:r(t)}}},"fromBundle"),references:[kT,_T],integrityCheck:jT};c();c();var RT=o(e=>{if(e.floorImages==null)return B(!0);let t=vt(e);for(let[r,n]of _e(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 mh=u.Object({path:u.String({format:"uri",description:"The path to the image. This will be a remote URL."}),width:u.Number({minimum:0,description:"The width of the image when represented on the map, in meters."}),height:u.Number({minimum:0,description:"The height of the image when represented on the map, in meters."}),rotation:u.Number({minimum:0,maximum:360,description:"Rotation in degrees, about the center of the image. North is 0, east is 90."})},{$id:"BaseFloorImageProperties"}),CT=u.Intersect([u.Ref(mh),jr],{$id:"AnchoredFloorImageProperties"}),MT=u.Intersect([u.Ref(mh),u.Object({verticalOffset:u.Number({minimum:0,description:"How high to position the image, in meters, relative to the ground plane."})})],{$id:"FloatingFloorImageProperties"}),LT=u.Union([CT,MT],{$id:"FloorImageProperties"}),UT=Ct(u.Ref(Vt),LT,{$id:"FloorImageFeature"}),DT=rr(u.Ref(UT),{$id:"FloorImageCollection"}),h3=u.Object({floorImages:yt(u.Record(ke,u.Ref(DT),{additionalProperties:!1}))},{$id:"FloorImagesExtensionSchema"}),g3=/^floorImages\/(.*)\.geojson$/,qT={name:"ext:floor-images",schema:h3,intoBundle:o(function*(e){if(e.floorImages!=null)for(let t of Ee(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(g3))==null?void 0:i[1];if(n)return{floorImages:{[n]:r(t)}}},"fromBundle"),references:[mh,CT,MT,LT,UT,DT],integrityCheck:RT};c();c();var KT=o(e=>{if(e.kinds==null)return B(!0);let t=vt(e);for(let[r,n]of _e(e.kinds))if(n!=null)for(let i of Ee(n)){let s=t(r,i);if(s.isErr())return s}return B(!0)},"validateKinds");var{values:ghe,schema:I3,record:Ihe}=lr(["room","hallway","wall","desk","poi","area","window"],{$id:"Kind"}),zT=I3;var GT=yt(u.Record(Bt,u.Ref(zT),{additionalProperties:!1,$id:"GeometryKinds"})),x3=u.Object({kinds:yt(u.Record(ke,u.Ref(GT),{additionalProperties:!1}))},{$id:"KindsExtensionSchema"}),b3=/^kinds\/(.*)\.json$/,BT={name:"ext:kinds",schema:x3,intoBundle:o(function*(e){if(e.kinds!=null)for(let t of Ee(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(b3))==null?void 0:i[1];if(n)return{kinds:{[n]:r(t)}}},"fromBundle"),references:[zT,GT],integrityCheck:KT};c();c();c();var fu;(function(e){e.UnknownNeighbor="UnknownNeighbor"})(fu||(fu={}));var VT=o(e=>{if(e.nodes==null)return B(!0);let t=vt(e),r=ua(e);for(let[n,i]of _e(e.nodes)){if(i==null)continue;let s=new Set(i.features.map(a=>a.properties.id));for(let[a,f]of i.features.entries()){for(let p of f.properties.geometryIds){let d=t(n,p);if(d.isErr())return d}for(let[p,d]of f.properties.neighbors.entries()){if(!s.has(d.id))return W({kind:fu.UnknownNeighbor,properties:{floorId:n,nodeId:f.properties.id,neighborId:d.id}});let l=ts(d.flags,r,'nodes["'.concat(n,'"].features[').concat(a,"].properties.neighbors[").concat(p,"]"));if(l.isErr())return l}}}return B(!0)},"validateNodes");var yh=ct("n","NodeId"),WT=u.Intersect([u.Object({id:u.Ref(yh,{description:"The unique identifier for the node."}),extraCost:u.Number({minimum:0,description:"The extra cost to traverse to the node, above the straight-line distance."})}),lh],{$id:"NodeNeighbor"}),HT=u.Intersect([u.Object({id:u.Ref(yh,{description:"The unique identifier for the node."}),neighbors:u.Array(u.Ref(WT),{description:"The neighbors of the node."})}),lf],{$id:"NodeProperties"}),ZT=Ct(u.Ref(Vt),HT,{$id:"NodeFeature"}),JT=rr(u.Ref(ZT),{$id:"NodeCollection"}),$3=u.Object({nodes:yt(u.Record(ke,u.Ref(JT),{additionalProperties:!1}))},{$id:"NodesExtensionSchema"}),w3=/^nodes\/(.*)\.json$/,YT={name:"ext:nodes",schema:$3,intoBundle:o(function*(e){if(e.nodes!=null)for(let t of Ee(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(w3))==null?void 0:i[1];if(n)return{nodes:{[n]:r(t)}}},"fromBundle"),references:[yh,WT,HT,ZT,JT],integrityCheck:VT};c();c();c();var uu;(function(e){e.FloorInFloorStackError="FloorInFloorStackError"})(uu||(uu={}));var XT=o(e=>{if(e.outdoors==null)return B(!0);let t=zn(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:uu.FloorInFloorStackError,properties:{floorId:r,floorStackId:i.id}})}}return B(!0)},"validateOutdoors");var e1=u.Object({floors:u.Array(u.Ref(ke),{uniqueItems:!0,description:"A list of floor IDs that should be considered to contain outdoor features."})},{$id:"Outdoors"}),P3=u.Object({outdoors:u.Ref(e1)},{$id:"OutdoorsExtensionSchema"}),QT="outdoors.json",t1={name:"ext:outdoors",schema:P3,intoBundle:o(function*(e){e.outdoors!=null&&(yield{path:QT,contents:e.outdoors})},"intoBundle"),fromBundle:o((e,t,r)=>{if(e===QT)return{outdoors:r(t)}},"fromBundle"),references:[e1],integrityCheck:XT};c();c();c();var pu;(function(e){e.TilesetDuplicateKeyError="TilesetDuplicateKeyError"})(pu||(pu={}));var r1=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:pu.TilesetDuplicateKeyError,properties:{key:r.key}});t.add(r.key)}return B(!0)},"validateTilesets");var hh=u.Object({key:u.String({minLength:1,description:"Unique identifier for the tileset style."}),name:u.String({minLength:1,description:"Display name of the tileset style."}),url:u.String({format:"uri",description:"URL of the tileset style."})},{$id:"TilesetStyle",description:"A tileset style definition."}),n1=u.Object({default:u.Ref(hh,{description:"The default tileset style, which should be used."}),others:u.Optional(u.Array(u.Ref(hh,{description:"Additional tileset styles that can be used."})))},{$id:"TilesetCollection"}),O3=u.Object({tileset:u.Ref(n1)},{$id:"TilesetExtensionSchema"}),o1={name:"ext:mvf-tileset",schema:O3,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:[hh,n1],integrityCheck:r1};c();var i1=u.Object({},{$id:"WalkableProperties"}),s1=u.Object({},{$id:"NonWalkableProperties"}),a1=yt(u.Record(Bt,u.Ref(i1),{$id:"WalkableGeometries",additionalProperties:!1})),c1=yt(u.Record(Bt,u.Ref(s1),{$id:"NonWalkableGeometries",additionalProperties:!1})),F3=u.Object({walkable:yt(u.Record(ke,u.Ref(a1),{additionalProperties:!1})),nonwalkable:yt(u.Record(ke,u.Ref(c1),{additionalProperties:!1}))},{$id:"TraversabilitySchema"}),S3=/^walkable\/(.*)\.json$/,E3=/^nonwalkable\/(.*)\.json$/,f1={name:"ext:mvf-traversability",schema:F3,intoBundle:o(function*(e){if(e.walkable!=null)for(let t of Ee(e.walkable))yield{path:"walkable/".concat(t,".json"),contents:e.walkable[t]};if(e.nonwalkable!=null)for(let t of Ee(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(S3))==null?void 0:s[1];if(n!=null)return{walkable:{[n]:r(t)}};let i=(a=e.match(E3))==null?void 0:a[1];if(i!=null)return{nonwalkable:{[i]:r(t)}}},"fromBundle"),references:[i1,s1,a1,c1]};c();c();function u1(e){return e.replace(/^g_/,"s_")}o(u1,"toSpaceId");function T3(e){return e.replace(/^g_/,"o_")}o(T3,"toObstructionId");function v3(e){return e.replace(/^g_/,"w_")}o(v3,"toWindowId");function A3(e){return e.replace(/^g_/,"ar_")}o(A3,"convertAreaId");function j3(e,t,r){switch(e.geometry.type){case"MultiPoint":case"MultiLineString":case"MultiPolygon":{let n=[],i=0,s=e.geometry.type.replace("Multi","");for(let a of e.geometry.coordinates)n.push(Y(S({},e),{geometry:{type:s,coordinates:a},properties:Y(S({},e.properties),{id:"".concat(t,"-").concat(i++),kind:r})}));return n}default:return[Y(S({},e),{properties:Y(S({},e.properties),{id:t,kind:r})})]}}o(j3,"splitMultiPartGeometryFeatureWithNewId");function la(e,t,r,n){let i=new Map;for(let{feature:s,floorId:a}of e){let f=s.properties.id,p=n.get(f);if(t.has(f)){let d=j3(s,r(f),p),l=d.map(g=>g.properties.id),m=l.map(g=>({geometryId:g,floorId:a}));i.set(f,{ids:l,features:d,anchors:m})}}return i}o(la,"mapGeometryToOtherIds");function p1(e){var p,d,l;let t={space:new Map,obstruction:new Map,area:new Map,window:new Map};if(!e.geometry)return t;let r=new Map(Object.values((p=e.kinds)!=null?p:{}).filter(m=>m!==void 0).flatMap(_e)),n=_e(e.geometry).flatMap(([m,g])=>{var b;return((b=g==null?void 0:g.features)!=null?b:[]).map(P=>({feature:P,floorId:m}))}).flat(),i=new Set(Object.values((d=e.walkable)!=null?d:{}).filter(m=>m!==void 0).flatMap(Ee)),s=new Set(Object.values((l=e.nonwalkable)!=null?l:{}).filter(m=>m!==void 0).flatMap(Ee)),a=new Set(Array.from(r.entries()).filter(([m,g])=>g==="area").map(([m])=>m)),f=new Set(Array.from(r.entries()).filter(([m,g])=>g==="window").map(([m])=>m));return i.size>0&&(t.space=la(n,i,u1,r)),s.size>0&&(t.obstruction=la(n,s,T3,r)),a.size>0&&(t.area=la(n,a,A3,r)),f.size>0&&(t.window=la(n,f,v3,r)),i.size===0&&s.size===0&&a.size===0&&(t.space=la(n,new Set(n.map(m=>m.feature.properties.id)),u1,r)),t}o(p1,"createGeometryMaps");function l1(e){let t=k3(e),r=p1(e),n=_3(e);return{geometryMaps:r,nodesByGeometryId:t,geometryFeatureById:n}}o(l1,"buildBuilderOptions");function k3(e){var r,n,i;let t=new Map;for(let s of Object.values((r=e.nodes)!=null?r:{}))for(let a of(n=s==null?void 0:s.features)!=null?n:[])if(a.properties.geometryIds.length>0)for(let f of a.properties.geometryIds){let p=(i=t.get(f))!=null?i:[];p.push(a.properties.id),t.set(f,p)}return t}o(k3,"buildNodesByGeometryId");function _3(e){var r,n;let t=new Map;for(let i of Object.values((r=e.geometry)!=null?r:{}))for(let s of(n=i==null?void 0:i.features)!=null?n:[])t.set(s.properties.id,s);return t}o(_3,"buildGeometryFeatureById");c();function d1(e,t){if(!e.annotations||!e.annotationSymbols||!e.geometry)return{};let r={};for(let[n,i]of _e(e.annotations)){if(!i||i.length===0||!e.geometry[n]||e.geometry[n].features.length===0)continue;let s=new Map(e.geometry[n].features.map(f=>[f.properties.id,f])),a={type:"FeatureCollection",features:[]};for(let f of i){let p=s.get(f.geometryId);if(!p||p.geometry.type!=="Point")continue;let d={id:f.id,externalId:f.externalId,symbolId:f.symbolKey};a.features.push({type:"Feature",geometry:p.geometry,properties:d})}r[n]=a}return{annotation:r}}o(d1,"buildAnnotations");c();function m1(e,{nodesByGeometryId:t}){var a,f,p,d,l,m,g;let r={"connection.json":[],entrance:{}},n=(a=e.navigationFlags)==null?void 0:a[ph.accessible],i=(f=e.navigationFlags)==null?void 0:f[ph.outdoors],s=new Map(Object.values((p=e.geometry)!=null?p:{}).flatMap(b=>{var P;return(P=b==null?void 0:b.features)!=null?P:[]}).map(b=>[b.properties.id,b]));for(let b of(d=e.connections)!=null?d:[]){if(gh(b,s)){let O=N3(b,s,t,i);for(let[N,A]of O)r.entrance[N]||(r.entrance[N]={type:"FeatureCollection",features:[]}),r.entrance[N].features.push(A);continue}let P=n!=null&&b.entrances.every(O=>es(O,n))&&b.exits.every(O=>es(O,n)),F=Array.from(new Set([...b.entrances.map(O=>t.get(O.geometryId)),...b.exits.map(O=>t.get(O.geometryId))].flat().filter(O=>O!=null))),w={id:b.id,externalId:(m=(l=b.details)==null?void 0:l.externalId)!=null?m:"",type:b.type,accessible:P,nodes:F};(g=b.details)!=null&&g.name&&(w.details={name:b.details.name}),b.extra&&(w.extra=b.extra),r["connection.json"].push(w)}return r}o(m1,"buildConnections");function gh(e,t){return e.type==dh.door&&e.entrances.every(r=>{let n=t.get(r.geometryId);return(n==null?void 0:n.geometry.type)==="LineString"})}o(gh,"isLineDoor");function N3(e,t,r,n){var s,a;if(e.type!==dh.door)return[];let i=[];for(let f of e.entrances){let p=t.get(f.geometryId);if((p==null?void 0:p.geometry.type)==="LineString"){let d={type:"Feature",geometry:p.geometry,properties:{id:e.id,externalId:(a=(s=e.details)==null?void 0:s.externalId)!=null?a:"",isExterior:R3(e,n)}},l=e.details;l&&(d.properties.details={name:l.name,description:l.description},l.icon&&(d.properties.details.images=[{url:l.icon,altText:"".concat(l.name," icon")}]));let m=r.get(f.geometryId);m&&m.length>0&&(d.properties.node=m[0]),i.push([f.floorId,d])}}return i}o(N3,"buildEntranceFeaturesFromConnection");function R3(e,t){return e.entrances.some(r=>es(r,t))||e.exits.some(r=>es(r,t))}o(R3,"isExterior");c();function h1(e,{geometryMaps:t,nodesByGeometryId:r}){var N,A,k,R,V,J,D,U,ae,se,M,le,ce,Te,Ie,Ke,ft,xe,xt,bt,Ft,St,ht;if(!e.enterprise)return{};let n={categories:[],locations:[],locationInstances:[],layers:[],venue:{slug:"",name:"",externalId:"",defaultLanguage:{name:"",code:""},languages:[]}},i=(N=e.manifest)==null?void 0:N.features[0];if(i&&(n.venue.defaultFloor=i.properties.defaultFloor,n.venue.tzid=i.properties.tzid,n.venue.name=i.properties.name),e.enterprise.venue){let X=e.enterprise.venue;n.venue=Y(S({},n.venue),{slug:X.slug,name:(A=X.details.name)!=null?A:n.venue.name,externalId:(k=X.details.externalId)!=null?k:"",defaultLanguage:X.defaultLanguage,languages:X.languages,countrycode:X.countrycode,coverImage:X.coverImage,logo:X.logo,icon:X.details.icon,extra:X.extra,mappedinWebUrl:X.mappedinWebUrl,operationHours:X.operationHours,topLocations:X.topLocations})}let s=new Map,a=new Map,f=e.locations,p=e.enterprise.locations;if(f&&p){let X=new Map(f.map(ee=>[ee.id,ee]));for(let ee of p){let Z=X.get(ee.locationId);if(Z){let te=Z.details,I={id:ee.id,name:te.name,externalId:(R=te.externalId)!=null?R:"",type:ee.type,sortOrder:ee.sortOrder,amenity:ee.amenity,description:te.description,extra:Z.extra,links:Z.links,operationHours:Z.openingHours,gallery:ee.gallery,logo:Z.logo,shortName:te.shortName,picture:ee.picture,showFloatingLabelWhenImagePresent:ee.showFloatingLabelWhenImagePresent,showLogo:ee.showLogo,siblingGroups:ee.siblingGroups,states:ee.states,tags:ee.tags,spaces:[],nodes:[],polygons:[]};Z.phone&&(I.phone={number:Z.phone});let _=y1(Z.social);Z.website&&(_.website=Z.website.url),I.social=_;for(let $ of Z.geometryAnchors){let K=t.space.get($.geometryId);if(K){let q=new Set(K.features.filter(ie=>ie.geometry.type==="Polygon").map(ie=>ie.properties.id));for(let ie of K.anchors)I.spaces.push({floor:ie.floorId,id:ie.geometryId}),q.has(ie.geometryId)&&I.polygons.push({map:ie.floorId,id:ie.geometryId})}let L=r.get($.geometryId);for(let q of L!=null?L:[])I.nodes.push({map:$.floorId,id:q})}n.locations.push(I);for(let $ of Z.categories)s.set($,[...(V=s.get($))!=null?V:[],ee.id]);a.set(ee.id,Z.categories)}}}let d=e.enterprise.locationInstances,l=e.locationInstances;if(d&&l){let X=new Map(l.map(Z=>[Z.id,Z])),ee=[];for(let Z of d){let te=X.get(Z.locationInstanceId);if(te){let I={id:Z.id,parent:Z.parentId,name:(J=te.details)==null?void 0:J.name,externalId:(D=te.details)==null?void 0:D.externalId,type:Z.type,sortOrder:Z.sortOrder,amenity:Z.amenity,description:(U=te.details)==null?void 0:U.description,extra:te.extra,links:te.links,operationHours:te.openingHours,gallery:Z.gallery,picture:Z.picture,showFloatingLabelWhenImagePresent:Z.showFloatingLabelWhenImagePresent,showLogo:Z.showLogo,siblingGroups:Z.siblingGroups,states:Z.states,tags:Z.tags,logo:te.logo,shortName:(ae=te.details)==null?void 0:ae.shortName};te.phone&&(I.phone={number:te.phone});let _=y1((se=te.social)!=null?se:[]);if(te.website&&(_.website=te.website.url),Object.keys(_).length>0&&(I.social=_),(M=te.geometryAnchors)!=null&&M.length){let $=te.geometryAnchors.flatMap(K=>{var L,q;return(q=(L=t.space.get(K.geometryId))==null?void 0:L.anchors)!=null?q:[]});$.length>0&&(I.spaces=$.map(K=>({floor:K.floorId,id:K.geometryId})))}if(te.geometryAnchors){I.spaces=[],I.polygons=[],I.nodes=[];for(let $ of te.geometryAnchors){let K=t.space.get($.geometryId);if(K){let q=new Set(K.features.filter(ie=>ie.geometry.type==="Polygon").map(ie=>ie.properties.id));for(let ie of K.anchors)I.spaces.push({floor:ie.floorId,id:ie.geometryId}),q.has(ie.geometryId)&&I.polygons.push({map:ie.floorId,id:ie.geometryId})}let L=r.get($.geometryId);for(let q of L!=null?L:[])I.nodes.push({map:$.floorId,id:q})}}ee.push(I)}}ee.length>0&&(n.locationInstances=ee)}let m=e.locationCategories,g=e.enterprise.categories;if(m&&g){let X=[],ee=new Map(m.map(_=>[_.id,_])),Z=new Map(g.map(_=>[_.categoryId,_.id])),te=new Map;for(let _ of m){let $=Z.get(_.parent);if($){let K=(le=te.get($))!=null?le:[];K.push(_.id),te.set($,K)}}for(let _ of g){let $=ee.get(_.categoryId);if($){let L=((ce=te.get(_.id))!=null?ce:[]).map(ie=>Z.get(ie)).filter(ie=>ie!==void 0),q={id:_.id,name:$.details.name,externalId:(Te=$.details.externalId)!=null?Te:"",sortOrder:_.sortOrder,children:L,locations:(Ie=s.get(_.categoryId))!=null?Ie:[],icon:$.details.icon,picture:_.picture,color:_.color,extra:$.extra,iconFromDefaultList:_.iconFromDefaultList};X.push(q)}}n.categories=X;let I={};for(let[_,$]of a.entries())I[_]=$.map(K=>Z.get(K)).filter(K=>K!==void 0);n.categoryPriorities=I}let b={};for(let[X,ee]of Object.entries((Ke=e.defaultStyle)!=null?Ke:{}))if(ee.buffer>0){let Z=ee.geometryAnchors.flatMap(te=>{var I,_;return(_=(I=t.space.get(te.geometryId))==null?void 0:I.anchors)!=null?_:[]});b[X]={edgeOffset:ee.buffer,geometryAnchors:Z}}Object.keys(b).length>0&&(n.enterpriseStyles=b);let P=new Map;for(let X of Object.values((ft=e.enterprise.layers)!=null?ft:{}))if(X)for(let[ee,Z]of _e(X)){if(typeof Z!="string")continue;let te=(xe=P.get(Z))!=null?xe:{name:Z,id:"ely_".concat(Z),spaces:[]};te.spaces.push(...(bt=(xt=t.space.get(ee))==null?void 0:xt.anchors.map(I=>({floorId:I.floorId,spaceId:I.geometryId})))!=null?bt:[]),P.set(Z,te)}P.size>0&&(n.layers=Array.from(P.values()));let F=[];for(let X of Object.values((Ft=e.enterprise.textures)!=null?Ft:{}))for(let ee of X){let Z=(St=t.space.get(ee.geometryId))==null?void 0:St.anchors;!Z||Z.length<1||ee.face==="unknown"||ee.surface==="unknown"||F.push({repeat:ee.repeat,offset:ee.offset,rotation:ee.rotation,path:ee.path,face:ee.face,surface:ee.surface,bounds:ee.bounds,geometryAnchors:Z})}F.length>0&&(n.textures=F);let w={};for(let[X,ee]of Object.entries((ht=e.enterprise.floorText)!=null?ht:{})){let Z={type:"FeatureCollection",features:[]};for(let te of ee.features){if(te.properties.align==="unknown")continue;let I={align:te.properties.align,color:te.properties.color,fontFamily:te.properties.fontFamily,fontSize:te.properties.fontSize,rotation:te.properties.rotation,text:te.properties.text,visible:te.properties.visible};"geometryId"in te.properties?I.geometryId=te.properties.geometryId:I.verticalOffset=te.properties.verticalOffset,Z.features.push({type:"Feature",geometry:te.geometry,properties:I})}Z.features.length>0&&(w[X]=Z)}Object.keys(w).length>0&&(n.floorText=w);let O={enterprise:n};if(e.enterprise.textAreas){let X={};for(let[ee,Z]of _e(e.enterprise.textAreas)){let te={type:"FeatureCollection",features:[]};for(let I of Z.features){if(I.properties.align==="unknown")continue;let _={align:I.properties.align,maxWidth:I.properties.maxWidth,maxHeight:I.properties.maxHeight,rotation:I.properties.rotation};"geometryId"in I.properties?_.anchorId=I.properties.geometryId:_.verticalOffset=I.properties.verticalOffset;let $={type:"Feature",geometry:I.geometry,properties:_};te.features.push($)}X[ee]=te}O.textAreas=X}return O}o(h1,"buildEnterprise");var C3=["facebook","instagram","twitter"];function y1(e){let t={};for(let{name:r,url:n}of e){let i=r.toLowerCase();C3.includes(i)&&(t[i]=n)}return t}o(y1,"convertSocials");c();function g1(e,{geometryMaps:t}){if(!e.facade)return{};let r={},n={};for(let[i,s]of _e(e.facade))s&&(n[i]={id:s.id,spaces:s.geometryAnchors.flatMap(({floorId:a,geometryId:f})=>{var p;return(p=t.space.get(f))==null?void 0:p.ids.map(d=>({floorId:a,spaceId:d}))}).filter(a=>a!==void 0)});return Object.keys(n).length>0&&(r.facade=n),r}o(g1,"buildFacade");c();function I1(e,t={}){var i,s,a,f,p,d,l,m,g,b,P,F;let r={type:"FeatureCollection",features:[]},n=[];for(let w of e.floors.features)n.push({id:w.properties.id.replace(/^f_/,"m_"),externalId:(s=(i=w.properties.details)==null?void 0:i.externalId)!=null?s:"",elevation:w.properties.elevation,name:(f=(a=w.properties.details)==null?void 0:a.name)!=null?f:"",shortName:(d=(p=w.properties.details)==null?void 0:p.shortName)!=null?d:"",subtitle:w.properties.subtitle}),r.features.push({type:"Feature",geometry:w.geometry,properties:{id:w.properties.id,externalId:(m=(l=w.properties.details)==null?void 0:l.externalId)!=null?m:"",elevation:w.properties.elevation,name:(b=(g=w.properties.details)==null?void 0:g.name)!=null?b:"",shortName:(F=(P=w.properties.details)==null?void 0:P.shortName)!=null?F:"",subtitle:w.properties.subtitle}});return{"floor.geojson":r,"map.geojson":n}}o(I1,"buildFloors");c();function x1(e,{geometryMaps:t}){var i,s,f,p,d;let r={},n={};for(let[l,m]of _e((i=e.floorImages)!=null?i:{})){let g={features:[],type:"FeatureCollection"};for(let b of(s=m==null?void 0:m.features)!=null?s:[])if("verticalOffset"in b.properties)g.features.push(b);else{let a=b.properties,{geometryId:P}=a,F=Yo(a,["geometryId"]),w=(d=(f=t.space.get(P))==null?void 0:f.ids[0])!=null?d:(p=t.obstruction.get(P))==null?void 0:p.ids[0];if(!w)continue;let O={geometry:b.geometry,properties:Y(S({},F),{anchorId:w}),type:b.type};g.features.push(O)}n[l]=g}return Object.keys(n).length>0&&(r.floorImages=n),r}o(x1,"buildFloorImages");c();function b1(e,t={}){var i,s,a,f,p,d,l;let r=[];for(let m of(i=e==null?void 0:e.floorStacks)!=null?i:[]){let g={id:m.id,floors:m.floors,maps:m.floors,externalId:(a=(s=m.details)==null?void 0:s.externalId)!=null?a:"",name:(p=(f=m.details)==null?void 0:f.name)!=null?p:"",shortName:(l=(d=m.details)==null?void 0:d.shortName)!=null?l:"",type:"Building"};m.defaultFloor&&(g.defaultFloor=m.defaultFloor),r.push(g)}if(e.outdoors){let m={id:"outdoors",floors:e.outdoors.floors,maps:e.outdoors.floors,type:"Outdoor",name:"Outdoors",externalId:"outdoors"};r.push(m)}return{"floorstack.json":r,"mapstack.geojson":r}}o(b1,"buildFloorStacks");c();c();var O1=mu(P1(),1);var q3=o(e=>{let t=e.geometry.coordinates[0],r=0;for(let n=0;n<t.length-1;n++)r+=t[n][0]*t[n+1][1]-t[n+1][0]*t[n][1];return Math.abs(r/2)},"calculateArea"),K3=o((e,t)=>{let[r,n]=e,i=t.geometry.coordinates[0],s=!1;for(let a=0,f=i.length-1;a<i.length;f=a++){let[p,d]=i[a],[l,m]=i[f];d>n!=m>n&&r<(l-p)*(n-d)/(m-d)+p&&(s=!s)}return s},"pointInPolygon"),z3=o(e=>{let t=e.geometry.coordinates[0],r=0,n=0;for(let i=0;i<t.length-1;i++)r+=t[i][0],n+=t[i][1];return{geometry:{coordinates:[r/(t.length-1),n/(t.length-1)]}}},"calculateCenterOfMass"),G3=o(e=>{let t=q3(e),r=Number.isFinite(t)?Math.max(t,1):1;return Math.sqrt(r)*1e-6},"estimatePrecision"),du=o(e=>{try{let r=z3(e).geometry.coordinates;if(!K3(r,e)){let i=(0,O1.default)(e.geometry.coordinates,G3(e));return B([i[0],i[1]])}return B(r)}catch(t){return W(new Error("Unable to calculate center of polygon"))}},"labelCenter");function $h(e){var t;return((t=e==null?void 0:e.geometry)==null?void 0:t.type)==="Polygon"}o($h,"isPolygonFeature");function F1(e,{geometryMaps:t,nodesByGeometryId:r}){var d,l,m,g,b,P,F,w,O;let n=Z3(e.defaultStyle),i={},s={},a={},f={};for(let N of Ee(e.geometry)){let A=e.geometry[N];if(!A)continue;let k=[],R=[],V=[],J=[];for(let D of A.features){let U=D.properties.id,ae=n.has(U),se=(d=r.get(U))!=null?d:[];for(let M of(m=(l=t.space.get(U))==null?void 0:l.features)!=null?m:[])k.push(B3(M,se));for(let M of(b=(g=t.obstruction.get(U))==null?void 0:g.features)!=null?b:[])R.push(V3(M,ae));for(let M of(F=(P=t.area.get(U))==null?void 0:P.features)!=null?F:[])V.push(W3(M,se));for(let M of(O=(w=t.window.get(U))==null?void 0:w.features)!=null?O:[])J.push(H3(M))}k.length>0&&(i[N]={type:"FeatureCollection",features:k.filter(D=>D!==null)}),R.length>0&&(s[N]={type:"FeatureCollection",features:R.filter(D=>D!==null)}),V.length>0&&(a[N]={type:"FeatureCollection",features:V.filter(D=>D!==null)}),J.length>0&&(f[N]={type:"FeatureCollection",features:J.filter(D=>D!==null)})}let p={space:i,obstruction:s};return Object.keys(a).length>0&&(p.area=a),Object.keys(f).length>0&&(p.window=f),p}o(F1,"buildGeometry");function B3(e,t){var n,i;switch(e.geometry.type){case"MultiPoint":case"MultiLineString":case"MultiPolygon":return null}let r={type:"Feature",geometry:e.geometry,properties:{destinationNodes:t,id:e.properties.id,externalId:(i=(n=e.properties.details)==null?void 0:n.externalId)!=null?i:"",kind:e.properties.kind}};return e.properties.details&&(r.properties.details={name:e.properties.details.name,description:e.properties.details.description,images:e.properties.details.icon?[{url:e.properties.details.icon,altText:e.properties.details.name?"".concat(e.properties.details.name," icon"):"icon"}]:void 0}),$h(r)&&(r.properties.center=du(r).unwrapOr(void 0)),r}o(B3,"buildSpace");function V3(e,t){var i,s;switch(e.geometry.type){case"MultiPoint":case"MultiLineString":case"MultiPolygon":case"Point":return null}let r=e.properties,n={type:"Feature",geometry:e.geometry,properties:{id:r.id,externalId:(s=(i=r.details)==null?void 0:i.externalId)!=null?s:"",entrances:[],kind:r.kind,footprintComponent:t}};return $h(n)&&(n.properties.center=du(n).unwrapOr(void 0)),r.details&&(n.properties.details={name:r.details.name,description:r.details.description,images:r.details.icon?[{url:r.details.icon,altText:r.details.name?"".concat(r.details.name," icon"):"icon"}]:void 0}),n}o(V3,"buildObstruction");function W3(e,t){var i,s;if(e.geometry.type!=="Polygon")return null;let r=e.properties,n={type:"Feature",geometry:e.geometry,properties:{id:r.id,externalId:(s=(i=r.details)==null?void 0:i.externalId)!=null?s:"",destinationNodes:t}};return $h(n)&&(n.properties.center=du(n).unwrapOr(void 0)),r.details&&(n.properties.details={name:r.details.name,description:r.details.description,images:r.details.icon?[{url:r.details.icon,altText:r.details.name?"".concat(r.details.name," icon"):"icon"}]:void 0}),n}o(W3,"buildArea");function H3(e){return e.geometry.type!=="LineString"?null:{type:"Feature",geometry:e.geometry,properties:{id:e.properties.id}}}o(H3,"buildWindow");function Z3(e){var n,i,s,a;let t=[...(i=(n=e==null?void 0:e.ExteriorWalls)==null?void 0:n.geometryAnchors)!=null?i:[],...(a=(s=e==null?void 0:e.Walls)==null?void 0:s.geometryAnchors)!=null?a:[]];return new Set(t.map(f=>f.geometryId))}o(Z3,"calculateFootprintGeometry");c();function S1(e,{geometryMaps:t,geometryFeatureById:r}){var i,s,a,f,p,d,l,m,g,b,P,F,w;if(!e.locationCategories&&!e.locations)return{};let n={};if((i=e.locationCategories)!=null&&i.length){let O=[];for(let N of e.locationCategories){let A={id:N.id,name:N.details.name,icon:(s=N.details.icon)!=null?s:""};N.parent&&(A.parent=N.parent),O.push(A)}n["category.json"]=O}if((a=e.locations)!=null&&a.length){let O=J3(e,{geometryFeatureById:r}),N=[];for(let A of e.locations){let k={id:A.id,name:A.details.name,categories:A.categories,spaces:[],obstructions:[],areas:[],annotations:[],connections:[],entrances:[],links:A.links,openingHoursSpecification:(f=A.openingHours)!=null?f:[],pictures:A.images,social:A.social,description:A.details.description,externalId:A.details.externalId,icon:A.details.icon,logo:A.logo,phone:A.phone,website:A.website};N.push(k);for(let{geometryId:R,floorId:V}of A.geometryAnchors)k.spaces.push(...(d=(p=t.space.get(R))==null?void 0:p.ids.map(J=>({id:J,floor:V})))!=null?d:[]),k.obstructions.push(...(m=(l=t.obstruction.get(R))==null?void 0:l.ids.map(J=>({id:J,floor:V})))!=null?m:[]),k.areas.push(...(b=(g=t.area.get(R))==null?void 0:g.ids.map(J=>({id:J,floor:V})))!=null?b:[]),k.entrances.push(...(P=O.entrancesByGeometryId.get(R))!=null?P:[]),k.connections.push(...(F=O.connectionsByGeometryId.get(R))!=null?F:[]),k.annotations.push(...(w=O.annotationsByGeometryId.get(R))!=null?w:[])}n["location.json"]=N}return n}o(S1,"buildLocations");function J3(e,{geometryFeatureById:t}){var n,i,s;let r={annotationsByGeometryId:new Map,connectionsByGeometryId:new Map,entrancesByGeometryId:new Map};if(e.annotations)for(let[a,f]of _e(e.annotations))for(let p of f!=null?f:[]){let d=p.geometryId,l=p.id,m=(n=r.annotationsByGeometryId.get(d))!=null?n:[];m.push({floor:a,id:l}),r.annotationsByGeometryId.set(d,m)}if(e.connections)for(let a of e.connections){let f=gh(a,t),p=Array.from(new Map([...a.entrances,...a.exits].map(d=>["".concat(d.geometryId,"_").concat(d.floorId),d])).values());for(let d of p){let l=d.geometryId;if(f){let m=(i=r.entrancesByGeometryId.get(l))!=null?i:[];m.push({floor:d.floorId,id:a.id}),r.entrancesByGeometryId.set(l,m)}else{let m=(s=r.connectionsByGeometryId.get(l))!=null?s:[];m.push(a.id),r.connectionsByGeometryId.set(l,m)}}}return r}o(J3,"buildLocationAttachmentMaps");c();function E1(e,t){let r={features:[],type:"FeatureCollection"},n={"manifest.geojson":r},i=e.manifest;if(i.features.length>0){let s=i.features[0],a=s.properties,f={type:"Feature",geometry:s.geometry,properties:{folder_struct:[],version:"2.0.0",time:a.time,name:a.name,naturalBearing:a.naturalBearing,tzid:a.tzid,map:a.mapId,org_id:a.orgId,language:a.language}};r.features.push(f)}return n}o(E1,"buildManifest");c();function T1(e,{geometryMaps:t}){var f,p,d,l,m,g,b,P,F,w,O,N,A,k,R;let r={"node.geojson":{type:"FeatureCollection",features:[]}},n=r["node.geojson"].features,i=new Map;for(let V of(p=(f=e.floors)==null?void 0:f.features)!=null?p:[])i.set(V.properties.id,V.properties.elevation);let s=new Map;for(let V of Object.values((d=e.nodes)!=null?d:{}))for(let J of(l=V==null?void 0:V.features)!=null?l:[])for(let D of J.properties.geometryIds)s.set(D,[...(m=s.get(D))!=null?m:[],J.properties.id]);let a=new Map;for(let V of(g=e.connections)!=null?g:[]){let J=V.exits.map(D=>{var U;return Y(S({},D),{nodes:(U=s.get(D.geometryId))!=null?U:[]})});for(let D of V.entrances){let U=(b=s.get(D.geometryId))!=null?b:[];for(let ae of U)for(let se of J){let M=Math.abs(((P=i.get(D.floorId))!=null?P:0)-((F=i.get(se.floorId))!=null?F:0))*V.floorCostMultiplier,le=(w=a.get(ae))!=null?w:[];le.push(...se.nodes.map(ce=>({id:ce,weight:M+V.entryCost}))),a.set(ae,le)}}}for(let[V,J]of _e((O=e.nodes)!=null?O:{}))for(let D of(N=J==null?void 0:J.features)!=null?N:[]){let U=(A=t.space.get(D.properties.geometryIds[0]))==null?void 0:A.features[0],ae=(U==null?void 0:U.geometry.type)==="Point"&&((k=U==null?void 0:U.properties.details)!=null&&k.externalId)?U.properties.details.externalId:"",se={type:"Feature",geometry:D.geometry,properties:{id:D.properties.id,floor:V,space:D.properties.geometryIds.map(M=>{var le;return(le=t.space.get(M))==null?void 0:le.ids}).flat().filter(M=>M!==void 0),neighbors:[...D.properties.neighbors.map(M=>({id:M.id,weight:M.extraCost})),...(R=a.get(D.properties.id))!=null?R:[]],map:V,externalId:ae}};n.push(se)}return r}o(T1,"buildNodes");c();function Y3(e,t){var n;let r={};for(let i of e){let s=t.get(i);s&&((n=r[s])!=null||(r[s]=[]),r[s].push(i))}return r}o(Y3,"groupGeometryByType");function v1(e,{geometryMaps:t}){var a,f,p;if(!e.defaultStyle)return{};let r={},n={};r["styles.json"]=n;let i=[...Array.from(t.space.values()).map(d=>d.features),...Array.from(t.obstruction.values()).map(d=>d.features)],s=new Map(i.flatMap(d=>d.map(l=>[l.properties.id,l.geometry.type])));for(let[d,l]of _e(e.defaultStyle)){let m=Y3(l.geometryAnchors.flatMap(g=>{var b,P,F,w;return[...(P=(b=t.space.get(g.geometryId))==null?void 0:b.ids)!=null?P:[],...(w=(F=t.obstruction.get(g.geometryId))==null?void 0:F.ids)!=null?w:[]]}),s);if(m.Point&&m.Point.length>0){let g={points:Array.from(m.Point.values()),showImage:((a=l.extra)==null?void 0:a.showImage)!==void 0?((f=l.extra)==null?void 0:f.showImage)===!0:l.opacity!==0};n["".concat(d,".Point")]=g}if(m.LineString&&m.LineString.length>0){let g={lineStrings:Array.from(m.LineString.values()),altitude:l.altitude,color:l.color,height:l.height,opacity:l.opacity,width:l.buffer};n["".concat(d,".LineString")]=g}if(m.Polygon&&m.Polygon.length>0){let g={polygons:Array.from(m.Polygon.values()),altitude:l.altitude,color:l.color,height:l.height,opacity:l.opacity};((p=l.extra)==null?void 0:p.showImage)!==void 0&&(g.showImage=l.extra.showImage===!0),n["".concat(d,".Polygon")]=g}}return r}o(v1,"buildStyles");var X3=hE().extendOptional(mT).extendOptional(YT).extendOptional($T).extendOptional(BT).extendOptional(f1).extendOptional(FT).extendOptional(AT).extendOptional(t1).extendOptional(o1).extendOptional(qT).extendOptional(NT).extendOptional(hS).extendOptional(FE).extendOptional(fT).build().expect("Invalid parser, this should never happen. Likely a bug in the MVFv2 library, or one of the extensions.");function Q3(e){let t=l1(e),r=I1(e,t),n=F1(e,t),i=T1(e,t),s=m1(e,t),a=v1(e,t),f=b1(e,t),p=x1(e,t),d=g1(e,t),l=d1(e,t),m=S1(e,t),g=h1(e,t),b=E1(e,t);return S(S(S(S(S(S(Y(S(S(S(S(S(S({},r),n),i),s),a),f),{"tileset.json":e.tileset}),p),d),l),m),g),b)}o(Q3,"convertUnzippedStandardMVFv3ToParsedMVFv2");async function e4(e){let t=await X3.decompress(e);return t.isOk()?B(Q3(t.value)):W(t.error)}o(e4,"extractAndConvertMVFv3");var dxe=o(e=>{try{return DP(e)?Sh(e):!1}catch(t){return!1}},"check");export{Aa as AnchoredFloorTextUnknownObstructionError,va as AnchoredFloorTextUnknownSpaceError,ja as AnchoredImageUnknownObstructionError,Ta as AnchoredImageUnknownSpaceError,ba as ConnectionUnknownNodeError,Ba as DuplicateTilesetKeyError,Da as EnterpriseCyclicalCategoryReferenceError,Ua as EnterpriseInconsistentMapError,qa as EnterpriseInvalidTimeZoneError,_a as EnterpriseLayerUnknownSpaceError,Ma as EnterpriseLocationUnknownSpaceError,Na as EnterpriseStyleGeometryAnchorsUnknownSpaceError,Ra as EnterpriseTextureUnknownSpaceError,La as EnterpriseUnknownCategoryError,ns as EnterpriseUnknownLocationError,os as EnterpriseUnknownMapError,za as FacadeUnknownFloorError,Ka as FacadeUnknownFloorStackError,Ga as FacadeUnknownSpaceError,ya as FloorStackUnknownMapError,$t as IntegrityError,Ea as InvalidStyleError,$a as NodeUnknownFloorError,Pa as NodeUnknownNeighborError,wa as NodeUnknownSpaceError,Ia as ObstructionCollectionUnknownMapError,xa as ObstructionUnknownEntranceError,p8 as PUBLIC_HOLIDAYS,ha as SpaceCollectionUnknownMapError,ga as SpaceUnknownNodeError,Fa as StyleUnknownLineStringError,Sa as StyleUnknownPointError,Oa as StyleUnknownPolygonError,Ca as TextAreaUnknownObstructionError,ka as TextAreaUnknownSpaceError,dxe as check,e4 as extractAndConvertMVFv3,CN as getMvfValidationErrors,zN as rawToParsedMVF,DP as validateMvf,Sh as verifyMvfIntegrity};