@mastergo/magic-mcp 0.2.2 → 0.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +149 -143
- package/package.json +3 -2
package/dist/index.js
CHANGED
|
@@ -1,132 +1,120 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
"use strict";var ST=Object.create;var mu=Object.defineProperty;var kT=Object.getOwnPropertyDescriptor;var $T=Object.getOwnPropertyNames;var ET=Object.getPrototypeOf,TT=Object.prototype.hasOwnProperty;var T=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Ta=(t,e)=>{for(var r in e)mu(t,r,{get:e[r],enumerable:!0})},RT=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of $T(e))!TT.call(t,o)&&o!==r&&mu(t,o,{get:()=>e[o],enumerable:!(n=kT(e,o))||n.enumerable});return t};var Ee=(t,e,r)=>(r=t!=null?ST(ET(t)):{},RT(e||!t||!t.__esModule?mu(r,"default",{value:t,enumerable:!0}):r,t));var $s=T(Ue=>{"use strict";Object.defineProperty(Ue,"__esModule",{value:!0});Ue.regexpCode=Ue.getEsmExportName=Ue.getProperty=Ue.safeStringify=Ue.stringify=Ue.strConcat=Ue.addCodeArg=Ue.str=Ue._=Ue.nil=Ue._Code=Ue.Name=Ue.IDENTIFIER=Ue._CodeOrName=void 0;var Ss=class{};Ue._CodeOrName=Ss;Ue.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var bo=class extends Ss{constructor(e){if(super(),!Ue.IDENTIFIER.test(e))throw new Error("CodeGen: name must be a valid identifier");this.str=e}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};Ue.Name=bo;var Er=class extends Ss{constructor(e){super(),this._items=typeof e=="string"?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let e=this._items[0];return e===""||e==='""'}get str(){var e;return(e=this._str)!==null&&e!==void 0?e:this._str=this._items.reduce((r,n)=>`${r}${n}`,"")}get names(){var e;return(e=this._names)!==null&&e!==void 0?e:this._names=this._items.reduce((r,n)=>(n instanceof bo&&(r[n.str]=(r[n.str]||0)+1),r),{})}};Ue._Code=Er;Ue.nil=new Er("");function ob(t,...e){let r=[t[0]],n=0;for(;n<e.length;)Jd(r,e[n]),r.push(t[++n]);return new Er(r)}Ue._=ob;var Kd=new Er("+");function ib(t,...e){let r=[ks(t[0])],n=0;for(;n<e.length;)r.push(Kd),Jd(r,e[n]),r.push(Kd,ks(t[++n]));return Rz(r),new Er(r)}Ue.str=ib;function Jd(t,e){e instanceof Er?t.push(...e._items):e instanceof bo?t.push(e):t.push(Iz(e))}Ue.addCodeArg=Jd;function Rz(t){let e=1;for(;e<t.length-1;){if(t[e]===Kd){let r=Pz(t[e-1],t[e+1]);if(r!==void 0){t.splice(e-1,3,r);continue}t[e++]="+"}e++}}function Pz(t,e){if(e==='""')return t;if(t==='""')return e;if(typeof t=="string")return e instanceof bo||t[t.length-1]!=='"'?void 0:typeof e!="string"?`${t.slice(0,-1)}${e}"`:e[0]==='"'?t.slice(0,-1)+e.slice(1):void 0;if(typeof e=="string"&&e[0]==='"'&&!(t instanceof bo))return`"${t}${e.slice(1)}`}function Az(t,e){return e.emptyStr()?t:t.emptyStr()?e:ib`${t}${e}`}Ue.strConcat=Az;function Iz(t){return typeof t=="number"||typeof t=="boolean"||t===null?t:ks(Array.isArray(t)?t.join(","):t)}function zz(t){return new Er(ks(t))}Ue.stringify=zz;function ks(t){return JSON.stringify(t).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}Ue.safeStringify=ks;function Cz(t){return typeof t=="string"&&Ue.IDENTIFIER.test(t)?new Er(`.${t}`):ob`[${t}]`}Ue.getProperty=Cz;function Oz(t){if(typeof t=="string"&&Ue.IDENTIFIER.test(t))return new Er(`${t}`);throw new Error(`CodeGen: invalid export name: ${t}, use explicit $id name mapping`)}Ue.getEsmExportName=Oz;function Nz(t){return new Er(t.toString())}Ue.regexpCode=Nz});var Qd=T(cr=>{"use strict";Object.defineProperty(cr,"__esModule",{value:!0});cr.ValueScope=cr.ValueScopeName=cr.Scope=cr.varKinds=cr.UsedValueState=void 0;var ar=$s(),Yd=class extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}},Rc;(function(t){t[t.Started=0]="Started",t[t.Completed=1]="Completed"})(Rc||(cr.UsedValueState=Rc={}));cr.varKinds={const:new ar.Name("const"),let:new ar.Name("let"),var:new ar.Name("var")};var Pc=class{constructor({prefixes:e,parent:r}={}){this._names={},this._prefixes=e,this._parent=r}toName(e){return e instanceof ar.Name?e:this.name(e)}name(e){return new ar.Name(this._newName(e))}_newName(e){let r=this._names[e]||this._nameGroup(e);return`${e}${r.index++}`}_nameGroup(e){var r,n;if(!((n=(r=this._parent)===null||r===void 0?void 0:r._prefixes)===null||n===void 0)&&n.has(e)||this._prefixes&&!this._prefixes.has(e))throw new Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}};cr.Scope=Pc;var Ac=class extends ar.Name{constructor(e,r){super(r),this.prefix=e}setValue(e,{property:r,itemIndex:n}){this.value=e,this.scopePath=(0,ar._)`.${new ar.Name(r)}[${n}]`}};cr.ValueScopeName=Ac;var jz=(0,ar._)`\n`,Xd=class extends Pc{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?jz:ar.nil}}get(){return this._scope}name(e){return new Ac(e,this._newName(e))}value(e,r){var n;if(r.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let o=this.toName(e),{prefix:i}=o,s=(n=r.key)!==null&&n!==void 0?n:r.ref,a=this._values[i];if(a){let p=a.get(s);if(p)return p}else a=this._values[i]=new Map;a.set(s,o);let c=this._scope[i]||(this._scope[i]=[]),l=c.length;return c[l]=r.ref,o.setValue(r,{property:i,itemIndex:l}),o}getValue(e,r){let n=this._values[e];if(n)return n.get(r)}scopeRefs(e,r=this._values){return this._reduceValues(r,n=>{if(n.scopePath===void 0)throw new Error(`CodeGen: name "${n}" has no value`);return(0,ar._)`${e}${n.scopePath}`})}scopeCode(e=this._values,r,n){return this._reduceValues(e,o=>{if(o.value===void 0)throw new Error(`CodeGen: name "${o}" has no value`);return o.value.code},r,n)}_reduceValues(e,r,n={},o){let i=ar.nil;for(let s in e){let a=e[s];if(!a)continue;let c=n[s]=n[s]||new Map;a.forEach(l=>{if(c.has(l))return;c.set(l,Rc.Started);let p=r(l);if(p){let d=this.opts.es5?cr.varKinds.var:cr.varKinds.const;i=(0,ar._)`${i}${d} ${l} = ${p};${this.opts._n}`}else if(p=o==null?void 0:o(l))i=(0,ar._)`${i}${p}${this.opts._n}`;else throw new Yd(l);c.set(l,Rc.Completed)})}return i}};cr.ValueScope=Xd});var be=T(_e=>{"use strict";Object.defineProperty(_e,"__esModule",{value:!0});_e.or=_e.and=_e.not=_e.CodeGen=_e.operators=_e.varKinds=_e.ValueScopeName=_e.ValueScope=_e.Scope=_e.Name=_e.regexpCode=_e.stringify=_e.getProperty=_e.nil=_e.strConcat=_e.str=_e._=void 0;var je=$s(),Mr=Qd(),zn=$s();Object.defineProperty(_e,"_",{enumerable:!0,get:function(){return zn._}});Object.defineProperty(_e,"str",{enumerable:!0,get:function(){return zn.str}});Object.defineProperty(_e,"strConcat",{enumerable:!0,get:function(){return zn.strConcat}});Object.defineProperty(_e,"nil",{enumerable:!0,get:function(){return zn.nil}});Object.defineProperty(_e,"getProperty",{enumerable:!0,get:function(){return zn.getProperty}});Object.defineProperty(_e,"stringify",{enumerable:!0,get:function(){return zn.stringify}});Object.defineProperty(_e,"regexpCode",{enumerable:!0,get:function(){return zn.regexpCode}});Object.defineProperty(_e,"Name",{enumerable:!0,get:function(){return zn.Name}});var Oc=Qd();Object.defineProperty(_e,"Scope",{enumerable:!0,get:function(){return Oc.Scope}});Object.defineProperty(_e,"ValueScope",{enumerable:!0,get:function(){return Oc.ValueScope}});Object.defineProperty(_e,"ValueScopeName",{enumerable:!0,get:function(){return Oc.ValueScopeName}});Object.defineProperty(_e,"varKinds",{enumerable:!0,get:function(){return Oc.varKinds}});_e.operators={GT:new je._Code(">"),GTE:new je._Code(">="),LT:new je._Code("<"),LTE:new je._Code("<="),EQ:new je._Code("==="),NEQ:new je._Code("!=="),NOT:new je._Code("!"),OR:new je._Code("||"),AND:new je._Code("&&"),ADD:new je._Code("+")};var gn=class{optimizeNodes(){return this}optimizeNames(e,r){return this}},ef=class extends gn{constructor(e,r,n){super(),this.varKind=e,this.name=r,this.rhs=n}render({es5:e,_n:r}){let n=e?Mr.varKinds.var:this.varKind,o=this.rhs===void 0?"":` = ${this.rhs}`;return`${n} ${this.name}${o};`+r}optimizeNames(e,r){if(e[this.name.str])return this.rhs&&(this.rhs=ci(this.rhs,e,r)),this}get names(){return this.rhs instanceof je._CodeOrName?this.rhs.names:{}}},Ic=class extends gn{constructor(e,r,n){super(),this.lhs=e,this.rhs=r,this.sideEffects=n}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,r){if(!(this.lhs instanceof je.Name&&!e[this.lhs.str]&&!this.sideEffects))return this.rhs=ci(this.rhs,e,r),this}get names(){let e=this.lhs instanceof je.Name?{}:{...this.lhs.names};return Cc(e,this.rhs)}},tf=class extends Ic{constructor(e,r,n,o){super(e,n,o),this.op=r}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}},rf=class extends gn{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}},nf=class extends gn{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}},of=class extends gn{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}},sf=class extends gn{constructor(e){super(),this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,r){return this.code=ci(this.code,e,r),this}get names(){return this.code instanceof je._CodeOrName?this.code.names:{}}},Es=class extends gn{constructor(e=[]){super(),this.nodes=e}render(e){return this.nodes.reduce((r,n)=>r+n.render(e),"")}optimizeNodes(){let{nodes:e}=this,r=e.length;for(;r--;){let n=e[r].optimizeNodes();Array.isArray(n)?e.splice(r,1,...n):n?e[r]=n:e.splice(r,1)}return e.length>0?this:void 0}optimizeNames(e,r){let{nodes:n}=this,o=n.length;for(;o--;){let i=n[o];i.optimizeNames(e,r)||(Lz(e,i.names),n.splice(o,1))}return n.length>0?this:void 0}get names(){return this.nodes.reduce((e,r)=>So(e,r.names),{})}},yn=class extends Es{render(e){return"{"+e._n+super.render(e)+"}"+e._n}},af=class extends Es{},ai=class extends yn{};ai.kind="else";var _o=class t extends yn{constructor(e,r){super(r),this.condition=e}render(e){let r=`if(${this.condition})`+super.render(e);return this.else&&(r+="else "+this.else.render(e)),r}optimizeNodes(){super.optimizeNodes();let e=this.condition;if(e===!0)return this.nodes;let r=this.else;if(r){let n=r.optimizeNodes();r=this.else=Array.isArray(n)?new ai(n):n}if(r)return e===!1?r instanceof t?r:r.nodes:this.nodes.length?this:new t(sb(e),r instanceof t?[r]:r.nodes);if(!(e===!1||!this.nodes.length))return this}optimizeNames(e,r){var n;if(this.else=(n=this.else)===null||n===void 0?void 0:n.optimizeNames(e,r),!!(super.optimizeNames(e,r)||this.else))return this.condition=ci(this.condition,e,r),this}get names(){let e=super.names;return Cc(e,this.condition),this.else&&So(e,this.else.names),e}};_o.kind="if";var wo=class extends yn{};wo.kind="for";var cf=class extends wo{constructor(e){super(),this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,r){if(super.optimizeNames(e,r))return this.iteration=ci(this.iteration,e,r),this}get names(){return So(super.names,this.iteration.names)}},lf=class extends wo{constructor(e,r,n,o){super(),this.varKind=e,this.name=r,this.from=n,this.to=o}render(e){let r=e.es5?Mr.varKinds.var:this.varKind,{name:n,from:o,to:i}=this;return`for(${r} ${n}=${o}; ${n}<${i}; ${n}++)`+super.render(e)}get names(){let e=Cc(super.names,this.from);return Cc(e,this.to)}},zc=class extends wo{constructor(e,r,n,o){super(),this.loop=e,this.varKind=r,this.name=n,this.iterable=o}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,r){if(super.optimizeNames(e,r))return this.iterable=ci(this.iterable,e,r),this}get names(){return So(super.names,this.iterable.names)}},Ts=class extends yn{constructor(e,r,n){super(),this.name=e,this.args=r,this.async=n}render(e){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(e)}};Ts.kind="func";var Rs=class extends Es{render(e){return"return "+super.render(e)}};Rs.kind="return";var uf=class extends yn{render(e){let r="try"+super.render(e);return this.catch&&(r+=this.catch.render(e)),this.finally&&(r+=this.finally.render(e)),r}optimizeNodes(){var e,r;return super.optimizeNodes(),(e=this.catch)===null||e===void 0||e.optimizeNodes(),(r=this.finally)===null||r===void 0||r.optimizeNodes(),this}optimizeNames(e,r){var n,o;return super.optimizeNames(e,r),(n=this.catch)===null||n===void 0||n.optimizeNames(e,r),(o=this.finally)===null||o===void 0||o.optimizeNames(e,r),this}get names(){let e=super.names;return this.catch&&So(e,this.catch.names),this.finally&&So(e,this.finally.names),e}},Ps=class extends yn{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}};Ps.kind="catch";var As=class extends yn{render(e){return"finally"+super.render(e)}};As.kind="finally";var pf=class{constructor(e,r={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...r,_n:r.lines?`
|
|
3
|
-
`:""},this._extScope=e,this._scope=new Mr.Scope({parent:e}),this._nodes=[new af]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,r){let n=this._extScope.value(e,r);return(this._values[n.prefix]||(this._values[n.prefix]=new Set)).add(n),n}getScopeValue(e,r){return this._extScope.getValue(e,r)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,r,n,o){let i=this._scope.toName(r);return n!==void 0&&o&&(this._constants[i.str]=n),this._leafNode(new ef(e,i,n)),i}const(e,r,n){return this._def(Mr.varKinds.const,e,r,n)}let(e,r,n){return this._def(Mr.varKinds.let,e,r,n)}var(e,r,n){return this._def(Mr.varKinds.var,e,r,n)}assign(e,r,n){return this._leafNode(new Ic(e,r,n))}add(e,r){return this._leafNode(new tf(e,_e.operators.ADD,r))}code(e){return typeof e=="function"?e():e!==je.nil&&this._leafNode(new sf(e)),this}object(...e){let r=["{"];for(let[n,o]of e)r.length>1&&r.push(","),r.push(n),(n!==o||this.opts.es5)&&(r.push(":"),(0,je.addCodeArg)(r,o));return r.push("}"),new je._Code(r)}if(e,r,n){if(this._blockNode(new _o(e)),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(e){return this._elseNode(new _o(e))}else(){return this._elseNode(new ai)}endIf(){return this._endBlockNode(_o,ai)}_for(e,r){return this._blockNode(e),r&&this.code(r).endFor(),this}for(e,r){return this._for(new cf(e),r)}forRange(e,r,n,o,i=this.opts.es5?Mr.varKinds.var:Mr.varKinds.let){let s=this._scope.toName(e);return this._for(new lf(i,s,r,n),()=>o(s))}forOf(e,r,n,o=Mr.varKinds.const){let i=this._scope.toName(e);if(this.opts.es5){let s=r instanceof je.Name?r:this.var("_arr",r);return this.forRange("_i",0,(0,je._)`${s}.length`,a=>{this.var(i,(0,je._)`${s}[${a}]`),n(i)})}return this._for(new zc("of",o,i,r),()=>n(i))}forIn(e,r,n,o=this.opts.es5?Mr.varKinds.var:Mr.varKinds.const){if(this.opts.ownProperties)return this.forOf(e,(0,je._)`Object.keys(${r})`,n);let i=this._scope.toName(e);return this._for(new zc("in",o,i,r),()=>n(i))}endFor(){return this._endBlockNode(wo)}label(e){return this._leafNode(new rf(e))}break(e){return this._leafNode(new nf(e))}return(e){let r=new Rs;if(this._blockNode(r),this.code(e),r.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(Rs)}try(e,r,n){if(!r&&!n)throw new Error('CodeGen: "try" without "catch" and "finally"');let o=new uf;if(this._blockNode(o),this.code(e),r){let i=this.name("e");this._currNode=o.catch=new Ps(i),r(i)}return n&&(this._currNode=o.finally=new As,this.code(n)),this._endBlockNode(Ps,As)}throw(e){return this._leafNode(new of(e))}block(e,r){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(r),this}endBlock(e){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||e!==void 0&&n!==e)throw new Error(`CodeGen: wrong number of nodes: ${n} vs ${e} expected`);return this._nodes.length=r,this}func(e,r=je.nil,n,o){return this._blockNode(new Ts(e,r,n)),o&&this.code(o).endFunc(),this}endFunc(){return this._endBlockNode(Ts)}optimize(e=1){for(;e-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,r){let n=this._currNode;if(n instanceof e||r&&n instanceof r)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${r?`${e.kind}/${r.kind}`:e.kind}"`)}_elseNode(e){let r=this._currNode;if(!(r instanceof _o))throw new Error('CodeGen: "else" without "if"');return this._currNode=r.else=e,this}get _root(){return this._nodes[0]}get _currNode(){let e=this._nodes;return e[e.length-1]}set _currNode(e){let r=this._nodes;r[r.length-1]=e}};_e.CodeGen=pf;function So(t,e){for(let r in e)t[r]=(t[r]||0)+(e[r]||0);return t}function Cc(t,e){return e instanceof je._CodeOrName?So(t,e.names):t}function ci(t,e,r){if(t instanceof je.Name)return n(t);if(!o(t))return t;return new je._Code(t._items.reduce((i,s)=>(s instanceof je.Name&&(s=n(s)),s instanceof je._Code?i.push(...s._items):i.push(s),i),[]));function n(i){let s=r[i.str];return s===void 0||e[i.str]!==1?i:(delete e[i.str],s)}function o(i){return i instanceof je._Code&&i._items.some(s=>s instanceof je.Name&&e[s.str]===1&&r[s.str]!==void 0)}}function Lz(t,e){for(let r in e)t[r]=(t[r]||0)-(e[r]||0)}function sb(t){return typeof t=="boolean"||typeof t=="number"||t===null?!t:(0,je._)`!${df(t)}`}_e.not=sb;var Dz=ab(_e.operators.AND);function Mz(...t){return t.reduce(Dz)}_e.and=Mz;var qz=ab(_e.operators.OR);function Fz(...t){return t.reduce(qz)}_e.or=Fz;function ab(t){return(e,r)=>e===je.nil?r:r===je.nil?e:(0,je._)`${df(e)} ${t} ${df(r)}`}function df(t){return t instanceof je.Name?t:(0,je._)`(${t})`}});var De=T(ke=>{"use strict";Object.defineProperty(ke,"__esModule",{value:!0});ke.checkStrictMode=ke.getErrorPath=ke.Type=ke.useFunc=ke.setEvaluated=ke.evaluatedPropsToName=ke.mergeEvaluated=ke.eachItem=ke.unescapeJsonPointer=ke.escapeJsonPointer=ke.escapeFragment=ke.unescapeFragment=ke.schemaRefOrVal=ke.schemaHasRulesButRef=ke.schemaHasRules=ke.checkUnknownRules=ke.alwaysValidSchema=ke.toHash=void 0;var Xe=be(),Uz=$s();function Zz(t){let e={};for(let r of t)e[r]=!0;return e}ke.toHash=Zz;function Bz(t,e){return typeof e=="boolean"?e:Object.keys(e).length===0?!0:(ub(t,e),!pb(e,t.self.RULES.all))}ke.alwaysValidSchema=Bz;function ub(t,e=t.schema){let{opts:r,self:n}=t;if(!r.strictSchema||typeof e=="boolean")return;let o=n.RULES.keywords;for(let i in e)o[i]||mb(t,`unknown keyword: "${i}"`)}ke.checkUnknownRules=ub;function pb(t,e){if(typeof t=="boolean")return!t;for(let r in t)if(e[r])return!0;return!1}ke.schemaHasRules=pb;function Hz(t,e){if(typeof t=="boolean")return!t;for(let r in t)if(r!=="$ref"&&e.all[r])return!0;return!1}ke.schemaHasRulesButRef=Hz;function Vz({topSchemaRef:t,schemaPath:e},r,n,o){if(!o){if(typeof r=="number"||typeof r=="boolean")return r;if(typeof r=="string")return(0,Xe._)`${r}`}return(0,Xe._)`${t}${e}${(0,Xe.getProperty)(n)}`}ke.schemaRefOrVal=Vz;function Gz(t){return db(decodeURIComponent(t))}ke.unescapeFragment=Gz;function Wz(t){return encodeURIComponent(mf(t))}ke.escapeFragment=Wz;function mf(t){return typeof t=="number"?`${t}`:t.replace(/~/g,"~0").replace(/\//g,"~1")}ke.escapeJsonPointer=mf;function db(t){return t.replace(/~1/g,"/").replace(/~0/g,"~")}ke.unescapeJsonPointer=db;function Kz(t,e){if(Array.isArray(t))for(let r of t)e(r);else e(t)}ke.eachItem=Kz;function cb({mergeNames:t,mergeToName:e,mergeValues:r,resultToName:n}){return(o,i,s,a)=>{let c=s===void 0?i:s instanceof Xe.Name?(i instanceof Xe.Name?t(o,i,s):e(o,i,s),s):i instanceof Xe.Name?(e(o,s,i),i):r(i,s);return a===Xe.Name&&!(c instanceof Xe.Name)?n(o,c):c}}ke.mergeEvaluated={props:cb({mergeNames:(t,e,r)=>t.if((0,Xe._)`${r} !== true && ${e} !== undefined`,()=>{t.if((0,Xe._)`${e} === true`,()=>t.assign(r,!0),()=>t.assign(r,(0,Xe._)`${r} || {}`).code((0,Xe._)`Object.assign(${r}, ${e})`))}),mergeToName:(t,e,r)=>t.if((0,Xe._)`${r} !== true`,()=>{e===!0?t.assign(r,!0):(t.assign(r,(0,Xe._)`${r} || {}`),hf(t,r,e))}),mergeValues:(t,e)=>t===!0?!0:{...t,...e},resultToName:fb}),items:cb({mergeNames:(t,e,r)=>t.if((0,Xe._)`${r} !== true && ${e} !== undefined`,()=>t.assign(r,(0,Xe._)`${e} === true ? true : ${r} > ${e} ? ${r} : ${e}`)),mergeToName:(t,e,r)=>t.if((0,Xe._)`${r} !== true`,()=>t.assign(r,e===!0?!0:(0,Xe._)`${r} > ${e} ? ${r} : ${e}`)),mergeValues:(t,e)=>t===!0?!0:Math.max(t,e),resultToName:(t,e)=>t.var("items",e)})};function fb(t,e){if(e===!0)return t.var("props",!0);let r=t.var("props",(0,Xe._)`{}`);return e!==void 0&&hf(t,r,e),r}ke.evaluatedPropsToName=fb;function hf(t,e,r){Object.keys(r).forEach(n=>t.assign((0,Xe._)`${e}${(0,Xe.getProperty)(n)}`,!0))}ke.setEvaluated=hf;var lb={};function Jz(t,e){return t.scopeValue("func",{ref:e,code:lb[e.code]||(lb[e.code]=new Uz._Code(e.code))})}ke.useFunc=Jz;var ff;(function(t){t[t.Num=0]="Num",t[t.Str=1]="Str"})(ff||(ke.Type=ff={}));function Yz(t,e,r){if(t instanceof Xe.Name){let n=e===ff.Num;return r?n?(0,Xe._)`"[" + ${t} + "]"`:(0,Xe._)`"['" + ${t} + "']"`:n?(0,Xe._)`"/" + ${t}`:(0,Xe._)`"/" + ${t}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,Xe.getProperty)(t).toString():"/"+mf(t)}ke.getErrorPath=Yz;function mb(t,e,r=t.opts.strictSchema){if(r){if(e=`strict mode: ${e}`,r===!0)throw new Error(e);t.self.logger.warn(e)}}ke.checkStrictMode=mb});var xn=T(gf=>{"use strict";Object.defineProperty(gf,"__esModule",{value:!0});var Vt=be(),Xz={data:new Vt.Name("data"),valCxt:new Vt.Name("valCxt"),instancePath:new Vt.Name("instancePath"),parentData:new Vt.Name("parentData"),parentDataProperty:new Vt.Name("parentDataProperty"),rootData:new Vt.Name("rootData"),dynamicAnchors:new Vt.Name("dynamicAnchors"),vErrors:new Vt.Name("vErrors"),errors:new Vt.Name("errors"),this:new Vt.Name("this"),self:new Vt.Name("self"),scope:new Vt.Name("scope"),json:new Vt.Name("json"),jsonPos:new Vt.Name("jsonPos"),jsonLen:new Vt.Name("jsonLen"),jsonPart:new Vt.Name("jsonPart")};gf.default=Xz});var Is=T(Gt=>{"use strict";Object.defineProperty(Gt,"__esModule",{value:!0});Gt.extendErrors=Gt.resetErrorsCount=Gt.reportExtraError=Gt.reportError=Gt.keyword$DataError=Gt.keywordError=void 0;var Me=be(),Nc=De(),er=xn();Gt.keywordError={message:({keyword:t})=>(0,Me.str)`must pass "${t}" keyword validation`};Gt.keyword$DataError={message:({keyword:t,schemaType:e})=>e?(0,Me.str)`"${t}" keyword must be ${e} ($data)`:(0,Me.str)`"${t}" keyword is invalid ($data)`};function Qz(t,e=Gt.keywordError,r,n){let{it:o}=t,{gen:i,compositeRule:s,allErrors:a}=o,c=yb(t,e,r);n??(s||a)?hb(i,c):gb(o,(0,Me._)`[${c}]`)}Gt.reportError=Qz;function eC(t,e=Gt.keywordError,r){let{it:n}=t,{gen:o,compositeRule:i,allErrors:s}=n,a=yb(t,e,r);hb(o,a),i||s||gb(n,er.default.vErrors)}Gt.reportExtraError=eC;function tC(t,e){t.assign(er.default.errors,e),t.if((0,Me._)`${er.default.vErrors} !== null`,()=>t.if(e,()=>t.assign((0,Me._)`${er.default.vErrors}.length`,e),()=>t.assign(er.default.vErrors,null)))}Gt.resetErrorsCount=tC;function rC({gen:t,keyword:e,schemaValue:r,data:n,errsCount:o,it:i}){if(o===void 0)throw new Error("ajv implementation error");let s=t.name("err");t.forRange("i",o,er.default.errors,a=>{t.const(s,(0,Me._)`${er.default.vErrors}[${a}]`),t.if((0,Me._)`${s}.instancePath === undefined`,()=>t.assign((0,Me._)`${s}.instancePath`,(0,Me.strConcat)(er.default.instancePath,i.errorPath))),t.assign((0,Me._)`${s}.schemaPath`,(0,Me.str)`${i.errSchemaPath}/${e}`),i.opts.verbose&&(t.assign((0,Me._)`${s}.schema`,r),t.assign((0,Me._)`${s}.data`,n))})}Gt.extendErrors=rC;function hb(t,e){let r=t.const("err",e);t.if((0,Me._)`${er.default.vErrors} === null`,()=>t.assign(er.default.vErrors,(0,Me._)`[${r}]`),(0,Me._)`${er.default.vErrors}.push(${r})`),t.code((0,Me._)`${er.default.errors}++`)}function gb(t,e){let{gen:r,validateName:n,schemaEnv:o}=t;o.$async?r.throw((0,Me._)`new ${t.ValidationError}(${e})`):(r.assign((0,Me._)`${n}.errors`,e),r.return(!1))}var ko={keyword:new Me.Name("keyword"),schemaPath:new Me.Name("schemaPath"),params:new Me.Name("params"),propertyName:new Me.Name("propertyName"),message:new Me.Name("message"),schema:new Me.Name("schema"),parentSchema:new Me.Name("parentSchema")};function yb(t,e,r){let{createErrors:n}=t.it;return n===!1?(0,Me._)`{}`:nC(t,e,r)}function nC(t,e,r={}){let{gen:n,it:o}=t,i=[oC(o,r),iC(t,r)];return sC(t,e,i),n.object(...i)}function oC({errorPath:t},{instancePath:e}){let r=e?(0,Me.str)`${t}${(0,Nc.getErrorPath)(e,Nc.Type.Str)}`:t;return[er.default.instancePath,(0,Me.strConcat)(er.default.instancePath,r)]}function iC({keyword:t,it:{errSchemaPath:e}},{schemaPath:r,parentSchema:n}){let o=n?e:(0,Me.str)`${e}/${t}`;return r&&(o=(0,Me.str)`${o}${(0,Nc.getErrorPath)(r,Nc.Type.Str)}`),[ko.schemaPath,o]}function sC(t,{params:e,message:r},n){let{keyword:o,data:i,schemaValue:s,it:a}=t,{opts:c,propertyName:l,topSchemaRef:p,schemaPath:d}=a;n.push([ko.keyword,o],[ko.params,typeof e=="function"?e(t):e||(0,Me._)`{}`]),c.messages&&n.push([ko.message,typeof r=="function"?r(t):r]),c.verbose&&n.push([ko.schema,s],[ko.parentSchema,(0,Me._)`${p}${d}`],[er.default.data,i]),l&&n.push([ko.propertyName,l])}});var vb=T(li=>{"use strict";Object.defineProperty(li,"__esModule",{value:!0});li.boolOrEmptySchema=li.topBoolOrEmptySchema=void 0;var aC=Is(),cC=be(),lC=xn(),uC={message:"boolean schema is false"};function pC(t){let{gen:e,schema:r,validateName:n}=t;r===!1?xb(t,!1):typeof r=="object"&&r.$async===!0?e.return(lC.default.data):(e.assign((0,cC._)`${n}.errors`,null),e.return(!0))}li.topBoolOrEmptySchema=pC;function dC(t,e){let{gen:r,schema:n}=t;n===!1?(r.var(e,!1),xb(t)):r.var(e,!0)}li.boolOrEmptySchema=dC;function xb(t,e){let{gen:r,data:n}=t,o={gen:r,keyword:"false schema",data:n,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:t};(0,aC.reportError)(o,uC,void 0,e)}});var yf=T(ui=>{"use strict";Object.defineProperty(ui,"__esModule",{value:!0});ui.getRules=ui.isJSONType=void 0;var fC=["string","number","integer","boolean","null","object","array"],mC=new Set(fC);function hC(t){return typeof t=="string"&&mC.has(t)}ui.isJSONType=hC;function gC(){let t={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...t,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},t.number,t.string,t.array,t.object],post:{rules:[]},all:{},keywords:{}}}ui.getRules=gC});var xf=T(Cn=>{"use strict";Object.defineProperty(Cn,"__esModule",{value:!0});Cn.shouldUseRule=Cn.shouldUseGroup=Cn.schemaHasRulesForType=void 0;function yC({schema:t,self:e},r){let n=e.RULES.types[r];return n&&n!==!0&&bb(t,n)}Cn.schemaHasRulesForType=yC;function bb(t,e){return e.rules.some(r=>_b(t,r))}Cn.shouldUseGroup=bb;function _b(t,e){var r;return t[e.keyword]!==void 0||((r=e.definition.implements)===null||r===void 0?void 0:r.some(n=>t[n]!==void 0))}Cn.shouldUseRule=_b});var zs=T(Wt=>{"use strict";Object.defineProperty(Wt,"__esModule",{value:!0});Wt.reportTypeError=Wt.checkDataTypes=Wt.checkDataType=Wt.coerceAndCheckDataType=Wt.getJSONTypes=Wt.getSchemaTypes=Wt.DataType=void 0;var xC=yf(),vC=xf(),bC=Is(),ye=be(),wb=De(),pi;(function(t){t[t.Correct=0]="Correct",t[t.Wrong=1]="Wrong"})(pi||(Wt.DataType=pi={}));function _C(t){let e=Sb(t.type);if(e.includes("null")){if(t.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!e.length&&t.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');t.nullable===!0&&e.push("null")}return e}Wt.getSchemaTypes=_C;function Sb(t){let e=Array.isArray(t)?t:t?[t]:[];if(e.every(xC.isJSONType))return e;throw new Error("type must be JSONType or JSONType[]: "+e.join(","))}Wt.getJSONTypes=Sb;function wC(t,e){let{gen:r,data:n,opts:o}=t,i=SC(e,o.coerceTypes),s=e.length>0&&!(i.length===0&&e.length===1&&(0,vC.schemaHasRulesForType)(t,e[0]));if(s){let a=bf(e,n,o.strictNumbers,pi.Wrong);r.if(a,()=>{i.length?kC(t,e,i):_f(t)})}return s}Wt.coerceAndCheckDataType=wC;var kb=new Set(["string","number","integer","boolean","null"]);function SC(t,e){return e?t.filter(r=>kb.has(r)||e==="array"&&r==="array"):[]}function kC(t,e,r){let{gen:n,data:o,opts:i}=t,s=n.let("dataType",(0,ye._)`typeof ${o}`),a=n.let("coerced",(0,ye._)`undefined`);i.coerceTypes==="array"&&n.if((0,ye._)`${s} == 'object' && Array.isArray(${o}) && ${o}.length == 1`,()=>n.assign(o,(0,ye._)`${o}[0]`).assign(s,(0,ye._)`typeof ${o}`).if(bf(e,o,i.strictNumbers),()=>n.assign(a,o))),n.if((0,ye._)`${a} !== undefined`);for(let l of r)(kb.has(l)||l==="array"&&i.coerceTypes==="array")&&c(l);n.else(),_f(t),n.endIf(),n.if((0,ye._)`${a} !== undefined`,()=>{n.assign(o,a),$C(t,a)});function c(l){switch(l){case"string":n.elseIf((0,ye._)`${s} == "number" || ${s} == "boolean"`).assign(a,(0,ye._)`"" + ${o}`).elseIf((0,ye._)`${o} === null`).assign(a,(0,ye._)`""`);return;case"number":n.elseIf((0,ye._)`${s} == "boolean" || ${o} === null
|
|
4
|
-
|| (${s} == "string" && ${o} && ${o} == +${o})`).assign(a,(0,
|
|
5
|
-
|| (${s} === "string" && ${o} && ${o} == +${o} && !(${o} % 1))`).assign(a,(0,
|
|
6
|
-
|| ${s} === "boolean" || ${o} === null`).assign(a,(0,ye._)`[${o}]`)}}}function $C({gen:t,parentData:e,parentDataProperty:r},n){t.if((0,ye._)`${e} !== undefined`,()=>t.assign((0,ye._)`${e}[${r}]`,n))}function vf(t,e,r,n=pi.Correct){let o=n===pi.Correct?ye.operators.EQ:ye.operators.NEQ,i;switch(t){case"null":return(0,ye._)`${e} ${o} null`;case"array":i=(0,ye._)`Array.isArray(${e})`;break;case"object":i=(0,ye._)`${e} && typeof ${e} == "object" && !Array.isArray(${e})`;break;case"integer":i=s((0,ye._)`!(${e} % 1) && !isNaN(${e})`);break;case"number":i=s();break;default:return(0,ye._)`typeof ${e} ${o} ${t}`}return n===pi.Correct?i:(0,ye.not)(i);function s(a=ye.nil){return(0,ye.and)((0,ye._)`typeof ${e} == "number"`,a,r?(0,ye._)`isFinite(${e})`:ye.nil)}}Wt.checkDataType=vf;function bf(t,e,r,n){if(t.length===1)return vf(t[0],e,r,n);let o,i=(0,wb.toHash)(t);if(i.array&&i.object){let s=(0,ye._)`typeof ${e} != "object"`;o=i.null?s:(0,ye._)`!${e} || ${s}`,delete i.null,delete i.array,delete i.object}else o=ye.nil;i.number&&delete i.integer;for(let s in i)o=(0,ye.and)(o,vf(s,e,r,n));return o}Wt.checkDataTypes=bf;var EC={message:({schema:t})=>`must be ${t}`,params:({schema:t,schemaValue:e})=>typeof t=="string"?(0,ye._)`{type: ${t}}`:(0,ye._)`{type: ${e}}`};function _f(t){let e=TC(t);(0,bC.reportError)(e,EC)}Wt.reportTypeError=_f;function TC(t){let{gen:e,data:r,schema:n}=t,o=(0,wb.schemaRefOrVal)(t,n,"type");return{gen:e,keyword:"type",data:r,schema:n.type,schemaCode:o,schemaValue:o,parentSchema:n,params:{},it:t}}});var Eb=T(jc=>{"use strict";Object.defineProperty(jc,"__esModule",{value:!0});jc.assignDefaults=void 0;var di=be(),RC=De();function PC(t,e){let{properties:r,items:n}=t.schema;if(e==="object"&&r)for(let o in r)$b(t,o,r[o].default);else e==="array"&&Array.isArray(n)&&n.forEach((o,i)=>$b(t,i,o.default))}jc.assignDefaults=PC;function $b(t,e,r){let{gen:n,compositeRule:o,data:i,opts:s}=t;if(r===void 0)return;let a=(0,di._)`${i}${(0,di.getProperty)(e)}`;if(o){(0,RC.checkStrictMode)(t,`default is ignored for: ${a}`);return}let c=(0,di._)`${a} === undefined`;s.useDefaults==="empty"&&(c=(0,di._)`${c} || ${a} === null || ${a} === ""`),n.if(c,(0,di._)`${a} = ${(0,di.stringify)(r)}`)}});var Tr=T(Ke=>{"use strict";Object.defineProperty(Ke,"__esModule",{value:!0});Ke.validateUnion=Ke.validateArray=Ke.usePattern=Ke.callValidateCode=Ke.schemaProperties=Ke.allSchemaProperties=Ke.noPropertyInData=Ke.propertyInData=Ke.isOwnProperty=Ke.hasPropFunc=Ke.reportMissingProp=Ke.checkMissingProp=Ke.checkReportMissingProp=void 0;var ct=be(),wf=De(),On=xn(),AC=De();function IC(t,e){let{gen:r,data:n,it:o}=t;r.if(kf(r,n,e,o.opts.ownProperties),()=>{t.setParams({missingProperty:(0,ct._)`${e}`},!0),t.error()})}Ke.checkReportMissingProp=IC;function zC({gen:t,data:e,it:{opts:r}},n,o){return(0,ct.or)(...n.map(i=>(0,ct.and)(kf(t,e,i,r.ownProperties),(0,ct._)`${o} = ${i}`)))}Ke.checkMissingProp=zC;function CC(t,e){t.setParams({missingProperty:e},!0),t.error()}Ke.reportMissingProp=CC;function Tb(t){return t.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,ct._)`Object.prototype.hasOwnProperty`})}Ke.hasPropFunc=Tb;function Sf(t,e,r){return(0,ct._)`${Tb(t)}.call(${e}, ${r})`}Ke.isOwnProperty=Sf;function OC(t,e,r,n){let o=(0,ct._)`${e}${(0,ct.getProperty)(r)} !== undefined`;return n?(0,ct._)`${o} && ${Sf(t,e,r)}`:o}Ke.propertyInData=OC;function kf(t,e,r,n){let o=(0,ct._)`${e}${(0,ct.getProperty)(r)} === undefined`;return n?(0,ct.or)(o,(0,ct.not)(Sf(t,e,r))):o}Ke.noPropertyInData=kf;function Rb(t){return t?Object.keys(t).filter(e=>e!=="__proto__"):[]}Ke.allSchemaProperties=Rb;function NC(t,e){return Rb(e).filter(r=>!(0,wf.alwaysValidSchema)(t,e[r]))}Ke.schemaProperties=NC;function jC({schemaCode:t,data:e,it:{gen:r,topSchemaRef:n,schemaPath:o,errorPath:i},it:s},a,c,l){let p=l?(0,ct._)`${t}, ${e}, ${n}${o}`:e,d=[[On.default.instancePath,(0,ct.strConcat)(On.default.instancePath,i)],[On.default.parentData,s.parentData],[On.default.parentDataProperty,s.parentDataProperty],[On.default.rootData,On.default.rootData]];s.opts.dynamicRef&&d.push([On.default.dynamicAnchors,On.default.dynamicAnchors]);let f=(0,ct._)`${p}, ${r.object(...d)}`;return c!==ct.nil?(0,ct._)`${a}.call(${c}, ${f})`:(0,ct._)`${a}(${f})`}Ke.callValidateCode=jC;var LC=(0,ct._)`new RegExp`;function DC({gen:t,it:{opts:e}},r){let n=e.unicodeRegExp?"u":"",{regExp:o}=e.code,i=o(r,n);return t.scopeValue("pattern",{key:i.toString(),ref:i,code:(0,ct._)`${o.code==="new RegExp"?LC:(0,AC.useFunc)(t,o)}(${r}, ${n})`})}Ke.usePattern=DC;function MC(t){let{gen:e,data:r,keyword:n,it:o}=t,i=e.name("valid");if(o.allErrors){let a=e.let("valid",!0);return s(()=>e.assign(a,!1)),a}return e.var(i,!0),s(()=>e.break()),i;function s(a){let c=e.const("len",(0,ct._)`${r}.length`);e.forRange("i",0,c,l=>{t.subschema({keyword:n,dataProp:l,dataPropType:wf.Type.Num},i),e.if((0,ct.not)(i),a)})}}Ke.validateArray=MC;function qC(t){let{gen:e,schema:r,keyword:n,it:o}=t;if(!Array.isArray(r))throw new Error("ajv implementation error");if(r.some(c=>(0,wf.alwaysValidSchema)(o,c))&&!o.opts.unevaluated)return;let s=e.let("valid",!1),a=e.name("_valid");e.block(()=>r.forEach((c,l)=>{let p=t.subschema({keyword:n,schemaProp:l,compositeRule:!0},a);e.assign(s,(0,ct._)`${s} || ${a}`),t.mergeValidEvaluated(p,a)||e.if((0,ct.not)(s))})),t.result(s,()=>t.reset(),()=>t.error(!0))}Ke.validateUnion=qC});var Ib=T(Qr=>{"use strict";Object.defineProperty(Qr,"__esModule",{value:!0});Qr.validateKeywordUsage=Qr.validSchemaType=Qr.funcKeywordCode=Qr.macroKeywordCode=void 0;var tr=be(),$o=xn(),FC=Tr(),UC=Is();function ZC(t,e){let{gen:r,keyword:n,schema:o,parentSchema:i,it:s}=t,a=e.macro.call(s.self,o,i,s),c=Ab(r,n,a);s.opts.validateSchema!==!1&&s.self.validateSchema(a,!0);let l=r.name("valid");t.subschema({schema:a,schemaPath:tr.nil,errSchemaPath:`${s.errSchemaPath}/${n}`,topSchemaRef:c,compositeRule:!0},l),t.pass(l,()=>t.error(!0))}Qr.macroKeywordCode=ZC;function BC(t,e){var r;let{gen:n,keyword:o,schema:i,parentSchema:s,$data:a,it:c}=t;VC(c,e);let l=!a&&e.compile?e.compile.call(c.self,i,s,c):e.validate,p=Ab(n,o,l),d=n.let("valid");t.block$data(d,f),t.ok((r=e.valid)!==null&&r!==void 0?r:d);function f(){if(e.errors===!1)v(),e.modifying&&Pb(t),x(()=>t.error());else{let g=e.async?m():y();e.modifying&&Pb(t),x(()=>HC(t,g))}}function m(){let g=n.let("ruleErrs",null);return n.try(()=>v((0,tr._)`await `),_=>n.assign(d,!1).if((0,tr._)`${_} instanceof ${c.ValidationError}`,()=>n.assign(g,(0,tr._)`${_}.errors`),()=>n.throw(_))),g}function y(){let g=(0,tr._)`${p}.errors`;return n.assign(g,null),v(tr.nil),g}function v(g=e.async?(0,tr._)`await `:tr.nil){let _=c.opts.passContext?$o.default.this:$o.default.self,w=!("compile"in e&&!a||e.schema===!1);n.assign(d,(0,tr._)`${g}${(0,FC.callValidateCode)(t,p,_,w)}`,e.modifying)}function x(g){var _;n.if((0,tr.not)((_=e.valid)!==null&&_!==void 0?_:d),g)}}Qr.funcKeywordCode=BC;function Pb(t){let{gen:e,data:r,it:n}=t;e.if(n.parentData,()=>e.assign(r,(0,tr._)`${n.parentData}[${n.parentDataProperty}]`))}function HC(t,e){let{gen:r}=t;r.if((0,tr._)`Array.isArray(${e})`,()=>{r.assign($o.default.vErrors,(0,tr._)`${$o.default.vErrors} === null ? ${e} : ${$o.default.vErrors}.concat(${e})`).assign($o.default.errors,(0,tr._)`${$o.default.vErrors}.length`),(0,UC.extendErrors)(t)},()=>t.error())}function VC({schemaEnv:t},e){if(e.async&&!t.$async)throw new Error("async keyword in sync schema")}function Ab(t,e,r){if(r===void 0)throw new Error(`keyword "${e}" failed to compile`);return t.scopeValue("keyword",typeof r=="function"?{ref:r}:{ref:r,code:(0,tr.stringify)(r)})}function GC(t,e,r=!1){return!e.length||e.some(n=>n==="array"?Array.isArray(t):n==="object"?t&&typeof t=="object"&&!Array.isArray(t):typeof t==n||r&&typeof t>"u")}Qr.validSchemaType=GC;function WC({schema:t,opts:e,self:r,errSchemaPath:n},o,i){if(Array.isArray(o.keyword)?!o.keyword.includes(i):o.keyword!==i)throw new Error("ajv implementation error");let s=o.dependencies;if(s!=null&&s.some(a=>!Object.prototype.hasOwnProperty.call(t,a)))throw new Error(`parent schema must have dependencies of ${i}: ${s.join(",")}`);if(o.validateSchema&&!o.validateSchema(t[i])){let c=`keyword "${i}" value is invalid at path "${n}": `+r.errorsText(o.validateSchema.errors);if(e.validateSchema==="log")r.logger.error(c);else throw new Error(c)}}Qr.validateKeywordUsage=WC});var Cb=T(Nn=>{"use strict";Object.defineProperty(Nn,"__esModule",{value:!0});Nn.extendSubschemaMode=Nn.extendSubschemaData=Nn.getSubschema=void 0;var en=be(),zb=De();function KC(t,{keyword:e,schemaProp:r,schema:n,schemaPath:o,errSchemaPath:i,topSchemaRef:s}){if(e!==void 0&&n!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(e!==void 0){let a=t.schema[e];return r===void 0?{schema:a,schemaPath:(0,en._)`${t.schemaPath}${(0,en.getProperty)(e)}`,errSchemaPath:`${t.errSchemaPath}/${e}`}:{schema:a[r],schemaPath:(0,en._)`${t.schemaPath}${(0,en.getProperty)(e)}${(0,en.getProperty)(r)}`,errSchemaPath:`${t.errSchemaPath}/${e}/${(0,zb.escapeFragment)(r)}`}}if(n!==void 0){if(o===void 0||i===void 0||s===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:n,schemaPath:o,topSchemaRef:s,errSchemaPath:i}}throw new Error('either "keyword" or "schema" must be passed')}Nn.getSubschema=KC;function JC(t,e,{dataProp:r,dataPropType:n,data:o,dataTypes:i,propertyName:s}){if(o!==void 0&&r!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');let{gen:a}=e;if(r!==void 0){let{errorPath:l,dataPathArr:p,opts:d}=e,f=a.let("data",(0,en._)`${e.data}${(0,en.getProperty)(r)}`,!0);c(f),t.errorPath=(0,en.str)`${l}${(0,zb.getErrorPath)(r,n,d.jsPropertySyntax)}`,t.parentDataProperty=(0,en._)`${r}`,t.dataPathArr=[...p,t.parentDataProperty]}if(o!==void 0){let l=o instanceof en.Name?o:a.let("data",o,!0);c(l),s!==void 0&&(t.propertyName=s)}i&&(t.dataTypes=i);function c(l){t.data=l,t.dataLevel=e.dataLevel+1,t.dataTypes=[],e.definedProperties=new Set,t.parentData=e.data,t.dataNames=[...e.dataNames,l]}}Nn.extendSubschemaData=JC;function YC(t,{jtdDiscriminator:e,jtdMetadata:r,compositeRule:n,createErrors:o,allErrors:i}){n!==void 0&&(t.compositeRule=n),o!==void 0&&(t.createErrors=o),i!==void 0&&(t.allErrors=i),t.jtdDiscriminator=e,t.jtdMetadata=r}Nn.extendSubschemaMode=YC});var $f=T((E6,Ob)=>{"use strict";Ob.exports=function t(e,r){if(e===r)return!0;if(e&&r&&typeof e=="object"&&typeof r=="object"){if(e.constructor!==r.constructor)return!1;var n,o,i;if(Array.isArray(e)){if(n=e.length,n!=r.length)return!1;for(o=n;o--!==0;)if(!t(e[o],r[o]))return!1;return!0}if(e.constructor===RegExp)return e.source===r.source&&e.flags===r.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===r.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===r.toString();if(i=Object.keys(e),n=i.length,n!==Object.keys(r).length)return!1;for(o=n;o--!==0;)if(!Object.prototype.hasOwnProperty.call(r,i[o]))return!1;for(o=n;o--!==0;){var s=i[o];if(!t(e[s],r[s]))return!1}return!0}return e!==e&&r!==r}});var jb=T((T6,Nb)=>{"use strict";var jn=Nb.exports=function(t,e,r){typeof e=="function"&&(r=e,e={}),r=e.cb||r;var n=typeof r=="function"?r:r.pre||function(){},o=r.post||function(){};Lc(e,n,o,t,"",t)};jn.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};jn.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};jn.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};jn.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 Lc(t,e,r,n,o,i,s,a,c,l){if(n&&typeof n=="object"&&!Array.isArray(n)){e(n,o,i,s,a,c,l);for(var p in n){var d=n[p];if(Array.isArray(d)){if(p in jn.arrayKeywords)for(var f=0;f<d.length;f++)Lc(t,e,r,d[f],o+"/"+p+"/"+f,i,o,p,n,f)}else if(p in jn.propsKeywords){if(d&&typeof d=="object")for(var m in d)Lc(t,e,r,d[m],o+"/"+p+"/"+XC(m),i,o,p,n,m)}else(p in jn.keywords||t.allKeys&&!(p in jn.skipKeywords))&&Lc(t,e,r,d,o+"/"+p,i,o,p,n)}r(n,o,i,s,a,c,l)}}function XC(t){return t.replace(/~/g,"~0").replace(/\//g,"~1")}});var Cs=T(lr=>{"use strict";Object.defineProperty(lr,"__esModule",{value:!0});lr.getSchemaRefs=lr.resolveUrl=lr.normalizeId=lr._getFullPath=lr.getFullPath=lr.inlineRef=void 0;var QC=De(),eO=$f(),tO=jb(),rO=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function nO(t,e=!0){return typeof t=="boolean"?!0:e===!0?!Ef(t):e?Lb(t)<=e:!1}lr.inlineRef=nO;var oO=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function Ef(t){for(let e in t){if(oO.has(e))return!0;let r=t[e];if(Array.isArray(r)&&r.some(Ef)||typeof r=="object"&&Ef(r))return!0}return!1}function Lb(t){let e=0;for(let r in t){if(r==="$ref")return 1/0;if(e++,!rO.has(r)&&(typeof t[r]=="object"&&(0,QC.eachItem)(t[r],n=>e+=Lb(n)),e===1/0))return 1/0}return e}function Db(t,e="",r){r!==!1&&(e=fi(e));let n=t.parse(e);return Mb(t,n)}lr.getFullPath=Db;function Mb(t,e){return t.serialize(e).split("#")[0]+"#"}lr._getFullPath=Mb;var iO=/#\/?$/;function fi(t){return t?t.replace(iO,""):""}lr.normalizeId=fi;function sO(t,e,r){return r=fi(r),t.resolve(e,r)}lr.resolveUrl=sO;var aO=/^[a-z_][-a-z0-9._]*$/i;function cO(t,e){if(typeof t=="boolean")return{};let{schemaId:r,uriResolver:n}=this.opts,o=fi(t[r]||e),i={"":o},s=Db(n,o,!1),a={},c=new Set;return tO(t,{allKeys:!0},(d,f,m,y)=>{if(y===void 0)return;let v=s+f,x=i[y];typeof d[r]=="string"&&(x=g.call(this,d[r])),_.call(this,d.$anchor),_.call(this,d.$dynamicAnchor),i[f]=x;function g(w){let $=this.opts.uriResolver.resolve;if(w=fi(x?$(x,w):w),c.has(w))throw p(w);c.add(w);let E=this.refs[w];return typeof E=="string"&&(E=this.refs[E]),typeof E=="object"?l(d,E.schema,w):w!==fi(v)&&(w[0]==="#"?(l(d,a[w],w),a[w]=d):this.refs[w]=v),w}function _(w){if(typeof w=="string"){if(!aO.test(w))throw new Error(`invalid anchor "${w}"`);g.call(this,`#${w}`)}}}),a;function l(d,f,m){if(f!==void 0&&!eO(d,f))throw p(m)}function p(d){return new Error(`reference "${d}" resolves to more than one schema`)}}lr.getSchemaRefs=cO});var js=T(Ln=>{"use strict";Object.defineProperty(Ln,"__esModule",{value:!0});Ln.getData=Ln.KeywordCxt=Ln.validateFunctionCode=void 0;var Bb=vb(),qb=zs(),Rf=xf(),Dc=zs(),lO=Eb(),Ns=Ib(),Tf=Cb(),ne=be(),fe=xn(),uO=Cs(),vn=De(),Os=Is();function pO(t){if(Gb(t)&&(Wb(t),Vb(t))){mO(t);return}Hb(t,()=>(0,Bb.topBoolOrEmptySchema)(t))}Ln.validateFunctionCode=pO;function Hb({gen:t,validateName:e,schema:r,schemaEnv:n,opts:o},i){o.code.es5?t.func(e,(0,ne._)`${fe.default.data}, ${fe.default.valCxt}`,n.$async,()=>{t.code((0,ne._)`"use strict"; ${Fb(r,o)}`),fO(t,o),t.code(i)}):t.func(e,(0,ne._)`${fe.default.data}, ${dO(o)}`,n.$async,()=>t.code(Fb(r,o)).code(i))}function dO(t){return(0,ne._)`{${fe.default.instancePath}="", ${fe.default.parentData}, ${fe.default.parentDataProperty}, ${fe.default.rootData}=${fe.default.data}${t.dynamicRef?(0,ne._)`, ${fe.default.dynamicAnchors}={}`:ne.nil}}={}`}function fO(t,e){t.if(fe.default.valCxt,()=>{t.var(fe.default.instancePath,(0,ne._)`${fe.default.valCxt}.${fe.default.instancePath}`),t.var(fe.default.parentData,(0,ne._)`${fe.default.valCxt}.${fe.default.parentData}`),t.var(fe.default.parentDataProperty,(0,ne._)`${fe.default.valCxt}.${fe.default.parentDataProperty}`),t.var(fe.default.rootData,(0,ne._)`${fe.default.valCxt}.${fe.default.rootData}`),e.dynamicRef&&t.var(fe.default.dynamicAnchors,(0,ne._)`${fe.default.valCxt}.${fe.default.dynamicAnchors}`)},()=>{t.var(fe.default.instancePath,(0,ne._)`""`),t.var(fe.default.parentData,(0,ne._)`undefined`),t.var(fe.default.parentDataProperty,(0,ne._)`undefined`),t.var(fe.default.rootData,fe.default.data),e.dynamicRef&&t.var(fe.default.dynamicAnchors,(0,ne._)`{}`)})}function mO(t){let{schema:e,opts:r,gen:n}=t;Hb(t,()=>{r.$comment&&e.$comment&&Jb(t),vO(t),n.let(fe.default.vErrors,null),n.let(fe.default.errors,0),r.unevaluated&&hO(t),Kb(t),wO(t)})}function hO(t){let{gen:e,validateName:r}=t;t.evaluated=e.const("evaluated",(0,ne._)`${r}.evaluated`),e.if((0,ne._)`${t.evaluated}.dynamicProps`,()=>e.assign((0,ne._)`${t.evaluated}.props`,(0,ne._)`undefined`)),e.if((0,ne._)`${t.evaluated}.dynamicItems`,()=>e.assign((0,ne._)`${t.evaluated}.items`,(0,ne._)`undefined`))}function Fb(t,e){let r=typeof t=="object"&&t[e.schemaId];return r&&(e.code.source||e.code.process)?(0,ne._)`/*# sourceURL=${r} */`:ne.nil}function gO(t,e){if(Gb(t)&&(Wb(t),Vb(t))){yO(t,e);return}(0,Bb.boolOrEmptySchema)(t,e)}function Vb({schema:t,self:e}){if(typeof t=="boolean")return!t;for(let r in t)if(e.RULES.all[r])return!0;return!1}function Gb(t){return typeof t.schema!="boolean"}function yO(t,e){let{schema:r,gen:n,opts:o}=t;o.$comment&&r.$comment&&Jb(t),bO(t),_O(t);let i=n.const("_errs",fe.default.errors);Kb(t,i),n.var(e,(0,ne._)`${i} === ${fe.default.errors}`)}function Wb(t){(0,vn.checkUnknownRules)(t),xO(t)}function Kb(t,e){if(t.opts.jtd)return Ub(t,[],!1,e);let r=(0,qb.getSchemaTypes)(t.schema),n=(0,qb.coerceAndCheckDataType)(t,r);Ub(t,r,!n,e)}function xO(t){let{schema:e,errSchemaPath:r,opts:n,self:o}=t;e.$ref&&n.ignoreKeywordsWithRef&&(0,vn.schemaHasRulesButRef)(e,o.RULES)&&o.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}function vO(t){let{schema:e,opts:r}=t;e.default!==void 0&&r.useDefaults&&r.strictSchema&&(0,vn.checkStrictMode)(t,"default is ignored in the schema root")}function bO(t){let e=t.schema[t.opts.schemaId];e&&(t.baseId=(0,uO.resolveUrl)(t.opts.uriResolver,t.baseId,e))}function _O(t){if(t.schema.$async&&!t.schemaEnv.$async)throw new Error("async schema in sync schema")}function Jb({gen:t,schemaEnv:e,schema:r,errSchemaPath:n,opts:o}){let i=r.$comment;if(o.$comment===!0)t.code((0,ne._)`${fe.default.self}.logger.log(${i})`);else if(typeof o.$comment=="function"){let s=(0,ne.str)`${n}/$comment`,a=t.scopeValue("root",{ref:e.root});t.code((0,ne._)`${fe.default.self}.opts.$comment(${i}, ${s}, ${a}.schema)`)}}function wO(t){let{gen:e,schemaEnv:r,validateName:n,ValidationError:o,opts:i}=t;r.$async?e.if((0,ne._)`${fe.default.errors} === 0`,()=>e.return(fe.default.data),()=>e.throw((0,ne._)`new ${o}(${fe.default.vErrors})`)):(e.assign((0,ne._)`${n}.errors`,fe.default.vErrors),i.unevaluated&&SO(t),e.return((0,ne._)`${fe.default.errors} === 0`))}function SO({gen:t,evaluated:e,props:r,items:n}){r instanceof ne.Name&&t.assign((0,ne._)`${e}.props`,r),n instanceof ne.Name&&t.assign((0,ne._)`${e}.items`,n)}function Ub(t,e,r,n){let{gen:o,schema:i,data:s,allErrors:a,opts:c,self:l}=t,{RULES:p}=l;if(i.$ref&&(c.ignoreKeywordsWithRef||!(0,vn.schemaHasRulesButRef)(i,p))){o.block(()=>Xb(t,"$ref",p.all.$ref.definition));return}c.jtd||kO(t,e),o.block(()=>{for(let f of p.rules)d(f);d(p.post)});function d(f){(0,Rf.shouldUseGroup)(i,f)&&(f.type?(o.if((0,Dc.checkDataType)(f.type,s,c.strictNumbers)),Zb(t,f),e.length===1&&e[0]===f.type&&r&&(o.else(),(0,Dc.reportTypeError)(t)),o.endIf()):Zb(t,f),a||o.if((0,ne._)`${fe.default.errors} === ${n||0}`))}}function Zb(t,e){let{gen:r,schema:n,opts:{useDefaults:o}}=t;o&&(0,lO.assignDefaults)(t,e.type),r.block(()=>{for(let i of e.rules)(0,Rf.shouldUseRule)(n,i)&&Xb(t,i.keyword,i.definition,e.type)})}function kO(t,e){t.schemaEnv.meta||!t.opts.strictTypes||($O(t,e),t.opts.allowUnionTypes||EO(t,e),TO(t,t.dataTypes))}function $O(t,e){if(e.length){if(!t.dataTypes.length){t.dataTypes=e;return}e.forEach(r=>{Yb(t.dataTypes,r)||Pf(t,`type "${r}" not allowed by context "${t.dataTypes.join(",")}"`)}),PO(t,e)}}function EO(t,e){e.length>1&&!(e.length===2&&e.includes("null"))&&Pf(t,"use allowUnionTypes to allow union type keyword")}function TO(t,e){let r=t.self.RULES.all;for(let n in r){let o=r[n];if(typeof o=="object"&&(0,Rf.shouldUseRule)(t.schema,o)){let{type:i}=o.definition;i.length&&!i.some(s=>RO(e,s))&&Pf(t,`missing type "${i.join(",")}" for keyword "${n}"`)}}}function RO(t,e){return t.includes(e)||e==="number"&&t.includes("integer")}function Yb(t,e){return t.includes(e)||e==="integer"&&t.includes("number")}function PO(t,e){let r=[];for(let n of t.dataTypes)Yb(e,n)?r.push(n):e.includes("integer")&&n==="number"&&r.push("integer");t.dataTypes=r}function Pf(t,e){let r=t.schemaEnv.baseId+t.errSchemaPath;e+=` at "${r}" (strictTypes)`,(0,vn.checkStrictMode)(t,e,t.opts.strictTypes)}var Mc=class{constructor(e,r,n){if((0,Ns.validateKeywordUsage)(e,r,n),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=n,this.data=e.data,this.schema=e.schema[n],this.$data=r.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,vn.schemaRefOrVal)(e,this.schema,n,this.$data),this.schemaType=r.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=r,this.$data)this.schemaCode=e.gen.const("vSchema",Qb(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,Ns.validSchemaType)(this.schema,r.schemaType,r.allowUndefined))throw new Error(`${n} value must be ${JSON.stringify(r.schemaType)}`);("code"in r?r.trackErrors:r.errors!==!1)&&(this.errsCount=e.gen.const("_errs",fe.default.errors))}result(e,r,n){this.failResult((0,ne.not)(e),r,n)}failResult(e,r,n){this.gen.if(e),n?n():this.error(),r?(this.gen.else(),r(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(e,r){this.failResult((0,ne.not)(e),void 0,r)}fail(e){if(e===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(e),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);let{schemaCode:r}=this;this.fail((0,ne._)`${r} !== undefined && (${(0,ne.or)(this.invalid$data(),e)})`)}error(e,r,n){if(r){this.setParams(r),this._error(e,n),this.setParams({});return}this._error(e,n)}_error(e,r){(e?Os.reportExtraError:Os.reportError)(this,this.def.error,r)}$dataError(){(0,Os.reportError)(this,this.def.$dataError||Os.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,Os.resetErrorsCount)(this.gen,this.errsCount)}ok(e){this.allErrors||this.gen.if(e)}setParams(e,r){r?Object.assign(this.params,e):this.params=e}block$data(e,r,n=ne.nil){this.gen.block(()=>{this.check$data(e,n),r()})}check$data(e=ne.nil,r=ne.nil){if(!this.$data)return;let{gen:n,schemaCode:o,schemaType:i,def:s}=this;n.if((0,ne.or)((0,ne._)`${o} === undefined`,r)),e!==ne.nil&&n.assign(e,!0),(i.length||s.validateSchema)&&(n.elseIf(this.invalid$data()),this.$dataError(),e!==ne.nil&&n.assign(e,!1)),n.else()}invalid$data(){let{gen:e,schemaCode:r,schemaType:n,def:o,it:i}=this;return(0,ne.or)(s(),a());function s(){if(n.length){if(!(r instanceof ne.Name))throw new Error("ajv implementation error");let c=Array.isArray(n)?n:[n];return(0,ne._)`${(0,Dc.checkDataTypes)(c,r,i.opts.strictNumbers,Dc.DataType.Wrong)}`}return ne.nil}function a(){if(o.validateSchema){let c=e.scopeValue("validate$data",{ref:o.validateSchema});return(0,ne._)`!${c}(${r})`}return ne.nil}}subschema(e,r){let n=(0,Tf.getSubschema)(this.it,e);(0,Tf.extendSubschemaData)(n,this.it,e),(0,Tf.extendSubschemaMode)(n,e);let o={...this.it,...n,items:void 0,props:void 0};return gO(o,r),o}mergeEvaluated(e,r){let{it:n,gen:o}=this;n.opts.unevaluated&&(n.props!==!0&&e.props!==void 0&&(n.props=vn.mergeEvaluated.props(o,e.props,n.props,r)),n.items!==!0&&e.items!==void 0&&(n.items=vn.mergeEvaluated.items(o,e.items,n.items,r)))}mergeValidEvaluated(e,r){let{it:n,gen:o}=this;if(n.opts.unevaluated&&(n.props!==!0||n.items!==!0))return o.if(r,()=>this.mergeEvaluated(e,ne.Name)),!0}};Ln.KeywordCxt=Mc;function Xb(t,e,r,n){let o=new Mc(t,r,e);"code"in r?r.code(o,n):o.$data&&r.validate?(0,Ns.funcKeywordCode)(o,r):"macro"in r?(0,Ns.macroKeywordCode)(o,r):(r.compile||r.validate)&&(0,Ns.funcKeywordCode)(o,r)}var AO=/^\/(?:[^~]|~0|~1)*$/,IO=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function Qb(t,{dataLevel:e,dataNames:r,dataPathArr:n}){let o,i;if(t==="")return fe.default.rootData;if(t[0]==="/"){if(!AO.test(t))throw new Error(`Invalid JSON-pointer: ${t}`);o=t,i=fe.default.rootData}else{let l=IO.exec(t);if(!l)throw new Error(`Invalid JSON-pointer: ${t}`);let p=+l[1];if(o=l[2],o==="#"){if(p>=e)throw new Error(c("property/index",p));return n[e-p]}if(p>e)throw new Error(c("data",p));if(i=r[e-p],!o)return i}let s=i,a=o.split("/");for(let l of a)l&&(i=(0,ne._)`${i}${(0,ne.getProperty)((0,vn.unescapeJsonPointer)(l))}`,s=(0,ne._)`${s} && ${i}`);return s;function c(l,p){return`Cannot access ${l} ${p} levels up, current level is ${e}`}}Ln.getData=Qb});var qc=T(If=>{"use strict";Object.defineProperty(If,"__esModule",{value:!0});var Af=class extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}};If.default=Af});var Ls=T(Of=>{"use strict";Object.defineProperty(Of,"__esModule",{value:!0});var zf=Cs(),Cf=class extends Error{constructor(e,r,n,o){super(o||`can't resolve reference ${n} from id ${r}`),this.missingRef=(0,zf.resolveUrl)(e,r,n),this.missingSchema=(0,zf.normalizeId)((0,zf.getFullPath)(e,this.missingRef))}};Of.default=Cf});var Uc=T(Rr=>{"use strict";Object.defineProperty(Rr,"__esModule",{value:!0});Rr.resolveSchema=Rr.getCompilingSchema=Rr.resolveRef=Rr.compileSchema=Rr.SchemaEnv=void 0;var qr=be(),zO=qc(),Eo=xn(),Fr=Cs(),e_=De(),CO=js(),mi=class{constructor(e){var r;this.refs={},this.dynamicAnchors={};let n;typeof e.schema=="object"&&(n=e.schema),this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=(r=e.baseId)!==null&&r!==void 0?r:(0,Fr.normalizeId)(n==null?void 0:n[e.schemaId||"$id"]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=n==null?void 0:n.$async,this.refs={}}};Rr.SchemaEnv=mi;function jf(t){let e=t_.call(this,t);if(e)return e;let r=(0,Fr.getFullPath)(this.opts.uriResolver,t.root.baseId),{es5:n,lines:o}=this.opts.code,{ownProperties:i}=this.opts,s=new qr.CodeGen(this.scope,{es5:n,lines:o,ownProperties:i}),a;t.$async&&(a=s.scopeValue("Error",{ref:zO.default,code:(0,qr._)`require("ajv/dist/runtime/validation_error").default`}));let c=s.scopeName("validate");t.validateName=c;let l={gen:s,allErrors:this.opts.allErrors,data:Eo.default.data,parentData:Eo.default.parentData,parentDataProperty:Eo.default.parentDataProperty,dataNames:[Eo.default.data],dataPathArr:[qr.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:s.scopeValue("schema",this.opts.code.source===!0?{ref:t.schema,code:(0,qr.stringify)(t.schema)}:{ref:t.schema}),validateName:c,ValidationError:a,schema:t.schema,schemaEnv:t,rootId:r,baseId:t.baseId||r,schemaPath:qr.nil,errSchemaPath:t.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,qr._)`""`,opts:this.opts,self:this},p;try{this._compilations.add(t),(0,CO.validateFunctionCode)(l),s.optimize(this.opts.code.optimize);let d=s.toString();p=`${s.scopeRefs(Eo.default.scope)}return ${d}`,this.opts.code.process&&(p=this.opts.code.process(p,t));let m=new Function(`${Eo.default.self}`,`${Eo.default.scope}`,p)(this,this.scope.get());if(this.scope.value(c,{ref:m}),m.errors=null,m.schema=t.schema,m.schemaEnv=t,t.$async&&(m.$async=!0),this.opts.code.source===!0&&(m.source={validateName:c,validateCode:d,scopeValues:s._values}),this.opts.unevaluated){let{props:y,items:v}=l;m.evaluated={props:y instanceof qr.Name?void 0:y,items:v instanceof qr.Name?void 0:v,dynamicProps:y instanceof qr.Name,dynamicItems:v instanceof qr.Name},m.source&&(m.source.evaluated=(0,qr.stringify)(m.evaluated))}return t.validate=m,t}catch(d){throw delete t.validate,delete t.validateName,p&&this.logger.error("Error compiling schema, function code:",p),d}finally{this._compilations.delete(t)}}Rr.compileSchema=jf;function OO(t,e,r){var n;r=(0,Fr.resolveUrl)(this.opts.uriResolver,e,r);let o=t.refs[r];if(o)return o;let i=LO.call(this,t,r);if(i===void 0){let s=(n=t.localRefs)===null||n===void 0?void 0:n[r],{schemaId:a}=this.opts;s&&(i=new mi({schema:s,schemaId:a,root:t,baseId:e}))}if(i!==void 0)return t.refs[r]=NO.call(this,i)}Rr.resolveRef=OO;function NO(t){return(0,Fr.inlineRef)(t.schema,this.opts.inlineRefs)?t.schema:t.validate?t:jf.call(this,t)}function t_(t){for(let e of this._compilations)if(jO(e,t))return e}Rr.getCompilingSchema=t_;function jO(t,e){return t.schema===e.schema&&t.root===e.root&&t.baseId===e.baseId}function LO(t,e){let r;for(;typeof(r=this.refs[e])=="string";)e=r;return r||this.schemas[e]||Fc.call(this,t,e)}function Fc(t,e){let r=this.opts.uriResolver.parse(e),n=(0,Fr._getFullPath)(this.opts.uriResolver,r),o=(0,Fr.getFullPath)(this.opts.uriResolver,t.baseId,void 0);if(Object.keys(t.schema).length>0&&n===o)return Nf.call(this,r,t);let i=(0,Fr.normalizeId)(n),s=this.refs[i]||this.schemas[i];if(typeof s=="string"){let a=Fc.call(this,t,s);return typeof(a==null?void 0:a.schema)!="object"?void 0:Nf.call(this,r,a)}if(typeof(s==null?void 0:s.schema)=="object"){if(s.validate||jf.call(this,s),i===(0,Fr.normalizeId)(e)){let{schema:a}=s,{schemaId:c}=this.opts,l=a[c];return l&&(o=(0,Fr.resolveUrl)(this.opts.uriResolver,o,l)),new mi({schema:a,schemaId:c,root:t,baseId:o})}return Nf.call(this,r,s)}}Rr.resolveSchema=Fc;var DO=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function Nf(t,{baseId:e,schema:r,root:n}){var o;if(((o=t.fragment)===null||o===void 0?void 0:o[0])!=="/")return;for(let a of t.fragment.slice(1).split("/")){if(typeof r=="boolean")return;let c=r[(0,e_.unescapeFragment)(a)];if(c===void 0)return;r=c;let l=typeof r=="object"&&r[this.opts.schemaId];!DO.has(a)&&l&&(e=(0,Fr.resolveUrl)(this.opts.uriResolver,e,l))}let i;if(typeof r!="boolean"&&r.$ref&&!(0,e_.schemaHasRulesButRef)(r,this.RULES)){let a=(0,Fr.resolveUrl)(this.opts.uriResolver,e,r.$ref);i=Fc.call(this,n,a)}let{schemaId:s}=this.opts;if(i=i||new mi({schema:r,schemaId:s,root:n,baseId:e}),i.schema!==i.root.schema)return i}});var r_=T((C6,MO)=>{MO.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 Mf=T((O6,c_)=>{"use strict";var qO=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),o_=RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u),Lf=RegExp.prototype.test.bind(/^[\da-f]{2}$/iu),i_=RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu),FO=RegExp.prototype.test.bind(/^[\da-z\-._~!$&'()*+,;=:@/]$/iu);function Df(t){let e="",r=0,n=0;for(n=0;n<t.length;n++)if(r=t[n].charCodeAt(0),r!==48){if(!(r>=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102))return"";e+=t[n];break}for(n+=1;n<t.length;n++){if(r=t[n].charCodeAt(0),!(r>=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102))return"";e+=t[n]}return e}var UO=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function n_(t){return t.length=0,!0}function ZO(t,e,r){if(t.length){let n=Df(t);if(n!=="")e.push(n);else return r.error=!0,!1;t.length=0}return!0}function BO(t){let e=0,r={error:!1,address:"",zone:""},n=[],o=[],i=!1,s=!1,a=ZO;for(let c=0;c<t.length;c++){let l=t[c];if(!(l==="["||l==="]"))if(l===":"){if(i===!0&&(s=!0),!a(o,n,r))break;if(++e>7){r.error=!0;break}c>0&&t[c-1]===":"&&(i=!0),n.push(":");continue}else if(l==="%"){if(!a(o,n,r))break;a=n_}else{o.push(l);continue}}return o.length&&(a===n_?r.zone=o.join(""):s?n.push(o.join("")):n.push(Df(o))),r.address=n.join(""),r}function s_(t){if(HO(t,":")<2)return{host:t,isIPV6:!1};let e=BO(t);if(e.error)return{host:t,isIPV6:!1};{let r=e.address,n=e.address;return e.zone&&(r+="%"+e.zone,n+="%25"+e.zone),{host:r,isIPV6:!0,escapedHost:n}}}function HO(t,e){let r=0;for(let n=0;n<t.length;n++)t[n]===e&&r++;return r}function VO(t){let e=t,r=[],n=-1,o=0;for(;o=e.length;){if(o===1){if(e===".")break;if(e==="/"){r.push("/");break}else{r.push(e);break}}else if(o===2){if(e[0]==="."){if(e[1]===".")break;if(e[1]==="/"){e=e.slice(2);continue}}else if(e[0]==="/"&&(e[1]==="."||e[1]==="/")){r.push("/");break}}else if(o===3&&e==="/.."){r.length!==0&&r.pop(),r.push("/");break}if(e[0]==="."){if(e[1]==="."){if(e[2]==="/"){e=e.slice(3);continue}}else if(e[1]==="/"){e=e.slice(2);continue}}else if(e[0]==="/"&&e[1]==="."){if(e[2]==="/"){e=e.slice(2);continue}else if(e[2]==="."&&e[3]==="/"){e=e.slice(3),r.length!==0&&r.pop();continue}}if((n=e.indexOf("/",1))===-1){r.push(e);break}else r.push(e.slice(0,n)),e=e.slice(n)}return r.join("")}var GO={"@":"%40","/":"%2F","?":"%3F","#":"%23",":":"%3A"},WO=/[@/?#:]/g,KO=/[@/?#]/g;function a_(t,e){let r=e?KO:WO;return r.lastIndex=0,t.replace(r,n=>GO[n])}function JO(t,e=!1){if(t.indexOf("%")===-1)return t;let r="";for(let n=0;n<t.length;n++){if(t[n]==="%"&&n+2<t.length){let o=t.slice(n+1,n+3);if(Lf(o)){let i=o.toUpperCase(),s=String.fromCharCode(parseInt(i,16));e&&i_(s)?r+=s:r+="%"+i,n+=2;continue}}r+=t[n]}return r}function YO(t){let e="";for(let r=0;r<t.length;r++){if(t[r]==="%"&&r+2<t.length){let n=t.slice(r+1,r+3);if(Lf(n)){let o=n.toUpperCase(),i=String.fromCharCode(parseInt(o,16));i!=="."&&i_(i)?e+=i:e+="%"+o,r+=2;continue}}FO(t[r])?e+=t[r]:e+=escape(t[r])}return e}function XO(t){let e="";for(let r=0;r<t.length;r++){if(t[r]==="%"&&r+2<t.length){let n=t.slice(r+1,r+3);if(Lf(n)){e+="%"+n.toUpperCase(),r+=2;continue}}e+=escape(t[r])}return e}function QO(t){let e=[];if(t.userinfo!==void 0&&(e.push(t.userinfo),e.push("@")),t.host!==void 0){let r=unescape(t.host);if(!o_(r)){let n=s_(r);n.isIPV6===!0?r=`[${n.escapedHost}]`:r=a_(r,!1)}e.push(r)}return(typeof t.port=="number"||typeof t.port=="string")&&(e.push(":"),e.push(String(t.port))),e.length?e.join(""):void 0}c_.exports={nonSimpleDomain:UO,recomposeAuthority:QO,reescapeHostDelimiters:a_,normalizePercentEncoding:JO,normalizePathEncoding:YO,escapePreservingEscapes:XO,removeDotSegments:VO,isIPv4:o_,isUUID:qO,normalizeIPv6:s_,stringArrayToHexStripped:Df}});var f_=T((N6,d_)=>{"use strict";var{isUUID:e1}=Mf(),t1=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,r1=["http","https","ws","wss","urn","urn:uuid"];function n1(t){return r1.indexOf(t)!==-1}function qf(t){return t.secure===!0?!0:t.secure===!1?!1:t.scheme?t.scheme.length===3&&(t.scheme[0]==="w"||t.scheme[0]==="W")&&(t.scheme[1]==="s"||t.scheme[1]==="S")&&(t.scheme[2]==="s"||t.scheme[2]==="S"):!1}function l_(t){return t.host||(t.error=t.error||"HTTP URIs must have a host."),t}function u_(t){let e=String(t.scheme).toLowerCase()==="https";return(t.port===(e?443:80)||t.port==="")&&(t.port=void 0),t.path||(t.path="/"),t}function o1(t){return t.secure=qf(t),t.resourceName=(t.path||"/")+(t.query?"?"+t.query:""),t.path=void 0,t.query=void 0,t}function i1(t){if((t.port===(qf(t)?443:80)||t.port==="")&&(t.port=void 0),typeof t.secure=="boolean"&&(t.scheme=t.secure?"wss":"ws",t.secure=void 0),t.resourceName){let[e,r]=t.resourceName.split("?");t.path=e&&e!=="/"?e:void 0,t.query=r,t.resourceName=void 0}return t.fragment=void 0,t}function s1(t,e){if(!t.path)return t.error="URN can not be parsed",t;let r=t.path.match(t1);if(r){let n=e.scheme||t.scheme||"urn";t.nid=r[1].toLowerCase(),t.nss=r[2];let o=`${n}:${e.nid||t.nid}`,i=Ff(o);t.path=void 0,i&&(t=i.parse(t,e))}else t.error=t.error||"URN can not be parsed.";return t}function a1(t,e){if(t.nid===void 0)throw new Error("URN without nid cannot be serialized");let r=e.scheme||t.scheme||"urn",n=t.nid.toLowerCase(),o=`${r}:${e.nid||n}`,i=Ff(o);i&&(t=i.serialize(t,e));let s=t,a=t.nss;return s.path=`${n||e.nid}:${a}`,e.skipEscape=!0,s}function c1(t,e){let r=t;return r.uuid=r.nss,r.nss=void 0,!e.tolerant&&(!r.uuid||!e1(r.uuid))&&(r.error=r.error||"UUID is not valid."),r}function l1(t){let e=t;return e.nss=(t.uuid||"").toLowerCase(),e}var p_={scheme:"http",domainHost:!0,parse:l_,serialize:u_},u1={scheme:"https",domainHost:p_.domainHost,parse:l_,serialize:u_},Zc={scheme:"ws",domainHost:!0,parse:o1,serialize:i1},p1={scheme:"wss",domainHost:Zc.domainHost,parse:Zc.parse,serialize:Zc.serialize},d1={scheme:"urn",parse:s1,serialize:a1,skipNormalize:!0},f1={scheme:"urn:uuid",parse:c1,serialize:l1,skipNormalize:!0},Bc={http:p_,https:u1,ws:Zc,wss:p1,urn:d1,"urn:uuid":f1};Object.setPrototypeOf(Bc,null);function Ff(t){return t&&(Bc[t]||Bc[t.toLowerCase()])||void 0}d_.exports={wsIsSecure:qf,SCHEMES:Bc,isValidSchemeName:n1,getSchemeHandler:Ff}});var v_=T((j6,Hc)=>{"use strict";var{normalizeIPv6:m1,removeDotSegments:Ds,recomposeAuthority:h1,normalizePercentEncoding:g1,normalizePathEncoding:y1,escapePreservingEscapes:x1,reescapeHostDelimiters:v1,isIPv4:b1,nonSimpleDomain:_1}=Mf(),{SCHEMES:w1,getSchemeHandler:h_}=f_();function S1(t,e){return typeof t=="string"?t=R1(t,e):typeof t=="object"&&(t=hi(To(t,e),e)),t}function k1(t,e,r){let n=r?Object.assign({scheme:"null"},r):{scheme:"null"},o=g_(hi(t,n),hi(e,n),n,!0);return n.skipEscape=!0,To(o,n)}function g_(t,e,r,n){let o={};return n||(t=hi(To(t,r),r),e=hi(To(e,r),r)),r=r||{},!r.tolerant&&e.scheme?(o.scheme=e.scheme,o.userinfo=e.userinfo,o.host=e.host,o.port=e.port,o.path=Ds(e.path||""),o.query=e.query):(e.userinfo!==void 0||e.host!==void 0||e.port!==void 0?(o.userinfo=e.userinfo,o.host=e.host,o.port=e.port,o.path=Ds(e.path||""),o.query=e.query):(e.path?(e.path[0]==="/"?o.path=Ds(e.path):((t.userinfo!==void 0||t.host!==void 0||t.port!==void 0)&&!t.path?o.path="/"+e.path:t.path?o.path=t.path.slice(0,t.path.lastIndexOf("/")+1)+e.path:o.path=e.path,o.path=Ds(o.path)),o.query=e.query):(o.path=t.path,e.query!==void 0?o.query=e.query:o.query=t.query),o.userinfo=t.userinfo,o.host=t.host,o.port=t.port),o.scheme=t.scheme),o.fragment=e.fragment,o}function $1(t,e,r){let n=m_(t,r),o=m_(e,r);return n!==void 0&&o!==void 0&&n.toLowerCase()===o.toLowerCase()}function To(t,e){let r={host:t.host,scheme:t.scheme,userinfo:t.userinfo,port:t.port,path:t.path,query:t.query,nid:t.nid,nss:t.nss,uuid:t.uuid,fragment:t.fragment,reference:t.reference,resourceName:t.resourceName,secure:t.secure,error:""},n=Object.assign({},e),o=[],i=h_(n.scheme||r.scheme);i&&i.serialize&&i.serialize(r,n),r.path!==void 0&&(n.skipEscape?r.path=g1(r.path):(r.path=x1(r.path),r.scheme!==void 0&&(r.path=r.path.split("%3A").join(":")))),n.reference!=="suffix"&&r.scheme&&o.push(r.scheme,":");let s=h1(r);if(s!==void 0&&(n.reference!=="suffix"&&o.push("//"),o.push(s),r.path&&r.path[0]!=="/"&&o.push("/")),r.path!==void 0){let a=r.path;!n.absolutePath&&(!i||!i.absolutePath)&&(a=Ds(a)),s===void 0&&a[0]==="/"&&a[1]==="/"&&(a="/%2F"+a.slice(2)),o.push(a)}return r.query!==void 0&&o.push("?",r.query),r.fragment!==void 0&&o.push("#",r.fragment),o.join("")}var E1=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function T1(t,e){if(e[2]!==void 0&&t.path&&t.path[0]!=="/")return'URI path must start with "/" when authority is present.';if(typeof t.port=="number"&&(t.port<0||t.port>65535))return"URI port is malformed."}function y_(t,e){let r=Object.assign({},e),n={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},o=!1,i=!1;r.reference==="suffix"&&(r.scheme?t=r.scheme+":"+t:t="//"+t);let s=t.match(E1);if(s){n.scheme=s[1],n.userinfo=s[3],n.host=s[4],n.port=parseInt(s[5],10),n.path=s[6]||"",n.query=s[7],n.fragment=s[8],isNaN(n.port)&&(n.port=s[5]);let a=T1(n,s);if(a!==void 0&&(n.error=n.error||a,o=!0),n.host)if(b1(n.host)===!1){let p=m1(n.host);n.host=p.host.toLowerCase(),i=p.isIPV6}else i=!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 c=h_(r.scheme||n.scheme);if(!r.unicodeSupport&&(!c||!c.unicodeSupport)&&n.host&&(r.domainHost||c&&c.domainHost)&&i===!1&&_1(n.host))try{n.host=new URL("http://"+n.host).hostname}catch(l){n.error=n.error||"Host's domain name can not be converted to ASCII: "+l}if((!c||c&&!c.skipNormalize)&&(t.indexOf("%")!==-1&&(n.scheme!==void 0&&(n.scheme=unescape(n.scheme)),n.host!==void 0&&(n.host=v1(unescape(n.host),i))),n.path&&(n.path=y1(n.path)),n.fragment))try{n.fragment=encodeURI(decodeURIComponent(n.fragment))}catch{n.error=n.error||"URI malformed"}c&&c.parse&&c.parse(n,r)}else n.error=n.error||"URI can not be parsed.";return{parsed:n,malformedAuthorityOrPort:o}}function hi(t,e){return y_(t,e).parsed}function R1(t,e){return x_(t,e).normalized}function x_(t,e){let{parsed:r,malformedAuthorityOrPort:n}=y_(t,e);return{normalized:n?t:To(r,e),malformedAuthorityOrPort:n}}function m_(t,e){if(typeof t=="string"){let{normalized:r,malformedAuthorityOrPort:n}=x_(t,e);return n?void 0:r}if(typeof t=="object")return To(t,e)}var Uf={SCHEMES:w1,normalize:S1,resolve:k1,resolveComponent:g_,equal:$1,serialize:To,parse:hi};Hc.exports=Uf;Hc.exports.default=Uf;Hc.exports.fastUri=Uf});var __=T(Zf=>{"use strict";Object.defineProperty(Zf,"__esModule",{value:!0});var b_=v_();b_.code='require("ajv/dist/runtime/uri").default';Zf.default=b_});var P_=T(Mt=>{"use strict";Object.defineProperty(Mt,"__esModule",{value:!0});Mt.CodeGen=Mt.Name=Mt.nil=Mt.stringify=Mt.str=Mt._=Mt.KeywordCxt=void 0;var P1=js();Object.defineProperty(Mt,"KeywordCxt",{enumerable:!0,get:function(){return P1.KeywordCxt}});var gi=be();Object.defineProperty(Mt,"_",{enumerable:!0,get:function(){return gi._}});Object.defineProperty(Mt,"str",{enumerable:!0,get:function(){return gi.str}});Object.defineProperty(Mt,"stringify",{enumerable:!0,get:function(){return gi.stringify}});Object.defineProperty(Mt,"nil",{enumerable:!0,get:function(){return gi.nil}});Object.defineProperty(Mt,"Name",{enumerable:!0,get:function(){return gi.Name}});Object.defineProperty(Mt,"CodeGen",{enumerable:!0,get:function(){return gi.CodeGen}});var A1=qc(),E_=Ls(),I1=yf(),Ms=Uc(),z1=be(),qs=Cs(),Vc=zs(),Hf=De(),w_=r_(),C1=__(),T_=(t,e)=>new RegExp(t,e);T_.code="new RegExp";var O1=["removeAdditional","useDefaults","coerceTypes"],N1=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),j1={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."},L1={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},S_=200;function D1(t){var e,r,n,o,i,s,a,c,l,p,d,f,m,y,v,x,g,_,w,$,E,Z,q,$e,Pe;let le=t.strict,Je=(e=t.code)===null||e===void 0?void 0:e.optimize,Ct=Je===!0||Je===void 0?1:Je||0,St=(n=(r=t.code)===null||r===void 0?void 0:r.regExp)!==null&&n!==void 0?n:T_,de=(o=t.uriResolver)!==null&&o!==void 0?o:C1.default;return{strictSchema:(s=(i=t.strictSchema)!==null&&i!==void 0?i:le)!==null&&s!==void 0?s:!0,strictNumbers:(c=(a=t.strictNumbers)!==null&&a!==void 0?a:le)!==null&&c!==void 0?c:!0,strictTypes:(p=(l=t.strictTypes)!==null&&l!==void 0?l:le)!==null&&p!==void 0?p:"log",strictTuples:(f=(d=t.strictTuples)!==null&&d!==void 0?d:le)!==null&&f!==void 0?f:"log",strictRequired:(y=(m=t.strictRequired)!==null&&m!==void 0?m:le)!==null&&y!==void 0?y:!1,code:t.code?{...t.code,optimize:Ct,regExp:St}:{optimize:Ct,regExp:St},loopRequired:(v=t.loopRequired)!==null&&v!==void 0?v:S_,loopEnum:(x=t.loopEnum)!==null&&x!==void 0?x:S_,meta:(g=t.meta)!==null&&g!==void 0?g:!0,messages:(_=t.messages)!==null&&_!==void 0?_:!0,inlineRefs:(w=t.inlineRefs)!==null&&w!==void 0?w:!0,schemaId:($=t.schemaId)!==null&&$!==void 0?$:"$id",addUsedSchema:(E=t.addUsedSchema)!==null&&E!==void 0?E:!0,validateSchema:(Z=t.validateSchema)!==null&&Z!==void 0?Z:!0,validateFormats:(q=t.validateFormats)!==null&&q!==void 0?q:!0,unicodeRegExp:($e=t.unicodeRegExp)!==null&&$e!==void 0?$e:!0,int32range:(Pe=t.int32range)!==null&&Pe!==void 0?Pe:!0,uriResolver:de}}var Fs=class{constructor(e={}){this.schemas={},this.refs={},this.formats=Object.create(null),this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts={...e,...D1(e)};let{es5:r,lines:n}=this.opts.code;this.scope=new z1.ValueScope({scope:{},prefixes:N1,es5:r,lines:n}),this.logger=B1(e.logger);let o=e.validateFormats;e.validateFormats=!1,this.RULES=(0,I1.getRules)(),k_.call(this,j1,e,"NOT SUPPORTED"),k_.call(this,L1,e,"DEPRECATED","warn"),this._metaOpts=U1.call(this),e.formats&&q1.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&F1.call(this,e.keywords),typeof e.meta=="object"&&this.addMetaSchema(e.meta),M1.call(this),e.validateFormats=o}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:e,meta:r,schemaId:n}=this.opts,o=w_;n==="id"&&(o={...w_},o.id=o.$id,delete o.$id),r&&e&&this.addMetaSchema(o,o[n],!1)}defaultMeta(){let{meta:e,schemaId:r}=this.opts;return this.opts.defaultMeta=typeof e=="object"?e[r]||e:void 0}validate(e,r){let n;if(typeof e=="string"){if(n=this.getSchema(e),!n)throw new Error(`no schema with key or ref "${e}"`)}else n=this.compile(e);let o=n(r);return"$async"in n||(this.errors=n.errors),o}compile(e,r){let n=this._addSchema(e,r);return n.validate||this._compileSchemaEnv(n)}compileAsync(e,r){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");let{loadSchema:n}=this.opts;return o.call(this,e,r);async function o(p,d){await i.call(this,p.$schema);let f=this._addSchema(p,d);return f.validate||s.call(this,f)}async function i(p){p&&!this.getSchema(p)&&await o.call(this,{$ref:p},!0)}async function s(p){try{return this._compileSchemaEnv(p)}catch(d){if(!(d instanceof E_.default))throw d;return a.call(this,d),await c.call(this,d.missingSchema),s.call(this,p)}}function a({missingSchema:p,missingRef:d}){if(this.refs[p])throw new Error(`AnySchema ${p} is loaded but ${d} cannot be resolved`)}async function c(p){let d=await l.call(this,p);this.refs[p]||await i.call(this,d.$schema),this.refs[p]||this.addSchema(d,p,r)}async function l(p){let d=this._loading[p];if(d)return d;try{return await(this._loading[p]=n(p))}finally{delete this._loading[p]}}}addSchema(e,r,n,o=this.opts.validateSchema){if(Array.isArray(e)){for(let s of e)this.addSchema(s,void 0,n,o);return this}let i;if(typeof e=="object"){let{schemaId:s}=this.opts;if(i=e[s],i!==void 0&&typeof i!="string")throw new Error(`schema ${s} must be string`)}return r=(0,qs.normalizeId)(r||i),this._checkUnique(r),this.schemas[r]=this._addSchema(e,n,r,o,!0),this}addMetaSchema(e,r,n=this.opts.validateSchema){return this.addSchema(e,r,!0,n),this}validateSchema(e,r){if(typeof e=="boolean")return!0;let n;if(n=e.$schema,n!==void 0&&typeof n!="string")throw new Error("$schema must be a string");if(n=n||this.opts.defaultMeta||this.defaultMeta(),!n)return this.logger.warn("meta-schema not available"),this.errors=null,!0;let o=this.validate(n,e);if(!o&&r){let i="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(i);else throw new Error(i)}return o}getSchema(e){let r;for(;typeof(r=$_.call(this,e))=="string";)e=r;if(r===void 0){let{schemaId:n}=this.opts,o=new Ms.SchemaEnv({schema:{},schemaId:n});if(r=Ms.resolveSchema.call(this,o,e),!r)return;this.refs[e]=r}return r.validate||this._compileSchemaEnv(r)}removeSchema(e){if(e instanceof RegExp)return this._removeAllSchemas(this.schemas,e),this._removeAllSchemas(this.refs,e),this;switch(typeof e){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{let r=$_.call(this,e);return typeof r=="object"&&this._cache.delete(r.schema),delete this.schemas[e],delete this.refs[e],this}case"object":{let r=e;this._cache.delete(r);let n=e[this.opts.schemaId];return n&&(n=(0,qs.normalizeId)(n),delete this.schemas[n],delete this.refs[n]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(e){for(let r of e)this.addKeyword(r);return this}addKeyword(e,r){let n;if(typeof e=="string")n=e,typeof r=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),r.keyword=n);else if(typeof e=="object"&&r===void 0){if(r=e,n=r.keyword,Array.isArray(n)&&!n.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(V1.call(this,n,r),!r)return(0,Hf.eachItem)(n,i=>Bf.call(this,i)),this;W1.call(this,r);let o={...r,type:(0,Vc.getJSONTypes)(r.type),schemaType:(0,Vc.getJSONTypes)(r.schemaType)};return(0,Hf.eachItem)(n,o.type.length===0?i=>Bf.call(this,i,o):i=>o.type.forEach(s=>Bf.call(this,i,o,s))),this}getKeyword(e){let r=this.RULES.all[e];return typeof r=="object"?r.definition:!!r}removeKeyword(e){let{RULES:r}=this;delete r.keywords[e],delete r.all[e];for(let n of r.rules){let o=n.rules.findIndex(i=>i.keyword===e);o>=0&&n.rules.splice(o,1)}return this}addFormat(e,r){return typeof r=="string"&&(r=new RegExp(r)),this.formats[e]=r,this}errorsText(e=this.errors,{separator:r=", ",dataVar:n="data"}={}){return!e||e.length===0?"No errors":e.map(o=>`${n}${o.instancePath} ${o.message}`).reduce((o,i)=>o+r+i)}$dataMetaSchema(e,r){let n=this.RULES.all;e=JSON.parse(JSON.stringify(e));for(let o of r){let i=o.split("/").slice(1),s=e;for(let a of i)s=s[a];for(let a in n){let c=n[a];if(typeof c!="object")continue;let{$data:l}=c.definition,p=s[a];l&&p&&(s[a]=R_(p))}}return e}_removeAllSchemas(e,r){for(let n in e){let o=e[n];(!r||r.test(n))&&(typeof o=="string"?delete e[n]:o&&!o.meta&&(this._cache.delete(o.schema),delete e[n]))}}_addSchema(e,r,n,o=this.opts.validateSchema,i=this.opts.addUsedSchema){let s,{schemaId:a}=this.opts;if(typeof e=="object")s=e[a];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof e!="boolean")throw new Error("schema must be object or boolean")}let c=this._cache.get(e);if(c!==void 0)return c;n=(0,qs.normalizeId)(s||n);let l=qs.getSchemaRefs.call(this,e,n);return c=new Ms.SchemaEnv({schema:e,schemaId:a,meta:r,baseId:n,localRefs:l}),this._cache.set(c.schema,c),i&&!n.startsWith("#")&&(n&&this._checkUnique(n),this.refs[n]=c),o&&this.validateSchema(e,!0),c}_checkUnique(e){if(this.schemas[e]||this.refs[e])throw new Error(`schema with key or id "${e}" already exists`)}_compileSchemaEnv(e){if(e.meta?this._compileMetaSchema(e):Ms.compileSchema.call(this,e),!e.validate)throw new Error("ajv implementation error");return e.validate}_compileMetaSchema(e){let r=this.opts;this.opts=this._metaOpts;try{Ms.compileSchema.call(this,e)}finally{this.opts=r}}};Fs.ValidationError=A1.default;Fs.MissingRefError=E_.default;Mt.default=Fs;function k_(t,e,r,n="error"){for(let o in t){let i=o;i in e&&this.logger[n](`${r}: option ${o}. ${t[i]}`)}}function $_(t){return t=(0,qs.normalizeId)(t),this.schemas[t]||this.refs[t]}function M1(){let t=this.opts.schemas;if(t)if(Array.isArray(t))this.addSchema(t);else for(let e in t)this.addSchema(t[e],e)}function q1(){for(let t in this.opts.formats){let e=this.opts.formats[t];e&&this.addFormat(t,e)}}function F1(t){if(Array.isArray(t)){this.addVocabulary(t);return}this.logger.warn("keywords option as map is deprecated, pass array");for(let e in t){let r=t[e];r.keyword||(r.keyword=e),this.addKeyword(r)}}function U1(){let t={...this.opts};for(let e of O1)delete t[e];return t}var Z1={log(){},warn(){},error(){}};function B1(t){if(t===!1)return Z1;if(t===void 0)return console;if(t.log&&t.warn&&t.error)return t;throw new Error("logger must implement log, warn and error methods")}var H1=/^[a-z_$][a-z0-9_$:-]*$/i;function V1(t,e){let{RULES:r}=this;if((0,Hf.eachItem)(t,n=>{if(r.keywords[n])throw new Error(`Keyword ${n} is already defined`);if(!H1.test(n))throw new Error(`Keyword ${n} has invalid name`)}),!!e&&e.$data&&!("code"in e||"validate"in e))throw new Error('$data keyword must have "code" or "validate" function')}function Bf(t,e,r){var n;let o=e==null?void 0:e.post;if(r&&o)throw new Error('keyword with "post" flag cannot have "type"');let{RULES:i}=this,s=o?i.post:i.rules.find(({type:c})=>c===r);if(s||(s={type:r,rules:[]},i.rules.push(s)),i.keywords[t]=!0,!e)return;let a={keyword:t,definition:{...e,type:(0,Vc.getJSONTypes)(e.type),schemaType:(0,Vc.getJSONTypes)(e.schemaType)}};e.before?G1.call(this,s,a,e.before):s.rules.push(a),i.all[t]=a,(n=e.implements)===null||n===void 0||n.forEach(c=>this.addKeyword(c))}function G1(t,e,r){let n=t.rules.findIndex(o=>o.keyword===r);n>=0?t.rules.splice(n,0,e):(t.rules.push(e),this.logger.warn(`rule ${r} is not defined`))}function W1(t){let{metaSchema:e}=t;e!==void 0&&(t.$data&&this.opts.$data&&(e=R_(e)),t.validateSchema=this.compile(e,!0))}var K1={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function R_(t){return{anyOf:[t,K1]}}});var A_=T(Vf=>{"use strict";Object.defineProperty(Vf,"__esModule",{value:!0});var J1={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};Vf.default=J1});var O_=T(Ro=>{"use strict";Object.defineProperty(Ro,"__esModule",{value:!0});Ro.callRef=Ro.getValidate=void 0;var Y1=Ls(),I_=Tr(),ur=be(),yi=xn(),z_=Uc(),Gc=De(),X1={keyword:"$ref",schemaType:"string",code(t){let{gen:e,schema:r,it:n}=t,{baseId:o,schemaEnv:i,validateName:s,opts:a,self:c}=n,{root:l}=i;if((r==="#"||r==="#/")&&o===l.baseId)return d();let p=z_.resolveRef.call(c,l,o,r);if(p===void 0)throw new Y1.default(n.opts.uriResolver,o,r);if(p instanceof z_.SchemaEnv)return f(p);return m(p);function d(){if(i===l)return Wc(t,s,i,i.$async);let y=e.scopeValue("root",{ref:l});return Wc(t,(0,ur._)`${y}.validate`,l,l.$async)}function f(y){let v=C_(t,y);Wc(t,v,y,y.$async)}function m(y){let v=e.scopeValue("schema",a.code.source===!0?{ref:y,code:(0,ur.stringify)(y)}:{ref:y}),x=e.name("valid"),g=t.subschema({schema:y,dataTypes:[],schemaPath:ur.nil,topSchemaRef:v,errSchemaPath:r},x);t.mergeEvaluated(g),t.ok(x)}}};function C_(t,e){let{gen:r}=t;return e.validate?r.scopeValue("validate",{ref:e.validate}):(0,ur._)`${r.scopeValue("wrapper",{ref:e})}.validate`}Ro.getValidate=C_;function Wc(t,e,r,n){let{gen:o,it:i}=t,{allErrors:s,schemaEnv:a,opts:c}=i,l=c.passContext?yi.default.this:ur.nil;n?p():d();function p(){if(!a.$async)throw new Error("async schema referenced by sync schema");let y=o.let("valid");o.try(()=>{o.code((0,ur._)`await ${(0,I_.callValidateCode)(t,e,l)}`),m(e),s||o.assign(y,!0)},v=>{o.if((0,ur._)`!(${v} instanceof ${i.ValidationError})`,()=>o.throw(v)),f(v),s||o.assign(y,!1)}),t.ok(y)}function d(){t.result((0,I_.callValidateCode)(t,e,l),()=>m(e),()=>f(e))}function f(y){let v=(0,ur._)`${y}.errors`;o.assign(yi.default.vErrors,(0,ur._)`${yi.default.vErrors} === null ? ${v} : ${yi.default.vErrors}.concat(${v})`),o.assign(yi.default.errors,(0,ur._)`${yi.default.vErrors}.length`)}function m(y){var v;if(!i.opts.unevaluated)return;let x=(v=r==null?void 0:r.validate)===null||v===void 0?void 0:v.evaluated;if(i.props!==!0)if(x&&!x.dynamicProps)x.props!==void 0&&(i.props=Gc.mergeEvaluated.props(o,x.props,i.props));else{let g=o.var("props",(0,ur._)`${y}.evaluated.props`);i.props=Gc.mergeEvaluated.props(o,g,i.props,ur.Name)}if(i.items!==!0)if(x&&!x.dynamicItems)x.items!==void 0&&(i.items=Gc.mergeEvaluated.items(o,x.items,i.items));else{let g=o.var("items",(0,ur._)`${y}.evaluated.items`);i.items=Gc.mergeEvaluated.items(o,g,i.items,ur.Name)}}}Ro.callRef=Wc;Ro.default=X1});var N_=T(Gf=>{"use strict";Object.defineProperty(Gf,"__esModule",{value:!0});var Q1=A_(),eN=O_(),tN=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",Q1.default,eN.default];Gf.default=tN});var j_=T(Wf=>{"use strict";Object.defineProperty(Wf,"__esModule",{value:!0});var Kc=be(),Dn=Kc.operators,Jc={maximum:{okStr:"<=",ok:Dn.LTE,fail:Dn.GT},minimum:{okStr:">=",ok:Dn.GTE,fail:Dn.LT},exclusiveMaximum:{okStr:"<",ok:Dn.LT,fail:Dn.GTE},exclusiveMinimum:{okStr:">",ok:Dn.GT,fail:Dn.LTE}},rN={message:({keyword:t,schemaCode:e})=>(0,Kc.str)`must be ${Jc[t].okStr} ${e}`,params:({keyword:t,schemaCode:e})=>(0,Kc._)`{comparison: ${Jc[t].okStr}, limit: ${e}}`},nN={keyword:Object.keys(Jc),type:"number",schemaType:"number",$data:!0,error:rN,code(t){let{keyword:e,data:r,schemaCode:n}=t;t.fail$data((0,Kc._)`${r} ${Jc[e].fail} ${n} || isNaN(${r})`)}};Wf.default=nN});var L_=T(Kf=>{"use strict";Object.defineProperty(Kf,"__esModule",{value:!0});var Us=be(),oN={message:({schemaCode:t})=>(0,Us.str)`must be multiple of ${t}`,params:({schemaCode:t})=>(0,Us._)`{multipleOf: ${t}}`},iN={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:oN,code(t){let{gen:e,data:r,schemaCode:n,it:o}=t,i=o.opts.multipleOfPrecision,s=e.let("res"),a=i?(0,Us._)`Math.abs(Math.round(${s}) - ${s}) > 1e-${i}`:(0,Us._)`${s} !== parseInt(${s})`;t.fail$data((0,Us._)`(${n} === 0 || (${s} = ${r}/${n}, ${a}))`)}};Kf.default=iN});var M_=T(Jf=>{"use strict";Object.defineProperty(Jf,"__esModule",{value:!0});function D_(t){let e=t.length,r=0,n=0,o;for(;n<e;)r++,o=t.charCodeAt(n++),o>=55296&&o<=56319&&n<e&&(o=t.charCodeAt(n),(o&64512)===56320&&n++);return r}Jf.default=D_;D_.code='require("ajv/dist/runtime/ucs2length").default'});var q_=T(Yf=>{"use strict";Object.defineProperty(Yf,"__esModule",{value:!0});var Po=be(),sN=De(),aN=M_(),cN={message({keyword:t,schemaCode:e}){let r=t==="maxLength"?"more":"fewer";return(0,Po.str)`must NOT have ${r} than ${e} characters`},params:({schemaCode:t})=>(0,Po._)`{limit: ${t}}`},lN={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:cN,code(t){let{keyword:e,data:r,schemaCode:n,it:o}=t,i=e==="maxLength"?Po.operators.GT:Po.operators.LT,s=o.opts.unicode===!1?(0,Po._)`${r}.length`:(0,Po._)`${(0,sN.useFunc)(t.gen,aN.default)}(${r})`;t.fail$data((0,Po._)`${s} ${i} ${n}`)}};Yf.default=lN});var F_=T(Xf=>{"use strict";Object.defineProperty(Xf,"__esModule",{value:!0});var uN=Tr(),pN=De(),xi=be(),dN={message:({schemaCode:t})=>(0,xi.str)`must match pattern "${t}"`,params:({schemaCode:t})=>(0,xi._)`{pattern: ${t}}`},fN={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:dN,code(t){let{gen:e,data:r,$data:n,schema:o,schemaCode:i,it:s}=t,a=s.opts.unicodeRegExp?"u":"";if(n){let{regExp:c}=s.opts.code,l=c.code==="new RegExp"?(0,xi._)`new RegExp`:(0,pN.useFunc)(e,c),p=e.let("valid");e.try(()=>e.assign(p,(0,xi._)`${l}(${i}, ${a}).test(${r})`),()=>e.assign(p,!1)),t.fail$data((0,xi._)`!${p}`)}else{let c=(0,uN.usePattern)(t,o);t.fail$data((0,xi._)`!${c}.test(${r})`)}}};Xf.default=fN});var U_=T(Qf=>{"use strict";Object.defineProperty(Qf,"__esModule",{value:!0});var Zs=be(),mN={message({keyword:t,schemaCode:e}){let r=t==="maxProperties"?"more":"fewer";return(0,Zs.str)`must NOT have ${r} than ${e} properties`},params:({schemaCode:t})=>(0,Zs._)`{limit: ${t}}`},hN={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:mN,code(t){let{keyword:e,data:r,schemaCode:n}=t,o=e==="maxProperties"?Zs.operators.GT:Zs.operators.LT;t.fail$data((0,Zs._)`Object.keys(${r}).length ${o} ${n}`)}};Qf.default=hN});var Z_=T(em=>{"use strict";Object.defineProperty(em,"__esModule",{value:!0});var Bs=Tr(),Hs=be(),gN=De(),yN={message:({params:{missingProperty:t}})=>(0,Hs.str)`must have required property '${t}'`,params:({params:{missingProperty:t}})=>(0,Hs._)`{missingProperty: ${t}}`},xN={keyword:"required",type:"object",schemaType:"array",$data:!0,error:yN,code(t){let{gen:e,schema:r,schemaCode:n,data:o,$data:i,it:s}=t,{opts:a}=s;if(!i&&r.length===0)return;let c=r.length>=a.loopRequired;if(s.allErrors?l():p(),a.strictRequired){let m=t.parentSchema.properties,{definedProperties:y}=t.it;for(let v of r)if((m==null?void 0:m[v])===void 0&&!y.has(v)){let x=s.schemaEnv.baseId+s.errSchemaPath,g=`required property "${v}" is not defined at "${x}" (strictRequired)`;(0,gN.checkStrictMode)(s,g,s.opts.strictRequired)}}function l(){if(c||i)t.block$data(Hs.nil,d);else for(let m of r)(0,Bs.checkReportMissingProp)(t,m)}function p(){let m=e.let("missing");if(c||i){let y=e.let("valid",!0);t.block$data(y,()=>f(m,y)),t.ok(y)}else e.if((0,Bs.checkMissingProp)(t,r,m)),(0,Bs.reportMissingProp)(t,m),e.else()}function d(){e.forOf("prop",n,m=>{t.setParams({missingProperty:m}),e.if((0,Bs.noPropertyInData)(e,o,m,a.ownProperties),()=>t.error())})}function f(m,y){t.setParams({missingProperty:m}),e.forOf(m,n,()=>{e.assign(y,(0,Bs.propertyInData)(e,o,m,a.ownProperties)),e.if((0,Hs.not)(y),()=>{t.error(),e.break()})},Hs.nil)}}};em.default=xN});var B_=T(tm=>{"use strict";Object.defineProperty(tm,"__esModule",{value:!0});var Vs=be(),vN={message({keyword:t,schemaCode:e}){let r=t==="maxItems"?"more":"fewer";return(0,Vs.str)`must NOT have ${r} than ${e} items`},params:({schemaCode:t})=>(0,Vs._)`{limit: ${t}}`},bN={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:vN,code(t){let{keyword:e,data:r,schemaCode:n}=t,o=e==="maxItems"?Vs.operators.GT:Vs.operators.LT;t.fail$data((0,Vs._)`${r}.length ${o} ${n}`)}};tm.default=bN});var Yc=T(rm=>{"use strict";Object.defineProperty(rm,"__esModule",{value:!0});var H_=$f();H_.code='require("ajv/dist/runtime/equal").default';rm.default=H_});var V_=T(om=>{"use strict";Object.defineProperty(om,"__esModule",{value:!0});var nm=zs(),qt=be(),_N=De(),wN=Yc(),SN={message:({params:{i:t,j:e}})=>(0,qt.str)`must NOT have duplicate items (items ## ${e} and ${t} are identical)`,params:({params:{i:t,j:e}})=>(0,qt._)`{i: ${t}, j: ${e}}`},kN={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:SN,code(t){let{gen:e,data:r,$data:n,schema:o,parentSchema:i,schemaCode:s,it:a}=t;if(!n&&!o)return;let c=e.let("valid"),l=i.items?(0,nm.getSchemaTypes)(i.items):[];t.block$data(c,p,(0,qt._)`${s} === false`),t.ok(c);function p(){let y=e.let("i",(0,qt._)`${r}.length`),v=e.let("j");t.setParams({i:y,j:v}),e.assign(c,!0),e.if((0,qt._)`${y} > 1`,()=>(d()?f:m)(y,v))}function d(){return l.length>0&&!l.some(y=>y==="object"||y==="array")}function f(y,v){let x=e.name("item"),g=(0,nm.checkDataTypes)(l,x,a.opts.strictNumbers,nm.DataType.Wrong),_=e.const("indices",(0,qt._)`{}`);e.for((0,qt._)`;${y}--;`,()=>{e.let(x,(0,qt._)`${r}[${y}]`),e.if(g,(0,qt._)`continue`),l.length>1&&e.if((0,qt._)`typeof ${x} == "string"`,(0,qt._)`${x} += "_"`),e.if((0,qt._)`typeof ${_}[${x}] == "number"`,()=>{e.assign(v,(0,qt._)`${_}[${x}]`),t.error(),e.assign(c,!1).break()}).code((0,qt._)`${_}[${x}] = ${y}`)})}function m(y,v){let x=(0,_N.useFunc)(e,wN.default),g=e.name("outer");e.label(g).for((0,qt._)`;${y}--;`,()=>e.for((0,qt._)`${v} = ${y}; ${v}--;`,()=>e.if((0,qt._)`${x}(${r}[${y}], ${r}[${v}])`,()=>{t.error(),e.assign(c,!1).break(g)})))}}};om.default=kN});var G_=T(sm=>{"use strict";Object.defineProperty(sm,"__esModule",{value:!0});var im=be(),$N=De(),EN=Yc(),TN={message:"must be equal to constant",params:({schemaCode:t})=>(0,im._)`{allowedValue: ${t}}`},RN={keyword:"const",$data:!0,error:TN,code(t){let{gen:e,data:r,$data:n,schemaCode:o,schema:i}=t;n||i&&typeof i=="object"?t.fail$data((0,im._)`!${(0,$N.useFunc)(e,EN.default)}(${r}, ${o})`):t.fail((0,im._)`${i} !== ${r}`)}};sm.default=RN});var W_=T(am=>{"use strict";Object.defineProperty(am,"__esModule",{value:!0});var Gs=be(),PN=De(),AN=Yc(),IN={message:"must be equal to one of the allowed values",params:({schemaCode:t})=>(0,Gs._)`{allowedValues: ${t}}`},zN={keyword:"enum",schemaType:"array",$data:!0,error:IN,code(t){let{gen:e,data:r,$data:n,schema:o,schemaCode:i,it:s}=t;if(!n&&o.length===0)throw new Error("enum must have non-empty array");let a=o.length>=s.opts.loopEnum,c,l=()=>c??(c=(0,PN.useFunc)(e,AN.default)),p;if(a||n)p=e.let("valid"),t.block$data(p,d);else{if(!Array.isArray(o))throw new Error("ajv implementation error");let m=e.const("vSchema",i);p=(0,Gs.or)(...o.map((y,v)=>f(m,v)))}t.pass(p);function d(){e.assign(p,!1),e.forOf("v",i,m=>e.if((0,Gs._)`${l()}(${r}, ${m})`,()=>e.assign(p,!0).break()))}function f(m,y){let v=o[y];return typeof v=="object"&&v!==null?(0,Gs._)`${l()}(${r}, ${m}[${y}])`:(0,Gs._)`${r} === ${v}`}}};am.default=zN});var K_=T(cm=>{"use strict";Object.defineProperty(cm,"__esModule",{value:!0});var CN=j_(),ON=L_(),NN=q_(),jN=F_(),LN=U_(),DN=Z_(),MN=B_(),qN=V_(),FN=G_(),UN=W_(),ZN=[CN.default,ON.default,NN.default,jN.default,LN.default,DN.default,MN.default,qN.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},FN.default,UN.default];cm.default=ZN});var um=T(Ws=>{"use strict";Object.defineProperty(Ws,"__esModule",{value:!0});Ws.validateAdditionalItems=void 0;var Ao=be(),lm=De(),BN={message:({params:{len:t}})=>(0,Ao.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,Ao._)`{limit: ${t}}`},HN={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:BN,code(t){let{parentSchema:e,it:r}=t,{items:n}=e;if(!Array.isArray(n)){(0,lm.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas');return}J_(t,n)}};function J_(t,e){let{gen:r,schema:n,data:o,keyword:i,it:s}=t;s.items=!0;let a=r.const("len",(0,Ao._)`${o}.length`);if(n===!1)t.setParams({len:e.length}),t.pass((0,Ao._)`${a} <= ${e.length}`);else if(typeof n=="object"&&!(0,lm.alwaysValidSchema)(s,n)){let l=r.var("valid",(0,Ao._)`${a} <= ${e.length}`);r.if((0,Ao.not)(l),()=>c(l)),t.ok(l)}function c(l){r.forRange("i",e.length,a,p=>{t.subschema({keyword:i,dataProp:p,dataPropType:lm.Type.Num},l),s.allErrors||r.if((0,Ao.not)(l),()=>r.break())})}}Ws.validateAdditionalItems=J_;Ws.default=HN});var pm=T(Ks=>{"use strict";Object.defineProperty(Ks,"__esModule",{value:!0});Ks.validateTuple=void 0;var Y_=be(),Xc=De(),VN=Tr(),GN={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(t){let{schema:e,it:r}=t;if(Array.isArray(e))return X_(t,"additionalItems",e);r.items=!0,!(0,Xc.alwaysValidSchema)(r,e)&&t.ok((0,VN.validateArray)(t))}};function X_(t,e,r=t.schema){let{gen:n,parentSchema:o,data:i,keyword:s,it:a}=t;p(o),a.opts.unevaluated&&r.length&&a.items!==!0&&(a.items=Xc.mergeEvaluated.items(n,r.length,a.items));let c=n.name("valid"),l=n.const("len",(0,Y_._)`${i}.length`);r.forEach((d,f)=>{(0,Xc.alwaysValidSchema)(a,d)||(n.if((0,Y_._)`${l} > ${f}`,()=>t.subschema({keyword:s,schemaProp:f,dataProp:f},c)),t.ok(c))});function p(d){let{opts:f,errSchemaPath:m}=a,y=r.length,v=y===d.minItems&&(y===d.maxItems||d[e]===!1);if(f.strictTuples&&!v){let x=`"${s}" is ${y}-tuple, but minItems or maxItems/${e} are not specified or different at path "${m}"`;(0,Xc.checkStrictMode)(a,x,f.strictTuples)}}}Ks.validateTuple=X_;Ks.default=GN});var Q_=T(dm=>{"use strict";Object.defineProperty(dm,"__esModule",{value:!0});var WN=pm(),KN={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:t=>(0,WN.validateTuple)(t,"items")};dm.default=KN});var tw=T(fm=>{"use strict";Object.defineProperty(fm,"__esModule",{value:!0});var ew=be(),JN=De(),YN=Tr(),XN=um(),QN={message:({params:{len:t}})=>(0,ew.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,ew._)`{limit: ${t}}`},ej={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:QN,code(t){let{schema:e,parentSchema:r,it:n}=t,{prefixItems:o}=r;n.items=!0,!(0,JN.alwaysValidSchema)(n,e)&&(o?(0,XN.validateAdditionalItems)(t,o):t.ok((0,YN.validateArray)(t)))}};fm.default=ej});var rw=T(mm=>{"use strict";Object.defineProperty(mm,"__esModule",{value:!0});var Pr=be(),Qc=De(),tj={message:({params:{min:t,max:e}})=>e===void 0?(0,Pr.str)`must contain at least ${t} valid item(s)`:(0,Pr.str)`must contain at least ${t} and no more than ${e} valid item(s)`,params:({params:{min:t,max:e}})=>e===void 0?(0,Pr._)`{minContains: ${t}}`:(0,Pr._)`{minContains: ${t}, maxContains: ${e}}`},rj={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:tj,code(t){let{gen:e,schema:r,parentSchema:n,data:o,it:i}=t,s,a,{minContains:c,maxContains:l}=n;i.opts.next?(s=c===void 0?1:c,a=l):s=1;let p=e.const("len",(0,Pr._)`${o}.length`);if(t.setParams({min:s,max:a}),a===void 0&&s===0){(0,Qc.checkStrictMode)(i,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(a!==void 0&&s>a){(0,Qc.checkStrictMode)(i,'"minContains" > "maxContains" is always invalid'),t.fail();return}if((0,Qc.alwaysValidSchema)(i,r)){let v=(0,Pr._)`${p} >= ${s}`;a!==void 0&&(v=(0,Pr._)`${v} && ${p} <= ${a}`),t.pass(v);return}i.items=!0;let d=e.name("valid");a===void 0&&s===1?m(d,()=>e.if(d,()=>e.break())):s===0?(e.let(d,!0),a!==void 0&&e.if((0,Pr._)`${o}.length > 0`,f)):(e.let(d,!1),f()),t.result(d,()=>t.reset());function f(){let v=e.name("_valid"),x=e.let("count",0);m(v,()=>e.if(v,()=>y(x)))}function m(v,x){e.forRange("i",0,p,g=>{t.subschema({keyword:"contains",dataProp:g,dataPropType:Qc.Type.Num,compositeRule:!0},v),x()})}function y(v){e.code((0,Pr._)`${v}++`),a===void 0?e.if((0,Pr._)`${v} >= ${s}`,()=>e.assign(d,!0).break()):(e.if((0,Pr._)`${v} > ${a}`,()=>e.assign(d,!1).break()),s===1?e.assign(d,!0):e.if((0,Pr._)`${v} >= ${s}`,()=>e.assign(d,!0)))}}};mm.default=rj});var iw=T(tn=>{"use strict";Object.defineProperty(tn,"__esModule",{value:!0});tn.validateSchemaDeps=tn.validatePropertyDeps=tn.error=void 0;var hm=be(),nj=De(),Js=Tr();tn.error={message:({params:{property:t,depsCount:e,deps:r}})=>{let n=e===1?"property":"properties";return(0,hm.str)`must have ${n} ${r} when property ${t} is present`},params:({params:{property:t,depsCount:e,deps:r,missingProperty:n}})=>(0,hm._)`{property: ${t},
|
|
7
|
-
missingProperty: ${
|
|
2
|
+
"use strict";var j$=Object.create;var bu=Object.defineProperty;var L$=Object.getOwnPropertyDescriptor;var D$=Object.getOwnPropertyNames;var M$=Object.getPrototypeOf,F$=Object.prototype.hasOwnProperty;var $=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),za=(t,e)=>{for(var n in e)bu(t,n,{get:e[n],enumerable:!0})},U$=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of D$(e))!F$.call(t,o)&&o!==n&&bu(t,o,{get:()=>e[o],enumerable:!(r=L$(e,o))||r.enumerable});return t};var Ee=(t,e,n)=>(n=t!=null?j$(M$(t)):{},U$(e||!t||!t.__esModule?bu(n,"default",{value:t,enumerable:!0}):n,t));var Is=$(Ze=>{"use strict";Object.defineProperty(Ze,"__esModule",{value:!0});Ze.regexpCode=Ze.getEsmExportName=Ze.getProperty=Ze.safeStringify=Ze.stringify=Ze.strConcat=Ze.addCodeArg=Ze.str=Ze._=Ze.nil=Ze._Code=Ze.Name=Ze.IDENTIFIER=Ze._CodeOrName=void 0;var Rs=class{};Ze._CodeOrName=Rs;Ze.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var So=class extends Rs{constructor(e){if(super(),!Ze.IDENTIFIER.test(e))throw new Error("CodeGen: name must be a valid identifier");this.str=e}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};Ze.Name=So;var $n=class extends Rs{constructor(e){super(),this._items=typeof e=="string"?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let e=this._items[0];return e===""||e==='""'}get str(){var e;return(e=this._str)!==null&&e!==void 0?e:this._str=this._items.reduce((n,r)=>`${n}${r}`,"")}get names(){var e;return(e=this._names)!==null&&e!==void 0?e:this._names=this._items.reduce((n,r)=>(r instanceof So&&(n[r.str]=(n[r.str]||0)+1),n),{})}};Ze._Code=$n;Ze.nil=new $n("");function pb(t,...e){let n=[t[0]],r=0;for(;r<e.length;)nf(n,e[r]),n.push(t[++r]);return new $n(n)}Ze._=pb;var tf=new $n("+");function db(t,...e){let n=[As(t[0])],r=0;for(;r<e.length;)n.push(tf),nf(n,e[r]),n.push(tf,As(t[++r]));return UP(n),new $n(n)}Ze.str=db;function nf(t,e){e instanceof $n?t.push(...e._items):e instanceof So?t.push(e):t.push(BP(e))}Ze.addCodeArg=nf;function UP(t){let e=1;for(;e<t.length-1;){if(t[e]===tf){let n=qP(t[e-1],t[e+1]);if(n!==void 0){t.splice(e-1,3,n);continue}t[e++]="+"}e++}}function qP(t,e){if(e==='""')return t;if(t==='""')return e;if(typeof t=="string")return e instanceof So||t[t.length-1]!=='"'?void 0:typeof e!="string"?`${t.slice(0,-1)}${e}"`:e[0]==='"'?t.slice(0,-1)+e.slice(1):void 0;if(typeof e=="string"&&e[0]==='"'&&!(t instanceof So))return`"${t}${e.slice(1)}`}function ZP(t,e){return e.emptyStr()?t:t.emptyStr()?e:db`${t}${e}`}Ze.strConcat=ZP;function BP(t){return typeof t=="number"||typeof t=="boolean"||t===null?t:As(Array.isArray(t)?t.join(","):t)}function HP(t){return new $n(As(t))}Ze.stringify=HP;function As(t){return JSON.stringify(t).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}Ze.safeStringify=As;function VP(t){return typeof t=="string"&&Ze.IDENTIFIER.test(t)?new $n(`.${t}`):pb`[${t}]`}Ze.getProperty=VP;function GP(t){if(typeof t=="string"&&Ze.IDENTIFIER.test(t))return new $n(`${t}`);throw new Error(`CodeGen: invalid export name: ${t}, use explicit $id name mapping`)}Ze.getEsmExportName=GP;function WP(t){return new $n(t.toString())}Ze.regexpCode=WP});var sf=$(ln=>{"use strict";Object.defineProperty(ln,"__esModule",{value:!0});ln.ValueScope=ln.ValueScopeName=ln.Scope=ln.varKinds=ln.UsedValueState=void 0;var cn=Is(),rf=class extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}},Nc;(function(t){t[t.Started=0]="Started",t[t.Completed=1]="Completed"})(Nc||(ln.UsedValueState=Nc={}));ln.varKinds={const:new cn.Name("const"),let:new cn.Name("let"),var:new cn.Name("var")};var jc=class{constructor({prefixes:e,parent:n}={}){this._names={},this._prefixes=e,this._parent=n}toName(e){return e instanceof cn.Name?e:this.name(e)}name(e){return new cn.Name(this._newName(e))}_newName(e){let n=this._names[e]||this._nameGroup(e);return`${e}${n.index++}`}_nameGroup(e){var n,r;if(!((r=(n=this._parent)===null||n===void 0?void 0:n._prefixes)===null||r===void 0)&&r.has(e)||this._prefixes&&!this._prefixes.has(e))throw new Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}};ln.Scope=jc;var Lc=class extends cn.Name{constructor(e,n){super(n),this.prefix=e}setValue(e,{property:n,itemIndex:r}){this.value=e,this.scopePath=(0,cn._)`.${new cn.Name(n)}[${r}]`}};ln.ValueScopeName=Lc;var KP=(0,cn._)`\n`,of=class extends jc{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?KP:cn.nil}}get(){return this._scope}name(e){return new Lc(e,this._newName(e))}value(e,n){var r;if(n.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let o=this.toName(e),{prefix:i}=o,s=(r=n.key)!==null&&r!==void 0?r:n.ref,a=this._values[i];if(a){let p=a.get(s);if(p)return p}else a=this._values[i]=new Map;a.set(s,o);let c=this._scope[i]||(this._scope[i]=[]),l=c.length;return c[l]=n.ref,o.setValue(n,{property:i,itemIndex:l}),o}getValue(e,n){let r=this._values[e];if(r)return r.get(n)}scopeRefs(e,n=this._values){return this._reduceValues(n,r=>{if(r.scopePath===void 0)throw new Error(`CodeGen: name "${r}" has no value`);return(0,cn._)`${e}${r.scopePath}`})}scopeCode(e=this._values,n,r){return this._reduceValues(e,o=>{if(o.value===void 0)throw new Error(`CodeGen: name "${o}" has no value`);return o.value.code},n,r)}_reduceValues(e,n,r={},o){let i=cn.nil;for(let s in e){let a=e[s];if(!a)continue;let c=r[s]=r[s]||new Map;a.forEach(l=>{if(c.has(l))return;c.set(l,Nc.Started);let p=n(l);if(p){let d=this.opts.es5?ln.varKinds.var:ln.varKinds.const;i=(0,cn._)`${i}${d} ${l} = ${p};${this.opts._n}`}else if(p=o==null?void 0:o(l))i=(0,cn._)`${i}${p}${this.opts._n}`;else throw new rf(l);c.set(l,Nc.Completed)})}return i}};ln.ValueScope=of});var we=$(Se=>{"use strict";Object.defineProperty(Se,"__esModule",{value:!0});Se.or=Se.and=Se.not=Se.CodeGen=Se.operators=Se.varKinds=Se.ValueScopeName=Se.ValueScope=Se.Scope=Se.Name=Se.regexpCode=Se.stringify=Se.getProperty=Se.nil=Se.strConcat=Se.str=Se._=void 0;var Le=Is(),Dn=sf(),Pr=Is();Object.defineProperty(Se,"_",{enumerable:!0,get:function(){return Pr._}});Object.defineProperty(Se,"str",{enumerable:!0,get:function(){return Pr.str}});Object.defineProperty(Se,"strConcat",{enumerable:!0,get:function(){return Pr.strConcat}});Object.defineProperty(Se,"nil",{enumerable:!0,get:function(){return Pr.nil}});Object.defineProperty(Se,"getProperty",{enumerable:!0,get:function(){return Pr.getProperty}});Object.defineProperty(Se,"stringify",{enumerable:!0,get:function(){return Pr.stringify}});Object.defineProperty(Se,"regexpCode",{enumerable:!0,get:function(){return Pr.regexpCode}});Object.defineProperty(Se,"Name",{enumerable:!0,get:function(){return Pr.Name}});var Uc=sf();Object.defineProperty(Se,"Scope",{enumerable:!0,get:function(){return Uc.Scope}});Object.defineProperty(Se,"ValueScope",{enumerable:!0,get:function(){return Uc.ValueScope}});Object.defineProperty(Se,"ValueScopeName",{enumerable:!0,get:function(){return Uc.ValueScopeName}});Object.defineProperty(Se,"varKinds",{enumerable:!0,get:function(){return Uc.varKinds}});Se.operators={GT:new Le._Code(">"),GTE:new Le._Code(">="),LT:new Le._Code("<"),LTE:new Le._Code("<="),EQ:new Le._Code("==="),NEQ:new Le._Code("!=="),NOT:new Le._Code("!"),OR:new Le._Code("||"),AND:new Le._Code("&&"),ADD:new Le._Code("+")};var mr=class{optimizeNodes(){return this}optimizeNames(e,n){return this}},af=class extends mr{constructor(e,n,r){super(),this.varKind=e,this.name=n,this.rhs=r}render({es5:e,_n:n}){let r=e?Dn.varKinds.var:this.varKind,o=this.rhs===void 0?"":` = ${this.rhs}`;return`${r} ${this.name}${o};`+n}optimizeNames(e,n){if(e[this.name.str])return this.rhs&&(this.rhs=di(this.rhs,e,n)),this}get names(){return this.rhs instanceof Le._CodeOrName?this.rhs.names:{}}},Dc=class extends mr{constructor(e,n,r){super(),this.lhs=e,this.rhs=n,this.sideEffects=r}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,n){if(!(this.lhs instanceof Le.Name&&!e[this.lhs.str]&&!this.sideEffects))return this.rhs=di(this.rhs,e,n),this}get names(){let e=this.lhs instanceof Le.Name?{}:{...this.lhs.names};return Fc(e,this.rhs)}},cf=class extends Dc{constructor(e,n,r,o){super(e,r,o),this.op=n}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}},lf=class extends mr{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}},uf=class extends mr{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}},pf=class extends mr{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}},df=class extends mr{constructor(e){super(),this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,n){return this.code=di(this.code,e,n),this}get names(){return this.code instanceof Le._CodeOrName?this.code.names:{}}},Cs=class extends mr{constructor(e=[]){super(),this.nodes=e}render(e){return this.nodes.reduce((n,r)=>n+r.render(e),"")}optimizeNodes(){let{nodes:e}=this,n=e.length;for(;n--;){let r=e[n].optimizeNodes();Array.isArray(r)?e.splice(n,1,...r):r?e[n]=r:e.splice(n,1)}return e.length>0?this:void 0}optimizeNames(e,n){let{nodes:r}=this,o=r.length;for(;o--;){let i=r[o];i.optimizeNames(e,n)||(JP(e,i.names),r.splice(o,1))}return r.length>0?this:void 0}get names(){return this.nodes.reduce((e,n)=>Eo(e,n.names),{})}},hr=class extends Cs{render(e){return"{"+e._n+super.render(e)+"}"+e._n}},ff=class extends Cs{},pi=class extends hr{};pi.kind="else";var ko=class t extends hr{constructor(e,n){super(n),this.condition=e}render(e){let n=`if(${this.condition})`+super.render(e);return this.else&&(n+="else "+this.else.render(e)),n}optimizeNodes(){super.optimizeNodes();let e=this.condition;if(e===!0)return this.nodes;let n=this.else;if(n){let r=n.optimizeNodes();n=this.else=Array.isArray(r)?new pi(r):r}if(n)return e===!1?n instanceof t?n:n.nodes:this.nodes.length?this:new t(fb(e),n instanceof t?[n]:n.nodes);if(!(e===!1||!this.nodes.length))return this}optimizeNames(e,n){var r;if(this.else=(r=this.else)===null||r===void 0?void 0:r.optimizeNames(e,n),!!(super.optimizeNames(e,n)||this.else))return this.condition=di(this.condition,e,n),this}get names(){let e=super.names;return Fc(e,this.condition),this.else&&Eo(e,this.else.names),e}};ko.kind="if";var To=class extends hr{};To.kind="for";var mf=class extends To{constructor(e){super(),this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,n){if(super.optimizeNames(e,n))return this.iteration=di(this.iteration,e,n),this}get names(){return Eo(super.names,this.iteration.names)}},hf=class extends To{constructor(e,n,r,o){super(),this.varKind=e,this.name=n,this.from=r,this.to=o}render(e){let n=e.es5?Dn.varKinds.var:this.varKind,{name:r,from:o,to:i}=this;return`for(${n} ${r}=${o}; ${r}<${i}; ${r}++)`+super.render(e)}get names(){let e=Fc(super.names,this.from);return Fc(e,this.to)}},Mc=class extends To{constructor(e,n,r,o){super(),this.loop=e,this.varKind=n,this.name=r,this.iterable=o}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,n){if(super.optimizeNames(e,n))return this.iterable=di(this.iterable,e,n),this}get names(){return Eo(super.names,this.iterable.names)}},Ps=class extends hr{constructor(e,n,r){super(),this.name=e,this.args=n,this.async=r}render(e){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(e)}};Ps.kind="func";var Os=class extends Cs{render(e){return"return "+super.render(e)}};Os.kind="return";var gf=class extends hr{render(e){let n="try"+super.render(e);return this.catch&&(n+=this.catch.render(e)),this.finally&&(n+=this.finally.render(e)),n}optimizeNodes(){var e,n;return super.optimizeNodes(),(e=this.catch)===null||e===void 0||e.optimizeNodes(),(n=this.finally)===null||n===void 0||n.optimizeNodes(),this}optimizeNames(e,n){var r,o;return super.optimizeNames(e,n),(r=this.catch)===null||r===void 0||r.optimizeNames(e,n),(o=this.finally)===null||o===void 0||o.optimizeNames(e,n),this}get names(){let e=super.names;return this.catch&&Eo(e,this.catch.names),this.finally&&Eo(e,this.finally.names),e}},zs=class extends hr{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}};zs.kind="catch";var Ns=class extends hr{render(e){return"finally"+super.render(e)}};Ns.kind="finally";var yf=class{constructor(e,n={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...n,_n:n.lines?`
|
|
3
|
+
`:""},this._extScope=e,this._scope=new Dn.Scope({parent:e}),this._nodes=[new ff]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,n){let r=this._extScope.value(e,n);return(this._values[r.prefix]||(this._values[r.prefix]=new Set)).add(r),r}getScopeValue(e,n){return this._extScope.getValue(e,n)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,n,r,o){let i=this._scope.toName(n);return r!==void 0&&o&&(this._constants[i.str]=r),this._leafNode(new af(e,i,r)),i}const(e,n,r){return this._def(Dn.varKinds.const,e,n,r)}let(e,n,r){return this._def(Dn.varKinds.let,e,n,r)}var(e,n,r){return this._def(Dn.varKinds.var,e,n,r)}assign(e,n,r){return this._leafNode(new Dc(e,n,r))}add(e,n){return this._leafNode(new cf(e,Se.operators.ADD,n))}code(e){return typeof e=="function"?e():e!==Le.nil&&this._leafNode(new df(e)),this}object(...e){let n=["{"];for(let[r,o]of e)n.length>1&&n.push(","),n.push(r),(r!==o||this.opts.es5)&&(n.push(":"),(0,Le.addCodeArg)(n,o));return n.push("}"),new Le._Code(n)}if(e,n,r){if(this._blockNode(new ko(e)),n&&r)this.code(n).else().code(r).endIf();else if(n)this.code(n).endIf();else if(r)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new ko(e))}else(){return this._elseNode(new pi)}endIf(){return this._endBlockNode(ko,pi)}_for(e,n){return this._blockNode(e),n&&this.code(n).endFor(),this}for(e,n){return this._for(new mf(e),n)}forRange(e,n,r,o,i=this.opts.es5?Dn.varKinds.var:Dn.varKinds.let){let s=this._scope.toName(e);return this._for(new hf(i,s,n,r),()=>o(s))}forOf(e,n,r,o=Dn.varKinds.const){let i=this._scope.toName(e);if(this.opts.es5){let s=n instanceof Le.Name?n:this.var("_arr",n);return this.forRange("_i",0,(0,Le._)`${s}.length`,a=>{this.var(i,(0,Le._)`${s}[${a}]`),r(i)})}return this._for(new Mc("of",o,i,n),()=>r(i))}forIn(e,n,r,o=this.opts.es5?Dn.varKinds.var:Dn.varKinds.const){if(this.opts.ownProperties)return this.forOf(e,(0,Le._)`Object.keys(${n})`,r);let i=this._scope.toName(e);return this._for(new Mc("in",o,i,n),()=>r(i))}endFor(){return this._endBlockNode(To)}label(e){return this._leafNode(new lf(e))}break(e){return this._leafNode(new uf(e))}return(e){let n=new Os;if(this._blockNode(n),this.code(e),n.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(Os)}try(e,n,r){if(!n&&!r)throw new Error('CodeGen: "try" without "catch" and "finally"');let o=new gf;if(this._blockNode(o),this.code(e),n){let i=this.name("e");this._currNode=o.catch=new zs(i),n(i)}return r&&(this._currNode=o.finally=new Ns,this.code(r)),this._endBlockNode(zs,Ns)}throw(e){return this._leafNode(new pf(e))}block(e,n){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(n),this}endBlock(e){let n=this._blockStarts.pop();if(n===void 0)throw new Error("CodeGen: not in self-balancing block");let r=this._nodes.length-n;if(r<0||e!==void 0&&r!==e)throw new Error(`CodeGen: wrong number of nodes: ${r} vs ${e} expected`);return this._nodes.length=n,this}func(e,n=Le.nil,r,o){return this._blockNode(new Ps(e,n,r)),o&&this.code(o).endFunc(),this}endFunc(){return this._endBlockNode(Ps)}optimize(e=1){for(;e-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,n){let r=this._currNode;if(r instanceof e||n&&r instanceof n)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${n?`${e.kind}/${n.kind}`:e.kind}"`)}_elseNode(e){let n=this._currNode;if(!(n instanceof ko))throw new Error('CodeGen: "else" without "if"');return this._currNode=n.else=e,this}get _root(){return this._nodes[0]}get _currNode(){let e=this._nodes;return e[e.length-1]}set _currNode(e){let n=this._nodes;n[n.length-1]=e}};Se.CodeGen=yf;function Eo(t,e){for(let n in e)t[n]=(t[n]||0)+(e[n]||0);return t}function Fc(t,e){return e instanceof Le._CodeOrName?Eo(t,e.names):t}function di(t,e,n){if(t instanceof Le.Name)return r(t);if(!o(t))return t;return new Le._Code(t._items.reduce((i,s)=>(s instanceof Le.Name&&(s=r(s)),s instanceof Le._Code?i.push(...s._items):i.push(s),i),[]));function r(i){let s=n[i.str];return s===void 0||e[i.str]!==1?i:(delete e[i.str],s)}function o(i){return i instanceof Le._Code&&i._items.some(s=>s instanceof Le.Name&&e[s.str]===1&&n[s.str]!==void 0)}}function JP(t,e){for(let n in e)t[n]=(t[n]||0)-(e[n]||0)}function fb(t){return typeof t=="boolean"||typeof t=="number"||t===null?!t:(0,Le._)`!${xf(t)}`}Se.not=fb;var YP=mb(Se.operators.AND);function XP(...t){return t.reduce(YP)}Se.and=XP;var QP=mb(Se.operators.OR);function eO(...t){return t.reduce(QP)}Se.or=eO;function mb(t){return(e,n)=>e===Le.nil?n:n===Le.nil?e:(0,Le._)`${xf(e)} ${t} ${xf(n)}`}function xf(t){return t instanceof Le.Name?t:(0,Le._)`(${t})`}});var Me=$($e=>{"use strict";Object.defineProperty($e,"__esModule",{value:!0});$e.checkStrictMode=$e.getErrorPath=$e.Type=$e.useFunc=$e.setEvaluated=$e.evaluatedPropsToName=$e.mergeEvaluated=$e.eachItem=$e.unescapeJsonPointer=$e.escapeJsonPointer=$e.escapeFragment=$e.unescapeFragment=$e.schemaRefOrVal=$e.schemaHasRulesButRef=$e.schemaHasRules=$e.checkUnknownRules=$e.alwaysValidSchema=$e.toHash=void 0;var Xe=we(),tO=Is();function nO(t){let e={};for(let n of t)e[n]=!0;return e}$e.toHash=nO;function rO(t,e){return typeof e=="boolean"?e:Object.keys(e).length===0?!0:(yb(t,e),!xb(e,t.self.RULES.all))}$e.alwaysValidSchema=rO;function yb(t,e=t.schema){let{opts:n,self:r}=t;if(!n.strictSchema||typeof e=="boolean")return;let o=r.RULES.keywords;for(let i in e)o[i]||_b(t,`unknown keyword: "${i}"`)}$e.checkUnknownRules=yb;function xb(t,e){if(typeof t=="boolean")return!t;for(let n in t)if(e[n])return!0;return!1}$e.schemaHasRules=xb;function oO(t,e){if(typeof t=="boolean")return!t;for(let n in t)if(n!=="$ref"&&e.all[n])return!0;return!1}$e.schemaHasRulesButRef=oO;function iO({topSchemaRef:t,schemaPath:e},n,r,o){if(!o){if(typeof n=="number"||typeof n=="boolean")return n;if(typeof n=="string")return(0,Xe._)`${n}`}return(0,Xe._)`${t}${e}${(0,Xe.getProperty)(r)}`}$e.schemaRefOrVal=iO;function sO(t){return vb(decodeURIComponent(t))}$e.unescapeFragment=sO;function aO(t){return encodeURIComponent(bf(t))}$e.escapeFragment=aO;function bf(t){return typeof t=="number"?`${t}`:t.replace(/~/g,"~0").replace(/\//g,"~1")}$e.escapeJsonPointer=bf;function vb(t){return t.replace(/~1/g,"/").replace(/~0/g,"~")}$e.unescapeJsonPointer=vb;function cO(t,e){if(Array.isArray(t))for(let n of t)e(n);else e(t)}$e.eachItem=cO;function hb({mergeNames:t,mergeToName:e,mergeValues:n,resultToName:r}){return(o,i,s,a)=>{let c=s===void 0?i:s instanceof Xe.Name?(i instanceof Xe.Name?t(o,i,s):e(o,i,s),s):i instanceof Xe.Name?(e(o,s,i),i):n(i,s);return a===Xe.Name&&!(c instanceof Xe.Name)?r(o,c):c}}$e.mergeEvaluated={props:hb({mergeNames:(t,e,n)=>t.if((0,Xe._)`${n} !== true && ${e} !== undefined`,()=>{t.if((0,Xe._)`${e} === true`,()=>t.assign(n,!0),()=>t.assign(n,(0,Xe._)`${n} || {}`).code((0,Xe._)`Object.assign(${n}, ${e})`))}),mergeToName:(t,e,n)=>t.if((0,Xe._)`${n} !== true`,()=>{e===!0?t.assign(n,!0):(t.assign(n,(0,Xe._)`${n} || {}`),_f(t,n,e))}),mergeValues:(t,e)=>t===!0?!0:{...t,...e},resultToName:bb}),items:hb({mergeNames:(t,e,n)=>t.if((0,Xe._)`${n} !== true && ${e} !== undefined`,()=>t.assign(n,(0,Xe._)`${e} === true ? true : ${n} > ${e} ? ${n} : ${e}`)),mergeToName:(t,e,n)=>t.if((0,Xe._)`${n} !== true`,()=>t.assign(n,e===!0?!0:(0,Xe._)`${n} > ${e} ? ${n} : ${e}`)),mergeValues:(t,e)=>t===!0?!0:Math.max(t,e),resultToName:(t,e)=>t.var("items",e)})};function bb(t,e){if(e===!0)return t.var("props",!0);let n=t.var("props",(0,Xe._)`{}`);return e!==void 0&&_f(t,n,e),n}$e.evaluatedPropsToName=bb;function _f(t,e,n){Object.keys(n).forEach(r=>t.assign((0,Xe._)`${e}${(0,Xe.getProperty)(r)}`,!0))}$e.setEvaluated=_f;var gb={};function lO(t,e){return t.scopeValue("func",{ref:e,code:gb[e.code]||(gb[e.code]=new tO._Code(e.code))})}$e.useFunc=lO;var vf;(function(t){t[t.Num=0]="Num",t[t.Str=1]="Str"})(vf||($e.Type=vf={}));function uO(t,e,n){if(t instanceof Xe.Name){let r=e===vf.Num;return n?r?(0,Xe._)`"[" + ${t} + "]"`:(0,Xe._)`"['" + ${t} + "']"`:r?(0,Xe._)`"/" + ${t}`:(0,Xe._)`"/" + ${t}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return n?(0,Xe.getProperty)(t).toString():"/"+bf(t)}$e.getErrorPath=uO;function _b(t,e,n=t.opts.strictSchema){if(n){if(e=`strict mode: ${e}`,n===!0)throw new Error(e);t.self.logger.warn(e)}}$e.checkStrictMode=_b});var gr=$(wf=>{"use strict";Object.defineProperty(wf,"__esModule",{value:!0});var Vt=we(),pO={data:new Vt.Name("data"),valCxt:new Vt.Name("valCxt"),instancePath:new Vt.Name("instancePath"),parentData:new Vt.Name("parentData"),parentDataProperty:new Vt.Name("parentDataProperty"),rootData:new Vt.Name("rootData"),dynamicAnchors:new Vt.Name("dynamicAnchors"),vErrors:new Vt.Name("vErrors"),errors:new Vt.Name("errors"),this:new Vt.Name("this"),self:new Vt.Name("self"),scope:new Vt.Name("scope"),json:new Vt.Name("json"),jsonPos:new Vt.Name("jsonPos"),jsonLen:new Vt.Name("jsonLen"),jsonPart:new Vt.Name("jsonPart")};wf.default=pO});var js=$(Gt=>{"use strict";Object.defineProperty(Gt,"__esModule",{value:!0});Gt.extendErrors=Gt.resetErrorsCount=Gt.reportExtraError=Gt.reportError=Gt.keyword$DataError=Gt.keywordError=void 0;var Fe=we(),qc=Me(),en=gr();Gt.keywordError={message:({keyword:t})=>(0,Fe.str)`must pass "${t}" keyword validation`};Gt.keyword$DataError={message:({keyword:t,schemaType:e})=>e?(0,Fe.str)`"${t}" keyword must be ${e} ($data)`:(0,Fe.str)`"${t}" keyword is invalid ($data)`};function dO(t,e=Gt.keywordError,n,r){let{it:o}=t,{gen:i,compositeRule:s,allErrors:a}=o,c=kb(t,e,n);r??(s||a)?wb(i,c):Sb(o,(0,Fe._)`[${c}]`)}Gt.reportError=dO;function fO(t,e=Gt.keywordError,n){let{it:r}=t,{gen:o,compositeRule:i,allErrors:s}=r,a=kb(t,e,n);wb(o,a),i||s||Sb(r,en.default.vErrors)}Gt.reportExtraError=fO;function mO(t,e){t.assign(en.default.errors,e),t.if((0,Fe._)`${en.default.vErrors} !== null`,()=>t.if(e,()=>t.assign((0,Fe._)`${en.default.vErrors}.length`,e),()=>t.assign(en.default.vErrors,null)))}Gt.resetErrorsCount=mO;function hO({gen:t,keyword:e,schemaValue:n,data:r,errsCount:o,it:i}){if(o===void 0)throw new Error("ajv implementation error");let s=t.name("err");t.forRange("i",o,en.default.errors,a=>{t.const(s,(0,Fe._)`${en.default.vErrors}[${a}]`),t.if((0,Fe._)`${s}.instancePath === undefined`,()=>t.assign((0,Fe._)`${s}.instancePath`,(0,Fe.strConcat)(en.default.instancePath,i.errorPath))),t.assign((0,Fe._)`${s}.schemaPath`,(0,Fe.str)`${i.errSchemaPath}/${e}`),i.opts.verbose&&(t.assign((0,Fe._)`${s}.schema`,n),t.assign((0,Fe._)`${s}.data`,r))})}Gt.extendErrors=hO;function wb(t,e){let n=t.const("err",e);t.if((0,Fe._)`${en.default.vErrors} === null`,()=>t.assign(en.default.vErrors,(0,Fe._)`[${n}]`),(0,Fe._)`${en.default.vErrors}.push(${n})`),t.code((0,Fe._)`${en.default.errors}++`)}function Sb(t,e){let{gen:n,validateName:r,schemaEnv:o}=t;o.$async?n.throw((0,Fe._)`new ${t.ValidationError}(${e})`):(n.assign((0,Fe._)`${r}.errors`,e),n.return(!1))}var $o={keyword:new Fe.Name("keyword"),schemaPath:new Fe.Name("schemaPath"),params:new Fe.Name("params"),propertyName:new Fe.Name("propertyName"),message:new Fe.Name("message"),schema:new Fe.Name("schema"),parentSchema:new Fe.Name("parentSchema")};function kb(t,e,n){let{createErrors:r}=t.it;return r===!1?(0,Fe._)`{}`:gO(t,e,n)}function gO(t,e,n={}){let{gen:r,it:o}=t,i=[yO(o,n),xO(t,n)];return vO(t,e,i),r.object(...i)}function yO({errorPath:t},{instancePath:e}){let n=e?(0,Fe.str)`${t}${(0,qc.getErrorPath)(e,qc.Type.Str)}`:t;return[en.default.instancePath,(0,Fe.strConcat)(en.default.instancePath,n)]}function xO({keyword:t,it:{errSchemaPath:e}},{schemaPath:n,parentSchema:r}){let o=r?e:(0,Fe.str)`${e}/${t}`;return n&&(o=(0,Fe.str)`${o}${(0,qc.getErrorPath)(n,qc.Type.Str)}`),[$o.schemaPath,o]}function vO(t,{params:e,message:n},r){let{keyword:o,data:i,schemaValue:s,it:a}=t,{opts:c,propertyName:l,topSchemaRef:p,schemaPath:d}=a;r.push([$o.keyword,o],[$o.params,typeof e=="function"?e(t):e||(0,Fe._)`{}`]),c.messages&&r.push([$o.message,typeof n=="function"?n(t):n]),c.verbose&&r.push([$o.schema,s],[$o.parentSchema,(0,Fe._)`${p}${d}`],[en.default.data,i]),l&&r.push([$o.propertyName,l])}});var Eb=$(fi=>{"use strict";Object.defineProperty(fi,"__esModule",{value:!0});fi.boolOrEmptySchema=fi.topBoolOrEmptySchema=void 0;var bO=js(),_O=we(),wO=gr(),SO={message:"boolean schema is false"};function kO(t){let{gen:e,schema:n,validateName:r}=t;n===!1?Tb(t,!1):typeof n=="object"&&n.$async===!0?e.return(wO.default.data):(e.assign((0,_O._)`${r}.errors`,null),e.return(!0))}fi.topBoolOrEmptySchema=kO;function TO(t,e){let{gen:n,schema:r}=t;r===!1?(n.var(e,!1),Tb(t)):n.var(e,!0)}fi.boolOrEmptySchema=TO;function Tb(t,e){let{gen:n,data:r}=t,o={gen:n,keyword:"false schema",data:r,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:t};(0,bO.reportError)(o,SO,void 0,e)}});var Sf=$(mi=>{"use strict";Object.defineProperty(mi,"__esModule",{value:!0});mi.getRules=mi.isJSONType=void 0;var EO=["string","number","integer","boolean","null","object","array"],$O=new Set(EO);function RO(t){return typeof t=="string"&&$O.has(t)}mi.isJSONType=RO;function AO(){let t={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...t,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},t.number,t.string,t.array,t.object],post:{rules:[]},all:{},keywords:{}}}mi.getRules=AO});var kf=$(Or=>{"use strict";Object.defineProperty(Or,"__esModule",{value:!0});Or.shouldUseRule=Or.shouldUseGroup=Or.schemaHasRulesForType=void 0;function IO({schema:t,self:e},n){let r=e.RULES.types[n];return r&&r!==!0&&$b(t,r)}Or.schemaHasRulesForType=IO;function $b(t,e){return e.rules.some(n=>Rb(t,n))}Or.shouldUseGroup=$b;function Rb(t,e){var n;return t[e.keyword]!==void 0||((n=e.definition.implements)===null||n===void 0?void 0:n.some(r=>t[r]!==void 0))}Or.shouldUseRule=Rb});var Ls=$(Wt=>{"use strict";Object.defineProperty(Wt,"__esModule",{value:!0});Wt.reportTypeError=Wt.checkDataTypes=Wt.checkDataType=Wt.coerceAndCheckDataType=Wt.getJSONTypes=Wt.getSchemaTypes=Wt.DataType=void 0;var CO=Sf(),PO=kf(),OO=js(),ve=we(),Ab=Me(),hi;(function(t){t[t.Correct=0]="Correct",t[t.Wrong=1]="Wrong"})(hi||(Wt.DataType=hi={}));function zO(t){let e=Ib(t.type);if(e.includes("null")){if(t.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!e.length&&t.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');t.nullable===!0&&e.push("null")}return e}Wt.getSchemaTypes=zO;function Ib(t){let e=Array.isArray(t)?t:t?[t]:[];if(e.every(CO.isJSONType))return e;throw new Error("type must be JSONType or JSONType[]: "+e.join(","))}Wt.getJSONTypes=Ib;function NO(t,e){let{gen:n,data:r,opts:o}=t,i=jO(e,o.coerceTypes),s=e.length>0&&!(i.length===0&&e.length===1&&(0,PO.schemaHasRulesForType)(t,e[0]));if(s){let a=Ef(e,r,o.strictNumbers,hi.Wrong);n.if(a,()=>{i.length?LO(t,e,i):$f(t)})}return s}Wt.coerceAndCheckDataType=NO;var Cb=new Set(["string","number","integer","boolean","null"]);function jO(t,e){return e?t.filter(n=>Cb.has(n)||e==="array"&&n==="array"):[]}function LO(t,e,n){let{gen:r,data:o,opts:i}=t,s=r.let("dataType",(0,ve._)`typeof ${o}`),a=r.let("coerced",(0,ve._)`undefined`);i.coerceTypes==="array"&&r.if((0,ve._)`${s} == 'object' && Array.isArray(${o}) && ${o}.length == 1`,()=>r.assign(o,(0,ve._)`${o}[0]`).assign(s,(0,ve._)`typeof ${o}`).if(Ef(e,o,i.strictNumbers),()=>r.assign(a,o))),r.if((0,ve._)`${a} !== undefined`);for(let l of n)(Cb.has(l)||l==="array"&&i.coerceTypes==="array")&&c(l);r.else(),$f(t),r.endIf(),r.if((0,ve._)`${a} !== undefined`,()=>{r.assign(o,a),DO(t,a)});function c(l){switch(l){case"string":r.elseIf((0,ve._)`${s} == "number" || ${s} == "boolean"`).assign(a,(0,ve._)`"" + ${o}`).elseIf((0,ve._)`${o} === null`).assign(a,(0,ve._)`""`);return;case"number":r.elseIf((0,ve._)`${s} == "boolean" || ${o} === null
|
|
4
|
+
|| (${s} == "string" && ${o} && ${o} == +${o})`).assign(a,(0,ve._)`+${o}`);return;case"integer":r.elseIf((0,ve._)`${s} === "boolean" || ${o} === null
|
|
5
|
+
|| (${s} === "string" && ${o} && ${o} == +${o} && !(${o} % 1))`).assign(a,(0,ve._)`+${o}`);return;case"boolean":r.elseIf((0,ve._)`${o} === "false" || ${o} === 0 || ${o} === null`).assign(a,!1).elseIf((0,ve._)`${o} === "true" || ${o} === 1`).assign(a,!0);return;case"null":r.elseIf((0,ve._)`${o} === "" || ${o} === 0 || ${o} === false`),r.assign(a,null);return;case"array":r.elseIf((0,ve._)`${s} === "string" || ${s} === "number"
|
|
6
|
+
|| ${s} === "boolean" || ${o} === null`).assign(a,(0,ve._)`[${o}]`)}}}function DO({gen:t,parentData:e,parentDataProperty:n},r){t.if((0,ve._)`${e} !== undefined`,()=>t.assign((0,ve._)`${e}[${n}]`,r))}function Tf(t,e,n,r=hi.Correct){let o=r===hi.Correct?ve.operators.EQ:ve.operators.NEQ,i;switch(t){case"null":return(0,ve._)`${e} ${o} null`;case"array":i=(0,ve._)`Array.isArray(${e})`;break;case"object":i=(0,ve._)`${e} && typeof ${e} == "object" && !Array.isArray(${e})`;break;case"integer":i=s((0,ve._)`!(${e} % 1) && !isNaN(${e})`);break;case"number":i=s();break;default:return(0,ve._)`typeof ${e} ${o} ${t}`}return r===hi.Correct?i:(0,ve.not)(i);function s(a=ve.nil){return(0,ve.and)((0,ve._)`typeof ${e} == "number"`,a,n?(0,ve._)`isFinite(${e})`:ve.nil)}}Wt.checkDataType=Tf;function Ef(t,e,n,r){if(t.length===1)return Tf(t[0],e,n,r);let o,i=(0,Ab.toHash)(t);if(i.array&&i.object){let s=(0,ve._)`typeof ${e} != "object"`;o=i.null?s:(0,ve._)`!${e} || ${s}`,delete i.null,delete i.array,delete i.object}else o=ve.nil;i.number&&delete i.integer;for(let s in i)o=(0,ve.and)(o,Tf(s,e,n,r));return o}Wt.checkDataTypes=Ef;var MO={message:({schema:t})=>`must be ${t}`,params:({schema:t,schemaValue:e})=>typeof t=="string"?(0,ve._)`{type: ${t}}`:(0,ve._)`{type: ${e}}`};function $f(t){let e=FO(t);(0,OO.reportError)(e,MO)}Wt.reportTypeError=$f;function FO(t){let{gen:e,data:n,schema:r}=t,o=(0,Ab.schemaRefOrVal)(t,r,"type");return{gen:e,keyword:"type",data:n,schema:r.type,schemaCode:o,schemaValue:o,parentSchema:r,params:{},it:t}}});var Ob=$(Zc=>{"use strict";Object.defineProperty(Zc,"__esModule",{value:!0});Zc.assignDefaults=void 0;var gi=we(),UO=Me();function qO(t,e){let{properties:n,items:r}=t.schema;if(e==="object"&&n)for(let o in n)Pb(t,o,n[o].default);else e==="array"&&Array.isArray(r)&&r.forEach((o,i)=>Pb(t,i,o.default))}Zc.assignDefaults=qO;function Pb(t,e,n){let{gen:r,compositeRule:o,data:i,opts:s}=t;if(n===void 0)return;let a=(0,gi._)`${i}${(0,gi.getProperty)(e)}`;if(o){(0,UO.checkStrictMode)(t,`default is ignored for: ${a}`);return}let c=(0,gi._)`${a} === undefined`;s.useDefaults==="empty"&&(c=(0,gi._)`${c} || ${a} === null || ${a} === ""`),r.if(c,(0,gi._)`${a} = ${(0,gi.stringify)(n)}`)}});var Rn=$(Je=>{"use strict";Object.defineProperty(Je,"__esModule",{value:!0});Je.validateUnion=Je.validateArray=Je.usePattern=Je.callValidateCode=Je.schemaProperties=Je.allSchemaProperties=Je.noPropertyInData=Je.propertyInData=Je.isOwnProperty=Je.hasPropFunc=Je.reportMissingProp=Je.checkMissingProp=Je.checkReportMissingProp=void 0;var ct=we(),Rf=Me(),zr=gr(),ZO=Me();function BO(t,e){let{gen:n,data:r,it:o}=t;n.if(If(n,r,e,o.opts.ownProperties),()=>{t.setParams({missingProperty:(0,ct._)`${e}`},!0),t.error()})}Je.checkReportMissingProp=BO;function HO({gen:t,data:e,it:{opts:n}},r,o){return(0,ct.or)(...r.map(i=>(0,ct.and)(If(t,e,i,n.ownProperties),(0,ct._)`${o} = ${i}`)))}Je.checkMissingProp=HO;function VO(t,e){t.setParams({missingProperty:e},!0),t.error()}Je.reportMissingProp=VO;function zb(t){return t.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,ct._)`Object.prototype.hasOwnProperty`})}Je.hasPropFunc=zb;function Af(t,e,n){return(0,ct._)`${zb(t)}.call(${e}, ${n})`}Je.isOwnProperty=Af;function GO(t,e,n,r){let o=(0,ct._)`${e}${(0,ct.getProperty)(n)} !== undefined`;return r?(0,ct._)`${o} && ${Af(t,e,n)}`:o}Je.propertyInData=GO;function If(t,e,n,r){let o=(0,ct._)`${e}${(0,ct.getProperty)(n)} === undefined`;return r?(0,ct.or)(o,(0,ct.not)(Af(t,e,n))):o}Je.noPropertyInData=If;function Nb(t){return t?Object.keys(t).filter(e=>e!=="__proto__"):[]}Je.allSchemaProperties=Nb;function WO(t,e){return Nb(e).filter(n=>!(0,Rf.alwaysValidSchema)(t,e[n]))}Je.schemaProperties=WO;function KO({schemaCode:t,data:e,it:{gen:n,topSchemaRef:r,schemaPath:o,errorPath:i},it:s},a,c,l){let p=l?(0,ct._)`${t}, ${e}, ${r}${o}`:e,d=[[zr.default.instancePath,(0,ct.strConcat)(zr.default.instancePath,i)],[zr.default.parentData,s.parentData],[zr.default.parentDataProperty,s.parentDataProperty],[zr.default.rootData,zr.default.rootData]];s.opts.dynamicRef&&d.push([zr.default.dynamicAnchors,zr.default.dynamicAnchors]);let f=(0,ct._)`${p}, ${n.object(...d)}`;return c!==ct.nil?(0,ct._)`${a}.call(${c}, ${f})`:(0,ct._)`${a}(${f})`}Je.callValidateCode=KO;var JO=(0,ct._)`new RegExp`;function YO({gen:t,it:{opts:e}},n){let r=e.unicodeRegExp?"u":"",{regExp:o}=e.code,i=o(n,r);return t.scopeValue("pattern",{key:i.toString(),ref:i,code:(0,ct._)`${o.code==="new RegExp"?JO:(0,ZO.useFunc)(t,o)}(${n}, ${r})`})}Je.usePattern=YO;function XO(t){let{gen:e,data:n,keyword:r,it:o}=t,i=e.name("valid");if(o.allErrors){let a=e.let("valid",!0);return s(()=>e.assign(a,!1)),a}return e.var(i,!0),s(()=>e.break()),i;function s(a){let c=e.const("len",(0,ct._)`${n}.length`);e.forRange("i",0,c,l=>{t.subschema({keyword:r,dataProp:l,dataPropType:Rf.Type.Num},i),e.if((0,ct.not)(i),a)})}}Je.validateArray=XO;function QO(t){let{gen:e,schema:n,keyword:r,it:o}=t;if(!Array.isArray(n))throw new Error("ajv implementation error");if(n.some(c=>(0,Rf.alwaysValidSchema)(o,c))&&!o.opts.unevaluated)return;let s=e.let("valid",!1),a=e.name("_valid");e.block(()=>n.forEach((c,l)=>{let p=t.subschema({keyword:r,schemaProp:l,compositeRule:!0},a);e.assign(s,(0,ct._)`${s} || ${a}`),t.mergeValidEvaluated(p,a)||e.if((0,ct.not)(s))})),t.result(s,()=>t.reset(),()=>t.error(!0))}Je.validateUnion=QO});var Db=$(Yn=>{"use strict";Object.defineProperty(Yn,"__esModule",{value:!0});Yn.validateKeywordUsage=Yn.validSchemaType=Yn.funcKeywordCode=Yn.macroKeywordCode=void 0;var tn=we(),Ro=gr(),e1=Rn(),t1=js();function n1(t,e){let{gen:n,keyword:r,schema:o,parentSchema:i,it:s}=t,a=e.macro.call(s.self,o,i,s),c=Lb(n,r,a);s.opts.validateSchema!==!1&&s.self.validateSchema(a,!0);let l=n.name("valid");t.subschema({schema:a,schemaPath:tn.nil,errSchemaPath:`${s.errSchemaPath}/${r}`,topSchemaRef:c,compositeRule:!0},l),t.pass(l,()=>t.error(!0))}Yn.macroKeywordCode=n1;function r1(t,e){var n;let{gen:r,keyword:o,schema:i,parentSchema:s,$data:a,it:c}=t;i1(c,e);let l=!a&&e.compile?e.compile.call(c.self,i,s,c):e.validate,p=Lb(r,o,l),d=r.let("valid");t.block$data(d,f),t.ok((n=e.valid)!==null&&n!==void 0?n:d);function f(){if(e.errors===!1)v(),e.modifying&&jb(t),x(()=>t.error());else{let m=e.async?h():y();e.modifying&&jb(t),x(()=>o1(t,m))}}function h(){let m=r.let("ruleErrs",null);return r.try(()=>v((0,tn._)`await `),b=>r.assign(d,!1).if((0,tn._)`${b} instanceof ${c.ValidationError}`,()=>r.assign(m,(0,tn._)`${b}.errors`),()=>r.throw(b))),m}function y(){let m=(0,tn._)`${p}.errors`;return r.assign(m,null),v(tn.nil),m}function v(m=e.async?(0,tn._)`await `:tn.nil){let b=c.opts.passContext?Ro.default.this:Ro.default.self,w=!("compile"in e&&!a||e.schema===!1);r.assign(d,(0,tn._)`${m}${(0,e1.callValidateCode)(t,p,b,w)}`,e.modifying)}function x(m){var b;r.if((0,tn.not)((b=e.valid)!==null&&b!==void 0?b:d),m)}}Yn.funcKeywordCode=r1;function jb(t){let{gen:e,data:n,it:r}=t;e.if(r.parentData,()=>e.assign(n,(0,tn._)`${r.parentData}[${r.parentDataProperty}]`))}function o1(t,e){let{gen:n}=t;n.if((0,tn._)`Array.isArray(${e})`,()=>{n.assign(Ro.default.vErrors,(0,tn._)`${Ro.default.vErrors} === null ? ${e} : ${Ro.default.vErrors}.concat(${e})`).assign(Ro.default.errors,(0,tn._)`${Ro.default.vErrors}.length`),(0,t1.extendErrors)(t)},()=>t.error())}function i1({schemaEnv:t},e){if(e.async&&!t.$async)throw new Error("async keyword in sync schema")}function Lb(t,e,n){if(n===void 0)throw new Error(`keyword "${e}" failed to compile`);return t.scopeValue("keyword",typeof n=="function"?{ref:n}:{ref:n,code:(0,tn.stringify)(n)})}function s1(t,e,n=!1){return!e.length||e.some(r=>r==="array"?Array.isArray(t):r==="object"?t&&typeof t=="object"&&!Array.isArray(t):typeof t==r||n&&typeof t>"u")}Yn.validSchemaType=s1;function a1({schema:t,opts:e,self:n,errSchemaPath:r},o,i){if(Array.isArray(o.keyword)?!o.keyword.includes(i):o.keyword!==i)throw new Error("ajv implementation error");let s=o.dependencies;if(s!=null&&s.some(a=>!Object.prototype.hasOwnProperty.call(t,a)))throw new Error(`parent schema must have dependencies of ${i}: ${s.join(",")}`);if(o.validateSchema&&!o.validateSchema(t[i])){let c=`keyword "${i}" value is invalid at path "${r}": `+n.errorsText(o.validateSchema.errors);if(e.validateSchema==="log")n.logger.error(c);else throw new Error(c)}}Yn.validateKeywordUsage=a1});var Fb=$(Nr=>{"use strict";Object.defineProperty(Nr,"__esModule",{value:!0});Nr.extendSubschemaMode=Nr.extendSubschemaData=Nr.getSubschema=void 0;var Xn=we(),Mb=Me();function c1(t,{keyword:e,schemaProp:n,schema:r,schemaPath:o,errSchemaPath:i,topSchemaRef:s}){if(e!==void 0&&r!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(e!==void 0){let a=t.schema[e];return n===void 0?{schema:a,schemaPath:(0,Xn._)`${t.schemaPath}${(0,Xn.getProperty)(e)}`,errSchemaPath:`${t.errSchemaPath}/${e}`}:{schema:a[n],schemaPath:(0,Xn._)`${t.schemaPath}${(0,Xn.getProperty)(e)}${(0,Xn.getProperty)(n)}`,errSchemaPath:`${t.errSchemaPath}/${e}/${(0,Mb.escapeFragment)(n)}`}}if(r!==void 0){if(o===void 0||i===void 0||s===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:r,schemaPath:o,topSchemaRef:s,errSchemaPath:i}}throw new Error('either "keyword" or "schema" must be passed')}Nr.getSubschema=c1;function l1(t,e,{dataProp:n,dataPropType:r,data:o,dataTypes:i,propertyName:s}){if(o!==void 0&&n!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');let{gen:a}=e;if(n!==void 0){let{errorPath:l,dataPathArr:p,opts:d}=e,f=a.let("data",(0,Xn._)`${e.data}${(0,Xn.getProperty)(n)}`,!0);c(f),t.errorPath=(0,Xn.str)`${l}${(0,Mb.getErrorPath)(n,r,d.jsPropertySyntax)}`,t.parentDataProperty=(0,Xn._)`${n}`,t.dataPathArr=[...p,t.parentDataProperty]}if(o!==void 0){let l=o instanceof Xn.Name?o:a.let("data",o,!0);c(l),s!==void 0&&(t.propertyName=s)}i&&(t.dataTypes=i);function c(l){t.data=l,t.dataLevel=e.dataLevel+1,t.dataTypes=[],e.definedProperties=new Set,t.parentData=e.data,t.dataNames=[...e.dataNames,l]}}Nr.extendSubschemaData=l1;function u1(t,{jtdDiscriminator:e,jtdMetadata:n,compositeRule:r,createErrors:o,allErrors:i}){r!==void 0&&(t.compositeRule=r),o!==void 0&&(t.createErrors=o),i!==void 0&&(t.allErrors=i),t.jtdDiscriminator=e,t.jtdMetadata=n}Nr.extendSubschemaMode=u1});var Cf=$((UB,Ub)=>{"use strict";Ub.exports=function t(e,n){if(e===n)return!0;if(e&&n&&typeof e=="object"&&typeof n=="object"){if(e.constructor!==n.constructor)return!1;var r,o,i;if(Array.isArray(e)){if(r=e.length,r!=n.length)return!1;for(o=r;o--!==0;)if(!t(e[o],n[o]))return!1;return!0}if(e.constructor===RegExp)return e.source===n.source&&e.flags===n.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===n.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===n.toString();if(i=Object.keys(e),r=i.length,r!==Object.keys(n).length)return!1;for(o=r;o--!==0;)if(!Object.prototype.hasOwnProperty.call(n,i[o]))return!1;for(o=r;o--!==0;){var s=i[o];if(!t(e[s],n[s]))return!1}return!0}return e!==e&&n!==n}});var Zb=$((qB,qb)=>{"use strict";var jr=qb.exports=function(t,e,n){typeof e=="function"&&(n=e,e={}),n=e.cb||n;var r=typeof n=="function"?n:n.pre||function(){},o=n.post||function(){};Bc(e,r,o,t,"",t)};jr.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};jr.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};jr.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};jr.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 Bc(t,e,n,r,o,i,s,a,c,l){if(r&&typeof r=="object"&&!Array.isArray(r)){e(r,o,i,s,a,c,l);for(var p in r){var d=r[p];if(Array.isArray(d)){if(p in jr.arrayKeywords)for(var f=0;f<d.length;f++)Bc(t,e,n,d[f],o+"/"+p+"/"+f,i,o,p,r,f)}else if(p in jr.propsKeywords){if(d&&typeof d=="object")for(var h in d)Bc(t,e,n,d[h],o+"/"+p+"/"+p1(h),i,o,p,r,h)}else(p in jr.keywords||t.allKeys&&!(p in jr.skipKeywords))&&Bc(t,e,n,d,o+"/"+p,i,o,p,r)}n(r,o,i,s,a,c,l)}}function p1(t){return t.replace(/~/g,"~0").replace(/\//g,"~1")}});var Ds=$(un=>{"use strict";Object.defineProperty(un,"__esModule",{value:!0});un.getSchemaRefs=un.resolveUrl=un.normalizeId=un._getFullPath=un.getFullPath=un.inlineRef=void 0;var d1=Me(),f1=Cf(),m1=Zb(),h1=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function g1(t,e=!0){return typeof t=="boolean"?!0:e===!0?!Pf(t):e?Bb(t)<=e:!1}un.inlineRef=g1;var y1=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function Pf(t){for(let e in t){if(y1.has(e))return!0;let n=t[e];if(Array.isArray(n)&&n.some(Pf)||typeof n=="object"&&Pf(n))return!0}return!1}function Bb(t){let e=0;for(let n in t){if(n==="$ref")return 1/0;if(e++,!h1.has(n)&&(typeof t[n]=="object"&&(0,d1.eachItem)(t[n],r=>e+=Bb(r)),e===1/0))return 1/0}return e}function Hb(t,e="",n){n!==!1&&(e=yi(e));let r=t.parse(e);return Vb(t,r)}un.getFullPath=Hb;function Vb(t,e){return t.serialize(e).split("#")[0]+"#"}un._getFullPath=Vb;var x1=/#\/?$/;function yi(t){return t?t.replace(x1,""):""}un.normalizeId=yi;function v1(t,e,n){return n=yi(n),t.resolve(e,n)}un.resolveUrl=v1;var b1=/^[a-z_][-a-z0-9._]*$/i;function _1(t,e){if(typeof t=="boolean")return{};let{schemaId:n,uriResolver:r}=this.opts,o=yi(t[n]||e),i={"":o},s=Hb(r,o,!1),a={},c=new Set;return m1(t,{allKeys:!0},(d,f,h,y)=>{if(y===void 0)return;let v=s+f,x=i[y];typeof d[n]=="string"&&(x=m.call(this,d[n])),b.call(this,d.$anchor),b.call(this,d.$dynamicAnchor),i[f]=x;function m(w){let k=this.opts.uriResolver.resolve;if(w=yi(x?k(x,w):w),c.has(w))throw p(w);c.add(w);let E=this.refs[w];return typeof E=="string"&&(E=this.refs[E]),typeof E=="object"?l(d,E.schema,w):w!==yi(v)&&(w[0]==="#"?(l(d,a[w],w),a[w]=d):this.refs[w]=v),w}function b(w){if(typeof w=="string"){if(!b1.test(w))throw new Error(`invalid anchor "${w}"`);m.call(this,`#${w}`)}}}),a;function l(d,f,h){if(f!==void 0&&!f1(d,f))throw p(h)}function p(d){return new Error(`reference "${d}" resolves to more than one schema`)}}un.getSchemaRefs=_1});var Us=$(Lr=>{"use strict";Object.defineProperty(Lr,"__esModule",{value:!0});Lr.getData=Lr.KeywordCxt=Lr.validateFunctionCode=void 0;var Yb=Eb(),Gb=Ls(),zf=kf(),Hc=Ls(),w1=Ob(),Fs=Db(),Of=Fb(),re=we(),he=gr(),S1=Ds(),yr=Me(),Ms=js();function k1(t){if(e_(t)&&(t_(t),Qb(t))){$1(t);return}Xb(t,()=>(0,Yb.topBoolOrEmptySchema)(t))}Lr.validateFunctionCode=k1;function Xb({gen:t,validateName:e,schema:n,schemaEnv:r,opts:o},i){o.code.es5?t.func(e,(0,re._)`${he.default.data}, ${he.default.valCxt}`,r.$async,()=>{t.code((0,re._)`"use strict"; ${Wb(n,o)}`),E1(t,o),t.code(i)}):t.func(e,(0,re._)`${he.default.data}, ${T1(o)}`,r.$async,()=>t.code(Wb(n,o)).code(i))}function T1(t){return(0,re._)`{${he.default.instancePath}="", ${he.default.parentData}, ${he.default.parentDataProperty}, ${he.default.rootData}=${he.default.data}${t.dynamicRef?(0,re._)`, ${he.default.dynamicAnchors}={}`:re.nil}}={}`}function E1(t,e){t.if(he.default.valCxt,()=>{t.var(he.default.instancePath,(0,re._)`${he.default.valCxt}.${he.default.instancePath}`),t.var(he.default.parentData,(0,re._)`${he.default.valCxt}.${he.default.parentData}`),t.var(he.default.parentDataProperty,(0,re._)`${he.default.valCxt}.${he.default.parentDataProperty}`),t.var(he.default.rootData,(0,re._)`${he.default.valCxt}.${he.default.rootData}`),e.dynamicRef&&t.var(he.default.dynamicAnchors,(0,re._)`${he.default.valCxt}.${he.default.dynamicAnchors}`)},()=>{t.var(he.default.instancePath,(0,re._)`""`),t.var(he.default.parentData,(0,re._)`undefined`),t.var(he.default.parentDataProperty,(0,re._)`undefined`),t.var(he.default.rootData,he.default.data),e.dynamicRef&&t.var(he.default.dynamicAnchors,(0,re._)`{}`)})}function $1(t){let{schema:e,opts:n,gen:r}=t;Xb(t,()=>{n.$comment&&e.$comment&&r_(t),P1(t),r.let(he.default.vErrors,null),r.let(he.default.errors,0),n.unevaluated&&R1(t),n_(t),N1(t)})}function R1(t){let{gen:e,validateName:n}=t;t.evaluated=e.const("evaluated",(0,re._)`${n}.evaluated`),e.if((0,re._)`${t.evaluated}.dynamicProps`,()=>e.assign((0,re._)`${t.evaluated}.props`,(0,re._)`undefined`)),e.if((0,re._)`${t.evaluated}.dynamicItems`,()=>e.assign((0,re._)`${t.evaluated}.items`,(0,re._)`undefined`))}function Wb(t,e){let n=typeof t=="object"&&t[e.schemaId];return n&&(e.code.source||e.code.process)?(0,re._)`/*# sourceURL=${n} */`:re.nil}function A1(t,e){if(e_(t)&&(t_(t),Qb(t))){I1(t,e);return}(0,Yb.boolOrEmptySchema)(t,e)}function Qb({schema:t,self:e}){if(typeof t=="boolean")return!t;for(let n in t)if(e.RULES.all[n])return!0;return!1}function e_(t){return typeof t.schema!="boolean"}function I1(t,e){let{schema:n,gen:r,opts:o}=t;o.$comment&&n.$comment&&r_(t),O1(t),z1(t);let i=r.const("_errs",he.default.errors);n_(t,i),r.var(e,(0,re._)`${i} === ${he.default.errors}`)}function t_(t){(0,yr.checkUnknownRules)(t),C1(t)}function n_(t,e){if(t.opts.jtd)return Kb(t,[],!1,e);let n=(0,Gb.getSchemaTypes)(t.schema),r=(0,Gb.coerceAndCheckDataType)(t,n);Kb(t,n,!r,e)}function C1(t){let{schema:e,errSchemaPath:n,opts:r,self:o}=t;e.$ref&&r.ignoreKeywordsWithRef&&(0,yr.schemaHasRulesButRef)(e,o.RULES)&&o.logger.warn(`$ref: keywords ignored in schema at path "${n}"`)}function P1(t){let{schema:e,opts:n}=t;e.default!==void 0&&n.useDefaults&&n.strictSchema&&(0,yr.checkStrictMode)(t,"default is ignored in the schema root")}function O1(t){let e=t.schema[t.opts.schemaId];e&&(t.baseId=(0,S1.resolveUrl)(t.opts.uriResolver,t.baseId,e))}function z1(t){if(t.schema.$async&&!t.schemaEnv.$async)throw new Error("async schema in sync schema")}function r_({gen:t,schemaEnv:e,schema:n,errSchemaPath:r,opts:o}){let i=n.$comment;if(o.$comment===!0)t.code((0,re._)`${he.default.self}.logger.log(${i})`);else if(typeof o.$comment=="function"){let s=(0,re.str)`${r}/$comment`,a=t.scopeValue("root",{ref:e.root});t.code((0,re._)`${he.default.self}.opts.$comment(${i}, ${s}, ${a}.schema)`)}}function N1(t){let{gen:e,schemaEnv:n,validateName:r,ValidationError:o,opts:i}=t;n.$async?e.if((0,re._)`${he.default.errors} === 0`,()=>e.return(he.default.data),()=>e.throw((0,re._)`new ${o}(${he.default.vErrors})`)):(e.assign((0,re._)`${r}.errors`,he.default.vErrors),i.unevaluated&&j1(t),e.return((0,re._)`${he.default.errors} === 0`))}function j1({gen:t,evaluated:e,props:n,items:r}){n instanceof re.Name&&t.assign((0,re._)`${e}.props`,n),r instanceof re.Name&&t.assign((0,re._)`${e}.items`,r)}function Kb(t,e,n,r){let{gen:o,schema:i,data:s,allErrors:a,opts:c,self:l}=t,{RULES:p}=l;if(i.$ref&&(c.ignoreKeywordsWithRef||!(0,yr.schemaHasRulesButRef)(i,p))){o.block(()=>i_(t,"$ref",p.all.$ref.definition));return}c.jtd||L1(t,e),o.block(()=>{for(let f of p.rules)d(f);d(p.post)});function d(f){(0,zf.shouldUseGroup)(i,f)&&(f.type?(o.if((0,Hc.checkDataType)(f.type,s,c.strictNumbers)),Jb(t,f),e.length===1&&e[0]===f.type&&n&&(o.else(),(0,Hc.reportTypeError)(t)),o.endIf()):Jb(t,f),a||o.if((0,re._)`${he.default.errors} === ${r||0}`))}}function Jb(t,e){let{gen:n,schema:r,opts:{useDefaults:o}}=t;o&&(0,w1.assignDefaults)(t,e.type),n.block(()=>{for(let i of e.rules)(0,zf.shouldUseRule)(r,i)&&i_(t,i.keyword,i.definition,e.type)})}function L1(t,e){t.schemaEnv.meta||!t.opts.strictTypes||(D1(t,e),t.opts.allowUnionTypes||M1(t,e),F1(t,t.dataTypes))}function D1(t,e){if(e.length){if(!t.dataTypes.length){t.dataTypes=e;return}e.forEach(n=>{o_(t.dataTypes,n)||Nf(t,`type "${n}" not allowed by context "${t.dataTypes.join(",")}"`)}),q1(t,e)}}function M1(t,e){e.length>1&&!(e.length===2&&e.includes("null"))&&Nf(t,"use allowUnionTypes to allow union type keyword")}function F1(t,e){let n=t.self.RULES.all;for(let r in n){let o=n[r];if(typeof o=="object"&&(0,zf.shouldUseRule)(t.schema,o)){let{type:i}=o.definition;i.length&&!i.some(s=>U1(e,s))&&Nf(t,`missing type "${i.join(",")}" for keyword "${r}"`)}}}function U1(t,e){return t.includes(e)||e==="number"&&t.includes("integer")}function o_(t,e){return t.includes(e)||e==="integer"&&t.includes("number")}function q1(t,e){let n=[];for(let r of t.dataTypes)o_(e,r)?n.push(r):e.includes("integer")&&r==="number"&&n.push("integer");t.dataTypes=n}function Nf(t,e){let n=t.schemaEnv.baseId+t.errSchemaPath;e+=` at "${n}" (strictTypes)`,(0,yr.checkStrictMode)(t,e,t.opts.strictTypes)}var Vc=class{constructor(e,n,r){if((0,Fs.validateKeywordUsage)(e,n,r),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=r,this.data=e.data,this.schema=e.schema[r],this.$data=n.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,yr.schemaRefOrVal)(e,this.schema,r,this.$data),this.schemaType=n.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=n,this.$data)this.schemaCode=e.gen.const("vSchema",s_(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,Fs.validSchemaType)(this.schema,n.schemaType,n.allowUndefined))throw new Error(`${r} value must be ${JSON.stringify(n.schemaType)}`);("code"in n?n.trackErrors:n.errors!==!1)&&(this.errsCount=e.gen.const("_errs",he.default.errors))}result(e,n,r){this.failResult((0,re.not)(e),n,r)}failResult(e,n,r){this.gen.if(e),r?r():this.error(),n?(this.gen.else(),n(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(e,n){this.failResult((0,re.not)(e),void 0,n)}fail(e){if(e===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(e),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);let{schemaCode:n}=this;this.fail((0,re._)`${n} !== undefined && (${(0,re.or)(this.invalid$data(),e)})`)}error(e,n,r){if(n){this.setParams(n),this._error(e,r),this.setParams({});return}this._error(e,r)}_error(e,n){(e?Ms.reportExtraError:Ms.reportError)(this,this.def.error,n)}$dataError(){(0,Ms.reportError)(this,this.def.$dataError||Ms.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,Ms.resetErrorsCount)(this.gen,this.errsCount)}ok(e){this.allErrors||this.gen.if(e)}setParams(e,n){n?Object.assign(this.params,e):this.params=e}block$data(e,n,r=re.nil){this.gen.block(()=>{this.check$data(e,r),n()})}check$data(e=re.nil,n=re.nil){if(!this.$data)return;let{gen:r,schemaCode:o,schemaType:i,def:s}=this;r.if((0,re.or)((0,re._)`${o} === undefined`,n)),e!==re.nil&&r.assign(e,!0),(i.length||s.validateSchema)&&(r.elseIf(this.invalid$data()),this.$dataError(),e!==re.nil&&r.assign(e,!1)),r.else()}invalid$data(){let{gen:e,schemaCode:n,schemaType:r,def:o,it:i}=this;return(0,re.or)(s(),a());function s(){if(r.length){if(!(n instanceof re.Name))throw new Error("ajv implementation error");let c=Array.isArray(r)?r:[r];return(0,re._)`${(0,Hc.checkDataTypes)(c,n,i.opts.strictNumbers,Hc.DataType.Wrong)}`}return re.nil}function a(){if(o.validateSchema){let c=e.scopeValue("validate$data",{ref:o.validateSchema});return(0,re._)`!${c}(${n})`}return re.nil}}subschema(e,n){let r=(0,Of.getSubschema)(this.it,e);(0,Of.extendSubschemaData)(r,this.it,e),(0,Of.extendSubschemaMode)(r,e);let o={...this.it,...r,items:void 0,props:void 0};return A1(o,n),o}mergeEvaluated(e,n){let{it:r,gen:o}=this;r.opts.unevaluated&&(r.props!==!0&&e.props!==void 0&&(r.props=yr.mergeEvaluated.props(o,e.props,r.props,n)),r.items!==!0&&e.items!==void 0&&(r.items=yr.mergeEvaluated.items(o,e.items,r.items,n)))}mergeValidEvaluated(e,n){let{it:r,gen:o}=this;if(r.opts.unevaluated&&(r.props!==!0||r.items!==!0))return o.if(n,()=>this.mergeEvaluated(e,re.Name)),!0}};Lr.KeywordCxt=Vc;function i_(t,e,n,r){let o=new Vc(t,n,e);"code"in n?n.code(o,r):o.$data&&n.validate?(0,Fs.funcKeywordCode)(o,n):"macro"in n?(0,Fs.macroKeywordCode)(o,n):(n.compile||n.validate)&&(0,Fs.funcKeywordCode)(o,n)}var Z1=/^\/(?:[^~]|~0|~1)*$/,B1=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function s_(t,{dataLevel:e,dataNames:n,dataPathArr:r}){let o,i;if(t==="")return he.default.rootData;if(t[0]==="/"){if(!Z1.test(t))throw new Error(`Invalid JSON-pointer: ${t}`);o=t,i=he.default.rootData}else{let l=B1.exec(t);if(!l)throw new Error(`Invalid JSON-pointer: ${t}`);let p=+l[1];if(o=l[2],o==="#"){if(p>=e)throw new Error(c("property/index",p));return r[e-p]}if(p>e)throw new Error(c("data",p));if(i=n[e-p],!o)return i}let s=i,a=o.split("/");for(let l of a)l&&(i=(0,re._)`${i}${(0,re.getProperty)((0,yr.unescapeJsonPointer)(l))}`,s=(0,re._)`${s} && ${i}`);return s;function c(l,p){return`Cannot access ${l} ${p} levels up, current level is ${e}`}}Lr.getData=s_});var Gc=$(Lf=>{"use strict";Object.defineProperty(Lf,"__esModule",{value:!0});var jf=class extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}};Lf.default=jf});var qs=$(Ff=>{"use strict";Object.defineProperty(Ff,"__esModule",{value:!0});var Df=Ds(),Mf=class extends Error{constructor(e,n,r,o){super(o||`can't resolve reference ${r} from id ${n}`),this.missingRef=(0,Df.resolveUrl)(e,n,r),this.missingSchema=(0,Df.normalizeId)((0,Df.getFullPath)(e,this.missingRef))}};Ff.default=Mf});var Kc=$(An=>{"use strict";Object.defineProperty(An,"__esModule",{value:!0});An.resolveSchema=An.getCompilingSchema=An.resolveRef=An.compileSchema=An.SchemaEnv=void 0;var Mn=we(),H1=Gc(),Ao=gr(),Fn=Ds(),a_=Me(),V1=Us(),xi=class{constructor(e){var n;this.refs={},this.dynamicAnchors={};let r;typeof e.schema=="object"&&(r=e.schema),this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=(n=e.baseId)!==null&&n!==void 0?n:(0,Fn.normalizeId)(r==null?void 0:r[e.schemaId||"$id"]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=r==null?void 0:r.$async,this.refs={}}};An.SchemaEnv=xi;function qf(t){let e=c_.call(this,t);if(e)return e;let n=(0,Fn.getFullPath)(this.opts.uriResolver,t.root.baseId),{es5:r,lines:o}=this.opts.code,{ownProperties:i}=this.opts,s=new Mn.CodeGen(this.scope,{es5:r,lines:o,ownProperties:i}),a;t.$async&&(a=s.scopeValue("Error",{ref:H1.default,code:(0,Mn._)`require("ajv/dist/runtime/validation_error").default`}));let c=s.scopeName("validate");t.validateName=c;let l={gen:s,allErrors:this.opts.allErrors,data:Ao.default.data,parentData:Ao.default.parentData,parentDataProperty:Ao.default.parentDataProperty,dataNames:[Ao.default.data],dataPathArr:[Mn.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:s.scopeValue("schema",this.opts.code.source===!0?{ref:t.schema,code:(0,Mn.stringify)(t.schema)}:{ref:t.schema}),validateName:c,ValidationError:a,schema:t.schema,schemaEnv:t,rootId:n,baseId:t.baseId||n,schemaPath:Mn.nil,errSchemaPath:t.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,Mn._)`""`,opts:this.opts,self:this},p;try{this._compilations.add(t),(0,V1.validateFunctionCode)(l),s.optimize(this.opts.code.optimize);let d=s.toString();p=`${s.scopeRefs(Ao.default.scope)}return ${d}`,this.opts.code.process&&(p=this.opts.code.process(p,t));let h=new Function(`${Ao.default.self}`,`${Ao.default.scope}`,p)(this,this.scope.get());if(this.scope.value(c,{ref:h}),h.errors=null,h.schema=t.schema,h.schemaEnv=t,t.$async&&(h.$async=!0),this.opts.code.source===!0&&(h.source={validateName:c,validateCode:d,scopeValues:s._values}),this.opts.unevaluated){let{props:y,items:v}=l;h.evaluated={props:y instanceof Mn.Name?void 0:y,items:v instanceof Mn.Name?void 0:v,dynamicProps:y instanceof Mn.Name,dynamicItems:v instanceof Mn.Name},h.source&&(h.source.evaluated=(0,Mn.stringify)(h.evaluated))}return t.validate=h,t}catch(d){throw delete t.validate,delete t.validateName,p&&this.logger.error("Error compiling schema, function code:",p),d}finally{this._compilations.delete(t)}}An.compileSchema=qf;function G1(t,e,n){var r;n=(0,Fn.resolveUrl)(this.opts.uriResolver,e,n);let o=t.refs[n];if(o)return o;let i=J1.call(this,t,n);if(i===void 0){let s=(r=t.localRefs)===null||r===void 0?void 0:r[n],{schemaId:a}=this.opts;s&&(i=new xi({schema:s,schemaId:a,root:t,baseId:e}))}if(i!==void 0)return t.refs[n]=W1.call(this,i)}An.resolveRef=G1;function W1(t){return(0,Fn.inlineRef)(t.schema,this.opts.inlineRefs)?t.schema:t.validate?t:qf.call(this,t)}function c_(t){for(let e of this._compilations)if(K1(e,t))return e}An.getCompilingSchema=c_;function K1(t,e){return t.schema===e.schema&&t.root===e.root&&t.baseId===e.baseId}function J1(t,e){let n;for(;typeof(n=this.refs[e])=="string";)e=n;return n||this.schemas[e]||Wc.call(this,t,e)}function Wc(t,e){let n=this.opts.uriResolver.parse(e),r=(0,Fn._getFullPath)(this.opts.uriResolver,n),o=(0,Fn.getFullPath)(this.opts.uriResolver,t.baseId,void 0);if(Object.keys(t.schema).length>0&&r===o)return Uf.call(this,n,t);let i=(0,Fn.normalizeId)(r),s=this.refs[i]||this.schemas[i];if(typeof s=="string"){let a=Wc.call(this,t,s);return typeof(a==null?void 0:a.schema)!="object"?void 0:Uf.call(this,n,a)}if(typeof(s==null?void 0:s.schema)=="object"){if(s.validate||qf.call(this,s),i===(0,Fn.normalizeId)(e)){let{schema:a}=s,{schemaId:c}=this.opts,l=a[c];return l&&(o=(0,Fn.resolveUrl)(this.opts.uriResolver,o,l)),new xi({schema:a,schemaId:c,root:t,baseId:o})}return Uf.call(this,n,s)}}An.resolveSchema=Wc;var Y1=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function Uf(t,{baseId:e,schema:n,root:r}){var o;if(((o=t.fragment)===null||o===void 0?void 0:o[0])!=="/")return;for(let a of t.fragment.slice(1).split("/")){if(typeof n=="boolean")return;let c=n[(0,a_.unescapeFragment)(a)];if(c===void 0)return;n=c;let l=typeof n=="object"&&n[this.opts.schemaId];!Y1.has(a)&&l&&(e=(0,Fn.resolveUrl)(this.opts.uriResolver,e,l))}let i;if(typeof n!="boolean"&&n.$ref&&!(0,a_.schemaHasRulesButRef)(n,this.RULES)){let a=(0,Fn.resolveUrl)(this.opts.uriResolver,e,n.$ref);i=Wc.call(this,r,a)}let{schemaId:s}=this.opts;if(i=i||new xi({schema:n,schemaId:s,root:r,baseId:e}),i.schema!==i.root.schema)return i}});var l_=$((WB,X1)=>{X1.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 Hf=$((KB,h_)=>{"use strict";var Q1=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),p_=RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u),Zf=RegExp.prototype.test.bind(/^[\da-f]{2}$/iu),d_=RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu),ez=RegExp.prototype.test.bind(/^[\da-z\-._~!$&'()*+,;=:@/]$/iu);function Bf(t){let e="",n=0,r=0;for(r=0;r<t.length;r++)if(n=t[r].charCodeAt(0),n!==48){if(!(n>=48&&n<=57||n>=65&&n<=70||n>=97&&n<=102))return"";e+=t[r];break}for(r+=1;r<t.length;r++){if(n=t[r].charCodeAt(0),!(n>=48&&n<=57||n>=65&&n<=70||n>=97&&n<=102))return"";e+=t[r]}return e}var tz=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function u_(t){return t.length=0,!0}function nz(t,e,n){if(t.length){let r=Bf(t);if(r!=="")e.push(r);else return n.error=!0,!1;t.length=0}return!0}function rz(t){let e=0,n={error:!1,address:"",zone:""},r=[],o=[],i=!1,s=!1,a=nz;for(let c=0;c<t.length;c++){let l=t[c];if(!(l==="["||l==="]"))if(l===":"){if(i===!0&&(s=!0),!a(o,r,n))break;if(++e>7){n.error=!0;break}c>0&&t[c-1]===":"&&(i=!0),r.push(":");continue}else if(l==="%"){if(!a(o,r,n))break;a=u_}else{o.push(l);continue}}return o.length&&(a===u_?n.zone=o.join(""):s?r.push(o.join("")):r.push(Bf(o))),n.address=r.join(""),n}function f_(t){if(oz(t,":")<2)return{host:t,isIPV6:!1};let e=rz(t);if(e.error)return{host:t,isIPV6:!1};{let n=e.address,r=e.address;return e.zone&&(n+="%"+e.zone,r+="%25"+e.zone),{host:n,isIPV6:!0,escapedHost:r}}}function oz(t,e){let n=0;for(let r=0;r<t.length;r++)t[r]===e&&n++;return n}function iz(t){let e=t,n=[],r=-1,o=0;for(;o=e.length;){if(o===1){if(e===".")break;if(e==="/"){n.push("/");break}else{n.push(e);break}}else if(o===2){if(e[0]==="."){if(e[1]===".")break;if(e[1]==="/"){e=e.slice(2);continue}}else if(e[0]==="/"&&(e[1]==="."||e[1]==="/")){n.push("/");break}}else if(o===3&&e==="/.."){n.length!==0&&n.pop(),n.push("/");break}if(e[0]==="."){if(e[1]==="."){if(e[2]==="/"){e=e.slice(3);continue}}else if(e[1]==="/"){e=e.slice(2);continue}}else if(e[0]==="/"&&e[1]==="."){if(e[2]==="/"){e=e.slice(2);continue}else if(e[2]==="."&&e[3]==="/"){e=e.slice(3),n.length!==0&&n.pop();continue}}if((r=e.indexOf("/",1))===-1){n.push(e);break}else n.push(e.slice(0,r)),e=e.slice(r)}return n.join("")}var sz={"@":"%40","/":"%2F","?":"%3F","#":"%23",":":"%3A"},az=/[@/?#:]/g,cz=/[@/?#]/g;function m_(t,e){let n=e?cz:az;return n.lastIndex=0,t.replace(n,r=>sz[r])}function lz(t,e=!1){if(t.indexOf("%")===-1)return t;let n="";for(let r=0;r<t.length;r++){if(t[r]==="%"&&r+2<t.length){let o=t.slice(r+1,r+3);if(Zf(o)){let i=o.toUpperCase(),s=String.fromCharCode(parseInt(i,16));e&&d_(s)?n+=s:n+="%"+i,r+=2;continue}}n+=t[r]}return n}function uz(t){let e="";for(let n=0;n<t.length;n++){if(t[n]==="%"&&n+2<t.length){let r=t.slice(n+1,n+3);if(Zf(r)){let o=r.toUpperCase(),i=String.fromCharCode(parseInt(o,16));i!=="."&&d_(i)?e+=i:e+="%"+o,n+=2;continue}}ez(t[n])?e+=t[n]:e+=escape(t[n])}return e}function pz(t){let e="";for(let n=0;n<t.length;n++){if(t[n]==="%"&&n+2<t.length){let r=t.slice(n+1,n+3);if(Zf(r)){e+="%"+r.toUpperCase(),n+=2;continue}}e+=escape(t[n])}return e}function dz(t){let e=[];if(t.userinfo!==void 0&&(e.push(t.userinfo),e.push("@")),t.host!==void 0){let n=unescape(t.host);if(!p_(n)){let r=f_(n);r.isIPV6===!0?n=`[${r.escapedHost}]`:n=m_(n,!1)}e.push(n)}return(typeof t.port=="number"||typeof t.port=="string")&&(e.push(":"),e.push(String(t.port))),e.length?e.join(""):void 0}h_.exports={nonSimpleDomain:tz,recomposeAuthority:dz,reescapeHostDelimiters:m_,normalizePercentEncoding:lz,normalizePathEncoding:uz,escapePreservingEscapes:pz,removeDotSegments:iz,isIPv4:p_,isUUID:Q1,normalizeIPv6:f_,stringArrayToHexStripped:Bf}});var b_=$((JB,v_)=>{"use strict";var{isUUID:fz}=Hf(),mz=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,hz=["http","https","ws","wss","urn","urn:uuid"];function gz(t){return hz.indexOf(t)!==-1}function Vf(t){return t.secure===!0?!0:t.secure===!1?!1:t.scheme?t.scheme.length===3&&(t.scheme[0]==="w"||t.scheme[0]==="W")&&(t.scheme[1]==="s"||t.scheme[1]==="S")&&(t.scheme[2]==="s"||t.scheme[2]==="S"):!1}function g_(t){return t.host||(t.error=t.error||"HTTP URIs must have a host."),t}function y_(t){let e=String(t.scheme).toLowerCase()==="https";return(t.port===(e?443:80)||t.port==="")&&(t.port=void 0),t.path||(t.path="/"),t}function yz(t){return t.secure=Vf(t),t.resourceName=(t.path||"/")+(t.query?"?"+t.query:""),t.path=void 0,t.query=void 0,t}function xz(t){if((t.port===(Vf(t)?443:80)||t.port==="")&&(t.port=void 0),typeof t.secure=="boolean"&&(t.scheme=t.secure?"wss":"ws",t.secure=void 0),t.resourceName){let[e,n]=t.resourceName.split("?");t.path=e&&e!=="/"?e:void 0,t.query=n,t.resourceName=void 0}return t.fragment=void 0,t}function vz(t,e){if(!t.path)return t.error="URN can not be parsed",t;let n=t.path.match(mz);if(n){let r=e.scheme||t.scheme||"urn";t.nid=n[1].toLowerCase(),t.nss=n[2];let o=`${r}:${e.nid||t.nid}`,i=Gf(o);t.path=void 0,i&&(t=i.parse(t,e))}else t.error=t.error||"URN can not be parsed.";return t}function bz(t,e){if(t.nid===void 0)throw new Error("URN without nid cannot be serialized");let n=e.scheme||t.scheme||"urn",r=t.nid.toLowerCase(),o=`${n}:${e.nid||r}`,i=Gf(o);i&&(t=i.serialize(t,e));let s=t,a=t.nss;return s.path=`${r||e.nid}:${a}`,e.skipEscape=!0,s}function _z(t,e){let n=t;return n.uuid=n.nss,n.nss=void 0,!e.tolerant&&(!n.uuid||!fz(n.uuid))&&(n.error=n.error||"UUID is not valid."),n}function wz(t){let e=t;return e.nss=(t.uuid||"").toLowerCase(),e}var x_={scheme:"http",domainHost:!0,parse:g_,serialize:y_},Sz={scheme:"https",domainHost:x_.domainHost,parse:g_,serialize:y_},Jc={scheme:"ws",domainHost:!0,parse:yz,serialize:xz},kz={scheme:"wss",domainHost:Jc.domainHost,parse:Jc.parse,serialize:Jc.serialize},Tz={scheme:"urn",parse:vz,serialize:bz,skipNormalize:!0},Ez={scheme:"urn:uuid",parse:_z,serialize:wz,skipNormalize:!0},Yc={http:x_,https:Sz,ws:Jc,wss:kz,urn:Tz,"urn:uuid":Ez};Object.setPrototypeOf(Yc,null);function Gf(t){return t&&(Yc[t]||Yc[t.toLowerCase()])||void 0}v_.exports={wsIsSecure:Vf,SCHEMES:Yc,isValidSchemeName:gz,getSchemeHandler:Gf}});var E_=$((YB,Xc)=>{"use strict";var{normalizeIPv6:$z,removeDotSegments:Zs,recomposeAuthority:Rz,normalizePercentEncoding:Az,normalizePathEncoding:Iz,escapePreservingEscapes:Cz,reescapeHostDelimiters:Pz,isIPv4:Oz,nonSimpleDomain:zz}=Hf(),{SCHEMES:Nz,getSchemeHandler:w_}=b_();function jz(t,e){return typeof t=="string"?t=Uz(t,e):typeof t=="object"&&(t=vi(Io(t,e),e)),t}function Lz(t,e,n){let r=n?Object.assign({scheme:"null"},n):{scheme:"null"},o=S_(vi(t,r),vi(e,r),r,!0);return r.skipEscape=!0,Io(o,r)}function S_(t,e,n,r){let o={};return r||(t=vi(Io(t,n),n),e=vi(Io(e,n),n)),n=n||{},!n.tolerant&&e.scheme?(o.scheme=e.scheme,o.userinfo=e.userinfo,o.host=e.host,o.port=e.port,o.path=Zs(e.path||""),o.query=e.query):(e.userinfo!==void 0||e.host!==void 0||e.port!==void 0?(o.userinfo=e.userinfo,o.host=e.host,o.port=e.port,o.path=Zs(e.path||""),o.query=e.query):(e.path?(e.path[0]==="/"?o.path=Zs(e.path):((t.userinfo!==void 0||t.host!==void 0||t.port!==void 0)&&!t.path?o.path="/"+e.path:t.path?o.path=t.path.slice(0,t.path.lastIndexOf("/")+1)+e.path:o.path=e.path,o.path=Zs(o.path)),o.query=e.query):(o.path=t.path,e.query!==void 0?o.query=e.query:o.query=t.query),o.userinfo=t.userinfo,o.host=t.host,o.port=t.port),o.scheme=t.scheme),o.fragment=e.fragment,o}function Dz(t,e,n){let r=__(t,n),o=__(e,n);return r!==void 0&&o!==void 0&&r.toLowerCase()===o.toLowerCase()}function Io(t,e){let n={host:t.host,scheme:t.scheme,userinfo:t.userinfo,port:t.port,path:t.path,query:t.query,nid:t.nid,nss:t.nss,uuid:t.uuid,fragment:t.fragment,reference:t.reference,resourceName:t.resourceName,secure:t.secure,error:""},r=Object.assign({},e),o=[],i=w_(r.scheme||n.scheme);i&&i.serialize&&i.serialize(n,r),n.path!==void 0&&(r.skipEscape?n.path=Az(n.path):(n.path=Cz(n.path),n.scheme!==void 0&&(n.path=n.path.split("%3A").join(":")))),r.reference!=="suffix"&&n.scheme&&o.push(n.scheme,":");let s=Rz(n);if(s!==void 0&&(r.reference!=="suffix"&&o.push("//"),o.push(s),n.path&&n.path[0]!=="/"&&o.push("/")),n.path!==void 0){let a=n.path;!r.absolutePath&&(!i||!i.absolutePath)&&(a=Zs(a)),s===void 0&&a[0]==="/"&&a[1]==="/"&&(a="/%2F"+a.slice(2)),o.push(a)}return n.query!==void 0&&o.push("?",n.query),n.fragment!==void 0&&o.push("#",n.fragment),o.join("")}var Mz=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function Fz(t,e){if(e[2]!==void 0&&t.path&&t.path[0]!=="/")return'URI path must start with "/" when authority is present.';if(typeof t.port=="number"&&(t.port<0||t.port>65535))return"URI port is malformed."}function k_(t,e){let n=Object.assign({},e),r={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},o=!1,i=!1;n.reference==="suffix"&&(n.scheme?t=n.scheme+":"+t:t="//"+t);let s=t.match(Mz);if(s){r.scheme=s[1],r.userinfo=s[3],r.host=s[4],r.port=parseInt(s[5],10),r.path=s[6]||"",r.query=s[7],r.fragment=s[8],isNaN(r.port)&&(r.port=s[5]);let a=Fz(r,s);if(a!==void 0&&(r.error=r.error||a,o=!0),r.host)if(Oz(r.host)===!1){let p=$z(r.host);r.host=p.host.toLowerCase(),i=p.isIPV6}else i=!0;r.scheme===void 0&&r.userinfo===void 0&&r.host===void 0&&r.port===void 0&&r.query===void 0&&!r.path?r.reference="same-document":r.scheme===void 0?r.reference="relative":r.fragment===void 0?r.reference="absolute":r.reference="uri",n.reference&&n.reference!=="suffix"&&n.reference!==r.reference&&(r.error=r.error||"URI is not a "+n.reference+" reference.");let c=w_(n.scheme||r.scheme);if(!n.unicodeSupport&&(!c||!c.unicodeSupport)&&r.host&&(n.domainHost||c&&c.domainHost)&&i===!1&&zz(r.host))try{r.host=new URL("http://"+r.host).hostname}catch(l){r.error=r.error||"Host's domain name can not be converted to ASCII: "+l}if((!c||c&&!c.skipNormalize)&&(t.indexOf("%")!==-1&&(r.scheme!==void 0&&(r.scheme=unescape(r.scheme)),r.host!==void 0&&(r.host=Pz(unescape(r.host),i))),r.path&&(r.path=Iz(r.path)),r.fragment))try{r.fragment=encodeURI(decodeURIComponent(r.fragment))}catch{r.error=r.error||"URI malformed"}c&&c.parse&&c.parse(r,n)}else r.error=r.error||"URI can not be parsed.";return{parsed:r,malformedAuthorityOrPort:o}}function vi(t,e){return k_(t,e).parsed}function Uz(t,e){return T_(t,e).normalized}function T_(t,e){let{parsed:n,malformedAuthorityOrPort:r}=k_(t,e);return{normalized:r?t:Io(n,e),malformedAuthorityOrPort:r}}function __(t,e){if(typeof t=="string"){let{normalized:n,malformedAuthorityOrPort:r}=T_(t,e);return r?void 0:n}if(typeof t=="object")return Io(t,e)}var Wf={SCHEMES:Nz,normalize:jz,resolve:Lz,resolveComponent:S_,equal:Dz,serialize:Io,parse:vi};Xc.exports=Wf;Xc.exports.default=Wf;Xc.exports.fastUri=Wf});var R_=$(Kf=>{"use strict";Object.defineProperty(Kf,"__esModule",{value:!0});var $_=E_();$_.code='require("ajv/dist/runtime/uri").default';Kf.default=$_});var j_=$(Mt=>{"use strict";Object.defineProperty(Mt,"__esModule",{value:!0});Mt.CodeGen=Mt.Name=Mt.nil=Mt.stringify=Mt.str=Mt._=Mt.KeywordCxt=void 0;var qz=Us();Object.defineProperty(Mt,"KeywordCxt",{enumerable:!0,get:function(){return qz.KeywordCxt}});var bi=we();Object.defineProperty(Mt,"_",{enumerable:!0,get:function(){return bi._}});Object.defineProperty(Mt,"str",{enumerable:!0,get:function(){return bi.str}});Object.defineProperty(Mt,"stringify",{enumerable:!0,get:function(){return bi.stringify}});Object.defineProperty(Mt,"nil",{enumerable:!0,get:function(){return bi.nil}});Object.defineProperty(Mt,"Name",{enumerable:!0,get:function(){return bi.Name}});Object.defineProperty(Mt,"CodeGen",{enumerable:!0,get:function(){return bi.CodeGen}});var Zz=Gc(),O_=qs(),Bz=Sf(),Bs=Kc(),Hz=we(),Hs=Ds(),Qc=Ls(),Yf=Me(),A_=l_(),Vz=R_(),z_=(t,e)=>new RegExp(t,e);z_.code="new RegExp";var Gz=["removeAdditional","useDefaults","coerceTypes"],Wz=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),Kz={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."},Jz={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},I_=200;function Yz(t){var e,n,r,o,i,s,a,c,l,p,d,f,h,y,v,x,m,b,w,k,E,F,j,me,de;let oe=t.strict,Re=(e=t.code)===null||e===void 0?void 0:e.optimize,bt=Re===!0||Re===void 0?1:Re||0,Ve=(r=(n=t.code)===null||n===void 0?void 0:n.regExp)!==null&&r!==void 0?r:z_,ae=(o=t.uriResolver)!==null&&o!==void 0?o:Vz.default;return{strictSchema:(s=(i=t.strictSchema)!==null&&i!==void 0?i:oe)!==null&&s!==void 0?s:!0,strictNumbers:(c=(a=t.strictNumbers)!==null&&a!==void 0?a:oe)!==null&&c!==void 0?c:!0,strictTypes:(p=(l=t.strictTypes)!==null&&l!==void 0?l:oe)!==null&&p!==void 0?p:"log",strictTuples:(f=(d=t.strictTuples)!==null&&d!==void 0?d:oe)!==null&&f!==void 0?f:"log",strictRequired:(y=(h=t.strictRequired)!==null&&h!==void 0?h:oe)!==null&&y!==void 0?y:!1,code:t.code?{...t.code,optimize:bt,regExp:Ve}:{optimize:bt,regExp:Ve},loopRequired:(v=t.loopRequired)!==null&&v!==void 0?v:I_,loopEnum:(x=t.loopEnum)!==null&&x!==void 0?x:I_,meta:(m=t.meta)!==null&&m!==void 0?m:!0,messages:(b=t.messages)!==null&&b!==void 0?b:!0,inlineRefs:(w=t.inlineRefs)!==null&&w!==void 0?w:!0,schemaId:(k=t.schemaId)!==null&&k!==void 0?k:"$id",addUsedSchema:(E=t.addUsedSchema)!==null&&E!==void 0?E:!0,validateSchema:(F=t.validateSchema)!==null&&F!==void 0?F:!0,validateFormats:(j=t.validateFormats)!==null&&j!==void 0?j:!0,unicodeRegExp:(me=t.unicodeRegExp)!==null&&me!==void 0?me:!0,int32range:(de=t.int32range)!==null&&de!==void 0?de:!0,uriResolver:ae}}var Vs=class{constructor(e={}){this.schemas={},this.refs={},this.formats=Object.create(null),this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts={...e,...Yz(e)};let{es5:n,lines:r}=this.opts.code;this.scope=new Hz.ValueScope({scope:{},prefixes:Wz,es5:n,lines:r}),this.logger=rN(e.logger);let o=e.validateFormats;e.validateFormats=!1,this.RULES=(0,Bz.getRules)(),C_.call(this,Kz,e,"NOT SUPPORTED"),C_.call(this,Jz,e,"DEPRECATED","warn"),this._metaOpts=tN.call(this),e.formats&&Qz.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&eN.call(this,e.keywords),typeof e.meta=="object"&&this.addMetaSchema(e.meta),Xz.call(this),e.validateFormats=o}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:e,meta:n,schemaId:r}=this.opts,o=A_;r==="id"&&(o={...A_},o.id=o.$id,delete o.$id),n&&e&&this.addMetaSchema(o,o[r],!1)}defaultMeta(){let{meta:e,schemaId:n}=this.opts;return this.opts.defaultMeta=typeof e=="object"?e[n]||e:void 0}validate(e,n){let r;if(typeof e=="string"){if(r=this.getSchema(e),!r)throw new Error(`no schema with key or ref "${e}"`)}else r=this.compile(e);let o=r(n);return"$async"in r||(this.errors=r.errors),o}compile(e,n){let r=this._addSchema(e,n);return r.validate||this._compileSchemaEnv(r)}compileAsync(e,n){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");let{loadSchema:r}=this.opts;return o.call(this,e,n);async function o(p,d){await i.call(this,p.$schema);let f=this._addSchema(p,d);return f.validate||s.call(this,f)}async function i(p){p&&!this.getSchema(p)&&await o.call(this,{$ref:p},!0)}async function s(p){try{return this._compileSchemaEnv(p)}catch(d){if(!(d instanceof O_.default))throw d;return a.call(this,d),await c.call(this,d.missingSchema),s.call(this,p)}}function a({missingSchema:p,missingRef:d}){if(this.refs[p])throw new Error(`AnySchema ${p} is loaded but ${d} cannot be resolved`)}async function c(p){let d=await l.call(this,p);this.refs[p]||await i.call(this,d.$schema),this.refs[p]||this.addSchema(d,p,n)}async function l(p){let d=this._loading[p];if(d)return d;try{return await(this._loading[p]=r(p))}finally{delete this._loading[p]}}}addSchema(e,n,r,o=this.opts.validateSchema){if(Array.isArray(e)){for(let s of e)this.addSchema(s,void 0,r,o);return this}let i;if(typeof e=="object"){let{schemaId:s}=this.opts;if(i=e[s],i!==void 0&&typeof i!="string")throw new Error(`schema ${s} must be string`)}return n=(0,Hs.normalizeId)(n||i),this._checkUnique(n),this.schemas[n]=this._addSchema(e,r,n,o,!0),this}addMetaSchema(e,n,r=this.opts.validateSchema){return this.addSchema(e,n,!0,r),this}validateSchema(e,n){if(typeof e=="boolean")return!0;let r;if(r=e.$schema,r!==void 0&&typeof r!="string")throw new Error("$schema must be a string");if(r=r||this.opts.defaultMeta||this.defaultMeta(),!r)return this.logger.warn("meta-schema not available"),this.errors=null,!0;let o=this.validate(r,e);if(!o&&n){let i="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(i);else throw new Error(i)}return o}getSchema(e){let n;for(;typeof(n=P_.call(this,e))=="string";)e=n;if(n===void 0){let{schemaId:r}=this.opts,o=new Bs.SchemaEnv({schema:{},schemaId:r});if(n=Bs.resolveSchema.call(this,o,e),!n)return;this.refs[e]=n}return n.validate||this._compileSchemaEnv(n)}removeSchema(e){if(e instanceof RegExp)return this._removeAllSchemas(this.schemas,e),this._removeAllSchemas(this.refs,e),this;switch(typeof e){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{let n=P_.call(this,e);return typeof n=="object"&&this._cache.delete(n.schema),delete this.schemas[e],delete this.refs[e],this}case"object":{let n=e;this._cache.delete(n);let r=e[this.opts.schemaId];return r&&(r=(0,Hs.normalizeId)(r),delete this.schemas[r],delete this.refs[r]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(e){for(let n of e)this.addKeyword(n);return this}addKeyword(e,n){let r;if(typeof e=="string")r=e,typeof n=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),n.keyword=r);else if(typeof e=="object"&&n===void 0){if(n=e,r=n.keyword,Array.isArray(r)&&!r.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(iN.call(this,r,n),!n)return(0,Yf.eachItem)(r,i=>Jf.call(this,i)),this;aN.call(this,n);let o={...n,type:(0,Qc.getJSONTypes)(n.type),schemaType:(0,Qc.getJSONTypes)(n.schemaType)};return(0,Yf.eachItem)(r,o.type.length===0?i=>Jf.call(this,i,o):i=>o.type.forEach(s=>Jf.call(this,i,o,s))),this}getKeyword(e){let n=this.RULES.all[e];return typeof n=="object"?n.definition:!!n}removeKeyword(e){let{RULES:n}=this;delete n.keywords[e],delete n.all[e];for(let r of n.rules){let o=r.rules.findIndex(i=>i.keyword===e);o>=0&&r.rules.splice(o,1)}return this}addFormat(e,n){return typeof n=="string"&&(n=new RegExp(n)),this.formats[e]=n,this}errorsText(e=this.errors,{separator:n=", ",dataVar:r="data"}={}){return!e||e.length===0?"No errors":e.map(o=>`${r}${o.instancePath} ${o.message}`).reduce((o,i)=>o+n+i)}$dataMetaSchema(e,n){let r=this.RULES.all;e=JSON.parse(JSON.stringify(e));for(let o of n){let i=o.split("/").slice(1),s=e;for(let a of i)s=s[a];for(let a in r){let c=r[a];if(typeof c!="object")continue;let{$data:l}=c.definition,p=s[a];l&&p&&(s[a]=N_(p))}}return e}_removeAllSchemas(e,n){for(let r in e){let o=e[r];(!n||n.test(r))&&(typeof o=="string"?delete e[r]:o&&!o.meta&&(this._cache.delete(o.schema),delete e[r]))}}_addSchema(e,n,r,o=this.opts.validateSchema,i=this.opts.addUsedSchema){let s,{schemaId:a}=this.opts;if(typeof e=="object")s=e[a];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof e!="boolean")throw new Error("schema must be object or boolean")}let c=this._cache.get(e);if(c!==void 0)return c;r=(0,Hs.normalizeId)(s||r);let l=Hs.getSchemaRefs.call(this,e,r);return c=new Bs.SchemaEnv({schema:e,schemaId:a,meta:n,baseId:r,localRefs:l}),this._cache.set(c.schema,c),i&&!r.startsWith("#")&&(r&&this._checkUnique(r),this.refs[r]=c),o&&this.validateSchema(e,!0),c}_checkUnique(e){if(this.schemas[e]||this.refs[e])throw new Error(`schema with key or id "${e}" already exists`)}_compileSchemaEnv(e){if(e.meta?this._compileMetaSchema(e):Bs.compileSchema.call(this,e),!e.validate)throw new Error("ajv implementation error");return e.validate}_compileMetaSchema(e){let n=this.opts;this.opts=this._metaOpts;try{Bs.compileSchema.call(this,e)}finally{this.opts=n}}};Vs.ValidationError=Zz.default;Vs.MissingRefError=O_.default;Mt.default=Vs;function C_(t,e,n,r="error"){for(let o in t){let i=o;i in e&&this.logger[r](`${n}: option ${o}. ${t[i]}`)}}function P_(t){return t=(0,Hs.normalizeId)(t),this.schemas[t]||this.refs[t]}function Xz(){let t=this.opts.schemas;if(t)if(Array.isArray(t))this.addSchema(t);else for(let e in t)this.addSchema(t[e],e)}function Qz(){for(let t in this.opts.formats){let e=this.opts.formats[t];e&&this.addFormat(t,e)}}function eN(t){if(Array.isArray(t)){this.addVocabulary(t);return}this.logger.warn("keywords option as map is deprecated, pass array");for(let e in t){let n=t[e];n.keyword||(n.keyword=e),this.addKeyword(n)}}function tN(){let t={...this.opts};for(let e of Gz)delete t[e];return t}var nN={log(){},warn(){},error(){}};function rN(t){if(t===!1)return nN;if(t===void 0)return console;if(t.log&&t.warn&&t.error)return t;throw new Error("logger must implement log, warn and error methods")}var oN=/^[a-z_$][a-z0-9_$:-]*$/i;function iN(t,e){let{RULES:n}=this;if((0,Yf.eachItem)(t,r=>{if(n.keywords[r])throw new Error(`Keyword ${r} is already defined`);if(!oN.test(r))throw new Error(`Keyword ${r} has invalid name`)}),!!e&&e.$data&&!("code"in e||"validate"in e))throw new Error('$data keyword must have "code" or "validate" function')}function Jf(t,e,n){var r;let o=e==null?void 0:e.post;if(n&&o)throw new Error('keyword with "post" flag cannot have "type"');let{RULES:i}=this,s=o?i.post:i.rules.find(({type:c})=>c===n);if(s||(s={type:n,rules:[]},i.rules.push(s)),i.keywords[t]=!0,!e)return;let a={keyword:t,definition:{...e,type:(0,Qc.getJSONTypes)(e.type),schemaType:(0,Qc.getJSONTypes)(e.schemaType)}};e.before?sN.call(this,s,a,e.before):s.rules.push(a),i.all[t]=a,(r=e.implements)===null||r===void 0||r.forEach(c=>this.addKeyword(c))}function sN(t,e,n){let r=t.rules.findIndex(o=>o.keyword===n);r>=0?t.rules.splice(r,0,e):(t.rules.push(e),this.logger.warn(`rule ${n} is not defined`))}function aN(t){let{metaSchema:e}=t;e!==void 0&&(t.$data&&this.opts.$data&&(e=N_(e)),t.validateSchema=this.compile(e,!0))}var cN={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function N_(t){return{anyOf:[t,cN]}}});var L_=$(Xf=>{"use strict";Object.defineProperty(Xf,"__esModule",{value:!0});var lN={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};Xf.default=lN});var U_=$(Co=>{"use strict";Object.defineProperty(Co,"__esModule",{value:!0});Co.callRef=Co.getValidate=void 0;var uN=qs(),D_=Rn(),pn=we(),_i=gr(),M_=Kc(),el=Me(),pN={keyword:"$ref",schemaType:"string",code(t){let{gen:e,schema:n,it:r}=t,{baseId:o,schemaEnv:i,validateName:s,opts:a,self:c}=r,{root:l}=i;if((n==="#"||n==="#/")&&o===l.baseId)return d();let p=M_.resolveRef.call(c,l,o,n);if(p===void 0)throw new uN.default(r.opts.uriResolver,o,n);if(p instanceof M_.SchemaEnv)return f(p);return h(p);function d(){if(i===l)return tl(t,s,i,i.$async);let y=e.scopeValue("root",{ref:l});return tl(t,(0,pn._)`${y}.validate`,l,l.$async)}function f(y){let v=F_(t,y);tl(t,v,y,y.$async)}function h(y){let v=e.scopeValue("schema",a.code.source===!0?{ref:y,code:(0,pn.stringify)(y)}:{ref:y}),x=e.name("valid"),m=t.subschema({schema:y,dataTypes:[],schemaPath:pn.nil,topSchemaRef:v,errSchemaPath:n},x);t.mergeEvaluated(m),t.ok(x)}}};function F_(t,e){let{gen:n}=t;return e.validate?n.scopeValue("validate",{ref:e.validate}):(0,pn._)`${n.scopeValue("wrapper",{ref:e})}.validate`}Co.getValidate=F_;function tl(t,e,n,r){let{gen:o,it:i}=t,{allErrors:s,schemaEnv:a,opts:c}=i,l=c.passContext?_i.default.this:pn.nil;r?p():d();function p(){if(!a.$async)throw new Error("async schema referenced by sync schema");let y=o.let("valid");o.try(()=>{o.code((0,pn._)`await ${(0,D_.callValidateCode)(t,e,l)}`),h(e),s||o.assign(y,!0)},v=>{o.if((0,pn._)`!(${v} instanceof ${i.ValidationError})`,()=>o.throw(v)),f(v),s||o.assign(y,!1)}),t.ok(y)}function d(){t.result((0,D_.callValidateCode)(t,e,l),()=>h(e),()=>f(e))}function f(y){let v=(0,pn._)`${y}.errors`;o.assign(_i.default.vErrors,(0,pn._)`${_i.default.vErrors} === null ? ${v} : ${_i.default.vErrors}.concat(${v})`),o.assign(_i.default.errors,(0,pn._)`${_i.default.vErrors}.length`)}function h(y){var v;if(!i.opts.unevaluated)return;let x=(v=n==null?void 0:n.validate)===null||v===void 0?void 0:v.evaluated;if(i.props!==!0)if(x&&!x.dynamicProps)x.props!==void 0&&(i.props=el.mergeEvaluated.props(o,x.props,i.props));else{let m=o.var("props",(0,pn._)`${y}.evaluated.props`);i.props=el.mergeEvaluated.props(o,m,i.props,pn.Name)}if(i.items!==!0)if(x&&!x.dynamicItems)x.items!==void 0&&(i.items=el.mergeEvaluated.items(o,x.items,i.items));else{let m=o.var("items",(0,pn._)`${y}.evaluated.items`);i.items=el.mergeEvaluated.items(o,m,i.items,pn.Name)}}}Co.callRef=tl;Co.default=pN});var q_=$(Qf=>{"use strict";Object.defineProperty(Qf,"__esModule",{value:!0});var dN=L_(),fN=U_(),mN=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",dN.default,fN.default];Qf.default=mN});var Z_=$(em=>{"use strict";Object.defineProperty(em,"__esModule",{value:!0});var nl=we(),Dr=nl.operators,rl={maximum:{okStr:"<=",ok:Dr.LTE,fail:Dr.GT},minimum:{okStr:">=",ok:Dr.GTE,fail:Dr.LT},exclusiveMaximum:{okStr:"<",ok:Dr.LT,fail:Dr.GTE},exclusiveMinimum:{okStr:">",ok:Dr.GT,fail:Dr.LTE}},hN={message:({keyword:t,schemaCode:e})=>(0,nl.str)`must be ${rl[t].okStr} ${e}`,params:({keyword:t,schemaCode:e})=>(0,nl._)`{comparison: ${rl[t].okStr}, limit: ${e}}`},gN={keyword:Object.keys(rl),type:"number",schemaType:"number",$data:!0,error:hN,code(t){let{keyword:e,data:n,schemaCode:r}=t;t.fail$data((0,nl._)`${n} ${rl[e].fail} ${r} || isNaN(${n})`)}};em.default=gN});var B_=$(tm=>{"use strict";Object.defineProperty(tm,"__esModule",{value:!0});var Gs=we(),yN={message:({schemaCode:t})=>(0,Gs.str)`must be multiple of ${t}`,params:({schemaCode:t})=>(0,Gs._)`{multipleOf: ${t}}`},xN={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:yN,code(t){let{gen:e,data:n,schemaCode:r,it:o}=t,i=o.opts.multipleOfPrecision,s=e.let("res"),a=i?(0,Gs._)`Math.abs(Math.round(${s}) - ${s}) > 1e-${i}`:(0,Gs._)`${s} !== parseInt(${s})`;t.fail$data((0,Gs._)`(${r} === 0 || (${s} = ${n}/${r}, ${a}))`)}};tm.default=xN});var V_=$(nm=>{"use strict";Object.defineProperty(nm,"__esModule",{value:!0});function H_(t){let e=t.length,n=0,r=0,o;for(;r<e;)n++,o=t.charCodeAt(r++),o>=55296&&o<=56319&&r<e&&(o=t.charCodeAt(r),(o&64512)===56320&&r++);return n}nm.default=H_;H_.code='require("ajv/dist/runtime/ucs2length").default'});var G_=$(rm=>{"use strict";Object.defineProperty(rm,"__esModule",{value:!0});var Po=we(),vN=Me(),bN=V_(),_N={message({keyword:t,schemaCode:e}){let n=t==="maxLength"?"more":"fewer";return(0,Po.str)`must NOT have ${n} than ${e} characters`},params:({schemaCode:t})=>(0,Po._)`{limit: ${t}}`},wN={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:_N,code(t){let{keyword:e,data:n,schemaCode:r,it:o}=t,i=e==="maxLength"?Po.operators.GT:Po.operators.LT,s=o.opts.unicode===!1?(0,Po._)`${n}.length`:(0,Po._)`${(0,vN.useFunc)(t.gen,bN.default)}(${n})`;t.fail$data((0,Po._)`${s} ${i} ${r}`)}};rm.default=wN});var W_=$(om=>{"use strict";Object.defineProperty(om,"__esModule",{value:!0});var SN=Rn(),kN=Me(),wi=we(),TN={message:({schemaCode:t})=>(0,wi.str)`must match pattern "${t}"`,params:({schemaCode:t})=>(0,wi._)`{pattern: ${t}}`},EN={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:TN,code(t){let{gen:e,data:n,$data:r,schema:o,schemaCode:i,it:s}=t,a=s.opts.unicodeRegExp?"u":"";if(r){let{regExp:c}=s.opts.code,l=c.code==="new RegExp"?(0,wi._)`new RegExp`:(0,kN.useFunc)(e,c),p=e.let("valid");e.try(()=>e.assign(p,(0,wi._)`${l}(${i}, ${a}).test(${n})`),()=>e.assign(p,!1)),t.fail$data((0,wi._)`!${p}`)}else{let c=(0,SN.usePattern)(t,o);t.fail$data((0,wi._)`!${c}.test(${n})`)}}};om.default=EN});var K_=$(im=>{"use strict";Object.defineProperty(im,"__esModule",{value:!0});var Ws=we(),$N={message({keyword:t,schemaCode:e}){let n=t==="maxProperties"?"more":"fewer";return(0,Ws.str)`must NOT have ${n} than ${e} properties`},params:({schemaCode:t})=>(0,Ws._)`{limit: ${t}}`},RN={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:$N,code(t){let{keyword:e,data:n,schemaCode:r}=t,o=e==="maxProperties"?Ws.operators.GT:Ws.operators.LT;t.fail$data((0,Ws._)`Object.keys(${n}).length ${o} ${r}`)}};im.default=RN});var J_=$(sm=>{"use strict";Object.defineProperty(sm,"__esModule",{value:!0});var Ks=Rn(),Js=we(),AN=Me(),IN={message:({params:{missingProperty:t}})=>(0,Js.str)`must have required property '${t}'`,params:({params:{missingProperty:t}})=>(0,Js._)`{missingProperty: ${t}}`},CN={keyword:"required",type:"object",schemaType:"array",$data:!0,error:IN,code(t){let{gen:e,schema:n,schemaCode:r,data:o,$data:i,it:s}=t,{opts:a}=s;if(!i&&n.length===0)return;let c=n.length>=a.loopRequired;if(s.allErrors?l():p(),a.strictRequired){let h=t.parentSchema.properties,{definedProperties:y}=t.it;for(let v of n)if((h==null?void 0:h[v])===void 0&&!y.has(v)){let x=s.schemaEnv.baseId+s.errSchemaPath,m=`required property "${v}" is not defined at "${x}" (strictRequired)`;(0,AN.checkStrictMode)(s,m,s.opts.strictRequired)}}function l(){if(c||i)t.block$data(Js.nil,d);else for(let h of n)(0,Ks.checkReportMissingProp)(t,h)}function p(){let h=e.let("missing");if(c||i){let y=e.let("valid",!0);t.block$data(y,()=>f(h,y)),t.ok(y)}else e.if((0,Ks.checkMissingProp)(t,n,h)),(0,Ks.reportMissingProp)(t,h),e.else()}function d(){e.forOf("prop",r,h=>{t.setParams({missingProperty:h}),e.if((0,Ks.noPropertyInData)(e,o,h,a.ownProperties),()=>t.error())})}function f(h,y){t.setParams({missingProperty:h}),e.forOf(h,r,()=>{e.assign(y,(0,Ks.propertyInData)(e,o,h,a.ownProperties)),e.if((0,Js.not)(y),()=>{t.error(),e.break()})},Js.nil)}}};sm.default=CN});var Y_=$(am=>{"use strict";Object.defineProperty(am,"__esModule",{value:!0});var Ys=we(),PN={message({keyword:t,schemaCode:e}){let n=t==="maxItems"?"more":"fewer";return(0,Ys.str)`must NOT have ${n} than ${e} items`},params:({schemaCode:t})=>(0,Ys._)`{limit: ${t}}`},ON={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:PN,code(t){let{keyword:e,data:n,schemaCode:r}=t,o=e==="maxItems"?Ys.operators.GT:Ys.operators.LT;t.fail$data((0,Ys._)`${n}.length ${o} ${r}`)}};am.default=ON});var ol=$(cm=>{"use strict";Object.defineProperty(cm,"__esModule",{value:!0});var X_=Cf();X_.code='require("ajv/dist/runtime/equal").default';cm.default=X_});var Q_=$(um=>{"use strict";Object.defineProperty(um,"__esModule",{value:!0});var lm=Ls(),Ft=we(),zN=Me(),NN=ol(),jN={message:({params:{i:t,j:e}})=>(0,Ft.str)`must NOT have duplicate items (items ## ${e} and ${t} are identical)`,params:({params:{i:t,j:e}})=>(0,Ft._)`{i: ${t}, j: ${e}}`},LN={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:jN,code(t){let{gen:e,data:n,$data:r,schema:o,parentSchema:i,schemaCode:s,it:a}=t;if(!r&&!o)return;let c=e.let("valid"),l=i.items?(0,lm.getSchemaTypes)(i.items):[];t.block$data(c,p,(0,Ft._)`${s} === false`),t.ok(c);function p(){let y=e.let("i",(0,Ft._)`${n}.length`),v=e.let("j");t.setParams({i:y,j:v}),e.assign(c,!0),e.if((0,Ft._)`${y} > 1`,()=>(d()?f:h)(y,v))}function d(){return l.length>0&&!l.some(y=>y==="object"||y==="array")}function f(y,v){let x=e.name("item"),m=(0,lm.checkDataTypes)(l,x,a.opts.strictNumbers,lm.DataType.Wrong),b=e.const("indices",(0,Ft._)`{}`);e.for((0,Ft._)`;${y}--;`,()=>{e.let(x,(0,Ft._)`${n}[${y}]`),e.if(m,(0,Ft._)`continue`),l.length>1&&e.if((0,Ft._)`typeof ${x} == "string"`,(0,Ft._)`${x} += "_"`),e.if((0,Ft._)`typeof ${b}[${x}] == "number"`,()=>{e.assign(v,(0,Ft._)`${b}[${x}]`),t.error(),e.assign(c,!1).break()}).code((0,Ft._)`${b}[${x}] = ${y}`)})}function h(y,v){let x=(0,zN.useFunc)(e,NN.default),m=e.name("outer");e.label(m).for((0,Ft._)`;${y}--;`,()=>e.for((0,Ft._)`${v} = ${y}; ${v}--;`,()=>e.if((0,Ft._)`${x}(${n}[${y}], ${n}[${v}])`,()=>{t.error(),e.assign(c,!1).break(m)})))}}};um.default=LN});var ew=$(dm=>{"use strict";Object.defineProperty(dm,"__esModule",{value:!0});var pm=we(),DN=Me(),MN=ol(),FN={message:"must be equal to constant",params:({schemaCode:t})=>(0,pm._)`{allowedValue: ${t}}`},UN={keyword:"const",$data:!0,error:FN,code(t){let{gen:e,data:n,$data:r,schemaCode:o,schema:i}=t;r||i&&typeof i=="object"?t.fail$data((0,pm._)`!${(0,DN.useFunc)(e,MN.default)}(${n}, ${o})`):t.fail((0,pm._)`${i} !== ${n}`)}};dm.default=UN});var tw=$(fm=>{"use strict";Object.defineProperty(fm,"__esModule",{value:!0});var Xs=we(),qN=Me(),ZN=ol(),BN={message:"must be equal to one of the allowed values",params:({schemaCode:t})=>(0,Xs._)`{allowedValues: ${t}}`},HN={keyword:"enum",schemaType:"array",$data:!0,error:BN,code(t){let{gen:e,data:n,$data:r,schema:o,schemaCode:i,it:s}=t;if(!r&&o.length===0)throw new Error("enum must have non-empty array");let a=o.length>=s.opts.loopEnum,c,l=()=>c??(c=(0,qN.useFunc)(e,ZN.default)),p;if(a||r)p=e.let("valid"),t.block$data(p,d);else{if(!Array.isArray(o))throw new Error("ajv implementation error");let h=e.const("vSchema",i);p=(0,Xs.or)(...o.map((y,v)=>f(h,v)))}t.pass(p);function d(){e.assign(p,!1),e.forOf("v",i,h=>e.if((0,Xs._)`${l()}(${n}, ${h})`,()=>e.assign(p,!0).break()))}function f(h,y){let v=o[y];return typeof v=="object"&&v!==null?(0,Xs._)`${l()}(${n}, ${h}[${y}])`:(0,Xs._)`${n} === ${v}`}}};fm.default=HN});var nw=$(mm=>{"use strict";Object.defineProperty(mm,"__esModule",{value:!0});var VN=Z_(),GN=B_(),WN=G_(),KN=W_(),JN=K_(),YN=J_(),XN=Y_(),QN=Q_(),ej=ew(),tj=tw(),nj=[VN.default,GN.default,WN.default,KN.default,JN.default,YN.default,XN.default,QN.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},ej.default,tj.default];mm.default=nj});var gm=$(Qs=>{"use strict";Object.defineProperty(Qs,"__esModule",{value:!0});Qs.validateAdditionalItems=void 0;var Oo=we(),hm=Me(),rj={message:({params:{len:t}})=>(0,Oo.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,Oo._)`{limit: ${t}}`},oj={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:rj,code(t){let{parentSchema:e,it:n}=t,{items:r}=e;if(!Array.isArray(r)){(0,hm.checkStrictMode)(n,'"additionalItems" is ignored when "items" is not an array of schemas');return}rw(t,r)}};function rw(t,e){let{gen:n,schema:r,data:o,keyword:i,it:s}=t;s.items=!0;let a=n.const("len",(0,Oo._)`${o}.length`);if(r===!1)t.setParams({len:e.length}),t.pass((0,Oo._)`${a} <= ${e.length}`);else if(typeof r=="object"&&!(0,hm.alwaysValidSchema)(s,r)){let l=n.var("valid",(0,Oo._)`${a} <= ${e.length}`);n.if((0,Oo.not)(l),()=>c(l)),t.ok(l)}function c(l){n.forRange("i",e.length,a,p=>{t.subschema({keyword:i,dataProp:p,dataPropType:hm.Type.Num},l),s.allErrors||n.if((0,Oo.not)(l),()=>n.break())})}}Qs.validateAdditionalItems=rw;Qs.default=oj});var ym=$(ea=>{"use strict";Object.defineProperty(ea,"__esModule",{value:!0});ea.validateTuple=void 0;var ow=we(),il=Me(),ij=Rn(),sj={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(t){let{schema:e,it:n}=t;if(Array.isArray(e))return iw(t,"additionalItems",e);n.items=!0,!(0,il.alwaysValidSchema)(n,e)&&t.ok((0,ij.validateArray)(t))}};function iw(t,e,n=t.schema){let{gen:r,parentSchema:o,data:i,keyword:s,it:a}=t;p(o),a.opts.unevaluated&&n.length&&a.items!==!0&&(a.items=il.mergeEvaluated.items(r,n.length,a.items));let c=r.name("valid"),l=r.const("len",(0,ow._)`${i}.length`);n.forEach((d,f)=>{(0,il.alwaysValidSchema)(a,d)||(r.if((0,ow._)`${l} > ${f}`,()=>t.subschema({keyword:s,schemaProp:f,dataProp:f},c)),t.ok(c))});function p(d){let{opts:f,errSchemaPath:h}=a,y=n.length,v=y===d.minItems&&(y===d.maxItems||d[e]===!1);if(f.strictTuples&&!v){let x=`"${s}" is ${y}-tuple, but minItems or maxItems/${e} are not specified or different at path "${h}"`;(0,il.checkStrictMode)(a,x,f.strictTuples)}}}ea.validateTuple=iw;ea.default=sj});var sw=$(xm=>{"use strict";Object.defineProperty(xm,"__esModule",{value:!0});var aj=ym(),cj={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:t=>(0,aj.validateTuple)(t,"items")};xm.default=cj});var cw=$(vm=>{"use strict";Object.defineProperty(vm,"__esModule",{value:!0});var aw=we(),lj=Me(),uj=Rn(),pj=gm(),dj={message:({params:{len:t}})=>(0,aw.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,aw._)`{limit: ${t}}`},fj={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:dj,code(t){let{schema:e,parentSchema:n,it:r}=t,{prefixItems:o}=n;r.items=!0,!(0,lj.alwaysValidSchema)(r,e)&&(o?(0,pj.validateAdditionalItems)(t,o):t.ok((0,uj.validateArray)(t)))}};vm.default=fj});var lw=$(bm=>{"use strict";Object.defineProperty(bm,"__esModule",{value:!0});var In=we(),sl=Me(),mj={message:({params:{min:t,max:e}})=>e===void 0?(0,In.str)`must contain at least ${t} valid item(s)`:(0,In.str)`must contain at least ${t} and no more than ${e} valid item(s)`,params:({params:{min:t,max:e}})=>e===void 0?(0,In._)`{minContains: ${t}}`:(0,In._)`{minContains: ${t}, maxContains: ${e}}`},hj={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:mj,code(t){let{gen:e,schema:n,parentSchema:r,data:o,it:i}=t,s,a,{minContains:c,maxContains:l}=r;i.opts.next?(s=c===void 0?1:c,a=l):s=1;let p=e.const("len",(0,In._)`${o}.length`);if(t.setParams({min:s,max:a}),a===void 0&&s===0){(0,sl.checkStrictMode)(i,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(a!==void 0&&s>a){(0,sl.checkStrictMode)(i,'"minContains" > "maxContains" is always invalid'),t.fail();return}if((0,sl.alwaysValidSchema)(i,n)){let v=(0,In._)`${p} >= ${s}`;a!==void 0&&(v=(0,In._)`${v} && ${p} <= ${a}`),t.pass(v);return}i.items=!0;let d=e.name("valid");a===void 0&&s===1?h(d,()=>e.if(d,()=>e.break())):s===0?(e.let(d,!0),a!==void 0&&e.if((0,In._)`${o}.length > 0`,f)):(e.let(d,!1),f()),t.result(d,()=>t.reset());function f(){let v=e.name("_valid"),x=e.let("count",0);h(v,()=>e.if(v,()=>y(x)))}function h(v,x){e.forRange("i",0,p,m=>{t.subschema({keyword:"contains",dataProp:m,dataPropType:sl.Type.Num,compositeRule:!0},v),x()})}function y(v){e.code((0,In._)`${v}++`),a===void 0?e.if((0,In._)`${v} >= ${s}`,()=>e.assign(d,!0).break()):(e.if((0,In._)`${v} > ${a}`,()=>e.assign(d,!1).break()),s===1?e.assign(d,!0):e.if((0,In._)`${v} >= ${s}`,()=>e.assign(d,!0)))}}};bm.default=hj});var dw=$(Qn=>{"use strict";Object.defineProperty(Qn,"__esModule",{value:!0});Qn.validateSchemaDeps=Qn.validatePropertyDeps=Qn.error=void 0;var _m=we(),gj=Me(),ta=Rn();Qn.error={message:({params:{property:t,depsCount:e,deps:n}})=>{let r=e===1?"property":"properties";return(0,_m.str)`must have ${r} ${n} when property ${t} is present`},params:({params:{property:t,depsCount:e,deps:n,missingProperty:r}})=>(0,_m._)`{property: ${t},
|
|
7
|
+
missingProperty: ${r},
|
|
8
8
|
depsCount: ${e},
|
|
9
|
-
deps: ${r}}`};var oj={keyword:"dependencies",type:"object",schemaType:"object",error:tn.error,code(t){let[e,r]=ij(t);nw(t,e),ow(t,r)}};function ij({schema:t}){let e={},r={};for(let n in t){if(n==="__proto__")continue;let o=Array.isArray(t[n])?e:r;o[n]=t[n]}return[e,r]}function nw(t,e=t.schema){let{gen:r,data:n,it:o}=t;if(Object.keys(e).length===0)return;let i=r.let("missing");for(let s in e){let a=e[s];if(a.length===0)continue;let c=(0,Js.propertyInData)(r,n,s,o.opts.ownProperties);t.setParams({property:s,depsCount:a.length,deps:a.join(", ")}),o.allErrors?r.if(c,()=>{for(let l of a)(0,Js.checkReportMissingProp)(t,l)}):(r.if((0,hm._)`${c} && (${(0,Js.checkMissingProp)(t,a,i)})`),(0,Js.reportMissingProp)(t,i),r.else())}}tn.validatePropertyDeps=nw;function ow(t,e=t.schema){let{gen:r,data:n,keyword:o,it:i}=t,s=r.name("valid");for(let a in e)(0,nj.alwaysValidSchema)(i,e[a])||(r.if((0,Js.propertyInData)(r,n,a,i.opts.ownProperties),()=>{let c=t.subschema({keyword:o,schemaProp:a},s);t.mergeValidEvaluated(c,s)},()=>r.var(s,!0)),t.ok(s))}tn.validateSchemaDeps=ow;tn.default=oj});var aw=T(gm=>{"use strict";Object.defineProperty(gm,"__esModule",{value:!0});var sw=be(),sj=De(),aj={message:"property name must be valid",params:({params:t})=>(0,sw._)`{propertyName: ${t.propertyName}}`},cj={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:aj,code(t){let{gen:e,schema:r,data:n,it:o}=t;if((0,sj.alwaysValidSchema)(o,r))return;let i=e.name("valid");e.forIn("key",n,s=>{t.setParams({propertyName:s}),t.subschema({keyword:"propertyNames",data:s,dataTypes:["string"],propertyName:s,compositeRule:!0},i),e.if((0,sw.not)(i),()=>{t.error(!0),o.allErrors||e.break()})}),t.ok(i)}};gm.default=cj});var xm=T(ym=>{"use strict";Object.defineProperty(ym,"__esModule",{value:!0});var el=Tr(),Ur=be(),lj=xn(),tl=De(),uj={message:"must NOT have additional properties",params:({params:t})=>(0,Ur._)`{additionalProperty: ${t.additionalProperty}}`},pj={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:uj,code(t){let{gen:e,schema:r,parentSchema:n,data:o,errsCount:i,it:s}=t;if(!i)throw new Error("ajv implementation error");let{allErrors:a,opts:c}=s;if(s.props=!0,c.removeAdditional!=="all"&&(0,tl.alwaysValidSchema)(s,r))return;let l=(0,el.allSchemaProperties)(n.properties),p=(0,el.allSchemaProperties)(n.patternProperties);d(),t.ok((0,Ur._)`${i} === ${lj.default.errors}`);function d(){e.forIn("key",o,x=>{!l.length&&!p.length?y(x):e.if(f(x),()=>y(x))})}function f(x){let g;if(l.length>8){let _=(0,tl.schemaRefOrVal)(s,n.properties,"properties");g=(0,el.isOwnProperty)(e,_,x)}else l.length?g=(0,Ur.or)(...l.map(_=>(0,Ur._)`${x} === ${_}`)):g=Ur.nil;return p.length&&(g=(0,Ur.or)(g,...p.map(_=>(0,Ur._)`${(0,el.usePattern)(t,_)}.test(${x})`))),(0,Ur.not)(g)}function m(x){e.code((0,Ur._)`delete ${o}[${x}]`)}function y(x){if(c.removeAdditional==="all"||c.removeAdditional&&r===!1){m(x);return}if(r===!1){t.setParams({additionalProperty:x}),t.error(),a||e.break();return}if(typeof r=="object"&&!(0,tl.alwaysValidSchema)(s,r)){let g=e.name("valid");c.removeAdditional==="failing"?(v(x,g,!1),e.if((0,Ur.not)(g),()=>{t.reset(),m(x)})):(v(x,g),a||e.if((0,Ur.not)(g),()=>e.break()))}}function v(x,g,_){let w={keyword:"additionalProperties",dataProp:x,dataPropType:tl.Type.Str};_===!1&&Object.assign(w,{compositeRule:!0,createErrors:!1,allErrors:!1}),t.subschema(w,g)}}};ym.default=pj});var uw=T(bm=>{"use strict";Object.defineProperty(bm,"__esModule",{value:!0});var dj=js(),cw=Tr(),vm=De(),lw=xm(),fj={keyword:"properties",type:"object",schemaType:"object",code(t){let{gen:e,schema:r,parentSchema:n,data:o,it:i}=t;i.opts.removeAdditional==="all"&&n.additionalProperties===void 0&&lw.default.code(new dj.KeywordCxt(i,lw.default,"additionalProperties"));let s=(0,cw.allSchemaProperties)(r);for(let d of s)i.definedProperties.add(d);i.opts.unevaluated&&s.length&&i.props!==!0&&(i.props=vm.mergeEvaluated.props(e,(0,vm.toHash)(s),i.props));let a=s.filter(d=>!(0,vm.alwaysValidSchema)(i,r[d]));if(a.length===0)return;let c=e.name("valid");for(let d of a)l(d)?p(d):(e.if((0,cw.propertyInData)(e,o,d,i.opts.ownProperties)),p(d),i.allErrors||e.else().var(c,!0),e.endIf()),t.it.definedProperties.add(d),t.ok(c);function l(d){return i.opts.useDefaults&&!i.compositeRule&&r[d].default!==void 0}function p(d){t.subschema({keyword:"properties",schemaProp:d,dataProp:d},c)}}};bm.default=fj});var mw=T(_m=>{"use strict";Object.defineProperty(_m,"__esModule",{value:!0});var pw=Tr(),rl=be(),dw=De(),fw=De(),mj={keyword:"patternProperties",type:"object",schemaType:"object",code(t){let{gen:e,schema:r,data:n,parentSchema:o,it:i}=t,{opts:s}=i,a=(0,pw.allSchemaProperties)(r),c=a.filter(v=>(0,dw.alwaysValidSchema)(i,r[v]));if(a.length===0||c.length===a.length&&(!i.opts.unevaluated||i.props===!0))return;let l=s.strictSchema&&!s.allowMatchingProperties&&o.properties,p=e.name("valid");i.props!==!0&&!(i.props instanceof rl.Name)&&(i.props=(0,fw.evaluatedPropsToName)(e,i.props));let{props:d}=i;f();function f(){for(let v of a)l&&m(v),i.allErrors?y(v):(e.var(p,!0),y(v),e.if(p))}function m(v){for(let x in l)new RegExp(v).test(x)&&(0,dw.checkStrictMode)(i,`property ${x} matches pattern ${v} (use allowMatchingProperties)`)}function y(v){e.forIn("key",n,x=>{e.if((0,rl._)`${(0,pw.usePattern)(t,v)}.test(${x})`,()=>{let g=c.includes(v);g||t.subschema({keyword:"patternProperties",schemaProp:v,dataProp:x,dataPropType:fw.Type.Str},p),i.opts.unevaluated&&d!==!0?e.assign((0,rl._)`${d}[${x}]`,!0):!g&&!i.allErrors&&e.if((0,rl.not)(p),()=>e.break())})})}}};_m.default=mj});var hw=T(wm=>{"use strict";Object.defineProperty(wm,"__esModule",{value:!0});var hj=De(),gj={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(t){let{gen:e,schema:r,it:n}=t;if((0,hj.alwaysValidSchema)(n,r)){t.fail();return}let o=e.name("valid");t.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},o),t.failResult(o,()=>t.reset(),()=>t.error())},error:{message:"must NOT be valid"}};wm.default=gj});var gw=T(Sm=>{"use strict";Object.defineProperty(Sm,"__esModule",{value:!0});var yj=Tr(),xj={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:yj.validateUnion,error:{message:"must match a schema in anyOf"}};Sm.default=xj});var yw=T(km=>{"use strict";Object.defineProperty(km,"__esModule",{value:!0});var nl=be(),vj=De(),bj={message:"must match exactly one schema in oneOf",params:({params:t})=>(0,nl._)`{passingSchemas: ${t.passing}}`},_j={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:bj,code(t){let{gen:e,schema:r,parentSchema:n,it:o}=t;if(!Array.isArray(r))throw new Error("ajv implementation error");if(o.opts.discriminator&&n.discriminator)return;let i=r,s=e.let("valid",!1),a=e.let("passing",null),c=e.name("_valid");t.setParams({passing:a}),e.block(l),t.result(s,()=>t.reset(),()=>t.error(!0));function l(){i.forEach((p,d)=>{let f;(0,vj.alwaysValidSchema)(o,p)?e.var(c,!0):f=t.subschema({keyword:"oneOf",schemaProp:d,compositeRule:!0},c),d>0&&e.if((0,nl._)`${c} && ${s}`).assign(s,!1).assign(a,(0,nl._)`[${a}, ${d}]`).else(),e.if(c,()=>{e.assign(s,!0),e.assign(a,d),f&&t.mergeEvaluated(f,nl.Name)})})}}};km.default=_j});var xw=T($m=>{"use strict";Object.defineProperty($m,"__esModule",{value:!0});var wj=De(),Sj={keyword:"allOf",schemaType:"array",code(t){let{gen:e,schema:r,it:n}=t;if(!Array.isArray(r))throw new Error("ajv implementation error");let o=e.name("valid");r.forEach((i,s)=>{if((0,wj.alwaysValidSchema)(n,i))return;let a=t.subschema({keyword:"allOf",schemaProp:s},o);t.ok(o),t.mergeEvaluated(a)})}};$m.default=Sj});var _w=T(Em=>{"use strict";Object.defineProperty(Em,"__esModule",{value:!0});var ol=be(),bw=De(),kj={message:({params:t})=>(0,ol.str)`must match "${t.ifClause}" schema`,params:({params:t})=>(0,ol._)`{failingKeyword: ${t.ifClause}}`},$j={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:kj,code(t){let{gen:e,parentSchema:r,it:n}=t;r.then===void 0&&r.else===void 0&&(0,bw.checkStrictMode)(n,'"if" without "then" and "else" is ignored');let o=vw(n,"then"),i=vw(n,"else");if(!o&&!i)return;let s=e.let("valid",!0),a=e.name("_valid");if(c(),t.reset(),o&&i){let p=e.let("ifClause");t.setParams({ifClause:p}),e.if(a,l("then",p),l("else",p))}else o?e.if(a,l("then")):e.if((0,ol.not)(a),l("else"));t.pass(s,()=>t.error(!0));function c(){let p=t.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},a);t.mergeEvaluated(p)}function l(p,d){return()=>{let f=t.subschema({keyword:p},a);e.assign(s,a),t.mergeValidEvaluated(f,s),d?e.assign(d,(0,ol._)`${p}`):t.setParams({ifClause:p})}}}};function vw(t,e){let r=t.schema[e];return r!==void 0&&!(0,bw.alwaysValidSchema)(t,r)}Em.default=$j});var ww=T(Tm=>{"use strict";Object.defineProperty(Tm,"__esModule",{value:!0});var Ej=De(),Tj={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:t,parentSchema:e,it:r}){e.if===void 0&&(0,Ej.checkStrictMode)(r,`"${t}" without "if" is ignored`)}};Tm.default=Tj});var Sw=T(Rm=>{"use strict";Object.defineProperty(Rm,"__esModule",{value:!0});var Rj=um(),Pj=Q_(),Aj=pm(),Ij=tw(),zj=rw(),Cj=iw(),Oj=aw(),Nj=xm(),jj=uw(),Lj=mw(),Dj=hw(),Mj=gw(),qj=yw(),Fj=xw(),Uj=_w(),Zj=ww();function Bj(t=!1){let e=[Dj.default,Mj.default,qj.default,Fj.default,Uj.default,Zj.default,Oj.default,Nj.default,Cj.default,jj.default,Lj.default];return t?e.push(Pj.default,Ij.default):e.push(Rj.default,Aj.default),e.push(zj.default),e}Rm.default=Bj});var kw=T(Pm=>{"use strict";Object.defineProperty(Pm,"__esModule",{value:!0});var bt=be(),Hj={message:({schemaCode:t})=>(0,bt.str)`must match format "${t}"`,params:({schemaCode:t})=>(0,bt._)`{format: ${t}}`},Vj={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:Hj,code(t,e){let{gen:r,data:n,$data:o,schema:i,schemaCode:s,it:a}=t,{opts:c,errSchemaPath:l,schemaEnv:p,self:d}=a;if(!c.validateFormats)return;o?f():m();function f(){let y=r.scopeValue("formats",{ref:d.formats,code:c.code.formats}),v=r.const("fDef",(0,bt._)`${y}[${s}]`),x=r.let("fType"),g=r.let("format");r.if((0,bt._)`typeof ${v} == "object" && !(${v} instanceof RegExp)`,()=>r.assign(x,(0,bt._)`${v}.type || "string"`).assign(g,(0,bt._)`${v}.validate`),()=>r.assign(x,(0,bt._)`"string"`).assign(g,v)),t.fail$data((0,bt.or)(_(),w()));function _(){return c.strictSchema===!1?bt.nil:(0,bt._)`${s} && !${g}`}function w(){let $=p.$async?(0,bt._)`(${v}.async ? await ${g}(${n}) : ${g}(${n}))`:(0,bt._)`${g}(${n})`,E=(0,bt._)`(typeof ${g} == "function" ? ${$} : ${g}.test(${n}))`;return(0,bt._)`${g} && ${g} !== true && ${x} === ${e} && !${E}`}}function m(){let y=d.formats[i];if(!y){_();return}if(y===!0)return;let[v,x,g]=w(y);v===e&&t.pass($());function _(){if(c.strictSchema===!1){d.logger.warn(E());return}throw new Error(E());function E(){return`unknown format "${i}" ignored in schema at path "${l}"`}}function w(E){let Z=E instanceof RegExp?(0,bt.regexpCode)(E):c.code.formats?(0,bt._)`${c.code.formats}${(0,bt.getProperty)(i)}`:void 0,q=r.scopeValue("formats",{key:i,ref:E,code:Z});return typeof E=="object"&&!(E instanceof RegExp)?[E.type||"string",E.validate,(0,bt._)`${q}.validate`]:["string",E,q]}function $(){if(typeof y=="object"&&!(y instanceof RegExp)&&y.async){if(!p.$async)throw new Error("async format in sync schema");return(0,bt._)`await ${g}(${n})`}return typeof x=="function"?(0,bt._)`${g}(${n})`:(0,bt._)`${g}.test(${n})`}}}};Pm.default=Vj});var $w=T(Am=>{"use strict";Object.defineProperty(Am,"__esModule",{value:!0});var Gj=kw(),Wj=[Gj.default];Am.default=Wj});var Ew=T(vi=>{"use strict";Object.defineProperty(vi,"__esModule",{value:!0});vi.contentVocabulary=vi.metadataVocabulary=void 0;vi.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];vi.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});var Rw=T(Im=>{"use strict";Object.defineProperty(Im,"__esModule",{value:!0});var Kj=N_(),Jj=K_(),Yj=Sw(),Xj=$w(),Tw=Ew(),Qj=[Kj.default,Jj.default,(0,Yj.default)(),Xj.default,Tw.metadataVocabulary,Tw.contentVocabulary];Im.default=Qj});var Aw=T(il=>{"use strict";Object.defineProperty(il,"__esModule",{value:!0});il.DiscrError=void 0;var Pw;(function(t){t.Tag="tag",t.Mapping="mapping"})(Pw||(il.DiscrError=Pw={}))});var zw=T(Cm=>{"use strict";Object.defineProperty(Cm,"__esModule",{value:!0});var bi=be(),zm=Aw(),Iw=Uc(),eL=Ls(),tL=De(),rL={message:({params:{discrError:t,tagName:e}})=>t===zm.DiscrError.Tag?`tag "${e}" must be string`:`value of tag "${e}" must be in oneOf`,params:({params:{discrError:t,tag:e,tagName:r}})=>(0,bi._)`{error: ${t}, tag: ${r}, tagValue: ${e}}`},nL={keyword:"discriminator",type:"object",schemaType:"object",error:rL,code(t){let{gen:e,data:r,schema:n,parentSchema:o,it:i}=t,{oneOf:s}=o;if(!i.opts.discriminator)throw new Error("discriminator: requires discriminator option");let a=n.propertyName;if(typeof a!="string")throw new Error("discriminator: requires propertyName");if(n.mapping)throw new Error("discriminator: mapping is not supported");if(!s)throw new Error("discriminator: requires oneOf keyword");let c=e.let("valid",!1),l=e.const("tag",(0,bi._)`${r}${(0,bi.getProperty)(a)}`);e.if((0,bi._)`typeof ${l} == "string"`,()=>p(),()=>t.error(!1,{discrError:zm.DiscrError.Tag,tag:l,tagName:a})),t.ok(c);function p(){let m=f();e.if(!1);for(let y in m)e.elseIf((0,bi._)`${l} === ${y}`),e.assign(c,d(m[y]));e.else(),t.error(!1,{discrError:zm.DiscrError.Mapping,tag:l,tagName:a}),e.endIf()}function d(m){let y=e.name("valid"),v=t.subschema({keyword:"oneOf",schemaProp:m},y);return t.mergeEvaluated(v,bi.Name),y}function f(){var m;let y={},v=g(o),x=!0;for(let $=0;$<s.length;$++){let E=s[$];if(E!=null&&E.$ref&&!(0,tL.schemaHasRulesButRef)(E,i.self.RULES)){let q=E.$ref;if(E=Iw.resolveRef.call(i.self,i.schemaEnv.root,i.baseId,q),E instanceof Iw.SchemaEnv&&(E=E.schema),E===void 0)throw new eL.default(i.opts.uriResolver,i.baseId,q)}let Z=(m=E==null?void 0:E.properties)===null||m===void 0?void 0:m[a];if(typeof Z!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${a}"`);x=x&&(v||g(E)),_(Z,$)}if(!x)throw new Error(`discriminator: "${a}" must be required`);return y;function g({required:$}){return Array.isArray($)&&$.includes(a)}function _($,E){if($.const)w($.const,E);else if($.enum)for(let Z of $.enum)w(Z,E);else throw new Error(`discriminator: "properties/${a}" must have "const" or "enum"`)}function w($,E){if(typeof $!="string"||$ in y)throw new Error(`discriminator: "${a}" values must be unique strings`);y[$]=E}}}};Cm.default=nL});var Cw=T((kH,oL)=>{oL.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 Nm=T((lt,Om)=>{"use strict";Object.defineProperty(lt,"__esModule",{value:!0});lt.MissingRefError=lt.ValidationError=lt.CodeGen=lt.Name=lt.nil=lt.stringify=lt.str=lt._=lt.KeywordCxt=lt.Ajv=void 0;var iL=P_(),sL=Rw(),aL=zw(),Ow=Cw(),cL=["/properties"],sl="http://json-schema.org/draft-07/schema",_i=class extends iL.default{_addVocabularies(){super._addVocabularies(),sL.default.forEach(e=>this.addVocabulary(e)),this.opts.discriminator&&this.addKeyword(aL.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let e=this.opts.$data?this.$dataMetaSchema(Ow,cL):Ow;this.addMetaSchema(e,sl,!1),this.refs["http://json-schema.org/schema"]=sl}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(sl)?sl:void 0)}};lt.Ajv=_i;Om.exports=lt=_i;Om.exports.Ajv=_i;Object.defineProperty(lt,"__esModule",{value:!0});lt.default=_i;var lL=js();Object.defineProperty(lt,"KeywordCxt",{enumerable:!0,get:function(){return lL.KeywordCxt}});var wi=be();Object.defineProperty(lt,"_",{enumerable:!0,get:function(){return wi._}});Object.defineProperty(lt,"str",{enumerable:!0,get:function(){return wi.str}});Object.defineProperty(lt,"stringify",{enumerable:!0,get:function(){return wi.stringify}});Object.defineProperty(lt,"nil",{enumerable:!0,get:function(){return wi.nil}});Object.defineProperty(lt,"Name",{enumerable:!0,get:function(){return wi.Name}});Object.defineProperty(lt,"CodeGen",{enumerable:!0,get:function(){return wi.CodeGen}});var uL=qc();Object.defineProperty(lt,"ValidationError",{enumerable:!0,get:function(){return uL.default}});var pL=Ls();Object.defineProperty(lt,"MissingRefError",{enumerable:!0,get:function(){return pL.default}})});var Uw=T(nn=>{"use strict";Object.defineProperty(nn,"__esModule",{value:!0});nn.formatNames=nn.fastFormats=nn.fullFormats=void 0;function rn(t,e){return{validate:t,compare:e}}nn.fullFormats={date:rn(Dw,Mm),time:rn(Lm(!0),qm),"date-time":rn(Nw(!0),qw),"iso-time":rn(Lm(),Mw),"iso-date-time":rn(Nw(),Fw),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:yL,"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:kL,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:xL,int32:{type:"number",validate:_L},int64:{type:"number",validate:wL},float:{type:"number",validate:Lw},double:{type:"number",validate:Lw},password:!0,binary:!0};nn.fastFormats={...nn.fullFormats,date:rn(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,Mm),time:rn(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,qm),"date-time":rn(/^\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,qw),"iso-time":rn(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,Mw),"iso-date-time":rn(/^\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,Fw),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};nn.formatNames=Object.keys(nn.fullFormats);function dL(t){return t%4===0&&(t%100!==0||t%400===0)}var fL=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,mL=[0,31,28,31,30,31,30,31,31,30,31,30,31];function Dw(t){let e=fL.exec(t);if(!e)return!1;let r=+e[1],n=+e[2],o=+e[3];return n>=1&&n<=12&&o>=1&&o<=(n===2&&dL(r)?29:mL[n])}function Mm(t,e){if(t&&e)return t>e?1:t<e?-1:0}var jm=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function Lm(t){return function(r){let n=jm.exec(r);if(!n)return!1;let o=+n[1],i=+n[2],s=+n[3],a=n[4],c=n[5]==="-"?-1:1,l=+(n[6]||0),p=+(n[7]||0);if(l>23||p>59||t&&!a)return!1;if(o<=23&&i<=59&&s<60)return!0;let d=i-p*c,f=o-l*c-(d<0?1:0);return(f===23||f===-1)&&(d===59||d===-1)&&s<61}}function qm(t,e){if(!(t&&e))return;let r=new Date("2020-01-01T"+t).valueOf(),n=new Date("2020-01-01T"+e).valueOf();if(r&&n)return r-n}function Mw(t,e){if(!(t&&e))return;let r=jm.exec(t),n=jm.exec(e);if(r&&n)return t=r[1]+r[2]+r[3],e=n[1]+n[2]+n[3],t>e?1:t<e?-1:0}var Dm=/t|\s/i;function Nw(t){let e=Lm(t);return function(n){let o=n.split(Dm);return o.length===2&&Dw(o[0])&&e(o[1])}}function qw(t,e){if(!(t&&e))return;let r=new Date(t).valueOf(),n=new Date(e).valueOf();if(r&&n)return r-n}function Fw(t,e){if(!(t&&e))return;let[r,n]=t.split(Dm),[o,i]=e.split(Dm),s=Mm(r,o);if(s!==void 0)return s||qm(n,i)}var hL=/\/|:/,gL=/^(?:[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 yL(t){return hL.test(t)&&gL.test(t)}var jw=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function xL(t){return jw.lastIndex=0,jw.test(t)}var vL=-(2**31),bL=2**31-1;function _L(t){return Number.isInteger(t)&&t<=bL&&t>=vL}function wL(t){return Number.isInteger(t)}function Lw(){return!0}var SL=/[^\\]\\Z/;function kL(t){if(SL.test(t))return!1;try{return new RegExp(t),!0}catch{return!1}}});var Zw=T(Si=>{"use strict";Object.defineProperty(Si,"__esModule",{value:!0});Si.formatLimitDefinition=void 0;var $L=Nm(),Zr=be(),Mn=Zr.operators,al={formatMaximum:{okStr:"<=",ok:Mn.LTE,fail:Mn.GT},formatMinimum:{okStr:">=",ok:Mn.GTE,fail:Mn.LT},formatExclusiveMaximum:{okStr:"<",ok:Mn.LT,fail:Mn.GTE},formatExclusiveMinimum:{okStr:">",ok:Mn.GT,fail:Mn.LTE}},EL={message:({keyword:t,schemaCode:e})=>(0,Zr.str)`should be ${al[t].okStr} ${e}`,params:({keyword:t,schemaCode:e})=>(0,Zr._)`{comparison: ${al[t].okStr}, limit: ${e}}`};Si.formatLimitDefinition={keyword:Object.keys(al),type:"string",schemaType:"string",$data:!0,error:EL,code(t){let{gen:e,data:r,schemaCode:n,keyword:o,it:i}=t,{opts:s,self:a}=i;if(!s.validateFormats)return;let c=new $L.KeywordCxt(i,a.RULES.all.format.definition,"format");c.$data?l():p();function l(){let f=e.scopeValue("formats",{ref:a.formats,code:s.code.formats}),m=e.const("fmt",(0,Zr._)`${f}[${c.schemaCode}]`);t.fail$data((0,Zr.or)((0,Zr._)`typeof ${m} != "object"`,(0,Zr._)`${m} instanceof RegExp`,(0,Zr._)`typeof ${m}.compare != "function"`,d(m)))}function p(){let f=c.schema,m=a.formats[f];if(!m||m===!0)return;if(typeof m!="object"||m instanceof RegExp||typeof m.compare!="function")throw new Error(`"${o}": format "${f}" does not define "compare" function`);let y=e.scopeValue("formats",{key:f,ref:m,code:s.code.formats?(0,Zr._)`${s.code.formats}${(0,Zr.getProperty)(f)}`:void 0});t.fail$data(d(y))}function d(f){return(0,Zr._)`${f}.compare(${r}, ${n}) ${al[o].fail} 0`}},dependencies:["format"]};var TL=t=>(t.addKeyword(Si.formatLimitDefinition),t);Si.default=TL});var Gw=T((Ys,Vw)=>{"use strict";Object.defineProperty(Ys,"__esModule",{value:!0});var ki=Uw(),RL=Zw(),Fm=be(),Bw=new Fm.Name("fullFormats"),PL=new Fm.Name("fastFormats"),Um=(t,e={keywords:!0})=>{if(Array.isArray(e))return Hw(t,e,ki.fullFormats,Bw),t;let[r,n]=e.mode==="fast"?[ki.fastFormats,PL]:[ki.fullFormats,Bw],o=e.formats||ki.formatNames;return Hw(t,o,r,n),e.keywords&&(0,RL.default)(t),t};Um.get=(t,e="full")=>{let n=(e==="fast"?ki.fastFormats:ki.fullFormats)[t];if(!n)throw new Error(`Unknown format "${t}"`);return n};function Hw(t,e,r,n){var o,i;(o=(i=t.opts.code).formats)!==null&&o!==void 0||(i.formats=(0,Fm._)`require("ajv-formats/dist/formats").${n}`);for(let s of e)t.addFormat(s,r[s])}Vw.exports=Ys=Um;Object.defineProperty(Ys,"__esModule",{value:!0});Ys.default=Um});var _0=T((bV,b0)=>{var v0=require("stream").Stream,MD=require("util");b0.exports=Hr;function Hr(){this.source=null,this.dataSize=0,this.maxDataSize=1024*1024,this.pauseStream=!0,this._maxDataSizeExceeded=!1,this._released=!1,this._bufferedEvents=[]}MD.inherits(Hr,v0);Hr.create=function(t,e){var r=new this;e=e||{};for(var n in e)r[n]=e[n];r.source=t;var o=t.emit;return t.emit=function(){return r._handleEmit(arguments),o.apply(t,arguments)},t.on("error",function(){}),r.pauseStream&&t.pause(),r};Object.defineProperty(Hr.prototype,"readable",{configurable:!0,enumerable:!0,get:function(){return this.source.readable}});Hr.prototype.setEncoding=function(){return this.source.setEncoding.apply(this.source,arguments)};Hr.prototype.resume=function(){this._released||this.release(),this.source.resume()};Hr.prototype.pause=function(){this.source.pause()};Hr.prototype.release=function(){this._released=!0,this._bufferedEvents.forEach(function(t){this.emit.apply(this,t)}.bind(this)),this._bufferedEvents=[]};Hr.prototype.pipe=function(){var t=v0.prototype.pipe.apply(this,arguments);return this.resume(),t};Hr.prototype._handleEmit=function(t){if(this._released){this.emit.apply(this,t);return}t[0]==="data"&&(this.dataSize+=t[1].length,this._checkIfMaxDataSizeExceeded()),this._bufferedEvents.push(t)};Hr.prototype._checkIfMaxDataSizeExceeded=function(){if(!this._maxDataSizeExceeded&&!(this.dataSize<=this.maxDataSize)){this._maxDataSizeExceeded=!0;var t="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this.emit("error",new Error(t))}}});var $0=T((_V,k0)=>{var qD=require("util"),S0=require("stream").Stream,w0=_0();k0.exports=xt;function xt(){this.writable=!1,this.readable=!0,this.dataSize=0,this.maxDataSize=2*1024*1024,this.pauseStreams=!0,this._released=!1,this._streams=[],this._currentStream=null,this._insideLoop=!1,this._pendingNext=!1}qD.inherits(xt,S0);xt.create=function(t){var e=new this;t=t||{};for(var r in t)e[r]=t[r];return e};xt.isStreamLike=function(t){return typeof t!="function"&&typeof t!="string"&&typeof t!="boolean"&&typeof t!="number"&&!Buffer.isBuffer(t)};xt.prototype.append=function(t){var e=xt.isStreamLike(t);if(e){if(!(t instanceof w0)){var r=w0.create(t,{maxDataSize:1/0,pauseStream:this.pauseStreams});t.on("data",this._checkDataSize.bind(this)),t=r}this._handleErrors(t),this.pauseStreams&&t.pause()}return this._streams.push(t),this};xt.prototype.pipe=function(t,e){return S0.prototype.pipe.call(this,t,e),this.resume(),t};xt.prototype._getNext=function(){if(this._currentStream=null,this._insideLoop){this._pendingNext=!0;return}this._insideLoop=!0;try{do this._pendingNext=!1,this._realGetNext();while(this._pendingNext)}finally{this._insideLoop=!1}};xt.prototype._realGetNext=function(){var t=this._streams.shift();if(typeof t>"u"){this.end();return}if(typeof t!="function"){this._pipeNext(t);return}var e=t;e(function(r){var n=xt.isStreamLike(r);n&&(r.on("data",this._checkDataSize.bind(this)),this._handleErrors(r)),this._pipeNext(r)}.bind(this))};xt.prototype._pipeNext=function(t){this._currentStream=t;var e=xt.isStreamLike(t);if(e){t.on("end",this._getNext.bind(this)),t.pipe(this,{end:!1});return}var r=t;this.write(r),this._getNext()};xt.prototype._handleErrors=function(t){var e=this;t.on("error",function(r){e._emitError(r)})};xt.prototype.write=function(t){this.emit("data",t)};xt.prototype.pause=function(){this.pauseStreams&&(this.pauseStreams&&this._currentStream&&typeof this._currentStream.pause=="function"&&this._currentStream.pause(),this.emit("pause"))};xt.prototype.resume=function(){this._released||(this._released=!0,this.writable=!0,this._getNext()),this.pauseStreams&&this._currentStream&&typeof this._currentStream.resume=="function"&&this._currentStream.resume(),this.emit("resume")};xt.prototype.end=function(){this._reset(),this.emit("end")};xt.prototype.destroy=function(){this._reset(),this.emit("close")};xt.prototype._reset=function(){this.writable=!1,this._streams=[],this._currentStream=null};xt.prototype._checkDataSize=function(){if(this._updateDataSize(),!(this.dataSize<=this.maxDataSize)){var t="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this._emitError(new Error(t))}};xt.prototype._updateDataSize=function(){this.dataSize=0;var t=this;this._streams.forEach(function(e){e.dataSize&&(t.dataSize+=e.dataSize)}),this._currentStream&&this._currentStream.dataSize&&(this.dataSize+=this._currentStream.dataSize)};xt.prototype._emitError=function(t){this._reset(),this.emit("error",t)}});var E0=T((wV,FD)=>{FD.exports={"application/1d-interleaved-parityfec":{source:"iana"},"application/3gpdash-qoe-report+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/3gpp-ims+xml":{source:"iana",compressible:!0},"application/3gpphal+json":{source:"iana",compressible:!0},"application/3gpphalforms+json":{source:"iana",compressible:!0},"application/a2l":{source:"iana"},"application/ace+cbor":{source:"iana"},"application/activemessage":{source:"iana"},"application/activity+json":{source:"iana",compressible:!0},"application/alto-costmap+json":{source:"iana",compressible:!0},"application/alto-costmapfilter+json":{source:"iana",compressible:!0},"application/alto-directory+json":{source:"iana",compressible:!0},"application/alto-endpointcost+json":{source:"iana",compressible:!0},"application/alto-endpointcostparams+json":{source:"iana",compressible:!0},"application/alto-endpointprop+json":{source:"iana",compressible:!0},"application/alto-endpointpropparams+json":{source:"iana",compressible:!0},"application/alto-error+json":{source:"iana",compressible:!0},"application/alto-networkmap+json":{source:"iana",compressible:!0},"application/alto-networkmapfilter+json":{source:"iana",compressible:!0},"application/alto-updatestreamcontrol+json":{source:"iana",compressible:!0},"application/alto-updatestreamparams+json":{source:"iana",compressible:!0},"application/aml":{source:"iana"},"application/andrew-inset":{source:"iana",extensions:["ez"]},"application/applefile":{source:"iana"},"application/applixware":{source:"apache",extensions:["aw"]},"application/at+jwt":{source:"iana"},"application/atf":{source:"iana"},"application/atfx":{source:"iana"},"application/atom+xml":{source:"iana",compressible:!0,extensions:["atom"]},"application/atomcat+xml":{source:"iana",compressible:!0,extensions:["atomcat"]},"application/atomdeleted+xml":{source:"iana",compressible:!0,extensions:["atomdeleted"]},"application/atomicmail":{source:"iana"},"application/atomsvc+xml":{source:"iana",compressible:!0,extensions:["atomsvc"]},"application/atsc-dwd+xml":{source:"iana",compressible:!0,extensions:["dwd"]},"application/atsc-dynamic-event-message":{source:"iana"},"application/atsc-held+xml":{source:"iana",compressible:!0,extensions:["held"]},"application/atsc-rdt+json":{source:"iana",compressible:!0},"application/atsc-rsat+xml":{source:"iana",compressible:!0,extensions:["rsat"]},"application/atxml":{source:"iana"},"application/auth-policy+xml":{source:"iana",compressible:!0},"application/bacnet-xdd+zip":{source:"iana",compressible:!1},"application/batch-smtp":{source:"iana"},"application/bdoc":{compressible:!1,extensions:["bdoc"]},"application/beep+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/calendar+json":{source:"iana",compressible:!0},"application/calendar+xml":{source:"iana",compressible:!0,extensions:["xcs"]},"application/call-completion":{source:"iana"},"application/cals-1840":{source:"iana"},"application/captive+json":{source:"iana",compressible:!0},"application/cbor":{source:"iana"},"application/cbor-seq":{source:"iana"},"application/cccex":{source:"iana"},"application/ccmp+xml":{source:"iana",compressible:!0},"application/ccxml+xml":{source:"iana",compressible:!0,extensions:["ccxml"]},"application/cdfx+xml":{source:"iana",compressible:!0,extensions:["cdfx"]},"application/cdmi-capability":{source:"iana",extensions:["cdmia"]},"application/cdmi-container":{source:"iana",extensions:["cdmic"]},"application/cdmi-domain":{source:"iana",extensions:["cdmid"]},"application/cdmi-object":{source:"iana",extensions:["cdmio"]},"application/cdmi-queue":{source:"iana",extensions:["cdmiq"]},"application/cdni":{source:"iana"},"application/cea":{source:"iana"},"application/cea-2018+xml":{source:"iana",compressible:!0},"application/cellml+xml":{source:"iana",compressible:!0},"application/cfw":{source:"iana"},"application/city+json":{source:"iana",compressible:!0},"application/clr":{source:"iana"},"application/clue+xml":{source:"iana",compressible:!0},"application/clue_info+xml":{source:"iana",compressible:!0},"application/cms":{source:"iana"},"application/cnrp+xml":{source:"iana",compressible:!0},"application/coap-group+json":{source:"iana",compressible:!0},"application/coap-payload":{source:"iana"},"application/commonground":{source:"iana"},"application/conference-info+xml":{source:"iana",compressible:!0},"application/cose":{source:"iana"},"application/cose-key":{source:"iana"},"application/cose-key-set":{source:"iana"},"application/cpl+xml":{source:"iana",compressible:!0,extensions:["cpl"]},"application/csrattrs":{source:"iana"},"application/csta+xml":{source:"iana",compressible:!0},"application/cstadata+xml":{source:"iana",compressible:!0},"application/csvm+json":{source:"iana",compressible:!0},"application/cu-seeme":{source:"apache",extensions:["cu"]},"application/cwt":{source:"iana"},"application/cybercash":{source:"iana"},"application/dart":{compressible:!0},"application/dash+xml":{source:"iana",compressible:!0,extensions:["mpd"]},"application/dash-patch+xml":{source:"iana",compressible:!0,extensions:["mpp"]},"application/dashdelta":{source:"iana"},"application/davmount+xml":{source:"iana",compressible:!0,extensions:["davmount"]},"application/dca-rft":{source:"iana"},"application/dcd":{source:"iana"},"application/dec-dx":{source:"iana"},"application/dialog-info+xml":{source:"iana",compressible:!0},"application/dicom":{source:"iana"},"application/dicom+json":{source:"iana",compressible:!0},"application/dicom+xml":{source:"iana",compressible:!0},"application/dii":{source:"iana"},"application/dit":{source:"iana"},"application/dns":{source:"iana"},"application/dns+json":{source:"iana",compressible:!0},"application/dns-message":{source:"iana"},"application/docbook+xml":{source:"apache",compressible:!0,extensions:["dbk"]},"application/dots+cbor":{source:"iana"},"application/dskpp+xml":{source:"iana",compressible:!0},"application/dssc+der":{source:"iana",extensions:["dssc"]},"application/dssc+xml":{source:"iana",compressible:!0,extensions:["xdssc"]},"application/dvcs":{source:"iana"},"application/ecmascript":{source:"iana",compressible:!0,extensions:["es","ecma"]},"application/edi-consent":{source:"iana"},"application/edi-x12":{source:"iana",compressible:!1},"application/edifact":{source:"iana",compressible:!1},"application/efi":{source:"iana"},"application/elm+json":{source:"iana",charset:"UTF-8",compressible:!0},"application/elm+xml":{source:"iana",compressible:!0},"application/emergencycalldata.cap+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/emergencycalldata.comment+xml":{source:"iana",compressible:!0},"application/emergencycalldata.control+xml":{source:"iana",compressible:!0},"application/emergencycalldata.deviceinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.ecall.msd":{source:"iana"},"application/emergencycalldata.providerinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.serviceinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.subscriberinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.veds+xml":{source:"iana",compressible:!0},"application/emma+xml":{source:"iana",compressible:!0,extensions:["emma"]},"application/emotionml+xml":{source:"iana",compressible:!0,extensions:["emotionml"]},"application/encaprtp":{source:"iana"},"application/epp+xml":{source:"iana",compressible:!0},"application/epub+zip":{source:"iana",compressible:!1,extensions:["epub"]},"application/eshop":{source:"iana"},"application/exi":{source:"iana",extensions:["exi"]},"application/expect-ct-report+json":{source:"iana",compressible:!0},"application/express":{source:"iana",extensions:["exp"]},"application/fastinfoset":{source:"iana"},"application/fastsoap":{source:"iana"},"application/fdt+xml":{source:"iana",compressible:!0,extensions:["fdt"]},"application/fhir+json":{source:"iana",charset:"UTF-8",compressible:!0},"application/fhir+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/fido.trusted-apps+json":{compressible:!0},"application/fits":{source:"iana"},"application/flexfec":{source:"iana"},"application/font-sfnt":{source:"iana"},"application/font-tdpfr":{source:"iana",extensions:["pfr"]},"application/font-woff":{source:"iana",compressible:!1},"application/framework-attributes+xml":{source:"iana",compressible:!0},"application/geo+json":{source:"iana",compressible:!0,extensions:["geojson"]},"application/geo+json-seq":{source:"iana"},"application/geopackage+sqlite3":{source:"iana"},"application/geoxacml+xml":{source:"iana",compressible:!0},"application/gltf-buffer":{source:"iana"},"application/gml+xml":{source:"iana",compressible:!0,extensions:["gml"]},"application/gpx+xml":{source:"apache",compressible:!0,extensions:["gpx"]},"application/gxf":{source:"apache",extensions:["gxf"]},"application/gzip":{source:"iana",compressible:!1,extensions:["gz"]},"application/h224":{source:"iana"},"application/held+xml":{source:"iana",compressible:!0},"application/hjson":{extensions:["hjson"]},"application/http":{source:"iana"},"application/hyperstudio":{source:"iana",extensions:["stk"]},"application/ibe-key-request+xml":{source:"iana",compressible:!0},"application/ibe-pkg-reply+xml":{source:"iana",compressible:!0},"application/ibe-pp-data":{source:"iana"},"application/iges":{source:"iana"},"application/im-iscomposing+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/index":{source:"iana"},"application/index.cmd":{source:"iana"},"application/index.obj":{source:"iana"},"application/index.response":{source:"iana"},"application/index.vnd":{source:"iana"},"application/inkml+xml":{source:"iana",compressible:!0,extensions:["ink","inkml"]},"application/iotp":{source:"iana"},"application/ipfix":{source:"iana",extensions:["ipfix"]},"application/ipp":{source:"iana"},"application/isup":{source:"iana"},"application/its+xml":{source:"iana",compressible:!0,extensions:["its"]},"application/java-archive":{source:"apache",compressible:!1,extensions:["jar","war","ear"]},"application/java-serialized-object":{source:"apache",compressible:!1,extensions:["ser"]},"application/java-vm":{source:"apache",compressible:!1,extensions:["class"]},"application/javascript":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["js","mjs"]},"application/jf2feed+json":{source:"iana",compressible:!0},"application/jose":{source:"iana"},"application/jose+json":{source:"iana",compressible:!0},"application/jrd+json":{source:"iana",compressible:!0},"application/jscalendar+json":{source:"iana",compressible:!0},"application/json":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["json","map"]},"application/json-patch+json":{source:"iana",compressible:!0},"application/json-seq":{source:"iana"},"application/json5":{extensions:["json5"]},"application/jsonml+json":{source:"apache",compressible:!0,extensions:["jsonml"]},"application/jwk+json":{source:"iana",compressible:!0},"application/jwk-set+json":{source:"iana",compressible:!0},"application/jwt":{source:"iana"},"application/kpml-request+xml":{source:"iana",compressible:!0},"application/kpml-response+xml":{source:"iana",compressible:!0},"application/ld+json":{source:"iana",compressible:!0,extensions:["jsonld"]},"application/lgr+xml":{source:"iana",compressible:!0,extensions:["lgr"]},"application/link-format":{source:"iana"},"application/load-control+xml":{source:"iana",compressible:!0},"application/lost+xml":{source:"iana",compressible:!0,extensions:["lostxml"]},"application/lostsync+xml":{source:"iana",compressible:!0},"application/lpf+zip":{source:"iana",compressible:!1},"application/lxf":{source:"iana"},"application/mac-binhex40":{source:"iana",extensions:["hqx"]},"application/mac-compactpro":{source:"apache",extensions:["cpt"]},"application/macwriteii":{source:"iana"},"application/mads+xml":{source:"iana",compressible:!0,extensions:["mads"]},"application/manifest+json":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["webmanifest"]},"application/marc":{source:"iana",extensions:["mrc"]},"application/marcxml+xml":{source:"iana",compressible:!0,extensions:["mrcx"]},"application/mathematica":{source:"iana",extensions:["ma","nb","mb"]},"application/mathml+xml":{source:"iana",compressible:!0,extensions:["mathml"]},"application/mathml-content+xml":{source:"iana",compressible:!0},"application/mathml-presentation+xml":{source:"iana",compressible:!0},"application/mbms-associated-procedure-description+xml":{source:"iana",compressible:!0},"application/mbms-deregister+xml":{source:"iana",compressible:!0},"application/mbms-envelope+xml":{source:"iana",compressible:!0},"application/mbms-msk+xml":{source:"iana",compressible:!0},"application/mbms-msk-response+xml":{source:"iana",compressible:!0},"application/mbms-protection-description+xml":{source:"iana",compressible:!0},"application/mbms-reception-report+xml":{source:"iana",compressible:!0},"application/mbms-register+xml":{source:"iana",compressible:!0},"application/mbms-register-response+xml":{source:"iana",compressible:!0},"application/mbms-schedule+xml":{source:"iana",compressible:!0},"application/mbms-user-service-description+xml":{source:"iana",compressible:!0},"application/mbox":{source:"iana",extensions:["mbox"]},"application/media-policy-dataset+xml":{source:"iana",compressible:!0,extensions:["mpf"]},"application/media_control+xml":{source:"iana",compressible:!0},"application/mediaservercontrol+xml":{source:"iana",compressible:!0,extensions:["mscml"]},"application/merge-patch+json":{source:"iana",compressible:!0},"application/metalink+xml":{source:"apache",compressible:!0,extensions:["metalink"]},"application/metalink4+xml":{source:"iana",compressible:!0,extensions:["meta4"]},"application/mets+xml":{source:"iana",compressible:!0,extensions:["mets"]},"application/mf4":{source:"iana"},"application/mikey":{source:"iana"},"application/mipc":{source:"iana"},"application/missing-blocks+cbor-seq":{source:"iana"},"application/mmt-aei+xml":{source:"iana",compressible:!0,extensions:["maei"]},"application/mmt-usd+xml":{source:"iana",compressible:!0,extensions:["musd"]},"application/mods+xml":{source:"iana",compressible:!0,extensions:["mods"]},"application/moss-keys":{source:"iana"},"application/moss-signature":{source:"iana"},"application/mosskey-data":{source:"iana"},"application/mosskey-request":{source:"iana"},"application/mp21":{source:"iana",extensions:["m21","mp21"]},"application/mp4":{source:"iana",extensions:["mp4s","m4p"]},"application/mpeg4-generic":{source:"iana"},"application/mpeg4-iod":{source:"iana"},"application/mpeg4-iod-xmt":{source:"iana"},"application/mrb-consumer+xml":{source:"iana",compressible:!0},"application/mrb-publish+xml":{source:"iana",compressible:!0},"application/msc-ivr+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/msc-mixer+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/msword":{source:"iana",compressible:!1,extensions:["doc","dot"]},"application/mud+json":{source:"iana",compressible:!0},"application/multipart-core":{source:"iana"},"application/mxf":{source:"iana",extensions:["mxf"]},"application/n-quads":{source:"iana",extensions:["nq"]},"application/n-triples":{source:"iana",extensions:["nt"]},"application/nasdata":{source:"iana"},"application/news-checkgroups":{source:"iana",charset:"US-ASCII"},"application/news-groupinfo":{source:"iana",charset:"US-ASCII"},"application/news-transmission":{source:"iana"},"application/nlsml+xml":{source:"iana",compressible:!0},"application/node":{source:"iana",extensions:["cjs"]},"application/nss":{source:"iana"},"application/oauth-authz-req+jwt":{source:"iana"},"application/oblivious-dns-message":{source:"iana"},"application/ocsp-request":{source:"iana"},"application/ocsp-response":{source:"iana"},"application/octet-stream":{source:"iana",compressible:!1,extensions:["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"]},"application/oda":{source:"iana",extensions:["oda"]},"application/odm+xml":{source:"iana",compressible:!0},"application/odx":{source:"iana"},"application/oebps-package+xml":{source:"iana",compressible:!0,extensions:["opf"]},"application/ogg":{source:"iana",compressible:!1,extensions:["ogx"]},"application/omdoc+xml":{source:"apache",compressible:!0,extensions:["omdoc"]},"application/onenote":{source:"apache",extensions:["onetoc","onetoc2","onetmp","onepkg"]},"application/opc-nodeset+xml":{source:"iana",compressible:!0},"application/oscore":{source:"iana"},"application/oxps":{source:"iana",extensions:["oxps"]},"application/p21":{source:"iana"},"application/p21+zip":{source:"iana",compressible:!1},"application/p2p-overlay+xml":{source:"iana",compressible:!0,extensions:["relo"]},"application/parityfec":{source:"iana"},"application/passport":{source:"iana"},"application/patch-ops-error+xml":{source:"iana",compressible:!0,extensions:["xer"]},"application/pdf":{source:"iana",compressible:!1,extensions:["pdf"]},"application/pdx":{source:"iana"},"application/pem-certificate-chain":{source:"iana"},"application/pgp-encrypted":{source:"iana",compressible:!1,extensions:["pgp"]},"application/pgp-keys":{source:"iana",extensions:["asc"]},"application/pgp-signature":{source:"iana",extensions:["asc","sig"]},"application/pics-rules":{source:"apache",extensions:["prf"]},"application/pidf+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/pidf-diff+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/pkcs10":{source:"iana",extensions:["p10"]},"application/pkcs12":{source:"iana"},"application/pkcs7-mime":{source:"iana",extensions:["p7m","p7c"]},"application/pkcs7-signature":{source:"iana",extensions:["p7s"]},"application/pkcs8":{source:"iana",extensions:["p8"]},"application/pkcs8-encrypted":{source:"iana"},"application/pkix-attr-cert":{source:"iana",extensions:["ac"]},"application/pkix-cert":{source:"iana",extensions:["cer"]},"application/pkix-crl":{source:"iana",extensions:["crl"]},"application/pkix-pkipath":{source:"iana",extensions:["pkipath"]},"application/pkixcmp":{source:"iana",extensions:["pki"]},"application/pls+xml":{source:"iana",compressible:!0,extensions:["pls"]},"application/poc-settings+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/postscript":{source:"iana",compressible:!0,extensions:["ai","eps","ps"]},"application/ppsp-tracker+json":{source:"iana",compressible:!0},"application/problem+json":{source:"iana",compressible:!0},"application/problem+xml":{source:"iana",compressible:!0},"application/provenance+xml":{source:"iana",compressible:!0,extensions:["provx"]},"application/prs.alvestrand.titrax-sheet":{source:"iana"},"application/prs.cww":{source:"iana",extensions:["cww"]},"application/prs.cyn":{source:"iana",charset:"7-BIT"},"application/prs.hpub+zip":{source:"iana",compressible:!1},"application/prs.nprend":{source:"iana"},"application/prs.plucker":{source:"iana"},"application/prs.rdf-xml-crypt":{source:"iana"},"application/prs.xsf+xml":{source:"iana",compressible:!0},"application/pskc+xml":{source:"iana",compressible:!0,extensions:["pskcxml"]},"application/pvd+json":{source:"iana",compressible:!0},"application/qsig":{source:"iana"},"application/raml+yaml":{compressible:!0,extensions:["raml"]},"application/raptorfec":{source:"iana"},"application/rdap+json":{source:"iana",compressible:!0},"application/rdf+xml":{source:"iana",compressible:!0,extensions:["rdf","owl"]},"application/reginfo+xml":{source:"iana",compressible:!0,extensions:["rif"]},"application/relax-ng-compact-syntax":{source:"iana",extensions:["rnc"]},"application/remote-printing":{source:"iana"},"application/reputon+json":{source:"iana",compressible:!0},"application/resource-lists+xml":{source:"iana",compressible:!0,extensions:["rl"]},"application/resource-lists-diff+xml":{source:"iana",compressible:!0,extensions:["rld"]},"application/rfc+xml":{source:"iana",compressible:!0},"application/riscos":{source:"iana"},"application/rlmi+xml":{source:"iana",compressible:!0},"application/rls-services+xml":{source:"iana",compressible:!0,extensions:["rs"]},"application/route-apd+xml":{source:"iana",compressible:!0,extensions:["rapd"]},"application/route-s-tsid+xml":{source:"iana",compressible:!0,extensions:["sls"]},"application/route-usd+xml":{source:"iana",compressible:!0,extensions:["rusd"]},"application/rpki-ghostbusters":{source:"iana",extensions:["gbr"]},"application/rpki-manifest":{source:"iana",extensions:["mft"]},"application/rpki-publication":{source:"iana"},"application/rpki-roa":{source:"iana",extensions:["roa"]},"application/rpki-updown":{source:"iana"},"application/rsd+xml":{source:"apache",compressible:!0,extensions:["rsd"]},"application/rss+xml":{source:"apache",compressible:!0,extensions:["rss"]},"application/rtf":{source:"iana",compressible:!0,extensions:["rtf"]},"application/rtploopback":{source:"iana"},"application/rtx":{source:"iana"},"application/samlassertion+xml":{source:"iana",compressible:!0},"application/samlmetadata+xml":{source:"iana",compressible:!0},"application/sarif+json":{source:"iana",compressible:!0},"application/sarif-external-properties+json":{source:"iana",compressible:!0},"application/sbe":{source:"iana"},"application/sbml+xml":{source:"iana",compressible:!0,extensions:["sbml"]},"application/scaip+xml":{source:"iana",compressible:!0},"application/scim+json":{source:"iana",compressible:!0},"application/scvp-cv-request":{source:"iana",extensions:["scq"]},"application/scvp-cv-response":{source:"iana",extensions:["scs"]},"application/scvp-vp-request":{source:"iana",extensions:["spq"]},"application/scvp-vp-response":{source:"iana",extensions:["spp"]},"application/sdp":{source:"iana",extensions:["sdp"]},"application/secevent+jwt":{source:"iana"},"application/senml+cbor":{source:"iana"},"application/senml+json":{source:"iana",compressible:!0},"application/senml+xml":{source:"iana",compressible:!0,extensions:["senmlx"]},"application/senml-etch+cbor":{source:"iana"},"application/senml-etch+json":{source:"iana",compressible:!0},"application/senml-exi":{source:"iana"},"application/sensml+cbor":{source:"iana"},"application/sensml+json":{source:"iana",compressible:!0},"application/sensml+xml":{source:"iana",compressible:!0,extensions:["sensmlx"]},"application/sensml-exi":{source:"iana"},"application/sep+xml":{source:"iana",compressible:!0},"application/sep-exi":{source:"iana"},"application/session-info":{source:"iana"},"application/set-payment":{source:"iana"},"application/set-payment-initiation":{source:"iana",extensions:["setpay"]},"application/set-registration":{source:"iana"},"application/set-registration-initiation":{source:"iana",extensions:["setreg"]},"application/sgml":{source:"iana"},"application/sgml-open-catalog":{source:"iana"},"application/shf+xml":{source:"iana",compressible:!0,extensions:["shf"]},"application/sieve":{source:"iana",extensions:["siv","sieve"]},"application/simple-filter+xml":{source:"iana",compressible:!0},"application/simple-message-summary":{source:"iana"},"application/simplesymbolcontainer":{source:"iana"},"application/sipc":{source:"iana"},"application/slate":{source:"iana"},"application/smil":{source:"iana"},"application/smil+xml":{source:"iana",compressible:!0,extensions:["smi","smil"]},"application/smpte336m":{source:"iana"},"application/soap+fastinfoset":{source:"iana"},"application/soap+xml":{source:"iana",compressible:!0},"application/sparql-query":{source:"iana",extensions:["rq"]},"application/sparql-results+xml":{source:"iana",compressible:!0,extensions:["srx"]},"application/spdx+json":{source:"iana",compressible:!0},"application/spirits-event+xml":{source:"iana",compressible:!0},"application/sql":{source:"iana"},"application/srgs":{source:"iana",extensions:["gram"]},"application/srgs+xml":{source:"iana",compressible:!0,extensions:["grxml"]},"application/sru+xml":{source:"iana",compressible:!0,extensions:["sru"]},"application/ssdl+xml":{source:"apache",compressible:!0,extensions:["ssdl"]},"application/ssml+xml":{source:"iana",compressible:!0,extensions:["ssml"]},"application/stix+json":{source:"iana",compressible:!0},"application/swid+xml":{source:"iana",compressible:!0,extensions:["swidtag"]},"application/tamp-apex-update":{source:"iana"},"application/tamp-apex-update-confirm":{source:"iana"},"application/tamp-community-update":{source:"iana"},"application/tamp-community-update-confirm":{source:"iana"},"application/tamp-error":{source:"iana"},"application/tamp-sequence-adjust":{source:"iana"},"application/tamp-sequence-adjust-confirm":{source:"iana"},"application/tamp-status-query":{source:"iana"},"application/tamp-status-response":{source:"iana"},"application/tamp-update":{source:"iana"},"application/tamp-update-confirm":{source:"iana"},"application/tar":{compressible:!0},"application/taxii+json":{source:"iana",compressible:!0},"application/td+json":{source:"iana",compressible:!0},"application/tei+xml":{source:"iana",compressible:!0,extensions:["tei","teicorpus"]},"application/tetra_isi":{source:"iana"},"application/thraud+xml":{source:"iana",compressible:!0,extensions:["tfi"]},"application/timestamp-query":{source:"iana"},"application/timestamp-reply":{source:"iana"},"application/timestamped-data":{source:"iana",extensions:["tsd"]},"application/tlsrpt+gzip":{source:"iana"},"application/tlsrpt+json":{source:"iana",compressible:!0},"application/tnauthlist":{source:"iana"},"application/token-introspection+jwt":{source:"iana"},"application/toml":{compressible:!0,extensions:["toml"]},"application/trickle-ice-sdpfrag":{source:"iana"},"application/trig":{source:"iana",extensions:["trig"]},"application/ttml+xml":{source:"iana",compressible:!0,extensions:["ttml"]},"application/tve-trigger":{source:"iana"},"application/tzif":{source:"iana"},"application/tzif-leap":{source:"iana"},"application/ubjson":{compressible:!1,extensions:["ubj"]},"application/ulpfec":{source:"iana"},"application/urc-grpsheet+xml":{source:"iana",compressible:!0},"application/urc-ressheet+xml":{source:"iana",compressible:!0,extensions:["rsheet"]},"application/urc-targetdesc+xml":{source:"iana",compressible:!0,extensions:["td"]},"application/urc-uisocketdesc+xml":{source:"iana",compressible:!0},"application/vcard+json":{source:"iana",compressible:!0},"application/vcard+xml":{source:"iana",compressible:!0},"application/vemmi":{source:"iana"},"application/vividence.scriptfile":{source:"apache"},"application/vnd.1000minds.decision-model+xml":{source:"iana",compressible:!0,extensions:["1km"]},"application/vnd.3gpp-prose+xml":{source:"iana",compressible:!0},"application/vnd.3gpp-prose-pc3ch+xml":{source:"iana",compressible:!0},"application/vnd.3gpp-v2x-local-service-information":{source:"iana"},"application/vnd.3gpp.5gnas":{source:"iana"},"application/vnd.3gpp.access-transfer-events+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.bsf+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.gmop+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.gtpc":{source:"iana"},"application/vnd.3gpp.interworking-data":{source:"iana"},"application/vnd.3gpp.lpp":{source:"iana"},"application/vnd.3gpp.mc-signalling-ear":{source:"iana"},"application/vnd.3gpp.mcdata-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-payload":{source:"iana"},"application/vnd.3gpp.mcdata-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-signalling":{source:"iana"},"application/vnd.3gpp.mcdata-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-floor-request+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-location-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-mbms-usage-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-signed+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-ue-init-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-affiliation-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-location-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-mbms-usage-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-transmission-request+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mid-call+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.ngap":{source:"iana"},"application/vnd.3gpp.pfcp":{source:"iana"},"application/vnd.3gpp.pic-bw-large":{source:"iana",extensions:["plb"]},"application/vnd.3gpp.pic-bw-small":{source:"iana",extensions:["psb"]},"application/vnd.3gpp.pic-bw-var":{source:"iana",extensions:["pvb"]},"application/vnd.3gpp.s1ap":{source:"iana"},"application/vnd.3gpp.sms":{source:"iana"},"application/vnd.3gpp.sms+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.srvcc-ext+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.srvcc-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.state-and-event-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.ussd+xml":{source:"iana",compressible:!0},"application/vnd.3gpp2.bcmcsinfo+xml":{source:"iana",compressible:!0},"application/vnd.3gpp2.sms":{source:"iana"},"application/vnd.3gpp2.tcap":{source:"iana",extensions:["tcap"]},"application/vnd.3lightssoftware.imagescal":{source:"iana"},"application/vnd.3m.post-it-notes":{source:"iana",extensions:["pwn"]},"application/vnd.accpac.simply.aso":{source:"iana",extensions:["aso"]},"application/vnd.accpac.simply.imp":{source:"iana",extensions:["imp"]},"application/vnd.acucobol":{source:"iana",extensions:["acu"]},"application/vnd.acucorp":{source:"iana",extensions:["atc","acutc"]},"application/vnd.adobe.air-application-installer-package+zip":{source:"apache",compressible:!1,extensions:["air"]},"application/vnd.adobe.flash.movie":{source:"iana"},"application/vnd.adobe.formscentral.fcdt":{source:"iana",extensions:["fcdt"]},"application/vnd.adobe.fxp":{source:"iana",extensions:["fxp","fxpl"]},"application/vnd.adobe.partial-upload":{source:"iana"},"application/vnd.adobe.xdp+xml":{source:"iana",compressible:!0,extensions:["xdp"]},"application/vnd.adobe.xfdf":{source:"iana",extensions:["xfdf"]},"application/vnd.aether.imp":{source:"iana"},"application/vnd.afpc.afplinedata":{source:"iana"},"application/vnd.afpc.afplinedata-pagedef":{source:"iana"},"application/vnd.afpc.cmoca-cmresource":{source:"iana"},"application/vnd.afpc.foca-charset":{source:"iana"},"application/vnd.afpc.foca-codedfont":{source:"iana"},"application/vnd.afpc.foca-codepage":{source:"iana"},"application/vnd.afpc.modca":{source:"iana"},"application/vnd.afpc.modca-cmtable":{source:"iana"},"application/vnd.afpc.modca-formdef":{source:"iana"},"application/vnd.afpc.modca-mediummap":{source:"iana"},"application/vnd.afpc.modca-objectcontainer":{source:"iana"},"application/vnd.afpc.modca-overlay":{source:"iana"},"application/vnd.afpc.modca-pagesegment":{source:"iana"},"application/vnd.age":{source:"iana",extensions:["age"]},"application/vnd.ah-barcode":{source:"iana"},"application/vnd.ahead.space":{source:"iana",extensions:["ahead"]},"application/vnd.airzip.filesecure.azf":{source:"iana",extensions:["azf"]},"application/vnd.airzip.filesecure.azs":{source:"iana",extensions:["azs"]},"application/vnd.amadeus+json":{source:"iana",compressible:!0},"application/vnd.amazon.ebook":{source:"apache",extensions:["azw"]},"application/vnd.amazon.mobi8-ebook":{source:"iana"},"application/vnd.americandynamics.acc":{source:"iana",extensions:["acc"]},"application/vnd.amiga.ami":{source:"iana",extensions:["ami"]},"application/vnd.amundsen.maze+xml":{source:"iana",compressible:!0},"application/vnd.android.ota":{source:"iana"},"application/vnd.android.package-archive":{source:"apache",compressible:!1,extensions:["apk"]},"application/vnd.anki":{source:"iana"},"application/vnd.anser-web-certificate-issue-initiation":{source:"iana",extensions:["cii"]},"application/vnd.anser-web-funds-transfer-initiation":{source:"apache",extensions:["fti"]},"application/vnd.antix.game-component":{source:"iana",extensions:["atx"]},"application/vnd.apache.arrow.file":{source:"iana"},"application/vnd.apache.arrow.stream":{source:"iana"},"application/vnd.apache.thrift.binary":{source:"iana"},"application/vnd.apache.thrift.compact":{source:"iana"},"application/vnd.apache.thrift.json":{source:"iana"},"application/vnd.api+json":{source:"iana",compressible:!0},"application/vnd.aplextor.warrp+json":{source:"iana",compressible:!0},"application/vnd.apothekende.reservation+json":{source:"iana",compressible:!0},"application/vnd.apple.installer+xml":{source:"iana",compressible:!0,extensions:["mpkg"]},"application/vnd.apple.keynote":{source:"iana",extensions:["key"]},"application/vnd.apple.mpegurl":{source:"iana",extensions:["m3u8"]},"application/vnd.apple.numbers":{source:"iana",extensions:["numbers"]},"application/vnd.apple.pages":{source:"iana",extensions:["pages"]},"application/vnd.apple.pkpass":{compressible:!1,extensions:["pkpass"]},"application/vnd.arastra.swi":{source:"iana"},"application/vnd.aristanetworks.swi":{source:"iana",extensions:["swi"]},"application/vnd.artisan+json":{source:"iana",compressible:!0},"application/vnd.artsquare":{source:"iana"},"application/vnd.astraea-software.iota":{source:"iana",extensions:["iota"]},"application/vnd.audiograph":{source:"iana",extensions:["aep"]},"application/vnd.autopackage":{source:"iana"},"application/vnd.avalon+json":{source:"iana",compressible:!0},"application/vnd.avistar+xml":{source:"iana",compressible:!0},"application/vnd.balsamiq.bmml+xml":{source:"iana",compressible:!0,extensions:["bmml"]},"application/vnd.balsamiq.bmpr":{source:"iana"},"application/vnd.banana-accounting":{source:"iana"},"application/vnd.bbf.usp.error":{source:"iana"},"application/vnd.bbf.usp.msg":{source:"iana"},"application/vnd.bbf.usp.msg+json":{source:"iana",compressible:!0},"application/vnd.bekitzur-stech+json":{source:"iana",compressible:!0},"application/vnd.bint.med-content":{source:"iana"},"application/vnd.biopax.rdf+xml":{source:"iana",compressible:!0},"application/vnd.blink-idb-value-wrapper":{source:"iana"},"application/vnd.blueice.multipass":{source:"iana",extensions:["mpm"]},"application/vnd.bluetooth.ep.oob":{source:"iana"},"application/vnd.bluetooth.le.oob":{source:"iana"},"application/vnd.bmi":{source:"iana",extensions:["bmi"]},"application/vnd.bpf":{source:"iana"},"application/vnd.bpf3":{source:"iana"},"application/vnd.businessobjects":{source:"iana",extensions:["rep"]},"application/vnd.byu.uapi+json":{source:"iana",compressible:!0},"application/vnd.cab-jscript":{source:"iana"},"application/vnd.canon-cpdl":{source:"iana"},"application/vnd.canon-lips":{source:"iana"},"application/vnd.capasystems-pg+json":{source:"iana",compressible:!0},"application/vnd.cendio.thinlinc.clientconf":{source:"iana"},"application/vnd.century-systems.tcp_stream":{source:"iana"},"application/vnd.chemdraw+xml":{source:"iana",compressible:!0,extensions:["cdxml"]},"application/vnd.chess-pgn":{source:"iana"},"application/vnd.chipnuts.karaoke-mmd":{source:"iana",extensions:["mmd"]},"application/vnd.ciedi":{source:"iana"},"application/vnd.cinderella":{source:"iana",extensions:["cdy"]},"application/vnd.cirpack.isdn-ext":{source:"iana"},"application/vnd.citationstyles.style+xml":{source:"iana",compressible:!0,extensions:["csl"]},"application/vnd.claymore":{source:"iana",extensions:["cla"]},"application/vnd.cloanto.rp9":{source:"iana",extensions:["rp9"]},"application/vnd.clonk.c4group":{source:"iana",extensions:["c4g","c4d","c4f","c4p","c4u"]},"application/vnd.cluetrust.cartomobile-config":{source:"iana",extensions:["c11amc"]},"application/vnd.cluetrust.cartomobile-config-pkg":{source:"iana",extensions:["c11amz"]},"application/vnd.coffeescript":{source:"iana"},"application/vnd.collabio.xodocuments.document":{source:"iana"},"application/vnd.collabio.xodocuments.document-template":{source:"iana"},"application/vnd.collabio.xodocuments.presentation":{source:"iana"},"application/vnd.collabio.xodocuments.presentation-template":{source:"iana"},"application/vnd.collabio.xodocuments.spreadsheet":{source:"iana"},"application/vnd.collabio.xodocuments.spreadsheet-template":{source:"iana"},"application/vnd.collection+json":{source:"iana",compressible:!0},"application/vnd.collection.doc+json":{source:"iana",compressible:!0},"application/vnd.collection.next+json":{source:"iana",compressible:!0},"application/vnd.comicbook+zip":{source:"iana",compressible:!1},"application/vnd.comicbook-rar":{source:"iana"},"application/vnd.commerce-battelle":{source:"iana"},"application/vnd.commonspace":{source:"iana",extensions:["csp"]},"application/vnd.contact.cmsg":{source:"iana",extensions:["cdbcmsg"]},"application/vnd.coreos.ignition+json":{source:"iana",compressible:!0},"application/vnd.cosmocaller":{source:"iana",extensions:["cmc"]},"application/vnd.crick.clicker":{source:"iana",extensions:["clkx"]},"application/vnd.crick.clicker.keyboard":{source:"iana",extensions:["clkk"]},"application/vnd.crick.clicker.palette":{source:"iana",extensions:["clkp"]},"application/vnd.crick.clicker.template":{source:"iana",extensions:["clkt"]},"application/vnd.crick.clicker.wordbank":{source:"iana",extensions:["clkw"]},"application/vnd.criticaltools.wbs+xml":{source:"iana",compressible:!0,extensions:["wbs"]},"application/vnd.cryptii.pipe+json":{source:"iana",compressible:!0},"application/vnd.crypto-shade-file":{source:"iana"},"application/vnd.cryptomator.encrypted":{source:"iana"},"application/vnd.cryptomator.vault":{source:"iana"},"application/vnd.ctc-posml":{source:"iana",extensions:["pml"]},"application/vnd.ctct.ws+xml":{source:"iana",compressible:!0},"application/vnd.cups-pdf":{source:"iana"},"application/vnd.cups-postscript":{source:"iana"},"application/vnd.cups-ppd":{source:"iana",extensions:["ppd"]},"application/vnd.cups-raster":{source:"iana"},"application/vnd.cups-raw":{source:"iana"},"application/vnd.curl":{source:"iana"},"application/vnd.curl.car":{source:"apache",extensions:["car"]},"application/vnd.curl.pcurl":{source:"apache",extensions:["pcurl"]},"application/vnd.cyan.dean.root+xml":{source:"iana",compressible:!0},"application/vnd.cybank":{source:"iana"},"application/vnd.cyclonedx+json":{source:"iana",compressible:!0},"application/vnd.cyclonedx+xml":{source:"iana",compressible:!0},"application/vnd.d2l.coursepackage1p0+zip":{source:"iana",compressible:!1},"application/vnd.d3m-dataset":{source:"iana"},"application/vnd.d3m-problem":{source:"iana"},"application/vnd.dart":{source:"iana",compressible:!0,extensions:["dart"]},"application/vnd.data-vision.rdz":{source:"iana",extensions:["rdz"]},"application/vnd.datapackage+json":{source:"iana",compressible:!0},"application/vnd.dataresource+json":{source:"iana",compressible:!0},"application/vnd.dbf":{source:"iana",extensions:["dbf"]},"application/vnd.debian.binary-package":{source:"iana"},"application/vnd.dece.data":{source:"iana",extensions:["uvf","uvvf","uvd","uvvd"]},"application/vnd.dece.ttml+xml":{source:"iana",compressible:!0,extensions:["uvt","uvvt"]},"application/vnd.dece.unspecified":{source:"iana",extensions:["uvx","uvvx"]},"application/vnd.dece.zip":{source:"iana",extensions:["uvz","uvvz"]},"application/vnd.denovo.fcselayout-link":{source:"iana",extensions:["fe_launch"]},"application/vnd.desmume.movie":{source:"iana"},"application/vnd.dir-bi.plate-dl-nosuffix":{source:"iana"},"application/vnd.dm.delegation+xml":{source:"iana",compressible:!0},"application/vnd.dna":{source:"iana",extensions:["dna"]},"application/vnd.document+json":{source:"iana",compressible:!0},"application/vnd.dolby.mlp":{source:"apache",extensions:["mlp"]},"application/vnd.dolby.mobile.1":{source:"iana"},"application/vnd.dolby.mobile.2":{source:"iana"},"application/vnd.doremir.scorecloud-binary-document":{source:"iana"},"application/vnd.dpgraph":{source:"iana",extensions:["dpg"]},"application/vnd.dreamfactory":{source:"iana",extensions:["dfac"]},"application/vnd.drive+json":{source:"iana",compressible:!0},"application/vnd.ds-keypoint":{source:"apache",extensions:["kpxx"]},"application/vnd.dtg.local":{source:"iana"},"application/vnd.dtg.local.flash":{source:"iana"},"application/vnd.dtg.local.html":{source:"iana"},"application/vnd.dvb.ait":{source:"iana",extensions:["ait"]},"application/vnd.dvb.dvbisl+xml":{source:"iana",compressible:!0},"application/vnd.dvb.dvbj":{source:"iana"},"application/vnd.dvb.esgcontainer":{source:"iana"},"application/vnd.dvb.ipdcdftnotifaccess":{source:"iana"},"application/vnd.dvb.ipdcesgaccess":{source:"iana"},"application/vnd.dvb.ipdcesgaccess2":{source:"iana"},"application/vnd.dvb.ipdcesgpdd":{source:"iana"},"application/vnd.dvb.ipdcroaming":{source:"iana"},"application/vnd.dvb.iptv.alfec-base":{source:"iana"},"application/vnd.dvb.iptv.alfec-enhancement":{source:"iana"},"application/vnd.dvb.notif-aggregate-root+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-container+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-generic+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-msglist+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-registration-request+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-registration-response+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-init+xml":{source:"iana",compressible:!0},"application/vnd.dvb.pfr":{source:"iana"},"application/vnd.dvb.service":{source:"iana",extensions:["svc"]},"application/vnd.dxr":{source:"iana"},"application/vnd.dynageo":{source:"iana",extensions:["geo"]},"application/vnd.dzr":{source:"iana"},"application/vnd.easykaraoke.cdgdownload":{source:"iana"},"application/vnd.ecdis-update":{source:"iana"},"application/vnd.ecip.rlp":{source:"iana"},"application/vnd.eclipse.ditto+json":{source:"iana",compressible:!0},"application/vnd.ecowin.chart":{source:"iana",extensions:["mag"]},"application/vnd.ecowin.filerequest":{source:"iana"},"application/vnd.ecowin.fileupdate":{source:"iana"},"application/vnd.ecowin.series":{source:"iana"},"application/vnd.ecowin.seriesrequest":{source:"iana"},"application/vnd.ecowin.seriesupdate":{source:"iana"},"application/vnd.efi.img":{source:"iana"},"application/vnd.efi.iso":{source:"iana"},"application/vnd.emclient.accessrequest+xml":{source:"iana",compressible:!0},"application/vnd.enliven":{source:"iana",extensions:["nml"]},"application/vnd.enphase.envoy":{source:"iana"},"application/vnd.eprints.data+xml":{source:"iana",compressible:!0},"application/vnd.epson.esf":{source:"iana",extensions:["esf"]},"application/vnd.epson.msf":{source:"iana",extensions:["msf"]},"application/vnd.epson.quickanime":{source:"iana",extensions:["qam"]},"application/vnd.epson.salt":{source:"iana",extensions:["slt"]},"application/vnd.epson.ssf":{source:"iana",extensions:["ssf"]},"application/vnd.ericsson.quickcall":{source:"iana"},"application/vnd.espass-espass+zip":{source:"iana",compressible:!1},"application/vnd.eszigno3+xml":{source:"iana",compressible:!0,extensions:["es3","et3"]},"application/vnd.etsi.aoc+xml":{source:"iana",compressible:!0},"application/vnd.etsi.asic-e+zip":{source:"iana",compressible:!1},"application/vnd.etsi.asic-s+zip":{source:"iana",compressible:!1},"application/vnd.etsi.cug+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvcommand+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvdiscovery+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvprofile+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-bc+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-cod+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-npvr+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvservice+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsync+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvueprofile+xml":{source:"iana",compressible:!0},"application/vnd.etsi.mcid+xml":{source:"iana",compressible:!0},"application/vnd.etsi.mheg5":{source:"iana"},"application/vnd.etsi.overload-control-policy-dataset+xml":{source:"iana",compressible:!0},"application/vnd.etsi.pstn+xml":{source:"iana",compressible:!0},"application/vnd.etsi.sci+xml":{source:"iana",compressible:!0},"application/vnd.etsi.simservs+xml":{source:"iana",compressible:!0},"application/vnd.etsi.timestamp-token":{source:"iana"},"application/vnd.etsi.tsl+xml":{source:"iana",compressible:!0},"application/vnd.etsi.tsl.der":{source:"iana"},"application/vnd.eu.kasparian.car+json":{source:"iana",compressible:!0},"application/vnd.eudora.data":{source:"iana"},"application/vnd.evolv.ecig.profile":{source:"iana"},"application/vnd.evolv.ecig.settings":{source:"iana"},"application/vnd.evolv.ecig.theme":{source:"iana"},"application/vnd.exstream-empower+zip":{source:"iana",compressible:!1},"application/vnd.exstream-package":{source:"iana"},"application/vnd.ezpix-album":{source:"iana",extensions:["ez2"]},"application/vnd.ezpix-package":{source:"iana",extensions:["ez3"]},"application/vnd.f-secure.mobile":{source:"iana"},"application/vnd.familysearch.gedcom+zip":{source:"iana",compressible:!1},"application/vnd.fastcopy-disk-image":{source:"iana"},"application/vnd.fdf":{source:"iana",extensions:["fdf"]},"application/vnd.fdsn.mseed":{source:"iana",extensions:["mseed"]},"application/vnd.fdsn.seed":{source:"iana",extensions:["seed","dataless"]},"application/vnd.ffsns":{source:"iana"},"application/vnd.ficlab.flb+zip":{source:"iana",compressible:!1},"application/vnd.filmit.zfc":{source:"iana"},"application/vnd.fints":{source:"iana"},"application/vnd.firemonkeys.cloudcell":{source:"iana"},"application/vnd.flographit":{source:"iana",extensions:["gph"]},"application/vnd.fluxtime.clip":{source:"iana",extensions:["ftc"]},"application/vnd.font-fontforge-sfd":{source:"iana"},"application/vnd.framemaker":{source:"iana",extensions:["fm","frame","maker","book"]},"application/vnd.frogans.fnc":{source:"iana",extensions:["fnc"]},"application/vnd.frogans.ltf":{source:"iana",extensions:["ltf"]},"application/vnd.fsc.weblaunch":{source:"iana",extensions:["fsc"]},"application/vnd.fujifilm.fb.docuworks":{source:"iana"},"application/vnd.fujifilm.fb.docuworks.binder":{source:"iana"},"application/vnd.fujifilm.fb.docuworks.container":{source:"iana"},"application/vnd.fujifilm.fb.jfi+xml":{source:"iana",compressible:!0},"application/vnd.fujitsu.oasys":{source:"iana",extensions:["oas"]},"application/vnd.fujitsu.oasys2":{source:"iana",extensions:["oa2"]},"application/vnd.fujitsu.oasys3":{source:"iana",extensions:["oa3"]},"application/vnd.fujitsu.oasysgp":{source:"iana",extensions:["fg5"]},"application/vnd.fujitsu.oasysprs":{source:"iana",extensions:["bh2"]},"application/vnd.fujixerox.art-ex":{source:"iana"},"application/vnd.fujixerox.art4":{source:"iana"},"application/vnd.fujixerox.ddd":{source:"iana",extensions:["ddd"]},"application/vnd.fujixerox.docuworks":{source:"iana",extensions:["xdw"]},"application/vnd.fujixerox.docuworks.binder":{source:"iana",extensions:["xbd"]},"application/vnd.fujixerox.docuworks.container":{source:"iana"},"application/vnd.fujixerox.hbpl":{source:"iana"},"application/vnd.fut-misnet":{source:"iana"},"application/vnd.futoin+cbor":{source:"iana"},"application/vnd.futoin+json":{source:"iana",compressible:!0},"application/vnd.fuzzysheet":{source:"iana",extensions:["fzs"]},"application/vnd.genomatix.tuxedo":{source:"iana",extensions:["txd"]},"application/vnd.gentics.grd+json":{source:"iana",compressible:!0},"application/vnd.geo+json":{source:"iana",compressible:!0},"application/vnd.geocube+xml":{source:"iana",compressible:!0},"application/vnd.geogebra.file":{source:"iana",extensions:["ggb"]},"application/vnd.geogebra.slides":{source:"iana"},"application/vnd.geogebra.tool":{source:"iana",extensions:["ggt"]},"application/vnd.geometry-explorer":{source:"iana",extensions:["gex","gre"]},"application/vnd.geonext":{source:"iana",extensions:["gxt"]},"application/vnd.geoplan":{source:"iana",extensions:["g2w"]},"application/vnd.geospace":{source:"iana",extensions:["g3w"]},"application/vnd.gerber":{source:"iana"},"application/vnd.globalplatform.card-content-mgt":{source:"iana"},"application/vnd.globalplatform.card-content-mgt-response":{source:"iana"},"application/vnd.gmx":{source:"iana",extensions:["gmx"]},"application/vnd.google-apps.document":{compressible:!1,extensions:["gdoc"]},"application/vnd.google-apps.presentation":{compressible:!1,extensions:["gslides"]},"application/vnd.google-apps.spreadsheet":{compressible:!1,extensions:["gsheet"]},"application/vnd.google-earth.kml+xml":{source:"iana",compressible:!0,extensions:["kml"]},"application/vnd.google-earth.kmz":{source:"iana",compressible:!1,extensions:["kmz"]},"application/vnd.gov.sk.e-form+xml":{source:"iana",compressible:!0},"application/vnd.gov.sk.e-form+zip":{source:"iana",compressible:!1},"application/vnd.gov.sk.xmldatacontainer+xml":{source:"iana",compressible:!0},"application/vnd.grafeq":{source:"iana",extensions:["gqf","gqs"]},"application/vnd.gridmp":{source:"iana"},"application/vnd.groove-account":{source:"iana",extensions:["gac"]},"application/vnd.groove-help":{source:"iana",extensions:["ghf"]},"application/vnd.groove-identity-message":{source:"iana",extensions:["gim"]},"application/vnd.groove-injector":{source:"iana",extensions:["grv"]},"application/vnd.groove-tool-message":{source:"iana",extensions:["gtm"]},"application/vnd.groove-tool-template":{source:"iana",extensions:["tpl"]},"application/vnd.groove-vcard":{source:"iana",extensions:["vcg"]},"application/vnd.hal+json":{source:"iana",compressible:!0},"application/vnd.hal+xml":{source:"iana",compressible:!0,extensions:["hal"]},"application/vnd.handheld-entertainment+xml":{source:"iana",compressible:!0,extensions:["zmm"]},"application/vnd.hbci":{source:"iana",extensions:["hbci"]},"application/vnd.hc+json":{source:"iana",compressible:!0},"application/vnd.hcl-bireports":{source:"iana"},"application/vnd.hdt":{source:"iana"},"application/vnd.heroku+json":{source:"iana",compressible:!0},"application/vnd.hhe.lesson-player":{source:"iana",extensions:["les"]},"application/vnd.hl7cda+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.hl7v2+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.hp-hpgl":{source:"iana",extensions:["hpgl"]},"application/vnd.hp-hpid":{source:"iana",extensions:["hpid"]},"application/vnd.hp-hps":{source:"iana",extensions:["hps"]},"application/vnd.hp-jlyt":{source:"iana",extensions:["jlt"]},"application/vnd.hp-pcl":{source:"iana",extensions:["pcl"]},"application/vnd.hp-pclxl":{source:"iana",extensions:["pclxl"]},"application/vnd.httphone":{source:"iana"},"application/vnd.hydrostatix.sof-data":{source:"iana",extensions:["sfd-hdstx"]},"application/vnd.hyper+json":{source:"iana",compressible:!0},"application/vnd.hyper-item+json":{source:"iana",compressible:!0},"application/vnd.hyperdrive+json":{source:"iana",compressible:!0},"application/vnd.hzn-3d-crossword":{source:"iana"},"application/vnd.ibm.afplinedata":{source:"iana"},"application/vnd.ibm.electronic-media":{source:"iana"},"application/vnd.ibm.minipay":{source:"iana",extensions:["mpy"]},"application/vnd.ibm.modcap":{source:"iana",extensions:["afp","listafp","list3820"]},"application/vnd.ibm.rights-management":{source:"iana",extensions:["irm"]},"application/vnd.ibm.secure-container":{source:"iana",extensions:["sc"]},"application/vnd.iccprofile":{source:"iana",extensions:["icc","icm"]},"application/vnd.ieee.1905":{source:"iana"},"application/vnd.igloader":{source:"iana",extensions:["igl"]},"application/vnd.imagemeter.folder+zip":{source:"iana",compressible:!1},"application/vnd.imagemeter.image+zip":{source:"iana",compressible:!1},"application/vnd.immervision-ivp":{source:"iana",extensions:["ivp"]},"application/vnd.immervision-ivu":{source:"iana",extensions:["ivu"]},"application/vnd.ims.imsccv1p1":{source:"iana"},"application/vnd.ims.imsccv1p2":{source:"iana"},"application/vnd.ims.imsccv1p3":{source:"iana"},"application/vnd.ims.lis.v2.result+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolconsumerprofile+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolproxy+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolproxy.id+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolsettings+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolsettings.simple+json":{source:"iana",compressible:!0},"application/vnd.informedcontrol.rms+xml":{source:"iana",compressible:!0},"application/vnd.informix-visionary":{source:"iana"},"application/vnd.infotech.project":{source:"iana"},"application/vnd.infotech.project+xml":{source:"iana",compressible:!0},"application/vnd.innopath.wamp.notification":{source:"iana"},"application/vnd.insors.igm":{source:"iana",extensions:["igm"]},"application/vnd.intercon.formnet":{source:"iana",extensions:["xpw","xpx"]},"application/vnd.intergeo":{source:"iana",extensions:["i2g"]},"application/vnd.intertrust.digibox":{source:"iana"},"application/vnd.intertrust.nncp":{source:"iana"},"application/vnd.intu.qbo":{source:"iana",extensions:["qbo"]},"application/vnd.intu.qfx":{source:"iana",extensions:["qfx"]},"application/vnd.iptc.g2.catalogitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.conceptitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.knowledgeitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.newsitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.newsmessage+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.packageitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.planningitem+xml":{source:"iana",compressible:!0},"application/vnd.ipunplugged.rcprofile":{source:"iana",extensions:["rcprofile"]},"application/vnd.irepository.package+xml":{source:"iana",compressible:!0,extensions:["irp"]},"application/vnd.is-xpr":{source:"iana",extensions:["xpr"]},"application/vnd.isac.fcs":{source:"iana",extensions:["fcs"]},"application/vnd.iso11783-10+zip":{source:"iana",compressible:!1},"application/vnd.jam":{source:"iana",extensions:["jam"]},"application/vnd.japannet-directory-service":{source:"iana"},"application/vnd.japannet-jpnstore-wakeup":{source:"iana"},"application/vnd.japannet-payment-wakeup":{source:"iana"},"application/vnd.japannet-registration":{source:"iana"},"application/vnd.japannet-registration-wakeup":{source:"iana"},"application/vnd.japannet-setstore-wakeup":{source:"iana"},"application/vnd.japannet-verification":{source:"iana"},"application/vnd.japannet-verification-wakeup":{source:"iana"},"application/vnd.jcp.javame.midlet-rms":{source:"iana",extensions:["rms"]},"application/vnd.jisp":{source:"iana",extensions:["jisp"]},"application/vnd.joost.joda-archive":{source:"iana",extensions:["joda"]},"application/vnd.jsk.isdn-ngn":{source:"iana"},"application/vnd.kahootz":{source:"iana",extensions:["ktz","ktr"]},"application/vnd.kde.karbon":{source:"iana",extensions:["karbon"]},"application/vnd.kde.kchart":{source:"iana",extensions:["chrt"]},"application/vnd.kde.kformula":{source:"iana",extensions:["kfo"]},"application/vnd.kde.kivio":{source:"iana",extensions:["flw"]},"application/vnd.kde.kontour":{source:"iana",extensions:["kon"]},"application/vnd.kde.kpresenter":{source:"iana",extensions:["kpr","kpt"]},"application/vnd.kde.kspread":{source:"iana",extensions:["ksp"]},"application/vnd.kde.kword":{source:"iana",extensions:["kwd","kwt"]},"application/vnd.kenameaapp":{source:"iana",extensions:["htke"]},"application/vnd.kidspiration":{source:"iana",extensions:["kia"]},"application/vnd.kinar":{source:"iana",extensions:["kne","knp"]},"application/vnd.koan":{source:"iana",extensions:["skp","skd","skt","skm"]},"application/vnd.kodak-descriptor":{source:"iana",extensions:["sse"]},"application/vnd.las":{source:"iana"},"application/vnd.las.las+json":{source:"iana",compressible:!0},"application/vnd.las.las+xml":{source:"iana",compressible:!0,extensions:["lasxml"]},"application/vnd.laszip":{source:"iana"},"application/vnd.leap+json":{source:"iana",compressible:!0},"application/vnd.liberty-request+xml":{source:"iana",compressible:!0},"application/vnd.llamagraphics.life-balance.desktop":{source:"iana",extensions:["lbd"]},"application/vnd.llamagraphics.life-balance.exchange+xml":{source:"iana",compressible:!0,extensions:["lbe"]},"application/vnd.logipipe.circuit+zip":{source:"iana",compressible:!1},"application/vnd.loom":{source:"iana"},"application/vnd.lotus-1-2-3":{source:"iana",extensions:["123"]},"application/vnd.lotus-approach":{source:"iana",extensions:["apr"]},"application/vnd.lotus-freelance":{source:"iana",extensions:["pre"]},"application/vnd.lotus-notes":{source:"iana",extensions:["nsf"]},"application/vnd.lotus-organizer":{source:"iana",extensions:["org"]},"application/vnd.lotus-screencam":{source:"iana",extensions:["scm"]},"application/vnd.lotus-wordpro":{source:"iana",extensions:["lwp"]},"application/vnd.macports.portpkg":{source:"iana",extensions:["portpkg"]},"application/vnd.mapbox-vector-tile":{source:"iana",extensions:["mvt"]},"application/vnd.marlin.drm.actiontoken+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.conftoken+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.license+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.mdcf":{source:"iana"},"application/vnd.mason+json":{source:"iana",compressible:!0},"application/vnd.maxar.archive.3tz+zip":{source:"iana",compressible:!1},"application/vnd.maxmind.maxmind-db":{source:"iana"},"application/vnd.mcd":{source:"iana",extensions:["mcd"]},"application/vnd.medcalcdata":{source:"iana",extensions:["mc1"]},"application/vnd.mediastation.cdkey":{source:"iana",extensions:["cdkey"]},"application/vnd.meridian-slingshot":{source:"iana"},"application/vnd.mfer":{source:"iana",extensions:["mwf"]},"application/vnd.mfmp":{source:"iana",extensions:["mfm"]},"application/vnd.micro+json":{source:"iana",compressible:!0},"application/vnd.micrografx.flo":{source:"iana",extensions:["flo"]},"application/vnd.micrografx.igx":{source:"iana",extensions:["igx"]},"application/vnd.microsoft.portable-executable":{source:"iana"},"application/vnd.microsoft.windows.thumbnail-cache":{source:"iana"},"application/vnd.miele+json":{source:"iana",compressible:!0},"application/vnd.mif":{source:"iana",extensions:["mif"]},"application/vnd.minisoft-hp3000-save":{source:"iana"},"application/vnd.mitsubishi.misty-guard.trustweb":{source:"iana"},"application/vnd.mobius.daf":{source:"iana",extensions:["daf"]},"application/vnd.mobius.dis":{source:"iana",extensions:["dis"]},"application/vnd.mobius.mbk":{source:"iana",extensions:["mbk"]},"application/vnd.mobius.mqy":{source:"iana",extensions:["mqy"]},"application/vnd.mobius.msl":{source:"iana",extensions:["msl"]},"application/vnd.mobius.plc":{source:"iana",extensions:["plc"]},"application/vnd.mobius.txf":{source:"iana",extensions:["txf"]},"application/vnd.mophun.application":{source:"iana",extensions:["mpn"]},"application/vnd.mophun.certificate":{source:"iana",extensions:["mpc"]},"application/vnd.motorola.flexsuite":{source:"iana"},"application/vnd.motorola.flexsuite.adsi":{source:"iana"},"application/vnd.motorola.flexsuite.fis":{source:"iana"},"application/vnd.motorola.flexsuite.gotap":{source:"iana"},"application/vnd.motorola.flexsuite.kmr":{source:"iana"},"application/vnd.motorola.flexsuite.ttc":{source:"iana"},"application/vnd.motorola.flexsuite.wem":{source:"iana"},"application/vnd.motorola.iprm":{source:"iana"},"application/vnd.mozilla.xul+xml":{source:"iana",compressible:!0,extensions:["xul"]},"application/vnd.ms-3mfdocument":{source:"iana"},"application/vnd.ms-artgalry":{source:"iana",extensions:["cil"]},"application/vnd.ms-asf":{source:"iana"},"application/vnd.ms-cab-compressed":{source:"iana",extensions:["cab"]},"application/vnd.ms-color.iccprofile":{source:"apache"},"application/vnd.ms-excel":{source:"iana",compressible:!1,extensions:["xls","xlm","xla","xlc","xlt","xlw"]},"application/vnd.ms-excel.addin.macroenabled.12":{source:"iana",extensions:["xlam"]},"application/vnd.ms-excel.sheet.binary.macroenabled.12":{source:"iana",extensions:["xlsb"]},"application/vnd.ms-excel.sheet.macroenabled.12":{source:"iana",extensions:["xlsm"]},"application/vnd.ms-excel.template.macroenabled.12":{source:"iana",extensions:["xltm"]},"application/vnd.ms-fontobject":{source:"iana",compressible:!0,extensions:["eot"]},"application/vnd.ms-htmlhelp":{source:"iana",extensions:["chm"]},"application/vnd.ms-ims":{source:"iana",extensions:["ims"]},"application/vnd.ms-lrm":{source:"iana",extensions:["lrm"]},"application/vnd.ms-office.activex+xml":{source:"iana",compressible:!0},"application/vnd.ms-officetheme":{source:"iana",extensions:["thmx"]},"application/vnd.ms-opentype":{source:"apache",compressible:!0},"application/vnd.ms-outlook":{compressible:!1,extensions:["msg"]},"application/vnd.ms-package.obfuscated-opentype":{source:"apache"},"application/vnd.ms-pki.seccat":{source:"apache",extensions:["cat"]},"application/vnd.ms-pki.stl":{source:"apache",extensions:["stl"]},"application/vnd.ms-playready.initiator+xml":{source:"iana",compressible:!0},"application/vnd.ms-powerpoint":{source:"iana",compressible:!1,extensions:["ppt","pps","pot"]},"application/vnd.ms-powerpoint.addin.macroenabled.12":{source:"iana",extensions:["ppam"]},"application/vnd.ms-powerpoint.presentation.macroenabled.12":{source:"iana",extensions:["pptm"]},"application/vnd.ms-powerpoint.slide.macroenabled.12":{source:"iana",extensions:["sldm"]},"application/vnd.ms-powerpoint.slideshow.macroenabled.12":{source:"iana",extensions:["ppsm"]},"application/vnd.ms-powerpoint.template.macroenabled.12":{source:"iana",extensions:["potm"]},"application/vnd.ms-printdevicecapabilities+xml":{source:"iana",compressible:!0},"application/vnd.ms-printing.printticket+xml":{source:"apache",compressible:!0},"application/vnd.ms-printschematicket+xml":{source:"iana",compressible:!0},"application/vnd.ms-project":{source:"iana",extensions:["mpp","mpt"]},"application/vnd.ms-tnef":{source:"iana"},"application/vnd.ms-windows.devicepairing":{source:"iana"},"application/vnd.ms-windows.nwprinting.oob":{source:"iana"},"application/vnd.ms-windows.printerpairing":{source:"iana"},"application/vnd.ms-windows.wsd.oob":{source:"iana"},"application/vnd.ms-wmdrm.lic-chlg-req":{source:"iana"},"application/vnd.ms-wmdrm.lic-resp":{source:"iana"},"application/vnd.ms-wmdrm.meter-chlg-req":{source:"iana"},"application/vnd.ms-wmdrm.meter-resp":{source:"iana"},"application/vnd.ms-word.document.macroenabled.12":{source:"iana",extensions:["docm"]},"application/vnd.ms-word.template.macroenabled.12":{source:"iana",extensions:["dotm"]},"application/vnd.ms-works":{source:"iana",extensions:["wps","wks","wcm","wdb"]},"application/vnd.ms-wpl":{source:"iana",extensions:["wpl"]},"application/vnd.ms-xpsdocument":{source:"iana",compressible:!1,extensions:["xps"]},"application/vnd.msa-disk-image":{source:"iana"},"application/vnd.mseq":{source:"iana",extensions:["mseq"]},"application/vnd.msign":{source:"iana"},"application/vnd.multiad.creator":{source:"iana"},"application/vnd.multiad.creator.cif":{source:"iana"},"application/vnd.music-niff":{source:"iana"},"application/vnd.musician":{source:"iana",extensions:["mus"]},"application/vnd.muvee.style":{source:"iana",extensions:["msty"]},"application/vnd.mynfc":{source:"iana",extensions:["taglet"]},"application/vnd.nacamar.ybrid+json":{source:"iana",compressible:!0},"application/vnd.ncd.control":{source:"iana"},"application/vnd.ncd.reference":{source:"iana"},"application/vnd.nearst.inv+json":{source:"iana",compressible:!0},"application/vnd.nebumind.line":{source:"iana"},"application/vnd.nervana":{source:"iana"},"application/vnd.netfpx":{source:"iana"},"application/vnd.neurolanguage.nlu":{source:"iana",extensions:["nlu"]},"application/vnd.nimn":{source:"iana"},"application/vnd.nintendo.nitro.rom":{source:"iana"},"application/vnd.nintendo.snes.rom":{source:"iana"},"application/vnd.nitf":{source:"iana",extensions:["ntf","nitf"]},"application/vnd.noblenet-directory":{source:"iana",extensions:["nnd"]},"application/vnd.noblenet-sealer":{source:"iana",extensions:["nns"]},"application/vnd.noblenet-web":{source:"iana",extensions:["nnw"]},"application/vnd.nokia.catalogs":{source:"iana"},"application/vnd.nokia.conml+wbxml":{source:"iana"},"application/vnd.nokia.conml+xml":{source:"iana",compressible:!0},"application/vnd.nokia.iptv.config+xml":{source:"iana",compressible:!0},"application/vnd.nokia.isds-radio-presets":{source:"iana"},"application/vnd.nokia.landmark+wbxml":{source:"iana"},"application/vnd.nokia.landmark+xml":{source:"iana",compressible:!0},"application/vnd.nokia.landmarkcollection+xml":{source:"iana",compressible:!0},"application/vnd.nokia.n-gage.ac+xml":{source:"iana",compressible:!0,extensions:["ac"]},"application/vnd.nokia.n-gage.data":{source:"iana",extensions:["ngdat"]},"application/vnd.nokia.n-gage.symbian.install":{source:"iana",extensions:["n-gage"]},"application/vnd.nokia.ncd":{source:"iana"},"application/vnd.nokia.pcd+wbxml":{source:"iana"},"application/vnd.nokia.pcd+xml":{source:"iana",compressible:!0},"application/vnd.nokia.radio-preset":{source:"iana",extensions:["rpst"]},"application/vnd.nokia.radio-presets":{source:"iana",extensions:["rpss"]},"application/vnd.novadigm.edm":{source:"iana",extensions:["edm"]},"application/vnd.novadigm.edx":{source:"iana",extensions:["edx"]},"application/vnd.novadigm.ext":{source:"iana",extensions:["ext"]},"application/vnd.ntt-local.content-share":{source:"iana"},"application/vnd.ntt-local.file-transfer":{source:"iana"},"application/vnd.ntt-local.ogw_remote-access":{source:"iana"},"application/vnd.ntt-local.sip-ta_remote":{source:"iana"},"application/vnd.ntt-local.sip-ta_tcp_stream":{source:"iana"},"application/vnd.oasis.opendocument.chart":{source:"iana",extensions:["odc"]},"application/vnd.oasis.opendocument.chart-template":{source:"iana",extensions:["otc"]},"application/vnd.oasis.opendocument.database":{source:"iana",extensions:["odb"]},"application/vnd.oasis.opendocument.formula":{source:"iana",extensions:["odf"]},"application/vnd.oasis.opendocument.formula-template":{source:"iana",extensions:["odft"]},"application/vnd.oasis.opendocument.graphics":{source:"iana",compressible:!1,extensions:["odg"]},"application/vnd.oasis.opendocument.graphics-template":{source:"iana",extensions:["otg"]},"application/vnd.oasis.opendocument.image":{source:"iana",extensions:["odi"]},"application/vnd.oasis.opendocument.image-template":{source:"iana",extensions:["oti"]},"application/vnd.oasis.opendocument.presentation":{source:"iana",compressible:!1,extensions:["odp"]},"application/vnd.oasis.opendocument.presentation-template":{source:"iana",extensions:["otp"]},"application/vnd.oasis.opendocument.spreadsheet":{source:"iana",compressible:!1,extensions:["ods"]},"application/vnd.oasis.opendocument.spreadsheet-template":{source:"iana",extensions:["ots"]},"application/vnd.oasis.opendocument.text":{source:"iana",compressible:!1,extensions:["odt"]},"application/vnd.oasis.opendocument.text-master":{source:"iana",extensions:["odm"]},"application/vnd.oasis.opendocument.text-template":{source:"iana",extensions:["ott"]},"application/vnd.oasis.opendocument.text-web":{source:"iana",extensions:["oth"]},"application/vnd.obn":{source:"iana"},"application/vnd.ocf+cbor":{source:"iana"},"application/vnd.oci.image.manifest.v1+json":{source:"iana",compressible:!0},"application/vnd.oftn.l10n+json":{source:"iana",compressible:!0},"application/vnd.oipf.contentaccessdownload+xml":{source:"iana",compressible:!0},"application/vnd.oipf.contentaccessstreaming+xml":{source:"iana",compressible:!0},"application/vnd.oipf.cspg-hexbinary":{source:"iana"},"application/vnd.oipf.dae.svg+xml":{source:"iana",compressible:!0},"application/vnd.oipf.dae.xhtml+xml":{source:"iana",compressible:!0},"application/vnd.oipf.mippvcontrolmessage+xml":{source:"iana",compressible:!0},"application/vnd.oipf.pae.gem":{source:"iana"},"application/vnd.oipf.spdiscovery+xml":{source:"iana",compressible:!0},"application/vnd.oipf.spdlist+xml":{source:"iana",compressible:!0},"application/vnd.oipf.ueprofile+xml":{source:"iana",compressible:!0},"application/vnd.oipf.userprofile+xml":{source:"iana",compressible:!0},"application/vnd.olpc-sugar":{source:"iana",extensions:["xo"]},"application/vnd.oma-scws-config":{source:"iana"},"application/vnd.oma-scws-http-request":{source:"iana"},"application/vnd.oma-scws-http-response":{source:"iana"},"application/vnd.oma.bcast.associated-procedure-parameter+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.drm-trigger+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.imd+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.ltkm":{source:"iana"},"application/vnd.oma.bcast.notification+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.provisioningtrigger":{source:"iana"},"application/vnd.oma.bcast.sgboot":{source:"iana"},"application/vnd.oma.bcast.sgdd+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.sgdu":{source:"iana"},"application/vnd.oma.bcast.simple-symbol-container":{source:"iana"},"application/vnd.oma.bcast.smartcard-trigger+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.sprov+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.stkm":{source:"iana"},"application/vnd.oma.cab-address-book+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-feature-handler+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-pcc+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-subs-invite+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-user-prefs+xml":{source:"iana",compressible:!0},"application/vnd.oma.dcd":{source:"iana"},"application/vnd.oma.dcdc":{source:"iana"},"application/vnd.oma.dd2+xml":{source:"iana",compressible:!0,extensions:["dd2"]},"application/vnd.oma.drm.risd+xml":{source:"iana",compressible:!0},"application/vnd.oma.group-usage-list+xml":{source:"iana",compressible:!0},"application/vnd.oma.lwm2m+cbor":{source:"iana"},"application/vnd.oma.lwm2m+json":{source:"iana",compressible:!0},"application/vnd.oma.lwm2m+tlv":{source:"iana"},"application/vnd.oma.pal+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.detailed-progress-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.final-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.groups+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.invocation-descriptor+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.optimized-progress-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.push":{source:"iana"},"application/vnd.oma.scidm.messages+xml":{source:"iana",compressible:!0},"application/vnd.oma.xcap-directory+xml":{source:"iana",compressible:!0},"application/vnd.omads-email+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omads-file+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omads-folder+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omaloc-supl-init":{source:"iana"},"application/vnd.onepager":{source:"iana"},"application/vnd.onepagertamp":{source:"iana"},"application/vnd.onepagertamx":{source:"iana"},"application/vnd.onepagertat":{source:"iana"},"application/vnd.onepagertatp":{source:"iana"},"application/vnd.onepagertatx":{source:"iana"},"application/vnd.openblox.game+xml":{source:"iana",compressible:!0,extensions:["obgx"]},"application/vnd.openblox.game-binary":{source:"iana"},"application/vnd.openeye.oeb":{source:"iana"},"application/vnd.openofficeorg.extension":{source:"apache",extensions:["oxt"]},"application/vnd.openstreetmap.data+xml":{source:"iana",compressible:!0,extensions:["osm"]},"application/vnd.opentimestamps.ots":{source:"iana"},"application/vnd.openxmlformats-officedocument.custom-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.customxmlproperties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawing+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.chart+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramcolors+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramdata+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramlayout+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramstyle+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.extended-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.handoutmaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.notesmaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.notesslide+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.presentation":{source:"iana",compressible:!1,extensions:["pptx"]},"application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.presprops+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slide":{source:"iana",extensions:["sldx"]},"application/vnd.openxmlformats-officedocument.presentationml.slide+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slidelayout+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slidemaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slideshow":{source:"iana",extensions:["ppsx"]},"application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slideupdateinfo+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.tablestyles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.tags+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.template":{source:"iana",extensions:["potx"]},"application/vnd.openxmlformats-officedocument.presentationml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.externallink+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcachedefinition+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcacherecords+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivottable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.querytable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionheaders+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionlog+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedstrings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{source:"iana",compressible:!1,extensions:["xlsx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheetmetadata+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.tablesinglecells+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.template":{source:"iana",extensions:["xltx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.usernames+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.volatiledependencies+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.theme+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.themeoverride+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.vmldrawing":{source:"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.document":{source:"iana",compressible:!1,extensions:["docx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.fonttable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.template":{source:"iana",extensions:["dotx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.websettings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.core-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.relationships+xml":{source:"iana",compressible:!0},"application/vnd.oracle.resource+json":{source:"iana",compressible:!0},"application/vnd.orange.indata":{source:"iana"},"application/vnd.osa.netdeploy":{source:"iana"},"application/vnd.osgeo.mapguide.package":{source:"iana",extensions:["mgp"]},"application/vnd.osgi.bundle":{source:"iana"},"application/vnd.osgi.dp":{source:"iana",extensions:["dp"]},"application/vnd.osgi.subsystem":{source:"iana",extensions:["esa"]},"application/vnd.otps.ct-kip+xml":{source:"iana",compressible:!0},"application/vnd.oxli.countgraph":{source:"iana"},"application/vnd.pagerduty+json":{source:"iana",compressible:!0},"application/vnd.palm":{source:"iana",extensions:["pdb","pqa","oprc"]},"application/vnd.panoply":{source:"iana"},"application/vnd.paos.xml":{source:"iana"},"application/vnd.patentdive":{source:"iana"},"application/vnd.patientecommsdoc":{source:"iana"},"application/vnd.pawaafile":{source:"iana",extensions:["paw"]},"application/vnd.pcos":{source:"iana"},"application/vnd.pg.format":{source:"iana",extensions:["str"]},"application/vnd.pg.osasli":{source:"iana",extensions:["ei6"]},"application/vnd.piaccess.application-licence":{source:"iana"},"application/vnd.picsel":{source:"iana",extensions:["efif"]},"application/vnd.pmi.widget":{source:"iana",extensions:["wg"]},"application/vnd.poc.group-advertisement+xml":{source:"iana",compressible:!0},"application/vnd.pocketlearn":{source:"iana",extensions:["plf"]},"application/vnd.powerbuilder6":{source:"iana",extensions:["pbd"]},"application/vnd.powerbuilder6-s":{source:"iana"},"application/vnd.powerbuilder7":{source:"iana"},"application/vnd.powerbuilder7-s":{source:"iana"},"application/vnd.powerbuilder75":{source:"iana"},"application/vnd.powerbuilder75-s":{source:"iana"},"application/vnd.preminet":{source:"iana"},"application/vnd.previewsystems.box":{source:"iana",extensions:["box"]},"application/vnd.proteus.magazine":{source:"iana",extensions:["mgz"]},"application/vnd.psfs":{source:"iana"},"application/vnd.publishare-delta-tree":{source:"iana",extensions:["qps"]},"application/vnd.pvi.ptid1":{source:"iana",extensions:["ptid"]},"application/vnd.pwg-multiplexed":{source:"iana"},"application/vnd.pwg-xhtml-print+xml":{source:"iana",compressible:!0},"application/vnd.qualcomm.brew-app-res":{source:"iana"},"application/vnd.quarantainenet":{source:"iana"},"application/vnd.quark.quarkxpress":{source:"iana",extensions:["qxd","qxt","qwd","qwt","qxl","qxb"]},"application/vnd.quobject-quoxdocument":{source:"iana"},"application/vnd.radisys.moml+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-conf+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-conn+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-dialog+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-stream+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-conf+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-base+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-fax-detect+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-fax-sendrecv+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-group+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-speech+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-transform+xml":{source:"iana",compressible:!0},"application/vnd.rainstor.data":{source:"iana"},"application/vnd.rapid":{source:"iana"},"application/vnd.rar":{source:"iana",extensions:["rar"]},"application/vnd.realvnc.bed":{source:"iana",extensions:["bed"]},"application/vnd.recordare.musicxml":{source:"iana",extensions:["mxl"]},"application/vnd.recordare.musicxml+xml":{source:"iana",compressible:!0,extensions:["musicxml"]},"application/vnd.renlearn.rlprint":{source:"iana"},"application/vnd.resilient.logic":{source:"iana"},"application/vnd.restful+json":{source:"iana",compressible:!0},"application/vnd.rig.cryptonote":{source:"iana",extensions:["cryptonote"]},"application/vnd.rim.cod":{source:"apache",extensions:["cod"]},"application/vnd.rn-realmedia":{source:"apache",extensions:["rm"]},"application/vnd.rn-realmedia-vbr":{source:"apache",extensions:["rmvb"]},"application/vnd.route66.link66+xml":{source:"iana",compressible:!0,extensions:["link66"]},"application/vnd.rs-274x":{source:"iana"},"application/vnd.ruckus.download":{source:"iana"},"application/vnd.s3sms":{source:"iana"},"application/vnd.sailingtracker.track":{source:"iana",extensions:["st"]},"application/vnd.sar":{source:"iana"},"application/vnd.sbm.cid":{source:"iana"},"application/vnd.sbm.mid2":{source:"iana"},"application/vnd.scribus":{source:"iana"},"application/vnd.sealed.3df":{source:"iana"},"application/vnd.sealed.csf":{source:"iana"},"application/vnd.sealed.doc":{source:"iana"},"application/vnd.sealed.eml":{source:"iana"},"application/vnd.sealed.mht":{source:"iana"},"application/vnd.sealed.net":{source:"iana"},"application/vnd.sealed.ppt":{source:"iana"},"application/vnd.sealed.tiff":{source:"iana"},"application/vnd.sealed.xls":{source:"iana"},"application/vnd.sealedmedia.softseal.html":{source:"iana"},"application/vnd.sealedmedia.softseal.pdf":{source:"iana"},"application/vnd.seemail":{source:"iana",extensions:["see"]},"application/vnd.seis+json":{source:"iana",compressible:!0},"application/vnd.sema":{source:"iana",extensions:["sema"]},"application/vnd.semd":{source:"iana",extensions:["semd"]},"application/vnd.semf":{source:"iana",extensions:["semf"]},"application/vnd.shade-save-file":{source:"iana"},"application/vnd.shana.informed.formdata":{source:"iana",extensions:["ifm"]},"application/vnd.shana.informed.formtemplate":{source:"iana",extensions:["itp"]},"application/vnd.shana.informed.interchange":{source:"iana",extensions:["iif"]},"application/vnd.shana.informed.package":{source:"iana",extensions:["ipk"]},"application/vnd.shootproof+json":{source:"iana",compressible:!0},"application/vnd.shopkick+json":{source:"iana",compressible:!0},"application/vnd.shp":{source:"iana"},"application/vnd.shx":{source:"iana"},"application/vnd.sigrok.session":{source:"iana"},"application/vnd.simtech-mindmapper":{source:"iana",extensions:["twd","twds"]},"application/vnd.siren+json":{source:"iana",compressible:!0},"application/vnd.smaf":{source:"iana",extensions:["mmf"]},"application/vnd.smart.notebook":{source:"iana"},"application/vnd.smart.teacher":{source:"iana",extensions:["teacher"]},"application/vnd.snesdev-page-table":{source:"iana"},"application/vnd.software602.filler.form+xml":{source:"iana",compressible:!0,extensions:["fo"]},"application/vnd.software602.filler.form-xml-zip":{source:"iana"},"application/vnd.solent.sdkm+xml":{source:"iana",compressible:!0,extensions:["sdkm","sdkd"]},"application/vnd.spotfire.dxp":{source:"iana",extensions:["dxp"]},"application/vnd.spotfire.sfs":{source:"iana",extensions:["sfs"]},"application/vnd.sqlite3":{source:"iana"},"application/vnd.sss-cod":{source:"iana"},"application/vnd.sss-dtf":{source:"iana"},"application/vnd.sss-ntf":{source:"iana"},"application/vnd.stardivision.calc":{source:"apache",extensions:["sdc"]},"application/vnd.stardivision.draw":{source:"apache",extensions:["sda"]},"application/vnd.stardivision.impress":{source:"apache",extensions:["sdd"]},"application/vnd.stardivision.math":{source:"apache",extensions:["smf"]},"application/vnd.stardivision.writer":{source:"apache",extensions:["sdw","vor"]},"application/vnd.stardivision.writer-global":{source:"apache",extensions:["sgl"]},"application/vnd.stepmania.package":{source:"iana",extensions:["smzip"]},"application/vnd.stepmania.stepchart":{source:"iana",extensions:["sm"]},"application/vnd.street-stream":{source:"iana"},"application/vnd.sun.wadl+xml":{source:"iana",compressible:!0,extensions:["wadl"]},"application/vnd.sun.xml.calc":{source:"apache",extensions:["sxc"]},"application/vnd.sun.xml.calc.template":{source:"apache",extensions:["stc"]},"application/vnd.sun.xml.draw":{source:"apache",extensions:["sxd"]},"application/vnd.sun.xml.draw.template":{source:"apache",extensions:["std"]},"application/vnd.sun.xml.impress":{source:"apache",extensions:["sxi"]},"application/vnd.sun.xml.impress.template":{source:"apache",extensions:["sti"]},"application/vnd.sun.xml.math":{source:"apache",extensions:["sxm"]},"application/vnd.sun.xml.writer":{source:"apache",extensions:["sxw"]},"application/vnd.sun.xml.writer.global":{source:"apache",extensions:["sxg"]},"application/vnd.sun.xml.writer.template":{source:"apache",extensions:["stw"]},"application/vnd.sus-calendar":{source:"iana",extensions:["sus","susp"]},"application/vnd.svd":{source:"iana",extensions:["svd"]},"application/vnd.swiftview-ics":{source:"iana"},"application/vnd.sycle+xml":{source:"iana",compressible:!0},"application/vnd.syft+json":{source:"iana",compressible:!0},"application/vnd.symbian.install":{source:"apache",extensions:["sis","sisx"]},"application/vnd.syncml+xml":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["xsm"]},"application/vnd.syncml.dm+wbxml":{source:"iana",charset:"UTF-8",extensions:["bdm"]},"application/vnd.syncml.dm+xml":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["xdm"]},"application/vnd.syncml.dm.notification":{source:"iana"},"application/vnd.syncml.dmddf+wbxml":{source:"iana"},"application/vnd.syncml.dmddf+xml":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["ddf"]},"application/vnd.syncml.dmtnds+wbxml":{source:"iana"},"application/vnd.syncml.dmtnds+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.syncml.ds.notification":{source:"iana"},"application/vnd.tableschema+json":{source:"iana",compressible:!0},"application/vnd.tao.intent-module-archive":{source:"iana",extensions:["tao"]},"application/vnd.tcpdump.pcap":{source:"iana",extensions:["pcap","cap","dmp"]},"application/vnd.think-cell.ppttc+json":{source:"iana",compressible:!0},"application/vnd.tmd.mediaflex.api+xml":{source:"iana",compressible:!0},"application/vnd.tml":{source:"iana"},"application/vnd.tmobile-livetv":{source:"iana",extensions:["tmo"]},"application/vnd.tri.onesource":{source:"iana"},"application/vnd.trid.tpt":{source:"iana",extensions:["tpt"]},"application/vnd.triscape.mxs":{source:"iana",extensions:["mxs"]},"application/vnd.trueapp":{source:"iana",extensions:["tra"]},"application/vnd.truedoc":{source:"iana"},"application/vnd.ubisoft.webplayer":{source:"iana"},"application/vnd.ufdl":{source:"iana",extensions:["ufd","ufdl"]},"application/vnd.uiq.theme":{source:"iana",extensions:["utz"]},"application/vnd.umajin":{source:"iana",extensions:["umj"]},"application/vnd.unity":{source:"iana",extensions:["unityweb"]},"application/vnd.uoml+xml":{source:"iana",compressible:!0,extensions:["uoml"]},"application/vnd.uplanet.alert":{source:"iana"},"application/vnd.uplanet.alert-wbxml":{source:"iana"},"application/vnd.uplanet.bearer-choice":{source:"iana"},"application/vnd.uplanet.bearer-choice-wbxml":{source:"iana"},"application/vnd.uplanet.cacheop":{source:"iana"},"application/vnd.uplanet.cacheop-wbxml":{source:"iana"},"application/vnd.uplanet.channel":{source:"iana"},"application/vnd.uplanet.channel-wbxml":{source:"iana"},"application/vnd.uplanet.list":{source:"iana"},"application/vnd.uplanet.list-wbxml":{source:"iana"},"application/vnd.uplanet.listcmd":{source:"iana"},"application/vnd.uplanet.listcmd-wbxml":{source:"iana"},"application/vnd.uplanet.signal":{source:"iana"},"application/vnd.uri-map":{source:"iana"},"application/vnd.valve.source.material":{source:"iana"},"application/vnd.vcx":{source:"iana",extensions:["vcx"]},"application/vnd.vd-study":{source:"iana"},"application/vnd.vectorworks":{source:"iana"},"application/vnd.vel+json":{source:"iana",compressible:!0},"application/vnd.verimatrix.vcas":{source:"iana"},"application/vnd.veritone.aion+json":{source:"iana",compressible:!0},"application/vnd.veryant.thin":{source:"iana"},"application/vnd.ves.encrypted":{source:"iana"},"application/vnd.vidsoft.vidconference":{source:"iana"},"application/vnd.visio":{source:"iana",extensions:["vsd","vst","vss","vsw"]},"application/vnd.visionary":{source:"iana",extensions:["vis"]},"application/vnd.vividence.scriptfile":{source:"iana"},"application/vnd.vsf":{source:"iana",extensions:["vsf"]},"application/vnd.wap.sic":{source:"iana"},"application/vnd.wap.slc":{source:"iana"},"application/vnd.wap.wbxml":{source:"iana",charset:"UTF-8",extensions:["wbxml"]},"application/vnd.wap.wmlc":{source:"iana",extensions:["wmlc"]},"application/vnd.wap.wmlscriptc":{source:"iana",extensions:["wmlsc"]},"application/vnd.webturbo":{source:"iana",extensions:["wtb"]},"application/vnd.wfa.dpp":{source:"iana"},"application/vnd.wfa.p2p":{source:"iana"},"application/vnd.wfa.wsc":{source:"iana"},"application/vnd.windows.devicepairing":{source:"iana"},"application/vnd.wmc":{source:"iana"},"application/vnd.wmf.bootstrap":{source:"iana"},"application/vnd.wolfram.mathematica":{source:"iana"},"application/vnd.wolfram.mathematica.package":{source:"iana"},"application/vnd.wolfram.player":{source:"iana",extensions:["nbp"]},"application/vnd.wordperfect":{source:"iana",extensions:["wpd"]},"application/vnd.wqd":{source:"iana",extensions:["wqd"]},"application/vnd.wrq-hp3000-labelled":{source:"iana"},"application/vnd.wt.stf":{source:"iana",extensions:["stf"]},"application/vnd.wv.csp+wbxml":{source:"iana"},"application/vnd.wv.csp+xml":{source:"iana",compressible:!0},"application/vnd.wv.ssp+xml":{source:"iana",compressible:!0},"application/vnd.xacml+json":{source:"iana",compressible:!0},"application/vnd.xara":{source:"iana",extensions:["xar"]},"application/vnd.xfdl":{source:"iana",extensions:["xfdl"]},"application/vnd.xfdl.webform":{source:"iana"},"application/vnd.xmi+xml":{source:"iana",compressible:!0},"application/vnd.xmpie.cpkg":{source:"iana"},"application/vnd.xmpie.dpkg":{source:"iana"},"application/vnd.xmpie.plan":{source:"iana"},"application/vnd.xmpie.ppkg":{source:"iana"},"application/vnd.xmpie.xlim":{source:"iana"},"application/vnd.yamaha.hv-dic":{source:"iana",extensions:["hvd"]},"application/vnd.yamaha.hv-script":{source:"iana",extensions:["hvs"]},"application/vnd.yamaha.hv-voice":{source:"iana",extensions:["hvp"]},"application/vnd.yamaha.openscoreformat":{source:"iana",extensions:["osf"]},"application/vnd.yamaha.openscoreformat.osfpvg+xml":{source:"iana",compressible:!0,extensions:["osfpvg"]},"application/vnd.yamaha.remote-setup":{source:"iana"},"application/vnd.yamaha.smaf-audio":{source:"iana",extensions:["saf"]},"application/vnd.yamaha.smaf-phrase":{source:"iana",extensions:["spf"]},"application/vnd.yamaha.through-ngn":{source:"iana"},"application/vnd.yamaha.tunnel-udpencap":{source:"iana"},"application/vnd.yaoweme":{source:"iana"},"application/vnd.yellowriver-custom-menu":{source:"iana",extensions:["cmp"]},"application/vnd.youtube.yt":{source:"iana"},"application/vnd.zul":{source:"iana",extensions:["zir","zirz"]},"application/vnd.zzazz.deck+xml":{source:"iana",compressible:!0,extensions:["zaz"]},"application/voicexml+xml":{source:"iana",compressible:!0,extensions:["vxml"]},"application/voucher-cms+json":{source:"iana",compressible:!0},"application/vq-rtcpxr":{source:"iana"},"application/wasm":{source:"iana",compressible:!0,extensions:["wasm"]},"application/watcherinfo+xml":{source:"iana",compressible:!0,extensions:["wif"]},"application/webpush-options+json":{source:"iana",compressible:!0},"application/whoispp-query":{source:"iana"},"application/whoispp-response":{source:"iana"},"application/widget":{source:"iana",extensions:["wgt"]},"application/winhlp":{source:"apache",extensions:["hlp"]},"application/wita":{source:"iana"},"application/wordperfect5.1":{source:"iana"},"application/wsdl+xml":{source:"iana",compressible:!0,extensions:["wsdl"]},"application/wspolicy+xml":{source:"iana",compressible:!0,extensions:["wspolicy"]},"application/x-7z-compressed":{source:"apache",compressible:!1,extensions:["7z"]},"application/x-abiword":{source:"apache",extensions:["abw"]},"application/x-ace-compressed":{source:"apache",extensions:["ace"]},"application/x-amf":{source:"apache"},"application/x-apple-diskimage":{source:"apache",extensions:["dmg"]},"application/x-arj":{compressible:!1,extensions:["arj"]},"application/x-authorware-bin":{source:"apache",extensions:["aab","x32","u32","vox"]},"application/x-authorware-map":{source:"apache",extensions:["aam"]},"application/x-authorware-seg":{source:"apache",extensions:["aas"]},"application/x-bcpio":{source:"apache",extensions:["bcpio"]},"application/x-bdoc":{compressible:!1,extensions:["bdoc"]},"application/x-bittorrent":{source:"apache",extensions:["torrent"]},"application/x-blorb":{source:"apache",extensions:["blb","blorb"]},"application/x-bzip":{source:"apache",compressible:!1,extensions:["bz"]},"application/x-bzip2":{source:"apache",compressible:!1,extensions:["bz2","boz"]},"application/x-cbr":{source:"apache",extensions:["cbr","cba","cbt","cbz","cb7"]},"application/x-cdlink":{source:"apache",extensions:["vcd"]},"application/x-cfs-compressed":{source:"apache",extensions:["cfs"]},"application/x-chat":{source:"apache",extensions:["chat"]},"application/x-chess-pgn":{source:"apache",extensions:["pgn"]},"application/x-chrome-extension":{extensions:["crx"]},"application/x-cocoa":{source:"nginx",extensions:["cco"]},"application/x-compress":{source:"apache"},"application/x-conference":{source:"apache",extensions:["nsc"]},"application/x-cpio":{source:"apache",extensions:["cpio"]},"application/x-csh":{source:"apache",extensions:["csh"]},"application/x-deb":{compressible:!1},"application/x-debian-package":{source:"apache",extensions:["deb","udeb"]},"application/x-dgc-compressed":{source:"apache",extensions:["dgc"]},"application/x-director":{source:"apache",extensions:["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"]},"application/x-doom":{source:"apache",extensions:["wad"]},"application/x-dtbncx+xml":{source:"apache",compressible:!0,extensions:["ncx"]},"application/x-dtbook+xml":{source:"apache",compressible:!0,extensions:["dtb"]},"application/x-dtbresource+xml":{source:"apache",compressible:!0,extensions:["res"]},"application/x-dvi":{source:"apache",compressible:!1,extensions:["dvi"]},"application/x-envoy":{source:"apache",extensions:["evy"]},"application/x-eva":{source:"apache",extensions:["eva"]},"application/x-font-bdf":{source:"apache",extensions:["bdf"]},"application/x-font-dos":{source:"apache"},"application/x-font-framemaker":{source:"apache"},"application/x-font-ghostscript":{source:"apache",extensions:["gsf"]},"application/x-font-libgrx":{source:"apache"},"application/x-font-linux-psf":{source:"apache",extensions:["psf"]},"application/x-font-pcf":{source:"apache",extensions:["pcf"]},"application/x-font-snf":{source:"apache",extensions:["snf"]},"application/x-font-speedo":{source:"apache"},"application/x-font-sunos-news":{source:"apache"},"application/x-font-type1":{source:"apache",extensions:["pfa","pfb","pfm","afm"]},"application/x-font-vfont":{source:"apache"},"application/x-freearc":{source:"apache",extensions:["arc"]},"application/x-futuresplash":{source:"apache",extensions:["spl"]},"application/x-gca-compressed":{source:"apache",extensions:["gca"]},"application/x-glulx":{source:"apache",extensions:["ulx"]},"application/x-gnumeric":{source:"apache",extensions:["gnumeric"]},"application/x-gramps-xml":{source:"apache",extensions:["gramps"]},"application/x-gtar":{source:"apache",extensions:["gtar"]},"application/x-gzip":{source:"apache"},"application/x-hdf":{source:"apache",extensions:["hdf"]},"application/x-httpd-php":{compressible:!0,extensions:["php"]},"application/x-install-instructions":{source:"apache",extensions:["install"]},"application/x-iso9660-image":{source:"apache",extensions:["iso"]},"application/x-iwork-keynote-sffkey":{extensions:["key"]},"application/x-iwork-numbers-sffnumbers":{extensions:["numbers"]},"application/x-iwork-pages-sffpages":{extensions:["pages"]},"application/x-java-archive-diff":{source:"nginx",extensions:["jardiff"]},"application/x-java-jnlp-file":{source:"apache",compressible:!1,extensions:["jnlp"]},"application/x-javascript":{compressible:!0},"application/x-keepass2":{extensions:["kdbx"]},"application/x-latex":{source:"apache",compressible:!1,extensions:["latex"]},"application/x-lua-bytecode":{extensions:["luac"]},"application/x-lzh-compressed":{source:"apache",extensions:["lzh","lha"]},"application/x-makeself":{source:"nginx",extensions:["run"]},"application/x-mie":{source:"apache",extensions:["mie"]},"application/x-mobipocket-ebook":{source:"apache",extensions:["prc","mobi"]},"application/x-mpegurl":{compressible:!1},"application/x-ms-application":{source:"apache",extensions:["application"]},"application/x-ms-shortcut":{source:"apache",extensions:["lnk"]},"application/x-ms-wmd":{source:"apache",extensions:["wmd"]},"application/x-ms-wmz":{source:"apache",extensions:["wmz"]},"application/x-ms-xbap":{source:"apache",extensions:["xbap"]},"application/x-msaccess":{source:"apache",extensions:["mdb"]},"application/x-msbinder":{source:"apache",extensions:["obd"]},"application/x-mscardfile":{source:"apache",extensions:["crd"]},"application/x-msclip":{source:"apache",extensions:["clp"]},"application/x-msdos-program":{extensions:["exe"]},"application/x-msdownload":{source:"apache",extensions:["exe","dll","com","bat","msi"]},"application/x-msmediaview":{source:"apache",extensions:["mvb","m13","m14"]},"application/x-msmetafile":{source:"apache",extensions:["wmf","wmz","emf","emz"]},"application/x-msmoney":{source:"apache",extensions:["mny"]},"application/x-mspublisher":{source:"apache",extensions:["pub"]},"application/x-msschedule":{source:"apache",extensions:["scd"]},"application/x-msterminal":{source:"apache",extensions:["trm"]},"application/x-mswrite":{source:"apache",extensions:["wri"]},"application/x-netcdf":{source:"apache",extensions:["nc","cdf"]},"application/x-ns-proxy-autoconfig":{compressible:!0,extensions:["pac"]},"application/x-nzb":{source:"apache",extensions:["nzb"]},"application/x-perl":{source:"nginx",extensions:["pl","pm"]},"application/x-pilot":{source:"nginx",extensions:["prc","pdb"]},"application/x-pkcs12":{source:"apache",compressible:!1,extensions:["p12","pfx"]},"application/x-pkcs7-certificates":{source:"apache",extensions:["p7b","spc"]},"application/x-pkcs7-certreqresp":{source:"apache",extensions:["p7r"]},"application/x-pki-message":{source:"iana"},"application/x-rar-compressed":{source:"apache",compressible:!1,extensions:["rar"]},"application/x-redhat-package-manager":{source:"nginx",extensions:["rpm"]},"application/x-research-info-systems":{source:"apache",extensions:["ris"]},"application/x-sea":{source:"nginx",extensions:["sea"]},"application/x-sh":{source:"apache",compressible:!0,extensions:["sh"]},"application/x-shar":{source:"apache",extensions:["shar"]},"application/x-shockwave-flash":{source:"apache",compressible:!1,extensions:["swf"]},"application/x-silverlight-app":{source:"apache",extensions:["xap"]},"application/x-sql":{source:"apache",extensions:["sql"]},"application/x-stuffit":{source:"apache",compressible:!1,extensions:["sit"]},"application/x-stuffitx":{source:"apache",extensions:["sitx"]},"application/x-subrip":{source:"apache",extensions:["srt"]},"application/x-sv4cpio":{source:"apache",extensions:["sv4cpio"]},"application/x-sv4crc":{source:"apache",extensions:["sv4crc"]},"application/x-t3vm-image":{source:"apache",extensions:["t3"]},"application/x-tads":{source:"apache",extensions:["gam"]},"application/x-tar":{source:"apache",compressible:!0,extensions:["tar"]},"application/x-tcl":{source:"apache",extensions:["tcl","tk"]},"application/x-tex":{source:"apache",extensions:["tex"]},"application/x-tex-tfm":{source:"apache",extensions:["tfm"]},"application/x-texinfo":{source:"apache",extensions:["texinfo","texi"]},"application/x-tgif":{source:"apache",extensions:["obj"]},"application/x-ustar":{source:"apache",extensions:["ustar"]},"application/x-virtualbox-hdd":{compressible:!0,extensions:["hdd"]},"application/x-virtualbox-ova":{compressible:!0,extensions:["ova"]},"application/x-virtualbox-ovf":{compressible:!0,extensions:["ovf"]},"application/x-virtualbox-vbox":{compressible:!0,extensions:["vbox"]},"application/x-virtualbox-vbox-extpack":{compressible:!1,extensions:["vbox-extpack"]},"application/x-virtualbox-vdi":{compressible:!0,extensions:["vdi"]},"application/x-virtualbox-vhd":{compressible:!0,extensions:["vhd"]},"application/x-virtualbox-vmdk":{compressible:!0,extensions:["vmdk"]},"application/x-wais-source":{source:"apache",extensions:["src"]},"application/x-web-app-manifest+json":{compressible:!0,extensions:["webapp"]},"application/x-www-form-urlencoded":{source:"iana",compressible:!0},"application/x-x509-ca-cert":{source:"iana",extensions:["der","crt","pem"]},"application/x-x509-ca-ra-cert":{source:"iana"},"application/x-x509-next-ca-cert":{source:"iana"},"application/x-xfig":{source:"apache",extensions:["fig"]},"application/x-xliff+xml":{source:"apache",compressible:!0,extensions:["xlf"]},"application/x-xpinstall":{source:"apache",compressible:!1,extensions:["xpi"]},"application/x-xz":{source:"apache",extensions:["xz"]},"application/x-zmachine":{source:"apache",extensions:["z1","z2","z3","z4","z5","z6","z7","z8"]},"application/x400-bp":{source:"iana"},"application/xacml+xml":{source:"iana",compressible:!0},"application/xaml+xml":{source:"apache",compressible:!0,extensions:["xaml"]},"application/xcap-att+xml":{source:"iana",compressible:!0,extensions:["xav"]},"application/xcap-caps+xml":{source:"iana",compressible:!0,extensions:["xca"]},"application/xcap-diff+xml":{source:"iana",compressible:!0,extensions:["xdf"]},"application/xcap-el+xml":{source:"iana",compressible:!0,extensions:["xel"]},"application/xcap-error+xml":{source:"iana",compressible:!0},"application/xcap-ns+xml":{source:"iana",compressible:!0,extensions:["xns"]},"application/xcon-conference-info+xml":{source:"iana",compressible:!0},"application/xcon-conference-info-diff+xml":{source:"iana",compressible:!0},"application/xenc+xml":{source:"iana",compressible:!0,extensions:["xenc"]},"application/xhtml+xml":{source:"iana",compressible:!0,extensions:["xhtml","xht"]},"application/xhtml-voice+xml":{source:"apache",compressible:!0},"application/xliff+xml":{source:"iana",compressible:!0,extensions:["xlf"]},"application/xml":{source:"iana",compressible:!0,extensions:["xml","xsl","xsd","rng"]},"application/xml-dtd":{source:"iana",compressible:!0,extensions:["dtd"]},"application/xml-external-parsed-entity":{source:"iana"},"application/xml-patch+xml":{source:"iana",compressible:!0},"application/xmpp+xml":{source:"iana",compressible:!0},"application/xop+xml":{source:"iana",compressible:!0,extensions:["xop"]},"application/xproc+xml":{source:"apache",compressible:!0,extensions:["xpl"]},"application/xslt+xml":{source:"iana",compressible:!0,extensions:["xsl","xslt"]},"application/xspf+xml":{source:"apache",compressible:!0,extensions:["xspf"]},"application/xv+xml":{source:"iana",compressible:!0,extensions:["mxml","xhvml","xvml","xvm"]},"application/yang":{source:"iana",extensions:["yang"]},"application/yang-data+json":{source:"iana",compressible:!0},"application/yang-data+xml":{source:"iana",compressible:!0},"application/yang-patch+json":{source:"iana",compressible:!0},"application/yang-patch+xml":{source:"iana",compressible:!0},"application/yin+xml":{source:"iana",compressible:!0,extensions:["yin"]},"application/zip":{source:"iana",compressible:!1,extensions:["zip"]},"application/zlib":{source:"iana"},"application/zstd":{source:"iana"},"audio/1d-interleaved-parityfec":{source:"iana"},"audio/32kadpcm":{source:"iana"},"audio/3gpp":{source:"iana",compressible:!1,extensions:["3gpp"]},"audio/3gpp2":{source:"iana"},"audio/aac":{source:"iana"},"audio/ac3":{source:"iana"},"audio/adpcm":{source:"apache",extensions:["adp"]},"audio/amr":{source:"iana",extensions:["amr"]},"audio/amr-wb":{source:"iana"},"audio/amr-wb+":{source:"iana"},"audio/aptx":{source:"iana"},"audio/asc":{source:"iana"},"audio/atrac-advanced-lossless":{source:"iana"},"audio/atrac-x":{source:"iana"},"audio/atrac3":{source:"iana"},"audio/basic":{source:"iana",compressible:!1,extensions:["au","snd"]},"audio/bv16":{source:"iana"},"audio/bv32":{source:"iana"},"audio/clearmode":{source:"iana"},"audio/cn":{source:"iana"},"audio/dat12":{source:"iana"},"audio/dls":{source:"iana"},"audio/dsr-es201108":{source:"iana"},"audio/dsr-es202050":{source:"iana"},"audio/dsr-es202211":{source:"iana"},"audio/dsr-es202212":{source:"iana"},"audio/dv":{source:"iana"},"audio/dvi4":{source:"iana"},"audio/eac3":{source:"iana"},"audio/encaprtp":{source:"iana"},"audio/evrc":{source:"iana"},"audio/evrc-qcp":{source:"iana"},"audio/evrc0":{source:"iana"},"audio/evrc1":{source:"iana"},"audio/evrcb":{source:"iana"},"audio/evrcb0":{source:"iana"},"audio/evrcb1":{source:"iana"},"audio/evrcnw":{source:"iana"},"audio/evrcnw0":{source:"iana"},"audio/evrcnw1":{source:"iana"},"audio/evrcwb":{source:"iana"},"audio/evrcwb0":{source:"iana"},"audio/evrcwb1":{source:"iana"},"audio/evs":{source:"iana"},"audio/flexfec":{source:"iana"},"audio/fwdred":{source:"iana"},"audio/g711-0":{source:"iana"},"audio/g719":{source:"iana"},"audio/g722":{source:"iana"},"audio/g7221":{source:"iana"},"audio/g723":{source:"iana"},"audio/g726-16":{source:"iana"},"audio/g726-24":{source:"iana"},"audio/g726-32":{source:"iana"},"audio/g726-40":{source:"iana"},"audio/g728":{source:"iana"},"audio/g729":{source:"iana"},"audio/g7291":{source:"iana"},"audio/g729d":{source:"iana"},"audio/g729e":{source:"iana"},"audio/gsm":{source:"iana"},"audio/gsm-efr":{source:"iana"},"audio/gsm-hr-08":{source:"iana"},"audio/ilbc":{source:"iana"},"audio/ip-mr_v2.5":{source:"iana"},"audio/isac":{source:"apache"},"audio/l16":{source:"iana"},"audio/l20":{source:"iana"},"audio/l24":{source:"iana",compressible:!1},"audio/l8":{source:"iana"},"audio/lpc":{source:"iana"},"audio/melp":{source:"iana"},"audio/melp1200":{source:"iana"},"audio/melp2400":{source:"iana"},"audio/melp600":{source:"iana"},"audio/mhas":{source:"iana"},"audio/midi":{source:"apache",extensions:["mid","midi","kar","rmi"]},"audio/mobile-xmf":{source:"iana",extensions:["mxmf"]},"audio/mp3":{compressible:!1,extensions:["mp3"]},"audio/mp4":{source:"iana",compressible:!1,extensions:["m4a","mp4a"]},"audio/mp4a-latm":{source:"iana"},"audio/mpa":{source:"iana"},"audio/mpa-robust":{source:"iana"},"audio/mpeg":{source:"iana",compressible:!1,extensions:["mpga","mp2","mp2a","mp3","m2a","m3a"]},"audio/mpeg4-generic":{source:"iana"},"audio/musepack":{source:"apache"},"audio/ogg":{source:"iana",compressible:!1,extensions:["oga","ogg","spx","opus"]},"audio/opus":{source:"iana"},"audio/parityfec":{source:"iana"},"audio/pcma":{source:"iana"},"audio/pcma-wb":{source:"iana"},"audio/pcmu":{source:"iana"},"audio/pcmu-wb":{source:"iana"},"audio/prs.sid":{source:"iana"},"audio/qcelp":{source:"iana"},"audio/raptorfec":{source:"iana"},"audio/red":{source:"iana"},"audio/rtp-enc-aescm128":{source:"iana"},"audio/rtp-midi":{source:"iana"},"audio/rtploopback":{source:"iana"},"audio/rtx":{source:"iana"},"audio/s3m":{source:"apache",extensions:["s3m"]},"audio/scip":{source:"iana"},"audio/silk":{source:"apache",extensions:["sil"]},"audio/smv":{source:"iana"},"audio/smv-qcp":{source:"iana"},"audio/smv0":{source:"iana"},"audio/sofa":{source:"iana"},"audio/sp-midi":{source:"iana"},"audio/speex":{source:"iana"},"audio/t140c":{source:"iana"},"audio/t38":{source:"iana"},"audio/telephone-event":{source:"iana"},"audio/tetra_acelp":{source:"iana"},"audio/tetra_acelp_bb":{source:"iana"},"audio/tone":{source:"iana"},"audio/tsvcis":{source:"iana"},"audio/uemclip":{source:"iana"},"audio/ulpfec":{source:"iana"},"audio/usac":{source:"iana"},"audio/vdvi":{source:"iana"},"audio/vmr-wb":{source:"iana"},"audio/vnd.3gpp.iufp":{source:"iana"},"audio/vnd.4sb":{source:"iana"},"audio/vnd.audiokoz":{source:"iana"},"audio/vnd.celp":{source:"iana"},"audio/vnd.cisco.nse":{source:"iana"},"audio/vnd.cmles.radio-events":{source:"iana"},"audio/vnd.cns.anp1":{source:"iana"},"audio/vnd.cns.inf1":{source:"iana"},"audio/vnd.dece.audio":{source:"iana",extensions:["uva","uvva"]},"audio/vnd.digital-winds":{source:"iana",extensions:["eol"]},"audio/vnd.dlna.adts":{source:"iana"},"audio/vnd.dolby.heaac.1":{source:"iana"},"audio/vnd.dolby.heaac.2":{source:"iana"},"audio/vnd.dolby.mlp":{source:"iana"},"audio/vnd.dolby.mps":{source:"iana"},"audio/vnd.dolby.pl2":{source:"iana"},"audio/vnd.dolby.pl2x":{source:"iana"},"audio/vnd.dolby.pl2z":{source:"iana"},"audio/vnd.dolby.pulse.1":{source:"iana"},"audio/vnd.dra":{source:"iana",extensions:["dra"]},"audio/vnd.dts":{source:"iana",extensions:["dts"]},"audio/vnd.dts.hd":{source:"iana",extensions:["dtshd"]},"audio/vnd.dts.uhd":{source:"iana"},"audio/vnd.dvb.file":{source:"iana"},"audio/vnd.everad.plj":{source:"iana"},"audio/vnd.hns.audio":{source:"iana"},"audio/vnd.lucent.voice":{source:"iana",extensions:["lvp"]},"audio/vnd.ms-playready.media.pya":{source:"iana",extensions:["pya"]},"audio/vnd.nokia.mobile-xmf":{source:"iana"},"audio/vnd.nortel.vbk":{source:"iana"},"audio/vnd.nuera.ecelp4800":{source:"iana",extensions:["ecelp4800"]},"audio/vnd.nuera.ecelp7470":{source:"iana",extensions:["ecelp7470"]},"audio/vnd.nuera.ecelp9600":{source:"iana",extensions:["ecelp9600"]},"audio/vnd.octel.sbc":{source:"iana"},"audio/vnd.presonus.multitrack":{source:"iana"},"audio/vnd.qcelp":{source:"iana"},"audio/vnd.rhetorex.32kadpcm":{source:"iana"},"audio/vnd.rip":{source:"iana",extensions:["rip"]},"audio/vnd.rn-realaudio":{compressible:!1},"audio/vnd.sealedmedia.softseal.mpeg":{source:"iana"},"audio/vnd.vmx.cvsd":{source:"iana"},"audio/vnd.wave":{compressible:!1},"audio/vorbis":{source:"iana",compressible:!1},"audio/vorbis-config":{source:"iana"},"audio/wav":{compressible:!1,extensions:["wav"]},"audio/wave":{compressible:!1,extensions:["wav"]},"audio/webm":{source:"apache",compressible:!1,extensions:["weba"]},"audio/x-aac":{source:"apache",compressible:!1,extensions:["aac"]},"audio/x-aiff":{source:"apache",extensions:["aif","aiff","aifc"]},"audio/x-caf":{source:"apache",compressible:!1,extensions:["caf"]},"audio/x-flac":{source:"apache",extensions:["flac"]},"audio/x-m4a":{source:"nginx",extensions:["m4a"]},"audio/x-matroska":{source:"apache",extensions:["mka"]},"audio/x-mpegurl":{source:"apache",extensions:["m3u"]},"audio/x-ms-wax":{source:"apache",extensions:["wax"]},"audio/x-ms-wma":{source:"apache",extensions:["wma"]},"audio/x-pn-realaudio":{source:"apache",extensions:["ram","ra"]},"audio/x-pn-realaudio-plugin":{source:"apache",extensions:["rmp"]},"audio/x-realaudio":{source:"nginx",extensions:["ra"]},"audio/x-tta":{source:"apache"},"audio/x-wav":{source:"apache",extensions:["wav"]},"audio/xm":{source:"apache",extensions:["xm"]},"chemical/x-cdx":{source:"apache",extensions:["cdx"]},"chemical/x-cif":{source:"apache",extensions:["cif"]},"chemical/x-cmdf":{source:"apache",extensions:["cmdf"]},"chemical/x-cml":{source:"apache",extensions:["cml"]},"chemical/x-csml":{source:"apache",extensions:["csml"]},"chemical/x-pdb":{source:"apache"},"chemical/x-xyz":{source:"apache",extensions:["xyz"]},"font/collection":{source:"iana",extensions:["ttc"]},"font/otf":{source:"iana",compressible:!0,extensions:["otf"]},"font/sfnt":{source:"iana"},"font/ttf":{source:"iana",compressible:!0,extensions:["ttf"]},"font/woff":{source:"iana",extensions:["woff"]},"font/woff2":{source:"iana",extensions:["woff2"]},"image/aces":{source:"iana",extensions:["exr"]},"image/apng":{compressible:!1,extensions:["apng"]},"image/avci":{source:"iana",extensions:["avci"]},"image/avcs":{source:"iana",extensions:["avcs"]},"image/avif":{source:"iana",compressible:!1,extensions:["avif"]},"image/bmp":{source:"iana",compressible:!0,extensions:["bmp"]},"image/cgm":{source:"iana",extensions:["cgm"]},"image/dicom-rle":{source:"iana",extensions:["drle"]},"image/emf":{source:"iana",extensions:["emf"]},"image/fits":{source:"iana",extensions:["fits"]},"image/g3fax":{source:"iana",extensions:["g3"]},"image/gif":{source:"iana",compressible:!1,extensions:["gif"]},"image/heic":{source:"iana",extensions:["heic"]},"image/heic-sequence":{source:"iana",extensions:["heics"]},"image/heif":{source:"iana",extensions:["heif"]},"image/heif-sequence":{source:"iana",extensions:["heifs"]},"image/hej2k":{source:"iana",extensions:["hej2"]},"image/hsj2":{source:"iana",extensions:["hsj2"]},"image/ief":{source:"iana",extensions:["ief"]},"image/jls":{source:"iana",extensions:["jls"]},"image/jp2":{source:"iana",compressible:!1,extensions:["jp2","jpg2"]},"image/jpeg":{source:"iana",compressible:!1,extensions:["jpeg","jpg","jpe"]},"image/jph":{source:"iana",extensions:["jph"]},"image/jphc":{source:"iana",extensions:["jhc"]},"image/jpm":{source:"iana",compressible:!1,extensions:["jpm"]},"image/jpx":{source:"iana",compressible:!1,extensions:["jpx","jpf"]},"image/jxr":{source:"iana",extensions:["jxr"]},"image/jxra":{source:"iana",extensions:["jxra"]},"image/jxrs":{source:"iana",extensions:["jxrs"]},"image/jxs":{source:"iana",extensions:["jxs"]},"image/jxsc":{source:"iana",extensions:["jxsc"]},"image/jxsi":{source:"iana",extensions:["jxsi"]},"image/jxss":{source:"iana",extensions:["jxss"]},"image/ktx":{source:"iana",extensions:["ktx"]},"image/ktx2":{source:"iana",extensions:["ktx2"]},"image/naplps":{source:"iana"},"image/pjpeg":{compressible:!1},"image/png":{source:"iana",compressible:!1,extensions:["png"]},"image/prs.btif":{source:"iana",extensions:["btif"]},"image/prs.pti":{source:"iana",extensions:["pti"]},"image/pwg-raster":{source:"iana"},"image/sgi":{source:"apache",extensions:["sgi"]},"image/svg+xml":{source:"iana",compressible:!0,extensions:["svg","svgz"]},"image/t38":{source:"iana",extensions:["t38"]},"image/tiff":{source:"iana",compressible:!1,extensions:["tif","tiff"]},"image/tiff-fx":{source:"iana",extensions:["tfx"]},"image/vnd.adobe.photoshop":{source:"iana",compressible:!0,extensions:["psd"]},"image/vnd.airzip.accelerator.azv":{source:"iana",extensions:["azv"]},"image/vnd.cns.inf2":{source:"iana"},"image/vnd.dece.graphic":{source:"iana",extensions:["uvi","uvvi","uvg","uvvg"]},"image/vnd.djvu":{source:"iana",extensions:["djvu","djv"]},"image/vnd.dvb.subtitle":{source:"iana",extensions:["sub"]},"image/vnd.dwg":{source:"iana",extensions:["dwg"]},"image/vnd.dxf":{source:"iana",extensions:["dxf"]},"image/vnd.fastbidsheet":{source:"iana",extensions:["fbs"]},"image/vnd.fpx":{source:"iana",extensions:["fpx"]},"image/vnd.fst":{source:"iana",extensions:["fst"]},"image/vnd.fujixerox.edmics-mmr":{source:"iana",extensions:["mmr"]},"image/vnd.fujixerox.edmics-rlc":{source:"iana",extensions:["rlc"]},"image/vnd.globalgraphics.pgb":{source:"iana"},"image/vnd.microsoft.icon":{source:"iana",compressible:!0,extensions:["ico"]},"image/vnd.mix":{source:"iana"},"image/vnd.mozilla.apng":{source:"iana"},"image/vnd.ms-dds":{compressible:!0,extensions:["dds"]},"image/vnd.ms-modi":{source:"iana",extensions:["mdi"]},"image/vnd.ms-photo":{source:"apache",extensions:["wdp"]},"image/vnd.net-fpx":{source:"iana",extensions:["npx"]},"image/vnd.pco.b16":{source:"iana",extensions:["b16"]},"image/vnd.radiance":{source:"iana"},"image/vnd.sealed.png":{source:"iana"},"image/vnd.sealedmedia.softseal.gif":{source:"iana"},"image/vnd.sealedmedia.softseal.jpg":{source:"iana"},"image/vnd.svf":{source:"iana"},"image/vnd.tencent.tap":{source:"iana",extensions:["tap"]},"image/vnd.valve.source.texture":{source:"iana",extensions:["vtf"]},"image/vnd.wap.wbmp":{source:"iana",extensions:["wbmp"]},"image/vnd.xiff":{source:"iana",extensions:["xif"]},"image/vnd.zbrush.pcx":{source:"iana",extensions:["pcx"]},"image/webp":{source:"apache",extensions:["webp"]},"image/wmf":{source:"iana",extensions:["wmf"]},"image/x-3ds":{source:"apache",extensions:["3ds"]},"image/x-cmu-raster":{source:"apache",extensions:["ras"]},"image/x-cmx":{source:"apache",extensions:["cmx"]},"image/x-freehand":{source:"apache",extensions:["fh","fhc","fh4","fh5","fh7"]},"image/x-icon":{source:"apache",compressible:!0,extensions:["ico"]},"image/x-jng":{source:"nginx",extensions:["jng"]},"image/x-mrsid-image":{source:"apache",extensions:["sid"]},"image/x-ms-bmp":{source:"nginx",compressible:!0,extensions:["bmp"]},"image/x-pcx":{source:"apache",extensions:["pcx"]},"image/x-pict":{source:"apache",extensions:["pic","pct"]},"image/x-portable-anymap":{source:"apache",extensions:["pnm"]},"image/x-portable-bitmap":{source:"apache",extensions:["pbm"]},"image/x-portable-graymap":{source:"apache",extensions:["pgm"]},"image/x-portable-pixmap":{source:"apache",extensions:["ppm"]},"image/x-rgb":{source:"apache",extensions:["rgb"]},"image/x-tga":{source:"apache",extensions:["tga"]},"image/x-xbitmap":{source:"apache",extensions:["xbm"]},"image/x-xcf":{compressible:!1},"image/x-xpixmap":{source:"apache",extensions:["xpm"]},"image/x-xwindowdump":{source:"apache",extensions:["xwd"]},"message/cpim":{source:"iana"},"message/delivery-status":{source:"iana"},"message/disposition-notification":{source:"iana",extensions:["disposition-notification"]},"message/external-body":{source:"iana"},"message/feedback-report":{source:"iana"},"message/global":{source:"iana",extensions:["u8msg"]},"message/global-delivery-status":{source:"iana",extensions:["u8dsn"]},"message/global-disposition-notification":{source:"iana",extensions:["u8mdn"]},"message/global-headers":{source:"iana",extensions:["u8hdr"]},"message/http":{source:"iana",compressible:!1},"message/imdn+xml":{source:"iana",compressible:!0},"message/news":{source:"iana"},"message/partial":{source:"iana",compressible:!1},"message/rfc822":{source:"iana",compressible:!0,extensions:["eml","mime"]},"message/s-http":{source:"iana"},"message/sip":{source:"iana"},"message/sipfrag":{source:"iana"},"message/tracking-status":{source:"iana"},"message/vnd.si.simp":{source:"iana"},"message/vnd.wfa.wsc":{source:"iana",extensions:["wsc"]},"model/3mf":{source:"iana",extensions:["3mf"]},"model/e57":{source:"iana"},"model/gltf+json":{source:"iana",compressible:!0,extensions:["gltf"]},"model/gltf-binary":{source:"iana",compressible:!0,extensions:["glb"]},"model/iges":{source:"iana",compressible:!1,extensions:["igs","iges"]},"model/mesh":{source:"iana",compressible:!1,extensions:["msh","mesh","silo"]},"model/mtl":{source:"iana",extensions:["mtl"]},"model/obj":{source:"iana",extensions:["obj"]},"model/step":{source:"iana"},"model/step+xml":{source:"iana",compressible:!0,extensions:["stpx"]},"model/step+zip":{source:"iana",compressible:!1,extensions:["stpz"]},"model/step-xml+zip":{source:"iana",compressible:!1,extensions:["stpxz"]},"model/stl":{source:"iana",extensions:["stl"]},"model/vnd.collada+xml":{source:"iana",compressible:!0,extensions:["dae"]},"model/vnd.dwf":{source:"iana",extensions:["dwf"]},"model/vnd.flatland.3dml":{source:"iana"},"model/vnd.gdl":{source:"iana",extensions:["gdl"]},"model/vnd.gs-gdl":{source:"apache"},"model/vnd.gs.gdl":{source:"iana"},"model/vnd.gtw":{source:"iana",extensions:["gtw"]},"model/vnd.moml+xml":{source:"iana",compressible:!0},"model/vnd.mts":{source:"iana",extensions:["mts"]},"model/vnd.opengex":{source:"iana",extensions:["ogex"]},"model/vnd.parasolid.transmit.binary":{source:"iana",extensions:["x_b"]},"model/vnd.parasolid.transmit.text":{source:"iana",extensions:["x_t"]},"model/vnd.pytha.pyox":{source:"iana"},"model/vnd.rosette.annotated-data-model":{source:"iana"},"model/vnd.sap.vds":{source:"iana",extensions:["vds"]},"model/vnd.usdz+zip":{source:"iana",compressible:!1,extensions:["usdz"]},"model/vnd.valve.source.compiled-map":{source:"iana",extensions:["bsp"]},"model/vnd.vtu":{source:"iana",extensions:["vtu"]},"model/vrml":{source:"iana",compressible:!1,extensions:["wrl","vrml"]},"model/x3d+binary":{source:"apache",compressible:!1,extensions:["x3db","x3dbz"]},"model/x3d+fastinfoset":{source:"iana",extensions:["x3db"]},"model/x3d+vrml":{source:"apache",compressible:!1,extensions:["x3dv","x3dvz"]},"model/x3d+xml":{source:"iana",compressible:!0,extensions:["x3d","x3dz"]},"model/x3d-vrml":{source:"iana",extensions:["x3dv"]},"multipart/alternative":{source:"iana",compressible:!1},"multipart/appledouble":{source:"iana"},"multipart/byteranges":{source:"iana"},"multipart/digest":{source:"iana"},"multipart/encrypted":{source:"iana",compressible:!1},"multipart/form-data":{source:"iana",compressible:!1},"multipart/header-set":{source:"iana"},"multipart/mixed":{source:"iana"},"multipart/multilingual":{source:"iana"},"multipart/parallel":{source:"iana"},"multipart/related":{source:"iana",compressible:!1},"multipart/report":{source:"iana"},"multipart/signed":{source:"iana",compressible:!1},"multipart/vnd.bint.med-plus":{source:"iana"},"multipart/voice-message":{source:"iana"},"multipart/x-mixed-replace":{source:"iana"},"text/1d-interleaved-parityfec":{source:"iana"},"text/cache-manifest":{source:"iana",compressible:!0,extensions:["appcache","manifest"]},"text/calendar":{source:"iana",extensions:["ics","ifb"]},"text/calender":{compressible:!0},"text/cmd":{compressible:!0},"text/coffeescript":{extensions:["coffee","litcoffee"]},"text/cql":{source:"iana"},"text/cql-expression":{source:"iana"},"text/cql-identifier":{source:"iana"},"text/css":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["css"]},"text/csv":{source:"iana",compressible:!0,extensions:["csv"]},"text/csv-schema":{source:"iana"},"text/directory":{source:"iana"},"text/dns":{source:"iana"},"text/ecmascript":{source:"iana"},"text/encaprtp":{source:"iana"},"text/enriched":{source:"iana"},"text/fhirpath":{source:"iana"},"text/flexfec":{source:"iana"},"text/fwdred":{source:"iana"},"text/gff3":{source:"iana"},"text/grammar-ref-list":{source:"iana"},"text/html":{source:"iana",compressible:!0,extensions:["html","htm","shtml"]},"text/jade":{extensions:["jade"]},"text/javascript":{source:"iana",compressible:!0},"text/jcr-cnd":{source:"iana"},"text/jsx":{compressible:!0,extensions:["jsx"]},"text/less":{compressible:!0,extensions:["less"]},"text/markdown":{source:"iana",compressible:!0,extensions:["markdown","md"]},"text/mathml":{source:"nginx",extensions:["mml"]},"text/mdx":{compressible:!0,extensions:["mdx"]},"text/mizar":{source:"iana"},"text/n3":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["n3"]},"text/parameters":{source:"iana",charset:"UTF-8"},"text/parityfec":{source:"iana"},"text/plain":{source:"iana",compressible:!0,extensions:["txt","text","conf","def","list","log","in","ini"]},"text/provenance-notation":{source:"iana",charset:"UTF-8"},"text/prs.fallenstein.rst":{source:"iana"},"text/prs.lines.tag":{source:"iana",extensions:["dsc"]},"text/prs.prop.logic":{source:"iana"},"text/raptorfec":{source:"iana"},"text/red":{source:"iana"},"text/rfc822-headers":{source:"iana"},"text/richtext":{source:"iana",compressible:!0,extensions:["rtx"]},"text/rtf":{source:"iana",compressible:!0,extensions:["rtf"]},"text/rtp-enc-aescm128":{source:"iana"},"text/rtploopback":{source:"iana"},"text/rtx":{source:"iana"},"text/sgml":{source:"iana",extensions:["sgml","sgm"]},"text/shaclc":{source:"iana"},"text/shex":{source:"iana",extensions:["shex"]},"text/slim":{extensions:["slim","slm"]},"text/spdx":{source:"iana",extensions:["spdx"]},"text/strings":{source:"iana"},"text/stylus":{extensions:["stylus","styl"]},"text/t140":{source:"iana"},"text/tab-separated-values":{source:"iana",compressible:!0,extensions:["tsv"]},"text/troff":{source:"iana",extensions:["t","tr","roff","man","me","ms"]},"text/turtle":{source:"iana",charset:"UTF-8",extensions:["ttl"]},"text/ulpfec":{source:"iana"},"text/uri-list":{source:"iana",compressible:!0,extensions:["uri","uris","urls"]},"text/vcard":{source:"iana",compressible:!0,extensions:["vcard"]},"text/vnd.a":{source:"iana"},"text/vnd.abc":{source:"iana"},"text/vnd.ascii-art":{source:"iana"},"text/vnd.curl":{source:"iana",extensions:["curl"]},"text/vnd.curl.dcurl":{source:"apache",extensions:["dcurl"]},"text/vnd.curl.mcurl":{source:"apache",extensions:["mcurl"]},"text/vnd.curl.scurl":{source:"apache",extensions:["scurl"]},"text/vnd.debian.copyright":{source:"iana",charset:"UTF-8"},"text/vnd.dmclientscript":{source:"iana"},"text/vnd.dvb.subtitle":{source:"iana",extensions:["sub"]},"text/vnd.esmertec.theme-descriptor":{source:"iana",charset:"UTF-8"},"text/vnd.familysearch.gedcom":{source:"iana",extensions:["ged"]},"text/vnd.ficlab.flt":{source:"iana"},"text/vnd.fly":{source:"iana",extensions:["fly"]},"text/vnd.fmi.flexstor":{source:"iana",extensions:["flx"]},"text/vnd.gml":{source:"iana"},"text/vnd.graphviz":{source:"iana",extensions:["gv"]},"text/vnd.hans":{source:"iana"},"text/vnd.hgl":{source:"iana"},"text/vnd.in3d.3dml":{source:"iana",extensions:["3dml"]},"text/vnd.in3d.spot":{source:"iana",extensions:["spot"]},"text/vnd.iptc.newsml":{source:"iana"},"text/vnd.iptc.nitf":{source:"iana"},"text/vnd.latex-z":{source:"iana"},"text/vnd.motorola.reflex":{source:"iana"},"text/vnd.ms-mediapackage":{source:"iana"},"text/vnd.net2phone.commcenter.command":{source:"iana"},"text/vnd.radisys.msml-basic-layout":{source:"iana"},"text/vnd.senx.warpscript":{source:"iana"},"text/vnd.si.uricatalogue":{source:"iana"},"text/vnd.sosi":{source:"iana"},"text/vnd.sun.j2me.app-descriptor":{source:"iana",charset:"UTF-8",extensions:["jad"]},"text/vnd.trolltech.linguist":{source:"iana",charset:"UTF-8"},"text/vnd.wap.si":{source:"iana"},"text/vnd.wap.sl":{source:"iana"},"text/vnd.wap.wml":{source:"iana",extensions:["wml"]},"text/vnd.wap.wmlscript":{source:"iana",extensions:["wmls"]},"text/vtt":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["vtt"]},"text/x-asm":{source:"apache",extensions:["s","asm"]},"text/x-c":{source:"apache",extensions:["c","cc","cxx","cpp","h","hh","dic"]},"text/x-component":{source:"nginx",extensions:["htc"]},"text/x-fortran":{source:"apache",extensions:["f","for","f77","f90"]},"text/x-gwt-rpc":{compressible:!0},"text/x-handlebars-template":{extensions:["hbs"]},"text/x-java-source":{source:"apache",extensions:["java"]},"text/x-jquery-tmpl":{compressible:!0},"text/x-lua":{extensions:["lua"]},"text/x-markdown":{compressible:!0,extensions:["mkd"]},"text/x-nfo":{source:"apache",extensions:["nfo"]},"text/x-opml":{source:"apache",extensions:["opml"]},"text/x-org":{compressible:!0,extensions:["org"]},"text/x-pascal":{source:"apache",extensions:["p","pas"]},"text/x-processing":{compressible:!0,extensions:["pde"]},"text/x-sass":{extensions:["sass"]},"text/x-scss":{extensions:["scss"]},"text/x-setext":{source:"apache",extensions:["etx"]},"text/x-sfv":{source:"apache",extensions:["sfv"]},"text/x-suse-ymp":{compressible:!0,extensions:["ymp"]},"text/x-uuencode":{source:"apache",extensions:["uu"]},"text/x-vcalendar":{source:"apache",extensions:["vcs"]},"text/x-vcard":{source:"apache",extensions:["vcf"]},"text/xml":{source:"iana",compressible:!0,extensions:["xml"]},"text/xml-external-parsed-entity":{source:"iana"},"text/yaml":{compressible:!0,extensions:["yaml","yml"]},"video/1d-interleaved-parityfec":{source:"iana"},"video/3gpp":{source:"iana",extensions:["3gp","3gpp"]},"video/3gpp-tt":{source:"iana"},"video/3gpp2":{source:"iana",extensions:["3g2"]},"video/av1":{source:"iana"},"video/bmpeg":{source:"iana"},"video/bt656":{source:"iana"},"video/celb":{source:"iana"},"video/dv":{source:"iana"},"video/encaprtp":{source:"iana"},"video/ffv1":{source:"iana"},"video/flexfec":{source:"iana"},"video/h261":{source:"iana",extensions:["h261"]},"video/h263":{source:"iana",extensions:["h263"]},"video/h263-1998":{source:"iana"},"video/h263-2000":{source:"iana"},"video/h264":{source:"iana",extensions:["h264"]},"video/h264-rcdo":{source:"iana"},"video/h264-svc":{source:"iana"},"video/h265":{source:"iana"},"video/iso.segment":{source:"iana",extensions:["m4s"]},"video/jpeg":{source:"iana",extensions:["jpgv"]},"video/jpeg2000":{source:"iana"},"video/jpm":{source:"apache",extensions:["jpm","jpgm"]},"video/jxsv":{source:"iana"},"video/mj2":{source:"iana",extensions:["mj2","mjp2"]},"video/mp1s":{source:"iana"},"video/mp2p":{source:"iana"},"video/mp2t":{source:"iana",extensions:["ts"]},"video/mp4":{source:"iana",compressible:!1,extensions:["mp4","mp4v","mpg4"]},"video/mp4v-es":{source:"iana"},"video/mpeg":{source:"iana",compressible:!1,extensions:["mpeg","mpg","mpe","m1v","m2v"]},"video/mpeg4-generic":{source:"iana"},"video/mpv":{source:"iana"},"video/nv":{source:"iana"},"video/ogg":{source:"iana",compressible:!1,extensions:["ogv"]},"video/parityfec":{source:"iana"},"video/pointer":{source:"iana"},"video/quicktime":{source:"iana",compressible:!1,extensions:["qt","mov"]},"video/raptorfec":{source:"iana"},"video/raw":{source:"iana"},"video/rtp-enc-aescm128":{source:"iana"},"video/rtploopback":{source:"iana"},"video/rtx":{source:"iana"},"video/scip":{source:"iana"},"video/smpte291":{source:"iana"},"video/smpte292m":{source:"iana"},"video/ulpfec":{source:"iana"},"video/vc1":{source:"iana"},"video/vc2":{source:"iana"},"video/vnd.cctv":{source:"iana"},"video/vnd.dece.hd":{source:"iana",extensions:["uvh","uvvh"]},"video/vnd.dece.mobile":{source:"iana",extensions:["uvm","uvvm"]},"video/vnd.dece.mp4":{source:"iana"},"video/vnd.dece.pd":{source:"iana",extensions:["uvp","uvvp"]},"video/vnd.dece.sd":{source:"iana",extensions:["uvs","uvvs"]},"video/vnd.dece.video":{source:"iana",extensions:["uvv","uvvv"]},"video/vnd.directv.mpeg":{source:"iana"},"video/vnd.directv.mpeg-tts":{source:"iana"},"video/vnd.dlna.mpeg-tts":{source:"iana"},"video/vnd.dvb.file":{source:"iana",extensions:["dvb"]},"video/vnd.fvt":{source:"iana",extensions:["fvt"]},"video/vnd.hns.video":{source:"iana"},"video/vnd.iptvforum.1dparityfec-1010":{source:"iana"},"video/vnd.iptvforum.1dparityfec-2005":{source:"iana"},"video/vnd.iptvforum.2dparityfec-1010":{source:"iana"},"video/vnd.iptvforum.2dparityfec-2005":{source:"iana"},"video/vnd.iptvforum.ttsavc":{source:"iana"},"video/vnd.iptvforum.ttsmpeg2":{source:"iana"},"video/vnd.motorola.video":{source:"iana"},"video/vnd.motorola.videop":{source:"iana"},"video/vnd.mpegurl":{source:"iana",extensions:["mxu","m4u"]},"video/vnd.ms-playready.media.pyv":{source:"iana",extensions:["pyv"]},"video/vnd.nokia.interleaved-multimedia":{source:"iana"},"video/vnd.nokia.mp4vr":{source:"iana"},"video/vnd.nokia.videovoip":{source:"iana"},"video/vnd.objectvideo":{source:"iana"},"video/vnd.radgamettools.bink":{source:"iana"},"video/vnd.radgamettools.smacker":{source:"iana"},"video/vnd.sealed.mpeg1":{source:"iana"},"video/vnd.sealed.mpeg4":{source:"iana"},"video/vnd.sealed.swf":{source:"iana"},"video/vnd.sealedmedia.softseal.mov":{source:"iana"},"video/vnd.uvvu.mp4":{source:"iana",extensions:["uvu","uvvu"]},"video/vnd.vivo":{source:"iana",extensions:["viv"]},"video/vnd.youtube.yt":{source:"iana"},"video/vp8":{source:"iana"},"video/vp9":{source:"iana"},"video/webm":{source:"apache",compressible:!1,extensions:["webm"]},"video/x-f4v":{source:"apache",extensions:["f4v"]},"video/x-fli":{source:"apache",extensions:["fli"]},"video/x-flv":{source:"apache",compressible:!1,extensions:["flv"]},"video/x-m4v":{source:"apache",extensions:["m4v"]},"video/x-matroska":{source:"apache",compressible:!1,extensions:["mkv","mk3d","mks"]},"video/x-mng":{source:"apache",extensions:["mng"]},"video/x-ms-asf":{source:"apache",extensions:["asf","asx"]},"video/x-ms-vob":{source:"apache",extensions:["vob"]},"video/x-ms-wm":{source:"apache",extensions:["wm"]},"video/x-ms-wmv":{source:"apache",compressible:!1,extensions:["wmv"]},"video/x-ms-wmx":{source:"apache",extensions:["wmx"]},"video/x-ms-wvx":{source:"apache",extensions:["wvx"]},"video/x-msvideo":{source:"apache",extensions:["avi"]},"video/x-sgi-movie":{source:"apache",extensions:["movie"]},"video/x-smv":{source:"apache",extensions:["smv"]},"x-conference/x-cooltalk":{source:"apache",extensions:["ice"]},"x-shader/x-fragment":{compressible:!0},"x-shader/x-vertex":{compressible:!0}}});var R0=T((SV,T0)=>{T0.exports=E0()});var I0=T(dr=>{"use strict";var vl=R0(),UD=require("path").extname,P0=/^\s*([^;\s]*)(?:;|\s|$)/,ZD=/^text\//i;dr.charset=A0;dr.charsets={lookup:A0};dr.contentType=BD;dr.extension=HD;dr.extensions=Object.create(null);dr.lookup=VD;dr.types=Object.create(null);GD(dr.extensions,dr.types);function A0(t){if(!t||typeof t!="string")return!1;var e=P0.exec(t),r=e&&vl[e[1].toLowerCase()];return r&&r.charset?r.charset:e&&ZD.test(e[1])?"UTF-8":!1}function BD(t){if(!t||typeof t!="string")return!1;var e=t.indexOf("/")===-1?dr.lookup(t):t;if(!e)return!1;if(e.indexOf("charset")===-1){var r=dr.charset(e);r&&(e+="; charset="+r.toLowerCase())}return e}function HD(t){if(!t||typeof t!="string")return!1;var e=P0.exec(t),r=e&&dr.extensions[e[1].toLowerCase()];return!r||!r.length?!1:r[0]}function VD(t){if(!t||typeof t!="string")return!1;var e=UD("x."+t).toLowerCase().substr(1);return e&&dr.types[e]||!1}function GD(t,e){var r=["nginx","apache",void 0,"iana"];Object.keys(vl).forEach(function(o){var i=vl[o],s=i.extensions;if(!(!s||!s.length)){t[o]=s;for(var a=0;a<s.length;a++){var c=s[a];if(e[c]){var l=r.indexOf(vl[e[c]].source),p=r.indexOf(i.source);if(e[c]!=="application/octet-stream"&&(l>p||l===p&&e[c].substr(0,12)==="application/"))continue}e[c]=o}}})}});var C0=T(($V,z0)=>{z0.exports=WD;function WD(t){var e=typeof setImmediate=="function"?setImmediate:typeof process=="object"&&typeof process.nextTick=="function"?process.nextTick:null;e?e(t):setTimeout(t,0)}});var Ym=T((EV,N0)=>{var O0=C0();N0.exports=KD;function KD(t){var e=!1;return O0(function(){e=!0}),function(n,o){e?t(n,o):O0(function(){t(n,o)})}}});var Xm=T((TV,j0)=>{j0.exports=JD;function JD(t){Object.keys(t.jobs).forEach(YD.bind(t)),t.jobs={}}function YD(t){typeof this.jobs[t]=="function"&&this.jobs[t]()}});var Qm=T((RV,D0)=>{var L0=Ym(),XD=Xm();D0.exports=QD;function QD(t,e,r,n){var o=r.keyedList?r.keyedList[r.index]:r.index;r.jobs[o]=eM(e,o,t[o],function(i,s){o in r.jobs&&(delete r.jobs[o],i?XD(r):r.results[o]=s,n(i,r.results))})}function eM(t,e,r,n){var o;return t.length==2?o=t(r,L0(n)):o=t(r,e,L0(n)),o}});var eh=T((PV,M0)=>{M0.exports=tM;function tM(t,e){var r=!Array.isArray(t),n={index:0,keyedList:r||e?Object.keys(t):null,jobs:{},results:r?{}:[],size:r?Object.keys(t).length:t.length};return e&&n.keyedList.sort(r?e:function(o,i){return e(t[o],t[i])}),n}});var th=T((AV,q0)=>{var rM=Xm(),nM=Ym();q0.exports=oM;function oM(t){Object.keys(this.jobs).length&&(this.index=this.size,rM(this),nM(t)(null,this.results))}});var U0=T((IV,F0)=>{var iM=Qm(),sM=eh(),aM=th();F0.exports=cM;function cM(t,e,r){for(var n=sM(t);n.index<(n.keyedList||t).length;)iM(t,e,n,function(o,i){if(o){r(o,i);return}if(Object.keys(n.jobs).length===0){r(null,n.results);return}}),n.index++;return aM.bind(n,r)}});var rh=T((zV,bl)=>{var Z0=Qm(),lM=eh(),uM=th();bl.exports=pM;bl.exports.ascending=B0;bl.exports.descending=dM;function pM(t,e,r,n){var o=lM(t,r);return Z0(t,e,o,function i(s,a){if(s){n(s,a);return}if(o.index++,o.index<(o.keyedList||t).length){Z0(t,e,o,i);return}n(null,o.results)}),uM.bind(o,n)}function B0(t,e){return t<e?-1:t>e?1:0}function dM(t,e){return-1*B0(t,e)}});var V0=T((CV,H0)=>{var fM=rh();H0.exports=mM;function mM(t,e,r){return fM(t,e,null,r)}});var W0=T((OV,G0)=>{G0.exports={parallel:U0(),serial:V0(),serialOrdered:rh()}});var nh=T((NV,K0)=>{"use strict";K0.exports=Object});var Y0=T((jV,J0)=>{"use strict";J0.exports=Error});var Q0=T((LV,X0)=>{"use strict";X0.exports=EvalError});var tS=T((DV,eS)=>{"use strict";eS.exports=RangeError});var nS=T((MV,rS)=>{"use strict";rS.exports=ReferenceError});var iS=T((qV,oS)=>{"use strict";oS.exports=SyntaxError});var _l=T((FV,sS)=>{"use strict";sS.exports=TypeError});var cS=T((UV,aS)=>{"use strict";aS.exports=URIError});var uS=T((ZV,lS)=>{"use strict";lS.exports=Math.abs});var dS=T((BV,pS)=>{"use strict";pS.exports=Math.floor});var mS=T((HV,fS)=>{"use strict";fS.exports=Math.max});var gS=T((VV,hS)=>{"use strict";hS.exports=Math.min});var xS=T((GV,yS)=>{"use strict";yS.exports=Math.pow});var bS=T((WV,vS)=>{"use strict";vS.exports=Math.round});var wS=T((KV,_S)=>{"use strict";_S.exports=Number.isNaN||function(e){return e!==e}});var kS=T((JV,SS)=>{"use strict";var hM=wS();SS.exports=function(e){return hM(e)||e===0?e:e<0?-1:1}});var ES=T((YV,$S)=>{"use strict";$S.exports=Object.getOwnPropertyDescriptor});var oh=T((XV,TS)=>{"use strict";var wl=ES();if(wl)try{wl([],"length")}catch{wl=null}TS.exports=wl});var PS=T((QV,RS)=>{"use strict";var Sl=Object.defineProperty||!1;if(Sl)try{Sl({},"a",{value:1})}catch{Sl=!1}RS.exports=Sl});var ih=T((e5,AS)=>{"use strict";AS.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},r=Symbol("test"),n=Object(r);if(typeof r=="string"||Object.prototype.toString.call(r)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var o=42;e[r]=o;for(var i in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var s=Object.getOwnPropertySymbols(e);if(s.length!==1||s[0]!==r||!Object.prototype.propertyIsEnumerable.call(e,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var a=Object.getOwnPropertyDescriptor(e,r);if(a.value!==o||a.enumerable!==!0)return!1}return!0}});var CS=T((t5,zS)=>{"use strict";var IS=typeof Symbol<"u"&&Symbol,gM=ih();zS.exports=function(){return typeof IS!="function"||typeof Symbol!="function"||typeof IS("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:gM()}});var sh=T((r5,OS)=>{"use strict";OS.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null});var ah=T((n5,NS)=>{"use strict";var yM=nh();NS.exports=yM.getPrototypeOf||null});var DS=T((o5,LS)=>{"use strict";var xM="Function.prototype.bind called on incompatible ",vM=Object.prototype.toString,bM=Math.max,_M="[object Function]",jS=function(e,r){for(var n=[],o=0;o<e.length;o+=1)n[o]=e[o];for(var i=0;i<r.length;i+=1)n[i+e.length]=r[i];return n},wM=function(e,r){for(var n=[],o=r||0,i=0;o<e.length;o+=1,i+=1)n[i]=e[o];return n},SM=function(t,e){for(var r="",n=0;n<t.length;n+=1)r+=t[n],n+1<t.length&&(r+=e);return r};LS.exports=function(e){var r=this;if(typeof r!="function"||vM.apply(r)!==_M)throw new TypeError(xM+r);for(var n=wM(arguments,1),o,i=function(){if(this instanceof o){var p=r.apply(this,jS(n,arguments));return Object(p)===p?p:this}return r.apply(e,jS(n,arguments))},s=bM(0,r.length-n.length),a=[],c=0;c<s;c++)a[c]="$"+c;if(o=Function("binder","return function ("+SM(a,",")+"){ return binder.apply(this,arguments); }")(i),r.prototype){var l=function(){};l.prototype=r.prototype,o.prototype=new l,l.prototype=null}return o}});var oa=T((i5,MS)=>{"use strict";var kM=DS();MS.exports=Function.prototype.bind||kM});var kl=T((s5,qS)=>{"use strict";qS.exports=Function.prototype.call});var ch=T((a5,FS)=>{"use strict";FS.exports=Function.prototype.apply});var ZS=T((c5,US)=>{"use strict";US.exports=typeof Reflect<"u"&&Reflect&&Reflect.apply});var HS=T((l5,BS)=>{"use strict";var $M=oa(),EM=ch(),TM=kl(),RM=ZS();BS.exports=RM||$M.call(TM,EM)});var GS=T((u5,VS)=>{"use strict";var PM=oa(),AM=_l(),IM=kl(),zM=HS();VS.exports=function(e){if(e.length<1||typeof e[0]!="function")throw new AM("a function is required");return zM(PM,IM,e)}});var QS=T((p5,XS)=>{"use strict";var CM=GS(),WS=oh(),JS;try{JS=[].__proto__===Array.prototype}catch(t){if(!t||typeof t!="object"||!("code"in t)||t.code!=="ERR_PROTO_ACCESS")throw t}var lh=!!JS&&WS&&WS(Object.prototype,"__proto__"),YS=Object,KS=YS.getPrototypeOf;XS.exports=lh&&typeof lh.get=="function"?CM([lh.get]):typeof KS=="function"?function(e){return KS(e==null?e:YS(e))}:!1});var ok=T((d5,nk)=>{"use strict";var ek=sh(),tk=ah(),rk=QS();nk.exports=ek?function(e){return ek(e)}:tk?function(e){if(!e||typeof e!="object"&&typeof e!="function")throw new TypeError("getProto: not an object");return tk(e)}:rk?function(e){return rk(e)}:null});var $l=T((f5,ik)=>{"use strict";var OM=Function.prototype.call,NM=Object.prototype.hasOwnProperty,jM=oa();ik.exports=jM.call(OM,NM)});var dk=T((m5,pk)=>{"use strict";var Re,LM=nh(),DM=Y0(),MM=Q0(),qM=tS(),FM=nS(),Oi=iS(),Ci=_l(),UM=cS(),ZM=uS(),BM=dS(),HM=mS(),VM=gS(),GM=xS(),WM=bS(),KM=kS(),lk=Function,uh=function(t){try{return lk('"use strict"; return ('+t+").constructor;")()}catch{}},ia=oh(),JM=PS(),ph=function(){throw new Ci},YM=ia?(function(){try{return arguments.callee,ph}catch{try{return ia(arguments,"callee").get}catch{return ph}}})():ph,Ii=CS()(),At=ok(),XM=ah(),QM=sh(),uk=ch(),sa=kl(),zi={},e2=typeof Uint8Array>"u"||!At?Re:At(Uint8Array),Co={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?Re:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?Re:ArrayBuffer,"%ArrayIteratorPrototype%":Ii&&At?At([][Symbol.iterator]()):Re,"%AsyncFromSyncIteratorPrototype%":Re,"%AsyncFunction%":zi,"%AsyncGenerator%":zi,"%AsyncGeneratorFunction%":zi,"%AsyncIteratorPrototype%":zi,"%Atomics%":typeof Atomics>"u"?Re:Atomics,"%BigInt%":typeof BigInt>"u"?Re:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?Re:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?Re:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?Re:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":DM,"%eval%":eval,"%EvalError%":MM,"%Float16Array%":typeof Float16Array>"u"?Re:Float16Array,"%Float32Array%":typeof Float32Array>"u"?Re:Float32Array,"%Float64Array%":typeof Float64Array>"u"?Re:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?Re:FinalizationRegistry,"%Function%":lk,"%GeneratorFunction%":zi,"%Int8Array%":typeof Int8Array>"u"?Re:Int8Array,"%Int16Array%":typeof Int16Array>"u"?Re:Int16Array,"%Int32Array%":typeof Int32Array>"u"?Re:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Ii&&At?At(At([][Symbol.iterator]())):Re,"%JSON%":typeof JSON=="object"?JSON:Re,"%Map%":typeof Map>"u"?Re:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Ii||!At?Re:At(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":LM,"%Object.getOwnPropertyDescriptor%":ia,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?Re:Promise,"%Proxy%":typeof Proxy>"u"?Re:Proxy,"%RangeError%":qM,"%ReferenceError%":FM,"%Reflect%":typeof Reflect>"u"?Re:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?Re:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Ii||!At?Re:At(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?Re:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Ii&&At?At(""[Symbol.iterator]()):Re,"%Symbol%":Ii?Symbol:Re,"%SyntaxError%":Oi,"%ThrowTypeError%":YM,"%TypedArray%":e2,"%TypeError%":Ci,"%Uint8Array%":typeof Uint8Array>"u"?Re:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?Re:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?Re:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?Re:Uint32Array,"%URIError%":UM,"%WeakMap%":typeof WeakMap>"u"?Re:WeakMap,"%WeakRef%":typeof WeakRef>"u"?Re:WeakRef,"%WeakSet%":typeof WeakSet>"u"?Re:WeakSet,"%Function.prototype.call%":sa,"%Function.prototype.apply%":uk,"%Object.defineProperty%":JM,"%Object.getPrototypeOf%":XM,"%Math.abs%":ZM,"%Math.floor%":BM,"%Math.max%":HM,"%Math.min%":VM,"%Math.pow%":GM,"%Math.round%":WM,"%Math.sign%":KM,"%Reflect.getPrototypeOf%":QM};if(At)try{null.error}catch(t){sk=At(At(t)),Co["%Error.prototype%"]=sk}var sk,t2=function t(e){var r;if(e==="%AsyncFunction%")r=uh("async function () {}");else if(e==="%GeneratorFunction%")r=uh("function* () {}");else if(e==="%AsyncGeneratorFunction%")r=uh("async function* () {}");else if(e==="%AsyncGenerator%"){var n=t("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if(e==="%AsyncIteratorPrototype%"){var o=t("%AsyncGenerator%");o&&At&&(r=At(o.prototype))}return Co[e]=r,r},ak={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},aa=oa(),El=$l(),r2=aa.call(sa,Array.prototype.concat),n2=aa.call(uk,Array.prototype.splice),ck=aa.call(sa,String.prototype.replace),Tl=aa.call(sa,String.prototype.slice),o2=aa.call(sa,RegExp.prototype.exec),i2=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,s2=/\\(\\)?/g,a2=function(e){var r=Tl(e,0,1),n=Tl(e,-1);if(r==="%"&&n!=="%")throw new Oi("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new Oi("invalid intrinsic syntax, expected opening `%`");var o=[];return ck(e,i2,function(i,s,a,c){o[o.length]=a?ck(c,s2,"$1"):s||i}),o},c2=function(e,r){var n=e,o;if(El(ak,n)&&(o=ak[n],n="%"+o[0]+"%"),El(Co,n)){var i=Co[n];if(i===zi&&(i=t2(n)),typeof i>"u"&&!r)throw new Ci("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:o,name:n,value:i}}throw new Oi("intrinsic "+e+" does not exist!")};pk.exports=function(e,r){if(typeof e!="string"||e.length===0)throw new Ci("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new Ci('"allowMissing" argument must be a boolean');if(o2(/^%?[^%]*%?$/,e)===null)throw new Oi("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=a2(e),o=n.length>0?n[0]:"",i=c2("%"+o+"%",r),s=i.name,a=i.value,c=!1,l=i.alias;l&&(o=l[0],n2(n,r2([0,1],l)));for(var p=1,d=!0;p<n.length;p+=1){var f=n[p],m=Tl(f,0,1),y=Tl(f,-1);if((m==='"'||m==="'"||m==="`"||y==='"'||y==="'"||y==="`")&&m!==y)throw new Oi("property names with quotes must have matching quotes");if((f==="constructor"||!d)&&(c=!0),o+="."+f,s="%"+o+"%",El(Co,s))a=Co[s];else if(a!=null){if(!(f in a)){if(!r)throw new Ci("base intrinsic for "+e+" exists, but the property is not available.");return}if(ia&&p+1>=n.length){var v=ia(a,f);d=!!v,d&&"get"in v&&!("originalValue"in v.get)?a=v.get:a=a[f]}else d=El(a,f),a=a[f];d&&!c&&(Co[s]=a)}}return a}});var mk=T((h5,fk)=>{"use strict";var l2=ih();fk.exports=function(){return l2()&&!!Symbol.toStringTag}});var yk=T((g5,gk)=>{"use strict";var u2=dk(),hk=u2("%Object.defineProperty%",!0),p2=mk()(),d2=$l(),f2=_l(),Rl=p2?Symbol.toStringTag:null;gk.exports=function(e,r){var n=arguments.length>2&&!!arguments[2]&&arguments[2].force,o=arguments.length>2&&!!arguments[2]&&arguments[2].nonConfigurable;if(typeof n<"u"&&typeof n!="boolean"||typeof o<"u"&&typeof o!="boolean")throw new f2("if provided, the `overrideIfSet` and `nonConfigurable` options must be booleans");Rl&&(n||!d2(e,Rl))&&(hk?hk(e,Rl,{configurable:!o,enumerable:!1,value:r,writable:!1}):e[Rl]=r)}});var vk=T((y5,xk)=>{"use strict";xk.exports=function(t,e){return Object.keys(e).forEach(function(r){t[r]=t[r]||e[r]}),t}});var wk=T((x5,_k)=>{"use strict";var hh=$0(),m2=require("util"),dh=require("path"),h2=require("http"),g2=require("https"),y2=require("url").parse,x2=require("fs"),v2=require("stream").Stream,b2=require("crypto"),fh=I0(),_2=W0(),w2=yk(),Fn=$l(),mh=vk();function bk(t){return String(t).replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/"/g,"%22")}function qe(t){if(!(this instanceof qe))return new qe(t);this._overheadLength=0,this._valueLength=0,this._valuesToMeasure=[],hh.call(this),t=t||{};for(var e in t)this[e]=t[e]}m2.inherits(qe,hh);qe.LINE_BREAK=`\r
|
|
10
|
-
`;qe.DEFAULT_CONTENT_TYPE="application/octet-stream";qe.prototype.append=function(t,e,r){r=r||{},typeof r=="string"&&(r={filename:r});var n=hh.prototype.append.bind(this);if((typeof e=="number"||e==null)&&(e=String(e)),Array.isArray(e)){this._error(new Error("Arrays are not supported."));return}var o=this._multiPartHeader(t,e,r),i=this._multiPartFooter();n(o),n(e),n(i),this._trackLength(o,e,r)};qe.prototype._trackLength=function(t,e,r){var n=0;r.knownLength!=null?n+=Number(r.knownLength):Buffer.isBuffer(e)?n=e.length:typeof e=="string"&&(n=Buffer.byteLength(e)),this._valueLength+=n,this._overheadLength+=Buffer.byteLength(t)+qe.LINE_BREAK.length,!(!e||!e.path&&!(e.readable&&Fn(e,"httpVersion"))&&!(e instanceof v2))&&(r.knownLength||this._valuesToMeasure.push(e))};qe.prototype._lengthRetriever=function(t,e){Fn(t,"fd")?t.end!=null&&t.end!=1/0&&t.start!=null?e(null,t.end+1-(t.start?t.start:0)):x2.stat(t.path,function(r,n){if(r){e(r);return}var o=n.size-(t.start?t.start:0);e(null,o)}):Fn(t,"httpVersion")?e(null,Number(t.headers["content-length"])):Fn(t,"httpModule")?(t.on("response",function(r){t.pause(),e(null,Number(r.headers["content-length"]))}),t.resume()):e("Unknown stream")};qe.prototype._multiPartHeader=function(t,e,r){if(typeof r.header=="string")return r.header;var n=this._getContentDisposition(e,r),o=this._getContentType(e,r),i="",s={"Content-Disposition":["form-data",'name="'+bk(t)+'"'].concat(n||[]),"Content-Type":[].concat(o||[])};typeof r.header=="object"&&mh(s,r.header);var a;for(var c in s)if(Fn(s,c)){if(a=s[c],a==null)continue;Array.isArray(a)||(a=[a]),a.length&&(i+=c+": "+a.join("; ")+qe.LINE_BREAK)}return"--"+this.getBoundary()+qe.LINE_BREAK+i+qe.LINE_BREAK};qe.prototype._getContentDisposition=function(t,e){var r;if(typeof e.filepath=="string"?r=dh.normalize(e.filepath).replace(/\\/g,"/"):e.filename||t&&(t.name||t.path)?r=dh.basename(e.filename||t&&(t.name||t.path)):t&&t.readable&&Fn(t,"httpVersion")&&(r=dh.basename(t.client._httpMessage.path||"")),r)return'filename="'+bk(r)+'"'};qe.prototype._getContentType=function(t,e){var r=e.contentType;return!r&&t&&t.name&&(r=fh.lookup(t.name)),!r&&t&&t.path&&(r=fh.lookup(t.path)),!r&&t&&t.readable&&Fn(t,"httpVersion")&&(r=t.headers["content-type"]),!r&&(e.filepath||e.filename)&&(r=fh.lookup(e.filepath||e.filename)),!r&&t&&typeof t=="object"&&(r=qe.DEFAULT_CONTENT_TYPE),r};qe.prototype._multiPartFooter=function(){return function(t){var e=qe.LINE_BREAK,r=this._streams.length===0;r&&(e+=this._lastBoundary()),t(e)}.bind(this)};qe.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+qe.LINE_BREAK};qe.prototype.getHeaders=function(t){var e,r={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(e in t)Fn(t,e)&&(r[e.toLowerCase()]=t[e]);return r};qe.prototype.setBoundary=function(t){if(typeof t!="string")throw new TypeError("FormData boundary must be a string");this._boundary=t};qe.prototype.getBoundary=function(){return this._boundary||this._generateBoundary(),this._boundary};qe.prototype.getBuffer=function(){for(var t=new Buffer.alloc(0),e=this.getBoundary(),r=0,n=this._streams.length;r<n;r++)typeof this._streams[r]!="function"&&(Buffer.isBuffer(this._streams[r])?t=Buffer.concat([t,this._streams[r]]):t=Buffer.concat([t,Buffer.from(this._streams[r])]),(typeof this._streams[r]!="string"||this._streams[r].substring(2,e.length+2)!==e)&&(t=Buffer.concat([t,Buffer.from(qe.LINE_BREAK)])));return Buffer.concat([t,Buffer.from(this._lastBoundary())])};qe.prototype._generateBoundary=function(){this._boundary="--------------------------"+b2.randomBytes(12).toString("hex")};qe.prototype.getLengthSync=function(){var t=this._overheadLength+this._valueLength;return this._streams.length&&(t+=this._lastBoundary().length),this.hasKnownLength()||this._error(new Error("Cannot calculate proper length in synchronous way.")),t};qe.prototype.hasKnownLength=function(){var t=!0;return this._valuesToMeasure.length&&(t=!1),t};qe.prototype.getLength=function(t){var e=this._overheadLength+this._valueLength;if(this._streams.length&&(e+=this._lastBoundary().length),!this._valuesToMeasure.length){process.nextTick(t.bind(this,null,e));return}_2.parallel(this._valuesToMeasure,this._lengthRetriever,function(r,n){if(r){t(r);return}n.forEach(function(o){e+=o}),t(null,e)})};qe.prototype.submit=function(t,e){var r,n,o={method:"post"};return typeof t=="string"?(t=y2(t),n=mh({port:t.port,path:t.pathname,host:t.hostname,protocol:t.protocol},o)):(n=mh(t,o),n.port||(n.port=n.protocol==="https:"?443:80)),n.headers=this.getHeaders(t.headers),n.protocol==="https:"?r=g2.request(n):r=h2.request(n),this.getLength(function(i,s){if(i&&i!=="Unknown stream"){this._error(i);return}if(s&&r.setHeader("Content-Length",s),this.pipe(r),e){var a,c=function(l,p){return r.removeListener("error",c),r.removeListener("response",a),e.call(this,l,p)};a=c.bind(this,null),r.on("error",c),r.on("response",a)}}.bind(this)),r};qe.prototype._error=function(t){this.error||(this.error=t,this.pause(),this.emit("error",t))};qe.prototype.toString=function(){return"[object FormData]"};w2(qe.prototype,"FormData");_k.exports=qe});var qk=T((gG,Mk)=>{var Li=1e3,Di=Li*60,Mi=Di*60,jo=Mi*24,U2=jo*7,Z2=jo*365.25;Mk.exports=function(t,e){e=e||{};var r=typeof t;if(r==="string"&&t.length>0)return B2(t);if(r==="number"&&isFinite(t))return e.long?V2(t):H2(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function B2(t){if(t=String(t),!(t.length>100)){var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(e){var r=parseFloat(e[1]),n=(e[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return r*Z2;case"weeks":case"week":case"w":return r*U2;case"days":case"day":case"d":return r*jo;case"hours":case"hour":case"hrs":case"hr":case"h":return r*Mi;case"minutes":case"minute":case"mins":case"min":case"m":return r*Di;case"seconds":case"second":case"secs":case"sec":case"s":return r*Li;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function H2(t){var e=Math.abs(t);return e>=jo?Math.round(t/jo)+"d":e>=Mi?Math.round(t/Mi)+"h":e>=Di?Math.round(t/Di)+"m":e>=Li?Math.round(t/Li)+"s":t+"ms"}function V2(t){var e=Math.abs(t);return e>=jo?Il(t,e,jo,"day"):e>=Mi?Il(t,e,Mi,"hour"):e>=Di?Il(t,e,Di,"minute"):e>=Li?Il(t,e,Li,"second"):t+" ms"}function Il(t,e,r,n){var o=e>=r*1.5;return Math.round(t/r)+" "+n+(o?"s":"")}});var Ih=T((yG,Fk)=>{function G2(t){r.debug=r,r.default=r,r.coerce=c,r.disable=s,r.enable=o,r.enabled=a,r.humanize=qk(),r.destroy=l,Object.keys(t).forEach(p=>{r[p]=t[p]}),r.names=[],r.skips=[],r.formatters={};function e(p){let d=0;for(let f=0;f<p.length;f++)d=(d<<5)-d+p.charCodeAt(f),d|=0;return r.colors[Math.abs(d)%r.colors.length]}r.selectColor=e;function r(p){let d,f=null,m,y;function v(...x){if(!v.enabled)return;let g=v,_=Number(new Date),w=_-(d||_);g.diff=w,g.prev=d,g.curr=_,d=_,x[0]=r.coerce(x[0]),typeof x[0]!="string"&&x.unshift("%O");let $=0;x[0]=x[0].replace(/%([a-zA-Z%])/g,(Z,q)=>{if(Z==="%%")return"%";$++;let $e=r.formatters[q];if(typeof $e=="function"){let Pe=x[$];Z=$e.call(g,Pe),x.splice($,1),$--}return Z}),r.formatArgs.call(g,x),(g.log||r.log).apply(g,x)}return v.namespace=p,v.useColors=r.useColors(),v.color=r.selectColor(p),v.extend=n,v.destroy=r.destroy,Object.defineProperty(v,"enabled",{enumerable:!0,configurable:!1,get:()=>f!==null?f:(m!==r.namespaces&&(m=r.namespaces,y=r.enabled(p)),y),set:x=>{f=x}}),typeof r.init=="function"&&r.init(v),v}function n(p,d){let f=r(this.namespace+(typeof d>"u"?":":d)+p);return f.log=this.log,f}function o(p){r.save(p),r.namespaces=p,r.names=[],r.skips=[];let d=(typeof p=="string"?p:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let f of d)f[0]==="-"?r.skips.push(f.slice(1)):r.names.push(f)}function i(p,d){let f=0,m=0,y=-1,v=0;for(;f<p.length;)if(m<d.length&&(d[m]===p[f]||d[m]==="*"))d[m]==="*"?(y=m,v=f,m++):(f++,m++);else if(y!==-1)m=y+1,v++,f=v;else return!1;for(;m<d.length&&d[m]==="*";)m++;return m===d.length}function s(){let p=[...r.names,...r.skips.map(d=>"-"+d)].join(",");return r.enable(""),p}function a(p){for(let d of r.skips)if(i(p,d))return!1;for(let d of r.names)if(i(p,d))return!0;return!1}function c(p){return p instanceof Error?p.stack||p.message:p}function l(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return r.enable(r.load()),r}Fk.exports=G2});var Uk=T((fr,zl)=>{fr.formatArgs=K2;fr.save=J2;fr.load=Y2;fr.useColors=W2;fr.storage=X2();fr.destroy=(()=>{let t=!1;return()=>{t||(t=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();fr.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function W2(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let t;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(t=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(t[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function K2(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+zl.exports.humanize(this.diff),!this.useColors)return;let e="color: "+this.color;t.splice(1,0,e,"color: inherit");let r=0,n=0;t[0].replace(/%[a-zA-Z%]/g,o=>{o!=="%%"&&(r++,o==="%c"&&(n=r))}),t.splice(n,0,e)}fr.log=console.debug||console.log||(()=>{});function J2(t){try{t?fr.storage.setItem("debug",t):fr.storage.removeItem("debug")}catch{}}function Y2(){let t;try{t=fr.storage.getItem("debug")||fr.storage.getItem("DEBUG")}catch{}return!t&&typeof process<"u"&&"env"in process&&(t=process.env.DEBUG),t}function X2(){try{return localStorage}catch{}}zl.exports=Ih()(fr);var{formatters:Q2}=zl.exports;Q2.j=function(t){try{return JSON.stringify(t)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}});var Bk=T((xG,Zk)=>{"use strict";Zk.exports=(t,e=process.argv)=>{let r=t.startsWith("-")?"":t.length===1?"-":"--",n=e.indexOf(r+t),o=e.indexOf("--");return n!==-1&&(o===-1||n<o)}});var Gk=T((vG,Vk)=>{"use strict";var eq=require("os"),Hk=require("tty"),Ar=Bk(),{env:It}=process,Bn;Ar("no-color")||Ar("no-colors")||Ar("color=false")||Ar("color=never")?Bn=0:(Ar("color")||Ar("colors")||Ar("color=true")||Ar("color=always"))&&(Bn=1);"FORCE_COLOR"in It&&(It.FORCE_COLOR==="true"?Bn=1:It.FORCE_COLOR==="false"?Bn=0:Bn=It.FORCE_COLOR.length===0?1:Math.min(parseInt(It.FORCE_COLOR,10),3));function zh(t){return t===0?!1:{level:t,hasBasic:!0,has256:t>=2,has16m:t>=3}}function Ch(t,e){if(Bn===0)return 0;if(Ar("color=16m")||Ar("color=full")||Ar("color=truecolor"))return 3;if(Ar("color=256"))return 2;if(t&&!e&&Bn===void 0)return 0;let r=Bn||0;if(It.TERM==="dumb")return r;if(process.platform==="win32"){let n=eq.release().split(".");return Number(n[0])>=10&&Number(n[2])>=10586?Number(n[2])>=14931?3:2:1}if("CI"in It)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(n=>n in It)||It.CI_NAME==="codeship"?1:r;if("TEAMCITY_VERSION"in It)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(It.TEAMCITY_VERSION)?1:0;if(It.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in It){let n=parseInt((It.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(It.TERM_PROGRAM){case"iTerm.app":return n>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(It.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(It.TERM)||"COLORTERM"in It?1:r}function tq(t){let e=Ch(t,t&&t.isTTY);return zh(e)}Vk.exports={supportsColor:tq,stdout:zh(Ch(!0,Hk.isatty(1))),stderr:zh(Ch(!0,Hk.isatty(2)))}});var Kk=T((zt,Ol)=>{var rq=require("tty"),Cl=require("util");zt.init=lq;zt.log=sq;zt.formatArgs=oq;zt.save=aq;zt.load=cq;zt.useColors=nq;zt.destroy=Cl.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");zt.colors=[6,2,3,4,5,1];try{let t=Gk();t&&(t.stderr||t).level>=2&&(zt.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch{}zt.inspectOpts=Object.keys(process.env).filter(t=>/^debug_/i.test(t)).reduce((t,e)=>{let r=e.substring(6).toLowerCase().replace(/_([a-z])/g,(o,i)=>i.toUpperCase()),n=process.env[e];return/^(yes|on|true|enabled)$/i.test(n)?n=!0:/^(no|off|false|disabled)$/i.test(n)?n=!1:n==="null"?n=null:n=Number(n),t[r]=n,t},{});function nq(){return"colors"in zt.inspectOpts?!!zt.inspectOpts.colors:rq.isatty(process.stderr.fd)}function oq(t){let{namespace:e,useColors:r}=this;if(r){let n=this.color,o="\x1B[3"+(n<8?n:"8;5;"+n),i=` ${o};1m${e} \x1B[0m`;t[0]=i+t[0].split(`
|
|
9
|
+
deps: ${n}}`};var yj={keyword:"dependencies",type:"object",schemaType:"object",error:Qn.error,code(t){let[e,n]=xj(t);uw(t,e),pw(t,n)}};function xj({schema:t}){let e={},n={};for(let r in t){if(r==="__proto__")continue;let o=Array.isArray(t[r])?e:n;o[r]=t[r]}return[e,n]}function uw(t,e=t.schema){let{gen:n,data:r,it:o}=t;if(Object.keys(e).length===0)return;let i=n.let("missing");for(let s in e){let a=e[s];if(a.length===0)continue;let c=(0,ta.propertyInData)(n,r,s,o.opts.ownProperties);t.setParams({property:s,depsCount:a.length,deps:a.join(", ")}),o.allErrors?n.if(c,()=>{for(let l of a)(0,ta.checkReportMissingProp)(t,l)}):(n.if((0,_m._)`${c} && (${(0,ta.checkMissingProp)(t,a,i)})`),(0,ta.reportMissingProp)(t,i),n.else())}}Qn.validatePropertyDeps=uw;function pw(t,e=t.schema){let{gen:n,data:r,keyword:o,it:i}=t,s=n.name("valid");for(let a in e)(0,gj.alwaysValidSchema)(i,e[a])||(n.if((0,ta.propertyInData)(n,r,a,i.opts.ownProperties),()=>{let c=t.subschema({keyword:o,schemaProp:a},s);t.mergeValidEvaluated(c,s)},()=>n.var(s,!0)),t.ok(s))}Qn.validateSchemaDeps=pw;Qn.default=yj});var mw=$(wm=>{"use strict";Object.defineProperty(wm,"__esModule",{value:!0});var fw=we(),vj=Me(),bj={message:"property name must be valid",params:({params:t})=>(0,fw._)`{propertyName: ${t.propertyName}}`},_j={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:bj,code(t){let{gen:e,schema:n,data:r,it:o}=t;if((0,vj.alwaysValidSchema)(o,n))return;let i=e.name("valid");e.forIn("key",r,s=>{t.setParams({propertyName:s}),t.subschema({keyword:"propertyNames",data:s,dataTypes:["string"],propertyName:s,compositeRule:!0},i),e.if((0,fw.not)(i),()=>{t.error(!0),o.allErrors||e.break()})}),t.ok(i)}};wm.default=_j});var km=$(Sm=>{"use strict";Object.defineProperty(Sm,"__esModule",{value:!0});var al=Rn(),Un=we(),wj=gr(),cl=Me(),Sj={message:"must NOT have additional properties",params:({params:t})=>(0,Un._)`{additionalProperty: ${t.additionalProperty}}`},kj={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:Sj,code(t){let{gen:e,schema:n,parentSchema:r,data:o,errsCount:i,it:s}=t;if(!i)throw new Error("ajv implementation error");let{allErrors:a,opts:c}=s;if(s.props=!0,c.removeAdditional!=="all"&&(0,cl.alwaysValidSchema)(s,n))return;let l=(0,al.allSchemaProperties)(r.properties),p=(0,al.allSchemaProperties)(r.patternProperties);d(),t.ok((0,Un._)`${i} === ${wj.default.errors}`);function d(){e.forIn("key",o,x=>{!l.length&&!p.length?y(x):e.if(f(x),()=>y(x))})}function f(x){let m;if(l.length>8){let b=(0,cl.schemaRefOrVal)(s,r.properties,"properties");m=(0,al.isOwnProperty)(e,b,x)}else l.length?m=(0,Un.or)(...l.map(b=>(0,Un._)`${x} === ${b}`)):m=Un.nil;return p.length&&(m=(0,Un.or)(m,...p.map(b=>(0,Un._)`${(0,al.usePattern)(t,b)}.test(${x})`))),(0,Un.not)(m)}function h(x){e.code((0,Un._)`delete ${o}[${x}]`)}function y(x){if(c.removeAdditional==="all"||c.removeAdditional&&n===!1){h(x);return}if(n===!1){t.setParams({additionalProperty:x}),t.error(),a||e.break();return}if(typeof n=="object"&&!(0,cl.alwaysValidSchema)(s,n)){let m=e.name("valid");c.removeAdditional==="failing"?(v(x,m,!1),e.if((0,Un.not)(m),()=>{t.reset(),h(x)})):(v(x,m),a||e.if((0,Un.not)(m),()=>e.break()))}}function v(x,m,b){let w={keyword:"additionalProperties",dataProp:x,dataPropType:cl.Type.Str};b===!1&&Object.assign(w,{compositeRule:!0,createErrors:!1,allErrors:!1}),t.subschema(w,m)}}};Sm.default=kj});var yw=$(Em=>{"use strict";Object.defineProperty(Em,"__esModule",{value:!0});var Tj=Us(),hw=Rn(),Tm=Me(),gw=km(),Ej={keyword:"properties",type:"object",schemaType:"object",code(t){let{gen:e,schema:n,parentSchema:r,data:o,it:i}=t;i.opts.removeAdditional==="all"&&r.additionalProperties===void 0&&gw.default.code(new Tj.KeywordCxt(i,gw.default,"additionalProperties"));let s=(0,hw.allSchemaProperties)(n);for(let d of s)i.definedProperties.add(d);i.opts.unevaluated&&s.length&&i.props!==!0&&(i.props=Tm.mergeEvaluated.props(e,(0,Tm.toHash)(s),i.props));let a=s.filter(d=>!(0,Tm.alwaysValidSchema)(i,n[d]));if(a.length===0)return;let c=e.name("valid");for(let d of a)l(d)?p(d):(e.if((0,hw.propertyInData)(e,o,d,i.opts.ownProperties)),p(d),i.allErrors||e.else().var(c,!0),e.endIf()),t.it.definedProperties.add(d),t.ok(c);function l(d){return i.opts.useDefaults&&!i.compositeRule&&n[d].default!==void 0}function p(d){t.subschema({keyword:"properties",schemaProp:d,dataProp:d},c)}}};Em.default=Ej});var _w=$($m=>{"use strict";Object.defineProperty($m,"__esModule",{value:!0});var xw=Rn(),ll=we(),vw=Me(),bw=Me(),$j={keyword:"patternProperties",type:"object",schemaType:"object",code(t){let{gen:e,schema:n,data:r,parentSchema:o,it:i}=t,{opts:s}=i,a=(0,xw.allSchemaProperties)(n),c=a.filter(v=>(0,vw.alwaysValidSchema)(i,n[v]));if(a.length===0||c.length===a.length&&(!i.opts.unevaluated||i.props===!0))return;let l=s.strictSchema&&!s.allowMatchingProperties&&o.properties,p=e.name("valid");i.props!==!0&&!(i.props instanceof ll.Name)&&(i.props=(0,bw.evaluatedPropsToName)(e,i.props));let{props:d}=i;f();function f(){for(let v of a)l&&h(v),i.allErrors?y(v):(e.var(p,!0),y(v),e.if(p))}function h(v){for(let x in l)new RegExp(v).test(x)&&(0,vw.checkStrictMode)(i,`property ${x} matches pattern ${v} (use allowMatchingProperties)`)}function y(v){e.forIn("key",r,x=>{e.if((0,ll._)`${(0,xw.usePattern)(t,v)}.test(${x})`,()=>{let m=c.includes(v);m||t.subschema({keyword:"patternProperties",schemaProp:v,dataProp:x,dataPropType:bw.Type.Str},p),i.opts.unevaluated&&d!==!0?e.assign((0,ll._)`${d}[${x}]`,!0):!m&&!i.allErrors&&e.if((0,ll.not)(p),()=>e.break())})})}}};$m.default=$j});var ww=$(Rm=>{"use strict";Object.defineProperty(Rm,"__esModule",{value:!0});var Rj=Me(),Aj={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(t){let{gen:e,schema:n,it:r}=t;if((0,Rj.alwaysValidSchema)(r,n)){t.fail();return}let o=e.name("valid");t.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},o),t.failResult(o,()=>t.reset(),()=>t.error())},error:{message:"must NOT be valid"}};Rm.default=Aj});var Sw=$(Am=>{"use strict";Object.defineProperty(Am,"__esModule",{value:!0});var Ij=Rn(),Cj={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:Ij.validateUnion,error:{message:"must match a schema in anyOf"}};Am.default=Cj});var kw=$(Im=>{"use strict";Object.defineProperty(Im,"__esModule",{value:!0});var ul=we(),Pj=Me(),Oj={message:"must match exactly one schema in oneOf",params:({params:t})=>(0,ul._)`{passingSchemas: ${t.passing}}`},zj={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:Oj,code(t){let{gen:e,schema:n,parentSchema:r,it:o}=t;if(!Array.isArray(n))throw new Error("ajv implementation error");if(o.opts.discriminator&&r.discriminator)return;let i=n,s=e.let("valid",!1),a=e.let("passing",null),c=e.name("_valid");t.setParams({passing:a}),e.block(l),t.result(s,()=>t.reset(),()=>t.error(!0));function l(){i.forEach((p,d)=>{let f;(0,Pj.alwaysValidSchema)(o,p)?e.var(c,!0):f=t.subschema({keyword:"oneOf",schemaProp:d,compositeRule:!0},c),d>0&&e.if((0,ul._)`${c} && ${s}`).assign(s,!1).assign(a,(0,ul._)`[${a}, ${d}]`).else(),e.if(c,()=>{e.assign(s,!0),e.assign(a,d),f&&t.mergeEvaluated(f,ul.Name)})})}}};Im.default=zj});var Tw=$(Cm=>{"use strict";Object.defineProperty(Cm,"__esModule",{value:!0});var Nj=Me(),jj={keyword:"allOf",schemaType:"array",code(t){let{gen:e,schema:n,it:r}=t;if(!Array.isArray(n))throw new Error("ajv implementation error");let o=e.name("valid");n.forEach((i,s)=>{if((0,Nj.alwaysValidSchema)(r,i))return;let a=t.subschema({keyword:"allOf",schemaProp:s},o);t.ok(o),t.mergeEvaluated(a)})}};Cm.default=jj});var Rw=$(Pm=>{"use strict";Object.defineProperty(Pm,"__esModule",{value:!0});var pl=we(),$w=Me(),Lj={message:({params:t})=>(0,pl.str)`must match "${t.ifClause}" schema`,params:({params:t})=>(0,pl._)`{failingKeyword: ${t.ifClause}}`},Dj={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:Lj,code(t){let{gen:e,parentSchema:n,it:r}=t;n.then===void 0&&n.else===void 0&&(0,$w.checkStrictMode)(r,'"if" without "then" and "else" is ignored');let o=Ew(r,"then"),i=Ew(r,"else");if(!o&&!i)return;let s=e.let("valid",!0),a=e.name("_valid");if(c(),t.reset(),o&&i){let p=e.let("ifClause");t.setParams({ifClause:p}),e.if(a,l("then",p),l("else",p))}else o?e.if(a,l("then")):e.if((0,pl.not)(a),l("else"));t.pass(s,()=>t.error(!0));function c(){let p=t.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},a);t.mergeEvaluated(p)}function l(p,d){return()=>{let f=t.subschema({keyword:p},a);e.assign(s,a),t.mergeValidEvaluated(f,s),d?e.assign(d,(0,pl._)`${p}`):t.setParams({ifClause:p})}}}};function Ew(t,e){let n=t.schema[e];return n!==void 0&&!(0,$w.alwaysValidSchema)(t,n)}Pm.default=Dj});var Aw=$(Om=>{"use strict";Object.defineProperty(Om,"__esModule",{value:!0});var Mj=Me(),Fj={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:t,parentSchema:e,it:n}){e.if===void 0&&(0,Mj.checkStrictMode)(n,`"${t}" without "if" is ignored`)}};Om.default=Fj});var Iw=$(zm=>{"use strict";Object.defineProperty(zm,"__esModule",{value:!0});var Uj=gm(),qj=sw(),Zj=ym(),Bj=cw(),Hj=lw(),Vj=dw(),Gj=mw(),Wj=km(),Kj=yw(),Jj=_w(),Yj=ww(),Xj=Sw(),Qj=kw(),eL=Tw(),tL=Rw(),nL=Aw();function rL(t=!1){let e=[Yj.default,Xj.default,Qj.default,eL.default,tL.default,nL.default,Gj.default,Wj.default,Vj.default,Kj.default,Jj.default];return t?e.push(qj.default,Bj.default):e.push(Uj.default,Zj.default),e.push(Hj.default),e}zm.default=rL});var Cw=$(Nm=>{"use strict";Object.defineProperty(Nm,"__esModule",{value:!0});var wt=we(),oL={message:({schemaCode:t})=>(0,wt.str)`must match format "${t}"`,params:({schemaCode:t})=>(0,wt._)`{format: ${t}}`},iL={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:oL,code(t,e){let{gen:n,data:r,$data:o,schema:i,schemaCode:s,it:a}=t,{opts:c,errSchemaPath:l,schemaEnv:p,self:d}=a;if(!c.validateFormats)return;o?f():h();function f(){let y=n.scopeValue("formats",{ref:d.formats,code:c.code.formats}),v=n.const("fDef",(0,wt._)`${y}[${s}]`),x=n.let("fType"),m=n.let("format");n.if((0,wt._)`typeof ${v} == "object" && !(${v} instanceof RegExp)`,()=>n.assign(x,(0,wt._)`${v}.type || "string"`).assign(m,(0,wt._)`${v}.validate`),()=>n.assign(x,(0,wt._)`"string"`).assign(m,v)),t.fail$data((0,wt.or)(b(),w()));function b(){return c.strictSchema===!1?wt.nil:(0,wt._)`${s} && !${m}`}function w(){let k=p.$async?(0,wt._)`(${v}.async ? await ${m}(${r}) : ${m}(${r}))`:(0,wt._)`${m}(${r})`,E=(0,wt._)`(typeof ${m} == "function" ? ${k} : ${m}.test(${r}))`;return(0,wt._)`${m} && ${m} !== true && ${x} === ${e} && !${E}`}}function h(){let y=d.formats[i];if(!y){b();return}if(y===!0)return;let[v,x,m]=w(y);v===e&&t.pass(k());function b(){if(c.strictSchema===!1){d.logger.warn(E());return}throw new Error(E());function E(){return`unknown format "${i}" ignored in schema at path "${l}"`}}function w(E){let F=E instanceof RegExp?(0,wt.regexpCode)(E):c.code.formats?(0,wt._)`${c.code.formats}${(0,wt.getProperty)(i)}`:void 0,j=n.scopeValue("formats",{key:i,ref:E,code:F});return typeof E=="object"&&!(E instanceof RegExp)?[E.type||"string",E.validate,(0,wt._)`${j}.validate`]:["string",E,j]}function k(){if(typeof y=="object"&&!(y instanceof RegExp)&&y.async){if(!p.$async)throw new Error("async format in sync schema");return(0,wt._)`await ${m}(${r})`}return typeof x=="function"?(0,wt._)`${m}(${r})`:(0,wt._)`${m}.test(${r})`}}}};Nm.default=iL});var Pw=$(jm=>{"use strict";Object.defineProperty(jm,"__esModule",{value:!0});var sL=Cw(),aL=[sL.default];jm.default=aL});var Ow=$(Si=>{"use strict";Object.defineProperty(Si,"__esModule",{value:!0});Si.contentVocabulary=Si.metadataVocabulary=void 0;Si.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];Si.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});var Nw=$(Lm=>{"use strict";Object.defineProperty(Lm,"__esModule",{value:!0});var cL=q_(),lL=nw(),uL=Iw(),pL=Pw(),zw=Ow(),dL=[cL.default,lL.default,(0,uL.default)(),pL.default,zw.metadataVocabulary,zw.contentVocabulary];Lm.default=dL});var Lw=$(dl=>{"use strict";Object.defineProperty(dl,"__esModule",{value:!0});dl.DiscrError=void 0;var jw;(function(t){t.Tag="tag",t.Mapping="mapping"})(jw||(dl.DiscrError=jw={}))});var Mw=$(Mm=>{"use strict";Object.defineProperty(Mm,"__esModule",{value:!0});var ki=we(),Dm=Lw(),Dw=Kc(),fL=qs(),mL=Me(),hL={message:({params:{discrError:t,tagName:e}})=>t===Dm.DiscrError.Tag?`tag "${e}" must be string`:`value of tag "${e}" must be in oneOf`,params:({params:{discrError:t,tag:e,tagName:n}})=>(0,ki._)`{error: ${t}, tag: ${n}, tagValue: ${e}}`},gL={keyword:"discriminator",type:"object",schemaType:"object",error:hL,code(t){let{gen:e,data:n,schema:r,parentSchema:o,it:i}=t,{oneOf:s}=o;if(!i.opts.discriminator)throw new Error("discriminator: requires discriminator option");let a=r.propertyName;if(typeof a!="string")throw new Error("discriminator: requires propertyName");if(r.mapping)throw new Error("discriminator: mapping is not supported");if(!s)throw new Error("discriminator: requires oneOf keyword");let c=e.let("valid",!1),l=e.const("tag",(0,ki._)`${n}${(0,ki.getProperty)(a)}`);e.if((0,ki._)`typeof ${l} == "string"`,()=>p(),()=>t.error(!1,{discrError:Dm.DiscrError.Tag,tag:l,tagName:a})),t.ok(c);function p(){let h=f();e.if(!1);for(let y in h)e.elseIf((0,ki._)`${l} === ${y}`),e.assign(c,d(h[y]));e.else(),t.error(!1,{discrError:Dm.DiscrError.Mapping,tag:l,tagName:a}),e.endIf()}function d(h){let y=e.name("valid"),v=t.subschema({keyword:"oneOf",schemaProp:h},y);return t.mergeEvaluated(v,ki.Name),y}function f(){var h;let y={},v=m(o),x=!0;for(let k=0;k<s.length;k++){let E=s[k];if(E!=null&&E.$ref&&!(0,mL.schemaHasRulesButRef)(E,i.self.RULES)){let j=E.$ref;if(E=Dw.resolveRef.call(i.self,i.schemaEnv.root,i.baseId,j),E instanceof Dw.SchemaEnv&&(E=E.schema),E===void 0)throw new fL.default(i.opts.uriResolver,i.baseId,j)}let F=(h=E==null?void 0:E.properties)===null||h===void 0?void 0:h[a];if(typeof F!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${a}"`);x=x&&(v||m(E)),b(F,k)}if(!x)throw new Error(`discriminator: "${a}" must be required`);return y;function m({required:k}){return Array.isArray(k)&&k.includes(a)}function b(k,E){if(k.const)w(k.const,E);else if(k.enum)for(let F of k.enum)w(F,E);else throw new Error(`discriminator: "properties/${a}" must have "const" or "enum"`)}function w(k,E){if(typeof k!="string"||k in y)throw new Error(`discriminator: "${a}" values must be unique strings`);y[k]=E}}}};Mm.default=gL});var Fw=$((MH,yL)=>{yL.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 Um=$((lt,Fm)=>{"use strict";Object.defineProperty(lt,"__esModule",{value:!0});lt.MissingRefError=lt.ValidationError=lt.CodeGen=lt.Name=lt.nil=lt.stringify=lt.str=lt._=lt.KeywordCxt=lt.Ajv=void 0;var xL=j_(),vL=Nw(),bL=Mw(),Uw=Fw(),_L=["/properties"],fl="http://json-schema.org/draft-07/schema",Ti=class extends xL.default{_addVocabularies(){super._addVocabularies(),vL.default.forEach(e=>this.addVocabulary(e)),this.opts.discriminator&&this.addKeyword(bL.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let e=this.opts.$data?this.$dataMetaSchema(Uw,_L):Uw;this.addMetaSchema(e,fl,!1),this.refs["http://json-schema.org/schema"]=fl}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(fl)?fl:void 0)}};lt.Ajv=Ti;Fm.exports=lt=Ti;Fm.exports.Ajv=Ti;Object.defineProperty(lt,"__esModule",{value:!0});lt.default=Ti;var wL=Us();Object.defineProperty(lt,"KeywordCxt",{enumerable:!0,get:function(){return wL.KeywordCxt}});var Ei=we();Object.defineProperty(lt,"_",{enumerable:!0,get:function(){return Ei._}});Object.defineProperty(lt,"str",{enumerable:!0,get:function(){return Ei.str}});Object.defineProperty(lt,"stringify",{enumerable:!0,get:function(){return Ei.stringify}});Object.defineProperty(lt,"nil",{enumerable:!0,get:function(){return Ei.nil}});Object.defineProperty(lt,"Name",{enumerable:!0,get:function(){return Ei.Name}});Object.defineProperty(lt,"CodeGen",{enumerable:!0,get:function(){return Ei.CodeGen}});var SL=Gc();Object.defineProperty(lt,"ValidationError",{enumerable:!0,get:function(){return SL.default}});var kL=qs();Object.defineProperty(lt,"MissingRefError",{enumerable:!0,get:function(){return kL.default}})});var Kw=$(tr=>{"use strict";Object.defineProperty(tr,"__esModule",{value:!0});tr.formatNames=tr.fastFormats=tr.fullFormats=void 0;function er(t,e){return{validate:t,compare:e}}tr.fullFormats={date:er(Hw,Hm),time:er(Zm(!0),Vm),"date-time":er(qw(!0),Gw),"iso-time":er(Zm(),Vw),"iso-date-time":er(qw(),Ww),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:IL,"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:LL,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:CL,int32:{type:"number",validate:zL},int64:{type:"number",validate:NL},float:{type:"number",validate:Bw},double:{type:"number",validate:Bw},password:!0,binary:!0};tr.fastFormats={...tr.fullFormats,date:er(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,Hm),time:er(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,Vm),"date-time":er(/^\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,Gw),"iso-time":er(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,Vw),"iso-date-time":er(/^\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,Ww),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};tr.formatNames=Object.keys(tr.fullFormats);function TL(t){return t%4===0&&(t%100!==0||t%400===0)}var EL=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,$L=[0,31,28,31,30,31,30,31,31,30,31,30,31];function Hw(t){let e=EL.exec(t);if(!e)return!1;let n=+e[1],r=+e[2],o=+e[3];return r>=1&&r<=12&&o>=1&&o<=(r===2&&TL(n)?29:$L[r])}function Hm(t,e){if(t&&e)return t>e?1:t<e?-1:0}var qm=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function Zm(t){return function(n){let r=qm.exec(n);if(!r)return!1;let o=+r[1],i=+r[2],s=+r[3],a=r[4],c=r[5]==="-"?-1:1,l=+(r[6]||0),p=+(r[7]||0);if(l>23||p>59||t&&!a)return!1;if(o<=23&&i<=59&&s<60)return!0;let d=i-p*c,f=o-l*c-(d<0?1:0);return(f===23||f===-1)&&(d===59||d===-1)&&s<61}}function Vm(t,e){if(!(t&&e))return;let n=new Date("2020-01-01T"+t).valueOf(),r=new Date("2020-01-01T"+e).valueOf();if(n&&r)return n-r}function Vw(t,e){if(!(t&&e))return;let n=qm.exec(t),r=qm.exec(e);if(n&&r)return t=n[1]+n[2]+n[3],e=r[1]+r[2]+r[3],t>e?1:t<e?-1:0}var Bm=/t|\s/i;function qw(t){let e=Zm(t);return function(r){let o=r.split(Bm);return o.length===2&&Hw(o[0])&&e(o[1])}}function Gw(t,e){if(!(t&&e))return;let n=new Date(t).valueOf(),r=new Date(e).valueOf();if(n&&r)return n-r}function Ww(t,e){if(!(t&&e))return;let[n,r]=t.split(Bm),[o,i]=e.split(Bm),s=Hm(n,o);if(s!==void 0)return s||Vm(r,i)}var RL=/\/|:/,AL=/^(?:[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 IL(t){return RL.test(t)&&AL.test(t)}var Zw=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function CL(t){return Zw.lastIndex=0,Zw.test(t)}var PL=-(2**31),OL=2**31-1;function zL(t){return Number.isInteger(t)&&t<=OL&&t>=PL}function NL(t){return Number.isInteger(t)}function Bw(){return!0}var jL=/[^\\]\\Z/;function LL(t){if(jL.test(t))return!1;try{return new RegExp(t),!0}catch{return!1}}});var Jw=$($i=>{"use strict";Object.defineProperty($i,"__esModule",{value:!0});$i.formatLimitDefinition=void 0;var DL=Um(),qn=we(),Mr=qn.operators,ml={formatMaximum:{okStr:"<=",ok:Mr.LTE,fail:Mr.GT},formatMinimum:{okStr:">=",ok:Mr.GTE,fail:Mr.LT},formatExclusiveMaximum:{okStr:"<",ok:Mr.LT,fail:Mr.GTE},formatExclusiveMinimum:{okStr:">",ok:Mr.GT,fail:Mr.LTE}},ML={message:({keyword:t,schemaCode:e})=>(0,qn.str)`should be ${ml[t].okStr} ${e}`,params:({keyword:t,schemaCode:e})=>(0,qn._)`{comparison: ${ml[t].okStr}, limit: ${e}}`};$i.formatLimitDefinition={keyword:Object.keys(ml),type:"string",schemaType:"string",$data:!0,error:ML,code(t){let{gen:e,data:n,schemaCode:r,keyword:o,it:i}=t,{opts:s,self:a}=i;if(!s.validateFormats)return;let c=new DL.KeywordCxt(i,a.RULES.all.format.definition,"format");c.$data?l():p();function l(){let f=e.scopeValue("formats",{ref:a.formats,code:s.code.formats}),h=e.const("fmt",(0,qn._)`${f}[${c.schemaCode}]`);t.fail$data((0,qn.or)((0,qn._)`typeof ${h} != "object"`,(0,qn._)`${h} instanceof RegExp`,(0,qn._)`typeof ${h}.compare != "function"`,d(h)))}function p(){let f=c.schema,h=a.formats[f];if(!h||h===!0)return;if(typeof h!="object"||h instanceof RegExp||typeof h.compare!="function")throw new Error(`"${o}": format "${f}" does not define "compare" function`);let y=e.scopeValue("formats",{key:f,ref:h,code:s.code.formats?(0,qn._)`${s.code.formats}${(0,qn.getProperty)(f)}`:void 0});t.fail$data(d(y))}function d(f){return(0,qn._)`${f}.compare(${n}, ${r}) ${ml[o].fail} 0`}},dependencies:["format"]};var FL=t=>(t.addKeyword($i.formatLimitDefinition),t);$i.default=FL});var e0=$((na,Qw)=>{"use strict";Object.defineProperty(na,"__esModule",{value:!0});var Ri=Kw(),UL=Jw(),Gm=we(),Yw=new Gm.Name("fullFormats"),qL=new Gm.Name("fastFormats"),Wm=(t,e={keywords:!0})=>{if(Array.isArray(e))return Xw(t,e,Ri.fullFormats,Yw),t;let[n,r]=e.mode==="fast"?[Ri.fastFormats,qL]:[Ri.fullFormats,Yw],o=e.formats||Ri.formatNames;return Xw(t,o,n,r),e.keywords&&(0,UL.default)(t),t};Wm.get=(t,e="full")=>{let r=(e==="fast"?Ri.fastFormats:Ri.fullFormats)[t];if(!r)throw new Error(`Unknown format "${t}"`);return r};function Xw(t,e,n,r){var o,i;(o=(i=t.opts.code).formats)!==null&&o!==void 0||(i.formats=(0,Gm._)`require("ajv-formats/dist/formats").${r}`);for(let s of e)t.addFormat(s,n[s])}Qw.exports=na=Wm;Object.defineProperty(na,"__esModule",{value:!0});na.default=Wm});var R0=$((NV,$0)=>{var E0=require("stream").Stream,XD=require("util");$0.exports=Bn;function Bn(){this.source=null,this.dataSize=0,this.maxDataSize=1024*1024,this.pauseStream=!0,this._maxDataSizeExceeded=!1,this._released=!1,this._bufferedEvents=[]}XD.inherits(Bn,E0);Bn.create=function(t,e){var n=new this;e=e||{};for(var r in e)n[r]=e[r];n.source=t;var o=t.emit;return t.emit=function(){return n._handleEmit(arguments),o.apply(t,arguments)},t.on("error",function(){}),n.pauseStream&&t.pause(),n};Object.defineProperty(Bn.prototype,"readable",{configurable:!0,enumerable:!0,get:function(){return this.source.readable}});Bn.prototype.setEncoding=function(){return this.source.setEncoding.apply(this.source,arguments)};Bn.prototype.resume=function(){this._released||this.release(),this.source.resume()};Bn.prototype.pause=function(){this.source.pause()};Bn.prototype.release=function(){this._released=!0,this._bufferedEvents.forEach(function(t){this.emit.apply(this,t)}.bind(this)),this._bufferedEvents=[]};Bn.prototype.pipe=function(){var t=E0.prototype.pipe.apply(this,arguments);return this.resume(),t};Bn.prototype._handleEmit=function(t){if(this._released){this.emit.apply(this,t);return}t[0]==="data"&&(this.dataSize+=t[1].length,this._checkIfMaxDataSizeExceeded()),this._bufferedEvents.push(t)};Bn.prototype._checkIfMaxDataSizeExceeded=function(){if(!this._maxDataSizeExceeded&&!(this.dataSize<=this.maxDataSize)){this._maxDataSizeExceeded=!0;var t="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this.emit("error",new Error(t))}}});var P0=$((jV,C0)=>{var QD=require("util"),I0=require("stream").Stream,A0=R0();C0.exports=_t;function _t(){this.writable=!1,this.readable=!0,this.dataSize=0,this.maxDataSize=2*1024*1024,this.pauseStreams=!0,this._released=!1,this._streams=[],this._currentStream=null,this._insideLoop=!1,this._pendingNext=!1}QD.inherits(_t,I0);_t.create=function(t){var e=new this;t=t||{};for(var n in t)e[n]=t[n];return e};_t.isStreamLike=function(t){return typeof t!="function"&&typeof t!="string"&&typeof t!="boolean"&&typeof t!="number"&&!Buffer.isBuffer(t)};_t.prototype.append=function(t){var e=_t.isStreamLike(t);if(e){if(!(t instanceof A0)){var n=A0.create(t,{maxDataSize:1/0,pauseStream:this.pauseStreams});t.on("data",this._checkDataSize.bind(this)),t=n}this._handleErrors(t),this.pauseStreams&&t.pause()}return this._streams.push(t),this};_t.prototype.pipe=function(t,e){return I0.prototype.pipe.call(this,t,e),this.resume(),t};_t.prototype._getNext=function(){if(this._currentStream=null,this._insideLoop){this._pendingNext=!0;return}this._insideLoop=!0;try{do this._pendingNext=!1,this._realGetNext();while(this._pendingNext)}finally{this._insideLoop=!1}};_t.prototype._realGetNext=function(){var t=this._streams.shift();if(typeof t>"u"){this.end();return}if(typeof t!="function"){this._pipeNext(t);return}var e=t;e(function(n){var r=_t.isStreamLike(n);r&&(n.on("data",this._checkDataSize.bind(this)),this._handleErrors(n)),this._pipeNext(n)}.bind(this))};_t.prototype._pipeNext=function(t){this._currentStream=t;var e=_t.isStreamLike(t);if(e){t.on("end",this._getNext.bind(this)),t.pipe(this,{end:!1});return}var n=t;this.write(n),this._getNext()};_t.prototype._handleErrors=function(t){var e=this;t.on("error",function(n){e._emitError(n)})};_t.prototype.write=function(t){this.emit("data",t)};_t.prototype.pause=function(){this.pauseStreams&&(this.pauseStreams&&this._currentStream&&typeof this._currentStream.pause=="function"&&this._currentStream.pause(),this.emit("pause"))};_t.prototype.resume=function(){this._released||(this._released=!0,this.writable=!0,this._getNext()),this.pauseStreams&&this._currentStream&&typeof this._currentStream.resume=="function"&&this._currentStream.resume(),this.emit("resume")};_t.prototype.end=function(){this._reset(),this.emit("end")};_t.prototype.destroy=function(){this._reset(),this.emit("close")};_t.prototype._reset=function(){this.writable=!1,this._streams=[],this._currentStream=null};_t.prototype._checkDataSize=function(){if(this._updateDataSize(),!(this.dataSize<=this.maxDataSize)){var t="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this._emitError(new Error(t))}};_t.prototype._updateDataSize=function(){this.dataSize=0;var t=this;this._streams.forEach(function(e){e.dataSize&&(t.dataSize+=e.dataSize)}),this._currentStream&&this._currentStream.dataSize&&(this.dataSize+=this._currentStream.dataSize)};_t.prototype._emitError=function(t){this._reset(),this.emit("error",t)}});var O0=$((LV,eM)=>{eM.exports={"application/1d-interleaved-parityfec":{source:"iana"},"application/3gpdash-qoe-report+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/3gpp-ims+xml":{source:"iana",compressible:!0},"application/3gpphal+json":{source:"iana",compressible:!0},"application/3gpphalforms+json":{source:"iana",compressible:!0},"application/a2l":{source:"iana"},"application/ace+cbor":{source:"iana"},"application/activemessage":{source:"iana"},"application/activity+json":{source:"iana",compressible:!0},"application/alto-costmap+json":{source:"iana",compressible:!0},"application/alto-costmapfilter+json":{source:"iana",compressible:!0},"application/alto-directory+json":{source:"iana",compressible:!0},"application/alto-endpointcost+json":{source:"iana",compressible:!0},"application/alto-endpointcostparams+json":{source:"iana",compressible:!0},"application/alto-endpointprop+json":{source:"iana",compressible:!0},"application/alto-endpointpropparams+json":{source:"iana",compressible:!0},"application/alto-error+json":{source:"iana",compressible:!0},"application/alto-networkmap+json":{source:"iana",compressible:!0},"application/alto-networkmapfilter+json":{source:"iana",compressible:!0},"application/alto-updatestreamcontrol+json":{source:"iana",compressible:!0},"application/alto-updatestreamparams+json":{source:"iana",compressible:!0},"application/aml":{source:"iana"},"application/andrew-inset":{source:"iana",extensions:["ez"]},"application/applefile":{source:"iana"},"application/applixware":{source:"apache",extensions:["aw"]},"application/at+jwt":{source:"iana"},"application/atf":{source:"iana"},"application/atfx":{source:"iana"},"application/atom+xml":{source:"iana",compressible:!0,extensions:["atom"]},"application/atomcat+xml":{source:"iana",compressible:!0,extensions:["atomcat"]},"application/atomdeleted+xml":{source:"iana",compressible:!0,extensions:["atomdeleted"]},"application/atomicmail":{source:"iana"},"application/atomsvc+xml":{source:"iana",compressible:!0,extensions:["atomsvc"]},"application/atsc-dwd+xml":{source:"iana",compressible:!0,extensions:["dwd"]},"application/atsc-dynamic-event-message":{source:"iana"},"application/atsc-held+xml":{source:"iana",compressible:!0,extensions:["held"]},"application/atsc-rdt+json":{source:"iana",compressible:!0},"application/atsc-rsat+xml":{source:"iana",compressible:!0,extensions:["rsat"]},"application/atxml":{source:"iana"},"application/auth-policy+xml":{source:"iana",compressible:!0},"application/bacnet-xdd+zip":{source:"iana",compressible:!1},"application/batch-smtp":{source:"iana"},"application/bdoc":{compressible:!1,extensions:["bdoc"]},"application/beep+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/calendar+json":{source:"iana",compressible:!0},"application/calendar+xml":{source:"iana",compressible:!0,extensions:["xcs"]},"application/call-completion":{source:"iana"},"application/cals-1840":{source:"iana"},"application/captive+json":{source:"iana",compressible:!0},"application/cbor":{source:"iana"},"application/cbor-seq":{source:"iana"},"application/cccex":{source:"iana"},"application/ccmp+xml":{source:"iana",compressible:!0},"application/ccxml+xml":{source:"iana",compressible:!0,extensions:["ccxml"]},"application/cdfx+xml":{source:"iana",compressible:!0,extensions:["cdfx"]},"application/cdmi-capability":{source:"iana",extensions:["cdmia"]},"application/cdmi-container":{source:"iana",extensions:["cdmic"]},"application/cdmi-domain":{source:"iana",extensions:["cdmid"]},"application/cdmi-object":{source:"iana",extensions:["cdmio"]},"application/cdmi-queue":{source:"iana",extensions:["cdmiq"]},"application/cdni":{source:"iana"},"application/cea":{source:"iana"},"application/cea-2018+xml":{source:"iana",compressible:!0},"application/cellml+xml":{source:"iana",compressible:!0},"application/cfw":{source:"iana"},"application/city+json":{source:"iana",compressible:!0},"application/clr":{source:"iana"},"application/clue+xml":{source:"iana",compressible:!0},"application/clue_info+xml":{source:"iana",compressible:!0},"application/cms":{source:"iana"},"application/cnrp+xml":{source:"iana",compressible:!0},"application/coap-group+json":{source:"iana",compressible:!0},"application/coap-payload":{source:"iana"},"application/commonground":{source:"iana"},"application/conference-info+xml":{source:"iana",compressible:!0},"application/cose":{source:"iana"},"application/cose-key":{source:"iana"},"application/cose-key-set":{source:"iana"},"application/cpl+xml":{source:"iana",compressible:!0,extensions:["cpl"]},"application/csrattrs":{source:"iana"},"application/csta+xml":{source:"iana",compressible:!0},"application/cstadata+xml":{source:"iana",compressible:!0},"application/csvm+json":{source:"iana",compressible:!0},"application/cu-seeme":{source:"apache",extensions:["cu"]},"application/cwt":{source:"iana"},"application/cybercash":{source:"iana"},"application/dart":{compressible:!0},"application/dash+xml":{source:"iana",compressible:!0,extensions:["mpd"]},"application/dash-patch+xml":{source:"iana",compressible:!0,extensions:["mpp"]},"application/dashdelta":{source:"iana"},"application/davmount+xml":{source:"iana",compressible:!0,extensions:["davmount"]},"application/dca-rft":{source:"iana"},"application/dcd":{source:"iana"},"application/dec-dx":{source:"iana"},"application/dialog-info+xml":{source:"iana",compressible:!0},"application/dicom":{source:"iana"},"application/dicom+json":{source:"iana",compressible:!0},"application/dicom+xml":{source:"iana",compressible:!0},"application/dii":{source:"iana"},"application/dit":{source:"iana"},"application/dns":{source:"iana"},"application/dns+json":{source:"iana",compressible:!0},"application/dns-message":{source:"iana"},"application/docbook+xml":{source:"apache",compressible:!0,extensions:["dbk"]},"application/dots+cbor":{source:"iana"},"application/dskpp+xml":{source:"iana",compressible:!0},"application/dssc+der":{source:"iana",extensions:["dssc"]},"application/dssc+xml":{source:"iana",compressible:!0,extensions:["xdssc"]},"application/dvcs":{source:"iana"},"application/ecmascript":{source:"iana",compressible:!0,extensions:["es","ecma"]},"application/edi-consent":{source:"iana"},"application/edi-x12":{source:"iana",compressible:!1},"application/edifact":{source:"iana",compressible:!1},"application/efi":{source:"iana"},"application/elm+json":{source:"iana",charset:"UTF-8",compressible:!0},"application/elm+xml":{source:"iana",compressible:!0},"application/emergencycalldata.cap+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/emergencycalldata.comment+xml":{source:"iana",compressible:!0},"application/emergencycalldata.control+xml":{source:"iana",compressible:!0},"application/emergencycalldata.deviceinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.ecall.msd":{source:"iana"},"application/emergencycalldata.providerinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.serviceinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.subscriberinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.veds+xml":{source:"iana",compressible:!0},"application/emma+xml":{source:"iana",compressible:!0,extensions:["emma"]},"application/emotionml+xml":{source:"iana",compressible:!0,extensions:["emotionml"]},"application/encaprtp":{source:"iana"},"application/epp+xml":{source:"iana",compressible:!0},"application/epub+zip":{source:"iana",compressible:!1,extensions:["epub"]},"application/eshop":{source:"iana"},"application/exi":{source:"iana",extensions:["exi"]},"application/expect-ct-report+json":{source:"iana",compressible:!0},"application/express":{source:"iana",extensions:["exp"]},"application/fastinfoset":{source:"iana"},"application/fastsoap":{source:"iana"},"application/fdt+xml":{source:"iana",compressible:!0,extensions:["fdt"]},"application/fhir+json":{source:"iana",charset:"UTF-8",compressible:!0},"application/fhir+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/fido.trusted-apps+json":{compressible:!0},"application/fits":{source:"iana"},"application/flexfec":{source:"iana"},"application/font-sfnt":{source:"iana"},"application/font-tdpfr":{source:"iana",extensions:["pfr"]},"application/font-woff":{source:"iana",compressible:!1},"application/framework-attributes+xml":{source:"iana",compressible:!0},"application/geo+json":{source:"iana",compressible:!0,extensions:["geojson"]},"application/geo+json-seq":{source:"iana"},"application/geopackage+sqlite3":{source:"iana"},"application/geoxacml+xml":{source:"iana",compressible:!0},"application/gltf-buffer":{source:"iana"},"application/gml+xml":{source:"iana",compressible:!0,extensions:["gml"]},"application/gpx+xml":{source:"apache",compressible:!0,extensions:["gpx"]},"application/gxf":{source:"apache",extensions:["gxf"]},"application/gzip":{source:"iana",compressible:!1,extensions:["gz"]},"application/h224":{source:"iana"},"application/held+xml":{source:"iana",compressible:!0},"application/hjson":{extensions:["hjson"]},"application/http":{source:"iana"},"application/hyperstudio":{source:"iana",extensions:["stk"]},"application/ibe-key-request+xml":{source:"iana",compressible:!0},"application/ibe-pkg-reply+xml":{source:"iana",compressible:!0},"application/ibe-pp-data":{source:"iana"},"application/iges":{source:"iana"},"application/im-iscomposing+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/index":{source:"iana"},"application/index.cmd":{source:"iana"},"application/index.obj":{source:"iana"},"application/index.response":{source:"iana"},"application/index.vnd":{source:"iana"},"application/inkml+xml":{source:"iana",compressible:!0,extensions:["ink","inkml"]},"application/iotp":{source:"iana"},"application/ipfix":{source:"iana",extensions:["ipfix"]},"application/ipp":{source:"iana"},"application/isup":{source:"iana"},"application/its+xml":{source:"iana",compressible:!0,extensions:["its"]},"application/java-archive":{source:"apache",compressible:!1,extensions:["jar","war","ear"]},"application/java-serialized-object":{source:"apache",compressible:!1,extensions:["ser"]},"application/java-vm":{source:"apache",compressible:!1,extensions:["class"]},"application/javascript":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["js","mjs"]},"application/jf2feed+json":{source:"iana",compressible:!0},"application/jose":{source:"iana"},"application/jose+json":{source:"iana",compressible:!0},"application/jrd+json":{source:"iana",compressible:!0},"application/jscalendar+json":{source:"iana",compressible:!0},"application/json":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["json","map"]},"application/json-patch+json":{source:"iana",compressible:!0},"application/json-seq":{source:"iana"},"application/json5":{extensions:["json5"]},"application/jsonml+json":{source:"apache",compressible:!0,extensions:["jsonml"]},"application/jwk+json":{source:"iana",compressible:!0},"application/jwk-set+json":{source:"iana",compressible:!0},"application/jwt":{source:"iana"},"application/kpml-request+xml":{source:"iana",compressible:!0},"application/kpml-response+xml":{source:"iana",compressible:!0},"application/ld+json":{source:"iana",compressible:!0,extensions:["jsonld"]},"application/lgr+xml":{source:"iana",compressible:!0,extensions:["lgr"]},"application/link-format":{source:"iana"},"application/load-control+xml":{source:"iana",compressible:!0},"application/lost+xml":{source:"iana",compressible:!0,extensions:["lostxml"]},"application/lostsync+xml":{source:"iana",compressible:!0},"application/lpf+zip":{source:"iana",compressible:!1},"application/lxf":{source:"iana"},"application/mac-binhex40":{source:"iana",extensions:["hqx"]},"application/mac-compactpro":{source:"apache",extensions:["cpt"]},"application/macwriteii":{source:"iana"},"application/mads+xml":{source:"iana",compressible:!0,extensions:["mads"]},"application/manifest+json":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["webmanifest"]},"application/marc":{source:"iana",extensions:["mrc"]},"application/marcxml+xml":{source:"iana",compressible:!0,extensions:["mrcx"]},"application/mathematica":{source:"iana",extensions:["ma","nb","mb"]},"application/mathml+xml":{source:"iana",compressible:!0,extensions:["mathml"]},"application/mathml-content+xml":{source:"iana",compressible:!0},"application/mathml-presentation+xml":{source:"iana",compressible:!0},"application/mbms-associated-procedure-description+xml":{source:"iana",compressible:!0},"application/mbms-deregister+xml":{source:"iana",compressible:!0},"application/mbms-envelope+xml":{source:"iana",compressible:!0},"application/mbms-msk+xml":{source:"iana",compressible:!0},"application/mbms-msk-response+xml":{source:"iana",compressible:!0},"application/mbms-protection-description+xml":{source:"iana",compressible:!0},"application/mbms-reception-report+xml":{source:"iana",compressible:!0},"application/mbms-register+xml":{source:"iana",compressible:!0},"application/mbms-register-response+xml":{source:"iana",compressible:!0},"application/mbms-schedule+xml":{source:"iana",compressible:!0},"application/mbms-user-service-description+xml":{source:"iana",compressible:!0},"application/mbox":{source:"iana",extensions:["mbox"]},"application/media-policy-dataset+xml":{source:"iana",compressible:!0,extensions:["mpf"]},"application/media_control+xml":{source:"iana",compressible:!0},"application/mediaservercontrol+xml":{source:"iana",compressible:!0,extensions:["mscml"]},"application/merge-patch+json":{source:"iana",compressible:!0},"application/metalink+xml":{source:"apache",compressible:!0,extensions:["metalink"]},"application/metalink4+xml":{source:"iana",compressible:!0,extensions:["meta4"]},"application/mets+xml":{source:"iana",compressible:!0,extensions:["mets"]},"application/mf4":{source:"iana"},"application/mikey":{source:"iana"},"application/mipc":{source:"iana"},"application/missing-blocks+cbor-seq":{source:"iana"},"application/mmt-aei+xml":{source:"iana",compressible:!0,extensions:["maei"]},"application/mmt-usd+xml":{source:"iana",compressible:!0,extensions:["musd"]},"application/mods+xml":{source:"iana",compressible:!0,extensions:["mods"]},"application/moss-keys":{source:"iana"},"application/moss-signature":{source:"iana"},"application/mosskey-data":{source:"iana"},"application/mosskey-request":{source:"iana"},"application/mp21":{source:"iana",extensions:["m21","mp21"]},"application/mp4":{source:"iana",extensions:["mp4s","m4p"]},"application/mpeg4-generic":{source:"iana"},"application/mpeg4-iod":{source:"iana"},"application/mpeg4-iod-xmt":{source:"iana"},"application/mrb-consumer+xml":{source:"iana",compressible:!0},"application/mrb-publish+xml":{source:"iana",compressible:!0},"application/msc-ivr+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/msc-mixer+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/msword":{source:"iana",compressible:!1,extensions:["doc","dot"]},"application/mud+json":{source:"iana",compressible:!0},"application/multipart-core":{source:"iana"},"application/mxf":{source:"iana",extensions:["mxf"]},"application/n-quads":{source:"iana",extensions:["nq"]},"application/n-triples":{source:"iana",extensions:["nt"]},"application/nasdata":{source:"iana"},"application/news-checkgroups":{source:"iana",charset:"US-ASCII"},"application/news-groupinfo":{source:"iana",charset:"US-ASCII"},"application/news-transmission":{source:"iana"},"application/nlsml+xml":{source:"iana",compressible:!0},"application/node":{source:"iana",extensions:["cjs"]},"application/nss":{source:"iana"},"application/oauth-authz-req+jwt":{source:"iana"},"application/oblivious-dns-message":{source:"iana"},"application/ocsp-request":{source:"iana"},"application/ocsp-response":{source:"iana"},"application/octet-stream":{source:"iana",compressible:!1,extensions:["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"]},"application/oda":{source:"iana",extensions:["oda"]},"application/odm+xml":{source:"iana",compressible:!0},"application/odx":{source:"iana"},"application/oebps-package+xml":{source:"iana",compressible:!0,extensions:["opf"]},"application/ogg":{source:"iana",compressible:!1,extensions:["ogx"]},"application/omdoc+xml":{source:"apache",compressible:!0,extensions:["omdoc"]},"application/onenote":{source:"apache",extensions:["onetoc","onetoc2","onetmp","onepkg"]},"application/opc-nodeset+xml":{source:"iana",compressible:!0},"application/oscore":{source:"iana"},"application/oxps":{source:"iana",extensions:["oxps"]},"application/p21":{source:"iana"},"application/p21+zip":{source:"iana",compressible:!1},"application/p2p-overlay+xml":{source:"iana",compressible:!0,extensions:["relo"]},"application/parityfec":{source:"iana"},"application/passport":{source:"iana"},"application/patch-ops-error+xml":{source:"iana",compressible:!0,extensions:["xer"]},"application/pdf":{source:"iana",compressible:!1,extensions:["pdf"]},"application/pdx":{source:"iana"},"application/pem-certificate-chain":{source:"iana"},"application/pgp-encrypted":{source:"iana",compressible:!1,extensions:["pgp"]},"application/pgp-keys":{source:"iana",extensions:["asc"]},"application/pgp-signature":{source:"iana",extensions:["asc","sig"]},"application/pics-rules":{source:"apache",extensions:["prf"]},"application/pidf+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/pidf-diff+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/pkcs10":{source:"iana",extensions:["p10"]},"application/pkcs12":{source:"iana"},"application/pkcs7-mime":{source:"iana",extensions:["p7m","p7c"]},"application/pkcs7-signature":{source:"iana",extensions:["p7s"]},"application/pkcs8":{source:"iana",extensions:["p8"]},"application/pkcs8-encrypted":{source:"iana"},"application/pkix-attr-cert":{source:"iana",extensions:["ac"]},"application/pkix-cert":{source:"iana",extensions:["cer"]},"application/pkix-crl":{source:"iana",extensions:["crl"]},"application/pkix-pkipath":{source:"iana",extensions:["pkipath"]},"application/pkixcmp":{source:"iana",extensions:["pki"]},"application/pls+xml":{source:"iana",compressible:!0,extensions:["pls"]},"application/poc-settings+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/postscript":{source:"iana",compressible:!0,extensions:["ai","eps","ps"]},"application/ppsp-tracker+json":{source:"iana",compressible:!0},"application/problem+json":{source:"iana",compressible:!0},"application/problem+xml":{source:"iana",compressible:!0},"application/provenance+xml":{source:"iana",compressible:!0,extensions:["provx"]},"application/prs.alvestrand.titrax-sheet":{source:"iana"},"application/prs.cww":{source:"iana",extensions:["cww"]},"application/prs.cyn":{source:"iana",charset:"7-BIT"},"application/prs.hpub+zip":{source:"iana",compressible:!1},"application/prs.nprend":{source:"iana"},"application/prs.plucker":{source:"iana"},"application/prs.rdf-xml-crypt":{source:"iana"},"application/prs.xsf+xml":{source:"iana",compressible:!0},"application/pskc+xml":{source:"iana",compressible:!0,extensions:["pskcxml"]},"application/pvd+json":{source:"iana",compressible:!0},"application/qsig":{source:"iana"},"application/raml+yaml":{compressible:!0,extensions:["raml"]},"application/raptorfec":{source:"iana"},"application/rdap+json":{source:"iana",compressible:!0},"application/rdf+xml":{source:"iana",compressible:!0,extensions:["rdf","owl"]},"application/reginfo+xml":{source:"iana",compressible:!0,extensions:["rif"]},"application/relax-ng-compact-syntax":{source:"iana",extensions:["rnc"]},"application/remote-printing":{source:"iana"},"application/reputon+json":{source:"iana",compressible:!0},"application/resource-lists+xml":{source:"iana",compressible:!0,extensions:["rl"]},"application/resource-lists-diff+xml":{source:"iana",compressible:!0,extensions:["rld"]},"application/rfc+xml":{source:"iana",compressible:!0},"application/riscos":{source:"iana"},"application/rlmi+xml":{source:"iana",compressible:!0},"application/rls-services+xml":{source:"iana",compressible:!0,extensions:["rs"]},"application/route-apd+xml":{source:"iana",compressible:!0,extensions:["rapd"]},"application/route-s-tsid+xml":{source:"iana",compressible:!0,extensions:["sls"]},"application/route-usd+xml":{source:"iana",compressible:!0,extensions:["rusd"]},"application/rpki-ghostbusters":{source:"iana",extensions:["gbr"]},"application/rpki-manifest":{source:"iana",extensions:["mft"]},"application/rpki-publication":{source:"iana"},"application/rpki-roa":{source:"iana",extensions:["roa"]},"application/rpki-updown":{source:"iana"},"application/rsd+xml":{source:"apache",compressible:!0,extensions:["rsd"]},"application/rss+xml":{source:"apache",compressible:!0,extensions:["rss"]},"application/rtf":{source:"iana",compressible:!0,extensions:["rtf"]},"application/rtploopback":{source:"iana"},"application/rtx":{source:"iana"},"application/samlassertion+xml":{source:"iana",compressible:!0},"application/samlmetadata+xml":{source:"iana",compressible:!0},"application/sarif+json":{source:"iana",compressible:!0},"application/sarif-external-properties+json":{source:"iana",compressible:!0},"application/sbe":{source:"iana"},"application/sbml+xml":{source:"iana",compressible:!0,extensions:["sbml"]},"application/scaip+xml":{source:"iana",compressible:!0},"application/scim+json":{source:"iana",compressible:!0},"application/scvp-cv-request":{source:"iana",extensions:["scq"]},"application/scvp-cv-response":{source:"iana",extensions:["scs"]},"application/scvp-vp-request":{source:"iana",extensions:["spq"]},"application/scvp-vp-response":{source:"iana",extensions:["spp"]},"application/sdp":{source:"iana",extensions:["sdp"]},"application/secevent+jwt":{source:"iana"},"application/senml+cbor":{source:"iana"},"application/senml+json":{source:"iana",compressible:!0},"application/senml+xml":{source:"iana",compressible:!0,extensions:["senmlx"]},"application/senml-etch+cbor":{source:"iana"},"application/senml-etch+json":{source:"iana",compressible:!0},"application/senml-exi":{source:"iana"},"application/sensml+cbor":{source:"iana"},"application/sensml+json":{source:"iana",compressible:!0},"application/sensml+xml":{source:"iana",compressible:!0,extensions:["sensmlx"]},"application/sensml-exi":{source:"iana"},"application/sep+xml":{source:"iana",compressible:!0},"application/sep-exi":{source:"iana"},"application/session-info":{source:"iana"},"application/set-payment":{source:"iana"},"application/set-payment-initiation":{source:"iana",extensions:["setpay"]},"application/set-registration":{source:"iana"},"application/set-registration-initiation":{source:"iana",extensions:["setreg"]},"application/sgml":{source:"iana"},"application/sgml-open-catalog":{source:"iana"},"application/shf+xml":{source:"iana",compressible:!0,extensions:["shf"]},"application/sieve":{source:"iana",extensions:["siv","sieve"]},"application/simple-filter+xml":{source:"iana",compressible:!0},"application/simple-message-summary":{source:"iana"},"application/simplesymbolcontainer":{source:"iana"},"application/sipc":{source:"iana"},"application/slate":{source:"iana"},"application/smil":{source:"iana"},"application/smil+xml":{source:"iana",compressible:!0,extensions:["smi","smil"]},"application/smpte336m":{source:"iana"},"application/soap+fastinfoset":{source:"iana"},"application/soap+xml":{source:"iana",compressible:!0},"application/sparql-query":{source:"iana",extensions:["rq"]},"application/sparql-results+xml":{source:"iana",compressible:!0,extensions:["srx"]},"application/spdx+json":{source:"iana",compressible:!0},"application/spirits-event+xml":{source:"iana",compressible:!0},"application/sql":{source:"iana"},"application/srgs":{source:"iana",extensions:["gram"]},"application/srgs+xml":{source:"iana",compressible:!0,extensions:["grxml"]},"application/sru+xml":{source:"iana",compressible:!0,extensions:["sru"]},"application/ssdl+xml":{source:"apache",compressible:!0,extensions:["ssdl"]},"application/ssml+xml":{source:"iana",compressible:!0,extensions:["ssml"]},"application/stix+json":{source:"iana",compressible:!0},"application/swid+xml":{source:"iana",compressible:!0,extensions:["swidtag"]},"application/tamp-apex-update":{source:"iana"},"application/tamp-apex-update-confirm":{source:"iana"},"application/tamp-community-update":{source:"iana"},"application/tamp-community-update-confirm":{source:"iana"},"application/tamp-error":{source:"iana"},"application/tamp-sequence-adjust":{source:"iana"},"application/tamp-sequence-adjust-confirm":{source:"iana"},"application/tamp-status-query":{source:"iana"},"application/tamp-status-response":{source:"iana"},"application/tamp-update":{source:"iana"},"application/tamp-update-confirm":{source:"iana"},"application/tar":{compressible:!0},"application/taxii+json":{source:"iana",compressible:!0},"application/td+json":{source:"iana",compressible:!0},"application/tei+xml":{source:"iana",compressible:!0,extensions:["tei","teicorpus"]},"application/tetra_isi":{source:"iana"},"application/thraud+xml":{source:"iana",compressible:!0,extensions:["tfi"]},"application/timestamp-query":{source:"iana"},"application/timestamp-reply":{source:"iana"},"application/timestamped-data":{source:"iana",extensions:["tsd"]},"application/tlsrpt+gzip":{source:"iana"},"application/tlsrpt+json":{source:"iana",compressible:!0},"application/tnauthlist":{source:"iana"},"application/token-introspection+jwt":{source:"iana"},"application/toml":{compressible:!0,extensions:["toml"]},"application/trickle-ice-sdpfrag":{source:"iana"},"application/trig":{source:"iana",extensions:["trig"]},"application/ttml+xml":{source:"iana",compressible:!0,extensions:["ttml"]},"application/tve-trigger":{source:"iana"},"application/tzif":{source:"iana"},"application/tzif-leap":{source:"iana"},"application/ubjson":{compressible:!1,extensions:["ubj"]},"application/ulpfec":{source:"iana"},"application/urc-grpsheet+xml":{source:"iana",compressible:!0},"application/urc-ressheet+xml":{source:"iana",compressible:!0,extensions:["rsheet"]},"application/urc-targetdesc+xml":{source:"iana",compressible:!0,extensions:["td"]},"application/urc-uisocketdesc+xml":{source:"iana",compressible:!0},"application/vcard+json":{source:"iana",compressible:!0},"application/vcard+xml":{source:"iana",compressible:!0},"application/vemmi":{source:"iana"},"application/vividence.scriptfile":{source:"apache"},"application/vnd.1000minds.decision-model+xml":{source:"iana",compressible:!0,extensions:["1km"]},"application/vnd.3gpp-prose+xml":{source:"iana",compressible:!0},"application/vnd.3gpp-prose-pc3ch+xml":{source:"iana",compressible:!0},"application/vnd.3gpp-v2x-local-service-information":{source:"iana"},"application/vnd.3gpp.5gnas":{source:"iana"},"application/vnd.3gpp.access-transfer-events+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.bsf+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.gmop+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.gtpc":{source:"iana"},"application/vnd.3gpp.interworking-data":{source:"iana"},"application/vnd.3gpp.lpp":{source:"iana"},"application/vnd.3gpp.mc-signalling-ear":{source:"iana"},"application/vnd.3gpp.mcdata-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-payload":{source:"iana"},"application/vnd.3gpp.mcdata-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-signalling":{source:"iana"},"application/vnd.3gpp.mcdata-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-floor-request+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-location-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-mbms-usage-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-signed+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-ue-init-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-affiliation-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-location-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-mbms-usage-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-transmission-request+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mid-call+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.ngap":{source:"iana"},"application/vnd.3gpp.pfcp":{source:"iana"},"application/vnd.3gpp.pic-bw-large":{source:"iana",extensions:["plb"]},"application/vnd.3gpp.pic-bw-small":{source:"iana",extensions:["psb"]},"application/vnd.3gpp.pic-bw-var":{source:"iana",extensions:["pvb"]},"application/vnd.3gpp.s1ap":{source:"iana"},"application/vnd.3gpp.sms":{source:"iana"},"application/vnd.3gpp.sms+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.srvcc-ext+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.srvcc-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.state-and-event-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.ussd+xml":{source:"iana",compressible:!0},"application/vnd.3gpp2.bcmcsinfo+xml":{source:"iana",compressible:!0},"application/vnd.3gpp2.sms":{source:"iana"},"application/vnd.3gpp2.tcap":{source:"iana",extensions:["tcap"]},"application/vnd.3lightssoftware.imagescal":{source:"iana"},"application/vnd.3m.post-it-notes":{source:"iana",extensions:["pwn"]},"application/vnd.accpac.simply.aso":{source:"iana",extensions:["aso"]},"application/vnd.accpac.simply.imp":{source:"iana",extensions:["imp"]},"application/vnd.acucobol":{source:"iana",extensions:["acu"]},"application/vnd.acucorp":{source:"iana",extensions:["atc","acutc"]},"application/vnd.adobe.air-application-installer-package+zip":{source:"apache",compressible:!1,extensions:["air"]},"application/vnd.adobe.flash.movie":{source:"iana"},"application/vnd.adobe.formscentral.fcdt":{source:"iana",extensions:["fcdt"]},"application/vnd.adobe.fxp":{source:"iana",extensions:["fxp","fxpl"]},"application/vnd.adobe.partial-upload":{source:"iana"},"application/vnd.adobe.xdp+xml":{source:"iana",compressible:!0,extensions:["xdp"]},"application/vnd.adobe.xfdf":{source:"iana",extensions:["xfdf"]},"application/vnd.aether.imp":{source:"iana"},"application/vnd.afpc.afplinedata":{source:"iana"},"application/vnd.afpc.afplinedata-pagedef":{source:"iana"},"application/vnd.afpc.cmoca-cmresource":{source:"iana"},"application/vnd.afpc.foca-charset":{source:"iana"},"application/vnd.afpc.foca-codedfont":{source:"iana"},"application/vnd.afpc.foca-codepage":{source:"iana"},"application/vnd.afpc.modca":{source:"iana"},"application/vnd.afpc.modca-cmtable":{source:"iana"},"application/vnd.afpc.modca-formdef":{source:"iana"},"application/vnd.afpc.modca-mediummap":{source:"iana"},"application/vnd.afpc.modca-objectcontainer":{source:"iana"},"application/vnd.afpc.modca-overlay":{source:"iana"},"application/vnd.afpc.modca-pagesegment":{source:"iana"},"application/vnd.age":{source:"iana",extensions:["age"]},"application/vnd.ah-barcode":{source:"iana"},"application/vnd.ahead.space":{source:"iana",extensions:["ahead"]},"application/vnd.airzip.filesecure.azf":{source:"iana",extensions:["azf"]},"application/vnd.airzip.filesecure.azs":{source:"iana",extensions:["azs"]},"application/vnd.amadeus+json":{source:"iana",compressible:!0},"application/vnd.amazon.ebook":{source:"apache",extensions:["azw"]},"application/vnd.amazon.mobi8-ebook":{source:"iana"},"application/vnd.americandynamics.acc":{source:"iana",extensions:["acc"]},"application/vnd.amiga.ami":{source:"iana",extensions:["ami"]},"application/vnd.amundsen.maze+xml":{source:"iana",compressible:!0},"application/vnd.android.ota":{source:"iana"},"application/vnd.android.package-archive":{source:"apache",compressible:!1,extensions:["apk"]},"application/vnd.anki":{source:"iana"},"application/vnd.anser-web-certificate-issue-initiation":{source:"iana",extensions:["cii"]},"application/vnd.anser-web-funds-transfer-initiation":{source:"apache",extensions:["fti"]},"application/vnd.antix.game-component":{source:"iana",extensions:["atx"]},"application/vnd.apache.arrow.file":{source:"iana"},"application/vnd.apache.arrow.stream":{source:"iana"},"application/vnd.apache.thrift.binary":{source:"iana"},"application/vnd.apache.thrift.compact":{source:"iana"},"application/vnd.apache.thrift.json":{source:"iana"},"application/vnd.api+json":{source:"iana",compressible:!0},"application/vnd.aplextor.warrp+json":{source:"iana",compressible:!0},"application/vnd.apothekende.reservation+json":{source:"iana",compressible:!0},"application/vnd.apple.installer+xml":{source:"iana",compressible:!0,extensions:["mpkg"]},"application/vnd.apple.keynote":{source:"iana",extensions:["key"]},"application/vnd.apple.mpegurl":{source:"iana",extensions:["m3u8"]},"application/vnd.apple.numbers":{source:"iana",extensions:["numbers"]},"application/vnd.apple.pages":{source:"iana",extensions:["pages"]},"application/vnd.apple.pkpass":{compressible:!1,extensions:["pkpass"]},"application/vnd.arastra.swi":{source:"iana"},"application/vnd.aristanetworks.swi":{source:"iana",extensions:["swi"]},"application/vnd.artisan+json":{source:"iana",compressible:!0},"application/vnd.artsquare":{source:"iana"},"application/vnd.astraea-software.iota":{source:"iana",extensions:["iota"]},"application/vnd.audiograph":{source:"iana",extensions:["aep"]},"application/vnd.autopackage":{source:"iana"},"application/vnd.avalon+json":{source:"iana",compressible:!0},"application/vnd.avistar+xml":{source:"iana",compressible:!0},"application/vnd.balsamiq.bmml+xml":{source:"iana",compressible:!0,extensions:["bmml"]},"application/vnd.balsamiq.bmpr":{source:"iana"},"application/vnd.banana-accounting":{source:"iana"},"application/vnd.bbf.usp.error":{source:"iana"},"application/vnd.bbf.usp.msg":{source:"iana"},"application/vnd.bbf.usp.msg+json":{source:"iana",compressible:!0},"application/vnd.bekitzur-stech+json":{source:"iana",compressible:!0},"application/vnd.bint.med-content":{source:"iana"},"application/vnd.biopax.rdf+xml":{source:"iana",compressible:!0},"application/vnd.blink-idb-value-wrapper":{source:"iana"},"application/vnd.blueice.multipass":{source:"iana",extensions:["mpm"]},"application/vnd.bluetooth.ep.oob":{source:"iana"},"application/vnd.bluetooth.le.oob":{source:"iana"},"application/vnd.bmi":{source:"iana",extensions:["bmi"]},"application/vnd.bpf":{source:"iana"},"application/vnd.bpf3":{source:"iana"},"application/vnd.businessobjects":{source:"iana",extensions:["rep"]},"application/vnd.byu.uapi+json":{source:"iana",compressible:!0},"application/vnd.cab-jscript":{source:"iana"},"application/vnd.canon-cpdl":{source:"iana"},"application/vnd.canon-lips":{source:"iana"},"application/vnd.capasystems-pg+json":{source:"iana",compressible:!0},"application/vnd.cendio.thinlinc.clientconf":{source:"iana"},"application/vnd.century-systems.tcp_stream":{source:"iana"},"application/vnd.chemdraw+xml":{source:"iana",compressible:!0,extensions:["cdxml"]},"application/vnd.chess-pgn":{source:"iana"},"application/vnd.chipnuts.karaoke-mmd":{source:"iana",extensions:["mmd"]},"application/vnd.ciedi":{source:"iana"},"application/vnd.cinderella":{source:"iana",extensions:["cdy"]},"application/vnd.cirpack.isdn-ext":{source:"iana"},"application/vnd.citationstyles.style+xml":{source:"iana",compressible:!0,extensions:["csl"]},"application/vnd.claymore":{source:"iana",extensions:["cla"]},"application/vnd.cloanto.rp9":{source:"iana",extensions:["rp9"]},"application/vnd.clonk.c4group":{source:"iana",extensions:["c4g","c4d","c4f","c4p","c4u"]},"application/vnd.cluetrust.cartomobile-config":{source:"iana",extensions:["c11amc"]},"application/vnd.cluetrust.cartomobile-config-pkg":{source:"iana",extensions:["c11amz"]},"application/vnd.coffeescript":{source:"iana"},"application/vnd.collabio.xodocuments.document":{source:"iana"},"application/vnd.collabio.xodocuments.document-template":{source:"iana"},"application/vnd.collabio.xodocuments.presentation":{source:"iana"},"application/vnd.collabio.xodocuments.presentation-template":{source:"iana"},"application/vnd.collabio.xodocuments.spreadsheet":{source:"iana"},"application/vnd.collabio.xodocuments.spreadsheet-template":{source:"iana"},"application/vnd.collection+json":{source:"iana",compressible:!0},"application/vnd.collection.doc+json":{source:"iana",compressible:!0},"application/vnd.collection.next+json":{source:"iana",compressible:!0},"application/vnd.comicbook+zip":{source:"iana",compressible:!1},"application/vnd.comicbook-rar":{source:"iana"},"application/vnd.commerce-battelle":{source:"iana"},"application/vnd.commonspace":{source:"iana",extensions:["csp"]},"application/vnd.contact.cmsg":{source:"iana",extensions:["cdbcmsg"]},"application/vnd.coreos.ignition+json":{source:"iana",compressible:!0},"application/vnd.cosmocaller":{source:"iana",extensions:["cmc"]},"application/vnd.crick.clicker":{source:"iana",extensions:["clkx"]},"application/vnd.crick.clicker.keyboard":{source:"iana",extensions:["clkk"]},"application/vnd.crick.clicker.palette":{source:"iana",extensions:["clkp"]},"application/vnd.crick.clicker.template":{source:"iana",extensions:["clkt"]},"application/vnd.crick.clicker.wordbank":{source:"iana",extensions:["clkw"]},"application/vnd.criticaltools.wbs+xml":{source:"iana",compressible:!0,extensions:["wbs"]},"application/vnd.cryptii.pipe+json":{source:"iana",compressible:!0},"application/vnd.crypto-shade-file":{source:"iana"},"application/vnd.cryptomator.encrypted":{source:"iana"},"application/vnd.cryptomator.vault":{source:"iana"},"application/vnd.ctc-posml":{source:"iana",extensions:["pml"]},"application/vnd.ctct.ws+xml":{source:"iana",compressible:!0},"application/vnd.cups-pdf":{source:"iana"},"application/vnd.cups-postscript":{source:"iana"},"application/vnd.cups-ppd":{source:"iana",extensions:["ppd"]},"application/vnd.cups-raster":{source:"iana"},"application/vnd.cups-raw":{source:"iana"},"application/vnd.curl":{source:"iana"},"application/vnd.curl.car":{source:"apache",extensions:["car"]},"application/vnd.curl.pcurl":{source:"apache",extensions:["pcurl"]},"application/vnd.cyan.dean.root+xml":{source:"iana",compressible:!0},"application/vnd.cybank":{source:"iana"},"application/vnd.cyclonedx+json":{source:"iana",compressible:!0},"application/vnd.cyclonedx+xml":{source:"iana",compressible:!0},"application/vnd.d2l.coursepackage1p0+zip":{source:"iana",compressible:!1},"application/vnd.d3m-dataset":{source:"iana"},"application/vnd.d3m-problem":{source:"iana"},"application/vnd.dart":{source:"iana",compressible:!0,extensions:["dart"]},"application/vnd.data-vision.rdz":{source:"iana",extensions:["rdz"]},"application/vnd.datapackage+json":{source:"iana",compressible:!0},"application/vnd.dataresource+json":{source:"iana",compressible:!0},"application/vnd.dbf":{source:"iana",extensions:["dbf"]},"application/vnd.debian.binary-package":{source:"iana"},"application/vnd.dece.data":{source:"iana",extensions:["uvf","uvvf","uvd","uvvd"]},"application/vnd.dece.ttml+xml":{source:"iana",compressible:!0,extensions:["uvt","uvvt"]},"application/vnd.dece.unspecified":{source:"iana",extensions:["uvx","uvvx"]},"application/vnd.dece.zip":{source:"iana",extensions:["uvz","uvvz"]},"application/vnd.denovo.fcselayout-link":{source:"iana",extensions:["fe_launch"]},"application/vnd.desmume.movie":{source:"iana"},"application/vnd.dir-bi.plate-dl-nosuffix":{source:"iana"},"application/vnd.dm.delegation+xml":{source:"iana",compressible:!0},"application/vnd.dna":{source:"iana",extensions:["dna"]},"application/vnd.document+json":{source:"iana",compressible:!0},"application/vnd.dolby.mlp":{source:"apache",extensions:["mlp"]},"application/vnd.dolby.mobile.1":{source:"iana"},"application/vnd.dolby.mobile.2":{source:"iana"},"application/vnd.doremir.scorecloud-binary-document":{source:"iana"},"application/vnd.dpgraph":{source:"iana",extensions:["dpg"]},"application/vnd.dreamfactory":{source:"iana",extensions:["dfac"]},"application/vnd.drive+json":{source:"iana",compressible:!0},"application/vnd.ds-keypoint":{source:"apache",extensions:["kpxx"]},"application/vnd.dtg.local":{source:"iana"},"application/vnd.dtg.local.flash":{source:"iana"},"application/vnd.dtg.local.html":{source:"iana"},"application/vnd.dvb.ait":{source:"iana",extensions:["ait"]},"application/vnd.dvb.dvbisl+xml":{source:"iana",compressible:!0},"application/vnd.dvb.dvbj":{source:"iana"},"application/vnd.dvb.esgcontainer":{source:"iana"},"application/vnd.dvb.ipdcdftnotifaccess":{source:"iana"},"application/vnd.dvb.ipdcesgaccess":{source:"iana"},"application/vnd.dvb.ipdcesgaccess2":{source:"iana"},"application/vnd.dvb.ipdcesgpdd":{source:"iana"},"application/vnd.dvb.ipdcroaming":{source:"iana"},"application/vnd.dvb.iptv.alfec-base":{source:"iana"},"application/vnd.dvb.iptv.alfec-enhancement":{source:"iana"},"application/vnd.dvb.notif-aggregate-root+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-container+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-generic+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-msglist+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-registration-request+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-registration-response+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-init+xml":{source:"iana",compressible:!0},"application/vnd.dvb.pfr":{source:"iana"},"application/vnd.dvb.service":{source:"iana",extensions:["svc"]},"application/vnd.dxr":{source:"iana"},"application/vnd.dynageo":{source:"iana",extensions:["geo"]},"application/vnd.dzr":{source:"iana"},"application/vnd.easykaraoke.cdgdownload":{source:"iana"},"application/vnd.ecdis-update":{source:"iana"},"application/vnd.ecip.rlp":{source:"iana"},"application/vnd.eclipse.ditto+json":{source:"iana",compressible:!0},"application/vnd.ecowin.chart":{source:"iana",extensions:["mag"]},"application/vnd.ecowin.filerequest":{source:"iana"},"application/vnd.ecowin.fileupdate":{source:"iana"},"application/vnd.ecowin.series":{source:"iana"},"application/vnd.ecowin.seriesrequest":{source:"iana"},"application/vnd.ecowin.seriesupdate":{source:"iana"},"application/vnd.efi.img":{source:"iana"},"application/vnd.efi.iso":{source:"iana"},"application/vnd.emclient.accessrequest+xml":{source:"iana",compressible:!0},"application/vnd.enliven":{source:"iana",extensions:["nml"]},"application/vnd.enphase.envoy":{source:"iana"},"application/vnd.eprints.data+xml":{source:"iana",compressible:!0},"application/vnd.epson.esf":{source:"iana",extensions:["esf"]},"application/vnd.epson.msf":{source:"iana",extensions:["msf"]},"application/vnd.epson.quickanime":{source:"iana",extensions:["qam"]},"application/vnd.epson.salt":{source:"iana",extensions:["slt"]},"application/vnd.epson.ssf":{source:"iana",extensions:["ssf"]},"application/vnd.ericsson.quickcall":{source:"iana"},"application/vnd.espass-espass+zip":{source:"iana",compressible:!1},"application/vnd.eszigno3+xml":{source:"iana",compressible:!0,extensions:["es3","et3"]},"application/vnd.etsi.aoc+xml":{source:"iana",compressible:!0},"application/vnd.etsi.asic-e+zip":{source:"iana",compressible:!1},"application/vnd.etsi.asic-s+zip":{source:"iana",compressible:!1},"application/vnd.etsi.cug+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvcommand+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvdiscovery+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvprofile+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-bc+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-cod+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-npvr+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvservice+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsync+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvueprofile+xml":{source:"iana",compressible:!0},"application/vnd.etsi.mcid+xml":{source:"iana",compressible:!0},"application/vnd.etsi.mheg5":{source:"iana"},"application/vnd.etsi.overload-control-policy-dataset+xml":{source:"iana",compressible:!0},"application/vnd.etsi.pstn+xml":{source:"iana",compressible:!0},"application/vnd.etsi.sci+xml":{source:"iana",compressible:!0},"application/vnd.etsi.simservs+xml":{source:"iana",compressible:!0},"application/vnd.etsi.timestamp-token":{source:"iana"},"application/vnd.etsi.tsl+xml":{source:"iana",compressible:!0},"application/vnd.etsi.tsl.der":{source:"iana"},"application/vnd.eu.kasparian.car+json":{source:"iana",compressible:!0},"application/vnd.eudora.data":{source:"iana"},"application/vnd.evolv.ecig.profile":{source:"iana"},"application/vnd.evolv.ecig.settings":{source:"iana"},"application/vnd.evolv.ecig.theme":{source:"iana"},"application/vnd.exstream-empower+zip":{source:"iana",compressible:!1},"application/vnd.exstream-package":{source:"iana"},"application/vnd.ezpix-album":{source:"iana",extensions:["ez2"]},"application/vnd.ezpix-package":{source:"iana",extensions:["ez3"]},"application/vnd.f-secure.mobile":{source:"iana"},"application/vnd.familysearch.gedcom+zip":{source:"iana",compressible:!1},"application/vnd.fastcopy-disk-image":{source:"iana"},"application/vnd.fdf":{source:"iana",extensions:["fdf"]},"application/vnd.fdsn.mseed":{source:"iana",extensions:["mseed"]},"application/vnd.fdsn.seed":{source:"iana",extensions:["seed","dataless"]},"application/vnd.ffsns":{source:"iana"},"application/vnd.ficlab.flb+zip":{source:"iana",compressible:!1},"application/vnd.filmit.zfc":{source:"iana"},"application/vnd.fints":{source:"iana"},"application/vnd.firemonkeys.cloudcell":{source:"iana"},"application/vnd.flographit":{source:"iana",extensions:["gph"]},"application/vnd.fluxtime.clip":{source:"iana",extensions:["ftc"]},"application/vnd.font-fontforge-sfd":{source:"iana"},"application/vnd.framemaker":{source:"iana",extensions:["fm","frame","maker","book"]},"application/vnd.frogans.fnc":{source:"iana",extensions:["fnc"]},"application/vnd.frogans.ltf":{source:"iana",extensions:["ltf"]},"application/vnd.fsc.weblaunch":{source:"iana",extensions:["fsc"]},"application/vnd.fujifilm.fb.docuworks":{source:"iana"},"application/vnd.fujifilm.fb.docuworks.binder":{source:"iana"},"application/vnd.fujifilm.fb.docuworks.container":{source:"iana"},"application/vnd.fujifilm.fb.jfi+xml":{source:"iana",compressible:!0},"application/vnd.fujitsu.oasys":{source:"iana",extensions:["oas"]},"application/vnd.fujitsu.oasys2":{source:"iana",extensions:["oa2"]},"application/vnd.fujitsu.oasys3":{source:"iana",extensions:["oa3"]},"application/vnd.fujitsu.oasysgp":{source:"iana",extensions:["fg5"]},"application/vnd.fujitsu.oasysprs":{source:"iana",extensions:["bh2"]},"application/vnd.fujixerox.art-ex":{source:"iana"},"application/vnd.fujixerox.art4":{source:"iana"},"application/vnd.fujixerox.ddd":{source:"iana",extensions:["ddd"]},"application/vnd.fujixerox.docuworks":{source:"iana",extensions:["xdw"]},"application/vnd.fujixerox.docuworks.binder":{source:"iana",extensions:["xbd"]},"application/vnd.fujixerox.docuworks.container":{source:"iana"},"application/vnd.fujixerox.hbpl":{source:"iana"},"application/vnd.fut-misnet":{source:"iana"},"application/vnd.futoin+cbor":{source:"iana"},"application/vnd.futoin+json":{source:"iana",compressible:!0},"application/vnd.fuzzysheet":{source:"iana",extensions:["fzs"]},"application/vnd.genomatix.tuxedo":{source:"iana",extensions:["txd"]},"application/vnd.gentics.grd+json":{source:"iana",compressible:!0},"application/vnd.geo+json":{source:"iana",compressible:!0},"application/vnd.geocube+xml":{source:"iana",compressible:!0},"application/vnd.geogebra.file":{source:"iana",extensions:["ggb"]},"application/vnd.geogebra.slides":{source:"iana"},"application/vnd.geogebra.tool":{source:"iana",extensions:["ggt"]},"application/vnd.geometry-explorer":{source:"iana",extensions:["gex","gre"]},"application/vnd.geonext":{source:"iana",extensions:["gxt"]},"application/vnd.geoplan":{source:"iana",extensions:["g2w"]},"application/vnd.geospace":{source:"iana",extensions:["g3w"]},"application/vnd.gerber":{source:"iana"},"application/vnd.globalplatform.card-content-mgt":{source:"iana"},"application/vnd.globalplatform.card-content-mgt-response":{source:"iana"},"application/vnd.gmx":{source:"iana",extensions:["gmx"]},"application/vnd.google-apps.document":{compressible:!1,extensions:["gdoc"]},"application/vnd.google-apps.presentation":{compressible:!1,extensions:["gslides"]},"application/vnd.google-apps.spreadsheet":{compressible:!1,extensions:["gsheet"]},"application/vnd.google-earth.kml+xml":{source:"iana",compressible:!0,extensions:["kml"]},"application/vnd.google-earth.kmz":{source:"iana",compressible:!1,extensions:["kmz"]},"application/vnd.gov.sk.e-form+xml":{source:"iana",compressible:!0},"application/vnd.gov.sk.e-form+zip":{source:"iana",compressible:!1},"application/vnd.gov.sk.xmldatacontainer+xml":{source:"iana",compressible:!0},"application/vnd.grafeq":{source:"iana",extensions:["gqf","gqs"]},"application/vnd.gridmp":{source:"iana"},"application/vnd.groove-account":{source:"iana",extensions:["gac"]},"application/vnd.groove-help":{source:"iana",extensions:["ghf"]},"application/vnd.groove-identity-message":{source:"iana",extensions:["gim"]},"application/vnd.groove-injector":{source:"iana",extensions:["grv"]},"application/vnd.groove-tool-message":{source:"iana",extensions:["gtm"]},"application/vnd.groove-tool-template":{source:"iana",extensions:["tpl"]},"application/vnd.groove-vcard":{source:"iana",extensions:["vcg"]},"application/vnd.hal+json":{source:"iana",compressible:!0},"application/vnd.hal+xml":{source:"iana",compressible:!0,extensions:["hal"]},"application/vnd.handheld-entertainment+xml":{source:"iana",compressible:!0,extensions:["zmm"]},"application/vnd.hbci":{source:"iana",extensions:["hbci"]},"application/vnd.hc+json":{source:"iana",compressible:!0},"application/vnd.hcl-bireports":{source:"iana"},"application/vnd.hdt":{source:"iana"},"application/vnd.heroku+json":{source:"iana",compressible:!0},"application/vnd.hhe.lesson-player":{source:"iana",extensions:["les"]},"application/vnd.hl7cda+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.hl7v2+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.hp-hpgl":{source:"iana",extensions:["hpgl"]},"application/vnd.hp-hpid":{source:"iana",extensions:["hpid"]},"application/vnd.hp-hps":{source:"iana",extensions:["hps"]},"application/vnd.hp-jlyt":{source:"iana",extensions:["jlt"]},"application/vnd.hp-pcl":{source:"iana",extensions:["pcl"]},"application/vnd.hp-pclxl":{source:"iana",extensions:["pclxl"]},"application/vnd.httphone":{source:"iana"},"application/vnd.hydrostatix.sof-data":{source:"iana",extensions:["sfd-hdstx"]},"application/vnd.hyper+json":{source:"iana",compressible:!0},"application/vnd.hyper-item+json":{source:"iana",compressible:!0},"application/vnd.hyperdrive+json":{source:"iana",compressible:!0},"application/vnd.hzn-3d-crossword":{source:"iana"},"application/vnd.ibm.afplinedata":{source:"iana"},"application/vnd.ibm.electronic-media":{source:"iana"},"application/vnd.ibm.minipay":{source:"iana",extensions:["mpy"]},"application/vnd.ibm.modcap":{source:"iana",extensions:["afp","listafp","list3820"]},"application/vnd.ibm.rights-management":{source:"iana",extensions:["irm"]},"application/vnd.ibm.secure-container":{source:"iana",extensions:["sc"]},"application/vnd.iccprofile":{source:"iana",extensions:["icc","icm"]},"application/vnd.ieee.1905":{source:"iana"},"application/vnd.igloader":{source:"iana",extensions:["igl"]},"application/vnd.imagemeter.folder+zip":{source:"iana",compressible:!1},"application/vnd.imagemeter.image+zip":{source:"iana",compressible:!1},"application/vnd.immervision-ivp":{source:"iana",extensions:["ivp"]},"application/vnd.immervision-ivu":{source:"iana",extensions:["ivu"]},"application/vnd.ims.imsccv1p1":{source:"iana"},"application/vnd.ims.imsccv1p2":{source:"iana"},"application/vnd.ims.imsccv1p3":{source:"iana"},"application/vnd.ims.lis.v2.result+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolconsumerprofile+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolproxy+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolproxy.id+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolsettings+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolsettings.simple+json":{source:"iana",compressible:!0},"application/vnd.informedcontrol.rms+xml":{source:"iana",compressible:!0},"application/vnd.informix-visionary":{source:"iana"},"application/vnd.infotech.project":{source:"iana"},"application/vnd.infotech.project+xml":{source:"iana",compressible:!0},"application/vnd.innopath.wamp.notification":{source:"iana"},"application/vnd.insors.igm":{source:"iana",extensions:["igm"]},"application/vnd.intercon.formnet":{source:"iana",extensions:["xpw","xpx"]},"application/vnd.intergeo":{source:"iana",extensions:["i2g"]},"application/vnd.intertrust.digibox":{source:"iana"},"application/vnd.intertrust.nncp":{source:"iana"},"application/vnd.intu.qbo":{source:"iana",extensions:["qbo"]},"application/vnd.intu.qfx":{source:"iana",extensions:["qfx"]},"application/vnd.iptc.g2.catalogitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.conceptitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.knowledgeitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.newsitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.newsmessage+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.packageitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.planningitem+xml":{source:"iana",compressible:!0},"application/vnd.ipunplugged.rcprofile":{source:"iana",extensions:["rcprofile"]},"application/vnd.irepository.package+xml":{source:"iana",compressible:!0,extensions:["irp"]},"application/vnd.is-xpr":{source:"iana",extensions:["xpr"]},"application/vnd.isac.fcs":{source:"iana",extensions:["fcs"]},"application/vnd.iso11783-10+zip":{source:"iana",compressible:!1},"application/vnd.jam":{source:"iana",extensions:["jam"]},"application/vnd.japannet-directory-service":{source:"iana"},"application/vnd.japannet-jpnstore-wakeup":{source:"iana"},"application/vnd.japannet-payment-wakeup":{source:"iana"},"application/vnd.japannet-registration":{source:"iana"},"application/vnd.japannet-registration-wakeup":{source:"iana"},"application/vnd.japannet-setstore-wakeup":{source:"iana"},"application/vnd.japannet-verification":{source:"iana"},"application/vnd.japannet-verification-wakeup":{source:"iana"},"application/vnd.jcp.javame.midlet-rms":{source:"iana",extensions:["rms"]},"application/vnd.jisp":{source:"iana",extensions:["jisp"]},"application/vnd.joost.joda-archive":{source:"iana",extensions:["joda"]},"application/vnd.jsk.isdn-ngn":{source:"iana"},"application/vnd.kahootz":{source:"iana",extensions:["ktz","ktr"]},"application/vnd.kde.karbon":{source:"iana",extensions:["karbon"]},"application/vnd.kde.kchart":{source:"iana",extensions:["chrt"]},"application/vnd.kde.kformula":{source:"iana",extensions:["kfo"]},"application/vnd.kde.kivio":{source:"iana",extensions:["flw"]},"application/vnd.kde.kontour":{source:"iana",extensions:["kon"]},"application/vnd.kde.kpresenter":{source:"iana",extensions:["kpr","kpt"]},"application/vnd.kde.kspread":{source:"iana",extensions:["ksp"]},"application/vnd.kde.kword":{source:"iana",extensions:["kwd","kwt"]},"application/vnd.kenameaapp":{source:"iana",extensions:["htke"]},"application/vnd.kidspiration":{source:"iana",extensions:["kia"]},"application/vnd.kinar":{source:"iana",extensions:["kne","knp"]},"application/vnd.koan":{source:"iana",extensions:["skp","skd","skt","skm"]},"application/vnd.kodak-descriptor":{source:"iana",extensions:["sse"]},"application/vnd.las":{source:"iana"},"application/vnd.las.las+json":{source:"iana",compressible:!0},"application/vnd.las.las+xml":{source:"iana",compressible:!0,extensions:["lasxml"]},"application/vnd.laszip":{source:"iana"},"application/vnd.leap+json":{source:"iana",compressible:!0},"application/vnd.liberty-request+xml":{source:"iana",compressible:!0},"application/vnd.llamagraphics.life-balance.desktop":{source:"iana",extensions:["lbd"]},"application/vnd.llamagraphics.life-balance.exchange+xml":{source:"iana",compressible:!0,extensions:["lbe"]},"application/vnd.logipipe.circuit+zip":{source:"iana",compressible:!1},"application/vnd.loom":{source:"iana"},"application/vnd.lotus-1-2-3":{source:"iana",extensions:["123"]},"application/vnd.lotus-approach":{source:"iana",extensions:["apr"]},"application/vnd.lotus-freelance":{source:"iana",extensions:["pre"]},"application/vnd.lotus-notes":{source:"iana",extensions:["nsf"]},"application/vnd.lotus-organizer":{source:"iana",extensions:["org"]},"application/vnd.lotus-screencam":{source:"iana",extensions:["scm"]},"application/vnd.lotus-wordpro":{source:"iana",extensions:["lwp"]},"application/vnd.macports.portpkg":{source:"iana",extensions:["portpkg"]},"application/vnd.mapbox-vector-tile":{source:"iana",extensions:["mvt"]},"application/vnd.marlin.drm.actiontoken+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.conftoken+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.license+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.mdcf":{source:"iana"},"application/vnd.mason+json":{source:"iana",compressible:!0},"application/vnd.maxar.archive.3tz+zip":{source:"iana",compressible:!1},"application/vnd.maxmind.maxmind-db":{source:"iana"},"application/vnd.mcd":{source:"iana",extensions:["mcd"]},"application/vnd.medcalcdata":{source:"iana",extensions:["mc1"]},"application/vnd.mediastation.cdkey":{source:"iana",extensions:["cdkey"]},"application/vnd.meridian-slingshot":{source:"iana"},"application/vnd.mfer":{source:"iana",extensions:["mwf"]},"application/vnd.mfmp":{source:"iana",extensions:["mfm"]},"application/vnd.micro+json":{source:"iana",compressible:!0},"application/vnd.micrografx.flo":{source:"iana",extensions:["flo"]},"application/vnd.micrografx.igx":{source:"iana",extensions:["igx"]},"application/vnd.microsoft.portable-executable":{source:"iana"},"application/vnd.microsoft.windows.thumbnail-cache":{source:"iana"},"application/vnd.miele+json":{source:"iana",compressible:!0},"application/vnd.mif":{source:"iana",extensions:["mif"]},"application/vnd.minisoft-hp3000-save":{source:"iana"},"application/vnd.mitsubishi.misty-guard.trustweb":{source:"iana"},"application/vnd.mobius.daf":{source:"iana",extensions:["daf"]},"application/vnd.mobius.dis":{source:"iana",extensions:["dis"]},"application/vnd.mobius.mbk":{source:"iana",extensions:["mbk"]},"application/vnd.mobius.mqy":{source:"iana",extensions:["mqy"]},"application/vnd.mobius.msl":{source:"iana",extensions:["msl"]},"application/vnd.mobius.plc":{source:"iana",extensions:["plc"]},"application/vnd.mobius.txf":{source:"iana",extensions:["txf"]},"application/vnd.mophun.application":{source:"iana",extensions:["mpn"]},"application/vnd.mophun.certificate":{source:"iana",extensions:["mpc"]},"application/vnd.motorola.flexsuite":{source:"iana"},"application/vnd.motorola.flexsuite.adsi":{source:"iana"},"application/vnd.motorola.flexsuite.fis":{source:"iana"},"application/vnd.motorola.flexsuite.gotap":{source:"iana"},"application/vnd.motorola.flexsuite.kmr":{source:"iana"},"application/vnd.motorola.flexsuite.ttc":{source:"iana"},"application/vnd.motorola.flexsuite.wem":{source:"iana"},"application/vnd.motorola.iprm":{source:"iana"},"application/vnd.mozilla.xul+xml":{source:"iana",compressible:!0,extensions:["xul"]},"application/vnd.ms-3mfdocument":{source:"iana"},"application/vnd.ms-artgalry":{source:"iana",extensions:["cil"]},"application/vnd.ms-asf":{source:"iana"},"application/vnd.ms-cab-compressed":{source:"iana",extensions:["cab"]},"application/vnd.ms-color.iccprofile":{source:"apache"},"application/vnd.ms-excel":{source:"iana",compressible:!1,extensions:["xls","xlm","xla","xlc","xlt","xlw"]},"application/vnd.ms-excel.addin.macroenabled.12":{source:"iana",extensions:["xlam"]},"application/vnd.ms-excel.sheet.binary.macroenabled.12":{source:"iana",extensions:["xlsb"]},"application/vnd.ms-excel.sheet.macroenabled.12":{source:"iana",extensions:["xlsm"]},"application/vnd.ms-excel.template.macroenabled.12":{source:"iana",extensions:["xltm"]},"application/vnd.ms-fontobject":{source:"iana",compressible:!0,extensions:["eot"]},"application/vnd.ms-htmlhelp":{source:"iana",extensions:["chm"]},"application/vnd.ms-ims":{source:"iana",extensions:["ims"]},"application/vnd.ms-lrm":{source:"iana",extensions:["lrm"]},"application/vnd.ms-office.activex+xml":{source:"iana",compressible:!0},"application/vnd.ms-officetheme":{source:"iana",extensions:["thmx"]},"application/vnd.ms-opentype":{source:"apache",compressible:!0},"application/vnd.ms-outlook":{compressible:!1,extensions:["msg"]},"application/vnd.ms-package.obfuscated-opentype":{source:"apache"},"application/vnd.ms-pki.seccat":{source:"apache",extensions:["cat"]},"application/vnd.ms-pki.stl":{source:"apache",extensions:["stl"]},"application/vnd.ms-playready.initiator+xml":{source:"iana",compressible:!0},"application/vnd.ms-powerpoint":{source:"iana",compressible:!1,extensions:["ppt","pps","pot"]},"application/vnd.ms-powerpoint.addin.macroenabled.12":{source:"iana",extensions:["ppam"]},"application/vnd.ms-powerpoint.presentation.macroenabled.12":{source:"iana",extensions:["pptm"]},"application/vnd.ms-powerpoint.slide.macroenabled.12":{source:"iana",extensions:["sldm"]},"application/vnd.ms-powerpoint.slideshow.macroenabled.12":{source:"iana",extensions:["ppsm"]},"application/vnd.ms-powerpoint.template.macroenabled.12":{source:"iana",extensions:["potm"]},"application/vnd.ms-printdevicecapabilities+xml":{source:"iana",compressible:!0},"application/vnd.ms-printing.printticket+xml":{source:"apache",compressible:!0},"application/vnd.ms-printschematicket+xml":{source:"iana",compressible:!0},"application/vnd.ms-project":{source:"iana",extensions:["mpp","mpt"]},"application/vnd.ms-tnef":{source:"iana"},"application/vnd.ms-windows.devicepairing":{source:"iana"},"application/vnd.ms-windows.nwprinting.oob":{source:"iana"},"application/vnd.ms-windows.printerpairing":{source:"iana"},"application/vnd.ms-windows.wsd.oob":{source:"iana"},"application/vnd.ms-wmdrm.lic-chlg-req":{source:"iana"},"application/vnd.ms-wmdrm.lic-resp":{source:"iana"},"application/vnd.ms-wmdrm.meter-chlg-req":{source:"iana"},"application/vnd.ms-wmdrm.meter-resp":{source:"iana"},"application/vnd.ms-word.document.macroenabled.12":{source:"iana",extensions:["docm"]},"application/vnd.ms-word.template.macroenabled.12":{source:"iana",extensions:["dotm"]},"application/vnd.ms-works":{source:"iana",extensions:["wps","wks","wcm","wdb"]},"application/vnd.ms-wpl":{source:"iana",extensions:["wpl"]},"application/vnd.ms-xpsdocument":{source:"iana",compressible:!1,extensions:["xps"]},"application/vnd.msa-disk-image":{source:"iana"},"application/vnd.mseq":{source:"iana",extensions:["mseq"]},"application/vnd.msign":{source:"iana"},"application/vnd.multiad.creator":{source:"iana"},"application/vnd.multiad.creator.cif":{source:"iana"},"application/vnd.music-niff":{source:"iana"},"application/vnd.musician":{source:"iana",extensions:["mus"]},"application/vnd.muvee.style":{source:"iana",extensions:["msty"]},"application/vnd.mynfc":{source:"iana",extensions:["taglet"]},"application/vnd.nacamar.ybrid+json":{source:"iana",compressible:!0},"application/vnd.ncd.control":{source:"iana"},"application/vnd.ncd.reference":{source:"iana"},"application/vnd.nearst.inv+json":{source:"iana",compressible:!0},"application/vnd.nebumind.line":{source:"iana"},"application/vnd.nervana":{source:"iana"},"application/vnd.netfpx":{source:"iana"},"application/vnd.neurolanguage.nlu":{source:"iana",extensions:["nlu"]},"application/vnd.nimn":{source:"iana"},"application/vnd.nintendo.nitro.rom":{source:"iana"},"application/vnd.nintendo.snes.rom":{source:"iana"},"application/vnd.nitf":{source:"iana",extensions:["ntf","nitf"]},"application/vnd.noblenet-directory":{source:"iana",extensions:["nnd"]},"application/vnd.noblenet-sealer":{source:"iana",extensions:["nns"]},"application/vnd.noblenet-web":{source:"iana",extensions:["nnw"]},"application/vnd.nokia.catalogs":{source:"iana"},"application/vnd.nokia.conml+wbxml":{source:"iana"},"application/vnd.nokia.conml+xml":{source:"iana",compressible:!0},"application/vnd.nokia.iptv.config+xml":{source:"iana",compressible:!0},"application/vnd.nokia.isds-radio-presets":{source:"iana"},"application/vnd.nokia.landmark+wbxml":{source:"iana"},"application/vnd.nokia.landmark+xml":{source:"iana",compressible:!0},"application/vnd.nokia.landmarkcollection+xml":{source:"iana",compressible:!0},"application/vnd.nokia.n-gage.ac+xml":{source:"iana",compressible:!0,extensions:["ac"]},"application/vnd.nokia.n-gage.data":{source:"iana",extensions:["ngdat"]},"application/vnd.nokia.n-gage.symbian.install":{source:"iana",extensions:["n-gage"]},"application/vnd.nokia.ncd":{source:"iana"},"application/vnd.nokia.pcd+wbxml":{source:"iana"},"application/vnd.nokia.pcd+xml":{source:"iana",compressible:!0},"application/vnd.nokia.radio-preset":{source:"iana",extensions:["rpst"]},"application/vnd.nokia.radio-presets":{source:"iana",extensions:["rpss"]},"application/vnd.novadigm.edm":{source:"iana",extensions:["edm"]},"application/vnd.novadigm.edx":{source:"iana",extensions:["edx"]},"application/vnd.novadigm.ext":{source:"iana",extensions:["ext"]},"application/vnd.ntt-local.content-share":{source:"iana"},"application/vnd.ntt-local.file-transfer":{source:"iana"},"application/vnd.ntt-local.ogw_remote-access":{source:"iana"},"application/vnd.ntt-local.sip-ta_remote":{source:"iana"},"application/vnd.ntt-local.sip-ta_tcp_stream":{source:"iana"},"application/vnd.oasis.opendocument.chart":{source:"iana",extensions:["odc"]},"application/vnd.oasis.opendocument.chart-template":{source:"iana",extensions:["otc"]},"application/vnd.oasis.opendocument.database":{source:"iana",extensions:["odb"]},"application/vnd.oasis.opendocument.formula":{source:"iana",extensions:["odf"]},"application/vnd.oasis.opendocument.formula-template":{source:"iana",extensions:["odft"]},"application/vnd.oasis.opendocument.graphics":{source:"iana",compressible:!1,extensions:["odg"]},"application/vnd.oasis.opendocument.graphics-template":{source:"iana",extensions:["otg"]},"application/vnd.oasis.opendocument.image":{source:"iana",extensions:["odi"]},"application/vnd.oasis.opendocument.image-template":{source:"iana",extensions:["oti"]},"application/vnd.oasis.opendocument.presentation":{source:"iana",compressible:!1,extensions:["odp"]},"application/vnd.oasis.opendocument.presentation-template":{source:"iana",extensions:["otp"]},"application/vnd.oasis.opendocument.spreadsheet":{source:"iana",compressible:!1,extensions:["ods"]},"application/vnd.oasis.opendocument.spreadsheet-template":{source:"iana",extensions:["ots"]},"application/vnd.oasis.opendocument.text":{source:"iana",compressible:!1,extensions:["odt"]},"application/vnd.oasis.opendocument.text-master":{source:"iana",extensions:["odm"]},"application/vnd.oasis.opendocument.text-template":{source:"iana",extensions:["ott"]},"application/vnd.oasis.opendocument.text-web":{source:"iana",extensions:["oth"]},"application/vnd.obn":{source:"iana"},"application/vnd.ocf+cbor":{source:"iana"},"application/vnd.oci.image.manifest.v1+json":{source:"iana",compressible:!0},"application/vnd.oftn.l10n+json":{source:"iana",compressible:!0},"application/vnd.oipf.contentaccessdownload+xml":{source:"iana",compressible:!0},"application/vnd.oipf.contentaccessstreaming+xml":{source:"iana",compressible:!0},"application/vnd.oipf.cspg-hexbinary":{source:"iana"},"application/vnd.oipf.dae.svg+xml":{source:"iana",compressible:!0},"application/vnd.oipf.dae.xhtml+xml":{source:"iana",compressible:!0},"application/vnd.oipf.mippvcontrolmessage+xml":{source:"iana",compressible:!0},"application/vnd.oipf.pae.gem":{source:"iana"},"application/vnd.oipf.spdiscovery+xml":{source:"iana",compressible:!0},"application/vnd.oipf.spdlist+xml":{source:"iana",compressible:!0},"application/vnd.oipf.ueprofile+xml":{source:"iana",compressible:!0},"application/vnd.oipf.userprofile+xml":{source:"iana",compressible:!0},"application/vnd.olpc-sugar":{source:"iana",extensions:["xo"]},"application/vnd.oma-scws-config":{source:"iana"},"application/vnd.oma-scws-http-request":{source:"iana"},"application/vnd.oma-scws-http-response":{source:"iana"},"application/vnd.oma.bcast.associated-procedure-parameter+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.drm-trigger+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.imd+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.ltkm":{source:"iana"},"application/vnd.oma.bcast.notification+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.provisioningtrigger":{source:"iana"},"application/vnd.oma.bcast.sgboot":{source:"iana"},"application/vnd.oma.bcast.sgdd+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.sgdu":{source:"iana"},"application/vnd.oma.bcast.simple-symbol-container":{source:"iana"},"application/vnd.oma.bcast.smartcard-trigger+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.sprov+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.stkm":{source:"iana"},"application/vnd.oma.cab-address-book+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-feature-handler+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-pcc+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-subs-invite+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-user-prefs+xml":{source:"iana",compressible:!0},"application/vnd.oma.dcd":{source:"iana"},"application/vnd.oma.dcdc":{source:"iana"},"application/vnd.oma.dd2+xml":{source:"iana",compressible:!0,extensions:["dd2"]},"application/vnd.oma.drm.risd+xml":{source:"iana",compressible:!0},"application/vnd.oma.group-usage-list+xml":{source:"iana",compressible:!0},"application/vnd.oma.lwm2m+cbor":{source:"iana"},"application/vnd.oma.lwm2m+json":{source:"iana",compressible:!0},"application/vnd.oma.lwm2m+tlv":{source:"iana"},"application/vnd.oma.pal+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.detailed-progress-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.final-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.groups+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.invocation-descriptor+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.optimized-progress-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.push":{source:"iana"},"application/vnd.oma.scidm.messages+xml":{source:"iana",compressible:!0},"application/vnd.oma.xcap-directory+xml":{source:"iana",compressible:!0},"application/vnd.omads-email+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omads-file+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omads-folder+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omaloc-supl-init":{source:"iana"},"application/vnd.onepager":{source:"iana"},"application/vnd.onepagertamp":{source:"iana"},"application/vnd.onepagertamx":{source:"iana"},"application/vnd.onepagertat":{source:"iana"},"application/vnd.onepagertatp":{source:"iana"},"application/vnd.onepagertatx":{source:"iana"},"application/vnd.openblox.game+xml":{source:"iana",compressible:!0,extensions:["obgx"]},"application/vnd.openblox.game-binary":{source:"iana"},"application/vnd.openeye.oeb":{source:"iana"},"application/vnd.openofficeorg.extension":{source:"apache",extensions:["oxt"]},"application/vnd.openstreetmap.data+xml":{source:"iana",compressible:!0,extensions:["osm"]},"application/vnd.opentimestamps.ots":{source:"iana"},"application/vnd.openxmlformats-officedocument.custom-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.customxmlproperties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawing+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.chart+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramcolors+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramdata+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramlayout+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramstyle+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.extended-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.handoutmaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.notesmaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.notesslide+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.presentation":{source:"iana",compressible:!1,extensions:["pptx"]},"application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.presprops+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slide":{source:"iana",extensions:["sldx"]},"application/vnd.openxmlformats-officedocument.presentationml.slide+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slidelayout+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slidemaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slideshow":{source:"iana",extensions:["ppsx"]},"application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slideupdateinfo+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.tablestyles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.tags+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.template":{source:"iana",extensions:["potx"]},"application/vnd.openxmlformats-officedocument.presentationml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.externallink+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcachedefinition+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcacherecords+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivottable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.querytable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionheaders+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionlog+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedstrings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{source:"iana",compressible:!1,extensions:["xlsx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheetmetadata+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.tablesinglecells+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.template":{source:"iana",extensions:["xltx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.usernames+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.volatiledependencies+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.theme+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.themeoverride+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.vmldrawing":{source:"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.document":{source:"iana",compressible:!1,extensions:["docx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.fonttable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.template":{source:"iana",extensions:["dotx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.websettings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.core-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.relationships+xml":{source:"iana",compressible:!0},"application/vnd.oracle.resource+json":{source:"iana",compressible:!0},"application/vnd.orange.indata":{source:"iana"},"application/vnd.osa.netdeploy":{source:"iana"},"application/vnd.osgeo.mapguide.package":{source:"iana",extensions:["mgp"]},"application/vnd.osgi.bundle":{source:"iana"},"application/vnd.osgi.dp":{source:"iana",extensions:["dp"]},"application/vnd.osgi.subsystem":{source:"iana",extensions:["esa"]},"application/vnd.otps.ct-kip+xml":{source:"iana",compressible:!0},"application/vnd.oxli.countgraph":{source:"iana"},"application/vnd.pagerduty+json":{source:"iana",compressible:!0},"application/vnd.palm":{source:"iana",extensions:["pdb","pqa","oprc"]},"application/vnd.panoply":{source:"iana"},"application/vnd.paos.xml":{source:"iana"},"application/vnd.patentdive":{source:"iana"},"application/vnd.patientecommsdoc":{source:"iana"},"application/vnd.pawaafile":{source:"iana",extensions:["paw"]},"application/vnd.pcos":{source:"iana"},"application/vnd.pg.format":{source:"iana",extensions:["str"]},"application/vnd.pg.osasli":{source:"iana",extensions:["ei6"]},"application/vnd.piaccess.application-licence":{source:"iana"},"application/vnd.picsel":{source:"iana",extensions:["efif"]},"application/vnd.pmi.widget":{source:"iana",extensions:["wg"]},"application/vnd.poc.group-advertisement+xml":{source:"iana",compressible:!0},"application/vnd.pocketlearn":{source:"iana",extensions:["plf"]},"application/vnd.powerbuilder6":{source:"iana",extensions:["pbd"]},"application/vnd.powerbuilder6-s":{source:"iana"},"application/vnd.powerbuilder7":{source:"iana"},"application/vnd.powerbuilder7-s":{source:"iana"},"application/vnd.powerbuilder75":{source:"iana"},"application/vnd.powerbuilder75-s":{source:"iana"},"application/vnd.preminet":{source:"iana"},"application/vnd.previewsystems.box":{source:"iana",extensions:["box"]},"application/vnd.proteus.magazine":{source:"iana",extensions:["mgz"]},"application/vnd.psfs":{source:"iana"},"application/vnd.publishare-delta-tree":{source:"iana",extensions:["qps"]},"application/vnd.pvi.ptid1":{source:"iana",extensions:["ptid"]},"application/vnd.pwg-multiplexed":{source:"iana"},"application/vnd.pwg-xhtml-print+xml":{source:"iana",compressible:!0},"application/vnd.qualcomm.brew-app-res":{source:"iana"},"application/vnd.quarantainenet":{source:"iana"},"application/vnd.quark.quarkxpress":{source:"iana",extensions:["qxd","qxt","qwd","qwt","qxl","qxb"]},"application/vnd.quobject-quoxdocument":{source:"iana"},"application/vnd.radisys.moml+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-conf+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-conn+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-dialog+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-stream+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-conf+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-base+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-fax-detect+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-fax-sendrecv+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-group+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-speech+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-transform+xml":{source:"iana",compressible:!0},"application/vnd.rainstor.data":{source:"iana"},"application/vnd.rapid":{source:"iana"},"application/vnd.rar":{source:"iana",extensions:["rar"]},"application/vnd.realvnc.bed":{source:"iana",extensions:["bed"]},"application/vnd.recordare.musicxml":{source:"iana",extensions:["mxl"]},"application/vnd.recordare.musicxml+xml":{source:"iana",compressible:!0,extensions:["musicxml"]},"application/vnd.renlearn.rlprint":{source:"iana"},"application/vnd.resilient.logic":{source:"iana"},"application/vnd.restful+json":{source:"iana",compressible:!0},"application/vnd.rig.cryptonote":{source:"iana",extensions:["cryptonote"]},"application/vnd.rim.cod":{source:"apache",extensions:["cod"]},"application/vnd.rn-realmedia":{source:"apache",extensions:["rm"]},"application/vnd.rn-realmedia-vbr":{source:"apache",extensions:["rmvb"]},"application/vnd.route66.link66+xml":{source:"iana",compressible:!0,extensions:["link66"]},"application/vnd.rs-274x":{source:"iana"},"application/vnd.ruckus.download":{source:"iana"},"application/vnd.s3sms":{source:"iana"},"application/vnd.sailingtracker.track":{source:"iana",extensions:["st"]},"application/vnd.sar":{source:"iana"},"application/vnd.sbm.cid":{source:"iana"},"application/vnd.sbm.mid2":{source:"iana"},"application/vnd.scribus":{source:"iana"},"application/vnd.sealed.3df":{source:"iana"},"application/vnd.sealed.csf":{source:"iana"},"application/vnd.sealed.doc":{source:"iana"},"application/vnd.sealed.eml":{source:"iana"},"application/vnd.sealed.mht":{source:"iana"},"application/vnd.sealed.net":{source:"iana"},"application/vnd.sealed.ppt":{source:"iana"},"application/vnd.sealed.tiff":{source:"iana"},"application/vnd.sealed.xls":{source:"iana"},"application/vnd.sealedmedia.softseal.html":{source:"iana"},"application/vnd.sealedmedia.softseal.pdf":{source:"iana"},"application/vnd.seemail":{source:"iana",extensions:["see"]},"application/vnd.seis+json":{source:"iana",compressible:!0},"application/vnd.sema":{source:"iana",extensions:["sema"]},"application/vnd.semd":{source:"iana",extensions:["semd"]},"application/vnd.semf":{source:"iana",extensions:["semf"]},"application/vnd.shade-save-file":{source:"iana"},"application/vnd.shana.informed.formdata":{source:"iana",extensions:["ifm"]},"application/vnd.shana.informed.formtemplate":{source:"iana",extensions:["itp"]},"application/vnd.shana.informed.interchange":{source:"iana",extensions:["iif"]},"application/vnd.shana.informed.package":{source:"iana",extensions:["ipk"]},"application/vnd.shootproof+json":{source:"iana",compressible:!0},"application/vnd.shopkick+json":{source:"iana",compressible:!0},"application/vnd.shp":{source:"iana"},"application/vnd.shx":{source:"iana"},"application/vnd.sigrok.session":{source:"iana"},"application/vnd.simtech-mindmapper":{source:"iana",extensions:["twd","twds"]},"application/vnd.siren+json":{source:"iana",compressible:!0},"application/vnd.smaf":{source:"iana",extensions:["mmf"]},"application/vnd.smart.notebook":{source:"iana"},"application/vnd.smart.teacher":{source:"iana",extensions:["teacher"]},"application/vnd.snesdev-page-table":{source:"iana"},"application/vnd.software602.filler.form+xml":{source:"iana",compressible:!0,extensions:["fo"]},"application/vnd.software602.filler.form-xml-zip":{source:"iana"},"application/vnd.solent.sdkm+xml":{source:"iana",compressible:!0,extensions:["sdkm","sdkd"]},"application/vnd.spotfire.dxp":{source:"iana",extensions:["dxp"]},"application/vnd.spotfire.sfs":{source:"iana",extensions:["sfs"]},"application/vnd.sqlite3":{source:"iana"},"application/vnd.sss-cod":{source:"iana"},"application/vnd.sss-dtf":{source:"iana"},"application/vnd.sss-ntf":{source:"iana"},"application/vnd.stardivision.calc":{source:"apache",extensions:["sdc"]},"application/vnd.stardivision.draw":{source:"apache",extensions:["sda"]},"application/vnd.stardivision.impress":{source:"apache",extensions:["sdd"]},"application/vnd.stardivision.math":{source:"apache",extensions:["smf"]},"application/vnd.stardivision.writer":{source:"apache",extensions:["sdw","vor"]},"application/vnd.stardivision.writer-global":{source:"apache",extensions:["sgl"]},"application/vnd.stepmania.package":{source:"iana",extensions:["smzip"]},"application/vnd.stepmania.stepchart":{source:"iana",extensions:["sm"]},"application/vnd.street-stream":{source:"iana"},"application/vnd.sun.wadl+xml":{source:"iana",compressible:!0,extensions:["wadl"]},"application/vnd.sun.xml.calc":{source:"apache",extensions:["sxc"]},"application/vnd.sun.xml.calc.template":{source:"apache",extensions:["stc"]},"application/vnd.sun.xml.draw":{source:"apache",extensions:["sxd"]},"application/vnd.sun.xml.draw.template":{source:"apache",extensions:["std"]},"application/vnd.sun.xml.impress":{source:"apache",extensions:["sxi"]},"application/vnd.sun.xml.impress.template":{source:"apache",extensions:["sti"]},"application/vnd.sun.xml.math":{source:"apache",extensions:["sxm"]},"application/vnd.sun.xml.writer":{source:"apache",extensions:["sxw"]},"application/vnd.sun.xml.writer.global":{source:"apache",extensions:["sxg"]},"application/vnd.sun.xml.writer.template":{source:"apache",extensions:["stw"]},"application/vnd.sus-calendar":{source:"iana",extensions:["sus","susp"]},"application/vnd.svd":{source:"iana",extensions:["svd"]},"application/vnd.swiftview-ics":{source:"iana"},"application/vnd.sycle+xml":{source:"iana",compressible:!0},"application/vnd.syft+json":{source:"iana",compressible:!0},"application/vnd.symbian.install":{source:"apache",extensions:["sis","sisx"]},"application/vnd.syncml+xml":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["xsm"]},"application/vnd.syncml.dm+wbxml":{source:"iana",charset:"UTF-8",extensions:["bdm"]},"application/vnd.syncml.dm+xml":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["xdm"]},"application/vnd.syncml.dm.notification":{source:"iana"},"application/vnd.syncml.dmddf+wbxml":{source:"iana"},"application/vnd.syncml.dmddf+xml":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["ddf"]},"application/vnd.syncml.dmtnds+wbxml":{source:"iana"},"application/vnd.syncml.dmtnds+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.syncml.ds.notification":{source:"iana"},"application/vnd.tableschema+json":{source:"iana",compressible:!0},"application/vnd.tao.intent-module-archive":{source:"iana",extensions:["tao"]},"application/vnd.tcpdump.pcap":{source:"iana",extensions:["pcap","cap","dmp"]},"application/vnd.think-cell.ppttc+json":{source:"iana",compressible:!0},"application/vnd.tmd.mediaflex.api+xml":{source:"iana",compressible:!0},"application/vnd.tml":{source:"iana"},"application/vnd.tmobile-livetv":{source:"iana",extensions:["tmo"]},"application/vnd.tri.onesource":{source:"iana"},"application/vnd.trid.tpt":{source:"iana",extensions:["tpt"]},"application/vnd.triscape.mxs":{source:"iana",extensions:["mxs"]},"application/vnd.trueapp":{source:"iana",extensions:["tra"]},"application/vnd.truedoc":{source:"iana"},"application/vnd.ubisoft.webplayer":{source:"iana"},"application/vnd.ufdl":{source:"iana",extensions:["ufd","ufdl"]},"application/vnd.uiq.theme":{source:"iana",extensions:["utz"]},"application/vnd.umajin":{source:"iana",extensions:["umj"]},"application/vnd.unity":{source:"iana",extensions:["unityweb"]},"application/vnd.uoml+xml":{source:"iana",compressible:!0,extensions:["uoml"]},"application/vnd.uplanet.alert":{source:"iana"},"application/vnd.uplanet.alert-wbxml":{source:"iana"},"application/vnd.uplanet.bearer-choice":{source:"iana"},"application/vnd.uplanet.bearer-choice-wbxml":{source:"iana"},"application/vnd.uplanet.cacheop":{source:"iana"},"application/vnd.uplanet.cacheop-wbxml":{source:"iana"},"application/vnd.uplanet.channel":{source:"iana"},"application/vnd.uplanet.channel-wbxml":{source:"iana"},"application/vnd.uplanet.list":{source:"iana"},"application/vnd.uplanet.list-wbxml":{source:"iana"},"application/vnd.uplanet.listcmd":{source:"iana"},"application/vnd.uplanet.listcmd-wbxml":{source:"iana"},"application/vnd.uplanet.signal":{source:"iana"},"application/vnd.uri-map":{source:"iana"},"application/vnd.valve.source.material":{source:"iana"},"application/vnd.vcx":{source:"iana",extensions:["vcx"]},"application/vnd.vd-study":{source:"iana"},"application/vnd.vectorworks":{source:"iana"},"application/vnd.vel+json":{source:"iana",compressible:!0},"application/vnd.verimatrix.vcas":{source:"iana"},"application/vnd.veritone.aion+json":{source:"iana",compressible:!0},"application/vnd.veryant.thin":{source:"iana"},"application/vnd.ves.encrypted":{source:"iana"},"application/vnd.vidsoft.vidconference":{source:"iana"},"application/vnd.visio":{source:"iana",extensions:["vsd","vst","vss","vsw"]},"application/vnd.visionary":{source:"iana",extensions:["vis"]},"application/vnd.vividence.scriptfile":{source:"iana"},"application/vnd.vsf":{source:"iana",extensions:["vsf"]},"application/vnd.wap.sic":{source:"iana"},"application/vnd.wap.slc":{source:"iana"},"application/vnd.wap.wbxml":{source:"iana",charset:"UTF-8",extensions:["wbxml"]},"application/vnd.wap.wmlc":{source:"iana",extensions:["wmlc"]},"application/vnd.wap.wmlscriptc":{source:"iana",extensions:["wmlsc"]},"application/vnd.webturbo":{source:"iana",extensions:["wtb"]},"application/vnd.wfa.dpp":{source:"iana"},"application/vnd.wfa.p2p":{source:"iana"},"application/vnd.wfa.wsc":{source:"iana"},"application/vnd.windows.devicepairing":{source:"iana"},"application/vnd.wmc":{source:"iana"},"application/vnd.wmf.bootstrap":{source:"iana"},"application/vnd.wolfram.mathematica":{source:"iana"},"application/vnd.wolfram.mathematica.package":{source:"iana"},"application/vnd.wolfram.player":{source:"iana",extensions:["nbp"]},"application/vnd.wordperfect":{source:"iana",extensions:["wpd"]},"application/vnd.wqd":{source:"iana",extensions:["wqd"]},"application/vnd.wrq-hp3000-labelled":{source:"iana"},"application/vnd.wt.stf":{source:"iana",extensions:["stf"]},"application/vnd.wv.csp+wbxml":{source:"iana"},"application/vnd.wv.csp+xml":{source:"iana",compressible:!0},"application/vnd.wv.ssp+xml":{source:"iana",compressible:!0},"application/vnd.xacml+json":{source:"iana",compressible:!0},"application/vnd.xara":{source:"iana",extensions:["xar"]},"application/vnd.xfdl":{source:"iana",extensions:["xfdl"]},"application/vnd.xfdl.webform":{source:"iana"},"application/vnd.xmi+xml":{source:"iana",compressible:!0},"application/vnd.xmpie.cpkg":{source:"iana"},"application/vnd.xmpie.dpkg":{source:"iana"},"application/vnd.xmpie.plan":{source:"iana"},"application/vnd.xmpie.ppkg":{source:"iana"},"application/vnd.xmpie.xlim":{source:"iana"},"application/vnd.yamaha.hv-dic":{source:"iana",extensions:["hvd"]},"application/vnd.yamaha.hv-script":{source:"iana",extensions:["hvs"]},"application/vnd.yamaha.hv-voice":{source:"iana",extensions:["hvp"]},"application/vnd.yamaha.openscoreformat":{source:"iana",extensions:["osf"]},"application/vnd.yamaha.openscoreformat.osfpvg+xml":{source:"iana",compressible:!0,extensions:["osfpvg"]},"application/vnd.yamaha.remote-setup":{source:"iana"},"application/vnd.yamaha.smaf-audio":{source:"iana",extensions:["saf"]},"application/vnd.yamaha.smaf-phrase":{source:"iana",extensions:["spf"]},"application/vnd.yamaha.through-ngn":{source:"iana"},"application/vnd.yamaha.tunnel-udpencap":{source:"iana"},"application/vnd.yaoweme":{source:"iana"},"application/vnd.yellowriver-custom-menu":{source:"iana",extensions:["cmp"]},"application/vnd.youtube.yt":{source:"iana"},"application/vnd.zul":{source:"iana",extensions:["zir","zirz"]},"application/vnd.zzazz.deck+xml":{source:"iana",compressible:!0,extensions:["zaz"]},"application/voicexml+xml":{source:"iana",compressible:!0,extensions:["vxml"]},"application/voucher-cms+json":{source:"iana",compressible:!0},"application/vq-rtcpxr":{source:"iana"},"application/wasm":{source:"iana",compressible:!0,extensions:["wasm"]},"application/watcherinfo+xml":{source:"iana",compressible:!0,extensions:["wif"]},"application/webpush-options+json":{source:"iana",compressible:!0},"application/whoispp-query":{source:"iana"},"application/whoispp-response":{source:"iana"},"application/widget":{source:"iana",extensions:["wgt"]},"application/winhlp":{source:"apache",extensions:["hlp"]},"application/wita":{source:"iana"},"application/wordperfect5.1":{source:"iana"},"application/wsdl+xml":{source:"iana",compressible:!0,extensions:["wsdl"]},"application/wspolicy+xml":{source:"iana",compressible:!0,extensions:["wspolicy"]},"application/x-7z-compressed":{source:"apache",compressible:!1,extensions:["7z"]},"application/x-abiword":{source:"apache",extensions:["abw"]},"application/x-ace-compressed":{source:"apache",extensions:["ace"]},"application/x-amf":{source:"apache"},"application/x-apple-diskimage":{source:"apache",extensions:["dmg"]},"application/x-arj":{compressible:!1,extensions:["arj"]},"application/x-authorware-bin":{source:"apache",extensions:["aab","x32","u32","vox"]},"application/x-authorware-map":{source:"apache",extensions:["aam"]},"application/x-authorware-seg":{source:"apache",extensions:["aas"]},"application/x-bcpio":{source:"apache",extensions:["bcpio"]},"application/x-bdoc":{compressible:!1,extensions:["bdoc"]},"application/x-bittorrent":{source:"apache",extensions:["torrent"]},"application/x-blorb":{source:"apache",extensions:["blb","blorb"]},"application/x-bzip":{source:"apache",compressible:!1,extensions:["bz"]},"application/x-bzip2":{source:"apache",compressible:!1,extensions:["bz2","boz"]},"application/x-cbr":{source:"apache",extensions:["cbr","cba","cbt","cbz","cb7"]},"application/x-cdlink":{source:"apache",extensions:["vcd"]},"application/x-cfs-compressed":{source:"apache",extensions:["cfs"]},"application/x-chat":{source:"apache",extensions:["chat"]},"application/x-chess-pgn":{source:"apache",extensions:["pgn"]},"application/x-chrome-extension":{extensions:["crx"]},"application/x-cocoa":{source:"nginx",extensions:["cco"]},"application/x-compress":{source:"apache"},"application/x-conference":{source:"apache",extensions:["nsc"]},"application/x-cpio":{source:"apache",extensions:["cpio"]},"application/x-csh":{source:"apache",extensions:["csh"]},"application/x-deb":{compressible:!1},"application/x-debian-package":{source:"apache",extensions:["deb","udeb"]},"application/x-dgc-compressed":{source:"apache",extensions:["dgc"]},"application/x-director":{source:"apache",extensions:["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"]},"application/x-doom":{source:"apache",extensions:["wad"]},"application/x-dtbncx+xml":{source:"apache",compressible:!0,extensions:["ncx"]},"application/x-dtbook+xml":{source:"apache",compressible:!0,extensions:["dtb"]},"application/x-dtbresource+xml":{source:"apache",compressible:!0,extensions:["res"]},"application/x-dvi":{source:"apache",compressible:!1,extensions:["dvi"]},"application/x-envoy":{source:"apache",extensions:["evy"]},"application/x-eva":{source:"apache",extensions:["eva"]},"application/x-font-bdf":{source:"apache",extensions:["bdf"]},"application/x-font-dos":{source:"apache"},"application/x-font-framemaker":{source:"apache"},"application/x-font-ghostscript":{source:"apache",extensions:["gsf"]},"application/x-font-libgrx":{source:"apache"},"application/x-font-linux-psf":{source:"apache",extensions:["psf"]},"application/x-font-pcf":{source:"apache",extensions:["pcf"]},"application/x-font-snf":{source:"apache",extensions:["snf"]},"application/x-font-speedo":{source:"apache"},"application/x-font-sunos-news":{source:"apache"},"application/x-font-type1":{source:"apache",extensions:["pfa","pfb","pfm","afm"]},"application/x-font-vfont":{source:"apache"},"application/x-freearc":{source:"apache",extensions:["arc"]},"application/x-futuresplash":{source:"apache",extensions:["spl"]},"application/x-gca-compressed":{source:"apache",extensions:["gca"]},"application/x-glulx":{source:"apache",extensions:["ulx"]},"application/x-gnumeric":{source:"apache",extensions:["gnumeric"]},"application/x-gramps-xml":{source:"apache",extensions:["gramps"]},"application/x-gtar":{source:"apache",extensions:["gtar"]},"application/x-gzip":{source:"apache"},"application/x-hdf":{source:"apache",extensions:["hdf"]},"application/x-httpd-php":{compressible:!0,extensions:["php"]},"application/x-install-instructions":{source:"apache",extensions:["install"]},"application/x-iso9660-image":{source:"apache",extensions:["iso"]},"application/x-iwork-keynote-sffkey":{extensions:["key"]},"application/x-iwork-numbers-sffnumbers":{extensions:["numbers"]},"application/x-iwork-pages-sffpages":{extensions:["pages"]},"application/x-java-archive-diff":{source:"nginx",extensions:["jardiff"]},"application/x-java-jnlp-file":{source:"apache",compressible:!1,extensions:["jnlp"]},"application/x-javascript":{compressible:!0},"application/x-keepass2":{extensions:["kdbx"]},"application/x-latex":{source:"apache",compressible:!1,extensions:["latex"]},"application/x-lua-bytecode":{extensions:["luac"]},"application/x-lzh-compressed":{source:"apache",extensions:["lzh","lha"]},"application/x-makeself":{source:"nginx",extensions:["run"]},"application/x-mie":{source:"apache",extensions:["mie"]},"application/x-mobipocket-ebook":{source:"apache",extensions:["prc","mobi"]},"application/x-mpegurl":{compressible:!1},"application/x-ms-application":{source:"apache",extensions:["application"]},"application/x-ms-shortcut":{source:"apache",extensions:["lnk"]},"application/x-ms-wmd":{source:"apache",extensions:["wmd"]},"application/x-ms-wmz":{source:"apache",extensions:["wmz"]},"application/x-ms-xbap":{source:"apache",extensions:["xbap"]},"application/x-msaccess":{source:"apache",extensions:["mdb"]},"application/x-msbinder":{source:"apache",extensions:["obd"]},"application/x-mscardfile":{source:"apache",extensions:["crd"]},"application/x-msclip":{source:"apache",extensions:["clp"]},"application/x-msdos-program":{extensions:["exe"]},"application/x-msdownload":{source:"apache",extensions:["exe","dll","com","bat","msi"]},"application/x-msmediaview":{source:"apache",extensions:["mvb","m13","m14"]},"application/x-msmetafile":{source:"apache",extensions:["wmf","wmz","emf","emz"]},"application/x-msmoney":{source:"apache",extensions:["mny"]},"application/x-mspublisher":{source:"apache",extensions:["pub"]},"application/x-msschedule":{source:"apache",extensions:["scd"]},"application/x-msterminal":{source:"apache",extensions:["trm"]},"application/x-mswrite":{source:"apache",extensions:["wri"]},"application/x-netcdf":{source:"apache",extensions:["nc","cdf"]},"application/x-ns-proxy-autoconfig":{compressible:!0,extensions:["pac"]},"application/x-nzb":{source:"apache",extensions:["nzb"]},"application/x-perl":{source:"nginx",extensions:["pl","pm"]},"application/x-pilot":{source:"nginx",extensions:["prc","pdb"]},"application/x-pkcs12":{source:"apache",compressible:!1,extensions:["p12","pfx"]},"application/x-pkcs7-certificates":{source:"apache",extensions:["p7b","spc"]},"application/x-pkcs7-certreqresp":{source:"apache",extensions:["p7r"]},"application/x-pki-message":{source:"iana"},"application/x-rar-compressed":{source:"apache",compressible:!1,extensions:["rar"]},"application/x-redhat-package-manager":{source:"nginx",extensions:["rpm"]},"application/x-research-info-systems":{source:"apache",extensions:["ris"]},"application/x-sea":{source:"nginx",extensions:["sea"]},"application/x-sh":{source:"apache",compressible:!0,extensions:["sh"]},"application/x-shar":{source:"apache",extensions:["shar"]},"application/x-shockwave-flash":{source:"apache",compressible:!1,extensions:["swf"]},"application/x-silverlight-app":{source:"apache",extensions:["xap"]},"application/x-sql":{source:"apache",extensions:["sql"]},"application/x-stuffit":{source:"apache",compressible:!1,extensions:["sit"]},"application/x-stuffitx":{source:"apache",extensions:["sitx"]},"application/x-subrip":{source:"apache",extensions:["srt"]},"application/x-sv4cpio":{source:"apache",extensions:["sv4cpio"]},"application/x-sv4crc":{source:"apache",extensions:["sv4crc"]},"application/x-t3vm-image":{source:"apache",extensions:["t3"]},"application/x-tads":{source:"apache",extensions:["gam"]},"application/x-tar":{source:"apache",compressible:!0,extensions:["tar"]},"application/x-tcl":{source:"apache",extensions:["tcl","tk"]},"application/x-tex":{source:"apache",extensions:["tex"]},"application/x-tex-tfm":{source:"apache",extensions:["tfm"]},"application/x-texinfo":{source:"apache",extensions:["texinfo","texi"]},"application/x-tgif":{source:"apache",extensions:["obj"]},"application/x-ustar":{source:"apache",extensions:["ustar"]},"application/x-virtualbox-hdd":{compressible:!0,extensions:["hdd"]},"application/x-virtualbox-ova":{compressible:!0,extensions:["ova"]},"application/x-virtualbox-ovf":{compressible:!0,extensions:["ovf"]},"application/x-virtualbox-vbox":{compressible:!0,extensions:["vbox"]},"application/x-virtualbox-vbox-extpack":{compressible:!1,extensions:["vbox-extpack"]},"application/x-virtualbox-vdi":{compressible:!0,extensions:["vdi"]},"application/x-virtualbox-vhd":{compressible:!0,extensions:["vhd"]},"application/x-virtualbox-vmdk":{compressible:!0,extensions:["vmdk"]},"application/x-wais-source":{source:"apache",extensions:["src"]},"application/x-web-app-manifest+json":{compressible:!0,extensions:["webapp"]},"application/x-www-form-urlencoded":{source:"iana",compressible:!0},"application/x-x509-ca-cert":{source:"iana",extensions:["der","crt","pem"]},"application/x-x509-ca-ra-cert":{source:"iana"},"application/x-x509-next-ca-cert":{source:"iana"},"application/x-xfig":{source:"apache",extensions:["fig"]},"application/x-xliff+xml":{source:"apache",compressible:!0,extensions:["xlf"]},"application/x-xpinstall":{source:"apache",compressible:!1,extensions:["xpi"]},"application/x-xz":{source:"apache",extensions:["xz"]},"application/x-zmachine":{source:"apache",extensions:["z1","z2","z3","z4","z5","z6","z7","z8"]},"application/x400-bp":{source:"iana"},"application/xacml+xml":{source:"iana",compressible:!0},"application/xaml+xml":{source:"apache",compressible:!0,extensions:["xaml"]},"application/xcap-att+xml":{source:"iana",compressible:!0,extensions:["xav"]},"application/xcap-caps+xml":{source:"iana",compressible:!0,extensions:["xca"]},"application/xcap-diff+xml":{source:"iana",compressible:!0,extensions:["xdf"]},"application/xcap-el+xml":{source:"iana",compressible:!0,extensions:["xel"]},"application/xcap-error+xml":{source:"iana",compressible:!0},"application/xcap-ns+xml":{source:"iana",compressible:!0,extensions:["xns"]},"application/xcon-conference-info+xml":{source:"iana",compressible:!0},"application/xcon-conference-info-diff+xml":{source:"iana",compressible:!0},"application/xenc+xml":{source:"iana",compressible:!0,extensions:["xenc"]},"application/xhtml+xml":{source:"iana",compressible:!0,extensions:["xhtml","xht"]},"application/xhtml-voice+xml":{source:"apache",compressible:!0},"application/xliff+xml":{source:"iana",compressible:!0,extensions:["xlf"]},"application/xml":{source:"iana",compressible:!0,extensions:["xml","xsl","xsd","rng"]},"application/xml-dtd":{source:"iana",compressible:!0,extensions:["dtd"]},"application/xml-external-parsed-entity":{source:"iana"},"application/xml-patch+xml":{source:"iana",compressible:!0},"application/xmpp+xml":{source:"iana",compressible:!0},"application/xop+xml":{source:"iana",compressible:!0,extensions:["xop"]},"application/xproc+xml":{source:"apache",compressible:!0,extensions:["xpl"]},"application/xslt+xml":{source:"iana",compressible:!0,extensions:["xsl","xslt"]},"application/xspf+xml":{source:"apache",compressible:!0,extensions:["xspf"]},"application/xv+xml":{source:"iana",compressible:!0,extensions:["mxml","xhvml","xvml","xvm"]},"application/yang":{source:"iana",extensions:["yang"]},"application/yang-data+json":{source:"iana",compressible:!0},"application/yang-data+xml":{source:"iana",compressible:!0},"application/yang-patch+json":{source:"iana",compressible:!0},"application/yang-patch+xml":{source:"iana",compressible:!0},"application/yin+xml":{source:"iana",compressible:!0,extensions:["yin"]},"application/zip":{source:"iana",compressible:!1,extensions:["zip"]},"application/zlib":{source:"iana"},"application/zstd":{source:"iana"},"audio/1d-interleaved-parityfec":{source:"iana"},"audio/32kadpcm":{source:"iana"},"audio/3gpp":{source:"iana",compressible:!1,extensions:["3gpp"]},"audio/3gpp2":{source:"iana"},"audio/aac":{source:"iana"},"audio/ac3":{source:"iana"},"audio/adpcm":{source:"apache",extensions:["adp"]},"audio/amr":{source:"iana",extensions:["amr"]},"audio/amr-wb":{source:"iana"},"audio/amr-wb+":{source:"iana"},"audio/aptx":{source:"iana"},"audio/asc":{source:"iana"},"audio/atrac-advanced-lossless":{source:"iana"},"audio/atrac-x":{source:"iana"},"audio/atrac3":{source:"iana"},"audio/basic":{source:"iana",compressible:!1,extensions:["au","snd"]},"audio/bv16":{source:"iana"},"audio/bv32":{source:"iana"},"audio/clearmode":{source:"iana"},"audio/cn":{source:"iana"},"audio/dat12":{source:"iana"},"audio/dls":{source:"iana"},"audio/dsr-es201108":{source:"iana"},"audio/dsr-es202050":{source:"iana"},"audio/dsr-es202211":{source:"iana"},"audio/dsr-es202212":{source:"iana"},"audio/dv":{source:"iana"},"audio/dvi4":{source:"iana"},"audio/eac3":{source:"iana"},"audio/encaprtp":{source:"iana"},"audio/evrc":{source:"iana"},"audio/evrc-qcp":{source:"iana"},"audio/evrc0":{source:"iana"},"audio/evrc1":{source:"iana"},"audio/evrcb":{source:"iana"},"audio/evrcb0":{source:"iana"},"audio/evrcb1":{source:"iana"},"audio/evrcnw":{source:"iana"},"audio/evrcnw0":{source:"iana"},"audio/evrcnw1":{source:"iana"},"audio/evrcwb":{source:"iana"},"audio/evrcwb0":{source:"iana"},"audio/evrcwb1":{source:"iana"},"audio/evs":{source:"iana"},"audio/flexfec":{source:"iana"},"audio/fwdred":{source:"iana"},"audio/g711-0":{source:"iana"},"audio/g719":{source:"iana"},"audio/g722":{source:"iana"},"audio/g7221":{source:"iana"},"audio/g723":{source:"iana"},"audio/g726-16":{source:"iana"},"audio/g726-24":{source:"iana"},"audio/g726-32":{source:"iana"},"audio/g726-40":{source:"iana"},"audio/g728":{source:"iana"},"audio/g729":{source:"iana"},"audio/g7291":{source:"iana"},"audio/g729d":{source:"iana"},"audio/g729e":{source:"iana"},"audio/gsm":{source:"iana"},"audio/gsm-efr":{source:"iana"},"audio/gsm-hr-08":{source:"iana"},"audio/ilbc":{source:"iana"},"audio/ip-mr_v2.5":{source:"iana"},"audio/isac":{source:"apache"},"audio/l16":{source:"iana"},"audio/l20":{source:"iana"},"audio/l24":{source:"iana",compressible:!1},"audio/l8":{source:"iana"},"audio/lpc":{source:"iana"},"audio/melp":{source:"iana"},"audio/melp1200":{source:"iana"},"audio/melp2400":{source:"iana"},"audio/melp600":{source:"iana"},"audio/mhas":{source:"iana"},"audio/midi":{source:"apache",extensions:["mid","midi","kar","rmi"]},"audio/mobile-xmf":{source:"iana",extensions:["mxmf"]},"audio/mp3":{compressible:!1,extensions:["mp3"]},"audio/mp4":{source:"iana",compressible:!1,extensions:["m4a","mp4a"]},"audio/mp4a-latm":{source:"iana"},"audio/mpa":{source:"iana"},"audio/mpa-robust":{source:"iana"},"audio/mpeg":{source:"iana",compressible:!1,extensions:["mpga","mp2","mp2a","mp3","m2a","m3a"]},"audio/mpeg4-generic":{source:"iana"},"audio/musepack":{source:"apache"},"audio/ogg":{source:"iana",compressible:!1,extensions:["oga","ogg","spx","opus"]},"audio/opus":{source:"iana"},"audio/parityfec":{source:"iana"},"audio/pcma":{source:"iana"},"audio/pcma-wb":{source:"iana"},"audio/pcmu":{source:"iana"},"audio/pcmu-wb":{source:"iana"},"audio/prs.sid":{source:"iana"},"audio/qcelp":{source:"iana"},"audio/raptorfec":{source:"iana"},"audio/red":{source:"iana"},"audio/rtp-enc-aescm128":{source:"iana"},"audio/rtp-midi":{source:"iana"},"audio/rtploopback":{source:"iana"},"audio/rtx":{source:"iana"},"audio/s3m":{source:"apache",extensions:["s3m"]},"audio/scip":{source:"iana"},"audio/silk":{source:"apache",extensions:["sil"]},"audio/smv":{source:"iana"},"audio/smv-qcp":{source:"iana"},"audio/smv0":{source:"iana"},"audio/sofa":{source:"iana"},"audio/sp-midi":{source:"iana"},"audio/speex":{source:"iana"},"audio/t140c":{source:"iana"},"audio/t38":{source:"iana"},"audio/telephone-event":{source:"iana"},"audio/tetra_acelp":{source:"iana"},"audio/tetra_acelp_bb":{source:"iana"},"audio/tone":{source:"iana"},"audio/tsvcis":{source:"iana"},"audio/uemclip":{source:"iana"},"audio/ulpfec":{source:"iana"},"audio/usac":{source:"iana"},"audio/vdvi":{source:"iana"},"audio/vmr-wb":{source:"iana"},"audio/vnd.3gpp.iufp":{source:"iana"},"audio/vnd.4sb":{source:"iana"},"audio/vnd.audiokoz":{source:"iana"},"audio/vnd.celp":{source:"iana"},"audio/vnd.cisco.nse":{source:"iana"},"audio/vnd.cmles.radio-events":{source:"iana"},"audio/vnd.cns.anp1":{source:"iana"},"audio/vnd.cns.inf1":{source:"iana"},"audio/vnd.dece.audio":{source:"iana",extensions:["uva","uvva"]},"audio/vnd.digital-winds":{source:"iana",extensions:["eol"]},"audio/vnd.dlna.adts":{source:"iana"},"audio/vnd.dolby.heaac.1":{source:"iana"},"audio/vnd.dolby.heaac.2":{source:"iana"},"audio/vnd.dolby.mlp":{source:"iana"},"audio/vnd.dolby.mps":{source:"iana"},"audio/vnd.dolby.pl2":{source:"iana"},"audio/vnd.dolby.pl2x":{source:"iana"},"audio/vnd.dolby.pl2z":{source:"iana"},"audio/vnd.dolby.pulse.1":{source:"iana"},"audio/vnd.dra":{source:"iana",extensions:["dra"]},"audio/vnd.dts":{source:"iana",extensions:["dts"]},"audio/vnd.dts.hd":{source:"iana",extensions:["dtshd"]},"audio/vnd.dts.uhd":{source:"iana"},"audio/vnd.dvb.file":{source:"iana"},"audio/vnd.everad.plj":{source:"iana"},"audio/vnd.hns.audio":{source:"iana"},"audio/vnd.lucent.voice":{source:"iana",extensions:["lvp"]},"audio/vnd.ms-playready.media.pya":{source:"iana",extensions:["pya"]},"audio/vnd.nokia.mobile-xmf":{source:"iana"},"audio/vnd.nortel.vbk":{source:"iana"},"audio/vnd.nuera.ecelp4800":{source:"iana",extensions:["ecelp4800"]},"audio/vnd.nuera.ecelp7470":{source:"iana",extensions:["ecelp7470"]},"audio/vnd.nuera.ecelp9600":{source:"iana",extensions:["ecelp9600"]},"audio/vnd.octel.sbc":{source:"iana"},"audio/vnd.presonus.multitrack":{source:"iana"},"audio/vnd.qcelp":{source:"iana"},"audio/vnd.rhetorex.32kadpcm":{source:"iana"},"audio/vnd.rip":{source:"iana",extensions:["rip"]},"audio/vnd.rn-realaudio":{compressible:!1},"audio/vnd.sealedmedia.softseal.mpeg":{source:"iana"},"audio/vnd.vmx.cvsd":{source:"iana"},"audio/vnd.wave":{compressible:!1},"audio/vorbis":{source:"iana",compressible:!1},"audio/vorbis-config":{source:"iana"},"audio/wav":{compressible:!1,extensions:["wav"]},"audio/wave":{compressible:!1,extensions:["wav"]},"audio/webm":{source:"apache",compressible:!1,extensions:["weba"]},"audio/x-aac":{source:"apache",compressible:!1,extensions:["aac"]},"audio/x-aiff":{source:"apache",extensions:["aif","aiff","aifc"]},"audio/x-caf":{source:"apache",compressible:!1,extensions:["caf"]},"audio/x-flac":{source:"apache",extensions:["flac"]},"audio/x-m4a":{source:"nginx",extensions:["m4a"]},"audio/x-matroska":{source:"apache",extensions:["mka"]},"audio/x-mpegurl":{source:"apache",extensions:["m3u"]},"audio/x-ms-wax":{source:"apache",extensions:["wax"]},"audio/x-ms-wma":{source:"apache",extensions:["wma"]},"audio/x-pn-realaudio":{source:"apache",extensions:["ram","ra"]},"audio/x-pn-realaudio-plugin":{source:"apache",extensions:["rmp"]},"audio/x-realaudio":{source:"nginx",extensions:["ra"]},"audio/x-tta":{source:"apache"},"audio/x-wav":{source:"apache",extensions:["wav"]},"audio/xm":{source:"apache",extensions:["xm"]},"chemical/x-cdx":{source:"apache",extensions:["cdx"]},"chemical/x-cif":{source:"apache",extensions:["cif"]},"chemical/x-cmdf":{source:"apache",extensions:["cmdf"]},"chemical/x-cml":{source:"apache",extensions:["cml"]},"chemical/x-csml":{source:"apache",extensions:["csml"]},"chemical/x-pdb":{source:"apache"},"chemical/x-xyz":{source:"apache",extensions:["xyz"]},"font/collection":{source:"iana",extensions:["ttc"]},"font/otf":{source:"iana",compressible:!0,extensions:["otf"]},"font/sfnt":{source:"iana"},"font/ttf":{source:"iana",compressible:!0,extensions:["ttf"]},"font/woff":{source:"iana",extensions:["woff"]},"font/woff2":{source:"iana",extensions:["woff2"]},"image/aces":{source:"iana",extensions:["exr"]},"image/apng":{compressible:!1,extensions:["apng"]},"image/avci":{source:"iana",extensions:["avci"]},"image/avcs":{source:"iana",extensions:["avcs"]},"image/avif":{source:"iana",compressible:!1,extensions:["avif"]},"image/bmp":{source:"iana",compressible:!0,extensions:["bmp"]},"image/cgm":{source:"iana",extensions:["cgm"]},"image/dicom-rle":{source:"iana",extensions:["drle"]},"image/emf":{source:"iana",extensions:["emf"]},"image/fits":{source:"iana",extensions:["fits"]},"image/g3fax":{source:"iana",extensions:["g3"]},"image/gif":{source:"iana",compressible:!1,extensions:["gif"]},"image/heic":{source:"iana",extensions:["heic"]},"image/heic-sequence":{source:"iana",extensions:["heics"]},"image/heif":{source:"iana",extensions:["heif"]},"image/heif-sequence":{source:"iana",extensions:["heifs"]},"image/hej2k":{source:"iana",extensions:["hej2"]},"image/hsj2":{source:"iana",extensions:["hsj2"]},"image/ief":{source:"iana",extensions:["ief"]},"image/jls":{source:"iana",extensions:["jls"]},"image/jp2":{source:"iana",compressible:!1,extensions:["jp2","jpg2"]},"image/jpeg":{source:"iana",compressible:!1,extensions:["jpeg","jpg","jpe"]},"image/jph":{source:"iana",extensions:["jph"]},"image/jphc":{source:"iana",extensions:["jhc"]},"image/jpm":{source:"iana",compressible:!1,extensions:["jpm"]},"image/jpx":{source:"iana",compressible:!1,extensions:["jpx","jpf"]},"image/jxr":{source:"iana",extensions:["jxr"]},"image/jxra":{source:"iana",extensions:["jxra"]},"image/jxrs":{source:"iana",extensions:["jxrs"]},"image/jxs":{source:"iana",extensions:["jxs"]},"image/jxsc":{source:"iana",extensions:["jxsc"]},"image/jxsi":{source:"iana",extensions:["jxsi"]},"image/jxss":{source:"iana",extensions:["jxss"]},"image/ktx":{source:"iana",extensions:["ktx"]},"image/ktx2":{source:"iana",extensions:["ktx2"]},"image/naplps":{source:"iana"},"image/pjpeg":{compressible:!1},"image/png":{source:"iana",compressible:!1,extensions:["png"]},"image/prs.btif":{source:"iana",extensions:["btif"]},"image/prs.pti":{source:"iana",extensions:["pti"]},"image/pwg-raster":{source:"iana"},"image/sgi":{source:"apache",extensions:["sgi"]},"image/svg+xml":{source:"iana",compressible:!0,extensions:["svg","svgz"]},"image/t38":{source:"iana",extensions:["t38"]},"image/tiff":{source:"iana",compressible:!1,extensions:["tif","tiff"]},"image/tiff-fx":{source:"iana",extensions:["tfx"]},"image/vnd.adobe.photoshop":{source:"iana",compressible:!0,extensions:["psd"]},"image/vnd.airzip.accelerator.azv":{source:"iana",extensions:["azv"]},"image/vnd.cns.inf2":{source:"iana"},"image/vnd.dece.graphic":{source:"iana",extensions:["uvi","uvvi","uvg","uvvg"]},"image/vnd.djvu":{source:"iana",extensions:["djvu","djv"]},"image/vnd.dvb.subtitle":{source:"iana",extensions:["sub"]},"image/vnd.dwg":{source:"iana",extensions:["dwg"]},"image/vnd.dxf":{source:"iana",extensions:["dxf"]},"image/vnd.fastbidsheet":{source:"iana",extensions:["fbs"]},"image/vnd.fpx":{source:"iana",extensions:["fpx"]},"image/vnd.fst":{source:"iana",extensions:["fst"]},"image/vnd.fujixerox.edmics-mmr":{source:"iana",extensions:["mmr"]},"image/vnd.fujixerox.edmics-rlc":{source:"iana",extensions:["rlc"]},"image/vnd.globalgraphics.pgb":{source:"iana"},"image/vnd.microsoft.icon":{source:"iana",compressible:!0,extensions:["ico"]},"image/vnd.mix":{source:"iana"},"image/vnd.mozilla.apng":{source:"iana"},"image/vnd.ms-dds":{compressible:!0,extensions:["dds"]},"image/vnd.ms-modi":{source:"iana",extensions:["mdi"]},"image/vnd.ms-photo":{source:"apache",extensions:["wdp"]},"image/vnd.net-fpx":{source:"iana",extensions:["npx"]},"image/vnd.pco.b16":{source:"iana",extensions:["b16"]},"image/vnd.radiance":{source:"iana"},"image/vnd.sealed.png":{source:"iana"},"image/vnd.sealedmedia.softseal.gif":{source:"iana"},"image/vnd.sealedmedia.softseal.jpg":{source:"iana"},"image/vnd.svf":{source:"iana"},"image/vnd.tencent.tap":{source:"iana",extensions:["tap"]},"image/vnd.valve.source.texture":{source:"iana",extensions:["vtf"]},"image/vnd.wap.wbmp":{source:"iana",extensions:["wbmp"]},"image/vnd.xiff":{source:"iana",extensions:["xif"]},"image/vnd.zbrush.pcx":{source:"iana",extensions:["pcx"]},"image/webp":{source:"apache",extensions:["webp"]},"image/wmf":{source:"iana",extensions:["wmf"]},"image/x-3ds":{source:"apache",extensions:["3ds"]},"image/x-cmu-raster":{source:"apache",extensions:["ras"]},"image/x-cmx":{source:"apache",extensions:["cmx"]},"image/x-freehand":{source:"apache",extensions:["fh","fhc","fh4","fh5","fh7"]},"image/x-icon":{source:"apache",compressible:!0,extensions:["ico"]},"image/x-jng":{source:"nginx",extensions:["jng"]},"image/x-mrsid-image":{source:"apache",extensions:["sid"]},"image/x-ms-bmp":{source:"nginx",compressible:!0,extensions:["bmp"]},"image/x-pcx":{source:"apache",extensions:["pcx"]},"image/x-pict":{source:"apache",extensions:["pic","pct"]},"image/x-portable-anymap":{source:"apache",extensions:["pnm"]},"image/x-portable-bitmap":{source:"apache",extensions:["pbm"]},"image/x-portable-graymap":{source:"apache",extensions:["pgm"]},"image/x-portable-pixmap":{source:"apache",extensions:["ppm"]},"image/x-rgb":{source:"apache",extensions:["rgb"]},"image/x-tga":{source:"apache",extensions:["tga"]},"image/x-xbitmap":{source:"apache",extensions:["xbm"]},"image/x-xcf":{compressible:!1},"image/x-xpixmap":{source:"apache",extensions:["xpm"]},"image/x-xwindowdump":{source:"apache",extensions:["xwd"]},"message/cpim":{source:"iana"},"message/delivery-status":{source:"iana"},"message/disposition-notification":{source:"iana",extensions:["disposition-notification"]},"message/external-body":{source:"iana"},"message/feedback-report":{source:"iana"},"message/global":{source:"iana",extensions:["u8msg"]},"message/global-delivery-status":{source:"iana",extensions:["u8dsn"]},"message/global-disposition-notification":{source:"iana",extensions:["u8mdn"]},"message/global-headers":{source:"iana",extensions:["u8hdr"]},"message/http":{source:"iana",compressible:!1},"message/imdn+xml":{source:"iana",compressible:!0},"message/news":{source:"iana"},"message/partial":{source:"iana",compressible:!1},"message/rfc822":{source:"iana",compressible:!0,extensions:["eml","mime"]},"message/s-http":{source:"iana"},"message/sip":{source:"iana"},"message/sipfrag":{source:"iana"},"message/tracking-status":{source:"iana"},"message/vnd.si.simp":{source:"iana"},"message/vnd.wfa.wsc":{source:"iana",extensions:["wsc"]},"model/3mf":{source:"iana",extensions:["3mf"]},"model/e57":{source:"iana"},"model/gltf+json":{source:"iana",compressible:!0,extensions:["gltf"]},"model/gltf-binary":{source:"iana",compressible:!0,extensions:["glb"]},"model/iges":{source:"iana",compressible:!1,extensions:["igs","iges"]},"model/mesh":{source:"iana",compressible:!1,extensions:["msh","mesh","silo"]},"model/mtl":{source:"iana",extensions:["mtl"]},"model/obj":{source:"iana",extensions:["obj"]},"model/step":{source:"iana"},"model/step+xml":{source:"iana",compressible:!0,extensions:["stpx"]},"model/step+zip":{source:"iana",compressible:!1,extensions:["stpz"]},"model/step-xml+zip":{source:"iana",compressible:!1,extensions:["stpxz"]},"model/stl":{source:"iana",extensions:["stl"]},"model/vnd.collada+xml":{source:"iana",compressible:!0,extensions:["dae"]},"model/vnd.dwf":{source:"iana",extensions:["dwf"]},"model/vnd.flatland.3dml":{source:"iana"},"model/vnd.gdl":{source:"iana",extensions:["gdl"]},"model/vnd.gs-gdl":{source:"apache"},"model/vnd.gs.gdl":{source:"iana"},"model/vnd.gtw":{source:"iana",extensions:["gtw"]},"model/vnd.moml+xml":{source:"iana",compressible:!0},"model/vnd.mts":{source:"iana",extensions:["mts"]},"model/vnd.opengex":{source:"iana",extensions:["ogex"]},"model/vnd.parasolid.transmit.binary":{source:"iana",extensions:["x_b"]},"model/vnd.parasolid.transmit.text":{source:"iana",extensions:["x_t"]},"model/vnd.pytha.pyox":{source:"iana"},"model/vnd.rosette.annotated-data-model":{source:"iana"},"model/vnd.sap.vds":{source:"iana",extensions:["vds"]},"model/vnd.usdz+zip":{source:"iana",compressible:!1,extensions:["usdz"]},"model/vnd.valve.source.compiled-map":{source:"iana",extensions:["bsp"]},"model/vnd.vtu":{source:"iana",extensions:["vtu"]},"model/vrml":{source:"iana",compressible:!1,extensions:["wrl","vrml"]},"model/x3d+binary":{source:"apache",compressible:!1,extensions:["x3db","x3dbz"]},"model/x3d+fastinfoset":{source:"iana",extensions:["x3db"]},"model/x3d+vrml":{source:"apache",compressible:!1,extensions:["x3dv","x3dvz"]},"model/x3d+xml":{source:"iana",compressible:!0,extensions:["x3d","x3dz"]},"model/x3d-vrml":{source:"iana",extensions:["x3dv"]},"multipart/alternative":{source:"iana",compressible:!1},"multipart/appledouble":{source:"iana"},"multipart/byteranges":{source:"iana"},"multipart/digest":{source:"iana"},"multipart/encrypted":{source:"iana",compressible:!1},"multipart/form-data":{source:"iana",compressible:!1},"multipart/header-set":{source:"iana"},"multipart/mixed":{source:"iana"},"multipart/multilingual":{source:"iana"},"multipart/parallel":{source:"iana"},"multipart/related":{source:"iana",compressible:!1},"multipart/report":{source:"iana"},"multipart/signed":{source:"iana",compressible:!1},"multipart/vnd.bint.med-plus":{source:"iana"},"multipart/voice-message":{source:"iana"},"multipart/x-mixed-replace":{source:"iana"},"text/1d-interleaved-parityfec":{source:"iana"},"text/cache-manifest":{source:"iana",compressible:!0,extensions:["appcache","manifest"]},"text/calendar":{source:"iana",extensions:["ics","ifb"]},"text/calender":{compressible:!0},"text/cmd":{compressible:!0},"text/coffeescript":{extensions:["coffee","litcoffee"]},"text/cql":{source:"iana"},"text/cql-expression":{source:"iana"},"text/cql-identifier":{source:"iana"},"text/css":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["css"]},"text/csv":{source:"iana",compressible:!0,extensions:["csv"]},"text/csv-schema":{source:"iana"},"text/directory":{source:"iana"},"text/dns":{source:"iana"},"text/ecmascript":{source:"iana"},"text/encaprtp":{source:"iana"},"text/enriched":{source:"iana"},"text/fhirpath":{source:"iana"},"text/flexfec":{source:"iana"},"text/fwdred":{source:"iana"},"text/gff3":{source:"iana"},"text/grammar-ref-list":{source:"iana"},"text/html":{source:"iana",compressible:!0,extensions:["html","htm","shtml"]},"text/jade":{extensions:["jade"]},"text/javascript":{source:"iana",compressible:!0},"text/jcr-cnd":{source:"iana"},"text/jsx":{compressible:!0,extensions:["jsx"]},"text/less":{compressible:!0,extensions:["less"]},"text/markdown":{source:"iana",compressible:!0,extensions:["markdown","md"]},"text/mathml":{source:"nginx",extensions:["mml"]},"text/mdx":{compressible:!0,extensions:["mdx"]},"text/mizar":{source:"iana"},"text/n3":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["n3"]},"text/parameters":{source:"iana",charset:"UTF-8"},"text/parityfec":{source:"iana"},"text/plain":{source:"iana",compressible:!0,extensions:["txt","text","conf","def","list","log","in","ini"]},"text/provenance-notation":{source:"iana",charset:"UTF-8"},"text/prs.fallenstein.rst":{source:"iana"},"text/prs.lines.tag":{source:"iana",extensions:["dsc"]},"text/prs.prop.logic":{source:"iana"},"text/raptorfec":{source:"iana"},"text/red":{source:"iana"},"text/rfc822-headers":{source:"iana"},"text/richtext":{source:"iana",compressible:!0,extensions:["rtx"]},"text/rtf":{source:"iana",compressible:!0,extensions:["rtf"]},"text/rtp-enc-aescm128":{source:"iana"},"text/rtploopback":{source:"iana"},"text/rtx":{source:"iana"},"text/sgml":{source:"iana",extensions:["sgml","sgm"]},"text/shaclc":{source:"iana"},"text/shex":{source:"iana",extensions:["shex"]},"text/slim":{extensions:["slim","slm"]},"text/spdx":{source:"iana",extensions:["spdx"]},"text/strings":{source:"iana"},"text/stylus":{extensions:["stylus","styl"]},"text/t140":{source:"iana"},"text/tab-separated-values":{source:"iana",compressible:!0,extensions:["tsv"]},"text/troff":{source:"iana",extensions:["t","tr","roff","man","me","ms"]},"text/turtle":{source:"iana",charset:"UTF-8",extensions:["ttl"]},"text/ulpfec":{source:"iana"},"text/uri-list":{source:"iana",compressible:!0,extensions:["uri","uris","urls"]},"text/vcard":{source:"iana",compressible:!0,extensions:["vcard"]},"text/vnd.a":{source:"iana"},"text/vnd.abc":{source:"iana"},"text/vnd.ascii-art":{source:"iana"},"text/vnd.curl":{source:"iana",extensions:["curl"]},"text/vnd.curl.dcurl":{source:"apache",extensions:["dcurl"]},"text/vnd.curl.mcurl":{source:"apache",extensions:["mcurl"]},"text/vnd.curl.scurl":{source:"apache",extensions:["scurl"]},"text/vnd.debian.copyright":{source:"iana",charset:"UTF-8"},"text/vnd.dmclientscript":{source:"iana"},"text/vnd.dvb.subtitle":{source:"iana",extensions:["sub"]},"text/vnd.esmertec.theme-descriptor":{source:"iana",charset:"UTF-8"},"text/vnd.familysearch.gedcom":{source:"iana",extensions:["ged"]},"text/vnd.ficlab.flt":{source:"iana"},"text/vnd.fly":{source:"iana",extensions:["fly"]},"text/vnd.fmi.flexstor":{source:"iana",extensions:["flx"]},"text/vnd.gml":{source:"iana"},"text/vnd.graphviz":{source:"iana",extensions:["gv"]},"text/vnd.hans":{source:"iana"},"text/vnd.hgl":{source:"iana"},"text/vnd.in3d.3dml":{source:"iana",extensions:["3dml"]},"text/vnd.in3d.spot":{source:"iana",extensions:["spot"]},"text/vnd.iptc.newsml":{source:"iana"},"text/vnd.iptc.nitf":{source:"iana"},"text/vnd.latex-z":{source:"iana"},"text/vnd.motorola.reflex":{source:"iana"},"text/vnd.ms-mediapackage":{source:"iana"},"text/vnd.net2phone.commcenter.command":{source:"iana"},"text/vnd.radisys.msml-basic-layout":{source:"iana"},"text/vnd.senx.warpscript":{source:"iana"},"text/vnd.si.uricatalogue":{source:"iana"},"text/vnd.sosi":{source:"iana"},"text/vnd.sun.j2me.app-descriptor":{source:"iana",charset:"UTF-8",extensions:["jad"]},"text/vnd.trolltech.linguist":{source:"iana",charset:"UTF-8"},"text/vnd.wap.si":{source:"iana"},"text/vnd.wap.sl":{source:"iana"},"text/vnd.wap.wml":{source:"iana",extensions:["wml"]},"text/vnd.wap.wmlscript":{source:"iana",extensions:["wmls"]},"text/vtt":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["vtt"]},"text/x-asm":{source:"apache",extensions:["s","asm"]},"text/x-c":{source:"apache",extensions:["c","cc","cxx","cpp","h","hh","dic"]},"text/x-component":{source:"nginx",extensions:["htc"]},"text/x-fortran":{source:"apache",extensions:["f","for","f77","f90"]},"text/x-gwt-rpc":{compressible:!0},"text/x-handlebars-template":{extensions:["hbs"]},"text/x-java-source":{source:"apache",extensions:["java"]},"text/x-jquery-tmpl":{compressible:!0},"text/x-lua":{extensions:["lua"]},"text/x-markdown":{compressible:!0,extensions:["mkd"]},"text/x-nfo":{source:"apache",extensions:["nfo"]},"text/x-opml":{source:"apache",extensions:["opml"]},"text/x-org":{compressible:!0,extensions:["org"]},"text/x-pascal":{source:"apache",extensions:["p","pas"]},"text/x-processing":{compressible:!0,extensions:["pde"]},"text/x-sass":{extensions:["sass"]},"text/x-scss":{extensions:["scss"]},"text/x-setext":{source:"apache",extensions:["etx"]},"text/x-sfv":{source:"apache",extensions:["sfv"]},"text/x-suse-ymp":{compressible:!0,extensions:["ymp"]},"text/x-uuencode":{source:"apache",extensions:["uu"]},"text/x-vcalendar":{source:"apache",extensions:["vcs"]},"text/x-vcard":{source:"apache",extensions:["vcf"]},"text/xml":{source:"iana",compressible:!0,extensions:["xml"]},"text/xml-external-parsed-entity":{source:"iana"},"text/yaml":{compressible:!0,extensions:["yaml","yml"]},"video/1d-interleaved-parityfec":{source:"iana"},"video/3gpp":{source:"iana",extensions:["3gp","3gpp"]},"video/3gpp-tt":{source:"iana"},"video/3gpp2":{source:"iana",extensions:["3g2"]},"video/av1":{source:"iana"},"video/bmpeg":{source:"iana"},"video/bt656":{source:"iana"},"video/celb":{source:"iana"},"video/dv":{source:"iana"},"video/encaprtp":{source:"iana"},"video/ffv1":{source:"iana"},"video/flexfec":{source:"iana"},"video/h261":{source:"iana",extensions:["h261"]},"video/h263":{source:"iana",extensions:["h263"]},"video/h263-1998":{source:"iana"},"video/h263-2000":{source:"iana"},"video/h264":{source:"iana",extensions:["h264"]},"video/h264-rcdo":{source:"iana"},"video/h264-svc":{source:"iana"},"video/h265":{source:"iana"},"video/iso.segment":{source:"iana",extensions:["m4s"]},"video/jpeg":{source:"iana",extensions:["jpgv"]},"video/jpeg2000":{source:"iana"},"video/jpm":{source:"apache",extensions:["jpm","jpgm"]},"video/jxsv":{source:"iana"},"video/mj2":{source:"iana",extensions:["mj2","mjp2"]},"video/mp1s":{source:"iana"},"video/mp2p":{source:"iana"},"video/mp2t":{source:"iana",extensions:["ts"]},"video/mp4":{source:"iana",compressible:!1,extensions:["mp4","mp4v","mpg4"]},"video/mp4v-es":{source:"iana"},"video/mpeg":{source:"iana",compressible:!1,extensions:["mpeg","mpg","mpe","m1v","m2v"]},"video/mpeg4-generic":{source:"iana"},"video/mpv":{source:"iana"},"video/nv":{source:"iana"},"video/ogg":{source:"iana",compressible:!1,extensions:["ogv"]},"video/parityfec":{source:"iana"},"video/pointer":{source:"iana"},"video/quicktime":{source:"iana",compressible:!1,extensions:["qt","mov"]},"video/raptorfec":{source:"iana"},"video/raw":{source:"iana"},"video/rtp-enc-aescm128":{source:"iana"},"video/rtploopback":{source:"iana"},"video/rtx":{source:"iana"},"video/scip":{source:"iana"},"video/smpte291":{source:"iana"},"video/smpte292m":{source:"iana"},"video/ulpfec":{source:"iana"},"video/vc1":{source:"iana"},"video/vc2":{source:"iana"},"video/vnd.cctv":{source:"iana"},"video/vnd.dece.hd":{source:"iana",extensions:["uvh","uvvh"]},"video/vnd.dece.mobile":{source:"iana",extensions:["uvm","uvvm"]},"video/vnd.dece.mp4":{source:"iana"},"video/vnd.dece.pd":{source:"iana",extensions:["uvp","uvvp"]},"video/vnd.dece.sd":{source:"iana",extensions:["uvs","uvvs"]},"video/vnd.dece.video":{source:"iana",extensions:["uvv","uvvv"]},"video/vnd.directv.mpeg":{source:"iana"},"video/vnd.directv.mpeg-tts":{source:"iana"},"video/vnd.dlna.mpeg-tts":{source:"iana"},"video/vnd.dvb.file":{source:"iana",extensions:["dvb"]},"video/vnd.fvt":{source:"iana",extensions:["fvt"]},"video/vnd.hns.video":{source:"iana"},"video/vnd.iptvforum.1dparityfec-1010":{source:"iana"},"video/vnd.iptvforum.1dparityfec-2005":{source:"iana"},"video/vnd.iptvforum.2dparityfec-1010":{source:"iana"},"video/vnd.iptvforum.2dparityfec-2005":{source:"iana"},"video/vnd.iptvforum.ttsavc":{source:"iana"},"video/vnd.iptvforum.ttsmpeg2":{source:"iana"},"video/vnd.motorola.video":{source:"iana"},"video/vnd.motorola.videop":{source:"iana"},"video/vnd.mpegurl":{source:"iana",extensions:["mxu","m4u"]},"video/vnd.ms-playready.media.pyv":{source:"iana",extensions:["pyv"]},"video/vnd.nokia.interleaved-multimedia":{source:"iana"},"video/vnd.nokia.mp4vr":{source:"iana"},"video/vnd.nokia.videovoip":{source:"iana"},"video/vnd.objectvideo":{source:"iana"},"video/vnd.radgamettools.bink":{source:"iana"},"video/vnd.radgamettools.smacker":{source:"iana"},"video/vnd.sealed.mpeg1":{source:"iana"},"video/vnd.sealed.mpeg4":{source:"iana"},"video/vnd.sealed.swf":{source:"iana"},"video/vnd.sealedmedia.softseal.mov":{source:"iana"},"video/vnd.uvvu.mp4":{source:"iana",extensions:["uvu","uvvu"]},"video/vnd.vivo":{source:"iana",extensions:["viv"]},"video/vnd.youtube.yt":{source:"iana"},"video/vp8":{source:"iana"},"video/vp9":{source:"iana"},"video/webm":{source:"apache",compressible:!1,extensions:["webm"]},"video/x-f4v":{source:"apache",extensions:["f4v"]},"video/x-fli":{source:"apache",extensions:["fli"]},"video/x-flv":{source:"apache",compressible:!1,extensions:["flv"]},"video/x-m4v":{source:"apache",extensions:["m4v"]},"video/x-matroska":{source:"apache",compressible:!1,extensions:["mkv","mk3d","mks"]},"video/x-mng":{source:"apache",extensions:["mng"]},"video/x-ms-asf":{source:"apache",extensions:["asf","asx"]},"video/x-ms-vob":{source:"apache",extensions:["vob"]},"video/x-ms-wm":{source:"apache",extensions:["wm"]},"video/x-ms-wmv":{source:"apache",compressible:!1,extensions:["wmv"]},"video/x-ms-wmx":{source:"apache",extensions:["wmx"]},"video/x-ms-wvx":{source:"apache",extensions:["wvx"]},"video/x-msvideo":{source:"apache",extensions:["avi"]},"video/x-sgi-movie":{source:"apache",extensions:["movie"]},"video/x-smv":{source:"apache",extensions:["smv"]},"x-conference/x-cooltalk":{source:"apache",extensions:["ice"]},"x-shader/x-fragment":{compressible:!0},"x-shader/x-vertex":{compressible:!0}}});var N0=$((DV,z0)=>{z0.exports=O0()});var D0=$(fn=>{"use strict";var El=N0(),tM=require("path").extname,j0=/^\s*([^;\s]*)(?:;|\s|$)/,nM=/^text\//i;fn.charset=L0;fn.charsets={lookup:L0};fn.contentType=rM;fn.extension=oM;fn.extensions=Object.create(null);fn.lookup=iM;fn.types=Object.create(null);sM(fn.extensions,fn.types);function L0(t){if(!t||typeof t!="string")return!1;var e=j0.exec(t),n=e&&El[e[1].toLowerCase()];return n&&n.charset?n.charset:e&&nM.test(e[1])?"UTF-8":!1}function rM(t){if(!t||typeof t!="string")return!1;var e=t.indexOf("/")===-1?fn.lookup(t):t;if(!e)return!1;if(e.indexOf("charset")===-1){var n=fn.charset(e);n&&(e+="; charset="+n.toLowerCase())}return e}function oM(t){if(!t||typeof t!="string")return!1;var e=j0.exec(t),n=e&&fn.extensions[e[1].toLowerCase()];return!n||!n.length?!1:n[0]}function iM(t){if(!t||typeof t!="string")return!1;var e=tM("x."+t).toLowerCase().substr(1);return e&&fn.types[e]||!1}function sM(t,e){var n=["nginx","apache",void 0,"iana"];Object.keys(El).forEach(function(o){var i=El[o],s=i.extensions;if(!(!s||!s.length)){t[o]=s;for(var a=0;a<s.length;a++){var c=s[a];if(e[c]){var l=n.indexOf(El[e[c]].source),p=n.indexOf(i.source);if(e[c]!=="application/octet-stream"&&(l>p||l===p&&e[c].substr(0,12)==="application/"))continue}e[c]=o}}})}});var F0=$((FV,M0)=>{M0.exports=aM;function aM(t){var e=typeof setImmediate=="function"?setImmediate:typeof process=="object"&&typeof process.nextTick=="function"?process.nextTick:null;e?e(t):setTimeout(t,0)}});var rh=$((UV,q0)=>{var U0=F0();q0.exports=cM;function cM(t){var e=!1;return U0(function(){e=!0}),function(r,o){e?t(r,o):U0(function(){t(r,o)})}}});var oh=$((qV,Z0)=>{Z0.exports=lM;function lM(t){Object.keys(t.jobs).forEach(uM.bind(t)),t.jobs={}}function uM(t){typeof this.jobs[t]=="function"&&this.jobs[t]()}});var ih=$((ZV,H0)=>{var B0=rh(),pM=oh();H0.exports=dM;function dM(t,e,n,r){var o=n.keyedList?n.keyedList[n.index]:n.index;n.jobs[o]=fM(e,o,t[o],function(i,s){o in n.jobs&&(delete n.jobs[o],i?pM(n):n.results[o]=s,r(i,n.results))})}function fM(t,e,n,r){var o;return t.length==2?o=t(n,B0(r)):o=t(n,e,B0(r)),o}});var sh=$((BV,V0)=>{V0.exports=mM;function mM(t,e){var n=!Array.isArray(t),r={index:0,keyedList:n||e?Object.keys(t):null,jobs:{},results:n?{}:[],size:n?Object.keys(t).length:t.length};return e&&r.keyedList.sort(n?e:function(o,i){return e(t[o],t[i])}),r}});var ah=$((HV,G0)=>{var hM=oh(),gM=rh();G0.exports=yM;function yM(t){Object.keys(this.jobs).length&&(this.index=this.size,hM(this),gM(t)(null,this.results))}});var K0=$((VV,W0)=>{var xM=ih(),vM=sh(),bM=ah();W0.exports=_M;function _M(t,e,n){for(var r=vM(t);r.index<(r.keyedList||t).length;)xM(t,e,r,function(o,i){if(o){n(o,i);return}if(Object.keys(r.jobs).length===0){n(null,r.results);return}}),r.index++;return bM.bind(r,n)}});var ch=$((GV,$l)=>{var J0=ih(),wM=sh(),SM=ah();$l.exports=kM;$l.exports.ascending=Y0;$l.exports.descending=TM;function kM(t,e,n,r){var o=wM(t,n);return J0(t,e,o,function i(s,a){if(s){r(s,a);return}if(o.index++,o.index<(o.keyedList||t).length){J0(t,e,o,i);return}r(null,o.results)}),SM.bind(o,r)}function Y0(t,e){return t<e?-1:t>e?1:0}function TM(t,e){return-1*Y0(t,e)}});var Q0=$((WV,X0)=>{var EM=ch();X0.exports=$M;function $M(t,e,n){return EM(t,e,null,n)}});var tS=$((KV,eS)=>{eS.exports={parallel:K0(),serial:Q0(),serialOrdered:ch()}});var lh=$((JV,nS)=>{"use strict";nS.exports=Object});var oS=$((YV,rS)=>{"use strict";rS.exports=Error});var sS=$((XV,iS)=>{"use strict";iS.exports=EvalError});var cS=$((QV,aS)=>{"use strict";aS.exports=RangeError});var uS=$((e5,lS)=>{"use strict";lS.exports=ReferenceError});var dS=$((t5,pS)=>{"use strict";pS.exports=SyntaxError});var Rl=$((n5,fS)=>{"use strict";fS.exports=TypeError});var hS=$((r5,mS)=>{"use strict";mS.exports=URIError});var yS=$((o5,gS)=>{"use strict";gS.exports=Math.abs});var vS=$((i5,xS)=>{"use strict";xS.exports=Math.floor});var _S=$((s5,bS)=>{"use strict";bS.exports=Math.max});var SS=$((a5,wS)=>{"use strict";wS.exports=Math.min});var TS=$((c5,kS)=>{"use strict";kS.exports=Math.pow});var $S=$((l5,ES)=>{"use strict";ES.exports=Math.round});var AS=$((u5,RS)=>{"use strict";RS.exports=Number.isNaN||function(e){return e!==e}});var CS=$((p5,IS)=>{"use strict";var RM=AS();IS.exports=function(e){return RM(e)||e===0?e:e<0?-1:1}});var OS=$((d5,PS)=>{"use strict";PS.exports=Object.getOwnPropertyDescriptor});var uh=$((f5,zS)=>{"use strict";var Al=OS();if(Al)try{Al([],"length")}catch{Al=null}zS.exports=Al});var jS=$((m5,NS)=>{"use strict";var Il=Object.defineProperty||!1;if(Il)try{Il({},"a",{value:1})}catch{Il=!1}NS.exports=Il});var ph=$((h5,LS)=>{"use strict";LS.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},n=Symbol("test"),r=Object(n);if(typeof n=="string"||Object.prototype.toString.call(n)!=="[object Symbol]"||Object.prototype.toString.call(r)!=="[object Symbol]")return!1;var o=42;e[n]=o;for(var i in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var s=Object.getOwnPropertySymbols(e);if(s.length!==1||s[0]!==n||!Object.prototype.propertyIsEnumerable.call(e,n))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var a=Object.getOwnPropertyDescriptor(e,n);if(a.value!==o||a.enumerable!==!0)return!1}return!0}});var FS=$((g5,MS)=>{"use strict";var DS=typeof Symbol<"u"&&Symbol,AM=ph();MS.exports=function(){return typeof DS!="function"||typeof Symbol!="function"||typeof DS("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:AM()}});var dh=$((y5,US)=>{"use strict";US.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null});var fh=$((x5,qS)=>{"use strict";var IM=lh();qS.exports=IM.getPrototypeOf||null});var HS=$((v5,BS)=>{"use strict";var CM="Function.prototype.bind called on incompatible ",PM=Object.prototype.toString,OM=Math.max,zM="[object Function]",ZS=function(e,n){for(var r=[],o=0;o<e.length;o+=1)r[o]=e[o];for(var i=0;i<n.length;i+=1)r[i+e.length]=n[i];return r},NM=function(e,n){for(var r=[],o=n||0,i=0;o<e.length;o+=1,i+=1)r[i]=e[o];return r},jM=function(t,e){for(var n="",r=0;r<t.length;r+=1)n+=t[r],r+1<t.length&&(n+=e);return n};BS.exports=function(e){var n=this;if(typeof n!="function"||PM.apply(n)!==zM)throw new TypeError(CM+n);for(var r=NM(arguments,1),o,i=function(){if(this instanceof o){var p=n.apply(this,ZS(r,arguments));return Object(p)===p?p:this}return n.apply(e,ZS(r,arguments))},s=OM(0,n.length-r.length),a=[],c=0;c<s;c++)a[c]="$"+c;if(o=Function("binder","return function ("+jM(a,",")+"){ return binder.apply(this,arguments); }")(i),n.prototype){var l=function(){};l.prototype=n.prototype,o.prototype=new l,l.prototype=null}return o}});var la=$((b5,VS)=>{"use strict";var LM=HS();VS.exports=Function.prototype.bind||LM});var Cl=$((_5,GS)=>{"use strict";GS.exports=Function.prototype.call});var mh=$((w5,WS)=>{"use strict";WS.exports=Function.prototype.apply});var JS=$((S5,KS)=>{"use strict";KS.exports=typeof Reflect<"u"&&Reflect&&Reflect.apply});var XS=$((k5,YS)=>{"use strict";var DM=la(),MM=mh(),FM=Cl(),UM=JS();YS.exports=UM||DM.call(FM,MM)});var ek=$((T5,QS)=>{"use strict";var qM=la(),ZM=Rl(),BM=Cl(),HM=XS();QS.exports=function(e){if(e.length<1||typeof e[0]!="function")throw new ZM("a function is required");return HM(qM,BM,e)}});var sk=$((E5,ik)=>{"use strict";var VM=ek(),tk=uh(),rk;try{rk=[].__proto__===Array.prototype}catch(t){if(!t||typeof t!="object"||!("code"in t)||t.code!=="ERR_PROTO_ACCESS")throw t}var hh=!!rk&&tk&&tk(Object.prototype,"__proto__"),ok=Object,nk=ok.getPrototypeOf;ik.exports=hh&&typeof hh.get=="function"?VM([hh.get]):typeof nk=="function"?function(e){return nk(e==null?e:ok(e))}:!1});var pk=$(($5,uk)=>{"use strict";var ak=dh(),ck=fh(),lk=sk();uk.exports=ak?function(e){return ak(e)}:ck?function(e){if(!e||typeof e!="object"&&typeof e!="function")throw new TypeError("getProto: not an object");return ck(e)}:lk?function(e){return lk(e)}:null});var Pl=$((R5,dk)=>{"use strict";var GM=Function.prototype.call,WM=Object.prototype.hasOwnProperty,KM=la();dk.exports=KM.call(GM,WM)});var vk=$((A5,xk)=>{"use strict";var Ie,JM=lh(),YM=oS(),XM=sS(),QM=cS(),e2=uS(),Di=dS(),Li=Rl(),t2=hS(),n2=yS(),r2=vS(),o2=_S(),i2=SS(),s2=TS(),a2=$S(),c2=CS(),gk=Function,gh=function(t){try{return gk('"use strict"; return ('+t+").constructor;")()}catch{}},ua=uh(),l2=jS(),yh=function(){throw new Li},u2=ua?(function(){try{return arguments.callee,yh}catch{try{return ua(arguments,"callee").get}catch{return yh}}})():yh,Ni=FS()(),Ct=pk(),p2=fh(),d2=dh(),yk=mh(),pa=Cl(),ji={},f2=typeof Uint8Array>"u"||!Ct?Ie:Ct(Uint8Array),jo={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?Ie:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?Ie:ArrayBuffer,"%ArrayIteratorPrototype%":Ni&&Ct?Ct([][Symbol.iterator]()):Ie,"%AsyncFromSyncIteratorPrototype%":Ie,"%AsyncFunction%":ji,"%AsyncGenerator%":ji,"%AsyncGeneratorFunction%":ji,"%AsyncIteratorPrototype%":ji,"%Atomics%":typeof Atomics>"u"?Ie:Atomics,"%BigInt%":typeof BigInt>"u"?Ie:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?Ie:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?Ie:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?Ie:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":YM,"%eval%":eval,"%EvalError%":XM,"%Float16Array%":typeof Float16Array>"u"?Ie:Float16Array,"%Float32Array%":typeof Float32Array>"u"?Ie:Float32Array,"%Float64Array%":typeof Float64Array>"u"?Ie:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?Ie:FinalizationRegistry,"%Function%":gk,"%GeneratorFunction%":ji,"%Int8Array%":typeof Int8Array>"u"?Ie:Int8Array,"%Int16Array%":typeof Int16Array>"u"?Ie:Int16Array,"%Int32Array%":typeof Int32Array>"u"?Ie:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Ni&&Ct?Ct(Ct([][Symbol.iterator]())):Ie,"%JSON%":typeof JSON=="object"?JSON:Ie,"%Map%":typeof Map>"u"?Ie:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Ni||!Ct?Ie:Ct(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":JM,"%Object.getOwnPropertyDescriptor%":ua,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?Ie:Promise,"%Proxy%":typeof Proxy>"u"?Ie:Proxy,"%RangeError%":QM,"%ReferenceError%":e2,"%Reflect%":typeof Reflect>"u"?Ie:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?Ie:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Ni||!Ct?Ie:Ct(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?Ie:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Ni&&Ct?Ct(""[Symbol.iterator]()):Ie,"%Symbol%":Ni?Symbol:Ie,"%SyntaxError%":Di,"%ThrowTypeError%":u2,"%TypedArray%":f2,"%TypeError%":Li,"%Uint8Array%":typeof Uint8Array>"u"?Ie:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?Ie:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?Ie:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?Ie:Uint32Array,"%URIError%":t2,"%WeakMap%":typeof WeakMap>"u"?Ie:WeakMap,"%WeakRef%":typeof WeakRef>"u"?Ie:WeakRef,"%WeakSet%":typeof WeakSet>"u"?Ie:WeakSet,"%Function.prototype.call%":pa,"%Function.prototype.apply%":yk,"%Object.defineProperty%":l2,"%Object.getPrototypeOf%":p2,"%Math.abs%":n2,"%Math.floor%":r2,"%Math.max%":o2,"%Math.min%":i2,"%Math.pow%":s2,"%Math.round%":a2,"%Math.sign%":c2,"%Reflect.getPrototypeOf%":d2};if(Ct)try{null.error}catch(t){fk=Ct(Ct(t)),jo["%Error.prototype%"]=fk}var fk,m2=function t(e){var n;if(e==="%AsyncFunction%")n=gh("async function () {}");else if(e==="%GeneratorFunction%")n=gh("function* () {}");else if(e==="%AsyncGeneratorFunction%")n=gh("async function* () {}");else if(e==="%AsyncGenerator%"){var r=t("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if(e==="%AsyncIteratorPrototype%"){var o=t("%AsyncGenerator%");o&&Ct&&(n=Ct(o.prototype))}return jo[e]=n,n},mk={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},da=la(),Ol=Pl(),h2=da.call(pa,Array.prototype.concat),g2=da.call(yk,Array.prototype.splice),hk=da.call(pa,String.prototype.replace),zl=da.call(pa,String.prototype.slice),y2=da.call(pa,RegExp.prototype.exec),x2=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,v2=/\\(\\)?/g,b2=function(e){var n=zl(e,0,1),r=zl(e,-1);if(n==="%"&&r!=="%")throw new Di("invalid intrinsic syntax, expected closing `%`");if(r==="%"&&n!=="%")throw new Di("invalid intrinsic syntax, expected opening `%`");var o=[];return hk(e,x2,function(i,s,a,c){o[o.length]=a?hk(c,v2,"$1"):s||i}),o},_2=function(e,n){var r=e,o;if(Ol(mk,r)&&(o=mk[r],r="%"+o[0]+"%"),Ol(jo,r)){var i=jo[r];if(i===ji&&(i=m2(r)),typeof i>"u"&&!n)throw new Li("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:o,name:r,value:i}}throw new Di("intrinsic "+e+" does not exist!")};xk.exports=function(e,n){if(typeof e!="string"||e.length===0)throw new Li("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof n!="boolean")throw new Li('"allowMissing" argument must be a boolean');if(y2(/^%?[^%]*%?$/,e)===null)throw new Di("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=b2(e),o=r.length>0?r[0]:"",i=_2("%"+o+"%",n),s=i.name,a=i.value,c=!1,l=i.alias;l&&(o=l[0],g2(r,h2([0,1],l)));for(var p=1,d=!0;p<r.length;p+=1){var f=r[p],h=zl(f,0,1),y=zl(f,-1);if((h==='"'||h==="'"||h==="`"||y==='"'||y==="'"||y==="`")&&h!==y)throw new Di("property names with quotes must have matching quotes");if((f==="constructor"||!d)&&(c=!0),o+="."+f,s="%"+o+"%",Ol(jo,s))a=jo[s];else if(a!=null){if(!(f in a)){if(!n)throw new Li("base intrinsic for "+e+" exists, but the property is not available.");return}if(ua&&p+1>=r.length){var v=ua(a,f);d=!!v,d&&"get"in v&&!("originalValue"in v.get)?a=v.get:a=a[f]}else d=Ol(a,f),a=a[f];d&&!c&&(jo[s]=a)}}return a}});var _k=$((I5,bk)=>{"use strict";var w2=ph();bk.exports=function(){return w2()&&!!Symbol.toStringTag}});var kk=$((C5,Sk)=>{"use strict";var S2=vk(),wk=S2("%Object.defineProperty%",!0),k2=_k()(),T2=Pl(),E2=Rl(),Nl=k2?Symbol.toStringTag:null;Sk.exports=function(e,n){var r=arguments.length>2&&!!arguments[2]&&arguments[2].force,o=arguments.length>2&&!!arguments[2]&&arguments[2].nonConfigurable;if(typeof r<"u"&&typeof r!="boolean"||typeof o<"u"&&typeof o!="boolean")throw new E2("if provided, the `overrideIfSet` and `nonConfigurable` options must be booleans");Nl&&(r||!T2(e,Nl))&&(wk?wk(e,Nl,{configurable:!o,enumerable:!1,value:n,writable:!1}):e[Nl]=n)}});var Ek=$((P5,Tk)=>{"use strict";Tk.exports=function(t,e){return Object.keys(e).forEach(function(n){t[n]=t[n]||e[n]}),t}});var Ak=$((O5,Rk)=>{"use strict";var _h=P0(),$2=require("util"),xh=require("path"),R2=require("http"),A2=require("https"),I2=require("url").parse,C2=require("fs"),P2=require("stream").Stream,O2=require("crypto"),vh=D0(),z2=tS(),N2=kk(),Ur=Pl(),bh=Ek();function $k(t){return String(t).replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/"/g,"%22")}function Ue(t){if(!(this instanceof Ue))return new Ue(t);this._overheadLength=0,this._valueLength=0,this._valuesToMeasure=[],_h.call(this),t=t||{};for(var e in t)this[e]=t[e]}$2.inherits(Ue,_h);Ue.LINE_BREAK=`\r
|
|
10
|
+
`;Ue.DEFAULT_CONTENT_TYPE="application/octet-stream";Ue.prototype.append=function(t,e,n){n=n||{},typeof n=="string"&&(n={filename:n});var r=_h.prototype.append.bind(this);if((typeof e=="number"||e==null)&&(e=String(e)),Array.isArray(e)){this._error(new Error("Arrays are not supported."));return}var o=this._multiPartHeader(t,e,n),i=this._multiPartFooter();r(o),r(e),r(i),this._trackLength(o,e,n)};Ue.prototype._trackLength=function(t,e,n){var r=0;n.knownLength!=null?r+=Number(n.knownLength):Buffer.isBuffer(e)?r=e.length:typeof e=="string"&&(r=Buffer.byteLength(e)),this._valueLength+=r,this._overheadLength+=Buffer.byteLength(t)+Ue.LINE_BREAK.length,!(!e||!e.path&&!(e.readable&&Ur(e,"httpVersion"))&&!(e instanceof P2))&&(n.knownLength||this._valuesToMeasure.push(e))};Ue.prototype._lengthRetriever=function(t,e){Ur(t,"fd")?t.end!=null&&t.end!=1/0&&t.start!=null?e(null,t.end+1-(t.start?t.start:0)):C2.stat(t.path,function(n,r){if(n){e(n);return}var o=r.size-(t.start?t.start:0);e(null,o)}):Ur(t,"httpVersion")?e(null,Number(t.headers["content-length"])):Ur(t,"httpModule")?(t.on("response",function(n){t.pause(),e(null,Number(n.headers["content-length"]))}),t.resume()):e("Unknown stream")};Ue.prototype._multiPartHeader=function(t,e,n){if(typeof n.header=="string")return n.header;var r=this._getContentDisposition(e,n),o=this._getContentType(e,n),i="",s={"Content-Disposition":["form-data",'name="'+$k(t)+'"'].concat(r||[]),"Content-Type":[].concat(o||[])};typeof n.header=="object"&&bh(s,n.header);var a;for(var c in s)if(Ur(s,c)){if(a=s[c],a==null)continue;Array.isArray(a)||(a=[a]),a.length&&(i+=c+": "+a.join("; ")+Ue.LINE_BREAK)}return"--"+this.getBoundary()+Ue.LINE_BREAK+i+Ue.LINE_BREAK};Ue.prototype._getContentDisposition=function(t,e){var n;if(typeof e.filepath=="string"?n=xh.normalize(e.filepath).replace(/\\/g,"/"):e.filename||t&&(t.name||t.path)?n=xh.basename(e.filename||t&&(t.name||t.path)):t&&t.readable&&Ur(t,"httpVersion")&&(n=xh.basename(t.client._httpMessage.path||"")),n)return'filename="'+$k(n)+'"'};Ue.prototype._getContentType=function(t,e){var n=e.contentType;return!n&&t&&t.name&&(n=vh.lookup(t.name)),!n&&t&&t.path&&(n=vh.lookup(t.path)),!n&&t&&t.readable&&Ur(t,"httpVersion")&&(n=t.headers["content-type"]),!n&&(e.filepath||e.filename)&&(n=vh.lookup(e.filepath||e.filename)),!n&&t&&typeof t=="object"&&(n=Ue.DEFAULT_CONTENT_TYPE),n};Ue.prototype._multiPartFooter=function(){return function(t){var e=Ue.LINE_BREAK,n=this._streams.length===0;n&&(e+=this._lastBoundary()),t(e)}.bind(this)};Ue.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+Ue.LINE_BREAK};Ue.prototype.getHeaders=function(t){var e,n={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(e in t)Ur(t,e)&&(n[e.toLowerCase()]=t[e]);return n};Ue.prototype.setBoundary=function(t){if(typeof t!="string")throw new TypeError("FormData boundary must be a string");this._boundary=t};Ue.prototype.getBoundary=function(){return this._boundary||this._generateBoundary(),this._boundary};Ue.prototype.getBuffer=function(){for(var t=new Buffer.alloc(0),e=this.getBoundary(),n=0,r=this._streams.length;n<r;n++)typeof this._streams[n]!="function"&&(Buffer.isBuffer(this._streams[n])?t=Buffer.concat([t,this._streams[n]]):t=Buffer.concat([t,Buffer.from(this._streams[n])]),(typeof this._streams[n]!="string"||this._streams[n].substring(2,e.length+2)!==e)&&(t=Buffer.concat([t,Buffer.from(Ue.LINE_BREAK)])));return Buffer.concat([t,Buffer.from(this._lastBoundary())])};Ue.prototype._generateBoundary=function(){this._boundary="--------------------------"+O2.randomBytes(12).toString("hex")};Ue.prototype.getLengthSync=function(){var t=this._overheadLength+this._valueLength;return this._streams.length&&(t+=this._lastBoundary().length),this.hasKnownLength()||this._error(new Error("Cannot calculate proper length in synchronous way.")),t};Ue.prototype.hasKnownLength=function(){var t=!0;return this._valuesToMeasure.length&&(t=!1),t};Ue.prototype.getLength=function(t){var e=this._overheadLength+this._valueLength;if(this._streams.length&&(e+=this._lastBoundary().length),!this._valuesToMeasure.length){process.nextTick(t.bind(this,null,e));return}z2.parallel(this._valuesToMeasure,this._lengthRetriever,function(n,r){if(n){t(n);return}r.forEach(function(o){e+=o}),t(null,e)})};Ue.prototype.submit=function(t,e){var n,r,o={method:"post"};return typeof t=="string"?(t=I2(t),r=bh({port:t.port,path:t.pathname,host:t.hostname,protocol:t.protocol},o)):(r=bh(t,o),r.port||(r.port=r.protocol==="https:"?443:80)),r.headers=this.getHeaders(t.headers),r.protocol==="https:"?n=A2.request(r):n=R2.request(r),this.getLength(function(i,s){if(i&&i!=="Unknown stream"){this._error(i);return}if(s&&n.setHeader("Content-Length",s),this.pipe(n),e){var a,c=function(l,p){return n.removeListener("error",c),n.removeListener("response",a),e.call(this,l,p)};a=c.bind(this,null),n.on("error",c),n.on("response",a)}}.bind(this)),n};Ue.prototype._error=function(t){this.error||(this.error=t,this.pause(),this.emit("error",t))};Ue.prototype.toString=function(){return"[object FormData]"};N2(Ue.prototype,"FormData");Rk.exports=Ue});var Gk=$((CG,Vk)=>{var Ui=1e3,qi=Ui*60,Zi=qi*60,Mo=Zi*24,tF=Mo*7,nF=Mo*365.25;Vk.exports=function(t,e){e=e||{};var n=typeof t;if(n==="string"&&t.length>0)return rF(t);if(n==="number"&&isFinite(t))return e.long?iF(t):oF(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function rF(t){if(t=String(t),!(t.length>100)){var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(e){var n=parseFloat(e[1]),r=(e[2]||"ms").toLowerCase();switch(r){case"years":case"year":case"yrs":case"yr":case"y":return n*nF;case"weeks":case"week":case"w":return n*tF;case"days":case"day":case"d":return n*Mo;case"hours":case"hour":case"hrs":case"hr":case"h":return n*Zi;case"minutes":case"minute":case"mins":case"min":case"m":return n*qi;case"seconds":case"second":case"secs":case"sec":case"s":return n*Ui;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n;default:return}}}}function oF(t){var e=Math.abs(t);return e>=Mo?Math.round(t/Mo)+"d":e>=Zi?Math.round(t/Zi)+"h":e>=qi?Math.round(t/qi)+"m":e>=Ui?Math.round(t/Ui)+"s":t+"ms"}function iF(t){var e=Math.abs(t);return e>=Mo?Dl(t,e,Mo,"day"):e>=Zi?Dl(t,e,Zi,"hour"):e>=qi?Dl(t,e,qi,"minute"):e>=Ui?Dl(t,e,Ui,"second"):t+" ms"}function Dl(t,e,n,r){var o=e>=n*1.5;return Math.round(t/n)+" "+r+(o?"s":"")}});var Lh=$((PG,Wk)=>{function sF(t){n.debug=n,n.default=n,n.coerce=c,n.disable=s,n.enable=o,n.enabled=a,n.humanize=Gk(),n.destroy=l,Object.keys(t).forEach(p=>{n[p]=t[p]}),n.names=[],n.skips=[],n.formatters={};function e(p){let d=0;for(let f=0;f<p.length;f++)d=(d<<5)-d+p.charCodeAt(f),d|=0;return n.colors[Math.abs(d)%n.colors.length]}n.selectColor=e;function n(p){let d,f=null,h,y;function v(...x){if(!v.enabled)return;let m=v,b=Number(new Date),w=b-(d||b);m.diff=w,m.prev=d,m.curr=b,d=b,x[0]=n.coerce(x[0]),typeof x[0]!="string"&&x.unshift("%O");let k=0;x[0]=x[0].replace(/%([a-zA-Z%])/g,(F,j)=>{if(F==="%%")return"%";k++;let me=n.formatters[j];if(typeof me=="function"){let de=x[k];F=me.call(m,de),x.splice(k,1),k--}return F}),n.formatArgs.call(m,x),(m.log||n.log).apply(m,x)}return v.namespace=p,v.useColors=n.useColors(),v.color=n.selectColor(p),v.extend=r,v.destroy=n.destroy,Object.defineProperty(v,"enabled",{enumerable:!0,configurable:!1,get:()=>f!==null?f:(h!==n.namespaces&&(h=n.namespaces,y=n.enabled(p)),y),set:x=>{f=x}}),typeof n.init=="function"&&n.init(v),v}function r(p,d){let f=n(this.namespace+(typeof d>"u"?":":d)+p);return f.log=this.log,f}function o(p){n.save(p),n.namespaces=p,n.names=[],n.skips=[];let d=(typeof p=="string"?p:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let f of d)f[0]==="-"?n.skips.push(f.slice(1)):n.names.push(f)}function i(p,d){let f=0,h=0,y=-1,v=0;for(;f<p.length;)if(h<d.length&&(d[h]===p[f]||d[h]==="*"))d[h]==="*"?(y=h,v=f,h++):(f++,h++);else if(y!==-1)h=y+1,v++,f=v;else return!1;for(;h<d.length&&d[h]==="*";)h++;return h===d.length}function s(){let p=[...n.names,...n.skips.map(d=>"-"+d)].join(",");return n.enable(""),p}function a(p){for(let d of n.skips)if(i(p,d))return!1;for(let d of n.names)if(i(p,d))return!0;return!1}function c(p){return p instanceof Error?p.stack||p.message:p}function l(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return n.enable(n.load()),n}Wk.exports=sF});var Kk=$((mn,Ml)=>{mn.formatArgs=cF;mn.save=lF;mn.load=uF;mn.useColors=aF;mn.storage=pF();mn.destroy=(()=>{let t=!1;return()=>{t||(t=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();mn.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function aF(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let t;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(t=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(t[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function cF(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+Ml.exports.humanize(this.diff),!this.useColors)return;let e="color: "+this.color;t.splice(1,0,e,"color: inherit");let n=0,r=0;t[0].replace(/%[a-zA-Z%]/g,o=>{o!=="%%"&&(n++,o==="%c"&&(r=n))}),t.splice(r,0,e)}mn.log=console.debug||console.log||(()=>{});function lF(t){try{t?mn.storage.setItem("debug",t):mn.storage.removeItem("debug")}catch{}}function uF(){let t;try{t=mn.storage.getItem("debug")||mn.storage.getItem("DEBUG")}catch{}return!t&&typeof process<"u"&&"env"in process&&(t=process.env.DEBUG),t}function pF(){try{return localStorage}catch{}}Ml.exports=Lh()(mn);var{formatters:dF}=Ml.exports;dF.j=function(t){try{return JSON.stringify(t)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}});var Yk=$((OG,Jk)=>{"use strict";Jk.exports=(t,e=process.argv)=>{let n=t.startsWith("-")?"":t.length===1?"-":"--",r=e.indexOf(n+t),o=e.indexOf("--");return r!==-1&&(o===-1||r<o)}});var eT=$((zG,Qk)=>{"use strict";var fF=require("os"),Xk=require("tty"),Cn=Yk(),{env:Pt}=process,Br;Cn("no-color")||Cn("no-colors")||Cn("color=false")||Cn("color=never")?Br=0:(Cn("color")||Cn("colors")||Cn("color=true")||Cn("color=always"))&&(Br=1);"FORCE_COLOR"in Pt&&(Pt.FORCE_COLOR==="true"?Br=1:Pt.FORCE_COLOR==="false"?Br=0:Br=Pt.FORCE_COLOR.length===0?1:Math.min(parseInt(Pt.FORCE_COLOR,10),3));function Dh(t){return t===0?!1:{level:t,hasBasic:!0,has256:t>=2,has16m:t>=3}}function Mh(t,e){if(Br===0)return 0;if(Cn("color=16m")||Cn("color=full")||Cn("color=truecolor"))return 3;if(Cn("color=256"))return 2;if(t&&!e&&Br===void 0)return 0;let n=Br||0;if(Pt.TERM==="dumb")return n;if(process.platform==="win32"){let r=fF.release().split(".");return Number(r[0])>=10&&Number(r[2])>=10586?Number(r[2])>=14931?3:2:1}if("CI"in Pt)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(r=>r in Pt)||Pt.CI_NAME==="codeship"?1:n;if("TEAMCITY_VERSION"in Pt)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(Pt.TEAMCITY_VERSION)?1:0;if(Pt.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in Pt){let r=parseInt((Pt.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(Pt.TERM_PROGRAM){case"iTerm.app":return r>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(Pt.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(Pt.TERM)||"COLORTERM"in Pt?1:n}function mF(t){let e=Mh(t,t&&t.isTTY);return Dh(e)}Qk.exports={supportsColor:mF,stdout:Dh(Mh(!0,Xk.isatty(1))),stderr:Dh(Mh(!0,Xk.isatty(2)))}});var nT=$((Ot,Ul)=>{var hF=require("tty"),Fl=require("util");Ot.init=wF;Ot.log=vF;Ot.formatArgs=yF;Ot.save=bF;Ot.load=_F;Ot.useColors=gF;Ot.destroy=Fl.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");Ot.colors=[6,2,3,4,5,1];try{let t=eT();t&&(t.stderr||t).level>=2&&(Ot.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch{}Ot.inspectOpts=Object.keys(process.env).filter(t=>/^debug_/i.test(t)).reduce((t,e)=>{let n=e.substring(6).toLowerCase().replace(/_([a-z])/g,(o,i)=>i.toUpperCase()),r=process.env[e];return/^(yes|on|true|enabled)$/i.test(r)?r=!0:/^(no|off|false|disabled)$/i.test(r)?r=!1:r==="null"?r=null:r=Number(r),t[n]=r,t},{});function gF(){return"colors"in Ot.inspectOpts?!!Ot.inspectOpts.colors:hF.isatty(process.stderr.fd)}function yF(t){let{namespace:e,useColors:n}=this;if(n){let r=this.color,o="\x1B[3"+(r<8?r:"8;5;"+r),i=` ${o};1m${e} \x1B[0m`;t[0]=i+t[0].split(`
|
|
11
11
|
`).join(`
|
|
12
|
-
`+i),t.push(o+"m+"+
|
|
13
|
-
`)}function
|
|
14
|
-
`).map(e=>e.trim()).join(" ")};
|
|
15
|
-
`).some(e=>e.indexOf("(https.js:")!==-1||e.indexOf("node:https:")!==-1)}function
|
|
12
|
+
`+i),t.push(o+"m+"+Ul.exports.humanize(this.diff)+"\x1B[0m")}else t[0]=xF()+e+" "+t[0]}function xF(){return Ot.inspectOpts.hideDate?"":new Date().toISOString()+" "}function vF(...t){return process.stderr.write(Fl.formatWithOptions(Ot.inspectOpts,...t)+`
|
|
13
|
+
`)}function bF(t){t?process.env.DEBUG=t:delete process.env.DEBUG}function _F(){return process.env.DEBUG}function wF(t){t.inspectOpts={};let e=Object.keys(Ot.inspectOpts);for(let n=0;n<e.length;n++)t.inspectOpts[e[n]]=Ot.inspectOpts[e[n]]}Ul.exports=Lh()(Ot);var{formatters:tT}=Ul.exports;tT.o=function(t){return this.inspectOpts.colors=this.useColors,Fl.inspect(t,this.inspectOpts).split(`
|
|
14
|
+
`).map(e=>e.trim()).join(" ")};tT.O=function(t){return this.inspectOpts.colors=this.useColors,Fl.inspect(t,this.inspectOpts)}});var Fo=$((NG,Fh)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?Fh.exports=Kk():Fh.exports=nT()});var rT=$(Uh=>{"use strict";Object.defineProperty(Uh,"__esModule",{value:!0});function SF(t){return function(e,n){return new Promise((r,o)=>{t.call(this,e,n,(i,s)=>{i?o(i):r(s)})})}}Uh.default=SF});var sT=$((Zh,iT)=>{"use strict";var oT=Zh&&Zh.__importDefault||function(t){return t&&t.__esModule?t:{default:t}},kF=require("events"),TF=oT(Fo()),EF=oT(rT()),ha=TF.default("agent-base");function $F(t){return!!t&&typeof t.addRequest=="function"}function qh(){let{stack:t}=new Error;return typeof t!="string"?!1:t.split(`
|
|
15
|
+
`).some(e=>e.indexOf("(https.js:")!==-1||e.indexOf("node:https:")!==-1)}function ql(t,e){return new ql.Agent(t,e)}(function(t){class e extends kF.EventEmitter{constructor(r,o){super();let i=o;typeof r=="function"?this.callback=r:r&&(i=r),this.timeout=null,i&&typeof i.timeout=="number"&&(this.timeout=i.timeout),this.maxFreeSockets=1,this.maxSockets=1,this.maxTotalSockets=1/0,this.sockets={},this.freeSockets={},this.requests={},this.options={}}get defaultPort(){return typeof this.explicitDefaultPort=="number"?this.explicitDefaultPort:qh()?443:80}set defaultPort(r){this.explicitDefaultPort=r}get protocol(){return typeof this.explicitProtocol=="string"?this.explicitProtocol:qh()?"https:":"http:"}set protocol(r){this.explicitProtocol=r}callback(r,o,i){throw new Error('"agent-base" has no default implementation, you must subclass and override `callback()`')}addRequest(r,o){let i=Object.assign({},o);typeof i.secureEndpoint!="boolean"&&(i.secureEndpoint=qh()),i.host==null&&(i.host="localhost"),i.port==null&&(i.port=i.secureEndpoint?443:80),i.protocol==null&&(i.protocol=i.secureEndpoint?"https:":"http:"),i.host&&i.path&&delete i.path,delete i.agent,delete i.hostname,delete i._defaultAgent,delete i.defaultPort,delete i.createConnection,r._last=!0,r.shouldKeepAlive=!1;let s=!1,a=null,c=i.timeout||this.timeout,l=h=>{r._hadError||(r.emit("error",h),r._hadError=!0)},p=()=>{a=null,s=!0;let h=new Error(`A "socket" was not created for HTTP request before ${c}ms`);h.code="ETIMEOUT",l(h)},d=h=>{s||(a!==null&&(clearTimeout(a),a=null),l(h))},f=h=>{if(s)return;if(a!=null&&(clearTimeout(a),a=null),$F(h)){ha("Callback returned another Agent instance %o",h.constructor.name),h.addRequest(r,i);return}if(h){h.once("free",()=>{this.freeSocket(h,i)}),r.onSocket(h);return}let y=new Error(`no Duplex stream was returned to agent-base for \`${r.method} ${r.path}\``);l(y)};if(typeof this.callback!="function"){l(new Error("`callback` is not defined"));return}this.promisifiedCallback||(this.callback.length>=3?(ha("Converting legacy callback function to promise"),this.promisifiedCallback=EF.default(this.callback)):this.promisifiedCallback=this.callback),typeof c=="number"&&c>0&&(a=setTimeout(p,c)),"port"in i&&typeof i.port!="number"&&(i.port=Number(i.port));try{ha("Resolving socket for %o request: %o",i.protocol,`${r.method} ${r.path}`),Promise.resolve(this.promisifiedCallback(r,i)).then(f,d)}catch(h){Promise.reject(h).catch(d)}}freeSocket(r,o){ha("Freeing socket %o %o",r.constructor.name,o),r.destroy()}destroy(){ha("Destroying agent %o",this.constructor.name)}}t.Agent=e,t.prototype=t.Agent.prototype})(ql||(ql={}));iT.exports=ql});var aT=$(ya=>{"use strict";var RF=ya&&ya.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(ya,"__esModule",{value:!0});var AF=RF(Fo()),ga=AF.default("https-proxy-agent:parse-proxy-response");function IF(t){return new Promise((e,n)=>{let r=0,o=[];function i(){let d=t.read();d?p(d):t.once("readable",i)}function s(){t.removeListener("end",c),t.removeListener("error",l),t.removeListener("close",a),t.removeListener("readable",i)}function a(d){ga("onclose had error %o",d)}function c(){ga("onend")}function l(d){s(),ga("onerror %o",d),n(d)}function p(d){o.push(d),r+=d.length;let f=Buffer.concat(o,r);if(f.indexOf(`\r
|
|
16
16
|
\r
|
|
17
|
-
`)===-1){
|
|
18
|
-
`)),v=+y.split(" ")[1];
|
|
19
|
-
`;
|
|
20
|
-
`;let f=
|
|
21
|
-
`);let{statusCode:m,buffered:y}=yield f;if(m===200){if(e.once("socket",kq),r.secureEndpoint){fa("Upgrading socket connection to TLS");let x=r.servername||r.host;return r$.default.connect(Object.assign(Object.assign({},Tq(r,"host","hostname","path","port")),{socket:i,servername:x}))}return i}i.destroy();let v=new t$.default.Socket({writable:!1});return v.readable=!0,e.once("socket",x=>{fa("replaying proxy buffer for failed request"),bq.default(x.listenerCount("data")>0),x.push(y),x.push(null)}),v})}};Do.default=Dh;function kq(t){t.resume()}function $q(t,e){return!!(!e&&t===80||e&&t===443)}function Eq(t){return typeof t=="string"?/^https:?$/i.test(t):!1}function Tq(t,...e){let r={},n;for(n in t)e.includes(n)||(r[n]=t[n]);return r}});var i$=T((Fh,o$)=>{"use strict";var Rq=Fh&&Fh.__importDefault||function(t){return t&&t.__esModule?t:{default:t}},Mh=Rq(n$());function qh(t){return new Mh.default(t)}(function(t){t.HttpsProxyAgent=Mh.default,t.prototype=Mh.default.prototype})(qh||(qh={}));o$.exports=qh});var a$=T((kG,s$)=>{var ma;s$.exports=function(){if(!ma){try{ma=Lo()("follow-redirects")}catch{}typeof ma!="function"&&(ma=function(){})}ma.apply(null,arguments)}});var d$=T(($G,Qh)=>{var ga=require("url"),ha=ga.URL,Pq=require("http"),Aq=require("https"),Vh=require("stream").Writable,Gh=require("assert"),c$=a$();(function(){var e=typeof process<"u",r=typeof window<"u"&&typeof document<"u",n=qo(Error.captureStackTrace);!e&&(r||!n)&&console.warn("The follow-redirects package should be excluded from browser builds.")})();var Wh=!1;try{Gh(new ha(""))}catch(t){Wh=t.code==="ERR_INVALID_URL"}var Iq=["Authorization","Proxy-Authorization","Cookie"],zq=["auth","host","hostname","href","path","pathname","port","protocol","query","search","hash"],Kh=["abort","aborted","connect","error","socket","timeout"],Jh=Object.create(null);Kh.forEach(function(t){Jh[t]=function(e,r,n){this._redirectable.emit(t,e,r,n)}});var Zh=ya("ERR_INVALID_URL","Invalid URL",TypeError),Bh=ya("ERR_FR_REDIRECTION_FAILURE","Redirected request failed"),Cq=ya("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded",Bh),Oq=ya("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),Nq=ya("ERR_STREAM_WRITE_AFTER_END","write after end"),jq=Vh.prototype.destroy||u$;function mr(t,e){Vh.call(this),this._sanitizeOptions(t),this._options=t,this._ended=!1,this._ending=!1,this._redirectCount=0,this._redirects=[],this._requestBodyLength=0,this._requestBodyBuffers=[],e&&this.on("response",e);var r=this;this._onNativeResponse=function(n){try{r._processResponse(n)}catch(o){r.emit("error",o instanceof Bh?o:new Bh({cause:o}))}},this._headerFilter=new RegExp("^(?:"+Iq.concat(t.sensitiveHeaders).map(Uq).join("|")+")$","i"),this._performRequest()}mr.prototype=Object.create(Vh.prototype);mr.prototype.abort=function(){Xh(this._currentRequest),this._currentRequest.abort(),this.emit("abort")};mr.prototype.destroy=function(t){return Xh(this._currentRequest,t),jq.call(this,t),this};mr.prototype.write=function(t,e,r){if(this._ending)throw new Nq;if(!Mo(t)&&!qq(t))throw new TypeError("data should be a string, Buffer or Uint8Array");if(qo(e)&&(r=e,e=null),t.length===0){r&&r();return}this._requestBodyLength+t.length<=this._options.maxBodyLength?(this._requestBodyLength+=t.length,this._requestBodyBuffers.push({data:t,encoding:e}),this._currentRequest.write(t,e,r)):(this.emit("error",new Oq),this.abort())};mr.prototype.end=function(t,e,r){if(qo(t)?(r=t,t=e=null):qo(e)&&(r=e,e=null),!t)this._ended=this._ending=!0,this._currentRequest.end(null,null,r);else{var n=this,o=this._currentRequest;this.write(t,e,function(){n._ended=!0,o.end(null,null,r)}),this._ending=!0}};mr.prototype.setHeader=function(t,e){this._options.headers[t]=e,this._currentRequest.setHeader(t,e)};mr.prototype.removeHeader=function(t){delete this._options.headers[t],this._currentRequest.removeHeader(t)};mr.prototype.setTimeout=function(t,e){var r=this;function n(s){s.setTimeout(t),s.removeListener("timeout",s.destroy),s.addListener("timeout",s.destroy)}function o(s){r._timeout&&clearTimeout(r._timeout),r._timeout=setTimeout(function(){r.emit("timeout"),i()},t),n(s)}function i(){r._timeout&&(clearTimeout(r._timeout),r._timeout=null),r.removeListener("abort",i),r.removeListener("error",i),r.removeListener("response",i),r.removeListener("close",i),e&&r.removeListener("timeout",e),r.socket||r._currentRequest.removeListener("socket",o)}return e&&this.on("timeout",e),this.socket?o(this.socket):this._currentRequest.once("socket",o),this.on("socket",n),this.on("abort",i),this.on("error",i),this.on("response",i),this.on("close",i),this};["flushHeaders","getHeader","setNoDelay","setSocketKeepAlive"].forEach(function(t){mr.prototype[t]=function(e,r){return this._currentRequest[t](e,r)}});["aborted","connection","socket"].forEach(function(t){Object.defineProperty(mr.prototype,t,{get:function(){return this._currentRequest[t]}})});mr.prototype._sanitizeOptions=function(t){if(t.headers||(t.headers={}),Mq(t.sensitiveHeaders)||(t.sensitiveHeaders=[]),t.host&&(t.hostname||(t.hostname=t.host),delete t.host),!t.pathname&&t.path){var e=t.path.indexOf("?");e<0?t.pathname=t.path:(t.pathname=t.path.substring(0,e),t.search=t.path.substring(e))}};mr.prototype._performRequest=function(){var t=this._options.protocol,e=this._options.nativeProtocols[t];if(!e)throw new TypeError("Unsupported protocol "+t);if(this._options.agents){var r=t.slice(0,-1);this._options.agent=this._options.agents[r]}var n=this._currentRequest=e.request(this._options,this._onNativeResponse);n._redirectable=this;for(var o of Kh)n.on(o,Jh[o]);if(this._currentUrl=/^\//.test(this._options.path)?ga.format(this._options):this._options.path,this._isRedirect){var i=0,s=this,a=this._requestBodyBuffers;(function c(l){if(n===s._currentRequest)if(l)s.emit("error",l);else if(i<a.length){var p=a[i++];n.finished||n.write(p.data,p.encoding,c)}else s._ended&&n.end()})()}};mr.prototype._processResponse=function(t){var e=t.statusCode;this._options.trackRedirects&&this._redirects.push({url:this._currentUrl,headers:t.headers,statusCode:e});var r=t.headers.location;if(!r||this._options.followRedirects===!1||e<300||e>=400){t.responseUrl=this._currentUrl,t.redirects=this._redirects,this.emit("response",t),this._requestBodyBuffers=[];return}if(Xh(this._currentRequest),t.destroy(),++this._redirectCount>this._options.maxRedirects)throw new Cq;var n,o=this._options.beforeRedirect;o&&(n=Object.assign({Host:t.req.getHeader("host")},this._options.headers));var i=this._options.method;((e===301||e===302)&&this._options.method==="POST"||e===303&&!/^(?:GET|HEAD)$/.test(this._options.method))&&(this._options.method="GET",this._requestBodyBuffers=[],Uh(/^content-/i,this._options.headers));var s=Uh(/^host$/i,this._options.headers),a=Yh(this._currentUrl),c=s||a.host,l=/^\w+:/.test(r)?this._currentUrl:ga.format(Object.assign(a,{host:c})),p=Lq(r,l);if(c$("redirecting to",p.href),this._isRedirect=!0,Hh(p,this._options),(p.protocol!==a.protocol&&p.protocol!=="https:"||p.host!==c&&!Dq(p.host,c))&&Uh(this._headerFilter,this._options.headers),qo(o)){var d={headers:t.headers,statusCode:e},f={url:l,method:i,headers:n};o(this._options,d,f),this._sanitizeOptions(this._options)}this._performRequest()};function l$(t){var e={maxRedirects:21,maxBodyLength:10485760},r={};return Object.keys(t).forEach(function(n){var o=n+":",i=r[o]=t[n],s=e[n]=Object.create(i);function a(l,p,d){return Fq(l)?l=Hh(l):Mo(l)?l=Hh(Yh(l)):(d=p,p=p$(l),l={protocol:o}),qo(p)&&(d=p,p=null),p=Object.assign({maxRedirects:e.maxRedirects,maxBodyLength:e.maxBodyLength},l,p),p.nativeProtocols=r,!Mo(p.host)&&!Mo(p.hostname)&&(p.hostname="::1"),Gh.equal(p.protocol,o,"protocol mismatch"),c$("options",p),new mr(p,d)}function c(l,p,d){var f=s.request(l,p,d);return f.end(),f}Object.defineProperties(s,{request:{value:a,configurable:!0,enumerable:!0,writable:!0},get:{value:c,configurable:!0,enumerable:!0,writable:!0}})}),e}function u$(){}function Yh(t){var e;if(Wh)e=new ha(t);else if(e=p$(ga.parse(t)),!Mo(e.protocol))throw new Zh({input:t});return e}function Lq(t,e){return Wh?new ha(t,e):Yh(ga.resolve(e,t))}function p$(t){if(/^\[/.test(t.hostname)&&!/^\[[:0-9a-f]+\]$/i.test(t.hostname))throw new Zh({input:t.href||t});if(/^\[/.test(t.host)&&!/^\[[:0-9a-f]+\](:\d+)?$/i.test(t.host))throw new Zh({input:t.href||t});return t}function Hh(t,e){var r=e||{};for(var n of zq)r[n]=t[n];return r.hostname.startsWith("[")&&(r.hostname=r.hostname.slice(1,-1)),r.port!==""&&(r.port=Number(r.port)),r.path=r.search?r.pathname+r.search:r.pathname,r}function Uh(t,e){var r;for(var n in e)t.test(n)&&(r=e[n],delete e[n]);return r===null||typeof r>"u"?void 0:String(r).trim()}function ya(t,e,r){function n(o){qo(Error.captureStackTrace)&&Error.captureStackTrace(this,this.constructor),Object.assign(this,o||{}),this.code=t,this.message=this.cause?e+": "+this.cause.message:e}return n.prototype=new(r||Error),Object.defineProperties(n.prototype,{constructor:{value:n,enumerable:!1},name:{value:"Error ["+t+"]",enumerable:!1}}),n}function Xh(t,e){for(var r of Kh)t.removeListener(r,Jh[r]);t.on("error",u$),t.destroy(e)}function Dq(t,e){Gh(Mo(t)&&Mo(e));var r=t.length-e.length-1;return r>0&&t[r]==="."&&t.endsWith(e)}function Mq(t){return t instanceof Array}function Mo(t){return typeof t=="string"||t instanceof String}function qo(t){return typeof t=="function"}function qq(t){return typeof t=="object"&&"length"in t}function Fq(t){return ha&&t instanceof ha}function Uq(t){return t.replace(/[\]\\/()*+?.$]/g,"\\$&")}Qh.exports=l$({http:Pq,https:Aq});Qh.exports.wrap=l$});var Y={};Ta(Y,{BRAND:()=>eR,DIRTY:()=>Jn,EMPTY_PATH:()=>zT,INVALID:()=>ae,NEVER:()=>LR,OK:()=>Ht,ParseStatus:()=>Nt,Schema:()=>ve,ZodAny:()=>kn,ZodArray:()=>mn,ZodBigInt:()=>Xn,ZodBoolean:()=>Qn,ZodBranded:()=>Ji,ZodCatch:()=>uo,ZodDate:()=>eo,ZodDefault:()=>lo,ZodDiscriminatedUnion:()=>Aa,ZodEffects:()=>wr,ZodEnum:()=>ao,ZodError:()=>nr,ZodFirstPartyTypeKind:()=>F,ZodFunction:()=>za,ZodIntersection:()=>oo,ZodIssueCode:()=>M,ZodLazy:()=>io,ZodLiteral:()=>so,ZodMap:()=>Ko,ZodNaN:()=>Yo,ZodNativeEnum:()=>co,ZodNever:()=>Nr,ZodNull:()=>ro,ZodNullable:()=>Yr,ZodNumber:()=>Yn,ZodObject:()=>ir,ZodOptional:()=>or,ZodParsedType:()=>K,ZodPipeline:()=>Yi,ZodPromise:()=>$n,ZodReadonly:()=>po,ZodRecord:()=>Ia,ZodSchema:()=>ve,ZodSet:()=>Jo,ZodString:()=>Sn,ZodSymbol:()=>Go,ZodTransformer:()=>wr,ZodTuple:()=>Jr,ZodType:()=>ve,ZodUndefined:()=>to,ZodUnion:()=>no,ZodUnknown:()=>fn,ZodVoid:()=>Wo,addIssueToContext:()=>H,any:()=>lR,array:()=>fR,bigint:()=>oR,boolean:()=>vy,coerce:()=>jR,custom:()=>gy,date:()=>iR,datetimeRegex:()=>my,defaultErrorMap:()=>pn,discriminatedUnion:()=>gR,effect:()=>RR,enum:()=>$R,function:()=>wR,getErrorMap:()=>Bo,getParsedType:()=>Kr,instanceof:()=>rR,intersection:()=>yR,isAborted:()=>Ra,isAsync:()=>Ho,isDirty:()=>Pa,isValid:()=>wn,late:()=>tR,lazy:()=>SR,literal:()=>kR,makeIssue:()=>Ki,map:()=>bR,nan:()=>nR,nativeEnum:()=>ER,never:()=>pR,null:()=>cR,nullable:()=>AR,number:()=>xy,object:()=>xu,objectUtil:()=>hu,oboolean:()=>NR,onumber:()=>OR,optional:()=>PR,ostring:()=>CR,pipeline:()=>zR,preprocess:()=>IR,promise:()=>TR,quotelessJson:()=>PT,record:()=>vR,set:()=>_R,setErrorMap:()=>IT,strictObject:()=>mR,string:()=>yy,symbol:()=>sR,transformer:()=>RR,tuple:()=>xR,undefined:()=>aR,union:()=>hR,unknown:()=>uR,util:()=>Te,void:()=>dR});var Te;(function(t){t.assertEqual=o=>{};function e(o){}t.assertIs=e;function r(o){throw new Error}t.assertNever=r,t.arrayToEnum=o=>{let i={};for(let s of o)i[s]=s;return i},t.getValidEnumValues=o=>{let i=t.objectKeys(o).filter(a=>typeof o[o[a]]!="number"),s={};for(let a of i)s[a]=o[a];return t.objectValues(s)},t.objectValues=o=>t.objectKeys(o).map(function(i){return o[i]}),t.objectKeys=typeof Object.keys=="function"?o=>Object.keys(o):o=>{let i=[];for(let s in o)Object.prototype.hasOwnProperty.call(o,s)&&i.push(s);return i},t.find=(o,i)=>{for(let s of o)if(i(s))return s},t.isInteger=typeof Number.isInteger=="function"?o=>Number.isInteger(o):o=>typeof o=="number"&&Number.isFinite(o)&&Math.floor(o)===o;function n(o,i=" | "){return o.map(s=>typeof s=="string"?`'${s}'`:s).join(i)}t.joinValues=n,t.jsonStringifyReplacer=(o,i)=>typeof i=="bigint"?i.toString():i})(Te||(Te={}));var hu;(function(t){t.mergeShapes=(e,r)=>({...e,...r})})(hu||(hu={}));var K=Te.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Kr=t=>{switch(typeof t){case"undefined":return K.undefined;case"string":return K.string;case"number":return Number.isNaN(t)?K.nan:K.number;case"boolean":return K.boolean;case"function":return K.function;case"bigint":return K.bigint;case"symbol":return K.symbol;case"object":return Array.isArray(t)?K.array:t===null?K.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?K.promise:typeof Map<"u"&&t instanceof Map?K.map:typeof Set<"u"&&t instanceof Set?K.set:typeof Date<"u"&&t instanceof Date?K.date:K.object;default:return K.unknown}};var M=Te.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),PT=t=>JSON.stringify(t,null,2).replace(/"([^"]+)":/g,"$1:"),nr=class t extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};let r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=e}format(e){let r=e||function(i){return i.message},n={_errors:[]},o=i=>{for(let s of i.issues)if(s.code==="invalid_union")s.unionErrors.map(o);else if(s.code==="invalid_return_type")o(s.returnTypeError);else if(s.code==="invalid_arguments")o(s.argumentsError);else if(s.path.length===0)n._errors.push(r(s));else{let a=n,c=0;for(;c<s.path.length;){let l=s.path[c];c===s.path.length-1?(a[l]=a[l]||{_errors:[]},a[l]._errors.push(r(s))):a[l]=a[l]||{_errors:[]},a=a[l],c++}}};return o(this),n}static assert(e){if(!(e instanceof t))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Te.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=r=>r.message){let r={},n=[];for(let o of this.issues)if(o.path.length>0){let i=o.path[0];r[i]=r[i]||[],r[i].push(e(o))}else n.push(e(o));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}};nr.create=t=>new nr(t);var AT=(t,e)=>{let r;switch(t.code){case M.invalid_type:t.received===K.undefined?r="Required":r=`Expected ${t.expected}, received ${t.received}`;break;case M.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(t.expected,Te.jsonStringifyReplacer)}`;break;case M.unrecognized_keys:r=`Unrecognized key(s) in object: ${Te.joinValues(t.keys,", ")}`;break;case M.invalid_union:r="Invalid input";break;case M.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${Te.joinValues(t.options)}`;break;case M.invalid_enum_value:r=`Invalid enum value. Expected ${Te.joinValues(t.options)}, received '${t.received}'`;break;case M.invalid_arguments:r="Invalid function arguments";break;case M.invalid_return_type:r="Invalid function return type";break;case M.invalid_date:r="Invalid date";break;case M.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(r=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?r=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?r=`Invalid input: must end with "${t.validation.endsWith}"`:Te.assertNever(t.validation):t.validation!=="regex"?r=`Invalid ${t.validation}`:r="Invalid";break;case M.too_small:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="bigint"?r=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:r="Invalid input";break;case M.too_big:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?r=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:r="Invalid input";break;case M.custom:r="Invalid input";break;case M.invalid_intersection_types:r="Intersection results could not be merged";break;case M.not_multiple_of:r=`Number must be a multiple of ${t.multipleOf}`;break;case M.not_finite:r="Number must be finite";break;default:r=e.defaultError,Te.assertNever(t)}return{message:r}},pn=AT;var ly=pn;function IT(t){ly=t}function Bo(){return ly}var Ki=t=>{let{data:e,path:r,errorMaps:n,issueData:o}=t,i=[...r,...o.path||[]],s={...o,path:i};if(o.message!==void 0)return{...o,path:i,message:o.message};let a="",c=n.filter(l=>!!l).slice().reverse();for(let l of c)a=l(s,{data:e,defaultError:a}).message;return{...o,path:i,message:a}},zT=[];function H(t,e){let r=Bo(),n=Ki({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,r,r===pn?void 0:pn].filter(o=>!!o)});t.common.issues.push(n)}var Nt=class t{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,r){let n=[];for(let o of r){if(o.status==="aborted")return ae;o.status==="dirty"&&e.dirty(),n.push(o.value)}return{status:e.value,value:n}}static async mergeObjectAsync(e,r){let n=[];for(let o of r){let i=await o.key,s=await o.value;n.push({key:i,value:s})}return t.mergeObjectSync(e,n)}static mergeObjectSync(e,r){let n={};for(let o of r){let{key:i,value:s}=o;if(i.status==="aborted"||s.status==="aborted")return ae;i.status==="dirty"&&e.dirty(),s.status==="dirty"&&e.dirty(),i.value!=="__proto__"&&(typeof s.value<"u"||o.alwaysSet)&&(n[i.value]=s.value)}return{status:e.value,value:n}}},ae=Object.freeze({status:"aborted"}),Jn=t=>({status:"dirty",value:t}),Ht=t=>({status:"valid",value:t}),Ra=t=>t.status==="aborted",Pa=t=>t.status==="dirty",wn=t=>t.status==="valid",Ho=t=>typeof Promise<"u"&&t instanceof Promise;var ee;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(ee||(ee={}));var _r=class{constructor(e,r,n,o){this._cachedPath=[],this.parent=e,this.data=r,this._path=n,this._key=o}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},uy=(t,e)=>{if(wn(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let r=new nr(t.common.issues);return this._error=r,this._error}}};function ge(t){if(!t)return{};let{errorMap:e,invalid_type_error:r,required_error:n,description:o}=t;if(e&&(r||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:o}:{errorMap:(s,a)=>{let{message:c}=t;return s.code==="invalid_enum_value"?{message:c??a.defaultError}:typeof a.data>"u"?{message:c??n??a.defaultError}:s.code!=="invalid_type"?{message:a.defaultError}:{message:c??r??a.defaultError}},description:o}}var ve=class{get description(){return this._def.description}_getType(e){return Kr(e.data)}_getOrReturnCtx(e,r){return r||{common:e.parent.common,data:e.data,parsedType:Kr(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new Nt,ctx:{common:e.parent.common,data:e.data,parsedType:Kr(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let r=this._parse(e);if(Ho(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(e){let r=this._parse(e);return Promise.resolve(r)}parse(e,r){let n=this.safeParse(e,r);if(n.success)return n.data;throw n.error}safeParse(e,r){let n={common:{issues:[],async:(r==null?void 0:r.async)??!1,contextualErrorMap:r==null?void 0:r.errorMap},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Kr(e)},o=this._parseSync({data:e,path:n.path,parent:n});return uy(n,o)}"~validate"(e){var n,o;let r={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Kr(e)};if(!this["~standard"].async)try{let i=this._parseSync({data:e,path:[],parent:r});return wn(i)?{value:i.value}:{issues:r.common.issues}}catch(i){(o=(n=i==null?void 0:i.message)==null?void 0:n.toLowerCase())!=null&&o.includes("encountered")&&(this["~standard"].async=!0),r.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:r}).then(i=>wn(i)?{value:i.value}:{issues:r.common.issues})}async parseAsync(e,r){let n=await this.safeParseAsync(e,r);if(n.success)return n.data;throw n.error}async safeParseAsync(e,r){let n={common:{issues:[],contextualErrorMap:r==null?void 0:r.errorMap,async:!0},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Kr(e)},o=this._parse({data:e,path:n.path,parent:n}),i=await(Ho(o)?o:Promise.resolve(o));return uy(n,i)}refine(e,r){let n=o=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(o):r;return this._refinement((o,i)=>{let s=e(o),a=()=>i.addIssue({code:M.custom,...n(o)});return typeof Promise<"u"&&s instanceof Promise?s.then(c=>c?!0:(a(),!1)):s?!0:(a(),!1)})}refinement(e,r){return this._refinement((n,o)=>e(n)?!0:(o.addIssue(typeof r=="function"?r(n,o):r),!1))}_refinement(e){return new wr({schema:this,typeName:F.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:r=>this["~validate"](r)}}optional(){return or.create(this,this._def)}nullable(){return Yr.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return mn.create(this)}promise(){return $n.create(this,this._def)}or(e){return no.create([this,e],this._def)}and(e){return oo.create(this,e,this._def)}transform(e){return new wr({...ge(this._def),schema:this,typeName:F.ZodEffects,effect:{type:"transform",transform:e}})}default(e){let r=typeof e=="function"?e:()=>e;return new lo({...ge(this._def),innerType:this,defaultValue:r,typeName:F.ZodDefault})}brand(){return new Ji({typeName:F.ZodBranded,type:this,...ge(this._def)})}catch(e){let r=typeof e=="function"?e:()=>e;return new uo({...ge(this._def),innerType:this,catchValue:r,typeName:F.ZodCatch})}describe(e){let r=this.constructor;return new r({...this._def,description:e})}pipe(e){return Yi.create(this,e)}readonly(){return po.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},CT=/^c[^\s-]{8,}$/i,OT=/^[0-9a-z]+$/,NT=/^[0-9A-HJKMNP-TV-Z]{26}$/i,jT=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,LT=/^[a-z0-9_-]{21}$/i,DT=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,MT=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,qT=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,FT="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",gu,UT=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,ZT=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,BT=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,HT=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,VT=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,GT=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,dy="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",WT=new RegExp(`^${dy}$`);function fy(t){let e="[0-5]\\d";t.precision?e=`${e}\\.\\d{${t.precision}}`:t.precision==null&&(e=`${e}(\\.\\d+)?`);let r=t.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${r}`}function KT(t){return new RegExp(`^${fy(t)}$`)}function my(t){let e=`${dy}T${fy(t)}`,r=[];return r.push(t.local?"Z?":"Z"),t.offset&&r.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${r.join("|")})`,new RegExp(`^${e}$`)}function JT(t,e){return!!((e==="v4"||!e)&&UT.test(t)||(e==="v6"||!e)&&BT.test(t))}function YT(t,e){if(!DT.test(t))return!1;try{let[r]=t.split(".");if(!r)return!1;let n=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),o=JSON.parse(atob(n));return!(typeof o!="object"||o===null||"typ"in o&&(o==null?void 0:o.typ)!=="JWT"||!o.alg||e&&o.alg!==e)}catch{return!1}}function XT(t,e){return!!((e==="v4"||!e)&&ZT.test(t)||(e==="v6"||!e)&&HT.test(t))}var Sn=class t extends ve{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==K.string){let i=this._getOrReturnCtx(e);return H(i,{code:M.invalid_type,expected:K.string,received:i.parsedType}),ae}let n=new Nt,o;for(let i of this._def.checks)if(i.kind==="min")e.data.length<i.value&&(o=this._getOrReturnCtx(e,o),H(o,{code:M.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),n.dirty());else if(i.kind==="max")e.data.length>i.value&&(o=this._getOrReturnCtx(e,o),H(o,{code:M.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),n.dirty());else if(i.kind==="length"){let s=e.data.length>i.value,a=e.data.length<i.value;(s||a)&&(o=this._getOrReturnCtx(e,o),s?H(o,{code:M.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):a&&H(o,{code:M.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),n.dirty())}else if(i.kind==="email")qT.test(e.data)||(o=this._getOrReturnCtx(e,o),H(o,{validation:"email",code:M.invalid_string,message:i.message}),n.dirty());else if(i.kind==="emoji")gu||(gu=new RegExp(FT,"u")),gu.test(e.data)||(o=this._getOrReturnCtx(e,o),H(o,{validation:"emoji",code:M.invalid_string,message:i.message}),n.dirty());else if(i.kind==="uuid")jT.test(e.data)||(o=this._getOrReturnCtx(e,o),H(o,{validation:"uuid",code:M.invalid_string,message:i.message}),n.dirty());else if(i.kind==="nanoid")LT.test(e.data)||(o=this._getOrReturnCtx(e,o),H(o,{validation:"nanoid",code:M.invalid_string,message:i.message}),n.dirty());else if(i.kind==="cuid")CT.test(e.data)||(o=this._getOrReturnCtx(e,o),H(o,{validation:"cuid",code:M.invalid_string,message:i.message}),n.dirty());else if(i.kind==="cuid2")OT.test(e.data)||(o=this._getOrReturnCtx(e,o),H(o,{validation:"cuid2",code:M.invalid_string,message:i.message}),n.dirty());else if(i.kind==="ulid")NT.test(e.data)||(o=this._getOrReturnCtx(e,o),H(o,{validation:"ulid",code:M.invalid_string,message:i.message}),n.dirty());else if(i.kind==="url")try{new URL(e.data)}catch{o=this._getOrReturnCtx(e,o),H(o,{validation:"url",code:M.invalid_string,message:i.message}),n.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(e.data)||(o=this._getOrReturnCtx(e,o),H(o,{validation:"regex",code:M.invalid_string,message:i.message}),n.dirty())):i.kind==="trim"?e.data=e.data.trim():i.kind==="includes"?e.data.includes(i.value,i.position)||(o=this._getOrReturnCtx(e,o),H(o,{code:M.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),n.dirty()):i.kind==="toLowerCase"?e.data=e.data.toLowerCase():i.kind==="toUpperCase"?e.data=e.data.toUpperCase():i.kind==="startsWith"?e.data.startsWith(i.value)||(o=this._getOrReturnCtx(e,o),H(o,{code:M.invalid_string,validation:{startsWith:i.value},message:i.message}),n.dirty()):i.kind==="endsWith"?e.data.endsWith(i.value)||(o=this._getOrReturnCtx(e,o),H(o,{code:M.invalid_string,validation:{endsWith:i.value},message:i.message}),n.dirty()):i.kind==="datetime"?my(i).test(e.data)||(o=this._getOrReturnCtx(e,o),H(o,{code:M.invalid_string,validation:"datetime",message:i.message}),n.dirty()):i.kind==="date"?WT.test(e.data)||(o=this._getOrReturnCtx(e,o),H(o,{code:M.invalid_string,validation:"date",message:i.message}),n.dirty()):i.kind==="time"?KT(i).test(e.data)||(o=this._getOrReturnCtx(e,o),H(o,{code:M.invalid_string,validation:"time",message:i.message}),n.dirty()):i.kind==="duration"?MT.test(e.data)||(o=this._getOrReturnCtx(e,o),H(o,{validation:"duration",code:M.invalid_string,message:i.message}),n.dirty()):i.kind==="ip"?JT(e.data,i.version)||(o=this._getOrReturnCtx(e,o),H(o,{validation:"ip",code:M.invalid_string,message:i.message}),n.dirty()):i.kind==="jwt"?YT(e.data,i.alg)||(o=this._getOrReturnCtx(e,o),H(o,{validation:"jwt",code:M.invalid_string,message:i.message}),n.dirty()):i.kind==="cidr"?XT(e.data,i.version)||(o=this._getOrReturnCtx(e,o),H(o,{validation:"cidr",code:M.invalid_string,message:i.message}),n.dirty()):i.kind==="base64"?VT.test(e.data)||(o=this._getOrReturnCtx(e,o),H(o,{validation:"base64",code:M.invalid_string,message:i.message}),n.dirty()):i.kind==="base64url"?GT.test(e.data)||(o=this._getOrReturnCtx(e,o),H(o,{validation:"base64url",code:M.invalid_string,message:i.message}),n.dirty()):Te.assertNever(i);return{status:n.value,value:e.data}}_regex(e,r,n){return this.refinement(o=>e.test(o),{validation:r,code:M.invalid_string,...ee.errToObj(n)})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...ee.errToObj(e)})}url(e){return this._addCheck({kind:"url",...ee.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...ee.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...ee.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...ee.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...ee.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...ee.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...ee.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...ee.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...ee.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...ee.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...ee.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...ee.errToObj(e)})}datetime(e){return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,offset:(e==null?void 0:e.offset)??!1,local:(e==null?void 0:e.local)??!1,...ee.errToObj(e==null?void 0:e.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,...ee.errToObj(e==null?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...ee.errToObj(e)})}regex(e,r){return this._addCheck({kind:"regex",regex:e,...ee.errToObj(r)})}includes(e,r){return this._addCheck({kind:"includes",value:e,position:r==null?void 0:r.position,...ee.errToObj(r==null?void 0:r.message)})}startsWith(e,r){return this._addCheck({kind:"startsWith",value:e,...ee.errToObj(r)})}endsWith(e,r){return this._addCheck({kind:"endsWith",value:e,...ee.errToObj(r)})}min(e,r){return this._addCheck({kind:"min",value:e,...ee.errToObj(r)})}max(e,r){return this._addCheck({kind:"max",value:e,...ee.errToObj(r)})}length(e,r){return this._addCheck({kind:"length",value:e,...ee.errToObj(r)})}nonempty(e){return this.min(1,ee.errToObj(e))}trim(){return new t({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new t({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new t({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxLength(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}};Sn.create=t=>new Sn({checks:[],typeName:F.ZodString,coerce:(t==null?void 0:t.coerce)??!1,...ge(t)});function QT(t,e){let r=(t.toString().split(".")[1]||"").length,n=(e.toString().split(".")[1]||"").length,o=r>n?r:n,i=Number.parseInt(t.toFixed(o).replace(".","")),s=Number.parseInt(e.toFixed(o).replace(".",""));return i%s/10**o}var Yn=class t extends ve{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==K.number){let i=this._getOrReturnCtx(e);return H(i,{code:M.invalid_type,expected:K.number,received:i.parsedType}),ae}let n,o=new Nt;for(let i of this._def.checks)i.kind==="int"?Te.isInteger(e.data)||(n=this._getOrReturnCtx(e,n),H(n,{code:M.invalid_type,expected:"integer",received:"float",message:i.message}),o.dirty()):i.kind==="min"?(i.inclusive?e.data<i.value:e.data<=i.value)&&(n=this._getOrReturnCtx(e,n),H(n,{code:M.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="max"?(i.inclusive?e.data>i.value:e.data>=i.value)&&(n=this._getOrReturnCtx(e,n),H(n,{code:M.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="multipleOf"?QT(e.data,i.value)!==0&&(n=this._getOrReturnCtx(e,n),H(n,{code:M.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):i.kind==="finite"?Number.isFinite(e.data)||(n=this._getOrReturnCtx(e,n),H(n,{code:M.not_finite,message:i.message}),o.dirty()):Te.assertNever(i);return{status:o.value,value:e.data}}gte(e,r){return this.setLimit("min",e,!0,ee.toString(r))}gt(e,r){return this.setLimit("min",e,!1,ee.toString(r))}lte(e,r){return this.setLimit("max",e,!0,ee.toString(r))}lt(e,r){return this.setLimit("max",e,!1,ee.toString(r))}setLimit(e,r,n,o){return new t({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:ee.toString(o)}]})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:ee.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:ee.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:ee.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:ee.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:ee.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:ee.toString(r)})}finite(e){return this._addCheck({kind:"finite",message:ee.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:ee.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:ee.toString(e)})}get minValue(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&Te.isInteger(e.value))}get isFinite(){let e=null,r=null;for(let n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(r===null||n.value>r)&&(r=n.value):n.kind==="max"&&(e===null||n.value<e)&&(e=n.value)}return Number.isFinite(r)&&Number.isFinite(e)}};Yn.create=t=>new Yn({checks:[],typeName:F.ZodNumber,coerce:(t==null?void 0:t.coerce)||!1,...ge(t)});var Xn=class t extends ve{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==K.bigint)return this._getInvalidInput(e);let n,o=new Nt;for(let i of this._def.checks)i.kind==="min"?(i.inclusive?e.data<i.value:e.data<=i.value)&&(n=this._getOrReturnCtx(e,n),H(n,{code:M.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),o.dirty()):i.kind==="max"?(i.inclusive?e.data>i.value:e.data>=i.value)&&(n=this._getOrReturnCtx(e,n),H(n,{code:M.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),o.dirty()):i.kind==="multipleOf"?e.data%i.value!==BigInt(0)&&(n=this._getOrReturnCtx(e,n),H(n,{code:M.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):Te.assertNever(i);return{status:o.value,value:e.data}}_getInvalidInput(e){let r=this._getOrReturnCtx(e);return H(r,{code:M.invalid_type,expected:K.bigint,received:r.parsedType}),ae}gte(e,r){return this.setLimit("min",e,!0,ee.toString(r))}gt(e,r){return this.setLimit("min",e,!1,ee.toString(r))}lte(e,r){return this.setLimit("max",e,!0,ee.toString(r))}lt(e,r){return this.setLimit("max",e,!1,ee.toString(r))}setLimit(e,r,n,o){return new t({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:ee.toString(o)}]})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:ee.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:ee.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:ee.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:ee.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:ee.toString(r)})}get minValue(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}};Xn.create=t=>new Xn({checks:[],typeName:F.ZodBigInt,coerce:(t==null?void 0:t.coerce)??!1,...ge(t)});var Qn=class extends ve{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==K.boolean){let n=this._getOrReturnCtx(e);return H(n,{code:M.invalid_type,expected:K.boolean,received:n.parsedType}),ae}return Ht(e.data)}};Qn.create=t=>new Qn({typeName:F.ZodBoolean,coerce:(t==null?void 0:t.coerce)||!1,...ge(t)});var eo=class t extends ve{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==K.date){let i=this._getOrReturnCtx(e);return H(i,{code:M.invalid_type,expected:K.date,received:i.parsedType}),ae}if(Number.isNaN(e.data.getTime())){let i=this._getOrReturnCtx(e);return H(i,{code:M.invalid_date}),ae}let n=new Nt,o;for(let i of this._def.checks)i.kind==="min"?e.data.getTime()<i.value&&(o=this._getOrReturnCtx(e,o),H(o,{code:M.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),n.dirty()):i.kind==="max"?e.data.getTime()>i.value&&(o=this._getOrReturnCtx(e,o),H(o,{code:M.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),n.dirty()):Te.assertNever(i);return{status:n.value,value:new Date(e.data.getTime())}}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}min(e,r){return this._addCheck({kind:"min",value:e.getTime(),message:ee.toString(r)})}max(e,r){return this._addCheck({kind:"max",value:e.getTime(),message:ee.toString(r)})}get minDate(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e!=null?new Date(e):null}};eo.create=t=>new eo({checks:[],coerce:(t==null?void 0:t.coerce)||!1,typeName:F.ZodDate,...ge(t)});var Go=class extends ve{_parse(e){if(this._getType(e)!==K.symbol){let n=this._getOrReturnCtx(e);return H(n,{code:M.invalid_type,expected:K.symbol,received:n.parsedType}),ae}return Ht(e.data)}};Go.create=t=>new Go({typeName:F.ZodSymbol,...ge(t)});var to=class extends ve{_parse(e){if(this._getType(e)!==K.undefined){let n=this._getOrReturnCtx(e);return H(n,{code:M.invalid_type,expected:K.undefined,received:n.parsedType}),ae}return Ht(e.data)}};to.create=t=>new to({typeName:F.ZodUndefined,...ge(t)});var ro=class extends ve{_parse(e){if(this._getType(e)!==K.null){let n=this._getOrReturnCtx(e);return H(n,{code:M.invalid_type,expected:K.null,received:n.parsedType}),ae}return Ht(e.data)}};ro.create=t=>new ro({typeName:F.ZodNull,...ge(t)});var kn=class extends ve{constructor(){super(...arguments),this._any=!0}_parse(e){return Ht(e.data)}};kn.create=t=>new kn({typeName:F.ZodAny,...ge(t)});var fn=class extends ve{constructor(){super(...arguments),this._unknown=!0}_parse(e){return Ht(e.data)}};fn.create=t=>new fn({typeName:F.ZodUnknown,...ge(t)});var Nr=class extends ve{_parse(e){let r=this._getOrReturnCtx(e);return H(r,{code:M.invalid_type,expected:K.never,received:r.parsedType}),ae}};Nr.create=t=>new Nr({typeName:F.ZodNever,...ge(t)});var Wo=class extends ve{_parse(e){if(this._getType(e)!==K.undefined){let n=this._getOrReturnCtx(e);return H(n,{code:M.invalid_type,expected:K.void,received:n.parsedType}),ae}return Ht(e.data)}};Wo.create=t=>new Wo({typeName:F.ZodVoid,...ge(t)});var mn=class t extends ve{_parse(e){let{ctx:r,status:n}=this._processInputParams(e),o=this._def;if(r.parsedType!==K.array)return H(r,{code:M.invalid_type,expected:K.array,received:r.parsedType}),ae;if(o.exactLength!==null){let s=r.data.length>o.exactLength.value,a=r.data.length<o.exactLength.value;(s||a)&&(H(r,{code:s?M.too_big:M.too_small,minimum:a?o.exactLength.value:void 0,maximum:s?o.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:o.exactLength.message}),n.dirty())}if(o.minLength!==null&&r.data.length<o.minLength.value&&(H(r,{code:M.too_small,minimum:o.minLength.value,type:"array",inclusive:!0,exact:!1,message:o.minLength.message}),n.dirty()),o.maxLength!==null&&r.data.length>o.maxLength.value&&(H(r,{code:M.too_big,maximum:o.maxLength.value,type:"array",inclusive:!0,exact:!1,message:o.maxLength.message}),n.dirty()),r.common.async)return Promise.all([...r.data].map((s,a)=>o.type._parseAsync(new _r(r,s,r.path,a)))).then(s=>Nt.mergeArray(n,s));let i=[...r.data].map((s,a)=>o.type._parseSync(new _r(r,s,r.path,a)));return Nt.mergeArray(n,i)}get element(){return this._def.type}min(e,r){return new t({...this._def,minLength:{value:e,message:ee.toString(r)}})}max(e,r){return new t({...this._def,maxLength:{value:e,message:ee.toString(r)}})}length(e,r){return new t({...this._def,exactLength:{value:e,message:ee.toString(r)}})}nonempty(e){return this.min(1,e)}};mn.create=(t,e)=>new mn({type:t,minLength:null,maxLength:null,exactLength:null,typeName:F.ZodArray,...ge(e)});function Vo(t){if(t instanceof ir){let e={};for(let r in t.shape){let n=t.shape[r];e[r]=or.create(Vo(n))}return new ir({...t._def,shape:()=>e})}else return t instanceof mn?new mn({...t._def,type:Vo(t.element)}):t instanceof or?or.create(Vo(t.unwrap())):t instanceof Yr?Yr.create(Vo(t.unwrap())):t instanceof Jr?Jr.create(t.items.map(e=>Vo(e))):t}var ir=class t extends ve{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let e=this._def.shape(),r=Te.objectKeys(e);return this._cached={shape:e,keys:r},this._cached}_parse(e){if(this._getType(e)!==K.object){let l=this._getOrReturnCtx(e);return H(l,{code:M.invalid_type,expected:K.object,received:l.parsedType}),ae}let{status:n,ctx:o}=this._processInputParams(e),{shape:i,keys:s}=this._getCached(),a=[];if(!(this._def.catchall instanceof Nr&&this._def.unknownKeys==="strip"))for(let l in o.data)s.includes(l)||a.push(l);let c=[];for(let l of s){let p=i[l],d=o.data[l];c.push({key:{status:"valid",value:l},value:p._parse(new _r(o,d,o.path,l)),alwaysSet:l in o.data})}if(this._def.catchall instanceof Nr){let l=this._def.unknownKeys;if(l==="passthrough")for(let p of a)c.push({key:{status:"valid",value:p},value:{status:"valid",value:o.data[p]}});else if(l==="strict")a.length>0&&(H(o,{code:M.unrecognized_keys,keys:a}),n.dirty());else if(l!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let l=this._def.catchall;for(let p of a){let d=o.data[p];c.push({key:{status:"valid",value:p},value:l._parse(new _r(o,d,o.path,p)),alwaysSet:p in o.data})}}return o.common.async?Promise.resolve().then(async()=>{let l=[];for(let p of c){let d=await p.key,f=await p.value;l.push({key:d,value:f,alwaysSet:p.alwaysSet})}return l}).then(l=>Nt.mergeObjectSync(n,l)):Nt.mergeObjectSync(n,c)}get shape(){return this._def.shape()}strict(e){return ee.errToObj,new t({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(r,n)=>{var i,s;let o=((s=(i=this._def).errorMap)==null?void 0:s.call(i,r,n).message)??n.defaultError;return r.code==="unrecognized_keys"?{message:ee.errToObj(e).message??o}:{message:o}}}:{}})}strip(){return new t({...this._def,unknownKeys:"strip"})}passthrough(){return new t({...this._def,unknownKeys:"passthrough"})}extend(e){return new t({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new t({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:F.ZodObject})}setKey(e,r){return this.augment({[e]:r})}catchall(e){return new t({...this._def,catchall:e})}pick(e){let r={};for(let n of Te.objectKeys(e))e[n]&&this.shape[n]&&(r[n]=this.shape[n]);return new t({...this._def,shape:()=>r})}omit(e){let r={};for(let n of Te.objectKeys(this.shape))e[n]||(r[n]=this.shape[n]);return new t({...this._def,shape:()=>r})}deepPartial(){return Vo(this)}partial(e){let r={};for(let n of Te.objectKeys(this.shape)){let o=this.shape[n];e&&!e[n]?r[n]=o:r[n]=o.optional()}return new t({...this._def,shape:()=>r})}required(e){let r={};for(let n of Te.objectKeys(this.shape))if(e&&!e[n])r[n]=this.shape[n];else{let i=this.shape[n];for(;i instanceof or;)i=i._def.innerType;r[n]=i}return new t({...this._def,shape:()=>r})}keyof(){return hy(Te.objectKeys(this.shape))}};ir.create=(t,e)=>new ir({shape:()=>t,unknownKeys:"strip",catchall:Nr.create(),typeName:F.ZodObject,...ge(e)});ir.strictCreate=(t,e)=>new ir({shape:()=>t,unknownKeys:"strict",catchall:Nr.create(),typeName:F.ZodObject,...ge(e)});ir.lazycreate=(t,e)=>new ir({shape:t,unknownKeys:"strip",catchall:Nr.create(),typeName:F.ZodObject,...ge(e)});var no=class extends ve{_parse(e){let{ctx:r}=this._processInputParams(e),n=this._def.options;function o(i){for(let a of i)if(a.result.status==="valid")return a.result;for(let a of i)if(a.result.status==="dirty")return r.common.issues.push(...a.ctx.common.issues),a.result;let s=i.map(a=>new nr(a.ctx.common.issues));return H(r,{code:M.invalid_union,unionErrors:s}),ae}if(r.common.async)return Promise.all(n.map(async i=>{let s={...r,common:{...r.common,issues:[]},parent:null};return{result:await i._parseAsync({data:r.data,path:r.path,parent:s}),ctx:s}})).then(o);{let i,s=[];for(let c of n){let l={...r,common:{...r.common,issues:[]},parent:null},p=c._parseSync({data:r.data,path:r.path,parent:l});if(p.status==="valid")return p;p.status==="dirty"&&!i&&(i={result:p,ctx:l}),l.common.issues.length&&s.push(l.common.issues)}if(i)return r.common.issues.push(...i.ctx.common.issues),i.result;let a=s.map(c=>new nr(c));return H(r,{code:M.invalid_union,unionErrors:a}),ae}}get options(){return this._def.options}};no.create=(t,e)=>new no({options:t,typeName:F.ZodUnion,...ge(e)});var dn=t=>t instanceof io?dn(t.schema):t instanceof wr?dn(t.innerType()):t instanceof so?[t.value]:t instanceof ao?t.options:t instanceof co?Te.objectValues(t.enum):t instanceof lo?dn(t._def.innerType):t instanceof to?[void 0]:t instanceof ro?[null]:t instanceof or?[void 0,...dn(t.unwrap())]:t instanceof Yr?[null,...dn(t.unwrap())]:t instanceof Ji||t instanceof po?dn(t.unwrap()):t instanceof uo?dn(t._def.innerType):[],Aa=class t extends ve{_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==K.object)return H(r,{code:M.invalid_type,expected:K.object,received:r.parsedType}),ae;let n=this.discriminator,o=r.data[n],i=this.optionsMap.get(o);return i?r.common.async?i._parseAsync({data:r.data,path:r.path,parent:r}):i._parseSync({data:r.data,path:r.path,parent:r}):(H(r,{code:M.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),ae)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,r,n){let o=new Map;for(let i of r){let s=dn(i.shape[e]);if(!s.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(let a of s){if(o.has(a))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(a)}`);o.set(a,i)}}return new t({typeName:F.ZodDiscriminatedUnion,discriminator:e,options:r,optionsMap:o,...ge(n)})}};function yu(t,e){let r=Kr(t),n=Kr(e);if(t===e)return{valid:!0,data:t};if(r===K.object&&n===K.object){let o=Te.objectKeys(e),i=Te.objectKeys(t).filter(a=>o.indexOf(a)!==-1),s={...t,...e};for(let a of i){let c=yu(t[a],e[a]);if(!c.valid)return{valid:!1};s[a]=c.data}return{valid:!0,data:s}}else if(r===K.array&&n===K.array){if(t.length!==e.length)return{valid:!1};let o=[];for(let i=0;i<t.length;i++){let s=t[i],a=e[i],c=yu(s,a);if(!c.valid)return{valid:!1};o.push(c.data)}return{valid:!0,data:o}}else return r===K.date&&n===K.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}var oo=class extends ve{_parse(e){let{status:r,ctx:n}=this._processInputParams(e),o=(i,s)=>{if(Ra(i)||Ra(s))return ae;let a=yu(i.value,s.value);return a.valid?((Pa(i)||Pa(s))&&r.dirty(),{status:r.value,value:a.data}):(H(n,{code:M.invalid_intersection_types}),ae)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([i,s])=>o(i,s)):o(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}};oo.create=(t,e,r)=>new oo({left:t,right:e,typeName:F.ZodIntersection,...ge(r)});var Jr=class t extends ve{_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==K.array)return H(n,{code:M.invalid_type,expected:K.array,received:n.parsedType}),ae;if(n.data.length<this._def.items.length)return H(n,{code:M.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),ae;!this._def.rest&&n.data.length>this._def.items.length&&(H(n,{code:M.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());let i=[...n.data].map((s,a)=>{let c=this._def.items[a]||this._def.rest;return c?c._parse(new _r(n,s,n.path,a)):null}).filter(s=>!!s);return n.common.async?Promise.all(i).then(s=>Nt.mergeArray(r,s)):Nt.mergeArray(r,i)}get items(){return this._def.items}rest(e){return new t({...this._def,rest:e})}};Jr.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Jr({items:t,typeName:F.ZodTuple,rest:null,...ge(e)})};var Ia=class t extends ve{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==K.object)return H(n,{code:M.invalid_type,expected:K.object,received:n.parsedType}),ae;let o=[],i=this._def.keyType,s=this._def.valueType;for(let a in n.data)o.push({key:i._parse(new _r(n,a,n.path,a)),value:s._parse(new _r(n,n.data[a],n.path,a)),alwaysSet:a in n.data});return n.common.async?Nt.mergeObjectAsync(r,o):Nt.mergeObjectSync(r,o)}get element(){return this._def.valueType}static create(e,r,n){return r instanceof ve?new t({keyType:e,valueType:r,typeName:F.ZodRecord,...ge(n)}):new t({keyType:Sn.create(),valueType:e,typeName:F.ZodRecord,...ge(r)})}},Ko=class extends ve{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==K.map)return H(n,{code:M.invalid_type,expected:K.map,received:n.parsedType}),ae;let o=this._def.keyType,i=this._def.valueType,s=[...n.data.entries()].map(([a,c],l)=>({key:o._parse(new _r(n,a,n.path,[l,"key"])),value:i._parse(new _r(n,c,n.path,[l,"value"]))}));if(n.common.async){let a=new Map;return Promise.resolve().then(async()=>{for(let c of s){let l=await c.key,p=await c.value;if(l.status==="aborted"||p.status==="aborted")return ae;(l.status==="dirty"||p.status==="dirty")&&r.dirty(),a.set(l.value,p.value)}return{status:r.value,value:a}})}else{let a=new Map;for(let c of s){let l=c.key,p=c.value;if(l.status==="aborted"||p.status==="aborted")return ae;(l.status==="dirty"||p.status==="dirty")&&r.dirty(),a.set(l.value,p.value)}return{status:r.value,value:a}}}};Ko.create=(t,e,r)=>new Ko({valueType:e,keyType:t,typeName:F.ZodMap,...ge(r)});var Jo=class t extends ve{_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==K.set)return H(n,{code:M.invalid_type,expected:K.set,received:n.parsedType}),ae;let o=this._def;o.minSize!==null&&n.data.size<o.minSize.value&&(H(n,{code:M.too_small,minimum:o.minSize.value,type:"set",inclusive:!0,exact:!1,message:o.minSize.message}),r.dirty()),o.maxSize!==null&&n.data.size>o.maxSize.value&&(H(n,{code:M.too_big,maximum:o.maxSize.value,type:"set",inclusive:!0,exact:!1,message:o.maxSize.message}),r.dirty());let i=this._def.valueType;function s(c){let l=new Set;for(let p of c){if(p.status==="aborted")return ae;p.status==="dirty"&&r.dirty(),l.add(p.value)}return{status:r.value,value:l}}let a=[...n.data.values()].map((c,l)=>i._parse(new _r(n,c,n.path,l)));return n.common.async?Promise.all(a).then(c=>s(c)):s(a)}min(e,r){return new t({...this._def,minSize:{value:e,message:ee.toString(r)}})}max(e,r){return new t({...this._def,maxSize:{value:e,message:ee.toString(r)}})}size(e,r){return this.min(e,r).max(e,r)}nonempty(e){return this.min(1,e)}};Jo.create=(t,e)=>new Jo({valueType:t,minSize:null,maxSize:null,typeName:F.ZodSet,...ge(e)});var za=class t extends ve{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==K.function)return H(r,{code:M.invalid_type,expected:K.function,received:r.parsedType}),ae;function n(a,c){return Ki({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Bo(),pn].filter(l=>!!l),issueData:{code:M.invalid_arguments,argumentsError:c}})}function o(a,c){return Ki({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Bo(),pn].filter(l=>!!l),issueData:{code:M.invalid_return_type,returnTypeError:c}})}let i={errorMap:r.common.contextualErrorMap},s=r.data;if(this._def.returns instanceof $n){let a=this;return Ht(async function(...c){let l=new nr([]),p=await a._def.args.parseAsync(c,i).catch(m=>{throw l.addIssue(n(c,m)),l}),d=await Reflect.apply(s,this,p);return await a._def.returns._def.type.parseAsync(d,i).catch(m=>{throw l.addIssue(o(d,m)),l})})}else{let a=this;return Ht(function(...c){let l=a._def.args.safeParse(c,i);if(!l.success)throw new nr([n(c,l.error)]);let p=Reflect.apply(s,this,l.data),d=a._def.returns.safeParse(p,i);if(!d.success)throw new nr([o(p,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new t({...this._def,args:Jr.create(e).rest(fn.create())})}returns(e){return new t({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,r,n){return new t({args:e||Jr.create([]).rest(fn.create()),returns:r||fn.create(),typeName:F.ZodFunction,...ge(n)})}},io=class extends ve{get schema(){return this._def.getter()}_parse(e){let{ctx:r}=this._processInputParams(e);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}};io.create=(t,e)=>new io({getter:t,typeName:F.ZodLazy,...ge(e)});var so=class extends ve{_parse(e){if(e.data!==this._def.value){let r=this._getOrReturnCtx(e);return H(r,{received:r.data,code:M.invalid_literal,expected:this._def.value}),ae}return{status:"valid",value:e.data}}get value(){return this._def.value}};so.create=(t,e)=>new so({value:t,typeName:F.ZodLiteral,...ge(e)});function hy(t,e){return new ao({values:t,typeName:F.ZodEnum,...ge(e)})}var ao=class t extends ve{_parse(e){if(typeof e.data!="string"){let r=this._getOrReturnCtx(e),n=this._def.values;return H(r,{expected:Te.joinValues(n),received:r.parsedType,code:M.invalid_type}),ae}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){let r=this._getOrReturnCtx(e),n=this._def.values;return H(r,{received:r.data,code:M.invalid_enum_value,options:n}),ae}return Ht(e.data)}get options(){return this._def.values}get enum(){let e={};for(let r of this._def.values)e[r]=r;return e}get Values(){let e={};for(let r of this._def.values)e[r]=r;return e}get Enum(){let e={};for(let r of this._def.values)e[r]=r;return e}extract(e,r=this._def){return t.create(e,{...this._def,...r})}exclude(e,r=this._def){return t.create(this.options.filter(n=>!e.includes(n)),{...this._def,...r})}};ao.create=hy;var co=class extends ve{_parse(e){let r=Te.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==K.string&&n.parsedType!==K.number){let o=Te.objectValues(r);return H(n,{expected:Te.joinValues(o),received:n.parsedType,code:M.invalid_type}),ae}if(this._cache||(this._cache=new Set(Te.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){let o=Te.objectValues(r);return H(n,{received:n.data,code:M.invalid_enum_value,options:o}),ae}return Ht(e.data)}get enum(){return this._def.values}};co.create=(t,e)=>new co({values:t,typeName:F.ZodNativeEnum,...ge(e)});var $n=class extends ve{unwrap(){return this._def.type}_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==K.promise&&r.common.async===!1)return H(r,{code:M.invalid_type,expected:K.promise,received:r.parsedType}),ae;let n=r.parsedType===K.promise?r.data:Promise.resolve(r.data);return Ht(n.then(o=>this._def.type.parseAsync(o,{path:r.path,errorMap:r.common.contextualErrorMap})))}};$n.create=(t,e)=>new $n({type:t,typeName:F.ZodPromise,...ge(e)});var wr=class extends ve{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===F.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:r,ctx:n}=this._processInputParams(e),o=this._def.effect||null,i={addIssue:s=>{H(n,s),s.fatal?r.abort():r.dirty()},get path(){return n.path}};if(i.addIssue=i.addIssue.bind(i),o.type==="preprocess"){let s=o.transform(n.data,i);if(n.common.async)return Promise.resolve(s).then(async a=>{if(r.value==="aborted")return ae;let c=await this._def.schema._parseAsync({data:a,path:n.path,parent:n});return c.status==="aborted"?ae:c.status==="dirty"?Jn(c.value):r.value==="dirty"?Jn(c.value):c});{if(r.value==="aborted")return ae;let a=this._def.schema._parseSync({data:s,path:n.path,parent:n});return a.status==="aborted"?ae:a.status==="dirty"?Jn(a.value):r.value==="dirty"?Jn(a.value):a}}if(o.type==="refinement"){let s=a=>{let c=o.refinement(a,i);if(n.common.async)return Promise.resolve(c);if(c instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(n.common.async===!1){let a=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return a.status==="aborted"?ae:(a.status==="dirty"&&r.dirty(),s(a.value),{status:r.value,value:a.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(a=>a.status==="aborted"?ae:(a.status==="dirty"&&r.dirty(),s(a.value).then(()=>({status:r.value,value:a.value}))))}if(o.type==="transform")if(n.common.async===!1){let s=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!wn(s))return ae;let a=o.transform(s.value,i);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:a}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(s=>wn(s)?Promise.resolve(o.transform(s.value,i)).then(a=>({status:r.value,value:a})):ae);Te.assertNever(o)}};wr.create=(t,e,r)=>new wr({schema:t,typeName:F.ZodEffects,effect:e,...ge(r)});wr.createWithPreprocess=(t,e,r)=>new wr({schema:e,effect:{type:"preprocess",transform:t},typeName:F.ZodEffects,...ge(r)});var or=class extends ve{_parse(e){return this._getType(e)===K.undefined?Ht(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};or.create=(t,e)=>new or({innerType:t,typeName:F.ZodOptional,...ge(e)});var Yr=class extends ve{_parse(e){return this._getType(e)===K.null?Ht(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};Yr.create=(t,e)=>new Yr({innerType:t,typeName:F.ZodNullable,...ge(e)});var lo=class extends ve{_parse(e){let{ctx:r}=this._processInputParams(e),n=r.data;return r.parsedType===K.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}};lo.create=(t,e)=>new lo({innerType:t,typeName:F.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...ge(e)});var uo=class extends ve{_parse(e){let{ctx:r}=this._processInputParams(e),n={...r,common:{...r.common,issues:[]}},o=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return Ho(o)?o.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new nr(n.common.issues)},input:n.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new nr(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}};uo.create=(t,e)=>new uo({innerType:t,typeName:F.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...ge(e)});var Yo=class extends ve{_parse(e){if(this._getType(e)!==K.nan){let n=this._getOrReturnCtx(e);return H(n,{code:M.invalid_type,expected:K.nan,received:n.parsedType}),ae}return{status:"valid",value:e.data}}};Yo.create=t=>new Yo({typeName:F.ZodNaN,...ge(t)});var eR=Symbol("zod_brand"),Ji=class extends ve{_parse(e){let{ctx:r}=this._processInputParams(e),n=r.data;return this._def.type._parse({data:n,path:r.path,parent:r})}unwrap(){return this._def.type}},Yi=class t extends ve{_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.common.async)return(async()=>{let i=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return i.status==="aborted"?ae:i.status==="dirty"?(r.dirty(),Jn(i.value)):this._def.out._parseAsync({data:i.value,path:n.path,parent:n})})();{let o=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return o.status==="aborted"?ae:o.status==="dirty"?(r.dirty(),{status:"dirty",value:o.value}):this._def.out._parseSync({data:o.value,path:n.path,parent:n})}}static create(e,r){return new t({in:e,out:r,typeName:F.ZodPipeline})}},po=class extends ve{_parse(e){let r=this._def.innerType._parse(e),n=o=>(wn(o)&&(o.value=Object.freeze(o.value)),o);return Ho(r)?r.then(o=>n(o)):n(r)}unwrap(){return this._def.innerType}};po.create=(t,e)=>new po({innerType:t,typeName:F.ZodReadonly,...ge(e)});function py(t,e){let r=typeof t=="function"?t(e):typeof t=="string"?{message:t}:t;return typeof r=="string"?{message:r}:r}function gy(t,e={},r){return t?kn.create().superRefine((n,o)=>{let i=t(n);if(i instanceof Promise)return i.then(s=>{if(!s){let a=py(e,n),c=a.fatal??r??!0;o.addIssue({code:"custom",...a,fatal:c})}});if(!i){let s=py(e,n),a=s.fatal??r??!0;o.addIssue({code:"custom",...s,fatal:a})}}):kn.create()}var tR={object:ir.lazycreate},F;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(F||(F={}));var rR=(t,e={message:`Input not instance of ${t.name}`})=>gy(r=>r instanceof t,e),yy=Sn.create,xy=Yn.create,nR=Yo.create,oR=Xn.create,vy=Qn.create,iR=eo.create,sR=Go.create,aR=to.create,cR=ro.create,lR=kn.create,uR=fn.create,pR=Nr.create,dR=Wo.create,fR=mn.create,xu=ir.create,mR=ir.strictCreate,hR=no.create,gR=Aa.create,yR=oo.create,xR=Jr.create,vR=Ia.create,bR=Ko.create,_R=Jo.create,wR=za.create,SR=io.create,kR=so.create,$R=ao.create,ER=co.create,TR=$n.create,RR=wr.create,PR=or.create,AR=Yr.create,IR=wr.createWithPreprocess,zR=Yi.create,CR=()=>yy().optional(),OR=()=>xy().optional(),NR=()=>vy().optional(),jR={string:(t=>Sn.create({...t,coerce:!0})),number:(t=>Yn.create({...t,coerce:!0})),boolean:(t=>Qn.create({...t,coerce:!0})),bigint:(t=>Xn.create({...t,coerce:!0})),date:(t=>eo.create({...t,coerce:!0}))};var LR=ae;var DR=Object.freeze({status:"aborted"});function A(t,e,r){function n(a,c){var l;Object.defineProperty(a,"_zod",{value:a._zod??{},enumerable:!1}),(l=a._zod).traits??(l.traits=new Set),a._zod.traits.add(t),e(a,c);for(let p in s.prototype)p in a||Object.defineProperty(a,p,{value:s.prototype[p].bind(a)});a._zod.constr=s,a._zod.def=c}let o=(r==null?void 0:r.Parent)??Object;class i extends o{}Object.defineProperty(i,"name",{value:t});function s(a){var c;let l=r!=null&&r.Parent?new i:this;n(l,a),(c=l._zod).deferred??(c.deferred=[]);for(let p of l._zod.deferred)p();return l}return Object.defineProperty(s,"init",{value:n}),Object.defineProperty(s,Symbol.hasInstance,{value:a=>{var c,l;return r!=null&&r.Parent&&a instanceof r.Parent?!0:(l=(c=a==null?void 0:a._zod)==null?void 0:c.traits)==null?void 0:l.has(t)}}),Object.defineProperty(s,"name",{value:t}),s}var MR=Symbol("zod_brand"),hn=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},Ca={};function hr(t){return t&&Object.assign(Ca,t),Ca}var Ae={};Ta(Ae,{BIGINT_FORMAT_RANGES:()=>_y,Class:()=>bu,NUMBER_FORMAT_RANGES:()=>Tu,aborted:()=>mo,allowsEval:()=>ku,assert:()=>BR,assertEqual:()=>qR,assertIs:()=>UR,assertNever:()=>ZR,assertNotEqual:()=>FR,assignProp:()=>Su,cached:()=>es,captureStackTrace:()=>Na,cleanEnum:()=>nP,cleanRegex:()=>rs,clone:()=>gr,createTransparentProxy:()=>JR,defineLazy:()=>et,esc:()=>fo,escapeRegex:()=>En,extend:()=>QR,finalizeIssue:()=>jr,floatSafeRemainder:()=>wu,getElementAtPath:()=>HR,getEnumValues:()=>Qi,getLengthableOrigin:()=>ns,getParsedType:()=>KR,getSizableOrigin:()=>wy,isObject:()=>Xo,isPlainObject:()=>Qo,issue:()=>Ru,joinValues:()=>Oa,jsonStringifyReplacer:()=>_u,merge:()=>eP,normalizeParams:()=>ce,nullish:()=>ts,numKeys:()=>WR,omit:()=>XR,optionalKeys:()=>Eu,partial:()=>tP,pick:()=>YR,prefixIssues:()=>Xr,primitiveTypes:()=>by,promiseAllObject:()=>VR,propertyKeyTypes:()=>$u,randomString:()=>GR,required:()=>rP,stringifyPrimitive:()=>ja,unwrapMessage:()=>Xi});function qR(t){return t}function FR(t){return t}function UR(t){}function ZR(t){throw new Error}function BR(t){}function Qi(t){let e=Object.values(t).filter(n=>typeof n=="number");return Object.entries(t).filter(([n,o])=>e.indexOf(+n)===-1).map(([n,o])=>o)}function Oa(t,e="|"){return t.map(r=>ja(r)).join(e)}function _u(t,e){return typeof e=="bigint"?e.toString():e}function es(t){return{get value(){{let r=t();return Object.defineProperty(this,"value",{value:r}),r}throw new Error("cached value already set")}}}function ts(t){return t==null}function rs(t){let e=t.startsWith("^")?1:0,r=t.endsWith("$")?t.length-1:t.length;return t.slice(e,r)}function wu(t,e){let r=(t.toString().split(".")[1]||"").length,n=(e.toString().split(".")[1]||"").length,o=r>n?r:n,i=Number.parseInt(t.toFixed(o).replace(".","")),s=Number.parseInt(e.toFixed(o).replace(".",""));return i%s/10**o}function et(t,e,r){Object.defineProperty(t,e,{get(){{let o=r();return t[e]=o,o}throw new Error("cached value already set")},set(o){Object.defineProperty(t,e,{value:o})},configurable:!0})}function Su(t,e,r){Object.defineProperty(t,e,{value:r,writable:!0,enumerable:!0,configurable:!0})}function HR(t,e){return e?e.reduce((r,n)=>r==null?void 0:r[n],t):t}function VR(t){let e=Object.keys(t),r=e.map(n=>t[n]);return Promise.all(r).then(n=>{let o={};for(let i=0;i<e.length;i++)o[e[i]]=n[i];return o})}function GR(t=10){let e="abcdefghijklmnopqrstuvwxyz",r="";for(let n=0;n<t;n++)r+=e[Math.floor(Math.random()*e.length)];return r}function fo(t){return JSON.stringify(t)}var Na=Error.captureStackTrace?Error.captureStackTrace:(...t)=>{};function Xo(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}var ku=es(()=>{var t;if(typeof navigator<"u"&&((t=navigator==null?void 0:navigator.userAgent)!=null&&t.includes("Cloudflare")))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});function Qo(t){if(Xo(t)===!1)return!1;let e=t.constructor;if(e===void 0)return!0;let r=e.prototype;return!(Xo(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function WR(t){let e=0;for(let r in t)Object.prototype.hasOwnProperty.call(t,r)&&e++;return e}var KR=t=>{let e=typeof t;switch(e){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(t)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(t)?"array":t===null?"null":t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?"promise":typeof Map<"u"&&t instanceof Map?"map":typeof Set<"u"&&t instanceof Set?"set":typeof Date<"u"&&t instanceof Date?"date":typeof File<"u"&&t instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${e}`)}},$u=new Set(["string","number","symbol"]),by=new Set(["string","number","bigint","boolean","symbol","undefined"]);function En(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function gr(t,e,r){let n=new t._zod.constr(e??t._zod.def);return(!e||r!=null&&r.parent)&&(n._zod.parent=t),n}function ce(t){let e=t;if(!e)return{};if(typeof e=="string")return{error:()=>e};if((e==null?void 0:e.message)!==void 0){if((e==null?void 0:e.error)!==void 0)throw new Error("Cannot specify both `message` and `error` params");e.error=e.message}return delete e.message,typeof e.error=="string"?{...e,error:()=>e.error}:e}function JR(t){let e;return new Proxy({},{get(r,n,o){return e??(e=t()),Reflect.get(e,n,o)},set(r,n,o,i){return e??(e=t()),Reflect.set(e,n,o,i)},has(r,n){return e??(e=t()),Reflect.has(e,n)},deleteProperty(r,n){return e??(e=t()),Reflect.deleteProperty(e,n)},ownKeys(r){return e??(e=t()),Reflect.ownKeys(e)},getOwnPropertyDescriptor(r,n){return e??(e=t()),Reflect.getOwnPropertyDescriptor(e,n)},defineProperty(r,n,o){return e??(e=t()),Reflect.defineProperty(e,n,o)}})}function ja(t){return typeof t=="bigint"?t.toString()+"n":typeof t=="string"?`"${t}"`:`${t}`}function Eu(t){return Object.keys(t).filter(e=>t[e]._zod.optin==="optional"&&t[e]._zod.optout==="optional")}var Tu={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},_y={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function YR(t,e){let r={},n=t._zod.def;for(let o in e){if(!(o in n.shape))throw new Error(`Unrecognized key: "${o}"`);e[o]&&(r[o]=n.shape[o])}return gr(t,{...t._zod.def,shape:r,checks:[]})}function XR(t,e){let r={...t._zod.def.shape},n=t._zod.def;for(let o in e){if(!(o in n.shape))throw new Error(`Unrecognized key: "${o}"`);e[o]&&delete r[o]}return gr(t,{...t._zod.def,shape:r,checks:[]})}function QR(t,e){if(!Qo(e))throw new Error("Invalid input to extend: expected a plain object");let r={...t._zod.def,get shape(){let n={...t._zod.def.shape,...e};return Su(this,"shape",n),n},checks:[]};return gr(t,r)}function eP(t,e){return gr(t,{...t._zod.def,get shape(){let r={...t._zod.def.shape,...e._zod.def.shape};return Su(this,"shape",r),r},catchall:e._zod.def.catchall,checks:[]})}function tP(t,e,r){let n=e._zod.def.shape,o={...n};if(r)for(let i in r){if(!(i in n))throw new Error(`Unrecognized key: "${i}"`);r[i]&&(o[i]=t?new t({type:"optional",innerType:n[i]}):n[i])}else for(let i in n)o[i]=t?new t({type:"optional",innerType:n[i]}):n[i];return gr(e,{...e._zod.def,shape:o,checks:[]})}function rP(t,e,r){let n=e._zod.def.shape,o={...n};if(r)for(let i in r){if(!(i in o))throw new Error(`Unrecognized key: "${i}"`);r[i]&&(o[i]=new t({type:"nonoptional",innerType:n[i]}))}else for(let i in n)o[i]=new t({type:"nonoptional",innerType:n[i]});return gr(e,{...e._zod.def,shape:o,checks:[]})}function mo(t,e=0){var r;for(let n=e;n<t.issues.length;n++)if(((r=t.issues[n])==null?void 0:r.continue)!==!0)return!0;return!1}function Xr(t,e){return e.map(r=>{var n;return(n=r).path??(n.path=[]),r.path.unshift(t),r})}function Xi(t){return typeof t=="string"?t:t==null?void 0:t.message}function jr(t,e,r){var o,i,s,a,c,l;let n={...t,path:t.path??[]};if(!t.message){let p=Xi((s=(i=(o=t.inst)==null?void 0:o._zod.def)==null?void 0:i.error)==null?void 0:s.call(i,t))??Xi((a=e==null?void 0:e.error)==null?void 0:a.call(e,t))??Xi((c=r.customError)==null?void 0:c.call(r,t))??Xi((l=r.localeError)==null?void 0:l.call(r,t))??"Invalid input";n.message=p}return delete n.inst,delete n.continue,e!=null&&e.reportInput||delete n.input,n}function wy(t){return t instanceof Set?"set":t instanceof Map?"map":t instanceof File?"file":"unknown"}function ns(t){return Array.isArray(t)?"array":typeof t=="string"?"string":"unknown"}function Ru(...t){let[e,r,n]=t;return typeof e=="string"?{message:e,code:"custom",input:r,inst:n}:{...e}}function nP(t){return Object.entries(t).filter(([e,r])=>Number.isNaN(Number.parseInt(e,10))).map(e=>e[1])}var bu=class{constructor(...e){}};var Sy=(t,e)=>{t.name="$ZodError",Object.defineProperty(t,"_zod",{value:t._zod,enumerable:!1}),Object.defineProperty(t,"issues",{value:e,enumerable:!1}),Object.defineProperty(t,"message",{get(){return JSON.stringify(e,_u,2)},enumerable:!0}),Object.defineProperty(t,"toString",{value:()=>t.message,enumerable:!1})},La=A("$ZodError",Sy),os=A("$ZodError",Sy,{Parent:Error});function Pu(t,e=r=>r.message){let r={},n=[];for(let o of t.issues)o.path.length>0?(r[o.path[0]]=r[o.path[0]]||[],r[o.path[0]].push(e(o))):n.push(e(o));return{formErrors:n,fieldErrors:r}}function Au(t,e){let r=e||function(i){return i.message},n={_errors:[]},o=i=>{for(let s of i.issues)if(s.code==="invalid_union"&&s.errors.length)s.errors.map(a=>o({issues:a}));else if(s.code==="invalid_key")o({issues:s.issues});else if(s.code==="invalid_element")o({issues:s.issues});else if(s.path.length===0)n._errors.push(r(s));else{let a=n,c=0;for(;c<s.path.length;){let l=s.path[c];c===s.path.length-1?(a[l]=a[l]||{_errors:[]},a[l]._errors.push(r(s))):a[l]=a[l]||{_errors:[]},a=a[l],c++}}};return o(t),n}var Iu=t=>(e,r,n,o)=>{let i=n?Object.assign(n,{async:!1}):{async:!1},s=e._zod.run({value:r,issues:[]},i);if(s instanceof Promise)throw new hn;if(s.issues.length){let a=new((o==null?void 0:o.Err)??t)(s.issues.map(c=>jr(c,i,hr())));throw Na(a,o==null?void 0:o.callee),a}return s.value},zu=Iu(os),Cu=t=>async(e,r,n,o)=>{let i=n?Object.assign(n,{async:!0}):{async:!0},s=e._zod.run({value:r,issues:[]},i);if(s instanceof Promise&&(s=await s),s.issues.length){let a=new((o==null?void 0:o.Err)??t)(s.issues.map(c=>jr(c,i,hr())));throw Na(a,o==null?void 0:o.callee),a}return s.value},Ou=Cu(os),Nu=t=>(e,r,n)=>{let o=n?{...n,async:!1}:{async:!1},i=e._zod.run({value:r,issues:[]},o);if(i instanceof Promise)throw new hn;return i.issues.length?{success:!1,error:new(t??La)(i.issues.map(s=>jr(s,o,hr())))}:{success:!0,data:i.value}},ho=Nu(os),ju=t=>async(e,r,n)=>{let o=n?Object.assign(n,{async:!0}):{async:!0},i=e._zod.run({value:r,issues:[]},o);return i instanceof Promise&&(i=await i),i.issues.length?{success:!1,error:new t(i.issues.map(s=>jr(s,o,hr())))}:{success:!0,data:i.value}},go=ju(os);var ky=/^[cC][^\s-]{8,}$/,$y=/^[0-9a-z]+$/,Ey=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Ty=/^[0-9a-vA-V]{20}$/,Ry=/^[A-Za-z0-9]{27}$/,Py=/^[a-zA-Z0-9_-]{21}$/,Ay=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/;var Iy=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Lu=t=>t?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${t}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$/;var zy=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/;var iP="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function Cy(){return new RegExp(iP,"u")}var Oy=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Ny=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})$/,jy=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,Ly=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Dy=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Du=/^[A-Za-z0-9_-]*$/,My=/^([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+$/;var qy=/^\+(?:[0-9]){6,14}[0-9]$/,Fy="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",Uy=new RegExp(`^${Fy}$`);function Zy(t){let e="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof t.precision=="number"?t.precision===-1?`${e}`:t.precision===0?`${e}:[0-5]\\d`:`${e}:[0-5]\\d\\.\\d{${t.precision}}`:`${e}(?::[0-5]\\d(?:\\.\\d+)?)?`}function By(t){return new RegExp(`^${Zy(t)}$`)}function Hy(t){let e=Zy({precision:t.precision}),r=["Z"];t.local&&r.push(""),t.offset&&r.push("([+-]\\d{2}:\\d{2})");let n=`${e}(?:${r.join("|")})`;return new RegExp(`^${Fy}T(?:${n})$`)}var Vy=t=>{let e=t?`[\\s\\S]{${(t==null?void 0:t.minimum)??0},${(t==null?void 0:t.maximum)??""}}`:"[\\s\\S]*";return new RegExp(`^${e}$`)};var Gy=/^\d+$/,Wy=/^-?\d+(?:\.\d+)?/i,Ky=/true|false/i,Jy=/null/i;var Yy=/^[^A-Z]*$/,Xy=/^[^a-z]*$/;var jt=A("$ZodCheck",(t,e)=>{var r;t._zod??(t._zod={}),t._zod.def=e,(r=t._zod).onattach??(r.onattach=[])}),Qy={number:"number",bigint:"bigint",object:"date"},Mu=A("$ZodCheckLessThan",(t,e)=>{jt.init(t,e);let r=Qy[typeof e.value];t._zod.onattach.push(n=>{let o=n._zod.bag,i=(e.inclusive?o.maximum:o.exclusiveMaximum)??Number.POSITIVE_INFINITY;e.value<i&&(e.inclusive?o.maximum=e.value:o.exclusiveMaximum=e.value)}),t._zod.check=n=>{(e.inclusive?n.value<=e.value:n.value<e.value)||n.issues.push({origin:r,code:"too_big",maximum:e.value,input:n.value,inclusive:e.inclusive,inst:t,continue:!e.abort})}}),qu=A("$ZodCheckGreaterThan",(t,e)=>{jt.init(t,e);let r=Qy[typeof e.value];t._zod.onattach.push(n=>{let o=n._zod.bag,i=(e.inclusive?o.minimum:o.exclusiveMinimum)??Number.NEGATIVE_INFINITY;e.value>i&&(e.inclusive?o.minimum=e.value:o.exclusiveMinimum=e.value)}),t._zod.check=n=>{(e.inclusive?n.value>=e.value:n.value>e.value)||n.issues.push({origin:r,code:"too_small",minimum:e.value,input:n.value,inclusive:e.inclusive,inst:t,continue:!e.abort})}}),ex=A("$ZodCheckMultipleOf",(t,e)=>{jt.init(t,e),t._zod.onattach.push(r=>{var n;(n=r._zod.bag).multipleOf??(n.multipleOf=e.value)}),t._zod.check=r=>{if(typeof r.value!=typeof e.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof r.value=="bigint"?r.value%e.value===BigInt(0):wu(r.value,e.value)===0)||r.issues.push({origin:typeof r.value,code:"not_multiple_of",divisor:e.value,input:r.value,inst:t,continue:!e.abort})}}),tx=A("$ZodCheckNumberFormat",(t,e)=>{var s;jt.init(t,e),e.format=e.format||"float64";let r=(s=e.format)==null?void 0:s.includes("int"),n=r?"int":"number",[o,i]=Tu[e.format];t._zod.onattach.push(a=>{let c=a._zod.bag;c.format=e.format,c.minimum=o,c.maximum=i,r&&(c.pattern=Gy)}),t._zod.check=a=>{let c=a.value;if(r){if(!Number.isInteger(c)){a.issues.push({expected:n,format:e.format,code:"invalid_type",input:c,inst:t});return}if(!Number.isSafeInteger(c)){c>0?a.issues.push({input:c,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:t,origin:n,continue:!e.abort}):a.issues.push({input:c,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:t,origin:n,continue:!e.abort});return}}c<o&&a.issues.push({origin:"number",input:c,code:"too_small",minimum:o,inclusive:!0,inst:t,continue:!e.abort}),c>i&&a.issues.push({origin:"number",input:c,code:"too_big",maximum:i,inst:t})}});var rx=A("$ZodCheckMaxLength",(t,e)=>{var r;jt.init(t,e),(r=t._zod.def).when??(r.when=n=>{let o=n.value;return!ts(o)&&o.length!==void 0}),t._zod.onattach.push(n=>{let o=n._zod.bag.maximum??Number.POSITIVE_INFINITY;e.maximum<o&&(n._zod.bag.maximum=e.maximum)}),t._zod.check=n=>{let o=n.value;if(o.length<=e.maximum)return;let s=ns(o);n.issues.push({origin:s,code:"too_big",maximum:e.maximum,inclusive:!0,input:o,inst:t,continue:!e.abort})}}),nx=A("$ZodCheckMinLength",(t,e)=>{var r;jt.init(t,e),(r=t._zod.def).when??(r.when=n=>{let o=n.value;return!ts(o)&&o.length!==void 0}),t._zod.onattach.push(n=>{let o=n._zod.bag.minimum??Number.NEGATIVE_INFINITY;e.minimum>o&&(n._zod.bag.minimum=e.minimum)}),t._zod.check=n=>{let o=n.value;if(o.length>=e.minimum)return;let s=ns(o);n.issues.push({origin:s,code:"too_small",minimum:e.minimum,inclusive:!0,input:o,inst:t,continue:!e.abort})}}),ox=A("$ZodCheckLengthEquals",(t,e)=>{var r;jt.init(t,e),(r=t._zod.def).when??(r.when=n=>{let o=n.value;return!ts(o)&&o.length!==void 0}),t._zod.onattach.push(n=>{let o=n._zod.bag;o.minimum=e.length,o.maximum=e.length,o.length=e.length}),t._zod.check=n=>{let o=n.value,i=o.length;if(i===e.length)return;let s=ns(o),a=i>e.length;n.issues.push({origin:s,...a?{code:"too_big",maximum:e.length}:{code:"too_small",minimum:e.length},inclusive:!0,exact:!0,input:n.value,inst:t,continue:!e.abort})}}),is=A("$ZodCheckStringFormat",(t,e)=>{var r,n;jt.init(t,e),t._zod.onattach.push(o=>{let i=o._zod.bag;i.format=e.format,e.pattern&&(i.patterns??(i.patterns=new Set),i.patterns.add(e.pattern))}),e.pattern?(r=t._zod).check??(r.check=o=>{e.pattern.lastIndex=0,!e.pattern.test(o.value)&&o.issues.push({origin:"string",code:"invalid_format",format:e.format,input:o.value,...e.pattern?{pattern:e.pattern.toString()}:{},inst:t,continue:!e.abort})}):(n=t._zod).check??(n.check=()=>{})}),ix=A("$ZodCheckRegex",(t,e)=>{is.init(t,e),t._zod.check=r=>{e.pattern.lastIndex=0,!e.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:e.pattern.toString(),inst:t,continue:!e.abort})}}),sx=A("$ZodCheckLowerCase",(t,e)=>{e.pattern??(e.pattern=Yy),is.init(t,e)}),ax=A("$ZodCheckUpperCase",(t,e)=>{e.pattern??(e.pattern=Xy),is.init(t,e)}),cx=A("$ZodCheckIncludes",(t,e)=>{jt.init(t,e);let r=En(e.includes),n=new RegExp(typeof e.position=="number"?`^.{${e.position}}${r}`:r);e.pattern=n,t._zod.onattach.push(o=>{let i=o._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(n)}),t._zod.check=o=>{o.value.includes(e.includes,e.position)||o.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:e.includes,input:o.value,inst:t,continue:!e.abort})}}),lx=A("$ZodCheckStartsWith",(t,e)=>{jt.init(t,e);let r=new RegExp(`^${En(e.prefix)}.*`);e.pattern??(e.pattern=r),t._zod.onattach.push(n=>{let o=n._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(r)}),t._zod.check=n=>{n.value.startsWith(e.prefix)||n.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:e.prefix,input:n.value,inst:t,continue:!e.abort})}}),ux=A("$ZodCheckEndsWith",(t,e)=>{jt.init(t,e);let r=new RegExp(`.*${En(e.suffix)}$`);e.pattern??(e.pattern=r),t._zod.onattach.push(n=>{let o=n._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(r)}),t._zod.check=n=>{n.value.endsWith(e.suffix)||n.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:e.suffix,input:n.value,inst:t,continue:!e.abort})}});var px=A("$ZodCheckOverwrite",(t,e)=>{jt.init(t,e),t._zod.check=r=>{r.value=e.tx(r.value)}});var Ma=class{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),this.indent-=1}write(e){if(typeof e=="function"){e(this,{execution:"sync"}),e(this,{execution:"async"});return}let n=e.split(`
|
|
22
|
-
`).filter(s=>s),o=Math.min(...
|
|
23
|
-
`))}};var
|
|
17
|
+
`)===-1){ga("have not received end of HTTP headers yet..."),i();return}let y=f.toString("ascii",0,f.indexOf(`\r
|
|
18
|
+
`)),v=+y.split(" ")[1];ga("got proxy server response: %o",y),e({statusCode:v,buffered:f})}t.on("error",l),t.on("close",a),t.on("end",c),i()})}ya.default=IF});var uT=$(Uo=>{"use strict";var CF=Uo&&Uo.__awaiter||function(t,e,n,r){function o(i){return i instanceof n?i:new n(function(s){s(i)})}return new(n||(n=Promise))(function(i,s){function a(p){try{l(r.next(p))}catch(d){s(d)}}function c(p){try{l(r.throw(p))}catch(d){s(d)}}function l(p){p.done?i(p.value):o(p.value).then(a,c)}l((r=r.apply(t,e||[])).next())})},Bi=Uo&&Uo.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Uo,"__esModule",{value:!0});var cT=Bi(require("net")),lT=Bi(require("tls")),PF=Bi(require("url")),OF=Bi(require("assert")),zF=Bi(Fo()),NF=sT(),jF=Bi(aT()),xa=zF.default("https-proxy-agent:agent"),Bh=class extends NF.Agent{constructor(e){let n;if(typeof e=="string"?n=PF.default.parse(e):n=e,!n)throw new Error("an HTTP(S) proxy server `host` and `port` must be specified!");xa("creating new HttpsProxyAgent instance: %o",n),super(n);let r=Object.assign({},n);this.secureProxy=n.secureProxy||MF(r.protocol),r.host=r.hostname||r.host,typeof r.port=="string"&&(r.port=parseInt(r.port,10)),!r.port&&r.host&&(r.port=this.secureProxy?443:80),this.secureProxy&&!("ALPNProtocols"in r)&&(r.ALPNProtocols=["http 1.1"]),r.host&&r.path&&(delete r.path,delete r.pathname),this.proxy=r}callback(e,n){return CF(this,void 0,void 0,function*(){let{proxy:r,secureProxy:o}=this,i;o?(xa("Creating `tls.Socket`: %o",r),i=lT.default.connect(r)):(xa("Creating `net.Socket`: %o",r),i=cT.default.connect(r));let s=Object.assign({},r.headers),c=`CONNECT ${`${n.host}:${n.port}`} HTTP/1.1\r
|
|
19
|
+
`;r.auth&&(s["Proxy-Authorization"]=`Basic ${Buffer.from(r.auth).toString("base64")}`);let{host:l,port:p,secureEndpoint:d}=n;DF(p,d)||(l+=`:${p}`),s.Host=l,s.Connection="close";for(let x of Object.keys(s))c+=`${x}: ${s[x]}\r
|
|
20
|
+
`;let f=jF.default(i);i.write(`${c}\r
|
|
21
|
+
`);let{statusCode:h,buffered:y}=yield f;if(h===200){if(e.once("socket",LF),n.secureEndpoint){xa("Upgrading socket connection to TLS");let x=n.servername||n.host;return lT.default.connect(Object.assign(Object.assign({},FF(n,"host","hostname","path","port")),{socket:i,servername:x}))}return i}i.destroy();let v=new cT.default.Socket({writable:!1});return v.readable=!0,e.once("socket",x=>{xa("replaying proxy buffer for failed request"),OF.default(x.listenerCount("data")>0),x.push(y),x.push(null)}),v})}};Uo.default=Bh;function LF(t){t.resume()}function DF(t,e){return!!(!e&&t===80||e&&t===443)}function MF(t){return typeof t=="string"?/^https:?$/i.test(t):!1}function FF(t,...e){let n={},r;for(r in t)e.includes(r)||(n[r]=t[r]);return n}});var dT=$((Gh,pT)=>{"use strict";var UF=Gh&&Gh.__importDefault||function(t){return t&&t.__esModule?t:{default:t}},Hh=UF(uT());function Vh(t){return new Hh.default(t)}(function(t){t.HttpsProxyAgent=Hh.default,t.prototype=Hh.default.prototype})(Vh||(Vh={}));pT.exports=Vh});var mT=$((MG,fT)=>{var va;fT.exports=function(){if(!va){try{va=Fo()("follow-redirects")}catch{}typeof va!="function"&&(va=function(){})}va.apply(null,arguments)}});var vT=$((FG,ig)=>{var _a=require("url"),ba=_a.URL,qF=require("http"),ZF=require("https"),Xh=require("stream").Writable,Qh=require("assert"),hT=mT();(function(){var e=typeof process<"u",n=typeof window<"u"&&typeof document<"u",r=Zo(Error.captureStackTrace);!e&&(n||!r)&&console.warn("The follow-redirects package should be excluded from browser builds.")})();var eg=!1;try{Qh(new ba(""))}catch(t){eg=t.code==="ERR_INVALID_URL"}var BF=["Authorization","Proxy-Authorization","Cookie"],HF=["auth","host","hostname","href","path","pathname","port","protocol","query","search","hash"],tg=["abort","aborted","connect","error","socket","timeout"],ng=Object.create(null);tg.forEach(function(t){ng[t]=function(e,n,r){this._redirectable.emit(t,e,n,r)}});var Kh=wa("ERR_INVALID_URL","Invalid URL",TypeError),Jh=wa("ERR_FR_REDIRECTION_FAILURE","Redirected request failed"),VF=wa("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded",Jh),GF=wa("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),WF=wa("ERR_STREAM_WRITE_AFTER_END","write after end"),KF=Xh.prototype.destroy||yT;function hn(t,e){Xh.call(this),this._sanitizeOptions(t),this._options=t,this._ended=!1,this._ending=!1,this._redirectCount=0,this._redirects=[],this._requestBodyLength=0,this._requestBodyBuffers=[],e&&this.on("response",e);var n=this;this._onNativeResponse=function(r){try{n._processResponse(r)}catch(o){n.emit("error",o instanceof Jh?o:new Jh({cause:o}))}},this._headerFilter=new RegExp("^(?:"+BF.concat(t.sensitiveHeaders).map(tU).join("|")+")$","i"),this._performRequest()}hn.prototype=Object.create(Xh.prototype);hn.prototype.abort=function(){og(this._currentRequest),this._currentRequest.abort(),this.emit("abort")};hn.prototype.destroy=function(t){return og(this._currentRequest,t),KF.call(this,t),this};hn.prototype.write=function(t,e,n){if(this._ending)throw new WF;if(!qo(t)&&!QF(t))throw new TypeError("data should be a string, Buffer or Uint8Array");if(Zo(e)&&(n=e,e=null),t.length===0){n&&n();return}this._requestBodyLength+t.length<=this._options.maxBodyLength?(this._requestBodyLength+=t.length,this._requestBodyBuffers.push({data:t,encoding:e}),this._currentRequest.write(t,e,n)):(this.emit("error",new GF),this.abort())};hn.prototype.end=function(t,e,n){if(Zo(t)?(n=t,t=e=null):Zo(e)&&(n=e,e=null),!t)this._ended=this._ending=!0,this._currentRequest.end(null,null,n);else{var r=this,o=this._currentRequest;this.write(t,e,function(){r._ended=!0,o.end(null,null,n)}),this._ending=!0}};hn.prototype.setHeader=function(t,e){this._options.headers[t]=e,this._currentRequest.setHeader(t,e)};hn.prototype.removeHeader=function(t){delete this._options.headers[t],this._currentRequest.removeHeader(t)};hn.prototype.setTimeout=function(t,e){var n=this;function r(s){s.setTimeout(t),s.removeListener("timeout",s.destroy),s.addListener("timeout",s.destroy)}function o(s){n._timeout&&clearTimeout(n._timeout),n._timeout=setTimeout(function(){n.emit("timeout"),i()},t),r(s)}function i(){n._timeout&&(clearTimeout(n._timeout),n._timeout=null),n.removeListener("abort",i),n.removeListener("error",i),n.removeListener("response",i),n.removeListener("close",i),e&&n.removeListener("timeout",e),n.socket||n._currentRequest.removeListener("socket",o)}return e&&this.on("timeout",e),this.socket?o(this.socket):this._currentRequest.once("socket",o),this.on("socket",r),this.on("abort",i),this.on("error",i),this.on("response",i),this.on("close",i),this};["flushHeaders","getHeader","setNoDelay","setSocketKeepAlive"].forEach(function(t){hn.prototype[t]=function(e,n){return this._currentRequest[t](e,n)}});["aborted","connection","socket"].forEach(function(t){Object.defineProperty(hn.prototype,t,{get:function(){return this._currentRequest[t]}})});hn.prototype._sanitizeOptions=function(t){if(t.headers||(t.headers={}),XF(t.sensitiveHeaders)||(t.sensitiveHeaders=[]),t.host&&(t.hostname||(t.hostname=t.host),delete t.host),!t.pathname&&t.path){var e=t.path.indexOf("?");e<0?t.pathname=t.path:(t.pathname=t.path.substring(0,e),t.search=t.path.substring(e))}};hn.prototype._performRequest=function(){var t=this._options.protocol,e=this._options.nativeProtocols[t];if(!e)throw new TypeError("Unsupported protocol "+t);if(this._options.agents){var n=t.slice(0,-1);this._options.agent=this._options.agents[n]}var r=this._currentRequest=e.request(this._options,this._onNativeResponse);r._redirectable=this;for(var o of tg)r.on(o,ng[o]);if(this._currentUrl=/^\//.test(this._options.path)?_a.format(this._options):this._options.path,this._isRedirect){var i=0,s=this,a=this._requestBodyBuffers;(function c(l){if(r===s._currentRequest)if(l)s.emit("error",l);else if(i<a.length){var p=a[i++];r.finished||r.write(p.data,p.encoding,c)}else s._ended&&r.end()})()}};hn.prototype._processResponse=function(t){var e=t.statusCode;this._options.trackRedirects&&this._redirects.push({url:this._currentUrl,headers:t.headers,statusCode:e});var n=t.headers.location;if(!n||this._options.followRedirects===!1||e<300||e>=400){t.responseUrl=this._currentUrl,t.redirects=this._redirects,this.emit("response",t),this._requestBodyBuffers=[];return}if(og(this._currentRequest),t.destroy(),++this._redirectCount>this._options.maxRedirects)throw new VF;var r,o=this._options.beforeRedirect;o&&(r=Object.assign({Host:t.req.getHeader("host")},this._options.headers));var i=this._options.method;((e===301||e===302)&&this._options.method==="POST"||e===303&&!/^(?:GET|HEAD)$/.test(this._options.method))&&(this._options.method="GET",this._requestBodyBuffers=[],Wh(/^content-/i,this._options.headers));var s=Wh(/^host$/i,this._options.headers),a=rg(this._currentUrl),c=s||a.host,l=/^\w+:/.test(n)?this._currentUrl:_a.format(Object.assign(a,{host:c})),p=JF(n,l);if(hT("redirecting to",p.href),this._isRedirect=!0,Yh(p,this._options),(p.protocol!==a.protocol&&p.protocol!=="https:"||p.host!==c&&!YF(p.host,c))&&Wh(this._headerFilter,this._options.headers),Zo(o)){var d={headers:t.headers,statusCode:e},f={url:l,method:i,headers:r};o(this._options,d,f),this._sanitizeOptions(this._options)}this._performRequest()};function gT(t){var e={maxRedirects:21,maxBodyLength:10485760},n={};return Object.keys(t).forEach(function(r){var o=r+":",i=n[o]=t[r],s=e[r]=Object.create(i);function a(l,p,d){return eU(l)?l=Yh(l):qo(l)?l=Yh(rg(l)):(d=p,p=xT(l),l={protocol:o}),Zo(p)&&(d=p,p=null),p=Object.assign({maxRedirects:e.maxRedirects,maxBodyLength:e.maxBodyLength},l,p),p.nativeProtocols=n,!qo(p.host)&&!qo(p.hostname)&&(p.hostname="::1"),Qh.equal(p.protocol,o,"protocol mismatch"),hT("options",p),new hn(p,d)}function c(l,p,d){var f=s.request(l,p,d);return f.end(),f}Object.defineProperties(s,{request:{value:a,configurable:!0,enumerable:!0,writable:!0},get:{value:c,configurable:!0,enumerable:!0,writable:!0}})}),e}function yT(){}function rg(t){var e;if(eg)e=new ba(t);else if(e=xT(_a.parse(t)),!qo(e.protocol))throw new Kh({input:t});return e}function JF(t,e){return eg?new ba(t,e):rg(_a.resolve(e,t))}function xT(t){if(/^\[/.test(t.hostname)&&!/^\[[:0-9a-f]+\]$/i.test(t.hostname))throw new Kh({input:t.href||t});if(/^\[/.test(t.host)&&!/^\[[:0-9a-f]+\](:\d+)?$/i.test(t.host))throw new Kh({input:t.href||t});return t}function Yh(t,e){var n=e||{};for(var r of HF)n[r]=t[r];return n.hostname.startsWith("[")&&(n.hostname=n.hostname.slice(1,-1)),n.port!==""&&(n.port=Number(n.port)),n.path=n.search?n.pathname+n.search:n.pathname,n}function Wh(t,e){var n;for(var r in e)t.test(r)&&(n=e[r],delete e[r]);return n===null||typeof n>"u"?void 0:String(n).trim()}function wa(t,e,n){function r(o){Zo(Error.captureStackTrace)&&Error.captureStackTrace(this,this.constructor),Object.assign(this,o||{}),this.code=t,this.message=this.cause?e+": "+this.cause.message:e}return r.prototype=new(n||Error),Object.defineProperties(r.prototype,{constructor:{value:r,enumerable:!1},name:{value:"Error ["+t+"]",enumerable:!1}}),r}function og(t,e){for(var n of tg)t.removeListener(n,ng[n]);t.on("error",yT),t.destroy(e)}function YF(t,e){Qh(qo(t)&&qo(e));var n=t.length-e.length-1;return n>0&&t[n]==="."&&t.endsWith(e)}function XF(t){return t instanceof Array}function qo(t){return typeof t=="string"||t instanceof String}function Zo(t){return typeof t=="function"}function QF(t){return typeof t=="object"&&"length"in t}function eU(t){return ba&&t instanceof ba}function tU(t){return t.replace(/[\]\\/()*+?.$]/g,"\\$&")}ig.exports=gT({http:qF,https:ZF});ig.exports.wrap=gT});var Y={};za(Y,{BRAND:()=>fR,DIRTY:()=>Qr,EMPTY_PATH:()=>H$,INVALID:()=>le,NEVER:()=>JR,OK:()=>Ht,ParseStatus:()=>Nt,Schema:()=>_e,ZodAny:()=>kr,ZodArray:()=>dr,ZodBigInt:()=>to,ZodBoolean:()=>no,ZodBranded:()=>ts,ZodCatch:()=>mo,ZodDate:()=>ro,ZodDefault:()=>fo,ZodDiscriminatedUnion:()=>La,ZodEffects:()=>Sn,ZodEnum:()=>uo,ZodError:()=>rn,ZodFirstPartyTypeKind:()=>q,ZodFunction:()=>Ma,ZodIntersection:()=>ao,ZodIssueCode:()=>U,ZodLazy:()=>co,ZodLiteral:()=>lo,ZodMap:()=>Qo,ZodNaN:()=>ti,ZodNativeEnum:()=>po,ZodNever:()=>zn,ZodNull:()=>io,ZodNullable:()=>Kn,ZodNumber:()=>eo,ZodObject:()=>sn,ZodOptional:()=>on,ZodParsedType:()=>K,ZodPipeline:()=>ns,ZodPromise:()=>Tr,ZodReadonly:()=>ho,ZodRecord:()=>Da,ZodSchema:()=>_e,ZodSet:()=>ei,ZodString:()=>Sr,ZodSymbol:()=>Yo,ZodTransformer:()=>Sn,ZodTuple:()=>Wn,ZodType:()=>_e,ZodUndefined:()=>oo,ZodUnion:()=>so,ZodUnknown:()=>pr,ZodVoid:()=>Xo,addIssueToContext:()=>H,any:()=>wR,array:()=>ER,bigint:()=>yR,boolean:()=>Ey,coerce:()=>KR,custom:()=>Sy,date:()=>xR,datetimeRegex:()=>_y,defaultErrorMap:()=>lr,discriminatedUnion:()=>AR,effect:()=>UR,enum:()=>DR,function:()=>NR,getErrorMap:()=>Wo,getParsedType:()=>Gn,instanceof:()=>hR,intersection:()=>IR,isAborted:()=>Na,isAsync:()=>Ko,isDirty:()=>ja,isValid:()=>wr,late:()=>mR,lazy:()=>jR,literal:()=>LR,makeIssue:()=>es,map:()=>OR,nan:()=>gR,nativeEnum:()=>MR,never:()=>kR,null:()=>_R,nullable:()=>ZR,number:()=>Ty,object:()=>ku,objectUtil:()=>_u,oboolean:()=>WR,onumber:()=>GR,optional:()=>qR,ostring:()=>VR,pipeline:()=>HR,preprocess:()=>BR,promise:()=>FR,quotelessJson:()=>q$,record:()=>PR,set:()=>zR,setErrorMap:()=>B$,strictObject:()=>$R,string:()=>ky,symbol:()=>vR,transformer:()=>UR,tuple:()=>CR,undefined:()=>bR,union:()=>RR,unknown:()=>SR,util:()=>Ae,void:()=>TR});var Ae;(function(t){t.assertEqual=o=>{};function e(o){}t.assertIs=e;function n(o){throw new Error}t.assertNever=n,t.arrayToEnum=o=>{let i={};for(let s of o)i[s]=s;return i},t.getValidEnumValues=o=>{let i=t.objectKeys(o).filter(a=>typeof o[o[a]]!="number"),s={};for(let a of i)s[a]=o[a];return t.objectValues(s)},t.objectValues=o=>t.objectKeys(o).map(function(i){return o[i]}),t.objectKeys=typeof Object.keys=="function"?o=>Object.keys(o):o=>{let i=[];for(let s in o)Object.prototype.hasOwnProperty.call(o,s)&&i.push(s);return i},t.find=(o,i)=>{for(let s of o)if(i(s))return s},t.isInteger=typeof Number.isInteger=="function"?o=>Number.isInteger(o):o=>typeof o=="number"&&Number.isFinite(o)&&Math.floor(o)===o;function r(o,i=" | "){return o.map(s=>typeof s=="string"?`'${s}'`:s).join(i)}t.joinValues=r,t.jsonStringifyReplacer=(o,i)=>typeof i=="bigint"?i.toString():i})(Ae||(Ae={}));var _u;(function(t){t.mergeShapes=(e,n)=>({...e,...n})})(_u||(_u={}));var K=Ae.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Gn=t=>{switch(typeof t){case"undefined":return K.undefined;case"string":return K.string;case"number":return Number.isNaN(t)?K.nan:K.number;case"boolean":return K.boolean;case"function":return K.function;case"bigint":return K.bigint;case"symbol":return K.symbol;case"object":return Array.isArray(t)?K.array:t===null?K.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?K.promise:typeof Map<"u"&&t instanceof Map?K.map:typeof Set<"u"&&t instanceof Set?K.set:typeof Date<"u"&&t instanceof Date?K.date:K.object;default:return K.unknown}};var U=Ae.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),q$=t=>JSON.stringify(t,null,2).replace(/"([^"]+)":/g,"$1:"),rn=class t extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};let n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=e}format(e){let n=e||function(i){return i.message},r={_errors:[]},o=i=>{for(let s of i.issues)if(s.code==="invalid_union")s.unionErrors.map(o);else if(s.code==="invalid_return_type")o(s.returnTypeError);else if(s.code==="invalid_arguments")o(s.argumentsError);else if(s.path.length===0)r._errors.push(n(s));else{let a=r,c=0;for(;c<s.path.length;){let l=s.path[c];c===s.path.length-1?(a[l]=a[l]||{_errors:[]},a[l]._errors.push(n(s))):a[l]=a[l]||{_errors:[]},a=a[l],c++}}};return o(this),r}static assert(e){if(!(e instanceof t))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Ae.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=n=>n.message){let n={},r=[];for(let o of this.issues)if(o.path.length>0){let i=o.path[0];n[i]=n[i]||[],n[i].push(e(o))}else r.push(e(o));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}};rn.create=t=>new rn(t);var Z$=(t,e)=>{let n;switch(t.code){case U.invalid_type:t.received===K.undefined?n="Required":n=`Expected ${t.expected}, received ${t.received}`;break;case U.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(t.expected,Ae.jsonStringifyReplacer)}`;break;case U.unrecognized_keys:n=`Unrecognized key(s) in object: ${Ae.joinValues(t.keys,", ")}`;break;case U.invalid_union:n="Invalid input";break;case U.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${Ae.joinValues(t.options)}`;break;case U.invalid_enum_value:n=`Invalid enum value. Expected ${Ae.joinValues(t.options)}, received '${t.received}'`;break;case U.invalid_arguments:n="Invalid function arguments";break;case U.invalid_return_type:n="Invalid function return type";break;case U.invalid_date:n="Invalid date";break;case U.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(n=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?n=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?n=`Invalid input: must end with "${t.validation.endsWith}"`:Ae.assertNever(t.validation):t.validation!=="regex"?n=`Invalid ${t.validation}`:n="Invalid";break;case U.too_small:t.type==="array"?n=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?n=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?n=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="bigint"?n=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?n=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:n="Invalid input";break;case U.too_big:t.type==="array"?n=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?n=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?n=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?n=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?n=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:n="Invalid input";break;case U.custom:n="Invalid input";break;case U.invalid_intersection_types:n="Intersection results could not be merged";break;case U.not_multiple_of:n=`Number must be a multiple of ${t.multipleOf}`;break;case U.not_finite:n="Number must be finite";break;default:n=e.defaultError,Ae.assertNever(t)}return{message:n}},lr=Z$;var gy=lr;function B$(t){gy=t}function Wo(){return gy}var es=t=>{let{data:e,path:n,errorMaps:r,issueData:o}=t,i=[...n,...o.path||[]],s={...o,path:i};if(o.message!==void 0)return{...o,path:i,message:o.message};let a="",c=r.filter(l=>!!l).slice().reverse();for(let l of c)a=l(s,{data:e,defaultError:a}).message;return{...o,path:i,message:a}},H$=[];function H(t,e){let n=Wo(),r=es({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,n,n===lr?void 0:lr].filter(o=>!!o)});t.common.issues.push(r)}var Nt=class t{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,n){let r=[];for(let o of n){if(o.status==="aborted")return le;o.status==="dirty"&&e.dirty(),r.push(o.value)}return{status:e.value,value:r}}static async mergeObjectAsync(e,n){let r=[];for(let o of n){let i=await o.key,s=await o.value;r.push({key:i,value:s})}return t.mergeObjectSync(e,r)}static mergeObjectSync(e,n){let r={};for(let o of n){let{key:i,value:s}=o;if(i.status==="aborted"||s.status==="aborted")return le;i.status==="dirty"&&e.dirty(),s.status==="dirty"&&e.dirty(),i.value!=="__proto__"&&(typeof s.value<"u"||o.alwaysSet)&&(r[i.value]=s.value)}return{status:e.value,value:r}}},le=Object.freeze({status:"aborted"}),Qr=t=>({status:"dirty",value:t}),Ht=t=>({status:"valid",value:t}),Na=t=>t.status==="aborted",ja=t=>t.status==="dirty",wr=t=>t.status==="valid",Ko=t=>typeof Promise<"u"&&t instanceof Promise;var ee;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(ee||(ee={}));var wn=class{constructor(e,n,r,o){this._cachedPath=[],this.parent=e,this.data=n,this._path=r,this._key=o}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},yy=(t,e)=>{if(wr(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let n=new rn(t.common.issues);return this._error=n,this._error}}};function xe(t){if(!t)return{};let{errorMap:e,invalid_type_error:n,required_error:r,description:o}=t;if(e&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:o}:{errorMap:(s,a)=>{let{message:c}=t;return s.code==="invalid_enum_value"?{message:c??a.defaultError}:typeof a.data>"u"?{message:c??r??a.defaultError}:s.code!=="invalid_type"?{message:a.defaultError}:{message:c??n??a.defaultError}},description:o}}var _e=class{get description(){return this._def.description}_getType(e){return Gn(e.data)}_getOrReturnCtx(e,n){return n||{common:e.parent.common,data:e.data,parsedType:Gn(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new Nt,ctx:{common:e.parent.common,data:e.data,parsedType:Gn(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let n=this._parse(e);if(Ko(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(e){let n=this._parse(e);return Promise.resolve(n)}parse(e,n){let r=this.safeParse(e,n);if(r.success)return r.data;throw r.error}safeParse(e,n){let r={common:{issues:[],async:(n==null?void 0:n.async)??!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Gn(e)},o=this._parseSync({data:e,path:r.path,parent:r});return yy(r,o)}"~validate"(e){var r,o;let n={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Gn(e)};if(!this["~standard"].async)try{let i=this._parseSync({data:e,path:[],parent:n});return wr(i)?{value:i.value}:{issues:n.common.issues}}catch(i){(o=(r=i==null?void 0:i.message)==null?void 0:r.toLowerCase())!=null&&o.includes("encountered")&&(this["~standard"].async=!0),n.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:n}).then(i=>wr(i)?{value:i.value}:{issues:n.common.issues})}async parseAsync(e,n){let r=await this.safeParseAsync(e,n);if(r.success)return r.data;throw r.error}async safeParseAsync(e,n){let r={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Gn(e)},o=this._parse({data:e,path:r.path,parent:r}),i=await(Ko(o)?o:Promise.resolve(o));return yy(r,i)}refine(e,n){let r=o=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(o):n;return this._refinement((o,i)=>{let s=e(o),a=()=>i.addIssue({code:U.custom,...r(o)});return typeof Promise<"u"&&s instanceof Promise?s.then(c=>c?!0:(a(),!1)):s?!0:(a(),!1)})}refinement(e,n){return this._refinement((r,o)=>e(r)?!0:(o.addIssue(typeof n=="function"?n(r,o):n),!1))}_refinement(e){return new Sn({schema:this,typeName:q.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:n=>this["~validate"](n)}}optional(){return on.create(this,this._def)}nullable(){return Kn.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return dr.create(this)}promise(){return Tr.create(this,this._def)}or(e){return so.create([this,e],this._def)}and(e){return ao.create(this,e,this._def)}transform(e){return new Sn({...xe(this._def),schema:this,typeName:q.ZodEffects,effect:{type:"transform",transform:e}})}default(e){let n=typeof e=="function"?e:()=>e;return new fo({...xe(this._def),innerType:this,defaultValue:n,typeName:q.ZodDefault})}brand(){return new ts({typeName:q.ZodBranded,type:this,...xe(this._def)})}catch(e){let n=typeof e=="function"?e:()=>e;return new mo({...xe(this._def),innerType:this,catchValue:n,typeName:q.ZodCatch})}describe(e){let n=this.constructor;return new n({...this._def,description:e})}pipe(e){return ns.create(this,e)}readonly(){return ho.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},V$=/^c[^\s-]{8,}$/i,G$=/^[0-9a-z]+$/,W$=/^[0-9A-HJKMNP-TV-Z]{26}$/i,K$=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,J$=/^[a-z0-9_-]{21}$/i,Y$=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,X$=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,Q$=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,eR="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",wu,tR=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,nR=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,rR=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,oR=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,iR=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,sR=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,vy="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",aR=new RegExp(`^${vy}$`);function by(t){let e="[0-5]\\d";t.precision?e=`${e}\\.\\d{${t.precision}}`:t.precision==null&&(e=`${e}(\\.\\d+)?`);let n=t.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${n}`}function cR(t){return new RegExp(`^${by(t)}$`)}function _y(t){let e=`${vy}T${by(t)}`,n=[];return n.push(t.local?"Z?":"Z"),t.offset&&n.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${n.join("|")})`,new RegExp(`^${e}$`)}function lR(t,e){return!!((e==="v4"||!e)&&tR.test(t)||(e==="v6"||!e)&&rR.test(t))}function uR(t,e){if(!Y$.test(t))return!1;try{let[n]=t.split(".");if(!n)return!1;let r=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),o=JSON.parse(atob(r));return!(typeof o!="object"||o===null||"typ"in o&&(o==null?void 0:o.typ)!=="JWT"||!o.alg||e&&o.alg!==e)}catch{return!1}}function pR(t,e){return!!((e==="v4"||!e)&&nR.test(t)||(e==="v6"||!e)&&oR.test(t))}var Sr=class t extends _e{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==K.string){let i=this._getOrReturnCtx(e);return H(i,{code:U.invalid_type,expected:K.string,received:i.parsedType}),le}let r=new Nt,o;for(let i of this._def.checks)if(i.kind==="min")e.data.length<i.value&&(o=this._getOrReturnCtx(e,o),H(o,{code:U.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="max")e.data.length>i.value&&(o=this._getOrReturnCtx(e,o),H(o,{code:U.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="length"){let s=e.data.length>i.value,a=e.data.length<i.value;(s||a)&&(o=this._getOrReturnCtx(e,o),s?H(o,{code:U.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):a&&H(o,{code:U.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),r.dirty())}else if(i.kind==="email")Q$.test(e.data)||(o=this._getOrReturnCtx(e,o),H(o,{validation:"email",code:U.invalid_string,message:i.message}),r.dirty());else if(i.kind==="emoji")wu||(wu=new RegExp(eR,"u")),wu.test(e.data)||(o=this._getOrReturnCtx(e,o),H(o,{validation:"emoji",code:U.invalid_string,message:i.message}),r.dirty());else if(i.kind==="uuid")K$.test(e.data)||(o=this._getOrReturnCtx(e,o),H(o,{validation:"uuid",code:U.invalid_string,message:i.message}),r.dirty());else if(i.kind==="nanoid")J$.test(e.data)||(o=this._getOrReturnCtx(e,o),H(o,{validation:"nanoid",code:U.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid")V$.test(e.data)||(o=this._getOrReturnCtx(e,o),H(o,{validation:"cuid",code:U.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid2")G$.test(e.data)||(o=this._getOrReturnCtx(e,o),H(o,{validation:"cuid2",code:U.invalid_string,message:i.message}),r.dirty());else if(i.kind==="ulid")W$.test(e.data)||(o=this._getOrReturnCtx(e,o),H(o,{validation:"ulid",code:U.invalid_string,message:i.message}),r.dirty());else if(i.kind==="url")try{new URL(e.data)}catch{o=this._getOrReturnCtx(e,o),H(o,{validation:"url",code:U.invalid_string,message:i.message}),r.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(e.data)||(o=this._getOrReturnCtx(e,o),H(o,{validation:"regex",code:U.invalid_string,message:i.message}),r.dirty())):i.kind==="trim"?e.data=e.data.trim():i.kind==="includes"?e.data.includes(i.value,i.position)||(o=this._getOrReturnCtx(e,o),H(o,{code:U.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),r.dirty()):i.kind==="toLowerCase"?e.data=e.data.toLowerCase():i.kind==="toUpperCase"?e.data=e.data.toUpperCase():i.kind==="startsWith"?e.data.startsWith(i.value)||(o=this._getOrReturnCtx(e,o),H(o,{code:U.invalid_string,validation:{startsWith:i.value},message:i.message}),r.dirty()):i.kind==="endsWith"?e.data.endsWith(i.value)||(o=this._getOrReturnCtx(e,o),H(o,{code:U.invalid_string,validation:{endsWith:i.value},message:i.message}),r.dirty()):i.kind==="datetime"?_y(i).test(e.data)||(o=this._getOrReturnCtx(e,o),H(o,{code:U.invalid_string,validation:"datetime",message:i.message}),r.dirty()):i.kind==="date"?aR.test(e.data)||(o=this._getOrReturnCtx(e,o),H(o,{code:U.invalid_string,validation:"date",message:i.message}),r.dirty()):i.kind==="time"?cR(i).test(e.data)||(o=this._getOrReturnCtx(e,o),H(o,{code:U.invalid_string,validation:"time",message:i.message}),r.dirty()):i.kind==="duration"?X$.test(e.data)||(o=this._getOrReturnCtx(e,o),H(o,{validation:"duration",code:U.invalid_string,message:i.message}),r.dirty()):i.kind==="ip"?lR(e.data,i.version)||(o=this._getOrReturnCtx(e,o),H(o,{validation:"ip",code:U.invalid_string,message:i.message}),r.dirty()):i.kind==="jwt"?uR(e.data,i.alg)||(o=this._getOrReturnCtx(e,o),H(o,{validation:"jwt",code:U.invalid_string,message:i.message}),r.dirty()):i.kind==="cidr"?pR(e.data,i.version)||(o=this._getOrReturnCtx(e,o),H(o,{validation:"cidr",code:U.invalid_string,message:i.message}),r.dirty()):i.kind==="base64"?iR.test(e.data)||(o=this._getOrReturnCtx(e,o),H(o,{validation:"base64",code:U.invalid_string,message:i.message}),r.dirty()):i.kind==="base64url"?sR.test(e.data)||(o=this._getOrReturnCtx(e,o),H(o,{validation:"base64url",code:U.invalid_string,message:i.message}),r.dirty()):Ae.assertNever(i);return{status:r.value,value:e.data}}_regex(e,n,r){return this.refinement(o=>e.test(o),{validation:n,code:U.invalid_string,...ee.errToObj(r)})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...ee.errToObj(e)})}url(e){return this._addCheck({kind:"url",...ee.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...ee.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...ee.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...ee.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...ee.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...ee.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...ee.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...ee.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...ee.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...ee.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...ee.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...ee.errToObj(e)})}datetime(e){return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,offset:(e==null?void 0:e.offset)??!1,local:(e==null?void 0:e.local)??!1,...ee.errToObj(e==null?void 0:e.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,...ee.errToObj(e==null?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...ee.errToObj(e)})}regex(e,n){return this._addCheck({kind:"regex",regex:e,...ee.errToObj(n)})}includes(e,n){return this._addCheck({kind:"includes",value:e,position:n==null?void 0:n.position,...ee.errToObj(n==null?void 0:n.message)})}startsWith(e,n){return this._addCheck({kind:"startsWith",value:e,...ee.errToObj(n)})}endsWith(e,n){return this._addCheck({kind:"endsWith",value:e,...ee.errToObj(n)})}min(e,n){return this._addCheck({kind:"min",value:e,...ee.errToObj(n)})}max(e,n){return this._addCheck({kind:"max",value:e,...ee.errToObj(n)})}length(e,n){return this._addCheck({kind:"length",value:e,...ee.errToObj(n)})}nonempty(e){return this.min(1,ee.errToObj(e))}trim(){return new t({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new t({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new t({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(let n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxLength(){let e=null;for(let n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}};Sr.create=t=>new Sr({checks:[],typeName:q.ZodString,coerce:(t==null?void 0:t.coerce)??!1,...xe(t)});function dR(t,e){let n=(t.toString().split(".")[1]||"").length,r=(e.toString().split(".")[1]||"").length,o=n>r?n:r,i=Number.parseInt(t.toFixed(o).replace(".","")),s=Number.parseInt(e.toFixed(o).replace(".",""));return i%s/10**o}var eo=class t extends _e{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==K.number){let i=this._getOrReturnCtx(e);return H(i,{code:U.invalid_type,expected:K.number,received:i.parsedType}),le}let r,o=new Nt;for(let i of this._def.checks)i.kind==="int"?Ae.isInteger(e.data)||(r=this._getOrReturnCtx(e,r),H(r,{code:U.invalid_type,expected:"integer",received:"float",message:i.message}),o.dirty()):i.kind==="min"?(i.inclusive?e.data<i.value:e.data<=i.value)&&(r=this._getOrReturnCtx(e,r),H(r,{code:U.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="max"?(i.inclusive?e.data>i.value:e.data>=i.value)&&(r=this._getOrReturnCtx(e,r),H(r,{code:U.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="multipleOf"?dR(e.data,i.value)!==0&&(r=this._getOrReturnCtx(e,r),H(r,{code:U.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):i.kind==="finite"?Number.isFinite(e.data)||(r=this._getOrReturnCtx(e,r),H(r,{code:U.not_finite,message:i.message}),o.dirty()):Ae.assertNever(i);return{status:o.value,value:e.data}}gte(e,n){return this.setLimit("min",e,!0,ee.toString(n))}gt(e,n){return this.setLimit("min",e,!1,ee.toString(n))}lte(e,n){return this.setLimit("max",e,!0,ee.toString(n))}lt(e,n){return this.setLimit("max",e,!1,ee.toString(n))}setLimit(e,n,r,o){return new t({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:r,message:ee.toString(o)}]})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:ee.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:ee.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:ee.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:ee.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:ee.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:ee.toString(n)})}finite(e){return this._addCheck({kind:"finite",message:ee.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:ee.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:ee.toString(e)})}get minValue(){let e=null;for(let n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxValue(){let e=null;for(let n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&Ae.isInteger(e.value))}get isFinite(){let e=null,n=null;for(let r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(e===null||r.value<e)&&(e=r.value)}return Number.isFinite(n)&&Number.isFinite(e)}};eo.create=t=>new eo({checks:[],typeName:q.ZodNumber,coerce:(t==null?void 0:t.coerce)||!1,...xe(t)});var to=class t extends _e{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==K.bigint)return this._getInvalidInput(e);let r,o=new Nt;for(let i of this._def.checks)i.kind==="min"?(i.inclusive?e.data<i.value:e.data<=i.value)&&(r=this._getOrReturnCtx(e,r),H(r,{code:U.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),o.dirty()):i.kind==="max"?(i.inclusive?e.data>i.value:e.data>=i.value)&&(r=this._getOrReturnCtx(e,r),H(r,{code:U.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),o.dirty()):i.kind==="multipleOf"?e.data%i.value!==BigInt(0)&&(r=this._getOrReturnCtx(e,r),H(r,{code:U.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):Ae.assertNever(i);return{status:o.value,value:e.data}}_getInvalidInput(e){let n=this._getOrReturnCtx(e);return H(n,{code:U.invalid_type,expected:K.bigint,received:n.parsedType}),le}gte(e,n){return this.setLimit("min",e,!0,ee.toString(n))}gt(e,n){return this.setLimit("min",e,!1,ee.toString(n))}lte(e,n){return this.setLimit("max",e,!0,ee.toString(n))}lt(e,n){return this.setLimit("max",e,!1,ee.toString(n))}setLimit(e,n,r,o){return new t({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:r,message:ee.toString(o)}]})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:ee.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:ee.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:ee.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:ee.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:ee.toString(n)})}get minValue(){let e=null;for(let n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxValue(){let e=null;for(let n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}};to.create=t=>new to({checks:[],typeName:q.ZodBigInt,coerce:(t==null?void 0:t.coerce)??!1,...xe(t)});var no=class extends _e{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==K.boolean){let r=this._getOrReturnCtx(e);return H(r,{code:U.invalid_type,expected:K.boolean,received:r.parsedType}),le}return Ht(e.data)}};no.create=t=>new no({typeName:q.ZodBoolean,coerce:(t==null?void 0:t.coerce)||!1,...xe(t)});var ro=class t extends _e{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==K.date){let i=this._getOrReturnCtx(e);return H(i,{code:U.invalid_type,expected:K.date,received:i.parsedType}),le}if(Number.isNaN(e.data.getTime())){let i=this._getOrReturnCtx(e);return H(i,{code:U.invalid_date}),le}let r=new Nt,o;for(let i of this._def.checks)i.kind==="min"?e.data.getTime()<i.value&&(o=this._getOrReturnCtx(e,o),H(o,{code:U.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),r.dirty()):i.kind==="max"?e.data.getTime()>i.value&&(o=this._getOrReturnCtx(e,o),H(o,{code:U.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),r.dirty()):Ae.assertNever(i);return{status:r.value,value:new Date(e.data.getTime())}}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}min(e,n){return this._addCheck({kind:"min",value:e.getTime(),message:ee.toString(n)})}max(e,n){return this._addCheck({kind:"max",value:e.getTime(),message:ee.toString(n)})}get minDate(){let e=null;for(let n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(let n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e!=null?new Date(e):null}};ro.create=t=>new ro({checks:[],coerce:(t==null?void 0:t.coerce)||!1,typeName:q.ZodDate,...xe(t)});var Yo=class extends _e{_parse(e){if(this._getType(e)!==K.symbol){let r=this._getOrReturnCtx(e);return H(r,{code:U.invalid_type,expected:K.symbol,received:r.parsedType}),le}return Ht(e.data)}};Yo.create=t=>new Yo({typeName:q.ZodSymbol,...xe(t)});var oo=class extends _e{_parse(e){if(this._getType(e)!==K.undefined){let r=this._getOrReturnCtx(e);return H(r,{code:U.invalid_type,expected:K.undefined,received:r.parsedType}),le}return Ht(e.data)}};oo.create=t=>new oo({typeName:q.ZodUndefined,...xe(t)});var io=class extends _e{_parse(e){if(this._getType(e)!==K.null){let r=this._getOrReturnCtx(e);return H(r,{code:U.invalid_type,expected:K.null,received:r.parsedType}),le}return Ht(e.data)}};io.create=t=>new io({typeName:q.ZodNull,...xe(t)});var kr=class extends _e{constructor(){super(...arguments),this._any=!0}_parse(e){return Ht(e.data)}};kr.create=t=>new kr({typeName:q.ZodAny,...xe(t)});var pr=class extends _e{constructor(){super(...arguments),this._unknown=!0}_parse(e){return Ht(e.data)}};pr.create=t=>new pr({typeName:q.ZodUnknown,...xe(t)});var zn=class extends _e{_parse(e){let n=this._getOrReturnCtx(e);return H(n,{code:U.invalid_type,expected:K.never,received:n.parsedType}),le}};zn.create=t=>new zn({typeName:q.ZodNever,...xe(t)});var Xo=class extends _e{_parse(e){if(this._getType(e)!==K.undefined){let r=this._getOrReturnCtx(e);return H(r,{code:U.invalid_type,expected:K.void,received:r.parsedType}),le}return Ht(e.data)}};Xo.create=t=>new Xo({typeName:q.ZodVoid,...xe(t)});var dr=class t extends _e{_parse(e){let{ctx:n,status:r}=this._processInputParams(e),o=this._def;if(n.parsedType!==K.array)return H(n,{code:U.invalid_type,expected:K.array,received:n.parsedType}),le;if(o.exactLength!==null){let s=n.data.length>o.exactLength.value,a=n.data.length<o.exactLength.value;(s||a)&&(H(n,{code:s?U.too_big:U.too_small,minimum:a?o.exactLength.value:void 0,maximum:s?o.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:o.exactLength.message}),r.dirty())}if(o.minLength!==null&&n.data.length<o.minLength.value&&(H(n,{code:U.too_small,minimum:o.minLength.value,type:"array",inclusive:!0,exact:!1,message:o.minLength.message}),r.dirty()),o.maxLength!==null&&n.data.length>o.maxLength.value&&(H(n,{code:U.too_big,maximum:o.maxLength.value,type:"array",inclusive:!0,exact:!1,message:o.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((s,a)=>o.type._parseAsync(new wn(n,s,n.path,a)))).then(s=>Nt.mergeArray(r,s));let i=[...n.data].map((s,a)=>o.type._parseSync(new wn(n,s,n.path,a)));return Nt.mergeArray(r,i)}get element(){return this._def.type}min(e,n){return new t({...this._def,minLength:{value:e,message:ee.toString(n)}})}max(e,n){return new t({...this._def,maxLength:{value:e,message:ee.toString(n)}})}length(e,n){return new t({...this._def,exactLength:{value:e,message:ee.toString(n)}})}nonempty(e){return this.min(1,e)}};dr.create=(t,e)=>new dr({type:t,minLength:null,maxLength:null,exactLength:null,typeName:q.ZodArray,...xe(e)});function Jo(t){if(t instanceof sn){let e={};for(let n in t.shape){let r=t.shape[n];e[n]=on.create(Jo(r))}return new sn({...t._def,shape:()=>e})}else return t instanceof dr?new dr({...t._def,type:Jo(t.element)}):t instanceof on?on.create(Jo(t.unwrap())):t instanceof Kn?Kn.create(Jo(t.unwrap())):t instanceof Wn?Wn.create(t.items.map(e=>Jo(e))):t}var sn=class t extends _e{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let e=this._def.shape(),n=Ae.objectKeys(e);return this._cached={shape:e,keys:n},this._cached}_parse(e){if(this._getType(e)!==K.object){let l=this._getOrReturnCtx(e);return H(l,{code:U.invalid_type,expected:K.object,received:l.parsedType}),le}let{status:r,ctx:o}=this._processInputParams(e),{shape:i,keys:s}=this._getCached(),a=[];if(!(this._def.catchall instanceof zn&&this._def.unknownKeys==="strip"))for(let l in o.data)s.includes(l)||a.push(l);let c=[];for(let l of s){let p=i[l],d=o.data[l];c.push({key:{status:"valid",value:l},value:p._parse(new wn(o,d,o.path,l)),alwaysSet:l in o.data})}if(this._def.catchall instanceof zn){let l=this._def.unknownKeys;if(l==="passthrough")for(let p of a)c.push({key:{status:"valid",value:p},value:{status:"valid",value:o.data[p]}});else if(l==="strict")a.length>0&&(H(o,{code:U.unrecognized_keys,keys:a}),r.dirty());else if(l!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let l=this._def.catchall;for(let p of a){let d=o.data[p];c.push({key:{status:"valid",value:p},value:l._parse(new wn(o,d,o.path,p)),alwaysSet:p in o.data})}}return o.common.async?Promise.resolve().then(async()=>{let l=[];for(let p of c){let d=await p.key,f=await p.value;l.push({key:d,value:f,alwaysSet:p.alwaysSet})}return l}).then(l=>Nt.mergeObjectSync(r,l)):Nt.mergeObjectSync(r,c)}get shape(){return this._def.shape()}strict(e){return ee.errToObj,new t({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(n,r)=>{var i,s;let o=((s=(i=this._def).errorMap)==null?void 0:s.call(i,n,r).message)??r.defaultError;return n.code==="unrecognized_keys"?{message:ee.errToObj(e).message??o}:{message:o}}}:{}})}strip(){return new t({...this._def,unknownKeys:"strip"})}passthrough(){return new t({...this._def,unknownKeys:"passthrough"})}extend(e){return new t({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new t({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:q.ZodObject})}setKey(e,n){return this.augment({[e]:n})}catchall(e){return new t({...this._def,catchall:e})}pick(e){let n={};for(let r of Ae.objectKeys(e))e[r]&&this.shape[r]&&(n[r]=this.shape[r]);return new t({...this._def,shape:()=>n})}omit(e){let n={};for(let r of Ae.objectKeys(this.shape))e[r]||(n[r]=this.shape[r]);return new t({...this._def,shape:()=>n})}deepPartial(){return Jo(this)}partial(e){let n={};for(let r of Ae.objectKeys(this.shape)){let o=this.shape[r];e&&!e[r]?n[r]=o:n[r]=o.optional()}return new t({...this._def,shape:()=>n})}required(e){let n={};for(let r of Ae.objectKeys(this.shape))if(e&&!e[r])n[r]=this.shape[r];else{let i=this.shape[r];for(;i instanceof on;)i=i._def.innerType;n[r]=i}return new t({...this._def,shape:()=>n})}keyof(){return wy(Ae.objectKeys(this.shape))}};sn.create=(t,e)=>new sn({shape:()=>t,unknownKeys:"strip",catchall:zn.create(),typeName:q.ZodObject,...xe(e)});sn.strictCreate=(t,e)=>new sn({shape:()=>t,unknownKeys:"strict",catchall:zn.create(),typeName:q.ZodObject,...xe(e)});sn.lazycreate=(t,e)=>new sn({shape:t,unknownKeys:"strip",catchall:zn.create(),typeName:q.ZodObject,...xe(e)});var so=class extends _e{_parse(e){let{ctx:n}=this._processInputParams(e),r=this._def.options;function o(i){for(let a of i)if(a.result.status==="valid")return a.result;for(let a of i)if(a.result.status==="dirty")return n.common.issues.push(...a.ctx.common.issues),a.result;let s=i.map(a=>new rn(a.ctx.common.issues));return H(n,{code:U.invalid_union,unionErrors:s}),le}if(n.common.async)return Promise.all(r.map(async i=>{let s={...n,common:{...n.common,issues:[]},parent:null};return{result:await i._parseAsync({data:n.data,path:n.path,parent:s}),ctx:s}})).then(o);{let i,s=[];for(let c of r){let l={...n,common:{...n.common,issues:[]},parent:null},p=c._parseSync({data:n.data,path:n.path,parent:l});if(p.status==="valid")return p;p.status==="dirty"&&!i&&(i={result:p,ctx:l}),l.common.issues.length&&s.push(l.common.issues)}if(i)return n.common.issues.push(...i.ctx.common.issues),i.result;let a=s.map(c=>new rn(c));return H(n,{code:U.invalid_union,unionErrors:a}),le}}get options(){return this._def.options}};so.create=(t,e)=>new so({options:t,typeName:q.ZodUnion,...xe(e)});var ur=t=>t instanceof co?ur(t.schema):t instanceof Sn?ur(t.innerType()):t instanceof lo?[t.value]:t instanceof uo?t.options:t instanceof po?Ae.objectValues(t.enum):t instanceof fo?ur(t._def.innerType):t instanceof oo?[void 0]:t instanceof io?[null]:t instanceof on?[void 0,...ur(t.unwrap())]:t instanceof Kn?[null,...ur(t.unwrap())]:t instanceof ts||t instanceof ho?ur(t.unwrap()):t instanceof mo?ur(t._def.innerType):[],La=class t extends _e{_parse(e){let{ctx:n}=this._processInputParams(e);if(n.parsedType!==K.object)return H(n,{code:U.invalid_type,expected:K.object,received:n.parsedType}),le;let r=this.discriminator,o=n.data[r],i=this.optionsMap.get(o);return i?n.common.async?i._parseAsync({data:n.data,path:n.path,parent:n}):i._parseSync({data:n.data,path:n.path,parent:n}):(H(n,{code:U.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),le)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,n,r){let o=new Map;for(let i of n){let s=ur(i.shape[e]);if(!s.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(let a of s){if(o.has(a))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(a)}`);o.set(a,i)}}return new t({typeName:q.ZodDiscriminatedUnion,discriminator:e,options:n,optionsMap:o,...xe(r)})}};function Su(t,e){let n=Gn(t),r=Gn(e);if(t===e)return{valid:!0,data:t};if(n===K.object&&r===K.object){let o=Ae.objectKeys(e),i=Ae.objectKeys(t).filter(a=>o.indexOf(a)!==-1),s={...t,...e};for(let a of i){let c=Su(t[a],e[a]);if(!c.valid)return{valid:!1};s[a]=c.data}return{valid:!0,data:s}}else if(n===K.array&&r===K.array){if(t.length!==e.length)return{valid:!1};let o=[];for(let i=0;i<t.length;i++){let s=t[i],a=e[i],c=Su(s,a);if(!c.valid)return{valid:!1};o.push(c.data)}return{valid:!0,data:o}}else return n===K.date&&r===K.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}var ao=class extends _e{_parse(e){let{status:n,ctx:r}=this._processInputParams(e),o=(i,s)=>{if(Na(i)||Na(s))return le;let a=Su(i.value,s.value);return a.valid?((ja(i)||ja(s))&&n.dirty(),{status:n.value,value:a.data}):(H(r,{code:U.invalid_intersection_types}),le)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([i,s])=>o(i,s)):o(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}};ao.create=(t,e,n)=>new ao({left:t,right:e,typeName:q.ZodIntersection,...xe(n)});var Wn=class t extends _e{_parse(e){let{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==K.array)return H(r,{code:U.invalid_type,expected:K.array,received:r.parsedType}),le;if(r.data.length<this._def.items.length)return H(r,{code:U.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),le;!this._def.rest&&r.data.length>this._def.items.length&&(H(r,{code:U.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());let i=[...r.data].map((s,a)=>{let c=this._def.items[a]||this._def.rest;return c?c._parse(new wn(r,s,r.path,a)):null}).filter(s=>!!s);return r.common.async?Promise.all(i).then(s=>Nt.mergeArray(n,s)):Nt.mergeArray(n,i)}get items(){return this._def.items}rest(e){return new t({...this._def,rest:e})}};Wn.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Wn({items:t,typeName:q.ZodTuple,rest:null,...xe(e)})};var Da=class t extends _e{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==K.object)return H(r,{code:U.invalid_type,expected:K.object,received:r.parsedType}),le;let o=[],i=this._def.keyType,s=this._def.valueType;for(let a in r.data)o.push({key:i._parse(new wn(r,a,r.path,a)),value:s._parse(new wn(r,r.data[a],r.path,a)),alwaysSet:a in r.data});return r.common.async?Nt.mergeObjectAsync(n,o):Nt.mergeObjectSync(n,o)}get element(){return this._def.valueType}static create(e,n,r){return n instanceof _e?new t({keyType:e,valueType:n,typeName:q.ZodRecord,...xe(r)}):new t({keyType:Sr.create(),valueType:e,typeName:q.ZodRecord,...xe(n)})}},Qo=class extends _e{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==K.map)return H(r,{code:U.invalid_type,expected:K.map,received:r.parsedType}),le;let o=this._def.keyType,i=this._def.valueType,s=[...r.data.entries()].map(([a,c],l)=>({key:o._parse(new wn(r,a,r.path,[l,"key"])),value:i._parse(new wn(r,c,r.path,[l,"value"]))}));if(r.common.async){let a=new Map;return Promise.resolve().then(async()=>{for(let c of s){let l=await c.key,p=await c.value;if(l.status==="aborted"||p.status==="aborted")return le;(l.status==="dirty"||p.status==="dirty")&&n.dirty(),a.set(l.value,p.value)}return{status:n.value,value:a}})}else{let a=new Map;for(let c of s){let l=c.key,p=c.value;if(l.status==="aborted"||p.status==="aborted")return le;(l.status==="dirty"||p.status==="dirty")&&n.dirty(),a.set(l.value,p.value)}return{status:n.value,value:a}}}};Qo.create=(t,e,n)=>new Qo({valueType:e,keyType:t,typeName:q.ZodMap,...xe(n)});var ei=class t extends _e{_parse(e){let{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==K.set)return H(r,{code:U.invalid_type,expected:K.set,received:r.parsedType}),le;let o=this._def;o.minSize!==null&&r.data.size<o.minSize.value&&(H(r,{code:U.too_small,minimum:o.minSize.value,type:"set",inclusive:!0,exact:!1,message:o.minSize.message}),n.dirty()),o.maxSize!==null&&r.data.size>o.maxSize.value&&(H(r,{code:U.too_big,maximum:o.maxSize.value,type:"set",inclusive:!0,exact:!1,message:o.maxSize.message}),n.dirty());let i=this._def.valueType;function s(c){let l=new Set;for(let p of c){if(p.status==="aborted")return le;p.status==="dirty"&&n.dirty(),l.add(p.value)}return{status:n.value,value:l}}let a=[...r.data.values()].map((c,l)=>i._parse(new wn(r,c,r.path,l)));return r.common.async?Promise.all(a).then(c=>s(c)):s(a)}min(e,n){return new t({...this._def,minSize:{value:e,message:ee.toString(n)}})}max(e,n){return new t({...this._def,maxSize:{value:e,message:ee.toString(n)}})}size(e,n){return this.min(e,n).max(e,n)}nonempty(e){return this.min(1,e)}};ei.create=(t,e)=>new ei({valueType:t,minSize:null,maxSize:null,typeName:q.ZodSet,...xe(e)});var Ma=class t extends _e{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:n}=this._processInputParams(e);if(n.parsedType!==K.function)return H(n,{code:U.invalid_type,expected:K.function,received:n.parsedType}),le;function r(a,c){return es({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Wo(),lr].filter(l=>!!l),issueData:{code:U.invalid_arguments,argumentsError:c}})}function o(a,c){return es({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Wo(),lr].filter(l=>!!l),issueData:{code:U.invalid_return_type,returnTypeError:c}})}let i={errorMap:n.common.contextualErrorMap},s=n.data;if(this._def.returns instanceof Tr){let a=this;return Ht(async function(...c){let l=new rn([]),p=await a._def.args.parseAsync(c,i).catch(h=>{throw l.addIssue(r(c,h)),l}),d=await Reflect.apply(s,this,p);return await a._def.returns._def.type.parseAsync(d,i).catch(h=>{throw l.addIssue(o(d,h)),l})})}else{let a=this;return Ht(function(...c){let l=a._def.args.safeParse(c,i);if(!l.success)throw new rn([r(c,l.error)]);let p=Reflect.apply(s,this,l.data),d=a._def.returns.safeParse(p,i);if(!d.success)throw new rn([o(p,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new t({...this._def,args:Wn.create(e).rest(pr.create())})}returns(e){return new t({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,n,r){return new t({args:e||Wn.create([]).rest(pr.create()),returns:n||pr.create(),typeName:q.ZodFunction,...xe(r)})}},co=class extends _e{get schema(){return this._def.getter()}_parse(e){let{ctx:n}=this._processInputParams(e);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}};co.create=(t,e)=>new co({getter:t,typeName:q.ZodLazy,...xe(e)});var lo=class extends _e{_parse(e){if(e.data!==this._def.value){let n=this._getOrReturnCtx(e);return H(n,{received:n.data,code:U.invalid_literal,expected:this._def.value}),le}return{status:"valid",value:e.data}}get value(){return this._def.value}};lo.create=(t,e)=>new lo({value:t,typeName:q.ZodLiteral,...xe(e)});function wy(t,e){return new uo({values:t,typeName:q.ZodEnum,...xe(e)})}var uo=class t extends _e{_parse(e){if(typeof e.data!="string"){let n=this._getOrReturnCtx(e),r=this._def.values;return H(n,{expected:Ae.joinValues(r),received:n.parsedType,code:U.invalid_type}),le}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){let n=this._getOrReturnCtx(e),r=this._def.values;return H(n,{received:n.data,code:U.invalid_enum_value,options:r}),le}return Ht(e.data)}get options(){return this._def.values}get enum(){let e={};for(let n of this._def.values)e[n]=n;return e}get Values(){let e={};for(let n of this._def.values)e[n]=n;return e}get Enum(){let e={};for(let n of this._def.values)e[n]=n;return e}extract(e,n=this._def){return t.create(e,{...this._def,...n})}exclude(e,n=this._def){return t.create(this.options.filter(r=>!e.includes(r)),{...this._def,...n})}};uo.create=wy;var po=class extends _e{_parse(e){let n=Ae.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(e);if(r.parsedType!==K.string&&r.parsedType!==K.number){let o=Ae.objectValues(n);return H(r,{expected:Ae.joinValues(o),received:r.parsedType,code:U.invalid_type}),le}if(this._cache||(this._cache=new Set(Ae.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){let o=Ae.objectValues(n);return H(r,{received:r.data,code:U.invalid_enum_value,options:o}),le}return Ht(e.data)}get enum(){return this._def.values}};po.create=(t,e)=>new po({values:t,typeName:q.ZodNativeEnum,...xe(e)});var Tr=class extends _e{unwrap(){return this._def.type}_parse(e){let{ctx:n}=this._processInputParams(e);if(n.parsedType!==K.promise&&n.common.async===!1)return H(n,{code:U.invalid_type,expected:K.promise,received:n.parsedType}),le;let r=n.parsedType===K.promise?n.data:Promise.resolve(n.data);return Ht(r.then(o=>this._def.type.parseAsync(o,{path:n.path,errorMap:n.common.contextualErrorMap})))}};Tr.create=(t,e)=>new Tr({type:t,typeName:q.ZodPromise,...xe(e)});var Sn=class extends _e{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===q.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:n,ctx:r}=this._processInputParams(e),o=this._def.effect||null,i={addIssue:s=>{H(r,s),s.fatal?n.abort():n.dirty()},get path(){return r.path}};if(i.addIssue=i.addIssue.bind(i),o.type==="preprocess"){let s=o.transform(r.data,i);if(r.common.async)return Promise.resolve(s).then(async a=>{if(n.value==="aborted")return le;let c=await this._def.schema._parseAsync({data:a,path:r.path,parent:r});return c.status==="aborted"?le:c.status==="dirty"?Qr(c.value):n.value==="dirty"?Qr(c.value):c});{if(n.value==="aborted")return le;let a=this._def.schema._parseSync({data:s,path:r.path,parent:r});return a.status==="aborted"?le:a.status==="dirty"?Qr(a.value):n.value==="dirty"?Qr(a.value):a}}if(o.type==="refinement"){let s=a=>{let c=o.refinement(a,i);if(r.common.async)return Promise.resolve(c);if(c instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(r.common.async===!1){let a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?le:(a.status==="dirty"&&n.dirty(),s(a.value),{status:n.value,value:a.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>a.status==="aborted"?le:(a.status==="dirty"&&n.dirty(),s(a.value).then(()=>({status:n.value,value:a.value}))))}if(o.type==="transform")if(r.common.async===!1){let s=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!wr(s))return le;let a=o.transform(s.value,i);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:a}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(s=>wr(s)?Promise.resolve(o.transform(s.value,i)).then(a=>({status:n.value,value:a})):le);Ae.assertNever(o)}};Sn.create=(t,e,n)=>new Sn({schema:t,typeName:q.ZodEffects,effect:e,...xe(n)});Sn.createWithPreprocess=(t,e,n)=>new Sn({schema:e,effect:{type:"preprocess",transform:t},typeName:q.ZodEffects,...xe(n)});var on=class extends _e{_parse(e){return this._getType(e)===K.undefined?Ht(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};on.create=(t,e)=>new on({innerType:t,typeName:q.ZodOptional,...xe(e)});var Kn=class extends _e{_parse(e){return this._getType(e)===K.null?Ht(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};Kn.create=(t,e)=>new Kn({innerType:t,typeName:q.ZodNullable,...xe(e)});var fo=class extends _e{_parse(e){let{ctx:n}=this._processInputParams(e),r=n.data;return n.parsedType===K.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}};fo.create=(t,e)=>new fo({innerType:t,typeName:q.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...xe(e)});var mo=class extends _e{_parse(e){let{ctx:n}=this._processInputParams(e),r={...n,common:{...n.common,issues:[]}},o=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return Ko(o)?o.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new rn(r.common.issues)},input:r.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new rn(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}};mo.create=(t,e)=>new mo({innerType:t,typeName:q.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...xe(e)});var ti=class extends _e{_parse(e){if(this._getType(e)!==K.nan){let r=this._getOrReturnCtx(e);return H(r,{code:U.invalid_type,expected:K.nan,received:r.parsedType}),le}return{status:"valid",value:e.data}}};ti.create=t=>new ti({typeName:q.ZodNaN,...xe(t)});var fR=Symbol("zod_brand"),ts=class extends _e{_parse(e){let{ctx:n}=this._processInputParams(e),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}},ns=class t extends _e{_parse(e){let{status:n,ctx:r}=this._processInputParams(e);if(r.common.async)return(async()=>{let i=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?le:i.status==="dirty"?(n.dirty(),Qr(i.value)):this._def.out._parseAsync({data:i.value,path:r.path,parent:r})})();{let o=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?le:o.status==="dirty"?(n.dirty(),{status:"dirty",value:o.value}):this._def.out._parseSync({data:o.value,path:r.path,parent:r})}}static create(e,n){return new t({in:e,out:n,typeName:q.ZodPipeline})}},ho=class extends _e{_parse(e){let n=this._def.innerType._parse(e),r=o=>(wr(o)&&(o.value=Object.freeze(o.value)),o);return Ko(n)?n.then(o=>r(o)):r(n)}unwrap(){return this._def.innerType}};ho.create=(t,e)=>new ho({innerType:t,typeName:q.ZodReadonly,...xe(e)});function xy(t,e){let n=typeof t=="function"?t(e):typeof t=="string"?{message:t}:t;return typeof n=="string"?{message:n}:n}function Sy(t,e={},n){return t?kr.create().superRefine((r,o)=>{let i=t(r);if(i instanceof Promise)return i.then(s=>{if(!s){let a=xy(e,r),c=a.fatal??n??!0;o.addIssue({code:"custom",...a,fatal:c})}});if(!i){let s=xy(e,r),a=s.fatal??n??!0;o.addIssue({code:"custom",...s,fatal:a})}}):kr.create()}var mR={object:sn.lazycreate},q;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(q||(q={}));var hR=(t,e={message:`Input not instance of ${t.name}`})=>Sy(n=>n instanceof t,e),ky=Sr.create,Ty=eo.create,gR=ti.create,yR=to.create,Ey=no.create,xR=ro.create,vR=Yo.create,bR=oo.create,_R=io.create,wR=kr.create,SR=pr.create,kR=zn.create,TR=Xo.create,ER=dr.create,ku=sn.create,$R=sn.strictCreate,RR=so.create,AR=La.create,IR=ao.create,CR=Wn.create,PR=Da.create,OR=Qo.create,zR=ei.create,NR=Ma.create,jR=co.create,LR=lo.create,DR=uo.create,MR=po.create,FR=Tr.create,UR=Sn.create,qR=on.create,ZR=Kn.create,BR=Sn.createWithPreprocess,HR=ns.create,VR=()=>ky().optional(),GR=()=>Ty().optional(),WR=()=>Ey().optional(),KR={string:(t=>Sr.create({...t,coerce:!0})),number:(t=>eo.create({...t,coerce:!0})),boolean:(t=>no.create({...t,coerce:!0})),bigint:(t=>to.create({...t,coerce:!0})),date:(t=>ro.create({...t,coerce:!0}))};var JR=le;var YR=Object.freeze({status:"aborted"});function I(t,e,n){function r(a,c){var l;Object.defineProperty(a,"_zod",{value:a._zod??{},enumerable:!1}),(l=a._zod).traits??(l.traits=new Set),a._zod.traits.add(t),e(a,c);for(let p in s.prototype)p in a||Object.defineProperty(a,p,{value:s.prototype[p].bind(a)});a._zod.constr=s,a._zod.def=c}let o=(n==null?void 0:n.Parent)??Object;class i extends o{}Object.defineProperty(i,"name",{value:t});function s(a){var c;let l=n!=null&&n.Parent?new i:this;r(l,a),(c=l._zod).deferred??(c.deferred=[]);for(let p of l._zod.deferred)p();return l}return Object.defineProperty(s,"init",{value:r}),Object.defineProperty(s,Symbol.hasInstance,{value:a=>{var c,l;return n!=null&&n.Parent&&a instanceof n.Parent?!0:(l=(c=a==null?void 0:a._zod)==null?void 0:c.traits)==null?void 0:l.has(t)}}),Object.defineProperty(s,"name",{value:t}),s}var XR=Symbol("zod_brand"),fr=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},Fa={};function gn(t){return t&&Object.assign(Fa,t),Fa}var Ce={};za(Ce,{BIGINT_FORMAT_RANGES:()=>Ry,Class:()=>Eu,NUMBER_FORMAT_RANGES:()=>Ou,aborted:()=>yo,allowsEval:()=>Iu,assert:()=>rA,assertEqual:()=>QR,assertIs:()=>tA,assertNever:()=>nA,assertNotEqual:()=>eA,assignProp:()=>Au,cached:()=>is,captureStackTrace:()=>qa,cleanEnum:()=>gA,cleanRegex:()=>as,clone:()=>yn,createTransparentProxy:()=>lA,defineLazy:()=>et,esc:()=>go,escapeRegex:()=>Er,extend:()=>dA,finalizeIssue:()=>Nn,floatSafeRemainder:()=>Ru,getElementAtPath:()=>oA,getEnumValues:()=>os,getLengthableOrigin:()=>cs,getParsedType:()=>cA,getSizableOrigin:()=>Ay,isObject:()=>ni,isPlainObject:()=>ri,issue:()=>zu,joinValues:()=>Ua,jsonStringifyReplacer:()=>$u,merge:()=>fA,normalizeParams:()=>ue,nullish:()=>ss,numKeys:()=>aA,omit:()=>pA,optionalKeys:()=>Pu,partial:()=>mA,pick:()=>uA,prefixIssues:()=>Jn,primitiveTypes:()=>$y,promiseAllObject:()=>iA,propertyKeyTypes:()=>Cu,randomString:()=>sA,required:()=>hA,stringifyPrimitive:()=>Za,unwrapMessage:()=>rs});function QR(t){return t}function eA(t){return t}function tA(t){}function nA(t){throw new Error}function rA(t){}function os(t){let e=Object.values(t).filter(r=>typeof r=="number");return Object.entries(t).filter(([r,o])=>e.indexOf(+r)===-1).map(([r,o])=>o)}function Ua(t,e="|"){return t.map(n=>Za(n)).join(e)}function $u(t,e){return typeof e=="bigint"?e.toString():e}function is(t){return{get value(){{let n=t();return Object.defineProperty(this,"value",{value:n}),n}throw new Error("cached value already set")}}}function ss(t){return t==null}function as(t){let e=t.startsWith("^")?1:0,n=t.endsWith("$")?t.length-1:t.length;return t.slice(e,n)}function Ru(t,e){let n=(t.toString().split(".")[1]||"").length,r=(e.toString().split(".")[1]||"").length,o=n>r?n:r,i=Number.parseInt(t.toFixed(o).replace(".","")),s=Number.parseInt(e.toFixed(o).replace(".",""));return i%s/10**o}function et(t,e,n){Object.defineProperty(t,e,{get(){{let o=n();return t[e]=o,o}throw new Error("cached value already set")},set(o){Object.defineProperty(t,e,{value:o})},configurable:!0})}function Au(t,e,n){Object.defineProperty(t,e,{value:n,writable:!0,enumerable:!0,configurable:!0})}function oA(t,e){return e?e.reduce((n,r)=>n==null?void 0:n[r],t):t}function iA(t){let e=Object.keys(t),n=e.map(r=>t[r]);return Promise.all(n).then(r=>{let o={};for(let i=0;i<e.length;i++)o[e[i]]=r[i];return o})}function sA(t=10){let e="abcdefghijklmnopqrstuvwxyz",n="";for(let r=0;r<t;r++)n+=e[Math.floor(Math.random()*e.length)];return n}function go(t){return JSON.stringify(t)}var qa=Error.captureStackTrace?Error.captureStackTrace:(...t)=>{};function ni(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}var Iu=is(()=>{var t;if(typeof navigator<"u"&&((t=navigator==null?void 0:navigator.userAgent)!=null&&t.includes("Cloudflare")))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});function ri(t){if(ni(t)===!1)return!1;let e=t.constructor;if(e===void 0)return!0;let n=e.prototype;return!(ni(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function aA(t){let e=0;for(let n in t)Object.prototype.hasOwnProperty.call(t,n)&&e++;return e}var cA=t=>{let e=typeof t;switch(e){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(t)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(t)?"array":t===null?"null":t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?"promise":typeof Map<"u"&&t instanceof Map?"map":typeof Set<"u"&&t instanceof Set?"set":typeof Date<"u"&&t instanceof Date?"date":typeof File<"u"&&t instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${e}`)}},Cu=new Set(["string","number","symbol"]),$y=new Set(["string","number","bigint","boolean","symbol","undefined"]);function Er(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function yn(t,e,n){let r=new t._zod.constr(e??t._zod.def);return(!e||n!=null&&n.parent)&&(r._zod.parent=t),r}function ue(t){let e=t;if(!e)return{};if(typeof e=="string")return{error:()=>e};if((e==null?void 0:e.message)!==void 0){if((e==null?void 0:e.error)!==void 0)throw new Error("Cannot specify both `message` and `error` params");e.error=e.message}return delete e.message,typeof e.error=="string"?{...e,error:()=>e.error}:e}function lA(t){let e;return new Proxy({},{get(n,r,o){return e??(e=t()),Reflect.get(e,r,o)},set(n,r,o,i){return e??(e=t()),Reflect.set(e,r,o,i)},has(n,r){return e??(e=t()),Reflect.has(e,r)},deleteProperty(n,r){return e??(e=t()),Reflect.deleteProperty(e,r)},ownKeys(n){return e??(e=t()),Reflect.ownKeys(e)},getOwnPropertyDescriptor(n,r){return e??(e=t()),Reflect.getOwnPropertyDescriptor(e,r)},defineProperty(n,r,o){return e??(e=t()),Reflect.defineProperty(e,r,o)}})}function Za(t){return typeof t=="bigint"?t.toString()+"n":typeof t=="string"?`"${t}"`:`${t}`}function Pu(t){return Object.keys(t).filter(e=>t[e]._zod.optin==="optional"&&t[e]._zod.optout==="optional")}var Ou={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},Ry={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function uA(t,e){let n={},r=t._zod.def;for(let o in e){if(!(o in r.shape))throw new Error(`Unrecognized key: "${o}"`);e[o]&&(n[o]=r.shape[o])}return yn(t,{...t._zod.def,shape:n,checks:[]})}function pA(t,e){let n={...t._zod.def.shape},r=t._zod.def;for(let o in e){if(!(o in r.shape))throw new Error(`Unrecognized key: "${o}"`);e[o]&&delete n[o]}return yn(t,{...t._zod.def,shape:n,checks:[]})}function dA(t,e){if(!ri(e))throw new Error("Invalid input to extend: expected a plain object");let n={...t._zod.def,get shape(){let r={...t._zod.def.shape,...e};return Au(this,"shape",r),r},checks:[]};return yn(t,n)}function fA(t,e){return yn(t,{...t._zod.def,get shape(){let n={...t._zod.def.shape,...e._zod.def.shape};return Au(this,"shape",n),n},catchall:e._zod.def.catchall,checks:[]})}function mA(t,e,n){let r=e._zod.def.shape,o={...r};if(n)for(let i in n){if(!(i in r))throw new Error(`Unrecognized key: "${i}"`);n[i]&&(o[i]=t?new t({type:"optional",innerType:r[i]}):r[i])}else for(let i in r)o[i]=t?new t({type:"optional",innerType:r[i]}):r[i];return yn(e,{...e._zod.def,shape:o,checks:[]})}function hA(t,e,n){let r=e._zod.def.shape,o={...r};if(n)for(let i in n){if(!(i in o))throw new Error(`Unrecognized key: "${i}"`);n[i]&&(o[i]=new t({type:"nonoptional",innerType:r[i]}))}else for(let i in r)o[i]=new t({type:"nonoptional",innerType:r[i]});return yn(e,{...e._zod.def,shape:o,checks:[]})}function yo(t,e=0){var n;for(let r=e;r<t.issues.length;r++)if(((n=t.issues[r])==null?void 0:n.continue)!==!0)return!0;return!1}function Jn(t,e){return e.map(n=>{var r;return(r=n).path??(r.path=[]),n.path.unshift(t),n})}function rs(t){return typeof t=="string"?t:t==null?void 0:t.message}function Nn(t,e,n){var o,i,s,a,c,l;let r={...t,path:t.path??[]};if(!t.message){let p=rs((s=(i=(o=t.inst)==null?void 0:o._zod.def)==null?void 0:i.error)==null?void 0:s.call(i,t))??rs((a=e==null?void 0:e.error)==null?void 0:a.call(e,t))??rs((c=n.customError)==null?void 0:c.call(n,t))??rs((l=n.localeError)==null?void 0:l.call(n,t))??"Invalid input";r.message=p}return delete r.inst,delete r.continue,e!=null&&e.reportInput||delete r.input,r}function Ay(t){return t instanceof Set?"set":t instanceof Map?"map":t instanceof File?"file":"unknown"}function cs(t){return Array.isArray(t)?"array":typeof t=="string"?"string":"unknown"}function zu(...t){let[e,n,r]=t;return typeof e=="string"?{message:e,code:"custom",input:n,inst:r}:{...e}}function gA(t){return Object.entries(t).filter(([e,n])=>Number.isNaN(Number.parseInt(e,10))).map(e=>e[1])}var Eu=class{constructor(...e){}};var Iy=(t,e)=>{t.name="$ZodError",Object.defineProperty(t,"_zod",{value:t._zod,enumerable:!1}),Object.defineProperty(t,"issues",{value:e,enumerable:!1}),Object.defineProperty(t,"message",{get(){return JSON.stringify(e,$u,2)},enumerable:!0}),Object.defineProperty(t,"toString",{value:()=>t.message,enumerable:!1})},Ba=I("$ZodError",Iy),ls=I("$ZodError",Iy,{Parent:Error});function Nu(t,e=n=>n.message){let n={},r=[];for(let o of t.issues)o.path.length>0?(n[o.path[0]]=n[o.path[0]]||[],n[o.path[0]].push(e(o))):r.push(e(o));return{formErrors:r,fieldErrors:n}}function ju(t,e){let n=e||function(i){return i.message},r={_errors:[]},o=i=>{for(let s of i.issues)if(s.code==="invalid_union"&&s.errors.length)s.errors.map(a=>o({issues:a}));else if(s.code==="invalid_key")o({issues:s.issues});else if(s.code==="invalid_element")o({issues:s.issues});else if(s.path.length===0)r._errors.push(n(s));else{let a=r,c=0;for(;c<s.path.length;){let l=s.path[c];c===s.path.length-1?(a[l]=a[l]||{_errors:[]},a[l]._errors.push(n(s))):a[l]=a[l]||{_errors:[]},a=a[l],c++}}};return o(t),r}var Lu=t=>(e,n,r,o)=>{let i=r?Object.assign(r,{async:!1}):{async:!1},s=e._zod.run({value:n,issues:[]},i);if(s instanceof Promise)throw new fr;if(s.issues.length){let a=new((o==null?void 0:o.Err)??t)(s.issues.map(c=>Nn(c,i,gn())));throw qa(a,o==null?void 0:o.callee),a}return s.value},Du=Lu(ls),Mu=t=>async(e,n,r,o)=>{let i=r?Object.assign(r,{async:!0}):{async:!0},s=e._zod.run({value:n,issues:[]},i);if(s instanceof Promise&&(s=await s),s.issues.length){let a=new((o==null?void 0:o.Err)??t)(s.issues.map(c=>Nn(c,i,gn())));throw qa(a,o==null?void 0:o.callee),a}return s.value},Fu=Mu(ls),Uu=t=>(e,n,r)=>{let o=r?{...r,async:!1}:{async:!1},i=e._zod.run({value:n,issues:[]},o);if(i instanceof Promise)throw new fr;return i.issues.length?{success:!1,error:new(t??Ba)(i.issues.map(s=>Nn(s,o,gn())))}:{success:!0,data:i.value}},xo=Uu(ls),qu=t=>async(e,n,r)=>{let o=r?Object.assign(r,{async:!0}):{async:!0},i=e._zod.run({value:n,issues:[]},o);return i instanceof Promise&&(i=await i),i.issues.length?{success:!1,error:new t(i.issues.map(s=>Nn(s,o,gn())))}:{success:!0,data:i.value}},vo=qu(ls);var Cy=/^[cC][^\s-]{8,}$/,Py=/^[0-9a-z]+$/,Oy=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,zy=/^[0-9a-vA-V]{20}$/,Ny=/^[A-Za-z0-9]{27}$/,jy=/^[a-zA-Z0-9_-]{21}$/,Ly=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/;var Dy=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Zu=t=>t?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${t}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$/;var My=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/;var xA="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function Fy(){return new RegExp(xA,"u")}var Uy=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,qy=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})$/,Zy=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,By=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Hy=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Bu=/^[A-Za-z0-9_-]*$/,Vy=/^([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+$/;var Gy=/^\+(?:[0-9]){6,14}[0-9]$/,Wy="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",Ky=new RegExp(`^${Wy}$`);function Jy(t){let e="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof t.precision=="number"?t.precision===-1?`${e}`:t.precision===0?`${e}:[0-5]\\d`:`${e}:[0-5]\\d\\.\\d{${t.precision}}`:`${e}(?::[0-5]\\d(?:\\.\\d+)?)?`}function Yy(t){return new RegExp(`^${Jy(t)}$`)}function Xy(t){let e=Jy({precision:t.precision}),n=["Z"];t.local&&n.push(""),t.offset&&n.push("([+-]\\d{2}:\\d{2})");let r=`${e}(?:${n.join("|")})`;return new RegExp(`^${Wy}T(?:${r})$`)}var Qy=t=>{let e=t?`[\\s\\S]{${(t==null?void 0:t.minimum)??0},${(t==null?void 0:t.maximum)??""}}`:"[\\s\\S]*";return new RegExp(`^${e}$`)};var ex=/^\d+$/,tx=/^-?\d+(?:\.\d+)?/i,nx=/true|false/i,rx=/null/i;var ox=/^[^A-Z]*$/,ix=/^[^a-z]*$/;var jt=I("$ZodCheck",(t,e)=>{var n;t._zod??(t._zod={}),t._zod.def=e,(n=t._zod).onattach??(n.onattach=[])}),sx={number:"number",bigint:"bigint",object:"date"},Hu=I("$ZodCheckLessThan",(t,e)=>{jt.init(t,e);let n=sx[typeof e.value];t._zod.onattach.push(r=>{let o=r._zod.bag,i=(e.inclusive?o.maximum:o.exclusiveMaximum)??Number.POSITIVE_INFINITY;e.value<i&&(e.inclusive?o.maximum=e.value:o.exclusiveMaximum=e.value)}),t._zod.check=r=>{(e.inclusive?r.value<=e.value:r.value<e.value)||r.issues.push({origin:n,code:"too_big",maximum:e.value,input:r.value,inclusive:e.inclusive,inst:t,continue:!e.abort})}}),Vu=I("$ZodCheckGreaterThan",(t,e)=>{jt.init(t,e);let n=sx[typeof e.value];t._zod.onattach.push(r=>{let o=r._zod.bag,i=(e.inclusive?o.minimum:o.exclusiveMinimum)??Number.NEGATIVE_INFINITY;e.value>i&&(e.inclusive?o.minimum=e.value:o.exclusiveMinimum=e.value)}),t._zod.check=r=>{(e.inclusive?r.value>=e.value:r.value>e.value)||r.issues.push({origin:n,code:"too_small",minimum:e.value,input:r.value,inclusive:e.inclusive,inst:t,continue:!e.abort})}}),ax=I("$ZodCheckMultipleOf",(t,e)=>{jt.init(t,e),t._zod.onattach.push(n=>{var r;(r=n._zod.bag).multipleOf??(r.multipleOf=e.value)}),t._zod.check=n=>{if(typeof n.value!=typeof e.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof n.value=="bigint"?n.value%e.value===BigInt(0):Ru(n.value,e.value)===0)||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:e.value,input:n.value,inst:t,continue:!e.abort})}}),cx=I("$ZodCheckNumberFormat",(t,e)=>{var s;jt.init(t,e),e.format=e.format||"float64";let n=(s=e.format)==null?void 0:s.includes("int"),r=n?"int":"number",[o,i]=Ou[e.format];t._zod.onattach.push(a=>{let c=a._zod.bag;c.format=e.format,c.minimum=o,c.maximum=i,n&&(c.pattern=ex)}),t._zod.check=a=>{let c=a.value;if(n){if(!Number.isInteger(c)){a.issues.push({expected:r,format:e.format,code:"invalid_type",input:c,inst:t});return}if(!Number.isSafeInteger(c)){c>0?a.issues.push({input:c,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:t,origin:r,continue:!e.abort}):a.issues.push({input:c,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:t,origin:r,continue:!e.abort});return}}c<o&&a.issues.push({origin:"number",input:c,code:"too_small",minimum:o,inclusive:!0,inst:t,continue:!e.abort}),c>i&&a.issues.push({origin:"number",input:c,code:"too_big",maximum:i,inst:t})}});var lx=I("$ZodCheckMaxLength",(t,e)=>{var n;jt.init(t,e),(n=t._zod.def).when??(n.when=r=>{let o=r.value;return!ss(o)&&o.length!==void 0}),t._zod.onattach.push(r=>{let o=r._zod.bag.maximum??Number.POSITIVE_INFINITY;e.maximum<o&&(r._zod.bag.maximum=e.maximum)}),t._zod.check=r=>{let o=r.value;if(o.length<=e.maximum)return;let s=cs(o);r.issues.push({origin:s,code:"too_big",maximum:e.maximum,inclusive:!0,input:o,inst:t,continue:!e.abort})}}),ux=I("$ZodCheckMinLength",(t,e)=>{var n;jt.init(t,e),(n=t._zod.def).when??(n.when=r=>{let o=r.value;return!ss(o)&&o.length!==void 0}),t._zod.onattach.push(r=>{let o=r._zod.bag.minimum??Number.NEGATIVE_INFINITY;e.minimum>o&&(r._zod.bag.minimum=e.minimum)}),t._zod.check=r=>{let o=r.value;if(o.length>=e.minimum)return;let s=cs(o);r.issues.push({origin:s,code:"too_small",minimum:e.minimum,inclusive:!0,input:o,inst:t,continue:!e.abort})}}),px=I("$ZodCheckLengthEquals",(t,e)=>{var n;jt.init(t,e),(n=t._zod.def).when??(n.when=r=>{let o=r.value;return!ss(o)&&o.length!==void 0}),t._zod.onattach.push(r=>{let o=r._zod.bag;o.minimum=e.length,o.maximum=e.length,o.length=e.length}),t._zod.check=r=>{let o=r.value,i=o.length;if(i===e.length)return;let s=cs(o),a=i>e.length;r.issues.push({origin:s,...a?{code:"too_big",maximum:e.length}:{code:"too_small",minimum:e.length},inclusive:!0,exact:!0,input:r.value,inst:t,continue:!e.abort})}}),us=I("$ZodCheckStringFormat",(t,e)=>{var n,r;jt.init(t,e),t._zod.onattach.push(o=>{let i=o._zod.bag;i.format=e.format,e.pattern&&(i.patterns??(i.patterns=new Set),i.patterns.add(e.pattern))}),e.pattern?(n=t._zod).check??(n.check=o=>{e.pattern.lastIndex=0,!e.pattern.test(o.value)&&o.issues.push({origin:"string",code:"invalid_format",format:e.format,input:o.value,...e.pattern?{pattern:e.pattern.toString()}:{},inst:t,continue:!e.abort})}):(r=t._zod).check??(r.check=()=>{})}),dx=I("$ZodCheckRegex",(t,e)=>{us.init(t,e),t._zod.check=n=>{e.pattern.lastIndex=0,!e.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:e.pattern.toString(),inst:t,continue:!e.abort})}}),fx=I("$ZodCheckLowerCase",(t,e)=>{e.pattern??(e.pattern=ox),us.init(t,e)}),mx=I("$ZodCheckUpperCase",(t,e)=>{e.pattern??(e.pattern=ix),us.init(t,e)}),hx=I("$ZodCheckIncludes",(t,e)=>{jt.init(t,e);let n=Er(e.includes),r=new RegExp(typeof e.position=="number"?`^.{${e.position}}${n}`:n);e.pattern=r,t._zod.onattach.push(o=>{let i=o._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(r)}),t._zod.check=o=>{o.value.includes(e.includes,e.position)||o.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:e.includes,input:o.value,inst:t,continue:!e.abort})}}),gx=I("$ZodCheckStartsWith",(t,e)=>{jt.init(t,e);let n=new RegExp(`^${Er(e.prefix)}.*`);e.pattern??(e.pattern=n),t._zod.onattach.push(r=>{let o=r._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(n)}),t._zod.check=r=>{r.value.startsWith(e.prefix)||r.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:e.prefix,input:r.value,inst:t,continue:!e.abort})}}),yx=I("$ZodCheckEndsWith",(t,e)=>{jt.init(t,e);let n=new RegExp(`.*${Er(e.suffix)}$`);e.pattern??(e.pattern=n),t._zod.onattach.push(r=>{let o=r._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(n)}),t._zod.check=r=>{r.value.endsWith(e.suffix)||r.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:e.suffix,input:r.value,inst:t,continue:!e.abort})}});var xx=I("$ZodCheckOverwrite",(t,e)=>{jt.init(t,e),t._zod.check=n=>{n.value=e.tx(n.value)}});var Va=class{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),this.indent-=1}write(e){if(typeof e=="function"){e(this,{execution:"sync"}),e(this,{execution:"async"});return}let r=e.split(`
|
|
22
|
+
`).filter(s=>s),o=Math.min(...r.map(s=>s.length-s.trimStart().length)),i=r.map(s=>s.slice(o)).map(s=>" ".repeat(this.indent*2)+s);for(let s of i)this.content.push(s)}compile(){let e=Function,n=this==null?void 0:this.args,o=[...((this==null?void 0:this.content)??[""]).map(i=>` ${i}`)];return new e(...n,o.join(`
|
|
23
|
+
`))}};var bx={major:4,minor:0,patch:0};var Ke=I("$ZodType",(t,e)=>{var o;var n;t??(t={}),t._zod.def=e,t._zod.bag=t._zod.bag||{},t._zod.version=bx;let r=[...t._zod.def.checks??[]];t._zod.traits.has("$ZodCheck")&&r.unshift(t);for(let i of r)for(let s of i._zod.onattach)s(t);if(r.length===0)(n=t._zod).deferred??(n.deferred=[]),(o=t._zod.deferred)==null||o.push(()=>{t._zod.run=t._zod.parse});else{let i=(s,a,c)=>{let l=yo(s),p;for(let d of a){if(d._zod.def.when){if(!d._zod.def.when(s))continue}else if(l)continue;let f=s.issues.length,h=d._zod.check(s);if(h instanceof Promise&&(c==null?void 0:c.async)===!1)throw new fr;if(p||h instanceof Promise)p=(p??Promise.resolve()).then(async()=>{await h,s.issues.length!==f&&(l||(l=yo(s,f)))});else{if(s.issues.length===f)continue;l||(l=yo(s,f))}}return p?p.then(()=>s):s};t._zod.run=(s,a)=>{let c=t._zod.parse(s,a);if(c instanceof Promise){if(a.async===!1)throw new fr;return c.then(l=>i(l,r,a))}return i(c,r,a)}}t["~standard"]={validate:i=>{var s;try{let a=xo(t,i);return a.success?{value:a.data}:{issues:(s=a.error)==null?void 0:s.issues}}catch{return vo(t,i).then(c=>{var l;return c.success?{value:c.data}:{issues:(l=c.error)==null?void 0:l.issues}})}},vendor:"zod",version:1}}),ps=I("$ZodString",(t,e)=>{var n;Ke.init(t,e),t._zod.pattern=[...((n=t==null?void 0:t._zod.bag)==null?void 0:n.patterns)??[]].pop()??Qy(t._zod.bag),t._zod.parse=(r,o)=>{if(e.coerce)try{r.value=String(r.value)}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:t}),r}}),tt=I("$ZodStringFormat",(t,e)=>{us.init(t,e),ps.init(t,e)}),Wu=I("$ZodGUID",(t,e)=>{e.pattern??(e.pattern=Dy),tt.init(t,e)}),Ku=I("$ZodUUID",(t,e)=>{if(e.version){let r={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[e.version];if(r===void 0)throw new Error(`Invalid UUID version: "${e.version}"`);e.pattern??(e.pattern=Zu(r))}else e.pattern??(e.pattern=Zu());tt.init(t,e)}),Ju=I("$ZodEmail",(t,e)=>{e.pattern??(e.pattern=My),tt.init(t,e)}),Yu=I("$ZodURL",(t,e)=>{tt.init(t,e),t._zod.check=n=>{try{let r=n.value,o=new URL(r),i=o.href;e.hostname&&(e.hostname.lastIndex=0,e.hostname.test(o.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:Vy.source,input:n.value,inst:t,continue:!e.abort})),e.protocol&&(e.protocol.lastIndex=0,e.protocol.test(o.protocol.endsWith(":")?o.protocol.slice(0,-1):o.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:e.protocol.source,input:n.value,inst:t,continue:!e.abort})),!r.endsWith("/")&&i.endsWith("/")?n.value=i.slice(0,-1):n.value=i;return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:t,continue:!e.abort})}}}),Xu=I("$ZodEmoji",(t,e)=>{e.pattern??(e.pattern=Fy()),tt.init(t,e)}),Qu=I("$ZodNanoID",(t,e)=>{e.pattern??(e.pattern=jy),tt.init(t,e)}),ep=I("$ZodCUID",(t,e)=>{e.pattern??(e.pattern=Cy),tt.init(t,e)}),tp=I("$ZodCUID2",(t,e)=>{e.pattern??(e.pattern=Py),tt.init(t,e)}),np=I("$ZodULID",(t,e)=>{e.pattern??(e.pattern=Oy),tt.init(t,e)}),rp=I("$ZodXID",(t,e)=>{e.pattern??(e.pattern=zy),tt.init(t,e)}),op=I("$ZodKSUID",(t,e)=>{e.pattern??(e.pattern=Ny),tt.init(t,e)}),Ix=I("$ZodISODateTime",(t,e)=>{e.pattern??(e.pattern=Xy(e)),tt.init(t,e)}),Cx=I("$ZodISODate",(t,e)=>{e.pattern??(e.pattern=Ky),tt.init(t,e)}),Px=I("$ZodISOTime",(t,e)=>{e.pattern??(e.pattern=Yy(e)),tt.init(t,e)}),Ox=I("$ZodISODuration",(t,e)=>{e.pattern??(e.pattern=Ly),tt.init(t,e)}),ip=I("$ZodIPv4",(t,e)=>{e.pattern??(e.pattern=Uy),tt.init(t,e),t._zod.onattach.push(n=>{let r=n._zod.bag;r.format="ipv4"})}),sp=I("$ZodIPv6",(t,e)=>{e.pattern??(e.pattern=qy),tt.init(t,e),t._zod.onattach.push(n=>{let r=n._zod.bag;r.format="ipv6"}),t._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:t,continue:!e.abort})}}}),ap=I("$ZodCIDRv4",(t,e)=>{e.pattern??(e.pattern=Zy),tt.init(t,e)}),cp=I("$ZodCIDRv6",(t,e)=>{e.pattern??(e.pattern=By),tt.init(t,e),t._zod.check=n=>{let[r,o]=n.value.split("/");try{if(!o)throw new Error;let i=Number(o);if(`${i}`!==o)throw new Error;if(i<0||i>128)throw new Error;new URL(`http://[${r}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:t,continue:!e.abort})}}});function zx(t){if(t==="")return!0;if(t.length%4!==0)return!1;try{return atob(t),!0}catch{return!1}}var lp=I("$ZodBase64",(t,e)=>{e.pattern??(e.pattern=Hy),tt.init(t,e),t._zod.onattach.push(n=>{n._zod.bag.contentEncoding="base64"}),t._zod.check=n=>{zx(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:t,continue:!e.abort})}});function vA(t){if(!Bu.test(t))return!1;let e=t.replace(/[-_]/g,r=>r==="-"?"+":"/"),n=e.padEnd(Math.ceil(e.length/4)*4,"=");return zx(n)}var up=I("$ZodBase64URL",(t,e)=>{e.pattern??(e.pattern=Bu),tt.init(t,e),t._zod.onattach.push(n=>{n._zod.bag.contentEncoding="base64url"}),t._zod.check=n=>{vA(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:t,continue:!e.abort})}}),pp=I("$ZodE164",(t,e)=>{e.pattern??(e.pattern=Gy),tt.init(t,e)});function bA(t,e=null){try{let n=t.split(".");if(n.length!==3)return!1;let[r]=n;if(!r)return!1;let o=JSON.parse(atob(r));return!("typ"in o&&(o==null?void 0:o.typ)!=="JWT"||!o.alg||e&&(!("alg"in o)||o.alg!==e))}catch{return!1}}var dp=I("$ZodJWT",(t,e)=>{tt.init(t,e),t._zod.check=n=>{bA(n.value,e.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:t,continue:!e.abort})}});var Wa=I("$ZodNumber",(t,e)=>{Ke.init(t,e),t._zod.pattern=t._zod.bag.pattern??tx,t._zod.parse=(n,r)=>{if(e.coerce)try{n.value=Number(n.value)}catch{}let o=n.value;if(typeof o=="number"&&!Number.isNaN(o)&&Number.isFinite(o))return n;let i=typeof o=="number"?Number.isNaN(o)?"NaN":Number.isFinite(o)?void 0:"Infinity":void 0;return n.issues.push({expected:"number",code:"invalid_type",input:o,inst:t,...i?{received:i}:{}}),n}}),fp=I("$ZodNumber",(t,e)=>{cx.init(t,e),Wa.init(t,e)}),mp=I("$ZodBoolean",(t,e)=>{Ke.init(t,e),t._zod.pattern=nx,t._zod.parse=(n,r)=>{if(e.coerce)try{n.value=!!n.value}catch{}let o=n.value;return typeof o=="boolean"||n.issues.push({expected:"boolean",code:"invalid_type",input:o,inst:t}),n}});var hp=I("$ZodNull",(t,e)=>{Ke.init(t,e),t._zod.pattern=rx,t._zod.values=new Set([null]),t._zod.parse=(n,r)=>{let o=n.value;return o===null||n.issues.push({expected:"null",code:"invalid_type",input:o,inst:t}),n}});var gp=I("$ZodUnknown",(t,e)=>{Ke.init(t,e),t._zod.parse=n=>n}),yp=I("$ZodNever",(t,e)=>{Ke.init(t,e),t._zod.parse=(n,r)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:t}),n)});function _x(t,e,n){t.issues.length&&e.issues.push(...Jn(n,t.issues)),e.value[n]=t.value}var xp=I("$ZodArray",(t,e)=>{Ke.init(t,e),t._zod.parse=(n,r)=>{let o=n.value;if(!Array.isArray(o))return n.issues.push({expected:"array",code:"invalid_type",input:o,inst:t}),n;n.value=Array(o.length);let i=[];for(let s=0;s<o.length;s++){let a=o[s],c=e.element._zod.run({value:a,issues:[]},r);c instanceof Promise?i.push(c.then(l=>_x(l,n,s))):_x(c,n,s)}return i.length?Promise.all(i).then(()=>n):n}});function Ga(t,e,n){t.issues.length&&e.issues.push(...Jn(n,t.issues)),e.value[n]=t.value}function wx(t,e,n,r){t.issues.length?r[n]===void 0?n in r?e.value[n]=void 0:e.value[n]=t.value:e.issues.push(...Jn(n,t.issues)):t.value===void 0?n in r&&(e.value[n]=void 0):e.value[n]=t.value}var Ka=I("$ZodObject",(t,e)=>{Ke.init(t,e);let n=is(()=>{let d=Object.keys(e.shape);for(let h of d)if(!(e.shape[h]instanceof Ke))throw new Error(`Invalid element at key "${h}": expected a Zod schema`);let f=Pu(e.shape);return{shape:e.shape,keys:d,keySet:new Set(d),numKeys:d.length,optionalKeys:new Set(f)}});et(t._zod,"propValues",()=>{let d=e.shape,f={};for(let h in d){let y=d[h]._zod;if(y.values){f[h]??(f[h]=new Set);for(let v of y.values)f[h].add(v)}}return f});let r=d=>{let f=new Va(["shape","payload","ctx"]),h=n.value,y=b=>{let w=go(b);return`shape[${w}]._zod.run({ value: input[${w}], issues: [] }, ctx)`};f.write("const input = payload.value;");let v=Object.create(null),x=0;for(let b of h.keys)v[b]=`key_${x++}`;f.write("const newResult = {}");for(let b of h.keys)if(h.optionalKeys.has(b)){let w=v[b];f.write(`const ${w} = ${y(b)};`);let k=go(b);f.write(`
|
|
24
24
|
if (${w}.issues.length) {
|
|
25
|
-
if (input[${
|
|
26
|
-
if (${
|
|
27
|
-
newResult[${
|
|
25
|
+
if (input[${k}] === undefined) {
|
|
26
|
+
if (${k} in input) {
|
|
27
|
+
newResult[${k}] = undefined;
|
|
28
28
|
}
|
|
29
29
|
} else {
|
|
30
30
|
payload.issues = payload.issues.concat(
|
|
31
31
|
${w}.issues.map((iss) => ({
|
|
32
32
|
...iss,
|
|
33
|
-
path: iss.path ? [${
|
|
33
|
+
path: iss.path ? [${k}, ...iss.path] : [${k}],
|
|
34
34
|
}))
|
|
35
35
|
);
|
|
36
36
|
}
|
|
37
37
|
} else if (${w}.value === undefined) {
|
|
38
|
-
if (${
|
|
38
|
+
if (${k} in input) newResult[${k}] = undefined;
|
|
39
39
|
} else {
|
|
40
|
-
newResult[${
|
|
40
|
+
newResult[${k}] = ${w}.value;
|
|
41
41
|
}
|
|
42
|
-
`)}else{let w=v[
|
|
42
|
+
`)}else{let w=v[b];f.write(`const ${w} = ${y(b)};`),f.write(`
|
|
43
43
|
if (${w}.issues.length) payload.issues = payload.issues.concat(${w}.issues.map(iss => ({
|
|
44
44
|
...iss,
|
|
45
|
-
path: iss.path ? [${
|
|
46
|
-
})));`),f.write(`newResult[${fo(_)}] = ${w}.value`)}f.write("payload.value = newResult;"),f.write("return payload;");let g=f.compile();return(_,w)=>g(d,_,w)},o,i=Xo,s=!Ca.jitless,c=s&&ku.value,l=e.catchall,p;t._zod.parse=(d,f)=>{p??(p=r.value);let m=d.value;if(!i(m))return d.issues.push({expected:"object",code:"invalid_type",input:m,inst:t}),d;let y=[];if(s&&c&&(f==null?void 0:f.async)===!1&&f.jitless!==!0)o||(o=n(e.shape)),d=o(d,f);else{d.value={};let w=p.shape;for(let $ of p.keys){let E=w[$],Z=E._zod.run({value:m[$],issues:[]},f),q=E._zod.optin==="optional"&&E._zod.optout==="optional";Z instanceof Promise?y.push(Z.then($e=>q?hx($e,d,$,m):qa($e,d,$))):q?hx(Z,d,$,m):qa(Z,d,$)}}if(!l)return y.length?Promise.all(y).then(()=>d):d;let v=[],x=p.keySet,g=l._zod,_=g.def.type;for(let w of Object.keys(m)){if(x.has(w))continue;if(_==="never"){v.push(w);continue}let $=g.run({value:m[w],issues:[]},f);$ instanceof Promise?y.push($.then(E=>qa(E,d,w))):qa($,d,w)}return v.length&&d.issues.push({code:"unrecognized_keys",keys:v,input:m,inst:t}),y.length?Promise.all(y).then(()=>d):d}});function gx(t,e,r,n){for(let o of t)if(o.issues.length===0)return e.value=o.value,e;return e.issues.push({code:"invalid_union",input:e.value,inst:r,errors:t.map(o=>o.issues.map(i=>jr(i,n,hr())))}),e}var Za=A("$ZodUnion",(t,e)=>{We.init(t,e),et(t._zod,"optin",()=>e.options.some(r=>r._zod.optin==="optional")?"optional":void 0),et(t._zod,"optout",()=>e.options.some(r=>r._zod.optout==="optional")?"optional":void 0),et(t._zod,"values",()=>{if(e.options.every(r=>r._zod.values))return new Set(e.options.flatMap(r=>Array.from(r._zod.values)))}),et(t._zod,"pattern",()=>{if(e.options.every(r=>r._zod.pattern)){let r=e.options.map(n=>n._zod.pattern);return new RegExp(`^(${r.map(n=>rs(n.source)).join("|")})$`)}}),t._zod.parse=(r,n)=>{let o=!1,i=[];for(let s of e.options){let a=s._zod.run({value:r.value,issues:[]},n);if(a instanceof Promise)i.push(a),o=!0;else{if(a.issues.length===0)return a;i.push(a)}}return o?Promise.all(i).then(s=>gx(s,r,t,n)):gx(i,r,t,n)}}),fp=A("$ZodDiscriminatedUnion",(t,e)=>{Za.init(t,e);let r=t._zod.parse;et(t._zod,"propValues",()=>{let o={};for(let i of e.options){let s=i._zod.propValues;if(!s||Object.keys(s).length===0)throw new Error(`Invalid discriminated union option at index "${e.options.indexOf(i)}"`);for(let[a,c]of Object.entries(s)){o[a]||(o[a]=new Set);for(let l of c)o[a].add(l)}}return o});let n=es(()=>{let o=e.options,i=new Map;for(let s of o){let a=s._zod.propValues[e.discriminator];if(!a||a.size===0)throw new Error(`Invalid discriminated union option at index "${e.options.indexOf(s)}"`);for(let c of a){if(i.has(c))throw new Error(`Duplicate discriminator value "${String(c)}"`);i.set(c,s)}}return i});t._zod.parse=(o,i)=>{let s=o.value;if(!Xo(s))return o.issues.push({code:"invalid_type",expected:"object",input:s,inst:t}),o;let a=n.value.get(s==null?void 0:s[e.discriminator]);return a?a._zod.run(o,i):e.unionFallback?r(o,i):(o.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",input:s,path:[e.discriminator],inst:t}),o)}}),mp=A("$ZodIntersection",(t,e)=>{We.init(t,e),t._zod.parse=(r,n)=>{let o=r.value,i=e.left._zod.run({value:o,issues:[]},n),s=e.right._zod.run({value:o,issues:[]},n);return i instanceof Promise||s instanceof Promise?Promise.all([i,s]).then(([c,l])=>yx(r,c,l)):yx(r,i,s)}});function Fu(t,e){if(t===e)return{valid:!0,data:t};if(t instanceof Date&&e instanceof Date&&+t==+e)return{valid:!0,data:t};if(Qo(t)&&Qo(e)){let r=Object.keys(e),n=Object.keys(t).filter(i=>r.indexOf(i)!==-1),o={...t,...e};for(let i of n){let s=Fu(t[i],e[i]);if(!s.valid)return{valid:!1,mergeErrorPath:[i,...s.mergeErrorPath]};o[i]=s.data}return{valid:!0,data:o}}if(Array.isArray(t)&&Array.isArray(e)){if(t.length!==e.length)return{valid:!1,mergeErrorPath:[]};let r=[];for(let n=0;n<t.length;n++){let o=t[n],i=e[n],s=Fu(o,i);if(!s.valid)return{valid:!1,mergeErrorPath:[n,...s.mergeErrorPath]};r.push(s.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}function yx(t,e,r){if(e.issues.length&&t.issues.push(...e.issues),r.issues.length&&t.issues.push(...r.issues),mo(t))return t;let n=Fu(e.value,r.value);if(!n.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(n.mergeErrorPath)}`);return t.value=n.data,t}var hp=A("$ZodRecord",(t,e)=>{We.init(t,e),t._zod.parse=(r,n)=>{let o=r.value;if(!Qo(o))return r.issues.push({expected:"record",code:"invalid_type",input:o,inst:t}),r;let i=[];if(e.keyType._zod.values){let s=e.keyType._zod.values;r.value={};for(let c of s)if(typeof c=="string"||typeof c=="number"||typeof c=="symbol"){let l=e.valueType._zod.run({value:o[c],issues:[]},n);l instanceof Promise?i.push(l.then(p=>{p.issues.length&&r.issues.push(...Xr(c,p.issues)),r.value[c]=p.value})):(l.issues.length&&r.issues.push(...Xr(c,l.issues)),r.value[c]=l.value)}let a;for(let c in o)s.has(c)||(a=a??[],a.push(c));a&&a.length>0&&r.issues.push({code:"unrecognized_keys",input:o,inst:t,keys:a})}else{r.value={};for(let s of Reflect.ownKeys(o)){if(s==="__proto__")continue;let a=e.keyType._zod.run({value:s,issues:[]},n);if(a instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(a.issues.length){r.issues.push({origin:"record",code:"invalid_key",issues:a.issues.map(l=>jr(l,n,hr())),input:s,path:[s],inst:t}),r.value[a.value]=a.value;continue}let c=e.valueType._zod.run({value:o[s],issues:[]},n);c instanceof Promise?i.push(c.then(l=>{l.issues.length&&r.issues.push(...Xr(s,l.issues)),r.value[a.value]=l.value})):(c.issues.length&&r.issues.push(...Xr(s,c.issues)),r.value[a.value]=c.value)}}return i.length?Promise.all(i).then(()=>r):r}});var gp=A("$ZodEnum",(t,e)=>{We.init(t,e);let r=Qi(e.entries);t._zod.values=new Set(r),t._zod.pattern=new RegExp(`^(${r.filter(n=>$u.has(typeof n)).map(n=>typeof n=="string"?En(n):n.toString()).join("|")})$`),t._zod.parse=(n,o)=>{let i=n.value;return t._zod.values.has(i)||n.issues.push({code:"invalid_value",values:r,input:i,inst:t}),n}}),yp=A("$ZodLiteral",(t,e)=>{We.init(t,e),t._zod.values=new Set(e.values),t._zod.pattern=new RegExp(`^(${e.values.map(r=>typeof r=="string"?En(r):r?r.toString():String(r)).join("|")})$`),t._zod.parse=(r,n)=>{let o=r.value;return t._zod.values.has(o)||r.issues.push({code:"invalid_value",values:e.values,input:o,inst:t}),r}});var xp=A("$ZodTransform",(t,e)=>{We.init(t,e),t._zod.parse=(r,n)=>{let o=e.transform(r.value,r);if(n.async)return(o instanceof Promise?o:Promise.resolve(o)).then(s=>(r.value=s,r));if(o instanceof Promise)throw new hn;return r.value=o,r}}),vp=A("$ZodOptional",(t,e)=>{We.init(t,e),t._zod.optin="optional",t._zod.optout="optional",et(t._zod,"values",()=>e.innerType._zod.values?new Set([...e.innerType._zod.values,void 0]):void 0),et(t._zod,"pattern",()=>{let r=e.innerType._zod.pattern;return r?new RegExp(`^(${rs(r.source)})?$`):void 0}),t._zod.parse=(r,n)=>e.innerType._zod.optin==="optional"?e.innerType._zod.run(r,n):r.value===void 0?r:e.innerType._zod.run(r,n)}),bp=A("$ZodNullable",(t,e)=>{We.init(t,e),et(t._zod,"optin",()=>e.innerType._zod.optin),et(t._zod,"optout",()=>e.innerType._zod.optout),et(t._zod,"pattern",()=>{let r=e.innerType._zod.pattern;return r?new RegExp(`^(${rs(r.source)}|null)$`):void 0}),et(t._zod,"values",()=>e.innerType._zod.values?new Set([...e.innerType._zod.values,null]):void 0),t._zod.parse=(r,n)=>r.value===null?r:e.innerType._zod.run(r,n)}),_p=A("$ZodDefault",(t,e)=>{We.init(t,e),t._zod.optin="optional",et(t._zod,"values",()=>e.innerType._zod.values),t._zod.parse=(r,n)=>{if(r.value===void 0)return r.value=e.defaultValue,r;let o=e.innerType._zod.run(r,n);return o instanceof Promise?o.then(i=>xx(i,e)):xx(o,e)}});function xx(t,e){return t.value===void 0&&(t.value=e.defaultValue),t}var wp=A("$ZodPrefault",(t,e)=>{We.init(t,e),t._zod.optin="optional",et(t._zod,"values",()=>e.innerType._zod.values),t._zod.parse=(r,n)=>(r.value===void 0&&(r.value=e.defaultValue),e.innerType._zod.run(r,n))}),Sp=A("$ZodNonOptional",(t,e)=>{We.init(t,e),et(t._zod,"values",()=>{let r=e.innerType._zod.values;return r?new Set([...r].filter(n=>n!==void 0)):void 0}),t._zod.parse=(r,n)=>{let o=e.innerType._zod.run(r,n);return o instanceof Promise?o.then(i=>vx(i,t)):vx(o,t)}});function vx(t,e){return!t.issues.length&&t.value===void 0&&t.issues.push({code:"invalid_type",expected:"nonoptional",input:t.value,inst:e}),t}var kp=A("$ZodCatch",(t,e)=>{We.init(t,e),t._zod.optin="optional",et(t._zod,"optout",()=>e.innerType._zod.optout),et(t._zod,"values",()=>e.innerType._zod.values),t._zod.parse=(r,n)=>{let o=e.innerType._zod.run(r,n);return o instanceof Promise?o.then(i=>(r.value=i.value,i.issues.length&&(r.value=e.catchValue({...r,error:{issues:i.issues.map(s=>jr(s,n,hr()))},input:r.value}),r.issues=[]),r)):(r.value=o.value,o.issues.length&&(r.value=e.catchValue({...r,error:{issues:o.issues.map(i=>jr(i,n,hr()))},input:r.value}),r.issues=[]),r)}});var $p=A("$ZodPipe",(t,e)=>{We.init(t,e),et(t._zod,"values",()=>e.in._zod.values),et(t._zod,"optin",()=>e.in._zod.optin),et(t._zod,"optout",()=>e.out._zod.optout),t._zod.parse=(r,n)=>{let o=e.in._zod.run(r,n);return o instanceof Promise?o.then(i=>bx(i,e,n)):bx(o,e,n)}});function bx(t,e,r){return mo(t)?t:e.out._zod.run({value:t.value,issues:t.issues},r)}var Ep=A("$ZodReadonly",(t,e)=>{We.init(t,e),et(t._zod,"propValues",()=>e.innerType._zod.propValues),et(t._zod,"values",()=>e.innerType._zod.values),et(t._zod,"optin",()=>e.innerType._zod.optin),et(t._zod,"optout",()=>e.innerType._zod.optout),t._zod.parse=(r,n)=>{let o=e.innerType._zod.run(r,n);return o instanceof Promise?o.then(_x):_x(o)}});function _x(t){return t.value=Object.freeze(t.value),t}var Tp=A("$ZodCustom",(t,e)=>{jt.init(t,e),We.init(t,e),t._zod.parse=(r,n)=>r,t._zod.check=r=>{let n=r.value,o=e.fn(n);if(o instanceof Promise)return o.then(i=>wx(i,r,n,t));wx(o,r,n,t)}});function wx(t,e,r,n){if(!t){let o={code:"custom",input:r,inst:n,path:[...n._zod.def.path??[]],continue:!n._zod.def.abort};n._zod.def.params&&(o.params=n._zod.def.params),e.issues.push(Ru(o))}}var cP=t=>{let e=typeof t;switch(e){case"number":return Number.isNaN(t)?"NaN":"number";case"object":{if(Array.isArray(t))return"array";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return e},lP=()=>{let t={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"}};function e(n){return t[n]??null}let r={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"};return n=>{switch(n.code){case"invalid_type":return`Invalid input: expected ${n.expected}, received ${cP(n.input)}`;case"invalid_value":return n.values.length===1?`Invalid input: expected ${ja(n.values[0])}`:`Invalid option: expected one of ${Oa(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",i=e(n.origin);return i?`Too big: expected ${n.origin??"value"} to have ${o}${n.maximum.toString()} ${i.unit??"elements"}`:`Too big: expected ${n.origin??"value"} to be ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",i=e(n.origin);return i?`Too small: expected ${n.origin} to have ${o}${n.minimum.toString()} ${i.unit}`:`Too small: expected ${n.origin} to be ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Invalid string: must start with "${o.prefix}"`:o.format==="ends_with"?`Invalid string: must end with "${o.suffix}"`:o.format==="includes"?`Invalid string: must include "${o.includes}"`:o.format==="regex"?`Invalid string: must match pattern ${o.pattern}`:`Invalid ${r[o.format]??n.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${n.divisor}`;case"unrecognized_keys":return`Unrecognized key${n.keys.length>1?"s":""}: ${Oa(n.keys,", ")}`;case"invalid_key":return`Invalid key in ${n.origin}`;case"invalid_union":return"Invalid input";case"invalid_element":return`Invalid value in ${n.origin}`;default:return"Invalid input"}}};function Rx(){return{localeError:lP()}}var uP=Symbol("ZodOutput"),pP=Symbol("ZodInput"),as=class{constructor(){this._map=new Map,this._idmap=new Map}add(e,...r){let n=r[0];if(this._map.set(e,n),n&&typeof n=="object"&&"id"in n){if(this._idmap.has(n.id))throw new Error(`ID ${n.id} already exists in the registry`);this._idmap.set(n.id,e)}return this}clear(){return this._map=new Map,this._idmap=new Map,this}remove(e){let r=this._map.get(e);return r&&typeof r=="object"&&"id"in r&&this._idmap.delete(r.id),this._map.delete(e),this}get(e){let r=e._zod.parent;if(r){let n={...this.get(r)??{}};return delete n.id,{...n,...this._map.get(e)}}return this._map.get(e)}has(e){return this._map.has(e)}};function Px(){return new as}var Tn=Px();function Rp(t,e){return new t({type:"string",...ce(e)})}function Pp(t,e){return new t({type:"string",format:"email",check:"string_format",abort:!1,...ce(e)})}function Ba(t,e){return new t({type:"string",format:"guid",check:"string_format",abort:!1,...ce(e)})}function Ap(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,...ce(e)})}function Ip(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...ce(e)})}function zp(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...ce(e)})}function Cp(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...ce(e)})}function Op(t,e){return new t({type:"string",format:"url",check:"string_format",abort:!1,...ce(e)})}function Np(t,e){return new t({type:"string",format:"emoji",check:"string_format",abort:!1,...ce(e)})}function jp(t,e){return new t({type:"string",format:"nanoid",check:"string_format",abort:!1,...ce(e)})}function Lp(t,e){return new t({type:"string",format:"cuid",check:"string_format",abort:!1,...ce(e)})}function Dp(t,e){return new t({type:"string",format:"cuid2",check:"string_format",abort:!1,...ce(e)})}function Mp(t,e){return new t({type:"string",format:"ulid",check:"string_format",abort:!1,...ce(e)})}function qp(t,e){return new t({type:"string",format:"xid",check:"string_format",abort:!1,...ce(e)})}function Fp(t,e){return new t({type:"string",format:"ksuid",check:"string_format",abort:!1,...ce(e)})}function Up(t,e){return new t({type:"string",format:"ipv4",check:"string_format",abort:!1,...ce(e)})}function Zp(t,e){return new t({type:"string",format:"ipv6",check:"string_format",abort:!1,...ce(e)})}function Bp(t,e){return new t({type:"string",format:"cidrv4",check:"string_format",abort:!1,...ce(e)})}function Hp(t,e){return new t({type:"string",format:"cidrv6",check:"string_format",abort:!1,...ce(e)})}function Vp(t,e){return new t({type:"string",format:"base64",check:"string_format",abort:!1,...ce(e)})}function Gp(t,e){return new t({type:"string",format:"base64url",check:"string_format",abort:!1,...ce(e)})}function Wp(t,e){return new t({type:"string",format:"e164",check:"string_format",abort:!1,...ce(e)})}function Kp(t,e){return new t({type:"string",format:"jwt",check:"string_format",abort:!1,...ce(e)})}function Ax(t,e){return new t({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...ce(e)})}function Ix(t,e){return new t({type:"string",format:"date",check:"string_format",...ce(e)})}function zx(t,e){return new t({type:"string",format:"time",check:"string_format",precision:null,...ce(e)})}function Cx(t,e){return new t({type:"string",format:"duration",check:"string_format",...ce(e)})}function Jp(t,e){return new t({type:"number",checks:[],...ce(e)})}function Yp(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"safeint",...ce(e)})}function Xp(t,e){return new t({type:"boolean",...ce(e)})}function Qp(t,e){return new t({type:"null",...ce(e)})}function ed(t){return new t({type:"unknown"})}function td(t,e){return new t({type:"never",...ce(e)})}function Ha(t,e){return new Mu({check:"less_than",...ce(e),value:t,inclusive:!1})}function cs(t,e){return new Mu({check:"less_than",...ce(e),value:t,inclusive:!0})}function Va(t,e){return new qu({check:"greater_than",...ce(e),value:t,inclusive:!1})}function ls(t,e){return new qu({check:"greater_than",...ce(e),value:t,inclusive:!0})}function Ga(t,e){return new ex({check:"multiple_of",...ce(e),value:t})}function Wa(t,e){return new rx({check:"max_length",...ce(e),maximum:t})}function ei(t,e){return new nx({check:"min_length",...ce(e),minimum:t})}function Ka(t,e){return new ox({check:"length_equals",...ce(e),length:t})}function rd(t,e){return new ix({check:"string_format",format:"regex",...ce(e),pattern:t})}function nd(t){return new sx({check:"string_format",format:"lowercase",...ce(t)})}function od(t){return new ax({check:"string_format",format:"uppercase",...ce(t)})}function id(t,e){return new cx({check:"string_format",format:"includes",...ce(e),includes:t})}function sd(t,e){return new lx({check:"string_format",format:"starts_with",...ce(e),prefix:t})}function ad(t,e){return new ux({check:"string_format",format:"ends_with",...ce(e),suffix:t})}function yo(t){return new px({check:"overwrite",tx:t})}function cd(t){return yo(e=>e.normalize(t))}function ld(){return yo(t=>t.trim())}function ud(){return yo(t=>t.toLowerCase())}function pd(){return yo(t=>t.toUpperCase())}function Ox(t,e,r){return new t({type:"array",element:e,...ce(r)})}function dd(t,e,r){let n=ce(r);return n.abort??(n.abort=!0),new t({type:"custom",check:"custom",fn:e,...n})}function fd(t,e,r){return new t({type:"custom",check:"custom",fn:e,...ce(r)})}var Ja=class{constructor(e){this.counter=0,this.metadataRegistry=(e==null?void 0:e.metadata)??Tn,this.target=(e==null?void 0:e.target)??"draft-2020-12",this.unrepresentable=(e==null?void 0:e.unrepresentable)??"throw",this.override=(e==null?void 0:e.override)??(()=>{}),this.io=(e==null?void 0:e.io)??"output",this.seen=new Map}process(e,r={path:[],schemaPath:[]}){var d,f,m;var n;let o=e._zod.def,i={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},s=this.seen.get(e);if(s)return s.count++,r.schemaPath.includes(e)&&(s.cycle=r.path),s.schema;let a={schema:{},count:1,cycle:void 0,path:r.path};this.seen.set(e,a);let c=(f=(d=e._zod).toJSONSchema)==null?void 0:f.call(d);if(c)a.schema=c;else{let y={...r,schemaPath:[...r.schemaPath,e],path:r.path},v=e._zod.parent;if(v)a.ref=v,this.process(v,y),this.seen.get(v).isParent=!0;else{let x=a.schema;switch(o.type){case"string":{let g=x;g.type="string";let{minimum:_,maximum:w,format:$,patterns:E,contentEncoding:Z}=e._zod.bag;if(typeof _=="number"&&(g.minLength=_),typeof w=="number"&&(g.maxLength=w),$&&(g.format=i[$]??$,g.format===""&&delete g.format),Z&&(g.contentEncoding=Z),E&&E.size>0){let q=[...E];q.length===1?g.pattern=q[0].source:q.length>1&&(a.schema.allOf=[...q.map($e=>({...this.target==="draft-7"?{type:"string"}:{},pattern:$e.source}))])}break}case"number":{let g=x,{minimum:_,maximum:w,format:$,multipleOf:E,exclusiveMaximum:Z,exclusiveMinimum:q}=e._zod.bag;typeof $=="string"&&$.includes("int")?g.type="integer":g.type="number",typeof q=="number"&&(g.exclusiveMinimum=q),typeof _=="number"&&(g.minimum=_,typeof q=="number"&&(q>=_?delete g.minimum:delete g.exclusiveMinimum)),typeof Z=="number"&&(g.exclusiveMaximum=Z),typeof w=="number"&&(g.maximum=w,typeof Z=="number"&&(Z<=w?delete g.maximum:delete g.exclusiveMaximum)),typeof E=="number"&&(g.multipleOf=E);break}case"boolean":{let g=x;g.type="boolean";break}case"bigint":{if(this.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema");break}case"symbol":{if(this.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema");break}case"null":{x.type="null";break}case"any":break;case"unknown":break;case"undefined":{if(this.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema");break}case"void":{if(this.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema");break}case"never":{x.not={};break}case"date":{if(this.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema");break}case"array":{let g=x,{minimum:_,maximum:w}=e._zod.bag;typeof _=="number"&&(g.minItems=_),typeof w=="number"&&(g.maxItems=w),g.type="array",g.items=this.process(o.element,{...y,path:[...y.path,"items"]});break}case"object":{let g=x;g.type="object",g.properties={};let _=o.shape;for(let E in _)g.properties[E]=this.process(_[E],{...y,path:[...y.path,"properties",E]});let w=new Set(Object.keys(_)),$=new Set([...w].filter(E=>{let Z=o.shape[E]._zod;return this.io==="input"?Z.optin===void 0:Z.optout===void 0}));$.size>0&&(g.required=Array.from($)),((m=o.catchall)==null?void 0:m._zod.def.type)==="never"?g.additionalProperties=!1:o.catchall?o.catchall&&(g.additionalProperties=this.process(o.catchall,{...y,path:[...y.path,"additionalProperties"]})):this.io==="output"&&(g.additionalProperties=!1);break}case"union":{let g=x;g.anyOf=o.options.map((_,w)=>this.process(_,{...y,path:[...y.path,"anyOf",w]}));break}case"intersection":{let g=x,_=this.process(o.left,{...y,path:[...y.path,"allOf",0]}),w=this.process(o.right,{...y,path:[...y.path,"allOf",1]}),$=Z=>"allOf"in Z&&Object.keys(Z).length===1,E=[...$(_)?_.allOf:[_],...$(w)?w.allOf:[w]];g.allOf=E;break}case"tuple":{let g=x;g.type="array";let _=o.items.map((E,Z)=>this.process(E,{...y,path:[...y.path,"prefixItems",Z]}));if(this.target==="draft-2020-12"?g.prefixItems=_:g.items=_,o.rest){let E=this.process(o.rest,{...y,path:[...y.path,"items"]});this.target==="draft-2020-12"?g.items=E:g.additionalItems=E}o.rest&&(g.items=this.process(o.rest,{...y,path:[...y.path,"items"]}));let{minimum:w,maximum:$}=e._zod.bag;typeof w=="number"&&(g.minItems=w),typeof $=="number"&&(g.maxItems=$);break}case"record":{let g=x;g.type="object",g.propertyNames=this.process(o.keyType,{...y,path:[...y.path,"propertyNames"]}),g.additionalProperties=this.process(o.valueType,{...y,path:[...y.path,"additionalProperties"]});break}case"map":{if(this.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema");break}case"set":{if(this.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema");break}case"enum":{let g=x,_=Qi(o.entries);_.every(w=>typeof w=="number")&&(g.type="number"),_.every(w=>typeof w=="string")&&(g.type="string"),g.enum=_;break}case"literal":{let g=x,_=[];for(let w of o.values)if(w===void 0){if(this.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof w=="bigint"){if(this.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");_.push(Number(w))}else _.push(w);if(_.length!==0)if(_.length===1){let w=_[0];g.type=w===null?"null":typeof w,g.const=w}else _.every(w=>typeof w=="number")&&(g.type="number"),_.every(w=>typeof w=="string")&&(g.type="string"),_.every(w=>typeof w=="boolean")&&(g.type="string"),_.every(w=>w===null)&&(g.type="null"),g.enum=_;break}case"file":{let g=x,_={type:"string",format:"binary",contentEncoding:"binary"},{minimum:w,maximum:$,mime:E}=e._zod.bag;w!==void 0&&(_.minLength=w),$!==void 0&&(_.maxLength=$),E?E.length===1?(_.contentMediaType=E[0],Object.assign(g,_)):g.anyOf=E.map(Z=>({..._,contentMediaType:Z})):Object.assign(g,_);break}case"transform":{if(this.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema");break}case"nullable":{let g=this.process(o.innerType,y);x.anyOf=[g,{type:"null"}];break}case"nonoptional":{this.process(o.innerType,y),a.ref=o.innerType;break}case"success":{let g=x;g.type="boolean";break}case"default":{this.process(o.innerType,y),a.ref=o.innerType,x.default=JSON.parse(JSON.stringify(o.defaultValue));break}case"prefault":{this.process(o.innerType,y),a.ref=o.innerType,this.io==="input"&&(x._prefault=JSON.parse(JSON.stringify(o.defaultValue)));break}case"catch":{this.process(o.innerType,y),a.ref=o.innerType;let g;try{g=o.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}x.default=g;break}case"nan":{if(this.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema");break}case"template_literal":{let g=x,_=e._zod.pattern;if(!_)throw new Error("Pattern not found in template literal");g.type="string",g.pattern=_.source;break}case"pipe":{let g=this.io==="input"?o.in._zod.def.type==="transform"?o.out:o.in:o.out;this.process(g,y),a.ref=g;break}case"readonly":{this.process(o.innerType,y),a.ref=o.innerType,x.readOnly=!0;break}case"promise":{this.process(o.innerType,y),a.ref=o.innerType;break}case"optional":{this.process(o.innerType,y),a.ref=o.innerType;break}case"lazy":{let g=e._zod.innerType;this.process(g,y),a.ref=g;break}case"custom":{if(this.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema");break}default:}}}let l=this.metadataRegistry.get(e);return l&&Object.assign(a.schema,l),this.io==="input"&&Et(e)&&(delete a.schema.examples,delete a.schema.default),this.io==="input"&&a.schema._prefault&&((n=a.schema).default??(n.default=a.schema._prefault)),delete a.schema._prefault,this.seen.get(e).schema}emit(e,r){var p,d,f,m,y,v;let n={cycles:(r==null?void 0:r.cycles)??"ref",reused:(r==null?void 0:r.reused)??"inline",external:(r==null?void 0:r.external)??void 0},o=this.seen.get(e);if(!o)throw new Error("Unprocessed schema. This is a bug in Zod.");let i=x=>{var E;let g=this.target==="draft-2020-12"?"$defs":"definitions";if(n.external){let Z=(E=n.external.registry.get(x[0]))==null?void 0:E.id,q=n.external.uri??(Pe=>Pe);if(Z)return{ref:q(Z)};let $e=x[1].defId??x[1].schema.id??`schema${this.counter++}`;return x[1].defId=$e,{defId:$e,ref:`${q("__shared")}#/${g}/${$e}`}}if(x[1]===o)return{ref:"#"};let w=`#/${g}/`,$=x[1].schema.id??`__schema${this.counter++}`;return{defId:$,ref:w+$}},s=x=>{if(x[1].schema.$ref)return;let g=x[1],{ref:_,defId:w}=i(x);g.def={...g.schema},w&&(g.defId=w);let $=g.schema;for(let E in $)delete $[E];$.$ref=_};if(n.cycles==="throw")for(let x of this.seen.entries()){let g=x[1];if(g.cycle)throw new Error(`Cycle detected: #/${(p=g.cycle)==null?void 0:p.join("/")}/<root>
|
|
47
|
-
|
|
48
|
-
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let x of this.seen.entries()){let g=x[1];if(e===x[0]){s(x);continue}if(n.external){let w=(d=n.external.registry.get(x[0]))==null?void 0:d.id;if(e!==x[0]&&w){s(x);continue}}if((f=this.metadataRegistry.get(x[0]))==null?void 0:f.id){s(x);continue}if(g.cycle){s(x);continue}if(g.count>1&&n.reused==="ref"){s(x);continue}}let a=(x,g)=>{let _=this.seen.get(x),w=_.def??_.schema,$={...w};if(_.ref===null)return;let E=_.ref;if(_.ref=null,E){a(E,g);let Z=this.seen.get(E).schema;Z.$ref&&g.target==="draft-7"?(w.allOf=w.allOf??[],w.allOf.push(Z)):(Object.assign(w,Z),Object.assign(w,$))}_.isParent||this.override({zodSchema:x,jsonSchema:w,path:_.path??[]})};for(let x of[...this.seen.entries()].reverse())a(x[0],{target:this.target});let c={};if(this.target==="draft-2020-12"?c.$schema="https://json-schema.org/draft/2020-12/schema":this.target==="draft-7"?c.$schema="http://json-schema.org/draft-07/schema#":console.warn(`Invalid target: ${this.target}`),(m=n.external)!=null&&m.uri){let x=(y=n.external.registry.get(e))==null?void 0:y.id;if(!x)throw new Error("Schema is missing an `id` property");c.$id=n.external.uri(x)}Object.assign(c,o.def);let l=((v=n.external)==null?void 0:v.defs)??{};for(let x of this.seen.entries()){let g=x[1];g.def&&g.defId&&(l[g.defId]=g.def)}n.external||Object.keys(l).length>0&&(this.target==="draft-2020-12"?c.$defs=l:c.definitions=l);try{return JSON.parse(JSON.stringify(c))}catch{throw new Error("Error converting schema to JSON.")}}};function md(t,e){if(t instanceof as){let n=new Ja(e),o={};for(let a of t._idmap.entries()){let[c,l]=a;n.process(l)}let i={},s={registry:t,uri:e==null?void 0:e.uri,defs:o};for(let a of t._idmap.entries()){let[c,l]=a;i[c]=n.emit(l,{...e,external:s})}if(Object.keys(o).length>0){let a=n.target==="draft-2020-12"?"$defs":"definitions";i.__shared={[a]:o}}return{schemas:i}}let r=new Ja(e);return r.process(t),r.emit(t,e)}function Et(t,e){let r=e??{seen:new Set};if(r.seen.has(t))return!1;r.seen.add(t);let o=t._zod.def;switch(o.type){case"string":case"number":case"bigint":case"boolean":case"date":case"symbol":case"undefined":case"null":case"any":case"unknown":case"never":case"void":case"literal":case"enum":case"nan":case"file":case"template_literal":return!1;case"array":return Et(o.element,r);case"object":{for(let i in o.shape)if(Et(o.shape[i],r))return!0;return!1}case"union":{for(let i of o.options)if(Et(i,r))return!0;return!1}case"intersection":return Et(o.left,r)||Et(o.right,r);case"tuple":{for(let i of o.items)if(Et(i,r))return!0;return!!(o.rest&&Et(o.rest,r))}case"record":return Et(o.keyType,r)||Et(o.valueType,r);case"map":return Et(o.keyType,r)||Et(o.valueType,r);case"set":return Et(o.valueType,r);case"promise":case"optional":case"nonoptional":case"nullable":case"readonly":return Et(o.innerType,r);case"lazy":return Et(o.getter(),r);case"default":return Et(o.innerType,r);case"prefault":return Et(o.innerType,r);case"custom":return!1;case"transform":return!0;case"pipe":return Et(o.in,r)||Et(o.out,r);case"success":return!1;case"catch":return!1;default:}throw new Error(`Unknown schema type: ${o.type}`)}var VP=A("ZodMiniType",(t,e)=>{if(!t._zod)throw new Error("Uninitialized schema in ZodMiniType.");We.init(t,e),t.def=e,t.parse=(r,n)=>zu(t,r,n,{callee:t.parse}),t.safeParse=(r,n)=>ho(t,r,n),t.parseAsync=async(r,n)=>Ou(t,r,n,{callee:t.parseAsync}),t.safeParseAsync=async(r,n)=>go(t,r,n),t.check=(...r)=>t.clone({...e,checks:[...e.checks??[],...r.map(n=>typeof n=="function"?{_zod:{check:n,def:{check:"custom"},onattach:[]}}:n)]}),t.clone=(r,n)=>gr(t,r,n),t.brand=()=>t,t.register=((r,n)=>(r.add(t,n),t))});var GP=A("ZodMiniObject",(t,e)=>{Ua.init(t,e),VP.init(t,e),Ae.defineLazy(t,"shape",()=>e.shape)});function hd(t,e){let r={type:"object",get shape(){return Ae.assignProp(this,"shape",{...t}),this.shape},...Ae.normalizeParams(e)};return new GP(r)}function Sr(t){return!!t._zod}function vo(t){let e=Object.values(t);if(e.length===0)return hd({});let r=e.every(Sr),n=e.every(o=>!Sr(o));if(r)return hd(t);if(n)return xu(t);throw new Error("Mixed Zod versions detected in object shape.")}function Rn(t,e){return Sr(t)?ho(t,e):t.safeParse(e)}async function Ya(t,e){return Sr(t)?await go(t,e):await t.safeParseAsync(e)}function Pn(t){var r,n;if(!t)return;let e;if(Sr(t)?e=(n=(r=t._zod)==null?void 0:r.def)==null?void 0:n.shape:e=t.shape,!!e){if(typeof e=="function")try{return e()}catch{return}return e}}function ti(t){var e;if(t){if(typeof t=="object"){let r=t,n=t;if(!r._def&&!n._zod){let o=Object.values(t);if(o.length>0&&o.every(i=>typeof i=="object"&&i!==null&&(i._def!==void 0||i._zod!==void 0||typeof i.parse=="function")))return vo(t)}}if(Sr(t)){let n=(e=t._zod)==null?void 0:e.def;if(n&&(n.type==="object"||n.shape!==void 0))return t}else if(t.shape!==void 0)return t}}function Xa(t){if(t&&typeof t=="object"){if("message"in t&&typeof t.message=="string")return t.message;if("issues"in t&&Array.isArray(t.issues)&&t.issues.length>0){let e=t.issues[0];if(e&&typeof e=="object"&&"message"in e)return String(e.message)}try{return JSON.stringify(t)}catch{return String(t)}}return String(t)}function jx(t){return t.description}function Lx(t){var r,n,o;if(Sr(t))return((n=(r=t._zod)==null?void 0:r.def)==null?void 0:n.type)==="optional";let e=t;return typeof t.isOptional=="function"?t.isOptional():((o=e._def)==null?void 0:o.typeName)==="ZodOptional"}function Qa(t){var o;if(Sr(t)){let s=(o=t._zod)==null?void 0:o.def;if(s){if(s.value!==void 0)return s.value;if(Array.isArray(s.values)&&s.values.length>0)return s.values[0]}}let r=t._def;if(r){if(r.value!==void 0)return r.value;if(Array.isArray(r.values)&&r.values.length>0)return r.values[0]}let n=t.value;if(n!==void 0)return n}var us={};Ta(us,{ZodISODate:()=>Mx,ZodISODateTime:()=>Dx,ZodISODuration:()=>Fx,ZodISOTime:()=>qx,date:()=>yd,datetime:()=>gd,duration:()=>vd,time:()=>xd});var Dx=A("ZodISODateTime",(t,e)=>{Sx.init(t,e),pt.init(t,e)});function gd(t){return Ax(Dx,t)}var Mx=A("ZodISODate",(t,e)=>{kx.init(t,e),pt.init(t,e)});function yd(t){return Ix(Mx,t)}var qx=A("ZodISOTime",(t,e)=>{$x.init(t,e),pt.init(t,e)});function xd(t){return zx(qx,t)}var Fx=A("ZodISODuration",(t,e)=>{Ex.init(t,e),pt.init(t,e)});function vd(t){return Cx(Fx,t)}var Ux=(t,e)=>{La.init(t,e),t.name="ZodError",Object.defineProperties(t,{format:{value:r=>Au(t,r)},flatten:{value:r=>Pu(t,r)},addIssue:{value:r=>t.issues.push(r)},addIssues:{value:r=>t.issues.push(...r)},isEmpty:{get(){return t.issues.length===0}}})},q4=A("ZodError",Ux),ps=A("ZodError",Ux,{Parent:Error});var Zx=Iu(ps),Bx=Cu(ps),Hx=Nu(ps),Vx=ju(ps);var yt=A("ZodType",(t,e)=>(We.init(t,e),t.def=e,Object.defineProperty(t,"_def",{value:e}),t.check=(...r)=>t.clone({...e,checks:[...e.checks??[],...r.map(n=>typeof n=="function"?{_zod:{check:n,def:{check:"custom"},onattach:[]}}:n)]}),t.clone=(r,n)=>gr(t,r,n),t.brand=()=>t,t.register=((r,n)=>(r.add(t,n),t)),t.parse=(r,n)=>Zx(t,r,n,{callee:t.parse}),t.safeParse=(r,n)=>Hx(t,r,n),t.parseAsync=async(r,n)=>Bx(t,r,n,{callee:t.parseAsync}),t.safeParseAsync=async(r,n)=>Vx(t,r,n),t.spa=t.safeParseAsync,t.refine=(r,n)=>t.check(BA(r,n)),t.superRefine=r=>t.check(HA(r)),t.overwrite=r=>t.check(yo(r)),t.optional=()=>ft(t),t.nullable=()=>Kx(t),t.nullish=()=>ft(Kx(t)),t.nonoptional=r=>LA(t,r),t.array=()=>Oe(t),t.or=r=>at([t,r]),t.and=r=>tc(t,r),t.transform=r=>_d(t,tv(r)),t.default=r=>OA(t,r),t.prefault=r=>jA(t,r),t.catch=r=>MA(t,r),t.pipe=r=>_d(t,r),t.readonly=()=>UA(t),t.describe=r=>{let n=t.clone();return Tn.add(n,{description:r}),n},Object.defineProperty(t,"description",{get(){var r;return(r=Tn.get(t))==null?void 0:r.description},configurable:!0}),t.meta=(...r)=>{if(r.length===0)return Tn.get(t);let n=t.clone();return Tn.add(n,r[0]),n},t.isOptional=()=>t.safeParse(void 0).success,t.isNullable=()=>t.safeParse(null).success,t)),Jx=A("_ZodString",(t,e)=>{ss.init(t,e),yt.init(t,e);let r=t._zod.bag;t.format=r.format??null,t.minLength=r.minimum??null,t.maxLength=r.maximum??null,t.regex=(...n)=>t.check(rd(...n)),t.includes=(...n)=>t.check(id(...n)),t.startsWith=(...n)=>t.check(sd(...n)),t.endsWith=(...n)=>t.check(ad(...n)),t.min=(...n)=>t.check(ei(...n)),t.max=(...n)=>t.check(Wa(...n)),t.length=(...n)=>t.check(Ka(...n)),t.nonempty=(...n)=>t.check(ei(1,...n)),t.lowercase=n=>t.check(nd(n)),t.uppercase=n=>t.check(od(n)),t.trim=()=>t.check(ld()),t.normalize=(...n)=>t.check(cd(...n)),t.toLowerCase=()=>t.check(ud()),t.toUpperCase=()=>t.check(pd())}),rA=A("ZodString",(t,e)=>{ss.init(t,e),Jx.init(t,e),t.email=r=>t.check(Pp(nA,r)),t.url=r=>t.check(Op(oA,r)),t.jwt=r=>t.check(Kp(vA,r)),t.emoji=r=>t.check(Np(iA,r)),t.guid=r=>t.check(Ba(Gx,r)),t.uuid=r=>t.check(Ap(ec,r)),t.uuidv4=r=>t.check(Ip(ec,r)),t.uuidv6=r=>t.check(zp(ec,r)),t.uuidv7=r=>t.check(Cp(ec,r)),t.nanoid=r=>t.check(jp(sA,r)),t.guid=r=>t.check(Ba(Gx,r)),t.cuid=r=>t.check(Lp(aA,r)),t.cuid2=r=>t.check(Dp(cA,r)),t.ulid=r=>t.check(Mp(lA,r)),t.base64=r=>t.check(Vp(gA,r)),t.base64url=r=>t.check(Gp(yA,r)),t.xid=r=>t.check(qp(uA,r)),t.ksuid=r=>t.check(Fp(pA,r)),t.ipv4=r=>t.check(Up(dA,r)),t.ipv6=r=>t.check(Zp(fA,r)),t.cidrv4=r=>t.check(Bp(mA,r)),t.cidrv6=r=>t.check(Hp(hA,r)),t.e164=r=>t.check(Wp(xA,r)),t.datetime=r=>t.check(gd(r)),t.date=r=>t.check(yd(r)),t.time=r=>t.check(xd(r)),t.duration=r=>t.check(vd(r))});function R(t){return Rp(rA,t)}var pt=A("ZodStringFormat",(t,e)=>{tt.init(t,e),Jx.init(t,e)}),nA=A("ZodEmail",(t,e)=>{Bu.init(t,e),pt.init(t,e)});var Gx=A("ZodGUID",(t,e)=>{Uu.init(t,e),pt.init(t,e)});var ec=A("ZodUUID",(t,e)=>{Zu.init(t,e),pt.init(t,e)});var oA=A("ZodURL",(t,e)=>{Hu.init(t,e),pt.init(t,e)});var iA=A("ZodEmoji",(t,e)=>{Vu.init(t,e),pt.init(t,e)});var sA=A("ZodNanoID",(t,e)=>{Gu.init(t,e),pt.init(t,e)});var aA=A("ZodCUID",(t,e)=>{Wu.init(t,e),pt.init(t,e)});var cA=A("ZodCUID2",(t,e)=>{Ku.init(t,e),pt.init(t,e)});var lA=A("ZodULID",(t,e)=>{Ju.init(t,e),pt.init(t,e)});var uA=A("ZodXID",(t,e)=>{Yu.init(t,e),pt.init(t,e)});var pA=A("ZodKSUID",(t,e)=>{Xu.init(t,e),pt.init(t,e)});var dA=A("ZodIPv4",(t,e)=>{Qu.init(t,e),pt.init(t,e)});var fA=A("ZodIPv6",(t,e)=>{ep.init(t,e),pt.init(t,e)});var mA=A("ZodCIDRv4",(t,e)=>{tp.init(t,e),pt.init(t,e)});var hA=A("ZodCIDRv6",(t,e)=>{rp.init(t,e),pt.init(t,e)});var gA=A("ZodBase64",(t,e)=>{np.init(t,e),pt.init(t,e)});var yA=A("ZodBase64URL",(t,e)=>{op.init(t,e),pt.init(t,e)});var xA=A("ZodE164",(t,e)=>{ip.init(t,e),pt.init(t,e)});var vA=A("ZodJWT",(t,e)=>{sp.init(t,e),pt.init(t,e)});var Yx=A("ZodNumber",(t,e)=>{Fa.init(t,e),yt.init(t,e),t.gt=(n,o)=>t.check(Va(n,o)),t.gte=(n,o)=>t.check(ls(n,o)),t.min=(n,o)=>t.check(ls(n,o)),t.lt=(n,o)=>t.check(Ha(n,o)),t.lte=(n,o)=>t.check(cs(n,o)),t.max=(n,o)=>t.check(cs(n,o)),t.int=n=>t.check(Wx(n)),t.safe=n=>t.check(Wx(n)),t.positive=n=>t.check(Va(0,n)),t.nonnegative=n=>t.check(ls(0,n)),t.negative=n=>t.check(Ha(0,n)),t.nonpositive=n=>t.check(cs(0,n)),t.multipleOf=(n,o)=>t.check(Ga(n,o)),t.step=(n,o)=>t.check(Ga(n,o)),t.finite=()=>t;let r=t._zod.bag;t.minValue=Math.max(r.minimum??Number.NEGATIVE_INFINITY,r.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,t.maxValue=Math.min(r.maximum??Number.POSITIVE_INFINITY,r.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,t.isInt=(r.format??"").includes("int")||Number.isSafeInteger(r.multipleOf??.5),t.isFinite=!0,t.format=r.format??null});function Be(t){return Jp(Yx,t)}var bA=A("ZodNumberFormat",(t,e)=>{ap.init(t,e),Yx.init(t,e)});function Wx(t){return Yp(bA,t)}var _A=A("ZodBoolean",(t,e)=>{cp.init(t,e),yt.init(t,e)});function Pt(t){return Xp(_A,t)}var wA=A("ZodNull",(t,e)=>{lp.init(t,e),yt.init(t,e)});function Xx(t){return Qp(wA,t)}var SA=A("ZodUnknown",(t,e)=>{up.init(t,e),yt.init(t,e)});function dt(){return ed(SA)}var kA=A("ZodNever",(t,e)=>{pp.init(t,e),yt.init(t,e)});function $A(t){return td(kA,t)}var EA=A("ZodArray",(t,e)=>{dp.init(t,e),yt.init(t,e),t.element=e.element,t.min=(r,n)=>t.check(ei(r,n)),t.nonempty=r=>t.check(ei(1,r)),t.max=(r,n)=>t.check(Wa(r,n)),t.length=(r,n)=>t.check(Ka(r,n)),t.unwrap=()=>t.element});function Oe(t,e){return Ox(EA,t,e)}var Qx=A("ZodObject",(t,e)=>{Ua.init(t,e),yt.init(t,e),Ae.defineLazy(t,"shape",()=>e.shape),t.keyof=()=>sr(Object.keys(t._zod.def.shape)),t.catchall=r=>t.clone({...t._zod.def,catchall:r}),t.passthrough=()=>t.clone({...t._zod.def,catchall:dt()}),t.loose=()=>t.clone({...t._zod.def,catchall:dt()}),t.strict=()=>t.clone({...t._zod.def,catchall:$A()}),t.strip=()=>t.clone({...t._zod.def,catchall:void 0}),t.extend=r=>Ae.extend(t,r),t.merge=r=>Ae.merge(t,r),t.pick=r=>Ae.pick(t,r),t.omit=r=>Ae.omit(t,r),t.partial=(...r)=>Ae.partial(rv,t,r[0]),t.required=(...r)=>Ae.required(nv,t,r[0])});function X(t,e){let r={type:"object",get shape(){return Ae.assignProp(this,"shape",{...t}),this.shape},...Ae.normalizeParams(e)};return new Qx(r)}function Xt(t,e){return new Qx({type:"object",get shape(){return Ae.assignProp(this,"shape",{...t}),this.shape},catchall:dt(),...Ae.normalizeParams(e)})}var ev=A("ZodUnion",(t,e)=>{Za.init(t,e),yt.init(t,e),t.options=e.options});function at(t,e){return new ev({type:"union",options:t,...Ae.normalizeParams(e)})}var TA=A("ZodDiscriminatedUnion",(t,e)=>{ev.init(t,e),fp.init(t,e)});function wd(t,e,r){return new TA({type:"union",options:e,discriminator:t,...Ae.normalizeParams(r)})}var RA=A("ZodIntersection",(t,e)=>{mp.init(t,e),yt.init(t,e)});function tc(t,e){return new RA({type:"intersection",left:t,right:e})}var PA=A("ZodRecord",(t,e)=>{hp.init(t,e),yt.init(t,e),t.keyType=e.keyType,t.valueType=e.valueType});function rt(t,e,r){return new PA({type:"record",keyType:t,valueType:e,...Ae.normalizeParams(r)})}var bd=A("ZodEnum",(t,e)=>{gp.init(t,e),yt.init(t,e),t.enum=e.entries,t.options=Object.values(e.entries);let r=new Set(Object.keys(e.entries));t.extract=(n,o)=>{let i={};for(let s of n)if(r.has(s))i[s]=e.entries[s];else throw new Error(`Key ${s} not found in enum`);return new bd({...e,checks:[],...Ae.normalizeParams(o),entries:i})},t.exclude=(n,o)=>{let i={...e.entries};for(let s of n)if(r.has(s))delete i[s];else throw new Error(`Key ${s} not found in enum`);return new bd({...e,checks:[],...Ae.normalizeParams(o),entries:i})}});function sr(t,e){let r=Array.isArray(t)?Object.fromEntries(t.map(n=>[n,n])):t;return new bd({type:"enum",entries:r,...Ae.normalizeParams(e)})}var AA=A("ZodLiteral",(t,e)=>{yp.init(t,e),yt.init(t,e),t.values=new Set(e.values),Object.defineProperty(t,"value",{get(){if(e.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return e.values[0]}})});function re(t,e){return new AA({type:"literal",values:Array.isArray(t)?t:[t],...Ae.normalizeParams(e)})}var IA=A("ZodTransform",(t,e)=>{xp.init(t,e),yt.init(t,e),t._zod.parse=(r,n)=>{r.addIssue=i=>{if(typeof i=="string")r.issues.push(Ae.issue(i,r.value,e));else{let s=i;s.fatal&&(s.continue=!1),s.code??(s.code="custom"),s.input??(s.input=r.value),s.inst??(s.inst=t),s.continue??(s.continue=!0),r.issues.push(Ae.issue(s))}};let o=e.transform(r.value,r);return o instanceof Promise?o.then(i=>(r.value=i,r)):(r.value=o,r)}});function tv(t){return new IA({type:"transform",transform:t})}var rv=A("ZodOptional",(t,e)=>{vp.init(t,e),yt.init(t,e),t.unwrap=()=>t._zod.def.innerType});function ft(t){return new rv({type:"optional",innerType:t})}var zA=A("ZodNullable",(t,e)=>{bp.init(t,e),yt.init(t,e),t.unwrap=()=>t._zod.def.innerType});function Kx(t){return new zA({type:"nullable",innerType:t})}var CA=A("ZodDefault",(t,e)=>{_p.init(t,e),yt.init(t,e),t.unwrap=()=>t._zod.def.innerType,t.removeDefault=t.unwrap});function OA(t,e){return new CA({type:"default",innerType:t,get defaultValue(){return typeof e=="function"?e():e}})}var NA=A("ZodPrefault",(t,e)=>{wp.init(t,e),yt.init(t,e),t.unwrap=()=>t._zod.def.innerType});function jA(t,e){return new NA({type:"prefault",innerType:t,get defaultValue(){return typeof e=="function"?e():e}})}var nv=A("ZodNonOptional",(t,e)=>{Sp.init(t,e),yt.init(t,e),t.unwrap=()=>t._zod.def.innerType});function LA(t,e){return new nv({type:"nonoptional",innerType:t,...Ae.normalizeParams(e)})}var DA=A("ZodCatch",(t,e)=>{kp.init(t,e),yt.init(t,e),t.unwrap=()=>t._zod.def.innerType,t.removeCatch=t.unwrap});function MA(t,e){return new DA({type:"catch",innerType:t,catchValue:typeof e=="function"?e:()=>e})}var qA=A("ZodPipe",(t,e)=>{$p.init(t,e),yt.init(t,e),t.in=e.in,t.out=e.out});function _d(t,e){return new qA({type:"pipe",in:t,out:e})}var FA=A("ZodReadonly",(t,e)=>{Ep.init(t,e),yt.init(t,e)});function UA(t){return new FA({type:"readonly",innerType:t})}var ov=A("ZodCustom",(t,e)=>{Tp.init(t,e),yt.init(t,e)});function ZA(t){let e=new jt({check:"custom"});return e._zod.check=t,e}function iv(t,e){return dd(ov,t??(()=>!0),e)}function BA(t,e={}){return fd(ov,t,e)}function HA(t){let e=ZA(r=>(r.addIssue=n=>{if(typeof n=="string")r.issues.push(Ae.issue(n,r.value,e._zod.def));else{let o=n;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=r.value),o.inst??(o.inst=e),o.continue??(o.continue=!e._zod.def.abort),r.issues.push(Ae.issue(o))}},t(r.value,r)));return e}function Sd(t,e){return _d(tv(t),e)}hr(Rx());var $d="2025-11-25";var sv=[$d,"2025-06-18","2025-03-26","2024-11-05","2024-10-07"],An="io.modelcontextprotocol/related-task",nc="2.0",Tt=iv(t=>t!==null&&(typeof t=="object"||typeof t=="function")),av=at([R(),Be().int()]),cv=R(),e3=Xt({ttl:Be().optional(),pollInterval:Be().optional()}),VA=X({ttl:Be().optional()}),GA=X({taskId:R()}),Ed=Xt({progressToken:av.optional(),[An]:GA.optional()}),yr=X({_meta:Ed.optional()}),ds=yr.extend({task:VA.optional()}),lv=t=>ds.safeParse(t).success,Lt=X({method:R(),params:yr.loose().optional()}),kr=X({_meta:Ed.optional()}),$r=X({method:R(),params:kr.loose().optional()}),Dt=Xt({_meta:Ed.optional()}),oc=at([R(),Be().int()]),uv=X({jsonrpc:re(nc),id:oc,...Lt.shape}).strict(),Td=t=>uv.safeParse(t).success,pv=X({jsonrpc:re(nc),...$r.shape}).strict(),dv=t=>pv.safeParse(t).success,Rd=X({jsonrpc:re(nc),id:oc,result:Dt}).strict(),fs=t=>Rd.safeParse(t).success;var ie;(function(t){t[t.ConnectionClosed=-32e3]="ConnectionClosed",t[t.RequestTimeout=-32001]="RequestTimeout",t[t.ParseError=-32700]="ParseError",t[t.InvalidRequest=-32600]="InvalidRequest",t[t.MethodNotFound=-32601]="MethodNotFound",t[t.InvalidParams=-32602]="InvalidParams",t[t.InternalError=-32603]="InternalError",t[t.UrlElicitationRequired=-32042]="UrlElicitationRequired"})(ie||(ie={}));var Pd=X({jsonrpc:re(nc),id:oc.optional(),error:X({code:Be().int(),message:R(),data:dt().optional()})}).strict();var fv=t=>Pd.safeParse(t).success;var mv=at([uv,pv,Rd,Pd]),t3=at([Rd,Pd]),ic=Dt.strict(),WA=kr.extend({requestId:oc.optional(),reason:R().optional()}),sc=$r.extend({method:re("notifications/cancelled"),params:WA}),KA=X({src:R(),mimeType:R().optional(),sizes:Oe(R()).optional(),theme:sr(["light","dark"]).optional()}),ms=X({icons:Oe(KA).optional()}),ri=X({name:R(),title:R().optional()}),hv=ri.extend({...ri.shape,...ms.shape,version:R(),websiteUrl:R().optional(),description:R().optional()}),JA=tc(X({applyDefaults:Pt().optional()}),rt(R(),dt())),YA=Sd(t=>t&&typeof t=="object"&&!Array.isArray(t)&&Object.keys(t).length===0?{form:{}}:t,tc(X({form:JA.optional(),url:Tt.optional()}),rt(R(),dt()).optional())),XA=Xt({list:Tt.optional(),cancel:Tt.optional(),requests:Xt({sampling:Xt({createMessage:Tt.optional()}).optional(),elicitation:Xt({create:Tt.optional()}).optional()}).optional()}),QA=Xt({list:Tt.optional(),cancel:Tt.optional(),requests:Xt({tools:Xt({call:Tt.optional()}).optional()}).optional()}),eI=X({experimental:rt(R(),Tt).optional(),sampling:X({context:Tt.optional(),tools:Tt.optional()}).optional(),elicitation:YA.optional(),roots:X({listChanged:Pt().optional()}).optional(),tasks:XA.optional(),extensions:rt(R(),Tt).optional()}),tI=yr.extend({protocolVersion:R(),capabilities:eI,clientInfo:hv}),Ad=Lt.extend({method:re("initialize"),params:tI});var rI=X({experimental:rt(R(),Tt).optional(),logging:Tt.optional(),completions:Tt.optional(),prompts:X({listChanged:Pt().optional()}).optional(),resources:X({subscribe:Pt().optional(),listChanged:Pt().optional()}).optional(),tools:X({listChanged:Pt().optional()}).optional(),tasks:QA.optional(),extensions:rt(R(),Tt).optional()}),nI=Dt.extend({protocolVersion:R(),capabilities:rI,serverInfo:hv,instructions:R().optional()}),Id=$r.extend({method:re("notifications/initialized"),params:kr.optional()});var ac=Lt.extend({method:re("ping"),params:yr.optional()}),oI=X({progress:Be(),total:ft(Be()),message:ft(R())}),iI=X({...kr.shape,...oI.shape,progressToken:av}),cc=$r.extend({method:re("notifications/progress"),params:iI}),sI=yr.extend({cursor:cv.optional()}),hs=Lt.extend({params:sI.optional()}),gs=Dt.extend({nextCursor:cv.optional()}),aI=sr(["working","input_required","completed","failed","cancelled"]),ys=X({taskId:R(),status:aI,ttl:at([Be(),Xx()]),createdAt:R(),lastUpdatedAt:R(),pollInterval:ft(Be()),statusMessage:ft(R())}),ni=Dt.extend({task:ys}),cI=kr.merge(ys),xs=$r.extend({method:re("notifications/tasks/status"),params:cI}),lc=Lt.extend({method:re("tasks/get"),params:yr.extend({taskId:R()})}),uc=Dt.merge(ys),pc=Lt.extend({method:re("tasks/result"),params:yr.extend({taskId:R()})}),r3=Dt.loose(),dc=hs.extend({method:re("tasks/list")}),fc=gs.extend({tasks:Oe(ys)}),mc=Lt.extend({method:re("tasks/cancel"),params:yr.extend({taskId:R()})}),gv=Dt.merge(ys),yv=X({uri:R(),mimeType:ft(R()),_meta:rt(R(),dt()).optional()}),xv=yv.extend({text:R()}),zd=R().refine(t=>{try{return atob(t),!0}catch{return!1}},{message:"Invalid Base64 string"}),vv=yv.extend({blob:zd}),vs=sr(["user","assistant"]),oi=X({audience:Oe(vs).optional(),priority:Be().min(0).max(1).optional(),lastModified:us.datetime({offset:!0}).optional()}),bv=X({...ri.shape,...ms.shape,uri:R(),description:ft(R()),mimeType:ft(R()),size:ft(Be()),annotations:oi.optional(),_meta:ft(Xt({}))}),lI=X({...ri.shape,...ms.shape,uriTemplate:R(),description:ft(R()),mimeType:ft(R()),annotations:oi.optional(),_meta:ft(Xt({}))}),hc=hs.extend({method:re("resources/list")}),uI=gs.extend({resources:Oe(bv)}),gc=hs.extend({method:re("resources/templates/list")}),pI=gs.extend({resourceTemplates:Oe(lI)}),Cd=yr.extend({uri:R()}),dI=Cd,yc=Lt.extend({method:re("resources/read"),params:dI}),fI=Dt.extend({contents:Oe(at([xv,vv]))}),mI=$r.extend({method:re("notifications/resources/list_changed"),params:kr.optional()}),hI=Cd,gI=Lt.extend({method:re("resources/subscribe"),params:hI}),yI=Cd,xI=Lt.extend({method:re("resources/unsubscribe"),params:yI}),vI=kr.extend({uri:R()}),bI=$r.extend({method:re("notifications/resources/updated"),params:vI}),_I=X({name:R(),description:ft(R()),required:ft(Pt())}),wI=X({...ri.shape,...ms.shape,description:ft(R()),arguments:ft(Oe(_I)),_meta:ft(Xt({}))}),xc=hs.extend({method:re("prompts/list")}),SI=gs.extend({prompts:Oe(wI)}),kI=yr.extend({name:R(),arguments:rt(R(),R()).optional()}),vc=Lt.extend({method:re("prompts/get"),params:kI}),Od=X({type:re("text"),text:R(),annotations:oi.optional(),_meta:rt(R(),dt()).optional()}),Nd=X({type:re("image"),data:zd,mimeType:R(),annotations:oi.optional(),_meta:rt(R(),dt()).optional()}),jd=X({type:re("audio"),data:zd,mimeType:R(),annotations:oi.optional(),_meta:rt(R(),dt()).optional()}),$I=X({type:re("tool_use"),name:R(),id:R(),input:rt(R(),dt()),_meta:rt(R(),dt()).optional()}),EI=X({type:re("resource"),resource:at([xv,vv]),annotations:oi.optional(),_meta:rt(R(),dt()).optional()}),TI=bv.extend({type:re("resource_link")}),Ld=at([Od,Nd,jd,TI,EI]),RI=X({role:vs,content:Ld}),PI=Dt.extend({description:R().optional(),messages:Oe(RI)}),AI=$r.extend({method:re("notifications/prompts/list_changed"),params:kr.optional()}),II=X({title:R().optional(),readOnlyHint:Pt().optional(),destructiveHint:Pt().optional(),idempotentHint:Pt().optional(),openWorldHint:Pt().optional()}),zI=X({taskSupport:sr(["required","optional","forbidden"]).optional()}),_v=X({...ri.shape,...ms.shape,description:R().optional(),inputSchema:X({type:re("object"),properties:rt(R(),Tt).optional(),required:Oe(R()).optional()}).catchall(dt()),outputSchema:X({type:re("object"),properties:rt(R(),Tt).optional(),required:Oe(R()).optional()}).catchall(dt()).optional(),annotations:II.optional(),execution:zI.optional(),_meta:rt(R(),dt()).optional()}),bc=hs.extend({method:re("tools/list")}),CI=gs.extend({tools:Oe(_v)}),_c=Dt.extend({content:Oe(Ld).default([]),structuredContent:rt(R(),dt()).optional(),isError:Pt().optional()}),n3=_c.or(Dt.extend({toolResult:dt()})),OI=ds.extend({name:R(),arguments:rt(R(),dt()).optional()}),ii=Lt.extend({method:re("tools/call"),params:OI}),NI=$r.extend({method:re("notifications/tools/list_changed"),params:kr.optional()}),o3=X({autoRefresh:Pt().default(!0),debounceMs:Be().int().nonnegative().default(300)}),bs=sr(["debug","info","notice","warning","error","critical","alert","emergency"]),jI=yr.extend({level:bs}),Dd=Lt.extend({method:re("logging/setLevel"),params:jI}),LI=kr.extend({level:bs,logger:R().optional(),data:dt()}),DI=$r.extend({method:re("notifications/message"),params:LI}),MI=X({name:R().optional()}),qI=X({hints:Oe(MI).optional(),costPriority:Be().min(0).max(1).optional(),speedPriority:Be().min(0).max(1).optional(),intelligencePriority:Be().min(0).max(1).optional()}),FI=X({mode:sr(["auto","required","none"]).optional()}),UI=X({type:re("tool_result"),toolUseId:R().describe("The unique identifier for the corresponding tool call."),content:Oe(Ld).default([]),structuredContent:X({}).loose().optional(),isError:Pt().optional(),_meta:rt(R(),dt()).optional()}),ZI=wd("type",[Od,Nd,jd]),rc=wd("type",[Od,Nd,jd,$I,UI]),BI=X({role:vs,content:at([rc,Oe(rc)]),_meta:rt(R(),dt()).optional()}),HI=ds.extend({messages:Oe(BI),modelPreferences:qI.optional(),systemPrompt:R().optional(),includeContext:sr(["none","thisServer","allServers"]).optional(),temperature:Be().optional(),maxTokens:Be().int(),stopSequences:Oe(R()).optional(),metadata:Tt.optional(),tools:Oe(_v).optional(),toolChoice:FI.optional()}),VI=Lt.extend({method:re("sampling/createMessage"),params:HI}),_s=Dt.extend({model:R(),stopReason:ft(sr(["endTurn","stopSequence","maxTokens"]).or(R())),role:vs,content:ZI}),Md=Dt.extend({model:R(),stopReason:ft(sr(["endTurn","stopSequence","maxTokens","toolUse"]).or(R())),role:vs,content:at([rc,Oe(rc)])}),GI=X({type:re("boolean"),title:R().optional(),description:R().optional(),default:Pt().optional()}),WI=X({type:re("string"),title:R().optional(),description:R().optional(),minLength:Be().optional(),maxLength:Be().optional(),format:sr(["email","uri","date","date-time"]).optional(),default:R().optional()}),KI=X({type:sr(["number","integer"]),title:R().optional(),description:R().optional(),minimum:Be().optional(),maximum:Be().optional(),default:Be().optional()}),JI=X({type:re("string"),title:R().optional(),description:R().optional(),enum:Oe(R()),default:R().optional()}),YI=X({type:re("string"),title:R().optional(),description:R().optional(),oneOf:Oe(X({const:R(),title:R()})),default:R().optional()}),XI=X({type:re("string"),title:R().optional(),description:R().optional(),enum:Oe(R()),enumNames:Oe(R()).optional(),default:R().optional()}),QI=at([JI,YI]),ez=X({type:re("array"),title:R().optional(),description:R().optional(),minItems:Be().optional(),maxItems:Be().optional(),items:X({type:re("string"),enum:Oe(R())}),default:Oe(R()).optional()}),tz=X({type:re("array"),title:R().optional(),description:R().optional(),minItems:Be().optional(),maxItems:Be().optional(),items:X({anyOf:Oe(X({const:R(),title:R()}))}),default:Oe(R()).optional()}),rz=at([ez,tz]),nz=at([XI,QI,rz]),oz=at([nz,GI,WI,KI]),iz=ds.extend({mode:re("form").optional(),message:R(),requestedSchema:X({type:re("object"),properties:rt(R(),oz),required:Oe(R()).optional()})}),sz=ds.extend({mode:re("url"),message:R(),elicitationId:R(),url:R().url()}),az=at([iz,sz]),cz=Lt.extend({method:re("elicitation/create"),params:az}),lz=kr.extend({elicitationId:R()}),uz=$r.extend({method:re("notifications/elicitation/complete"),params:lz}),si=Dt.extend({action:sr(["accept","decline","cancel"]),content:Sd(t=>t===null?void 0:t,rt(R(),at([R(),Be(),Pt(),Oe(R())])).optional())}),pz=X({type:re("ref/resource"),uri:R()});var dz=X({type:re("ref/prompt"),name:R()}),fz=yr.extend({ref:at([dz,pz]),argument:X({name:R(),value:R()}),context:X({arguments:rt(R(),R()).optional()}).optional()}),wc=Lt.extend({method:re("completion/complete"),params:fz});function wv(t){if(t.params.ref.type!=="ref/prompt")throw new TypeError(`Expected CompleteRequestPrompt, but got ${t.params.ref.type}`)}function Sv(t){if(t.params.ref.type!=="ref/resource")throw new TypeError(`Expected CompleteRequestResourceTemplate, but got ${t.params.ref.type}`)}var mz=Dt.extend({completion:Xt({values:Oe(R()).max(100),total:ft(Be().int()),hasMore:ft(Pt())})}),hz=X({uri:R().startsWith("file://"),name:R().optional(),_meta:rt(R(),dt()).optional()}),gz=Lt.extend({method:re("roots/list"),params:yr.optional()}),qd=Dt.extend({roots:Oe(hz)}),yz=$r.extend({method:re("notifications/roots/list_changed"),params:kr.optional()}),i3=at([ac,Ad,wc,Dd,vc,xc,hc,gc,yc,gI,xI,ii,bc,lc,pc,dc,mc]),s3=at([sc,cc,Id,yz,xs]),a3=at([ic,_s,Md,si,qd,uc,fc,ni]),c3=at([ac,VI,cz,gz,lc,pc,dc,mc]),l3=at([sc,cc,DI,bI,mI,NI,AI,xs,uz]),u3=at([ic,nI,mz,PI,SI,uI,pI,fI,_c,CI,uc,fc,ni]),te=class t extends Error{constructor(e,r,n){super(`MCP error ${e}: ${r}`),this.code=e,this.data=n,this.name="McpError"}static fromError(e,r,n){if(e===ie.UrlElicitationRequired&&n){let o=n;if(o.elicitations)return new kd(o.elicitations,r)}return new t(e,r,n)}},kd=class extends te{constructor(e,r=`URL elicitation${e.length>1?"s":""} required`){super(ie.UrlElicitationRequired,r,{elicitations:e})}get elicitations(){var e;return((e=this.data)==null?void 0:e.elicitations)??[]}};function In(t){return t==="completed"||t==="failed"||t==="cancelled"}var $v=Symbol("Let zodToJsonSchema decide on which parser to use");var kv={name:void 0,$refStrategy:"root",basePath:["#"],effectStrategy:"input",pipeStrategy:"all",dateStrategy:"format:date-time",mapStrategy:"entries",removeAdditionalStrategy:"passthrough",allowedAdditionalProperties:!0,rejectedAdditionalProperties:!1,definitionPath:"definitions",target:"jsonSchema7",strictUnions:!1,definitions:{},errorMessages:!1,markdownDescription:!1,patternStrategy:"escape",applyRegexFlags:!1,emailStrategy:"format:email",base64Strategy:"contentEncoding:base64",nameStrategy:"ref",openAiAnyTypeName:"OpenAiAnyType"},Ev=t=>typeof t=="string"?{...kv,name:t}:{...kv,...t};var Tv=t=>{let e=Ev(t),r=e.name!==void 0?[...e.basePath,e.definitionPath,e.name]:e.basePath;return{...e,flags:{hasReferencedOpenAiAnyType:!1},currentPath:r,propertyPath:void 0,seen:new Map(Object.entries(e.definitions).map(([n,o])=>[o._def,{def:o._def,path:[...e.basePath,e.definitionPath,n],jsonSchema:void 0}]))}};function Fd(t,e,r,n){n!=null&&n.errorMessages&&r&&(t.errorMessage={...t.errorMessage,[e]:r})}function Ne(t,e,r,n,o){t[e]=r,Fd(t,e,n,o)}var Sc=(t,e)=>{let r=0;for(;r<t.length&&r<e.length&&t[r]===e[r];r++);return[(t.length-r).toString(),...e.slice(r)].join("/")};function mt(t){if(t.target!=="openAi")return{};let e=[...t.basePath,t.definitionPath,t.openAiAnyTypeName];return t.flags.hasReferencedOpenAiAnyType=!0,{$ref:t.$refStrategy==="relative"?Sc(e,t.currentPath):e.join("/")}}function Rv(t,e){var n,o,i;let r={type:"array"};return(n=t.type)!=null&&n._def&&((i=(o=t.type)==null?void 0:o._def)==null?void 0:i.typeName)!==F.ZodAny&&(r.items=pe(t.type._def,{...e,currentPath:[...e.currentPath,"items"]})),t.minLength&&Ne(r,"minItems",t.minLength.value,t.minLength.message,e),t.maxLength&&Ne(r,"maxItems",t.maxLength.value,t.maxLength.message,e),t.exactLength&&(Ne(r,"minItems",t.exactLength.value,t.exactLength.message,e),Ne(r,"maxItems",t.exactLength.value,t.exactLength.message,e)),r}function Pv(t,e){let r={type:"integer",format:"int64"};if(!t.checks)return r;for(let n of t.checks)switch(n.kind){case"min":e.target==="jsonSchema7"?n.inclusive?Ne(r,"minimum",n.value,n.message,e):Ne(r,"exclusiveMinimum",n.value,n.message,e):(n.inclusive||(r.exclusiveMinimum=!0),Ne(r,"minimum",n.value,n.message,e));break;case"max":e.target==="jsonSchema7"?n.inclusive?Ne(r,"maximum",n.value,n.message,e):Ne(r,"exclusiveMaximum",n.value,n.message,e):(n.inclusive||(r.exclusiveMaximum=!0),Ne(r,"maximum",n.value,n.message,e));break;case"multipleOf":Ne(r,"multipleOf",n.value,n.message,e);break}return r}function Av(){return{type:"boolean"}}function kc(t,e){return pe(t.type._def,e)}var Iv=(t,e)=>pe(t.innerType._def,e);function Ud(t,e,r){let n=r??e.dateStrategy;if(Array.isArray(n))return{anyOf:n.map((o,i)=>Ud(t,e,o))};switch(n){case"string":case"format:date-time":return{type:"string",format:"date-time"};case"format:date":return{type:"string",format:"date"};case"integer":return xz(t,e)}}var xz=(t,e)=>{let r={type:"integer",format:"unix-time"};if(e.target==="openApi3")return r;for(let n of t.checks)switch(n.kind){case"min":Ne(r,"minimum",n.value,n.message,e);break;case"max":Ne(r,"maximum",n.value,n.message,e);break}return r};function zv(t,e){return{...pe(t.innerType._def,e),default:t.defaultValue()}}function Cv(t,e){return e.effectStrategy==="input"?pe(t.schema._def,e):mt(e)}function Ov(t){return{type:"string",enum:Array.from(t.values)}}var vz=t=>"type"in t&&t.type==="string"?!1:"allOf"in t;function Nv(t,e){let r=[pe(t.left._def,{...e,currentPath:[...e.currentPath,"allOf","0"]}),pe(t.right._def,{...e,currentPath:[...e.currentPath,"allOf","1"]})].filter(i=>!!i),n=e.target==="jsonSchema2019-09"?{unevaluatedProperties:!1}:void 0,o=[];return r.forEach(i=>{if(vz(i))o.push(...i.allOf),i.unevaluatedProperties===void 0&&(n=void 0);else{let s=i;if("additionalProperties"in i&&i.additionalProperties===!1){let{additionalProperties:a,...c}=i;s=c}else n=void 0;o.push(s)}}),o.length?{allOf:o,...n}:void 0}function jv(t,e){let r=typeof t.value;return r!=="bigint"&&r!=="number"&&r!=="boolean"&&r!=="string"?{type:Array.isArray(t.value)?"array":"object"}:e.target==="openApi3"?{type:r==="bigint"?"integer":r,enum:[t.value]}:{type:r==="bigint"?"integer":r,const:t.value}}var Zd,Lr={cuid:/^[cC][^\s-]{8,}$/,cuid2:/^[0-9a-z]+$/,ulid:/^[0-9A-HJKMNP-TV-Z]{26}$/,email:/^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/,emoji:()=>(Zd===void 0&&(Zd=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),Zd),uuid:/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/,ipv4:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,ipv4Cidr:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,ipv6:/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,ipv6Cidr:/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,base64:/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,base64url:/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,nanoid:/^[a-zA-Z0-9_-]{21}$/,jwt:/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/};function $c(t,e){let r={type:"string"};if(t.checks)for(let n of t.checks)switch(n.kind){case"min":Ne(r,"minLength",typeof r.minLength=="number"?Math.max(r.minLength,n.value):n.value,n.message,e);break;case"max":Ne(r,"maxLength",typeof r.maxLength=="number"?Math.min(r.maxLength,n.value):n.value,n.message,e);break;case"email":switch(e.emailStrategy){case"format:email":Dr(r,"email",n.message,e);break;case"format:idn-email":Dr(r,"idn-email",n.message,e);break;case"pattern:zod":Qt(r,Lr.email,n.message,e);break}break;case"url":Dr(r,"uri",n.message,e);break;case"uuid":Dr(r,"uuid",n.message,e);break;case"regex":Qt(r,n.regex,n.message,e);break;case"cuid":Qt(r,Lr.cuid,n.message,e);break;case"cuid2":Qt(r,Lr.cuid2,n.message,e);break;case"startsWith":Qt(r,RegExp(`^${Bd(n.value,e)}`),n.message,e);break;case"endsWith":Qt(r,RegExp(`${Bd(n.value,e)}$`),n.message,e);break;case"datetime":Dr(r,"date-time",n.message,e);break;case"date":Dr(r,"date",n.message,e);break;case"time":Dr(r,"time",n.message,e);break;case"duration":Dr(r,"duration",n.message,e);break;case"length":Ne(r,"minLength",typeof r.minLength=="number"?Math.max(r.minLength,n.value):n.value,n.message,e),Ne(r,"maxLength",typeof r.maxLength=="number"?Math.min(r.maxLength,n.value):n.value,n.message,e);break;case"includes":{Qt(r,RegExp(Bd(n.value,e)),n.message,e);break}case"ip":{n.version!=="v6"&&Dr(r,"ipv4",n.message,e),n.version!=="v4"&&Dr(r,"ipv6",n.message,e);break}case"base64url":Qt(r,Lr.base64url,n.message,e);break;case"jwt":Qt(r,Lr.jwt,n.message,e);break;case"cidr":{n.version!=="v6"&&Qt(r,Lr.ipv4Cidr,n.message,e),n.version!=="v4"&&Qt(r,Lr.ipv6Cidr,n.message,e);break}case"emoji":Qt(r,Lr.emoji(),n.message,e);break;case"ulid":{Qt(r,Lr.ulid,n.message,e);break}case"base64":{switch(e.base64Strategy){case"format:binary":{Dr(r,"binary",n.message,e);break}case"contentEncoding:base64":{Ne(r,"contentEncoding","base64",n.message,e);break}case"pattern:zod":{Qt(r,Lr.base64,n.message,e);break}}break}case"nanoid":Qt(r,Lr.nanoid,n.message,e);case"toLowerCase":case"toUpperCase":case"trim":break;default:}return r}function Bd(t,e){return e.patternStrategy==="escape"?_z(t):t}var bz=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function _z(t){let e="";for(let r=0;r<t.length;r++)bz.has(t[r])||(e+="\\"),e+=t[r];return e}function Dr(t,e,r,n){var o;t.format||(o=t.anyOf)!=null&&o.some(i=>i.format)?(t.anyOf||(t.anyOf=[]),t.format&&(t.anyOf.push({format:t.format,...t.errorMessage&&n.errorMessages&&{errorMessage:{format:t.errorMessage.format}}}),delete t.format,t.errorMessage&&(delete t.errorMessage.format,Object.keys(t.errorMessage).length===0&&delete t.errorMessage)),t.anyOf.push({format:e,...r&&n.errorMessages&&{errorMessage:{format:r}}})):Ne(t,"format",e,r,n)}function Qt(t,e,r,n){var o;t.pattern||(o=t.allOf)!=null&&o.some(i=>i.pattern)?(t.allOf||(t.allOf=[]),t.pattern&&(t.allOf.push({pattern:t.pattern,...t.errorMessage&&n.errorMessages&&{errorMessage:{pattern:t.errorMessage.pattern}}}),delete t.pattern,t.errorMessage&&(delete t.errorMessage.pattern,Object.keys(t.errorMessage).length===0&&delete t.errorMessage)),t.allOf.push({pattern:Lv(e,n),...r&&n.errorMessages&&{errorMessage:{pattern:r}}})):Ne(t,"pattern",Lv(e,n),r,n)}function Lv(t,e){var c;if(!e.applyRegexFlags||!t.flags)return t.source;let r={i:t.flags.includes("i"),m:t.flags.includes("m"),s:t.flags.includes("s")},n=r.i?t.source.toLowerCase():t.source,o="",i=!1,s=!1,a=!1;for(let l=0;l<n.length;l++){if(i){o+=n[l],i=!1;continue}if(r.i){if(s){if(n[l].match(/[a-z]/)){a?(o+=n[l],o+=`${n[l-2]}-${n[l]}`.toUpperCase(),a=!1):n[l+1]==="-"&&((c=n[l+2])!=null&&c.match(/[a-z]/))?(o+=n[l],a=!0):o+=`${n[l]}${n[l].toUpperCase()}`;continue}}else if(n[l].match(/[a-z]/)){o+=`[${n[l]}${n[l].toUpperCase()}]`;continue}}if(r.m){if(n[l]==="^"){o+=`(^|(?<=[\r
|
|
49
|
-
]))`;continue}else if(
|
|
50
|
-
]))`;continue}}if(
|
|
51
|
-
`:`[${
|
|
52
|
-
]`;continue}o+=n[l],n[l]==="\\"?i=!0:s&&n[l]==="]"?s=!1:!s&&n[l]==="["&&(s=!0)}try{new RegExp(o)}catch{return console.warn(`Could not convert regex pattern at ${e.currentPath.join("/")} to a flag-independent form! Falling back to the flag-ignorant source`),t.source}return o}function Ec(t,e){var n,o,i,s,a,c;if(e.target==="openAi"&&console.warn("Warning: OpenAI may not support records in schemas! Try an array of key-value pairs instead."),e.target==="openApi3"&&((n=t.keyType)==null?void 0:n._def.typeName)===F.ZodEnum)return{type:"object",required:t.keyType._def.values,properties:t.keyType._def.values.reduce((l,p)=>({...l,[p]:pe(t.valueType._def,{...e,currentPath:[...e.currentPath,"properties",p]})??mt(e)}),{}),additionalProperties:e.rejectedAdditionalProperties};let r={type:"object",additionalProperties:pe(t.valueType._def,{...e,currentPath:[...e.currentPath,"additionalProperties"]})??e.allowedAdditionalProperties};if(e.target==="openApi3")return r;if(((o=t.keyType)==null?void 0:o._def.typeName)===F.ZodString&&((i=t.keyType._def.checks)!=null&&i.length)){let{type:l,...p}=$c(t.keyType._def,e);return{...r,propertyNames:p}}else{if(((s=t.keyType)==null?void 0:s._def.typeName)===F.ZodEnum)return{...r,propertyNames:{enum:t.keyType._def.values}};if(((a=t.keyType)==null?void 0:a._def.typeName)===F.ZodBranded&&t.keyType._def.type._def.typeName===F.ZodString&&((c=t.keyType._def.type._def.checks)!=null&&c.length)){let{type:l,...p}=kc(t.keyType._def,e);return{...r,propertyNames:p}}}return r}function Dv(t,e){if(e.mapStrategy==="record")return Ec(t,e);let r=pe(t.keyType._def,{...e,currentPath:[...e.currentPath,"items","items","0"]})||mt(e),n=pe(t.valueType._def,{...e,currentPath:[...e.currentPath,"items","items","1"]})||mt(e);return{type:"array",maxItems:125,items:{type:"array",items:[r,n],minItems:2,maxItems:2}}}function Mv(t){let e=t.values,n=Object.keys(t.values).filter(i=>typeof e[e[i]]!="number").map(i=>e[i]),o=Array.from(new Set(n.map(i=>typeof i)));return{type:o.length===1?o[0]==="string"?"string":"number":["string","number"],enum:n}}function qv(t){return t.target==="openAi"?void 0:{not:mt({...t,currentPath:[...t.currentPath,"not"]})}}function Fv(t){return t.target==="openApi3"?{enum:["null"],nullable:!0}:{type:"null"}}var ws={ZodString:"string",ZodNumber:"number",ZodBigInt:"integer",ZodBoolean:"boolean",ZodNull:"null"};function Zv(t,e){if(e.target==="openApi3")return Uv(t,e);let r=t.options instanceof Map?Array.from(t.options.values()):t.options;if(r.every(n=>n._def.typeName in ws&&(!n._def.checks||!n._def.checks.length))){let n=r.reduce((o,i)=>{let s=ws[i._def.typeName];return s&&!o.includes(s)?[...o,s]:o},[]);return{type:n.length>1?n:n[0]}}else if(r.every(n=>n._def.typeName==="ZodLiteral"&&!n.description)){let n=r.reduce((o,i)=>{let s=typeof i._def.value;switch(s){case"string":case"number":case"boolean":return[...o,s];case"bigint":return[...o,"integer"];case"object":if(i._def.value===null)return[...o,"null"];case"symbol":case"undefined":case"function":default:return o}},[]);if(n.length===r.length){let o=n.filter((i,s,a)=>a.indexOf(i)===s);return{type:o.length>1?o:o[0],enum:r.reduce((i,s)=>i.includes(s._def.value)?i:[...i,s._def.value],[])}}}else if(r.every(n=>n._def.typeName==="ZodEnum"))return{type:"string",enum:r.reduce((n,o)=>[...n,...o._def.values.filter(i=>!n.includes(i))],[])};return Uv(t,e)}var Uv=(t,e)=>{let r=(t.options instanceof Map?Array.from(t.options.values()):t.options).map((n,o)=>pe(n._def,{...e,currentPath:[...e.currentPath,"anyOf",`${o}`]})).filter(n=>!!n&&(!e.strictUnions||typeof n=="object"&&Object.keys(n).length>0));return r.length?{anyOf:r}:void 0};function Bv(t,e){if(["ZodString","ZodNumber","ZodBigInt","ZodBoolean","ZodNull"].includes(t.innerType._def.typeName)&&(!t.innerType._def.checks||!t.innerType._def.checks.length))return e.target==="openApi3"?{type:ws[t.innerType._def.typeName],nullable:!0}:{type:[ws[t.innerType._def.typeName],"null"]};if(e.target==="openApi3"){let n=pe(t.innerType._def,{...e,currentPath:[...e.currentPath]});return n&&"$ref"in n?{allOf:[n],nullable:!0}:n&&{...n,nullable:!0}}let r=pe(t.innerType._def,{...e,currentPath:[...e.currentPath,"anyOf","0"]});return r&&{anyOf:[r,{type:"null"}]}}function Hv(t,e){let r={type:"number"};if(!t.checks)return r;for(let n of t.checks)switch(n.kind){case"int":r.type="integer",Fd(r,"type",n.message,e);break;case"min":e.target==="jsonSchema7"?n.inclusive?Ne(r,"minimum",n.value,n.message,e):Ne(r,"exclusiveMinimum",n.value,n.message,e):(n.inclusive||(r.exclusiveMinimum=!0),Ne(r,"minimum",n.value,n.message,e));break;case"max":e.target==="jsonSchema7"?n.inclusive?Ne(r,"maximum",n.value,n.message,e):Ne(r,"exclusiveMaximum",n.value,n.message,e):(n.inclusive||(r.exclusiveMaximum=!0),Ne(r,"maximum",n.value,n.message,e));break;case"multipleOf":Ne(r,"multipleOf",n.value,n.message,e);break}return r}function Vv(t,e){let r=e.target==="openAi",n={type:"object",properties:{}},o=[],i=t.shape();for(let a in i){let c=i[a];if(c===void 0||c._def===void 0)continue;let l=Sz(c);l&&r&&(c._def.typeName==="ZodOptional"&&(c=c._def.innerType),c.isNullable()||(c=c.nullable()),l=!1);let p=pe(c._def,{...e,currentPath:[...e.currentPath,"properties",a],propertyPath:[...e.currentPath,"properties",a]});p!==void 0&&(n.properties[a]=p,l||o.push(a))}o.length&&(n.required=o);let s=wz(t,e);return s!==void 0&&(n.additionalProperties=s),n}function wz(t,e){if(t.catchall._def.typeName!=="ZodNever")return pe(t.catchall._def,{...e,currentPath:[...e.currentPath,"additionalProperties"]});switch(t.unknownKeys){case"passthrough":return e.allowedAdditionalProperties;case"strict":return e.rejectedAdditionalProperties;case"strip":return e.removeAdditionalStrategy==="strict"?e.allowedAdditionalProperties:e.rejectedAdditionalProperties}}function Sz(t){try{return t.isOptional()}catch{return!0}}var Gv=(t,e)=>{var n;if(e.currentPath.toString()===((n=e.propertyPath)==null?void 0:n.toString()))return pe(t.innerType._def,e);let r=pe(t.innerType._def,{...e,currentPath:[...e.currentPath,"anyOf","1"]});return r?{anyOf:[{not:mt(e)},r]}:mt(e)};var Wv=(t,e)=>{if(e.pipeStrategy==="input")return pe(t.in._def,e);if(e.pipeStrategy==="output")return pe(t.out._def,e);let r=pe(t.in._def,{...e,currentPath:[...e.currentPath,"allOf","0"]}),n=pe(t.out._def,{...e,currentPath:[...e.currentPath,"allOf",r?"1":"0"]});return{allOf:[r,n].filter(o=>o!==void 0)}};function Kv(t,e){return pe(t.type._def,e)}function Jv(t,e){let n={type:"array",uniqueItems:!0,items:pe(t.valueType._def,{...e,currentPath:[...e.currentPath,"items"]})};return t.minSize&&Ne(n,"minItems",t.minSize.value,t.minSize.message,e),t.maxSize&&Ne(n,"maxItems",t.maxSize.value,t.maxSize.message,e),n}function Yv(t,e){return t.rest?{type:"array",minItems:t.items.length,items:t.items.map((r,n)=>pe(r._def,{...e,currentPath:[...e.currentPath,"items",`${n}`]})).reduce((r,n)=>n===void 0?r:[...r,n],[]),additionalItems:pe(t.rest._def,{...e,currentPath:[...e.currentPath,"additionalItems"]})}:{type:"array",minItems:t.items.length,maxItems:t.items.length,items:t.items.map((r,n)=>pe(r._def,{...e,currentPath:[...e.currentPath,"items",`${n}`]})).reduce((r,n)=>n===void 0?r:[...r,n],[])}}function Xv(t){return{not:mt(t)}}function Qv(t){return mt(t)}var eb=(t,e)=>pe(t.innerType._def,e);var tb=(t,e,r)=>{switch(e){case F.ZodString:return $c(t,r);case F.ZodNumber:return Hv(t,r);case F.ZodObject:return Vv(t,r);case F.ZodBigInt:return Pv(t,r);case F.ZodBoolean:return Av();case F.ZodDate:return Ud(t,r);case F.ZodUndefined:return Xv(r);case F.ZodNull:return Fv(r);case F.ZodArray:return Rv(t,r);case F.ZodUnion:case F.ZodDiscriminatedUnion:return Zv(t,r);case F.ZodIntersection:return Nv(t,r);case F.ZodTuple:return Yv(t,r);case F.ZodRecord:return Ec(t,r);case F.ZodLiteral:return jv(t,r);case F.ZodEnum:return Ov(t);case F.ZodNativeEnum:return Mv(t);case F.ZodNullable:return Bv(t,r);case F.ZodOptional:return Gv(t,r);case F.ZodMap:return Dv(t,r);case F.ZodSet:return Jv(t,r);case F.ZodLazy:return()=>t.getter()._def;case F.ZodPromise:return Kv(t,r);case F.ZodNaN:case F.ZodNever:return qv(r);case F.ZodEffects:return Cv(t,r);case F.ZodAny:return mt(r);case F.ZodUnknown:return Qv(r);case F.ZodDefault:return zv(t,r);case F.ZodBranded:return kc(t,r);case F.ZodReadonly:return eb(t,r);case F.ZodCatch:return Iv(t,r);case F.ZodPipeline:return Wv(t,r);case F.ZodFunction:case F.ZodVoid:case F.ZodSymbol:return;default:return(n=>{})(e)}};function pe(t,e,r=!1){var a;let n=e.seen.get(t);if(e.override){let c=(a=e.override)==null?void 0:a.call(e,t,e,n,r);if(c!==$v)return c}if(n&&!r){let c=kz(n,e);if(c!==void 0)return c}let o={def:t,path:e.currentPath,jsonSchema:void 0};e.seen.set(t,o);let i=tb(t,t.typeName,e),s=typeof i=="function"?pe(i(),e):i;if(s&&$z(t,e,s),e.postProcess){let c=e.postProcess(s,t,e);return o.jsonSchema=s,c}return o.jsonSchema=s,s}var kz=(t,e)=>{switch(e.$refStrategy){case"root":return{$ref:t.path.join("/")};case"relative":return{$ref:Sc(e.currentPath,t.path)};case"none":case"seen":return t.path.length<e.currentPath.length&&t.path.every((r,n)=>e.currentPath[n]===r)?(console.warn(`Recursive reference detected at ${e.currentPath.join("/")}! Defaulting to any`),mt(e)):e.$refStrategy==="seen"?mt(e):void 0}},$z=(t,e,r)=>(t.description&&(r.description=t.description,e.markdownDescription&&(r.markdownDescription=t.description)),r);var Hd=(t,e)=>{let r=Tv(e),n=typeof e=="object"&&e.definitions?Object.entries(e.definitions).reduce((c,[l,p])=>({...c,[l]:pe(p._def,{...r,currentPath:[...r.basePath,r.definitionPath,l]},!0)??mt(r)}),{}):void 0,o=typeof e=="string"?e:(e==null?void 0:e.nameStrategy)==="title"||e==null?void 0:e.name,i=pe(t._def,o===void 0?r:{...r,currentPath:[...r.basePath,r.definitionPath,o]},!1)??mt(r),s=typeof e=="object"&&e.name!==void 0&&e.nameStrategy==="title"?e.name:void 0;s!==void 0&&(i.title=s),r.flags.hasReferencedOpenAiAnyType&&(n||(n={}),n[r.openAiAnyTypeName]||(n[r.openAiAnyTypeName]={type:["string","number","integer","boolean","array","null"],items:{$ref:r.$refStrategy==="relative"?"1":[...r.basePath,r.definitionPath,r.openAiAnyTypeName].join("/")}}));let a=o===void 0?n?{...i,[r.definitionPath]:n}:i:{$ref:[...r.$refStrategy==="relative"?[]:r.basePath,r.definitionPath,o].join("/"),[r.definitionPath]:{...n,[o]:i}};return r.target==="jsonSchema7"?a.$schema="http://json-schema.org/draft-07/schema#":(r.target==="jsonSchema2019-09"||r.target==="openAi")&&(a.$schema="https://json-schema.org/draft/2019-09/schema#"),r.target==="openAi"&&("anyOf"in a||"oneOf"in a||"allOf"in a||"type"in a&&Array.isArray(a.type))&&console.warn("Warning: OpenAI may not support schemas with unions as roots! Try wrapping it in an object property."),a};function Ez(t){return!t||t==="jsonSchema7"||t==="draft-7"?"draft-7":t==="jsonSchema2019-09"||t==="draft-2020-12"?"draft-2020-12":"draft-7"}function Vd(t,e){return Sr(t)?md(t,{target:Ez(e==null?void 0:e.target),io:(e==null?void 0:e.pipeStrategy)??"input"}):Hd(t,{strictUnions:(e==null?void 0:e.strictUnions)??!0,pipeStrategy:(e==null?void 0:e.pipeStrategy)??"input"})}function Gd(t){let e=Pn(t),r=e==null?void 0:e.method;if(!r)throw new Error("Schema is missing a method literal");let n=Qa(r);if(typeof n!="string")throw new Error("Schema method literal must be a string");return n}function Wd(t,e){let r=Rn(t,e);if(!r.success)throw r.error;return r.data}var Tz=6e4,Tc=class{constructor(e){this._options=e,this._requestMessageId=0,this._requestHandlers=new Map,this._requestHandlerAbortControllers=new Map,this._notificationHandlers=new Map,this._responseHandlers=new Map,this._progressHandlers=new Map,this._timeoutInfo=new Map,this._pendingDebouncedNotifications=new Set,this._taskProgressTokens=new Map,this._requestResolvers=new Map,this.setNotificationHandler(sc,r=>{this._oncancel(r)}),this.setNotificationHandler(cc,r=>{this._onprogress(r)}),this.setRequestHandler(ac,r=>({})),this._taskStore=e==null?void 0:e.taskStore,this._taskMessageQueue=e==null?void 0:e.taskMessageQueue,this._taskStore&&(this.setRequestHandler(lc,async(r,n)=>{let o=await this._taskStore.getTask(r.params.taskId,n.sessionId);if(!o)throw new te(ie.InvalidParams,"Failed to retrieve task: Task not found");return{...o}}),this.setRequestHandler(pc,async(r,n)=>{let o=async()=>{var a;let i=r.params.taskId;if(this._taskMessageQueue){let c;for(;c=await this._taskMessageQueue.dequeue(i,n.sessionId);){if(c.type==="response"||c.type==="error"){let l=c.message,p=l.id,d=this._requestResolvers.get(p);if(d)if(this._requestResolvers.delete(p),c.type==="response")d(l);else{let f=l,m=new te(f.error.code,f.error.message,f.error.data);d(m)}else{let f=c.type==="response"?"Response":"Error";this._onerror(new Error(`${f} handler missing for request ${p}`))}continue}await((a=this._transport)==null?void 0:a.send(c.message,{relatedRequestId:n.requestId}))}}let s=await this._taskStore.getTask(i,n.sessionId);if(!s)throw new te(ie.InvalidParams,`Task not found: ${i}`);if(!In(s.status))return await this._waitForTaskUpdate(i,n.signal),await o();if(In(s.status)){let c=await this._taskStore.getTaskResult(i,n.sessionId);return this._clearTaskQueue(i),{...c,_meta:{...c._meta,[An]:{taskId:i}}}}return await o()};return await o()}),this.setRequestHandler(dc,async(r,n)=>{var o;try{let{tasks:i,nextCursor:s}=await this._taskStore.listTasks((o=r.params)==null?void 0:o.cursor,n.sessionId);return{tasks:i,nextCursor:s,_meta:{}}}catch(i){throw new te(ie.InvalidParams,`Failed to list tasks: ${i instanceof Error?i.message:String(i)}`)}}),this.setRequestHandler(mc,async(r,n)=>{try{let o=await this._taskStore.getTask(r.params.taskId,n.sessionId);if(!o)throw new te(ie.InvalidParams,`Task not found: ${r.params.taskId}`);if(In(o.status))throw new te(ie.InvalidParams,`Cannot cancel task in terminal status: ${o.status}`);await this._taskStore.updateTaskStatus(r.params.taskId,"cancelled","Client cancelled task execution.",n.sessionId),this._clearTaskQueue(r.params.taskId);let i=await this._taskStore.getTask(r.params.taskId,n.sessionId);if(!i)throw new te(ie.InvalidParams,`Task not found after cancellation: ${r.params.taskId}`);return{_meta:{},...i}}catch(o){throw o instanceof te?o:new te(ie.InvalidRequest,`Failed to cancel task: ${o instanceof Error?o.message:String(o)}`)}}))}async _oncancel(e){if(!e.params.requestId)return;let r=this._requestHandlerAbortControllers.get(e.params.requestId);r==null||r.abort(e.params.reason)}_setupTimeout(e,r,n,o,i=!1){this._timeoutInfo.set(e,{timeoutId:setTimeout(o,r),startTime:Date.now(),timeout:r,maxTotalTimeout:n,resetTimeoutOnProgress:i,onTimeout:o})}_resetTimeout(e){let r=this._timeoutInfo.get(e);if(!r)return!1;let n=Date.now()-r.startTime;if(r.maxTotalTimeout&&n>=r.maxTotalTimeout)throw this._timeoutInfo.delete(e),te.fromError(ie.RequestTimeout,"Maximum total timeout exceeded",{maxTotalTimeout:r.maxTotalTimeout,totalElapsed:n});return clearTimeout(r.timeoutId),r.timeoutId=setTimeout(r.onTimeout,r.timeout),!0}_cleanupTimeout(e){let r=this._timeoutInfo.get(e);r&&(clearTimeout(r.timeoutId),this._timeoutInfo.delete(e))}async connect(e){var i,s,a;if(this._transport)throw new Error("Already connected to a transport. Call close() before connecting to a new transport, or use a separate Protocol instance per connection.");this._transport=e;let r=(i=this.transport)==null?void 0:i.onclose;this._transport.onclose=()=>{r==null||r(),this._onclose()};let n=(s=this.transport)==null?void 0:s.onerror;this._transport.onerror=c=>{n==null||n(c),this._onerror(c)};let o=(a=this._transport)==null?void 0:a.onmessage;this._transport.onmessage=(c,l)=>{o==null||o(c,l),fs(c)||fv(c)?this._onresponse(c):Td(c)?this._onrequest(c,l):dv(c)?this._onnotification(c):this._onerror(new Error(`Unknown message type: ${JSON.stringify(c)}`))},await this._transport.start()}_onclose(){var n;let e=this._responseHandlers;this._responseHandlers=new Map,this._progressHandlers.clear(),this._taskProgressTokens.clear(),this._pendingDebouncedNotifications.clear();for(let o of this._timeoutInfo.values())clearTimeout(o.timeoutId);this._timeoutInfo.clear();for(let o of this._requestHandlerAbortControllers.values())o.abort();this._requestHandlerAbortControllers.clear();let r=te.fromError(ie.ConnectionClosed,"Connection closed");this._transport=void 0,(n=this.onclose)==null||n.call(this);for(let o of e.values())o(r)}_onerror(e){var r;(r=this.onerror)==null||r.call(this,e)}_onnotification(e){let r=this._notificationHandlers.get(e.method)??this.fallbackNotificationHandler;r!==void 0&&Promise.resolve().then(()=>r(e)).catch(n=>this._onerror(new Error(`Uncaught error in notification handler: ${n}`)))}_onrequest(e,r){var p,d,f,m;let n=this._requestHandlers.get(e.method)??this.fallbackRequestHandler,o=this._transport,i=(f=(d=(p=e.params)==null?void 0:p._meta)==null?void 0:d[An])==null?void 0:f.taskId;if(n===void 0){let y={jsonrpc:"2.0",id:e.id,error:{code:ie.MethodNotFound,message:"Method not found"}};i&&this._taskMessageQueue?this._enqueueTaskMessage(i,{type:"error",message:y,timestamp:Date.now()},o==null?void 0:o.sessionId).catch(v=>this._onerror(new Error(`Failed to enqueue error response: ${v}`))):o==null||o.send(y).catch(v=>this._onerror(new Error(`Failed to send an error response: ${v}`)));return}let s=new AbortController;this._requestHandlerAbortControllers.set(e.id,s);let a=lv(e.params)?e.params.task:void 0,c=this._taskStore?this.requestTaskStore(e,o==null?void 0:o.sessionId):void 0,l={signal:s.signal,sessionId:o==null?void 0:o.sessionId,_meta:(m=e.params)==null?void 0:m._meta,sendNotification:async y=>{if(s.signal.aborted)return;let v={relatedRequestId:e.id};i&&(v.relatedTask={taskId:i}),await this.notification(y,v)},sendRequest:async(y,v,x)=>{var w;if(s.signal.aborted)throw new te(ie.ConnectionClosed,"Request was cancelled");let g={...x,relatedRequestId:e.id};i&&!g.relatedTask&&(g.relatedTask={taskId:i});let _=((w=g.relatedTask)==null?void 0:w.taskId)??i;return _&&c&&await c.updateTaskStatus(_,"input_required"),await this.request(y,v,g)},authInfo:r==null?void 0:r.authInfo,requestId:e.id,requestInfo:r==null?void 0:r.requestInfo,taskId:i,taskStore:c,taskRequestedTtl:a==null?void 0:a.ttl,closeSSEStream:r==null?void 0:r.closeSSEStream,closeStandaloneSSEStream:r==null?void 0:r.closeStandaloneSSEStream};Promise.resolve().then(()=>{a&&this.assertTaskHandlerCapability(e.method)}).then(()=>n(e,l)).then(async y=>{if(s.signal.aborted)return;let v={result:y,jsonrpc:"2.0",id:e.id};i&&this._taskMessageQueue?await this._enqueueTaskMessage(i,{type:"response",message:v,timestamp:Date.now()},o==null?void 0:o.sessionId):await(o==null?void 0:o.send(v))},async y=>{if(s.signal.aborted)return;let v={jsonrpc:"2.0",id:e.id,error:{code:Number.isSafeInteger(y.code)?y.code:ie.InternalError,message:y.message??"Internal error",...y.data!==void 0&&{data:y.data}}};i&&this._taskMessageQueue?await this._enqueueTaskMessage(i,{type:"error",message:v,timestamp:Date.now()},o==null?void 0:o.sessionId):await(o==null?void 0:o.send(v))}).catch(y=>this._onerror(new Error(`Failed to send response: ${y}`))).finally(()=>{this._requestHandlerAbortControllers.get(e.id)===s&&this._requestHandlerAbortControllers.delete(e.id)})}_onprogress(e){let{progressToken:r,...n}=e.params,o=Number(r),i=this._progressHandlers.get(o);if(!i){this._onerror(new Error(`Received a progress notification for an unknown token: ${JSON.stringify(e)}`));return}let s=this._responseHandlers.get(o),a=this._timeoutInfo.get(o);if(a&&s&&a.resetTimeoutOnProgress)try{this._resetTimeout(o)}catch(c){this._responseHandlers.delete(o),this._progressHandlers.delete(o),this._cleanupTimeout(o),s(c);return}i(n)}_onresponse(e){let r=Number(e.id),n=this._requestResolvers.get(r);if(n){if(this._requestResolvers.delete(r),fs(e))n(e);else{let s=new te(e.error.code,e.error.message,e.error.data);n(s)}return}let o=this._responseHandlers.get(r);if(o===void 0){this._onerror(new Error(`Received a response for an unknown message ID: ${JSON.stringify(e)}`));return}this._responseHandlers.delete(r),this._cleanupTimeout(r);let i=!1;if(fs(e)&&e.result&&typeof e.result=="object"){let s=e.result;if(s.task&&typeof s.task=="object"){let a=s.task;typeof a.taskId=="string"&&(i=!0,this._taskProgressTokens.set(a.taskId,r))}}if(i||this._progressHandlers.delete(r),fs(e))o(e);else{let s=te.fromError(e.error.code,e.error.message,e.error.data);o(s)}}get transport(){return this._transport}async close(){var e;await((e=this._transport)==null?void 0:e.close())}async*requestStream(e,r,n){var s,a;let{task:o}=n??{};if(!o){try{yield{type:"result",result:await this.request(e,r,n)}}catch(c){yield{type:"error",error:c instanceof te?c:new te(ie.InternalError,String(c))}}return}let i;try{let c=await this.request(e,ni,n);if(c.task)i=c.task.taskId,yield{type:"taskCreated",task:c.task};else throw new te(ie.InternalError,"Task creation did not return a task");for(;;){let l=await this.getTask({taskId:i},n);if(yield{type:"taskStatus",task:l},In(l.status)){l.status==="completed"?yield{type:"result",result:await this.getTaskResult({taskId:i},r,n)}:l.status==="failed"?yield{type:"error",error:new te(ie.InternalError,`Task ${i} failed`)}:l.status==="cancelled"&&(yield{type:"error",error:new te(ie.InternalError,`Task ${i} was cancelled`)});return}if(l.status==="input_required"){yield{type:"result",result:await this.getTaskResult({taskId:i},r,n)};return}let p=l.pollInterval??((s=this._options)==null?void 0:s.defaultTaskPollInterval)??1e3;await new Promise(d=>setTimeout(d,p)),(a=n==null?void 0:n.signal)==null||a.throwIfAborted()}}catch(c){yield{type:"error",error:c instanceof te?c:new te(ie.InternalError,String(c))}}}request(e,r,n){let{relatedRequestId:o,resumptionToken:i,onresumptiontoken:s,task:a,relatedTask:c}=n??{};return new Promise((l,p)=>{var _,w,$,E,Z;let d=q=>{p(q)};if(!this._transport){d(new Error("Not connected"));return}if(((_=this._options)==null?void 0:_.enforceStrictCapabilities)===!0)try{this.assertCapabilityForMethod(e.method),a&&this.assertTaskCapability(e.method)}catch(q){d(q);return}(w=n==null?void 0:n.signal)==null||w.throwIfAborted();let f=this._requestMessageId++,m={...e,jsonrpc:"2.0",id:f};n!=null&&n.onprogress&&(this._progressHandlers.set(f,n.onprogress),m.params={...e.params,_meta:{...(($=e.params)==null?void 0:$._meta)||{},progressToken:f}}),a&&(m.params={...m.params,task:a}),c&&(m.params={...m.params,_meta:{...((E=m.params)==null?void 0:E._meta)||{},[An]:c}});let y=q=>{var Pe;this._responseHandlers.delete(f),this._progressHandlers.delete(f),this._cleanupTimeout(f),(Pe=this._transport)==null||Pe.send({jsonrpc:"2.0",method:"notifications/cancelled",params:{requestId:f,reason:String(q)}},{relatedRequestId:o,resumptionToken:i,onresumptiontoken:s}).catch(le=>this._onerror(new Error(`Failed to send cancellation: ${le}`)));let $e=q instanceof te?q:new te(ie.RequestTimeout,String(q));p($e)};this._responseHandlers.set(f,q=>{var $e;if(!(($e=n==null?void 0:n.signal)!=null&&$e.aborted)){if(q instanceof Error)return p(q);try{let Pe=Rn(r,q.result);Pe.success?l(Pe.data):p(Pe.error)}catch(Pe){p(Pe)}}}),(Z=n==null?void 0:n.signal)==null||Z.addEventListener("abort",()=>{var q;y((q=n==null?void 0:n.signal)==null?void 0:q.reason)});let v=(n==null?void 0:n.timeout)??Tz,x=()=>y(te.fromError(ie.RequestTimeout,"Request timed out",{timeout:v}));this._setupTimeout(f,v,n==null?void 0:n.maxTotalTimeout,x,(n==null?void 0:n.resetTimeoutOnProgress)??!1);let g=c==null?void 0:c.taskId;if(g){let q=$e=>{let Pe=this._responseHandlers.get(f);Pe?Pe($e):this._onerror(new Error(`Response handler missing for side-channeled request ${f}`))};this._requestResolvers.set(f,q),this._enqueueTaskMessage(g,{type:"request",message:m,timestamp:Date.now()}).catch($e=>{this._cleanupTimeout(f),p($e)})}else this._transport.send(m,{relatedRequestId:o,resumptionToken:i,onresumptiontoken:s}).catch(q=>{this._cleanupTimeout(f),p(q)})})}async getTask(e,r){return this.request({method:"tasks/get",params:e},uc,r)}async getTaskResult(e,r,n){return this.request({method:"tasks/result",params:e},r,n)}async listTasks(e,r){return this.request({method:"tasks/list",params:e},fc,r)}async cancelTask(e,r){return this.request({method:"tasks/cancel",params:e},gv,r)}async notification(e,r){var a,c,l,p;if(!this._transport)throw new Error("Not connected");this.assertNotificationCapability(e.method);let n=(a=r==null?void 0:r.relatedTask)==null?void 0:a.taskId;if(n){let d={...e,jsonrpc:"2.0",params:{...e.params,_meta:{...((c=e.params)==null?void 0:c._meta)||{},[An]:r.relatedTask}}};await this._enqueueTaskMessage(n,{type:"notification",message:d,timestamp:Date.now()});return}if((((l=this._options)==null?void 0:l.debouncedNotificationMethods)??[]).includes(e.method)&&!e.params&&!(r!=null&&r.relatedRequestId)&&!(r!=null&&r.relatedTask)){if(this._pendingDebouncedNotifications.has(e.method))return;this._pendingDebouncedNotifications.add(e.method),Promise.resolve().then(()=>{var f,m;if(this._pendingDebouncedNotifications.delete(e.method),!this._transport)return;let d={...e,jsonrpc:"2.0"};r!=null&&r.relatedTask&&(d={...d,params:{...d.params,_meta:{...((f=d.params)==null?void 0:f._meta)||{},[An]:r.relatedTask}}}),(m=this._transport)==null||m.send(d,r).catch(y=>this._onerror(y))});return}let s={...e,jsonrpc:"2.0"};r!=null&&r.relatedTask&&(s={...s,params:{...s.params,_meta:{...((p=s.params)==null?void 0:p._meta)||{},[An]:r.relatedTask}}}),await this._transport.send(s,r)}setRequestHandler(e,r){let n=Gd(e);this.assertRequestHandlerCapability(n),this._requestHandlers.set(n,(o,i)=>{let s=Wd(e,o);return Promise.resolve(r(s,i))})}removeRequestHandler(e){this._requestHandlers.delete(e)}assertCanSetRequestHandler(e){if(this._requestHandlers.has(e))throw new Error(`A request handler for ${e} already exists, which would be overridden`)}setNotificationHandler(e,r){let n=Gd(e);this._notificationHandlers.set(n,o=>{let i=Wd(e,o);return Promise.resolve(r(i))})}removeNotificationHandler(e){this._notificationHandlers.delete(e)}_cleanupTaskProgressHandler(e){let r=this._taskProgressTokens.get(e);r!==void 0&&(this._progressHandlers.delete(r),this._taskProgressTokens.delete(e))}async _enqueueTaskMessage(e,r,n){var i;if(!this._taskStore||!this._taskMessageQueue)throw new Error("Cannot enqueue task message: taskStore and taskMessageQueue are not configured");let o=(i=this._options)==null?void 0:i.maxTaskQueueSize;await this._taskMessageQueue.enqueue(e,r,n,o)}async _clearTaskQueue(e,r){if(this._taskMessageQueue){let n=await this._taskMessageQueue.dequeueAll(e,r);for(let o of n)if(o.type==="request"&&Td(o.message)){let i=o.message.id,s=this._requestResolvers.get(i);s?(s(new te(ie.InternalError,"Task cancelled or completed")),this._requestResolvers.delete(i)):this._onerror(new Error(`Resolver missing for request ${i} during task ${e} cleanup`))}}}async _waitForTaskUpdate(e,r){var o,i;let n=((o=this._options)==null?void 0:o.defaultTaskPollInterval)??1e3;try{let s=await((i=this._taskStore)==null?void 0:i.getTask(e));s!=null&&s.pollInterval&&(n=s.pollInterval)}catch{}return new Promise((s,a)=>{if(r.aborted){a(new te(ie.InvalidRequest,"Request cancelled"));return}let c=setTimeout(s,n);r.addEventListener("abort",()=>{clearTimeout(c),a(new te(ie.InvalidRequest,"Request cancelled"))},{once:!0})})}requestTaskStore(e,r){let n=this._taskStore;if(!n)throw new Error("No task store configured");return{createTask:async o=>{if(!e)throw new Error("No request provided");return await n.createTask(o,e.id,{method:e.method,params:e.params},r)},getTask:async o=>{let i=await n.getTask(o,r);if(!i)throw new te(ie.InvalidParams,"Failed to retrieve task: Task not found");return i},storeTaskResult:async(o,i,s)=>{await n.storeTaskResult(o,i,s,r);let a=await n.getTask(o,r);if(a){let c=xs.parse({method:"notifications/tasks/status",params:a});await this.notification(c),In(a.status)&&this._cleanupTaskProgressHandler(o)}},getTaskResult:o=>n.getTaskResult(o,r),updateTaskStatus:async(o,i,s)=>{let a=await n.getTask(o,r);if(!a)throw new te(ie.InvalidParams,`Task "${o}" not found - it may have been cleaned up`);if(In(a.status))throw new te(ie.InvalidParams,`Cannot update task "${o}" from terminal status "${a.status}" to "${i}". Terminal states (completed, failed, cancelled) cannot transition to other states.`);await n.updateTaskStatus(o,i,s,r);let c=await n.getTask(o,r);if(c){let l=xs.parse({method:"notifications/tasks/status",params:c});await this.notification(l),In(c.status)&&this._cleanupTaskProgressHandler(o)}},listTasks:o=>n.listTasks(o,r)}}};function rb(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)}function nb(t,e){let r={...t};for(let n in e){let o=n,i=e[o];if(i===void 0)continue;let s=r[o];rb(s)&&rb(i)?r[o]={...s,...i}:r[o]=i}return r}var Ww=Ee(Nm(),1),Kw=Ee(Gw(),1);function AL(){let t=new Ww.default({strict:!1,validateFormats:!0,validateSchema:!1,allErrors:!0});return(0,Kw.default)(t),t}var cl=class{constructor(e){this._ajv=e??AL()}getValidator(e){let r="$id"in e&&typeof e.$id=="string"?this._ajv.getSchema(e.$id)??this._ajv.compile(e):this._ajv.compile(e);return n=>r(n)?{valid:!0,data:n,errorMessage:void 0}:{valid:!1,data:void 0,errorMessage:this._ajv.errorsText(r.errors)}}};var ll=class{constructor(e){this._server=e}requestStream(e,r,n){return this._server.requestStream(e,r,n)}createMessageStream(e,r){var o;let n=this._server.getClientCapabilities();if((e.tools||e.toolChoice)&&!((o=n==null?void 0:n.sampling)!=null&&o.tools))throw new Error("Client does not support sampling tools capability.");if(e.messages.length>0){let i=e.messages[e.messages.length-1],s=Array.isArray(i.content)?i.content:[i.content],a=s.some(d=>d.type==="tool_result"),c=e.messages.length>1?e.messages[e.messages.length-2]:void 0,l=c?Array.isArray(c.content)?c.content:[c.content]:[],p=l.some(d=>d.type==="tool_use");if(a){if(s.some(d=>d.type!=="tool_result"))throw new Error("The last message must contain only tool_result content if any is present");if(!p)throw new Error("tool_result blocks are not matching any tool_use from the previous message")}if(p){let d=new Set(l.filter(m=>m.type==="tool_use").map(m=>m.id)),f=new Set(s.filter(m=>m.type==="tool_result").map(m=>m.toolUseId));if(d.size!==f.size||![...d].every(m=>f.has(m)))throw new Error("ids of tool_result blocks and tool_use blocks from previous message do not match")}}return this.requestStream({method:"sampling/createMessage",params:e},_s,r)}elicitInputStream(e,r){var s,a;let n=this._server.getClientCapabilities(),o=e.mode??"form";switch(o){case"url":{if(!((s=n==null?void 0:n.elicitation)!=null&&s.url))throw new Error("Client does not support url elicitation.");break}case"form":{if(!((a=n==null?void 0:n.elicitation)!=null&&a.form))throw new Error("Client does not support form elicitation.");break}}let i=o==="form"&&e.mode===void 0?{...e,mode:"form"}:e;return this.requestStream({method:"elicitation/create",params:i},si,r)}async getTask(e,r){return this._server.getTask({taskId:e},r)}async getTaskResult(e,r,n){return this._server.getTaskResult({taskId:e},r,n)}async listTasks(e,r){return this._server.listTasks(e?{cursor:e}:void 0,r)}async cancelTask(e,r){return this._server.cancelTask({taskId:e},r)}};function Jw(t,e,r){var n;if(!t)throw new Error(`${r} does not support task creation (required for ${e})`);switch(e){case"tools/call":if(!((n=t.tools)!=null&&n.call))throw new Error(`${r} does not support task creation for tools/call (required for ${e})`);break;default:break}}function Yw(t,e,r){var n,o;if(!t)throw new Error(`${r} does not support task creation (required for ${e})`);switch(e){case"sampling/createMessage":if(!((n=t.sampling)!=null&&n.createMessage))throw new Error(`${r} does not support task creation for sampling/createMessage (required for ${e})`);break;case"elicitation/create":if(!((o=t.elicitation)!=null&&o.create))throw new Error(`${r} does not support task creation for elicitation/create (required for ${e})`);break;default:break}}var ul=class extends Tc{constructor(e,r){super(r),this._serverInfo=e,this._loggingLevels=new Map,this.LOG_LEVEL_SEVERITY=new Map(bs.options.map((n,o)=>[n,o])),this.isMessageIgnored=(n,o)=>{let i=this._loggingLevels.get(o);return i?this.LOG_LEVEL_SEVERITY.get(n)<this.LOG_LEVEL_SEVERITY.get(i):!1},this._capabilities=(r==null?void 0:r.capabilities)??{},this._instructions=r==null?void 0:r.instructions,this._jsonSchemaValidator=(r==null?void 0:r.jsonSchemaValidator)??new cl,this.setRequestHandler(Ad,n=>this._oninitialize(n)),this.setNotificationHandler(Id,()=>{var n;return(n=this.oninitialized)==null?void 0:n.call(this)}),this._capabilities.logging&&this.setRequestHandler(Dd,async(n,o)=>{var c;let i=o.sessionId||((c=o.requestInfo)==null?void 0:c.headers["mcp-session-id"])||void 0,{level:s}=n.params,a=bs.safeParse(s);return a.success&&this._loggingLevels.set(i,a.data),{}})}get experimental(){return this._experimental||(this._experimental={tasks:new ll(this)}),this._experimental}registerCapabilities(e){if(this.transport)throw new Error("Cannot register capabilities after connecting to transport");this._capabilities=nb(this._capabilities,e)}setRequestHandler(e,r){var a;let n=Pn(e),o=n==null?void 0:n.method;if(!o)throw new Error("Schema is missing a method literal");let i;if(Sr(o)){let c=o,l=(a=c._zod)==null?void 0:a.def;i=(l==null?void 0:l.value)??c.value}else{let c=o,l=c._def;i=(l==null?void 0:l.value)??c.value}if(typeof i!="string")throw new Error("Schema method literal must be a string");if(i==="tools/call"){let c=async(l,p)=>{let d=Rn(ii,l);if(!d.success){let v=d.error instanceof Error?d.error.message:String(d.error);throw new te(ie.InvalidParams,`Invalid tools/call request: ${v}`)}let{params:f}=d.data,m=await Promise.resolve(r(l,p));if(f.task){let v=Rn(ni,m);if(!v.success){let x=v.error instanceof Error?v.error.message:String(v.error);throw new te(ie.InvalidParams,`Invalid task creation result: ${x}`)}return v.data}let y=Rn(_c,m);if(!y.success){let v=y.error instanceof Error?y.error.message:String(y.error);throw new te(ie.InvalidParams,`Invalid tools/call result: ${v}`)}return y.data};return super.setRequestHandler(e,c)}return super.setRequestHandler(e,r)}assertCapabilityForMethod(e){var r,n,o;switch(e){case"sampling/createMessage":if(!((r=this._clientCapabilities)!=null&&r.sampling))throw new Error(`Client does not support sampling (required for ${e})`);break;case"elicitation/create":if(!((n=this._clientCapabilities)!=null&&n.elicitation))throw new Error(`Client does not support elicitation (required for ${e})`);break;case"roots/list":if(!((o=this._clientCapabilities)!=null&&o.roots))throw new Error(`Client does not support listing roots (required for ${e})`);break;case"ping":break}}assertNotificationCapability(e){var r,n;switch(e){case"notifications/message":if(!this._capabilities.logging)throw new Error(`Server does not support logging (required for ${e})`);break;case"notifications/resources/updated":case"notifications/resources/list_changed":if(!this._capabilities.resources)throw new Error(`Server does not support notifying about resources (required for ${e})`);break;case"notifications/tools/list_changed":if(!this._capabilities.tools)throw new Error(`Server does not support notifying of tool list changes (required for ${e})`);break;case"notifications/prompts/list_changed":if(!this._capabilities.prompts)throw new Error(`Server does not support notifying of prompt list changes (required for ${e})`);break;case"notifications/elicitation/complete":if(!((n=(r=this._clientCapabilities)==null?void 0:r.elicitation)!=null&&n.url))throw new Error(`Client does not support URL elicitation (required for ${e})`);break;case"notifications/cancelled":break;case"notifications/progress":break}}assertRequestHandlerCapability(e){if(this._capabilities)switch(e){case"completion/complete":if(!this._capabilities.completions)throw new Error(`Server does not support completions (required for ${e})`);break;case"logging/setLevel":if(!this._capabilities.logging)throw new Error(`Server does not support logging (required for ${e})`);break;case"prompts/get":case"prompts/list":if(!this._capabilities.prompts)throw new Error(`Server does not support prompts (required for ${e})`);break;case"resources/list":case"resources/templates/list":case"resources/read":if(!this._capabilities.resources)throw new Error(`Server does not support resources (required for ${e})`);break;case"tools/call":case"tools/list":if(!this._capabilities.tools)throw new Error(`Server does not support tools (required for ${e})`);break;case"tasks/get":case"tasks/list":case"tasks/result":case"tasks/cancel":if(!this._capabilities.tasks)throw new Error(`Server does not support tasks capability (required for ${e})`);break;case"ping":case"initialize":break}}assertTaskCapability(e){var r,n;Yw((n=(r=this._clientCapabilities)==null?void 0:r.tasks)==null?void 0:n.requests,e,"Client")}assertTaskHandlerCapability(e){var r;this._capabilities&&Jw((r=this._capabilities.tasks)==null?void 0:r.requests,e,"Server")}async _oninitialize(e){let r=e.params.protocolVersion;return this._clientCapabilities=e.params.capabilities,this._clientVersion=e.params.clientInfo,{protocolVersion:sv.includes(r)?r:$d,capabilities:this.getCapabilities(),serverInfo:this._serverInfo,...this._instructions&&{instructions:this._instructions}}}getClientCapabilities(){return this._clientCapabilities}getClientVersion(){return this._clientVersion}getCapabilities(){return this._capabilities}async ping(){return this.request({method:"ping"},ic)}async createMessage(e,r){var n,o;if((e.tools||e.toolChoice)&&!((o=(n=this._clientCapabilities)==null?void 0:n.sampling)!=null&&o.tools))throw new Error("Client does not support sampling tools capability.");if(e.messages.length>0){let i=e.messages[e.messages.length-1],s=Array.isArray(i.content)?i.content:[i.content],a=s.some(d=>d.type==="tool_result"),c=e.messages.length>1?e.messages[e.messages.length-2]:void 0,l=c?Array.isArray(c.content)?c.content:[c.content]:[],p=l.some(d=>d.type==="tool_use");if(a){if(s.some(d=>d.type!=="tool_result"))throw new Error("The last message must contain only tool_result content if any is present");if(!p)throw new Error("tool_result blocks are not matching any tool_use from the previous message")}if(p){let d=new Set(l.filter(m=>m.type==="tool_use").map(m=>m.id)),f=new Set(s.filter(m=>m.type==="tool_result").map(m=>m.toolUseId));if(d.size!==f.size||![...d].every(m=>f.has(m)))throw new Error("ids of tool_result blocks and tool_use blocks from previous message do not match")}}return e.tools?this.request({method:"sampling/createMessage",params:e},Md,r):this.request({method:"sampling/createMessage",params:e},_s,r)}async elicitInput(e,r){var o,i,s,a;switch(e.mode??"form"){case"url":{if(!((i=(o=this._clientCapabilities)==null?void 0:o.elicitation)!=null&&i.url))throw new Error("Client does not support url elicitation.");let c=e;return this.request({method:"elicitation/create",params:c},si,r)}case"form":{if(!((a=(s=this._clientCapabilities)==null?void 0:s.elicitation)!=null&&a.form))throw new Error("Client does not support form elicitation.");let c=e.mode==="form"?e:{...e,mode:"form"},l=await this.request({method:"elicitation/create",params:c},si,r);if(l.action==="accept"&&l.content&&c.requestedSchema)try{let d=this._jsonSchemaValidator.getValidator(c.requestedSchema)(l.content);if(!d.valid)throw new te(ie.InvalidParams,`Elicitation response content does not match requested schema: ${d.errorMessage}`)}catch(p){throw p instanceof te?p:new te(ie.InternalError,`Error validating elicitation response: ${p instanceof Error?p.message:String(p)}`)}return l}}}createElicitationCompletionNotifier(e,r){var n,o;if(!((o=(n=this._clientCapabilities)==null?void 0:n.elicitation)!=null&&o.url))throw new Error("Client does not support URL elicitation (required for notifications/elicitation/complete)");return()=>this.notification({method:"notifications/elicitation/complete",params:{elicitationId:e}},r)}async listRoots(e,r){return this.request({method:"roots/list",params:e},qd,r)}async sendLoggingMessage(e,r){if(this._capabilities.logging&&!this.isMessageIgnored(e.level,r))return this.notification({method:"notifications/message",params:e})}async sendResourceUpdated(e){return this.notification({method:"notifications/resources/updated",params:e})}async sendResourceListChanged(){return this.notification({method:"notifications/resources/list_changed"})}async sendToolListChanged(){return this.notification({method:"notifications/tools/list_changed"})}async sendPromptListChanged(){return this.notification({method:"notifications/prompts/list_changed"})}};var Qw=Symbol.for("mcp.completable");function Zm(t){return!!t&&typeof t=="object"&&Qw in t}function e0(t){let e=t[Qw];return e==null?void 0:e.complete}var Xw;(function(t){t.Completable="McpCompletable"})(Xw||(Xw={}));var IL=/^[A-Za-z0-9._-]{1,128}$/;function zL(t){let e=[];if(t.length===0)return{isValid:!1,warnings:["Tool name cannot be empty"]};if(t.length>128)return{isValid:!1,warnings:[`Tool name exceeds maximum length of 128 characters (current: ${t.length})`]};if(t.includes(" ")&&e.push("Tool name contains spaces, which may cause parsing issues"),t.includes(",")&&e.push("Tool name contains commas, which may cause parsing issues"),(t.startsWith("-")||t.endsWith("-"))&&e.push("Tool name starts or ends with a dash, which may cause parsing issues in some contexts"),(t.startsWith(".")||t.endsWith("."))&&e.push("Tool name starts or ends with a dot, which may cause parsing issues in some contexts"),!IL.test(t)){let r=t.split("").filter(n=>!/[A-Za-z0-9._-]/.test(n)).filter((n,o,i)=>i.indexOf(n)===o);return e.push(`Tool name contains invalid characters: ${r.map(n=>`"${n}"`).join(", ")}`,"Allowed characters are: A-Z, a-z, 0-9, underscore (_), dash (-), and dot (.)"),{isValid:!1,warnings:e}}return{isValid:!0,warnings:e}}function CL(t,e){if(e.length>0){console.warn(`Tool name validation warning for "${t}":`);for(let r of e)console.warn(` - ${r}`);console.warn("Tool registration will proceed, but this may cause compatibility issues."),console.warn("Consider updating the tool name to conform to the MCP tool naming standard."),console.warn("See SEP: Specify Format for Tool Names (https://github.com/modelcontextprotocol/modelcontextprotocol/issues/986) for more details.")}}function Bm(t){let e=zL(t);return CL(t,e.warnings),e.isValid}var pl=class{constructor(e){this._mcpServer=e}registerToolTask(e,r,n){let o={taskSupport:"required",...r.execution};if(o.taskSupport==="forbidden")throw new Error(`Cannot register task-based tool '${e}' with taskSupport 'forbidden'. Use registerTool() instead.`);return this._mcpServer._createRegisteredTool(e,r.title,r.description,r.inputSchema,r.outputSchema,r.annotations,o,r._meta,n)}};var dl=class{constructor(e,r){this._registeredResources={},this._registeredResourceTemplates={},this._registeredTools={},this._registeredPrompts={},this._toolHandlersInitialized=!1,this._completionHandlerInitialized=!1,this._resourceHandlersInitialized=!1,this._promptHandlersInitialized=!1,this.server=new ul(e,r)}get experimental(){return this._experimental||(this._experimental={tasks:new pl(this)}),this._experimental}async connect(e){return await this.server.connect(e)}async close(){await this.server.close()}setToolRequestHandlers(){this._toolHandlersInitialized||(this.server.assertCanSetRequestHandler(qn(bc)),this.server.assertCanSetRequestHandler(qn(ii)),this.server.registerCapabilities({tools:{listChanged:!0}}),this.server.setRequestHandler(bc,()=>({tools:Object.entries(this._registeredTools).filter(([,e])=>e.enabled).map(([e,r])=>{let n={name:e,title:r.title,description:r.description,inputSchema:(()=>{let o=ti(r.inputSchema);return o?Vd(o,{strictUnions:!0,pipeStrategy:"input"}):OL})(),annotations:r.annotations,execution:r.execution,_meta:r._meta};if(r.outputSchema){let o=ti(r.outputSchema);o&&(n.outputSchema=Vd(o,{strictUnions:!0,pipeStrategy:"output"}))}return n})})),this.server.setRequestHandler(ii,async(e,r)=>{var n;try{let o=this._registeredTools[e.params.name];if(!o)throw new te(ie.InvalidParams,`Tool ${e.params.name} not found`);if(!o.enabled)throw new te(ie.InvalidParams,`Tool ${e.params.name} disabled`);let i=!!e.params.task,s=(n=o.execution)==null?void 0:n.taskSupport,a="createTask"in o.handler;if((s==="required"||s==="optional")&&!a)throw new te(ie.InternalError,`Tool ${e.params.name} has taskSupport '${s}' but was not registered with registerToolTask`);if(s==="required"&&!i)throw new te(ie.MethodNotFound,`Tool ${e.params.name} requires task augmentation (taskSupport: 'required')`);if(s==="optional"&&!i&&a)return await this.handleAutomaticTaskPolling(o,e,r);let c=await this.validateToolInput(o,e.params.arguments,e.params.name),l=await this.executeToolHandler(o,c,r);return i||await this.validateToolOutput(o,l,e.params.name),l}catch(o){if(o instanceof te&&o.code===ie.UrlElicitationRequired)throw o;return this.createToolError(o instanceof Error?o.message:String(o))}}),this._toolHandlersInitialized=!0)}createToolError(e){return{content:[{type:"text",text:e}],isError:!0}}async validateToolInput(e,r,n){if(!e.inputSchema)return;let i=ti(e.inputSchema)??e.inputSchema,s=await Ya(i,r);if(!s.success){let a="error"in s?s.error:"Unknown error",c=Xa(a);throw new te(ie.InvalidParams,`Input validation error: Invalid arguments for tool ${n}: ${c}`)}return s.data}async validateToolOutput(e,r,n){if(!e.outputSchema||!("content"in r)||r.isError)return;if(!r.structuredContent)throw new te(ie.InvalidParams,`Output validation error: Tool ${n} has an output schema but no structured content was provided`);let o=ti(e.outputSchema),i=await Ya(o,r.structuredContent);if(!i.success){let s="error"in i?i.error:"Unknown error",a=Xa(s);throw new te(ie.InvalidParams,`Output validation error: Invalid structured content for tool ${n}: ${a}`)}}async executeToolHandler(e,r,n){let o=e.handler;if("createTask"in o){if(!n.taskStore)throw new Error("No task store provided.");let s={...n,taskStore:n.taskStore};if(e.inputSchema){let a=o;return await Promise.resolve(a.createTask(r,s))}else{let a=o;return await Promise.resolve(a.createTask(s))}}if(e.inputSchema){let s=o;return await Promise.resolve(s(r,n))}else{let s=o;return await Promise.resolve(s(n))}}async handleAutomaticTaskPolling(e,r,n){if(!n.taskStore)throw new Error("No task store provided for task-capable tool.");let o=await this.validateToolInput(e,r.params.arguments,r.params.name),i=e.handler,s={...n,taskStore:n.taskStore},a=o?await Promise.resolve(i.createTask(o,s)):await Promise.resolve(i.createTask(s)),c=a.task.taskId,l=a.task,p=l.pollInterval??5e3;for(;l.status!=="completed"&&l.status!=="failed"&&l.status!=="cancelled";){await new Promise(f=>setTimeout(f,p));let d=await n.taskStore.getTask(c);if(!d)throw new te(ie.InternalError,`Task ${c} not found during polling`);l=d}return await n.taskStore.getTaskResult(c)}setCompletionRequestHandler(){this._completionHandlerInitialized||(this.server.assertCanSetRequestHandler(qn(wc)),this.server.registerCapabilities({completions:{}}),this.server.setRequestHandler(wc,async e=>{switch(e.params.ref.type){case"ref/prompt":return wv(e),this.handlePromptCompletion(e,e.params.ref);case"ref/resource":return Sv(e),this.handleResourceCompletion(e,e.params.ref);default:throw new te(ie.InvalidParams,`Invalid completion reference: ${e.params.ref}`)}}),this._completionHandlerInitialized=!0)}async handlePromptCompletion(e,r){let n=this._registeredPrompts[r.name];if(!n)throw new te(ie.InvalidParams,`Prompt ${r.name} not found`);if(!n.enabled)throw new te(ie.InvalidParams,`Prompt ${r.name} disabled`);if(!n.argsSchema)return Xs;let o=Pn(n.argsSchema),i=o==null?void 0:o[e.params.argument.name];if(!Zm(i))return Xs;let s=e0(i);if(!s)return Xs;let a=await s(e.params.argument.value,e.params.context);return r0(a)}async handleResourceCompletion(e,r){let n=Object.values(this._registeredResourceTemplates).find(s=>s.resourceTemplate.uriTemplate.toString()===r.uri);if(!n){if(this._registeredResources[r.uri])return Xs;throw new te(ie.InvalidParams,`Resource template ${e.params.ref.uri} not found`)}let o=n.resourceTemplate.completeCallback(e.params.argument.name);if(!o)return Xs;let i=await o(e.params.argument.value,e.params.context);return r0(i)}setResourceRequestHandlers(){this._resourceHandlersInitialized||(this.server.assertCanSetRequestHandler(qn(hc)),this.server.assertCanSetRequestHandler(qn(gc)),this.server.assertCanSetRequestHandler(qn(yc)),this.server.registerCapabilities({resources:{listChanged:!0}}),this.server.setRequestHandler(hc,async(e,r)=>{let n=Object.entries(this._registeredResources).filter(([i,s])=>s.enabled).map(([i,s])=>({uri:i,name:s.name,...s.metadata})),o=[];for(let i of Object.values(this._registeredResourceTemplates)){if(!i.resourceTemplate.listCallback)continue;let s=await i.resourceTemplate.listCallback(r);for(let a of s.resources)o.push({...i.metadata,...a})}return{resources:[...n,...o]}}),this.server.setRequestHandler(gc,async()=>({resourceTemplates:Object.entries(this._registeredResourceTemplates).map(([r,n])=>({name:r,uriTemplate:n.resourceTemplate.uriTemplate.toString(),...n.metadata}))})),this.server.setRequestHandler(yc,async(e,r)=>{let n=new URL(e.params.uri),o=this._registeredResources[n.toString()];if(o){if(!o.enabled)throw new te(ie.InvalidParams,`Resource ${n} disabled`);return o.readCallback(n,r)}for(let i of Object.values(this._registeredResourceTemplates)){let s=i.resourceTemplate.uriTemplate.match(n.toString());if(s)return i.readCallback(n,s,r)}throw new te(ie.InvalidParams,`Resource ${n} not found`)}),this._resourceHandlersInitialized=!0)}setPromptRequestHandlers(){this._promptHandlersInitialized||(this.server.assertCanSetRequestHandler(qn(xc)),this.server.assertCanSetRequestHandler(qn(vc)),this.server.registerCapabilities({prompts:{listChanged:!0}}),this.server.setRequestHandler(xc,()=>({prompts:Object.entries(this._registeredPrompts).filter(([,e])=>e.enabled).map(([e,r])=>({name:e,title:r.title,description:r.description,arguments:r.argsSchema?NL(r.argsSchema):void 0}))})),this.server.setRequestHandler(vc,async(e,r)=>{let n=this._registeredPrompts[e.params.name];if(!n)throw new te(ie.InvalidParams,`Prompt ${e.params.name} not found`);if(!n.enabled)throw new te(ie.InvalidParams,`Prompt ${e.params.name} disabled`);if(n.argsSchema){let o=ti(n.argsSchema),i=await Ya(o,e.params.arguments);if(!i.success){let c="error"in i?i.error:"Unknown error",l=Xa(c);throw new te(ie.InvalidParams,`Invalid arguments for prompt ${e.params.name}: ${l}`)}let s=i.data,a=n.callback;return await Promise.resolve(a(s,r))}else{let o=n.callback;return await Promise.resolve(o(r))}}),this._promptHandlersInitialized=!0)}resource(e,r,...n){let o;typeof n[0]=="object"&&(o=n.shift());let i=n[0];if(typeof r=="string"){if(this._registeredResources[r])throw new Error(`Resource ${r} is already registered`);let s=this._createRegisteredResource(e,void 0,r,o,i);return this.setResourceRequestHandlers(),this.sendResourceListChanged(),s}else{if(this._registeredResourceTemplates[e])throw new Error(`Resource template ${e} is already registered`);let s=this._createRegisteredResourceTemplate(e,void 0,r,o,i);return this.setResourceRequestHandlers(),this.sendResourceListChanged(),s}}registerResource(e,r,n,o){if(typeof r=="string"){if(this._registeredResources[r])throw new Error(`Resource ${r} is already registered`);let i=this._createRegisteredResource(e,n.title,r,n,o);return this.setResourceRequestHandlers(),this.sendResourceListChanged(),i}else{if(this._registeredResourceTemplates[e])throw new Error(`Resource template ${e} is already registered`);let i=this._createRegisteredResourceTemplate(e,n.title,r,n,o);return this.setResourceRequestHandlers(),this.sendResourceListChanged(),i}}_createRegisteredResource(e,r,n,o,i){let s={name:e,title:r,metadata:o,readCallback:i,enabled:!0,disable:()=>s.update({enabled:!1}),enable:()=>s.update({enabled:!0}),remove:()=>s.update({uri:null}),update:a=>{typeof a.uri<"u"&&a.uri!==n&&(delete this._registeredResources[n],a.uri&&(this._registeredResources[a.uri]=s)),typeof a.name<"u"&&(s.name=a.name),typeof a.title<"u"&&(s.title=a.title),typeof a.metadata<"u"&&(s.metadata=a.metadata),typeof a.callback<"u"&&(s.readCallback=a.callback),typeof a.enabled<"u"&&(s.enabled=a.enabled),this.sendResourceListChanged()}};return this._registeredResources[n]=s,s}_createRegisteredResourceTemplate(e,r,n,o,i){let s={resourceTemplate:n,title:r,metadata:o,readCallback:i,enabled:!0,disable:()=>s.update({enabled:!1}),enable:()=>s.update({enabled:!0}),remove:()=>s.update({name:null}),update:l=>{typeof l.name<"u"&&l.name!==e&&(delete this._registeredResourceTemplates[e],l.name&&(this._registeredResourceTemplates[l.name]=s)),typeof l.title<"u"&&(s.title=l.title),typeof l.template<"u"&&(s.resourceTemplate=l.template),typeof l.metadata<"u"&&(s.metadata=l.metadata),typeof l.callback<"u"&&(s.readCallback=l.callback),typeof l.enabled<"u"&&(s.enabled=l.enabled),this.sendResourceListChanged()}};this._registeredResourceTemplates[e]=s;let a=n.uriTemplate.variableNames;return Array.isArray(a)&&a.some(l=>!!n.completeCallback(l))&&this.setCompletionRequestHandler(),s}_createRegisteredPrompt(e,r,n,o,i){let s={title:r,description:n,argsSchema:o===void 0?void 0:vo(o),callback:i,enabled:!0,disable:()=>s.update({enabled:!1}),enable:()=>s.update({enabled:!0}),remove:()=>s.update({name:null}),update:a=>{typeof a.name<"u"&&a.name!==e&&(delete this._registeredPrompts[e],a.name&&(this._registeredPrompts[a.name]=s)),typeof a.title<"u"&&(s.title=a.title),typeof a.description<"u"&&(s.description=a.description),typeof a.argsSchema<"u"&&(s.argsSchema=vo(a.argsSchema)),typeof a.callback<"u"&&(s.callback=a.callback),typeof a.enabled<"u"&&(s.enabled=a.enabled),this.sendPromptListChanged()}};return this._registeredPrompts[e]=s,o&&Object.values(o).some(c=>{var p;let l=c instanceof or?(p=c._def)==null?void 0:p.innerType:c;return Zm(l)})&&this.setCompletionRequestHandler(),s}_createRegisteredTool(e,r,n,o,i,s,a,c,l){Bm(e);let p={title:r,description:n,inputSchema:t0(o),outputSchema:t0(i),annotations:s,execution:a,_meta:c,handler:l,enabled:!0,disable:()=>p.update({enabled:!1}),enable:()=>p.update({enabled:!0}),remove:()=>p.update({name:null}),update:d=>{typeof d.name<"u"&&d.name!==e&&(typeof d.name=="string"&&Bm(d.name),delete this._registeredTools[e],d.name&&(this._registeredTools[d.name]=p)),typeof d.title<"u"&&(p.title=d.title),typeof d.description<"u"&&(p.description=d.description),typeof d.paramsSchema<"u"&&(p.inputSchema=vo(d.paramsSchema)),typeof d.outputSchema<"u"&&(p.outputSchema=vo(d.outputSchema)),typeof d.callback<"u"&&(p.handler=d.callback),typeof d.annotations<"u"&&(p.annotations=d.annotations),typeof d._meta<"u"&&(p._meta=d._meta),typeof d.enabled<"u"&&(p.enabled=d.enabled),this.sendToolListChanged()}};return this._registeredTools[e]=p,this.setToolRequestHandlers(),this.sendToolListChanged(),p}tool(e,...r){if(this._registeredTools[e])throw new Error(`Tool ${e} is already registered`);let n,o,i,s;if(typeof r[0]=="string"&&(n=r.shift()),r.length>1){let c=r[0];if(Hm(c))o=r.shift(),r.length>1&&typeof r[0]=="object"&&r[0]!==null&&!Hm(r[0])&&(s=r.shift());else if(typeof c=="object"&&c!==null){if(Object.values(c).some(l=>typeof l=="object"&&l!==null))throw new Error(`Tool ${e} expected a Zod schema or ToolAnnotations, but received an unrecognized object`);s=r.shift()}}let a=r[0];return this._createRegisteredTool(e,void 0,n,o,i,s,{taskSupport:"forbidden"},void 0,a)}registerTool(e,r,n){if(this._registeredTools[e])throw new Error(`Tool ${e} is already registered`);let{title:o,description:i,inputSchema:s,outputSchema:a,annotations:c,_meta:l}=r;return this._createRegisteredTool(e,o,i,s,a,c,{taskSupport:"forbidden"},l,n)}prompt(e,...r){if(this._registeredPrompts[e])throw new Error(`Prompt ${e} is already registered`);let n;typeof r[0]=="string"&&(n=r.shift());let o;r.length>1&&(o=r.shift());let i=r[0],s=this._createRegisteredPrompt(e,void 0,n,o,i);return this.setPromptRequestHandlers(),this.sendPromptListChanged(),s}registerPrompt(e,r,n){if(this._registeredPrompts[e])throw new Error(`Prompt ${e} is already registered`);let{title:o,description:i,argsSchema:s}=r,a=this._createRegisteredPrompt(e,o,i,s,n);return this.setPromptRequestHandlers(),this.sendPromptListChanged(),a}isConnected(){return this.server.transport!==void 0}async sendLoggingMessage(e,r){return this.server.sendLoggingMessage(e,r)}sendResourceListChanged(){this.isConnected()&&this.server.sendResourceListChanged()}sendToolListChanged(){this.isConnected()&&this.server.sendToolListChanged()}sendPromptListChanged(){this.isConnected()&&this.server.sendPromptListChanged()}};var OL={type:"object",properties:{}};function n0(t){return t!==null&&typeof t=="object"&&"parse"in t&&typeof t.parse=="function"&&"safeParse"in t&&typeof t.safeParse=="function"}function o0(t){return"_def"in t||"_zod"in t||n0(t)}function Hm(t){return typeof t!="object"||t===null||o0(t)?!1:Object.keys(t).length===0?!0:Object.values(t).some(n0)}function t0(t){if(t){if(Hm(t))return vo(t);if(!o0(t))throw new Error("inputSchema must be a Zod schema or raw shape, received an unrecognized object");return t}}function NL(t){let e=Pn(t);return e?Object.entries(e).map(([r,n])=>{let o=jx(n),i=Lx(n);return{name:r,description:o,required:!i}}):[]}function qn(t){let e=Pn(t),r=e==null?void 0:e.method;if(!r)throw new Error("Schema is missing a method literal");let n=Qa(r);if(typeof n=="string")return n;throw new Error("Schema method literal must be a string")}function r0(t){return{completion:{values:t.slice(0,100),total:t.length,hasMore:t.length>100}}}var Xs={completion:{values:[],hasMore:!1}};var Vm=Ee(require("node:process"),1);var fl=class{append(e){this._buffer=this._buffer?Buffer.concat([this._buffer,e]):e}readMessage(){if(!this._buffer)return null;let e=this._buffer.indexOf(`
|
|
53
|
-
`);if(e===-1)return null;let
|
|
54
|
-
`}var
|
|
55
|
-
`).forEach(function(s){o=s.indexOf(":"),
|
|
56
|
-
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...r){let n=new this(e);return r.forEach(o=>n.set(o)),n}static accessor(e){let n=(this[x0]=this[x0]={accessors:{}}).accessors,o=this.prototype;function i(s){let a=na(s);n[a]||(ND(o,s),n[a]=!0)}return b.isArray(e)?e.forEach(i):i(e),this}};Ai.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);b.reduceDescriptors(Ai.prototype,({value:t},e)=>{let r=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(n){this[r]=n}}});b.freezeMethods(Ai);var ot=Ai;var jD="[REDACTED ****]";function LD(t){if(b.hasOwnProp(t,"toJSON"))return!0;let e=Object.getPrototypeOf(t);for(;e&&e!==Object.prototype;){if(b.hasOwnProp(e,"toJSON"))return!0;e=Object.getPrototypeOf(e)}return!1}function DD(t,e){let r=new Set(e.map(i=>String(i).toLowerCase())),n=[],o=i=>{if(i===null||typeof i!="object"||b.isBuffer(i))return i;if(n.indexOf(i)!==-1)return;i instanceof ot&&(i=i.toJSON()),n.push(i);let s;if(b.isArray(i))s=[],i.forEach((a,c)=>{let l=o(a);b.isUndefined(l)||(s[c]=l)});else{if(!b.isPlainObject(i)&&LD(i))return n.pop(),i;s=Object.create(null);for(let[a,c]of Object.entries(i)){let l=r.has(a.toLowerCase())?jD:o(c);b.isUndefined(l)||(s[a]=l)}}return n.pop(),s};return o(t)}var Ft=class t extends Error{static from(e,r,n,o,i,s){let a=new t(e.message,r||e.code,n,o,i);return Object.defineProperty(a,"cause",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),a.name=e.name,e.status!=null&&a.status==null&&(a.status=e.status),s&&Object.assign(a,s),a}constructor(e,r,n,o,i){super(e),Object.defineProperty(this,"message",{__proto__:null,value:e,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,r&&(this.code=r),n&&(this.config=n),o&&(this.request=o),i&&(this.response=i,this.status=i.status)}toJSON(){let e=this.config,r=e&&b.hasOwnProp(e,"redact")?e.redact:void 0,n=b.isArray(r)&&r.length>0?DD(e,r):b.toJSONObject(e);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:n,code:this.code,status:this.status}}};Ft.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";Ft.ERR_BAD_OPTION="ERR_BAD_OPTION";Ft.ECONNABORTED="ECONNABORTED";Ft.ETIMEDOUT="ETIMEDOUT";Ft.ECONNREFUSED="ECONNREFUSED";Ft.ERR_NETWORK="ERR_NETWORK";Ft.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";Ft.ERR_DEPRECATED="ERR_DEPRECATED";Ft.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";Ft.ERR_BAD_REQUEST="ERR_BAD_REQUEST";Ft.ERR_CANCELED="ERR_CANCELED";Ft.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";Ft.ERR_INVALID_URL="ERR_INVALID_URL";Ft.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";var z=Ft;var Sk=Ee(wk(),1),Pl=Sk.default;var xh=100;function yh(t){return b.isPlainObject(t)||b.isArray(t)}function kk(t){return b.endsWith(t,"[]")?t.slice(0,-2):t}function gh(t,e,r){return t?t.concat(e).map(function(o,i){return o=kk(o),!r&&i?"["+o+"]":o}).join(r?".":""):e}function S2(t){return b.isArray(t)&&!t.some(yh)}var k2=b.toFlatObject(b,{},null,function(e){return/^is[A-Z]/.test(e)});function $2(t,e,r){if(!b.isObject(t))throw new TypeError("target must be an object");e=e||new(Pl||FormData),r=b.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(_,w){return!b.isUndefined(w[_])});let n=r.metaTokens,o=r.visitor||y,i=r.dots,s=r.indexes,a=r.Blob||typeof Blob<"u"&&Blob,c=r.maxDepth===void 0?xh:r.maxDepth,l=a&&b.isSpecCompliantForm(e),p=[];if(!b.isFunction(o))throw new TypeError("visitor must be a function");function d(g){if(g===null)return"";if(b.isDate(g))return g.toISOString();if(b.isBoolean(g))return g.toString();if(!l&&b.isBlob(g))throw new z("Blob is not supported. Use a Buffer instead.");if(b.isArrayBuffer(g)||b.isTypedArray(g)){if(l&&typeof a=="function")return new a([g]);if(typeof Buffer<"u")return Buffer.from(g);throw new z("Blob is not supported. Use a Buffer instead.",z.ERR_NOT_SUPPORT)}return g}function f(g){if(g>c)throw new z("Object is too deeply nested ("+g+" levels). Max depth: "+c,z.ERR_FORM_DATA_DEPTH_EXCEEDED)}function m(g,_){if(c===1/0)return JSON.stringify(g);let w=[];return JSON.stringify(g,function(E,Z){if(!b.isObject(Z))return Z;for(;w.length&&w[w.length-1]!==this;)w.pop();return w.push(Z),f(_+w.length-1),Z})}function y(g,_,w){let $=g;if(b.isReactNative(e)&&b.isReactNativeBlob(g))return e.append(gh(w,_,i),d(g)),!1;if(g&&!w&&typeof g=="object"){if(b.endsWith(_,"{}"))_=n?_:_.slice(0,-2),g=m(g,1);else if(b.isArray(g)&&S2(g)||(b.isFileList(g)||b.endsWith(_,"[]"))&&($=b.toArray(g)))return _=kk(_),$.forEach(function(Z,q){!(b.isUndefined(Z)||Z===null)&&e.append(s===!0?gh([_],q,i):s===null?_:_+"[]",d(Z))}),!1}return yh(g)?!0:(e.append(gh(w,_,i),d(g)),!1)}let v=Object.assign(k2,{defaultVisitor:y,convertValue:d,isVisitable:yh});function x(g,_,w=0){if(!b.isUndefined(g)){if(f(w),p.indexOf(g)!==-1)throw new Error("Circular reference detected in "+_.join("."));p.push(g),b.forEach(g,function(E,Z){(!(b.isUndefined(E)||E===null)&&o.call(e,E,b.isString(Z)?Z.trim():Z,_,v))===!0&&x(E,_?_.concat(Z):[Z],w+1)}),p.pop()}}if(!b.isObject(t))throw new TypeError("data must be an object");return x(t),e}var Un=$2;function $k(t){let e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(t).replace(/[!'()~]|%20/g,function(n){return e[n]})}function Ek(t,e){this._pairs=[],t&&Un(t,this,e)}var Tk=Ek.prototype;Tk.append=function(e,r){this._pairs.push([e,r])};Tk.toString=function(e){let r=e?n=>e.call(this,n,$k):$k;return this._pairs.map(function(o){return r(o[0])+"="+r(o[1])},"").join("&")};var Rk=Ek;function E2(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Oo(t,e,r){if(!e)return t;t=t||"";let n=b.isFunction(r)?{serialize:r}:r,o=b.getSafeProp(n,"encode")||E2,i=b.getSafeProp(n,"serialize"),s;if(i?s=i(e,n):s=b.isURLSearchParams(e)?e.toString():new Rk(e,n).toString(o),s){let a=t.indexOf("#");a!==-1&&(t=t.slice(0,a)),t+=(t.indexOf("?")===-1?"?":"&")+s}return t}var vh=class{constructor(){this.handlers=[]}use(e,r,n){return this.handlers.push({fulfilled:e,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){b.forEach(this.handlers,function(n){n!==null&&e(n)})}},bh=vh;var Zn={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0};var zk=Ee(require("crypto"),1);var Pk=Ee(require("url"),1),Ak=Pk.default.URLSearchParams;var _h="abcdefghijklmnopqrstuvwxyz",Ik="0123456789",Ck={DIGIT:Ik,ALPHA:_h,ALPHA_DIGIT:_h+_h.toUpperCase()+Ik},T2=(t=16,e=Ck.ALPHA_DIGIT)=>{let r="",{length:n}=e,o=new Uint32Array(t);zk.default.randomFillSync(o);for(let i=0;i<t;i++)r+=e[o[i]%n];return r},Ok={isNode:!0,classes:{URLSearchParams:Ak,FormData:Pl,Blob:typeof Blob<"u"&&Blob||null},ALPHABET:Ck,generateString:T2,protocols:["http","https","file","data"]};var kh={};Ta(kh,{hasBrowserEnv:()=>Sh,hasStandardBrowserEnv:()=>R2,hasStandardBrowserWebWorkerEnv:()=>P2,navigator:()=>wh,origin:()=>A2});var Sh=typeof window<"u"&&typeof document<"u",wh=typeof navigator=="object"&&navigator||void 0,R2=Sh&&(!wh||["ReactNative","NativeScript","NS"].indexOf(wh.product)<0),P2=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",A2=Sh&&window.location.href||"http://localhost";var Ze={...kh,...Ok};function $h(t,e){return Un(t,new Ze.classes.URLSearchParams,{visitor:function(r,n,o,i){return Ze.isNode&&b.isBuffer(r)?(this.append(n,r.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)},...e})}var Nk=xh;function jk(t){if(t>Nk)throw new z("FormData field is too deeply nested ("+t+" levels). Max depth: "+Nk,z.ERR_FORM_DATA_DEPTH_EXCEEDED)}function I2(t){let e=[],r=/\w+|\[(\w*)]/g,n;for(;(n=r.exec(t))!==null;)jk(e.length),e.push(n[0]==="[]"?"":n[1]||n[0]);return e}function z2(t){let e={},r=Object.keys(t),n,o=r.length,i;for(n=0;n<o;n++)i=r[n],e[i]=t[i];return e}function C2(t){function e(r,n,o,i){jk(i);let s=r[i++];if(s==="__proto__")return!0;let a=Number.isFinite(+s),c=i>=r.length;return s=!s&&b.isArray(o)?o.length:s,c?(b.hasOwnProp(o,s)?o[s]=b.isArray(o[s])?o[s].concat(n):[o[s],n]:o[s]=n,!a):((!b.hasOwnProp(o,s)||!b.isObject(o[s]))&&(o[s]=[]),e(r,n,o[s],i)&&b.isArray(o[s])&&(o[s]=z2(o[s])),!a)}if(b.isFormData(t)&&b.isFunction(t.entries)){let r={};return b.forEachEntry(t,(n,o)=>{e(I2(n),o,r,0)}),r}return null}var Al=C2;var Ni=(t,e)=>t!=null&&b.hasOwnProp(t,e)?t[e]:void 0;function O2(t,e,r){if(b.isString(t))try{return(e||JSON.parse)(t),b.trim(t)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(t)}var Eh={transitional:Zn,adapter:["xhr","http","fetch"],transformRequest:[function(e,r){let n=r.getContentType()||"",o=n.indexOf("application/json")>-1,i=b.isObject(e);if(i&&b.isHTMLForm(e)&&(e=new FormData(e)),b.isFormData(e))return o?JSON.stringify(Al(e)):e;if(b.isArrayBuffer(e)||b.isBuffer(e)||b.isStream(e)||b.isFile(e)||b.isBlob(e)||b.isReadableStream(e))return e;if(b.isArrayBufferView(e))return e.buffer;if(b.isURLSearchParams(e))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let a;if(i){let c=Ni(this,"formSerializer");if(n.indexOf("application/x-www-form-urlencoded")>-1)return $h(e,c).toString();if((a=b.isFileList(e))||n.indexOf("multipart/form-data")>-1){let l=Ni(this,"env"),p=l&&l.FormData;return Un(a?{"files[]":e}:e,p&&new p,c)}}return i||o?(r.setContentType("application/json",!1),O2(e)):e}],transformResponse:[function(e){let r=Ni(this,"transitional")||Eh.transitional,n=r&&r.forcedJSONParsing,o=Ni(this,"responseType"),i=o==="json";if(b.isResponse(e)||b.isReadableStream(e))return e;if(e&&b.isString(e)&&(n&&!o||i)){let a=!(r&&r.silentJSONParsing)&&i;try{return JSON.parse(e,Ni(this,"parseReviver"))}catch(c){if(a)throw c.name==="SyntaxError"?z.from(c,z.ERR_BAD_RESPONSE,this,null,Ni(this,"response")):c}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Ze.classes.FormData,Blob:Ze.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};b.forEach(["delete","get","head","post","put","patch","query"],t=>{Eh.headers[t]={}});var ji=Eh;function ca(t,e){let r=this||ji,n=e||r,o=ot.from(n.headers),i=n.data;return b.forEach(t,function(a){i=a.call(r,i,o.normalize(),e?e.status:void 0)}),o.normalize(),i}function la(t){return!!(t&&t.__CANCEL__)}var Th=class extends z{constructor(e,r,n){super(e??"canceled",z.ERR_CANCELED,r,n),this.name="CanceledError",this.__CANCEL__=!0}},xr=Th;function on(t,e,r){let n=r.config.validateStatus;!r.status||!n||n(r.status)?t(r):e(new z("Request failed with status code "+r.status,r.status>=400&&r.status<500?z.ERR_BAD_REQUEST:z.ERR_BAD_RESPONSE,r.config,r.request,r))}function Rh(t){return typeof t!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function Ph(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}var N2=/^https?:(?!\/\/)/i,j2=/[\t\n\r]/g;function L2(t){let e=0;for(;e<t.length&&t.charCodeAt(e)<=32;)e++;return t.slice(e)}function D2(t){return L2(t).replace(j2,"")}function Lk(t,e){if(typeof t=="string"&&N2.test(D2(t)))throw new z('Invalid URL: missing "//" after protocol',z.ERR_INVALID_URL,e)}function No(t,e,r,n){Lk(e,n);let o=!Rh(e);return t&&(o||r===!1)?(Lk(t,n),Ph(t,e)):e}var M2={ftp:21,gopher:70,http:80,https:443,ws:80,wss:443};function q2(t){try{return new URL(t)}catch{return null}}function Dk(t){var e=(typeof t=="string"?q2(t):t)||{},r=e.protocol,n=e.host,o=e.port;if(typeof n!="string"||!n||typeof r!="string"||(r=r.split(":",1)[0],n=n.replace(/:\d*$/,""),o=parseInt(o)||M2[r]||0,!F2(n,o)))return"";var i=Ah(r+"_proxy")||Ah("all_proxy");return i&&i.indexOf("://")===-1&&(i=r+"://"+i),i}function F2(t,e){var r=Ah("no_proxy").toLowerCase();return r?r==="*"?!1:r.split(/[,\s]/).every(function(n){if(!n)return!0;var o=n.match(/^(.+):(\d+)$/),i=o?o[1]:n,s=o?parseInt(o[2]):0;return s&&s!==e?!0:/^[.*]/.test(i)?(i.charAt(0)==="*"&&(i=i.slice(1)),!t.endsWith(i)):t!==i}):!0}function Ah(t){return process.env[t.toLowerCase()]||process.env[t.toUpperCase()]||""}var ug=Ee(i$(),1),pg=Ee(require("http"),1),dg=Ee(require("https"),1),L$=Ee(require("http2"),1),D$=Ee(require("util"),1),lg=require("path"),M$=Ee(d$(),1),vr=Ee(require("zlib"),1);var bn="1.18.1";function xa(t){let e=/^([-+\w]{1,25}):(?:\/\/)?/.exec(t);return e&&e[1]||""}var Zq=/^([^,;]+\/[^,;]+)?((?:;[^,;=]+=[^,;]+)*)(;base64)?,([\s\S]*)$/;function eg(t,e,r){let n=r&&r.Blob||Ze.classes.Blob,o=xa(t);if(e===void 0&&n&&(e=!0),o==="data"){t=o.length?t.slice(o.length+1):t;let i=Zq.exec(t);if(!i)throw new z("Invalid URL",z.ERR_INVALID_URL);let s=i[1],a=i[2],c=i[3]?"base64":"utf8",l=i[4],p="";s?p=a?s+a:s:a&&(p="text/plain"+a);let d=c==="base64"?Buffer.from(l,"base64"):Buffer.from(decodeURIComponent(l),c);if(e){if(!n)throw new z("Blob is not supported",z.ERR_NOT_SUPPORT);return new n([d],{type:p})}return d}throw new z("Unsupported protocol "+o,z.ERR_NOT_SUPPORT)}var Ir=Ee(require("stream"),1);var f$=Ee(require("stream"),1);var tg=Symbol("internals"),rg=class extends f$.default.Transform{constructor(e){e=b.toFlatObject(e,{maxRate:0,chunkSize:64*1024,minChunkSize:100,timeWindow:500,ticksRate:2,samplesCount:15},null,(n,o)=>!b.isUndefined(o[n])),super({readableHighWaterMark:e.chunkSize});let r=this[tg]={timeWindow:e.timeWindow,chunkSize:e.chunkSize,maxRate:e.maxRate,minChunkSize:e.minChunkSize,bytesSeen:0,isCaptured:!1,notifiedBytesLoaded:0,ts:Date.now(),bytes:0,onReadCallback:null};this.on("newListener",n=>{n==="progress"&&(r.isCaptured||(r.isCaptured=!0))})}_read(e){let r=this[tg];return r.onReadCallback&&r.onReadCallback(),super._read(e)}_transform(e,r,n){let o=this[tg],i=o.maxRate,s=this.readableHighWaterMark,a=o.timeWindow,c=1e3/a,l=i/c,p=o.minChunkSize!==!1?Math.max(o.minChunkSize,l*.01):0,d=(m,y)=>{let v=Buffer.byteLength(m);o.bytesSeen+=v,o.bytes+=v,o.isCaptured&&this.emit("progress",o.bytesSeen),this.push(m)?process.nextTick(y):o.onReadCallback=()=>{o.onReadCallback=null,process.nextTick(y)}},f=(m,y)=>{let v=Buffer.byteLength(m),x=null,g=s,_,w=0;if(i){let $=Date.now();(!o.ts||(w=$-o.ts)>=a)&&(o.ts=$,_=l-o.bytes,o.bytes=_<0?-_:0,w=0),_=l-o.bytes}if(i){if(_<=0)return setTimeout(()=>{y(null,m)},a-w);_<g&&(g=_)}g&&v>g&&v-g>p&&(x=m.subarray(g),m=m.subarray(0,g)),d(m,x?()=>{process.nextTick(y,null,x)}:y)};f(e,function m(y,v){if(y)return n(y);v?f(v,m):n(null)})}},ng=rg;var q$=require("events");var h$=Ee(require("util"),1),g$=require("stream");var{asyncIterator:m$}=Symbol,Bq=async function*(t){t.stream?yield*t.stream():t.arrayBuffer?yield await t.arrayBuffer():t[m$]?yield*t[m$]():yield t},jl=Bq;var Hq=Ze.ALPHABET.ALPHA_DIGIT+"-_",va=typeof TextEncoder=="function"?new TextEncoder:new h$.default.TextEncoder,Fo=`\r
|
|
57
|
-
`,Vq=va.encode(Fo),Gq=2,og=class{constructor(e,r){let{escapeName:n}=this.constructor,o=b.isString(r),i=`Content-Disposition: form-data; name="${n(e)}"${!o&&r.name?`; filename="${n(r.name)}"`:""}${Fo}`;if(o)r=va.encode(String(r).replace(/\r?\n|\r\n?/g,Fo));else{let s=String(r.type||"application/octet-stream").replace(/[\r\n]/g,"");i+=`Content-Type: ${s}${Fo}`}this.headers=va.encode(i+Fo),this.contentLength=o?r.byteLength:r.size,this.size=this.headers.byteLength+this.contentLength+Gq,this.name=e,this.value=r}async*encode(){yield this.headers;let{value:e}=this;b.isTypedArray(e)?yield e:yield*jl(e),yield Vq}static escapeName(e){return String(e).replace(/[\r\n"]/g,r=>({"\r":"%0D","\n":"%0A",'"':"%22"})[r])}},Wq=(t,e,r)=>{let{tag:n="form-data-boundary",size:o=25,boundary:i=n+"-"+Ze.generateString(o,Hq)}=r||{};if(!b.isFormData(t))throw new TypeError("FormData instance required");if(i.length<1||i.length>70)throw new Error("boundary must be 1-70 characters long");let s=va.encode("--"+i+Fo),a=va.encode("--"+i+"--"+Fo),c=a.byteLength,l=Array.from(t.entries()).map(([d,f])=>{let m=new og(d,f);return c+=m.size,m});c+=s.byteLength*l.length,c=b.toFiniteNumber(c);let p={"Content-Type":`multipart/form-data; boundary=${i}`};return Number.isFinite(c)&&(p["Content-Length"]=c),e&&e(p),g$.Readable.from((async function*(){for(let d of l)yield s,yield*d.encode();yield a})())},y$=Wq;var x$=Ee(require("stream"),1),ig=class extends x$.default.Transform{__transform(e,r,n){this.push(e),n()}_transform(e,r,n){if(e.length!==0&&(this._transform=this.__transform,e[0]!==120)){let o=Buffer.alloc(2);o[0]=120,o[1]=156,this.push(o,r)}this.__transform(e,r,n)}},v$=ig;var b$=Ee(require("http2"),1),_$=Ee(require("util"),1),sg=class{constructor(){this.sessions=Object.create(null)}getSession(e,r){r=Object.assign({sessionTimeout:1e3},r);let n=this.sessions[e];if(n){let d=n.length;for(let f=0;f<d;f++){let[m,y]=n[f];if(!m.destroyed&&!m.closed&&_$.default.isDeepStrictEqual(y,r))return m}}let o=b$.default.connect(e,r),i,s,a=()=>{if(i)return;i=!0,s&&(clearTimeout(s),s=null);let d=n,f=d.length,m=f;for(;m--;)if(d[m][0]===o){f===1?delete this.sessions[e]:d.splice(m,1),o.closed||o.close();return}},c=o.request,{sessionTimeout:l}=r;if(l!=null){let d=0;o.request=function(){let f=c.apply(this,arguments);return d++,s&&(clearTimeout(s),s=null),f.once("close",()=>{--d||(s=setTimeout(()=>{s=null,a()},l))}),f}}o.once("close",a);let p=[o,r];return n?n.push(p):n=this.sessions[e]=[p],o}},w$=sg;var Kq=(t,e)=>b.isAsyncFn(t)?function(...r){let n=r.pop();t.apply(this,r).then(o=>{try{e?n(null,...e(o)):n(null,o)}catch(i){n(i)}},n)}:t,S$=Kq;var Jq=new Set(["localhost","0.0.0.0"]),E$=t=>{let e=t.split(".");return e.length!==4||e[0]!=="127"?!1:e.every(r=>/^\d+$/.test(r)&&Number(r)>=0&&Number(r)<=255)},ag=t=>/^0{1,4}$/.test(t),Yq=t=>{if(t==="::")return!0;let e=t.indexOf("::");if(e!==-1){if(e!==t.lastIndexOf("::"))return!1;let n=t.slice(0,e),o=t.slice(e+2),i=n?n.split(":"):[],s=o?o.split(":"):[];return i.length+s.length<8&&i.every(ag)&&s.every(ag)}let r=t.split(":");return r.length===8&&r.every(ag)},Xq=t=>{if(t==="::1")return!0;let e=t.match(/^::ffff:(\d+\.\d+\.\d+\.\d+)$/i);if(e)return E$(e[1]);let r=t.match(/^::ffff:([0-9a-f]{1,4}):([0-9a-f]{1,4})$/i);if(r){let o=parseInt(r[1],16);return o>=32512&&o<=32767}let n=t.split(":");if(n.length===8){for(let o=0;o<7;o++)if(!/^0+$/.test(n[o]))return!1;return/^0*1$/.test(n[7])}return!1},k$=t=>t?Jq.has(t)||E$(t)||Yq(t)?!0:Xq(t):!1,Qq={http:80,https:443,ws:80,wss:443,ftp:21},eF=t=>{let e=t,r=0;if(e.charAt(0)==="["){let i=e.indexOf("]");if(i!==-1){let s=e.slice(1,i),a=e.slice(i+1);return a.charAt(0)===":"&&/^\d+$/.test(a.slice(1))&&(r=Number.parseInt(a.slice(1),10)),[s,r]}}let n=e.indexOf(":"),o=e.lastIndexOf(":");return n!==-1&&n===o&&/^\d+$/.test(e.slice(o+1))&&(r=Number.parseInt(e.slice(o+1),10),e=e.slice(0,o)),[e,r]},tF=/^(?:::|(?:0{1,4}:){1,4}:|(?:0{1,4}:){5})ffff:(\d+\.\d+\.\d+\.\d+)$/i,rF=/^(?:::|(?:0{1,4}:){1,4}:|(?:0{1,4}:){5})ffff:([0-9a-f]{1,4}):([0-9a-f]{1,4})$/i,nF=t=>{if(typeof t!="string"||t.indexOf(":")===-1)return t;let e=t.match(tF);if(e)return e[1];let r=t.match(rF);if(r){let n=parseInt(r[1],16),o=parseInt(r[2],16);return`${n>>8}.${n&255}.${o>>8}.${o&255}`}return t},$$=t=>t&&(t.charAt(0)==="["&&t.charAt(t.length-1)==="]"&&(t=t.slice(1,-1)),nF(t.replace(/\.+$/,"")));function cg(t){let e;try{e=new URL(t)}catch{return!1}let r=(process.env.no_proxy||process.env.NO_PROXY||"").toLowerCase();if(!r)return!1;if(r==="*")return!0;let n=Number.parseInt(e.port,10)||Qq[e.protocol.split(":",1)[0]]||0,o=$$(e.hostname.toLowerCase());return r.split(/[\s,]+/).some(i=>{if(!i)return!1;let[s,a]=eF(i);return s=$$(s),!s||a&&a!==n?!1:(s.charAt(0)==="*"&&(s=s.slice(1)),s.charAt(0)==="."?o.endsWith(s):o===s||k$(o)&&k$(s))})}function oF(t,e){t=t||10;let r=new Array(t),n=new Array(t),o=0,i=0,s;return e=e!==void 0?e:1e3,function(c){let l=Date.now(),p=n[i];s||(s=l),r[o]=c,n[o]=l;let d=i,f=0;for(;d!==o;)f+=r[d++],d=d%t;if(o=(o+1)%t,o===i&&(i=(i+1)%t),l-s<e)return;let m=p&&l-p;return m?Math.round(f*1e3/m):void 0}}var T$=oF;function iF(t,e){let r=0,n=1e3/e,o,i,s=(l,p=Date.now())=>{r=p,o=null,i&&(clearTimeout(i),i=null),t(...l)};return[(...l)=>{let p=Date.now(),d=p-r;d>=n?s(l,p):(o=l,i||(i=setTimeout(()=>{i=null,s(o)},n-d)))},()=>o&&s(o)]}var R$=iF;var _n=(t,e,r=3)=>{let n=0,o=T$(50,250);return R$(i=>{if(!i||typeof i.loaded!="number")return;let s=i.loaded,a=i.lengthComputable?i.total:void 0,c=a!=null?Math.min(s,a):s,l=Math.max(0,c-n),p=o(l);n=Math.max(n,c);let d={loaded:c,total:a,progress:a?c/a:void 0,bytes:l,rate:p||void 0,estimated:p&&a?(a-c)/p:void 0,event:i,lengthComputable:a!=null,[e?"download":"upload"]:!0};t(d)},r)},Fi=(t,e)=>{let r=t!=null;return[n=>e[0]({lengthComputable:r,total:t,loaded:n}),e[1]]},Ui=t=>(...e)=>b.asap(()=>t(...e));var Ll=t=>t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102,sF=(t,e,r)=>e+2<r&&Ll(t.charCodeAt(e+1))&&Ll(t.charCodeAt(e+2));function ba(t){if(!t||typeof t!="string"||!t.startsWith("data:"))return 0;let e=t.indexOf(",");if(e<0)return 0;let r=t.slice(5,e),n=t.slice(e+1);if(/;base64/i.test(r)){let s=n.length,a=n.length;for(let m=0;m<a;m++)if(n.charCodeAt(m)===37&&m+2<a){let y=n.charCodeAt(m+1),v=n.charCodeAt(m+2);Ll(y)&&Ll(v)&&(s-=2,m+=2)}let c=0,l=a-1,p=m=>m>=2&&n.charCodeAt(m-2)===37&&n.charCodeAt(m-1)===51&&(n.charCodeAt(m)===68||n.charCodeAt(m)===100);l>=0&&(n.charCodeAt(l)===61?(c++,l--):p(l)&&(c++,l-=3)),c===1&&l>=0&&(n.charCodeAt(l)===61||p(l))&&c++;let f=Math.floor(s/4)*3-(c||0);return f>0?f:0}let i=0;for(let s=0,a=n.length;s<a;s++){let c=n.charCodeAt(s);if(c===37&&sF(n,s,a))i+=1,s+=2;else if(c<128)i+=1;else if(c<2048)i+=2;else if(c>=55296&&c<=56319&&s+1<a){let l=n.charCodeAt(s+1);l>=56320&&l<=57343?(i+=4,s++):i+=3}else i+=3}return i}var P$={flush:vr.default.constants.Z_SYNC_FLUSH,finishFlush:vr.default.constants.Z_SYNC_FLUSH},aF={flush:vr.default.constants.BROTLI_OPERATION_FLUSH,finishFlush:vr.default.constants.BROTLI_OPERATION_FLUSH},cF={flush:vr.default.constants.ZSTD_e_flush,finishFlush:vr.default.constants.ZSTD_e_flush},F$=b.isFunction(vr.default.createBrotliDecompress),U$=b.isFunction(vr.default.createZstdDecompress),Z$="gzip, compress, deflate"+(F$?", br":""),lF=Z$+(U$?", zstd":""),{http:uF,https:pF}=M$.default,fg=/https:?/,dF=["content-type","content-length"];function fF(t,e,r){if(r!=="content-only"){t.set(e);return}Object.entries(e).forEach(([n,o])=>{dF.includes(n.toLowerCase())&&t.set(n,o)})}var A$=Symbol("axios.http.socketListener"),Dl=Symbol("axios.http.currentReq"),B$=Symbol("axios.http.installedTunnel"),mF=new Map,I$=new WeakMap,z$={22:21,24:5};function hF(t=process.versions&&process.versions.node){if(!t)return!1;let[e,r]=t.split(".").map(n=>Number(n));return!Number.isInteger(e)||!Number.isInteger(r)?!1:e>24?!0:z$[e]!=null&&r>=z$[e]}function gF(t,e=process.versions&&process.versions.node){if(!hF(e))return!1;let r=t&&t.options;return!!(r&&b.hasOwnProp(r,"proxyEnv")&&r.proxyEnv!=null)}function yF(t,e,r){return fg.test(t.protocol)?r||dg.default.globalAgent:e||pg.default.globalAgent}function xF(t,e){let r=t.protocol+"//"+t.hostname+":"+(t.port||"")+"#"+(t.auth||""),n=e?I$.get(e)||I$.set(e,new Map).get(e):mF,o=n.get(r);if(o)return o;let i=e&&e.options?{...e.options,...t}:t;if(o=new ug.default(i),e&&e.options){let s={...e.options},a=o.callback;o.callback=function(l,p){return a.call(this,l,{...s,...p})}}return o[B$]=!0,n.set(r,o),o}var C$=Ze.protocols.map(t=>t+":"),O$=t=>{if(!b.isString(t))return t;try{return decodeURIComponent(t)}catch{return t}},N$=(t,[e,r])=>(t.on("end",r).on("error",r),e),vF=new w$;function bF(t,e,r){t.beforeRedirects.proxy&&t.beforeRedirects.proxy(t),t.beforeRedirects.auth&&t.beforeRedirects.auth(t),t.beforeRedirects.sensitiveHeaders&&t.beforeRedirects.sensitiveHeaders(t,r),t.beforeRedirects.config&&t.beforeRedirects.config(t,e,r)}function _F(t,e){t&&Object.keys(t).forEach(r=>{e.has(r.toLowerCase())&&delete t[r]})}function wF(t,e){if(!e)return!1;try{return new URL(e.url).origin===new URL(t.href).origin}catch{return!1}}function H$(t,e,r,n,o,i){let s=e,a=yF(t,i,o);if(!s&&s!==!1&&!gF(a)){let c=Dk(r);c&&(cg(r)||(s=new URL(c)))}if(n&&t.headers)for(let c of Object.keys(t.headers))c.toLowerCase()==="proxy-authorization"&&delete t.headers[c];if(n&&t.agent&&t.agent[B$]&&(t.agent=void 0),s){let c=s instanceof URL,l=y=>c||b.hasOwnProp(s,y)?s[y]:void 0,p=l("username"),d=l("password"),f=b.hasOwnProp(s,"auth")?s.auth:void 0;if(p&&(f=(p||"")+":"+(d||"")),f){let y=typeof f=="object",v=y&&b.hasOwnProp(f,"username")?f.username:void 0,x=y&&b.hasOwnProp(f,"password")?f.password:void 0;if(!!(v||x))f=(v||"")+":"+(x||"");else if(y)throw new z("Invalid proxy authorization",z.ERR_BAD_OPTION,{proxy:s})}if(fg.test(t.protocol)){if(!(o instanceof ug.default)){let y=l("hostname")||l("host"),v=l("port"),x=l("protocol"),g=x?x.includes(":")?x:`${x}:`:"http:",_=y&&y.includes(":")&&!y.startsWith("[")?`[${y}]`:y,w=new URL(`${g}//${_}${v?":"+v:""}`),$={protocol:w.protocol,hostname:w.hostname.replace(/^\[|\]$/g,""),port:w.port,auth:f&&typeof f=="string"?f:void 0};w.protocol==="https:"&&($.ALPNProtocols=["http/1.1"]);let E=xF($,o);t.agent=E,t.agents&&(t.agents.https=E)}}else{if(f){let g=Buffer.from(f,"utf8").toString("base64");t.headers["Proxy-Authorization"]="Basic "+g}let y=!1;for(let g of Object.keys(t.headers))if(g.toLowerCase()==="host"){y=!0;break}y||(t.headers.host=t.hostname+(t.port?":"+t.port:""));let v=l("hostname")||l("host");t.hostname=v,t.host=v,t.port=l("port"),t.path=r;let x=l("protocol");x&&(t.protocol=x.includes(":")?x:`${x}:`)}}t.beforeRedirects.proxy=function(l){H$(l,e,l.href,!0,o,i)}}var SF=typeof process<"u"&&b.kindOf(process)==="process",kF=t=>new Promise((e,r)=>{let n,o,i=(c,l)=>{o||(o=!0,n&&n(c,l))},s=c=>{i(c),e(c)},a=c=>{i(c,!0),r(c)};t(s,a,c=>n=c).catch(a)}),$F=({address:t,family:e})=>{if(!b.isString(t))throw TypeError("address must be a string");return{address:t,family:e||(t.indexOf(".")<0?6:4)}},j$=(t,e)=>$F(b.isObject(t)?t:{address:t,family:e}),EF={request(t,e){let r=t.protocol+"//"+t.hostname+":"+(t.port||(t.protocol==="https:"?443:80)),{http2Options:n,headers:o}=t,i=vF.getSession(r,n),{HTTP2_HEADER_SCHEME:s,HTTP2_HEADER_METHOD:a,HTTP2_HEADER_PATH:c,HTTP2_HEADER_STATUS:l}=L$.default.constants,p={[s]:t.protocol.replace(":",""),[a]:t.method,[c]:t.path};b.forEach(o,(f,m)=>{m.charAt(0)!==":"&&(p[m]=f)});let d=i.request(p);return d.once("response",f=>{let m=d;f=Object.assign({},f);let y=f[l];delete f[l],m.headers=f,m.statusCode=+y,e(m)}),d}},V$=SF&&function(e){return kF(async function(n,o,i){let s=W=>b.getSafeProp(e,W),a=s("transitional")||Zn,c=s("data"),l=s("lookup"),p=s("family"),d=s("httpVersion");d===void 0&&(d=1);let f=s("http2Options"),m=s("httpAgent"),y=s("httpsAgent"),v=s("proxy"),x=s("responseType"),g=s("responseEncoding"),_=s("socketPath"),w=s("method").toUpperCase(),$=s("maxRedirects"),E=s("maxBodyLength"),Z=s("maxContentLength"),q=s("decompress"),$e,Pe=!1,le,Je;if(d=+d,Number.isNaN(d))throw TypeError(`Invalid protocol version: '${e.httpVersion}' is not a number`);if(d!==1&&d!==2)throw TypeError(`Unsupported protocol version '${d}'`);let Ct=d===2;if(l){let W=S$(l,G=>b.isArray(G)?G:[G]);l=(G,xe,Ve)=>{W(G,xe,(he,Ge,_t)=>{if(he)return Ve(he);let Qe=b.isArray(Ge)?Ge.map(Or=>j$(Or)):[j$(Ge,_t)];xe.all?Ve(he,Qe):Ve(he,Qe[0].address,Qe[0].family)})}}let St=new q$.EventEmitter;function de(W){try{St.emit("abort",!W||W.type?new xr(null,e,le):W)}catch{}}function vt(){Je&&(clearTimeout(Je),Je=null)}function V(){let W=s("timeout"),G=W?"timeout of "+W+"ms exceeded":"timeout exceeded",xe=s("timeoutErrorMessage");return xe&&(G=xe),new z(G,a.clarifyTimeoutError?z.ETIMEDOUT:z.ECONNABORTED,e,le)}St.once("abort",o);let Rt=()=>{vt(),e.cancelToken&&e.cancelToken.unsubscribe(de),e.signal&&e.signal.removeEventListener("abort",de),St.removeAllListeners()};(e.cancelToken||e.signal)&&(e.cancelToken&&e.cancelToken.subscribe(de),e.signal&&(e.signal.aborted?de():e.signal.addEventListener("abort",de))),i((W,G)=>{if($e=!0,vt(),G){Pe=!0,Rt();return}let{data:xe}=W;if(xe instanceof Ir.default.Readable||xe instanceof Ir.default.Duplex){let Ve=Ir.default.finished(xe,()=>{Ve(),Rt()})}else Rt()});let Zt=No(s("baseURL"),s("url"),s("allowAbsoluteUrls"),e),Wr=_?"http://localhost":Ze.hasBrowserEnv?Ze.origin:void 0,Ie=new URL(Zt,Wr),B=Ie.protocol||C$[0];if(B==="data:"){if(Z>-1){let G=String(s("url")||Zt||"");if(ba(G)>Z)return o(new z("maxContentLength size of "+Z+" exceeded",z.ERR_BAD_RESPONSE,e))}let W;if(w!=="GET")return on(n,o,{status:405,statusText:"method not allowed",headers:{},config:e});try{W=eg(s("url"),x==="blob",{Blob:e.env&&e.env.Blob})}catch(G){throw z.from(G,z.ERR_BAD_REQUEST,e)}return x==="text"?(W=W.toString(g),(!g||g==="utf8")&&(W=b.stripBOM(W))):x==="stream"&&(W=Ir.default.Readable.from(W)),on(n,o,{data:W,status:200,statusText:"OK",headers:new ot,config:e})}if(C$.indexOf(B)===-1)return o(new z("Unsupported protocol "+B,z.ERR_BAD_REQUEST,e));let Fe=ot.from(e.headers).normalize();Fe.set("User-Agent","axios/"+bn,!1);let{onUploadProgress:Le,onDownloadProgress:Yt}=e,it=e.maxRate,me,we;if(b.isSpecCompliantForm(c)){let W=Fe.getContentType(/boundary=([-_\w\d]{10,70})/i);c=y$(c,G=>{Fe.set(G)},{tag:`axios-${bn}-boundary`,boundary:W&&W[1]||void 0})}else if(b.isFormData(c)&&b.isFunction(c.getHeaders)&&c.getHeaders!==Object.prototype.getHeaders){if(fF(Fe,c.getHeaders(),s("formDataHeaderPolicy")),!Fe.hasContentLength())try{let W=await D$.default.promisify(c.getLength).call(c);Number.isFinite(W)&&W>=0&&Fe.setContentLength(W)}catch{}}else if(b.isBlob(c)||b.isFile(c))c.size&&Fe.setContentType(c.type||"application/octet-stream"),Fe.setContentLength(c.size||0),c=Ir.default.Readable.from(jl(c));else if(c&&!b.isStream(c)){if(!Buffer.isBuffer(c))if(b.isArrayBuffer(c))c=Buffer.from(new Uint8Array(c));else if(b.isString(c))c=Buffer.from(c,"utf-8");else return o(new z("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",z.ERR_BAD_REQUEST,e));if(Fe.setContentLength(c.length,!1),E>-1&&c.length>E)return o(new z("Request body larger than maxBodyLength limit",z.ERR_BAD_REQUEST,e))}let ut=b.toFiniteNumber(Fe.getContentLength());b.isArray(it)?(me=it[0],we=it[1]):me=we=it,c&&(Le||me)&&(b.isStream(c)||(c=Ir.default.Readable.from(c,{objectMode:!1})),c=Ir.default.pipeline([c,new ng({maxRate:b.toFiniteNumber(me)})],b.noop),Le&&c.on("progress",N$(c,Fi(ut,_n(Ui(Le),!1,3)))));let ze,kt=s("auth");if(kt){let W=b.getSafeProp(kt,"username")||"",G=b.getSafeProp(kt,"password")||"";ze=W+":"+G}if(!ze&&(Ie.username||Ie.password)){let W=O$(Ie.username),G=O$(Ie.password);ze=W+":"+G}ze&&Fe.delete("authorization");let $t;try{$t=Oo(Ie.pathname+Ie.search,s("params"),s("paramsSerializer")).replace(/^\?/,"")}catch(W){return o(z.from(W,z.ERR_BAD_REQUEST,e,null,null,{url:s("url"),exists:!0}))}Fe.set("Accept-Encoding",b.hasOwnProp(a,"advertiseZstdAcceptEncoding")&&a.advertiseZstdAcceptEncoding===!0?lF:Z$,!1);let Se=Object.assign(Object.create(null),{path:$t,method:w,headers:Pi(Fe),agents:{http:m,https:y},auth:ze,protocol:B,family:p,beforeRedirect:bF,beforeRedirects:Object.create(null),http2Options:f});if(!b.isUndefined(l)&&(Se.lookup=l),_){if(typeof _!="string")return o(new z("socketPath must be a string",z.ERR_BAD_OPTION_VALUE,e));let W=s("allowedSocketPaths");if(W!=null){let G=Array.isArray(W)?W:[W],xe=(0,lg.resolve)(_);if(!G.some(he=>typeof he=="string"&&(0,lg.resolve)(he)===xe))return o(new z(`socketPath "${_}" is not permitted by allowedSocketPaths`,z.ERR_BAD_OPTION_VALUE,e))}Se.socketPath=_}else Se.hostname=Ie.hostname.startsWith("[")?Ie.hostname.slice(1,-1):Ie.hostname,Se.port=Ie.port,H$(Se,v,B+"//"+Ie.hostname+(Ie.port?":"+Ie.port:"")+Se.path,!1,y,m);let Bt,br=!1,Ot=!1,ue=fg.test(Se.protocol);if(Se.agent==null&&(Se.agent=ue?y:m),Ct)Bt=EF;else{let W=s("transport");if(W)Bt=W;else if($===0)Bt=ue?dg.default:pg.default,br=!0;else{Ot=!0,Se.sensitiveHeaders=[],$&&(Se.maxRedirects=$);let G=s("beforeRedirect");if(G&&(Se.beforeRedirects.config=G),ze){let Ve=Ie.origin,he=ze;Se.beforeRedirects.auth=function(_t){try{new URL(_t.href).origin===Ve&&(_t.auth=he)}catch{}}}let xe=s("sensitiveHeaders");if(xe!=null){if(!b.isArray(xe))return o(new z("sensitiveHeaders must be an array of strings",z.ERR_BAD_OPTION_VALUE,e));let Ve=new Set;for(let he of xe){if(!b.isString(he))return o(new z("sensitiveHeaders must be an array of strings",z.ERR_BAD_OPTION_VALUE,e));Ve.add(he.toLowerCase())}Ve.size&&(Se.sensitiveHeaders=Array.from(Ve),Se.beforeRedirects.sensitiveHeaders=function(Ge,_t){wF(Ge,_t)||_F(Ge.headers,Ve)})}Bt=ue?pF:uF}}E>-1?Se.maxBodyLength=E:Se.maxBodyLength=1/0,Se.insecureHTTPParser=!!s("insecureHTTPParser"),le=Bt.request(Se,function(G){if(vt(),le.destroyed)return;let xe=[G],Ve=b.toFiniteNumber(G.headers["content-length"]);if(Yt||we){let Qe=new ng({maxRate:b.toFiniteNumber(we)});Yt&&Qe.on("progress",N$(Qe,Fi(Ve,_n(Ui(Yt),!0,3)))),xe.push(Qe)}let he=G,Ge=G.req||le;if(q!==!1&&G.headers["content-encoding"])switch((w==="HEAD"||G.statusCode===204)&&delete G.headers["content-encoding"],(G.headers["content-encoding"]||"").toLowerCase()){case"gzip":case"x-gzip":case"compress":case"x-compress":xe.push(vr.default.createUnzip(P$)),delete G.headers["content-encoding"];break;case"deflate":xe.push(new v$),xe.push(vr.default.createUnzip(P$)),delete G.headers["content-encoding"];break;case"br":F$&&(xe.push(vr.default.createBrotliDecompress(aF)),delete G.headers["content-encoding"]);break;case"zstd":U$&&(xe.push(vr.default.createZstdDecompress(cF)),delete G.headers["content-encoding"]);break}he=xe.length>1?Ir.default.pipeline(xe,b.noop):xe[0];let _t={status:G.statusCode,statusText:G.statusMessage,headers:new ot(G.headers),config:e,request:Ge};if(x==="stream"){if(Z>-1){let Qe=Z,Or=he;async function*un(){let u=0;for await(let S of Or){if(u+=S.length,u>Qe)throw new z("maxContentLength size of "+Qe+" exceeded",z.ERR_BAD_RESPONSE,e,Ge);yield S}}he=Ir.default.Readable.from(un(),{objectMode:!1})}_t.data=he,on(n,o,_t)}else{let Qe=[],Or=0;he.on("data",function(u){Qe.push(u),Or+=u.length,Z>-1&&Or>Z&&(Pe=!0,he.destroy(),de(new z("maxContentLength size of "+Z+" exceeded",z.ERR_BAD_RESPONSE,e,Ge)))}),he.on("aborted",function(){if(Pe)return;let u=new z("stream has been aborted",z.ERR_BAD_RESPONSE,e,Ge,_t);he.destroy(u),o(u)}),he.on("error",function(u){Pe||o(z.from(u,null,e,Ge,_t))}),he.on("end",function(){try{let u=Qe.length===1?Qe[0]:Buffer.concat(Qe);x!=="arraybuffer"&&(u=u.toString(g),(!g||g==="utf8")&&(u=b.stripBOM(u))),_t.data=u}catch(u){return o(z.from(u,null,e,_t.request,_t))}on(n,o,_t)})}St.once("abort",Qe=>{he.destroyed||(he.emit("error",Qe),he.destroy())})}),St.once("abort",W=>{le.close?le.close():le.destroy(W)}),le.on("error",function(G){o(z.from(G,null,e,le))});let Ye=new Set;if(le.on("socket",function(G){typeof G.setKeepAlive=="function"&&G.setKeepAlive(!0,1e3*60),G[A$]||(G.on("error",function(Ve){let he=G[Dl];he&&!he.destroyed&&he.destroy(Ve)}),G[A$]=!0),G[Dl]=le,Ye.add(G)}),le.once("close",function(){vt();for(let G of Ye)G[Dl]===le&&(G[Dl]=null);Ye.clear()}),s("timeout")){let W=parseInt(s("timeout"),10);if(Number.isNaN(W)){de(new z("error trying to parse `config.timeout` to int",z.ERR_BAD_OPTION_VALUE,e,le));return}let G=function(){$e||de(V())};br&&W>0&&(Je=setTimeout(G,W)),le.setTimeout(W,G)}else le.setTimeout(0);if(b.isStream(c)){let W=!1,G=!1;c.on("end",()=>{W=!0}),c.once("error",Ve=>{G=!0,le.destroy(Ve)}),c.on("close",()=>{!W&&!G&&de(new xr("Request stream has been aborted",e,le))});let xe=c;if(E>-1&&!Ot){let Ve=E,he=0;xe=Ir.default.pipeline([c,new Ir.default.Transform({transform(Ge,_t,Qe){if(he+=Ge.length,he>Ve)return Qe(new z("Request body larger than maxBodyLength limit",z.ERR_BAD_REQUEST,e,le));Qe(null,Ge)}})],b.noop),xe.on("error",Ge=>{le.destroyed||le.destroy(Ge)})}xe.pipe(le)}else c&&le.write(c),le.end()})};var G$=Ze.hasStandardBrowserEnv?((t,e)=>r=>(r=new URL(r,Ze.origin),t.protocol===r.protocol&&t.host===r.host&&(e||t.port===r.port)))(new URL(Ze.origin),Ze.navigator&&/(msie|trident)/i.test(Ze.navigator.userAgent)):()=>!0;var W$=Ze.hasStandardBrowserEnv?{write(t,e,r,n,o,i,s){if(typeof document>"u")return;let a=[`${t}=${encodeURIComponent(e)}`];b.isNumber(r)&&a.push(`expires=${new Date(r).toUTCString()}`),b.isString(n)&&a.push(`path=${n}`),b.isString(o)&&a.push(`domain=${o}`),i===!0&&a.push("secure"),b.isString(s)&&a.push(`SameSite=${s}`),document.cookie=a.join("; ")},read(t){if(typeof document>"u")return null;let e=document.cookie.split(";");for(let r=0;r<e.length;r++){let n=e[r].replace(/^\s+/,""),o=n.indexOf("=");if(o!==-1&&n.slice(0,o)===t)try{return decodeURIComponent(n.slice(o+1))}catch{return n.slice(o+1)}}return null},remove(t){this.write(t,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};var K$=t=>t instanceof ot?{...t}:t;function Vr(t,e){t=t||{},e=e||{};let r=Object.create(null);Object.defineProperty(r,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function n(p,d,f,m){return b.isPlainObject(p)&&b.isPlainObject(d)?b.merge.call({caseless:m},p,d):b.isPlainObject(d)?b.merge({},d):b.isArray(d)?d.slice():d}function o(p,d,f,m){if(b.isUndefined(d)){if(!b.isUndefined(p))return n(void 0,p,f,m)}else return n(p,d,f,m)}function i(p,d){if(!b.isUndefined(d))return n(void 0,d)}function s(p,d){if(b.isUndefined(d)){if(!b.isUndefined(p))return n(void 0,p)}else return n(void 0,d)}function a(p){let d=b.hasOwnProp(e,"transitional")?e.transitional:void 0;if(!b.isUndefined(d))if(b.isPlainObject(d)){if(b.hasOwnProp(d,p))return d[p]}else return;let f=b.hasOwnProp(t,"transitional")?t.transitional:void 0;if(b.isPlainObject(f)&&b.hasOwnProp(f,p))return f[p]}function c(p,d,f){if(b.hasOwnProp(e,f))return n(p,d);if(b.hasOwnProp(t,f))return n(void 0,p)}let l={url:i,method:i,data:i,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,allowedSocketPaths:s,responseEncoding:s,validateStatus:c,headers:(p,d,f)=>o(K$(p),K$(d),f,!0)};return b.forEach(Object.keys({...t,...e}),function(d){if(d==="__proto__"||d==="constructor"||d==="prototype")return;let f=b.hasOwnProp(l,d)?l[d]:o,m=b.hasOwnProp(t,d)?t[d]:void 0,y=b.hasOwnProp(e,d)?e[d]:void 0,v=f(m,y,d);b.isUndefined(v)&&f!==c||(r[d]=v)}),b.hasOwnProp(e,"validateStatus")&&b.isUndefined(e.validateStatus)&&a("validateStatusUndefinedResolves")===!1&&(b.hasOwnProp(t,"validateStatus")?r.validateStatus=n(void 0,t.validateStatus):delete r.validateStatus),r}var TF=["content-type","content-length"];function RF(t,e,r){if(r!=="content-only"){t.set(e);return}Object.entries(e||{}).forEach(([n,o])=>{TF.includes(n.toLowerCase())&&t.set(n,o)})}var PF=t=>encodeURIComponent(t).replace(/%([0-9A-F]{2})/gi,(e,r)=>String.fromCharCode(parseInt(r,16)));function AF(t){let e=Vr({},t),r=f=>b.hasOwnProp(e,f)?e[f]:void 0,n=r("data"),o=r("withXSRFToken"),i=r("xsrfHeaderName"),s=r("xsrfCookieName"),a=r("headers"),c=r("auth"),l=r("baseURL"),p=r("allowAbsoluteUrls"),d=r("url");if(e.headers=a=ot.from(a),e.url=Oo(No(l,d,p,e),r("params"),r("paramsSerializer")),c){let f=b.getSafeProp(c,"username")||"",m=b.getSafeProp(c,"password")||"";try{a.set("Authorization","Basic "+btoa(f+":"+(m?PF(m):"")))}catch(y){throw z.from(y,z.ERR_BAD_OPTION_VALUE,t)}}if(b.isFormData(n)&&(Ze.hasStandardBrowserEnv||Ze.hasStandardBrowserWebWorkerEnv||b.isReactNative(n)?a.setContentType(void 0):b.isFunction(n.getHeaders)&&RF(a,n.getHeaders(),r("formDataHeaderPolicy"))),Ze.hasStandardBrowserEnv&&(b.isFunction(o)&&(o=o(e)),o===!0||o==null&&G$(e.url))){let m=i&&s&&W$.read(s);m&&a.set(i,m)}return e}var Ml=AF;var IF=typeof XMLHttpRequest<"u",J$=IF&&function(t){return new Promise(function(r,n){let o=Ml(t),i=o.data,s=ot.from(o.headers).normalize(),{responseType:a,onUploadProgress:c,onDownloadProgress:l}=o,p,d,f,m,y;function v(){m&&m(),y&&y(),o.cancelToken&&o.cancelToken.unsubscribe(p),o.signal&&o.signal.removeEventListener("abort",p)}let x=new XMLHttpRequest;x.open(o.method.toUpperCase(),o.url,!0),x.timeout=o.timeout;function g(){if(!x)return;let w=ot.from("getAllResponseHeaders"in x&&x.getAllResponseHeaders()),E={data:!a||a==="text"||a==="json"?x.responseText:x.response,status:x.status,statusText:x.statusText,headers:w,config:t,request:x};on(function(q){r(q),v()},function(q){n(q),v()},E),x=null}"onloadend"in x?x.onloadend=g:x.onreadystatechange=function(){!x||x.readyState!==4||x.status===0&&!(x.responseURL&&x.responseURL.startsWith("file:"))||setTimeout(g)},x.onabort=function(){x&&(n(new z("Request aborted",z.ECONNABORTED,t,x)),v(),x=null)},x.onerror=function($){let E=$&&$.message?$.message:"Network Error",Z=new z(E,z.ERR_NETWORK,t,x);Z.event=$||null,n(Z),v(),x=null},x.ontimeout=function(){let $=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded",E=o.transitional||Zn;o.timeoutErrorMessage&&($=o.timeoutErrorMessage),n(new z($,E.clarifyTimeoutError?z.ETIMEDOUT:z.ECONNABORTED,t,x)),v(),x=null},i===void 0&&s.setContentType(null),"setRequestHeader"in x&&b.forEach(Pi(s),function($,E){x.setRequestHeader(E,$)}),b.isUndefined(o.withCredentials)||(x.withCredentials=!!o.withCredentials),a&&a!=="json"&&(x.responseType=o.responseType),l&&([f,y]=_n(l,!0),x.addEventListener("progress",f)),c&&x.upload&&([d,m]=_n(c),x.upload.addEventListener("progress",d),x.upload.addEventListener("loadend",m)),(o.cancelToken||o.signal)&&(p=w=>{x&&(n(!w||w.type?new xr(null,t,x):w),x.abort(),v(),x=null)},o.cancelToken&&o.cancelToken.subscribe(p),o.signal&&(o.signal.aborted?p():o.signal.addEventListener("abort",p)));let _=xa(o.url);if(_&&!Ze.protocols.includes(_)){n(new z("Unsupported protocol "+_+":",z.ERR_BAD_REQUEST,t)),v();return}x.send(i||null)})};var zF=(t,e)=>{if(t=t?t.filter(Boolean):[],!e&&!t.length)return;let r=new AbortController,n=!1,o=function(c){if(!n){n=!0,s();let l=c instanceof Error?c:this.reason;r.abort(l instanceof z?l:new xr(l instanceof Error?l.message:l))}},i=e&&setTimeout(()=>{i=null,o(new z(`timeout of ${e}ms exceeded`,z.ETIMEDOUT))},e),s=()=>{t&&(i&&clearTimeout(i),i=null,t.forEach(c=>{c.unsubscribe?c.unsubscribe(o):c.removeEventListener("abort",o)}),t=null)};t.forEach(c=>c.addEventListener("abort",o,{once:!0}));let{signal:a}=r;return a.unsubscribe=()=>b.asap(s),a},Y$=zF;var CF=function*(t,e){let r=t.byteLength;if(!e||r<e){yield t;return}let n=0,o;for(;n<r;)o=n+e,yield t.slice(n,o),n=o},OF=async function*(t,e){for await(let r of NF(t))yield*CF(r,e)},NF=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}let e=t.getReader();try{for(;;){let{done:r,value:n}=await e.read();if(r)break;yield n}}finally{await e.cancel()}},mg=(t,e,r,n)=>{let o=OF(t,e),i=0,s,a=c=>{s||(s=!0,n&&n(c))};return new ReadableStream({async pull(c){try{let{done:l,value:p}=await o.next();if(l){a(),c.close();return}let d=p.byteLength;if(r){let f=i+=d;r(f)}c.enqueue(new Uint8Array(p))}catch(l){throw a(l),l}},cancel(c){return a(c),o.return()}},{highWaterMark:2})};var X$=64*1024,{isFunction:ql}=b,jF=t=>encodeURIComponent(t).replace(/%([0-9A-F]{2})/gi,(e,r)=>String.fromCharCode(parseInt(r,16))),Q$=t=>{if(!b.isString(t))return t;try{return decodeURIComponent(t)}catch{return t}},eE=(t,...e)=>{try{return!!t(...e)}catch{return!1}},LF=t=>{let e=t.indexOf("://"),r=t;return e!==-1&&(r=r.slice(e+3)),r.includes("@")||r.includes(":")},DF=t=>{let e=b.global!==void 0&&b.global!==null?b.global:globalThis,{ReadableStream:r,TextEncoder:n}=e;t=b.merge.call({skipUndefined:!0},{Request:e.Request,Response:e.Response},t);let{fetch:o,Request:i,Response:s}=t,a=o?ql(o):typeof fetch=="function",c=ql(i),l=ql(s);if(!a)return!1;let p=a&&ql(r),d=a&&(typeof n=="function"?(g=>_=>g.encode(_))(new n):async g=>new Uint8Array(await new i(g).arrayBuffer())),f=c&&p&&eE(()=>{let g=!1,_=new i(Ze.origin,{body:new r,method:"POST",get duplex(){return g=!0,"half"}}),w=_.headers.has("Content-Type");return _.body!=null&&_.body.cancel(),g&&!w}),m=l&&p&&eE(()=>b.isReadableStream(new s("").body)),y={stream:m&&(g=>g.body)};a&&["text","arrayBuffer","blob","formData","stream"].forEach(g=>{!y[g]&&(y[g]=(_,w)=>{let $=_&&_[g];if($)return $.call(_);throw new z(`Response type '${g}' is not supported`,z.ERR_NOT_SUPPORT,w)})});let v=async g=>{if(g==null)return 0;if(b.isBlob(g))return g.size;if(b.isSpecCompliantForm(g))return(await new i(Ze.origin,{method:"POST",body:g}).arrayBuffer()).byteLength;if(b.isArrayBufferView(g)||b.isArrayBuffer(g))return g.byteLength;if(b.isURLSearchParams(g)&&(g=g+""),b.isString(g))return(await d(g)).byteLength},x=async(g,_)=>{let w=b.toFiniteNumber(g.getContentLength());return w??v(_)};return async g=>{let{url:_,method:w,data:$,signal:E,cancelToken:Z,timeout:q,onDownloadProgress:$e,onUploadProgress:Pe,responseType:le,headers:Je,withCredentials:Ct="same-origin",fetchOptions:St,maxContentLength:de,maxBodyLength:vt}=Ml(g),V=b.isNumber(de)&&de>-1,Rt=b.isNumber(vt)&&vt>-1,Zt=me=>b.hasOwnProp(g,me)?g[me]:void 0,Wr=o||fetch;le=le?(le+"").toLowerCase():"text";let Ie=Y$([E,Z&&Z.toAbortSignal()],q),B=null,Fe=Ie&&Ie.unsubscribe&&(()=>{Ie.unsubscribe()}),Le,Yt=null,it=()=>new z("Request body larger than maxBodyLength limit",z.ERR_BAD_REQUEST,g,B);try{let me,we=Zt("auth");if(we){let ue=b.getSafeProp(we,"username")||"",Ye=b.getSafeProp(we,"password")||"";me={username:ue,password:Ye}}if(LF(_)){let ue=new URL(_,Ze.origin);if(!me&&(ue.username||ue.password)){let Ye=Q$(ue.username),W=Q$(ue.password);me={username:Ye,password:W}}(ue.username||ue.password)&&(ue.username="",ue.password="",_=ue.href)}if(me&&(Je.delete("authorization"),Je.set("Authorization","Basic "+btoa(jF((me.username||"")+":"+(me.password||""))))),V&&typeof _=="string"&&_.startsWith("data:")&&ba(_)>de)throw new z("maxContentLength size of "+de+" exceeded",z.ERR_BAD_RESPONSE,g,B);if(Rt&&w!=="get"&&w!=="head"){let ue=await v($);if(typeof ue=="number"&&isFinite(ue)&&(Le=ue,ue>vt))throw it()}let ut=Rt&&(b.isReadableStream($)||b.isStream($)),ze=(ue,Ye,W)=>mg(ue,X$,G=>{if(Rt&&G>vt)throw Yt=it();Ye&&Ye(G)},W);if(f&&w!=="get"&&w!=="head"&&(Pe||ut)){if(Le=Le??await x(Je,$),Le!==0||ut){let ue=new i(_,{method:"POST",body:$,duplex:"half"}),Ye;if(b.isFormData($)&&(Ye=ue.headers.get("content-type"))&&Je.setContentType(Ye),ue.body){let[W,G]=Pe&&Fi(Le,_n(Ui(Pe)))||[];$=ze(ue.body,W,G)}}}else if(ut&&!c&&p&&w!=="get"&&w!=="head")$=ze($);else if(ut&&c&&!f&&w!=="get"&&w!=="head")throw new z("Stream request bodies are not supported by the current fetch implementation",z.ERR_NOT_SUPPORT,g,B);b.isString(Ct)||(Ct=Ct?"include":"omit");let kt=c&&"credentials"in i.prototype;if(b.isFormData($)){let ue=Je.getContentType();ue&&/^multipart\/form-data/i.test(ue)&&!/boundary=/i.test(ue)&&Je.delete("content-type")}Je.set("User-Agent","axios/"+bn,!1);let $t={...St,signal:Ie,method:w.toUpperCase(),headers:Pi(Je.normalize()),body:$,duplex:"half",credentials:kt?Ct:void 0};B=c&&new i(_,$t);let Se=await(c?Wr(B,St):Wr(_,$t)),Bt=ot.from(Se.headers);if(V){let ue=b.toFiniteNumber(Bt.getContentLength());if(ue!=null&&ue>de)throw new z("maxContentLength size of "+de+" exceeded",z.ERR_BAD_RESPONSE,g,B)}let br=m&&(le==="stream"||le==="response");if(m&&Se.body&&($e||V||br&&Fe)){let ue={};["status","statusText","headers"].forEach(he=>{ue[he]=Se[he]});let Ye=b.toFiniteNumber(Bt.getContentLength()),[W,G]=$e&&Fi(Ye,_n(Ui($e),!0))||[],xe=0,Ve=he=>{if(V&&(xe=he,xe>de))throw new z("maxContentLength size of "+de+" exceeded",z.ERR_BAD_RESPONSE,g,B);W&&W(he)};Se=new s(mg(Se.body,X$,Ve,()=>{G&&G(),Fe&&Fe()}),ue)}le=le||"text";let Ot=await y[b.findKey(y,le)||"text"](Se,g);if(V&&!m&&!br){let ue;if(Ot!=null&&(typeof Ot.byteLength=="number"?ue=Ot.byteLength:typeof Ot.size=="number"?ue=Ot.size:typeof Ot=="string"&&(ue=typeof n=="function"?new n().encode(Ot).byteLength:Ot.length)),typeof ue=="number"&&ue>de)throw new z("maxContentLength size of "+de+" exceeded",z.ERR_BAD_RESPONSE,g,B)}return!br&&Fe&&Fe(),await new Promise((ue,Ye)=>{on(ue,Ye,{data:Ot,headers:ot.from(Se.headers),status:Se.status,statusText:Se.statusText,config:g,request:B})})}catch(me){if(Fe&&Fe(),Ie&&Ie.aborted&&Ie.reason instanceof z){let we=Ie.reason;throw we.config=g,B&&(we.request=B),me!==we&&Object.defineProperty(we,"cause",{__proto__:null,value:me,writable:!0,enumerable:!1,configurable:!0}),we}if(Yt)throw B&&!Yt.request&&(Yt.request=B),Yt;if(me instanceof z)throw B&&!me.request&&(me.request=B),me;if(me&&me.name==="TypeError"&&/Load failed|fetch/i.test(me.message)){let we=new z("Network Error",z.ERR_NETWORK,g,B,me&&me.response);throw Object.defineProperty(we,"cause",{__proto__:null,value:me.cause||me,writable:!0,enumerable:!1,configurable:!0}),we}throw z.from(me,me&&me.code,g,B,me&&me.response)}}},MF=new Map,hg=t=>{let e=t&&t.env||{},{fetch:r,Request:n,Response:o}=e,i=[n,o,r],s=i.length,a=s,c,l,p=MF;for(;a--;)c=i[a],l=p.get(c),l===void 0&&p.set(c,l=a?new Map:DF(e)),p=l;return l},f8=hg();var gg={http:V$,xhr:J$,fetch:{get:hg}};b.forEach(gg,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{__proto__:null,value:e})}catch{}Object.defineProperty(t,"adapterName",{__proto__:null,value:e})}});var tE=t=>`- ${t}`,FF=t=>b.isFunction(t)||t===null||t===!1;function UF(t,e){t=b.isArray(t)?t:[t];let{length:r}=t,n,o,i={};for(let s=0;s<r;s++){n=t[s];let a;if(o=n,!FF(n)&&(o=gg[(a=String(n)).toLowerCase()],o===void 0))throw new z(`Unknown adapter '${a}'`);if(o&&(b.isFunction(o)||(o=o.get(e))))break;i[a||"#"+s]=o}if(!o){let s=Object.entries(i).map(([c,l])=>`adapter ${c} `+(l===!1?"is not supported by the environment":"is not available in the build")),a=r?s.length>1?`since :
|
|
58
|
-
`+s.map(
|
|
59
|
-
`):" "+
|
|
60
|
-
`);return s===-1?"":o.stack.slice(s+1)})();try{if(!
|
|
45
|
+
path: iss.path ? [${go(b)}, ...iss.path] : [${go(b)}]
|
|
46
|
+
})));`),f.write(`newResult[${go(b)}] = ${w}.value`)}f.write("payload.value = newResult;"),f.write("return payload;");let m=f.compile();return(b,w)=>m(d,b,w)},o,i=ni,s=!Fa.jitless,c=s&&Iu.value,l=e.catchall,p;t._zod.parse=(d,f)=>{p??(p=n.value);let h=d.value;if(!i(h))return d.issues.push({expected:"object",code:"invalid_type",input:h,inst:t}),d;let y=[];if(s&&c&&(f==null?void 0:f.async)===!1&&f.jitless!==!0)o||(o=r(e.shape)),d=o(d,f);else{d.value={};let w=p.shape;for(let k of p.keys){let E=w[k],F=E._zod.run({value:h[k],issues:[]},f),j=E._zod.optin==="optional"&&E._zod.optout==="optional";F instanceof Promise?y.push(F.then(me=>j?wx(me,d,k,h):Ga(me,d,k))):j?wx(F,d,k,h):Ga(F,d,k)}}if(!l)return y.length?Promise.all(y).then(()=>d):d;let v=[],x=p.keySet,m=l._zod,b=m.def.type;for(let w of Object.keys(h)){if(x.has(w))continue;if(b==="never"){v.push(w);continue}let k=m.run({value:h[w],issues:[]},f);k instanceof Promise?y.push(k.then(E=>Ga(E,d,w))):Ga(k,d,w)}return v.length&&d.issues.push({code:"unrecognized_keys",keys:v,input:h,inst:t}),y.length?Promise.all(y).then(()=>d):d}});function Sx(t,e,n,r){for(let o of t)if(o.issues.length===0)return e.value=o.value,e;return e.issues.push({code:"invalid_union",input:e.value,inst:n,errors:t.map(o=>o.issues.map(i=>Nn(i,r,gn())))}),e}var Ja=I("$ZodUnion",(t,e)=>{Ke.init(t,e),et(t._zod,"optin",()=>e.options.some(n=>n._zod.optin==="optional")?"optional":void 0),et(t._zod,"optout",()=>e.options.some(n=>n._zod.optout==="optional")?"optional":void 0),et(t._zod,"values",()=>{if(e.options.every(n=>n._zod.values))return new Set(e.options.flatMap(n=>Array.from(n._zod.values)))}),et(t._zod,"pattern",()=>{if(e.options.every(n=>n._zod.pattern)){let n=e.options.map(r=>r._zod.pattern);return new RegExp(`^(${n.map(r=>as(r.source)).join("|")})$`)}}),t._zod.parse=(n,r)=>{let o=!1,i=[];for(let s of e.options){let a=s._zod.run({value:n.value,issues:[]},r);if(a instanceof Promise)i.push(a),o=!0;else{if(a.issues.length===0)return a;i.push(a)}}return o?Promise.all(i).then(s=>Sx(s,n,t,r)):Sx(i,n,t,r)}}),vp=I("$ZodDiscriminatedUnion",(t,e)=>{Ja.init(t,e);let n=t._zod.parse;et(t._zod,"propValues",()=>{let o={};for(let i of e.options){let s=i._zod.propValues;if(!s||Object.keys(s).length===0)throw new Error(`Invalid discriminated union option at index "${e.options.indexOf(i)}"`);for(let[a,c]of Object.entries(s)){o[a]||(o[a]=new Set);for(let l of c)o[a].add(l)}}return o});let r=is(()=>{let o=e.options,i=new Map;for(let s of o){let a=s._zod.propValues[e.discriminator];if(!a||a.size===0)throw new Error(`Invalid discriminated union option at index "${e.options.indexOf(s)}"`);for(let c of a){if(i.has(c))throw new Error(`Duplicate discriminator value "${String(c)}"`);i.set(c,s)}}return i});t._zod.parse=(o,i)=>{let s=o.value;if(!ni(s))return o.issues.push({code:"invalid_type",expected:"object",input:s,inst:t}),o;let a=r.value.get(s==null?void 0:s[e.discriminator]);return a?a._zod.run(o,i):e.unionFallback?n(o,i):(o.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",input:s,path:[e.discriminator],inst:t}),o)}}),bp=I("$ZodIntersection",(t,e)=>{Ke.init(t,e),t._zod.parse=(n,r)=>{let o=n.value,i=e.left._zod.run({value:o,issues:[]},r),s=e.right._zod.run({value:o,issues:[]},r);return i instanceof Promise||s instanceof Promise?Promise.all([i,s]).then(([c,l])=>kx(n,c,l)):kx(n,i,s)}});function Gu(t,e){if(t===e)return{valid:!0,data:t};if(t instanceof Date&&e instanceof Date&&+t==+e)return{valid:!0,data:t};if(ri(t)&&ri(e)){let n=Object.keys(e),r=Object.keys(t).filter(i=>n.indexOf(i)!==-1),o={...t,...e};for(let i of r){let s=Gu(t[i],e[i]);if(!s.valid)return{valid:!1,mergeErrorPath:[i,...s.mergeErrorPath]};o[i]=s.data}return{valid:!0,data:o}}if(Array.isArray(t)&&Array.isArray(e)){if(t.length!==e.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let r=0;r<t.length;r++){let o=t[r],i=e[r],s=Gu(o,i);if(!s.valid)return{valid:!1,mergeErrorPath:[r,...s.mergeErrorPath]};n.push(s.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function kx(t,e,n){if(e.issues.length&&t.issues.push(...e.issues),n.issues.length&&t.issues.push(...n.issues),yo(t))return t;let r=Gu(e.value,n.value);if(!r.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(r.mergeErrorPath)}`);return t.value=r.data,t}var _p=I("$ZodRecord",(t,e)=>{Ke.init(t,e),t._zod.parse=(n,r)=>{let o=n.value;if(!ri(o))return n.issues.push({expected:"record",code:"invalid_type",input:o,inst:t}),n;let i=[];if(e.keyType._zod.values){let s=e.keyType._zod.values;n.value={};for(let c of s)if(typeof c=="string"||typeof c=="number"||typeof c=="symbol"){let l=e.valueType._zod.run({value:o[c],issues:[]},r);l instanceof Promise?i.push(l.then(p=>{p.issues.length&&n.issues.push(...Jn(c,p.issues)),n.value[c]=p.value})):(l.issues.length&&n.issues.push(...Jn(c,l.issues)),n.value[c]=l.value)}let a;for(let c in o)s.has(c)||(a=a??[],a.push(c));a&&a.length>0&&n.issues.push({code:"unrecognized_keys",input:o,inst:t,keys:a})}else{n.value={};for(let s of Reflect.ownKeys(o)){if(s==="__proto__")continue;let a=e.keyType._zod.run({value:s,issues:[]},r);if(a instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(a.issues.length){n.issues.push({origin:"record",code:"invalid_key",issues:a.issues.map(l=>Nn(l,r,gn())),input:s,path:[s],inst:t}),n.value[a.value]=a.value;continue}let c=e.valueType._zod.run({value:o[s],issues:[]},r);c instanceof Promise?i.push(c.then(l=>{l.issues.length&&n.issues.push(...Jn(s,l.issues)),n.value[a.value]=l.value})):(c.issues.length&&n.issues.push(...Jn(s,c.issues)),n.value[a.value]=c.value)}}return i.length?Promise.all(i).then(()=>n):n}});var wp=I("$ZodEnum",(t,e)=>{Ke.init(t,e);let n=os(e.entries);t._zod.values=new Set(n),t._zod.pattern=new RegExp(`^(${n.filter(r=>Cu.has(typeof r)).map(r=>typeof r=="string"?Er(r):r.toString()).join("|")})$`),t._zod.parse=(r,o)=>{let i=r.value;return t._zod.values.has(i)||r.issues.push({code:"invalid_value",values:n,input:i,inst:t}),r}}),Sp=I("$ZodLiteral",(t,e)=>{Ke.init(t,e),t._zod.values=new Set(e.values),t._zod.pattern=new RegExp(`^(${e.values.map(n=>typeof n=="string"?Er(n):n?n.toString():String(n)).join("|")})$`),t._zod.parse=(n,r)=>{let o=n.value;return t._zod.values.has(o)||n.issues.push({code:"invalid_value",values:e.values,input:o,inst:t}),n}});var kp=I("$ZodTransform",(t,e)=>{Ke.init(t,e),t._zod.parse=(n,r)=>{let o=e.transform(n.value,n);if(r.async)return(o instanceof Promise?o:Promise.resolve(o)).then(s=>(n.value=s,n));if(o instanceof Promise)throw new fr;return n.value=o,n}}),Tp=I("$ZodOptional",(t,e)=>{Ke.init(t,e),t._zod.optin="optional",t._zod.optout="optional",et(t._zod,"values",()=>e.innerType._zod.values?new Set([...e.innerType._zod.values,void 0]):void 0),et(t._zod,"pattern",()=>{let n=e.innerType._zod.pattern;return n?new RegExp(`^(${as(n.source)})?$`):void 0}),t._zod.parse=(n,r)=>e.innerType._zod.optin==="optional"?e.innerType._zod.run(n,r):n.value===void 0?n:e.innerType._zod.run(n,r)}),Ep=I("$ZodNullable",(t,e)=>{Ke.init(t,e),et(t._zod,"optin",()=>e.innerType._zod.optin),et(t._zod,"optout",()=>e.innerType._zod.optout),et(t._zod,"pattern",()=>{let n=e.innerType._zod.pattern;return n?new RegExp(`^(${as(n.source)}|null)$`):void 0}),et(t._zod,"values",()=>e.innerType._zod.values?new Set([...e.innerType._zod.values,null]):void 0),t._zod.parse=(n,r)=>n.value===null?n:e.innerType._zod.run(n,r)}),$p=I("$ZodDefault",(t,e)=>{Ke.init(t,e),t._zod.optin="optional",et(t._zod,"values",()=>e.innerType._zod.values),t._zod.parse=(n,r)=>{if(n.value===void 0)return n.value=e.defaultValue,n;let o=e.innerType._zod.run(n,r);return o instanceof Promise?o.then(i=>Tx(i,e)):Tx(o,e)}});function Tx(t,e){return t.value===void 0&&(t.value=e.defaultValue),t}var Rp=I("$ZodPrefault",(t,e)=>{Ke.init(t,e),t._zod.optin="optional",et(t._zod,"values",()=>e.innerType._zod.values),t._zod.parse=(n,r)=>(n.value===void 0&&(n.value=e.defaultValue),e.innerType._zod.run(n,r))}),Ap=I("$ZodNonOptional",(t,e)=>{Ke.init(t,e),et(t._zod,"values",()=>{let n=e.innerType._zod.values;return n?new Set([...n].filter(r=>r!==void 0)):void 0}),t._zod.parse=(n,r)=>{let o=e.innerType._zod.run(n,r);return o instanceof Promise?o.then(i=>Ex(i,t)):Ex(o,t)}});function Ex(t,e){return!t.issues.length&&t.value===void 0&&t.issues.push({code:"invalid_type",expected:"nonoptional",input:t.value,inst:e}),t}var Ip=I("$ZodCatch",(t,e)=>{Ke.init(t,e),t._zod.optin="optional",et(t._zod,"optout",()=>e.innerType._zod.optout),et(t._zod,"values",()=>e.innerType._zod.values),t._zod.parse=(n,r)=>{let o=e.innerType._zod.run(n,r);return o instanceof Promise?o.then(i=>(n.value=i.value,i.issues.length&&(n.value=e.catchValue({...n,error:{issues:i.issues.map(s=>Nn(s,r,gn()))},input:n.value}),n.issues=[]),n)):(n.value=o.value,o.issues.length&&(n.value=e.catchValue({...n,error:{issues:o.issues.map(i=>Nn(i,r,gn()))},input:n.value}),n.issues=[]),n)}});var Cp=I("$ZodPipe",(t,e)=>{Ke.init(t,e),et(t._zod,"values",()=>e.in._zod.values),et(t._zod,"optin",()=>e.in._zod.optin),et(t._zod,"optout",()=>e.out._zod.optout),t._zod.parse=(n,r)=>{let o=e.in._zod.run(n,r);return o instanceof Promise?o.then(i=>$x(i,e,r)):$x(o,e,r)}});function $x(t,e,n){return yo(t)?t:e.out._zod.run({value:t.value,issues:t.issues},n)}var Pp=I("$ZodReadonly",(t,e)=>{Ke.init(t,e),et(t._zod,"propValues",()=>e.innerType._zod.propValues),et(t._zod,"values",()=>e.innerType._zod.values),et(t._zod,"optin",()=>e.innerType._zod.optin),et(t._zod,"optout",()=>e.innerType._zod.optout),t._zod.parse=(n,r)=>{let o=e.innerType._zod.run(n,r);return o instanceof Promise?o.then(Rx):Rx(o)}});function Rx(t){return t.value=Object.freeze(t.value),t}var Op=I("$ZodCustom",(t,e)=>{jt.init(t,e),Ke.init(t,e),t._zod.parse=(n,r)=>n,t._zod.check=n=>{let r=n.value,o=e.fn(r);if(o instanceof Promise)return o.then(i=>Ax(i,n,r,t));Ax(o,n,r,t)}});function Ax(t,e,n,r){if(!t){let o={code:"custom",input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(o.params=r._zod.def.params),e.issues.push(zu(o))}}var _A=t=>{let e=typeof t;switch(e){case"number":return Number.isNaN(t)?"NaN":"number";case"object":{if(Array.isArray(t))return"array";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return e},wA=()=>{let t={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"}};function e(r){return t[r]??null}let n={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"};return r=>{switch(r.code){case"invalid_type":return`Invalid input: expected ${r.expected}, received ${_A(r.input)}`;case"invalid_value":return r.values.length===1?`Invalid input: expected ${Za(r.values[0])}`:`Invalid option: expected one of ${Ua(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",i=e(r.origin);return i?`Too big: expected ${r.origin??"value"} to have ${o}${r.maximum.toString()} ${i.unit??"elements"}`:`Too big: expected ${r.origin??"value"} to be ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",i=e(r.origin);return i?`Too small: expected ${r.origin} to have ${o}${r.minimum.toString()} ${i.unit}`:`Too small: expected ${r.origin} to be ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Invalid string: must start with "${o.prefix}"`:o.format==="ends_with"?`Invalid string: must end with "${o.suffix}"`:o.format==="includes"?`Invalid string: must include "${o.includes}"`:o.format==="regex"?`Invalid string: must match pattern ${o.pattern}`:`Invalid ${n[o.format]??r.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${r.divisor}`;case"unrecognized_keys":return`Unrecognized key${r.keys.length>1?"s":""}: ${Ua(r.keys,", ")}`;case"invalid_key":return`Invalid key in ${r.origin}`;case"invalid_union":return"Invalid input";case"invalid_element":return`Invalid value in ${r.origin}`;default:return"Invalid input"}}};function Nx(){return{localeError:wA()}}var SA=Symbol("ZodOutput"),kA=Symbol("ZodInput"),ds=class{constructor(){this._map=new Map,this._idmap=new Map}add(e,...n){let r=n[0];if(this._map.set(e,r),r&&typeof r=="object"&&"id"in r){if(this._idmap.has(r.id))throw new Error(`ID ${r.id} already exists in the registry`);this._idmap.set(r.id,e)}return this}clear(){return this._map=new Map,this._idmap=new Map,this}remove(e){let n=this._map.get(e);return n&&typeof n=="object"&&"id"in n&&this._idmap.delete(n.id),this._map.delete(e),this}get(e){let n=e._zod.parent;if(n){let r={...this.get(n)??{}};return delete r.id,{...r,...this._map.get(e)}}return this._map.get(e)}has(e){return this._map.has(e)}};function jx(){return new ds}var $r=jx();function zp(t,e){return new t({type:"string",...ue(e)})}function Np(t,e){return new t({type:"string",format:"email",check:"string_format",abort:!1,...ue(e)})}function Ya(t,e){return new t({type:"string",format:"guid",check:"string_format",abort:!1,...ue(e)})}function jp(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,...ue(e)})}function Lp(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...ue(e)})}function Dp(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...ue(e)})}function Mp(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...ue(e)})}function Fp(t,e){return new t({type:"string",format:"url",check:"string_format",abort:!1,...ue(e)})}function Up(t,e){return new t({type:"string",format:"emoji",check:"string_format",abort:!1,...ue(e)})}function qp(t,e){return new t({type:"string",format:"nanoid",check:"string_format",abort:!1,...ue(e)})}function Zp(t,e){return new t({type:"string",format:"cuid",check:"string_format",abort:!1,...ue(e)})}function Bp(t,e){return new t({type:"string",format:"cuid2",check:"string_format",abort:!1,...ue(e)})}function Hp(t,e){return new t({type:"string",format:"ulid",check:"string_format",abort:!1,...ue(e)})}function Vp(t,e){return new t({type:"string",format:"xid",check:"string_format",abort:!1,...ue(e)})}function Gp(t,e){return new t({type:"string",format:"ksuid",check:"string_format",abort:!1,...ue(e)})}function Wp(t,e){return new t({type:"string",format:"ipv4",check:"string_format",abort:!1,...ue(e)})}function Kp(t,e){return new t({type:"string",format:"ipv6",check:"string_format",abort:!1,...ue(e)})}function Jp(t,e){return new t({type:"string",format:"cidrv4",check:"string_format",abort:!1,...ue(e)})}function Yp(t,e){return new t({type:"string",format:"cidrv6",check:"string_format",abort:!1,...ue(e)})}function Xp(t,e){return new t({type:"string",format:"base64",check:"string_format",abort:!1,...ue(e)})}function Qp(t,e){return new t({type:"string",format:"base64url",check:"string_format",abort:!1,...ue(e)})}function ed(t,e){return new t({type:"string",format:"e164",check:"string_format",abort:!1,...ue(e)})}function td(t,e){return new t({type:"string",format:"jwt",check:"string_format",abort:!1,...ue(e)})}function Lx(t,e){return new t({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...ue(e)})}function Dx(t,e){return new t({type:"string",format:"date",check:"string_format",...ue(e)})}function Mx(t,e){return new t({type:"string",format:"time",check:"string_format",precision:null,...ue(e)})}function Fx(t,e){return new t({type:"string",format:"duration",check:"string_format",...ue(e)})}function nd(t,e){return new t({type:"number",checks:[],...ue(e)})}function rd(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"safeint",...ue(e)})}function od(t,e){return new t({type:"boolean",...ue(e)})}function id(t,e){return new t({type:"null",...ue(e)})}function sd(t){return new t({type:"unknown"})}function ad(t,e){return new t({type:"never",...ue(e)})}function Xa(t,e){return new Hu({check:"less_than",...ue(e),value:t,inclusive:!1})}function fs(t,e){return new Hu({check:"less_than",...ue(e),value:t,inclusive:!0})}function Qa(t,e){return new Vu({check:"greater_than",...ue(e),value:t,inclusive:!1})}function ms(t,e){return new Vu({check:"greater_than",...ue(e),value:t,inclusive:!0})}function ec(t,e){return new ax({check:"multiple_of",...ue(e),value:t})}function tc(t,e){return new lx({check:"max_length",...ue(e),maximum:t})}function oi(t,e){return new ux({check:"min_length",...ue(e),minimum:t})}function nc(t,e){return new px({check:"length_equals",...ue(e),length:t})}function cd(t,e){return new dx({check:"string_format",format:"regex",...ue(e),pattern:t})}function ld(t){return new fx({check:"string_format",format:"lowercase",...ue(t)})}function ud(t){return new mx({check:"string_format",format:"uppercase",...ue(t)})}function pd(t,e){return new hx({check:"string_format",format:"includes",...ue(e),includes:t})}function dd(t,e){return new gx({check:"string_format",format:"starts_with",...ue(e),prefix:t})}function fd(t,e){return new yx({check:"string_format",format:"ends_with",...ue(e),suffix:t})}function bo(t){return new xx({check:"overwrite",tx:t})}function md(t){return bo(e=>e.normalize(t))}function hd(){return bo(t=>t.trim())}function gd(){return bo(t=>t.toLowerCase())}function yd(){return bo(t=>t.toUpperCase())}function Ux(t,e,n){return new t({type:"array",element:e,...ue(n)})}function xd(t,e,n){let r=ue(n);return r.abort??(r.abort=!0),new t({type:"custom",check:"custom",fn:e,...r})}function vd(t,e,n){return new t({type:"custom",check:"custom",fn:e,...ue(n)})}var rc=class{constructor(e){this.counter=0,this.metadataRegistry=(e==null?void 0:e.metadata)??$r,this.target=(e==null?void 0:e.target)??"draft-2020-12",this.unrepresentable=(e==null?void 0:e.unrepresentable)??"throw",this.override=(e==null?void 0:e.override)??(()=>{}),this.io=(e==null?void 0:e.io)??"output",this.seen=new Map}process(e,n={path:[],schemaPath:[]}){var d,f,h;var r;let o=e._zod.def,i={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},s=this.seen.get(e);if(s)return s.count++,n.schemaPath.includes(e)&&(s.cycle=n.path),s.schema;let a={schema:{},count:1,cycle:void 0,path:n.path};this.seen.set(e,a);let c=(f=(d=e._zod).toJSONSchema)==null?void 0:f.call(d);if(c)a.schema=c;else{let y={...n,schemaPath:[...n.schemaPath,e],path:n.path},v=e._zod.parent;if(v)a.ref=v,this.process(v,y),this.seen.get(v).isParent=!0;else{let x=a.schema;switch(o.type){case"string":{let m=x;m.type="string";let{minimum:b,maximum:w,format:k,patterns:E,contentEncoding:F}=e._zod.bag;if(typeof b=="number"&&(m.minLength=b),typeof w=="number"&&(m.maxLength=w),k&&(m.format=i[k]??k,m.format===""&&delete m.format),F&&(m.contentEncoding=F),E&&E.size>0){let j=[...E];j.length===1?m.pattern=j[0].source:j.length>1&&(a.schema.allOf=[...j.map(me=>({...this.target==="draft-7"?{type:"string"}:{},pattern:me.source}))])}break}case"number":{let m=x,{minimum:b,maximum:w,format:k,multipleOf:E,exclusiveMaximum:F,exclusiveMinimum:j}=e._zod.bag;typeof k=="string"&&k.includes("int")?m.type="integer":m.type="number",typeof j=="number"&&(m.exclusiveMinimum=j),typeof b=="number"&&(m.minimum=b,typeof j=="number"&&(j>=b?delete m.minimum:delete m.exclusiveMinimum)),typeof F=="number"&&(m.exclusiveMaximum=F),typeof w=="number"&&(m.maximum=w,typeof F=="number"&&(F<=w?delete m.maximum:delete m.exclusiveMaximum)),typeof E=="number"&&(m.multipleOf=E);break}case"boolean":{let m=x;m.type="boolean";break}case"bigint":{if(this.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema");break}case"symbol":{if(this.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema");break}case"null":{x.type="null";break}case"any":break;case"unknown":break;case"undefined":{if(this.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema");break}case"void":{if(this.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema");break}case"never":{x.not={};break}case"date":{if(this.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema");break}case"array":{let m=x,{minimum:b,maximum:w}=e._zod.bag;typeof b=="number"&&(m.minItems=b),typeof w=="number"&&(m.maxItems=w),m.type="array",m.items=this.process(o.element,{...y,path:[...y.path,"items"]});break}case"object":{let m=x;m.type="object",m.properties={};let b=o.shape;for(let E in b)m.properties[E]=this.process(b[E],{...y,path:[...y.path,"properties",E]});let w=new Set(Object.keys(b)),k=new Set([...w].filter(E=>{let F=o.shape[E]._zod;return this.io==="input"?F.optin===void 0:F.optout===void 0}));k.size>0&&(m.required=Array.from(k)),((h=o.catchall)==null?void 0:h._zod.def.type)==="never"?m.additionalProperties=!1:o.catchall?o.catchall&&(m.additionalProperties=this.process(o.catchall,{...y,path:[...y.path,"additionalProperties"]})):this.io==="output"&&(m.additionalProperties=!1);break}case"union":{let m=x;m.anyOf=o.options.map((b,w)=>this.process(b,{...y,path:[...y.path,"anyOf",w]}));break}case"intersection":{let m=x,b=this.process(o.left,{...y,path:[...y.path,"allOf",0]}),w=this.process(o.right,{...y,path:[...y.path,"allOf",1]}),k=F=>"allOf"in F&&Object.keys(F).length===1,E=[...k(b)?b.allOf:[b],...k(w)?w.allOf:[w]];m.allOf=E;break}case"tuple":{let m=x;m.type="array";let b=o.items.map((E,F)=>this.process(E,{...y,path:[...y.path,"prefixItems",F]}));if(this.target==="draft-2020-12"?m.prefixItems=b:m.items=b,o.rest){let E=this.process(o.rest,{...y,path:[...y.path,"items"]});this.target==="draft-2020-12"?m.items=E:m.additionalItems=E}o.rest&&(m.items=this.process(o.rest,{...y,path:[...y.path,"items"]}));let{minimum:w,maximum:k}=e._zod.bag;typeof w=="number"&&(m.minItems=w),typeof k=="number"&&(m.maxItems=k);break}case"record":{let m=x;m.type="object",m.propertyNames=this.process(o.keyType,{...y,path:[...y.path,"propertyNames"]}),m.additionalProperties=this.process(o.valueType,{...y,path:[...y.path,"additionalProperties"]});break}case"map":{if(this.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema");break}case"set":{if(this.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema");break}case"enum":{let m=x,b=os(o.entries);b.every(w=>typeof w=="number")&&(m.type="number"),b.every(w=>typeof w=="string")&&(m.type="string"),m.enum=b;break}case"literal":{let m=x,b=[];for(let w of o.values)if(w===void 0){if(this.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof w=="bigint"){if(this.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");b.push(Number(w))}else b.push(w);if(b.length!==0)if(b.length===1){let w=b[0];m.type=w===null?"null":typeof w,m.const=w}else b.every(w=>typeof w=="number")&&(m.type="number"),b.every(w=>typeof w=="string")&&(m.type="string"),b.every(w=>typeof w=="boolean")&&(m.type="string"),b.every(w=>w===null)&&(m.type="null"),m.enum=b;break}case"file":{let m=x,b={type:"string",format:"binary",contentEncoding:"binary"},{minimum:w,maximum:k,mime:E}=e._zod.bag;w!==void 0&&(b.minLength=w),k!==void 0&&(b.maxLength=k),E?E.length===1?(b.contentMediaType=E[0],Object.assign(m,b)):m.anyOf=E.map(F=>({...b,contentMediaType:F})):Object.assign(m,b);break}case"transform":{if(this.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema");break}case"nullable":{let m=this.process(o.innerType,y);x.anyOf=[m,{type:"null"}];break}case"nonoptional":{this.process(o.innerType,y),a.ref=o.innerType;break}case"success":{let m=x;m.type="boolean";break}case"default":{this.process(o.innerType,y),a.ref=o.innerType,x.default=JSON.parse(JSON.stringify(o.defaultValue));break}case"prefault":{this.process(o.innerType,y),a.ref=o.innerType,this.io==="input"&&(x._prefault=JSON.parse(JSON.stringify(o.defaultValue)));break}case"catch":{this.process(o.innerType,y),a.ref=o.innerType;let m;try{m=o.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}x.default=m;break}case"nan":{if(this.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema");break}case"template_literal":{let m=x,b=e._zod.pattern;if(!b)throw new Error("Pattern not found in template literal");m.type="string",m.pattern=b.source;break}case"pipe":{let m=this.io==="input"?o.in._zod.def.type==="transform"?o.out:o.in:o.out;this.process(m,y),a.ref=m;break}case"readonly":{this.process(o.innerType,y),a.ref=o.innerType,x.readOnly=!0;break}case"promise":{this.process(o.innerType,y),a.ref=o.innerType;break}case"optional":{this.process(o.innerType,y),a.ref=o.innerType;break}case"lazy":{let m=e._zod.innerType;this.process(m,y),a.ref=m;break}case"custom":{if(this.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema");break}default:}}}let l=this.metadataRegistry.get(e);return l&&Object.assign(a.schema,l),this.io==="input"&&$t(e)&&(delete a.schema.examples,delete a.schema.default),this.io==="input"&&a.schema._prefault&&((r=a.schema).default??(r.default=a.schema._prefault)),delete a.schema._prefault,this.seen.get(e).schema}emit(e,n){var p,d,f,h,y,v;let r={cycles:(n==null?void 0:n.cycles)??"ref",reused:(n==null?void 0:n.reused)??"inline",external:(n==null?void 0:n.external)??void 0},o=this.seen.get(e);if(!o)throw new Error("Unprocessed schema. This is a bug in Zod.");let i=x=>{var E;let m=this.target==="draft-2020-12"?"$defs":"definitions";if(r.external){let F=(E=r.external.registry.get(x[0]))==null?void 0:E.id,j=r.external.uri??(de=>de);if(F)return{ref:j(F)};let me=x[1].defId??x[1].schema.id??`schema${this.counter++}`;return x[1].defId=me,{defId:me,ref:`${j("__shared")}#/${m}/${me}`}}if(x[1]===o)return{ref:"#"};let w=`#/${m}/`,k=x[1].schema.id??`__schema${this.counter++}`;return{defId:k,ref:w+k}},s=x=>{if(x[1].schema.$ref)return;let m=x[1],{ref:b,defId:w}=i(x);m.def={...m.schema},w&&(m.defId=w);let k=m.schema;for(let E in k)delete k[E];k.$ref=b};if(r.cycles==="throw")for(let x of this.seen.entries()){let m=x[1];if(m.cycle)throw new Error(`Cycle detected: #/${(p=m.cycle)==null?void 0:p.join("/")}/<root>
|
|
47
|
+
|
|
48
|
+
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let x of this.seen.entries()){let m=x[1];if(e===x[0]){s(x);continue}if(r.external){let w=(d=r.external.registry.get(x[0]))==null?void 0:d.id;if(e!==x[0]&&w){s(x);continue}}if((f=this.metadataRegistry.get(x[0]))==null?void 0:f.id){s(x);continue}if(m.cycle){s(x);continue}if(m.count>1&&r.reused==="ref"){s(x);continue}}let a=(x,m)=>{let b=this.seen.get(x),w=b.def??b.schema,k={...w};if(b.ref===null)return;let E=b.ref;if(b.ref=null,E){a(E,m);let F=this.seen.get(E).schema;F.$ref&&m.target==="draft-7"?(w.allOf=w.allOf??[],w.allOf.push(F)):(Object.assign(w,F),Object.assign(w,k))}b.isParent||this.override({zodSchema:x,jsonSchema:w,path:b.path??[]})};for(let x of[...this.seen.entries()].reverse())a(x[0],{target:this.target});let c={};if(this.target==="draft-2020-12"?c.$schema="https://json-schema.org/draft/2020-12/schema":this.target==="draft-7"?c.$schema="http://json-schema.org/draft-07/schema#":console.warn(`Invalid target: ${this.target}`),(h=r.external)!=null&&h.uri){let x=(y=r.external.registry.get(e))==null?void 0:y.id;if(!x)throw new Error("Schema is missing an `id` property");c.$id=r.external.uri(x)}Object.assign(c,o.def);let l=((v=r.external)==null?void 0:v.defs)??{};for(let x of this.seen.entries()){let m=x[1];m.def&&m.defId&&(l[m.defId]=m.def)}r.external||Object.keys(l).length>0&&(this.target==="draft-2020-12"?c.$defs=l:c.definitions=l);try{return JSON.parse(JSON.stringify(c))}catch{throw new Error("Error converting schema to JSON.")}}};function bd(t,e){if(t instanceof ds){let r=new rc(e),o={};for(let a of t._idmap.entries()){let[c,l]=a;r.process(l)}let i={},s={registry:t,uri:e==null?void 0:e.uri,defs:o};for(let a of t._idmap.entries()){let[c,l]=a;i[c]=r.emit(l,{...e,external:s})}if(Object.keys(o).length>0){let a=r.target==="draft-2020-12"?"$defs":"definitions";i.__shared={[a]:o}}return{schemas:i}}let n=new rc(e);return n.process(t),n.emit(t,e)}function $t(t,e){let n=e??{seen:new Set};if(n.seen.has(t))return!1;n.seen.add(t);let o=t._zod.def;switch(o.type){case"string":case"number":case"bigint":case"boolean":case"date":case"symbol":case"undefined":case"null":case"any":case"unknown":case"never":case"void":case"literal":case"enum":case"nan":case"file":case"template_literal":return!1;case"array":return $t(o.element,n);case"object":{for(let i in o.shape)if($t(o.shape[i],n))return!0;return!1}case"union":{for(let i of o.options)if($t(i,n))return!0;return!1}case"intersection":return $t(o.left,n)||$t(o.right,n);case"tuple":{for(let i of o.items)if($t(i,n))return!0;return!!(o.rest&&$t(o.rest,n))}case"record":return $t(o.keyType,n)||$t(o.valueType,n);case"map":return $t(o.keyType,n)||$t(o.valueType,n);case"set":return $t(o.valueType,n);case"promise":case"optional":case"nonoptional":case"nullable":case"readonly":return $t(o.innerType,n);case"lazy":return $t(o.getter(),n);case"default":return $t(o.innerType,n);case"prefault":return $t(o.innerType,n);case"custom":return!1;case"transform":return!0;case"pipe":return $t(o.in,n)||$t(o.out,n);case"success":return!1;case"catch":return!1;default:}throw new Error(`Unknown schema type: ${o.type}`)}var iI=I("ZodMiniType",(t,e)=>{if(!t._zod)throw new Error("Uninitialized schema in ZodMiniType.");Ke.init(t,e),t.def=e,t.parse=(n,r)=>Du(t,n,r,{callee:t.parse}),t.safeParse=(n,r)=>xo(t,n,r),t.parseAsync=async(n,r)=>Fu(t,n,r,{callee:t.parseAsync}),t.safeParseAsync=async(n,r)=>vo(t,n,r),t.check=(...n)=>t.clone({...e,checks:[...e.checks??[],...n.map(r=>typeof r=="function"?{_zod:{check:r,def:{check:"custom"},onattach:[]}}:r)]}),t.clone=(n,r)=>yn(t,n,r),t.brand=()=>t,t.register=((n,r)=>(n.add(t,r),t))});var sI=I("ZodMiniObject",(t,e)=>{Ka.init(t,e),iI.init(t,e),Ce.defineLazy(t,"shape",()=>e.shape)});function _d(t,e){let n={type:"object",get shape(){return Ce.assignProp(this,"shape",{...t}),this.shape},...Ce.normalizeParams(e)};return new sI(n)}function kn(t){return!!t._zod}function wo(t){let e=Object.values(t);if(e.length===0)return _d({});let n=e.every(kn),r=e.every(o=>!kn(o));if(n)return _d(t);if(r)return ku(t);throw new Error("Mixed Zod versions detected in object shape.")}function Rr(t,e){return kn(t)?xo(t,e):t.safeParse(e)}async function oc(t,e){return kn(t)?await vo(t,e):await t.safeParseAsync(e)}function Ar(t){var n,r;if(!t)return;let e;if(kn(t)?e=(r=(n=t._zod)==null?void 0:n.def)==null?void 0:r.shape:e=t.shape,!!e){if(typeof e=="function")try{return e()}catch{return}return e}}function ii(t){var e;if(t){if(typeof t=="object"){let n=t,r=t;if(!n._def&&!r._zod){let o=Object.values(t);if(o.length>0&&o.every(i=>typeof i=="object"&&i!==null&&(i._def!==void 0||i._zod!==void 0||typeof i.parse=="function")))return wo(t)}}if(kn(t)){let r=(e=t._zod)==null?void 0:e.def;if(r&&(r.type==="object"||r.shape!==void 0))return t}else if(t.shape!==void 0)return t}}function ic(t){if(t&&typeof t=="object"){if("message"in t&&typeof t.message=="string")return t.message;if("issues"in t&&Array.isArray(t.issues)&&t.issues.length>0){let e=t.issues[0];if(e&&typeof e=="object"&&"message"in e)return String(e.message)}try{return JSON.stringify(t)}catch{return String(t)}}return String(t)}function Zx(t){return t.description}function Bx(t){var n,r,o;if(kn(t))return((r=(n=t._zod)==null?void 0:n.def)==null?void 0:r.type)==="optional";let e=t;return typeof t.isOptional=="function"?t.isOptional():((o=e._def)==null?void 0:o.typeName)==="ZodOptional"}function sc(t){var o;if(kn(t)){let s=(o=t._zod)==null?void 0:o.def;if(s){if(s.value!==void 0)return s.value;if(Array.isArray(s.values)&&s.values.length>0)return s.values[0]}}let n=t._def;if(n){if(n.value!==void 0)return n.value;if(Array.isArray(n.values)&&n.values.length>0)return n.values[0]}let r=t.value;if(r!==void 0)return r}var hs={};za(hs,{ZodISODate:()=>Vx,ZodISODateTime:()=>Hx,ZodISODuration:()=>Wx,ZodISOTime:()=>Gx,date:()=>Sd,datetime:()=>wd,duration:()=>Td,time:()=>kd});var Hx=I("ZodISODateTime",(t,e)=>{Ix.init(t,e),pt.init(t,e)});function wd(t){return Lx(Hx,t)}var Vx=I("ZodISODate",(t,e)=>{Cx.init(t,e),pt.init(t,e)});function Sd(t){return Dx(Vx,t)}var Gx=I("ZodISOTime",(t,e)=>{Px.init(t,e),pt.init(t,e)});function kd(t){return Mx(Gx,t)}var Wx=I("ZodISODuration",(t,e)=>{Ox.init(t,e),pt.init(t,e)});function Td(t){return Fx(Wx,t)}var Kx=(t,e)=>{Ba.init(t,e),t.name="ZodError",Object.defineProperties(t,{format:{value:n=>ju(t,n)},flatten:{value:n=>Nu(t,n)},addIssue:{value:n=>t.issues.push(n)},addIssues:{value:n=>t.issues.push(...n)},isEmpty:{get(){return t.issues.length===0}}})},t3=I("ZodError",Kx),gs=I("ZodError",Kx,{Parent:Error});var Jx=Lu(gs),Yx=Mu(gs),Xx=Uu(gs),Qx=qu(gs);var xt=I("ZodType",(t,e)=>(Ke.init(t,e),t.def=e,Object.defineProperty(t,"_def",{value:e}),t.check=(...n)=>t.clone({...e,checks:[...e.checks??[],...n.map(r=>typeof r=="function"?{_zod:{check:r,def:{check:"custom"},onattach:[]}}:r)]}),t.clone=(n,r)=>yn(t,n,r),t.brand=()=>t,t.register=((n,r)=>(n.add(t,r),t)),t.parse=(n,r)=>Jx(t,n,r,{callee:t.parse}),t.safeParse=(n,r)=>Xx(t,n,r),t.parseAsync=async(n,r)=>Yx(t,n,r,{callee:t.parseAsync}),t.safeParseAsync=async(n,r)=>Qx(t,n,r),t.spa=t.safeParseAsync,t.refine=(n,r)=>t.check(rC(n,r)),t.superRefine=n=>t.check(oC(n)),t.overwrite=n=>t.check(bo(n)),t.optional=()=>ft(t),t.nullable=()=>nv(t),t.nullish=()=>ft(nv(t)),t.nonoptional=n=>JI(t,n),t.array=()=>Ne(t),t.or=n=>at([t,n]),t.and=n=>cc(t,n),t.transform=n=>$d(t,cv(n)),t.default=n=>GI(t,n),t.prefault=n=>KI(t,n),t.catch=n=>XI(t,n),t.pipe=n=>$d(t,n),t.readonly=()=>tC(t),t.describe=n=>{let r=t.clone();return $r.add(r,{description:n}),r},Object.defineProperty(t,"description",{get(){var n;return(n=$r.get(t))==null?void 0:n.description},configurable:!0}),t.meta=(...n)=>{if(n.length===0)return $r.get(t);let r=t.clone();return $r.add(r,n[0]),r},t.isOptional=()=>t.safeParse(void 0).success,t.isNullable=()=>t.safeParse(null).success,t)),rv=I("_ZodString",(t,e)=>{ps.init(t,e),xt.init(t,e);let n=t._zod.bag;t.format=n.format??null,t.minLength=n.minimum??null,t.maxLength=n.maximum??null,t.regex=(...r)=>t.check(cd(...r)),t.includes=(...r)=>t.check(pd(...r)),t.startsWith=(...r)=>t.check(dd(...r)),t.endsWith=(...r)=>t.check(fd(...r)),t.min=(...r)=>t.check(oi(...r)),t.max=(...r)=>t.check(tc(...r)),t.length=(...r)=>t.check(nc(...r)),t.nonempty=(...r)=>t.check(oi(1,...r)),t.lowercase=r=>t.check(ld(r)),t.uppercase=r=>t.check(ud(r)),t.trim=()=>t.check(hd()),t.normalize=(...r)=>t.check(md(...r)),t.toLowerCase=()=>t.check(gd()),t.toUpperCase=()=>t.check(yd())}),hI=I("ZodString",(t,e)=>{ps.init(t,e),rv.init(t,e),t.email=n=>t.check(Np(gI,n)),t.url=n=>t.check(Fp(yI,n)),t.jwt=n=>t.check(td(PI,n)),t.emoji=n=>t.check(Up(xI,n)),t.guid=n=>t.check(Ya(ev,n)),t.uuid=n=>t.check(jp(ac,n)),t.uuidv4=n=>t.check(Lp(ac,n)),t.uuidv6=n=>t.check(Dp(ac,n)),t.uuidv7=n=>t.check(Mp(ac,n)),t.nanoid=n=>t.check(qp(vI,n)),t.guid=n=>t.check(Ya(ev,n)),t.cuid=n=>t.check(Zp(bI,n)),t.cuid2=n=>t.check(Bp(_I,n)),t.ulid=n=>t.check(Hp(wI,n)),t.base64=n=>t.check(Xp(AI,n)),t.base64url=n=>t.check(Qp(II,n)),t.xid=n=>t.check(Vp(SI,n)),t.ksuid=n=>t.check(Gp(kI,n)),t.ipv4=n=>t.check(Wp(TI,n)),t.ipv6=n=>t.check(Kp(EI,n)),t.cidrv4=n=>t.check(Jp($I,n)),t.cidrv6=n=>t.check(Yp(RI,n)),t.e164=n=>t.check(ed(CI,n)),t.datetime=n=>t.check(wd(n)),t.date=n=>t.check(Sd(n)),t.time=n=>t.check(kd(n)),t.duration=n=>t.check(Td(n))});function R(t){return zp(hI,t)}var pt=I("ZodStringFormat",(t,e)=>{tt.init(t,e),rv.init(t,e)}),gI=I("ZodEmail",(t,e)=>{Ju.init(t,e),pt.init(t,e)});var ev=I("ZodGUID",(t,e)=>{Wu.init(t,e),pt.init(t,e)});var ac=I("ZodUUID",(t,e)=>{Ku.init(t,e),pt.init(t,e)});var yI=I("ZodURL",(t,e)=>{Yu.init(t,e),pt.init(t,e)});var xI=I("ZodEmoji",(t,e)=>{Xu.init(t,e),pt.init(t,e)});var vI=I("ZodNanoID",(t,e)=>{Qu.init(t,e),pt.init(t,e)});var bI=I("ZodCUID",(t,e)=>{ep.init(t,e),pt.init(t,e)});var _I=I("ZodCUID2",(t,e)=>{tp.init(t,e),pt.init(t,e)});var wI=I("ZodULID",(t,e)=>{np.init(t,e),pt.init(t,e)});var SI=I("ZodXID",(t,e)=>{rp.init(t,e),pt.init(t,e)});var kI=I("ZodKSUID",(t,e)=>{op.init(t,e),pt.init(t,e)});var TI=I("ZodIPv4",(t,e)=>{ip.init(t,e),pt.init(t,e)});var EI=I("ZodIPv6",(t,e)=>{sp.init(t,e),pt.init(t,e)});var $I=I("ZodCIDRv4",(t,e)=>{ap.init(t,e),pt.init(t,e)});var RI=I("ZodCIDRv6",(t,e)=>{cp.init(t,e),pt.init(t,e)});var AI=I("ZodBase64",(t,e)=>{lp.init(t,e),pt.init(t,e)});var II=I("ZodBase64URL",(t,e)=>{up.init(t,e),pt.init(t,e)});var CI=I("ZodE164",(t,e)=>{pp.init(t,e),pt.init(t,e)});var PI=I("ZodJWT",(t,e)=>{dp.init(t,e),pt.init(t,e)});var ov=I("ZodNumber",(t,e)=>{Wa.init(t,e),xt.init(t,e),t.gt=(r,o)=>t.check(Qa(r,o)),t.gte=(r,o)=>t.check(ms(r,o)),t.min=(r,o)=>t.check(ms(r,o)),t.lt=(r,o)=>t.check(Xa(r,o)),t.lte=(r,o)=>t.check(fs(r,o)),t.max=(r,o)=>t.check(fs(r,o)),t.int=r=>t.check(tv(r)),t.safe=r=>t.check(tv(r)),t.positive=r=>t.check(Qa(0,r)),t.nonnegative=r=>t.check(ms(0,r)),t.negative=r=>t.check(Xa(0,r)),t.nonpositive=r=>t.check(fs(0,r)),t.multipleOf=(r,o)=>t.check(ec(r,o)),t.step=(r,o)=>t.check(ec(r,o)),t.finite=()=>t;let n=t._zod.bag;t.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,t.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,t.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),t.isFinite=!0,t.format=n.format??null});function He(t){return nd(ov,t)}var OI=I("ZodNumberFormat",(t,e)=>{fp.init(t,e),ov.init(t,e)});function tv(t){return rd(OI,t)}var zI=I("ZodBoolean",(t,e)=>{mp.init(t,e),xt.init(t,e)});function It(t){return od(zI,t)}var NI=I("ZodNull",(t,e)=>{hp.init(t,e),xt.init(t,e)});function iv(t){return id(NI,t)}var jI=I("ZodUnknown",(t,e)=>{gp.init(t,e),xt.init(t,e)});function dt(){return sd(jI)}var LI=I("ZodNever",(t,e)=>{yp.init(t,e),xt.init(t,e)});function DI(t){return ad(LI,t)}var MI=I("ZodArray",(t,e)=>{xp.init(t,e),xt.init(t,e),t.element=e.element,t.min=(n,r)=>t.check(oi(n,r)),t.nonempty=n=>t.check(oi(1,n)),t.max=(n,r)=>t.check(tc(n,r)),t.length=(n,r)=>t.check(nc(n,r)),t.unwrap=()=>t.element});function Ne(t,e){return Ux(MI,t,e)}var sv=I("ZodObject",(t,e)=>{Ka.init(t,e),xt.init(t,e),Ce.defineLazy(t,"shape",()=>e.shape),t.keyof=()=>an(Object.keys(t._zod.def.shape)),t.catchall=n=>t.clone({...t._zod.def,catchall:n}),t.passthrough=()=>t.clone({...t._zod.def,catchall:dt()}),t.loose=()=>t.clone({...t._zod.def,catchall:dt()}),t.strict=()=>t.clone({...t._zod.def,catchall:DI()}),t.strip=()=>t.clone({...t._zod.def,catchall:void 0}),t.extend=n=>Ce.extend(t,n),t.merge=n=>Ce.merge(t,n),t.pick=n=>Ce.pick(t,n),t.omit=n=>Ce.omit(t,n),t.partial=(...n)=>Ce.partial(lv,t,n[0]),t.required=(...n)=>Ce.required(uv,t,n[0])});function X(t,e){let n={type:"object",get shape(){return Ce.assignProp(this,"shape",{...t}),this.shape},...Ce.normalizeParams(e)};return new sv(n)}function Xt(t,e){return new sv({type:"object",get shape(){return Ce.assignProp(this,"shape",{...t}),this.shape},catchall:dt(),...Ce.normalizeParams(e)})}var av=I("ZodUnion",(t,e)=>{Ja.init(t,e),xt.init(t,e),t.options=e.options});function at(t,e){return new av({type:"union",options:t,...Ce.normalizeParams(e)})}var FI=I("ZodDiscriminatedUnion",(t,e)=>{av.init(t,e),vp.init(t,e)});function Rd(t,e,n){return new FI({type:"union",options:e,discriminator:t,...Ce.normalizeParams(n)})}var UI=I("ZodIntersection",(t,e)=>{bp.init(t,e),xt.init(t,e)});function cc(t,e){return new UI({type:"intersection",left:t,right:e})}var qI=I("ZodRecord",(t,e)=>{_p.init(t,e),xt.init(t,e),t.keyType=e.keyType,t.valueType=e.valueType});function nt(t,e,n){return new qI({type:"record",keyType:t,valueType:e,...Ce.normalizeParams(n)})}var Ed=I("ZodEnum",(t,e)=>{wp.init(t,e),xt.init(t,e),t.enum=e.entries,t.options=Object.values(e.entries);let n=new Set(Object.keys(e.entries));t.extract=(r,o)=>{let i={};for(let s of r)if(n.has(s))i[s]=e.entries[s];else throw new Error(`Key ${s} not found in enum`);return new Ed({...e,checks:[],...Ce.normalizeParams(o),entries:i})},t.exclude=(r,o)=>{let i={...e.entries};for(let s of r)if(n.has(s))delete i[s];else throw new Error(`Key ${s} not found in enum`);return new Ed({...e,checks:[],...Ce.normalizeParams(o),entries:i})}});function an(t,e){let n=Array.isArray(t)?Object.fromEntries(t.map(r=>[r,r])):t;return new Ed({type:"enum",entries:n,...Ce.normalizeParams(e)})}var ZI=I("ZodLiteral",(t,e)=>{Sp.init(t,e),xt.init(t,e),t.values=new Set(e.values),Object.defineProperty(t,"value",{get(){if(e.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return e.values[0]}})});function ne(t,e){return new ZI({type:"literal",values:Array.isArray(t)?t:[t],...Ce.normalizeParams(e)})}var BI=I("ZodTransform",(t,e)=>{kp.init(t,e),xt.init(t,e),t._zod.parse=(n,r)=>{n.addIssue=i=>{if(typeof i=="string")n.issues.push(Ce.issue(i,n.value,e));else{let s=i;s.fatal&&(s.continue=!1),s.code??(s.code="custom"),s.input??(s.input=n.value),s.inst??(s.inst=t),s.continue??(s.continue=!0),n.issues.push(Ce.issue(s))}};let o=e.transform(n.value,n);return o instanceof Promise?o.then(i=>(n.value=i,n)):(n.value=o,n)}});function cv(t){return new BI({type:"transform",transform:t})}var lv=I("ZodOptional",(t,e)=>{Tp.init(t,e),xt.init(t,e),t.unwrap=()=>t._zod.def.innerType});function ft(t){return new lv({type:"optional",innerType:t})}var HI=I("ZodNullable",(t,e)=>{Ep.init(t,e),xt.init(t,e),t.unwrap=()=>t._zod.def.innerType});function nv(t){return new HI({type:"nullable",innerType:t})}var VI=I("ZodDefault",(t,e)=>{$p.init(t,e),xt.init(t,e),t.unwrap=()=>t._zod.def.innerType,t.removeDefault=t.unwrap});function GI(t,e){return new VI({type:"default",innerType:t,get defaultValue(){return typeof e=="function"?e():e}})}var WI=I("ZodPrefault",(t,e)=>{Rp.init(t,e),xt.init(t,e),t.unwrap=()=>t._zod.def.innerType});function KI(t,e){return new WI({type:"prefault",innerType:t,get defaultValue(){return typeof e=="function"?e():e}})}var uv=I("ZodNonOptional",(t,e)=>{Ap.init(t,e),xt.init(t,e),t.unwrap=()=>t._zod.def.innerType});function JI(t,e){return new uv({type:"nonoptional",innerType:t,...Ce.normalizeParams(e)})}var YI=I("ZodCatch",(t,e)=>{Ip.init(t,e),xt.init(t,e),t.unwrap=()=>t._zod.def.innerType,t.removeCatch=t.unwrap});function XI(t,e){return new YI({type:"catch",innerType:t,catchValue:typeof e=="function"?e:()=>e})}var QI=I("ZodPipe",(t,e)=>{Cp.init(t,e),xt.init(t,e),t.in=e.in,t.out=e.out});function $d(t,e){return new QI({type:"pipe",in:t,out:e})}var eC=I("ZodReadonly",(t,e)=>{Pp.init(t,e),xt.init(t,e)});function tC(t){return new eC({type:"readonly",innerType:t})}var pv=I("ZodCustom",(t,e)=>{Op.init(t,e),xt.init(t,e)});function nC(t){let e=new jt({check:"custom"});return e._zod.check=t,e}function dv(t,e){return xd(pv,t??(()=>!0),e)}function rC(t,e={}){return vd(pv,t,e)}function oC(t){let e=nC(n=>(n.addIssue=r=>{if(typeof r=="string")n.issues.push(Ce.issue(r,n.value,e._zod.def));else{let o=r;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=n.value),o.inst??(o.inst=e),o.continue??(o.continue=!e._zod.def.abort),n.issues.push(Ce.issue(o))}},t(n.value,n)));return e}function Ad(t,e){return $d(cv(t),e)}gn(Nx());var Cd="2025-11-25";var fv=[Cd,"2025-06-18","2025-03-26","2024-11-05","2024-10-07"],Ir="io.modelcontextprotocol/related-task",uc="2.0",Rt=dv(t=>t!==null&&(typeof t=="object"||typeof t=="function")),mv=at([R(),He().int()]),hv=R(),h3=Xt({ttl:He().optional(),pollInterval:He().optional()}),iC=X({ttl:He().optional()}),sC=X({taskId:R()}),Pd=Xt({progressToken:mv.optional(),[Ir]:sC.optional()}),xn=X({_meta:Pd.optional()}),ys=xn.extend({task:iC.optional()}),gv=t=>ys.safeParse(t).success,Lt=X({method:R(),params:xn.loose().optional()}),Tn=X({_meta:Pd.optional()}),En=X({method:R(),params:Tn.loose().optional()}),Dt=Xt({_meta:Pd.optional()}),pc=at([R(),He().int()]),yv=X({jsonrpc:ne(uc),id:pc,...Lt.shape}).strict(),Od=t=>yv.safeParse(t).success,xv=X({jsonrpc:ne(uc),...En.shape}).strict(),vv=t=>xv.safeParse(t).success,zd=X({jsonrpc:ne(uc),id:pc,result:Dt}).strict(),xs=t=>zd.safeParse(t).success;var se;(function(t){t[t.ConnectionClosed=-32e3]="ConnectionClosed",t[t.RequestTimeout=-32001]="RequestTimeout",t[t.ParseError=-32700]="ParseError",t[t.InvalidRequest=-32600]="InvalidRequest",t[t.MethodNotFound=-32601]="MethodNotFound",t[t.InvalidParams=-32602]="InvalidParams",t[t.InternalError=-32603]="InternalError",t[t.UrlElicitationRequired=-32042]="UrlElicitationRequired"})(se||(se={}));var Nd=X({jsonrpc:ne(uc),id:pc.optional(),error:X({code:He().int(),message:R(),data:dt().optional()})}).strict();var bv=t=>Nd.safeParse(t).success;var _v=at([yv,xv,zd,Nd]),g3=at([zd,Nd]),dc=Dt.strict(),aC=Tn.extend({requestId:pc.optional(),reason:R().optional()}),fc=En.extend({method:ne("notifications/cancelled"),params:aC}),cC=X({src:R(),mimeType:R().optional(),sizes:Ne(R()).optional(),theme:an(["light","dark"]).optional()}),vs=X({icons:Ne(cC).optional()}),si=X({name:R(),title:R().optional()}),wv=si.extend({...si.shape,...vs.shape,version:R(),websiteUrl:R().optional(),description:R().optional()}),lC=cc(X({applyDefaults:It().optional()}),nt(R(),dt())),uC=Ad(t=>t&&typeof t=="object"&&!Array.isArray(t)&&Object.keys(t).length===0?{form:{}}:t,cc(X({form:lC.optional(),url:Rt.optional()}),nt(R(),dt()).optional())),pC=Xt({list:Rt.optional(),cancel:Rt.optional(),requests:Xt({sampling:Xt({createMessage:Rt.optional()}).optional(),elicitation:Xt({create:Rt.optional()}).optional()}).optional()}),dC=Xt({list:Rt.optional(),cancel:Rt.optional(),requests:Xt({tools:Xt({call:Rt.optional()}).optional()}).optional()}),fC=X({experimental:nt(R(),Rt).optional(),sampling:X({context:Rt.optional(),tools:Rt.optional()}).optional(),elicitation:uC.optional(),roots:X({listChanged:It().optional()}).optional(),tasks:pC.optional(),extensions:nt(R(),Rt).optional()}),mC=xn.extend({protocolVersion:R(),capabilities:fC,clientInfo:wv}),jd=Lt.extend({method:ne("initialize"),params:mC});var hC=X({experimental:nt(R(),Rt).optional(),logging:Rt.optional(),completions:Rt.optional(),prompts:X({listChanged:It().optional()}).optional(),resources:X({subscribe:It().optional(),listChanged:It().optional()}).optional(),tools:X({listChanged:It().optional()}).optional(),tasks:dC.optional(),extensions:nt(R(),Rt).optional()}),gC=Dt.extend({protocolVersion:R(),capabilities:hC,serverInfo:wv,instructions:R().optional()}),Ld=En.extend({method:ne("notifications/initialized"),params:Tn.optional()});var mc=Lt.extend({method:ne("ping"),params:xn.optional()}),yC=X({progress:He(),total:ft(He()),message:ft(R())}),xC=X({...Tn.shape,...yC.shape,progressToken:mv}),hc=En.extend({method:ne("notifications/progress"),params:xC}),vC=xn.extend({cursor:hv.optional()}),bs=Lt.extend({params:vC.optional()}),_s=Dt.extend({nextCursor:hv.optional()}),bC=an(["working","input_required","completed","failed","cancelled"]),ws=X({taskId:R(),status:bC,ttl:at([He(),iv()]),createdAt:R(),lastUpdatedAt:R(),pollInterval:ft(He()),statusMessage:ft(R())}),ai=Dt.extend({task:ws}),_C=Tn.merge(ws),Ss=En.extend({method:ne("notifications/tasks/status"),params:_C}),gc=Lt.extend({method:ne("tasks/get"),params:xn.extend({taskId:R()})}),yc=Dt.merge(ws),xc=Lt.extend({method:ne("tasks/result"),params:xn.extend({taskId:R()})}),y3=Dt.loose(),vc=bs.extend({method:ne("tasks/list")}),bc=_s.extend({tasks:Ne(ws)}),_c=Lt.extend({method:ne("tasks/cancel"),params:xn.extend({taskId:R()})}),Sv=Dt.merge(ws),kv=X({uri:R(),mimeType:ft(R()),_meta:nt(R(),dt()).optional()}),Tv=kv.extend({text:R()}),Dd=R().refine(t=>{try{return atob(t),!0}catch{return!1}},{message:"Invalid Base64 string"}),Ev=kv.extend({blob:Dd}),ks=an(["user","assistant"]),ci=X({audience:Ne(ks).optional(),priority:He().min(0).max(1).optional(),lastModified:hs.datetime({offset:!0}).optional()}),$v=X({...si.shape,...vs.shape,uri:R(),description:ft(R()),mimeType:ft(R()),size:ft(He()),annotations:ci.optional(),_meta:ft(Xt({}))}),wC=X({...si.shape,...vs.shape,uriTemplate:R(),description:ft(R()),mimeType:ft(R()),annotations:ci.optional(),_meta:ft(Xt({}))}),wc=bs.extend({method:ne("resources/list")}),SC=_s.extend({resources:Ne($v)}),Sc=bs.extend({method:ne("resources/templates/list")}),kC=_s.extend({resourceTemplates:Ne(wC)}),Md=xn.extend({uri:R()}),TC=Md,kc=Lt.extend({method:ne("resources/read"),params:TC}),EC=Dt.extend({contents:Ne(at([Tv,Ev]))}),$C=En.extend({method:ne("notifications/resources/list_changed"),params:Tn.optional()}),RC=Md,AC=Lt.extend({method:ne("resources/subscribe"),params:RC}),IC=Md,CC=Lt.extend({method:ne("resources/unsubscribe"),params:IC}),PC=Tn.extend({uri:R()}),OC=En.extend({method:ne("notifications/resources/updated"),params:PC}),zC=X({name:R(),description:ft(R()),required:ft(It())}),NC=X({...si.shape,...vs.shape,description:ft(R()),arguments:ft(Ne(zC)),_meta:ft(Xt({}))}),Tc=bs.extend({method:ne("prompts/list")}),jC=_s.extend({prompts:Ne(NC)}),LC=xn.extend({name:R(),arguments:nt(R(),R()).optional()}),Ec=Lt.extend({method:ne("prompts/get"),params:LC}),Fd=X({type:ne("text"),text:R(),annotations:ci.optional(),_meta:nt(R(),dt()).optional()}),Ud=X({type:ne("image"),data:Dd,mimeType:R(),annotations:ci.optional(),_meta:nt(R(),dt()).optional()}),qd=X({type:ne("audio"),data:Dd,mimeType:R(),annotations:ci.optional(),_meta:nt(R(),dt()).optional()}),DC=X({type:ne("tool_use"),name:R(),id:R(),input:nt(R(),dt()),_meta:nt(R(),dt()).optional()}),MC=X({type:ne("resource"),resource:at([Tv,Ev]),annotations:ci.optional(),_meta:nt(R(),dt()).optional()}),FC=$v.extend({type:ne("resource_link")}),Zd=at([Fd,Ud,qd,FC,MC]),UC=X({role:ks,content:Zd}),qC=Dt.extend({description:R().optional(),messages:Ne(UC)}),ZC=En.extend({method:ne("notifications/prompts/list_changed"),params:Tn.optional()}),BC=X({title:R().optional(),readOnlyHint:It().optional(),destructiveHint:It().optional(),idempotentHint:It().optional(),openWorldHint:It().optional()}),HC=X({taskSupport:an(["required","optional","forbidden"]).optional()}),Rv=X({...si.shape,...vs.shape,description:R().optional(),inputSchema:X({type:ne("object"),properties:nt(R(),Rt).optional(),required:Ne(R()).optional()}).catchall(dt()),outputSchema:X({type:ne("object"),properties:nt(R(),Rt).optional(),required:Ne(R()).optional()}).catchall(dt()).optional(),annotations:BC.optional(),execution:HC.optional(),_meta:nt(R(),dt()).optional()}),$c=bs.extend({method:ne("tools/list")}),VC=_s.extend({tools:Ne(Rv)}),Rc=Dt.extend({content:Ne(Zd).default([]),structuredContent:nt(R(),dt()).optional(),isError:It().optional()}),x3=Rc.or(Dt.extend({toolResult:dt()})),GC=ys.extend({name:R(),arguments:nt(R(),dt()).optional()}),li=Lt.extend({method:ne("tools/call"),params:GC}),WC=En.extend({method:ne("notifications/tools/list_changed"),params:Tn.optional()}),v3=X({autoRefresh:It().default(!0),debounceMs:He().int().nonnegative().default(300)}),Ts=an(["debug","info","notice","warning","error","critical","alert","emergency"]),KC=xn.extend({level:Ts}),Bd=Lt.extend({method:ne("logging/setLevel"),params:KC}),JC=Tn.extend({level:Ts,logger:R().optional(),data:dt()}),YC=En.extend({method:ne("notifications/message"),params:JC}),XC=X({name:R().optional()}),QC=X({hints:Ne(XC).optional(),costPriority:He().min(0).max(1).optional(),speedPriority:He().min(0).max(1).optional(),intelligencePriority:He().min(0).max(1).optional()}),eP=X({mode:an(["auto","required","none"]).optional()}),tP=X({type:ne("tool_result"),toolUseId:R().describe("The unique identifier for the corresponding tool call."),content:Ne(Zd).default([]),structuredContent:X({}).loose().optional(),isError:It().optional(),_meta:nt(R(),dt()).optional()}),nP=Rd("type",[Fd,Ud,qd]),lc=Rd("type",[Fd,Ud,qd,DC,tP]),rP=X({role:ks,content:at([lc,Ne(lc)]),_meta:nt(R(),dt()).optional()}),oP=ys.extend({messages:Ne(rP),modelPreferences:QC.optional(),systemPrompt:R().optional(),includeContext:an(["none","thisServer","allServers"]).optional(),temperature:He().optional(),maxTokens:He().int(),stopSequences:Ne(R()).optional(),metadata:Rt.optional(),tools:Ne(Rv).optional(),toolChoice:eP.optional()}),iP=Lt.extend({method:ne("sampling/createMessage"),params:oP}),Es=Dt.extend({model:R(),stopReason:ft(an(["endTurn","stopSequence","maxTokens"]).or(R())),role:ks,content:nP}),Hd=Dt.extend({model:R(),stopReason:ft(an(["endTurn","stopSequence","maxTokens","toolUse"]).or(R())),role:ks,content:at([lc,Ne(lc)])}),sP=X({type:ne("boolean"),title:R().optional(),description:R().optional(),default:It().optional()}),aP=X({type:ne("string"),title:R().optional(),description:R().optional(),minLength:He().optional(),maxLength:He().optional(),format:an(["email","uri","date","date-time"]).optional(),default:R().optional()}),cP=X({type:an(["number","integer"]),title:R().optional(),description:R().optional(),minimum:He().optional(),maximum:He().optional(),default:He().optional()}),lP=X({type:ne("string"),title:R().optional(),description:R().optional(),enum:Ne(R()),default:R().optional()}),uP=X({type:ne("string"),title:R().optional(),description:R().optional(),oneOf:Ne(X({const:R(),title:R()})),default:R().optional()}),pP=X({type:ne("string"),title:R().optional(),description:R().optional(),enum:Ne(R()),enumNames:Ne(R()).optional(),default:R().optional()}),dP=at([lP,uP]),fP=X({type:ne("array"),title:R().optional(),description:R().optional(),minItems:He().optional(),maxItems:He().optional(),items:X({type:ne("string"),enum:Ne(R())}),default:Ne(R()).optional()}),mP=X({type:ne("array"),title:R().optional(),description:R().optional(),minItems:He().optional(),maxItems:He().optional(),items:X({anyOf:Ne(X({const:R(),title:R()}))}),default:Ne(R()).optional()}),hP=at([fP,mP]),gP=at([pP,dP,hP]),yP=at([gP,sP,aP,cP]),xP=ys.extend({mode:ne("form").optional(),message:R(),requestedSchema:X({type:ne("object"),properties:nt(R(),yP),required:Ne(R()).optional()})}),vP=ys.extend({mode:ne("url"),message:R(),elicitationId:R(),url:R().url()}),bP=at([xP,vP]),_P=Lt.extend({method:ne("elicitation/create"),params:bP}),wP=Tn.extend({elicitationId:R()}),SP=En.extend({method:ne("notifications/elicitation/complete"),params:wP}),ui=Dt.extend({action:an(["accept","decline","cancel"]),content:Ad(t=>t===null?void 0:t,nt(R(),at([R(),He(),It(),Ne(R())])).optional())}),kP=X({type:ne("ref/resource"),uri:R()});var TP=X({type:ne("ref/prompt"),name:R()}),EP=xn.extend({ref:at([TP,kP]),argument:X({name:R(),value:R()}),context:X({arguments:nt(R(),R()).optional()}).optional()}),Ac=Lt.extend({method:ne("completion/complete"),params:EP});function Av(t){if(t.params.ref.type!=="ref/prompt")throw new TypeError(`Expected CompleteRequestPrompt, but got ${t.params.ref.type}`)}function Iv(t){if(t.params.ref.type!=="ref/resource")throw new TypeError(`Expected CompleteRequestResourceTemplate, but got ${t.params.ref.type}`)}var $P=Dt.extend({completion:Xt({values:Ne(R()).max(100),total:ft(He().int()),hasMore:ft(It())})}),RP=X({uri:R().startsWith("file://"),name:R().optional(),_meta:nt(R(),dt()).optional()}),AP=Lt.extend({method:ne("roots/list"),params:xn.optional()}),Vd=Dt.extend({roots:Ne(RP)}),IP=En.extend({method:ne("notifications/roots/list_changed"),params:Tn.optional()}),b3=at([mc,jd,Ac,Bd,Ec,Tc,wc,Sc,kc,AC,CC,li,$c,gc,xc,vc,_c]),_3=at([fc,hc,Ld,IP,Ss]),w3=at([dc,Es,Hd,ui,Vd,yc,bc,ai]),S3=at([mc,iP,_P,AP,gc,xc,vc,_c]),k3=at([fc,hc,YC,OC,$C,WC,ZC,Ss,SP]),T3=at([dc,gC,$P,qC,jC,SC,kC,EC,Rc,VC,yc,bc,ai]),te=class t extends Error{constructor(e,n,r){super(`MCP error ${e}: ${n}`),this.code=e,this.data=r,this.name="McpError"}static fromError(e,n,r){if(e===se.UrlElicitationRequired&&r){let o=r;if(o.elicitations)return new Id(o.elicitations,n)}return new t(e,n,r)}},Id=class extends te{constructor(e,n=`URL elicitation${e.length>1?"s":""} required`){super(se.UrlElicitationRequired,n,{elicitations:e})}get elicitations(){var e;return((e=this.data)==null?void 0:e.elicitations)??[]}};function Cr(t){return t==="completed"||t==="failed"||t==="cancelled"}var Pv=Symbol("Let zodToJsonSchema decide on which parser to use");var Cv={name:void 0,$refStrategy:"root",basePath:["#"],effectStrategy:"input",pipeStrategy:"all",dateStrategy:"format:date-time",mapStrategy:"entries",removeAdditionalStrategy:"passthrough",allowedAdditionalProperties:!0,rejectedAdditionalProperties:!1,definitionPath:"definitions",target:"jsonSchema7",strictUnions:!1,definitions:{},errorMessages:!1,markdownDescription:!1,patternStrategy:"escape",applyRegexFlags:!1,emailStrategy:"format:email",base64Strategy:"contentEncoding:base64",nameStrategy:"ref",openAiAnyTypeName:"OpenAiAnyType"},Ov=t=>typeof t=="string"?{...Cv,name:t}:{...Cv,...t};var zv=t=>{let e=Ov(t),n=e.name!==void 0?[...e.basePath,e.definitionPath,e.name]:e.basePath;return{...e,flags:{hasReferencedOpenAiAnyType:!1},currentPath:n,propertyPath:void 0,seen:new Map(Object.entries(e.definitions).map(([r,o])=>[o._def,{def:o._def,path:[...e.basePath,e.definitionPath,r],jsonSchema:void 0}]))}};function Gd(t,e,n,r){r!=null&&r.errorMessages&&n&&(t.errorMessage={...t.errorMessage,[e]:n})}function je(t,e,n,r,o){t[e]=n,Gd(t,e,r,o)}var Ic=(t,e)=>{let n=0;for(;n<t.length&&n<e.length&&t[n]===e[n];n++);return[(t.length-n).toString(),...e.slice(n)].join("/")};function mt(t){if(t.target!=="openAi")return{};let e=[...t.basePath,t.definitionPath,t.openAiAnyTypeName];return t.flags.hasReferencedOpenAiAnyType=!0,{$ref:t.$refStrategy==="relative"?Ic(e,t.currentPath):e.join("/")}}function Nv(t,e){var r,o,i;let n={type:"array"};return(r=t.type)!=null&&r._def&&((i=(o=t.type)==null?void 0:o._def)==null?void 0:i.typeName)!==q.ZodAny&&(n.items=fe(t.type._def,{...e,currentPath:[...e.currentPath,"items"]})),t.minLength&&je(n,"minItems",t.minLength.value,t.minLength.message,e),t.maxLength&&je(n,"maxItems",t.maxLength.value,t.maxLength.message,e),t.exactLength&&(je(n,"minItems",t.exactLength.value,t.exactLength.message,e),je(n,"maxItems",t.exactLength.value,t.exactLength.message,e)),n}function jv(t,e){let n={type:"integer",format:"int64"};if(!t.checks)return n;for(let r of t.checks)switch(r.kind){case"min":e.target==="jsonSchema7"?r.inclusive?je(n,"minimum",r.value,r.message,e):je(n,"exclusiveMinimum",r.value,r.message,e):(r.inclusive||(n.exclusiveMinimum=!0),je(n,"minimum",r.value,r.message,e));break;case"max":e.target==="jsonSchema7"?r.inclusive?je(n,"maximum",r.value,r.message,e):je(n,"exclusiveMaximum",r.value,r.message,e):(r.inclusive||(n.exclusiveMaximum=!0),je(n,"maximum",r.value,r.message,e));break;case"multipleOf":je(n,"multipleOf",r.value,r.message,e);break}return n}function Lv(){return{type:"boolean"}}function Cc(t,e){return fe(t.type._def,e)}var Dv=(t,e)=>fe(t.innerType._def,e);function Wd(t,e,n){let r=n??e.dateStrategy;if(Array.isArray(r))return{anyOf:r.map((o,i)=>Wd(t,e,o))};switch(r){case"string":case"format:date-time":return{type:"string",format:"date-time"};case"format:date":return{type:"string",format:"date"};case"integer":return CP(t,e)}}var CP=(t,e)=>{let n={type:"integer",format:"unix-time"};if(e.target==="openApi3")return n;for(let r of t.checks)switch(r.kind){case"min":je(n,"minimum",r.value,r.message,e);break;case"max":je(n,"maximum",r.value,r.message,e);break}return n};function Mv(t,e){return{...fe(t.innerType._def,e),default:t.defaultValue()}}function Fv(t,e){return e.effectStrategy==="input"?fe(t.schema._def,e):mt(e)}function Uv(t){return{type:"string",enum:Array.from(t.values)}}var PP=t=>"type"in t&&t.type==="string"?!1:"allOf"in t;function qv(t,e){let n=[fe(t.left._def,{...e,currentPath:[...e.currentPath,"allOf","0"]}),fe(t.right._def,{...e,currentPath:[...e.currentPath,"allOf","1"]})].filter(i=>!!i),r=e.target==="jsonSchema2019-09"?{unevaluatedProperties:!1}:void 0,o=[];return n.forEach(i=>{if(PP(i))o.push(...i.allOf),i.unevaluatedProperties===void 0&&(r=void 0);else{let s=i;if("additionalProperties"in i&&i.additionalProperties===!1){let{additionalProperties:a,...c}=i;s=c}else r=void 0;o.push(s)}}),o.length?{allOf:o,...r}:void 0}function Zv(t,e){let n=typeof t.value;return n!=="bigint"&&n!=="number"&&n!=="boolean"&&n!=="string"?{type:Array.isArray(t.value)?"array":"object"}:e.target==="openApi3"?{type:n==="bigint"?"integer":n,enum:[t.value]}:{type:n==="bigint"?"integer":n,const:t.value}}var Kd,jn={cuid:/^[cC][^\s-]{8,}$/,cuid2:/^[0-9a-z]+$/,ulid:/^[0-9A-HJKMNP-TV-Z]{26}$/,email:/^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/,emoji:()=>(Kd===void 0&&(Kd=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),Kd),uuid:/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/,ipv4:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,ipv4Cidr:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,ipv6:/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,ipv6Cidr:/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,base64:/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,base64url:/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,nanoid:/^[a-zA-Z0-9_-]{21}$/,jwt:/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/};function Pc(t,e){let n={type:"string"};if(t.checks)for(let r of t.checks)switch(r.kind){case"min":je(n,"minLength",typeof n.minLength=="number"?Math.max(n.minLength,r.value):r.value,r.message,e);break;case"max":je(n,"maxLength",typeof n.maxLength=="number"?Math.min(n.maxLength,r.value):r.value,r.message,e);break;case"email":switch(e.emailStrategy){case"format:email":Ln(n,"email",r.message,e);break;case"format:idn-email":Ln(n,"idn-email",r.message,e);break;case"pattern:zod":Qt(n,jn.email,r.message,e);break}break;case"url":Ln(n,"uri",r.message,e);break;case"uuid":Ln(n,"uuid",r.message,e);break;case"regex":Qt(n,r.regex,r.message,e);break;case"cuid":Qt(n,jn.cuid,r.message,e);break;case"cuid2":Qt(n,jn.cuid2,r.message,e);break;case"startsWith":Qt(n,RegExp(`^${Jd(r.value,e)}`),r.message,e);break;case"endsWith":Qt(n,RegExp(`${Jd(r.value,e)}$`),r.message,e);break;case"datetime":Ln(n,"date-time",r.message,e);break;case"date":Ln(n,"date",r.message,e);break;case"time":Ln(n,"time",r.message,e);break;case"duration":Ln(n,"duration",r.message,e);break;case"length":je(n,"minLength",typeof n.minLength=="number"?Math.max(n.minLength,r.value):r.value,r.message,e),je(n,"maxLength",typeof n.maxLength=="number"?Math.min(n.maxLength,r.value):r.value,r.message,e);break;case"includes":{Qt(n,RegExp(Jd(r.value,e)),r.message,e);break}case"ip":{r.version!=="v6"&&Ln(n,"ipv4",r.message,e),r.version!=="v4"&&Ln(n,"ipv6",r.message,e);break}case"base64url":Qt(n,jn.base64url,r.message,e);break;case"jwt":Qt(n,jn.jwt,r.message,e);break;case"cidr":{r.version!=="v6"&&Qt(n,jn.ipv4Cidr,r.message,e),r.version!=="v4"&&Qt(n,jn.ipv6Cidr,r.message,e);break}case"emoji":Qt(n,jn.emoji(),r.message,e);break;case"ulid":{Qt(n,jn.ulid,r.message,e);break}case"base64":{switch(e.base64Strategy){case"format:binary":{Ln(n,"binary",r.message,e);break}case"contentEncoding:base64":{je(n,"contentEncoding","base64",r.message,e);break}case"pattern:zod":{Qt(n,jn.base64,r.message,e);break}}break}case"nanoid":Qt(n,jn.nanoid,r.message,e);case"toLowerCase":case"toUpperCase":case"trim":break;default:}return n}function Jd(t,e){return e.patternStrategy==="escape"?zP(t):t}var OP=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function zP(t){let e="";for(let n=0;n<t.length;n++)OP.has(t[n])||(e+="\\"),e+=t[n];return e}function Ln(t,e,n,r){var o;t.format||(o=t.anyOf)!=null&&o.some(i=>i.format)?(t.anyOf||(t.anyOf=[]),t.format&&(t.anyOf.push({format:t.format,...t.errorMessage&&r.errorMessages&&{errorMessage:{format:t.errorMessage.format}}}),delete t.format,t.errorMessage&&(delete t.errorMessage.format,Object.keys(t.errorMessage).length===0&&delete t.errorMessage)),t.anyOf.push({format:e,...n&&r.errorMessages&&{errorMessage:{format:n}}})):je(t,"format",e,n,r)}function Qt(t,e,n,r){var o;t.pattern||(o=t.allOf)!=null&&o.some(i=>i.pattern)?(t.allOf||(t.allOf=[]),t.pattern&&(t.allOf.push({pattern:t.pattern,...t.errorMessage&&r.errorMessages&&{errorMessage:{pattern:t.errorMessage.pattern}}}),delete t.pattern,t.errorMessage&&(delete t.errorMessage.pattern,Object.keys(t.errorMessage).length===0&&delete t.errorMessage)),t.allOf.push({pattern:Bv(e,r),...n&&r.errorMessages&&{errorMessage:{pattern:n}}})):je(t,"pattern",Bv(e,r),n,r)}function Bv(t,e){var c;if(!e.applyRegexFlags||!t.flags)return t.source;let n={i:t.flags.includes("i"),m:t.flags.includes("m"),s:t.flags.includes("s")},r=n.i?t.source.toLowerCase():t.source,o="",i=!1,s=!1,a=!1;for(let l=0;l<r.length;l++){if(i){o+=r[l],i=!1;continue}if(n.i){if(s){if(r[l].match(/[a-z]/)){a?(o+=r[l],o+=`${r[l-2]}-${r[l]}`.toUpperCase(),a=!1):r[l+1]==="-"&&((c=r[l+2])!=null&&c.match(/[a-z]/))?(o+=r[l],a=!0):o+=`${r[l]}${r[l].toUpperCase()}`;continue}}else if(r[l].match(/[a-z]/)){o+=`[${r[l]}${r[l].toUpperCase()}]`;continue}}if(n.m){if(r[l]==="^"){o+=`(^|(?<=[\r
|
|
49
|
+
]))`;continue}else if(r[l]==="$"){o+=`($|(?=[\r
|
|
50
|
+
]))`;continue}}if(n.s&&r[l]==="."){o+=s?`${r[l]}\r
|
|
51
|
+
`:`[${r[l]}\r
|
|
52
|
+
]`;continue}o+=r[l],r[l]==="\\"?i=!0:s&&r[l]==="]"?s=!1:!s&&r[l]==="["&&(s=!0)}try{new RegExp(o)}catch{return console.warn(`Could not convert regex pattern at ${e.currentPath.join("/")} to a flag-independent form! Falling back to the flag-ignorant source`),t.source}return o}function Oc(t,e){var r,o,i,s,a,c;if(e.target==="openAi"&&console.warn("Warning: OpenAI may not support records in schemas! Try an array of key-value pairs instead."),e.target==="openApi3"&&((r=t.keyType)==null?void 0:r._def.typeName)===q.ZodEnum)return{type:"object",required:t.keyType._def.values,properties:t.keyType._def.values.reduce((l,p)=>({...l,[p]:fe(t.valueType._def,{...e,currentPath:[...e.currentPath,"properties",p]})??mt(e)}),{}),additionalProperties:e.rejectedAdditionalProperties};let n={type:"object",additionalProperties:fe(t.valueType._def,{...e,currentPath:[...e.currentPath,"additionalProperties"]})??e.allowedAdditionalProperties};if(e.target==="openApi3")return n;if(((o=t.keyType)==null?void 0:o._def.typeName)===q.ZodString&&((i=t.keyType._def.checks)!=null&&i.length)){let{type:l,...p}=Pc(t.keyType._def,e);return{...n,propertyNames:p}}else{if(((s=t.keyType)==null?void 0:s._def.typeName)===q.ZodEnum)return{...n,propertyNames:{enum:t.keyType._def.values}};if(((a=t.keyType)==null?void 0:a._def.typeName)===q.ZodBranded&&t.keyType._def.type._def.typeName===q.ZodString&&((c=t.keyType._def.type._def.checks)!=null&&c.length)){let{type:l,...p}=Cc(t.keyType._def,e);return{...n,propertyNames:p}}}return n}function Hv(t,e){if(e.mapStrategy==="record")return Oc(t,e);let n=fe(t.keyType._def,{...e,currentPath:[...e.currentPath,"items","items","0"]})||mt(e),r=fe(t.valueType._def,{...e,currentPath:[...e.currentPath,"items","items","1"]})||mt(e);return{type:"array",maxItems:125,items:{type:"array",items:[n,r],minItems:2,maxItems:2}}}function Vv(t){let e=t.values,r=Object.keys(t.values).filter(i=>typeof e[e[i]]!="number").map(i=>e[i]),o=Array.from(new Set(r.map(i=>typeof i)));return{type:o.length===1?o[0]==="string"?"string":"number":["string","number"],enum:r}}function Gv(t){return t.target==="openAi"?void 0:{not:mt({...t,currentPath:[...t.currentPath,"not"]})}}function Wv(t){return t.target==="openApi3"?{enum:["null"],nullable:!0}:{type:"null"}}var $s={ZodString:"string",ZodNumber:"number",ZodBigInt:"integer",ZodBoolean:"boolean",ZodNull:"null"};function Jv(t,e){if(e.target==="openApi3")return Kv(t,e);let n=t.options instanceof Map?Array.from(t.options.values()):t.options;if(n.every(r=>r._def.typeName in $s&&(!r._def.checks||!r._def.checks.length))){let r=n.reduce((o,i)=>{let s=$s[i._def.typeName];return s&&!o.includes(s)?[...o,s]:o},[]);return{type:r.length>1?r:r[0]}}else if(n.every(r=>r._def.typeName==="ZodLiteral"&&!r.description)){let r=n.reduce((o,i)=>{let s=typeof i._def.value;switch(s){case"string":case"number":case"boolean":return[...o,s];case"bigint":return[...o,"integer"];case"object":if(i._def.value===null)return[...o,"null"];case"symbol":case"undefined":case"function":default:return o}},[]);if(r.length===n.length){let o=r.filter((i,s,a)=>a.indexOf(i)===s);return{type:o.length>1?o:o[0],enum:n.reduce((i,s)=>i.includes(s._def.value)?i:[...i,s._def.value],[])}}}else if(n.every(r=>r._def.typeName==="ZodEnum"))return{type:"string",enum:n.reduce((r,o)=>[...r,...o._def.values.filter(i=>!r.includes(i))],[])};return Kv(t,e)}var Kv=(t,e)=>{let n=(t.options instanceof Map?Array.from(t.options.values()):t.options).map((r,o)=>fe(r._def,{...e,currentPath:[...e.currentPath,"anyOf",`${o}`]})).filter(r=>!!r&&(!e.strictUnions||typeof r=="object"&&Object.keys(r).length>0));return n.length?{anyOf:n}:void 0};function Yv(t,e){if(["ZodString","ZodNumber","ZodBigInt","ZodBoolean","ZodNull"].includes(t.innerType._def.typeName)&&(!t.innerType._def.checks||!t.innerType._def.checks.length))return e.target==="openApi3"?{type:$s[t.innerType._def.typeName],nullable:!0}:{type:[$s[t.innerType._def.typeName],"null"]};if(e.target==="openApi3"){let r=fe(t.innerType._def,{...e,currentPath:[...e.currentPath]});return r&&"$ref"in r?{allOf:[r],nullable:!0}:r&&{...r,nullable:!0}}let n=fe(t.innerType._def,{...e,currentPath:[...e.currentPath,"anyOf","0"]});return n&&{anyOf:[n,{type:"null"}]}}function Xv(t,e){let n={type:"number"};if(!t.checks)return n;for(let r of t.checks)switch(r.kind){case"int":n.type="integer",Gd(n,"type",r.message,e);break;case"min":e.target==="jsonSchema7"?r.inclusive?je(n,"minimum",r.value,r.message,e):je(n,"exclusiveMinimum",r.value,r.message,e):(r.inclusive||(n.exclusiveMinimum=!0),je(n,"minimum",r.value,r.message,e));break;case"max":e.target==="jsonSchema7"?r.inclusive?je(n,"maximum",r.value,r.message,e):je(n,"exclusiveMaximum",r.value,r.message,e):(r.inclusive||(n.exclusiveMaximum=!0),je(n,"maximum",r.value,r.message,e));break;case"multipleOf":je(n,"multipleOf",r.value,r.message,e);break}return n}function Qv(t,e){let n=e.target==="openAi",r={type:"object",properties:{}},o=[],i=t.shape();for(let a in i){let c=i[a];if(c===void 0||c._def===void 0)continue;let l=jP(c);l&&n&&(c._def.typeName==="ZodOptional"&&(c=c._def.innerType),c.isNullable()||(c=c.nullable()),l=!1);let p=fe(c._def,{...e,currentPath:[...e.currentPath,"properties",a],propertyPath:[...e.currentPath,"properties",a]});p!==void 0&&(r.properties[a]=p,l||o.push(a))}o.length&&(r.required=o);let s=NP(t,e);return s!==void 0&&(r.additionalProperties=s),r}function NP(t,e){if(t.catchall._def.typeName!=="ZodNever")return fe(t.catchall._def,{...e,currentPath:[...e.currentPath,"additionalProperties"]});switch(t.unknownKeys){case"passthrough":return e.allowedAdditionalProperties;case"strict":return e.rejectedAdditionalProperties;case"strip":return e.removeAdditionalStrategy==="strict"?e.allowedAdditionalProperties:e.rejectedAdditionalProperties}}function jP(t){try{return t.isOptional()}catch{return!0}}var eb=(t,e)=>{var r;if(e.currentPath.toString()===((r=e.propertyPath)==null?void 0:r.toString()))return fe(t.innerType._def,e);let n=fe(t.innerType._def,{...e,currentPath:[...e.currentPath,"anyOf","1"]});return n?{anyOf:[{not:mt(e)},n]}:mt(e)};var tb=(t,e)=>{if(e.pipeStrategy==="input")return fe(t.in._def,e);if(e.pipeStrategy==="output")return fe(t.out._def,e);let n=fe(t.in._def,{...e,currentPath:[...e.currentPath,"allOf","0"]}),r=fe(t.out._def,{...e,currentPath:[...e.currentPath,"allOf",n?"1":"0"]});return{allOf:[n,r].filter(o=>o!==void 0)}};function nb(t,e){return fe(t.type._def,e)}function rb(t,e){let r={type:"array",uniqueItems:!0,items:fe(t.valueType._def,{...e,currentPath:[...e.currentPath,"items"]})};return t.minSize&&je(r,"minItems",t.minSize.value,t.minSize.message,e),t.maxSize&&je(r,"maxItems",t.maxSize.value,t.maxSize.message,e),r}function ob(t,e){return t.rest?{type:"array",minItems:t.items.length,items:t.items.map((n,r)=>fe(n._def,{...e,currentPath:[...e.currentPath,"items",`${r}`]})).reduce((n,r)=>r===void 0?n:[...n,r],[]),additionalItems:fe(t.rest._def,{...e,currentPath:[...e.currentPath,"additionalItems"]})}:{type:"array",minItems:t.items.length,maxItems:t.items.length,items:t.items.map((n,r)=>fe(n._def,{...e,currentPath:[...e.currentPath,"items",`${r}`]})).reduce((n,r)=>r===void 0?n:[...n,r],[])}}function ib(t){return{not:mt(t)}}function sb(t){return mt(t)}var ab=(t,e)=>fe(t.innerType._def,e);var cb=(t,e,n)=>{switch(e){case q.ZodString:return Pc(t,n);case q.ZodNumber:return Xv(t,n);case q.ZodObject:return Qv(t,n);case q.ZodBigInt:return jv(t,n);case q.ZodBoolean:return Lv();case q.ZodDate:return Wd(t,n);case q.ZodUndefined:return ib(n);case q.ZodNull:return Wv(n);case q.ZodArray:return Nv(t,n);case q.ZodUnion:case q.ZodDiscriminatedUnion:return Jv(t,n);case q.ZodIntersection:return qv(t,n);case q.ZodTuple:return ob(t,n);case q.ZodRecord:return Oc(t,n);case q.ZodLiteral:return Zv(t,n);case q.ZodEnum:return Uv(t);case q.ZodNativeEnum:return Vv(t);case q.ZodNullable:return Yv(t,n);case q.ZodOptional:return eb(t,n);case q.ZodMap:return Hv(t,n);case q.ZodSet:return rb(t,n);case q.ZodLazy:return()=>t.getter()._def;case q.ZodPromise:return nb(t,n);case q.ZodNaN:case q.ZodNever:return Gv(n);case q.ZodEffects:return Fv(t,n);case q.ZodAny:return mt(n);case q.ZodUnknown:return sb(n);case q.ZodDefault:return Mv(t,n);case q.ZodBranded:return Cc(t,n);case q.ZodReadonly:return ab(t,n);case q.ZodCatch:return Dv(t,n);case q.ZodPipeline:return tb(t,n);case q.ZodFunction:case q.ZodVoid:case q.ZodSymbol:return;default:return(r=>{})(e)}};function fe(t,e,n=!1){var a;let r=e.seen.get(t);if(e.override){let c=(a=e.override)==null?void 0:a.call(e,t,e,r,n);if(c!==Pv)return c}if(r&&!n){let c=LP(r,e);if(c!==void 0)return c}let o={def:t,path:e.currentPath,jsonSchema:void 0};e.seen.set(t,o);let i=cb(t,t.typeName,e),s=typeof i=="function"?fe(i(),e):i;if(s&&DP(t,e,s),e.postProcess){let c=e.postProcess(s,t,e);return o.jsonSchema=s,c}return o.jsonSchema=s,s}var LP=(t,e)=>{switch(e.$refStrategy){case"root":return{$ref:t.path.join("/")};case"relative":return{$ref:Ic(e.currentPath,t.path)};case"none":case"seen":return t.path.length<e.currentPath.length&&t.path.every((n,r)=>e.currentPath[r]===n)?(console.warn(`Recursive reference detected at ${e.currentPath.join("/")}! Defaulting to any`),mt(e)):e.$refStrategy==="seen"?mt(e):void 0}},DP=(t,e,n)=>(t.description&&(n.description=t.description,e.markdownDescription&&(n.markdownDescription=t.description)),n);var Yd=(t,e)=>{let n=zv(e),r=typeof e=="object"&&e.definitions?Object.entries(e.definitions).reduce((c,[l,p])=>({...c,[l]:fe(p._def,{...n,currentPath:[...n.basePath,n.definitionPath,l]},!0)??mt(n)}),{}):void 0,o=typeof e=="string"?e:(e==null?void 0:e.nameStrategy)==="title"||e==null?void 0:e.name,i=fe(t._def,o===void 0?n:{...n,currentPath:[...n.basePath,n.definitionPath,o]},!1)??mt(n),s=typeof e=="object"&&e.name!==void 0&&e.nameStrategy==="title"?e.name:void 0;s!==void 0&&(i.title=s),n.flags.hasReferencedOpenAiAnyType&&(r||(r={}),r[n.openAiAnyTypeName]||(r[n.openAiAnyTypeName]={type:["string","number","integer","boolean","array","null"],items:{$ref:n.$refStrategy==="relative"?"1":[...n.basePath,n.definitionPath,n.openAiAnyTypeName].join("/")}}));let a=o===void 0?r?{...i,[n.definitionPath]:r}:i:{$ref:[...n.$refStrategy==="relative"?[]:n.basePath,n.definitionPath,o].join("/"),[n.definitionPath]:{...r,[o]:i}};return n.target==="jsonSchema7"?a.$schema="http://json-schema.org/draft-07/schema#":(n.target==="jsonSchema2019-09"||n.target==="openAi")&&(a.$schema="https://json-schema.org/draft/2019-09/schema#"),n.target==="openAi"&&("anyOf"in a||"oneOf"in a||"allOf"in a||"type"in a&&Array.isArray(a.type))&&console.warn("Warning: OpenAI may not support schemas with unions as roots! Try wrapping it in an object property."),a};function MP(t){return!t||t==="jsonSchema7"||t==="draft-7"?"draft-7":t==="jsonSchema2019-09"||t==="draft-2020-12"?"draft-2020-12":"draft-7"}function Xd(t,e){return kn(t)?bd(t,{target:MP(e==null?void 0:e.target),io:(e==null?void 0:e.pipeStrategy)??"input"}):Yd(t,{strictUnions:(e==null?void 0:e.strictUnions)??!0,pipeStrategy:(e==null?void 0:e.pipeStrategy)??"input"})}function Qd(t){let e=Ar(t),n=e==null?void 0:e.method;if(!n)throw new Error("Schema is missing a method literal");let r=sc(n);if(typeof r!="string")throw new Error("Schema method literal must be a string");return r}function ef(t,e){let n=Rr(t,e);if(!n.success)throw n.error;return n.data}var FP=6e4,zc=class{constructor(e){this._options=e,this._requestMessageId=0,this._requestHandlers=new Map,this._requestHandlerAbortControllers=new Map,this._notificationHandlers=new Map,this._responseHandlers=new Map,this._progressHandlers=new Map,this._timeoutInfo=new Map,this._pendingDebouncedNotifications=new Set,this._taskProgressTokens=new Map,this._requestResolvers=new Map,this.setNotificationHandler(fc,n=>{this._oncancel(n)}),this.setNotificationHandler(hc,n=>{this._onprogress(n)}),this.setRequestHandler(mc,n=>({})),this._taskStore=e==null?void 0:e.taskStore,this._taskMessageQueue=e==null?void 0:e.taskMessageQueue,this._taskStore&&(this.setRequestHandler(gc,async(n,r)=>{let o=await this._taskStore.getTask(n.params.taskId,r.sessionId);if(!o)throw new te(se.InvalidParams,"Failed to retrieve task: Task not found");return{...o}}),this.setRequestHandler(xc,async(n,r)=>{let o=async()=>{var a;let i=n.params.taskId;if(this._taskMessageQueue){let c;for(;c=await this._taskMessageQueue.dequeue(i,r.sessionId);){if(c.type==="response"||c.type==="error"){let l=c.message,p=l.id,d=this._requestResolvers.get(p);if(d)if(this._requestResolvers.delete(p),c.type==="response")d(l);else{let f=l,h=new te(f.error.code,f.error.message,f.error.data);d(h)}else{let f=c.type==="response"?"Response":"Error";this._onerror(new Error(`${f} handler missing for request ${p}`))}continue}await((a=this._transport)==null?void 0:a.send(c.message,{relatedRequestId:r.requestId}))}}let s=await this._taskStore.getTask(i,r.sessionId);if(!s)throw new te(se.InvalidParams,`Task not found: ${i}`);if(!Cr(s.status))return await this._waitForTaskUpdate(i,r.signal),await o();if(Cr(s.status)){let c=await this._taskStore.getTaskResult(i,r.sessionId);return this._clearTaskQueue(i),{...c,_meta:{...c._meta,[Ir]:{taskId:i}}}}return await o()};return await o()}),this.setRequestHandler(vc,async(n,r)=>{var o;try{let{tasks:i,nextCursor:s}=await this._taskStore.listTasks((o=n.params)==null?void 0:o.cursor,r.sessionId);return{tasks:i,nextCursor:s,_meta:{}}}catch(i){throw new te(se.InvalidParams,`Failed to list tasks: ${i instanceof Error?i.message:String(i)}`)}}),this.setRequestHandler(_c,async(n,r)=>{try{let o=await this._taskStore.getTask(n.params.taskId,r.sessionId);if(!o)throw new te(se.InvalidParams,`Task not found: ${n.params.taskId}`);if(Cr(o.status))throw new te(se.InvalidParams,`Cannot cancel task in terminal status: ${o.status}`);await this._taskStore.updateTaskStatus(n.params.taskId,"cancelled","Client cancelled task execution.",r.sessionId),this._clearTaskQueue(n.params.taskId);let i=await this._taskStore.getTask(n.params.taskId,r.sessionId);if(!i)throw new te(se.InvalidParams,`Task not found after cancellation: ${n.params.taskId}`);return{_meta:{},...i}}catch(o){throw o instanceof te?o:new te(se.InvalidRequest,`Failed to cancel task: ${o instanceof Error?o.message:String(o)}`)}}))}async _oncancel(e){if(!e.params.requestId)return;let n=this._requestHandlerAbortControllers.get(e.params.requestId);n==null||n.abort(e.params.reason)}_setupTimeout(e,n,r,o,i=!1){this._timeoutInfo.set(e,{timeoutId:setTimeout(o,n),startTime:Date.now(),timeout:n,maxTotalTimeout:r,resetTimeoutOnProgress:i,onTimeout:o})}_resetTimeout(e){let n=this._timeoutInfo.get(e);if(!n)return!1;let r=Date.now()-n.startTime;if(n.maxTotalTimeout&&r>=n.maxTotalTimeout)throw this._timeoutInfo.delete(e),te.fromError(se.RequestTimeout,"Maximum total timeout exceeded",{maxTotalTimeout:n.maxTotalTimeout,totalElapsed:r});return clearTimeout(n.timeoutId),n.timeoutId=setTimeout(n.onTimeout,n.timeout),!0}_cleanupTimeout(e){let n=this._timeoutInfo.get(e);n&&(clearTimeout(n.timeoutId),this._timeoutInfo.delete(e))}async connect(e){var i,s,a;if(this._transport)throw new Error("Already connected to a transport. Call close() before connecting to a new transport, or use a separate Protocol instance per connection.");this._transport=e;let n=(i=this.transport)==null?void 0:i.onclose;this._transport.onclose=()=>{n==null||n(),this._onclose()};let r=(s=this.transport)==null?void 0:s.onerror;this._transport.onerror=c=>{r==null||r(c),this._onerror(c)};let o=(a=this._transport)==null?void 0:a.onmessage;this._transport.onmessage=(c,l)=>{o==null||o(c,l),xs(c)||bv(c)?this._onresponse(c):Od(c)?this._onrequest(c,l):vv(c)?this._onnotification(c):this._onerror(new Error(`Unknown message type: ${JSON.stringify(c)}`))},await this._transport.start()}_onclose(){var r;let e=this._responseHandlers;this._responseHandlers=new Map,this._progressHandlers.clear(),this._taskProgressTokens.clear(),this._pendingDebouncedNotifications.clear();for(let o of this._timeoutInfo.values())clearTimeout(o.timeoutId);this._timeoutInfo.clear();for(let o of this._requestHandlerAbortControllers.values())o.abort();this._requestHandlerAbortControllers.clear();let n=te.fromError(se.ConnectionClosed,"Connection closed");this._transport=void 0,(r=this.onclose)==null||r.call(this);for(let o of e.values())o(n)}_onerror(e){var n;(n=this.onerror)==null||n.call(this,e)}_onnotification(e){let n=this._notificationHandlers.get(e.method)??this.fallbackNotificationHandler;n!==void 0&&Promise.resolve().then(()=>n(e)).catch(r=>this._onerror(new Error(`Uncaught error in notification handler: ${r}`)))}_onrequest(e,n){var p,d,f,h;let r=this._requestHandlers.get(e.method)??this.fallbackRequestHandler,o=this._transport,i=(f=(d=(p=e.params)==null?void 0:p._meta)==null?void 0:d[Ir])==null?void 0:f.taskId;if(r===void 0){let y={jsonrpc:"2.0",id:e.id,error:{code:se.MethodNotFound,message:"Method not found"}};i&&this._taskMessageQueue?this._enqueueTaskMessage(i,{type:"error",message:y,timestamp:Date.now()},o==null?void 0:o.sessionId).catch(v=>this._onerror(new Error(`Failed to enqueue error response: ${v}`))):o==null||o.send(y).catch(v=>this._onerror(new Error(`Failed to send an error response: ${v}`)));return}let s=new AbortController;this._requestHandlerAbortControllers.set(e.id,s);let a=gv(e.params)?e.params.task:void 0,c=this._taskStore?this.requestTaskStore(e,o==null?void 0:o.sessionId):void 0,l={signal:s.signal,sessionId:o==null?void 0:o.sessionId,_meta:(h=e.params)==null?void 0:h._meta,sendNotification:async y=>{if(s.signal.aborted)return;let v={relatedRequestId:e.id};i&&(v.relatedTask={taskId:i}),await this.notification(y,v)},sendRequest:async(y,v,x)=>{var w;if(s.signal.aborted)throw new te(se.ConnectionClosed,"Request was cancelled");let m={...x,relatedRequestId:e.id};i&&!m.relatedTask&&(m.relatedTask={taskId:i});let b=((w=m.relatedTask)==null?void 0:w.taskId)??i;return b&&c&&await c.updateTaskStatus(b,"input_required"),await this.request(y,v,m)},authInfo:n==null?void 0:n.authInfo,requestId:e.id,requestInfo:n==null?void 0:n.requestInfo,taskId:i,taskStore:c,taskRequestedTtl:a==null?void 0:a.ttl,closeSSEStream:n==null?void 0:n.closeSSEStream,closeStandaloneSSEStream:n==null?void 0:n.closeStandaloneSSEStream};Promise.resolve().then(()=>{a&&this.assertTaskHandlerCapability(e.method)}).then(()=>r(e,l)).then(async y=>{if(s.signal.aborted)return;let v={result:y,jsonrpc:"2.0",id:e.id};i&&this._taskMessageQueue?await this._enqueueTaskMessage(i,{type:"response",message:v,timestamp:Date.now()},o==null?void 0:o.sessionId):await(o==null?void 0:o.send(v))},async y=>{if(s.signal.aborted)return;let v={jsonrpc:"2.0",id:e.id,error:{code:Number.isSafeInteger(y.code)?y.code:se.InternalError,message:y.message??"Internal error",...y.data!==void 0&&{data:y.data}}};i&&this._taskMessageQueue?await this._enqueueTaskMessage(i,{type:"error",message:v,timestamp:Date.now()},o==null?void 0:o.sessionId):await(o==null?void 0:o.send(v))}).catch(y=>this._onerror(new Error(`Failed to send response: ${y}`))).finally(()=>{this._requestHandlerAbortControllers.get(e.id)===s&&this._requestHandlerAbortControllers.delete(e.id)})}_onprogress(e){let{progressToken:n,...r}=e.params,o=Number(n),i=this._progressHandlers.get(o);if(!i){this._onerror(new Error(`Received a progress notification for an unknown token: ${JSON.stringify(e)}`));return}let s=this._responseHandlers.get(o),a=this._timeoutInfo.get(o);if(a&&s&&a.resetTimeoutOnProgress)try{this._resetTimeout(o)}catch(c){this._responseHandlers.delete(o),this._progressHandlers.delete(o),this._cleanupTimeout(o),s(c);return}i(r)}_onresponse(e){let n=Number(e.id),r=this._requestResolvers.get(n);if(r){if(this._requestResolvers.delete(n),xs(e))r(e);else{let s=new te(e.error.code,e.error.message,e.error.data);r(s)}return}let o=this._responseHandlers.get(n);if(o===void 0){this._onerror(new Error(`Received a response for an unknown message ID: ${JSON.stringify(e)}`));return}this._responseHandlers.delete(n),this._cleanupTimeout(n);let i=!1;if(xs(e)&&e.result&&typeof e.result=="object"){let s=e.result;if(s.task&&typeof s.task=="object"){let a=s.task;typeof a.taskId=="string"&&(i=!0,this._taskProgressTokens.set(a.taskId,n))}}if(i||this._progressHandlers.delete(n),xs(e))o(e);else{let s=te.fromError(e.error.code,e.error.message,e.error.data);o(s)}}get transport(){return this._transport}async close(){var e;await((e=this._transport)==null?void 0:e.close())}async*requestStream(e,n,r){var s,a;let{task:o}=r??{};if(!o){try{yield{type:"result",result:await this.request(e,n,r)}}catch(c){yield{type:"error",error:c instanceof te?c:new te(se.InternalError,String(c))}}return}let i;try{let c=await this.request(e,ai,r);if(c.task)i=c.task.taskId,yield{type:"taskCreated",task:c.task};else throw new te(se.InternalError,"Task creation did not return a task");for(;;){let l=await this.getTask({taskId:i},r);if(yield{type:"taskStatus",task:l},Cr(l.status)){l.status==="completed"?yield{type:"result",result:await this.getTaskResult({taskId:i},n,r)}:l.status==="failed"?yield{type:"error",error:new te(se.InternalError,`Task ${i} failed`)}:l.status==="cancelled"&&(yield{type:"error",error:new te(se.InternalError,`Task ${i} was cancelled`)});return}if(l.status==="input_required"){yield{type:"result",result:await this.getTaskResult({taskId:i},n,r)};return}let p=l.pollInterval??((s=this._options)==null?void 0:s.defaultTaskPollInterval)??1e3;await new Promise(d=>setTimeout(d,p)),(a=r==null?void 0:r.signal)==null||a.throwIfAborted()}}catch(c){yield{type:"error",error:c instanceof te?c:new te(se.InternalError,String(c))}}}request(e,n,r){let{relatedRequestId:o,resumptionToken:i,onresumptiontoken:s,task:a,relatedTask:c}=r??{};return new Promise((l,p)=>{var b,w,k,E,F;let d=j=>{p(j)};if(!this._transport){d(new Error("Not connected"));return}if(((b=this._options)==null?void 0:b.enforceStrictCapabilities)===!0)try{this.assertCapabilityForMethod(e.method),a&&this.assertTaskCapability(e.method)}catch(j){d(j);return}(w=r==null?void 0:r.signal)==null||w.throwIfAborted();let f=this._requestMessageId++,h={...e,jsonrpc:"2.0",id:f};r!=null&&r.onprogress&&(this._progressHandlers.set(f,r.onprogress),h.params={...e.params,_meta:{...((k=e.params)==null?void 0:k._meta)||{},progressToken:f}}),a&&(h.params={...h.params,task:a}),c&&(h.params={...h.params,_meta:{...((E=h.params)==null?void 0:E._meta)||{},[Ir]:c}});let y=j=>{var de;this._responseHandlers.delete(f),this._progressHandlers.delete(f),this._cleanupTimeout(f),(de=this._transport)==null||de.send({jsonrpc:"2.0",method:"notifications/cancelled",params:{requestId:f,reason:String(j)}},{relatedRequestId:o,resumptionToken:i,onresumptiontoken:s}).catch(oe=>this._onerror(new Error(`Failed to send cancellation: ${oe}`)));let me=j instanceof te?j:new te(se.RequestTimeout,String(j));p(me)};this._responseHandlers.set(f,j=>{var me;if(!((me=r==null?void 0:r.signal)!=null&&me.aborted)){if(j instanceof Error)return p(j);try{let de=Rr(n,j.result);de.success?l(de.data):p(de.error)}catch(de){p(de)}}}),(F=r==null?void 0:r.signal)==null||F.addEventListener("abort",()=>{var j;y((j=r==null?void 0:r.signal)==null?void 0:j.reason)});let v=(r==null?void 0:r.timeout)??FP,x=()=>y(te.fromError(se.RequestTimeout,"Request timed out",{timeout:v}));this._setupTimeout(f,v,r==null?void 0:r.maxTotalTimeout,x,(r==null?void 0:r.resetTimeoutOnProgress)??!1);let m=c==null?void 0:c.taskId;if(m){let j=me=>{let de=this._responseHandlers.get(f);de?de(me):this._onerror(new Error(`Response handler missing for side-channeled request ${f}`))};this._requestResolvers.set(f,j),this._enqueueTaskMessage(m,{type:"request",message:h,timestamp:Date.now()}).catch(me=>{this._cleanupTimeout(f),p(me)})}else this._transport.send(h,{relatedRequestId:o,resumptionToken:i,onresumptiontoken:s}).catch(j=>{this._cleanupTimeout(f),p(j)})})}async getTask(e,n){return this.request({method:"tasks/get",params:e},yc,n)}async getTaskResult(e,n,r){return this.request({method:"tasks/result",params:e},n,r)}async listTasks(e,n){return this.request({method:"tasks/list",params:e},bc,n)}async cancelTask(e,n){return this.request({method:"tasks/cancel",params:e},Sv,n)}async notification(e,n){var a,c,l,p;if(!this._transport)throw new Error("Not connected");this.assertNotificationCapability(e.method);let r=(a=n==null?void 0:n.relatedTask)==null?void 0:a.taskId;if(r){let d={...e,jsonrpc:"2.0",params:{...e.params,_meta:{...((c=e.params)==null?void 0:c._meta)||{},[Ir]:n.relatedTask}}};await this._enqueueTaskMessage(r,{type:"notification",message:d,timestamp:Date.now()});return}if((((l=this._options)==null?void 0:l.debouncedNotificationMethods)??[]).includes(e.method)&&!e.params&&!(n!=null&&n.relatedRequestId)&&!(n!=null&&n.relatedTask)){if(this._pendingDebouncedNotifications.has(e.method))return;this._pendingDebouncedNotifications.add(e.method),Promise.resolve().then(()=>{var f,h;if(this._pendingDebouncedNotifications.delete(e.method),!this._transport)return;let d={...e,jsonrpc:"2.0"};n!=null&&n.relatedTask&&(d={...d,params:{...d.params,_meta:{...((f=d.params)==null?void 0:f._meta)||{},[Ir]:n.relatedTask}}}),(h=this._transport)==null||h.send(d,n).catch(y=>this._onerror(y))});return}let s={...e,jsonrpc:"2.0"};n!=null&&n.relatedTask&&(s={...s,params:{...s.params,_meta:{...((p=s.params)==null?void 0:p._meta)||{},[Ir]:n.relatedTask}}}),await this._transport.send(s,n)}setRequestHandler(e,n){let r=Qd(e);this.assertRequestHandlerCapability(r),this._requestHandlers.set(r,(o,i)=>{let s=ef(e,o);return Promise.resolve(n(s,i))})}removeRequestHandler(e){this._requestHandlers.delete(e)}assertCanSetRequestHandler(e){if(this._requestHandlers.has(e))throw new Error(`A request handler for ${e} already exists, which would be overridden`)}setNotificationHandler(e,n){let r=Qd(e);this._notificationHandlers.set(r,o=>{let i=ef(e,o);return Promise.resolve(n(i))})}removeNotificationHandler(e){this._notificationHandlers.delete(e)}_cleanupTaskProgressHandler(e){let n=this._taskProgressTokens.get(e);n!==void 0&&(this._progressHandlers.delete(n),this._taskProgressTokens.delete(e))}async _enqueueTaskMessage(e,n,r){var i;if(!this._taskStore||!this._taskMessageQueue)throw new Error("Cannot enqueue task message: taskStore and taskMessageQueue are not configured");let o=(i=this._options)==null?void 0:i.maxTaskQueueSize;await this._taskMessageQueue.enqueue(e,n,r,o)}async _clearTaskQueue(e,n){if(this._taskMessageQueue){let r=await this._taskMessageQueue.dequeueAll(e,n);for(let o of r)if(o.type==="request"&&Od(o.message)){let i=o.message.id,s=this._requestResolvers.get(i);s?(s(new te(se.InternalError,"Task cancelled or completed")),this._requestResolvers.delete(i)):this._onerror(new Error(`Resolver missing for request ${i} during task ${e} cleanup`))}}}async _waitForTaskUpdate(e,n){var o,i;let r=((o=this._options)==null?void 0:o.defaultTaskPollInterval)??1e3;try{let s=await((i=this._taskStore)==null?void 0:i.getTask(e));s!=null&&s.pollInterval&&(r=s.pollInterval)}catch{}return new Promise((s,a)=>{if(n.aborted){a(new te(se.InvalidRequest,"Request cancelled"));return}let c=setTimeout(s,r);n.addEventListener("abort",()=>{clearTimeout(c),a(new te(se.InvalidRequest,"Request cancelled"))},{once:!0})})}requestTaskStore(e,n){let r=this._taskStore;if(!r)throw new Error("No task store configured");return{createTask:async o=>{if(!e)throw new Error("No request provided");return await r.createTask(o,e.id,{method:e.method,params:e.params},n)},getTask:async o=>{let i=await r.getTask(o,n);if(!i)throw new te(se.InvalidParams,"Failed to retrieve task: Task not found");return i},storeTaskResult:async(o,i,s)=>{await r.storeTaskResult(o,i,s,n);let a=await r.getTask(o,n);if(a){let c=Ss.parse({method:"notifications/tasks/status",params:a});await this.notification(c),Cr(a.status)&&this._cleanupTaskProgressHandler(o)}},getTaskResult:o=>r.getTaskResult(o,n),updateTaskStatus:async(o,i,s)=>{let a=await r.getTask(o,n);if(!a)throw new te(se.InvalidParams,`Task "${o}" not found - it may have been cleaned up`);if(Cr(a.status))throw new te(se.InvalidParams,`Cannot update task "${o}" from terminal status "${a.status}" to "${i}". Terminal states (completed, failed, cancelled) cannot transition to other states.`);await r.updateTaskStatus(o,i,s,n);let c=await r.getTask(o,n);if(c){let l=Ss.parse({method:"notifications/tasks/status",params:c});await this.notification(l),Cr(c.status)&&this._cleanupTaskProgressHandler(o)}},listTasks:o=>r.listTasks(o,n)}}};function lb(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)}function ub(t,e){let n={...t};for(let r in e){let o=r,i=e[o];if(i===void 0)continue;let s=n[o];lb(s)&&lb(i)?n[o]={...s,...i}:n[o]=i}return n}var t0=Ee(Um(),1),n0=Ee(e0(),1);function ZL(){let t=new t0.default({strict:!1,validateFormats:!0,validateSchema:!1,allErrors:!0});return(0,n0.default)(t),t}var hl=class{constructor(e){this._ajv=e??ZL()}getValidator(e){let n="$id"in e&&typeof e.$id=="string"?this._ajv.getSchema(e.$id)??this._ajv.compile(e):this._ajv.compile(e);return r=>n(r)?{valid:!0,data:r,errorMessage:void 0}:{valid:!1,data:void 0,errorMessage:this._ajv.errorsText(n.errors)}}};var gl=class{constructor(e){this._server=e}requestStream(e,n,r){return this._server.requestStream(e,n,r)}createMessageStream(e,n){var o;let r=this._server.getClientCapabilities();if((e.tools||e.toolChoice)&&!((o=r==null?void 0:r.sampling)!=null&&o.tools))throw new Error("Client does not support sampling tools capability.");if(e.messages.length>0){let i=e.messages[e.messages.length-1],s=Array.isArray(i.content)?i.content:[i.content],a=s.some(d=>d.type==="tool_result"),c=e.messages.length>1?e.messages[e.messages.length-2]:void 0,l=c?Array.isArray(c.content)?c.content:[c.content]:[],p=l.some(d=>d.type==="tool_use");if(a){if(s.some(d=>d.type!=="tool_result"))throw new Error("The last message must contain only tool_result content if any is present");if(!p)throw new Error("tool_result blocks are not matching any tool_use from the previous message")}if(p){let d=new Set(l.filter(h=>h.type==="tool_use").map(h=>h.id)),f=new Set(s.filter(h=>h.type==="tool_result").map(h=>h.toolUseId));if(d.size!==f.size||![...d].every(h=>f.has(h)))throw new Error("ids of tool_result blocks and tool_use blocks from previous message do not match")}}return this.requestStream({method:"sampling/createMessage",params:e},Es,n)}elicitInputStream(e,n){var s,a;let r=this._server.getClientCapabilities(),o=e.mode??"form";switch(o){case"url":{if(!((s=r==null?void 0:r.elicitation)!=null&&s.url))throw new Error("Client does not support url elicitation.");break}case"form":{if(!((a=r==null?void 0:r.elicitation)!=null&&a.form))throw new Error("Client does not support form elicitation.");break}}let i=o==="form"&&e.mode===void 0?{...e,mode:"form"}:e;return this.requestStream({method:"elicitation/create",params:i},ui,n)}async getTask(e,n){return this._server.getTask({taskId:e},n)}async getTaskResult(e,n,r){return this._server.getTaskResult({taskId:e},n,r)}async listTasks(e,n){return this._server.listTasks(e?{cursor:e}:void 0,n)}async cancelTask(e,n){return this._server.cancelTask({taskId:e},n)}};function r0(t,e,n){var r;if(!t)throw new Error(`${n} does not support task creation (required for ${e})`);switch(e){case"tools/call":if(!((r=t.tools)!=null&&r.call))throw new Error(`${n} does not support task creation for tools/call (required for ${e})`);break;default:break}}function o0(t,e,n){var r,o;if(!t)throw new Error(`${n} does not support task creation (required for ${e})`);switch(e){case"sampling/createMessage":if(!((r=t.sampling)!=null&&r.createMessage))throw new Error(`${n} does not support task creation for sampling/createMessage (required for ${e})`);break;case"elicitation/create":if(!((o=t.elicitation)!=null&&o.create))throw new Error(`${n} does not support task creation for elicitation/create (required for ${e})`);break;default:break}}var yl=class extends zc{constructor(e,n){super(n),this._serverInfo=e,this._loggingLevels=new Map,this.LOG_LEVEL_SEVERITY=new Map(Ts.options.map((r,o)=>[r,o])),this.isMessageIgnored=(r,o)=>{let i=this._loggingLevels.get(o);return i?this.LOG_LEVEL_SEVERITY.get(r)<this.LOG_LEVEL_SEVERITY.get(i):!1},this._capabilities=(n==null?void 0:n.capabilities)??{},this._instructions=n==null?void 0:n.instructions,this._jsonSchemaValidator=(n==null?void 0:n.jsonSchemaValidator)??new hl,this.setRequestHandler(jd,r=>this._oninitialize(r)),this.setNotificationHandler(Ld,()=>{var r;return(r=this.oninitialized)==null?void 0:r.call(this)}),this._capabilities.logging&&this.setRequestHandler(Bd,async(r,o)=>{var c;let i=o.sessionId||((c=o.requestInfo)==null?void 0:c.headers["mcp-session-id"])||void 0,{level:s}=r.params,a=Ts.safeParse(s);return a.success&&this._loggingLevels.set(i,a.data),{}})}get experimental(){return this._experimental||(this._experimental={tasks:new gl(this)}),this._experimental}registerCapabilities(e){if(this.transport)throw new Error("Cannot register capabilities after connecting to transport");this._capabilities=ub(this._capabilities,e)}setRequestHandler(e,n){var a;let r=Ar(e),o=r==null?void 0:r.method;if(!o)throw new Error("Schema is missing a method literal");let i;if(kn(o)){let c=o,l=(a=c._zod)==null?void 0:a.def;i=(l==null?void 0:l.value)??c.value}else{let c=o,l=c._def;i=(l==null?void 0:l.value)??c.value}if(typeof i!="string")throw new Error("Schema method literal must be a string");if(i==="tools/call"){let c=async(l,p)=>{let d=Rr(li,l);if(!d.success){let v=d.error instanceof Error?d.error.message:String(d.error);throw new te(se.InvalidParams,`Invalid tools/call request: ${v}`)}let{params:f}=d.data,h=await Promise.resolve(n(l,p));if(f.task){let v=Rr(ai,h);if(!v.success){let x=v.error instanceof Error?v.error.message:String(v.error);throw new te(se.InvalidParams,`Invalid task creation result: ${x}`)}return v.data}let y=Rr(Rc,h);if(!y.success){let v=y.error instanceof Error?y.error.message:String(y.error);throw new te(se.InvalidParams,`Invalid tools/call result: ${v}`)}return y.data};return super.setRequestHandler(e,c)}return super.setRequestHandler(e,n)}assertCapabilityForMethod(e){var n,r,o;switch(e){case"sampling/createMessage":if(!((n=this._clientCapabilities)!=null&&n.sampling))throw new Error(`Client does not support sampling (required for ${e})`);break;case"elicitation/create":if(!((r=this._clientCapabilities)!=null&&r.elicitation))throw new Error(`Client does not support elicitation (required for ${e})`);break;case"roots/list":if(!((o=this._clientCapabilities)!=null&&o.roots))throw new Error(`Client does not support listing roots (required for ${e})`);break;case"ping":break}}assertNotificationCapability(e){var n,r;switch(e){case"notifications/message":if(!this._capabilities.logging)throw new Error(`Server does not support logging (required for ${e})`);break;case"notifications/resources/updated":case"notifications/resources/list_changed":if(!this._capabilities.resources)throw new Error(`Server does not support notifying about resources (required for ${e})`);break;case"notifications/tools/list_changed":if(!this._capabilities.tools)throw new Error(`Server does not support notifying of tool list changes (required for ${e})`);break;case"notifications/prompts/list_changed":if(!this._capabilities.prompts)throw new Error(`Server does not support notifying of prompt list changes (required for ${e})`);break;case"notifications/elicitation/complete":if(!((r=(n=this._clientCapabilities)==null?void 0:n.elicitation)!=null&&r.url))throw new Error(`Client does not support URL elicitation (required for ${e})`);break;case"notifications/cancelled":break;case"notifications/progress":break}}assertRequestHandlerCapability(e){if(this._capabilities)switch(e){case"completion/complete":if(!this._capabilities.completions)throw new Error(`Server does not support completions (required for ${e})`);break;case"logging/setLevel":if(!this._capabilities.logging)throw new Error(`Server does not support logging (required for ${e})`);break;case"prompts/get":case"prompts/list":if(!this._capabilities.prompts)throw new Error(`Server does not support prompts (required for ${e})`);break;case"resources/list":case"resources/templates/list":case"resources/read":if(!this._capabilities.resources)throw new Error(`Server does not support resources (required for ${e})`);break;case"tools/call":case"tools/list":if(!this._capabilities.tools)throw new Error(`Server does not support tools (required for ${e})`);break;case"tasks/get":case"tasks/list":case"tasks/result":case"tasks/cancel":if(!this._capabilities.tasks)throw new Error(`Server does not support tasks capability (required for ${e})`);break;case"ping":case"initialize":break}}assertTaskCapability(e){var n,r;o0((r=(n=this._clientCapabilities)==null?void 0:n.tasks)==null?void 0:r.requests,e,"Client")}assertTaskHandlerCapability(e){var n;this._capabilities&&r0((n=this._capabilities.tasks)==null?void 0:n.requests,e,"Server")}async _oninitialize(e){let n=e.params.protocolVersion;return this._clientCapabilities=e.params.capabilities,this._clientVersion=e.params.clientInfo,{protocolVersion:fv.includes(n)?n:Cd,capabilities:this.getCapabilities(),serverInfo:this._serverInfo,...this._instructions&&{instructions:this._instructions}}}getClientCapabilities(){return this._clientCapabilities}getClientVersion(){return this._clientVersion}getCapabilities(){return this._capabilities}async ping(){return this.request({method:"ping"},dc)}async createMessage(e,n){var r,o;if((e.tools||e.toolChoice)&&!((o=(r=this._clientCapabilities)==null?void 0:r.sampling)!=null&&o.tools))throw new Error("Client does not support sampling tools capability.");if(e.messages.length>0){let i=e.messages[e.messages.length-1],s=Array.isArray(i.content)?i.content:[i.content],a=s.some(d=>d.type==="tool_result"),c=e.messages.length>1?e.messages[e.messages.length-2]:void 0,l=c?Array.isArray(c.content)?c.content:[c.content]:[],p=l.some(d=>d.type==="tool_use");if(a){if(s.some(d=>d.type!=="tool_result"))throw new Error("The last message must contain only tool_result content if any is present");if(!p)throw new Error("tool_result blocks are not matching any tool_use from the previous message")}if(p){let d=new Set(l.filter(h=>h.type==="tool_use").map(h=>h.id)),f=new Set(s.filter(h=>h.type==="tool_result").map(h=>h.toolUseId));if(d.size!==f.size||![...d].every(h=>f.has(h)))throw new Error("ids of tool_result blocks and tool_use blocks from previous message do not match")}}return e.tools?this.request({method:"sampling/createMessage",params:e},Hd,n):this.request({method:"sampling/createMessage",params:e},Es,n)}async elicitInput(e,n){var o,i,s,a;switch(e.mode??"form"){case"url":{if(!((i=(o=this._clientCapabilities)==null?void 0:o.elicitation)!=null&&i.url))throw new Error("Client does not support url elicitation.");let c=e;return this.request({method:"elicitation/create",params:c},ui,n)}case"form":{if(!((a=(s=this._clientCapabilities)==null?void 0:s.elicitation)!=null&&a.form))throw new Error("Client does not support form elicitation.");let c=e.mode==="form"?e:{...e,mode:"form"},l=await this.request({method:"elicitation/create",params:c},ui,n);if(l.action==="accept"&&l.content&&c.requestedSchema)try{let d=this._jsonSchemaValidator.getValidator(c.requestedSchema)(l.content);if(!d.valid)throw new te(se.InvalidParams,`Elicitation response content does not match requested schema: ${d.errorMessage}`)}catch(p){throw p instanceof te?p:new te(se.InternalError,`Error validating elicitation response: ${p instanceof Error?p.message:String(p)}`)}return l}}}createElicitationCompletionNotifier(e,n){var r,o;if(!((o=(r=this._clientCapabilities)==null?void 0:r.elicitation)!=null&&o.url))throw new Error("Client does not support URL elicitation (required for notifications/elicitation/complete)");return()=>this.notification({method:"notifications/elicitation/complete",params:{elicitationId:e}},n)}async listRoots(e,n){return this.request({method:"roots/list",params:e},Vd,n)}async sendLoggingMessage(e,n){if(this._capabilities.logging&&!this.isMessageIgnored(e.level,n))return this.notification({method:"notifications/message",params:e})}async sendResourceUpdated(e){return this.notification({method:"notifications/resources/updated",params:e})}async sendResourceListChanged(){return this.notification({method:"notifications/resources/list_changed"})}async sendToolListChanged(){return this.notification({method:"notifications/tools/list_changed"})}async sendPromptListChanged(){return this.notification({method:"notifications/prompts/list_changed"})}};var s0=Symbol.for("mcp.completable");function Km(t){return!!t&&typeof t=="object"&&s0 in t}function a0(t){let e=t[s0];return e==null?void 0:e.complete}var i0;(function(t){t.Completable="McpCompletable"})(i0||(i0={}));var BL=/^[A-Za-z0-9._-]{1,128}$/;function HL(t){let e=[];if(t.length===0)return{isValid:!1,warnings:["Tool name cannot be empty"]};if(t.length>128)return{isValid:!1,warnings:[`Tool name exceeds maximum length of 128 characters (current: ${t.length})`]};if(t.includes(" ")&&e.push("Tool name contains spaces, which may cause parsing issues"),t.includes(",")&&e.push("Tool name contains commas, which may cause parsing issues"),(t.startsWith("-")||t.endsWith("-"))&&e.push("Tool name starts or ends with a dash, which may cause parsing issues in some contexts"),(t.startsWith(".")||t.endsWith("."))&&e.push("Tool name starts or ends with a dot, which may cause parsing issues in some contexts"),!BL.test(t)){let n=t.split("").filter(r=>!/[A-Za-z0-9._-]/.test(r)).filter((r,o,i)=>i.indexOf(r)===o);return e.push(`Tool name contains invalid characters: ${n.map(r=>`"${r}"`).join(", ")}`,"Allowed characters are: A-Z, a-z, 0-9, underscore (_), dash (-), and dot (.)"),{isValid:!1,warnings:e}}return{isValid:!0,warnings:e}}function VL(t,e){if(e.length>0){console.warn(`Tool name validation warning for "${t}":`);for(let n of e)console.warn(` - ${n}`);console.warn("Tool registration will proceed, but this may cause compatibility issues."),console.warn("Consider updating the tool name to conform to the MCP tool naming standard."),console.warn("See SEP: Specify Format for Tool Names (https://github.com/modelcontextprotocol/modelcontextprotocol/issues/986) for more details.")}}function Jm(t){let e=HL(t);return VL(t,e.warnings),e.isValid}var xl=class{constructor(e){this._mcpServer=e}registerToolTask(e,n,r){let o={taskSupport:"required",...n.execution};if(o.taskSupport==="forbidden")throw new Error(`Cannot register task-based tool '${e}' with taskSupport 'forbidden'. Use registerTool() instead.`);return this._mcpServer._createRegisteredTool(e,n.title,n.description,n.inputSchema,n.outputSchema,n.annotations,o,n._meta,r)}};var vl=class{constructor(e,n){this._registeredResources={},this._registeredResourceTemplates={},this._registeredTools={},this._registeredPrompts={},this._toolHandlersInitialized=!1,this._completionHandlerInitialized=!1,this._resourceHandlersInitialized=!1,this._promptHandlersInitialized=!1,this.server=new yl(e,n)}get experimental(){return this._experimental||(this._experimental={tasks:new xl(this)}),this._experimental}async connect(e){return await this.server.connect(e)}async close(){await this.server.close()}setToolRequestHandlers(){this._toolHandlersInitialized||(this.server.assertCanSetRequestHandler(Fr($c)),this.server.assertCanSetRequestHandler(Fr(li)),this.server.registerCapabilities({tools:{listChanged:!0}}),this.server.setRequestHandler($c,()=>({tools:Object.entries(this._registeredTools).filter(([,e])=>e.enabled).map(([e,n])=>{let r={name:e,title:n.title,description:n.description,inputSchema:(()=>{let o=ii(n.inputSchema);return o?Xd(o,{strictUnions:!0,pipeStrategy:"input"}):GL})(),annotations:n.annotations,execution:n.execution,_meta:n._meta};if(n.outputSchema){let o=ii(n.outputSchema);o&&(r.outputSchema=Xd(o,{strictUnions:!0,pipeStrategy:"output"}))}return r})})),this.server.setRequestHandler(li,async(e,n)=>{var r;try{let o=this._registeredTools[e.params.name];if(!o)throw new te(se.InvalidParams,`Tool ${e.params.name} not found`);if(!o.enabled)throw new te(se.InvalidParams,`Tool ${e.params.name} disabled`);let i=!!e.params.task,s=(r=o.execution)==null?void 0:r.taskSupport,a="createTask"in o.handler;if((s==="required"||s==="optional")&&!a)throw new te(se.InternalError,`Tool ${e.params.name} has taskSupport '${s}' but was not registered with registerToolTask`);if(s==="required"&&!i)throw new te(se.MethodNotFound,`Tool ${e.params.name} requires task augmentation (taskSupport: 'required')`);if(s==="optional"&&!i&&a)return await this.handleAutomaticTaskPolling(o,e,n);let c=await this.validateToolInput(o,e.params.arguments,e.params.name),l=await this.executeToolHandler(o,c,n);return i||await this.validateToolOutput(o,l,e.params.name),l}catch(o){if(o instanceof te&&o.code===se.UrlElicitationRequired)throw o;return this.createToolError(o instanceof Error?o.message:String(o))}}),this._toolHandlersInitialized=!0)}createToolError(e){return{content:[{type:"text",text:e}],isError:!0}}async validateToolInput(e,n,r){if(!e.inputSchema)return;let i=ii(e.inputSchema)??e.inputSchema,s=await oc(i,n);if(!s.success){let a="error"in s?s.error:"Unknown error",c=ic(a);throw new te(se.InvalidParams,`Input validation error: Invalid arguments for tool ${r}: ${c}`)}return s.data}async validateToolOutput(e,n,r){if(!e.outputSchema||!("content"in n)||n.isError)return;if(!n.structuredContent)throw new te(se.InvalidParams,`Output validation error: Tool ${r} has an output schema but no structured content was provided`);let o=ii(e.outputSchema),i=await oc(o,n.structuredContent);if(!i.success){let s="error"in i?i.error:"Unknown error",a=ic(s);throw new te(se.InvalidParams,`Output validation error: Invalid structured content for tool ${r}: ${a}`)}}async executeToolHandler(e,n,r){let o=e.handler;if("createTask"in o){if(!r.taskStore)throw new Error("No task store provided.");let s={...r,taskStore:r.taskStore};if(e.inputSchema){let a=o;return await Promise.resolve(a.createTask(n,s))}else{let a=o;return await Promise.resolve(a.createTask(s))}}if(e.inputSchema){let s=o;return await Promise.resolve(s(n,r))}else{let s=o;return await Promise.resolve(s(r))}}async handleAutomaticTaskPolling(e,n,r){if(!r.taskStore)throw new Error("No task store provided for task-capable tool.");let o=await this.validateToolInput(e,n.params.arguments,n.params.name),i=e.handler,s={...r,taskStore:r.taskStore},a=o?await Promise.resolve(i.createTask(o,s)):await Promise.resolve(i.createTask(s)),c=a.task.taskId,l=a.task,p=l.pollInterval??5e3;for(;l.status!=="completed"&&l.status!=="failed"&&l.status!=="cancelled";){await new Promise(f=>setTimeout(f,p));let d=await r.taskStore.getTask(c);if(!d)throw new te(se.InternalError,`Task ${c} not found during polling`);l=d}return await r.taskStore.getTaskResult(c)}setCompletionRequestHandler(){this._completionHandlerInitialized||(this.server.assertCanSetRequestHandler(Fr(Ac)),this.server.registerCapabilities({completions:{}}),this.server.setRequestHandler(Ac,async e=>{switch(e.params.ref.type){case"ref/prompt":return Av(e),this.handlePromptCompletion(e,e.params.ref);case"ref/resource":return Iv(e),this.handleResourceCompletion(e,e.params.ref);default:throw new te(se.InvalidParams,`Invalid completion reference: ${e.params.ref}`)}}),this._completionHandlerInitialized=!0)}async handlePromptCompletion(e,n){let r=this._registeredPrompts[n.name];if(!r)throw new te(se.InvalidParams,`Prompt ${n.name} not found`);if(!r.enabled)throw new te(se.InvalidParams,`Prompt ${n.name} disabled`);if(!r.argsSchema)return ra;let o=Ar(r.argsSchema),i=o==null?void 0:o[e.params.argument.name];if(!Km(i))return ra;let s=a0(i);if(!s)return ra;let a=await s(e.params.argument.value,e.params.context);return l0(a)}async handleResourceCompletion(e,n){let r=Object.values(this._registeredResourceTemplates).find(s=>s.resourceTemplate.uriTemplate.toString()===n.uri);if(!r){if(this._registeredResources[n.uri])return ra;throw new te(se.InvalidParams,`Resource template ${e.params.ref.uri} not found`)}let o=r.resourceTemplate.completeCallback(e.params.argument.name);if(!o)return ra;let i=await o(e.params.argument.value,e.params.context);return l0(i)}setResourceRequestHandlers(){this._resourceHandlersInitialized||(this.server.assertCanSetRequestHandler(Fr(wc)),this.server.assertCanSetRequestHandler(Fr(Sc)),this.server.assertCanSetRequestHandler(Fr(kc)),this.server.registerCapabilities({resources:{listChanged:!0}}),this.server.setRequestHandler(wc,async(e,n)=>{let r=Object.entries(this._registeredResources).filter(([i,s])=>s.enabled).map(([i,s])=>({uri:i,name:s.name,...s.metadata})),o=[];for(let i of Object.values(this._registeredResourceTemplates)){if(!i.resourceTemplate.listCallback)continue;let s=await i.resourceTemplate.listCallback(n);for(let a of s.resources)o.push({...i.metadata,...a})}return{resources:[...r,...o]}}),this.server.setRequestHandler(Sc,async()=>({resourceTemplates:Object.entries(this._registeredResourceTemplates).map(([n,r])=>({name:n,uriTemplate:r.resourceTemplate.uriTemplate.toString(),...r.metadata}))})),this.server.setRequestHandler(kc,async(e,n)=>{let r=new URL(e.params.uri),o=this._registeredResources[r.toString()];if(o){if(!o.enabled)throw new te(se.InvalidParams,`Resource ${r} disabled`);return o.readCallback(r,n)}for(let i of Object.values(this._registeredResourceTemplates)){let s=i.resourceTemplate.uriTemplate.match(r.toString());if(s)return i.readCallback(r,s,n)}throw new te(se.InvalidParams,`Resource ${r} not found`)}),this._resourceHandlersInitialized=!0)}setPromptRequestHandlers(){this._promptHandlersInitialized||(this.server.assertCanSetRequestHandler(Fr(Tc)),this.server.assertCanSetRequestHandler(Fr(Ec)),this.server.registerCapabilities({prompts:{listChanged:!0}}),this.server.setRequestHandler(Tc,()=>({prompts:Object.entries(this._registeredPrompts).filter(([,e])=>e.enabled).map(([e,n])=>({name:e,title:n.title,description:n.description,arguments:n.argsSchema?WL(n.argsSchema):void 0}))})),this.server.setRequestHandler(Ec,async(e,n)=>{let r=this._registeredPrompts[e.params.name];if(!r)throw new te(se.InvalidParams,`Prompt ${e.params.name} not found`);if(!r.enabled)throw new te(se.InvalidParams,`Prompt ${e.params.name} disabled`);if(r.argsSchema){let o=ii(r.argsSchema),i=await oc(o,e.params.arguments);if(!i.success){let c="error"in i?i.error:"Unknown error",l=ic(c);throw new te(se.InvalidParams,`Invalid arguments for prompt ${e.params.name}: ${l}`)}let s=i.data,a=r.callback;return await Promise.resolve(a(s,n))}else{let o=r.callback;return await Promise.resolve(o(n))}}),this._promptHandlersInitialized=!0)}resource(e,n,...r){let o;typeof r[0]=="object"&&(o=r.shift());let i=r[0];if(typeof n=="string"){if(this._registeredResources[n])throw new Error(`Resource ${n} is already registered`);let s=this._createRegisteredResource(e,void 0,n,o,i);return this.setResourceRequestHandlers(),this.sendResourceListChanged(),s}else{if(this._registeredResourceTemplates[e])throw new Error(`Resource template ${e} is already registered`);let s=this._createRegisteredResourceTemplate(e,void 0,n,o,i);return this.setResourceRequestHandlers(),this.sendResourceListChanged(),s}}registerResource(e,n,r,o){if(typeof n=="string"){if(this._registeredResources[n])throw new Error(`Resource ${n} is already registered`);let i=this._createRegisteredResource(e,r.title,n,r,o);return this.setResourceRequestHandlers(),this.sendResourceListChanged(),i}else{if(this._registeredResourceTemplates[e])throw new Error(`Resource template ${e} is already registered`);let i=this._createRegisteredResourceTemplate(e,r.title,n,r,o);return this.setResourceRequestHandlers(),this.sendResourceListChanged(),i}}_createRegisteredResource(e,n,r,o,i){let s={name:e,title:n,metadata:o,readCallback:i,enabled:!0,disable:()=>s.update({enabled:!1}),enable:()=>s.update({enabled:!0}),remove:()=>s.update({uri:null}),update:a=>{typeof a.uri<"u"&&a.uri!==r&&(delete this._registeredResources[r],a.uri&&(this._registeredResources[a.uri]=s)),typeof a.name<"u"&&(s.name=a.name),typeof a.title<"u"&&(s.title=a.title),typeof a.metadata<"u"&&(s.metadata=a.metadata),typeof a.callback<"u"&&(s.readCallback=a.callback),typeof a.enabled<"u"&&(s.enabled=a.enabled),this.sendResourceListChanged()}};return this._registeredResources[r]=s,s}_createRegisteredResourceTemplate(e,n,r,o,i){let s={resourceTemplate:r,title:n,metadata:o,readCallback:i,enabled:!0,disable:()=>s.update({enabled:!1}),enable:()=>s.update({enabled:!0}),remove:()=>s.update({name:null}),update:l=>{typeof l.name<"u"&&l.name!==e&&(delete this._registeredResourceTemplates[e],l.name&&(this._registeredResourceTemplates[l.name]=s)),typeof l.title<"u"&&(s.title=l.title),typeof l.template<"u"&&(s.resourceTemplate=l.template),typeof l.metadata<"u"&&(s.metadata=l.metadata),typeof l.callback<"u"&&(s.readCallback=l.callback),typeof l.enabled<"u"&&(s.enabled=l.enabled),this.sendResourceListChanged()}};this._registeredResourceTemplates[e]=s;let a=r.uriTemplate.variableNames;return Array.isArray(a)&&a.some(l=>!!r.completeCallback(l))&&this.setCompletionRequestHandler(),s}_createRegisteredPrompt(e,n,r,o,i){let s={title:n,description:r,argsSchema:o===void 0?void 0:wo(o),callback:i,enabled:!0,disable:()=>s.update({enabled:!1}),enable:()=>s.update({enabled:!0}),remove:()=>s.update({name:null}),update:a=>{typeof a.name<"u"&&a.name!==e&&(delete this._registeredPrompts[e],a.name&&(this._registeredPrompts[a.name]=s)),typeof a.title<"u"&&(s.title=a.title),typeof a.description<"u"&&(s.description=a.description),typeof a.argsSchema<"u"&&(s.argsSchema=wo(a.argsSchema)),typeof a.callback<"u"&&(s.callback=a.callback),typeof a.enabled<"u"&&(s.enabled=a.enabled),this.sendPromptListChanged()}};return this._registeredPrompts[e]=s,o&&Object.values(o).some(c=>{var p;let l=c instanceof on?(p=c._def)==null?void 0:p.innerType:c;return Km(l)})&&this.setCompletionRequestHandler(),s}_createRegisteredTool(e,n,r,o,i,s,a,c,l){Jm(e);let p={title:n,description:r,inputSchema:c0(o),outputSchema:c0(i),annotations:s,execution:a,_meta:c,handler:l,enabled:!0,disable:()=>p.update({enabled:!1}),enable:()=>p.update({enabled:!0}),remove:()=>p.update({name:null}),update:d=>{typeof d.name<"u"&&d.name!==e&&(typeof d.name=="string"&&Jm(d.name),delete this._registeredTools[e],d.name&&(this._registeredTools[d.name]=p)),typeof d.title<"u"&&(p.title=d.title),typeof d.description<"u"&&(p.description=d.description),typeof d.paramsSchema<"u"&&(p.inputSchema=wo(d.paramsSchema)),typeof d.outputSchema<"u"&&(p.outputSchema=wo(d.outputSchema)),typeof d.callback<"u"&&(p.handler=d.callback),typeof d.annotations<"u"&&(p.annotations=d.annotations),typeof d._meta<"u"&&(p._meta=d._meta),typeof d.enabled<"u"&&(p.enabled=d.enabled),this.sendToolListChanged()}};return this._registeredTools[e]=p,this.setToolRequestHandlers(),this.sendToolListChanged(),p}tool(e,...n){if(this._registeredTools[e])throw new Error(`Tool ${e} is already registered`);let r,o,i,s;if(typeof n[0]=="string"&&(r=n.shift()),n.length>1){let c=n[0];if(Ym(c))o=n.shift(),n.length>1&&typeof n[0]=="object"&&n[0]!==null&&!Ym(n[0])&&(s=n.shift());else if(typeof c=="object"&&c!==null){if(Object.values(c).some(l=>typeof l=="object"&&l!==null))throw new Error(`Tool ${e} expected a Zod schema or ToolAnnotations, but received an unrecognized object`);s=n.shift()}}let a=n[0];return this._createRegisteredTool(e,void 0,r,o,i,s,{taskSupport:"forbidden"},void 0,a)}registerTool(e,n,r){if(this._registeredTools[e])throw new Error(`Tool ${e} is already registered`);let{title:o,description:i,inputSchema:s,outputSchema:a,annotations:c,_meta:l}=n;return this._createRegisteredTool(e,o,i,s,a,c,{taskSupport:"forbidden"},l,r)}prompt(e,...n){if(this._registeredPrompts[e])throw new Error(`Prompt ${e} is already registered`);let r;typeof n[0]=="string"&&(r=n.shift());let o;n.length>1&&(o=n.shift());let i=n[0],s=this._createRegisteredPrompt(e,void 0,r,o,i);return this.setPromptRequestHandlers(),this.sendPromptListChanged(),s}registerPrompt(e,n,r){if(this._registeredPrompts[e])throw new Error(`Prompt ${e} is already registered`);let{title:o,description:i,argsSchema:s}=n,a=this._createRegisteredPrompt(e,o,i,s,r);return this.setPromptRequestHandlers(),this.sendPromptListChanged(),a}isConnected(){return this.server.transport!==void 0}async sendLoggingMessage(e,n){return this.server.sendLoggingMessage(e,n)}sendResourceListChanged(){this.isConnected()&&this.server.sendResourceListChanged()}sendToolListChanged(){this.isConnected()&&this.server.sendToolListChanged()}sendPromptListChanged(){this.isConnected()&&this.server.sendPromptListChanged()}};var GL={type:"object",properties:{}};function u0(t){return t!==null&&typeof t=="object"&&"parse"in t&&typeof t.parse=="function"&&"safeParse"in t&&typeof t.safeParse=="function"}function p0(t){return"_def"in t||"_zod"in t||u0(t)}function Ym(t){return typeof t!="object"||t===null||p0(t)?!1:Object.keys(t).length===0?!0:Object.values(t).some(u0)}function c0(t){if(t){if(Ym(t))return wo(t);if(!p0(t))throw new Error("inputSchema must be a Zod schema or raw shape, received an unrecognized object");return t}}function WL(t){let e=Ar(t);return e?Object.entries(e).map(([n,r])=>{let o=Zx(r),i=Bx(r);return{name:n,description:o,required:!i}}):[]}function Fr(t){let e=Ar(t),n=e==null?void 0:e.method;if(!n)throw new Error("Schema is missing a method literal");let r=sc(n);if(typeof r=="string")return r;throw new Error("Schema method literal must be a string")}function l0(t){return{completion:{values:t.slice(0,100),total:t.length,hasMore:t.length>100}}}var ra={completion:{values:[],hasMore:!1}};var Xm=Ee(require("node:process"),1);var bl=class{append(e){this._buffer=this._buffer?Buffer.concat([this._buffer,e]):e}readMessage(){if(!this._buffer)return null;let e=this._buffer.indexOf(`
|
|
53
|
+
`);if(e===-1)return null;let n=this._buffer.toString("utf8",0,e).replace(/\r$/,"");return this._buffer=this._buffer.subarray(e+1),KL(n)}clear(){this._buffer=void 0}};function KL(t){return _v.parse(JSON.parse(t))}function d0(t){return JSON.stringify(t)+`
|
|
54
|
+
`}var _l=class{constructor(e=Xm.default.stdin,n=Xm.default.stdout){this._stdin=e,this._stdout=n,this._readBuffer=new bl,this._started=!1,this._ondata=r=>{this._readBuffer.append(r),this.processReadBuffer()},this._onerror=r=>{var o;(o=this.onerror)==null||o.call(this,r)}}async start(){if(this._started)throw new Error("StdioServerTransport already started! If using Server class, note that connect() calls start() automatically.");this._started=!0,this._stdin.on("data",this._ondata),this._stdin.on("error",this._onerror)}processReadBuffer(){var e,n;for(;;)try{let r=this._readBuffer.readMessage();if(r===null)break;(e=this.onmessage)==null||e.call(this,r)}catch(r){(n=this.onerror)==null||n.call(this,r)}}async close(){var n;this._stdin.off("data",this._ondata),this._stdin.off("error",this._onerror),this._stdin.listenerCount("data")===0&&this._stdin.pause(),this._readBuffer.clear(),(n=this.onclose)==null||n.call(this)}send(e){return new Promise(n=>{let r=d0(e);this._stdout.write(r)?n():this._stdout.once("drain",n)})}};var ht=class{register(e){e.tool(this.name,this.description,this.schema.shape,this.execute.bind(this))}normalizeFileId(e){return e&&e.replace(/^file\//,"")}};function oa(t,e){return function(){return t.apply(e,arguments)}}var{toString:JL}=Object.prototype,{getPrototypeOf:Ai}=Object,{iterator:sa,toStringTag:h0}=Symbol,Sl=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),ia=(t,e)=>{let n=t,r=[];for(;n!=null&&n!==Object.prototype;){if(r.indexOf(n)!==-1)return!1;if(r.push(n),Sl(n,e))return!0;n=Ai(n)}return!1},YL=(t,e)=>t!=null&&ia(t,e)?t[e]:void 0,eh=(t=>e=>{let n=JL.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Zn=t=>(t=t.toLowerCase(),e=>eh(e)===t),kl=t=>e=>typeof e===t,{isArray:No}=Array,Ii=kl("undefined");function Ci(t){return t!==null&&!Ii(t)&&t.constructor!==null&&!Ii(t.constructor)&&dn(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}var g0=Zn("ArrayBuffer");function XL(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&g0(t.buffer),e}var QL=kl("string"),dn=kl("function"),y0=kl("number"),Pi=t=>t!==null&&typeof t=="object",eD=t=>t===!0||t===!1,wl=t=>{if(!Pi(t))return!1;let e=Ai(t);return(e===null||e===Object.prototype||Ai(e)===null)&&!ia(t,h0)&&!ia(t,sa)},tD=t=>{if(!Pi(t)||Ci(t))return!1;try{return Object.keys(t).length===0&&Object.getPrototypeOf(t)===Object.prototype}catch{return!1}},nD=Zn("Date"),rD=Zn("File"),oD=t=>!!(t&&typeof t.uri<"u"),iD=t=>t&&typeof t.getParts<"u",sD=Zn("Blob"),aD=Zn("FileList"),cD=t=>Pi(t)&&dn(t.pipe);function lD(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}var f0=lD(),m0=typeof f0.FormData<"u"?f0.FormData:void 0,uD=t=>{if(!t)return!1;if(m0&&t instanceof m0)return!0;let e=Ai(t);if(!e||e===Object.prototype||!dn(t.append))return!1;let n=eh(t);return n==="formdata"||n==="object"&&dn(t.toString)&&t.toString()==="[object FormData]"},pD=Zn("URLSearchParams"),[dD,fD,mD,hD]=["ReadableStream","Request","Response","Headers"].map(Zn),gD=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function aa(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t>"u")return;let r,o;if(typeof t!="object"&&(t=[t]),No(t))for(r=0,o=t.length;r<o;r++)e.call(null,t[r],r,t);else{if(Ci(t))return;let i=n?Object.getOwnPropertyNames(t):Object.keys(t),s=i.length,a;for(r=0;r<s;r++)a=i[r],e.call(null,t[a],a,t)}}function x0(t,e){if(Ci(t))return null;e=e.toLowerCase();let n=Object.keys(t),r=n.length,o;for(;r-- >0;)if(o=n[r],e===o.toLowerCase())return o;return null}var zo=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,v0=t=>!Ii(t)&&t!==zo;function Qm(...t){let{caseless:e,skipUndefined:n}=v0(this)&&this||{},r={},o=(i,s)=>{if(s==="__proto__"||s==="constructor"||s==="prototype")return;let a=e&&typeof s=="string"&&x0(r,s)||s,c=Sl(r,a)?r[a]:void 0;wl(c)&&wl(i)?r[a]=Qm(c,i):wl(i)?r[a]=Qm({},i):No(i)?r[a]=i.slice():(!n||!Ii(i))&&(r[a]=i)};for(let i=0,s=t.length;i<s;i++){let a=t[i];if(!a||Ci(a)||(aa(a,o),typeof a!="object"||No(a)))continue;let c=Object.getOwnPropertySymbols(a);for(let l=0;l<c.length;l++){let p=c[l];RD.call(a,p)&&o(a[p],p)}}return r}var yD=(t,e,n,{allOwnKeys:r}={})=>(aa(e,(o,i)=>{n&&dn(o)?Object.defineProperty(t,i,{__proto__:null,value:oa(o,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(t,i,{__proto__:null,value:o,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),t),xD=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),vD=(t,e,n,r)=>{t.prototype=Object.create(e.prototype,r),Object.defineProperty(t.prototype,"constructor",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(t,"super",{__proto__:null,value:e.prototype}),n&&Object.assign(t.prototype,n)},bD=(t,e,n,r)=>{let o,i,s,a={};if(e=e||{},t==null)return e;do{for(o=Object.getOwnPropertyNames(t),i=o.length;i-- >0;)s=o[i],(!r||r(s,t,e))&&!a[s]&&(e[s]=t[s],a[s]=!0);t=n!==!1&&Ai(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},_D=(t,e,n)=>{t=String(t),(n===void 0||n>t.length)&&(n=t.length),n-=e.length;let r=t.indexOf(e,n);return r!==-1&&r===n},wD=t=>{if(!t)return null;if(No(t))return t;let e=t.length;if(!y0(e))return null;let n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},SD=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&Ai(Uint8Array)),kD=(t,e)=>{let r=(t&&t[sa]).call(t),o;for(;(o=r.next())&&!o.done;){let i=o.value;e.call(t,i[0],i[1])}},TD=(t,e)=>{let n,r=[];for(;(n=t.exec(e))!==null;)r.push(n);return r},ED=Zn("HTMLFormElement"),$D=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),{propertyIsEnumerable:RD}=Object.prototype,AD=Zn("RegExp"),b0=(t,e)=>{let n=Object.getOwnPropertyDescriptors(t),r={};aa(n,(o,i)=>{let s;(s=e(o,i,t))!==!1&&(r[i]=s||o)}),Object.defineProperties(t,r)},ID=t=>{b0(t,(e,n)=>{if(dn(t)&&["arguments","caller","callee"].includes(n))return!1;let r=t[n];if(dn(r)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},CD=(t,e)=>{let n={},r=o=>{o.forEach(i=>{n[i]=!0})};return No(t)?r(t):r(String(t).split(e)),n},PD=()=>{},OD=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e;function zD(t){return!!(t&&dn(t.append)&&t[h0]==="FormData"&&t[sa])}var ND=t=>{let e=new WeakSet,n=r=>{if(Pi(r)){if(e.has(r))return;if(Ci(r))return r;if(!("toJSON"in r)){e.add(r);let o=No(r)?[]:{};return aa(r,(i,s)=>{let a=n(i);!Ii(a)&&(o[s]=a)}),e.delete(r),o}}return r};return n(t)},jD=Zn("AsyncFunction"),LD=t=>t&&(Pi(t)||dn(t))&&dn(t.then)&&dn(t.catch),_0=((t,e)=>t?setImmediate:e?((n,r)=>(zo.addEventListener("message",({source:o,data:i})=>{o===zo&&i===n&&r.length&&r.shift()()},!1),o=>{r.push(o),zo.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",dn(zo.postMessage)),DD=typeof queueMicrotask<"u"?queueMicrotask.bind(zo):typeof process<"u"&&process.nextTick||_0,w0=t=>t!=null&&dn(t[sa]),MD=t=>t!=null&&ia(t,sa)&&w0(t),_={isArray:No,isArrayBuffer:g0,isBuffer:Ci,isFormData:uD,isArrayBufferView:XL,isString:QL,isNumber:y0,isBoolean:eD,isObject:Pi,isPlainObject:wl,isEmptyObject:tD,isReadableStream:dD,isRequest:fD,isResponse:mD,isHeaders:hD,isUndefined:Ii,isDate:nD,isFile:rD,isReactNativeBlob:oD,isReactNative:iD,isBlob:sD,isRegExp:AD,isFunction:dn,isStream:cD,isURLSearchParams:pD,isTypedArray:SD,isFileList:aD,forEach:aa,merge:Qm,extend:yD,trim:gD,stripBOM:xD,inherits:vD,toFlatObject:bD,kindOf:eh,kindOfTest:Zn,endsWith:_D,toArray:wD,forEachEntry:kD,matchAll:TD,isHTMLForm:ED,hasOwnProperty:Sl,hasOwnProp:Sl,hasOwnInPrototypeChain:ia,getSafeProp:YL,reduceDescriptors:b0,freezeMethods:ID,toObjectSet:CD,toCamelCase:$D,noop:PD,toFiniteNumber:OD,findKey:x0,global:zo,isContextDefined:v0,isSpecCompliantForm:zD,toJSONObject:ND,isAsyncFn:jD,isThenable:LD,setImmediate:_0,asap:DD,isIterable:w0,isSafeIterable:MD};var FD=_.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),S0=t=>{let e={},n,r,o;return t&&t.split(`
|
|
55
|
+
`).forEach(function(s){o=s.indexOf(":"),n=s.substring(0,o).trim().toLowerCase(),r=s.substring(o+1).trim(),!(!n||e[n]&&FD[n])&&(n==="set-cookie"?e[n]?e[n].push(r):e[n]=[r]:e[n]=e[n]?e[n]+", "+r:r)}),e};function UD(t){let e=0,n=t.length;for(;e<n;){let r=t.charCodeAt(e);if(r!==9&&r!==32)break;e+=1}for(;n>e;){let r=t.charCodeAt(n-1);if(r!==9&&r!==32)break;n-=1}return e===0&&n===t.length?t:t.slice(e,n)}var qD=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),ZD=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function th(t,e){return _.isArray(t)?t.map(n=>th(n,e)):UD(String(t).replace(e,""))}var k0=t=>th(t,qD),BD=t=>th(t,ZD);function Oi(t){let e=Object.create(null);return _.forEach(t.toJSON(),(n,r)=>{e[r]=BD(n)}),e}var T0=Symbol("internals");function ca(t){return t&&String(t).trim().toLowerCase()}function Tl(t){return t===!1||t==null?t:_.isArray(t)?t.map(Tl):k0(String(t))}function HD(t){let e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g,r;for(;r=n.exec(t);)e[r[1]]=r[2];return e}var VD=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function nh(t,e,n,r,o){if(_.isFunction(r))return r.call(this,e,n);if(o&&(e=n),!!_.isString(e)){if(_.isString(r))return e.indexOf(r)!==-1;if(_.isRegExp(r))return r.test(e)}}function GD(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,r)=>n.toUpperCase()+r)}function WD(t,e){let n=_.toCamelCase(" "+e);["get","set","has"].forEach(r=>{Object.defineProperty(t,r+n,{__proto__:null,value:function(o,i,s){return this[r].call(this,e,o,i,s)},configurable:!0})})}var zi=class{constructor(e){e&&this.set(e)}set(e,n,r){let o=this;function i(a,c,l){let p=ca(c);if(!p)return;let d=_.findKey(o,p);(!d||o[d]===void 0||l===!0||l===void 0&&o[d]!==!1)&&(o[d||c]=Tl(a))}let s=(a,c)=>_.forEach(a,(l,p)=>i(l,p,c));if(_.isPlainObject(e)||e instanceof this.constructor)s(e,n);else if(_.isString(e)&&(e=e.trim())&&!VD(e))s(S0(e),n);else if(_.isObject(e)&&_.isSafeIterable(e)){let a=Object.create(null),c,l;for(let p of e){if(!_.isArray(p))throw new TypeError("Object iterator must return a key-value pair");l=p[0],_.hasOwnProp(a,l)?(c=a[l],a[l]=_.isArray(c)?[...c,p[1]]:[c,p[1]]):a[l]=p[1]}s(a,n)}else e!=null&&i(n,e,r);return this}get(e,n){if(e=ca(e),e){let r=_.findKey(this,e);if(r){let o=this[r];if(!n)return o;if(n===!0)return HD(o);if(_.isFunction(n))return n.call(this,o,r);if(_.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,n){if(e=ca(e),e){let r=_.findKey(this,e);return!!(r&&this[r]!==void 0&&(!n||nh(this,this[r],r,n)))}return!1}delete(e,n){let r=this,o=!1;function i(s){if(s=ca(s),s){let a=_.findKey(r,s);a&&(!n||nh(r,r[a],a,n))&&(delete r[a],o=!0)}}return _.isArray(e)?e.forEach(i):i(e),o}clear(e){let n=Object.keys(this),r=n.length,o=!1;for(;r--;){let i=n[r];(!e||nh(this,this[i],i,e,!0))&&(delete this[i],o=!0)}return o}normalize(e){let n=this,r={};return _.forEach(this,(o,i)=>{let s=_.findKey(r,i);if(s){n[s]=Tl(o),delete n[i];return}let a=e?GD(i):String(i).trim();a!==i&&delete n[i],n[a]=Tl(o),r[a]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){let n=Object.create(null);return _.forEach(this,(r,o)=>{r!=null&&r!==!1&&(n[o]=e&&_.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,n])=>e+": "+n).join(`
|
|
56
|
+
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...n){let r=new this(e);return n.forEach(o=>r.set(o)),r}static accessor(e){let r=(this[T0]=this[T0]={accessors:{}}).accessors,o=this.prototype;function i(s){let a=ca(s);r[a]||(WD(o,s),r[a]=!0)}return _.isArray(e)?e.forEach(i):i(e),this}};zi.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);_.reduceDescriptors(zi.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(r){this[n]=r}}});_.freezeMethods(zi);var rt=zi;var KD="[REDACTED ****]";function JD(t){if(_.hasOwnProp(t,"toJSON"))return!0;let e=Object.getPrototypeOf(t);for(;e&&e!==Object.prototype;){if(_.hasOwnProp(e,"toJSON"))return!0;e=Object.getPrototypeOf(e)}return!1}function YD(t,e){let n=new Set(e.map(i=>String(i).toLowerCase())),r=[],o=i=>{if(i===null||typeof i!="object"||_.isBuffer(i))return i;if(r.indexOf(i)!==-1)return;i instanceof rt&&(i=i.toJSON()),r.push(i);let s;if(_.isArray(i))s=[],i.forEach((a,c)=>{let l=o(a);_.isUndefined(l)||(s[c]=l)});else{if(!_.isPlainObject(i)&&JD(i))return r.pop(),i;s=Object.create(null);for(let[a,c]of Object.entries(i)){let l=n.has(a.toLowerCase())?KD:o(c);_.isUndefined(l)||(s[a]=l)}}return r.pop(),s};return o(t)}var Ut=class t extends Error{static from(e,n,r,o,i,s){let a=new t(e.message,n||e.code,r,o,i);return Object.defineProperty(a,"cause",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),a.name=e.name,e.status!=null&&a.status==null&&(a.status=e.status),s&&Object.assign(a,s),a}constructor(e,n,r,o,i){super(e),Object.defineProperty(this,"message",{__proto__:null,value:e,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,n&&(this.code=n),r&&(this.config=r),o&&(this.request=o),i&&(this.response=i,this.status=i.status)}toJSON(){let e=this.config,n=e&&_.hasOwnProp(e,"redact")?e.redact:void 0,r=_.isArray(n)&&n.length>0?YD(e,n):_.toJSONObject(e);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:r,code:this.code,status:this.status}}};Ut.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";Ut.ERR_BAD_OPTION="ERR_BAD_OPTION";Ut.ECONNABORTED="ECONNABORTED";Ut.ETIMEDOUT="ETIMEDOUT";Ut.ECONNREFUSED="ECONNREFUSED";Ut.ERR_NETWORK="ERR_NETWORK";Ut.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";Ut.ERR_DEPRECATED="ERR_DEPRECATED";Ut.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";Ut.ERR_BAD_REQUEST="ERR_BAD_REQUEST";Ut.ERR_CANCELED="ERR_CANCELED";Ut.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";Ut.ERR_INVALID_URL="ERR_INVALID_URL";Ut.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";var P=Ut;var Ik=Ee(Ak(),1),jl=Ik.default;var kh=100;function Sh(t){return _.isPlainObject(t)||_.isArray(t)}function Ck(t){return _.endsWith(t,"[]")?t.slice(0,-2):t}function wh(t,e,n){return t?t.concat(e).map(function(o,i){return o=Ck(o),!n&&i?"["+o+"]":o}).join(n?".":""):e}function j2(t){return _.isArray(t)&&!t.some(Sh)}var L2=_.toFlatObject(_,{},null,function(e){return/^is[A-Z]/.test(e)});function D2(t,e,n){if(!_.isObject(t))throw new TypeError("target must be an object");e=e||new(jl||FormData),n=_.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(b,w){return!_.isUndefined(w[b])});let r=n.metaTokens,o=n.visitor||y,i=n.dots,s=n.indexes,a=n.Blob||typeof Blob<"u"&&Blob,c=n.maxDepth===void 0?kh:n.maxDepth,l=a&&_.isSpecCompliantForm(e),p=[];if(!_.isFunction(o))throw new TypeError("visitor must be a function");function d(m){if(m===null)return"";if(_.isDate(m))return m.toISOString();if(_.isBoolean(m))return m.toString();if(!l&&_.isBlob(m))throw new P("Blob is not supported. Use a Buffer instead.");if(_.isArrayBuffer(m)||_.isTypedArray(m)){if(l&&typeof a=="function")return new a([m]);if(typeof Buffer<"u")return Buffer.from(m);throw new P("Blob is not supported. Use a Buffer instead.",P.ERR_NOT_SUPPORT)}return m}function f(m){if(m>c)throw new P("Object is too deeply nested ("+m+" levels). Max depth: "+c,P.ERR_FORM_DATA_DEPTH_EXCEEDED)}function h(m,b){if(c===1/0)return JSON.stringify(m);let w=[];return JSON.stringify(m,function(E,F){if(!_.isObject(F))return F;for(;w.length&&w[w.length-1]!==this;)w.pop();return w.push(F),f(b+w.length-1),F})}function y(m,b,w){let k=m;if(_.isReactNative(e)&&_.isReactNativeBlob(m))return e.append(wh(w,b,i),d(m)),!1;if(m&&!w&&typeof m=="object"){if(_.endsWith(b,"{}"))b=r?b:b.slice(0,-2),m=h(m,1);else if(_.isArray(m)&&j2(m)||(_.isFileList(m)||_.endsWith(b,"[]"))&&(k=_.toArray(m)))return b=Ck(b),k.forEach(function(F,j){!(_.isUndefined(F)||F===null)&&e.append(s===!0?wh([b],j,i):s===null?b:b+"[]",d(F))}),!1}return Sh(m)?!0:(e.append(wh(w,b,i),d(m)),!1)}let v=Object.assign(L2,{defaultVisitor:y,convertValue:d,isVisitable:Sh});function x(m,b,w=0){if(!_.isUndefined(m)){if(f(w),p.indexOf(m)!==-1)throw new Error("Circular reference detected in "+b.join("."));p.push(m),_.forEach(m,function(E,F){(!(_.isUndefined(E)||E===null)&&o.call(e,E,_.isString(F)?F.trim():F,b,v))===!0&&x(E,b?b.concat(F):[F],w+1)}),p.pop()}}if(!_.isObject(t))throw new TypeError("data must be an object");return x(t),e}var qr=D2;function Pk(t){let e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(t).replace(/[!'()~]|%20/g,function(r){return e[r]})}function Ok(t,e){this._pairs=[],t&&qr(t,this,e)}var zk=Ok.prototype;zk.append=function(e,n){this._pairs.push([e,n])};zk.toString=function(e){let n=e?r=>e.call(this,r,Pk):Pk;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};var Nk=Ok;function M2(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Lo(t,e,n){if(!e)return t;t=t||"";let r=_.isFunction(n)?{serialize:n}:n,o=_.getSafeProp(r,"encode")||M2,i=_.getSafeProp(r,"serialize"),s;if(i?s=i(e,r):s=_.isURLSearchParams(e)?e.toString():new Nk(e,r).toString(o),s){let a=t.indexOf("#");a!==-1&&(t=t.slice(0,a)),t+=(t.indexOf("?")===-1?"?":"&")+s}return t}var Th=class{constructor(){this.handlers=[]}use(e,n,r){return this.handlers.push({fulfilled:e,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){_.forEach(this.handlers,function(r){r!==null&&e(r)})}},Eh=Th;var Zr={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0};var Mk=Ee(require("crypto"),1);var jk=Ee(require("url"),1),Lk=jk.default.URLSearchParams;var $h="abcdefghijklmnopqrstuvwxyz",Dk="0123456789",Fk={DIGIT:Dk,ALPHA:$h,ALPHA_DIGIT:$h+$h.toUpperCase()+Dk},F2=(t=16,e=Fk.ALPHA_DIGIT)=>{let n="",{length:r}=e,o=new Uint32Array(t);Mk.default.randomFillSync(o);for(let i=0;i<t;i++)n+=e[o[i]%r];return n},Uk={isNode:!0,classes:{URLSearchParams:Lk,FormData:jl,Blob:typeof Blob<"u"&&Blob||null},ALPHABET:Fk,generateString:F2,protocols:["http","https","file","data"]};var Ih={};za(Ih,{hasBrowserEnv:()=>Ah,hasStandardBrowserEnv:()=>U2,hasStandardBrowserWebWorkerEnv:()=>q2,navigator:()=>Rh,origin:()=>Z2});var Ah=typeof window<"u"&&typeof document<"u",Rh=typeof navigator=="object"&&navigator||void 0,U2=Ah&&(!Rh||["ReactNative","NativeScript","NS"].indexOf(Rh.product)<0),q2=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Z2=Ah&&window.location.href||"http://localhost";var Be={...Ih,...Uk};function Ch(t,e){return qr(t,new Be.classes.URLSearchParams,{visitor:function(n,r,o,i){return Be.isNode&&_.isBuffer(n)?(this.append(r,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)},...e})}var qk=kh;function Zk(t){if(t>qk)throw new P("FormData field is too deeply nested ("+t+" levels). Max depth: "+qk,P.ERR_FORM_DATA_DEPTH_EXCEEDED)}function B2(t){let e=[],n=/\w+|\[(\w*)]/g,r;for(;(r=n.exec(t))!==null;)Zk(e.length),e.push(r[0]==="[]"?"":r[1]||r[0]);return e}function H2(t){let e={},n=Object.keys(t),r,o=n.length,i;for(r=0;r<o;r++)i=n[r],e[i]=t[i];return e}function V2(t){function e(n,r,o,i){Zk(i);let s=n[i++];if(s==="__proto__")return!0;let a=Number.isFinite(+s),c=i>=n.length;return s=!s&&_.isArray(o)?o.length:s,c?(_.hasOwnProp(o,s)?o[s]=_.isArray(o[s])?o[s].concat(r):[o[s],r]:o[s]=r,!a):((!_.hasOwnProp(o,s)||!_.isObject(o[s]))&&(o[s]=[]),e(n,r,o[s],i)&&_.isArray(o[s])&&(o[s]=H2(o[s])),!a)}if(_.isFormData(t)&&_.isFunction(t.entries)){let n={};return _.forEachEntry(t,(r,o)=>{e(B2(r),o,n,0)}),n}return null}var Ll=V2;var Mi=(t,e)=>t!=null&&_.hasOwnProp(t,e)?t[e]:void 0;function G2(t,e,n){if(_.isString(t))try{return(e||JSON.parse)(t),_.trim(t)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(t)}var Ph={transitional:Zr,adapter:["xhr","http","fetch"],transformRequest:[function(e,n){let r=n.getContentType()||"",o=r.indexOf("application/json")>-1,i=_.isObject(e);if(i&&_.isHTMLForm(e)&&(e=new FormData(e)),_.isFormData(e))return o?JSON.stringify(Ll(e)):e;if(_.isArrayBuffer(e)||_.isBuffer(e)||_.isStream(e)||_.isFile(e)||_.isBlob(e)||_.isReadableStream(e))return e;if(_.isArrayBufferView(e))return e.buffer;if(_.isURLSearchParams(e))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let a;if(i){let c=Mi(this,"formSerializer");if(r.indexOf("application/x-www-form-urlencoded")>-1)return Ch(e,c).toString();if((a=_.isFileList(e))||r.indexOf("multipart/form-data")>-1){let l=Mi(this,"env"),p=l&&l.FormData;return qr(a?{"files[]":e}:e,p&&new p,c)}}return i||o?(n.setContentType("application/json",!1),G2(e)):e}],transformResponse:[function(e){let n=Mi(this,"transitional")||Ph.transitional,r=n&&n.forcedJSONParsing,o=Mi(this,"responseType"),i=o==="json";if(_.isResponse(e)||_.isReadableStream(e))return e;if(e&&_.isString(e)&&(r&&!o||i)){let a=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(e,Mi(this,"parseReviver"))}catch(c){if(a)throw c.name==="SyntaxError"?P.from(c,P.ERR_BAD_RESPONSE,this,null,Mi(this,"response")):c}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Be.classes.FormData,Blob:Be.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};_.forEach(["delete","get","head","post","put","patch","query"],t=>{Ph.headers[t]={}});var Fi=Ph;function fa(t,e){let n=this||Fi,r=e||n,o=rt.from(r.headers),i=r.data;return _.forEach(t,function(a){i=a.call(n,i,o.normalize(),e?e.status:void 0)}),o.normalize(),i}function ma(t){return!!(t&&t.__CANCEL__)}var Oh=class extends P{constructor(e,n,r){super(e??"canceled",P.ERR_CANCELED,n,r),this.name="CanceledError",this.__CANCEL__=!0}},vn=Oh;function nr(t,e,n){let r=n.config.validateStatus;!n.status||!r||r(n.status)?t(n):e(new P("Request failed with status code "+n.status,n.status>=400&&n.status<500?P.ERR_BAD_REQUEST:P.ERR_BAD_RESPONSE,n.config,n.request,n))}function zh(t){return typeof t!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function Nh(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}var W2=/^https?:(?!\/\/)/i,K2=/[\t\n\r]/g;function J2(t){let e=0;for(;e<t.length&&t.charCodeAt(e)<=32;)e++;return t.slice(e)}function Y2(t){return J2(t).replace(K2,"")}function Bk(t,e){if(typeof t=="string"&&W2.test(Y2(t)))throw new P('Invalid URL: missing "//" after protocol',P.ERR_INVALID_URL,e)}function Do(t,e,n,r){Bk(e,r);let o=!zh(e);return t&&(o||n===!1)?(Bk(t,r),Nh(t,e)):e}var X2={ftp:21,gopher:70,http:80,https:443,ws:80,wss:443};function Q2(t){try{return new URL(t)}catch{return null}}function Hk(t){var e=(typeof t=="string"?Q2(t):t)||{},n=e.protocol,r=e.host,o=e.port;if(typeof r!="string"||!r||typeof n!="string"||(n=n.split(":",1)[0],r=r.replace(/:\d*$/,""),o=parseInt(o)||X2[n]||0,!eF(r,o)))return"";var i=jh(n+"_proxy")||jh("all_proxy");return i&&i.indexOf("://")===-1&&(i=n+"://"+i),i}function eF(t,e){var n=jh("no_proxy").toLowerCase();return n?n==="*"?!1:n.split(/[,\s]/).every(function(r){if(!r)return!0;var o=r.match(/^(.+):(\d+)$/),i=o?o[1]:r,s=o?parseInt(o[2]):0;return s&&s!==e?!0:/^[.*]/.test(i)?(i.charAt(0)==="*"&&(i=i.slice(1)),!t.endsWith(i)):t!==i}):!0}function jh(t){return process.env[t.toLowerCase()]||process.env[t.toUpperCase()]||""}var gg=Ee(dT(),1),yg=Ee(require("http"),1),xg=Ee(require("https"),1),BT=Ee(require("http2"),1),HT=Ee(require("util"),1),hg=require("path"),VT=Ee(vT(),1),bn=Ee(require("zlib"),1);var xr="1.18.1";function Sa(t){let e=/^([-+\w]{1,25}):(?:\/\/)?/.exec(t);return e&&e[1]||""}var nU=/^([^,;]+\/[^,;]+)?((?:;[^,;=]+=[^,;]+)*)(;base64)?,([\s\S]*)$/;function sg(t,e,n){let r=n&&n.Blob||Be.classes.Blob,o=Sa(t);if(e===void 0&&r&&(e=!0),o==="data"){t=o.length?t.slice(o.length+1):t;let i=nU.exec(t);if(!i)throw new P("Invalid URL",P.ERR_INVALID_URL);let s=i[1],a=i[2],c=i[3]?"base64":"utf8",l=i[4],p="";s?p=a?s+a:s:a&&(p="text/plain"+a);let d=c==="base64"?Buffer.from(l,"base64"):Buffer.from(decodeURIComponent(l),c);if(e){if(!r)throw new P("Blob is not supported",P.ERR_NOT_SUPPORT);return new r([d],{type:p})}return d}throw new P("Unsupported protocol "+o,P.ERR_NOT_SUPPORT)}var Pn=Ee(require("stream"),1);var bT=Ee(require("stream"),1);var ag=Symbol("internals"),cg=class extends bT.default.Transform{constructor(e){e=_.toFlatObject(e,{maxRate:0,chunkSize:64*1024,minChunkSize:100,timeWindow:500,ticksRate:2,samplesCount:15},null,(r,o)=>!_.isUndefined(o[r])),super({readableHighWaterMark:e.chunkSize});let n=this[ag]={timeWindow:e.timeWindow,chunkSize:e.chunkSize,maxRate:e.maxRate,minChunkSize:e.minChunkSize,bytesSeen:0,isCaptured:!1,notifiedBytesLoaded:0,ts:Date.now(),bytes:0,onReadCallback:null};this.on("newListener",r=>{r==="progress"&&(n.isCaptured||(n.isCaptured=!0))})}_read(e){let n=this[ag];return n.onReadCallback&&n.onReadCallback(),super._read(e)}_transform(e,n,r){let o=this[ag],i=o.maxRate,s=this.readableHighWaterMark,a=o.timeWindow,c=1e3/a,l=i/c,p=o.minChunkSize!==!1?Math.max(o.minChunkSize,l*.01):0,d=(h,y)=>{let v=Buffer.byteLength(h);o.bytesSeen+=v,o.bytes+=v,o.isCaptured&&this.emit("progress",o.bytesSeen),this.push(h)?process.nextTick(y):o.onReadCallback=()=>{o.onReadCallback=null,process.nextTick(y)}},f=(h,y)=>{let v=Buffer.byteLength(h),x=null,m=s,b,w=0;if(i){let k=Date.now();(!o.ts||(w=k-o.ts)>=a)&&(o.ts=k,b=l-o.bytes,o.bytes=b<0?-b:0,w=0),b=l-o.bytes}if(i){if(b<=0)return setTimeout(()=>{y(null,h)},a-w);b<m&&(m=b)}m&&v>m&&v-m>p&&(x=h.subarray(m),h=h.subarray(0,m)),d(h,x?()=>{process.nextTick(y,null,x)}:y)};f(e,function h(y,v){if(y)return r(y);v?f(v,h):r(null)})}},lg=cg;var GT=require("events");var wT=Ee(require("util"),1),ST=require("stream");var{asyncIterator:_T}=Symbol,rU=async function*(t){t.stream?yield*t.stream():t.arrayBuffer?yield await t.arrayBuffer():t[_T]?yield*t[_T]():yield t},Zl=rU;var oU=Be.ALPHABET.ALPHA_DIGIT+"-_",ka=typeof TextEncoder=="function"?new TextEncoder:new wT.default.TextEncoder,Bo=`\r
|
|
57
|
+
`,iU=ka.encode(Bo),sU=2,ug=class{constructor(e,n){let{escapeName:r}=this.constructor,o=_.isString(n),i=`Content-Disposition: form-data; name="${r(e)}"${!o&&n.name?`; filename="${r(n.name)}"`:""}${Bo}`;if(o)n=ka.encode(String(n).replace(/\r?\n|\r\n?/g,Bo));else{let s=String(n.type||"application/octet-stream").replace(/[\r\n]/g,"");i+=`Content-Type: ${s}${Bo}`}this.headers=ka.encode(i+Bo),this.contentLength=o?n.byteLength:n.size,this.size=this.headers.byteLength+this.contentLength+sU,this.name=e,this.value=n}async*encode(){yield this.headers;let{value:e}=this;_.isTypedArray(e)?yield e:yield*Zl(e),yield iU}static escapeName(e){return String(e).replace(/[\r\n"]/g,n=>({"\r":"%0D","\n":"%0A",'"':"%22"})[n])}},aU=(t,e,n)=>{let{tag:r="form-data-boundary",size:o=25,boundary:i=r+"-"+Be.generateString(o,oU)}=n||{};if(!_.isFormData(t))throw new TypeError("FormData instance required");if(i.length<1||i.length>70)throw new Error("boundary must be 1-70 characters long");let s=ka.encode("--"+i+Bo),a=ka.encode("--"+i+"--"+Bo),c=a.byteLength,l=Array.from(t.entries()).map(([d,f])=>{let h=new ug(d,f);return c+=h.size,h});c+=s.byteLength*l.length,c=_.toFiniteNumber(c);let p={"Content-Type":`multipart/form-data; boundary=${i}`};return Number.isFinite(c)&&(p["Content-Length"]=c),e&&e(p),ST.Readable.from((async function*(){for(let d of l)yield s,yield*d.encode();yield a})())},kT=aU;var TT=Ee(require("stream"),1),pg=class extends TT.default.Transform{__transform(e,n,r){this.push(e),r()}_transform(e,n,r){if(e.length!==0&&(this._transform=this.__transform,e[0]!==120)){let o=Buffer.alloc(2);o[0]=120,o[1]=156,this.push(o,n)}this.__transform(e,n,r)}},ET=pg;var $T=Ee(require("http2"),1),RT=Ee(require("util"),1),dg=class{constructor(){this.sessions=Object.create(null)}getSession(e,n){n=Object.assign({sessionTimeout:1e3},n);let r=this.sessions[e];if(r){let d=r.length;for(let f=0;f<d;f++){let[h,y]=r[f];if(!h.destroyed&&!h.closed&&RT.default.isDeepStrictEqual(y,n))return h}}let o=$T.default.connect(e,n),i,s,a=()=>{if(i)return;i=!0,s&&(clearTimeout(s),s=null);let d=r,f=d.length,h=f;for(;h--;)if(d[h][0]===o){f===1?delete this.sessions[e]:d.splice(h,1),o.closed||o.close();return}},c=o.request,{sessionTimeout:l}=n;if(l!=null){let d=0;o.request=function(){let f=c.apply(this,arguments);return d++,s&&(clearTimeout(s),s=null),f.once("close",()=>{--d||(s=setTimeout(()=>{s=null,a()},l))}),f}}o.once("close",a);let p=[o,n];return r?r.push(p):r=this.sessions[e]=[p],o}},AT=dg;var cU=(t,e)=>_.isAsyncFn(t)?function(...n){let r=n.pop();t.apply(this,n).then(o=>{try{e?r(null,...e(o)):r(null,o)}catch(i){r(i)}},r)}:t,IT=cU;var lU=new Set(["localhost","0.0.0.0"]),OT=t=>{let e=t.split(".");return e.length!==4||e[0]!=="127"?!1:e.every(n=>/^\d+$/.test(n)&&Number(n)>=0&&Number(n)<=255)},fg=t=>/^0{1,4}$/.test(t),uU=t=>{if(t==="::")return!0;let e=t.indexOf("::");if(e!==-1){if(e!==t.lastIndexOf("::"))return!1;let r=t.slice(0,e),o=t.slice(e+2),i=r?r.split(":"):[],s=o?o.split(":"):[];return i.length+s.length<8&&i.every(fg)&&s.every(fg)}let n=t.split(":");return n.length===8&&n.every(fg)},pU=t=>{if(t==="::1")return!0;let e=t.match(/^::ffff:(\d+\.\d+\.\d+\.\d+)$/i);if(e)return OT(e[1]);let n=t.match(/^::ffff:([0-9a-f]{1,4}):([0-9a-f]{1,4})$/i);if(n){let o=parseInt(n[1],16);return o>=32512&&o<=32767}let r=t.split(":");if(r.length===8){for(let o=0;o<7;o++)if(!/^0+$/.test(r[o]))return!1;return/^0*1$/.test(r[7])}return!1},CT=t=>t?lU.has(t)||OT(t)||uU(t)?!0:pU(t):!1,dU={http:80,https:443,ws:80,wss:443,ftp:21},fU=t=>{let e=t,n=0;if(e.charAt(0)==="["){let i=e.indexOf("]");if(i!==-1){let s=e.slice(1,i),a=e.slice(i+1);return a.charAt(0)===":"&&/^\d+$/.test(a.slice(1))&&(n=Number.parseInt(a.slice(1),10)),[s,n]}}let r=e.indexOf(":"),o=e.lastIndexOf(":");return r!==-1&&r===o&&/^\d+$/.test(e.slice(o+1))&&(n=Number.parseInt(e.slice(o+1),10),e=e.slice(0,o)),[e,n]},mU=/^(?:::|(?:0{1,4}:){1,4}:|(?:0{1,4}:){5})ffff:(\d+\.\d+\.\d+\.\d+)$/i,hU=/^(?:::|(?:0{1,4}:){1,4}:|(?:0{1,4}:){5})ffff:([0-9a-f]{1,4}):([0-9a-f]{1,4})$/i,gU=t=>{if(typeof t!="string"||t.indexOf(":")===-1)return t;let e=t.match(mU);if(e)return e[1];let n=t.match(hU);if(n){let r=parseInt(n[1],16),o=parseInt(n[2],16);return`${r>>8}.${r&255}.${o>>8}.${o&255}`}return t},PT=t=>t&&(t.charAt(0)==="["&&t.charAt(t.length-1)==="]"&&(t=t.slice(1,-1)),gU(t.replace(/\.+$/,"")));function mg(t){let e;try{e=new URL(t)}catch{return!1}let n=(process.env.no_proxy||process.env.NO_PROXY||"").toLowerCase();if(!n)return!1;if(n==="*")return!0;let r=Number.parseInt(e.port,10)||dU[e.protocol.split(":",1)[0]]||0,o=PT(e.hostname.toLowerCase());return n.split(/[\s,]+/).some(i=>{if(!i)return!1;let[s,a]=fU(i);return s=PT(s),!s||a&&a!==r?!1:(s.charAt(0)==="*"&&(s=s.slice(1)),s.charAt(0)==="."?o.endsWith(s):o===s||CT(o)&&CT(s))})}function yU(t,e){t=t||10;let n=new Array(t),r=new Array(t),o=0,i=0,s;return e=e!==void 0?e:1e3,function(c){let l=Date.now(),p=r[i];s||(s=l),n[o]=c,r[o]=l;let d=i,f=0;for(;d!==o;)f+=n[d++],d=d%t;if(o=(o+1)%t,o===i&&(i=(i+1)%t),l-s<e)return;let h=p&&l-p;return h?Math.round(f*1e3/h):void 0}}var zT=yU;function xU(t,e){let n=0,r=1e3/e,o,i,s=(l,p=Date.now())=>{n=p,o=null,i&&(clearTimeout(i),i=null),t(...l)};return[(...l)=>{let p=Date.now(),d=p-n;d>=r?s(l,p):(o=l,i||(i=setTimeout(()=>{i=null,s(o)},r-d)))},()=>o&&s(o)]}var NT=xU;var vr=(t,e,n=3)=>{let r=0,o=zT(50,250);return NT(i=>{if(!i||typeof i.loaded!="number")return;let s=i.loaded,a=i.lengthComputable?i.total:void 0,c=a!=null?Math.min(s,a):s,l=Math.max(0,c-r),p=o(l);r=Math.max(r,c);let d={loaded:c,total:a,progress:a?c/a:void 0,bytes:l,rate:p||void 0,estimated:p&&a?(a-c)/p:void 0,event:i,lengthComputable:a!=null,[e?"download":"upload"]:!0};t(d)},n)},Hi=(t,e)=>{let n=t!=null;return[r=>e[0]({lengthComputable:n,total:t,loaded:r}),e[1]]},Vi=t=>(...e)=>_.asap(()=>t(...e));var Bl=t=>t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102,vU=(t,e,n)=>e+2<n&&Bl(t.charCodeAt(e+1))&&Bl(t.charCodeAt(e+2));function Ta(t){if(!t||typeof t!="string"||!t.startsWith("data:"))return 0;let e=t.indexOf(",");if(e<0)return 0;let n=t.slice(5,e),r=t.slice(e+1);if(/;base64/i.test(n)){let s=r.length,a=r.length;for(let h=0;h<a;h++)if(r.charCodeAt(h)===37&&h+2<a){let y=r.charCodeAt(h+1),v=r.charCodeAt(h+2);Bl(y)&&Bl(v)&&(s-=2,h+=2)}let c=0,l=a-1,p=h=>h>=2&&r.charCodeAt(h-2)===37&&r.charCodeAt(h-1)===51&&(r.charCodeAt(h)===68||r.charCodeAt(h)===100);l>=0&&(r.charCodeAt(l)===61?(c++,l--):p(l)&&(c++,l-=3)),c===1&&l>=0&&(r.charCodeAt(l)===61||p(l))&&c++;let f=Math.floor(s/4)*3-(c||0);return f>0?f:0}let i=0;for(let s=0,a=r.length;s<a;s++){let c=r.charCodeAt(s);if(c===37&&vU(r,s,a))i+=1,s+=2;else if(c<128)i+=1;else if(c<2048)i+=2;else if(c>=55296&&c<=56319&&s+1<a){let l=r.charCodeAt(s+1);l>=56320&&l<=57343?(i+=4,s++):i+=3}else i+=3}return i}var jT={flush:bn.default.constants.Z_SYNC_FLUSH,finishFlush:bn.default.constants.Z_SYNC_FLUSH},bU={flush:bn.default.constants.BROTLI_OPERATION_FLUSH,finishFlush:bn.default.constants.BROTLI_OPERATION_FLUSH},_U={flush:bn.default.constants.ZSTD_e_flush,finishFlush:bn.default.constants.ZSTD_e_flush},WT=_.isFunction(bn.default.createBrotliDecompress),KT=_.isFunction(bn.default.createZstdDecompress),JT="gzip, compress, deflate"+(WT?", br":""),wU=JT+(KT?", zstd":""),{http:SU,https:kU}=VT.default,vg=/https:?/,TU=["content-type","content-length"];function EU(t,e,n){if(n!=="content-only"){t.set(e);return}Object.entries(e).forEach(([r,o])=>{TU.includes(r.toLowerCase())&&t.set(r,o)})}var LT=Symbol("axios.http.socketListener"),Hl=Symbol("axios.http.currentReq"),YT=Symbol("axios.http.installedTunnel"),$U=new Map,DT=new WeakMap,MT={22:21,24:5};function RU(t=process.versions&&process.versions.node){if(!t)return!1;let[e,n]=t.split(".").map(r=>Number(r));return!Number.isInteger(e)||!Number.isInteger(n)?!1:e>24?!0:MT[e]!=null&&n>=MT[e]}function AU(t,e=process.versions&&process.versions.node){if(!RU(e))return!1;let n=t&&t.options;return!!(n&&_.hasOwnProp(n,"proxyEnv")&&n.proxyEnv!=null)}function IU(t,e,n){return vg.test(t.protocol)?n||xg.default.globalAgent:e||yg.default.globalAgent}function CU(t,e){let n=t.protocol+"//"+t.hostname+":"+(t.port||"")+"#"+(t.auth||""),r=e?DT.get(e)||DT.set(e,new Map).get(e):$U,o=r.get(n);if(o)return o;let i=e&&e.options?{...e.options,...t}:t;if(o=new gg.default(i),e&&e.options){let s={...e.options},a=o.callback;o.callback=function(l,p){return a.call(this,l,{...s,...p})}}return o[YT]=!0,r.set(n,o),o}var FT=Be.protocols.map(t=>t+":"),UT=t=>{if(!_.isString(t))return t;try{return decodeURIComponent(t)}catch{return t}},qT=(t,[e,n])=>(t.on("end",n).on("error",n),e),PU=new AT;function OU(t,e,n){t.beforeRedirects.proxy&&t.beforeRedirects.proxy(t),t.beforeRedirects.auth&&t.beforeRedirects.auth(t),t.beforeRedirects.sensitiveHeaders&&t.beforeRedirects.sensitiveHeaders(t,n),t.beforeRedirects.config&&t.beforeRedirects.config(t,e,n)}function zU(t,e){t&&Object.keys(t).forEach(n=>{e.has(n.toLowerCase())&&delete t[n]})}function NU(t,e){if(!e)return!1;try{return new URL(e.url).origin===new URL(t.href).origin}catch{return!1}}function XT(t,e,n,r,o,i){let s=e,a=IU(t,i,o);if(!s&&s!==!1&&!AU(a)){let c=Hk(n);c&&(mg(n)||(s=new URL(c)))}if(r&&t.headers)for(let c of Object.keys(t.headers))c.toLowerCase()==="proxy-authorization"&&delete t.headers[c];if(r&&t.agent&&t.agent[YT]&&(t.agent=void 0),s){let c=s instanceof URL,l=y=>c||_.hasOwnProp(s,y)?s[y]:void 0,p=l("username"),d=l("password"),f=_.hasOwnProp(s,"auth")?s.auth:void 0;if(p&&(f=(p||"")+":"+(d||"")),f){let y=typeof f=="object",v=y&&_.hasOwnProp(f,"username")?f.username:void 0,x=y&&_.hasOwnProp(f,"password")?f.password:void 0;if(!!(v||x))f=(v||"")+":"+(x||"");else if(y)throw new P("Invalid proxy authorization",P.ERR_BAD_OPTION,{proxy:s})}if(vg.test(t.protocol)){if(!(o instanceof gg.default)){let y=l("hostname")||l("host"),v=l("port"),x=l("protocol"),m=x?x.includes(":")?x:`${x}:`:"http:",b=y&&y.includes(":")&&!y.startsWith("[")?`[${y}]`:y,w=new URL(`${m}//${b}${v?":"+v:""}`),k={protocol:w.protocol,hostname:w.hostname.replace(/^\[|\]$/g,""),port:w.port,auth:f&&typeof f=="string"?f:void 0};w.protocol==="https:"&&(k.ALPNProtocols=["http/1.1"]);let E=CU(k,o);t.agent=E,t.agents&&(t.agents.https=E)}}else{if(f){let m=Buffer.from(f,"utf8").toString("base64");t.headers["Proxy-Authorization"]="Basic "+m}let y=!1;for(let m of Object.keys(t.headers))if(m.toLowerCase()==="host"){y=!0;break}y||(t.headers.host=t.hostname+(t.port?":"+t.port:""));let v=l("hostname")||l("host");t.hostname=v,t.host=v,t.port=l("port"),t.path=n;let x=l("protocol");x&&(t.protocol=x.includes(":")?x:`${x}:`)}}t.beforeRedirects.proxy=function(l){XT(l,e,l.href,!0,o,i)}}var jU=typeof process<"u"&&_.kindOf(process)==="process",LU=t=>new Promise((e,n)=>{let r,o,i=(c,l)=>{o||(o=!0,r&&r(c,l))},s=c=>{i(c),e(c)},a=c=>{i(c,!0),n(c)};t(s,a,c=>r=c).catch(a)}),DU=({address:t,family:e})=>{if(!_.isString(t))throw TypeError("address must be a string");return{address:t,family:e||(t.indexOf(".")<0?6:4)}},ZT=(t,e)=>DU(_.isObject(t)?t:{address:t,family:e}),MU={request(t,e){let n=t.protocol+"//"+t.hostname+":"+(t.port||(t.protocol==="https:"?443:80)),{http2Options:r,headers:o}=t,i=PU.getSession(n,r),{HTTP2_HEADER_SCHEME:s,HTTP2_HEADER_METHOD:a,HTTP2_HEADER_PATH:c,HTTP2_HEADER_STATUS:l}=BT.default.constants,p={[s]:t.protocol.replace(":",""),[a]:t.method,[c]:t.path};_.forEach(o,(f,h)=>{h.charAt(0)!==":"&&(p[h]=f)});let d=i.request(p);return d.once("response",f=>{let h=d;f=Object.assign({},f);let y=f[l];delete f[l],h.headers=f,h.statusCode=+y,e(h)}),d}},QT=jU&&function(e){return LU(async function(r,o,i){let s=W=>_.getSafeProp(e,W),a=s("transitional")||Zr,c=s("data"),l=s("lookup"),p=s("family"),d=s("httpVersion");d===void 0&&(d=1);let f=s("http2Options"),h=s("httpAgent"),y=s("httpsAgent"),v=s("proxy"),x=s("responseType"),m=s("responseEncoding"),b=s("socketPath"),w=s("method").toUpperCase(),k=s("maxRedirects"),E=s("maxBodyLength"),F=s("maxContentLength"),j=s("decompress"),me,de=!1,oe,Re;if(d=+d,Number.isNaN(d))throw TypeError(`Invalid protocol version: '${e.httpVersion}' is not a number`);if(d!==1&&d!==2)throw TypeError(`Unsupported protocol version '${d}'`);let bt=d===2;if(l){let W=IT(l,G=>_.isArray(G)?G:[G]);l=(G,be,Ge)=>{W(G,be,(ye,We,St)=>{if(ye)return Ge(ye);let Qe=_.isArray(We)?We.map(On=>ZT(On)):[ZT(We,St)];be.all?Ge(ye,Qe):Ge(ye,Qe[0].address,Qe[0].family)})}}let Ve=new GT.EventEmitter;function ae(W){try{Ve.emit("abort",!W||W.type?new vn(null,e,oe):W)}catch{}}function yt(){Re&&(clearTimeout(Re),Re=null)}function V(){let W=s("timeout"),G=W?"timeout of "+W+"ms exceeded":"timeout exceeded",be=s("timeoutErrorMessage");return be&&(G=be),new P(G,a.clarifyTimeoutError?P.ETIMEDOUT:P.ECONNABORTED,e,oe)}Ve.once("abort",o);let At=()=>{yt(),e.cancelToken&&e.cancelToken.unsubscribe(ae),e.signal&&e.signal.removeEventListener("abort",ae),Ve.removeAllListeners()};(e.cancelToken||e.signal)&&(e.cancelToken&&e.cancelToken.subscribe(ae),e.signal&&(e.signal.aborted?ae():e.signal.addEventListener("abort",ae))),i((W,G)=>{if(me=!0,yt(),G){de=!0,At();return}let{data:be}=W;if(be instanceof Pn.default.Readable||be instanceof Pn.default.Duplex){let Ge=Pn.default.finished(be,()=>{Ge(),At()})}else At()});let Zt=Do(s("baseURL"),s("url"),s("allowAbsoluteUrls"),e),Vn=b?"http://localhost":Be.hasBrowserEnv?Be.origin:void 0,Pe=new URL(Zt,Vn),B=Pe.protocol||FT[0];if(B==="data:"){if(F>-1){let G=String(s("url")||Zt||"");if(Ta(G)>F)return o(new P("maxContentLength size of "+F+" exceeded",P.ERR_BAD_RESPONSE,e))}let W;if(w!=="GET")return nr(r,o,{status:405,statusText:"method not allowed",headers:{},config:e});try{W=sg(s("url"),x==="blob",{Blob:e.env&&e.env.Blob})}catch(G){throw P.from(G,P.ERR_BAD_REQUEST,e)}return x==="text"?(W=W.toString(m),(!m||m==="utf8")&&(W=_.stripBOM(W))):x==="stream"&&(W=Pn.default.Readable.from(W)),nr(r,o,{data:W,status:200,statusText:"OK",headers:new rt,config:e})}if(FT.indexOf(B)===-1)return o(new P("Unsupported protocol "+B,P.ERR_BAD_REQUEST,e));let qe=rt.from(e.headers).normalize();qe.set("User-Agent","axios/"+xr,!1);let{onUploadProgress:De,onDownloadProgress:Yt}=e,it=e.maxRate,ge,ke;if(_.isSpecCompliantForm(c)){let W=qe.getContentType(/boundary=([-_\w\d]{10,70})/i);c=kT(c,G=>{qe.set(G)},{tag:`axios-${xr}-boundary`,boundary:W&&W[1]||void 0})}else if(_.isFormData(c)&&_.isFunction(c.getHeaders)&&c.getHeaders!==Object.prototype.getHeaders){if(EU(qe,c.getHeaders(),s("formDataHeaderPolicy")),!qe.hasContentLength())try{let W=await HT.default.promisify(c.getLength).call(c);Number.isFinite(W)&&W>=0&&qe.setContentLength(W)}catch{}}else if(_.isBlob(c)||_.isFile(c))c.size&&qe.setContentType(c.type||"application/octet-stream"),qe.setContentLength(c.size||0),c=Pn.default.Readable.from(Zl(c));else if(c&&!_.isStream(c)){if(!Buffer.isBuffer(c))if(_.isArrayBuffer(c))c=Buffer.from(new Uint8Array(c));else if(_.isString(c))c=Buffer.from(c,"utf-8");else return o(new P("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",P.ERR_BAD_REQUEST,e));if(qe.setContentLength(c.length,!1),E>-1&&c.length>E)return o(new P("Request body larger than maxBodyLength limit",P.ERR_BAD_REQUEST,e))}let ut=_.toFiniteNumber(qe.getContentLength());_.isArray(it)?(ge=it[0],ke=it[1]):ge=ke=it,c&&(De||ge)&&(_.isStream(c)||(c=Pn.default.Readable.from(c,{objectMode:!1})),c=Pn.default.pipeline([c,new lg({maxRate:_.toFiniteNumber(ge)})],_.noop),De&&c.on("progress",qT(c,Hi(ut,vr(Vi(De),!1,3)))));let Oe,Tt=s("auth");if(Tt){let W=_.getSafeProp(Tt,"username")||"",G=_.getSafeProp(Tt,"password")||"";Oe=W+":"+G}if(!Oe&&(Pe.username||Pe.password)){let W=UT(Pe.username),G=UT(Pe.password);Oe=W+":"+G}Oe&&qe.delete("authorization");let Et;try{Et=Lo(Pe.pathname+Pe.search,s("params"),s("paramsSerializer")).replace(/^\?/,"")}catch(W){return o(P.from(W,P.ERR_BAD_REQUEST,e,null,null,{url:s("url"),exists:!0}))}qe.set("Accept-Encoding",_.hasOwnProp(a,"advertiseZstdAcceptEncoding")&&a.advertiseZstdAcceptEncoding===!0?wU:JT,!1);let Te=Object.assign(Object.create(null),{path:Et,method:w,headers:Oi(qe),agents:{http:h,https:y},auth:Oe,protocol:B,family:p,beforeRedirect:OU,beforeRedirects:Object.create(null),http2Options:f});if(!_.isUndefined(l)&&(Te.lookup=l),b){if(typeof b!="string")return o(new P("socketPath must be a string",P.ERR_BAD_OPTION_VALUE,e));let W=s("allowedSocketPaths");if(W!=null){let G=Array.isArray(W)?W:[W],be=(0,hg.resolve)(b);if(!G.some(ye=>typeof ye=="string"&&(0,hg.resolve)(ye)===be))return o(new P(`socketPath "${b}" is not permitted by allowedSocketPaths`,P.ERR_BAD_OPTION_VALUE,e))}Te.socketPath=b}else Te.hostname=Pe.hostname.startsWith("[")?Pe.hostname.slice(1,-1):Pe.hostname,Te.port=Pe.port,XT(Te,v,B+"//"+Pe.hostname+(Pe.port?":"+Pe.port:"")+Te.path,!1,y,h);let Bt,_n=!1,zt=!1,pe=vg.test(Te.protocol);if(Te.agent==null&&(Te.agent=pe?y:h),bt)Bt=MU;else{let W=s("transport");if(W)Bt=W;else if(k===0)Bt=pe?xg.default:yg.default,_n=!0;else{zt=!0,Te.sensitiveHeaders=[],k&&(Te.maxRedirects=k);let G=s("beforeRedirect");if(G&&(Te.beforeRedirects.config=G),Oe){let Ge=Pe.origin,ye=Oe;Te.beforeRedirects.auth=function(St){try{new URL(St.href).origin===Ge&&(St.auth=ye)}catch{}}}let be=s("sensitiveHeaders");if(be!=null){if(!_.isArray(be))return o(new P("sensitiveHeaders must be an array of strings",P.ERR_BAD_OPTION_VALUE,e));let Ge=new Set;for(let ye of be){if(!_.isString(ye))return o(new P("sensitiveHeaders must be an array of strings",P.ERR_BAD_OPTION_VALUE,e));Ge.add(ye.toLowerCase())}Ge.size&&(Te.sensitiveHeaders=Array.from(Ge),Te.beforeRedirects.sensitiveHeaders=function(We,St){NU(We,St)||zU(We.headers,Ge)})}Bt=pe?kU:SU}}E>-1?Te.maxBodyLength=E:Te.maxBodyLength=1/0,Te.insecureHTTPParser=!!s("insecureHTTPParser"),oe=Bt.request(Te,function(G){if(yt(),oe.destroyed)return;let be=[G],Ge=_.toFiniteNumber(G.headers["content-length"]);if(Yt||ke){let Qe=new lg({maxRate:_.toFiniteNumber(ke)});Yt&&Qe.on("progress",qT(Qe,Hi(Ge,vr(Vi(Yt),!0,3)))),be.push(Qe)}let ye=G,We=G.req||oe;if(j!==!1&&G.headers["content-encoding"])switch((w==="HEAD"||G.statusCode===204)&&delete G.headers["content-encoding"],(G.headers["content-encoding"]||"").toLowerCase()){case"gzip":case"x-gzip":case"compress":case"x-compress":be.push(bn.default.createUnzip(jT)),delete G.headers["content-encoding"];break;case"deflate":be.push(new ET),be.push(bn.default.createUnzip(jT)),delete G.headers["content-encoding"];break;case"br":WT&&(be.push(bn.default.createBrotliDecompress(bU)),delete G.headers["content-encoding"]);break;case"zstd":KT&&(be.push(bn.default.createZstdDecompress(_U)),delete G.headers["content-encoding"]);break}ye=be.length>1?Pn.default.pipeline(be,_.noop):be[0];let St={status:G.statusCode,statusText:G.statusMessage,headers:new rt(G.headers),config:e,request:We};if(x==="stream"){if(F>-1){let Qe=F,On=ye;async function*cr(){let u=0;for await(let S of On){if(u+=S.length,u>Qe)throw new P("maxContentLength size of "+Qe+" exceeded",P.ERR_BAD_RESPONSE,e,We);yield S}}ye=Pn.default.Readable.from(cr(),{objectMode:!1})}St.data=ye,nr(r,o,St)}else{let Qe=[],On=0;ye.on("data",function(u){Qe.push(u),On+=u.length,F>-1&&On>F&&(de=!0,ye.destroy(),ae(new P("maxContentLength size of "+F+" exceeded",P.ERR_BAD_RESPONSE,e,We)))}),ye.on("aborted",function(){if(de)return;let u=new P("stream has been aborted",P.ERR_BAD_RESPONSE,e,We,St);ye.destroy(u),o(u)}),ye.on("error",function(u){de||o(P.from(u,null,e,We,St))}),ye.on("end",function(){try{let u=Qe.length===1?Qe[0]:Buffer.concat(Qe);x!=="arraybuffer"&&(u=u.toString(m),(!m||m==="utf8")&&(u=_.stripBOM(u))),St.data=u}catch(u){return o(P.from(u,null,e,St.request,St))}nr(r,o,St)})}Ve.once("abort",Qe=>{ye.destroyed||(ye.emit("error",Qe),ye.destroy())})}),Ve.once("abort",W=>{oe.close?oe.close():oe.destroy(W)}),oe.on("error",function(G){o(P.from(G,null,e,oe))});let Ye=new Set;if(oe.on("socket",function(G){typeof G.setKeepAlive=="function"&&G.setKeepAlive(!0,1e3*60),G[LT]||(G.on("error",function(Ge){let ye=G[Hl];ye&&!ye.destroyed&&ye.destroy(Ge)}),G[LT]=!0),G[Hl]=oe,Ye.add(G)}),oe.once("close",function(){yt();for(let G of Ye)G[Hl]===oe&&(G[Hl]=null);Ye.clear()}),s("timeout")){let W=parseInt(s("timeout"),10);if(Number.isNaN(W)){ae(new P("error trying to parse `config.timeout` to int",P.ERR_BAD_OPTION_VALUE,e,oe));return}let G=function(){me||ae(V())};_n&&W>0&&(Re=setTimeout(G,W)),oe.setTimeout(W,G)}else oe.setTimeout(0);if(_.isStream(c)){let W=!1,G=!1;c.on("end",()=>{W=!0}),c.once("error",Ge=>{G=!0,oe.destroy(Ge)}),c.on("close",()=>{!W&&!G&&ae(new vn("Request stream has been aborted",e,oe))});let be=c;if(E>-1&&!zt){let Ge=E,ye=0;be=Pn.default.pipeline([c,new Pn.default.Transform({transform(We,St,Qe){if(ye+=We.length,ye>Ge)return Qe(new P("Request body larger than maxBodyLength limit",P.ERR_BAD_REQUEST,e,oe));Qe(null,We)}})],_.noop),be.on("error",We=>{oe.destroyed||oe.destroy(We)})}be.pipe(oe)}else c&&oe.write(c),oe.end()})};var eE=Be.hasStandardBrowserEnv?((t,e)=>n=>(n=new URL(n,Be.origin),t.protocol===n.protocol&&t.host===n.host&&(e||t.port===n.port)))(new URL(Be.origin),Be.navigator&&/(msie|trident)/i.test(Be.navigator.userAgent)):()=>!0;var tE=Be.hasStandardBrowserEnv?{write(t,e,n,r,o,i,s){if(typeof document>"u")return;let a=[`${t}=${encodeURIComponent(e)}`];_.isNumber(n)&&a.push(`expires=${new Date(n).toUTCString()}`),_.isString(r)&&a.push(`path=${r}`),_.isString(o)&&a.push(`domain=${o}`),i===!0&&a.push("secure"),_.isString(s)&&a.push(`SameSite=${s}`),document.cookie=a.join("; ")},read(t){if(typeof document>"u")return null;let e=document.cookie.split(";");for(let n=0;n<e.length;n++){let r=e[n].replace(/^\s+/,""),o=r.indexOf("=");if(o!==-1&&r.slice(0,o)===t)try{return decodeURIComponent(r.slice(o+1))}catch{return r.slice(o+1)}}return null},remove(t){this.write(t,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};var nE=t=>t instanceof rt?{...t}:t;function Hn(t,e){t=t||{},e=e||{};let n=Object.create(null);Object.defineProperty(n,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function r(p,d,f,h){return _.isPlainObject(p)&&_.isPlainObject(d)?_.merge.call({caseless:h},p,d):_.isPlainObject(d)?_.merge({},d):_.isArray(d)?d.slice():d}function o(p,d,f,h){if(_.isUndefined(d)){if(!_.isUndefined(p))return r(void 0,p,f,h)}else return r(p,d,f,h)}function i(p,d){if(!_.isUndefined(d))return r(void 0,d)}function s(p,d){if(_.isUndefined(d)){if(!_.isUndefined(p))return r(void 0,p)}else return r(void 0,d)}function a(p){let d=_.hasOwnProp(e,"transitional")?e.transitional:void 0;if(!_.isUndefined(d))if(_.isPlainObject(d)){if(_.hasOwnProp(d,p))return d[p]}else return;let f=_.hasOwnProp(t,"transitional")?t.transitional:void 0;if(_.isPlainObject(f)&&_.hasOwnProp(f,p))return f[p]}function c(p,d,f){if(_.hasOwnProp(e,f))return r(p,d);if(_.hasOwnProp(t,f))return r(void 0,p)}let l={url:i,method:i,data:i,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,allowedSocketPaths:s,responseEncoding:s,validateStatus:c,headers:(p,d,f)=>o(nE(p),nE(d),f,!0)};return _.forEach(Object.keys({...t,...e}),function(d){if(d==="__proto__"||d==="constructor"||d==="prototype")return;let f=_.hasOwnProp(l,d)?l[d]:o,h=_.hasOwnProp(t,d)?t[d]:void 0,y=_.hasOwnProp(e,d)?e[d]:void 0,v=f(h,y,d);_.isUndefined(v)&&f!==c||(n[d]=v)}),_.hasOwnProp(e,"validateStatus")&&_.isUndefined(e.validateStatus)&&a("validateStatusUndefinedResolves")===!1&&(_.hasOwnProp(t,"validateStatus")?n.validateStatus=r(void 0,t.validateStatus):delete n.validateStatus),n}var FU=["content-type","content-length"];function UU(t,e,n){if(n!=="content-only"){t.set(e);return}Object.entries(e||{}).forEach(([r,o])=>{FU.includes(r.toLowerCase())&&t.set(r,o)})}var qU=t=>encodeURIComponent(t).replace(/%([0-9A-F]{2})/gi,(e,n)=>String.fromCharCode(parseInt(n,16)));function ZU(t){let e=Hn({},t),n=f=>_.hasOwnProp(e,f)?e[f]:void 0,r=n("data"),o=n("withXSRFToken"),i=n("xsrfHeaderName"),s=n("xsrfCookieName"),a=n("headers"),c=n("auth"),l=n("baseURL"),p=n("allowAbsoluteUrls"),d=n("url");if(e.headers=a=rt.from(a),e.url=Lo(Do(l,d,p,e),n("params"),n("paramsSerializer")),c){let f=_.getSafeProp(c,"username")||"",h=_.getSafeProp(c,"password")||"";try{a.set("Authorization","Basic "+btoa(f+":"+(h?qU(h):"")))}catch(y){throw P.from(y,P.ERR_BAD_OPTION_VALUE,t)}}if(_.isFormData(r)&&(Be.hasStandardBrowserEnv||Be.hasStandardBrowserWebWorkerEnv||_.isReactNative(r)?a.setContentType(void 0):_.isFunction(r.getHeaders)&&UU(a,r.getHeaders(),n("formDataHeaderPolicy"))),Be.hasStandardBrowserEnv&&(_.isFunction(o)&&(o=o(e)),o===!0||o==null&&eE(e.url))){let h=i&&s&&tE.read(s);h&&a.set(i,h)}return e}var Vl=ZU;var BU=typeof XMLHttpRequest<"u",rE=BU&&function(t){return new Promise(function(n,r){let o=Vl(t),i=o.data,s=rt.from(o.headers).normalize(),{responseType:a,onUploadProgress:c,onDownloadProgress:l}=o,p,d,f,h,y;function v(){h&&h(),y&&y(),o.cancelToken&&o.cancelToken.unsubscribe(p),o.signal&&o.signal.removeEventListener("abort",p)}let x=new XMLHttpRequest;x.open(o.method.toUpperCase(),o.url,!0),x.timeout=o.timeout;function m(){if(!x)return;let w=rt.from("getAllResponseHeaders"in x&&x.getAllResponseHeaders()),E={data:!a||a==="text"||a==="json"?x.responseText:x.response,status:x.status,statusText:x.statusText,headers:w,config:t,request:x};nr(function(j){n(j),v()},function(j){r(j),v()},E),x=null}"onloadend"in x?x.onloadend=m:x.onreadystatechange=function(){!x||x.readyState!==4||x.status===0&&!(x.responseURL&&x.responseURL.startsWith("file:"))||setTimeout(m)},x.onabort=function(){x&&(r(new P("Request aborted",P.ECONNABORTED,t,x)),v(),x=null)},x.onerror=function(k){let E=k&&k.message?k.message:"Network Error",F=new P(E,P.ERR_NETWORK,t,x);F.event=k||null,r(F),v(),x=null},x.ontimeout=function(){let k=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded",E=o.transitional||Zr;o.timeoutErrorMessage&&(k=o.timeoutErrorMessage),r(new P(k,E.clarifyTimeoutError?P.ETIMEDOUT:P.ECONNABORTED,t,x)),v(),x=null},i===void 0&&s.setContentType(null),"setRequestHeader"in x&&_.forEach(Oi(s),function(k,E){x.setRequestHeader(E,k)}),_.isUndefined(o.withCredentials)||(x.withCredentials=!!o.withCredentials),a&&a!=="json"&&(x.responseType=o.responseType),l&&([f,y]=vr(l,!0),x.addEventListener("progress",f)),c&&x.upload&&([d,h]=vr(c),x.upload.addEventListener("progress",d),x.upload.addEventListener("loadend",h)),(o.cancelToken||o.signal)&&(p=w=>{x&&(r(!w||w.type?new vn(null,t,x):w),x.abort(),v(),x=null)},o.cancelToken&&o.cancelToken.subscribe(p),o.signal&&(o.signal.aborted?p():o.signal.addEventListener("abort",p)));let b=Sa(o.url);if(b&&!Be.protocols.includes(b)){r(new P("Unsupported protocol "+b+":",P.ERR_BAD_REQUEST,t)),v();return}x.send(i||null)})};var HU=(t,e)=>{if(t=t?t.filter(Boolean):[],!e&&!t.length)return;let n=new AbortController,r=!1,o=function(c){if(!r){r=!0,s();let l=c instanceof Error?c:this.reason;n.abort(l instanceof P?l:new vn(l instanceof Error?l.message:l))}},i=e&&setTimeout(()=>{i=null,o(new P(`timeout of ${e}ms exceeded`,P.ETIMEDOUT))},e),s=()=>{t&&(i&&clearTimeout(i),i=null,t.forEach(c=>{c.unsubscribe?c.unsubscribe(o):c.removeEventListener("abort",o)}),t=null)};t.forEach(c=>c.addEventListener("abort",o,{once:!0}));let{signal:a}=n;return a.unsubscribe=()=>_.asap(s),a},oE=HU;var VU=function*(t,e){let n=t.byteLength;if(!e||n<e){yield t;return}let r=0,o;for(;r<n;)o=r+e,yield t.slice(r,o),r=o},GU=async function*(t,e){for await(let n of WU(t))yield*VU(n,e)},WU=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}let e=t.getReader();try{for(;;){let{done:n,value:r}=await e.read();if(n)break;yield r}}finally{await e.cancel()}},bg=(t,e,n,r)=>{let o=GU(t,e),i=0,s,a=c=>{s||(s=!0,r&&r(c))};return new ReadableStream({async pull(c){try{let{done:l,value:p}=await o.next();if(l){a(),c.close();return}let d=p.byteLength;if(n){let f=i+=d;n(f)}c.enqueue(new Uint8Array(p))}catch(l){throw a(l),l}},cancel(c){return a(c),o.return()}},{highWaterMark:2})};var iE=64*1024,{isFunction:Gl}=_,KU=t=>encodeURIComponent(t).replace(/%([0-9A-F]{2})/gi,(e,n)=>String.fromCharCode(parseInt(n,16))),sE=t=>{if(!_.isString(t))return t;try{return decodeURIComponent(t)}catch{return t}},aE=(t,...e)=>{try{return!!t(...e)}catch{return!1}},JU=t=>{let e=t.indexOf("://"),n=t;return e!==-1&&(n=n.slice(e+3)),n.includes("@")||n.includes(":")},YU=t=>{let e=_.global!==void 0&&_.global!==null?_.global:globalThis,{ReadableStream:n,TextEncoder:r}=e;t=_.merge.call({skipUndefined:!0},{Request:e.Request,Response:e.Response},t);let{fetch:o,Request:i,Response:s}=t,a=o?Gl(o):typeof fetch=="function",c=Gl(i),l=Gl(s);if(!a)return!1;let p=a&&Gl(n),d=a&&(typeof r=="function"?(m=>b=>m.encode(b))(new r):async m=>new Uint8Array(await new i(m).arrayBuffer())),f=c&&p&&aE(()=>{let m=!1,b=new i(Be.origin,{body:new n,method:"POST",get duplex(){return m=!0,"half"}}),w=b.headers.has("Content-Type");return b.body!=null&&b.body.cancel(),m&&!w}),h=l&&p&&aE(()=>_.isReadableStream(new s("").body)),y={stream:h&&(m=>m.body)};a&&["text","arrayBuffer","blob","formData","stream"].forEach(m=>{!y[m]&&(y[m]=(b,w)=>{let k=b&&b[m];if(k)return k.call(b);throw new P(`Response type '${m}' is not supported`,P.ERR_NOT_SUPPORT,w)})});let v=async m=>{if(m==null)return 0;if(_.isBlob(m))return m.size;if(_.isSpecCompliantForm(m))return(await new i(Be.origin,{method:"POST",body:m}).arrayBuffer()).byteLength;if(_.isArrayBufferView(m)||_.isArrayBuffer(m))return m.byteLength;if(_.isURLSearchParams(m)&&(m=m+""),_.isString(m))return(await d(m)).byteLength},x=async(m,b)=>{let w=_.toFiniteNumber(m.getContentLength());return w??v(b)};return async m=>{let{url:b,method:w,data:k,signal:E,cancelToken:F,timeout:j,onDownloadProgress:me,onUploadProgress:de,responseType:oe,headers:Re,withCredentials:bt="same-origin",fetchOptions:Ve,maxContentLength:ae,maxBodyLength:yt}=Vl(m),V=_.isNumber(ae)&&ae>-1,At=_.isNumber(yt)&&yt>-1,Zt=ge=>_.hasOwnProp(m,ge)?m[ge]:void 0,Vn=o||fetch;oe=oe?(oe+"").toLowerCase():"text";let Pe=oE([E,F&&F.toAbortSignal()],j),B=null,qe=Pe&&Pe.unsubscribe&&(()=>{Pe.unsubscribe()}),De,Yt=null,it=()=>new P("Request body larger than maxBodyLength limit",P.ERR_BAD_REQUEST,m,B);try{let ge,ke=Zt("auth");if(ke){let pe=_.getSafeProp(ke,"username")||"",Ye=_.getSafeProp(ke,"password")||"";ge={username:pe,password:Ye}}if(JU(b)){let pe=new URL(b,Be.origin);if(!ge&&(pe.username||pe.password)){let Ye=sE(pe.username),W=sE(pe.password);ge={username:Ye,password:W}}(pe.username||pe.password)&&(pe.username="",pe.password="",b=pe.href)}if(ge&&(Re.delete("authorization"),Re.set("Authorization","Basic "+btoa(KU((ge.username||"")+":"+(ge.password||""))))),V&&typeof b=="string"&&b.startsWith("data:")&&Ta(b)>ae)throw new P("maxContentLength size of "+ae+" exceeded",P.ERR_BAD_RESPONSE,m,B);if(At&&w!=="get"&&w!=="head"){let pe=await v(k);if(typeof pe=="number"&&isFinite(pe)&&(De=pe,pe>yt))throw it()}let ut=At&&(_.isReadableStream(k)||_.isStream(k)),Oe=(pe,Ye,W)=>bg(pe,iE,G=>{if(At&&G>yt)throw Yt=it();Ye&&Ye(G)},W);if(f&&w!=="get"&&w!=="head"&&(de||ut)){if(De=De??await x(Re,k),De!==0||ut){let pe=new i(b,{method:"POST",body:k,duplex:"half"}),Ye;if(_.isFormData(k)&&(Ye=pe.headers.get("content-type"))&&Re.setContentType(Ye),pe.body){let[W,G]=de&&Hi(De,vr(Vi(de)))||[];k=Oe(pe.body,W,G)}}}else if(ut&&!c&&p&&w!=="get"&&w!=="head")k=Oe(k);else if(ut&&c&&!f&&w!=="get"&&w!=="head")throw new P("Stream request bodies are not supported by the current fetch implementation",P.ERR_NOT_SUPPORT,m,B);_.isString(bt)||(bt=bt?"include":"omit");let Tt=c&&"credentials"in i.prototype;if(_.isFormData(k)){let pe=Re.getContentType();pe&&/^multipart\/form-data/i.test(pe)&&!/boundary=/i.test(pe)&&Re.delete("content-type")}Re.set("User-Agent","axios/"+xr,!1);let Et={...Ve,signal:Pe,method:w.toUpperCase(),headers:Oi(Re.normalize()),body:k,duplex:"half",credentials:Tt?bt:void 0};B=c&&new i(b,Et);let Te=await(c?Vn(B,Ve):Vn(b,Et)),Bt=rt.from(Te.headers);if(V){let pe=_.toFiniteNumber(Bt.getContentLength());if(pe!=null&&pe>ae)throw new P("maxContentLength size of "+ae+" exceeded",P.ERR_BAD_RESPONSE,m,B)}let _n=h&&(oe==="stream"||oe==="response");if(h&&Te.body&&(me||V||_n&&qe)){let pe={};["status","statusText","headers"].forEach(ye=>{pe[ye]=Te[ye]});let Ye=_.toFiniteNumber(Bt.getContentLength()),[W,G]=me&&Hi(Ye,vr(Vi(me),!0))||[],be=0,Ge=ye=>{if(V&&(be=ye,be>ae))throw new P("maxContentLength size of "+ae+" exceeded",P.ERR_BAD_RESPONSE,m,B);W&&W(ye)};Te=new s(bg(Te.body,iE,Ge,()=>{G&&G(),qe&&qe()}),pe)}oe=oe||"text";let zt=await y[_.findKey(y,oe)||"text"](Te,m);if(V&&!h&&!_n){let pe;if(zt!=null&&(typeof zt.byteLength=="number"?pe=zt.byteLength:typeof zt.size=="number"?pe=zt.size:typeof zt=="string"&&(pe=typeof r=="function"?new r().encode(zt).byteLength:zt.length)),typeof pe=="number"&&pe>ae)throw new P("maxContentLength size of "+ae+" exceeded",P.ERR_BAD_RESPONSE,m,B)}return!_n&&qe&&qe(),await new Promise((pe,Ye)=>{nr(pe,Ye,{data:zt,headers:rt.from(Te.headers),status:Te.status,statusText:Te.statusText,config:m,request:B})})}catch(ge){if(qe&&qe(),Pe&&Pe.aborted&&Pe.reason instanceof P){let ke=Pe.reason;throw ke.config=m,B&&(ke.request=B),ge!==ke&&Object.defineProperty(ke,"cause",{__proto__:null,value:ge,writable:!0,enumerable:!1,configurable:!0}),ke}if(Yt)throw B&&!Yt.request&&(Yt.request=B),Yt;if(ge instanceof P)throw B&&!ge.request&&(ge.request=B),ge;if(ge&&ge.name==="TypeError"&&/Load failed|fetch/i.test(ge.message)){let ke=new P("Network Error",P.ERR_NETWORK,m,B,ge&&ge.response);throw Object.defineProperty(ke,"cause",{__proto__:null,value:ge.cause||ge,writable:!0,enumerable:!1,configurable:!0}),ke}throw P.from(ge,ge&&ge.code,m,B,ge&&ge.response)}}},XU=new Map,_g=t=>{let e=t&&t.env||{},{fetch:n,Request:r,Response:o}=e,i=[r,o,n],s=i.length,a=s,c,l,p=XU;for(;a--;)c=i[a],l=p.get(c),l===void 0&&p.set(c,l=a?new Map:YU(e)),p=l;return l},R8=_g();var wg={http:QT,xhr:rE,fetch:{get:_g}};_.forEach(wg,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{__proto__:null,value:e})}catch{}Object.defineProperty(t,"adapterName",{__proto__:null,value:e})}});var cE=t=>`- ${t}`,eq=t=>_.isFunction(t)||t===null||t===!1;function tq(t,e){t=_.isArray(t)?t:[t];let{length:n}=t,r,o,i={};for(let s=0;s<n;s++){r=t[s];let a;if(o=r,!eq(r)&&(o=wg[(a=String(r)).toLowerCase()],o===void 0))throw new P(`Unknown adapter '${a}'`);if(o&&(_.isFunction(o)||(o=o.get(e))))break;i[a||"#"+s]=o}if(!o){let s=Object.entries(i).map(([c,l])=>`adapter ${c} `+(l===!1?"is not supported by the environment":"is not available in the build")),a=n?s.length>1?`since :
|
|
58
|
+
`+s.map(cE).join(`
|
|
59
|
+
`):" "+cE(s[0]):"as no adapter specified";throw new P("There is no suitable adapter to dispatch the request "+a,P.ERR_NOT_SUPPORT)}return o}var Wl={getAdapter:tq,adapters:wg};function Sg(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new vn(null,t)}function Kl(t){return Sg(t),t.headers=rt.from(t.headers),t.data=fa.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),Wl.getAdapter(t.adapter||Fi.adapter,t)(t).then(function(r){Sg(t),t.response=r;try{r.data=fa.call(t,t.transformResponse,r)}finally{delete t.response}return r.headers=rt.from(r.headers),r},function(r){if(!ma(r)&&(Sg(t),r&&r.response)){t.response=r.response;try{r.response.data=fa.call(t,t.transformResponse,r.response)}finally{delete t.response}r.response.headers=rt.from(r.response.headers)}return Promise.reject(r)})}var Jl={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{Jl[t]=function(r){return typeof r===t||"a"+(e<1?"n ":" ")+t}});var lE={};Jl.transitional=function(e,n,r){function o(i,s){return"[Axios v"+xr+"] Transitional option '"+i+"'"+s+(r?". "+r:"")}return(i,s,a)=>{if(e===!1)throw new P(o(s," has been removed"+(n?" in "+n:"")),P.ERR_DEPRECATED);return n&&!lE[s]&&(lE[s]=!0,console.warn(o(s," has been deprecated since v"+n+" and will be removed in the near future"))),e?e(i,s,a):!0}};Jl.spelling=function(e){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${e}`),!0)};function nq(t,e,n){if(typeof t!="object"||t===null)throw new P("options must be an object",P.ERR_BAD_OPTION_VALUE);let r=Object.keys(t),o=r.length;for(;o-- >0;){let i=r[o],s=Object.prototype.hasOwnProperty.call(e,i)?e[i]:void 0;if(s){let a=t[i],c=a===void 0||s(a,i,t);if(c!==!0)throw new P("option "+i+" must be "+c,P.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new P("Unknown option "+i,P.ERR_BAD_OPTION)}}var Ea={assertOptions:nq,validators:Jl};var Kt=Ea.validators,Gi=class{constructor(e){this.defaults=e||{},this.interceptors={request:new Eh,response:new Eh}}async request(e,n){try{return await this._request(e,n)}catch(r){if(r instanceof Error){let o={};Error.captureStackTrace?Error.captureStackTrace(o):o=new Error;let i=(()=>{if(!o.stack)return"";let s=o.stack.indexOf(`
|
|
60
|
+
`);return s===-1?"":o.stack.slice(s+1)})();try{if(!r.stack)r.stack=i;else if(i){let s=i.indexOf(`
|
|
61
61
|
`),a=s===-1?-1:i.indexOf(`
|
|
62
|
-
`,s+1),c=a===-1?"":i.slice(a+1);String(
|
|
63
|
-
`+i)}}catch{}}throw
|
|
64
|
-
`).some(
|
|
62
|
+
`,s+1),c=a===-1?"":i.slice(a+1);String(r.stack).endsWith(c)||(r.stack+=`
|
|
63
|
+
`+i)}}catch{}}throw r}}_request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=Hn(this.defaults,n);let{transitional:r,paramsSerializer:o,headers:i}=n;r!==void 0&&Ea.assertOptions(r,{silentJSONParsing:Kt.transitional(Kt.boolean),forcedJSONParsing:Kt.transitional(Kt.boolean),clarifyTimeoutError:Kt.transitional(Kt.boolean),legacyInterceptorReqResOrdering:Kt.transitional(Kt.boolean),advertiseZstdAcceptEncoding:Kt.transitional(Kt.boolean),validateStatusUndefinedResolves:Kt.transitional(Kt.boolean)},!1),o!=null&&(_.isFunction(o)?n.paramsSerializer={serialize:o}:Ea.assertOptions(o,{encode:Kt.function,serialize:Kt.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Ea.assertOptions(n,{baseUrl:Kt.spelling("baseURL"),withXsrfToken:Kt.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let s=i&&_.merge(i.common,i[n.method]);i&&_.forEach(["delete","get","head","post","put","patch","query","common"],y=>{delete i[y]}),n.headers=rt.concat(s,i);let a=[],c=!0;this.interceptors.request.forEach(function(v){if(typeof v.runWhen=="function"&&v.runWhen(n)===!1)return;c=c&&v.synchronous;let x=n.transitional||Zr;x&&x.legacyInterceptorReqResOrdering?a.unshift(v.fulfilled,v.rejected):a.push(v.fulfilled,v.rejected)});let l=[];this.interceptors.response.forEach(function(v){l.push(v.fulfilled,v.rejected)});let p,d=0,f;if(!c){let y=[Kl.bind(this),void 0];for(y.unshift(...a),y.push(...l),f=y.length,p=Promise.resolve(n);d<f;)p=p.then(y[d++],y[d++]);return p}f=a.length;let h=n;for(;d<f;){let y=a[d++],v=a[d++];try{h=y(h)}catch(x){v.call(this,x);break}}try{p=Kl.call(this,h)}catch(y){return Promise.reject(y)}for(d=0,f=l.length;d<f;)p=p.then(l[d++],l[d++]);return p}getUri(e){e=Hn(this.defaults,e);let n=Do(e.baseURL,e.url,e.allowAbsoluteUrls,e);return Lo(n,e.params,e.paramsSerializer)}};_.forEach(["delete","get","head","options"],function(e){Gi.prototype[e]=function(n,r){return this.request(Hn(r||{},{method:e,url:n,data:r&&_.hasOwnProp(r,"data")?r.data:void 0}))}});_.forEach(["post","put","patch","query"],function(e){function n(r){return function(i,s,a){return this.request(Hn(a||{},{method:e,headers:r?{"Content-Type":"multipart/form-data"}:{},url:i,data:s}))}}Gi.prototype[e]=n(),e!=="query"&&(Gi.prototype[e+"Form"]=n(!0))});var $a=Gi;var kg=class t{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(i){n=i});let r=this;this.promise.then(o=>{if(!r._listeners)return;let i=r._listeners.length;for(;i-- >0;)r._listeners[i](o);r._listeners=null}),this.promise.then=o=>{let i,s=new Promise(a=>{r.subscribe(a),i=a}).then(o);return s.cancel=function(){r.unsubscribe(i)},s},e(function(i,s,a){r.reason||(r.reason=new vn(i,s,a),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;let n=this._listeners.indexOf(e);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){let e=new AbortController,n=r=>{e.abort(r)};return this.subscribe(n),e.signal.unsubscribe=()=>this.unsubscribe(n),e.signal}static source(){let e;return{token:new t(function(o){e=o}),cancel:e}}},uE=kg;function Tg(t){return function(n){return t.apply(null,n)}}function Eg(t){return _.isObject(t)&&t.isAxiosError===!0}var $g={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries($g).forEach(([t,e])=>{$g[e]=t});var pE=$g;function dE(t){let e=new $a(t),n=oa($a.prototype.request,e);return _.extend(n,$a.prototype,e,{allOwnKeys:!0}),_.extend(n,e,null,{allOwnKeys:!0}),n.create=function(o){return dE(Hn(t,o))},n}var kt=dE(Fi);kt.Axios=$a;kt.CanceledError=vn;kt.CancelToken=uE;kt.isCancel=ma;kt.VERSION=xr;kt.toFormData=qr;kt.AxiosError=P;kt.Cancel=kt.CanceledError;kt.all=function(e){return Promise.all(e)};kt.spread=Tg;kt.isAxiosError=Eg;kt.mergeConfig=Hn;kt.AxiosHeaders=rt;kt.formToJSON=t=>Ll(_.isHTMLForm(t)?new FormData(t):t);kt.getAdapter=Wl.getAdapter;kt.HttpStatusCode=pE;kt.default=kt;var vt=kt;var{Axios:TK,AxiosError:EK,CanceledError:$K,isCancel:RK,CancelToken:AK,VERSION:IK,all:CK,Cancel:PK,isAxiosError:OK,spread:zK,toFormData:NK,AxiosHeaders:jK,HttpStatusCode:LK,formToJSON:DK,getAdapter:MK,mergeConfig:FK,create:UK}=vt;function Hr(){return process.argv.slice(2)}function Ag(){let t=Hr(),e="";for(let n=0;n<t.length;n++)if(t[n]==="--token"&&n+1<t.length){e=t[n+1];break}else if(t[n].startsWith("--token=")){e=t[n].split("=")[1];break}return e}function Ig(){let t=Hr(),e="";for(let n=0;n<t.length;n++)if(t[n]==="--url"&&n+1<t.length){e=t[n+1];break}else if(t[n].startsWith("--url=")){e=t[n].split("=")[1];break}return e}function Cg(){let t=Hr(),e=[];for(let n=0;n<t.length;n++)t[n]==="--rule"&&n+1<t.length?e.push(t[n+1]):t[n].startsWith("--rule=")&&e.push(t[n].split("=")[1]);return e}function rq(){let t=Hr();for(let e of t)if(e==="--debug")return!0;return!1}function Pg(){let t=Hr();for(let e of t)if(e==="--no-rule")return!0;return!1}function Og(){let t=Hr(),e="";for(let n=0;n<t.length;n++)if(t[n]==="--proxy"&&n+1<t.length){e=t[n+1];break}else if(t[n].startsWith("--proxy=")){e=t[n].split("=")[1];break}return e}var oq=(t,e=32)=>t.length>e?`${t.slice(0,e)}\u2026`:t,fE=["authorization","token","secret","password","cookie","api-key","apikey"],iq=t=>{let e=t.toLowerCase();return fE.some(n=>e.includes(n))},Rg=t=>{let e=t.toLowerCase();return fE.some(n=>e.includes(n))?`<redacted, length=${t.length}>`:`"${oq(t)}"`};function sq(){let t=Hr(),e={};for(let n=0;n<t.length;n++){let r;if(t[n]==="--header"){let i=n+1<t.length?t[n+1]:void 0;if(i===void 0){console.warn('[--header] missing value (expected --header "Key: Value" or --header=Key:Value).');continue}if(i.startsWith("--")){console.warn(`[--header] missing value: next argument ${Rg(i)} looks like a flag, not a header value.`);continue}r=i,n++}else if(t[n].startsWith("--header="))r=t[n].slice(9);else continue;if(!r){console.warn('[--header] received an empty value (expected --header "Key: Value" or --header=Key:Value).');continue}let o=r.indexOf(":");if(o===-1)console.warn(`Skipping invalid --header (missing ":" separator): ${Rg(r)}`);else if(o===0)console.warn(`Skipping invalid --header (empty header name before ":"): ${Rg(r)}`);else{let i=r.slice(0,o).trim(),s=r.slice(o+1).trim();s===""&&console.warn(`--header "${i}" has an empty value \u2014 if unintended, quote the value (e.g. --header "${i}: value"); shells split unquoted values that contain spaces.`),e[i]=s}}return e}function aq(){let t=process.env.MG_EXTRA_HEADERS;if(!t)return{};let e;try{e=JSON.parse(t)}catch{return console.warn(`MG_EXTRA_HEADERS is not valid JSON \u2014 ignoring. Expected a JSON object like '{"X-Custom":"val"}'.`),{}}if(typeof e!="object"||e===null||Array.isArray(e))return console.warn(`MG_EXTRA_HEADERS must be a JSON object \u2014 ignoring (got ${Array.isArray(e)?"array":typeof e}).`),{};let n={};for(let[r,o]of Object.entries(e)){if(typeof o!="string"){console.warn(`MG_EXTRA_HEADERS header "${r}" ignored \u2014 value must be a string (got ${typeof o}).`);continue}n[r]=o}return n}var Yl=null;function Xl(){return Yl||(Yl={...aq(),...sq()},Yl)}function mE(t){let e={};for(let[n,r]of Object.entries(t))e[n]=iq(n)?"<masked>":r;return e}function cq(){let t=Hr();for(let e=0;e<t.length;e++){if(t[e]==="--format"&&e+1<t.length)return t[e+1];if(t[e].startsWith("--format="))return t[e].split("=")[1]}}function hE(){let t=Ag(),e=Ig(),n=Cg(),r=rq(),o=Pg(),i=Og(),s=cq();return{token:t,baseUrl:e,rules:n,debug:r,noRule:o,proxy:i,format:s}}var TE=Ee(require("https"));var or=Ee(require("net"),1),Ra=Ee(require("tls"),1),wE=Ee(require("assert"),1),SE=Ee(Fo(),1);var gE=Ee(require("net"),1),yE=Ee(require("http"),1),xE=require("https");var BK=Ee(require("http"),1),HK=Ee(require("https"),1);var rr=Symbol("AgentBaseInternalState"),Ql=class extends yE.Agent{constructor(e){super(e),this[rr]={}}isSecureEndpoint(e){if(e){if(typeof e.secureEndpoint=="boolean")return e.secureEndpoint;if(typeof e.protocol=="string")return e.protocol==="https:"}let{stack:n}=new Error;return typeof n!="string"?!1:n.split(`
|
|
64
|
+
`).some(r=>r.indexOf("(https.js:")!==-1||r.indexOf("node:https:")!==-1)}incrementSockets(e){if(this.maxSockets===1/0&&this.maxTotalSockets===1/0)return null;this.sockets[e]||(this.sockets[e]=[]);let n=new gE.Socket({writable:!1});return this.sockets[e].push(n),this.totalSocketCount++,n}decrementSockets(e,n){if(!this.sockets[e]||n===null)return;let r=this.sockets[e],o=r.indexOf(n);o!==-1&&(r.splice(o,1),this.totalSocketCount--,r.length===0&&delete this.sockets[e])}getName(e){return this.isSecureEndpoint(e)?xE.Agent.prototype.getName.call(this,e):super.getName(e)}createSocket(e,n,r){let o={...n,secureEndpoint:this.isSecureEndpoint(n)},i=this.getName(o),s=this.incrementSockets(i);Promise.resolve().then(()=>this.connect(e,o)).then(a=>{if(this.decrementSockets(i,s),typeof a.addRequest=="function")try{return a.addRequest(e,o)}catch(c){return r(c)}this[rr].currentSocket=a,super.createSocket(e,n,r)},a=>{this.decrementSockets(i,s),r(a)})}createConnection(){let e=this[rr].currentSocket;if(this[rr].currentSocket=void 0,!e)throw new Error("No socket was returned in the `connect()` function");return e}get defaultPort(){return this[rr].defaultPort??(this.protocol==="https:"?443:80)}set defaultPort(e){this[rr]&&(this[rr].defaultPort=e)}get protocol(){return this[rr].protocol??(this.isSecureEndpoint()?"https:":"http:")}set protocol(e){this[rr]&&(this[rr].protocol=e)}};var kE=require("url");var vE=Ee(Fo(),1),eu=(0,vE.default)("https-proxy-agent:parse-proxy-response");function zg(t){return new Promise((e,n)=>{let r=0,o=[];function i(){let p=t.read();p?l(p):t.once("readable",i)}function s(){t.removeListener("end",a),t.removeListener("error",c),t.removeListener("readable",i)}function a(){s(),eu("onend"),n(new Error("Proxy connection ended before receiving CONNECT response"))}function c(p){s(),eu("onerror %o",p),n(p)}function l(p){o.push(p),r+=p.length;let d=Buffer.concat(o,r),f=d.indexOf(`\r
|
|
65
65
|
\r
|
|
66
|
-
`);if(f===-1){
|
|
67
|
-
`),y=
|
|
68
|
-
`;if(
|
|
69
|
-
`;let c=
|
|
70
|
-
`);let{connect:l,buffered:p}=await c;if(e.emit("proxyConnect",l),this.emit("proxyConnect",l,e),e.emit("proxy",{proxy:this.proxy.href,socket:o}),l.statusCode===200)return e.once("socket",
|
|
71
|
-
`;if(o.username||o.password){let d=`${decodeURIComponent(o.username)}:${decodeURIComponent(o.password)}`;s["Proxy-Authorization"]=`Basic ${Buffer.from(d).toString("base64")}`}Object.assign(s,
|
|
72
|
-
`;let l=
|
|
73
|
-
`);let{connect:p}=await l;if(e.emit("proxyConnect",p),this.emit("proxyConnect",p,e),p.statusCode===200)return e.once("socket",
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
const componentDocumentLinks = [
|
|
78
|
-
'https://example.com/ant/button.mdx',
|
|
79
|
-
'https://example.com/ant/button.mdx'
|
|
80
|
-
]
|
|
81
|
-
for (const url of componentDocumentLinks) {
|
|
82
|
-
const componentLink = await mcp__getComponentLink(url);
|
|
83
|
-
console.log(componentLink);
|
|
84
|
-
}
|
|
85
|
-
\`\`\``,...JSON.parse(process.env.RULES??"[]"),...$g()],QF=()=>({async getMeta(t,e,r){return(await ht.get(`${cn()}/mcp/meta`,{timeout:3e4,params:{fileId:t,layerId:e,...r?{sourceLayerId:r}:{}},headers:Gr()})).data},async getDsl(t,e,r){let n={fileId:t,layerId:e};(r==null?void 0:r.sourceLayerId)!==void 0&&(n.sourceLayerId=r.sourceLayerId);let o=await ht.get(`${cn()}/mcp/dsl`,{timeout:3e4,params:n,headers:Gr()});return{dsl:o.data,componentDocumentLinks:YF(o.data),rules:Eg()?[]:XF()}},async extractSvg(t,e,r){let n={fileId:t,layerId:e};return r&&(n.backgroundColor=r),(await ht.get(`${cn()}/mcp/extract-svg`,{timeout:3e4,params:n,headers:Gr()})).data},async getDesignSections(t,e,r){var o;let n={fileId:t,layerId:e};r!==void 0&&(n.sectionIndex=r);try{return(await ht.get(`${cn()}/mcp/design-sections`,{timeout:12e4,params:n,headers:Gr()})).data}catch(i){throw((o=i.response)==null?void 0:o.status)===404?new Error("design-sections API not available on this server. Please update frontend-mcp-server to the latest version."):i}},async getDesignSvgs(t,e){var r;try{return(await ht.get(`${cn()}/mcp/design-svgs`,{timeout:12e4,params:{fileId:t,layerId:e},headers:Gr()})).data}catch(n){throw((r=n.response)==null?void 0:r.status)===404?new Error("design-svgs API not available on this server. Please update frontend-mcp-server to the latest version."):n}},async getDesignTexts(t,e){var r;try{return(await ht.get(`${cn()}/mcp/design-texts`,{timeout:12e4,params:{fileId:t,layerId:e},headers:Gr()})).data}catch(n){throw((r=n.response)==null?void 0:r.status)===404?new Error("design-texts API not available on this server. Please update frontend-mcp-server to the latest version."):n}},async getD2c(t,e){let r={contentId:t,documentId:e};return(await ht.get(`${cn()}/mcp/d2c/events`,{timeout:3e4,params:r,headers:Gr()})).data},async postC2d(t,e,r){return(await ht.post(`${cn()}/mcp/c2d`,{data:t,fileId:e,layerId:r},{timeout:3e4,headers:Gr()})).data},async getComponentStyleJson(t,e,r){return(await ht.get(`${cn()}/mcp/style`,{timeout:3e4,params:{fileId:t,layerId:e,...r?{sourceLayerId:r}:{}},headers:Gr()})).data},async request(t){return(await ht.request({...t,headers:{...Gr(),...t.headers}})).data},async extractIdsFromUrl(t){let e=t;if(t.includes("/goto/")){let c=JF(t,cn()),p=(await ht.get(t,{maxRedirects:0,validateStatus:d=>d>=300&&d<400,...c?{headers:Gr()}:{}})).headers.location;if(!p)throw new Error("No redirect URL found for short link");e=new URL(p,t).href}let r=new URL(e),n=r.pathname.split("/"),o=new URLSearchParams(r.search),i=n.find(c=>/^\d+$/.test(c)),s=o.get("layer_id");if(!i)throw new Error("Could not extract fileId from URL");if(!s)throw new Error("Could not extract layerId from URL");let a=o.get("source_layer_id")||void 0;return{fileId:i,layerId:s,sourceLayerId:a}}}),He=QF();function eU(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Jt={},Yl={},Vn={},vE;function $a(){if(vE)return Vn;vE=1;function t(s){return typeof s>"u"||s===null}function e(s){return typeof s=="object"&&s!==null}function r(s){return Array.isArray(s)?s:t(s)?[]:[s]}function n(s,a){if(a){let c=Object.keys(a);for(let l=0,p=c.length;l<p;l+=1){let d=c[l];s[d]=a[d]}}return s}function o(s,a){let c="";for(let l=0;l<a;l+=1)c+=s;return c}function i(s){return s===0&&Number.NEGATIVE_INFINITY===1/s}return Vn.isNothing=t,Vn.isObject=e,Vn.toArray=r,Vn.repeat=o,Vn.isNegativeZero=i,Vn.extend=n,Vn}var Ig,bE;function Ea(){if(bE)return Ig;bE=1;function t(r,n){let o="",i=r.reason||"(unknown reason)";return r.mark?(r.mark.name&&(o+='in "'+r.mark.name+'" '),o+="("+(r.mark.line+1)+":"+(r.mark.column+1)+")",!n&&r.mark.snippet&&(o+=`
|
|
86
|
-
|
|
87
|
-
`+r.mark.snippet),i+" "+o):i}function e(r,n){Error.call(this),this.name="YAMLException",this.reason=r,this.mark=n,this.message=t(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e.prototype.toString=function(n){return this.name+": "+t(this,n)},Ig=e,Ig}var zg,_E;function tU(){if(_E)return zg;_E=1;let t=$a();function e(o,i,s,a,c){let l="",p="",d=Math.floor(c/2)-1;return a-i>d&&(l=" ... ",i=a-d+l.length),s-a>d&&(p=" ...",s=a+d-p.length),{str:l+o.slice(i,s).replace(/\t/g,"\u2192")+p,pos:a-i+l.length}}function r(o,i){return t.repeat(" ",i-o.length)+o}function n(o,i){if(i=Object.create(i||null),!o.buffer)return null;i.maxLength||(i.maxLength=79),typeof i.indent!="number"&&(i.indent=1),typeof i.linesBefore!="number"&&(i.linesBefore=3),typeof i.linesAfter!="number"&&(i.linesAfter=2);let s=/\r?\n|\r|\0/g,a=[0],c=[],l,p=-1;for(;l=s.exec(o.buffer);)c.push(l.index),a.push(l.index+l[0].length),o.position<=l.index&&p<0&&(p=a.length-2);p<0&&(p=a.length-1);let d="",f=Math.min(o.line+i.linesAfter,c.length).toString().length,m=i.maxLength-(i.indent+f+3);for(let v=1;v<=i.linesBefore&&!(p-v<0);v++){let x=e(o.buffer,a[p-v],c[p-v],o.position-(a[p]-a[p-v]),m);d=t.repeat(" ",i.indent)+r((o.line-v+1).toString(),f)+" | "+x.str+`
|
|
88
|
-
`+d}let y=e(o.buffer,a[p],c[p],o.position,m);d+=t.repeat(" ",i.indent)+r((o.line+1).toString(),f)+" | "+y.str+`
|
|
66
|
+
`);if(f===-1){eu("have not received end of HTTP headers yet..."),i();return}let h=d.slice(0,f).toString("ascii").split(`\r
|
|
67
|
+
`),y=h.shift();if(!y)return t.destroy(),n(new Error("No header received from proxy CONNECT response"));let v=y.split(" "),x=+v[1],m=v.slice(2).join(" "),b={};for(let w of h){if(!w)continue;let k=w.indexOf(":");if(k===-1)return t.destroy(),n(new Error(`Invalid header from proxy CONNECT response: "${w}"`));let E=w.slice(0,k).toLowerCase(),F=w.slice(k+1).trimStart(),j=b[E];typeof j=="string"?b[E]=[j,F]:Array.isArray(j)?j.push(F):b[E]=F}eu("got proxy server response: %o %o",y,b),s(),e({connect:{statusCode:x,statusText:m,headers:b},buffered:d})}t.on("error",c),t.on("end",a),i()})}function bE(){return async({response:t,scheme:e})=>{if(e.toLowerCase()!=="negotiate")throw new Error(`Expected Negotiate scheme but got "${e}"`);let n;try{n=await import("kerberos")}catch{throw new Error('The "kerberos" package is required for Negotiate proxy authentication. Install it with: npm install kerberos')}let r=t.headers["proxy-authenticate"]||"",o=Array.isArray(r)?r[0]:r,i=typeof o=="string"&&o.includes(" ")?o.split(" ").slice(1).join(" "):void 0,a=await(await n.initializeClient("HTTP@proxy",{mechOID:n.GSS_MECH_OID_SPNEGO})).step(i||"");if(!a)throw new Error("Kerberos client.step() returned no token");return{headers:{"Proxy-Authorization":`Negotiate ${a}`}}}}var Ho=(0,SE.default)("https-proxy-agent"),tu=t=>t.servername===void 0&&t.host&&!or.isIP(t.host)?{...t,servername:t.host}:t,Aa=class extends Ql{constructor(e,n){super(n),this.options={path:void 0},this.proxy=typeof e=="string"?new kE.URL(e):e,this.proxyHeaders=(n==null?void 0:n.headers)??{},Ho("Creating new HttpsProxyAgent instance: %o",this.proxy.href),n!=null&&n.negotiate?this.onProxyAuth=bE():n!=null&&n.onProxyAuth&&(this.onProxyAuth=n.onProxyAuth);let r=(this.proxy.hostname||this.proxy.host).replace(/^\[|\]$/g,""),o=this.proxy.port?parseInt(this.proxy.port,10):this.proxy.protocol==="https:"?443:80;this.connectOpts={ALPNProtocols:["http/1.1"],...n?Ng(n,"headers","onProxyAuth","negotiate"):null,host:r,port:o}}async connect(e,n){let{proxy:r}=this;if(!n.host)throw new TypeError('No "host" provided');let o;r.protocol==="https:"?(Ho("Creating `tls.Socket`: %o",this.connectOpts),o=Ra.connect(tu(this.connectOpts))):(Ho("Creating `net.Socket`: %o",this.connectOpts),o=or.connect(this.connectOpts));let i=typeof this.proxyHeaders=="function"?this.proxyHeaders():{...this.proxyHeaders},s=or.isIPv6(n.host)?`[${n.host}]`:n.host,a=`CONNECT ${s}:${n.port} HTTP/1.1\r
|
|
68
|
+
`;if(r.username||r.password){let f=`${decodeURIComponent(r.username)}:${decodeURIComponent(r.password)}`;i["Proxy-Authorization"]=`Basic ${Buffer.from(f).toString("base64")}`}i.Host=`${s}:${n.port}`,i["Proxy-Connection"]||(i["Proxy-Connection"]=this.keepAlive?"Keep-Alive":"close");for(let f of Object.keys(i))a+=`${f}: ${i[f]}\r
|
|
69
|
+
`;let c=zg(o);o.write(`${a}\r
|
|
70
|
+
`);let{connect:l,buffered:p}=await c;if(e.emit("proxyConnect",l),this.emit("proxyConnect",l,e),e.emit("proxy",{proxy:this.proxy.href,socket:o}),l.statusCode===200)return e.once("socket",_E),n.secureEndpoint?(Ho("Upgrading socket connection to TLS"),Ra.connect({...Ng(tu(n),"host","path","port"),socket:o})):o;if(l.statusCode===407&&this.onProxyAuth){Ho("Got 407 response, invoking onProxyAuth callback"),o.destroy();let f=l.headers["proxy-authenticate"]||"",h=Array.isArray(f)?f[0].split(/\s/)[0]:f.split(/\s/)[0],y=await this.onProxyAuth({response:l,scheme:h});return this._connectWithAuth(e,n,y.headers)}o.destroy();let d=new or.Socket({writable:!1});return d.readable=!0,e.once("socket",f=>{Ho("Replaying proxy buffer for failed request"),(0,wE.default)(f.listenerCount("data")>0),f.push(p),f.push(null)}),d}async _connectWithAuth(e,n,r){let{proxy:o}=this,i;o.protocol==="https:"?i=Ra.connect(tu(this.connectOpts)):i=or.connect(this.connectOpts);let s=typeof this.proxyHeaders=="function"?this.proxyHeaders():{...this.proxyHeaders},a=or.isIPv6(n.host)?`[${n.host}]`:n.host,c=`CONNECT ${a}:${n.port} HTTP/1.1\r
|
|
71
|
+
`;if(o.username||o.password){let d=`${decodeURIComponent(o.username)}:${decodeURIComponent(o.password)}`;s["Proxy-Authorization"]=`Basic ${Buffer.from(d).toString("base64")}`}Object.assign(s,r),s.Host=`${a}:${n.port}`,s["Proxy-Connection"]||(s["Proxy-Connection"]=this.keepAlive?"Keep-Alive":"close");for(let d of Object.keys(s))c+=`${d}: ${s[d]}\r
|
|
72
|
+
`;let l=zg(i);i.write(`${c}\r
|
|
73
|
+
`);let{connect:p}=await l;if(e.emit("proxyConnect",p),this.emit("proxyConnect",p,e),p.statusCode===200)return e.once("socket",_E),n.secureEndpoint?(Ho("Upgrading socket connection to TLS"),Ra.connect({...Ng(tu(n),"host","path","port"),socket:i})):i;throw i.destroy(),new Error(`Proxy authentication failed with status ${p.statusCode} after retry`)}};Aa.protocols=["http","https"];function _E(t){setImmediate(()=>{t.resume()})}function Ng(t,...e){let n={},r;for(r in t)e.includes(r)||(n[r]=t[r]);return n}var jg=Og()||process.env.HTTPS_PROXY||process.env.https_proxy||process.env.HTTP_PROXY||process.env.http_proxy;if(jg)try{let t=new Aa(jg,{rejectUnauthorized:!1});vt.defaults.httpAgent=t,vt.defaults.httpsAgent=t,vt.defaults.proxy=!1}catch{throw new Error(`Invalid proxy URL: ${jg}`)}else vt.defaults.httpsAgent=new TE.default.Agent({rejectUnauthorized:!1});var nu=null,ir=()=>nu||(nu={"Content-Type":"application/json",Accept:"application/json","X-MG-UserAccessToken":process.env.MG_MCP_TOKEN||process.env.MASTERGO_API_TOKEN||Ag(),...Xl()},nu),ru=null,br=()=>{if(ru!==null)return ru;let t=process.env.API_BASE_URL||Ig();try{let e=new URL(t),n=e.protocol,r=e.hostname,o=e.port,i=`${n}//${r}`;return o&&(i+=`:${o}`),ru=i,ru}catch{throw new Error(`\u65E0\u6548\u7684URL\u683C\u5F0F: ${t}\u3002\u8BF7\u63D0\u4F9B\u6B63\u786E\u7684URL\u683C\u5F0F\uFF0C\u4F8B\u5982: https://mastergo.com`)}},lq=(t,e)=>{try{return new URL(t).host===new URL(e).host}catch{return!1}},uq=32,Vr=new Map;function pq(t,e){if(Vr.has(t))Vr.delete(t);else if(Vr.size>=uq){let n=Vr.keys().next().value;n!==void 0&&Vr.delete(n)}Vr.set(t,e)}var dq=t=>{var r;let e=new Set,n=o=>{var i,s,a,c;(s=(i=o==null?void 0:o.componentInfo)==null?void 0:i.componentSetDocumentLink)!=null&&s[0]&&e.add(o.componentInfo.componentSetDocumentLink[0]),(c=(a=o.children)==null?void 0:a.forEach)==null||c.call(a,n)};return(r=t.nodes)==null||r.forEach(n),Array.from(e)},fq=()=>["CRITICAL \u2014 Page positioning: the section LIST response contains splitContainers with page-absolute coordinates for each page region. Use splitContainers to construct the page skeleton (position:absolute with exact coordinates). Do NOT guess or stack with flex.","CRITICAL \u2014 Sidebar columns: render ALL sidebar levels as persistent columns at splitContainers positions. Do NOT hide or toggle them.","token filed must be generated as a variable (colors, shadows, fonts, etc.) and the token field must be displayed in the comment","componentDocumentLinks is a list of frontend component documentation links. When it exists and is not empty, use mcp__getComponentLink to get the documentation.","",'CRITICAL \u2014 SVG FROM PATH NODES: Every PATH node has a `svgKey` field. The SVG markup is NOT in the DSL. Place `@@SVG:{svgKey}@@` where each icon goes, then call `mcp__applyDesign` to inject real SVG. NEVER hand-write `<path d="...">`.',"CRITICAL \u2014 RENDER EVERY PATH NODE ICON: do NOT skip any PATH node. Each PATH node must have a `@@SVG:{svgKey}@@` placeholder in your code. Table headers have sort/filter/search icons, sidebar menu items have PATH icons, pagination has prev/next/refresh/dropdown icons. A header cell with only plain text is a fidelity defect. After all placeholders are placed, call `mcp__applyDesign`.","",'CRITICAL \u2014 OMIT _placeholder TEXT: any TEXT node with `_placeholder: true` is component-library boilerplate \u2014 the node name equals its text content (e.g. name="Hillstone Design" and text="Hillstone Design"). These appear in rowTexts[] with `_placeholder: true` \u2014 skip them. allTexts does NOT include placeholder strings. EXCEPTION: if _placeholder TEXT is the ONLY text in its section, it may be real content with an auto-generated name \u2014 evaluate carefully.',"CRITICAL \u2014 CLOSED-SET TEXT: the section LIST response carries `rootMetadata.allTexts` \u2014 the complete whitelist of real text strings in this design. Any visible string NOT in allTexts is either placeholder (omit) or hallucination (delete). allTexts EXCLUDES _placeholder boilerplate.","","CRITICAL \u2014 INSTANCE fill color: when an INSTANCE has both `fill` and `_color`, use `_color` directly as the CSS value. Do NOT guess colors from _variantProps semantics.","CRITICAL \u2014 INSTANCE _variantProps: compare across siblings for selected/hovered/disabled. Active class MUST match DSL variant state, NOT a default index.","CRITICAL \u2014 Render count = structureSiblingCount: if ssc=1, that single instance IS complete \u2014 do NOT fabricate extra rows/items.","CRITICAL \u2014 BACKGROUND FROM splitContainers: splitContainers[].background IS the exact CSS background-color. Copy verbatim, no changes.","CRITICAL \u2014 FRAME/GROUP opacity: translate to rgba() on background only, NOT CSS opacity (would make children translucent).","CRITICAL \u2014 rowTexts: each entry has parentType/parentName for context and `_placeholder: true` if boilerplate. Use parentName to place text correctly; skip _placeholder entries.","Render ALL nodes recursively. Section root layoutStyle.width = section width. Do not call mcp__getDsl after completing section workflow.",...JSON.parse(process.env.RULES??"[]"),...Cg()],mq=()=>({async getMeta(t,e,n){return(await vt.get(`${br()}/mcp/meta`,{timeout:3e4,params:{fileId:t,layerId:e,...n?{sourceLayerId:n}:{}},headers:ir()})).data},async getDsl(t,e,n){let r={fileId:t,layerId:e};(n==null?void 0:n.sourceLayerId)!==void 0&&(r.sourceLayerId=n.sourceLayerId);let o=await vt.get(`${br()}/mcp/dsl`,{timeout:3e4,params:r,headers:ir()});return{dsl:o.data,componentDocumentLinks:dq(o.data),rules:Pg()?[]:fq()}},async extractSvg(t,e,n,r,o){let i={fileId:t,layerId:e};return n&&(i.backgroundColor=n),r!==void 0&&(i.page=r),o!==void 0&&(i.pageSize=o),(await vt.get(`${br()}/mcp/extract-svg`,{timeout:3e4,params:i,headers:ir()})).data},async getDesignSections(t,e,n){var o;let r={fileId:t,layerId:e};n!==void 0&&(r.sectionIndex=n);try{return(await vt.get(`${br()}/mcp/design-sections`,{timeout:12e4,params:r,headers:ir()})).data}catch(i){throw((o=i.response)==null?void 0:o.status)===404?new Error("design-sections API not available on this server. Please update frontend-mcp-server to the latest version."):i}},async getD2c(t,e){let n={contentId:t,documentId:e};return(await vt.get(`${br()}/mcp/d2c/events`,{timeout:3e4,params:n,headers:ir()})).data},async postC2d(t,e,n){return(await vt.post(`${br()}/mcp/c2d`,{data:t,fileId:e,layerId:n},{timeout:3e4,headers:ir()})).data},async applyDesign(t,e,n,r,o){var i;try{return(await vt.post(`${br()}/mcp/apply-design`,{code:t,fileId:e,layerId:n,...r?{sourceLayerId:r}:{},...o?{targetLang:o}:{}},{timeout:6e4,headers:ir()})).data}catch(s){throw((i=s.response)==null?void 0:i.status)===404?new Error("apply-design API not available on this server. Please update frontend-mcp-server to the latest version to enable placeholder post-processing."):s}},async getComponentStyleJson(t,e,n){return(await vt.get(`${br()}/mcp/style`,{timeout:3e4,params:{fileId:t,layerId:e,...n?{sourceLayerId:n}:{}},headers:ir()})).data},async request(t){return(await vt.request({...t,headers:{...ir(),...t.headers}})).data},async extractIdsFromUrl(t){if(t.includes("/goto/")&&Vr.has(t))return{...Vr.get(t)};let e=t;if(t.includes("/goto/")){let l=lq(t,br()),d=(await vt.get(t,{maxRedirects:0,validateStatus:f=>f>=300&&f<400,...l?{headers:ir()}:{}})).headers.location;if(!d)throw new Error("No redirect URL found for short link");e=new URL(d,t).href}let n=new URL(e),r=n.pathname.split("/"),o=new URLSearchParams(n.search),i=r.find(l=>/^\d+$/.test(l)),s=o.get("layer_id");if(!i)throw new Error("Could not extract fileId from URL");if(!s)throw new Error("Could not extract layerId from URL");let a=o.get("source_layer_id")||void 0,c={fileId:i,layerId:s,sourceLayerId:a};return t.includes("/goto/")&&pq(t,c),c}}),ot=mq();function hq(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Jt={},ou={},Gr={},EE;function Ia(){if(EE)return Gr;EE=1;function t(s){return typeof s>"u"||s===null}function e(s){return typeof s=="object"&&s!==null}function n(s){return Array.isArray(s)?s:t(s)?[]:[s]}function r(s,a){if(a){let c=Object.keys(a);for(let l=0,p=c.length;l<p;l+=1){let d=c[l];s[d]=a[d]}}return s}function o(s,a){let c="";for(let l=0;l<a;l+=1)c+=s;return c}function i(s){return s===0&&Number.NEGATIVE_INFINITY===1/s}return Gr.isNothing=t,Gr.isObject=e,Gr.toArray=n,Gr.repeat=o,Gr.isNegativeZero=i,Gr.extend=r,Gr}var Lg,$E;function Ca(){if($E)return Lg;$E=1;function t(n,r){let o="",i=n.reason||"(unknown reason)";return n.mark?(n.mark.name&&(o+='in "'+n.mark.name+'" '),o+="("+(n.mark.line+1)+":"+(n.mark.column+1)+")",!r&&n.mark.snippet&&(o+=`
|
|
74
|
+
|
|
75
|
+
`+n.mark.snippet),i+" "+o):i}function e(n,r){Error.call(this),this.name="YAMLException",this.reason=n,this.mark=r,this.message=t(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e.prototype.toString=function(r){return this.name+": "+t(this,r)},Lg=e,Lg}var Dg,RE;function gq(){if(RE)return Dg;RE=1;let t=Ia();function e(o,i,s,a,c){let l="",p="",d=Math.floor(c/2)-1;return a-i>d&&(l=" ... ",i=a-d+l.length),s-a>d&&(p=" ...",s=a+d-p.length),{str:l+o.slice(i,s).replace(/\t/g,"\u2192")+p,pos:a-i+l.length}}function n(o,i){return t.repeat(" ",i-o.length)+o}function r(o,i){if(i=Object.create(i||null),!o.buffer)return null;i.maxLength||(i.maxLength=79),typeof i.indent!="number"&&(i.indent=1),typeof i.linesBefore!="number"&&(i.linesBefore=3),typeof i.linesAfter!="number"&&(i.linesAfter=2);let s=/\r?\n|\r|\0/g,a=[0],c=[],l,p=-1;for(;l=s.exec(o.buffer);)c.push(l.index),a.push(l.index+l[0].length),o.position<=l.index&&p<0&&(p=a.length-2);p<0&&(p=a.length-1);let d="",f=Math.min(o.line+i.linesAfter,c.length).toString().length,h=i.maxLength-(i.indent+f+3);for(let v=1;v<=i.linesBefore&&!(p-v<0);v++){let x=e(o.buffer,a[p-v],c[p-v],o.position-(a[p]-a[p-v]),h);d=t.repeat(" ",i.indent)+n((o.line-v+1).toString(),f)+" | "+x.str+`
|
|
76
|
+
`+d}let y=e(o.buffer,a[p],c[p],o.position,h);d+=t.repeat(" ",i.indent)+n((o.line+1).toString(),f)+" | "+y.str+`
|
|
89
77
|
`,d+=t.repeat("-",i.indent+f+3+y.pos)+`^
|
|
90
|
-
`;for(let v=1;v<=i.linesAfter&&!(p+v>=c.length);v++){let x=e(o.buffer,a[p+v],c[p+v],o.position-(a[p]-a[p+v]),
|
|
91
|
-
`}return d.replace(/\n$/,"")}return
|
|
92
|
-
\r`;function
|
|
93
|
-
`;case 118:return"\v";case 102:return"\f";case 114:return"\r";case 101:return"\x1B";case 32:return" ";case 34:return'"';case 47:return"/";case 92:return"\\";case 78:return"\x85";case 95:return"\xA0";case 76:return"\u2028";case 80:return"\u2029";default:return""}}function
|
|
94
|
-
`,S-1))}function
|
|
95
|
-
`,
|
|
96
|
-
`);break}
|
|
97
|
-
`,
|
|
98
|
-
`,
|
|
99
|
-
`,
|
|
100
|
-
`,
|
|
101
|
-
`),u.charCodeAt(0)===65279&&(u=u.slice(1)));let
|
|
102
|
-
`,
|
|
103
|
-
`&&(
|
|
104
|
-
`+t.repeat(" ",
|
|
105
|
-
`,
|
|
106
|
-
`||
|
|
107
|
-
`)?"+":
|
|
108
|
-
`}function
|
|
109
|
-
`?
|
|
110
|
-
`);return Q=Q!==-1?Q:
|
|
111
|
-
`||
|
|
112
|
-
`:"")+
|
|
113
|
-
`+
|
|
114
|
-
`,
|
|
115
|
-
`+
|
|
116
|
-
`:""}return
|
|
78
|
+
`;for(let v=1;v<=i.linesAfter&&!(p+v>=c.length);v++){let x=e(o.buffer,a[p+v],c[p+v],o.position-(a[p]-a[p+v]),h);d+=t.repeat(" ",i.indent)+n((o.line+v+1).toString(),f)+" | "+x.str+`
|
|
79
|
+
`}return d.replace(/\n$/,"")}return Dg=r,Dg}var Mg,AE;function nn(){if(AE)return Mg;AE=1;let t=Ca(),e=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],n=["scalar","sequence","mapping"];function r(i){let s={};return i!==null&&Object.keys(i).forEach(function(a){i[a].forEach(function(c){s[String(c)]=a})}),s}function o(i,s){if(s=s||{},Object.keys(s).forEach(function(a){if(e.indexOf(a)===-1)throw new t('Unknown option "'+a+'" is met in definition of "'+i+'" YAML type.')}),this.options=s,this.tag=i,this.kind=s.kind||null,this.resolve=s.resolve||function(){return!0},this.construct=s.construct||function(a){return a},this.instanceOf=s.instanceOf||null,this.predicate=s.predicate||null,this.represent=s.represent||null,this.representName=s.representName||null,this.defaultStyle=s.defaultStyle||null,this.multi=s.multi||!1,this.styleAliases=r(s.styleAliases||null),n.indexOf(this.kind)===-1)throw new t('Unknown kind "'+this.kind+'" is specified for "'+i+'" YAML type.')}return Mg=o,Mg}var Fg,IE;function YE(){if(IE)return Fg;IE=1;let t=Ca(),e=nn();function n(i,s){let a=[];return i[s].forEach(function(c){let l=a.length;a.forEach(function(p,d){p.tag===c.tag&&p.kind===c.kind&&p.multi===c.multi&&(l=d)}),a[l]=c}),a}function r(){let i={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function s(a){a.multi?(i.multi[a.kind].push(a),i.multi.fallback.push(a)):i[a.kind][a.tag]=i.fallback[a.tag]=a}for(let a=0,c=arguments.length;a<c;a+=1)arguments[a].forEach(s);return i}function o(i){return this.extend(i)}return o.prototype.extend=function(s){let a=[],c=[];if(s instanceof e)c.push(s);else if(Array.isArray(s))c=c.concat(s);else if(s&&(Array.isArray(s.implicit)||Array.isArray(s.explicit)))s.implicit&&(a=a.concat(s.implicit)),s.explicit&&(c=c.concat(s.explicit));else throw new t("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");a.forEach(function(p){if(!(p instanceof e))throw new t("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(p.loadKind&&p.loadKind!=="scalar")throw new t("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(p.multi)throw new t("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),c.forEach(function(p){if(!(p instanceof e))throw new t("Specified list of YAML types (or a single Type object) contains a non-Type object.")});let l=Object.create(o.prototype);return l.implicit=(this.implicit||[]).concat(a),l.explicit=(this.explicit||[]).concat(c),l.compiledImplicit=n(l,"implicit"),l.compiledExplicit=n(l,"explicit"),l.compiledTypeMap=r(l.compiledImplicit,l.compiledExplicit),l},Fg=o,Fg}var Ug,CE;function XE(){if(CE)return Ug;CE=1;let t=nn();return Ug=new t("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return e!==null?e:""}}),Ug}var qg,PE;function QE(){if(PE)return qg;PE=1;let t=nn();return qg=new t("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return e!==null?e:[]}}),qg}var Zg,OE;function e$(){if(OE)return Zg;OE=1;let t=nn();return Zg=new t("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return e!==null?e:{}}}),Zg}var Bg,zE;function t$(){if(zE)return Bg;zE=1;let t=YE();return Bg=new t({explicit:[XE(),QE(),e$()]}),Bg}var Hg,NE;function n$(){if(NE)return Hg;NE=1;let t=nn();function e(o){if(o===null)return!0;let i=o.length;return i===1&&o==="~"||i===4&&(o==="null"||o==="Null"||o==="NULL")}function n(){return null}function r(o){return o===null}return Hg=new t("tag:yaml.org,2002:null",{kind:"scalar",resolve:e,construct:n,predicate:r,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"}),Hg}var Vg,jE;function r$(){if(jE)return Vg;jE=1;let t=nn();function e(o){if(o===null)return!1;let i=o.length;return i===4&&(o==="true"||o==="True"||o==="TRUE")||i===5&&(o==="false"||o==="False"||o==="FALSE")}function n(o){return o==="true"||o==="True"||o==="TRUE"}function r(o){return Object.prototype.toString.call(o)==="[object Boolean]"}return Vg=new t("tag:yaml.org,2002:bool",{kind:"scalar",resolve:e,construct:n,predicate:r,represent:{lowercase:function(o){return o?"true":"false"},uppercase:function(o){return o?"TRUE":"FALSE"},camelcase:function(o){return o?"True":"False"}},defaultStyle:"lowercase"}),Vg}var Gg,LE;function o$(){if(LE)return Gg;LE=1;let t=Ia(),e=nn();function n(l){return l>=48&&l<=57||l>=65&&l<=70||l>=97&&l<=102}function r(l){return l>=48&&l<=55}function o(l){return l>=48&&l<=57}function i(l){if(l===null)return!1;let p=l.length,d=0,f=!1;if(!p)return!1;let h=l[d];if((h==="-"||h==="+")&&(h=l[++d]),h==="0"){if(d+1===p)return!0;if(h=l[++d],h==="b"){for(d++;d<p;d++){if(h=l[d],h!=="0"&&h!=="1")return!1;f=!0}return f&&isFinite(s(l))}if(h==="x"){for(d++;d<p;d++){if(!n(l.charCodeAt(d)))return!1;f=!0}return f&&isFinite(s(l))}if(h==="o"){for(d++;d<p;d++){if(!r(l.charCodeAt(d)))return!1;f=!0}return f&&isFinite(s(l))}}for(;d<p;d++){if(!o(l.charCodeAt(d)))return!1;f=!0}return f?isFinite(s(l)):!1}function s(l){let p=l,d=1,f=p[0];if((f==="-"||f==="+")&&(f==="-"&&(d=-1),p=p.slice(1),f=p[0]),p==="0")return 0;if(f==="0"){if(p[1]==="b")return d*parseInt(p.slice(2),2);if(p[1]==="x")return d*parseInt(p.slice(2),16);if(p[1]==="o")return d*parseInt(p.slice(2),8)}return d*parseInt(p,10)}function a(l){return s(l)}function c(l){return Object.prototype.toString.call(l)==="[object Number]"&&l%1===0&&!t.isNegativeZero(l)}return Gg=new e("tag:yaml.org,2002:int",{kind:"scalar",resolve:i,construct:a,predicate:c,represent:{binary:function(l){return l>=0?"0b"+l.toString(2):"-0b"+l.toString(2).slice(1)},octal:function(l){return l>=0?"0o"+l.toString(8):"-0o"+l.toString(8).slice(1)},decimal:function(l){return l.toString(10)},hexadecimal:function(l){return l>=0?"0x"+l.toString(16).toUpperCase():"-0x"+l.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),Gg}var Wg,DE;function i$(){if(DE)return Wg;DE=1;let t=Ia(),e=nn(),n=new RegExp("^(?:[-+]?(?:[0-9]+)(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),r=new RegExp("^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function o(l){return l===null||!n.test(l)?!1:isFinite(parseFloat(l,10))?!0:r.test(l)}function i(l){let p=l.toLowerCase(),d=p[0]==="-"?-1:1;return"+-".indexOf(p[0])>=0&&(p=p.slice(1)),p===".inf"?d===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:p===".nan"?NaN:d*parseFloat(p,10)}let s=/^[-+]?[0-9]+e/;function a(l,p){if(isNaN(l))switch(p){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===l)switch(p){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===l)switch(p){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(t.isNegativeZero(l))return"-0.0";let d=l.toString(10);return s.test(d)?d.replace("e",".e"):d}function c(l){return Object.prototype.toString.call(l)==="[object Number]"&&(l%1!==0||t.isNegativeZero(l))}return Wg=new e("tag:yaml.org,2002:float",{kind:"scalar",resolve:o,construct:i,predicate:c,represent:a,defaultStyle:"lowercase"}),Wg}var Kg,ME;function s$(){return ME||(ME=1,Kg=t$().extend({implicit:[n$(),r$(),o$(),i$()]})),Kg}var Jg,FE;function a$(){return FE||(FE=1,Jg=s$()),Jg}var Yg,UE;function c$(){if(UE)return Yg;UE=1;let t=nn(),e=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),n=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function r(s){return s===null?!1:e.exec(s)!==null||n.exec(s)!==null}function o(s){let a=0,c=null,l=e.exec(s);if(l===null&&(l=n.exec(s)),l===null)throw new Error("Date resolve error");let p=+l[1],d=+l[2]-1,f=+l[3];if(!l[4])return new Date(Date.UTC(p,d,f));let h=+l[4],y=+l[5],v=+l[6];if(l[7]){for(a=l[7].slice(0,3);a.length<3;)a+="0";a=+a}if(l[9]){let m=+l[10],b=+(l[11]||0);c=(m*60+b)*6e4,l[9]==="-"&&(c=-c)}let x=new Date(Date.UTC(p,d,f,h,y,v,a));return c&&x.setTime(x.getTime()-c),x}function i(s){return s.toISOString()}return Yg=new t("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:r,construct:o,instanceOf:Date,represent:i}),Yg}var Xg,qE;function l$(){if(qE)return Xg;qE=1;let t=nn();function e(n){return n==="<<"||n===null}return Xg=new t("tag:yaml.org,2002:merge",{kind:"scalar",resolve:e}),Xg}var Qg,ZE;function u$(){if(ZE)return Qg;ZE=1;let t=nn(),e=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
80
|
+
\r`;function n(s){if(s===null)return!1;let a=0,c=s.length,l=e;for(let p=0;p<c;p++){let d=l.indexOf(s.charAt(p));if(!(d>64)){if(d<0)return!1;a+=6}}return a%8===0}function r(s){let a=s.replace(/[\r\n=]/g,""),c=a.length,l=e,p=0,d=[];for(let h=0;h<c;h++)h%4===0&&h&&(d.push(p>>16&255),d.push(p>>8&255),d.push(p&255)),p=p<<6|l.indexOf(a.charAt(h));let f=c%4*6;return f===0?(d.push(p>>16&255),d.push(p>>8&255),d.push(p&255)):f===18?(d.push(p>>10&255),d.push(p>>2&255)):f===12&&d.push(p>>4&255),new Uint8Array(d)}function o(s){let a="",c=0,l=s.length,p=e;for(let f=0;f<l;f++)f%3===0&&f&&(a+=p[c>>18&63],a+=p[c>>12&63],a+=p[c>>6&63],a+=p[c&63]),c=(c<<8)+s[f];let d=l%3;return d===0?(a+=p[c>>18&63],a+=p[c>>12&63],a+=p[c>>6&63],a+=p[c&63]):d===2?(a+=p[c>>10&63],a+=p[c>>4&63],a+=p[c<<2&63],a+=p[64]):d===1&&(a+=p[c>>2&63],a+=p[c<<4&63],a+=p[64],a+=p[64]),a}function i(s){return Object.prototype.toString.call(s)==="[object Uint8Array]"}return Qg=new t("tag:yaml.org,2002:binary",{kind:"scalar",resolve:n,construct:r,predicate:i,represent:o}),Qg}var ey,BE;function p$(){if(BE)return ey;BE=1;let t=nn(),e=Object.prototype.hasOwnProperty,n=Object.prototype.toString;function r(i){if(i===null)return!0;let s=[],a=i;for(let c=0,l=a.length;c<l;c+=1){let p=a[c],d=!1;if(n.call(p)!=="[object Object]")return!1;let f;for(f in p)if(e.call(p,f))if(!d)d=!0;else return!1;if(!d)return!1;if(s.indexOf(f)===-1)s.push(f);else return!1}return!0}function o(i){return i!==null?i:[]}return ey=new t("tag:yaml.org,2002:omap",{kind:"sequence",resolve:r,construct:o}),ey}var ty,HE;function d$(){if(HE)return ty;HE=1;let t=nn(),e=Object.prototype.toString;function n(o){if(o===null)return!0;let i=o,s=new Array(i.length);for(let a=0,c=i.length;a<c;a+=1){let l=i[a];if(e.call(l)!=="[object Object]")return!1;let p=Object.keys(l);if(p.length!==1)return!1;s[a]=[p[0],l[p[0]]]}return!0}function r(o){if(o===null)return[];let i=o,s=new Array(i.length);for(let a=0,c=i.length;a<c;a+=1){let l=i[a],p=Object.keys(l);s[a]=[p[0],l[p[0]]]}return s}return ty=new t("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:n,construct:r}),ty}var ny,VE;function f$(){if(VE)return ny;VE=1;let t=nn(),e=Object.prototype.hasOwnProperty;function n(o){if(o===null)return!0;let i=o;for(let s in i)if(e.call(i,s)&&i[s]!==null)return!1;return!0}function r(o){return o!==null?o:{}}return ny=new t("tag:yaml.org,2002:set",{kind:"mapping",resolve:n,construct:r}),ny}var ry,GE;function iy(){return GE||(GE=1,ry=a$().extend({implicit:[c$(),l$()],explicit:[u$(),p$(),d$(),f$()]})),ry}var WE;function yq(){if(WE)return ou;WE=1;let t=Ia(),e=Ca(),n=gq(),r=iy(),o=Object.prototype.hasOwnProperty,i=1,s=2,a=3,c=4,l=1,p=2,d=3,f=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,h=/[\x85\u2028\u2029]/,y=/[,\[\]{}]/,v=/^(?:!|!!|![0-9A-Za-z-]+!)$/,x=/^(?:!|[^,\[\]{}])(?:%[0-9a-f]{2}|[0-9a-z\-#;/?:@&=+$,_.!~*'()\[\]])*$/i;function m(u){return Object.prototype.toString.call(u)}function b(u){return u===10||u===13}function w(u){return u===9||u===32}function k(u){return u===9||u===32||u===10||u===13}function E(u){return u===44||u===91||u===93||u===123||u===125}function F(u){if(u>=48&&u<=57)return u-48;let S=u|32;return S>=97&&S<=102?S-97+10:-1}function j(u){return u===120?2:u===117?4:u===85?8:0}function me(u){return u>=48&&u<=57?u-48:-1}function de(u){switch(u){case 48:return"\0";case 97:return"\x07";case 98:return"\b";case 116:return" ";case 9:return" ";case 110:return`
|
|
81
|
+
`;case 118:return"\v";case 102:return"\f";case 114:return"\r";case 101:return"\x1B";case 32:return" ";case 34:return'"';case 47:return"/";case 92:return"\\";case 78:return"\x85";case 95:return"\xA0";case 76:return"\u2028";case 80:return"\u2029";default:return""}}function oe(u){return u<=65535?String.fromCharCode(u):String.fromCharCode((u-65536>>10)+55296,(u-65536&1023)+56320)}function Re(u,S,C){S==="__proto__"?Object.defineProperty(u,S,{configurable:!0,enumerable:!0,writable:!0,value:C}):u[S]=C}let bt=new Array(256),Ve=new Array(256);for(let u=0;u<256;u++)bt[u]=de(u)?1:0,Ve[u]=de(u);function ae(u,S){this.input=u,this.filename=S.filename||null,this.schema=S.schema||r,this.onWarning=S.onWarning||null,this.legacy=S.legacy||!1,this.json=S.json||!1,this.listener=S.listener||null,this.maxDepth=typeof S.maxDepth=="number"?S.maxDepth:100,this.maxTotalMergeKeys=typeof S.maxTotalMergeKeys=="number"?S.maxTotalMergeKeys:1e4,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=u.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.depth=0,this.totalMergeKeys=0,this.firstTabInLine=-1,this.documents=[],this.anchorMapTransactions=[]}function yt(u,S){let C={name:u.filename,buffer:u.input.slice(0,-1),position:u.position,line:u.line,column:u.position-u.lineStart};return C.snippet=n(C),new e(S,C)}function V(u,S){throw yt(u,S)}function At(u,S){u.onWarning&&u.onWarning.call(null,yt(u,S))}function Zt(u,S,C){let N=u.anchorMapTransactions;if(N.length!==0){let A=N[N.length-1];o.call(A,S)||(A[S]={existed:o.call(u.anchorMap,S),value:u.anchorMap[S]})}u.anchorMap[S]=C}function Vn(u){u.anchorMapTransactions.push(Object.create(null))}function Pe(u){let S=u.anchorMapTransactions.pop(),C=u.anchorMapTransactions;if(C.length===0)return;let N=C[C.length-1],A=Object.keys(S);for(let Z=0,g=A.length;Z<g;Z+=1){let T=A[Z];o.call(N,T)||(N[T]=S[T])}}function B(u){let S=u.anchorMapTransactions.pop(),C=Object.keys(S);for(let N=C.length-1;N>=0;N-=1){let A=S[C[N]];A.existed?u.anchorMap[C[N]]=A.value:delete u.anchorMap[C[N]]}}function qe(u){return{position:u.position,line:u.line,lineStart:u.lineStart,lineIndent:u.lineIndent,firstTabInLine:u.firstTabInLine,tag:u.tag,anchor:u.anchor,kind:u.kind,result:u.result}}function De(u,S){u.position=S.position,u.line=S.line,u.lineStart=S.lineStart,u.lineIndent=S.lineIndent,u.firstTabInLine=S.firstTabInLine,u.tag=S.tag,u.anchor=S.anchor,u.kind=S.kind,u.result=S.result}let Yt={YAML:function(S,C,N){S.version!==null&&V(S,"duplication of %YAML directive"),N.length!==1&&V(S,"YAML directive accepts exactly one argument");let A=/^([0-9]+)\.([0-9]+)$/.exec(N[0]);A===null&&V(S,"ill-formed argument of the YAML directive");let Z=parseInt(A[1],10),g=parseInt(A[2],10);Z!==1&&V(S,"unacceptable YAML version of the document"),S.version=N[0],S.checkLineBreaks=g<2,g!==1&&g!==2&&At(S,"unsupported YAML version of the document")},TAG:function(S,C,N){let A;N.length!==2&&V(S,"TAG directive accepts exactly two arguments");let Z=N[0];A=N[1],v.test(Z)||V(S,"ill-formed tag handle (first argument) of the TAG directive"),o.call(S.tagMap,Z)&&V(S,'there is a previously declared suffix for "'+Z+'" tag handle'),x.test(A)||V(S,"ill-formed tag prefix (second argument) of the TAG directive");try{A=decodeURIComponent(A)}catch{V(S,"tag prefix is malformed: "+A)}S.tagMap[Z]=A}};function it(u,S,C,N){if(S<C){let A=u.input.slice(S,C);if(N)for(let Z=0,g=A.length;Z<g;Z+=1){let T=A.charCodeAt(Z);T===9||T>=32&&T<=1114111||V(u,"expected valid JSON character")}else f.test(A)&&V(u,"the stream contains non-printable characters");u.result+=A}}function ge(u,S,C,N){t.isObject(C)||V(u,"cannot merge mappings; the provided source object is unacceptable");let A=Object.keys(C);for(let Z=0,g=A.length;Z<g;Z+=1){let T=A[Z];u.maxTotalMergeKeys!==-1&&++u.totalMergeKeys>u.maxTotalMergeKeys&&V(u,"merge keys exceeded maxTotalMergeKeys ("+u.maxTotalMergeKeys+")"),o.call(S,T)||(Re(S,T,C[T]),N[T]=!0)}}function ke(u,S,C,N,A,Z,g,T,D){if(Array.isArray(A)){A=Array.prototype.slice.call(A);for(let O=0,z=A.length;O<z;O+=1)Array.isArray(A[O])&&V(u,"nested arrays are not supported inside keys"),typeof A=="object"&&m(A[O])==="[object Object]"&&(A[O]="[object Object]")}if(typeof A=="object"&&m(A)==="[object Object]"&&(A="[object Object]"),A=String(A),S===null&&(S={}),N==="tag:yaml.org,2002:merge")if(Array.isArray(Z))for(let O=0,z=Z.length;O<z;O+=1)ge(u,S,Z[O],C);else ge(u,S,Z,C);else!u.json&&!o.call(C,A)&&o.call(S,A)&&(u.line=g||u.line,u.lineStart=T||u.lineStart,u.position=D||u.position,V(u,"duplicated mapping key")),Re(S,A,Z),delete C[A];return S}function ut(u){let S=u.input.charCodeAt(u.position);S===10?u.position++:S===13?(u.position++,u.input.charCodeAt(u.position)===10&&u.position++):V(u,"a line break is expected"),u.line+=1,u.lineStart=u.position,u.firstTabInLine=-1}function Oe(u,S,C){let N=0,A=u.input.charCodeAt(u.position);for(;A!==0;){for(;w(A);)A===9&&u.firstTabInLine===-1&&(u.firstTabInLine=u.position),A=u.input.charCodeAt(++u.position);if(S&&A===35)do A=u.input.charCodeAt(++u.position);while(A!==10&&A!==13&&A!==0);if(b(A))for(ut(u),A=u.input.charCodeAt(u.position),N++,u.lineIndent=0;A===32;)u.lineIndent++,A=u.input.charCodeAt(++u.position);else break}return C!==-1&&N!==0&&u.lineIndent<C&&At(u,"deficient indentation"),N}function Tt(u){let S=u.position,C=u.input.charCodeAt(S);return!!((C===45||C===46)&&C===u.input.charCodeAt(S+1)&&C===u.input.charCodeAt(S+2)&&(S+=3,C=u.input.charCodeAt(S),C===0||k(C)))}function Et(u,S){S===1?u.result+=" ":S>1&&(u.result+=t.repeat(`
|
|
82
|
+
`,S-1))}function Te(u,S,C){let N,A,Z,g,T,D,O=u.kind,z=u.result,M=u.input.charCodeAt(u.position);if(k(M)||E(M)||M===35||M===38||M===42||M===33||M===124||M===62||M===39||M===34||M===37||M===64||M===96)return!1;if(M===63||M===45){let L=u.input.charCodeAt(u.position+1);if(k(L)||C&&E(L))return!1}for(u.kind="scalar",u.result="",N=A=u.position,Z=!1;M!==0;){if(M===58){let L=u.input.charCodeAt(u.position+1);if(k(L)||C&&E(L))break}else if(M===35){let L=u.input.charCodeAt(u.position-1);if(k(L))break}else{if(u.position===u.lineStart&&Tt(u)||C&&E(M))break;if(b(M))if(g=u.line,T=u.lineStart,D=u.lineIndent,Oe(u,!1,-1),u.lineIndent>=S){Z=!0,M=u.input.charCodeAt(u.position);continue}else{u.position=A,u.line=g,u.lineStart=T,u.lineIndent=D;break}}Z&&(it(u,N,A,!1),Et(u,u.line-g),N=A=u.position,Z=!1),w(M)||(A=u.position+1),M=u.input.charCodeAt(++u.position)}return it(u,N,A,!1),u.result?!0:(u.kind=O,u.result=z,!1)}function Bt(u,S){let C,N,A=u.input.charCodeAt(u.position);if(A!==39)return!1;for(u.kind="scalar",u.result="",u.position++,C=N=u.position;(A=u.input.charCodeAt(u.position))!==0;)if(A===39)if(it(u,C,u.position,!0),A=u.input.charCodeAt(++u.position),A===39)C=u.position,u.position++,N=u.position;else return!0;else b(A)?(it(u,C,N,!0),Et(u,Oe(u,!1,S)),C=N=u.position):u.position===u.lineStart&&Tt(u)?V(u,"unexpected end of the document within a single quoted scalar"):(u.position++,w(A)||(N=u.position));V(u,"unexpected end of the stream within a single quoted scalar")}function _n(u,S){let C,N,A,Z=u.input.charCodeAt(u.position);if(Z!==34)return!1;for(u.kind="scalar",u.result="",u.position++,C=N=u.position;(Z=u.input.charCodeAt(u.position))!==0;){if(Z===34)return it(u,C,u.position,!0),u.position++,!0;if(Z===92){if(it(u,C,u.position,!0),Z=u.input.charCodeAt(++u.position),b(Z))Oe(u,!1,S);else if(Z<256&&bt[Z])u.result+=Ve[Z],u.position++;else if((A=j(Z))>0){let g=A,T=0;for(;g>0;g--)Z=u.input.charCodeAt(++u.position),(A=F(Z))>=0?T=(T<<4)+A:V(u,"expected hexadecimal character");u.result+=oe(T),u.position++}else V(u,"unknown escape sequence");C=N=u.position}else b(Z)?(it(u,C,N,!0),Et(u,Oe(u,!1,S)),C=N=u.position):u.position===u.lineStart&&Tt(u)?V(u,"unexpected end of the document within a double quoted scalar"):(u.position++,w(Z)||(N=u.position))}V(u,"unexpected end of the stream within a double quoted scalar")}function zt(u,S){let C=!0,N,A,Z,g=u.tag,T,D=u.anchor,O,z,M,L,Q=Object.create(null),J,ie,ce,ze=u.input.charCodeAt(u.position);if(ze===91)O=93,L=!1,T=[];else if(ze===123)O=125,L=!0,T={};else return!1;for(u.anchor!==null&&Zt(u,u.anchor,T),ze=u.input.charCodeAt(++u.position);ze!==0;){if(Oe(u,!0,S),ze=u.input.charCodeAt(u.position),ze===O)return u.position++,u.tag=g,u.anchor=D,u.kind=L?"mapping":"sequence",u.result=T,!0;if(C?ze===44&&V(u,"expected the node content, but found ','"):V(u,"missed comma between flow collection entries"),ie=J=ce=null,z=M=!1,ze===63){let st=u.input.charCodeAt(u.position+1);k(st)&&(z=M=!0,u.position++,Oe(u,!0,S))}N=u.line,A=u.lineStart,Z=u.position,We(u,S,i,!1,!0),ie=u.tag,J=u.result,Oe(u,!0,S),ze=u.input.charCodeAt(u.position),(M||u.line===N)&&ze===58&&(z=!0,ze=u.input.charCodeAt(++u.position),Oe(u,!0,S),We(u,S,i,!1,!0),ce=u.result),L?ke(u,T,Q,ie,J,ce,N,A,Z):z?T.push(ke(u,null,Q,ie,J,ce,N,A,Z)):T.push(J),Oe(u,!0,S),ze=u.input.charCodeAt(u.position),ze===44?(C=!0,ze=u.input.charCodeAt(++u.position)):C=!1}V(u,"unexpected end of the stream within a flow collection")}function pe(u,S){let C,N=l,A=!1,Z=!1,g=S,T=0,D=!1,O,z=u.input.charCodeAt(u.position);if(z===124)C=!1;else if(z===62)C=!0;else return!1;for(u.kind="scalar",u.result="";z!==0;)if(z=u.input.charCodeAt(++u.position),z===43||z===45)l===N?N=z===43?d:p:V(u,"repeat of a chomping mode identifier");else if((O=me(z))>=0)O===0?V(u,"bad explicit indentation width of a block scalar; it cannot be less than one"):Z?V(u,"repeat of an indentation width identifier"):(g=S+O-1,Z=!0);else break;if(w(z)){do z=u.input.charCodeAt(++u.position);while(w(z));if(z===35)do z=u.input.charCodeAt(++u.position);while(!b(z)&&z!==0)}for(;z!==0;){for(ut(u),u.lineIndent=0,z=u.input.charCodeAt(u.position);(!Z||u.lineIndent<g)&&z===32;)u.lineIndent++,z=u.input.charCodeAt(++u.position);if(!Z&&u.lineIndent>g&&(g=u.lineIndent),b(z)){T++;continue}if(!Z&&g===0&&V(u,"missing indentation for block scalar"),u.lineIndent<g){N===d?u.result+=t.repeat(`
|
|
83
|
+
`,A?1+T:T):N===l&&A&&(u.result+=`
|
|
84
|
+
`);break}C?w(z)?(D=!0,u.result+=t.repeat(`
|
|
85
|
+
`,A?1+T:T)):D?(D=!1,u.result+=t.repeat(`
|
|
86
|
+
`,T+1)):T===0?A&&(u.result+=" "):u.result+=t.repeat(`
|
|
87
|
+
`,T):u.result+=t.repeat(`
|
|
88
|
+
`,A?1+T:T),A=!0,Z=!0,T=0;let M=u.position;for(;!b(z)&&z!==0;)z=u.input.charCodeAt(++u.position);it(u,M,u.position,!1)}return!0}function Ye(u,S){let C=u.tag,N=u.anchor,A=[],Z=!1;if(u.firstTabInLine!==-1)return!1;u.anchor!==null&&Zt(u,u.anchor,A);let g=u.input.charCodeAt(u.position);for(;g!==0&&(u.firstTabInLine!==-1&&(u.position=u.firstTabInLine,V(u,"tab characters must not be used in indentation")),g===45);){let T=u.input.charCodeAt(u.position+1);if(!k(T))break;if(Z=!0,u.position++,Oe(u,!0,-1)&&u.lineIndent<=S){A.push(null),g=u.input.charCodeAt(u.position);continue}let D=u.line;if(We(u,S,a,!1,!0),A.push(u.result),Oe(u,!0,-1),g=u.input.charCodeAt(u.position),(u.line===D||u.lineIndent>S)&&g!==0)V(u,"bad indentation of a sequence entry");else if(u.lineIndent<S)break}return Z?(u.tag=C,u.anchor=N,u.kind="sequence",u.result=A,!0):!1}function W(u,S,C){let N,A,Z,g,T=u.tag,D=u.anchor,O={},z=Object.create(null),M=null,L=null,Q=null,J=!1,ie=!1;if(u.firstTabInLine!==-1)return!1;u.anchor!==null&&Zt(u,u.anchor,O);let ce=u.input.charCodeAt(u.position);for(;ce!==0;){!J&&u.firstTabInLine!==-1&&(u.position=u.firstTabInLine,V(u,"tab characters must not be used in indentation"));let ze=u.input.charCodeAt(u.position+1),st=u.line;if((ce===63||ce===58)&&k(ze))ce===63?(J&&(ke(u,O,z,M,L,null,A,Z,g),M=L=Q=null),ie=!0,J=!0,N=!0):J?(J=!1,N=!0):V(u,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),u.position+=1,ce=ze;else{if(A=u.line,Z=u.lineStart,g=u.position,!We(u,C,s,!1,!0))break;if(u.line===st){for(ce=u.input.charCodeAt(u.position);w(ce);)ce=u.input.charCodeAt(++u.position);if(ce===58)ce=u.input.charCodeAt(++u.position),k(ce)||V(u,"a whitespace character is expected after the key-value separator within a block mapping"),J&&(ke(u,O,z,M,L,null,A,Z,g),M=L=Q=null),ie=!0,J=!1,N=!1,M=u.tag,L=u.result;else if(ie)V(u,"can not read an implicit mapping pair; a colon is missed");else return u.tag=T,u.anchor=D,!0}else if(ie)V(u,"can not read a block mapping entry; a multiline key may not be an implicit key");else return u.tag=T,u.anchor=D,!0}if((u.line===st||u.lineIndent>S)&&(J&&(A=u.line,Z=u.lineStart,g=u.position),We(u,S,c,!0,N)&&(J?L=u.result:Q=u.result),J||(ke(u,O,z,M,L,Q,A,Z,g),M=L=Q=null),Oe(u,!0,-1),ce=u.input.charCodeAt(u.position)),(u.line===st||u.lineIndent>S)&&ce!==0)V(u,"bad indentation of a mapping entry");else if(u.lineIndent<S)break}return J&&ke(u,O,z,M,L,null,A,Z,g),ie&&(u.tag=T,u.anchor=D,u.kind="mapping",u.result=O),ie}function G(u){let S=!1,C=!1,N,A,Z=u.input.charCodeAt(u.position);if(Z!==33)return!1;u.tag!==null&&V(u,"duplication of a tag property"),Z=u.input.charCodeAt(++u.position),Z===60?(S=!0,Z=u.input.charCodeAt(++u.position)):Z===33?(C=!0,N="!!",Z=u.input.charCodeAt(++u.position)):N="!";let g=u.position;if(S){do Z=u.input.charCodeAt(++u.position);while(Z!==0&&Z!==62);u.position<u.length?(A=u.input.slice(g,u.position),Z=u.input.charCodeAt(++u.position)):V(u,"unexpected end of the stream within a verbatim tag")}else{for(;Z!==0&&!k(Z);)Z===33&&(C?V(u,"tag suffix cannot contain exclamation marks"):(N=u.input.slice(g-1,u.position+1),v.test(N)||V(u,"named tag handle cannot contain such characters"),C=!0,g=u.position+1)),Z=u.input.charCodeAt(++u.position);A=u.input.slice(g,u.position),y.test(A)&&V(u,"tag suffix cannot contain flow indicator characters")}A&&!x.test(A)&&V(u,"tag name cannot contain such characters: "+A);try{A=decodeURIComponent(A)}catch{V(u,"tag name is malformed: "+A)}return S?u.tag=A:o.call(u.tagMap,N)?u.tag=u.tagMap[N]+A:N==="!"?u.tag="!"+A:N==="!!"?u.tag="tag:yaml.org,2002:"+A:V(u,'undeclared tag handle "'+N+'"'),!0}function be(u){let S=u.input.charCodeAt(u.position);if(S!==38)return!1;u.anchor!==null&&V(u,"duplication of an anchor property"),S=u.input.charCodeAt(++u.position);let C=u.position;for(;S!==0&&!k(S)&&!E(S);)S=u.input.charCodeAt(++u.position);return u.position===C&&V(u,"name of an anchor node must contain at least one character"),u.anchor=u.input.slice(C,u.position),!0}function Ge(u){let S=u.input.charCodeAt(u.position);if(S!==42)return!1;S=u.input.charCodeAt(++u.position);let C=u.position;for(;S!==0&&!k(S)&&!E(S);)S=u.input.charCodeAt(++u.position);u.position===C&&V(u,"name of an alias node must contain at least one character");let N=u.input.slice(C,u.position);return o.call(u.anchorMap,N)||V(u,'unidentified alias "'+N+'"'),u.result=u.anchorMap[N],Oe(u,!0,-1),!0}function ye(u,S,C,N){let A=qe(u);return Vn(u),De(u,S),u.tag=null,u.anchor=null,u.kind=null,u.result=null,W(u,C,N)&&u.kind==="mapping"?(Pe(u),!0):(B(u),De(u,A),!1)}function We(u,S,C,N,A){let Z,g,T=1,D=!1,O=!1,z=null,M,L,Q;u.depth>=u.maxDepth&&V(u,"nesting exceeded maxDepth ("+u.maxDepth+")"),u.depth+=1,u.listener!==null&&u.listener("open",u),u.tag=null,u.anchor=null,u.kind=null,u.result=null;let J=Z=g=c===C||a===C;if(N&&Oe(u,!0,-1)&&(D=!0,u.lineIndent>S?T=1:u.lineIndent===S?T=0:u.lineIndent<S&&(T=-1)),T===1)for(;;){let ie=u.input.charCodeAt(u.position),ce=qe(u);if(D&&(ie===33&&u.tag!==null||ie===38&&u.anchor!==null)||!G(u)&&!be(u))break;z===null&&(z=ce),Oe(u,!0,-1)?(D=!0,g=J,u.lineIndent>S?T=1:u.lineIndent===S?T=0:u.lineIndent<S&&(T=-1)):g=!1}if(g&&(g=D||A),T===1||c===C)if(i===C||s===C?L=S:L=S+1,Q=u.position-u.lineStart,T===1)if(g&&(Ye(u,Q)||W(u,Q,L))||zt(u,L))O=!0;else{let ie=u.input.charCodeAt(u.position);z!==null&&J&&!g&&ie!==124&&ie!==62&&ye(u,z,z.position-z.lineStart,L)||Z&&pe(u,L)||Bt(u,L)||_n(u,L)?O=!0:Ge(u)?(O=!0,(u.tag!==null||u.anchor!==null)&&V(u,"alias node should not have any properties")):Te(u,L,i===C)&&(O=!0,u.tag===null&&(u.tag="?")),u.anchor!==null&&Zt(u,u.anchor,u.result)}else T===0&&(O=g&&Ye(u,Q));if(u.tag===null)u.anchor!==null&&Zt(u,u.anchor,u.result);else if(u.tag==="?"){u.result!==null&&u.kind!=="scalar"&&V(u,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+u.kind+'"');for(let ie=0,ce=u.implicitTypes.length;ie<ce;ie+=1)if(M=u.implicitTypes[ie],M.resolve(u.result)){u.result=M.construct(u.result),u.tag=M.tag,u.anchor!==null&&Zt(u,u.anchor,u.result);break}}else if(u.tag!=="!"){if(o.call(u.typeMap[u.kind||"fallback"],u.tag))M=u.typeMap[u.kind||"fallback"][u.tag];else{M=null;let ie=u.typeMap.multi[u.kind||"fallback"];for(let ce=0,ze=ie.length;ce<ze;ce+=1)if(u.tag.slice(0,ie[ce].tag.length)===ie[ce].tag){M=ie[ce];break}}M||V(u,"unknown tag !<"+u.tag+">"),u.result!==null&&M.kind!==u.kind&&V(u,"unacceptable node kind for !<"+u.tag+'> tag; it should be "'+M.kind+'", not "'+u.kind+'"'),M.resolve(u.result,u.tag)?(u.result=M.construct(u.result,u.tag),u.anchor!==null&&Zt(u,u.anchor,u.result)):V(u,"cannot resolve a node with !<"+u.tag+"> explicit tag")}return u.listener!==null&&u.listener("close",u),u.depth-=1,u.tag!==null||u.anchor!==null||O}function St(u){let S=u.position,C=!1,N;for(u.version=null,u.checkLineBreaks=u.legacy,u.tagMap=Object.create(null),u.anchorMap=Object.create(null);(N=u.input.charCodeAt(u.position))!==0&&(Oe(u,!0,-1),N=u.input.charCodeAt(u.position),!(u.lineIndent>0||N!==37));){C=!0,N=u.input.charCodeAt(++u.position);let A=u.position;for(;N!==0&&!k(N);)N=u.input.charCodeAt(++u.position);let Z=u.input.slice(A,u.position),g=[];for(Z.length<1&&V(u,"directive name must not be less than one character in length");N!==0;){for(;w(N);)N=u.input.charCodeAt(++u.position);if(N===35){do N=u.input.charCodeAt(++u.position);while(N!==0&&!b(N));break}if(b(N))break;for(A=u.position;N!==0&&!k(N);)N=u.input.charCodeAt(++u.position);g.push(u.input.slice(A,u.position))}N!==0&&ut(u),o.call(Yt,Z)?Yt[Z](u,Z,g):At(u,'unknown document directive "'+Z+'"')}if(Oe(u,!0,-1),u.lineIndent===0&&u.input.charCodeAt(u.position)===45&&u.input.charCodeAt(u.position+1)===45&&u.input.charCodeAt(u.position+2)===45?(u.position+=3,Oe(u,!0,-1)):C&&V(u,"directives end mark is expected"),We(u,u.lineIndent-1,c,!1,!0),Oe(u,!0,-1),u.checkLineBreaks&&h.test(u.input.slice(S,u.position))&&At(u,"non-ASCII line breaks are interpreted as content"),u.documents.push(u.result),u.position===u.lineStart&&Tt(u)){u.input.charCodeAt(u.position)===46&&(u.position+=3,Oe(u,!0,-1));return}u.position<u.length-1&&V(u,"end of the stream or a document separator is expected")}function Qe(u,S){u=String(u),S=S||{},u.length!==0&&(u.charCodeAt(u.length-1)!==10&&u.charCodeAt(u.length-1)!==13&&(u+=`
|
|
89
|
+
`),u.charCodeAt(0)===65279&&(u=u.slice(1)));let C=new ae(u,S),N=u.indexOf("\0");for(N!==-1&&(C.position=N,V(C,"null byte is not allowed in input")),C.input+="\0";C.input.charCodeAt(C.position)===32;)C.lineIndent+=1,C.position+=1;for(;C.position<C.length-1;)St(C);return C.documents}function On(u,S,C){S!==null&&typeof S=="object"&&typeof C>"u"&&(C=S,S=null);let N=Qe(u,C);if(typeof S!="function")return N;for(let A=0,Z=N.length;A<Z;A+=1)S(N[A])}function cr(u,S){let C=Qe(u,S);if(C.length!==0){if(C.length===1)return C[0];throw new e("expected a single document in the stream, but found more")}}return ou.loadAll=On,ou.load=cr,ou}var oy={},KE;function xq(){if(KE)return oy;KE=1;let t=Ia(),e=Ca(),n=iy(),r=Object.prototype.toString,o=Object.prototype.hasOwnProperty,i=65279,s=9,a=10,c=13,l=32,p=33,d=34,f=35,h=37,y=38,v=39,x=42,m=44,b=45,w=58,k=61,E=62,F=63,j=64,me=91,de=93,oe=96,Re=123,bt=124,Ve=125,ae={};ae[0]="\\0",ae[7]="\\a",ae[8]="\\b",ae[9]="\\t",ae[10]="\\n",ae[11]="\\v",ae[12]="\\f",ae[13]="\\r",ae[27]="\\e",ae[34]='\\"',ae[92]="\\\\",ae[133]="\\N",ae[160]="\\_",ae[8232]="\\L",ae[8233]="\\P";let yt=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],V=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function At(g,T){if(T===null)return{};let D={},O=Object.keys(T);for(let z=0,M=O.length;z<M;z+=1){let L=O[z],Q=String(T[L]);L.slice(0,2)==="!!"&&(L="tag:yaml.org,2002:"+L.slice(2));let J=g.compiledTypeMap.fallback[L];J&&o.call(J.styleAliases,Q)&&(Q=J.styleAliases[Q]),D[L]=Q}return D}function Zt(g){let T,D,O=g.toString(16).toUpperCase();if(g<=255)T="x",D=2;else if(g<=65535)T="u",D=4;else if(g<=4294967295)T="U",D=8;else throw new e("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+T+t.repeat("0",D-O.length)+O}let Vn=1,Pe=2;function B(g){this.schema=g.schema||n,this.indent=Math.max(1,g.indent||2),this.noArrayIndent=g.noArrayIndent||!1,this.skipInvalid=g.skipInvalid||!1,this.flowLevel=t.isNothing(g.flowLevel)?-1:g.flowLevel,this.styleMap=At(this.schema,g.styles||null),this.sortKeys=g.sortKeys||!1,this.lineWidth=g.lineWidth||80,this.noRefs=g.noRefs||!1,this.noCompatMode=g.noCompatMode||!1,this.condenseFlow=g.condenseFlow||!1,this.quotingType=g.quotingType==='"'?Pe:Vn,this.forceQuotes=g.forceQuotes||!1,this.replacer=typeof g.replacer=="function"?g.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function qe(g,T){let D=t.repeat(" ",T),O=0,z="",M=g.length;for(;O<M;){let L,Q=g.indexOf(`
|
|
90
|
+
`,O);Q===-1?(L=g.slice(O),O=M):(L=g.slice(O,Q+1),O=Q+1),L.length&&L!==`
|
|
91
|
+
`&&(z+=D),z+=L}return z}function De(g,T){return`
|
|
92
|
+
`+t.repeat(" ",g.indent*T)}function Yt(g,T){for(let D=0,O=g.implicitTypes.length;D<O;D+=1)if(g.implicitTypes[D].resolve(T))return!0;return!1}function it(g){return g===l||g===s}function ge(g){return g>=32&&g<=126||g>=161&&g<=55295&&g!==8232&&g!==8233||g>=57344&&g<=65533&&g!==i||g>=65536&&g<=1114111}function ke(g){return ge(g)&&g!==i&&g!==c&&g!==a}function ut(g,T,D){let O=ke(g),z=O&&!it(g);return(D?O:O&&g!==m&&g!==me&&g!==de&&g!==Re&&g!==Ve)&&g!==f&&!(T===w&&!z)||ke(T)&&!it(T)&&g===f||T===w&&z}function Oe(g){return ge(g)&&g!==i&&!it(g)&&g!==b&&g!==F&&g!==w&&g!==m&&g!==me&&g!==de&&g!==Re&&g!==Ve&&g!==f&&g!==y&&g!==x&&g!==p&&g!==bt&&g!==k&&g!==E&&g!==v&&g!==d&&g!==h&&g!==j&&g!==oe}function Tt(g){return!it(g)&&g!==w}function Et(g,T){let D=g.charCodeAt(T),O;return D>=55296&&D<=56319&&T+1<g.length&&(O=g.charCodeAt(T+1),O>=56320&&O<=57343)?(D-55296)*1024+O-56320+65536:D}function Te(g){return/^\n* /.test(g)}let Bt=1,_n=2,zt=3,pe=4,Ye=5;function W(g,T,D,O,z,M,L,Q){let J,ie=0,ce=null,ze=!1,st=!1,hy=O!==-1,Xi=-1,Qi=Oe(Et(g,0))&&Tt(Et(g,g.length-1));if(T||L)for(J=0;J<g.length;ie>=65536?J+=2:J++){if(ie=Et(g,J),!ge(ie))return Ye;Qi=Qi&&ut(ie,ce,Q),ce=ie}else{for(J=0;J<g.length;ie>=65536?J+=2:J++){if(ie=Et(g,J),ie===a)ze=!0,hy&&(st=st||J-Xi-1>O&&g[Xi+1]!==" ",Xi=J);else if(!ge(ie))return Ye;Qi=Qi&&ut(ie,ce,Q),ce=ie}st=st||hy&&J-Xi-1>O&&g[Xi+1]!==" "}return!ze&&!st?Qi&&!L&&!z(g)?Bt:M===Pe?Ye:_n:D>9&&Te(g)?Ye:L?M===Pe?Ye:_n:st?pe:zt}function G(g,T,D,O,z){g.dump=(function(){if(T.length===0)return g.quotingType===Pe?'""':"''";if(!g.noCompatMode&&(yt.indexOf(T)!==-1||V.test(T)))return g.quotingType===Pe?'"'+T+'"':"'"+T+"'";let M=g.indent*Math.max(1,D),L=g.lineWidth===-1?-1:Math.max(Math.min(g.lineWidth,40),g.lineWidth-M),Q=O||g.flowLevel>-1&&D>=g.flowLevel;function J(ie){return Yt(g,ie)}switch(W(T,Q,g.indent,L,J,g.quotingType,g.forceQuotes&&!O,z)){case Bt:return T;case _n:return"'"+T.replace(/'/g,"''")+"'";case zt:return"|"+be(T,g.indent)+Ge(qe(T,M));case pe:return">"+be(T,g.indent)+Ge(qe(ye(T,L),M));case Ye:return'"'+St(T)+'"';default:throw new e("impossible error: invalid scalar style")}})()}function be(g,T){let D=Te(g)?String(T):"",O=g[g.length-1]===`
|
|
93
|
+
`,M=O&&(g[g.length-2]===`
|
|
94
|
+
`||g===`
|
|
95
|
+
`)?"+":O?"":"-";return D+M+`
|
|
96
|
+
`}function Ge(g){return g[g.length-1]===`
|
|
97
|
+
`?g.slice(0,-1):g}function ye(g,T){let D=/(\n+)([^\n]*)/g,O=(function(){let Q=g.indexOf(`
|
|
98
|
+
`);return Q=Q!==-1?Q:g.length,D.lastIndex=Q,We(g.slice(0,Q),T)})(),z=g[0]===`
|
|
99
|
+
`||g[0]===" ",M,L;for(;L=D.exec(g);){let Q=L[1],J=L[2];M=J[0]===" ",O+=Q+(!z&&!M&&J!==""?`
|
|
100
|
+
`:"")+We(J,T),z=M}return O}function We(g,T){if(g===""||g[0]===" ")return g;let D=/ [^ ]/g,O,z=0,M,L=0,Q=0,J="";for(;O=D.exec(g);)Q=O.index,Q-z>T&&(M=L>z?L:Q,J+=`
|
|
101
|
+
`+g.slice(z,M),z=M+1),L=Q;return J+=`
|
|
102
|
+
`,g.length-z>T&&L>z?J+=g.slice(z,L)+`
|
|
103
|
+
`+g.slice(L+1):J+=g.slice(z),J.slice(1)}function St(g){let T="",D=0;for(let O=0;O<g.length;D>=65536?O+=2:O++){D=Et(g,O);let z=ae[D];!z&&ge(D)?(T+=g[O],D>=65536&&(T+=g[O+1])):T+=z||Zt(D)}return T}function Qe(g,T,D){let O="",z=g.tag;for(let M=0,L=D.length;M<L;M+=1){let Q=D[M];g.replacer&&(Q=g.replacer.call(D,String(M),Q)),(C(g,T,Q,!1,!1)||typeof Q>"u"&&C(g,T,null,!1,!1))&&(O!==""&&(O+=","+(g.condenseFlow?"":" ")),O+=g.dump)}g.tag=z,g.dump="["+O+"]"}function On(g,T,D,O){let z="",M=g.tag;for(let L=0,Q=D.length;L<Q;L+=1){let J=D[L];g.replacer&&(J=g.replacer.call(D,String(L),J)),(C(g,T+1,J,!0,!0,!1,!0)||typeof J>"u"&&C(g,T+1,null,!0,!0,!1,!0))&&((!O||z!=="")&&(z+=De(g,T)),g.dump&&a===g.dump.charCodeAt(0)?z+="-":z+="- ",z+=g.dump)}g.tag=M,g.dump=z||"[]"}function cr(g,T,D){let O="",z=g.tag,M=Object.keys(D);for(let L=0,Q=M.length;L<Q;L+=1){let J="";O!==""&&(J+=", "),g.condenseFlow&&(J+='"');let ie=M[L],ce=D[ie];g.replacer&&(ce=g.replacer.call(D,ie,ce)),C(g,T,ie,!1,!1)&&(g.dump.length>1024&&(J+="? "),J+=g.dump+(g.condenseFlow?'"':"")+":"+(g.condenseFlow?"":" "),C(g,T,ce,!1,!1)&&(J+=g.dump,O+=J))}g.tag=z,g.dump="{"+O+"}"}function u(g,T,D,O){let z="",M=g.tag,L=Object.keys(D);if(g.sortKeys===!0)L.sort();else if(typeof g.sortKeys=="function")L.sort(g.sortKeys);else if(g.sortKeys)throw new e("sortKeys must be a boolean or a function");for(let Q=0,J=L.length;Q<J;Q+=1){let ie="";(!O||z!=="")&&(ie+=De(g,T));let ce=L[Q],ze=D[ce];if(g.replacer&&(ze=g.replacer.call(D,ce,ze)),!C(g,T+1,ce,!0,!0,!0))continue;let st=g.tag!==null&&g.tag!=="?"||g.dump&&g.dump.length>1024;st&&(g.dump&&a===g.dump.charCodeAt(0)?ie+="?":ie+="? "),ie+=g.dump,st&&(ie+=De(g,T)),C(g,T+1,ze,!0,st)&&(g.dump&&a===g.dump.charCodeAt(0)?ie+=":":ie+=": ",ie+=g.dump,z+=ie)}g.tag=M,g.dump=z||"{}"}function S(g,T,D){let O=D?g.explicitTypes:g.implicitTypes;for(let z=0,M=O.length;z<M;z+=1){let L=O[z];if((L.instanceOf||L.predicate)&&(!L.instanceOf||typeof T=="object"&&T instanceof L.instanceOf)&&(!L.predicate||L.predicate(T))){if(D?L.multi&&L.representName?g.tag=L.representName(T):g.tag=L.tag:g.tag="?",L.represent){let Q=g.styleMap[L.tag]||L.defaultStyle,J;if(r.call(L.represent)==="[object Function]")J=L.represent(T,Q);else if(o.call(L.represent,Q))J=L.represent[Q](T,Q);else throw new e("!<"+L.tag+'> tag resolver accepts not "'+Q+'" style');g.dump=J}return!0}}return!1}function C(g,T,D,O,z,M,L){g.tag=null,g.dump=D,S(g,D,!1)||S(g,D,!0);let Q=r.call(g.dump),J=O;O&&(O=g.flowLevel<0||g.flowLevel>T);let ie=Q==="[object Object]"||Q==="[object Array]",ce,ze;if(ie&&(ce=g.duplicates.indexOf(D),ze=ce!==-1),(g.tag!==null&&g.tag!=="?"||ze||g.indent!==2&&T>0)&&(z=!1),ze&&g.usedDuplicates[ce])g.dump="*ref_"+ce;else{if(ie&&ze&&!g.usedDuplicates[ce]&&(g.usedDuplicates[ce]=!0),Q==="[object Object]")O&&Object.keys(g.dump).length!==0?(u(g,T,g.dump,z),ze&&(g.dump="&ref_"+ce+g.dump)):(cr(g,T,g.dump),ze&&(g.dump="&ref_"+ce+" "+g.dump));else if(Q==="[object Array]")O&&g.dump.length!==0?(g.noArrayIndent&&!L&&T>0?On(g,T-1,g.dump,z):On(g,T,g.dump,z),ze&&(g.dump="&ref_"+ce+g.dump)):(Qe(g,T,g.dump),ze&&(g.dump="&ref_"+ce+" "+g.dump));else if(Q==="[object String]")g.tag!=="?"&&G(g,g.dump,T,M,J);else{if(Q==="[object Undefined]")return!1;if(g.skipInvalid)return!1;throw new e("unacceptable kind of an object to dump "+Q)}if(g.tag!==null&&g.tag!=="?"){let st=encodeURI(g.tag[0]==="!"?g.tag.slice(1):g.tag).replace(/!/g,"%21");g.tag[0]==="!"?st="!"+st:st.slice(0,18)==="tag:yaml.org,2002:"?st="!!"+st.slice(18):st="!<"+st+">",g.dump=st+" "+g.dump}}return!0}function N(g,T){let D=[],O=[];A(g,D,O);let z=O.length;for(let M=0;M<z;M+=1)T.duplicates.push(D[O[M]]);T.usedDuplicates=new Array(z)}function A(g,T,D){if(g!==null&&typeof g=="object"){let O=T.indexOf(g);if(O!==-1)D.indexOf(O)===-1&&D.push(O);else if(T.push(g),Array.isArray(g))for(let z=0,M=g.length;z<M;z+=1)A(g[z],T,D);else{let z=Object.keys(g);for(let M=0,L=z.length;M<L;M+=1)A(g[z[M]],T,D)}}}function Z(g,T){T=T||{};let D=new B(T);D.noRefs||N(g,D);let O=g;return D.replacer&&(O=D.replacer.call({"":O},"",O)),C(D,0,O,!0,!0)?D.dump+`
|
|
104
|
+
`:""}return oy.dump=Z,oy}var JE;function vq(){if(JE)return Jt;JE=1;let t=yq(),e=xq();function n(r,o){return function(){throw new Error("Function yaml."+r+" is removed in js-yaml 4. Use yaml."+o+" instead, which is now safe by default.")}}return Jt.Type=nn(),Jt.Schema=YE(),Jt.FAILSAFE_SCHEMA=t$(),Jt.JSON_SCHEMA=s$(),Jt.CORE_SCHEMA=a$(),Jt.DEFAULT_SCHEMA=iy(),Jt.load=t.load,Jt.loadAll=t.loadAll,Jt.dump=e.dump,Jt.YAMLException=Ca(),Jt.types={binary:u$(),float:i$(),map:e$(),null:n$(),pairs:d$(),set:f$(),timestamp:c$(),bool:r$(),int:o$(),merge:l$(),omap:p$(),seq:QE(),str:XE()},Jt.safeLoad=n("safeLoad","load"),Jt.safeLoadAll=n("safeLoadAll","loadAll"),Jt.safeDump=n("safeDump","dump"),Jt}var bq=vq(),sy=hq(bq),{Type:s7,Schema:a7,FAILSAFE_SCHEMA:c7,JSON_SCHEMA:l7,CORE_SCHEMA:u7,DEFAULT_SCHEMA:p7,load:d7,loadAll:f7,dump:m7,YAMLException:h7,types:g7,safeLoad:y7,safeLoadAll:x7,safeDump:v7}=sy;var m$=["json","yaml","tree"],_q=`Output format for design data. Defaults to json.
|
|
117
105
|
- json \u2014 default; useful when piping output into tools that expect JSON.
|
|
118
106
|
- yaml \u2014 fewer tokens than JSON for typical designs.
|
|
119
|
-
- tree \u2014 experimental compact format. Structural keys (id, name, type) are encoded positionally on each node line, and style values stay deduplicated in a globalVars block. Designs with heavy style reuse see the largest token savings.`;function
|
|
120
|
-
`):Array.isArray(e.sections)?
|
|
121
|
-
`)}var
|
|
122
|
-
`)}function
|
|
123
|
-
`)):(e.push("svgs:"),
|
|
107
|
+
- tree \u2014 experimental compact format. Structural keys (id, name, type) are encoded positionally on each node line, and style values stay deduplicated in a globalVars block. Designs with heavy style reuse see the largest token savings.`;function Kr(){return Y.enum(m$).optional().describe(_q)}function Jr(t,e){let n=wq(e);return n==="yaml"?kq(t):n==="tree"?$q(t):JSON.stringify(t)}function iu(t){return Sq(t)?t:null}function wq(t){return iu(t)??iu(process.env.DEFAULT_FORMAT)??"json"}function Sq(t){return typeof t=="string"&&m$.includes(t)}function kq(t){try{return sy.dump(t,{lineWidth:-1,noRefs:!0,quotingType:'"',sortKeys:!1})}catch(e){return console.warn(`[format] yaml serialization failed, returning json: ${e instanceof Error?e.message:String(e)}`),JSON.stringify(t)}}var Tq=new Set(["type","id","name","layoutStyle","fill","strokeColor","strokeType","strokeAlign","strokeWidth","componentId","componentInfo","flexContainerInfo","text","textColor","children"]),Eq=new Set(["width","height","relativeX","relativeY"]);function Vo(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function $q(t){if(!Vo(t))return JSON.stringify(t);let e=t;return Vo(e.dsl)&&Array.isArray(e.dsl.nodes)?Rq(e):Array.isArray(e.nodes)?h$(e,[]).join(`
|
|
108
|
+
`):Array.isArray(e.sections)?Iq(e):Array.isArray(e.svgs)?Cq(e):Vo(e.svgs)||Vo(e.texts)?Pq(e):JSON.stringify(t)}function h$(t,e){if(e.push("globalVars:"),Vo(t.styles))for(let[n,r]of Object.entries(t.styles))e.push(` ${n}: ${JSON.stringify(r)}`);t.components!==void 0&&e.push(`components: ${JSON.stringify(t.components)}`);for(let[n,r]of Object.entries(t))n==="styles"||n==="nodes"||n==="components"||e.push(`${n}: ${JSON.stringify(r)}`);e.push("tree:");for(let n of t.nodes??[])g$(n,1,e);return e}function Rq(t){let e=[];for(let[n,r]of Object.entries(t))n!=="dsl"&&e.push(`${n}: ${JSON.stringify(r)}`);return h$(t.dsl,e),e.join(`
|
|
109
|
+
`)}var Aq=new Set(["type","id","name","nodeCount","x","y","width","height","layoutStyle"]);function Iq(t){let e=[],n=Array.isArray(t.sections)?t.sections:[];for(let[r,o]of Object.entries(t))r!=="sections"&&e.push(`${r}: ${JSON.stringify(o)}`);return e.push("sections:"),n.forEach((r,o)=>{let i=r.layoutStyle??{},s=r.width??i.width,a=r.height??i.height,c=r.x??i.relativeX,l=r.y??i.relativeY,p=[];Wi(p,"nodeCount",r.nodeCount),e.push(` [${o}] ${r.type??"?"} ${r.id??"?"} ${su(r.name)} ${Wr(s)}x${Wr(a)} @${Wr(c)},${Wr(l)}`+(p.length?" "+p.join(" "):""));for(let[d,f]of Object.entries(r))Aq.has(d)||f===void 0||e.push(` ${d}=${JSON.stringify(f)}`)}),e.join(`
|
|
110
|
+
`)}function Cq(t){let e=[];for(let[r,o]of Object.entries(t))r!=="svgs"&&e.push(`${r}: ${JSON.stringify(o)}`);let n=Array.isArray(t.svgs)?t.svgs:[];return n.length===0?(e.push("svgs: []"),e.join(`
|
|
111
|
+
`)):(e.push("svgs:"),n.forEach((r,o)=>{e.push(` [${o}] ${su(r.name)} (${r.id??"?"})`);let i=r.svg;if(typeof i=="string"&&!i.includes(`
|
|
124
112
|
`))e.push(` ${i}`);else if(typeof i=="string")if(i==="")e.push(' ""');else for(let s of i.split(`
|
|
125
113
|
`))e.push(" "+s);else e.push(` ${JSON.stringify(i)}`)}),e.join(`
|
|
126
|
-
`))}function
|
|
127
|
-
`)}function
|
|
128
|
-
`)){
|
|
129
|
-
`))
|
|
114
|
+
`))}function Pq(t){let e=[],n=Vo(t.svgs)?"svgs":Vo(t.texts)?"texts":null;for(let[r,o]of Object.entries(t))r!==n&&e.push(`${r}: ${JSON.stringify(o)}`);if(n){let r=t[n],o=Object.entries(r);if(o.length===0)e.push(`${n}: {}`);else{e.push(`${n}:`);for(let[i,s]of o)Oq(i,s," ",e)}}return e.join(`
|
|
115
|
+
`)}function Oq(t,e,n,r){if(typeof e=="string"&&!e.includes(`
|
|
116
|
+
`)){r.push(`${n}${t}: ${e}`);return}r.push(`${n}${t}:`);let o=n+" ";if(typeof e=="string")if(e==="")r.push(`${o}""`);else for(let i of e.split(`
|
|
117
|
+
`))r.push(o+i);else r.push(`${o}${JSON.stringify(e)}`)}function g$(t,e,n){let r=" ".repeat(e),o=t.layoutStyle??{},i=`${Wr(o.width)}x${Wr(o.height)}`,s=`@${Wr(o.relativeX)},${Wr(o.relativeY)}`,a=[];for(let[l,p]of Object.entries(o))Eq.has(l)||p===void 0||p===null||a.push(`${l}=${p}`);Wi(a,"fill",t.fill),t.strokeColor?a.push(`stroke=${t.strokeColor}${t.strokeWidth?"/"+t.strokeWidth:""}`):t.strokeWidth&&Wi(a,"strokeWidth",t.strokeWidth),Wi(a,"strokeType",t.strokeType),Wi(a,"strokeAlign",t.strokeAlign),Wi(a,"component",t.componentId),n.push(`${r}${t.type??"?"} ${t.id??"?"} ${su(t.name)} ${i} ${s}`+(a.length?" "+a.join(" "):""));let c=t.componentInfo;if(c&&typeof c=="object"){let l=c.properties;if(l&&typeof l=="object")for(let[p,d]of Object.entries(l))n.push(`${r} prop ${p}=${JSON.stringify(d)}`);for(let[p,d]of Object.entries(c))p==="properties"||d===void 0||n.push(`${r} ${p}=${JSON.stringify(d)}`)}if(t.flexContainerInfo!==void 0&&n.push(`${r} flex ${JSON.stringify(t.flexContainerInfo)}`),Array.isArray(t.text))for(let l of t.text){let p=l==null?void 0:l.text,d=typeof p=="string"?p:JSON.stringify(p);n.push(`${r} text ${su(d)}${l!=null&&l.font?` font=${l.font}`:""}`)}t.textColor!==void 0&&n.push(`${r} textColor ${JSON.stringify(t.textColor)}`);for(let[l,p]of Object.entries(t))Tq.has(l)||p===void 0||n.push(`${r} ${l}=${JSON.stringify(p)}`);if(Array.isArray(t.children))for(let l of t.children)g$(l,e+1,n)}function Wi(t,e,n){n!=null&&n!==""&&t.push(`${e}=${n}`)}function Wr(t){return t==null?"?":String(t)}function su(t){return'"'+(t==null?"":String(t)).replace(/\\/g,"\\\\").replace(/"/g,'\\"')+'"'}var Pa=new Set,Go=new Map,Oa=new Map,zq=parseInt(process.env.SECTION_TRACKER_MAX_ENTRIES||"1000",10),y$=parseInt(process.env.SECTION_TRACKER_TTL_MS||"1800000",10),_r=new Map;function ay(t){if(_r.has(t))_r.delete(t);else if(_r.size>=zq){let e=_r.keys().next().value;e!==void 0&&(Pa.delete(e),Go.delete(e),Oa.delete(e),_r.delete(e))}_r.set(t,Date.now())}setInterval(()=>{let t=Date.now();for(let[e,n]of _r)t-n>y$&&(Pa.delete(e),Go.delete(e),Oa.delete(e),_r.delete(e))},y$).unref();function x$(t,e){let n=`${t}:${e}`;Pa.add(n),ay(n)}function v$(t,e,n){let r=`${t}:${e}`;Oa.set(r,n),Go.has(r)||Go.set(r,new Set),ay(r)}function b$(t,e,n){let r=`${t}:${e}`,o=Oa.get(r);if(o===void 0)return null;let i=Go.get(r)??new Set;i.add(n),Go.set(r,i),ay(r);let s=[];for(let a=0;a<o;a++)i.has(a)||s.push(a);return{fetched:i.size,total:o,remaining:s.length,missingIndices:s}}function _$(t,e){let n=`${t}:${e}`;Pa.delete(n),Go.delete(n),Oa.delete(n),_r.delete(n)}var Nq="mcp__getDsl",jq=`
|
|
130
118
|
[FALLBACK] Use only when mcp__getDesignSections is unavailable or returns an error.
|
|
131
119
|
This returns the FULL DSL in one response \u2014 may be large and exceed context limits for complex designs.
|
|
132
120
|
Prefer mcp__getDesignSections as the primary tool for all designs.
|
|
@@ -136,12 +124,12 @@ You can provide either:
|
|
|
136
124
|
This tool returns the raw DSL data that you can then parse and analyze. Use the optional 'format' parameter (json/yaml/tree, defaults to json) to control the serialization.
|
|
137
125
|
This tool also returns the rules you must follow when generating code.
|
|
138
126
|
The DSL data can also be used to transform and generate code for different frameworks.
|
|
139
|
-
`,
|
|
127
|
+
`,au=class extends ht{constructor(){super();this.name=Nq;this.description=jq;this.schema=Y.object({fileId:Y.string().optional().describe("MasterGo design file ID (format: file/<fileId> in MasterGo URL). Required if shortLink is not provided."),layerId:Y.string().optional().describe("Layer ID of the specific component or element to retrieve (format: ?layer_id=<layerId> / file=<fileId> in MasterGo URL). Required if shortLink is not provided."),sourceLayerId:Y.string().optional().describe("Source layer ID from URL parameter source_layer_id. When provided, use this instead of layerId for all queries."),shortLink:Y.string().optional().describe("Short link (like https://{domain}/goto/LhGgBAK)."),format:Kr()})}async execute({fileId:n,layerId:r,sourceLayerId:o,shortLink:i,format:s}){var a;try{if(!i&&(!n||!r&&!o))throw new Error("Either provide fileId with layerId (or sourceLayerId), or provide a MasterGo URL");let c=this.normalizeFileId(n),l=r,p=o;if(i){let y=await ot.extractIdsFromUrl(i);c=this.normalizeFileId(y.fileId),l=y.layerId,p=y.sourceLayerId??o}let d=p||l;if(!c||!d)throw new Error("Could not determine fileId or layerId (need layerId or sourceLayerId)");let f=`${c}:${d}`;if(Pa.has(f))return{isError:!0,content:[{type:"text",text:JSON.stringify({error:"getDsl BLOCKED: You have already started the section workflow (mcp__getDesignSections) for this design. Do NOT call getDsl during or after the section workflow \u2014 it returns 195KB+ of full DSL data that will exhaust your context window and prevent you from fetching remaining sections. Continue fetching section DSL via mcp__getDesignSections with sectionIndex=N. If you need data you think only getDsl provides, it is already available in the section DSL responses (rowTexts, dsl.nodes)."})}]};let h=await ot.getDsl(c,d,{sourceLayerId:p});return{content:[{type:"text",text:Jr(h,s)}]}}catch(c){let l=((a=c.response)==null?void 0:a.data)??(c==null?void 0:c.message);return{isError:!0,content:[{type:"text",text:JSON.stringify(l)}]}}}};var Yr=Ee(require("path")),Xr=require("fs"),Ki=require("fs/promises"),Lq="mcp__getD2c",Dq=`
|
|
140
128
|
\u4F7F\u7528\u6B64\u5DE5\u5177\u4ECE MasterGo \u83B7\u53D6 D2C \u6570\u636E\uFF0C\u5E76\u5728\u672C\u5730\u843D\u76D8\uFF1A
|
|
141
129
|
1\uFF09\u5C06\u8FD4\u56DE\u7684 code \u5199\u5165 html\uFF1B
|
|
142
130
|
2\uFF09\u5C06\u8FD4\u56DE\u7684 svg / image \u8D44\u6E90\u6309 resourcePath \u843D\u76D8\u5230\u5BF9\u5E94\u76EE\u5F55\uFF1B
|
|
143
131
|
3\uFF09\u8FD4\u56DE\u843D\u76D8\u6458\u8981\uFF0C\u907F\u514D\u628A\u5927\u4F53\u79EF\u8D44\u6E90\u585E\u8FDB\u4E0A\u4E0B\u6587\u3002
|
|
144
|
-
`;function
|
|
132
|
+
`;function cy(t){return t==null?!0:typeof t=="string"?t.trim().length===0:Array.isArray(t)?t.length===0:typeof t=="object"?Object.keys(t).length===0:!1}function Mq(t){return t==null?!1:typeof t=="string"?t.trim().length>0:Array.isArray(t)?t.length>0:typeof t=="object"?Object.keys(t).length>0:!1}function cu(t){for(let e of t)if(Mq(e))return e}function Fq(t){let e={image:"asset/images",svg:"asset/icons"};if(!cy(t))try{let n=typeof t=="string"?JSON.parse(t):t;n.image&&(e.image=String(n.image).replace(/^(\.\/|\/)/,"").replace(/\/+$/,"")),n.svg&&(e.svg=String(n.svg).replace(/^(\.\/|\/)/,"").replace(/\/+$/,""))}catch{return e}return e}async function w$(t,e,n,r){if(cy(t))return{savedCount:0,attemptedCount:0,errorCount:0};let o;try{o=typeof t=="string"?JSON.parse(t):t}catch{return{savedCount:0,attemptedCount:0,errorCount:1}}if(!o||typeof o!="object")return{savedCount:0,attemptedCount:0,errorCount:1};let i=Object.keys(o);if(i.length===0)return{savedCount:0,attemptedCount:0,errorCount:0};let s=Yr.default.join(e,n);(0,Xr.existsSync)(s)||(0,Xr.mkdirSync)(s,{recursive:!0});let a=0,c=0;return await Promise.all(Object.entries(o).map(async([l,p])=>{let d=String(l).match(/(.+)\.([a-zA-Z0-9]+)$/),f=(d?d[1]:l).replace(/[^a-zA-Z0-9_-]/g,"_"),h=d?d[2]:r,y=Yr.default.join(s,`${f}.${h}`),v=p;try{if(typeof v=="string"&&v.startsWith("http"))try{let b=await vt.get(v,{responseType:"arraybuffer",timeout:3e4});await(0,Ki.writeFile)(y,b.data),a+=1;return}catch(b){if(((b==null?void 0:b.code)==="EPROTO"||String((b==null?void 0:b.message)??"").includes("wrong version number"))&&v.startsWith("https://")){let k=v.replace(/^https:\/\//,"http://"),E=await vt.get(k,{responseType:"arraybuffer",timeout:3e4});await(0,Ki.writeFile)(y,E.data),a+=1;return}c+=1;return}if(typeof v=="string"&&v.startsWith("data:image/")){let b=v.split(";base64,");b.length===2&&(await(0,Ki.writeFile)(y,b[1],"base64"),a+=1);return}let x=typeof v=="object"?JSON.stringify(v,null,2):String(v??"");await(0,Ki.writeFile)(y,x,h==="png"||h==="jpg"||h==="jpeg"?"base64":"utf8"),a+=1}catch{c+=1;return}})),{savedCount:a,attemptedCount:i.length,errorCount:c}}async function Uq(t){let{outDir:e,contentId:n,code:r,resourcePath:o,svg:i,image:s}=t,a=e?Yr.default.isAbsolute(e)?Yr.default.join(e):Yr.default.join(process.cwd(),e):process.cwd();(0,Xr.existsSync)(a)||(0,Xr.mkdirSync)(a,{recursive:!0});let c=`${n||"index"}.html`,l=Yr.default.join(a,c);cy(r)||await(0,Ki.writeFile)(l,r,"utf8");let p=Fq(o),d=y=>{let v=Yr.default.join(a,y);(0,Xr.existsSync)(v)||(0,Xr.mkdirSync)(v,{recursive:!0})};d(p.image),d(p.svg);let[f,h]=await Promise.all([w$(i,a,p.svg,"svg"),w$(s,a,p.image,"png")]);return{targetDir:a,htmlFileName:c,htmlPath:l,svgCount:f.savedCount,imageCount:h.savedCount,resourcePathMap:p}}function qq(t){var l,p;let e=t==null?void 0:t.data,n=Array.isArray(e)?e[0]:void 0,r=(n==null?void 0:n.payload)??(t==null?void 0:t.payload)??((l=t==null?void 0:t.data)==null?void 0:l.payload)??((p=n==null?void 0:n.payload)==null?void 0:p.payload)??(e==null?void 0:e.payload)??{},o=(r==null?void 0:r.code)??(r==null?void 0:r.html)??(r==null?void 0:r.content)??(t==null?void 0:t.code)??"",i=cu([r==null?void 0:r.resourcePath,t==null?void 0:t.resourcePath,n==null?void 0:n.resourcePath]),s=cu([r==null?void 0:r.image,n==null?void 0:n.image]),a=cu([r==null?void 0:r.svg,n==null?void 0:n.svg]),c=cu([r==null?void 0:r.shape,n==null?void 0:n.shape]);return{contentId:String((n==null?void 0:n.contentId)??(r==null?void 0:r.contentId)??(t==null?void 0:t.contentId)??""),frameType:(r==null?void 0:r.frameType)??(n==null?void 0:n.frameType)??(t==null?void 0:t.frameType),code:String(o??""),resourcePath:i,shape:c,svg:a,image:s}}var lu=class extends ht{constructor(){super();this.name=Lq;this.description=Dq;this.schema=Y.object({contentId:Y.string().describe("MasterGo D2C contentId\uFF0C\u4F8B\u5982 mastergo://getd2c/176452330285910-2-2845 \u4E2D\u7684 176452330285910-2-2845\u3002"),documentId:Y.string().describe("MasterGo \u6587\u6863 ID\uFF0C\u901A\u5E38\u4E3A contentId \u7684\u7B2C\u4E00\u6BB5\uFF0C\u4F8B\u5982 contentId \u4E3A 176452330285910-2-9032 \u65F6 documentId \u4E3A 176452330285910\u3002"),outDir:Y.string().optional().describe("\u53EF\u9009\uFF0C\u8F93\u51FA\u76EE\u5F55\uFF08\u7EDD\u5BF9\u8DEF\u5F84\u6216\u76F8\u5BF9\u5F53\u524D\u5DE5\u4F5C\u76EE\u5F55\uFF09\u3002")})}async execute({contentId:n,documentId:r,outDir:o}){var i;try{if(!n)throw new Error("contentId \u4E0D\u80FD\u4E3A\u7A7A");if(!r)throw new Error("documentId \u4E0D\u80FD\u4E3A\u7A7A");let s=await ot.getD2c(n,r),a=qq(s),c=a.contentId||n;return await Uq({outDir:o,contentId:c,code:a.code,resourcePath:a.resourcePath,svg:a.svg,image:a.image}),{content:[{type:"text",text:JSON.stringify(s)}]}}catch(s){let a=((i=s==null?void 0:s.response)==null?void 0:i.data)??(s==null?void 0:s.message);return{isError:!0,content:[{type:"text",text:JSON.stringify(a)}]}}}};var S$=Ee(require("fs")),Zq="mcp__C2d",Bq=`
|
|
145
133
|
\u4F7F\u7528\u6B64\u5DE5\u5177\u5C06\u4EE3\u7801\u6587\u4EF6\u53D1\u9001\u5230 MasterGo MCP \u670D\u52A1\u8FDB\u884C C2D\uFF08\u4EE3\u7801\u8F6C\u8BBE\u8BA1\uFF09\u5904\u7406\uFF0C\u5C06\u7528\u6237\u4EE3\u7801\u540C\u6B65\u5230\u8BBE\u8BA1\u7A3F\u3002
|
|
146
134
|
|
|
147
135
|
\u53C2\u6570\u8BF4\u660E\uFF1A
|
|
@@ -153,7 +141,7 @@ The DSL data can also be used to transform and generate code for different frame
|
|
|
153
141
|
\u5982\u679C\u77ED\u94FE\u63A5\u6216 URL \u4E2D\u6CA1\u6709\u89E3\u6790\u51FA layer_id\uFF0C\u5219\u4E0D\u4F20 layerId\u3002
|
|
154
142
|
|
|
155
143
|
\u5DE5\u5177\u4F1A\u8BFB\u53D6 filePath \u6307\u5B9A\u6587\u4EF6\u7684\u5185\u5BB9\uFF0C\u5E76\u4F20\u7ED9\u540E\u7AEF\uFF0C\u9644\u5E26 fileId \u4E0E\u53EF\u9009\u7684 layerId\u3002
|
|
156
|
-
`,
|
|
144
|
+
`,uu=class extends ht{constructor(){super();this.name=Zq;this.description=Bq;this.schema=Y.object({filePath:Y.string().min(1,"filePath \u4E0D\u80FD\u4E3A\u7A7A").describe("HTML \u6587\u4EF6\u7684\u5B8C\u6574\u8DEF\u5F84\uFF0C\u5DE5\u5177\u4F1A\u8BFB\u53D6\u6587\u4EF6\u5185\u5BB9\u5E76\u53D1\u9001\u7ED9\u540E\u7AEF"),fileId:Y.string().optional().describe("\u6587\u4EF6 ID\uFF08URL \u4E2D file= \u6216\u8DEF\u5F84\u4E2D\u7684\u6570\u5B57\u6BB5\uFF09\u3002\u672A\u4F20 shortLink \u65F6\u5FC5\u586B\u3002"),layerId:Y.string().optional().describe("\u53EF\u9009\u3002\u56FE\u5C42 ID\uFF08\u53EA\u8BFB\u53D6 URL \u53C2\u6570 layer_id\uFF09\u3002\u4E0D\u4F20\u6216\u89E3\u6790\u4E0D\u5230\u5219\u4EC5\u6309 file \u7EF4\u5EA6\u540C\u6B65\uFF1Bpageid/page_id \u4E0D\u4F1A\u88AB\u5F53\u4F5C layerId\u3002"),shortLink:Y.string().optional().describe("Short link (like https://{domain}/goto/LhGgBAK).")})}async execute({filePath:n,fileId:r,layerId:o,shortLink:i}){var s;try{let a=i==null?void 0:i.trim(),c=r==null?void 0:r.trim(),l=o==null?void 0:o.trim(),p,d;if(a){let y=await ot.extractIdsFromUrl(a);p=this.normalizeFileId(y.fileId),d=y.layerId}else if(c)p=this.normalizeFileId(c),d=l||void 0;else throw new Error("\u8BF7\u4F20 shortLink\uFF0C\u6216\u81F3\u5C11\u4F20 fileId\uFF08layerId \u53EF\u9009\uFF09");if(!p)throw new Error("Could not determine fileId");let f;try{f=S$.default.readFileSync(n,"utf-8")}catch(y){throw new Error(`\u65E0\u6CD5\u8BFB\u53D6\u6587\u4EF6 ${n}: ${y}`)}let h=await ot.postC2d(f,p,d);return{content:[{type:"text",text:JSON.stringify(h)}]}}catch(a){let c=((s=a==null?void 0:a.response)==null?void 0:s.data)??(a==null?void 0:a.message);return{isError:!0,content:[{type:"text",text:JSON.stringify(c)}]}}}};var Hq="mcp__getComponentLink",Vq="When the data returned by mcp__getDsl contains a non-empty componentDocumentLinks array, this tool is used to sequentially retrieve URLs from the componentDocumentLinks array and then obtain component documentation data. The returned document data is used for you to generate frontend code based on components.",pu=class extends ht{constructor(){super();this.name=Hq;this.description=Vq;this.schema=Y.object({url:Y.string().describe("Component documentation link URL, from the componentDocumentLinks property, please ensure the URL is valid")})}async execute({url:n}){try{return{content:[{type:"text",text:`${await ot.request({method:"GET",url:n})}`}]}}catch(r){return{content:[{type:"text",text:JSON.stringify({error:"Failed to get component documentation",message:r instanceof Error?r.message:String(r)})}]}}}};var k$=`The \`results\` returns an XML file, which contains two types of information:
|
|
157
145
|
|
|
158
146
|
- **meta**: Describes the site, environment, requirements, and other context.
|
|
159
147
|
- **action**: Corresponds to the entry page name and \`targetLayerId\`, which is the ID of the target page.
|
|
@@ -239,12 +227,12 @@ Repeat this process until the page data no longer contains the \`interactive\` f
|
|
|
239
227
|
Then, process the 0:2 page and repeat the steps for the 0:1 page.
|
|
240
228
|
|
|
241
229
|
After completion, generate the project code sequentially according to the page list in task.md.
|
|
242
|
-
`;var
|
|
230
|
+
`;var Wq="mcp__getMeta",Kq=`
|
|
243
231
|
Use this tool when the user intends to build a complete website or needs to obtain high-level site
|
|
244
232
|
configuration information. You must provide a fileld and layerld to identify the specific design element.
|
|
245
233
|
This tool returns the rules and results of the site and page. The rules is a markdown file, you must
|
|
246
234
|
follow the rules and use the results to analyze the site and page.
|
|
247
|
-
`,
|
|
235
|
+
`,du=class extends ht{constructor(){super();this.name=Wq;this.description=Kq;this.schema=Y.object({fileId:Y.string().describe("MasterGo design file ID (format: file/<fileId> in MasterGo URL)"),layerId:Y.string().describe("Layer ID of the specific component or element to retrieve (format: ?layer_id=<layerId> / file=<fileId> in MasterGo URL)"),sourceLayerId:Y.string().optional().describe("Source layer ID from URL parameter source_layer_id. When provided, use this instead of layerId for all queries."),format:Kr()})}async execute({fileId:n,layerId:r,sourceLayerId:o,format:i}){var s;try{let a=await ot.getMeta(n,r,o);return{content:[{type:"text",text:Jr({result:a,rules:k$},i)}]}}catch(a){let c=((s=a.response)==null?void 0:s.data)??(a==null?void 0:a.message);return{isError:!0,content:[{type:"text",text:JSON.stringify(c)}]}}}};var sr=Ee(require("fs"));var T$=`---
|
|
248
236
|
description:
|
|
249
237
|
globs:
|
|
250
238
|
alwaysApply: true
|
|
@@ -555,13 +543,13 @@ AI must analyze component design and infer:
|
|
|
555
543
|
- **Tests**: Coverage for all features, edge cases, slots and states
|
|
556
544
|
- **Implementation**: Renders correctly, properties work, state management complies with specifications, styles applied correctly, slot functionality works
|
|
557
545
|
- **Documentation**: Feature documentation complete, examples available, API reference complete, slot usage documentation complete
|
|
558
|
-
`;var
|
|
546
|
+
`;var Yq="mcp__getComponentGenerator",Xq=`
|
|
559
547
|
Users need to actively call this tool to get the component development workflow. When Generator is mentioned, please actively call this tool.
|
|
560
548
|
This tool provides a structured workflow for component development following best practices.
|
|
561
549
|
You must provide an absolute rootPath of workspace to save workflow files.
|
|
562
|
-
`,
|
|
550
|
+
`,fu=class extends ht{constructor(){super();this.name=Yq;this.description=Xq;this.schema=Y.object({rootPath:Y.string().describe("The root path of the project, if the user does not provide, you can use the current directory as the root path"),fileId:Y.string().describe("MasterGo design file ID (format: file/<fileId> in MasterGo URL)"),layerId:Y.string().describe("Layer ID of the specific component or element to retrieve (format: ?layer_id=<layerId> / file=<fileId> in MasterGo URL)"),sourceLayerId:Y.string().optional().describe("Source layer ID from URL parameter source_layer_id. When provided, use this instead of layerId for all queries.")})}async execute({rootPath:n,fileId:r,layerId:o,sourceLayerId:i}){var d;let s=`${n}/.mastergo/`;sr.default.existsSync(s)||sr.default.mkdirSync(s,{recursive:!0});let a=`${s}/component-workflow.md`,c=await ot.getComponentStyleJson(r,o,i),l=`${s}/${c[0].name}.json`,p=f=>{if(f.path&&f.path.length>0){f.imageUrls=[];let h=f.id.replaceAll("/","&").replaceAll(":","_"),y=`${s}/images`;sr.default.existsSync(y)||sr.default.mkdirSync(y,{recursive:!0}),(f.path??[]).forEach((v,x)=>{let m=`${y}/${h}-${x}.svg`;sr.default.existsSync(m)||sr.default.writeFileSync(m,`<svg width="100%" height="100%" viewBox="0 0 16 16"xmlns="http://www.w3.org/2000/svg">
|
|
563
551
|
<path d="${v}" fill="currentColor"/>
|
|
564
|
-
</svg>`),f.imageUrls.push(
|
|
552
|
+
</svg>`),f.imageUrls.push(m)}),delete f.path}f.children&&f.children.forEach(h=>{p(h)})};p(c[0]),sr.default.existsSync(a)||sr.default.writeFileSync(a,T$),sr.default.writeFileSync(l,JSON.stringify(c[0]));try{return{content:[{type:"text",text:JSON.stringify({files:{workflow:a,componentSpec:l},message:"Component development files successfully created",rules:[`Follow the component workflow process defined in file://${a} for structured development. This workflow contains a lot of content, you'll need to read it in multiple sessions.`,`Implement the component according to the specifications in file://${l}, ensuring all properties and states are properly handled.`]})}]}}catch(f){let h=((d=f.response)==null?void 0:d.data)??(f==null?void 0:f.message);return{isError:!0,content:[{type:"text",text:JSON.stringify(h)}]}}}};var gt=Ee(require("fs")),qt=Ee(require("path")),A$=Ee(require("crypto"));var I$=Ee(require("https"));var E$=`---
|
|
565
553
|
description:
|
|
566
554
|
globs:
|
|
567
555
|
alwaysApply: true
|
|
@@ -1244,46 +1232,52 @@ lib/utils/ui/
|
|
|
1244
1232
|
- **Analysis**: DSL fully parsed, widget tree planned, resources inventoried
|
|
1245
1233
|
- **Implementation**: Renders correctly, dimensions adapted, colors accurate, assets loaded
|
|
1246
1234
|
- **Quality**: No hardcoded values, proper decomposition, RTL-ready, safe area handled
|
|
1247
|
-
`;var
|
|
1235
|
+
`;var e4="mcp__getFlutterGenerator",t4=`
|
|
1248
1236
|
Users need to actively call this tool to get the Flutter component development workflow. When Flutter Generator or Flutter Component is mentioned, please actively call this tool.
|
|
1249
1237
|
This tool provides a structured workflow for Flutter component development following best practices.
|
|
1250
1238
|
It includes MasterGo DSL to Flutter Widget mapping rules, screen adaptation with flutter_screenutil, and feature-based architecture guidance.
|
|
1251
1239
|
It also downloads all image resources from the design file to local disk, rewrites CSS and DSL references to point at Flutter asset paths, and generates an asset manifest.
|
|
1252
1240
|
You must provide an absolute rootPath of workspace to save workflow files.
|
|
1253
|
-
`,
|
|
1254
|
-
`+
|
|
1241
|
+
`,n4=15e3,$$=2,r4=6,uy=50*1024*1024,C$=["png","jpg","jpeg","webp","svg","gif","bmp"],P$=new I$.default.Agent({rejectUnauthorized:!1});function Ji(t){return String(t??"").replace(/[^a-zA-Z0-9._-]/g,"_").replace(/\.{2,}/g,"_").replace(/_+/g,"_").replace(/^_+|_+$/g,"")||"unnamed"}function o4(t){return A$.default.createHash("md5").update(t).digest("hex").slice(0,10)}function i4(t){try{let n=new URL(t,"https://placeholder.local").pathname.match(/\.([a-zA-Z0-9]+)$/);if(n&&C$.includes(n[1].toLowerCase()))return n[1].toLowerCase()}catch{}}function py(t){if(!t)return"png";let e=t.toLowerCase();return e.includes("svg")?"svg":e.includes("webp")?"webp":e.includes("jpeg")||e.includes("jpg")?"jpg":e.includes("gif")?"gif":e.includes("bmp")?"bmp":"png"}function ly(t){gt.default.existsSync(t)||gt.default.mkdirSync(t,{recursive:!0})}function O$(t){return/^https?:\/\//i.test(t)}function dy(t){if(!t)return!1;if(t.startsWith("data:image/"))return!0;let e=t.startsWith("//")?`https:${t}`:t;if(!/^https?:\/\//i.test(e)||e.includes("/api/")||e.includes("graphql")||e.endsWith(".json")||e.endsWith(".js")||e.endsWith(".css"))return!1;try{let n=new URL(e).pathname.toLowerCase();if(C$.some(r=>n.endsWith(`.${r}`))||n.includes("/image/")||n.includes("/img/")||n.includes("/picture/")||e.includes("x-oss-process=image")||e.includes("imageView")||e.includes("format,")||n.includes("/thumbnail/")||e.includes("mastergo")&&(n.includes("/resource/")||n.includes("/file/"))||e.match(/[?&](w|width|h|height|resize|format)=/i))return!0}catch{}return!1}async function s4(t,e){var r;if(!O$(t))throw new Error(`Blocked unsafe URL: ${t}`);let n;for(let o=0;o<=$$;o++)try{let i=await vt.get(t,{responseType:"arraybuffer",timeout:n4,httpsAgent:P$,maxRedirects:5,maxContentLength:uy}),s=`${e}.tmp`;await gt.default.promises.writeFile(s,Buffer.from(i.data)),await gt.default.promises.rename(s,e);return}catch(i){n=i;let s=(r=i==null?void 0:i.response)==null?void 0:r.status;if(s&&s>=400&&s<500)throw n;o<$$&&await new Promise(a=>setTimeout(a,500*(o+1)))}throw n}async function a4(t,e){let n=t.match(/^data:([^;]+);base64,(.+)$/);if(!n)throw new Error("Unsupported data URL format");let r=n[1],o=n[2];if(o.length>uy*1.37)throw new Error(`Data URL too large: ${(o.length/1024/1024).toFixed(1)}MB (max ${uy/1024/1024}MB)`);let i=py(r),s=e.endsWith(`.${i}`)?e:`${e}.${i}`;return await gt.default.promises.writeFile(s,Buffer.from(o,"base64")),s}async function c4(t,e,n){let r=new Array(t.length),o=0,i=Array.from({length:Math.min(e,t.length)},async()=>{for(;;){let s=o++;if(s>=t.length)break;r[s]=await n(t[s],s)}});return await Promise.all(i),r}function l4(t,e){let n=qt.default.join(t,"pubspec.yaml");if(!gt.default.existsSync(n))return"no-pubspec";let r=gt.default.readFileSync(n,"utf-8"),o=` - ${e}/`;if(r.split(/\r?\n/).some(c=>c.trimEnd()===o.trimEnd()))return"exists";let s=r,a=/^(flutter:[\s\S]*?)(?=^\S|$)/m.exec(r);if(a){let c=a[0],l=/^(\s{2,})assets:\s*\n/m.exec(c);if(l){let p=a.index+l.index+l[0].length;s=r.slice(0,p)+`${o}
|
|
1242
|
+
`+r.slice(p)}else{let p=a.index+c.length,d=(c.endsWith(`
|
|
1255
1243
|
`)?"":`
|
|
1256
1244
|
`)+` assets:
|
|
1257
1245
|
${o}
|
|
1258
|
-
`;s=
|
|
1246
|
+
`;s=r.slice(0,p)+d+r.slice(p)}}else{let c=(r.endsWith(`
|
|
1259
1247
|
`)?"":`
|
|
1260
1248
|
`)+`
|
|
1261
1249
|
flutter:
|
|
1262
1250
|
assets:
|
|
1263
1251
|
${o}
|
|
1264
|
-
`;s=
|
|
1252
|
+
`;s=r+c}return gt.default.writeFileSync(n,s),"added"}function u4(t){let e=[],n=[];if(!t||typeof t!="string")return{urls:e,lostFragments:n};let r=/url\(\s*(?:"([^"]*)"|'([^']*)'|([^)]*))\s*\)/gi,o;for(;(o=r.exec(t))!==null;){let i=(o[1]??o[2]??o[3]??"").trim();if(i){if(i==="[object Object]"||i.includes("[object Object]")){n.push(o[0]);continue}e.push(i)}}return{urls:e,lostFragments:n}}function fy(t,e,n,r){if(!t||typeof t!="object")return;if(Array.isArray(t)){t.forEach((i,s)=>fy(i,`${e}[${s}]`,n,r));return}let o=typeof t.id=="string"?t.id:"";for(let[i,s]of Object.entries(t)){let a=e?`${e}.${i}`:i;if(typeof s=="string"){if(i==="cssCode"){let{urls:c,lostFragments:l}=u4(s);for(let p of c){let d=p.startsWith("data:image/")?"data":"remote",f=p.startsWith("//")?`https:${p}`:p;(d==="data"||dy(f))&&(n.has(f)||n.set(f,{token:a,url:f,kind:d}))}for(let p of l)r.push({nodeId:o,token:a,rawCssFragment:p})}else if(s.startsWith("data:image/"))n.has(s)||n.set(s,{token:a,url:s,kind:"data"});else if(s.startsWith("http")||s.startsWith("//")){let c=s.startsWith("//")?`https:${s}`:s;dy(c)&&!n.has(c)&&n.set(c,{token:a,url:c,kind:"remote"})}}else s&&typeof s=="object"&&fy(s,a,n,r)}}function R$(t){let e=t.match(/paint_(\d+):(\d+)/);return e?Number(e[2]):Number.MAX_SAFE_INTEGER}async function p4(t,e,n,r){var o;try{let i=await ot.getDsl(t,e,n?{sourceLayerId:n}:void 0),s=(i==null?void 0:i.dsl)??{},a=(s==null?void 0:s.styles)??{},c=Object.keys(a).filter(p=>p.startsWith("paint_")).sort((p,d)=>R$(p)-R$(d)||p.localeCompare(d)),l=[];for(let p of c){let d=(o=a[p])==null?void 0:o.value;Array.isArray(d)&&d.forEach((f,h)=>{let y=typeof(f==null?void 0:f.url)=="string"?f.url:"";!y||!dy(y)||l.push({token:`dsl.styles.${p}.value[${h}].url`,url:y,kind:"remote"})})}return l}catch(i){return r.push(`DSL fallback fetch failed: ${(i==null?void 0:i.message)??String(i)}`),[]}}function d4(t,e){if(!e.length)return 0;let n=0,r=0,o=i=>{if(!(!i||typeof i!="object")){if(Array.isArray(i)){i.forEach(o);return}for(let[s,a]of Object.entries(i))typeof a=="string"&&s==="cssCode"&&a.includes("[object Object]")?i[s]=a.replace(/url\(\s*\[object Object\]\s*\)/gi,c=>{if(n>=e.length)return c;let l=e[n++];return r++,`url(${l})`}):a&&typeof a=="object"&&o(a)}};return o(t),r}function f4(t,e,n,r){if(!Array.isArray(t==null?void 0:t.path)||t.path.length===0)return null;let o=Ji(String(t.id??"icon")),i=t.width??16,s=t.height??16,c=t.path.length===1,l=`${o}.svg`,p=qt.default.join(e,l),d=!1;if(!gt.default.existsSync(p)){let h=t.path.map((y,v)=>{var m,b,w,k;let x="currentColor";if(!c){let E=((b=(m=t.fills)==null?void 0:m[v])==null?void 0:b.color)??((k=(w=t.strokes)==null?void 0:w[v])==null?void 0:k.color);E&&(x=`rgb(${Math.round((E.r??0)*255)},${Math.round((E.g??0)*255)},${Math.round((E.b??0)*255)})`)}return` <path d="${y}" fill="${x}"/>`}).join(`
|
|
1265
1253
|
`);gt.default.writeFileSync(p,`<svg width="${i}" height="${s}" viewBox="0 0 ${i} ${s}" xmlns="http://www.w3.org/2000/svg">
|
|
1266
|
-
${
|
|
1267
|
-
</svg>`),d=!0}let f=Ut.default.join(r,l);return gt.default.existsSync(f)||gt.default.copyFileSync(p,f),{flutterPath:`${n}/${l}`,localPath:p,needsColorFilter:c,created:d}}function wT(t,e,r,n,o){let i=YU(t,e,r,n);i&&(t.imageUrls=t.imageUrls??[],t.imageUrls.push({flutterPath:i.flutterPath,needsColorFilter:i.needsColorFilter}),o.push({token:`vector.${Vi(String(t.id??"icon"))}`,sourceUrl:"",localPath:i.localPath,flutterPath:i.flutterPath,format:"svg",status:i.created?"downloaded":"skipped",needsColorFilter:i.needsColorFilter}),delete t.path),Array.isArray(t==null?void 0:t.children)&&t.children.forEach(s=>wT(s,e,r,n,o))}function ay(t,e){if(!(!t||typeof t!="object")){if(Array.isArray(t)){t.forEach(r=>ay(r,e));return}for(let[r,n]of Object.entries(t))if(typeof n=="string")if(r==="cssCode")t[r]=n.replace(/url\(\s*(?:"([^"]*)"|'([^']*)'|([^)]*))\s*\)/gi,(o,i,s,a)=>{let c=(i??s??a??"").trim(),l=c.startsWith("//")?`https:${c}`:c,p=e.get(l)??e.get(c);return p?`url(${p})`:o});else{let o=n.startsWith("//")?`https:${n}`:n,i=e.get(o)??e.get(n);i&&(t[r]=i)}else n&&typeof n=="object"&&ay(n,e)}}var au=class extends nt{constructor(){super();this.name=DU;this.description=MU;this.schema=Y.object({rootPath:Y.string().describe("The root path of the Flutter project, if the user does not provide, you can use the current directory as the root path"),fileId:Y.string().describe("MasterGo design file ID (format: file/<fileId> in MasterGo URL)"),layerId:Y.string().describe("Layer ID of the specific component or element to retrieve (format: ?layer_id=<layerId> / file=<fileId> in MasterGo URL)"),sourceLayerId:Y.string().optional().describe("Source layer ID from URL parameter source_layer_id. When provided, use this instead of layerId for all queries."),featureName:Y.string().optional().describe("Optional feature directory name under assets/image/ and the Flutter feature module. Defaults to the root component name.")})}async execute({rootPath:r,fileId:n,layerId:o,sourceLayerId:i,featureName:s}){let a=[],c=[],l=[];if(!Ut.default.isAbsolute(r))return{isError:!0,content:[{type:"text",text:JSON.stringify({error:`rootPath must be an absolute path, got: "${r}". Please provide an absolute path to the Flutter project root.`})}]};let p=Ut.default.resolve(r,".mastergo"),d=Ut.default.join(p,"images");ry(p),ry(d);let f=await He.getComponentStyleJson(n,o,i),m=(f==null?void 0:f[0])??{},y=m.name??"component";if(!f||f.length===0||!m.name)return{isError:!0,content:[{type:"text",text:JSON.stringify({error:`No component data returned from MasterGo API for fileId=${n} layerId=${o}. Please verify the fileId and layerId are correct.`})}]};let x=(s?Vi(s):"")||Vi(y)||Vi(o)||"component",g=Ut.default.join(p,`${x}.json`),_=`assets/image/${x}`,w=Ut.default.join(r,_);ry(w);let $=[];wT(m,d,w,_,$);let E=new Map;if(sy(m,"",E,l),l.length>0){let B=await KU(n,o,i,a);for(let Fe of B)E.has(Fe.url)||E.set(Fe.url,Fe)}let Z=Array.from(E.values()),q={discovered:Z.length,downloaded:0,skipped:0,failed:0,recovered:0,lost:l.length,byFormat:{}},Pe=await VU(Z,FU,async B=>{var me;let Fe=UU(B.url),Le=ZU(B.url),it=`${Vi(B.token.replace(/:/g,"_"))||"asset"}_${Fe}`;try{if(B.kind==="data"){let kt=(me=B.url.match(/^data:([^;]+);base64,/))==null?void 0:me[1];Le=oy(kt);let $t=`${it}.${Le}`,Se=Ut.default.join(d,$t);gt.default.existsSync(Se)||await HU(B.url,Ut.default.join(d,it));let Bt=Ut.default.join(w,$t);return gt.default.existsSync(Bt)||await gt.default.promises.copyFile(Se,Bt),q.downloaded++,q.byFormat[Le]=(q.byFormat[Le]??0)+1,{token:B.token,sourceUrl:B.url,localPath:Se,flutterPath:`${_}/${$t}`,format:Le,status:"downloaded"}}if(!_T(B.url))throw new Error(`Blocked unsafe URL: ${B.url}`);if(!Le)try{let kt=await ht.head(B.url,{timeout:5e3,httpsAgent:bT,maxRedirects:5});Le=oy(String(kt.headers["content-type"]??""))}catch{Le="png"}let we=`${it}.${Le}`,ut=Ut.default.join(d,we);if(gt.default.existsSync(ut)){let kt=Ut.default.join(w,we);return gt.default.existsSync(kt)||await gt.default.promises.copyFile(ut,kt),q.skipped++,q.byFormat[Le]=(q.byFormat[Le]??0)+1,{token:B.token,sourceUrl:B.url,localPath:ut,flutterPath:`${_}/${we}`,format:Le,status:"skipped"}}await BU(B.url,ut);let ze=Ut.default.join(w,we);return await gt.default.promises.copyFile(ut,ze),q.downloaded++,q.byFormat[Le]=(q.byFormat[Le]??0)+1,{token:B.token,sourceUrl:B.url,localPath:ut,flutterPath:`${_}/${we}`,format:Le,status:"downloaded"}}catch(we){let ut=(we==null?void 0:we.message)??String(we);return q.failed++,c.push({token:B.token,url:B.url,error:ut}),a.push(`Failed to download ${B.token}: ${ut}`),{token:B.token,sourceUrl:B.url,localPath:"",flutterPath:"",format:Le??"unknown",status:"failed",error:ut}}});for(let B of $)q.discovered++,B.status==="downloaded"?q.downloaded++:q.skipped++,q.byFormat.svg=(q.byFormat.svg??0)+1;let le=[...Pe,...$],Je=GU(r,_);Je==="no-pubspec"&&a.push("pubspec.yaml not found \u2014 asset directory was NOT registered. Add it manually.");let Ct=new Map;for(let B of le)B.status!=="failed"&&B.flutterPath&&B.sourceUrl&&Ct.set(B.sourceUrl,B.flutterPath);ay(m,Ct);let St=le.filter(B=>B.token.startsWith("dsl.styles.paint_")&&B.status!=="failed"&&!!B.flutterPath).map(B=>B.flutterPath),de=JU(m,St);q.recovered=de,q.lost=Math.max(0,q.lost-de),de>0&&a.push(`Recovered ${de} lost image placeholder(s) via DSL styles paint fallback.`);let vt=l.slice(de);gt.default.writeFileSync(g,JSON.stringify(m,null,2));let V=Ut.default.join(p,"flutter-component-workflow.md");gt.default.existsSync(V)||gt.default.writeFileSync(V,mT);let Rt=Ut.default.join(p,"assets-manifest.json"),Zt={fileId:n,layerId:o,featureName:x,generatedAt:new Date().toISOString(),summary:q,assets:le.map(B=>({token:B.token,sourceUrl:B.sourceUrl,localPath:B.localPath,flutterPath:B.flutterPath,format:B.format,status:B.status,...B.needsColorFilter!==void 0?{needsColorFilter:B.needsColorFilter}:{},...B.error?{error:B.error}:{}})),lostImageRefs:vt};gt.default.writeFileSync(Rt,JSON.stringify(Zt,null,2));let Wr=_,Ie=vt.length>0?`WARNING: ${vt.length} image references were LOST by the MasterGo upstream (cssCode contains url([object Object])). These cannot be recovered from the style API. Affected node IDs: ${Array.from(new Set(vt.map(B=>B.nodeId))).slice(0,20).join(", ")}${vt.length>20?" \u2026":""}. Use placeholder widgets (Container with grey background + Icon) or ask the user to re-export via mcp__getD2c for those nodes.`:null;return{content:[{type:"text",text:JSON.stringify({files:{workflow:V,componentSpec:g,assetDir:d,flutterAssetDir:w,assetManifest:Rt},assetSummary:q,failedAssets:c,lostImageRefs:vt.slice(0,50),warnings:a,message:`Flutter component files created. ${q.downloaded} downloaded, ${q.skipped} skipped, ${q.failed} failed, ${q.recovered} recovered, ${q.lost} still lost. Assets copied to ${_}/${Je==="added"?" and registered in pubspec.yaml.":Je==="exists"?"; pubspec entry already present.":"; pubspec.yaml NOT updated (file missing)."}`,rules:[`Follow the Flutter component workflow process defined in file://${V} for structured Flutter development. This workflow contains DSL-to-Flutter mapping rules, you'll need to read it carefully.`,`Implement the Flutter widget according to the specifications in file://${g}, ensuring all properties and states are properly handled.`,`All image URLs in the component spec have been replaced with Flutter asset paths under ${Wr}/. Use Image.asset()/SvgPicture.asset() with these paths directly.`,"SVG icons with needsColorFilter=true should use SvgPicture.asset with ColorFilter.mode(..., BlendMode.srcIn); those with needsColorFilter=false should render without color override.",`An asset manifest is available at file://${Rt} listing every resource and its status (downloaded/skipped/failed/lost).`,"Use flutter_screenutil for screen adaptation: width/height/padding/margin/radius use .w; font sizes use .sp.","Use standard Flutter Color(0xFFxxxxxx) for colors. Do NOT create custom color utility classes.",...c.length>0?[`WARNING: ${c.length} assets failed to download. See failedAssets for details; substitute placeholders.`]:[],...Ie?[Ie]:[]]})}]}}};var cu={name:"@mastergo/magic-mcp",version:"0.2.2",description:"MasterGo MCP standalone service",homepage:"https://github.com/mastergo-design/mastergo-magic-mcp#readme",repository:{type:"git",url:"git+https://github.com/mastergo-design/mastergo-magic-mcp.git"},bugs:{url:"https://github.com/mastergo-design/mastergo-magic-mcp/issues"},main:"dist/index.js",bin:{"mastergo-magic-mcp":"dist/index.js"},files:["dist/**/*","!**/*.map","!**/.DS_Store","!**/.idea","!**/.vscode"],engines:{node:">=18"},scripts:{build:"node build.js","build:watch":"node build.js --watch",lint:"eslint src --ext .ts","lint:fix":"eslint src --ext .ts --fix",test:"esbuild test/format.test.ts test/headers.test.ts test/url-safety.test.ts --bundle --platform=node --format=cjs --outdir=.test --out-extension:.js=.cjs && node --test .test/format.test.cjs .test/headers.test.cjs .test/url-safety.test.cjs",start:"node dist/index.js --token=test --url=http://localhost:3000 --debug",prepare:"npm run build",prepublishOnly:"npm run build"},keywords:["mastergo","mcp","ai"],author:"",license:"ISC",private:!1,dependencies:{"@modelcontextprotocol/sdk":"^1.6.1",axios:"1.18.1","https-proxy-agent":"^9.0.0","js-yaml":"^4.2.0",zod:"^3.22.4"},devDependencies:{"@types/js-yaml":"^4.0.9","@types/node":"^20.8.10","@typescript-eslint/eslint-plugin":"^8.62.0","@typescript-eslint/parser":"^8.62.0",esbuild:"^0.25.1","esbuild-plugin-tsc":"^0.5.0",eslint:"^8.57.1",prettier:"^3.0.3","ts-node":"^10.9.1",typescript:"^5.2.2"},overrides:{hono:"^4.12.27","form-data":"^4.0.6","fast-uri":"^3.1.2","ip-address":"^10.2.0",qs:"^6.15.3"}};var QU=`version_${cu.version.replace(/\./g,"_")}`,eZ=`the current version is ${cu.version}`,lu=class extends nt{constructor(){super();this.name=QU;this.description=eZ;this.schema=Y.object({})}async execute(){return{content:[{type:"text",text:JSON.stringify(cu.version)}]}}};var tZ="mcp__getDesignSections",rZ=`
|
|
1254
|
+
${h}
|
|
1255
|
+
</svg>`),d=!0}let f=qt.default.join(n,l);return gt.default.existsSync(f)||gt.default.copyFileSync(p,f),{flutterPath:`${r}/${l}`,localPath:p,needsColorFilter:c,created:d}}function z$(t,e,n,r,o){let i=f4(t,e,n,r);i&&(t.imageUrls=t.imageUrls??[],t.imageUrls.push({flutterPath:i.flutterPath,needsColorFilter:i.needsColorFilter}),o.push({token:`vector.${Ji(String(t.id??"icon"))}`,sourceUrl:"",localPath:i.localPath,flutterPath:i.flutterPath,format:"svg",status:i.created?"downloaded":"skipped",needsColorFilter:i.needsColorFilter}),delete t.path),Array.isArray(t==null?void 0:t.children)&&t.children.forEach(s=>z$(s,e,n,r,o))}function my(t,e){if(!(!t||typeof t!="object")){if(Array.isArray(t)){t.forEach(n=>my(n,e));return}for(let[n,r]of Object.entries(t))if(typeof r=="string")if(n==="cssCode")t[n]=r.replace(/url\(\s*(?:"([^"]*)"|'([^']*)'|([^)]*))\s*\)/gi,(o,i,s,a)=>{let c=(i??s??a??"").trim(),l=c.startsWith("//")?`https:${c}`:c,p=e.get(l)??e.get(c);return p?`url(${p})`:o});else{let o=r.startsWith("//")?`https:${r}`:r,i=e.get(o)??e.get(r);i&&(t[n]=i)}else r&&typeof r=="object"&&my(r,e)}}var mu=class extends ht{constructor(){super();this.name=e4;this.description=t4;this.schema=Y.object({rootPath:Y.string().describe("The root path of the Flutter project, if the user does not provide, you can use the current directory as the root path"),fileId:Y.string().describe("MasterGo design file ID (format: file/<fileId> in MasterGo URL)"),layerId:Y.string().describe("Layer ID of the specific component or element to retrieve (format: ?layer_id=<layerId> / file=<fileId> in MasterGo URL)"),sourceLayerId:Y.string().optional().describe("Source layer ID from URL parameter source_layer_id. When provided, use this instead of layerId for all queries."),featureName:Y.string().optional().describe("Optional feature directory name under assets/image/ and the Flutter feature module. Defaults to the root component name.")})}async execute({rootPath:n,fileId:r,layerId:o,sourceLayerId:i,featureName:s}){let a=[],c=[],l=[];if(!qt.default.isAbsolute(n))return{isError:!0,content:[{type:"text",text:JSON.stringify({error:`rootPath must be an absolute path, got: "${n}". Please provide an absolute path to the Flutter project root.`})}]};let p=qt.default.resolve(n,".mastergo"),d=qt.default.join(p,"images");ly(p),ly(d);let f=await ot.getComponentStyleJson(r,o,i),h=(f==null?void 0:f[0])??{},y=h.name??"component";if(!f||f.length===0||!h.name)return{isError:!0,content:[{type:"text",text:JSON.stringify({error:`No component data returned from MasterGo API for fileId=${r} layerId=${o}. Please verify the fileId and layerId are correct.`})}]};let x=(s?Ji(s):"")||Ji(y)||Ji(o)||"component",m=qt.default.join(p,`${x}.json`),b=`assets/image/${x}`,w=qt.default.join(n,b);ly(w);let k=[];z$(h,d,w,b,k);let E=new Map;if(fy(h,"",E,l),l.length>0){let B=await p4(r,o,i,a);for(let qe of B)E.has(qe.url)||E.set(qe.url,qe)}let F=Array.from(E.values()),j={discovered:F.length,downloaded:0,skipped:0,failed:0,recovered:0,lost:l.length,byFormat:{}},de=await c4(F,r4,async B=>{var ge;let qe=o4(B.url),De=i4(B.url),it=`${Ji(B.token.replace(/:/g,"_"))||"asset"}_${qe}`;try{if(B.kind==="data"){let Tt=(ge=B.url.match(/^data:([^;]+);base64,/))==null?void 0:ge[1];De=py(Tt);let Et=`${it}.${De}`,Te=qt.default.join(d,Et);gt.default.existsSync(Te)||await a4(B.url,qt.default.join(d,it));let Bt=qt.default.join(w,Et);return gt.default.existsSync(Bt)||await gt.default.promises.copyFile(Te,Bt),j.downloaded++,j.byFormat[De]=(j.byFormat[De]??0)+1,{token:B.token,sourceUrl:B.url,localPath:Te,flutterPath:`${b}/${Et}`,format:De,status:"downloaded"}}if(!O$(B.url))throw new Error(`Blocked unsafe URL: ${B.url}`);if(!De)try{let Tt=await vt.head(B.url,{timeout:5e3,httpsAgent:P$,maxRedirects:5});De=py(String(Tt.headers["content-type"]??""))}catch{De="png"}let ke=`${it}.${De}`,ut=qt.default.join(d,ke);if(gt.default.existsSync(ut)){let Tt=qt.default.join(w,ke);return gt.default.existsSync(Tt)||await gt.default.promises.copyFile(ut,Tt),j.skipped++,j.byFormat[De]=(j.byFormat[De]??0)+1,{token:B.token,sourceUrl:B.url,localPath:ut,flutterPath:`${b}/${ke}`,format:De,status:"skipped"}}await s4(B.url,ut);let Oe=qt.default.join(w,ke);return await gt.default.promises.copyFile(ut,Oe),j.downloaded++,j.byFormat[De]=(j.byFormat[De]??0)+1,{token:B.token,sourceUrl:B.url,localPath:ut,flutterPath:`${b}/${ke}`,format:De,status:"downloaded"}}catch(ke){let ut=(ke==null?void 0:ke.message)??String(ke);return j.failed++,c.push({token:B.token,url:B.url,error:ut}),a.push(`Failed to download ${B.token}: ${ut}`),{token:B.token,sourceUrl:B.url,localPath:"",flutterPath:"",format:De??"unknown",status:"failed",error:ut}}});for(let B of k)j.discovered++,B.status==="downloaded"?j.downloaded++:j.skipped++,j.byFormat.svg=(j.byFormat.svg??0)+1;let oe=[...de,...k],Re=l4(n,b);Re==="no-pubspec"&&a.push("pubspec.yaml not found \u2014 asset directory was NOT registered. Add it manually.");let bt=new Map;for(let B of oe)B.status!=="failed"&&B.flutterPath&&B.sourceUrl&&bt.set(B.sourceUrl,B.flutterPath);my(h,bt);let Ve=oe.filter(B=>B.token.startsWith("dsl.styles.paint_")&&B.status!=="failed"&&!!B.flutterPath).map(B=>B.flutterPath),ae=d4(h,Ve);j.recovered=ae,j.lost=Math.max(0,j.lost-ae),ae>0&&a.push(`Recovered ${ae} lost image placeholder(s) via DSL styles paint fallback.`);let yt=l.slice(ae);gt.default.writeFileSync(m,JSON.stringify(h,null,2));let V=qt.default.join(p,"flutter-component-workflow.md");gt.default.existsSync(V)||gt.default.writeFileSync(V,E$);let At=qt.default.join(p,"assets-manifest.json"),Zt={fileId:r,layerId:o,featureName:x,generatedAt:new Date().toISOString(),summary:j,assets:oe.map(B=>({token:B.token,sourceUrl:B.sourceUrl,localPath:B.localPath,flutterPath:B.flutterPath,format:B.format,status:B.status,...B.needsColorFilter!==void 0?{needsColorFilter:B.needsColorFilter}:{},...B.error?{error:B.error}:{}})),lostImageRefs:yt};gt.default.writeFileSync(At,JSON.stringify(Zt,null,2));let Vn=b,Pe=yt.length>0?`WARNING: ${yt.length} image references were LOST by the MasterGo upstream (cssCode contains url([object Object])). These cannot be recovered from the style API. Affected node IDs: ${Array.from(new Set(yt.map(B=>B.nodeId))).slice(0,20).join(", ")}${yt.length>20?" \u2026":""}. Use placeholder widgets (Container with grey background + Icon) or ask the user to re-export via mcp__getD2c for those nodes.`:null;return{content:[{type:"text",text:JSON.stringify({files:{workflow:V,componentSpec:m,assetDir:d,flutterAssetDir:w,assetManifest:At},assetSummary:j,failedAssets:c,lostImageRefs:yt.slice(0,50),warnings:a,message:`Flutter component files created. ${j.downloaded} downloaded, ${j.skipped} skipped, ${j.failed} failed, ${j.recovered} recovered, ${j.lost} still lost. Assets copied to ${b}/${Re==="added"?" and registered in pubspec.yaml.":Re==="exists"?"; pubspec entry already present.":"; pubspec.yaml NOT updated (file missing)."}`,rules:[`Follow the Flutter component workflow process defined in file://${V} for structured Flutter development. This workflow contains DSL-to-Flutter mapping rules, you'll need to read it carefully.`,`Implement the Flutter widget according to the specifications in file://${m}, ensuring all properties and states are properly handled.`,`All image URLs in the component spec have been replaced with Flutter asset paths under ${Vn}/. Use Image.asset()/SvgPicture.asset() with these paths directly.`,"SVG icons with needsColorFilter=true should use SvgPicture.asset with ColorFilter.mode(..., BlendMode.srcIn); those with needsColorFilter=false should render without color override.",`An asset manifest is available at file://${At} listing every resource and its status (downloaded/skipped/failed/lost).`,"Use flutter_screenutil for screen adaptation: width/height/padding/margin/radius use .w; font sizes use .sp.","Use standard Flutter Color(0xFFxxxxxx) for colors. Do NOT create custom color utility classes.",...c.length>0?[`WARNING: ${c.length} assets failed to download. See failedAssets for details; substitute placeholders.`]:[],...Pe?[Pe]:[]]})}]}}};var Yi={name:"@mastergo/magic-mcp",version:"0.2.4",description:"MasterGo MCP standalone service",homepage:"https://github.com/mastergo-design/mastergo-magic-mcp#readme",repository:{type:"git",url:"git+https://github.com/mastergo-design/mastergo-magic-mcp.git"},bugs:{url:"https://github.com/mastergo-design/mastergo-magic-mcp/issues"},main:"dist/index.js",bin:{"mastergo-magic-mcp":"dist/index.js"},files:["dist/**/*","!**/*.map","!**/.DS_Store","!**/.idea","!**/.vscode"],engines:{node:">=18"},scripts:{build:"node build.js","build:watch":"node build.js --watch",lint:"eslint src --ext .ts","lint:fix":"eslint src --ext .ts --fix",test:"esbuild test/format.test.ts test/headers.test.ts test/url-safety.test.ts --bundle --platform=node --format=cjs --outdir=.test --out-extension:.js=.cjs && node --test .test/format.test.cjs .test/headers.test.cjs .test/url-safety.test.cjs",start:"node dist/index.js --token=test --url=http://localhost:3000 --debug",prepare:"npm run build",prepublishOnly:"npm run build"},keywords:["mastergo","mcp","ai"],author:"",license:"ISC",private:!1,dependencies:{"@modelcontextprotocol/sdk":"^1.6.1",axios:"1.18.1","https-proxy-agent":"^9.0.0","js-yaml":"^4.2.0",zod:"^3.22.4"},devDependencies:{"@types/js-yaml":"^4.0.9","@types/node":"^20.8.10","@typescript-eslint/eslint-plugin":"^8.62.0","@typescript-eslint/parser":"^8.62.0",esbuild:"^0.25.1","esbuild-plugin-tsc":"^0.5.0",eslint:"^8.57.1",prettier:"^3.0.3","ts-node":"^10.9.1",typescript:"^5.2.2"},overrides:{hono:"^4.12.27","form-data":"^4.0.6","fast-uri":"^3.1.2","ip-address":"^10.2.0",qs:"^6.15.3"},packageManager:"yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"};var h4=`version_${Yi.version.replace(/\./g,"_")}`,g4=`the current version is ${Yi.version}`,hu=class extends ht{constructor(){super();this.name=h4;this.description=g4;this.schema=Y.object({})}async execute(){return{content:[{type:"text",text:JSON.stringify(Yi.version)}]}}};var y4="mcp__getDesignSections",x4=`
|
|
1268
1256
|
[PRIMARY] This is the main tool for all designs. Operates in TWO modes:
|
|
1269
1257
|
|
|
1270
1258
|
Mode 1 \u2014 Get layout overview (sectionIndex NOT provided):
|
|
1271
|
-
Returns the list of all sections with id, name, type, nodeCount, and a page-absolute bounding box (x, y, width, height) for each section, plus totalSections and totalNodes.
|
|
1272
|
-
Also returns rootMetadata (root layer width/height/name/type/fill) when available.
|
|
1259
|
+
Returns the list of all sections with id, name, type, nodeCount, textPreview (first TEXT node, 20 chars max), and a page-absolute bounding box (x, y, width, height) for each section, plus totalSections and totalNodes.
|
|
1260
|
+
Also returns rootMetadata (root layer width/height/name/type/fill) when available. rootContainer CSS properties for the page wrapper. splitContainers for large page regions that were split into child sections.
|
|
1273
1261
|
Use this FIRST to understand the design scope. The per-section bbox tells you exactly where each section sits inside the root container \u2014 use it for absolute positioning when generating code.
|
|
1274
1262
|
Example: { "fileId": "123", "layerId": "456:789" }
|
|
1275
1263
|
|
|
1276
1264
|
Mode 2 \u2014 Get section DSL (sectionIndex provided):
|
|
1277
1265
|
Returns the full DSL for ONE specific section.
|
|
1278
|
-
- PATH nodes
|
|
1266
|
+
- PATH nodes carry a \`svgKey\` field (a short sequential ID like \`#0\`, \`#1\`). The SVG markup is NOT in the DSL. Place \`@@SVG:{svgKey}@@\` where each icon goes, then call \`mcp__applyDesign\` at the end to inject the real high-precision SVG. NEVER hand-write \`<path d="...">\`.
|
|
1267
|
+
- CRITICAL: After generating the complete code with all \`@@SVG:{svgKey}@@\` placeholders, call \`mcp__applyDesign\` to replace them with real SVG. Skipping this WILL cause missing icons.
|
|
1268
|
+
- INSTANCE nodes with a \`_variantProps\` object carry semantic state labels. Compare these across sibling instances to determine active/selected/hovered states \u2014 do NOT default to the first item.
|
|
1269
|
+
|
|
1270
|
+
CRITICAL \u2014 sectionIndex is SINGULAR: the parameter is sectionIndex (a SINGLE integer per call). There is NO plural sectionIndices parameter \u2014 passing an array will be rejected with an error. To fetch multiple sections you MUST make multiple calls, each with one sectionIndex.
|
|
1279
1271
|
|
|
1280
1272
|
IMPORTANT workflow:
|
|
1281
1273
|
1. First call WITHOUT sectionIndex to get the section list with node counts.
|
|
1282
|
-
2. Then call WITH sectionIndex=0, sectionIndex=1, ... up to totalSections-1.
|
|
1283
|
-
3.
|
|
1284
|
-
4.
|
|
1285
|
-
5.
|
|
1286
|
-
6.
|
|
1274
|
+
2. Then call WITH sectionIndex=0, then sectionIndex=1, ... up to totalSections-1 \u2014 ONE sectionIndex per call.
|
|
1275
|
+
3. YOU MUST REQUEST ALL SECTIONS. Do NOT skip any section index \u2014 missing sections WILL cause missing content.
|
|
1276
|
+
4. textPreview helps distinguish same-looking sections: "\u7CFB\u7EDF\u4FE1\u606F", "\u6743\u9650\u8BBE\u7F6E", "\u57FA\u672C\u8BBE\u7F6E" \u2014 all may have nodeCount=3 and empty name but DIFFERENT textPreview. They are individual menu items, NOT duplicates.
|
|
1277
|
+
5. Fetch sections in batches of 3-5 CONCURRENT calls (3-5 separate single-sectionIndex calls in parallel), wait for all results, then send the next batch. Each call has exactly one sectionIndex.
|
|
1278
|
+
6. After fetching all sections, generate code with \`@@SVG:{svgKey}@@\` placeholders for every PATH node, then call \`mcp__applyDesign\` to inject real SVG.
|
|
1279
|
+
7. Count your requests. If totalSections=48, you must make exactly 48 sectionIndex calls (each with a SINGLE integer). Keep a checklist and do NOT stop early.
|
|
1280
|
+
8. Generate the complete HTML with all SVG placeholders, then call \`mcp__applyDesign\` as the FINAL step.
|
|
1287
1281
|
|
|
1288
1282
|
DO NOT call mcp__getDsl after completing this workflow \u2014 all data is already provided.
|
|
1289
1283
|
If this tool returns an error (e.g. old server), fall back to mcp__getDsl.
|
|
@@ -1291,29 +1285,41 @@ If this tool returns an error (e.g. old server), fall back to mcp__getDsl.
|
|
|
1291
1285
|
You can provide either:
|
|
1292
1286
|
1. fileId and layerId directly, or
|
|
1293
1287
|
2. a short link (like https://{domain}/goto/LhGgBAK)
|
|
1294
|
-
`,uu=class extends nt{constructor(){super();this.name=tZ;this.description=rZ;this.schema=Y.object({fileId:Y.string().optional().describe("MasterGo design file ID. Required if shortLink is not provided."),layerId:Y.string().optional().describe("Root layer ID of the design. Required if shortLink is not provided."),shortLink:Y.string().optional().describe("Short link (like https://{domain}/goto/LhGgBAK)."),sourceLayerId:Y.string().optional().describe("Source layer ID from URL parameter source_layer_id. When provided, use this instead of layerId for all queries."),sectionIndex:Y.number().optional().describe("0-based section index. If omitted, returns the section list only. If provided, returns full DSL for that specific section."),format:zr()})}async execute({fileId:r,layerId:n,shortLink:o,sourceLayerId:i,sectionIndex:s,format:a}){var c;try{if(!o&&(!r||!n&&!i))throw new Error("Either provide fileId with layerId (or sourceLayerId), or provide a shortLink");let l=this.normalizeFileId(r),p=n,d=i;if(o){let y=await He.extractIdsFromUrl(o);l=this.normalizeFileId(y.fileId),p=y.layerId,d=y.sourceLayerId??i}let f=d||p;if(!l||!f)throw new Error("Could not determine fileId or layerId (need layerId or sourceLayerId)");let m=await He.getDesignSections(l,f,s);return{content:[{type:"text",text:Cr(m,a)}]}}catch(l){let p=((c=l.response)==null?void 0:c.data)??(l==null?void 0:l.message);return{isError:!0,content:[{type:"text",text:JSON.stringify(p)}]}}}};var nZ="mcp__getDesignSvgs",oZ=`
|
|
1295
|
-
|
|
1296
|
-
Each PATH node in the DSL has an id. Look up that id in the returned svgs map to get the complete SVG string.
|
|
1297
|
-
Insert the svgHtml string directly into HTML where icons should appear.
|
|
1298
|
-
|
|
1288
|
+
`,v4=["CRITICAL \u2014 Page positioning: the section LIST response contains splitContainers with page-absolute coordinates for each page region. Use splitContainers to construct the page skeleton (position:absolute with exact coordinates). Do NOT guess or stack with flex. IMPORTANT: splitContainers x/y are the container's absolute position on the canvas \u2014 they are NOT CSS margins/padding for child elements. Do NOT apply a container's y coordinate as top/margin-top on the main content wrapper. The main content area should start at top:0 within its own positioning context; sub-sections inside it use their own bbox y coordinates relative to the container, not to the page root.","CRITICAL \u2014 Multi-column sidebar layout: render ALL sidebar levels as persistent visible columns positioned via splitContainers coordinates. Do NOT use position:absolute/fixed for submenu panels (they become floating overlays and break the main content width). Instead, lay out ALL columns (primary sidebar + submenu + main content) side-by-side using flex or absolute positioning that ACCOUNTS for every column's width. The main content area width = rootContainer.width minus ALL sidebar column widths. Do NOT use flex:1 for main content when there are multiple sidebar columns \u2014 it will expand into the submenu's space. Each sidebar column's width comes from its splitContainer entry.","token filed must be generated as a variable (colors, shadows, fonts, etc.) and the token field must be displayed in the comment","componentDocumentLinks is a list of frontend component documentation links. When it exists and is not empty, use mcp__getComponentLink to get the documentation.","",'CRITICAL \u2014 SVG FROM PATH NODES (MUST FOLLOW): Every PATH node has a `svgKey` field (a short sequential ID like `#0`, `#1`). The SVG markup is NOT in the DSL. You MUST place a placeholder `@@SVG:{svgKey}@@` where each icon goes, then call `mcp__applyDesign` at the end to inject the real high-precision SVG. NEVER hand-write `<path d="...">` \u2014 the DSL does NOT contain path data. NEVER leave a PATH node unrendered \u2014 every icon MUST have a `@@SVG:{svgKey}@@` placeholder.',"CRITICAL \u2014 RENDER EVERY ICON IN PATH NODES: Every PATH node has a `svgKey`. Place `@@SVG:{svgKey}@@` for each \u2014 sidebar menu icons, table header sort/filter/search icons, pagination prev/next/refresh icons, and action buttons. A header cell or menu item showing only plain text is a fidelity defect. After ALL placeholders are placed, call `mcp__applyDesign` to replace them with real SVG.","","CRITICAL \u2014 _placeholder TEXT handling: TEXT nodes with `_placeholder: true` (name==text) are listed in `dsl.placeholderTexts`. These are component-library boilerplate \u2014 NOT real column headers, labels, or data. Do NOT render them as table headers, column names, or visible UI labels. They appear alongside real text in the same section (e.g. a header cell has both realTitle='\u7528\u6237\u540D\u79F0' and placeholder='Hillstone Design') \u2014 render ONLY the real title, omit the placeholder. EXCEPTION: if a placeholder text is the SOLE text in its section AND it reads as a legitimate brand name or page title (e.g. '\u667A\u6E90\u667A\u80FD\u5B89\u5168\u8FD0\u8425\u5E73\u53F0'), it may be real content \u2014 render it in its proper context (logo area, page title), never as a table header.","CRITICAL \u2014 CLOSED-SET TEXT: the section LIST response carries `rootMetadata.allTexts` \u2014 the complete whitelist of text strings in this design (including placeholder strings). Any visible string NOT in allTexts is a hallucination and MUST be removed. Use `dsl.placeholderTexts` in each section to identify which strings are component-library boilerplate.","","CRITICAL \u2014 INSTANCE fill color: when an INSTANCE has both `fill` and `_color`, use `_color` directly as the CSS value. Do NOT guess colors from _variantProps semantics.","CRITICAL \u2014 INSTANCE _variantProps: compare across siblings for selected/hovered/disabled. Active class MUST match DSL variant state, NOT a default index.","CRITICAL \u2014 Render count = structureSiblingCount: if ssc=1, that single instance IS complete \u2014 do NOT fabricate extra rows/items.","CRITICAL \u2014 BACKGROUND FROM splitContainers: splitContainers[].background IS the exact CSS background-color. Copy verbatim, no changes.","CRITICAL \u2014 FRAME/GROUP opacity: translate to rgba() on background only, NOT CSS opacity (would make children translucent).","CRITICAL \u2014 rowTexts: each entry has parentType/parentName for context and `_placeholder: true` if boilerplate. Use parentName to place text correctly; skip _placeholder entries. IMPORTANT: if a short numeric text (like '8') has parentName matching a button INSTANCE (e.g. '\u5206\u7C7B[a3]=\u6587\u672C\u6309\u94AE,\u7C7B\u578B[aI]=\u5371\u9669'), it is likely a badge/count indicator overlaid on that button \u2014 NOT part of the button label. Do NOT render it inside the button text; render it as a separate badge element positioned on the button corner, OR omit it if the design does not show a visible badge on that specific button instance.","Render ALL nodes recursively. Section root layoutStyle.width = section width. Do not call mcp__getDsl after completing section workflow.","CRITICAL \u2014 ICON-TO-NODE BINDING: match PATH nodes to their UI position by the node's ancestor name. A PATH node under a menu item belongs in that menu's icon slot; one under a button/refresh belongs in that button. NEVER substitute a memorized icon \u2014 use the exact `@@SVG:{svgKey}@@` from the PATH node in its section. NEVER reuse a svgKey from a different section.","CRITICAL \u2014 TEXT PROVENANCE SELF-CHECK: before finalizing output, verify every visible text string exists in allTexts. If you emit MORE distinct strings than allTexts.length, you are hallucinating. Typical hallucinations: fabricated table headers, invented data, brand tokens, generic labels not in the design.","CRITICAL \u2014 DO NOT SKIP SECTION DSL FETCH: the section LIST response is ONLY a directory (id/name/nodeCount/textPreview). It does NOT contain DSL nodes, rowTexts, or any rendering data. You CANNOT generate correct HTML from the list alone. You MUST call mcp__getDesignSections with sectionIndex=0, then 1, ... up to totalSections-1 to get each section's DSL. Generating HTML without fetching ALL section DSLs will produce missing content (menus, table data, icons) and incorrect SVGs \u2014 this is the #1 cause of broken output."],gu=class extends ht{constructor(){super();this.name=y4;this.description=x4;this.schema=Y.object({fileId:Y.string().optional().describe("MasterGo design file ID. Required if shortLink is not provided."),layerId:Y.string().optional().describe("Root layer ID of the design. Required if shortLink is not provided."),shortLink:Y.string().optional().describe("Short link (like https://{domain}/goto/LhGgBAK)."),sourceLayerId:Y.string().optional().describe("Source layer ID from URL parameter source_layer_id. When provided, use this instead of layerId for all queries."),sectionIndex:Y.number().int().min(0).optional().describe("0-based section index (SINGULAR \u2014 a single integer per call). If omitted, returns the section list only. If provided, returns full DSL for that ONE specific section. To fetch multiple sections, make MULTIPLE separate calls each with a single sectionIndex. Do NOT pass an array."),format:Kr()}).passthrough()}async execute({fileId:n,layerId:r,shortLink:o,sourceLayerId:i,sectionIndex:s,format:a,...c}){var l,p,d;try{let f=Object.keys(c).filter(b=>!b.startsWith("_"));if(f.length>0){let b=f.includes("sectionIndices")?"Parameter 'sectionIndices' (plural) is NOT supported. Use 'sectionIndex' (SINGULAR \u2014 a single integer) instead. Make MULTIPLE separate calls, each with one sectionIndex (e.g. sectionIndex=15, then sectionIndex=16, ...). Passing an array will always return this error.":`Unknown parameter(s): ${f.join(", ")}. This tool only accepts: fileId, layerId, sourceLayerId, shortLink, sectionIndex, format. Remove the unknown parameter(s) and retry.`;return{isError:!0,content:[{type:"text",text:JSON.stringify({error:b})}]}}if(!o&&(!n||!r&&!i))throw new Error("Either provide fileId with layerId (or sourceLayerId), or provide a shortLink");let h=this.normalizeFileId(n),y=r,v=i;if(o){let b=await ot.extractIdsFromUrl(o);h=this.normalizeFileId(b.fileId),y=b.layerId,v=b.sourceLayerId??i}let x=v||y;if(!h||!x)throw new Error("Could not determine fileId or layerId (need layerId or sourceLayerId)");let m=await ot.getDesignSections(h,x,s);if(s===void 0&&m&&typeof m=="object"&&(!m.rules||!Array.isArray(m.rules)||m.rules.length===0)&&(m.rules=v4),s===void 0&&m&&typeof m=="object"&&typeof m.totalSections=="number"&&m.totalSections>0){let b=m.totalSections,w="",E=(Array.isArray(m.sections)?m.sections:[]).filter(j=>j&&typeof j.structureSiblingCount=="number"&&j.structureSiblingCount>1);if(E.length>0){let j=Math.max(...E.map(me=>me.structureSiblingCount));w=` WARNING: ${E.length} sections have structureSiblingCount up to ${j} \u2014 they look identical in the list (same nodeCount, empty name) but each has DIFFERENT text content and variant state. You MUST fetch ALL of them individually (do NOT skip any after fetching a few). Skipping sibling sections causes missing active-state styling and wrong menu item rendering.`}m.nextAction=`STOP. This section LIST is only a directory \u2014 it has NO DSL nodes, NO rowTexts. You CANNOT generate HTML from this list alone. Your NEXT ACTION: call mcp__getDesignSections with sectionIndex=0, then sectionIndex=1, ... up to sectionIndex=${b-1} (total ${b} calls). Fetch ALL ${b} sections in batches of 3-5 before writing ANY HTML. Sections with nodeCount=3 and empty name are NOT empty \u2014 they contain real menu items and content (resolved from INSTANCE overrides during DSL transfer).${w} Skipping section DSL fetch is the #1 cause of missing menus, broken icons, and wrong data.`;let F=m.splitContainers;if(Array.isArray(F)&&F.length>0){let j=parseInt(((l=m.rootContainer)==null?void 0:l.minHeight)??"",10)||900,me=F.filter(de=>de&&de.height&&de.height>=j*.8&&de.width&&de.width<=300);if(me.length>=2){let de=me.reduce((ae,yt)=>ae+(yt.width||0),0),oe=parseInt(((p=m.rootContainer)==null?void 0:p.width)??"",10)||1440,Re=de,bt=oe-de,Ve=me.map(ae=>ae.name||ae.id).join(", ");m.nextAction+=` LAYOUT: ${me.length} sidebar columns detected (${Ve}), total width=${de}px. Main content must start at x=${Re} with width=${bt}px. Do NOT let main content expand into sidebar space (no flex:1 without explicit max-width).`}}}if(s===void 0&&(x$(h,x),m&&typeof m=="object"&&typeof m.totalSections=="number"&&v$(h,x,m.totalSections)),s!==void 0&&m&&typeof m=="object"){let b=b$(h,x,s);if(b&&b.remaining>0){let w=b.missingIndices.length<=15?`[${b.missingIndices.join(",")}]`:`[${b.missingIndices.slice(0,10).join(",")}... +${b.missingIndices.length-10} more]`;m.fetchProgress=`Fetched ${b.fetched}/${b.total}. MISSING ${b.remaining} sections: ${w}. You MUST fetch ALL remaining sections before generating HTML. Do NOT stop early.`}else b&&b.remaining===0&&(m.fetchProgress=`ALL ${b.total} sections fetched. You can now generate the complete HTML.`)}return{content:[{type:"text",text:Jr(m,a)}]}}catch(f){let h=((d=f.response)==null?void 0:d.data)??(f==null?void 0:f.message);return{isError:!0,content:[{type:"text",text:JSON.stringify(h)}]}}}};var b4="mcp__extractSvg",_4=`
|
|
1289
|
+
Extract SVG data from MasterGo design files. This tool retrieves the DSL from a design layer, finds all PATH nodes (typically inside INSTANCE/icon components), resolves their color references, and generates SVG markup strings.
|
|
1299
1290
|
You can provide either:
|
|
1300
1291
|
1. fileId and layerId directly, or
|
|
1301
1292
|
2. a short link (like https://{domain}/goto/LhGgBAK)
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1293
|
+
|
|
1294
|
+
Pagination: When there are many icons, use the first call without "page" to get totalCount. Then call again with page=0, page=1, etc. (page starts at 0, pageSize defaults to 20, max 100). If hasMore is false, you've fetched all pages.
|
|
1295
|
+
`,yu=class extends ht{constructor(){super();this.name=b4;this.description=_4;this.schema=Y.object({fileId:Y.string().optional().describe("MasterGo design file ID (format: file/<fileId> in MasterGo URL). Required if shortLink is not provided."),layerId:Y.string().optional().describe("Layer ID of the specific component or element to retrieve (format: ?layer_id=<layerId>). Required if shortLink is not provided."),sourceLayerId:Y.string().optional().describe("Source layer ID from URL parameter source_layer_id. When provided, use this instead of layerId for all queries."),shortLink:Y.string().optional().describe("Short link (like https://{domain}/goto/LhGgBAK)."),backgroundColor:Y.string().optional().describe("Solid background color for the SVG (e.g. '#000000', 'black'). Useful for previewing white/light icons."),page:Y.number().int().min(0).optional().describe("Page number for pagination (starts at 0). Omit to get all SVGs at once. When provided, the response includes totalCount/hasMore/page/pageSize for you to iterate through all pages."),pageSize:Y.number().int().min(1).max(100).optional().describe("Number of SVGs per page (default 20, max 100). Only used when page is provided."),format:Kr()})}async execute(n){var r;try{let{fileId:o,layerId:i,sourceLayerId:s,shortLink:a,backgroundColor:c,page:l,pageSize:p,format:d}=n;if(!a&&(!o||!i&&!s))throw new Error("Either provide fileId with layerId (or sourceLayerId), or provide a shortLink");let f=this.normalizeFileId(o),h=i,y=s;if(a){let m=await ot.extractIdsFromUrl(a);f=this.normalizeFileId(m.fileId),h=m.layerId,y=m.sourceLayerId??s}let v=y||h;if(!f||!v)throw new Error("Could not determine fileId or layerId (need layerId or sourceLayerId)");let x=await ot.extractSvg(f,v,c,l,p);return{content:[{type:"text",text:Jr(x,d)}]}}catch(o){let i=((r=o.response)==null?void 0:r.data)??(o==null?void 0:o.message);return{isError:!0,content:[{type:"text",text:JSON.stringify(i)}]}}}};var vu=require("fs/promises"),N$=require("fs"),ar=Ee(require("path")),w4="mcp__applyDesign",S4=`
|
|
1296
|
+
Finalize generated design code: replace ALL placeholders (SVG icons + long text) with real high-precision data from the design cache, then write the final file directly to disk.
|
|
1297
|
+
|
|
1298
|
+
WHAT it does:
|
|
1299
|
+
1. Replaces every \`@@SVG:{svgKey}@@\` placeholder with the real high-precision \`<svg>\` markup from the SVG cache (character-for-character exact, no rounding).
|
|
1300
|
+
2. Replaces every \`T{sectionIndex}|{nodeId}\` text placeholder with the real long text from the text cache.
|
|
1301
|
+
3. Detects fabricated (hand-written) \`<path d="...">\` that were NOT injected via placeholders \u2014 reports them as errors.
|
|
1302
|
+
4. Writes the finalized code directly to \`{outDir}/{outputFileName}\` on disk.
|
|
1303
|
+
|
|
1304
|
+
CRITICAL \u2014 outDir is MANDATORY: Always provide outDir so the finalized code is written directly to disk. This ensures the server-injected data reaches the file WITHOUT any LLM re-processing. Do NOT copy the code back into your response and re-output it \u2014 that causes precision loss. The file written by this tool IS the final deliverable.
|
|
1305
|
+
|
|
1306
|
+
PLACEHOLDER FORMATS:
|
|
1307
|
+
- SVG icons: \`@@SVG:{svgKey}@@\` \u2014 svgKey comes from the PATH node's svgKey field in the section DSL.
|
|
1308
|
+
Example: <span class="icon">@@SVG:#0@@</span>
|
|
1309
|
+
- Long text: \`T{sectionIndex}|{nodeId}\` \u2014 appears in TEXT nodes whose text was too long for inline DSL.
|
|
1310
|
+
Example: <p>T3|1:1234:5678</p>
|
|
1311
|
+
|
|
1312
|
+
The server escapes the injected data according to the \`targetLang\` parameter:
|
|
1313
|
+
- \`html\` (default, also for Vue templates): place the placeholder in element content (\`<span>@@SVG:#0@@</span>\`, \`<p>T3|1:2</p>\`). SVG is inserted as-is; long text is HTML-escaped (& < >).
|
|
1314
|
+
- \`dart\` (Flutter): place the placeholder inside a single-quoted string literal (\`SvgPicture.string('@@SVG:#0@@')\`, \`Text('T3|1:2')\`). SVG/text are escaped for that string (\\ ' newline). Pass \`targetLang: "dart"\`.
|
|
1315
|
+
Pick targetLang to match the code you generated, and place placeholders in that language's standard position shown above.
|
|
1306
1316
|
|
|
1307
1317
|
You can provide either:
|
|
1308
1318
|
1. fileId and layerId directly, or
|
|
1309
1319
|
2. a short link (like https://{domain}/goto/LhGgBAK)
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
You can provide either:
|
|
1313
|
-
1. fileId and layerId directly, or
|
|
1314
|
-
2. a short link (like https://{domain}/goto/LhGgBAK)
|
|
1315
|
-
Returns { count, svgs: [{ name, id, svg }] } \u2014 one entry per icon/instance found in the design.
|
|
1316
|
-
`,fu=class extends nt{constructor(){super();this.name=aZ;this.description=cZ;this.schema=Y.object({fileId:Y.string().optional().describe("MasterGo design file ID (format: file/<fileId> in MasterGo URL). Required if shortLink is not provided."),layerId:Y.string().optional().describe("Layer ID of the specific component or element to retrieve (format: ?layer_id=<layerId>). Required if shortLink is not provided."),sourceLayerId:Y.string().optional().describe("Source layer ID from URL parameter source_layer_id. When provided, use this instead of layerId for all queries."),shortLink:Y.string().optional().describe("Short link (like https://{domain}/goto/LhGgBAK)."),backgroundColor:Y.string().optional().describe("Solid background color for the SVG (e.g. '#000000', 'black'). Useful for previewing white/light icons."),format:zr()})}async execute(r){var n;try{let{fileId:o,layerId:i,sourceLayerId:s,shortLink:a,backgroundColor:c,format:l}=r;if(!a&&(!o||!i&&!s))throw new Error("Either provide fileId with layerId (or sourceLayerId), or provide a shortLink");let p=this.normalizeFileId(o),d=i,f=s;if(a){let v=await He.extractIdsFromUrl(a);p=this.normalizeFileId(v.fileId),d=v.layerId,f=v.sourceLayerId??s}let m=f||d;if(!p||!m)throw new Error("Could not determine fileId or layerId (need layerId or sourceLayerId)");let y=await He.extractSvg(p,m,c);return{content:[{type:"text",text:Cr(y,l)}]}}catch(o){let i=((n=o.response)==null?void 0:n.data)??(o==null?void 0:o.message);return{isError:!0,content:[{type:"text",text:JSON.stringify(i)}]}}}};var lZ="\n## MasterGo Design DSL - Section-by-Section Workflow\n\n### Step 0: Get Layout Overview (MANDATORY)\nCall `mcp__getDesignSections` WITHOUT sectionIndex first.\nThe response contains `sections` array with `nodeCount` per section, `totalSections`, and `totalNodes`.\nEach `sections[]` entry ALSO carries a **page-absolute bounding box**: `x`, `y` (top-left corner relative to the root container's origin), `width`, `height`. This tells you exactly where each section sits on the canvas.\nUse this to understand the design scope before fetching details.\n\n`rootMetadata` (if present) provides the root layer's dimensions (width, height), name, type, and optional fill/styles. Use these as the page frame size and background.\n`splitContainers` (if present) lists containers that were too large and split into child sections. Each entry provides the container's name, type, id, and layout properties (layoutMode, itemSpacing, padding). Use these to understand how the split sections should be arranged \u2014 they share the container's layout direction and spacing.\n\n### Step 1: Fetch Each Section DSL (MANDATORY - ALL N sections)\nFor i = 0 to N-1, call `mcp__getDesignSections` with `sectionIndex=i`.\nYou MUST call this tool N times. Do NOT skip any section.\nCRITICAL: Fetch sections in BATCHES of 3-5 at a time. Do NOT request all sections simultaneously \u2014 too many concurrent requests will cause timeouts. Send 3-5 sectionIndex calls, wait for all results, then send the next batch.\n\n### Step 2: Fetch SVG and Text Data (MANDATORY)\nAfter ALL N sections have been fetched, call BOTH tools below:\n\n**SVG Data** \u2014 Call `mcp__getDesignSvgs` with the same fileId/layerId.\nThis returns all cached SVG HTML strings. Each key uses format `S{sectionIndex}:{namedAncestor}|{ancestorId}`.\n- Match each SVG to its section by the `S{sectionIndex}` prefix.\n- Insert the svgHtml string directly where the icon/PATH should appear.\n- Do NOT construct your own SVG \u2014 use the exact svgHtml from the response.\n\n**Text Data** \u2014 Call `mcp__getDesignTexts` with the same fileId/layerId.\nThis returns exact text content for large text nodes (>50 chars). In the section DSL, these TEXT nodes have their `text` field replaced with a key like `T{sectionIndex}|{nodeId}`.\n- Look up the key in the returned texts map to get the exact text string.\n- Insert the text string VERBATIM \u2014 do NOT paraphrase, translate, summarize, or invent text.\n- This is the ONLY source of truth for large text content. The DSL key is a reference, not the actual text.\n\n### Step 3: Generate Complete Code\nAfter ALL N sections have been fetched and SVG data retrieved:\n- MANDATORY: Use `rootContainer` from the section list response to create the root container div. Apply ALL its CSS properties (width, minHeight, background, overflow, position:relative) to a wrapping div. ALL sections MUST be placed inside this root container.\n- CRITICAL \u2014 Position each section ABSOLUTELY: every section entry has a page-absolute bbox (x, y, width, height) from Step 0. Wrap each section in a container with `position:absolute; left:{x}px; top:{y}px; width:{width}px` inside the root container. Do NOT reconstruct the page by stacking sections in a flex column with guessed `margin-top` / `gap` values. Many designs are spatially OVERLAID (status bar, title bar, form card, decorative curves, floating text, background layers) and only reconstruct correctly with absolute positioning. Intra-section layout still uses each node's `layoutStyle.relativeX/relativeY` as before.\n- Generate a single complete HTML file containing ALL sections in order, nested inside the root container.\n- token fields must be generated as CSS variables with comments indicating the token name.\n- If componentDocumentLinks exists, call mcp__getComponentLink to fetch documentation.\n\n### Tool Selection Rules:\n- `mcp__getDesignSections` is the PRIMARY tool. Always start here.\n- `mcp__getDsl` is a FALLBACK \u2014 call it ONLY if `getDesignSections` returns an error (e.g. tool not available on older servers).\n- NEVER call both `getDesignSections` AND `getDsl` / `extractSvg` for the same design.\n- The section workflow provides COMPLETE data. Do NOT call `getDsl` to \"verify\".\n\n### Output Format:\n- The design-data tools (`getDesignSections`, `getDsl`, `getDesignSvgs`, `getDesignTexts`, `extractSvg`, `getMeta`) accept an optional `format` parameter: `json` (default), `yaml`, or `tree`. `yaml`/`tree` use fewer tokens for large designs; all three round-trip without data loss. Set a session-wide default with the `--format` CLI flag or `DEFAULT_FORMAT` env var.\n\n### Text Fidelity Rules:\n- TEXT nodes contain actual text in node.text array. Read EACH node's text and use it EXACTLY.\n- Do NOT duplicate text from one node to another \u2014 each TEXT node has unique content.\n- Do NOT skip any child nodes. Render ALL nodes: every tab, every button, every text element.\n\n### Background & Color Rules:\n- The DSL `styles` map contains fill/stroke style definitions. Use the node's `fillStyleId`/`strokeStyleId` to look up the actual color from `styles`.\n- The root/frame node's background comes from its fill style. Do NOT invent gradient or solid backgrounds \u2014 use ONLY the colors from the DSL data.\n- If a node has no fill or the fill style is empty/transparent, do NOT add a background color. Leave it transparent or inherit from parent.\n- Status bar, title bar, and other container backgrounds MUST match the DSL fill data exactly.\n\n### Anti-Hallucination Rules:\n- NEVER fabricate SVG path data for icons or vector shapes \u2014 use the svgHtml from mcp__getDesignSvgs.\n- NEVER fabricate background colors, gradients, or decorations that are not present in the DSL data.\n";function uZ(){let{token:t,baseUrl:e,rules:r,debug:n,noRule:o,proxy:i,format:s}=cE();if(s!==void 0){let c=Xl(s);c?process.env.DEFAULT_FORMAT=c:console.warn(`Invalid --format value: "${s}". Must be one of: json, yaml, tree. Falling back to json.`)}if(n){process.env.DEBUG="true",console.log("Debug information:"),console.log(`Token: ${t?"set":"not set"}`),console.log(`API URL: ${e||"default"}`),console.log(`Rules: ${r.length>0?r.join(", "):"none"}`),console.log(`No Rule: ${o?"enabled":"disabled"}`),console.log(`Proxy: ${i||"none"}`);let c=Hl();console.log(`Custom Headers: ${Object.keys(c).length>0?JSON.stringify(aE(c)):"none"}`),console.log(`Format: ${process.env.DEFAULT_FORMAT||"json (default)"}`),console.log("Debug mode: enabled")}let a=new dl({name:"MasterGoMcpServer",version:"0.0.1"},{instructions:lZ});new lu().register(a),new uu().register(a),new pu().register(a),new du().register(a),new eu().register(a),new ru().register(a),new nu().register(a),new ou().register(a),new iu().register(a),new su().register(a),new au().register(a),new fu().register(a),a.connect(new ml)}uZ();
|
|
1320
|
+
|
|
1321
|
+
IMPORTANT: Call this tool with the COMPLETE code string. After the tool writes the file, you are DONE \u2014 do NOT output or edit the code further.
|
|
1322
|
+
`,xu=class extends ht{constructor(){super();this.name=w4;this.description=S4;this.schema=Y.object({fileId:Y.string().optional().describe("MasterGo design file ID. Required if shortLink is not provided. Must match the fileId used in getDesignSections."),layerId:Y.string().optional().describe("Root layer ID of the design. Required if shortLink is not provided. Must match the layerId used in getDesignSections."),sourceLayerId:Y.string().optional().describe("Source layer ID from URL parameter source_layer_id. When provided, use this instead of layerId for all queries."),shortLink:Y.string().optional().describe("Short link (like https://{domain}/goto/LhGgBAK)."),code:Y.string().describe("The COMPLETE generated code containing @@SVG:{svgKey}@@ and/or T{sectionIndex}|{nodeId} placeholders."),outDir:Y.string().describe("Output directory where the final file will be written. The finalized code (with all placeholders replaced by real data) is written directly to this directory \u2014 do NOT re-output or edit the code after this tool runs. Example: '/Users/you/project/output' or './output'."),outputFileName:Y.string().optional().describe("Output file name (default: 'index.html'). Include extension. Example: 'snmp-agent.html'."),targetLang:Y.enum(["html","dart"]).optional().describe("Target language of the generated code, decides placeholder escaping. 'html' (default, also for Vue): SVG inserted as-is into element content, long text HTML-escaped. 'dart' (Flutter): SVG/text escaped for single-quoted string literals (SvgPicture.string('...'), Text('...')).")})}async execute(n){var r,o,i;try{let{fileId:s,layerId:a,sourceLayerId:c,shortLink:l,code:p,outDir:d,outputFileName:f,targetLang:h}=n;if(!l&&(!s||!a&&!c))throw new Error("Either provide fileId with layerId (or sourceLayerId), or provide a shortLink");let y=this.normalizeFileId(s),v=a,x=c;if(l){let Ve=await ot.extractIdsFromUrl(l);y=this.normalizeFileId(Ve.fileId),v=Ve.layerId,x=Ve.sourceLayerId??c}let m=x||v;if(!y||!m)throw new Error("Could not determine fileId or layerId (need layerId or sourceLayerId)");if(typeof p!="string"||!p.trim())throw new Error("code must be a non-empty string of the generated code");if(!d||!d.trim())throw new Error("outDir is required \u2014 the finalized code must be written directly to disk to prevent LLM re-processing");let b=await ot.applyDesign(p,y,m,x,h),w=b.patchedCode;if(typeof w!="string"||!w)throw new Error("Server did not return patchedCode. Check that frontend-mcp-server is up to date.");let k=ar.default.basename((f==null?void 0:f.trim())||"index.html"),E=ar.default.resolve(process.env.MG_OUTPUT_ROOT||process.cwd()),F=ar.default.isAbsolute(d)?ar.default.resolve(d):ar.default.resolve(E,d),j=ar.default.relative(E,F);if(j===".."||j.startsWith(".."+ar.default.sep)||ar.default.isAbsolute(j))throw new Error(`outDir "${d}" resolves outside the allowed output root (${E}). Use a path inside it, or set the MG_OUTPUT_ROOT environment variable to permit a different base.`);let me=F;(0,N$.existsSync)(me)||await(0,vu.mkdir)(me,{recursive:!0});let de=ar.default.join(me,k);await(0,vu.writeFile)(de,w,"utf8"),_$(y,m);let oe=b.report||{},Re={success:!0,filePath:de,fileName:k,report:oe};if(b.warning&&(Re.warning=b.warning),b.error&&(Re.error=b.error),!Re.warning){let Ve=(((r=oe.svgUnresolved)==null?void 0:r.length)||0)+(((o=oe.textUnresolved)==null?void 0:o.length)||0);Ve>0&&(Re.warning=`${Ve} placeholder(s) unresolved \u2014 check svgKey/text keys.`)}let bt=oe.fabricatedPaths??[];return!Re.error&&bt.length>0&&(Re.error=`${bt.length} fabricated path(s) detected \u2014 replace them with @@SVG:{svgKey}@@ placeholders and re-run.`),{content:[{type:"text",text:JSON.stringify(Re)}]}}catch(s){let a=((i=s.response)==null?void 0:i.data)??(s==null?void 0:s.message);return{isError:!0,content:[{type:"text",text:JSON.stringify(a)}]}}}};var k4='\n## MasterGo Design DSL - Section-by-Section Workflow\n\n### Step 0: Get Layout Overview (MANDATORY)\nCall `mcp__getDesignSections` WITHOUT sectionIndex first.\nThe response contains `sections` array with `nodeCount` per section, `totalSections`, and `totalNodes`.\nEach `sections[]` entry ALSO carries a **page-absolute bounding box**: `x`, `y` (top-left corner relative to the root container\'s origin), `width`, `height`. This tells you exactly where each section sits on the canvas.\nUse this to understand the design scope before fetching details.\n\n`rootMetadata` (if present) provides the root layer\'s dimensions (width, height), name, type, and optional fill/styles. Use these as the page frame size and background.\n`splitContainers` (if present) lists containers that were too large and split into child sections. Each entry provides the container\'s name, type, id, x, y, width, height, layout properties (layoutMode, itemSpacing, padding), **and now a `background` color** (resolved hex/css value, e.g. `"#055DDC"`) plus `fill` reference (e.g. `"paint_1:4829"`). Use these to understand how the split sections should be arranged \u2014 they share the container\'s width, layout direction and spacing. IMPORTANT: sections from the same split container MUST share the container\'s width. Apply the container\'s `background` to the parent wrapper that encloses its child sections \u2014 this gives the container its correct visual background without each section needing to carry it.\n\n**Structure grouping** \u2014 Each section entry carries two fields to help you avoid redundant work:\n\n1. **`structureHash`** \u2014 structural fingerprint. Sections with identical hashes have the **exact same node-tree skeleton** (same type tree + layout attributes). Only **leaf values differ** (text, fill colors, icon paths). Fetch the DSL for the **first section in each hash group** and reuse its rendered structure for the rest \u2014 just swap in different text/color/icon values. Sections without a structureHash have unique structures and must be rendered individually.\n\n2. **`containerId`** \u2014 links to a `splitContainers` entry. All sections sharing a containerId inherit that container\'s width, flexDirection, gap, and padding. When wrapping these sections in a parent element, match the container\'s width and layout properties \u2014 don\'t repeat them on each child.\n\n### Step 1: Fetch Each Section DSL (MANDATORY - ALL N sections)\nFor i = 0 to N-1, call `mcp__getDesignSections` with `sectionIndex=i`.\nYou MUST call this tool N times. Do NOT skip any section.\nCRITICAL: Fetch sections in BATCHES of 3-5 at a time. Do NOT request all sections simultaneously \u2014 too many concurrent requests will cause timeouts. Send 3-5 sectionIndex calls, wait for all results, then send the next batch.\n\n### Step 2: Understand SVG Data Model (MANDATORY)\nAfter ALL N sections have been fetched, understand how icons work:\n\n**PATH Nodes \u2014 ALL carry a `svgKey` field:**\nEvery PATH node (icon) in the DSL has a `svgKey` field (e.g. `S3:\u5587\u53ED-\u8F6C\u66F2|31:5068`) AND a `svgName` field (a semantic name like `\u901A\u7528/\u5237\u65B0`, `\u901A\u7528/\u5411\u5DE6`, `\u641C\u7D22`, `\u9F7F\u8F6E`). The actual SVG markup is NOT in the DSL \u2014 it lives in a server-side cache, retrieved at the end via `mcp__applyDesign`.\n\n**You do NOT copy SVG markup during code generation.** Instead:\n1. When you encounter a PATH node, note its `svgKey` (for the placeholder) AND its `svgName` (to understand WHAT icon it is and WHERE it should go).\n2. In your generated code, place a placeholder `@@SVG:{svgKey}@@` where the icon goes. Use `svgName` to match each icon to its correct UI position \u2014 e.g. an icon with `svgName: "\u901A\u7528/\u5411\u5DE6"` belongs in a collapse/fold button, not a "add" button.\n3. After the complete code is generated, call `mcp__applyDesign` \u2014 it replaces all placeholders with real high-precision SVG.\n\n**Why this design**: copying SVG path data through LLM generation causes precision loss (17.522848 \u2192 17.52), dropped subpaths, and shape corruption. The placeholder approach ensures path data never passes through generation \u2014 the server does deterministic string substitution.\n\n**CRITICAL \u2014 SVG UNIQUENESS:** Each PATH node has its OWN unique `svgKey` (e.g. `S0:\u901A\u7528/\u7F16\u8F91|1:5454`, `S3:\u5587\u53ED-\u8F6C\u66F2|31:5068`). NEVER reuse a svgKey from one PATH node for another \u2014 even if two icons look similar (e.g. two arrow icons), they are DIFFERENT vectors with DIFFERENT svgKeys. Always use the exact `svgKey` from the PATH node where the icon appears.\n\n**Text Data** \u2014 Long text (>50 chars) in the DSL appears as `T{sectionIndex}|{nodeId}` placeholders. These are automatically replaced by `mcp__applyDesign` server-side. Just leave the `T{si}|{nodeId}` placeholder in your code where the text should appear, and applyDesign will inject the real text.\n- Short text already inlined in the DSL (`node.text` / `dsl.rowTexts`) must be inserted VERBATIM \u2014 do NOT paraphrase, translate, summarize, or invent text.\n\n**`dsl.rowTexts`** \u2014 An array of `{text, parentType?, parentName?}` objects for all leaf TEXT values in this section, in tree order. Each item carries `parentType` and `parentName` to indicate which container the text belongs to (e.g. `{text: "8", parentType: "INSTANCE", parentName: "\u5220\u9664"}` means "8" is inside a delete button \u2014 it\'s a badge count, NOT an independent notification dot). Use parentType/parentName for context; do NOT reassign text to unrelated UI elements.\n\n### Step 3: Generate Complete Code\nAfter ALL N sections have been fetched:\n- MANDATORY: Use `rootContainer` from the section list response to create the root container div. Apply ALL its CSS properties (width, minHeight, background, overflow, position:relative) to a wrapping div. ALL sections MUST be placed inside this root container.\n- CRITICAL \u2014 Position each section ABSOLUTELY: every section entry has a page-absolute bbox (x, y, width, height) from Step 0. Wrap each section in a container with `position:absolute; left:{x}px; top:{y}px; width:{width}px` inside the root container. Do NOT reconstruct the page by stacking sections in a flex column with guessed `margin-top` / `gap` values. Many designs are spatially OVERLAID (status bar, title bar, form card, decorative curves, floating text, background layers) and only reconstruct correctly with absolute positioning.\n- CRITICAL \u2014 Overflow clipping: some design elements (brand logos, decorative shapes) are LARGER than their visible area \u2014 the design deliberately clips them via `overflow: hidden` on the parent. When a node\'s `layoutStyle.width/height` is smaller than its SVG content, you MUST preserve this clipping: set the parent container to the node\'s `layoutStyle` dimensions AND add `overflow: hidden`, then let the SVG render at its natural size inside. Do NOT shrink the SVG to fit the container (that distorts the logo) and do NOT enlarge the container (that breaks the layout).\n\n### Step 4: SVG Placeholder Workflow (FINAL step \u2014 MANDATORY)\nEvery icon in the design is a PATH node with a `svgKey`. The SVG markup is NOT in the DSL \u2014 you cannot copy it even if you wanted to. You MUST use placeholders.\n\n**During code generation** \u2014 wherever an icon/SVG should appear, place a placeholder `@@SVG:{svgKey}@@`:\n- Read the `svgKey` from the PATH node in the section DSL.\n- Place `@@SVG:` + that exact svgKey + `@@` where the icon goes.\n- **CRITICAL \u2014 Icon container sizing**: the placeholder MUST be placed inside a container whose width and height match the PATH node\'s `layoutStyle.width` and `layoutStyle.height`. The injected SVG uses `width="100%" height="100%"`, so it fills its direct parent. If you place it directly inside a large button container (e.g. 32\xD732px) instead of the icon\'s own size (e.g. 16\xD716px), the icon will render too large. Always wrap the placeholder in an element sized to the PATH node\'s dimensions:\n - **HTML/Vue**: `<span style="width:{layoutStyle.width}px;height:{layoutStyle.height}px;display:flex;align-items:center;justify-content:center">@@SVG:{svgKey}@@</span>`\n - **JSX/React**: `<span style={{width:\'{w}px\',height:\'{h}px\'}}>{/*@@SVG:{svgKey}@@*/}</span>`\n - **Flutter**: `SizedBox(width:{w},height:{h},child: SvgPicture.string(\'@@SVG:{svgKey}@@\'))`\n- Use `svgName` to match each icon to its correct UI position \u2014 e.g. an icon with `svgName: "\u901A\u7528/\u5411\u5DE6"` belongs in a collapse/fold button, not a "add" button.\n\n**After generating the COMPLETE code** \u2014 call `mcp__applyDesign` with the full code string AND an `outDir` parameter. The tool substitutes every `@@SVG:...@@` with the real high-precision `<svg>` markup from the cache (character-for-character exact, no rounding) AND writes the final file directly to disk. **You MUST provide `outDir`** \u2014 this writes the patched code to a file WITHOUT it passing back through your generation, preventing any re-processing or precision loss. After the tool writes the file, you are DONE \u2014 do NOT output, copy, or edit the code further.\n\n### Intra-Section Layout Rules (node-level positioning):\nEvery node in a section\'s DSL has TWO pieces of layout data:\n\n1. **`flexContainerInfo`** \u2014 If a node HAS this field, it is a flex container. Its direct children are laid out by flex rules, NOT by absolute positioning. Generate CSS: `display: flex; flex-direction: {flexDirection}; justify-content: {justifyContent}; align-items: {alignItems}; gap: {gap}; padding: {padding};`. Do NOT add `position: absolute` or `left/top` to flex container nodes or their direct children.\n\n2. **`layoutStyle.relativeX/relativeY`** \u2014 Use these ONLY for leaf/free nodes that are NOT inside a flex container. For those nodes, apply `position: absolute; left: {relativeX}px; top: {relativeY}px;`.\n\n3. **Nested flex containers** \u2014 A flex container can contain a child that is ALSO a flex container (e.g. a horizontal toolbar with a vertical menu inside). Each level independently uses its own `flexContainerInfo`. **You MUST preserve ALL nesting levels** \u2014 do NOT flatten a two-level flex structure into one. For example, a table header cell where "label + sort-icon" form an inner group and "action-icon" sits at the outer level MUST be rendered as TWO nested flex containers, not one flat flex with all three items side by side. Flattening loses the visual grouping (label+sort tightly paired, action-icon separated) and causes layout breakage.\n\n4. **When a child has `flexGrow` / `flexShrink`** \u2014 These are flex item properties. Apply `flex: {flexGrow} 1 0` on the child element. Do NOT position it absolutely.\n\n5. **CRITICAL \u2014 Flex column with fixed-height children**: When a container uses `flex-direction: column` with a FIXED height and `overflow: hidden`, ALL children with fixed heights (tabs, headers, pagination bars, footers, scrollbars) MUST have `flex-shrink: 0`. Only ONE child \u2014 the flexible content area (table body, scrollable region) \u2014 should use `flex: 1`. If you forget `flex-shrink: 0` on fixed-height children, flex layout will squeeze them out of the visible area and they get clipped by `overflow: hidden` (e.g. pagination bar becomes invisible).\n\n6. **CRITICAL \u2014 Nested FRAME dimensions and spacing**: When a FRAME contains child FRAMEs (e.g. a card panel with an inner content container), the outer element\'s width/height MUST come from the OUTER node\'s `layoutStyle.width/height` \u2014 NOT from the inner content container. A common error is using the inner container\'s width (e.g. 285px) for the card itself (which should be 317px). Always trace to the correct node: if the DSL shows `\u5BB9\u5668A (317\xD7107) > \u5BB9\u5668B (285\xD775, relativeX:16, relativeY:16)`, the rendered card is 317\xD7107 with 16px padding, and the content inside is 285\xD775.\n\n7. **CRITICAL \u2014 Precise vertical positioning inside cards**: Inside small fixed-height containers (stat cards, info panels, badge boxes), do NOT invent `gap` values. Use each child\'s `layoutStyle.relativeY` to position elements precisely. For example, if a card\'s DSL shows child A at `relativeY:0` and child B at `relativeY:32`, the vertical gap is 32px (minus child A\'s height) \u2014 NOT a guessed `gap:16px` or `gap:20px`. Inventing large gaps in small cards pushes content apart and breaks the compact layout. When `flexContainerInfo.gap` is present, use that exact value; when it is absent, use `relativeY` differences to calculate spacing.\n\n8. **CRITICAL \u2014 Overlapping elements in the same container (Switch toggle, icon badges, layered decorations)**: When a container holds multiple sibling elements that visually OVERLAP (one on top of another), the container MUST use `position: relative` and each child MUST use `position: absolute` with its own `layoutStyle.relativeX/relativeY`. Do NOT use `display: flex` on the container \u2014 flex will place the children SIDE BY SIDE instead of overlapping, shrinking them and destroying the composition. The canonical example is a Switch toggle: the DSL shows a track PATH (`relativeX:0, relativeY:0, w:40, h:24`) and a knob circle (`relativeX:17.5, relativeY:1.5, w:21, h:21`) as siblings. Generate EXACTLY this structure:\n```\n<div style="position:relative; width:40px; height:24px;">\n <div style="position:absolute; left:0px; top:0px;">@@SVG:{trackSvgKey}@@</div>\n <div style="position:absolute; left:17.5px; top:1.5px;">@@SVG:{knobSvgKey}@@</div>\n</div>\n```\nEach child\'s `left` and `top` come from that child\'s own `layoutStyle.relativeX` and `layoutStyle.relativeY`. Never use a shared `left:0; top:0` for all children. Never use flex.\n\n9. **Fallback** \u2014 Nodes with NEITHER `flexContainerInfo` NOR being inside a flex container: use `position: absolute; left: {relativeX}px; top: {relativeY}px;`.\n- Generate a single complete HTML file containing ALL sections in order, nested inside the root container.\n- token fields must be generated as CSS variables with comments indicating the token name.\n- If componentDocumentLinks exists, call mcp__getComponentLink to fetch documentation.\n- When splitContainers is present, sections that were split from the same container must share that container\'s width and be wrapped together. **Apply the container\'s `background` to the parent wrapper**: splitContainer entries now include `background` (resolved CSS color) and `fill` (paint reference).\n- CRITICAL \u2014 Table container boundary: when a design has a table (header + data rows), wrap the ENTIRE table area (header row + all data rows + any empty space below the last row down to the pagination) in a single container with the design\'s background color (usually white) and the table\'s border. The table may have only 1 data row but the container must extend to fill the design\'s allocated height \u2014 do NOT leave the area below the last row as page background showing through. The pagination bar sits BELOW this container as a sibling, not inside it.\n\n### Text Provenance Self-Check (MANDATORY before finalizing output):\n- Before writing the final HTML, enumerate every visible text string you plan to emit.\n- For EACH string, verify it exists in `rootMetadata.allTexts` (the section LIST response carries this closed-set whitelist of all text in the design) OR in some section\'s `dsl.rowTexts` / `node.text`.\n- Any string with NO provenance (typical offenders: fabricated column headers like "\u7528\u6237\u540D\u79F0/\u6240\u5C5E\u7EC4/\u8FDC\u7A0BIP", invented cell data like "1.1.3.543.4" or "AES-128", brand-watermark tokens like "Hillstone Design", generic menu labels not in the design) MUST be deleted or replaced with an empty placeholder.\n- If you find yourself generating MORE distinct text strings than `allTexts.length`, STOP and re-check \u2014 you are hallucinating.\n\n### Row Count Self-Check (MANDATORY for tables/lists):\n- For every table, list, or repeated-row section in your output, look up its `structureSiblingCount`. This field appears in BOTH the section list entry AND each section DSL response (top-level `structureSiblingCount`).\n- The number of data rows you render MUST equal `structureSiblingCount`. This is a hard constraint, not a suggestion.\n- `structureSiblingCount: 1` means render EXACTLY 1 data row. Do NOT add rows "for visual density", "to look complete", or "because a pagination label says \u517110\u9879". Pagination labels reflect a UI control state, NOT a data-row count \u2014 they must never inflate the row count.\n- Before outputting any table, verify: count your `<tr>` (data rows, excluding header) \u2192 it MUST equal `structureSiblingCount`. If you rendered more, delete the extras now.\n\n### Tool Selection Rules:\n- `mcp__getDesignSections` is the PRIMARY tool for full-page design-to-code generation. Always start here when you need to generate a complete HTML page from a design.\n- `mcp__extractSvg` is a STANDALONE tool. Use it DIRECTLY when you only need to extract SVG icons from a design \u2014 do NOT call `getDesignSections` before it.\n- `mcp__getDsl` is a FALLBACK \u2014 call it ONLY if `getDesignSections` returns an error (e.g. tool not available on older servers).\n- NEVER call both `getDesignSections` AND `getDsl` for the same design.\n- NEVER combine the section workflow with `extractSvg`. If you only need SVG icons, use `extractSvg` alone. If you need a full page, use the section workflow (which uses `@@SVG:{svgKey}@@` placeholders + `mcp__applyDesign` for SVG data).\n- The section workflow provides COMPLETE data. Do NOT call `getDsl` to "verify".\n\n### Output Format:\n- The design-data tools (`getDesignSections`, `getDsl`, `extractSvg`, `getMeta`) accept an optional `format` parameter: `json` (default), `yaml`, or `tree`. `yaml`/`tree` use fewer tokens for large designs; all three round-trip without data loss. Set a session-wide default with the `--format` CLI flag or `DEFAULT_FORMAT` env var.\n\n### Text Fidelity Rules:\n- TEXT nodes contain actual text in node.text array. Read EACH node\'s text and use it EXACTLY.\n- Do NOT duplicate text from one node to another \u2014 each TEXT node has unique content.\n- Do NOT skip any child nodes. Render ALL nodes: every tab, every button, every text element.\n\n### Background & Color Rules:\n- **PREFER the `_color` field**: every node with a resolved fill carries a `_color` field containing the computed CSS hex/rgb value. Use this value DIRECTLY in CSS \u2014 no styles-table lookup needed. Example: `color: #4E5969` from `"_color": "#4E5969"`.\n- The `fill` field (e.g. `paint_1:7200`) remains for reference. Use `_token` (e.g. `"Text/Text-4"`) for CSS variable naming like `var(--text-text-4, #4E5969)`.\n- If a node has both `_color` and `fill`, `_color` is authoritative for the visual color value.\n- The DSL `styles` map contains fill/stroke style definitions. Use the node\'s `fillStyleId`/`strokeStyleId` to look up the actual color from `styles`.\n- The root/frame node\'s background comes from its fill style. Do NOT invent gradient or solid backgrounds \u2014 use ONLY the colors from the DSL data.\n- If a node has no fill or the fill style is empty/transparent, do NOT add a background color. Leave it transparent or inherit from parent.\n- Status bar, title bar, and other container backgrounds MUST match the DSL fill data exactly.\n- **NEVER hardcode LLM-default colors** (e.g. `#1D2129`, `#000`, `#333`) when `_color` is present. The `_color` value is the design truth \u2014 copying it requires zero cognitive effort and zero styles-table lookup.\n- **CRITICAL \u2014 splitContainers[].background IS the exact CSS background-color.** Copy it verbatim: `background-color: <value>;`. MUST NOT add gradients, MUST NOT change the color. The designer chose this color deliberately.\n- **CRITICAL \u2014 OPACITY ON FRAME**: a FRAME\'s `opacity` field applies ONLY to its own background, NOT children. Use `background-color: rgba(R, G, B, <opacity>)` \u2014 NEVER use CSS `opacity: X` on the parent, which makes child text/icons translucent.\n- **CRITICAL \u2014 NEVER promote a child node\'s gradient/fill onto its parent container.** A gradient `linear-gradient(...)` in the DSL is computed against THAT node\'s own bounding box \u2014 its stop offsets (e.g. `#0063BA 83%`) are percentages of that specific node\'s height, NOT the parent\'s height. If you copy such a gradient onto a differently-sized parent (e.g. a 88px navbar that contains a 195px-tall decorative oval), the stops map to the WRONG size and the visible color shifts or disappears entirely (blue appears only in the bottom 15px, leaving the top transparent). Rules:\n - The background/fill of a node applies to THAT node\'s element only, at THAT node\'s size. Render each node at its own `layoutStyle.width/height`.\n - A FRAME/GROUP/INSTANCE with NO `_color`/`fill` (empty) has NO background \u2014 leave it transparent. Do NOT borrow a child\'s fill to fill the parent.\n - Decorative layers with `filter: blur(...)` (e.g. `filter: blur(81.6px)`) or very low alpha (`rgba(..., 0.0x)`) are visual overlay accents (glow, bloom), NOT the container\'s base background. Keep them as positioned overlays inside the container \u2014 never extract their gradient as the container background.\n - If a container (navbar, card, header) needs a solid base background that the DSL doesn\'t directly provide on the FRAME node, derive it from the dominant opaque color among its children (e.g. the most common solid `_color`), not from a decorative gradient overlay.\n\n### Anti-Hallucination Rules:\n- You MUST use EXACT text content from the DSL data. NEVER invent, translate, or paraphrase text.\n- If a section has empty or missing text data, render it as an empty placeholder \u2014 do NOT fabricate text.\n- NEVER generate placeholder values, generic tags, fabricated amounts, or invented statistics.\n- Every piece of text, every number, every label in your output MUST come directly from the DSL data.\n- NEVER fabricate SVG path data for icons or vector shapes \u2014 use `@@SVG:{svgKey}@@` placeholders for ALL icons, then call `mcp__applyDesign`.\n- NEVER fabricate background colors, gradients, or decorations that are not present in the DSL data.\n\n### Empty Design Tolerance Rules (CLOSED-SET TEXT):\n- Many designs are UNFINISHED wireframes or component-library showcases with sparse text. This is NORMAL, not missing data.\n- The ONLY allowed text strings in your output are those present in `dsl.rowTexts` or `node.text` of some fetched section. The section list response carries `rootMetadata.allTexts` \u2014 the complete closed set of text strings in this design. Treat it as a whitelist: any string NOT in allTexts is a hallucination and MUST be removed.\n- Sparse text is especially common when the design reuses a component library: the design itself may have only ~10 distinct text strings total, even though the rendered page looks dense. Do NOT infer more content from visual density or the page\'s apparent purpose.\n- If a section has `textTotal=0` or empty `rowTexts`, render its STRUCTURE with EMPTY placeholders (`<td></td>`, blank labels, empty menu items) \u2014 do NOT invent column headers, menu item labels, IP addresses, algorithm names, or any data values to fill it.\n- A table with 1 data row in the DSL renders as 1 data row in HTML. Do NOT pad with fabricated rows. Pagination labels like "\u5171 10 \u9879" reflect a UI control state, NOT a data-row count \u2014 never synthesize rows to match them.\n- Brand-name leakage is forbidden: do NOT generate library/watermark tokens (e.g. "Hillstone Design", "Ant Design", "Material UI") even if they appear in component node names or you recognize the brand from training data. Only render text that appears in the design\'s own TEXT nodes.\n- When in doubt about whether a text string is real: it is NOT real unless you can cite the sectionIndex it came from.\n\n### SVG Icon Anti-Simplification Rules:\n- PATH nodes carry a `svgKey` \u2014 the SVG markup is injected by `mcp__applyDesign` at the end. You MUST use `@@SVG:{svgKey}@@` placeholders \u2014 never hand-write `<path d="...">`.\n- **SVG UNIQUENESS:** Each icon in the DSL is a distinct design artifact \u2014 different sections may have DIFFERENT icons even if they look similar (e.g. "\u641C\u7D22" in section 2 vs "\u641C\u7D22" in section 40 are DIFFERENT SVGs). NEVER reuse a `svgKey` from one section in another. Always use the exact `svgKey` from the PATH node in its own section.\n- **NEVER substitute vector paths with simplified shapes** \u2014 a `<path>` containing a house icon is NOT replaceable by a `<rect>` + `<polygon>`. The designer chose every anchor point; your simplified version WILL look different.\n- **VERIFY after copying each SVG**: count the number of `M` characters in the source path `d` attribute. Your copy MUST have exactly the same count. Fewer `M` \u2192 you corrupted the icon \u2192 redo.\n- **SHAPE CHECK**: if the source uses `<path>`, your output MUST use `<path>`. NOT `<rect>`, NOT `<circle>`, NOT `<ellipse>`. Shape type changes ARE visual changes.\n- The only acceptable SVG operation is: copy the complete `<svg>...</svg>` block from the DSL data and paste it into your HTML. Nothing else.\n- **Common failure pattern**: you saw a complex path and thought "this looks roughly like 4 rectangles" \u2192 you drew 4 `<rect>`s \u2192 the result is visually WRONG. The designer chose a vector path for a reason. Trust the data.\n- **COMPOSITE ICONS (logos, multi-subpath marks):** when a logo/brand mark is split into multiple sub-paths and stripped to svgCache, the SVG that `mcp__applyDesign` injects for the `@@SVG:{svgKey}@@` placeholder is the complete `<svg>...</svg>`. Keep it whole. The node\'s `relativeX`/`relativeY` are canvas placement coordinates \u2014 they are NOT to be reused as `transform="translate(x,y) scale(...)"` inside a hand-assembled `<svg>`. Doing so warps the glyph out of its viewBox.\n\n### INSTANCE Variant State Rules:\n- INSTANCE nodes may carry a **`_variantProps`** object with semantic state labels extracted from component variant properties (e.g. `{"\u72B6\u6001": "\u9009\u4E2D", "\u5206\u7C7B": "\u5E7D\u7075\u6309\u94AE", "\u5C3A\u5BF8": "24"}`).\n- **Active/selected state**: compare `_variantProps` across sibling INSTANCE nodes to find which one has `"\u72B6\u6001": "\u9009\u4E2D"` or similar active-state values. Apply the `.active` CSS class ONLY to that node \u2014 NEVER default to the first item in a list.\n- **Sidebar menu items**: each menu item (e.g. 22 submenu entries) is a separate section containing an INSTANCE with `_variantProps`. The item with `"\u72B6\u6001": "\u9009\u4E2D"` in its `_variantProps` is the currently active page \u2014 the corresponding section\'s `rowTexts[0]` (or TEXT child) is its label. Render this item with `class="submenu-item active"`.\n- **Button states**: `"\u5206\u7C7B": "\u5E7D\u7075\u6309\u94AE"` vs `"\u5206\u7C7B": "\u4E3B\u8981\u6309\u94AE"` determines the button\'s visual style (outline vs filled). Multiple buttons in the same toolbar may have different variant props \u2014 respect each one individually.\n- If `_variantProps` is absent from all siblings, assume all are in `default` state \u2014 do NOT invent active states.\n\n### Repeat / Row-Count Rules:\n- Each section entry carries `structureSiblingCount` = the exact number of times this structure appears in the design.\n- For data/table sections: the number of rendered rows MUST equal `structureSiblingCount`. A count of 1 means ONE row total \u2014 do not pad with fabricated rows "for visual density" or "to fill the table". The single row in the DSL IS the complete dataset.\n- For `structureSiblingCount >= 2`: reuse the `structureHash` template, render exactly that many instances, swap per-instance text/colors from each section\'s own data.\n- Pagination controls, "load more" buttons, and empty-state rows are CONTROLS, not data rows \u2014 never counted toward the dataset.\n\n### Placeholder Text Rules:\n- TEXT nodes may carry `_placeholder: true`. This flag marks text whose node name equals its content \u2014 the universal signature of component-library placeholder text (the slot name WAS the placeholder string, e.g. `{name: "Hillstone Design", text: "Hillstone Design"}`). This works across ALL component libraries without brand-specific tokens.\n- `_placeholder: true` is a HINT, not a deletion. Read the surrounding context: if the flagged text does not map to a real column header, label, or content slot in this specific design, treat it as boilerplate and omit it. If it does map to real content, render it normally.\n- Never blanket-render every `_placeholder` text as visible headers/columns.\n\n### Data Completeness Rules:\n- You MUST fetch ALL sections (0..totalSections-1). If totalSections=48, you must call sectionIndex=0 through 47 \u2014 no exceptions.\n- Some sections may have nodeCount=3 and no visible TEXT nodes (text is in component property overrides). Do NOT skip them \u2014 the TEXT is resolved during DSL transfer. These sections contribute real content.\n- **textPreview**: each section list entry carries a `textPreview` field (first TEXT node found, truncated to 20 chars). If two sections both have nodeCount=3 and empty name, use `textPreview` to tell them apart \u2014 they are different menu items (e.g. "\u7CFB\u7EDF\u4FE1\u606F" / "\u6743\u9650\u8BBE\u7F6E"), NOT duplicates.\n- Keep a checklist: track which section indices have been requested. Do not stop until every index 0..N-1 has been fetched.\n- If you accidentally skipped a section, go back and request the missing indices. An incomplete section set WILL cause missing content in the final HTML.\n\n\n\n### Critical Rendering Checklist (MANDATORY \u2014 verify each item before finalizing):\nBefore declaring the HTML complete, enumerate every structural element below and confirm it is rendered. Missing ANY item is a fidelity defect.\n\n1. **Sidebar menu item icons**: each sidebar menu section carries a PATH icon with a `svgKey`. Did you place `@@SVG:{svgKey}@@` for each? If you used a `<rect>` or `<circle>` or hand-wrote `<path d="...">`, DELETE it \u2014 the DSL does NOT contain path data. Use the placeholder.\n\n2. **Table header column icons** (sort/filter/search): each table header cell may carry sort-arrow, filter-funnel, and search-lens PATH icons. Did you place `@@SVG:{svgKey}@@` for each? If a header cell has no icons, you may have skipped them.\n\n3. **Pagination icons** (refresh, prev/next arrows, dropdown): the pagination section has MULTIPLE PATH icons. Did you place `@@SVG:{svgKey}@@` for EACH one?\n\n4. **Brand/logo area text**: the brand section has a TEXT node with the actual brand name (present in `allTexts`). Did you render it as visible text?\n\n5. **Every PATH node has a placeholder**: walk through every section\'s DSL \u2014 every PATH node must have a corresponding `@@SVG:{svgKey}@@` in your code. Count: the number of `@@SVG:` placeholders in your code MUST equal the total number of PATH nodes across all sections.\n\n6. **Text provenance**: every text string in your output MUST be traceable to `rootMetadata.allTexts` or a section\'s `dsl.rowTexts`/`node.text`. If you cannot cite the exact source, the text is a hallucination \u2014 delete it.\n\n7. **SVG placeholder replacement (HARD GATE)**: your HTML is INVALID and must NOT be output until you have called `mcp__applyDesign` with the complete code and used the returned `patchedCode`. This is not optional \u2014 it is the FINAL mandatory step. If you wrote ANY `<path d="...">` by hand instead of using `@@SVG:{svgKey}@@` placeholders, the `mcp__applyDesign` tool will detect it as a FABRICATED path and return an error. You MUST then replace those hand-written paths with placeholders and call `mcp__applyDesign` again. The ONLY acceptable output is the `patchedCode` returned by `mcp__applyDesign` \u2014 never your pre-replacement code.\n\nIf any item above is unchecked, your HTML is INCOMPLETE. Fix it before outputting.\n\n### Data Interpretation Rules:\n- Pagination/table-footer labels (e.g. "\u5171 10 \u9879", "X rows/page", "items per page") reflect UI control state \u2014 NOT data to replicate.\n- "\u5171 X \u9879" is the pagination widget showing "total X items". The actual data rows come from the table body sections (preceding the pagination section).\n- Do NOT fabricate data rows based on pagination "total" values. Render ONLY the actual data rows present in the DSL.\n- If the DSL contains 1 data row, output exactly 1 table row. Do NOT multiply rows to match a pagination label.\n- **CRITICAL \u2014 SVG icons for table actions**: table action columns (\u64CD\u4F5C\u5217) use PATH icon nodes with `svgKey` fields. Place `@@SVG:{svgKey}@@` for each action button. NEVER render action buttons as `<p>\u7F16\u8F91</p>` or `<p>\u5220\u9664</p>` plain text or hand-drawn shapes.\n- **CRITICAL \u2014 Persistent sidebars**: render all sidebar levels as static visible columns positioned via splitContainers coordinates. Do NOT hide or toggle sidebar levels.\n- **CRITICAL \u2014 NEVER reuse an SVG from one section in another**: each icon position has its OWN `svgKey` (e.g. `#5`) in the DSL. A collapse/fold button icon is a DIFFERENT vector from a menu navigation arrow even if both look like arrows. You MUST use the exact `svgKey` from the PATH node where the icon appears \u2014 never use a svgKey from a different PATH node.\n';function T4(){let{token:t,baseUrl:e,rules:n,debug:r,noRule:o,proxy:i,format:s}=hE();if(s!==void 0){let c=iu(s);c?process.env.DEFAULT_FORMAT=c:console.warn(`Invalid --format value: "${s}". Must be one of: json, yaml, tree. Falling back to json.`)}if(r){process.env.DEBUG="true",console.log("Debug information:"),console.log(`Token: ${t?"set":"not set"}`),console.log(`API URL: ${e||"default"}`),console.log(`Rules: ${n.length>0?n.join(", "):"none"}`),console.log(`No Rule: ${o?"enabled":"disabled"}`),console.log(`Proxy: ${i||"none"}`);let c=Xl();console.log(`Custom Headers: ${Object.keys(c).length>0?JSON.stringify(mE(c)):"none"}`),console.log(`Format: ${process.env.DEFAULT_FORMAT||"json (default)"}`),console.log("Debug mode: enabled")}let a=new vl({name:"MasterGoMcpServer",version:Yi.version},{instructions:k4});new hu().register(a),new gu().register(a),new au().register(a),new lu().register(a),new uu().register(a),new pu().register(a),new du().register(a),new fu().register(a),new mu().register(a),new yu().register(a),new xu().register(a),a.connect(new _l)}T4();
|
|
1317
1323
|
/*! Bundled license information:
|
|
1318
1324
|
|
|
1319
1325
|
mime-db/index.js:
|